@sankhyalabs/ezui 5.20.0-dev.2 → 5.20.0-dev.4
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/README.md +4 -5
- package/dist/cjs/ez-alert-list.cjs.entry.js +33 -28
- package/dist/cjs/ez-card-item.cjs.entry.js +52 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +155 -11
- package/dist/cjs/ez-filter-input_2.cjs.entry.js +137 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +4 -2
- package/dist/cjs/ez-grid.cjs.entry.js +3 -3
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +31 -611
- package/dist/cjs/ez-split-panel.cjs.entry.js +3 -2
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +6 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +33 -28
- package/dist/collection/components/ez-card-item/ez-card-item.css +0 -16
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +173 -12
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
- package/dist/collection/components/ez-grid/ez-grid.css +1 -0
- package/dist/collection/components/ez-grid/ez-grid.js +2 -2
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-search/ez-search.css +0 -330
- package/dist/collection/components/ez-search/ez-search.js +55 -689
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +7 -0
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +19 -1
- package/dist/custom-elements/index.js +240 -665
- package/dist/esm/ez-alert-list.entry.js +33 -28
- package/dist/esm/ez-card-item.entry.js +48 -0
- package/dist/esm/ez-combo-box.entry.js +156 -12
- package/dist/esm/ez-filter-input_2.entry.js +132 -0
- package/dist/esm/ez-form-view.entry.js +4 -2
- package/dist/esm/ez-grid.entry.js +3 -3
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +33 -613
- package/dist/esm/ez-split-panel.entry.js +3 -2
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +6 -2
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-05f5a778.entry.js +1 -0
- package/dist/ezui/p-13dbad96.entry.js +1 -0
- package/dist/ezui/p-5613fe63.entry.js +1 -0
- package/dist/ezui/p-60848ef6.entry.js +1 -0
- package/dist/ezui/{p-6e2f8e6b.entry.js → p-844ee673.entry.js} +1 -1
- package/dist/ezui/{p-f56dd1da.entry.js → p-93c3df4f.entry.js} +1 -1
- package/dist/ezui/p-940ed30b.entry.js +1 -0
- package/dist/ezui/p-a32aaac6.entry.js +1 -0
- package/dist/ezui/p-a5ac7151.entry.js +1 -0
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +15 -0
- package/dist/types/components/ez-search/ez-search.d.ts +10 -100
- package/dist/types/components.d.ts +22 -23
- package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +1 -2
- package/package.json +16 -8
- package/dist/cjs/ez-card-item_3.cjs.entry.js +0 -182
- package/dist/esm/ez-card-item_3.entry.js +0 -176
- package/dist/ezui/p-133fae4a.entry.js +0 -1
- package/dist/ezui/p-43b03119.entry.js +0 -1
- package/dist/ezui/p-4a7f113d.entry.js +0 -1
- package/dist/ezui/p-76ba9d67.entry.js +0 -1
- package/dist/ezui/p-796c1a88.entry.js +0 -1
- package/dist/ezui/p-ba875f37.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as s,g as h}from"./p-23a36bb6.js";import{StringUtils as n}from"@sankhyalabs/core";var r=function(t,i){return Number(t.slice(0,-1*i.length))},e=function(t){return t.endsWith("px")?{value:t,type:"px",numeric:r(t,"px")}:t.endsWith("fr")?{value:t,type:"fr",numeric:r(t,"fr")}:t.endsWith("%")?{value:t,type:"%",numeric:r(t,"%")}:"auto"===t?{value:t,type:"auto"}:null},o=function(t){return t.split(" ").map(e)},u=function(t,i,s){return i.concat(s).map((function(i){return i.style[t]})).filter((function(t){return void 0!==t&&""!==t}))},c=function(t){for(var i=0;i<t.length;i++)if(t[i].numeric>0)return i;return null},a=function(){return!1},f=function(t,i,s){t.style[i]=s},l=function(t,i,s){var h=t[i];return void 0!==h?h:s};function d(t){var i;return(i=[]).concat.apply(i,Array.from(t.ownerDocument.styleSheets).map((function(t){var i=[];try{i=Array.from(t.cssRules||[])}catch(t){}return i}))).filter((function(i){var s=!1;try{s=t.matches(i.selectorText)}catch(t){}return s}))}var m=function(t,i,s){this.direction=t,this.element=i.element,this.track=i.track,"column"===t?(this.gridTemplateProp="grid-template-columns",this.gridGapProp="grid-column-gap",this.cursor=l(s,"columnCursor",l(s,"cursor","col-resize")),this.snapOffset=l(s,"columnSnapOffset",l(s,"snapOffset",30)),this.dragInterval=l(s,"columnDragInterval",l(s,"dragInterval",1)),this.clientAxis="clientX",this.optionStyle=l(s,"gridTemplateColumns")):"row"===t&&(this.gridTemplateProp="grid-template-rows",this.gridGapProp="grid-row-gap",this.cursor=l(s,"rowCursor",l(s,"cursor","row-resize")),this.snapOffset=l(s,"rowSnapOffset",l(s,"snapOffset",30)),this.dragInterval=l(s,"rowDragInterval",l(s,"dragInterval",1)),this.clientAxis="clientY",this.optionStyle=l(s,"gridTemplateRows")),this.onDragStart=l(s,"onDragStart",a),this.onDragEnd=l(s,"onDragEnd",a),this.onDrag=l(s,"onDrag",a),this.writeStyle=l(s,"writeStyle",f),this.startDragging=this.startDragging.bind(this),this.stopDragging=this.stopDragging.bind(this),this.drag=this.drag.bind(this),this.minSizeStart=i.minSizeStart,this.minSizeEnd=i.minSizeEnd,i.element&&(this.element.addEventListener("mousedown",this.startDragging),this.element.addEventListener("touchstart",this.startDragging))};m.prototype.getDimensions=function(){var t=this.grid.getBoundingClientRect(),i=t.width,s=t.height,h=t.bottom,n=t.left,r=t.right;"column"===this.direction?(this.start=t.top,this.end=h,this.size=s):"row"===this.direction&&(this.start=n,this.end=r,this.size=i)},m.prototype.getSizeAtTrack=function(t,i){return function(t,i,s,h){return void 0===s&&(s=0),void 0===h&&(h=!1),i.slice(0,h?t+1:t).reduce((function(t,i){return t+i.numeric}),0)+(s?t*s:0)}(t,this.computedPixels,this.computedGapPixels,i)},m.prototype.getSizeOfTrack=function(t){return this.computedPixels[t].numeric},m.prototype.getRawTracks=function(){var t=u(this.gridTemplateProp,[this.grid],d(this.grid));if(!t.length){if(this.optionStyle)return this.optionStyle;throw Error("Unable to determine grid template tracks from styles.")}return t[0]},m.prototype.getGap=function(){var t=u(this.gridGapProp,[this.grid],d(this.grid));return t.length?t[0]:null},m.prototype.getRawComputedTracks=function(){return window.getComputedStyle(this.grid)[this.gridTemplateProp]},m.prototype.getRawComputedGap=function(){return window.getComputedStyle(this.grid)[this.gridGapProp]},m.prototype.setTracks=function(t){this.tracks=t.split(" "),this.trackValues=o(t)},m.prototype.setComputedTracks=function(t){this.computedTracks=t.split(" "),this.computedPixels=o(t)},m.prototype.setGap=function(t){this.gap=t},m.prototype.setComputedGap=function(t){var i;this.computedGap=t,this.computedGapPixels=((i=this.computedGap).endsWith("px")?Number(i.slice(0,-1*"px".length)):null)||0},m.prototype.getMousePosition=function(t){return"touches"in t?t.touches[0][this.clientAxis]:t[this.clientAxis]},m.prototype.startDragging=function(t){if(!("button"in t)||0===t.button){t.preventDefault(),this.grid=this.element?this.element.parentNode:t.target.parentNode,this.getDimensions(),this.setTracks(this.getRawTracks()),this.setComputedTracks(this.getRawComputedTracks()),this.setGap(this.getGap()),this.setComputedGap(this.getRawComputedGap());var i=this.trackValues.filter((function(t){return"%"===t.type})),s=this.trackValues.filter((function(t){return"fr"===t.type}));if(this.totalFrs=s.length,this.totalFrs){var h=c(s);null!==h&&(this.frToPixels=this.computedPixels[h].numeric/s[h].numeric)}if(i.length){var n=c(i);null!==n&&(this.percentageToPixels=this.computedPixels[n].numeric/i[n].numeric)}var r=this.getSizeAtTrack(this.track,!1)+this.start;if(this.dragStartOffset=this.getMousePosition(t)-r,this.aTrack=this.track-1,!(this.track<this.tracks.length-1))throw Error("Invalid track index: "+this.track+". Track must be between two other tracks and only "+this.tracks.length+" tracks were found.");this.bTrack=this.track+1,this.aTrackStart=this.getSizeAtTrack(this.aTrack,!1)+this.start,this.bTrackEnd=this.getSizeAtTrack(this.bTrack,!0)+this.start,this.dragging=!0,window.addEventListener("mouseup",this.stopDragging),window.addEventListener("touchend",this.stopDragging),window.addEventListener("touchcancel",this.stopDragging),window.addEventListener("mousemove",this.drag),window.addEventListener("touchmove",this.drag),this.grid.addEventListener("selectstart",a),this.grid.addEventListener("dragstart",a),this.grid.style.userSelect="none",this.grid.style.webkitUserSelect="none",this.grid.style.MozUserSelect="none",this.grid.style.pointerEvents="none",this.grid.style.cursor=this.cursor,window.document.body.style.cursor=this.cursor,this.onDragStart(this.direction,this.track)}},m.prototype.stopDragging=function(){this.dragging=!1,this.cleanup(),this.onDragEnd(this.direction,this.track),this.needsDestroy&&(this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),this.destroyCb(),this.needsDestroy=!1,this.destroyCb=null)},m.prototype.drag=function(t){var i=this.getMousePosition(t),s=this.getSizeOfTrack(this.track),h=this.aTrackStart+this.minSizeStart+this.dragStartOffset+this.computedGapPixels,n=this.bTrackEnd-this.minSizeEnd-this.computedGapPixels-(s-this.dragStartOffset);i<h+this.snapOffset&&(i=h),i>n-this.snapOffset&&(i=n),i<h?i=h:i>n&&(i=n);var r=i-this.aTrackStart-this.dragStartOffset-this.computedGapPixels,e=this.bTrackEnd-i+this.dragStartOffset-s-this.computedGapPixels;if(this.dragInterval>1){var o=Math.round(r/this.dragInterval)*this.dragInterval;e-=o-r,r=o}r<this.minSizeStart&&(r=this.minSizeStart),e<this.minSizeEnd&&(e=this.minSizeEnd),"px"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=r+"px":"fr"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=1===this.totalFrs?"1fr":r/this.frToPixels+"fr":"%"===this.trackValues[this.aTrack].type&&(this.tracks[this.aTrack]=r/this.percentageToPixels+"%"),"px"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=e+"px":"fr"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=1===this.totalFrs?"1fr":e/this.frToPixels+"fr":"%"===this.trackValues[this.bTrack].type&&(this.tracks[this.bTrack]=e/this.percentageToPixels+"%");var u=this.tracks.join(" ");this.writeStyle(this.grid,this.gridTemplateProp,u),this.onDrag(this.direction,this.track,u)},m.prototype.cleanup=function(){window.removeEventListener("mouseup",this.stopDragging),window.removeEventListener("touchend",this.stopDragging),window.removeEventListener("touchcancel",this.stopDragging),window.removeEventListener("mousemove",this.drag),window.removeEventListener("touchmove",this.drag),this.grid&&(this.grid.removeEventListener("selectstart",a),this.grid.removeEventListener("dragstart",a),this.grid.style.userSelect="",this.grid.style.webkitUserSelect="",this.grid.style.MozUserSelect="",this.grid.style.pointerEvents="",this.grid.style.cursor=""),window.document.body.style.cursor=""},m.prototype.destroy=function(t,i){void 0===t&&(t=!0),t||!1===this.dragging?(this.cleanup(),this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),i&&i()):(this.needsDestroy=!0,i&&(this.destroyCb=i))};var w=function(t,i,s){return i in t?t[i]:s},v=function(t,i){return function(s){if(s.track<1)throw Error("Invalid track index: "+s.track+". Track must be between two other tracks.");var h="column"===t?i.columnMinSizes||{}:i.rowMinSizes||{},n="column"===t?"columnMinSize":"rowMinSize";return new m(t,Object.assign({},{minSizeStart:w(h,s.track-1,l(i,n,l(i,"minSize",0))),minSizeEnd:w(h,s.track+1,l(i,n,l(i,"minSize",0)))},s),i)}},p=function(t){var i=this;this.columnGutters={},this.rowGutters={},this.options=Object.assign({},{columnGutters:t.columnGutters||[],rowGutters:t.rowGutters||[],columnMinSizes:t.columnMinSizes||{},rowMinSizes:t.rowMinSizes||{}},t),this.options.columnGutters.forEach((function(t){i.columnGutters[t.track]=v("column",i.options)(t)})),this.options.rowGutters.forEach((function(t){i.rowGutters[t.track]=v("row",i.options)(t)}))};p.prototype.addColumnGutter=function(t,i){this.columnGutters[i]&&this.columnGutters[i].destroy(),this.columnGutters[i]=v("column",this.options)({element:t,track:i})},p.prototype.addRowGutter=function(t,i){this.rowGutters[i]&&this.rowGutters[i].destroy(),this.rowGutters[i]=v("row",this.options)({element:t,track:i})},p.prototype.removeColumnGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.columnGutters[t]&&this.columnGutters[t].destroy(i,(function(){delete s.columnGutters[t]}))},p.prototype.removeRowGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.rowGutters[t]&&this.rowGutters[t].destroy(i,(function(){delete s.rowGutters[t]}))},p.prototype.handleDragStart=function(t,i,s){"column"===i?(this.columnGutters[s]&&this.columnGutters[s].destroy(),this.columnGutters[s]=v("column",this.options)({track:s}),this.columnGutters[s].startDragging(t)):"row"===i&&(this.rowGutters[s]&&this.rowGutters[s].destroy(),this.rowGutters[s]=v("row",this.options)({track:s}),this.rowGutters[s].startDragging(t))},p.prototype.destroy=function(t){var i=this;void 0===t&&(t=!0),Object.keys(this.columnGutters).forEach((function(s){return i.columnGutters[s].destroy(t,(function(){delete i.columnGutters[s]}))})),Object.keys(this.rowGutters).forEach((function(s){return i.rowGutters[s].destroy(t,(function(){delete i.rowGutters[s]}))}))};const g=class{constructor(i){t(this,i),this._items=[],this.direction="column"}componentDidLoad(){this._panelID=n.generateUUID(),this._element.dataset.panelId=this._panelID;let t=Array.from(this._element.children);this._items=t.filter((t=>{var i;return"EZ-SPLIT-ITEM"===(null===(i=t.tagName)||void 0===i?void 0:i.toUpperCase())}));let i=1;this._items.forEach(((t,s)=>{t.dataset.trackNumber=i.toString(),this._items.length>1&&s!=this._items.length-1&&this.addItemGutter(t),i+=2})),this.initSplit()}initSplit(){var t;this._items.length&&(this._element.style["row"==this.direction?"grid-template-rows":"grid-template-columns"]=this.getGridTemplate(),t=this.getGutters(),new p(t))}getGutters(){const t={columnGutters:[],rowGutters:[]};if(!this._items.length)return t;const i="row"==this.direction?"rowGutters":"columnGutters";return this._items.forEach(((s,h)=>{if(h==this._items.length-1)return;let n=s.dataset.trackNumber;h===this._items.length-1&&(n=this._items.length.toString()),t[i].push({track:Number(n),element:this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${s.dataset.trackNumber}"]`)})})),t}addItemGutter(t){const i=document.createElement("div");i.classList.add("ez-split-gutter"),i.classList.add(this.direction),i.dataset.itemTrack=`${t.dataset.trackNumber}`,i.dataset.trackNumber=(Number(t.dataset.trackNumber)+1).toString(),t.parentNode.insertBefore(i,t.nextSibling)}getElementStyle(){return{display:"grid",height:"100%",width:"100%"}}getGridTemplate(){let t="";return this._items.forEach(((i,s)=>{t+=s!==this._items.length-1?0!==s?" 1fr 5px":"1fr 5px":" 1fr"})),t}render(){return i(s,{style:this.getElementStyle()})}get _element(){return h(this)}};g.style=".ez-split-gutter{cursor:grab;background-color:transparent}";export{g as ez_split_panel}
|
|
1
|
+
import{r as t,h as i,H as s,g as h}from"./p-23a36bb6.js";import{StringUtils as n}from"@sankhyalabs/core";var r=function(t,i){return Number(t.slice(0,-1*i.length))},e=function(t){return t.endsWith("px")?{value:t,type:"px",numeric:r(t,"px")}:t.endsWith("fr")?{value:t,type:"fr",numeric:r(t,"fr")}:t.endsWith("%")?{value:t,type:"%",numeric:r(t,"%")}:"auto"===t?{value:t,type:"auto"}:null},o=function(t){return t.split(" ").map(e)},u=function(t,i,s){return i.concat(s).map((function(i){return i.style[t]})).filter((function(t){return void 0!==t&&""!==t}))},c=function(t){for(var i=0;i<t.length;i++)if(t[i].numeric>0)return i;return null},a=function(){return!1},l=function(t,i,s){t.style[i]=s},f=function(t,i,s){var h=t[i];return void 0!==h?h:s};function m(t){var i;return(i=[]).concat.apply(i,Array.from(t.ownerDocument.styleSheets).map((function(t){var i=[];try{i=Array.from(t.cssRules||[])}catch(t){}return i}))).filter((function(i){var s=!1;try{s=t.matches(i.selectorText)}catch(t){}return s}))}var d=function(t,i,s){this.direction=t,this.element=i.element,this.track=i.track,"column"===t?(this.gridTemplateProp="grid-template-columns",this.gridGapProp="grid-column-gap",this.cursor=f(s,"columnCursor",f(s,"cursor","col-resize")),this.snapOffset=f(s,"columnSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"columnDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientX",this.optionStyle=f(s,"gridTemplateColumns")):"row"===t&&(this.gridTemplateProp="grid-template-rows",this.gridGapProp="grid-row-gap",this.cursor=f(s,"rowCursor",f(s,"cursor","row-resize")),this.snapOffset=f(s,"rowSnapOffset",f(s,"snapOffset",30)),this.dragInterval=f(s,"rowDragInterval",f(s,"dragInterval",1)),this.clientAxis="clientY",this.optionStyle=f(s,"gridTemplateRows")),this.onDragStart=f(s,"onDragStart",a),this.onDragEnd=f(s,"onDragEnd",a),this.onDrag=f(s,"onDrag",a),this.writeStyle=f(s,"writeStyle",l),this.startDragging=this.startDragging.bind(this),this.stopDragging=this.stopDragging.bind(this),this.drag=this.drag.bind(this),this.minSizeStart=i.minSizeStart,this.minSizeEnd=i.minSizeEnd,i.element&&(this.element.addEventListener("mousedown",this.startDragging),this.element.addEventListener("touchstart",this.startDragging))};d.prototype.getDimensions=function(){var t=this.grid.getBoundingClientRect(),i=t.width,s=t.height,h=t.bottom,n=t.left,r=t.right;"column"===this.direction?(this.start=t.top,this.end=h,this.size=s):"row"===this.direction&&(this.start=n,this.end=r,this.size=i)},d.prototype.getSizeAtTrack=function(t,i){return function(t,i,s,h){return void 0===s&&(s=0),void 0===h&&(h=!1),i.slice(0,h?t+1:t).reduce((function(t,i){return t+i.numeric}),0)+(s?t*s:0)}(t,this.computedPixels,this.computedGapPixels,i)},d.prototype.getSizeOfTrack=function(t){return this.computedPixels[t].numeric},d.prototype.getRawTracks=function(){var t=u(this.gridTemplateProp,[this.grid],m(this.grid));if(!t.length){if(this.optionStyle)return this.optionStyle;throw Error("Unable to determine grid template tracks from styles.")}return t[0]},d.prototype.getGap=function(){var t=u(this.gridGapProp,[this.grid],m(this.grid));return t.length?t[0]:null},d.prototype.getRawComputedTracks=function(){return window.getComputedStyle(this.grid)[this.gridTemplateProp]},d.prototype.getRawComputedGap=function(){return window.getComputedStyle(this.grid)[this.gridGapProp]},d.prototype.setTracks=function(t){this.tracks=t.split(" "),this.trackValues=o(t)},d.prototype.setComputedTracks=function(t){this.computedTracks=t.split(" "),this.computedPixels=o(t)},d.prototype.setGap=function(t){this.gap=t},d.prototype.setComputedGap=function(t){var i;this.computedGap=t,this.computedGapPixels=((i=this.computedGap).endsWith("px")?Number(i.slice(0,-1*"px".length)):null)||0},d.prototype.getMousePosition=function(t){return"touches"in t?t.touches[0][this.clientAxis]:t[this.clientAxis]},d.prototype.startDragging=function(t){if(!("button"in t)||0===t.button){t.preventDefault(),this.grid=this.element?this.element.parentNode:t.target.parentNode,this.getDimensions(),this.setTracks(this.getRawTracks()),this.setComputedTracks(this.getRawComputedTracks()),this.setGap(this.getGap()),this.setComputedGap(this.getRawComputedGap());var i=this.trackValues.filter((function(t){return"%"===t.type})),s=this.trackValues.filter((function(t){return"fr"===t.type}));if(this.totalFrs=s.length,this.totalFrs){var h=c(s);null!==h&&(this.frToPixels=this.computedPixels[h].numeric/s[h].numeric)}if(i.length){var n=c(i);null!==n&&(this.percentageToPixels=this.computedPixels[n].numeric/i[n].numeric)}var r=this.getSizeAtTrack(this.track,!1)+this.start;if(this.dragStartOffset=this.getMousePosition(t)-r,this.aTrack=this.track-1,!(this.track<this.tracks.length-1))throw Error("Invalid track index: "+this.track+". Track must be between two other tracks and only "+this.tracks.length+" tracks were found.");this.bTrack=this.track+1,this.aTrackStart=this.getSizeAtTrack(this.aTrack,!1)+this.start,this.bTrackEnd=this.getSizeAtTrack(this.bTrack,!0)+this.start,this.dragging=!0,window.addEventListener("mouseup",this.stopDragging),window.addEventListener("touchend",this.stopDragging),window.addEventListener("touchcancel",this.stopDragging),window.addEventListener("mousemove",this.drag),window.addEventListener("touchmove",this.drag),this.grid.addEventListener("selectstart",a),this.grid.addEventListener("dragstart",a),this.grid.style.userSelect="none",this.grid.style.webkitUserSelect="none",this.grid.style.MozUserSelect="none",this.grid.style.pointerEvents="none",this.grid.style.cursor=this.cursor,window.document.body.style.cursor=this.cursor,this.onDragStart(this.direction,this.track)}},d.prototype.stopDragging=function(){this.dragging=!1,this.cleanup(),this.onDragEnd(this.direction,this.track),this.needsDestroy&&(this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),this.destroyCb(),this.needsDestroy=!1,this.destroyCb=null)},d.prototype.drag=function(t){var i=this.getMousePosition(t),s=this.getSizeOfTrack(this.track),h=this.aTrackStart+this.minSizeStart+this.dragStartOffset+this.computedGapPixels,n=this.bTrackEnd-this.minSizeEnd-this.computedGapPixels-(s-this.dragStartOffset);i<h+this.snapOffset&&(i=h),i>n-this.snapOffset&&(i=n),i<h?i=h:i>n&&(i=n);var r=i-this.aTrackStart-this.dragStartOffset-this.computedGapPixels,e=this.bTrackEnd-i+this.dragStartOffset-s-this.computedGapPixels;if(this.dragInterval>1){var o=Math.round(r/this.dragInterval)*this.dragInterval;e-=o-r,r=o}r<this.minSizeStart&&(r=this.minSizeStart),e<this.minSizeEnd&&(e=this.minSizeEnd),"px"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=r+"px":"fr"===this.trackValues[this.aTrack].type?this.tracks[this.aTrack]=1===this.totalFrs?"1fr":r/this.frToPixels+"fr":"%"===this.trackValues[this.aTrack].type&&(this.tracks[this.aTrack]=r/this.percentageToPixels+"%"),"px"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=e+"px":"fr"===this.trackValues[this.bTrack].type?this.tracks[this.bTrack]=1===this.totalFrs?"1fr":e/this.frToPixels+"fr":"%"===this.trackValues[this.bTrack].type&&(this.tracks[this.bTrack]=e/this.percentageToPixels+"%");var u=this.tracks.join(" ");this.writeStyle(this.grid,this.gridTemplateProp,u),this.onDrag(this.direction,this.track,u)},d.prototype.cleanup=function(){window.removeEventListener("mouseup",this.stopDragging),window.removeEventListener("touchend",this.stopDragging),window.removeEventListener("touchcancel",this.stopDragging),window.removeEventListener("mousemove",this.drag),window.removeEventListener("touchmove",this.drag),this.grid&&(this.grid.removeEventListener("selectstart",a),this.grid.removeEventListener("dragstart",a),this.grid.style.userSelect="",this.grid.style.webkitUserSelect="",this.grid.style.MozUserSelect="",this.grid.style.pointerEvents="",this.grid.style.cursor=""),window.document.body.style.cursor=""},d.prototype.destroy=function(t,i){void 0===t&&(t=!0),t||!1===this.dragging?(this.cleanup(),this.element&&(this.element.removeEventListener("mousedown",this.startDragging),this.element.removeEventListener("touchstart",this.startDragging)),i&&i()):(this.needsDestroy=!0,i&&(this.destroyCb=i))};var w=function(t,i,s){return i in t?t[i]:s},v=function(t,i){return function(s){if(s.track<1)throw Error("Invalid track index: "+s.track+". Track must be between two other tracks.");var h="column"===t?i.columnMinSizes||{}:i.rowMinSizes||{},n="column"===t?"columnMinSize":"rowMinSize";return new d(t,Object.assign({},{minSizeStart:w(h,s.track-1,f(i,n,f(i,"minSize",0))),minSizeEnd:w(h,s.track+1,f(i,n,f(i,"minSize",0)))},s),i)}},p=function(t){var i=this;this.columnGutters={},this.rowGutters={},this.options=Object.assign({},{columnGutters:t.columnGutters||[],rowGutters:t.rowGutters||[],columnMinSizes:t.columnMinSizes||{},rowMinSizes:t.rowMinSizes||{}},t),this.options.columnGutters.forEach((function(t){i.columnGutters[t.track]=v("column",i.options)(t)})),this.options.rowGutters.forEach((function(t){i.rowGutters[t.track]=v("row",i.options)(t)}))};p.prototype.addColumnGutter=function(t,i){this.columnGutters[i]&&this.columnGutters[i].destroy(),this.columnGutters[i]=v("column",this.options)({element:t,track:i})},p.prototype.addRowGutter=function(t,i){this.rowGutters[i]&&this.rowGutters[i].destroy(),this.rowGutters[i]=v("row",this.options)({element:t,track:i})},p.prototype.removeColumnGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.columnGutters[t]&&this.columnGutters[t].destroy(i,(function(){delete s.columnGutters[t]}))},p.prototype.removeRowGutter=function(t,i){var s=this;void 0===i&&(i=!0),this.rowGutters[t]&&this.rowGutters[t].destroy(i,(function(){delete s.rowGutters[t]}))},p.prototype.handleDragStart=function(t,i,s){"column"===i?(this.columnGutters[s]&&this.columnGutters[s].destroy(),this.columnGutters[s]=v("column",this.options)({track:s}),this.columnGutters[s].startDragging(t)):"row"===i&&(this.rowGutters[s]&&this.rowGutters[s].destroy(),this.rowGutters[s]=v("row",this.options)({track:s}),this.rowGutters[s].startDragging(t))},p.prototype.destroy=function(t){var i=this;void 0===t&&(t=!0),Object.keys(this.columnGutters).forEach((function(s){return i.columnGutters[s].destroy(t,(function(){delete i.columnGutters[s]}))})),Object.keys(this.rowGutters).forEach((function(s){return i.rowGutters[s].destroy(t,(function(){delete i.rowGutters[s]}))}))};const g=class{constructor(i){t(this,i),this._items=[],this.direction="column",this.label=void 0}componentDidLoad(){this._panelID=n.generateUUID(),this._element.dataset.panelId=this._panelID;let t=Array.from(this._element.children);this._items=t.filter((t=>{var i;return"EZ-SPLIT-ITEM"===(null===(i=t.tagName)||void 0===i?void 0:i.toUpperCase())}));let i=1;this._items.forEach(((t,s)=>{t.dataset.trackNumber=i.toString(),this._items.length>1&&s!=this._items.length-1&&this.addItemGutter(t),i+=2})),this.initSplit()}initSplit(){var t;this._items.length&&(this._element.style["row"==this.direction?"grid-template-rows":"grid-template-columns"]=this.getGridTemplate(),t=this.getGutters(),new p(t))}getGutters(){const t={columnGutters:[],rowGutters:[]};if(!this._items.length)return t;const i="row"==this.direction?"rowGutters":"columnGutters";return this._items.forEach(((s,h)=>{if(h==this._items.length-1)return;let n=s.dataset.trackNumber;h===this._items.length-1&&(n=this._items.length.toString()),t[i].push({track:Number(n),element:this._element.querySelector(`ez-split-panel[data-panel-id="${this._panelID}"] > [data-item-track="${s.dataset.trackNumber}"]`)})})),t}addItemGutter(t){const i=document.createElement("div");i.classList.add("ez-split-gutter"),i.classList.add(this.direction),i.dataset.itemTrack=`${t.dataset.trackNumber}`,i.dataset.trackNumber=(Number(t.dataset.trackNumber)+1).toString(),t.parentNode.insertBefore(i,t.nextSibling)}getElementStyle(){return{display:"grid",height:"100%",width:"100%"}}getGridTemplate(){let t="";return this._items.forEach(((i,s)=>{t+=s!==this._items.length-1?0!==s?" 1fr 5px":"1fr 5px":" 1fr"})),t}render(){return i(s,{style:this.getElementStyle()},i("div",{class:"ez-split-panel--header ez-margin-top--small ez-margin-bottom--small"},i("div",{class:"ez-margin-left--small"},this.label),i("div",{class:"ez-margin-right--small"},i("slot",{name:"rightButtons"}))),i("slot",null))}get _element(){return h(this)}};g.style=".ez-split-gutter{cursor:grab;background-color:transparent}.ez-split-panel--header{display:flex;align-items:center;justify-content:space-between;height:30px}";export{g as ez_split_panel}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e,H as i,g as n}from"./p-23a36bb6.js";import{FloatingManager as a,ElementIDUtils as o}from"@sankhyalabs/core";const r=class{constructor(e){t(this,e),this.alerts=[],this.enableDragAndDrop=void 0,this.enableExpand=!0,this.itemRightSlotBuilder=void 0,this.opened=!0,this.expanded=!1}observeOpened(){this.manageOverlay()}alertId(t,e){return`alert-${e}-${(t=>{var e;return null!==(e=null==t?void 0:t.split(" ").join("-"))&&void 0!==e?e:""})(t)}`}getAlertTitle(t){var e;return null===(e=this.alerts.find(((e,i)=>this.alertId(e.title,i)===t)))||void 0===e?void 0:e.title}getTitleText(t){var e;const i=null!==(e=this.getAlertTitle(t.id))&&void 0!==e?e:"";return`${i}${i&&t.label?":":""}`}toggleExpandContainer(){this.enableExpand&&(this.expanded=!this.expanded,this._container.classList.toggle("expanded",this.expanded),this.expanded?this.updatePosition(this.getBoundingRight(),this.getBoundingBottom()):this.updatePosition("10px","10px"))}manageOverlay(){if(this.opened&&this._container)this._overlayId=a.float(this._container,this._overlayRef,this.getFloatOptions());else{if(void 0===this._overlayId)return;a.close(this._overlayId),this._overlayId=void 0}}updatePosition(t,e){this.opened&&a.updateFloatPosition(this._container,this._overlayRef,Object.assign(Object.assign({},this.getFloatOptions()),{right:t,bottom:e}))}getFloatOptions(){return{autoClose:!1,isFixed:!0,bottom:"10px",right:"10px"}}getBoundingRight(){return(document.body.clientWidth-this._container.getBoundingClientRect().width)/2+"px"}getBoundingBottom(){return(document.body.clientHeight-this._container.getBoundingClientRect().height)/2+"px"}componentDidLoad(){this.manageOverlay(),this.opened&&this._container&&this._container.focus()}componentWillLoad(){this.dataElementId=o.addIDInfo(this._element,"EzAlertList")}render(){return e(i,Object.assign({},{[o.DATA_ELEMENT_ID_ATTRIBUTE_NAME]:this.dataElementId}),this.opened?e("div",{ref:t=>this._overlayRef=t},e("div",{class:"alert-list__container "+(this.expanded?"expanded":""),ref:t=>this._container=t},e("div",{class:"alert-list__content"},e("div",{class:"alert-list__header"},e("div",{class:"alert-list__title"},`Avisos (${this.alerts.length})`),e("div",{class:"alert-list__header__buttons"},this.enableExpand&&e("ez-button",{mode:"icon",size:"small",iconName:"expand",onClick:()=>this.toggleExpandContainer(),"data-element-id":o.getInternalIDInfo("expandButton"),title:this.expanded?"Resumir":"Expandir"}),e("ez-button",{mode:"icon",size:"small",iconName:"close","data-element-id":o.getInternalIDInfo("closeButton"),onClick:()=>{this.opened=!1},title:"Fechar"}))),e("div",{class:"alert-list__expandable-content"},e("ez-list",{itemSlotBuilder:this.itemRightSlotBuilder,hoverFeedback:!0,itemLeftSlotBuilder:t=>e("a",{href:"#",style:{fontFamily:"var(--font-pattern, 'Roboto')",fontSize:"var(--text--medium, 14px)",fontWeight:"var(--text-weight--medium, 400)",color:"var(--color--primary, #008561)",marginRight:"4px",cursor:"pointer",display:"flex",width:"max-content",textDecoration:"none"}},this.getTitleText(t)),dataSource:this.alerts.map(((t,e)=>{var i;return{id:this.alertId(t.title,e),label:null!==(i=t.detail)&&void 0!==i?i:""}}))}))))):null)}get _element(){return n(this)}static get watchers(){return{opened:["observeOpened"]}}};r.style=':host {\n display: flex;\n\n /* Alert List */\n \n /*@doc Define a largura da lista minimizado */\n --ez-alert-list__container--width: 680px;\n /*@doc Define a altura da lista minimizado */\n --ez-alert-list__container--height: 220px;\n \n /*@doc Define a largura da lista maximizada */\n --ez-alert-list__container--width--expanded: 920px;\n /*@doc Define a altura da lista maximizada */\n --ez-alert-list__container--height--expanded: 540px;\n\n /* Title */\n /*@doc Define a fonte do título do componente */\n --ez-alert-list__title--font-family: var(--font-pattern, "Roboto");\n /*@doc Define o tamanho da fonte do título do popup.*/\n --ez-alert-list__title--font-size: var(--title--large, 20px);\n /*@doc Define a cor da fonte do título do popup.*/\n --ez-alert-list__title--color: var(--title--primary, #2b3a54);\n /*@doc Define o peso da fonte do título do popup.*/\n --ez-alert-list__title--font-weight: var(--text-weight--extra-large, 700);\n\n /* @doc Define a borda inferior do item da lista. */\n --ez-list__item--border-bottom: var(--border--small, 1px solid);\n\n /* @doc Define a cor da borda inferior do item da lista. */\n --ez-list__item--border-bottom-color: var(--color--strokes, #DCE0E8);\n\n /* @doc Define o tipo da quebra de linha do item da lista. */\n --ez-list__item--white-space: break-space;\n}\n\n.alert-list__content {\n display: flex;\n flex-direction: column;\n \n gap: var(--space--xs);\n margin: var(--space--large, 24px);\n width: 100%;\n}\n\n.alert-list__container {\n z-index: var(--more-visible--2x, 3);\n display: flex;\n height: var(--ez-alert-list__container--height);\n width: var(--ez-alert-list__container--width);\n border-radius: var(--border--radius-medium);\n background-color: var(--background--xlight);\n box-shadow: var(--shadow--medium);\n\n &.expanded {\n height: var(--ez-alert-list__container--height--expanded);\n width: var(--ez-alert-list__container--width--expanded);\n }\n\n @media (max-height: 640px) {\n max-height: calc(100vh - var(--space--3xl));\n } \n}\n\n.alert-list__header {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n\n.alert-list__title {\n font-family: var(--ez-alert-list__title--font-family);\n font-size: var(--ez-alert-list__title--font-size);\n font-weight: var(--ez-alert-list__title--font-weight);\n color: var(--ez-alert-list__title--color);\n}\n\n.alert-list__header__buttons {\n display: flex;\n gap: var(--space--xs);\n}\n\n.alert-list__expandable-content {\n overflow-y: auto;\n scrollbar-width: thin;\n}\n\n';export{r as ez_alert_list}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as i,g as e}from"./p-23a36bb6.js";import{C as h}from"./p-7eb3e1a5.js";import{ElementIDUtils as o}from"@sankhyalabs/core";const r=class{constructor(i){s(this,i),this.ezChange=t(this,"ezChange",7),this.value=void 0,this.label=void 0,this.enabled=!0,this.errorMessage=void 0,this.optionLoader=void 0,this.showSelectedValue=!0,this.showOptionValue=!0,this.suppressEmptyOption=!1,this.mode="regular",this.canShowError=!0,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1}observeErrorMessage(){this._comboElement&&(this._comboElement.errorMessage=this.errorMessage)}observeValue(){this._comboElement&&(this._comboElement.value=this.value)}async setFocus(){this._comboElement.setFocus()}async setBlur(){this._comboElement.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){var s,t;null===(t=null===(s=this._comboElement)||void 0===s?void 0:s.clearValue)||void 0===t||t.call(s)}async getValueAsync(){var s;return null===(s=this._comboElement)||void 0===s?void 0:s.getValueAsync()}onComboChange(s){s.stopPropagation(),this.value=s.detail,this.ezChange.emit(s.detail),this.errorMessage!==this._comboElement.errorMessage&&(this.errorMessage=this._comboElement.errorMessage)}componentDidLoad(){h.applyVarsTextInput(this._elem,this._comboElement)}render(){return o.addIDInfoIfNotExists(this._elem,"input"),i("ez-combo-box",{"data-element-id":o.getInternalIDInfo("combo"),ref:s=>this._comboElement=s,value:this.value,label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,hideErrorOnFocusOut:this.hideErrorOnFocusOut,optionLoader:this.optionLoader,searchMode:!0,onEzChange:s=>this.onComboChange(s),showSelectedValue:this.showSelectedValue,showOptionValue:this.showOptionValue,suppressEmptyOption:this.suppressEmptyOption,mode:this.mode,canShowError:this.canShowError,listOptionsPosition:this.listOptionsPosition,isTextSearch:this.isTextSearch,limitCharsToSearch:this.ignoreLimitCharsToSearch?0:3})}get _elem(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"]}}};r.style=":host{width:100%}";export{r as ez_search}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e,g as i}from"./p-23a36bb6.js";import{ElementIDUtils as h}from"@sankhyalabs/core";import{C as r}from"./p-7eb3e1a5.js";const a=class{constructor(e){t(this,e),this.ezChange=s(this,"ezChange",7),this.ezSearching=s(this,"ezSearching",7),this.ezFocusIn=s(this,"ezFocusIn",7),this._searchingText="",this.handleFocus=()=>{this._textInput.value=""===this._searchingText?"":this._searchingText,this.ezFocusIn.emit()},this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.restrict=void 0,this.mode="regular",this.asyncSearch=!1,this.canShowError=!0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){this._textInput&&(this._textInput.errorMessage=this.errorMessage)}observeValue(t,s){this._textInput&&t!=s&&(this._textInput.value=t,this.ezChange.emit(t))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async setValue(t){this.asyncSearch&&null!=this._textInput&&(t!==this.value?(this.value=t,this._searchingText=""):this._textInput.value=t)}async endSearch(){this.asyncSearch&&null!=this._textInput&&this._textInput.value!==this.value&&(this._textInput.value=this.value)}handleChange(t){const s=t.detail;this.errorMessage="",this.asyncSearch?(this._searchingText=s,this.ezSearching.emit(s)):s!==this.value&&(this.value=s)}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput)}render(){return h.addIDInfoIfNotExists(this._elem,"input"),e("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,label:this.label,onEzChange:t=>this.handleChange(t),value:this.value,enabled:this.enabled,errorMessage:this.errorMessage,restrict:this.restrict,mode:this.mode,onFocusin:this.handleFocus,canShowError:this.canShowError},e("ez-icon",{slot:"leftIcon",iconName:"search"}))}get _elem(){return i(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};a.style=":host{display:block;width:100%}";const n=class{constructor(s){t(this,s),this.message=void 0}render(){return e("div",{class:"multi-selection__message"},e("span",{class:"multi-selection__text-message"},this.message))}};n.style=".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";export{a as ez_filter_input,n as multi_selection_box_message}
|
|
@@ -12,6 +12,7 @@ export declare class EzComboBox {
|
|
|
12
12
|
private _maxWidthValue;
|
|
13
13
|
private _tabPressed;
|
|
14
14
|
private _textEmptyList;
|
|
15
|
+
private _textEmptySearch;
|
|
15
16
|
private _lookupMode;
|
|
16
17
|
private _resizeObserver;
|
|
17
18
|
private el;
|
|
@@ -45,6 +46,10 @@ export declare class EzComboBox {
|
|
|
45
46
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
46
47
|
*/
|
|
47
48
|
errorMessage: string;
|
|
49
|
+
/**
|
|
50
|
+
* Se true ativa o modo pesquisa do ez-combo-box.
|
|
51
|
+
*/
|
|
52
|
+
searchMode: boolean;
|
|
48
53
|
/**
|
|
49
54
|
* Se true a opção selecionada exibe o `value` junto com `label`.
|
|
50
55
|
*/
|
|
@@ -128,16 +133,26 @@ export declare class EzComboBox {
|
|
|
128
133
|
private scrollToOption;
|
|
129
134
|
private selectCurrentOption;
|
|
130
135
|
private updateSource;
|
|
136
|
+
private clearSource;
|
|
131
137
|
private selectOption;
|
|
132
138
|
private loadOptions;
|
|
133
139
|
private cancelPreselection;
|
|
134
140
|
private setInputValue;
|
|
135
141
|
private clearSearch;
|
|
142
|
+
private controlListWithOnlyOne;
|
|
143
|
+
private controlEmptySearch;
|
|
144
|
+
private validateDescriptionValue;
|
|
145
|
+
private loadDescriptionValue;
|
|
146
|
+
private setDescriptionValue;
|
|
147
|
+
private loadOptionValue;
|
|
148
|
+
private showNoResultMessage;
|
|
149
|
+
private getFieldLabel;
|
|
136
150
|
private resetOptions;
|
|
137
151
|
componentWillLoad(): void;
|
|
138
152
|
componentDidRender(): void;
|
|
139
153
|
componentDidLoad(): void;
|
|
140
154
|
private handlerIconClick;
|
|
155
|
+
private buildNumberArgument;
|
|
141
156
|
private onTextInputChangeHandler;
|
|
142
157
|
private clearDeboucingTimeout;
|
|
143
158
|
private onTextInputClickHandler;
|
|
@@ -1,30 +1,8 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import { IEzCheckBoxListPosition } from '../ez-combo-box/ez-combo-box';
|
|
2
|
+
import { IEzCheckBoxListPosition, IOption, ISearchArgument } from '../ez-combo-box/ez-combo-box';
|
|
3
3
|
export declare class EzSearch {
|
|
4
|
-
private
|
|
5
|
-
private
|
|
6
|
-
private _listContainer;
|
|
7
|
-
private _listWrapper;
|
|
8
|
-
private _itemValueBasis;
|
|
9
|
-
private _floatingID;
|
|
10
|
-
private _source;
|
|
11
|
-
private _changeDeboucingTimeout;
|
|
12
|
-
private _limitCharsToSearch;
|
|
13
|
-
private _deboucingTime;
|
|
14
|
-
_maxWidthValue: number;
|
|
15
|
-
private _tabPressed;
|
|
16
|
-
private _textEmptyList;
|
|
17
|
-
private _textEmptySearch;
|
|
18
|
-
private _lookupMode;
|
|
19
|
-
private _resizeObserver;
|
|
20
|
-
private _startHighlightTag;
|
|
21
|
-
private _endHighlightTag;
|
|
22
|
-
private el;
|
|
23
|
-
private _preSelection;
|
|
24
|
-
private _visibleOptions;
|
|
25
|
-
private _startLoading;
|
|
26
|
-
private _showLoading;
|
|
27
|
-
private _criteria;
|
|
4
|
+
private _elem;
|
|
5
|
+
private _comboElement;
|
|
28
6
|
/**
|
|
29
7
|
* Define o valor do campo.
|
|
30
8
|
*/
|
|
@@ -85,26 +63,15 @@ export declare class EzSearch {
|
|
|
85
63
|
* Emitido quando acontece a alteração de valor do campo.
|
|
86
64
|
*/
|
|
87
65
|
ezChange: EventEmitter<IOption>;
|
|
88
|
-
/**
|
|
89
|
-
* Array com as opções do ez-combo-box. Os elementos devem obedecer
|
|
90
|
-
* o formato: `{value: string, label: string}`.
|
|
91
|
-
*/
|
|
92
|
-
options: Array<IOption>;
|
|
93
|
-
/**
|
|
94
|
-
* Se true desabilita a digitação dentro do componente.
|
|
95
|
-
*/
|
|
96
|
-
suppressSearch: boolean;
|
|
97
66
|
observeErrorMessage(): void;
|
|
98
|
-
observeValue(
|
|
99
|
-
observeOptions(newOptions: IOption[], oldOptions: IOption[]): void;
|
|
100
|
-
getValueAsync(): Promise<unknown>;
|
|
67
|
+
observeValue(): void;
|
|
101
68
|
/**
|
|
102
|
-
|
|
103
|
-
|
|
69
|
+
* Aplica o foco no campo.
|
|
70
|
+
*/
|
|
104
71
|
setFocus(): Promise<void>;
|
|
105
72
|
/**
|
|
106
|
-
|
|
107
|
-
|
|
73
|
+
* Remove o foco do campo.
|
|
74
|
+
*/
|
|
108
75
|
setBlur(): Promise<void>;
|
|
109
76
|
/**
|
|
110
77
|
* Retorna se o conteúdo é inválido.
|
|
@@ -114,65 +81,8 @@ export declare class EzSearch {
|
|
|
114
81
|
* Limpa o valor do campo de pesquisa
|
|
115
82
|
*/
|
|
116
83
|
clearValue(): Promise<void>;
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
private getListPosition;
|
|
120
|
-
private isDifferentValues;
|
|
121
|
-
private getFormattedText;
|
|
122
|
-
private getText;
|
|
123
|
-
private getSelectedOption;
|
|
124
|
-
private updateVisibleOptions;
|
|
125
|
-
private getMaxWidthValue;
|
|
126
|
-
private getWidthValue;
|
|
127
|
-
private createOption;
|
|
128
|
-
private buildItem;
|
|
129
|
-
private showOptions;
|
|
130
|
-
private hideOptions;
|
|
131
|
-
private isOptionsVisible;
|
|
132
|
-
private nextOption;
|
|
133
|
-
private previousOption;
|
|
134
|
-
private scrollToOption;
|
|
135
|
-
private selectCurrentOption;
|
|
136
|
-
private updateSource;
|
|
137
|
-
private clearSource;
|
|
138
|
-
private selectOption;
|
|
139
|
-
private loadOptions;
|
|
140
|
-
private cancelPreselection;
|
|
141
|
-
private setInputValue;
|
|
142
|
-
private clearSearch;
|
|
143
|
-
private controlListWithOnlyOne;
|
|
144
|
-
private controlEmptySearch;
|
|
145
|
-
private validateDescriptionValue;
|
|
146
|
-
private loadDescriptionValue;
|
|
147
|
-
private setDescriptionValue;
|
|
148
|
-
private loadOptionValue;
|
|
149
|
-
private showNoResultMessage;
|
|
150
|
-
private getFieldLabel;
|
|
151
|
-
private resetOptions;
|
|
152
|
-
componentWillLoad(): void;
|
|
153
|
-
componentDidRender(): void;
|
|
84
|
+
getValueAsync(): Promise<unknown>;
|
|
85
|
+
onComboChange(event: any): void;
|
|
154
86
|
componentDidLoad(): void;
|
|
155
|
-
private handlerIconClick;
|
|
156
|
-
private buildNumberArgument;
|
|
157
|
-
private onTextInputChangeHandler;
|
|
158
|
-
private clearDeboucingTimeout;
|
|
159
|
-
private keyDownHandler;
|
|
160
|
-
private onTextInputFocusOutHandler;
|
|
161
|
-
private canShowListOptions;
|
|
162
87
|
render(): any;
|
|
163
88
|
}
|
|
164
|
-
export interface IOption {
|
|
165
|
-
value: string;
|
|
166
|
-
label: string;
|
|
167
|
-
details?: any;
|
|
168
|
-
}
|
|
169
|
-
export interface ISearchArgument {
|
|
170
|
-
mode: SearchMode;
|
|
171
|
-
argument: string;
|
|
172
|
-
}
|
|
173
|
-
declare enum SearchMode {
|
|
174
|
-
ADVANCED = "ADVANCED",
|
|
175
|
-
PRELOAD = "PRELOAD",
|
|
176
|
-
PREDICTIVE = "PREDICTIVE"
|
|
177
|
-
}
|
|
178
|
-
export {};
|
|
@@ -30,8 +30,7 @@ import { TFocusOptions } from "./components/ez-text-input/ez-text-input";
|
|
|
30
30
|
import { IEzPopoverAnchorOptions } from "./components/ez-popover/ez-popover";
|
|
31
31
|
import { Radio } from "./components/ez-radio-button/ez-radio-button";
|
|
32
32
|
import { EzScrollDirection } from "./components/ez-scroller/EzScrollDirection";
|
|
33
|
-
import { IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-
|
|
34
|
-
import { IEzCheckBoxListPosition as IEzCheckBoxListPosition1 } from "./components/ez-combo-box/ez-combo-box";
|
|
33
|
+
import { IEzCheckBoxListPosition as IEzCheckBoxListPosition1, IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-combo-box/ez-combo-box";
|
|
35
34
|
import { Tab } from "./components/ez-tabselector/ez-tabselector";
|
|
36
35
|
import { IStyled } from "./components/ez-text-edit/ez-text-edit";
|
|
37
36
|
import { TFocusOptions as TFocusOptions1 } from "./components/ez-text-input/ez-text-input";
|
|
@@ -414,6 +413,10 @@ export namespace Components {
|
|
|
414
413
|
* Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
|
|
415
414
|
*/
|
|
416
415
|
"options": Array<IOption>;
|
|
416
|
+
/**
|
|
417
|
+
* Se true ativa o modo pesquisa do ez-combo-box.
|
|
418
|
+
*/
|
|
419
|
+
"searchMode": boolean;
|
|
417
420
|
/**
|
|
418
421
|
* Remove o foco do campo.
|
|
419
422
|
*/
|
|
@@ -1169,11 +1172,7 @@ export namespace Components {
|
|
|
1169
1172
|
/**
|
|
1170
1173
|
* Carrega as opções dinamicamente.
|
|
1171
1174
|
*/
|
|
1172
|
-
"optionLoader": (argument:
|
|
1173
|
-
/**
|
|
1174
|
-
* Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
|
|
1175
|
-
*/
|
|
1176
|
-
"options": Array<IOption>;
|
|
1175
|
+
"optionLoader": (argument: ISearchArgument1) => Promise<Array<IOption1>> | Array<IOption1> | IOption1;
|
|
1177
1176
|
/**
|
|
1178
1177
|
* Remove o foco do campo.
|
|
1179
1178
|
*/
|
|
@@ -1194,14 +1193,10 @@ export namespace Components {
|
|
|
1194
1193
|
* Se true remove a opção vazia da lista.
|
|
1195
1194
|
*/
|
|
1196
1195
|
"suppressEmptyOption": boolean;
|
|
1197
|
-
/**
|
|
1198
|
-
* Se true desabilita a digitação dentro do componente.
|
|
1199
|
-
*/
|
|
1200
|
-
"suppressSearch": boolean;
|
|
1201
1196
|
/**
|
|
1202
1197
|
* Define o valor do campo.
|
|
1203
1198
|
*/
|
|
1204
|
-
"value":
|
|
1199
|
+
"value": IOption1 | string;
|
|
1205
1200
|
}
|
|
1206
1201
|
interface EzSidebarButton {
|
|
1207
1202
|
}
|
|
@@ -1246,6 +1241,10 @@ export namespace Components {
|
|
|
1246
1241
|
}
|
|
1247
1242
|
interface EzSplitPanel {
|
|
1248
1243
|
"direction": 'row' | 'column';
|
|
1244
|
+
/**
|
|
1245
|
+
* Define um título para o painel.
|
|
1246
|
+
*/
|
|
1247
|
+
"label": string;
|
|
1249
1248
|
}
|
|
1250
1249
|
interface EzTabselector {
|
|
1251
1250
|
/**
|
|
@@ -2455,6 +2454,10 @@ declare namespace LocalJSX {
|
|
|
2455
2454
|
* Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
|
|
2456
2455
|
*/
|
|
2457
2456
|
"options"?: Array<IOption>;
|
|
2457
|
+
/**
|
|
2458
|
+
* Se true ativa o modo pesquisa do ez-combo-box.
|
|
2459
|
+
*/
|
|
2460
|
+
"searchMode"?: boolean;
|
|
2458
2461
|
/**
|
|
2459
2462
|
* Se true cada opção na lista exibe o `value` junto com `label`.
|
|
2460
2463
|
*/
|
|
@@ -3166,15 +3169,11 @@ declare namespace LocalJSX {
|
|
|
3166
3169
|
/**
|
|
3167
3170
|
* Emitido quando acontece a alteração de valor do campo.
|
|
3168
3171
|
*/
|
|
3169
|
-
"onEzChange"?: (event: EzSearchCustomEvent<
|
|
3172
|
+
"onEzChange"?: (event: EzSearchCustomEvent<IOption1>) => void;
|
|
3170
3173
|
/**
|
|
3171
3174
|
* Carrega as opções dinamicamente.
|
|
3172
3175
|
*/
|
|
3173
|
-
"optionLoader"?: (argument:
|
|
3174
|
-
/**
|
|
3175
|
-
* Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
|
|
3176
|
-
*/
|
|
3177
|
-
"options"?: Array<IOption>;
|
|
3176
|
+
"optionLoader"?: (argument: ISearchArgument1) => Promise<Array<IOption1>> | Array<IOption1> | IOption1;
|
|
3178
3177
|
/**
|
|
3179
3178
|
* Se false cada opção na lista deve exibir somente o `label`.
|
|
3180
3179
|
*/
|
|
@@ -3187,14 +3186,10 @@ declare namespace LocalJSX {
|
|
|
3187
3186
|
* Se true remove a opção vazia da lista.
|
|
3188
3187
|
*/
|
|
3189
3188
|
"suppressEmptyOption"?: boolean;
|
|
3190
|
-
/**
|
|
3191
|
-
* Se true desabilita a digitação dentro do componente.
|
|
3192
|
-
*/
|
|
3193
|
-
"suppressSearch"?: boolean;
|
|
3194
3189
|
/**
|
|
3195
3190
|
* Define o valor do campo.
|
|
3196
3191
|
*/
|
|
3197
|
-
"value"?:
|
|
3192
|
+
"value"?: IOption1 | string;
|
|
3198
3193
|
}
|
|
3199
3194
|
interface EzSidebarButton {
|
|
3200
3195
|
/**
|
|
@@ -3243,6 +3238,10 @@ declare namespace LocalJSX {
|
|
|
3243
3238
|
}
|
|
3244
3239
|
interface EzSplitPanel {
|
|
3245
3240
|
"direction"?: 'row' | 'column';
|
|
3241
|
+
/**
|
|
3242
|
+
* Define um título para o painel.
|
|
3243
|
+
*/
|
|
3244
|
+
"label"?: string;
|
|
3246
3245
|
}
|
|
3247
3246
|
interface EzTabselector {
|
|
3248
3247
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { FieldDescriptor, UserInterface } from "@sankhyalabs/core";
|
|
2
|
-
import { ISearchArgument } from "../../components/ez-combo-box/ez-combo-box";
|
|
3
|
-
import { IOption } from "../../components/ez-search/ez-search";
|
|
2
|
+
import { IOption, ISearchArgument } from "../../components/ez-combo-box/ez-combo-box";
|
|
4
3
|
import { IFieldConfig } from "./IFieldConfig";
|
|
5
4
|
export default interface IAbstractFieldMetadata {
|
|
6
5
|
userInterface: UserInterface;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sankhyalabs/ezui",
|
|
3
|
-
"version": "5.20.0-dev.
|
|
3
|
+
"version": "5.20.0-dev.4",
|
|
4
4
|
"description": "Biblioteca de componentes Sankhya.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"build.prod": "stencil build --docs --prod",
|
|
22
22
|
"build.with.peerdeps": "stencil build --docs --prod --force-peer-deps",
|
|
23
23
|
"start": "stencil build --dev --watch --serve --force-peer-deps",
|
|
24
|
-
"test": "stencil test --spec --e2e --logHeapUsage --runInBand",
|
|
25
|
-
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
24
|
+
"test": "stencil test --spec --e2e --logHeapUsage --runInBand --coverage --silent --testResultsProcessor jest-sonar-reporter",
|
|
26
25
|
"generate": "stencil generate",
|
|
27
26
|
"storybook": "npm run start.storybook",
|
|
28
27
|
"build.watch": "stencil build --dev --watch --force-peer-deps",
|
|
@@ -31,7 +30,8 @@
|
|
|
31
30
|
"link": "node scripts/link.js",
|
|
32
31
|
"dev": "run-p storybook build.watch gulp",
|
|
33
32
|
"link-dev": "gulp watch-dev",
|
|
34
|
-
"prepare": "husky install"
|
|
33
|
+
"prepare": "husky install",
|
|
34
|
+
"update-ds": "npm i -D @sankhyalabs/core@latest @sankhyalabs/docscss@latest @sankhyalabs/ez-design@latest @sankhyalabs/skippeerdeps@latest"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
@@ -49,11 +49,10 @@
|
|
|
49
49
|
"@babel/preset-env": "^7.16.11",
|
|
50
50
|
"@commitlint/cli": "^18.4.3",
|
|
51
51
|
"@commitlint/config-conventional": "^18.4.3",
|
|
52
|
-
"@sankhyalabs/core": "^5.
|
|
52
|
+
"@sankhyalabs/core": "^5.15.1",
|
|
53
53
|
"@sankhyalabs/docscss": "^1.0.4",
|
|
54
|
-
"@sankhyalabs/ez-design": "^
|
|
54
|
+
"@sankhyalabs/ez-design": "^5.7.6",
|
|
55
55
|
"@sankhyalabs/skippeerdeps": "^1.0.2",
|
|
56
|
-
"split-grid": "^1.0.11",
|
|
57
56
|
"@shopify/draggable": "^1.0.0-beta.8",
|
|
58
57
|
"@stencil/core": "^2.13.0",
|
|
59
58
|
"@stencil/react-output-target": "0.0.9",
|
|
@@ -72,18 +71,27 @@
|
|
|
72
71
|
"husky": "^8.0.3",
|
|
73
72
|
"jest": "^26.6.3",
|
|
74
73
|
"jest-cli": "^26.6.3",
|
|
74
|
+
"jest-sonar-reporter": "^2.0.0",
|
|
75
75
|
"npm-run-all": "^4.1.5",
|
|
76
76
|
"puppeteer": "^5.5.0",
|
|
77
77
|
"redux": "^4.1.2",
|
|
78
78
|
"redux-thunk": "^2.4.1",
|
|
79
79
|
"redux-undo": "^1.0.1",
|
|
80
80
|
"run-p": "0.0.0",
|
|
81
|
+
"split-grid": "^1.0.11",
|
|
81
82
|
"storybook-addon-preview": "^2.2.0",
|
|
82
83
|
"uuid": "^9.0.0",
|
|
83
84
|
"ws": "^7.5.6"
|
|
84
85
|
},
|
|
85
86
|
"jest": {
|
|
86
|
-
"verbose": true
|
|
87
|
+
"verbose": true,
|
|
88
|
+
"testResultsProcessor": "jest-sonar-reporter"
|
|
89
|
+
},
|
|
90
|
+
"jestSonar": {
|
|
91
|
+
"sonar56x": true,
|
|
92
|
+
"reportPath": "reports",
|
|
93
|
+
"reportFile": "test-report.xml",
|
|
94
|
+
"indent": 4
|
|
87
95
|
},
|
|
88
96
|
"peerDependencies": {
|
|
89
97
|
"@sankhyalabs/core": "^5.0.0"
|