@sankhyalabs/ezui 1.1.160 → 1.1.162
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-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/{grid-config.cjs.entry.js → ez-grid-config.cjs.entry.js} +6 -6
- package/dist/cjs/ez-grid.cjs.entry.js +7 -3
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/{select-box.cjs.entry.js → ez-select-box.cjs.entry.js} +3 -3
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +10 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +6 -2
- package/dist/collection/components/ez-grid/ez-grid.css +4 -0
- package/dist/collection/components/ez-grid/ez-grid.js +7 -7
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.css → ez-grid-config/ez-grid-config.css} +46 -20
- package/dist/collection/components/ez-grid/subcomponents/{gridconfig/grid-config.js → ez-grid-config/ez-grid-config.js} +12 -12
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.css → ez-select-box/ez-select-box.css} +3 -4
- package/dist/collection/components/ez-grid/subcomponents/{select-box/select-box.js → ez-select-box/ez-select-box.js} +3 -3
- package/dist/collection/components/ez-icon/ez-icon.css +117 -98
- package/dist/collection/components/ez-list/ez-list.css +84 -46
- package/dist/collection/components/ez-modal/ez-modal.css +2 -2
- package/dist/custom-elements/index.d.ts +12 -12
- package/dist/custom-elements/index.js +461 -457
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/{grid-config.entry.js → ez-grid-config.entry.js} +6 -6
- package/dist/esm/ez-grid.entry.js +7 -3
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/{select-box.entry.js → ez-select-box.entry.js} +3 -3
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-1fecaeb8.entry.js +1 -0
- package/dist/ezui/p-8c1b9fe0.entry.js +1 -0
- package/dist/ezui/{p-ae2fea4c.entry.js → p-8d73594f.entry.js} +1 -1
- package/dist/ezui/p-988ff301.entry.js +1 -0
- package/dist/ezui/p-afff9fb9.entry.js +1 -0
- package/dist/ezui/p-cf56d3e8.entry.js +1 -0
- package/dist/ezui/{p-727a39e5.entry.js → p-fd6f3bf9.entry.js} +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +1 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +5 -5
- package/dist/types/components/ez-grid/subcomponents/{gridconfig/grid-config.d.ts → ez-grid-config/ez-grid-config.d.ts} +4 -4
- package/dist/types/components/ez-grid/subcomponents/{select-box/select-box.d.ts → ez-select-box/ez-select-box.d.ts} +0 -0
- package/dist/types/components.d.ts +41 -41
- package/package.json +1 -1
- package/react/components.d.ts +2 -2
- package/react/components.js +2 -2
- package/react/components.js.map +1 -1
- package/dist/ezui/p-317250bc.entry.js +0 -1
- package/dist/ezui/p-ad6cc559.entry.js +0 -1
- package/dist/ezui/p-bea6f8a6.entry.js +0 -1
- package/dist/ezui/p-c2de757f.entry.js +0 -1
- package/dist/ezui/p-ecee9d8d.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as e,h as t,H as s}from"./p-139ed2f6.js";import{StringUtils as a}from"@sankhyalabs/core";import{A as r}from"./p-0cd386db.js";let o=class{constructor(t){i(this,t),this.configFinish=e(this,"configFinish",7),this.configCancel=e(this,"configCancel",7),this._orderListItems=[],this._orderPriorityList=[],this._columListItems=[],this._selectedIndex=-1,this._dataChanged=!1,this._componenteInternalKey=Date.now(),this.selectedTab="Colunas"}createOrderList(){let i=[];this.columns.filter((i=>{var e;return a.getBooleanValue(null===(e=null==i?void 0:i.props)||void 0===e?void 0:e.get("sortable"),!0)})).forEach((e=>{var t;let s=null===(t=this.config)||void 0===t?void 0:t.columns.find((i=>i.name===e.name)),a={name:e.name,label:e.label};s&&(a.orderIndex=s.orderIndex,a.ascending=s.ascending),e.hidden||i.push(a)})),i.sort(((i,e)=>0!=i.orderIndex||0!=e.orderIndex||null==i.ascending&&null==e.ascending?null!=i.ascending&&null!=e.ascending?i.orderIndex-e.orderIndex:null!=i.ascending||null!=e.ascending?null!=i.ascending?-1:null!=e.ascending?1:0:i.orderIndex-e.orderIndex:null!=i.ascending?-1:null!=e.ascending?1:0)),this._orderListItems=i}createColumnList(){let i={group:"Visíveis",items:[]},e={group:"Ocultas",items:[],sort:"ASC"};this.columns.forEach((t=>{let s={label:t.label};t.hidden?e.items.push(s):i.items.push(s)})),this._columListItems=[i,e]}buildColumnListSlot(i,e){return t("div",null,t("ez-check",{mode:"switch",id:"switch"+i+e,value:"Visíveis"===e.group,onEzChange:e=>{this.switchColumnGroup(e,i)}}))}buildOrderListSlot(i){let e="na";return null!=(null==i?void 0:i.ascending)&&(e=1==i.ascending?"asc":"desc"),t("div",null,t("ez-select-box",{selectedOption:e,key:"ez-select-box-"+this._componenteInternalKey+"-"+i,onEzChange:e=>{e.stopPropagation(),this.updateOrder(e.detail,i.label)}}))}updateOrder(i,e){var t;this._dataChanged=!0;let s,a=[...this.columns],r=a.find((i=>i.label===e));r&&(r.sort="na"===i.value?void 0:i.value),(null===(t=this._orderPriorityList)||void 0===t?void 0:t.length)>0?(this._orderPriorityList.find((i=>i.label===r.label)).sort=i,this._orderPriorityList.filter((i=>i.sort)).map(((i,e)=>{i.label===r.label&&(r.sortIndex=e)}))):(s=a.filter((i=>i.sort&&!0!==i.hidden)).map(((i,e)=>({label:i.label,orderIndex:e}))),s.forEach((i=>{a.find((e=>e.label===i.label)).sortIndex=i.orderIndex}))),this.columns=a}switchColumnGroup(i,e){i.stopPropagation();let t=[...this._columListItems];if(this._dataChanged=!0,!0===i.detail){let i=t.find((i=>"Ocultas"===i.group)),s=i.items.findIndex((i=>i.label===e.label));s>=0&&i.items.splice(s,1),t.find((i=>"Visíveis"===i.group)).items.push(e),this._columListItems=t,this.createOrderList()}else if(!1===i.detail){let i=t.find((i=>"Visíveis"===i.group)),s=i.items.findIndex((i=>i.label===e.label));s>=0&&i.items.splice(s,1),t.find((i=>"Ocultas"===i.group)).items.push(e),this._columListItems=t,this.createOrderList()}}finish(){let i=[];this._columListItems.forEach((e=>{e.items.forEach((t=>{const s=this.columns.find((i=>i.label===t.label));let a=Object.assign({},s);a.hidden="Ocultas"===e.group,i.push(a)}))})),this.columns=i,this._dataChanged=!1,this.closeConfig(),r.info("As configurações foram salvas com sucesso!"),this.save()}save(){var i;let e;e=this.config?this.config:this.createConfigFromState(this.columns);let t,s=[];if((null===(i=this._orderPriorityList)||void 0===i?void 0:i.length)>0){t=this.columns.filter((i=>i.sort&&!0!==i.hidden)).map((i=>({label:i.label,orderIndex:0})));let i=0,e=[];this._orderPriorityList.forEach((s=>{let a=t.find((i=>i.label===s.label));a&&(a.orderIndex=i,e.push(a),i++)})),e.length>0&&(t=e)}for(let i=0;i<this.columns.length;i++){const r=this.columns[i];let o=e.columns.find((i=>r.name===i.name));!0===r.hidden&&o||(o?o.width=r.width:!1===r.hidden&&(o={name:r.name,width:r.width,orderIndex:0}),o&&(r.sort?(o.ascending="ASC"===r.sort.toUpperCase(),t?a(r,o):o.orderIndex=r.sortIndex):(delete o.ascending,o.orderIndex=0),s.push(o)))}function a(i,e){if(t){let s=t.find((e=>e.label===i.label));s&&(e.orderIndex=s.orderIndex)}}e.columns=s,this.configFinish.emit(e),this._orderList.clearHistory()}createConfigFromState(i){let e={columns:[]};return i.forEach((i=>{if(!i.hidden){let t={name:i.name};i.width&&(t.width=i.width),i.sort?(t.ascending="ASC"===i.sort.toUpperCase(),t.orderIndex=i.sortIndex):t.orderIndex=0,t&&e.columns.push(t)}})),e}async locateColumn(i,e){var t;const s="Enter"===i.key;e||(e=null===(t=i.currentTarget)||void 0===t?void 0:t.value);let a=-1;if("Ordenação das linhas"===this.selectedTab)if(e){const i=[];let t,r;if(await this._orderList.getList().then((s=>{t=s,t.forEach(((t,s)=>{this.compareWords(t,e)&&i.push(s)}))})),i.length>0){if(s)for(let e=0;e<i.length;e++)if(i[e]>this._selectedIndex){a=i[e];break}-1===a&&(a=i[0])}this._selectedIndex=a,r=t[a],r?this._orderList.setSelection({label:r.label},!0):this._orderList.setSelection(void 0)}else this._orderList.setSelection(void 0);else if(e){const i=[];if(this.columns.forEach(((t,s)=>{this.compareWords(t,e)&&i.push(s)})),i.length>0){if(s)for(let e=0;e<i.length;e++)if(i[e]>this._selectedIndex){a=i[e];break}-1===a&&(a=i[0])}this._selectedIndex=a;let t=this.columns[a];t?this._columnList.setSelection({label:t.label},!0):this._columnList.setSelection(void 0)}else this._columnList.setSelection(void 0)}compareWords(i,e){return a.replaceAccentuatedChars(i.label).indexOf(a.replaceAccentuatedChars(e))>-1}closeConfig(){this._orderList.scrollToTop(),this._columnList.scrollToTop(),this._searchElement.value="",this._dataChanged?r.confirm("Aviso","As alterações realizadas serão descartadas. Gostaria de salvar antes de sair?",null,!1,{canClose:!1,labelCancel:"Descartar",labelConfirm:"Salvar",btnConfirmDanger:!1}).then((i=>{i?this.finish():(this._dataChanged=!1,this.configCancel.emit(),this._orderList.clearHistory(),this._componenteInternalKey=Date.now())})):(this.configCancel.emit(),this._orderList.clearHistory())}handleTabChange(i){var e;(null===(e=null==i?void 0:i.target)||void 0===e?void 0:e.selectedTab)&&(this.selectedTab!==i.target.selectedTab&&("Colunas"===i.target.selectedTab?this._orderList.scrollToTop():"Ordenação das linhas"===i.target.selectedTab&&this._columnList.scrollToTop(),this._searchElement.value=""),"Ordenação das linhas"===i.target.selectedTab&&this.createOrderList(),this.selectedTab=i.target.selectedTab)}handleColumnListChange(i){var e;if(i.detail){let t=null===(e=i.detail.find((i=>"Visíveis"===i.group)))||void 0===e?void 0:e.items;t&&(this._dataChanged=!0,this._orderListItems=t)}}handleOrderListChange(i){if(i.detail){let e=i.detail;e&&(this._dataChanged=!0,this._orderPriorityList=e)}}componentWillRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.createColumnList()}componentDidRender(){var i;(null===(i=this.columns)||void 0===i?void 0:i.length)>0&&this.locateColumn(new KeyboardEvent("arrow-right",{key:"ArrowRight"}),this._searchElement.value)}render(){return t(s,null,t("div",{class:"grid-config__header"},t("div",{class:"title-container"},t("div",{class:""},t("label",{class:"title"},"Configuração da Grade"),t("label",{class:"subtitle"},"Defina visibilidade e ordem das colunas.")),t("div",{class:"button-close"},t("ez-button",{mode:"icon",iconName:"close",size:"medium",onClick:()=>this.closeConfig()}))),t("div",{class:"tabselector-container"},t("ez-tabselector",{selectedTab:this.selectedTab,selectedIndex:0,onEzChange:i=>{this.handleTabChange(i)},tabs:"Colunas, Ordenação das linhas"})),t("div",null,t("ez-text-input",{ref:i=>this._searchElement=i,label:"Localizar coluna",onKeyUp:i=>this.locateColumn(i)},t("ez-icon",{slot:"leftIcon",size:"medium",iconName:"search"})))),t("div",{class:"grid-config__main"},t("ez-list",{ref:i=>this._columnList=i,class:"Colunas"===this.selectedTab?"":"hidden",dataSource:this._columListItems,onEzChange:i=>this.handleColumnListChange(i),ezDraggable:!0,ezSelectable:!0,itemSlotBuilder:(i,e)=>this.buildColumnListSlot(i,e),useGroups:!0}),t("div",{class:"Ordenação das linhas"===this.selectedTab?"group-name":"hidden"},"Sequência da ordenação"),t("ez-list",{ref:i=>this._orderList=i,class:"Ordenação das linhas"===this.selectedTab?"height-calc":"hidden",dataSource:this._orderListItems,ezSelectable:!0,onEzChange:i=>this.handleOrderListChange(i),ezDraggable:!0,itemSlotBuilder:i=>this.buildOrderListSlot(i)})),t("div",{class:"grid-config__footer"},t("ez-button",{class:"padding-right--medium",label:"Cancelar",onClick:()=>this.closeConfig()}),t("ez-button",{label:"Concluir",class:"ez-button--primary",onClick:()=>this.finish()})))}static get assetsDirs(){return["../assets"]}};o.style='.sc-ez-grid-config-h{--ez-grid-config__footer--padding-top:var(--space--medium, 12px);--ez-grid-config__main--padding-right:var(--space--medium, 12px);--ez-grid-config__tabselector-container--padding:var(--space--medium, 12px);--ez-grid-config__button-close--padding-left:var(--space--medium, 12px);--ez-grid-config__subtitle--font-family:var(--font-pattern, "Sora");--ez-grid-config__title--font-family:var(--font-pattern, "Sora");--ez-grid-config__title--font-weight:var(--text-weight--large, 700);--ez-grid-config__subtitle--font-size:var(--text--medium, 14px);--ez-grid-config__scrollbar--width:var(--space--medium, 12px);--ez-grid-config__scrollbar--background-color:var(--text--primary, #626e82);--ez-grid-config__scrollbar--border-radius:var(--border--radius-medium, 12px);--ez-grid-config__group--font-family:var(--font-pattern, "Sora");--ez-grid-config__group--font-size:var(--text--medium, 14px);--ez-grid-config__group--font-weight:var(--text-weight--large, 600);--ez-grid-config__group--padding-bottom:var(--space-small, 6px);display:grid;grid-template-rows:auto 1fr auto;max-height:100%;width:100%}@media screen and (min-width: 480px){.sc-ez-grid-config-h{width:359px;max-width:359px}}.padding-right--medium.sc-ez-grid-config{padding-right:var(--space--medium)}ez-list.sc-ez-grid-config{height:100%}.height-calc.sc-ez-grid-config{max-height:calc(100% - 24px)}.grid-config__footer.sc-ez-grid-config{display:flex;justify-content:flex-end;width:100%;padding-top:var(--ez-grid-config__footer--padding-top)}.hidden.sc-ez-grid-config{display:none}.grid-config__main.sc-ez-grid-config{overflow-y:auto;padding-right:var(--ez-grid-config__main--padding-right)}.tabselector-container.sc-ez-grid-config{padding:var(--ez-grid-config__tabselector-container--padding) 0}.button-close.sc-ez-grid-config{padding-left:var(--ez-grid-config__button-close--padding-left)}.title-container.sc-ez-grid-config{display:flex;justify-content:space-between;align-items:center;width:100%}.subtitle.sc-ez-grid-config{font-family:var(--ez-grid-config__subtitle--font-family);font-size:var(--ez-grid-config__subtitle--font-size);color:var(--text--primary)}.title.sc-ez-grid-config{display:flex;margin:0;line-height:normal;letter-spacing:0em;text-align:left;color:var(--title--primary);font-family:var(--ez-grid-config__title--font-family);font-size:var(--title--large);font-weight:var(--ez-grid-config__title--font-weight)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-track{background-color:#f0f2f5}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar-thumb{background-color:var(--ez-grid-config__scrollbar--background-color);border-radius:var(--ez-grid-config__scrollbar--border-radius)}.grid-config__main.sc-ez-grid-config::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-grid-config__scrollbar--width);max-width:var(--ez-grid-config__scrollbar--width);min-width:var(--ez-grid-config__scrollbar--width)}.group-name.sc-ez-grid-config{font-family:var(--ez-grid-config__group--font-family);font-size:var(--ez-grid-config__group--font-size);font-weight:var(--ez-grid-config__group--font-weight);padding-bottom:var(--ez-grid-config__group--padding-bottom)}';export{o as ez_grid_config}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as o,H as n}from"./p-139ed2f6.js";import{StringUtils as t}from"@sankhyalabs/core";let c=class{constructor(o){e(this,o),this.size="medium"}isSprite(){return this.href&&this.href.indexOf("#")>-1}getIconClassName(){return`ez-icon-${this.iconName}`}getIconContent(){return this.isSprite()?o("svg",{class:this.size,role:"img"},o("use",{xlinkHref:this.href})):t.isEmpty(this.iconName)?o("img",{class:this.size,src:this.href}):o("span",{class:`icon-content ${this.getIconClassName()} ${this.size}--font`})}render(){return o(n,null,this.getIconContent())}};c.style=':host{display:flex;overflow:hidden;position:relative;--ez-icon--color:var(--icon--color, #ffffff)}svg{display:flex;justify-content:center;align-items:center;fill:var(--ez-icon--color)}.x-small{width:12px;height:12px}.small{width:16px;height:16px}.medium{width:20px;height:20px}.large{width:24px;height:24px}.x-large{width:30px;height:30px}[class^="ez-icon-"],[class*=" ez-icon-"]{color:var(--ez-icon--color)}[class^="ez-icon-"],[class*=" ez-icon-"]{font-family:\'ez-icons\' !important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.ez-icon-2chevron-down:before{content:"\\ea01"}.ez-icon-2chevron-up:before{content:"\\ea02"}.ez-icon-account-outline:before{content:"\\ea03"}.ez-icon-account:before{content:"\\ea04"}.ez-icon-actions-sprite:before{content:"\\ea05"}.ez-icon-alert-circle-inverted:before{content:"\\ea06"}.ez-icon-alert-circle:before{content:"\\ea07"}.ez-icon-alert-mail:before{content:"\\ea08"}.ez-icon-alert-popup:before{content:"\\ea09"}.ez-icon-anexo:before{content:"\\ea0a"}.ez-icon-apps:before{content:"\\ea0b"}.ez-icon-arrow_back:before{content:"\\ea0c"}.ez-icon-arrow_downward:before{content:"\\ea0d"}.ez-icon-balance:before{content:"\\ea0e"}.ez-icon-bell-inverted:before{content:"\\ea0f"}.ez-icon-bell:before{content:"\\ea10"}.ez-icon-boleto:before{content:"\\ea11"}.ez-icon-business-center:before{content:"\\ea12"}.ez-icon-calendar-clock:before{content:"\\ea13"}.ez-icon-calendar:before{content:"\\ea14"}.ez-icon-cash-remove:before{content:"\\ea15"}.ez-icon-check-circle-inverted:before{content:"\\ea16"}.ez-icon-check-circle:before{content:"\\ea17"}.ez-icon-check:before{content:"\\ea18"}.ez-icon-chevron-down:before{content:"\\ea19"}.ez-icon-chevron-left:before{content:"\\ea1a"}.ez-icon-chevron-right:before{content:"\\ea1b"}.ez-icon-chevron-up:before{content:"\\ea1c"}.ez-icon-circle--medium:before{content:"\\ea1d"}.ez-icon-circle:before{content:"\\ea1e"}.ez-icon-cleaning:before{content:"\\ea1f"}.ez-icon-clipboard:before{content:"\\ea20"}.ez-icon-close:before{content:"\\ea21"}.ez-icon-cobrar:before{content:"\\ea22"}.ez-icon-configuration:before{content:"\\ea23"}.ez-icon-copy:before{content:"\\ea24"}.ez-icon-credit_card:before{content:"\\ea25"}.ez-icon-crop:before{content:"\\ea26"}.ez-icon-custom:before{content:"\\ea27"}.ez-icon-delete:before{content:"\\ea28"}.ez-icon-description:before{content:"\\ea29"}.ez-icon-dot-notification:before{content:"\\ea2a"}.ez-icon-dots-horizontal:before{content:"\\ea2b"}.ez-icon-dots-vertical:before{content:"\\ea2c"}.ez-icon-drag-indicator:before{content:"\\ea2d"}.ez-icon-dual-chevron-down:before{content:"\\ea2e"}.ez-icon-dual-chevron-up:before{content:"\\ea2f"}.ez-icon-edit-file:before{content:"\\ea30"}.ez-icon-edit-table:before{content:"\\ea31"}.ez-icon-edit-time:before{content:"\\ea32"}.ez-icon-edit:before{content:"\\ea33"}.ez-icon-email:before{content:"\\ea34"}.ez-icon-expand:before{content:"\\ea35"}.ez-icon-extrato:before{content:"\\ea36"}.ez-icon-eye-off:before{content:"\\ea37"}.ez-icon-eye:before{content:"\\ea38"}.ez-icon-favorite:before{content:"\\ea39"}.ez-icon-file-download:before{content:"\\ea3a"}.ez-icon-file-upload:before{content:"\\ea3b"}.ez-icon-filter:before{content:"\\ea3c"}.ez-icon-find-file:before{content:"\\ea3d"}.ez-icon-find-page:before{content:"\\ea3e"}.ez-icon-format-color-fill:before{content:"\\ea3f"}.ez-icon-graph_bar:before{content:"\\ea40"}.ez-icon-handshake:before{content:"\\ea41"}.ez-icon-help-inverted:before{content:"\\ea42"}.ez-icon-help:before{content:"\\ea43"}.ez-icon-home:before{content:"\\ea44"}.ez-icon-icons104:before{content:"\\ea45"}.ez-icon-language:before{content:"\\ea46"}.ez-icon-launch:before{content:"\\ea47"}.ez-icon-lightbulb:before{content:"\\ea48"}.ez-icon-list:before{content:"\\ea49"}.ez-icon-location:before{content:"\\ea4a"}.ez-icon-lock-outline:before{content:"\\ea4b"}.ez-icon-lock:before{content:"\\ea4c"}.ez-icon-menu:before{content:"\\ea4d"}.ez-icon-mid:before{content:"\\ea4e"}.ez-icon-minus:before{content:"\\ea4f"}.ez-icon-money-off:before{content:"\\ea50"}.ez-icon-money:before{content:"\\ea51"}.ez-icon-more:before{content:"\\ea52"}.ez-icon-north-west:before{content:"\\ea53"}.ez-icon-number:before{content:"\\ea54"}.ez-icon-ordem-ascendente:before{content:"\\ea55"}.ez-icon-ordem-descendente:before{content:"\\ea56"}.ez-icon-parcelar:before{content:"\\ea57"}.ez-icon-pause:before{content:"\\ea58"}.ez-icon-payments:before{content:"\\ea59"}.ez-icon-play:before{content:"\\ea5a"}.ez-icon-plus:before{content:"\\ea5b"}.ez-icon-power:before{content:"\\ea5c"}.ez-icon-print:before{content:"\\ea5d"}.ez-icon-push-pin:before{content:"\\ea5e"}.ez-icon-receipt:before{content:"\\ea5f"}.ez-icon-restore:before{content:"\\ea60"}.ez-icon-return:before{content:"\\ea61"}.ez-icon-save:before{content:"\\ea62"}.ez-icon-search:before{content:"\\ea63"}.ez-icon-settings-inverted:before{content:"\\ea64"}.ez-icon-settings:before{content:"\\ea65"}.ez-icon-share:before{content:"\\ea66"}.ez-icon-shield:before{content:"\\ea67"}.ez-icon-south-east:before{content:"\\ea68"}.ez-icon-sync:before{content:"\\ea69"}.ez-icon-table:before{content:"\\ea6a"}.ez-icon-text:before{content:"\\ea6b"}.ez-icon-timeline:before{content:"\\ea6c"}.ez-icon-timer-outline:before{content:"\\ea6d"}.ez-icon-tune:before{content:"\\ea6e"}.ez-icon-un-pin:before{content:"\\ea6f"}.ez-icon-unfold_less:before{content:"\\ea70"}.ez-icon-unfold_more:before{content:"\\ea71"}.ez-icon-user-circle:before{content:"\\ea72"}.ez-icon-warning-outline:before{content:"\\ea73"}.ez-icon-warning_triangle:before{content:"\\ea74"}.ez-icon-whatshot:before{content:"\\ea75"}.x-small--font{font-size:12px}.small--font{font-size:16px}.medium--font{font-size:20px}.large--font{font-size:24px}.x-large--font{font-size:30px}';export{c as ez_icon}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,c as i,h as t,H as s,g as e}from"./p-139ed2f6.js";import{FloatingManager as r}from"@sankhyalabs/core";import{A as a}from"./p-0cd386db.js";import{C as l}from"./p-933a7475.js";let n=class{constructor(t){o(this,t),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._startLoading=!1,this._showLoading=!0,this.enabled=!0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.suppressEmptyOption=!1,this.canShowError=!0,this.mode="regular"}observeErrorMessage(){var o;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(o=this.errorMessage)||void 0===o?void 0:o.trim())||this.setInputValue())}observeValue(o,i){var t,s,e,r;if(this._textInput&&o!=i){const a=this.getSelectedOption(o),l=this.getSelectedOption(i),n=this.getSelectedOption(this.value);(null===(t=null==n?void 0:n.value)||void 0===t?void 0:t.toString())!=(null===(s=null==a?void 0:a.value)||void 0===s?void 0:s.toString())&&(this.value=a),(null===(e=null==a?void 0:a.value)||void 0===e?void 0:e.toString())!==(null===(r=null==l?void 0:l.value)||void 0===r?void 0:r.toString())&&(this.setInputValue(),this.ezChange.emit(null===a?void 0:a)),this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}getText(){let o="";const i=this.getSelectedOption(this.value);return i&&(o=this.showSelectedValue?`${i.value} - ${i.label}`:i.label),o}getSelectedOption(o){return"string"==typeof o||o instanceof String?this._visibleOptions.find((i=>i.value===o)):o}updateVisibleOptions(){let o=this._source||[];if(!this.searchMode&&this._criteria){const i=this._criteria.toUpperCase();o=o.filter((o=>o.label.toLocaleUpperCase().indexOf(i)>-1))}this._visibleOptions=this.suppressEmptyOption?o:[{value:void 0,label:""}].concat(o),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var o;if(this.showOptionValue){const i=[];return null===(o=this._visibleOptions)||void 0===o||o.forEach((o=>{const t=this.getWidthValue(o.value);i.includes(t)||i.push(t)})),i.length>1?Math.max(...i):0}return 0}getWidthValue(o){if(this._itemValueBasis){const i=this._itemValueBasis;if(o)return i.innerHTML=o,i.clientWidth>0?i.clientWidth+1:0;i.innerHTML=""}return 0}buildItem(o,i){return t("li",{class:i===this._preSelection?"item preselected":"item",id:`item_${o.value}`,onMouseDown:()=>this.selectOption(o),onMouseOver:()=>this._preSelection=void 0},this.showOptionValue?t("span",{class:"item__value",title:o.value,style:{width:this.showOptionValue&&this._maxWidthValue>0?`${this._maxWidthValue}px`:""}},o.value):void 0,t("span",{class:"item__label",title:o.label},o.label))}showOptions(){this.enabled&&(this._floatingID=r.float(this._listWrapper,this._listContainer,{autoClose:!0,top:this.errorMessage||!this.canShowError||"slim"===this.mode?"0px":"-19px"}),window.requestAnimationFrame((()=>{this._listWrapper.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}hideOptions(){void 0!==this._floatingID&&r.close(this._floatingID),this._floatingID=void 0}isOptionsVisible(){return void 0!==this._floatingID&&r.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection],!0))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection],!1)}scrollToOption(o,i){window.requestAnimationFrame((()=>{const t=this._optionsList.querySelector(`li#item_${o.value}`);if(t){const o=t.parentElement,s=o.getBoundingClientRect(),e=t.getBoundingClientRect();i&&e.bottom>s.bottom?o.scrollTop=e.top:!i&&e.top<s.top&&(o.scrollTop=0)}}))}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(o){this._startLoading=!1,o instanceof Promise?(this._showLoading=!0,o.then((o=>{this._showLoading=!1,this.updateSource(o)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(o)?(this._source=o,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch())):this.selectOption(o))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(o){var i,t;const s=this.getSelectedOption(this.value);(null===(i=null==s?void 0:s.value)||void 0===i?void 0:i.toString())!==(null===(t=null==o?void 0:o.value)||void 0===t?void 0:t.toString())?this.value=(null==o?void 0:o.value)?o:void 0:this.setInputValue(),this.searchMode&&(this._visibleOptions=[])}loadOptions(o,i=""){this._criteria=i,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:o,argument:i}):this.options)}cancelPreselection(){!this._textInput.value&&this.value?this.selectOption(void 0):this.setInputValue()}setInputValue(o=!0){const i=this.getText();(this._textInput.value||"")!==i&&(this._textInput.value=i,o&&(this.errorMessage=""))}clearSearch(){this.value=null}controlListWithOnlyOne(){if(this.searchMode){const o=this._visibleOptions;1===(null==o?void 0:o.length)&&this.selectOption(o[0])}}controlEmptySearch(){var o;this.searchMode&&((null===(o=this._visibleOptions)||void 0===o?void 0:o.length)?this.controlListWithOnlyOne():(this.clearSearch(),a.info(this._textEmptyList)))}componentWillLoad(){if(void 0===this.options){this.options=[];const o=this.el.querySelectorAll("option");o&&o.forEach((o=>{let i=o.innerText,t=o.getAttribute("value");t||(t=i),this.options.push({label:i,value:t}),o.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions("PRELOAD")}componentDidRender(){void 0===this._floatingID&&this._listWrapper.remove()}componentDidLoad(){l.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1)}handlerIconClick(){this.searchMode?this.loadOptions("ADVANCED"):this.showOptions()}onTextInputChangeHandler(o){var i;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(o)}),this._deboucingTime));const t=null===(i=o.target.value)||void 0===i?void 0:i.trim(),s=Number(t||void 0);this._criteria||(this._textInput.value=o.data||t),this._criteria=t,t&&(!isNaN(s)||t.length>=this._limitCharsToSearch)?(this.searchMode?(this._showLoading=!0,this.clearSource(),this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions("PREDICTIVE",isNaN(s)?t:s.toString())}),this._deboucingTime)):this.updateVisibleOptions(),this.showOptions()):this.hideOptions()}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=void 0)}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(o){switch(this._tabPressed=!1,o.key){case"ArrowDown":this.nextOption();break;case"ArrowUp":this.previousOption();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne()}o.stopPropagation()}onTextInputFocusOutHandler(){this.cancelPreselection()}render(){var o;return t(s,null,t("ez-text-input",{class:this.suppressSearch?"suppressed-search-input":"",ref:o=>this._textInput=o,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:o=>this.onTextInputChangeHandler(o),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:o=>this.keyDownHandler(o),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},t("button",{class:"btn",slot:this.searchMode?"leftIcon":"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},t("ez-icon",{iconName:this.searchMode?"search":"chevron-down"})),this.searchMode&&(null===(o=this._textInput)||void 0===o?void 0:o.value)&&(this._criteria||this.value)?t("button",{class:"btn",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},t("ez-icon",{iconName:"close"})):void 0),t("section",{class:"list-container",ref:o=>this._listContainer=o},t("div",{class:"list-wrapper",ref:o=>this._listWrapper=o},t("div",{class:"list-options",ref:o=>this._optionsList=o},0===this._visibleOptions.length&&t("div",{class:"message"},!this._showLoading&&t("span",{class:"message__no-result"},this._textEmptyList),this._showLoading&&t("div",{class:"message__loading"})),this.showOptionValue?t("span",{class:"item__value item__value--hidden",ref:o=>this._itemValueBasis=o}):void 0,this._visibleOptions.length>0&&this._visibleOptions.map(((o,i)=>this.buildItem(o,i)))))))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"]}}};n.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium));--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__list-scrollbar--background-color-primary:var(--scrollbar--primary, #2B3A54);--ez-combo-box__list-scrollbar--background-color-secondary:var(--scrollbar--secondary, #E5EAF0);--ez-combo-box__list-scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__list-scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--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)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:100%;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small));background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;scrollbar-color:var(--ez-combo-box__list-scrollbar--background-color-primary) var(--ez-combo-box__list-scrollbar--background-color-secondary)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__list-scrollbar--background-color-primary);border-radius:var(--ez-combo-box__list-scrollbar--border-radius)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__list-scrollbar--background-color-secondary);width:var(--ez-combo-box__list-scrollbar--width);max-width:var(--ez-combo-box__list-scrollbar--width);min-width:var(--ez-combo-box__list-scrollbar--width)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:0 var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-weight:var(--ez-combo-box--font-weight--large);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary)}.item__value--hidden{visibility:hidden;position:absolute;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:calc(var(--ez-combo-box__list-height) * 1.5)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:16px;height:16px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{n as ez_combo_box}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as o}from"./p-139ed2f6.js";let s=class{constructor(o){e(this,o),this.ezChange=t(this,"ezChange",7),this.selectedOption={value:"na",label:"N/A"}}render(){return o("ez-combo-box",{class:"grid-config-combo ez-input--inverted",label:"",suppressSearch:!0,value:this.selectedOption,enabled:!0,canShowError:!1,suppressEmptyOption:!0},o("option",{value:"na"},"N/A"),o("option",{value:"asc"},"A-Z"),o("option",{value:"desc"},"Z-A"))}static get assetsDirs(){return["../assets"]}};s.style="ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";export{s as
|
|
1
|
+
import{r as e,c as t,h as o}from"./p-139ed2f6.js";let s=class{constructor(o){e(this,o),this.ezChange=t(this,"ezChange",7),this.selectedOption={value:"na",label:"N/A"}}render(){return o("ez-combo-box",{class:"grid-config-combo ez-input--inverted",label:"",suppressSearch:!0,value:this.selectedOption,enabled:!0,canShowError:!1,suppressEmptyOption:!0},o("option",{value:"na"},"N/A"),o("option",{value:"asc"},"A-Z"),o("option",{value:"desc"},"Z-A"))}static get assetsDirs(){return["../assets"]}};s.style="ez-combo-box{width:100px}.grid-config-combo{--ez-text-input--height:28px;--ez-text-input__input--background-color:#fff;--ez-text-input__input--border-color:#dce0e8}";export{s as ez_select_box}
|
|
@@ -26,6 +26,7 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
26
26
|
constructor(enterprise: boolean);
|
|
27
27
|
getSort(): Array<Sort>;
|
|
28
28
|
initDatagrid(container: HTMLElement, options: EzGridOptions): void;
|
|
29
|
+
private getRowHeight;
|
|
29
30
|
private setOptionsEvents;
|
|
30
31
|
private syncSelection;
|
|
31
32
|
private setOptionsPagination;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import EzGridController, { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent,
|
|
2
|
+
import EzGridController, { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent, IGridConfig, EzGridSelectionStatus } from "./controller/EzGridController";
|
|
3
3
|
import { DataUnit } from "@sankhyalabs/core";
|
|
4
4
|
import DataUnitBridge from "./controller/DataUnitBridge";
|
|
5
5
|
import { PageableComponent } from "../../utils/interfaces/PageableComponent";
|
|
6
6
|
export declare class EzGrid implements PageableComponent {
|
|
7
|
-
_gridConfig:
|
|
7
|
+
_gridConfig: HTMLEzGridConfigElement;
|
|
8
8
|
_container: HTMLElement;
|
|
9
9
|
_gridController: EzGridController;
|
|
10
10
|
_dataUnitBridge: DataUnitBridge;
|
|
@@ -30,7 +30,7 @@ export declare class EzGrid implements PageableComponent {
|
|
|
30
30
|
/**
|
|
31
31
|
* Evento disparado ao realizar alguma modificação na configuração da grid.
|
|
32
32
|
*/
|
|
33
|
-
configChange: EventEmitter<
|
|
33
|
+
configChange: EventEmitter<IGridConfig>;
|
|
34
34
|
/**
|
|
35
35
|
* Habilita a seleção de várias linhas
|
|
36
36
|
*/
|
|
@@ -38,7 +38,7 @@ export declare class EzGrid implements PageableComponent {
|
|
|
38
38
|
/**
|
|
39
39
|
* Configuração de exibição da grade.
|
|
40
40
|
*/
|
|
41
|
-
config:
|
|
41
|
+
config: IGridConfig;
|
|
42
42
|
/**
|
|
43
43
|
* Determina o número de linhas de cada página. Caso informado o valor -1
|
|
44
44
|
* não haverá paginação.
|
|
@@ -140,7 +140,7 @@ export declare class EzGrid implements PageableComponent {
|
|
|
140
140
|
componentDidLoad(): void;
|
|
141
141
|
disconnectedCallback(): void;
|
|
142
142
|
getPaginationControl(): Array<HTMLElement>;
|
|
143
|
-
observeConfig(config:
|
|
143
|
+
observeConfig(config: IGridConfig): void;
|
|
144
144
|
closeGridConfig(): void;
|
|
145
145
|
render(): any;
|
|
146
146
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from '../../../../stencil-public-runtime';
|
|
2
|
-
import {
|
|
3
|
-
export declare class
|
|
2
|
+
import { IGridConfig, EzGridColumn } from '../../controller/EzGridController';
|
|
3
|
+
export declare class EzGridConfig {
|
|
4
4
|
private _columnList;
|
|
5
5
|
private _orderList;
|
|
6
6
|
private _searchElement;
|
|
@@ -12,8 +12,8 @@ export declare class GridConfig {
|
|
|
12
12
|
private _componenteInternalKey;
|
|
13
13
|
selectedTab: string;
|
|
14
14
|
columns: Array<EzGridColumn>;
|
|
15
|
-
config:
|
|
16
|
-
configFinish: EventEmitter<
|
|
15
|
+
config: IGridConfig;
|
|
16
|
+
configFinish: EventEmitter<IGridConfig>;
|
|
17
17
|
configCancel: EventEmitter<void>;
|
|
18
18
|
private createOrderList;
|
|
19
19
|
private createColumnList;
|
|
File without changes
|
|
@@ -9,7 +9,7 @@ import { CardItem } from "./components/ez-card-item/ez-card-item";
|
|
|
9
9
|
import { Option } from "./components/ez-combo-box/ez-combo-box";
|
|
10
10
|
import { DataUnit, Record, WaitingChange } from "@sankhyalabs/core";
|
|
11
11
|
import { FieldConfig } from "./components/ez-form/ez-form";
|
|
12
|
-
import { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent,
|
|
12
|
+
import { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent, EzGridSelectionStatus, IGridConfig } from "./components/ez-grid/controller/EzGridController";
|
|
13
13
|
import { ListGroup, ListItem } from "./components/ez-list/ez-list";
|
|
14
14
|
import { Option as Option1 } from "./components/ez-combo-box/ez-combo-box";
|
|
15
15
|
import { Tab } from "./components/ez-tabselector/ez-tabselector";
|
|
@@ -395,7 +395,7 @@ export namespace Components {
|
|
|
395
395
|
/**
|
|
396
396
|
* Configuração de exibição da grade.
|
|
397
397
|
*/
|
|
398
|
-
"config":
|
|
398
|
+
"config": IGridConfig;
|
|
399
399
|
"dataUnit": DataUnit;
|
|
400
400
|
/**
|
|
401
401
|
* Método retornar o estado atual das colunas do grid.
|
|
@@ -486,6 +486,11 @@ export namespace Components {
|
|
|
486
486
|
*/
|
|
487
487
|
"setData": (data: Array<any>) => Promise<any>;
|
|
488
488
|
}
|
|
489
|
+
interface EzGridConfig {
|
|
490
|
+
"columns": Array<EzGridColumn>;
|
|
491
|
+
"config": IGridConfig;
|
|
492
|
+
"selectedTab": string;
|
|
493
|
+
}
|
|
489
494
|
interface EzIcon {
|
|
490
495
|
/**
|
|
491
496
|
* Path da imagem
|
|
@@ -724,6 +729,9 @@ export namespace Components {
|
|
|
724
729
|
*/
|
|
725
730
|
"value": Option | string;
|
|
726
731
|
}
|
|
732
|
+
interface EzSelectBox {
|
|
733
|
+
"selectedOption": Option | string;
|
|
734
|
+
}
|
|
727
735
|
interface EzTabselector {
|
|
728
736
|
/**
|
|
729
737
|
* Define o index da aba selecionada.
|
|
@@ -950,14 +958,6 @@ export namespace Components {
|
|
|
950
958
|
*/
|
|
951
959
|
"show": (index: number) => Promise<void>;
|
|
952
960
|
}
|
|
953
|
-
interface GridConfig {
|
|
954
|
-
"columns": Array<EzGridColumn>;
|
|
955
|
-
"config": EzGridConfig;
|
|
956
|
-
"selectedTab": string;
|
|
957
|
-
}
|
|
958
|
-
interface SelectBox {
|
|
959
|
-
"selectedOption": Option | string;
|
|
960
|
-
}
|
|
961
961
|
interface TestDu {
|
|
962
962
|
}
|
|
963
963
|
}
|
|
@@ -1046,6 +1046,12 @@ declare global {
|
|
|
1046
1046
|
prototype: HTMLEzGridElement;
|
|
1047
1047
|
new (): HTMLEzGridElement;
|
|
1048
1048
|
};
|
|
1049
|
+
interface HTMLEzGridConfigElement extends Components.EzGridConfig, HTMLStencilElement {
|
|
1050
|
+
}
|
|
1051
|
+
var HTMLEzGridConfigElement: {
|
|
1052
|
+
prototype: HTMLEzGridConfigElement;
|
|
1053
|
+
new (): HTMLEzGridConfigElement;
|
|
1054
|
+
};
|
|
1049
1055
|
interface HTMLEzIconElement extends Components.EzIcon, HTMLStencilElement {
|
|
1050
1056
|
}
|
|
1051
1057
|
var HTMLEzIconElement: {
|
|
@@ -1094,6 +1100,12 @@ declare global {
|
|
|
1094
1100
|
prototype: HTMLEzSearchElement;
|
|
1095
1101
|
new (): HTMLEzSearchElement;
|
|
1096
1102
|
};
|
|
1103
|
+
interface HTMLEzSelectBoxElement extends Components.EzSelectBox, HTMLStencilElement {
|
|
1104
|
+
}
|
|
1105
|
+
var HTMLEzSelectBoxElement: {
|
|
1106
|
+
prototype: HTMLEzSelectBoxElement;
|
|
1107
|
+
new (): HTMLEzSelectBoxElement;
|
|
1108
|
+
};
|
|
1097
1109
|
interface HTMLEzTabselectorElement extends Components.EzTabselector, HTMLStencilElement {
|
|
1098
1110
|
}
|
|
1099
1111
|
var HTMLEzTabselectorElement: {
|
|
@@ -1136,18 +1148,6 @@ declare global {
|
|
|
1136
1148
|
prototype: HTMLEzViewStackElement;
|
|
1137
1149
|
new (): HTMLEzViewStackElement;
|
|
1138
1150
|
};
|
|
1139
|
-
interface HTMLGridConfigElement extends Components.GridConfig, HTMLStencilElement {
|
|
1140
|
-
}
|
|
1141
|
-
var HTMLGridConfigElement: {
|
|
1142
|
-
prototype: HTMLGridConfigElement;
|
|
1143
|
-
new (): HTMLGridConfigElement;
|
|
1144
|
-
};
|
|
1145
|
-
interface HTMLSelectBoxElement extends Components.SelectBox, HTMLStencilElement {
|
|
1146
|
-
}
|
|
1147
|
-
var HTMLSelectBoxElement: {
|
|
1148
|
-
prototype: HTMLSelectBoxElement;
|
|
1149
|
-
new (): HTMLSelectBoxElement;
|
|
1150
|
-
};
|
|
1151
1151
|
interface HTMLTestDuElement extends Components.TestDu, HTMLStencilElement {
|
|
1152
1152
|
}
|
|
1153
1153
|
var HTMLTestDuElement: {
|
|
@@ -1169,6 +1169,7 @@ declare global {
|
|
|
1169
1169
|
"ez-filter-input": HTMLEzFilterInputElement;
|
|
1170
1170
|
"ez-form": HTMLEzFormElement;
|
|
1171
1171
|
"ez-grid": HTMLEzGridElement;
|
|
1172
|
+
"ez-grid-config": HTMLEzGridConfigElement;
|
|
1172
1173
|
"ez-icon": HTMLEzIconElement;
|
|
1173
1174
|
"ez-list": HTMLEzListElement;
|
|
1174
1175
|
"ez-loading-bar": HTMLEzLoadingBarElement;
|
|
@@ -1177,6 +1178,7 @@ declare global {
|
|
|
1177
1178
|
"ez-popover": HTMLEzPopoverElement;
|
|
1178
1179
|
"ez-popup": HTMLEzPopupElement;
|
|
1179
1180
|
"ez-search": HTMLEzSearchElement;
|
|
1181
|
+
"ez-select-box": HTMLEzSelectBoxElement;
|
|
1180
1182
|
"ez-tabselector": HTMLEzTabselectorElement;
|
|
1181
1183
|
"ez-text-area": HTMLEzTextAreaElement;
|
|
1182
1184
|
"ez-text-input": HTMLEzTextInputElement;
|
|
@@ -1184,8 +1186,6 @@ declare global {
|
|
|
1184
1186
|
"ez-toast": HTMLEzToastElement;
|
|
1185
1187
|
"ez-upload": HTMLEzUploadElement;
|
|
1186
1188
|
"ez-view-stack": HTMLEzViewStackElement;
|
|
1187
|
-
"grid-config": HTMLGridConfigElement;
|
|
1188
|
-
"select-box": HTMLSelectBoxElement;
|
|
1189
1189
|
"test-du": HTMLTestDuElement;
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
@@ -1540,7 +1540,7 @@ declare namespace LocalJSX {
|
|
|
1540
1540
|
/**
|
|
1541
1541
|
* Configuração de exibição da grade.
|
|
1542
1542
|
*/
|
|
1543
|
-
"config"?:
|
|
1543
|
+
"config"?: IGridConfig;
|
|
1544
1544
|
"dataUnit"?: DataUnit;
|
|
1545
1545
|
/**
|
|
1546
1546
|
* Habilita a seleção de várias linhas
|
|
@@ -1549,7 +1549,7 @@ declare namespace LocalJSX {
|
|
|
1549
1549
|
/**
|
|
1550
1550
|
* Evento disparado ao realizar alguma modificação na configuração da grid.
|
|
1551
1551
|
*/
|
|
1552
|
-
"onConfigChange"?: (event: CustomEvent<
|
|
1552
|
+
"onConfigChange"?: (event: CustomEvent<IGridConfig>) => void;
|
|
1553
1553
|
/**
|
|
1554
1554
|
* Evento disparado ao mudar o estado das colunas do grid. Ordenação, largura, etc.
|
|
1555
1555
|
*/
|
|
@@ -1571,6 +1571,13 @@ declare namespace LocalJSX {
|
|
|
1571
1571
|
*/
|
|
1572
1572
|
"serverUrl"?: string;
|
|
1573
1573
|
}
|
|
1574
|
+
interface EzGridConfig {
|
|
1575
|
+
"columns"?: Array<EzGridColumn>;
|
|
1576
|
+
"config"?: IGridConfig;
|
|
1577
|
+
"onConfigCancel"?: (event: CustomEvent<void>) => void;
|
|
1578
|
+
"onConfigFinish"?: (event: CustomEvent<IGridConfig>) => void;
|
|
1579
|
+
"selectedTab"?: string;
|
|
1580
|
+
}
|
|
1574
1581
|
interface EzIcon {
|
|
1575
1582
|
/**
|
|
1576
1583
|
* Path da imagem
|
|
@@ -1791,6 +1798,10 @@ declare namespace LocalJSX {
|
|
|
1791
1798
|
*/
|
|
1792
1799
|
"value"?: Option | string;
|
|
1793
1800
|
}
|
|
1801
|
+
interface EzSelectBox {
|
|
1802
|
+
"onEzChange"?: (event: CustomEvent<string>) => void;
|
|
1803
|
+
"selectedOption"?: Option | string;
|
|
1804
|
+
}
|
|
1794
1805
|
interface EzTabselector {
|
|
1795
1806
|
/**
|
|
1796
1807
|
* Evento emitido ao clicar para abrir o popup (ezChange). O detail desse evento carrega tanto o tabKey quanto o index da aba selecionada.
|
|
@@ -1993,17 +2004,6 @@ declare namespace LocalJSX {
|
|
|
1993
2004
|
}
|
|
1994
2005
|
interface EzViewStack {
|
|
1995
2006
|
}
|
|
1996
|
-
interface GridConfig {
|
|
1997
|
-
"columns"?: Array<EzGridColumn>;
|
|
1998
|
-
"config"?: EzGridConfig;
|
|
1999
|
-
"onConfigCancel"?: (event: CustomEvent<void>) => void;
|
|
2000
|
-
"onConfigFinish"?: (event: CustomEvent<EzGridConfig>) => void;
|
|
2001
|
-
"selectedTab"?: string;
|
|
2002
|
-
}
|
|
2003
|
-
interface SelectBox {
|
|
2004
|
-
"onEzChange"?: (event: CustomEvent<string>) => void;
|
|
2005
|
-
"selectedOption"?: Option | string;
|
|
2006
|
-
}
|
|
2007
2007
|
interface TestDu {
|
|
2008
2008
|
}
|
|
2009
2009
|
interface IntrinsicElements {
|
|
@@ -2021,6 +2021,7 @@ declare namespace LocalJSX {
|
|
|
2021
2021
|
"ez-filter-input": EzFilterInput;
|
|
2022
2022
|
"ez-form": EzForm;
|
|
2023
2023
|
"ez-grid": EzGrid;
|
|
2024
|
+
"ez-grid-config": EzGridConfig;
|
|
2024
2025
|
"ez-icon": EzIcon;
|
|
2025
2026
|
"ez-list": EzList;
|
|
2026
2027
|
"ez-loading-bar": EzLoadingBar;
|
|
@@ -2029,6 +2030,7 @@ declare namespace LocalJSX {
|
|
|
2029
2030
|
"ez-popover": EzPopover;
|
|
2030
2031
|
"ez-popup": EzPopup;
|
|
2031
2032
|
"ez-search": EzSearch;
|
|
2033
|
+
"ez-select-box": EzSelectBox;
|
|
2032
2034
|
"ez-tabselector": EzTabselector;
|
|
2033
2035
|
"ez-text-area": EzTextArea;
|
|
2034
2036
|
"ez-text-input": EzTextInput;
|
|
@@ -2036,8 +2038,6 @@ declare namespace LocalJSX {
|
|
|
2036
2038
|
"ez-toast": EzToast;
|
|
2037
2039
|
"ez-upload": EzUpload;
|
|
2038
2040
|
"ez-view-stack": EzViewStack;
|
|
2039
|
-
"grid-config": GridConfig;
|
|
2040
|
-
"select-box": SelectBox;
|
|
2041
2041
|
"test-du": TestDu;
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
@@ -2059,6 +2059,7 @@ declare module "@stencil/core" {
|
|
|
2059
2059
|
"ez-filter-input": LocalJSX.EzFilterInput & JSXBase.HTMLAttributes<HTMLEzFilterInputElement>;
|
|
2060
2060
|
"ez-form": LocalJSX.EzForm & JSXBase.HTMLAttributes<HTMLEzFormElement>;
|
|
2061
2061
|
"ez-grid": LocalJSX.EzGrid & JSXBase.HTMLAttributes<HTMLEzGridElement>;
|
|
2062
|
+
"ez-grid-config": LocalJSX.EzGridConfig & JSXBase.HTMLAttributes<HTMLEzGridConfigElement>;
|
|
2062
2063
|
"ez-icon": LocalJSX.EzIcon & JSXBase.HTMLAttributes<HTMLEzIconElement>;
|
|
2063
2064
|
"ez-list": LocalJSX.EzList & JSXBase.HTMLAttributes<HTMLEzListElement>;
|
|
2064
2065
|
"ez-loading-bar": LocalJSX.EzLoadingBar & JSXBase.HTMLAttributes<HTMLEzLoadingBarElement>;
|
|
@@ -2067,6 +2068,7 @@ declare module "@stencil/core" {
|
|
|
2067
2068
|
"ez-popover": LocalJSX.EzPopover & JSXBase.HTMLAttributes<HTMLEzPopoverElement>;
|
|
2068
2069
|
"ez-popup": LocalJSX.EzPopup & JSXBase.HTMLAttributes<HTMLEzPopupElement>;
|
|
2069
2070
|
"ez-search": LocalJSX.EzSearch & JSXBase.HTMLAttributes<HTMLEzSearchElement>;
|
|
2071
|
+
"ez-select-box": LocalJSX.EzSelectBox & JSXBase.HTMLAttributes<HTMLEzSelectBoxElement>;
|
|
2070
2072
|
"ez-tabselector": LocalJSX.EzTabselector & JSXBase.HTMLAttributes<HTMLEzTabselectorElement>;
|
|
2071
2073
|
"ez-text-area": LocalJSX.EzTextArea & JSXBase.HTMLAttributes<HTMLEzTextAreaElement>;
|
|
2072
2074
|
"ez-text-input": LocalJSX.EzTextInput & JSXBase.HTMLAttributes<HTMLEzTextInputElement>;
|
|
@@ -2074,8 +2076,6 @@ declare module "@stencil/core" {
|
|
|
2074
2076
|
"ez-toast": LocalJSX.EzToast & JSXBase.HTMLAttributes<HTMLEzToastElement>;
|
|
2075
2077
|
"ez-upload": LocalJSX.EzUpload & JSXBase.HTMLAttributes<HTMLEzUploadElement>;
|
|
2076
2078
|
"ez-view-stack": LocalJSX.EzViewStack & JSXBase.HTMLAttributes<HTMLEzViewStackElement>;
|
|
2077
|
-
"grid-config": LocalJSX.GridConfig & JSXBase.HTMLAttributes<HTMLGridConfigElement>;
|
|
2078
|
-
"select-box": LocalJSX.SelectBox & JSXBase.HTMLAttributes<HTMLSelectBoxElement>;
|
|
2079
2079
|
"test-du": LocalJSX.TestDu & JSXBase.HTMLAttributes<HTMLTestDuElement>;
|
|
2080
2080
|
}
|
|
2081
2081
|
}
|