@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-79210.0 → 0.0.0-bugfix-dev-KB-76625.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/cjs/ez-card-item_2.cjs.entry.js +1415 -7
- package/dist/cjs/ez-grid.cjs.entry.js +1 -4
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +186 -0
- package/dist/cjs/ez-popover-plus_3.cjs.entry.js +184 -0
- package/dist/cjs/ez-search.cjs.entry.js +28 -158
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +8 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/searchFormatters-b7e1ed1e.js +23 -0
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/ez-card-item/ez-card-item.css +1 -3
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +0 -3
- package/dist/collection/components/ez-grid/ez-grid.css +6 -0
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.css +0 -64
- package/dist/collection/components/ez-popover-plus/ez-popover-plus.js +56 -130
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.css +67 -0
- package/dist/collection/components/ez-popover-plus/subcomponent/ez-popover-core.js +527 -0
- package/dist/collection/components/ez-search/ez-search.css +0 -219
- package/dist/collection/components/ez-search/ez-search.js +28 -167
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.css +227 -0
- package/dist/collection/components/ez-search/subcomponent/search-list/search-list.js +289 -0
- package/dist/collection/components/ez-search/utils/searchFormatters.js +18 -0
- package/dist/custom-elements/index.d.ts +12 -0
- package/dist/custom-elements/index.js +262 -185
- package/dist/esm/ez-card-item_2.entry.js +1415 -7
- package/dist/esm/ez-grid.entry.js +1 -4
- package/dist/esm/ez-multi-selection-list.entry.js +182 -0
- package/dist/esm/ez-popover-plus_3.entry.js +178 -0
- package/dist/esm/ez-search.entry.js +29 -159
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +8 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/searchFormatters-8229207e.js +20 -0
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-31da1b57.entry.js +1 -0
- package/dist/ezui/p-37201156.entry.js +1 -0
- package/dist/ezui/p-40a60148.js +1 -0
- package/dist/ezui/{p-e80d3452.entry.js → p-a5950a0d.entry.js} +1 -1
- package/dist/ezui/p-b7706b43.entry.js +1 -0
- package/dist/ezui/p-dc73e1fe.entry.js +1 -0
- package/dist/types/components/ez-popover-plus/ez-popover-plus.d.ts +8 -20
- package/dist/types/components/ez-popover-plus/subcomponent/ez-popover-core.d.ts +91 -0
- package/dist/types/components/ez-search/ez-search.d.ts +3 -13
- package/dist/types/components/ez-search/subcomponent/search-list/search-list.d.ts +23 -0
- package/dist/types/components/ez-search/utils/searchFormatters.d.ts +2 -0
- package/dist/types/components.d.ts +157 -3
- package/package.json +1 -1
- package/react/components.d.ts +2 -0
- package/react/components.js +2 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-multi-selection-list_2.cjs.entry.js +0 -1584
- package/dist/esm/ez-multi-selection-list_2.entry.js +0 -1579
- package/dist/ezui/p-58783dcf.entry.js +0 -1
- package/dist/ezui/p-65f471bc.entry.js +0 -1
- package/dist/ezui/p-b555cb24.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as h}from"./p-23a36bb6.js";import{C as o}from"./p-ec7db713.js";import{ObjectUtils as r,StringUtils as n,ElementIDUtils as a}from"@sankhyalabs/core";import{A as l}from"./p-2187f86c.js";import"./p-ab574d59.js";import"./p-b853763b.js";import"./p-4607fb89.js";import{R as c}from"./p-05e1f4e7.js";import{r as d,a as u}from"./p-40a60148.js";const v=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._textEmptySearch="Nenhum resultado de {0} encontrado",this._startHighlightTag="<span class='card-item__highlight'>",this._endHighlightTag="</span>",this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._showLoadingDescription=!1,this._criteria=void 0,this.value=void 0,this.label=void 0,this.enabled=!0,this.errorMessage=void 0,this.optionLoader=void 0,this.contextProperties=void 0,this.showSelectedValue=!0,this.showOptionValue=!0,this.suppressEmptyOption=!1,this.stopPropagateEnterKeyEvent=!1,this.mode="regular",this.canShowError=!0,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1,this.ignoreLimitCharsToSearch=!1,this.options=void 0,this.suppressSearch=!1,this.ensureClearButtonVisible=!1,this.suppressPreLoad=!0,this.autoFocus=!1}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,!(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())&&this.errorMessage&&this.setInputValue())}getValue(t){return"object"==typeof t?null==t?void 0:t.value:t}validateNewValue(t,i){const s=this.getValue(t),e=this.getValue(i);return!("[object Object]"===s||s===e)}async observeValue(t,i){if(this._textInput&&this.validateNewValue(t,i)){if("string"==typeof t)return void await this.handleValueAsString(t);const i=this.getSelectedOption(t),s=this.getSelectedOption(this._currentValue);this.isDifferentValues(s,i)&&(this._currentValue=i,this.setInputValue(),this.ezChange.emit(null!=i?i:void 0)),this.resetOptions()}}observeOptions(t,i){!t.length&&this.suppressPreLoad||(null==t?void 0:t.join(""))!==(null==i?void 0:i.join(""))&&this.loadOptions(p.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?t=>{let i=setInterval((()=>{this._showLoading||(clearInterval(i),t(this.value))}),100)}:t=>t(this.value))}async setFocus(t){this._textInput&&this._textInput.setFocus(t)}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}async handleValueAsString(t){this.getSelectedOption(t)?this.setInputValue():(await this.loadDescriptionValue(t),this._currentValue&&(this.setInputValue(),this.ezChange.emit(this.value),this._currentValue=this.value))}isDifferentValues(t,i){return r.objectToString(t||{})!==r.objectToString(i||{})}getFormattedText(t){if(null==t)return;let i=this.showSelectedValue&&null!=t.value?t.label?`${t.value} - ${t.label}`:t.value:t.label;return i=null==i?void 0:i.replace(new RegExp(this._startHighlightTag,"g"),"").replace(new RegExp(this._endHighlightTag,"g"),""),i}getText(){const t=this.getSelectedOption(this._currentValue),i=this.getFormattedText(t);return d(i)}getSelectedOption(t){return"string"==typeof t||t instanceof String?this._visibleOptions.find((i=>i.value===t)):t?Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}):t}updateVisibleOptions(){let t=this._source||[];this._visibleOptions=this.suppressEmptyOption?t:[{value:void 0,label:""}].concat(t),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var t;const i=[];return null===(t=this._visibleOptions)||void 0===t||t.forEach((t=>{const s=this.getWidthValue(t.value);i.includes(s)||i.push(s)})),i.length>1?Math.max(...i):0}getWidthValue(t){if(null!=this._itemValueBasis){const i=this._itemValueBasis;if(null!=t)return i.innerHTML=t,i.clientWidth>0?i.clientWidth+2:0;i.innerHTML=""}return 0}showOptions(){this.enabled&&(this.isOptionsVisible()||this._ezPopOverPlusElement.showUnder(this._textInput))}hideOptions(){this._ezPopOverPlusElement.hide()}isOptionsVisible(){return this._ezPopOverPlusElement.opened}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(t){this._startLoading=!1,t instanceof Promise?(this._showLoading=!0,this._showLoadingDescription=!0,t.then((t=>{this.updateSource(t)})).finally((()=>{this._showLoading=!1,this._showLoadingDescription=!1})),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(t)?(this._source=t,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch(!1))):this.selectOption(t))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(t,i=!0){var s,e;const h=this.getSelectedOption(this.value),o=Object.assign(Object.assign({},t),{value:u(null==t?void 0:t.value),label:u(null==t?void 0:t.label)}),r=Object.assign(Object.assign({},o),{value:d(null==o?void 0:o.value),label:d(null==o?void 0:o.label)});if((null===(s=null==h?void 0:h.value)||void 0===s?void 0:s.toString())!==(null===(e=null==r?void 0:r.value)||void 0===e?void 0:e.toString())||null==h&&null!=r&&"value"in r){const t=(null==r?void 0:r.value)?r:void 0;this.value=t,this._currentValue=t}else this.setInputValue(),this.resetOptions();this._visibleOptions=[],this.clearSource(),i&&setTimeout((()=>{this.setFocus()}),0)}loadOptions(t,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:t,argument:i},this.contextProperties):this.options)}cancelPreselection(){!this._textInput.value&&this._currentValue?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue()}),this._deboucingTime),this.resetOptions()}setInputValue(t=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,t&&(this.errorMessage=null))}clearSearch(){this.value=null,this._currentValue=null}controlListWithOnlyOne(t=!0){var i,s;const e=null===(i=this._visibleOptions)||void 0===i?void 0:i.filter((t=>""!==t.label&&null!=t.value));if((null==e?void 0:e.length)>0){const i=new RegExp(this._startHighlightTag,"g"),h=new RegExp(this._endHighlightTag,"g");let o=n.decodeHtmlEntities(e[0].label);const r={value:null===(s=e[0].value)||void 0===s?void 0:s.replace(i,"").replace(h,""),label:null==o?void 0:o.replace(i,"").replace(h,"")};this.selectOption(r,t)}}controlEmptySearch(t=!0){var i;(null===(i=this._visibleOptions)||void 0===i?void 0:i.length)?this.controlListWithOnlyOne(t):(this.clearSearch(),l.info(this._textEmptyList))}async loadDescriptionValue(t){var i,s;if(null==t)return;if((null===(i=this.options)||void 0===i?void 0:i.length)>0)return void this.loadOptionValue(t);const e={mode:p.PREDICTIVE,argument:t},h=await(null===(s=this.optionLoader)||void 0===s?void 0:s.call(this,e,this.contextProperties));null!=h&&(h instanceof Promise?h.then((t=>{this.setDescriptionValue(t)})):this.setDescriptionValue(h))}setDescriptionValue(t){const i=(null==t?void 0:t[0])||t;null!=i&&Object.keys(i).length?(this._currentValue=i?Object.assign(Object.assign({},i),{value:u(i.value),label:u(i.label)}):i,this.value=this._currentValue,this.setTextInputValue()):this.showNoResultMessage()}setTextInputValue(){if(this._textInput&&null==this._textInput.value){if(null==this.value)return;const t="string"==typeof this.value?this.value:this.getFormattedText(this.value);this._textInput.value=d(t)}}loadOptionValue(t){var i;const s=null===(i=this.options)||void 0===i?void 0:i.find((i=>i.value===t));null!=s?this.selectOption(s):this.showNoResultMessage()}async showNoResultMessage(){this.clearSearch(),l.info(this._textEmptySearch.replace("{0}",this.getFieldLabel()))}getFieldLabel(){var t;return null===(t=this.label)||void 0===t?void 0:t.replace(c,"").toUpperCase()}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}async handleInitialValue(){if(!this.getValue(this.value))return;if("string"==typeof this.value)return void await this.handleValueAsString(this.value);let t=this.getFormattedText(this.value);t=d(t),this._textInput.value=t}componentWillLoad(){if(void 0===this.options){this.options=[];const t=this.el.querySelectorAll("option");t&&t.forEach((t=>{let i=t.innerText,s=t.getAttribute("value"),e=t.getAttribute("details");s||(s=i),this.options.push({label:i,value:s,details:e}),t.hidden=!0}))}this.updateSource([])}componentDidRender(){var t;null===(t=this._optionsList)||void 0===t||t.querySelectorAll(".item").forEach((t=>{a.addIDInfoIfNotExists(t,"itemSearch")}))}async componentDidLoad(){this._currentValue=this.value,o.applyVarsTextInput(this.el,this._textInput),this._resizeObserver=new ResizeObserver((t=>{window.requestAnimationFrame((()=>{Array.isArray(t)}))})),await this.handleInitialValue(),this.autoFocus&&requestAnimationFrame((()=>{this.setFocus({selectText:!0})}))}disconnectedCallback(){var t;null===(t=this._resizeObserver)||void 0===t||t.disconnect()}handlerIconClick(){this.loadOptions(p.ADVANCED)}buildNumberArgument(t){return this.isTextSearch?NaN:Number(t||void 0)}onTextInputChangeHandler(t){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(t)}),this._deboucingTime));const s=null===(i=t.target.value)||void 0===i?void 0:i.trim(),e=this.buildNumberArgument(s);this._criteria||(this._textInput.value=t.data||s),this._criteria=s,s?(this._showLoading=!1,this.clearSource(),this.ignoreLimitCharsToSearch||!isNaN(e)||s.length>=this._limitCharsToSearch?(this._showLoading=!0,this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(p.PREDICTIVE,isNaN(e)?s:e.toString())}),this._deboucingTime),this.showOptions()):this.hideOptions()):(this.hideOptions(),this._showLoading=!1,this.clearSource())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}async keyDownHandler(t){switch(this._tabPressed=!1,t.ctrlKey&&("f"!==t.key&&"F"!==t.key||(this.loadOptions(p.ADVANCED),t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault())),t.key){case"ArrowDown":t.stopPropagation(),this.canShowListOptions()&&t.preventDefault(),this.isOptionsVisible()||this.showOptions(),await this._searchList.nextOption();break;case"ArrowUp":t.stopPropagation(),this.canShowListOptions()&&t.preventDefault(),await this._searchList.previousOption();break;case"Enter":this.handleEventPropagation(t),this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne(!1)}}handleEventPropagation(t){this._ezPopOverPlusElement.opened&&this.stopPropagateEnterKeyEvent&&t.stopPropagation()}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}canShowLoadSpinDescription(){return this._showLoadingDescription&&!this._ezPopOverPlusElement.opened}onChangePreSelection(t){this._preSelection=t}render(){var t;return a.addIDInfoIfNotExists(this.el,"input"),s(e,null,s("ez-text-input",{"data-element-id":a.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:t=>this._textInput=t,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:t=>this.onTextInputChangeHandler(t),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:t=>this.keyDownHandler(t),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},s("button",{class:"btn",slot:"leftIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},this.canShowLoadSpinDescription()?s("div",{class:"message__loading"}):s("ez-icon",{iconName:"search"})),(null===(t=this._textInput)||void 0===t?void 0:t.value)&&(this._criteria||this.value)||this.ensureClearButtonVisible?s("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},s("ez-icon",{iconName:"close"})):void 0),s("ez-popover-plus",{ref:t=>this._ezPopOverPlusElement=t,autoClose:!1,overlayType:"none",useAnchorSize:!0,anchorElement:[this._textInput,this.el]},s("search-list",{ref:t=>this._searchList=t,showLoading:this._showLoading,visibleOptions:this._visibleOptions,textEmptyList:this._textEmptyList,canShowListOptions:this.canShowListOptions(),value:this.value,showOptionValue:this.showOptionValue,preSelection:this._preSelection,onChangeValue:({detail:t})=>this.selectOption(t),onChangePreSelection:({detail:t})=>this.onChangePreSelection(t)})))}get el(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var p;!function(t){t.ADVANCED="ADVANCED",t.PRELOAD="PRELOAD",t.PREDICTIVE="PREDICTIVE"}(p||(p={})),v.style=":host{--ez-search--height:42px;--ez-search--width:100%;--ez-search__icon--width:48px;--ez-search--border-radius:var(--border--radius-medium, 12px);--ez-search--border-radius-small:var(--border--radius-small, 6px);--ez-search--font-size:var(--text--medium, 14px);--ez-search--font-family:var(--font-pattern, Arial);--ez-search--font-weight--large:var(--text-weight--large, 500);--ez-search--font-weight--medium:var(--text-weight--medium, 400);--ez-search--background-color--xlight:var(--background--xlight, #fff);--ez-search--background-medium:var(--background--medium, #f0f3f7);--ez-search--line-height:calc(var(--text--medium, 14px) + 4px);--ez-search__input--background-color:var(--background--medium, #e0e0e0);--ez-search__input--border:var(--border--medium, 2px solid);--ez-search__input--border-color:var(--ez-search__input--background-color);--ez-search__input--focus--border-color:var(--color--primary, #008561);--ez-search__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-search__input--disabled--color:var(--text--disable, #AFB6C0);--ez-search__input--error--border-color:#CC2936;--ez-search__btn--color:var(--title--primary, #2B3A54);--ez-search__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-search__btn-hover--color:var(--color--primary, #4e4e4e);--ez-search__label--color:var(--title--primary, #2B3A54);--ez-search--space--medium:var(--space--medium, 12px);--ez-search--space--small:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-search--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-search__btn--color)}.btn:disabled{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:disabled:hover{cursor:not-allowed;color:var(--ez-search__btn-disabled--color)}.btn:hover{color:var(--ez-search__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}";export{v as ez_search}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s,F as e,H as h}from"./p-23a36bb6.js";import{ArrayUtils as l}from"@sankhyalabs/core";var o;!function(t){t.DATASOURCE_RESULTS="DATASOURCE_RESULTS",t.DATASOURCE_RESULTS_EMPTY="DATASOURCE_RESULTS_EMPTY",t.DATASOURCE_INIT="DATASOURCE_INIT",t.OPTIONS_EMPTY="OPTIONS_EMPTY",t.OPTIONS="OPTIONS"}(o||(o={}));const n=class{constructor(s){t(this,s),this.changeFilteredOptions=i(this,"changeFilteredOptions",7),this.columnName=void 0,this.dataSource=void 0,this.useOptions=!1,this.options=void 0,this.isTextSearch=!1,this.filteredOptions=void 0,this.displayOptions=void 0,this.viewScenario=void 0,this.displayOptionToCheckAllItems=!0}async clearFilteredOptions(){this.setInitialScenario(),this.filteredOptions=[],this.searchInput&&(this.searchInput.value=""),this.filterInput&&(this.filterInput.value="")}onChangeUseOptions(){this.setInitialScenario()}onChangeOptions(){this.options&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.options)),this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.setInitialScenario()}onChangeFilteredOptions(t){this.displayOptions=this.filteredOptions,this.displayOptionToCheckAllItems=this.filteredOptions.length>1,this.checkInput&&this.changeCheckAllValeuFromFilteredOptions(),this.changeFilteredOptions.emit(t)}componentDidRender(){this.changeCheckAllValeuFromFilteredOptions()}ordenationByCheckStateAndAlphabetically(t){const i=[],s=[];let e;return t.forEach((t=>{null==t.value||""===t.label?e=Object.assign(Object.assign({},t),{label:"(Vazio)"}):t.check?i.push(t):s.push(t)})),(null==e?[]:[e]).concat(null==this.dataSource?l.sortAlphabetically(i):this.dataSource.sortItems(this.columnName,i)).concat(null==this.dataSource?l.sortAlphabetically(s):this.dataSource.sortItems(this.columnName,s))}changeCheckAllValeuFromFilteredOptions(){var t,i,s,e;const h=null===(t=this.filteredOptions)||void 0===t?void 0:t.every((t=>!0===t.check)),l=null===(i=this.filteredOptions)||void 0===i?void 0:i.every((t=>!1===t.check)),o=(null===(s=this.filteredOptions)||void 0===s?void 0:s.some((t=>!1===t.check)))&&(null===(e=this.filteredOptions)||void 0===e?void 0:e.some((t=>!0===t.check)))&&(!h||!l);return this.checkInput&&h?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!0)):this.checkInput&&o?(this.checkInput.indeterminate=!0,void(this.checkInput.value=!1)):this.checkInput&&l?(this.checkInput.indeterminate=!1,void(this.checkInput.value=!1)):void 0}setInitialScenario(){if(this.useOptions)return this.viewScenario=o.OPTIONS,void this.changeCheckAllValeuFromFilteredOptions();this.viewScenario=this.options&&this.options.length>0?o.DATASOURCE_RESULTS:o.DATASOURCE_INIT}async searchWithDataSource(t,i){const{argument:s,mode:e}=t;if("PRELOAD"!==e&&i)return this.dataSource.fetchData(s,i)}handleSearchOnDataSource(t){var i;const s=null!==(i=this.filteredOptions)&&void 0!==i?i:[];t.detail&&!s.some((i=>i.value==t.detail.value))&&(this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...s,t.detail])),this.viewScenario=o.DATASOURCE_RESULTS,this.searchInput.value=""}handleRemoveItemFromOptions(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter((i=>i.value!==t.value))),0===this.filteredOptions.length&&(this.viewScenario=o.DATASOURCE_INIT),this.searchInput&&(this.searchInput.value="")}handleSearchOnOption(t){if(t.detail)return this.displayOptions=l.applyStringFilter(t.detail,this.filteredOptions,!0),void(this.viewScenario=0===this.displayOptions.length?o.OPTIONS_EMPTY:o.OPTIONS);this.displayOptions=this.filteredOptions,this.viewScenario=o.OPTIONS}handleChangeSelectAllItems(t){this.filteredOptions=this.ordenationByCheckStateAndAlphabetically([...this.filteredOptions.map((i=>(i.check=!!t.detail,i)))])}handleChangeSelectedItem(t){const{detail:i}=t;this.filteredOptions.find((t=>t.label===i.label)).check=i.check}buildViewList(t){return s(e,null,this.displayOptionToCheckAllItems&&s("ez-check",{ref:t=>this.checkInput=t,label:"Selecionar todos",class:"multi-selection__select-all",onEzChange:this.handleChangeSelectAllItems.bind(this)}),s("ez-list",{class:"multi-selection__list",dataSource:this.displayOptions,listMode:"check",hoverFeedback:!0,onEzCheckChange:this.handleChangeSelectedItem.bind(this),itemSlotBuilder:t?this.buildDeleteIconSlot.bind(this):null}))}buildDeleteIconSlot(t){return s("ez-icon",{style:{cursor:"pointer"},iconName:"delete",onClick:()=>this.handleRemoveItemFromOptions(t)})}buildInitViewWithDataSource(){return s("multi-selection-box-message",{message:"Selecione os valores a serem filtrados através do campo de busca."})}buildViewEmptyResults(){return s("multi-selection-box-message",{message:"Nenhum resultado encontrado."})}scenarioToDisplay(t){const i={[o.DATASOURCE_INIT]:()=>this.buildInitViewWithDataSource(),[o.DATASOURCE_RESULTS]:()=>this.buildViewList(!0),[o.DATASOURCE_RESULTS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS_EMPTY]:()=>this.buildViewEmptyResults(),[o.OPTIONS]:()=>this.buildViewList(!1)}[t];return i?i():void 0}render(){return s(h,null,s("div",{class:"multi-selection"},this.useOptions?s("ez-filter-input",{ref:t=>this.filterInput=t,label:"Buscar..",onEzChange:this.handleSearchOnOption.bind(this)}):s("ez-search",{class:"multi-selection__input",label:"Buscar...",ref:t=>this.searchInput=t,suppressEmptyOption:!0,showOptionValue:!1,showSelectedValue:!1,optionLoader:t=>this.searchWithDataSource(t,this.columnName),onEzChange:this.handleSearchOnDataSource.bind(this),isTextSearch:this.isTextSearch}),s("ez-scroll",{class:"multi-selection__content-options"},this.scenarioToDisplay(this.viewScenario))))}static get watchers(){return{useOptions:["onChangeUseOptions"],options:["onChangeOptions"],filteredOptions:["onChangeFilteredOptions"]}}};n.style=".sc-ez-multi-selection-list-h{--ez-check--outter-gap:0px;--ez-multi-selection-default-height:322px;display:block;width:304px;height:var(--ez-multi-selection-default-height);min-height:fit-content;max-height:calc(100vh - 350px)}.multi-selection__input.sc-ez-multi-selection-list{margin-bottom:var(--space--2xs, 8px)}.multi-selection__content-options.sc-ez-multi-selection-list{position:relative;left:-4px}.multi-selection__select-all.sc-ez-multi-selection-list{height:var(--space--xl);margin:0 var(--space--small, 6px)}.multi-selection__list.sc-ez-multi-selection-list{max-height:calc(100vh - 435px);overflow-y:auto;overflow-x:clip}.multi-selection__list.sc-ez-multi-selection-list::-webkit-scrollbar{width:var(--space--small);min-width:var(--space--small);max-width:var(--space--small)}";export{n as ez_multi_selection_list}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
2
|
export declare class EzPopoverPlus {
|
|
3
|
-
private
|
|
4
|
-
private _overlay;
|
|
5
|
-
private _overlayIsActive;
|
|
6
|
-
private _timeoutDebounce;
|
|
7
|
-
private _resizeObserver;
|
|
8
|
-
private TIME_DEBOUNCE;
|
|
3
|
+
private _popOverCore;
|
|
9
4
|
_host: HTMLElement;
|
|
10
5
|
/**
|
|
11
6
|
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
@@ -26,16 +21,20 @@ export declare class EzPopoverPlus {
|
|
|
26
21
|
/**
|
|
27
22
|
* Define o elemento de ancoragem.
|
|
28
23
|
*/
|
|
29
|
-
anchorElement: HTMLElement | string;
|
|
24
|
+
anchorElement: Array<HTMLElement | string> | HTMLElement | string;
|
|
30
25
|
/**
|
|
31
26
|
* Define as opções do elemento.
|
|
32
27
|
*/
|
|
33
28
|
options: IEzPopoverAnchorOptions;
|
|
29
|
+
/**
|
|
30
|
+
* Define se o elemento manterá o mesmo tamanho do componente de ancora.
|
|
31
|
+
*/
|
|
32
|
+
useAnchorSize: boolean;
|
|
34
33
|
/**
|
|
35
34
|
* Emitido quando acontece a alteração de estado do componente.
|
|
36
35
|
*/
|
|
37
36
|
ezVisibilityChange: EventEmitter<boolean>;
|
|
38
|
-
observeOpened(newValue: boolean
|
|
37
|
+
observeOpened(newValue: boolean): Promise<void>;
|
|
39
38
|
/**
|
|
40
39
|
* Atualiza a posição do popover.
|
|
41
40
|
*/
|
|
@@ -60,18 +59,7 @@ export declare class EzPopoverPlus {
|
|
|
60
59
|
* Altera o elemento de ancoragem.
|
|
61
60
|
*/
|
|
62
61
|
setAnchorElement(anchor: HTMLElement | string): Promise<void>;
|
|
63
|
-
private
|
|
64
|
-
private updateOptionPosition;
|
|
65
|
-
private updatePositionPopover;
|
|
66
|
-
private hidePopover;
|
|
67
|
-
private openPopover;
|
|
68
|
-
private openOverlay;
|
|
69
|
-
private hideOverlay;
|
|
70
|
-
private checkStatusOverlay;
|
|
71
|
-
private updatePositionDebounce;
|
|
72
|
-
componentWillLoad(): void;
|
|
73
|
-
componentDidLoad(): void;
|
|
74
|
-
disconnectedCallback(): void;
|
|
62
|
+
private renderPopoverCore;
|
|
75
63
|
render(): any;
|
|
76
64
|
}
|
|
77
65
|
export interface IEzPopoverAnchorOptions {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { EventEmitter } from "../../../stencil-public-runtime";
|
|
2
|
+
export declare class EzPopoverCore {
|
|
3
|
+
private _box;
|
|
4
|
+
private _overlay;
|
|
5
|
+
private _overlayIsActive;
|
|
6
|
+
private _timeoutDebounce;
|
|
7
|
+
private _resizeObserver;
|
|
8
|
+
private TIME_DEBOUNCE;
|
|
9
|
+
_host: HTMLElement;
|
|
10
|
+
/**
|
|
11
|
+
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
12
|
+
*/
|
|
13
|
+
autoClose: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Ajusta o comportamento da largura do popover.
|
|
16
|
+
*/
|
|
17
|
+
boxWidth: "full-width" | "fit-content";
|
|
18
|
+
/**
|
|
19
|
+
* Define se o ez-popover está aberto.
|
|
20
|
+
*/
|
|
21
|
+
opened: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Define o tipo de overlay do popover.
|
|
24
|
+
*/
|
|
25
|
+
overlayType: "medium" | "light" | "none";
|
|
26
|
+
/**
|
|
27
|
+
* Define o elemento de ancoragem.
|
|
28
|
+
*/
|
|
29
|
+
anchorElement: Array<HTMLElement | string> | HTMLElement | string;
|
|
30
|
+
/**
|
|
31
|
+
* Define as opções do elemento.
|
|
32
|
+
*/
|
|
33
|
+
options: IEzPopoverAnchorOptions;
|
|
34
|
+
/**
|
|
35
|
+
* Define se o elemento manterá o mesmo tamanho do componente de ancora.
|
|
36
|
+
*/
|
|
37
|
+
useAnchorSize: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Define a largura mínima do elemento (apenas será considerada caso a propriedade useAnchorSize seja verdadeira).
|
|
40
|
+
*/
|
|
41
|
+
minWidth: number;
|
|
42
|
+
/**
|
|
43
|
+
* Emitido quando acontece a alteração de estado do componente.
|
|
44
|
+
*/
|
|
45
|
+
ezVisibilityChange: EventEmitter<boolean>;
|
|
46
|
+
observeOpened(newValue: boolean, oldValue: boolean): void;
|
|
47
|
+
/**
|
|
48
|
+
* Atualiza a posição do popover.
|
|
49
|
+
*/
|
|
50
|
+
updatePosition(top?: string, left?: string): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Exibe o ez-popover.
|
|
53
|
+
*/
|
|
54
|
+
show(top?: string | number, left?: string | number): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Ancora a exibição do popOver a um elemento HTML.
|
|
57
|
+
*/
|
|
58
|
+
showUnder(element: HTMLElement | string, options?: IEzPopoverAnchorOptions): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Oculta o ez-popover.
|
|
61
|
+
*/
|
|
62
|
+
hide(): Promise<void>;
|
|
63
|
+
/**
|
|
64
|
+
* Altera as opções.
|
|
65
|
+
*/
|
|
66
|
+
setOptions(options: IEzPopoverAnchorOptions): Promise<void>;
|
|
67
|
+
/**
|
|
68
|
+
* Altera o elemento de ancoragem.
|
|
69
|
+
*/
|
|
70
|
+
setAnchorElement(anchor: HTMLElement | string): Promise<void>;
|
|
71
|
+
private parseSizePixel;
|
|
72
|
+
private updateOptionPosition;
|
|
73
|
+
private getElement;
|
|
74
|
+
private getAnchorElement;
|
|
75
|
+
private updatePositionPopover;
|
|
76
|
+
private hidePopover;
|
|
77
|
+
private openPopover;
|
|
78
|
+
private openOverlay;
|
|
79
|
+
private hideOverlay;
|
|
80
|
+
private checkStatusOverlay;
|
|
81
|
+
private updatePositionDebounce;
|
|
82
|
+
componentWillLoad(): void;
|
|
83
|
+
componentDidLoad(): void;
|
|
84
|
+
disconnectedCallback(): void;
|
|
85
|
+
render(): any;
|
|
86
|
+
}
|
|
87
|
+
export interface IEzPopoverAnchorOptions {
|
|
88
|
+
horizontalGap?: number;
|
|
89
|
+
verticalGap?: number;
|
|
90
|
+
fromRight?: boolean;
|
|
91
|
+
}
|
|
@@ -3,11 +3,10 @@ import { IEzCheckBoxListPosition } from '../ez-combo-box/ez-combo-box';
|
|
|
3
3
|
import { TFocusOptions } from "../ez-text-input/ez-text-input";
|
|
4
4
|
export declare class EzSearch {
|
|
5
5
|
private _textInput;
|
|
6
|
+
private _searchList;
|
|
6
7
|
private _optionsList;
|
|
7
|
-
private
|
|
8
|
-
private _listWrapper;
|
|
8
|
+
private _ezPopOverPlusElement;
|
|
9
9
|
private _itemValueBasis;
|
|
10
|
-
private _floatingID;
|
|
11
10
|
private _source;
|
|
12
11
|
private _changeDeboucingTimeout;
|
|
13
12
|
private _limitCharsToSearch;
|
|
@@ -138,30 +137,20 @@ export declare class EzSearch {
|
|
|
138
137
|
* Limpa o valor do campo de pesquisa
|
|
139
138
|
*/
|
|
140
139
|
clearValue(): Promise<void>;
|
|
141
|
-
scrollListener(): void;
|
|
142
140
|
private handleValueAsString;
|
|
143
|
-
private updateListPosition;
|
|
144
|
-
private getListPosition;
|
|
145
141
|
private isDifferentValues;
|
|
146
142
|
private getFormattedText;
|
|
147
143
|
private getText;
|
|
148
|
-
private replaceQuotes;
|
|
149
144
|
private getSelectedOption;
|
|
150
145
|
private updateVisibleOptions;
|
|
151
146
|
private getMaxWidthValue;
|
|
152
147
|
private getWidthValue;
|
|
153
|
-
private createOption;
|
|
154
|
-
private buildItem;
|
|
155
148
|
private showOptions;
|
|
156
149
|
private hideOptions;
|
|
157
150
|
private isOptionsVisible;
|
|
158
|
-
private nextOption;
|
|
159
|
-
private previousOption;
|
|
160
|
-
private scrollToOption;
|
|
161
151
|
private selectCurrentOption;
|
|
162
152
|
private updateSource;
|
|
163
153
|
private clearSource;
|
|
164
|
-
private replaceHighlight;
|
|
165
154
|
private selectOption;
|
|
166
155
|
private loadOptions;
|
|
167
156
|
private cancelPreselection;
|
|
@@ -190,6 +179,7 @@ export declare class EzSearch {
|
|
|
190
179
|
private onTextInputFocusOutHandler;
|
|
191
180
|
private canShowListOptions;
|
|
192
181
|
private canShowLoadSpinDescription;
|
|
182
|
+
private onChangePreSelection;
|
|
193
183
|
render(): any;
|
|
194
184
|
}
|
|
195
185
|
export interface IOption {
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
|
+
import { IOption } from '../../ez-search';
|
|
3
|
+
export declare class SearchList {
|
|
4
|
+
private _startHighlightTag;
|
|
5
|
+
private _endHighlightTag;
|
|
6
|
+
private _optionsList;
|
|
7
|
+
showLoading: boolean;
|
|
8
|
+
visibleOptions: Array<IOption>;
|
|
9
|
+
textEmptyList: string;
|
|
10
|
+
canShowListOptions: boolean;
|
|
11
|
+
value: IOption | string;
|
|
12
|
+
showOptionValue: boolean;
|
|
13
|
+
preSelection: number;
|
|
14
|
+
changeValue: EventEmitter<IOption>;
|
|
15
|
+
changePreSelection: EventEmitter<number>;
|
|
16
|
+
nextOption(): Promise<void>;
|
|
17
|
+
previousOption(): Promise<void>;
|
|
18
|
+
private selectOption;
|
|
19
|
+
private createOption;
|
|
20
|
+
private scrollToOption;
|
|
21
|
+
private buildItem;
|
|
22
|
+
render(): any;
|
|
23
|
+
}
|
|
@@ -33,7 +33,8 @@ import { ListGroup, ListItem as ListItem1, SlotBuilder as SlotBuilder1, TListMod
|
|
|
33
33
|
import { THeightMode } from "./components/ez-modal/ez-modal";
|
|
34
34
|
import { IMultiSelectionOption } from "./components/ez-multi-selection-list/interfaces/IMultiSelectionOption";
|
|
35
35
|
import { IEzPopoverAnchorOptions } from "./components/ez-popover/ez-popover";
|
|
36
|
-
import { IEzPopoverAnchorOptions as IEzPopoverAnchorOptions1 } from "./components/ez-popover-plus/ez-popover-
|
|
36
|
+
import { IEzPopoverAnchorOptions as IEzPopoverAnchorOptions1 } from "./components/ez-popover-plus/subcomponent/ez-popover-core";
|
|
37
|
+
import { IEzPopoverAnchorOptions as IEzPopoverAnchorOptions2 } from "./components/ez-popover-plus/ez-popover-plus";
|
|
37
38
|
import { Radio } from "./components/ez-radio-button/ez-radio-button";
|
|
38
39
|
import { EzScrollDirection } from "./components/ez-scroller/EzScrollDirection";
|
|
39
40
|
import { IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-search/ez-search";
|
|
@@ -46,6 +47,7 @@ import { ITreeItem } from "./components/ez-tree/interfaces/ITreeItem";
|
|
|
46
47
|
import { Node } from "./components/ez-tree/types/Node";
|
|
47
48
|
import { EzFile } from "./components/ez-upload/ez-upload";
|
|
48
49
|
import { IAppliedFilterColumnOptions, IFilterColumnConfigs } from "./components/ez-grid/subcomponents/filter-column";
|
|
50
|
+
import { IOption as IOption2 } from "./components/ez-search/ez-search";
|
|
49
51
|
export namespace Components {
|
|
50
52
|
interface EzActionsButton {
|
|
51
53
|
/**
|
|
@@ -1325,11 +1327,69 @@ export namespace Components {
|
|
|
1325
1327
|
*/
|
|
1326
1328
|
"updatePosition": (top?: string, left?: string) => Promise<void>;
|
|
1327
1329
|
}
|
|
1330
|
+
interface EzPopoverCore {
|
|
1331
|
+
/**
|
|
1332
|
+
* Define o elemento de ancoragem.
|
|
1333
|
+
*/
|
|
1334
|
+
"anchorElement": Array<HTMLElement | string> | HTMLElement | string;
|
|
1335
|
+
/**
|
|
1336
|
+
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
1337
|
+
*/
|
|
1338
|
+
"autoClose": boolean;
|
|
1339
|
+
/**
|
|
1340
|
+
* Ajusta o comportamento da largura do popover.
|
|
1341
|
+
*/
|
|
1342
|
+
"boxWidth": "full-width" | "fit-content";
|
|
1343
|
+
/**
|
|
1344
|
+
* Oculta o ez-popover.
|
|
1345
|
+
*/
|
|
1346
|
+
"hide": () => Promise<void>;
|
|
1347
|
+
/**
|
|
1348
|
+
* Define a largura mínima do elemento (apenas será considerada caso a propriedade useAnchorSize seja verdadeira).
|
|
1349
|
+
*/
|
|
1350
|
+
"minWidth": number;
|
|
1351
|
+
/**
|
|
1352
|
+
* Define se o ez-popover está aberto.
|
|
1353
|
+
*/
|
|
1354
|
+
"opened": boolean;
|
|
1355
|
+
/**
|
|
1356
|
+
* Define as opções do elemento.
|
|
1357
|
+
*/
|
|
1358
|
+
"options": IEzPopoverAnchorOptions;
|
|
1359
|
+
/**
|
|
1360
|
+
* Define o tipo de overlay do popover.
|
|
1361
|
+
*/
|
|
1362
|
+
"overlayType": "medium" | "light" | "none";
|
|
1363
|
+
/**
|
|
1364
|
+
* Altera o elemento de ancoragem.
|
|
1365
|
+
*/
|
|
1366
|
+
"setAnchorElement": (anchor: HTMLElement | string) => Promise<void>;
|
|
1367
|
+
/**
|
|
1368
|
+
* Altera as opções.
|
|
1369
|
+
*/
|
|
1370
|
+
"setOptions": (options: IEzPopoverAnchorOptions) => Promise<void>;
|
|
1371
|
+
/**
|
|
1372
|
+
* Exibe o ez-popover.
|
|
1373
|
+
*/
|
|
1374
|
+
"show": (top?: string | number, left?: string | number) => Promise<void>;
|
|
1375
|
+
/**
|
|
1376
|
+
* Ancora a exibição do popOver a um elemento HTML.
|
|
1377
|
+
*/
|
|
1378
|
+
"showUnder": (element: HTMLElement | string, options?: IEzPopoverAnchorOptions) => Promise<void>;
|
|
1379
|
+
/**
|
|
1380
|
+
* Atualiza a posição do popover.
|
|
1381
|
+
*/
|
|
1382
|
+
"updatePosition": (top?: string, left?: string) => Promise<void>;
|
|
1383
|
+
/**
|
|
1384
|
+
* Define se o elemento manterá o mesmo tamanho do componente de ancora.
|
|
1385
|
+
*/
|
|
1386
|
+
"useAnchorSize": boolean;
|
|
1387
|
+
}
|
|
1328
1388
|
interface EzPopoverPlus {
|
|
1329
1389
|
/**
|
|
1330
1390
|
* Define o elemento de ancoragem.
|
|
1331
1391
|
*/
|
|
1332
|
-
"anchorElement": HTMLElement | string;
|
|
1392
|
+
"anchorElement": Array<HTMLElement | string> | HTMLElement | string;
|
|
1333
1393
|
/**
|
|
1334
1394
|
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
1335
1395
|
*/
|
|
@@ -1374,6 +1434,10 @@ export namespace Components {
|
|
|
1374
1434
|
* Atualiza a posição do popover.
|
|
1375
1435
|
*/
|
|
1376
1436
|
"updatePosition": (top?: string, left?: string) => Promise<void>;
|
|
1437
|
+
/**
|
|
1438
|
+
* Define se o elemento manterá o mesmo tamanho do componente de ancora.
|
|
1439
|
+
*/
|
|
1440
|
+
"useAnchorSize": boolean;
|
|
1377
1441
|
}
|
|
1378
1442
|
interface EzPopup {
|
|
1379
1443
|
/**
|
|
@@ -2076,6 +2140,17 @@ export namespace Components {
|
|
|
2076
2140
|
interface MultiSelectionBoxMessage {
|
|
2077
2141
|
"message": string;
|
|
2078
2142
|
}
|
|
2143
|
+
interface SearchList {
|
|
2144
|
+
"canShowListOptions": boolean;
|
|
2145
|
+
"nextOption": () => Promise<void>;
|
|
2146
|
+
"preSelection": number;
|
|
2147
|
+
"previousOption": () => Promise<void>;
|
|
2148
|
+
"showLoading": boolean;
|
|
2149
|
+
"showOptionValue": boolean;
|
|
2150
|
+
"textEmptyList": string;
|
|
2151
|
+
"value": IOption2 | string;
|
|
2152
|
+
"visibleOptions": Array<IOption2>;
|
|
2153
|
+
}
|
|
2079
2154
|
}
|
|
2080
2155
|
export interface EzActionsButtonCustomEvent<T> extends CustomEvent<T> {
|
|
2081
2156
|
detail: T;
|
|
@@ -2185,6 +2260,10 @@ export interface EzPopoverCustomEvent<T> extends CustomEvent<T> {
|
|
|
2185
2260
|
detail: T;
|
|
2186
2261
|
target: HTMLEzPopoverElement;
|
|
2187
2262
|
}
|
|
2263
|
+
export interface EzPopoverCoreCustomEvent<T> extends CustomEvent<T> {
|
|
2264
|
+
detail: T;
|
|
2265
|
+
target: HTMLEzPopoverCoreElement;
|
|
2266
|
+
}
|
|
2188
2267
|
export interface EzPopoverPlusCustomEvent<T> extends CustomEvent<T> {
|
|
2189
2268
|
detail: T;
|
|
2190
2269
|
target: HTMLEzPopoverPlusElement;
|
|
@@ -2249,6 +2328,10 @@ export interface FilterColumnCustomEvent<T> extends CustomEvent<T> {
|
|
|
2249
2328
|
detail: T;
|
|
2250
2329
|
target: HTMLFilterColumnElement;
|
|
2251
2330
|
}
|
|
2331
|
+
export interface SearchListCustomEvent<T> extends CustomEvent<T> {
|
|
2332
|
+
detail: T;
|
|
2333
|
+
target: HTMLSearchListElement;
|
|
2334
|
+
}
|
|
2252
2335
|
declare global {
|
|
2253
2336
|
interface HTMLEzActionsButtonElement extends Components.EzActionsButton, HTMLStencilElement {
|
|
2254
2337
|
}
|
|
@@ -2454,6 +2537,12 @@ declare global {
|
|
|
2454
2537
|
prototype: HTMLEzPopoverElement;
|
|
2455
2538
|
new (): HTMLEzPopoverElement;
|
|
2456
2539
|
};
|
|
2540
|
+
interface HTMLEzPopoverCoreElement extends Components.EzPopoverCore, HTMLStencilElement {
|
|
2541
|
+
}
|
|
2542
|
+
var HTMLEzPopoverCoreElement: {
|
|
2543
|
+
prototype: HTMLEzPopoverCoreElement;
|
|
2544
|
+
new (): HTMLEzPopoverCoreElement;
|
|
2545
|
+
};
|
|
2457
2546
|
interface HTMLEzPopoverPlusElement extends Components.EzPopoverPlus, HTMLStencilElement {
|
|
2458
2547
|
}
|
|
2459
2548
|
var HTMLEzPopoverPlusElement: {
|
|
@@ -2592,6 +2681,12 @@ declare global {
|
|
|
2592
2681
|
prototype: HTMLMultiSelectionBoxMessageElement;
|
|
2593
2682
|
new (): HTMLMultiSelectionBoxMessageElement;
|
|
2594
2683
|
};
|
|
2684
|
+
interface HTMLSearchListElement extends Components.SearchList, HTMLStencilElement {
|
|
2685
|
+
}
|
|
2686
|
+
var HTMLSearchListElement: {
|
|
2687
|
+
prototype: HTMLSearchListElement;
|
|
2688
|
+
new (): HTMLSearchListElement;
|
|
2689
|
+
};
|
|
2595
2690
|
interface HTMLElementTagNameMap {
|
|
2596
2691
|
"ez-actions-button": HTMLEzActionsButtonElement;
|
|
2597
2692
|
"ez-alert": HTMLEzAlertElement;
|
|
@@ -2627,6 +2722,7 @@ declare global {
|
|
|
2627
2722
|
"ez-multi-selection-list": HTMLEzMultiSelectionListElement;
|
|
2628
2723
|
"ez-number-input": HTMLEzNumberInputElement;
|
|
2629
2724
|
"ez-popover": HTMLEzPopoverElement;
|
|
2725
|
+
"ez-popover-core": HTMLEzPopoverCoreElement;
|
|
2630
2726
|
"ez-popover-plus": HTMLEzPopoverPlusElement;
|
|
2631
2727
|
"ez-popup": HTMLEzPopupElement;
|
|
2632
2728
|
"ez-radio-button": HTMLEzRadioButtonElement;
|
|
@@ -2650,6 +2746,7 @@ declare global {
|
|
|
2650
2746
|
"ez-view-stack": HTMLEzViewStackElement;
|
|
2651
2747
|
"filter-column": HTMLFilterColumnElement;
|
|
2652
2748
|
"multi-selection-box-message": HTMLMultiSelectionBoxMessageElement;
|
|
2749
|
+
"search-list": HTMLSearchListElement;
|
|
2653
2750
|
}
|
|
2654
2751
|
}
|
|
2655
2752
|
declare namespace LocalJSX {
|
|
@@ -3839,11 +3936,49 @@ declare namespace LocalJSX {
|
|
|
3839
3936
|
*/
|
|
3840
3937
|
"overlayType"?: "medium" | "light" | "none";
|
|
3841
3938
|
}
|
|
3939
|
+
interface EzPopoverCore {
|
|
3940
|
+
/**
|
|
3941
|
+
* Define o elemento de ancoragem.
|
|
3942
|
+
*/
|
|
3943
|
+
"anchorElement"?: Array<HTMLElement | string> | HTMLElement | string;
|
|
3944
|
+
/**
|
|
3945
|
+
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
3946
|
+
*/
|
|
3947
|
+
"autoClose"?: boolean;
|
|
3948
|
+
/**
|
|
3949
|
+
* Ajusta o comportamento da largura do popover.
|
|
3950
|
+
*/
|
|
3951
|
+
"boxWidth"?: "full-width" | "fit-content";
|
|
3952
|
+
/**
|
|
3953
|
+
* Define a largura mínima do elemento (apenas será considerada caso a propriedade useAnchorSize seja verdadeira).
|
|
3954
|
+
*/
|
|
3955
|
+
"minWidth"?: number;
|
|
3956
|
+
/**
|
|
3957
|
+
* Emitido quando acontece a alteração de estado do componente.
|
|
3958
|
+
*/
|
|
3959
|
+
"onEzVisibilityChange"?: (event: EzPopoverCoreCustomEvent<boolean>) => void;
|
|
3960
|
+
/**
|
|
3961
|
+
* Define se o ez-popover está aberto.
|
|
3962
|
+
*/
|
|
3963
|
+
"opened"?: boolean;
|
|
3964
|
+
/**
|
|
3965
|
+
* Define as opções do elemento.
|
|
3966
|
+
*/
|
|
3967
|
+
"options"?: IEzPopoverAnchorOptions;
|
|
3968
|
+
/**
|
|
3969
|
+
* Define o tipo de overlay do popover.
|
|
3970
|
+
*/
|
|
3971
|
+
"overlayType"?: "medium" | "light" | "none";
|
|
3972
|
+
/**
|
|
3973
|
+
* Define se o elemento manterá o mesmo tamanho do componente de ancora.
|
|
3974
|
+
*/
|
|
3975
|
+
"useAnchorSize"?: boolean;
|
|
3976
|
+
}
|
|
3842
3977
|
interface EzPopoverPlus {
|
|
3843
3978
|
/**
|
|
3844
3979
|
* Define o elemento de ancoragem.
|
|
3845
3980
|
*/
|
|
3846
|
-
"anchorElement"?: HTMLElement | string;
|
|
3981
|
+
"anchorElement"?: Array<HTMLElement | string> | HTMLElement | string;
|
|
3847
3982
|
/**
|
|
3848
3983
|
* Define que será fechado automaticamente quando o usuário clicar fora do conteúdo.
|
|
3849
3984
|
*/
|
|
@@ -3868,6 +4003,10 @@ declare namespace LocalJSX {
|
|
|
3868
4003
|
* Define o tipo de overlay do popover.
|
|
3869
4004
|
*/
|
|
3870
4005
|
"overlayType"?: "medium" | "light" | "none";
|
|
4006
|
+
/**
|
|
4007
|
+
* Define se o elemento manterá o mesmo tamanho do componente de ancora.
|
|
4008
|
+
*/
|
|
4009
|
+
"useAnchorSize"?: boolean;
|
|
3871
4010
|
}
|
|
3872
4011
|
interface EzPopup {
|
|
3873
4012
|
/**
|
|
@@ -4501,6 +4640,17 @@ declare namespace LocalJSX {
|
|
|
4501
4640
|
interface MultiSelectionBoxMessage {
|
|
4502
4641
|
"message"?: string;
|
|
4503
4642
|
}
|
|
4643
|
+
interface SearchList {
|
|
4644
|
+
"canShowListOptions"?: boolean;
|
|
4645
|
+
"onChangePreSelection"?: (event: SearchListCustomEvent<number>) => void;
|
|
4646
|
+
"onChangeValue"?: (event: SearchListCustomEvent<IOption2>) => void;
|
|
4647
|
+
"preSelection"?: number;
|
|
4648
|
+
"showLoading"?: boolean;
|
|
4649
|
+
"showOptionValue"?: boolean;
|
|
4650
|
+
"textEmptyList"?: string;
|
|
4651
|
+
"value"?: IOption2 | string;
|
|
4652
|
+
"visibleOptions"?: Array<IOption2>;
|
|
4653
|
+
}
|
|
4504
4654
|
interface IntrinsicElements {
|
|
4505
4655
|
"ez-actions-button": EzActionsButton;
|
|
4506
4656
|
"ez-alert": EzAlert;
|
|
@@ -4536,6 +4686,7 @@ declare namespace LocalJSX {
|
|
|
4536
4686
|
"ez-multi-selection-list": EzMultiSelectionList;
|
|
4537
4687
|
"ez-number-input": EzNumberInput;
|
|
4538
4688
|
"ez-popover": EzPopover;
|
|
4689
|
+
"ez-popover-core": EzPopoverCore;
|
|
4539
4690
|
"ez-popover-plus": EzPopoverPlus;
|
|
4540
4691
|
"ez-popup": EzPopup;
|
|
4541
4692
|
"ez-radio-button": EzRadioButton;
|
|
@@ -4559,6 +4710,7 @@ declare namespace LocalJSX {
|
|
|
4559
4710
|
"ez-view-stack": EzViewStack;
|
|
4560
4711
|
"filter-column": FilterColumn;
|
|
4561
4712
|
"multi-selection-box-message": MultiSelectionBoxMessage;
|
|
4713
|
+
"search-list": SearchList;
|
|
4562
4714
|
}
|
|
4563
4715
|
}
|
|
4564
4716
|
export { LocalJSX as JSX };
|
|
@@ -4599,6 +4751,7 @@ declare module "@stencil/core" {
|
|
|
4599
4751
|
"ez-multi-selection-list": LocalJSX.EzMultiSelectionList & JSXBase.HTMLAttributes<HTMLEzMultiSelectionListElement>;
|
|
4600
4752
|
"ez-number-input": LocalJSX.EzNumberInput & JSXBase.HTMLAttributes<HTMLEzNumberInputElement>;
|
|
4601
4753
|
"ez-popover": LocalJSX.EzPopover & JSXBase.HTMLAttributes<HTMLEzPopoverElement>;
|
|
4754
|
+
"ez-popover-core": LocalJSX.EzPopoverCore & JSXBase.HTMLAttributes<HTMLEzPopoverCoreElement>;
|
|
4602
4755
|
"ez-popover-plus": LocalJSX.EzPopoverPlus & JSXBase.HTMLAttributes<HTMLEzPopoverPlusElement>;
|
|
4603
4756
|
"ez-popup": LocalJSX.EzPopup & JSXBase.HTMLAttributes<HTMLEzPopupElement>;
|
|
4604
4757
|
"ez-radio-button": LocalJSX.EzRadioButton & JSXBase.HTMLAttributes<HTMLEzRadioButtonElement>;
|
|
@@ -4622,6 +4775,7 @@ declare module "@stencil/core" {
|
|
|
4622
4775
|
"ez-view-stack": LocalJSX.EzViewStack & JSXBase.HTMLAttributes<HTMLEzViewStackElement>;
|
|
4623
4776
|
"filter-column": LocalJSX.FilterColumn & JSXBase.HTMLAttributes<HTMLFilterColumnElement>;
|
|
4624
4777
|
"multi-selection-box-message": LocalJSX.MultiSelectionBoxMessage & JSXBase.HTMLAttributes<HTMLMultiSelectionBoxMessageElement>;
|
|
4778
|
+
"search-list": LocalJSX.SearchList & JSXBase.HTMLAttributes<HTMLSearchListElement>;
|
|
4625
4779
|
}
|
|
4626
4780
|
}
|
|
4627
4781
|
}
|
package/package.json
CHANGED