@sankhyalabs/ezui 4.17.0 → 4.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-grid.cjs.entry.js +85 -21
- package/dist/cjs/ez-popover.cjs.entry.js +4 -6
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +72 -12
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +11 -7
- package/dist/collection/components/ez-grid/ez-grid.js +10 -4
- package/dist/collection/components/ez-popover/ez-popover.js +4 -6
- package/dist/custom-elements/index.js +89 -27
- package/dist/esm/ez-grid.entry.js +85 -21
- package/dist/esm/ez-popover.entry.js +4 -6
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-6ede8b63.entry.js +1 -0
- package/dist/ezui/{p-37b4aa8b.entry.js → p-9334e296.entry.js} +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +1 -1
- package/dist/types/components.d.ts +3 -3
- package/package.json +1 -1
- package/dist/ezui/p-62ebbd06.entry.js +0 -1
|
@@ -207,6 +207,10 @@ export interface EzGridColumnMenuItemDef {
|
|
|
207
207
|
* Ação executada quando o usuário aciona o menu.
|
|
208
208
|
*/
|
|
209
209
|
action: Function;
|
|
210
|
+
/**
|
|
211
|
+
* Ícone que deve ser exibido ao junto ao ítem de menu.
|
|
212
|
+
*/
|
|
213
|
+
icon?: HTMLElement | string;
|
|
210
214
|
}
|
|
211
215
|
/**
|
|
212
216
|
* Evento de alteração de estado. Sempre que o estado das colunas for alterado, esse evento é disparado.
|
|
@@ -29,6 +29,10 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
29
29
|
getGridConfig(): Array<EzGridColumnConfig>;
|
|
30
30
|
getSort(): Array<Sort>;
|
|
31
31
|
initDatagrid(container: HTMLElement, options: EzGridOptions): void;
|
|
32
|
+
private buildMenuItemOptions;
|
|
33
|
+
private buildMenuItemOptionSort;
|
|
34
|
+
private buildMenuItemOptionPin;
|
|
35
|
+
private sortDataByColumn;
|
|
32
36
|
private getRowHeight;
|
|
33
37
|
private getHeaderRowHeight;
|
|
34
38
|
private navigateToNextCell;
|
|
@@ -19,7 +19,7 @@ export declare class EzGridCustomHeader {
|
|
|
19
19
|
init(agParams: IEzGridCustomHeaderParams & IHeaderParams): void;
|
|
20
20
|
refresh(agParams: IEzGridCustomHeaderParams & IHeaderParams): void;
|
|
21
21
|
configFilterButton(): void;
|
|
22
|
-
|
|
22
|
+
configSortIcon(): void;
|
|
23
23
|
configSortListener(): void;
|
|
24
24
|
onSortClick(event: any): void;
|
|
25
25
|
configSortClick(): void;
|
|
@@ -63,7 +63,7 @@ export declare class EzGrid {
|
|
|
63
63
|
/**
|
|
64
64
|
* Adiciona item de menu nas colunas.
|
|
65
65
|
*/
|
|
66
|
-
addColumnMenuItem(label: string, name: string, action: Function): Promise<void>;
|
|
66
|
+
addColumnMenuItem(label: string, name: string, action: Function, icon: HTMLElement | string): Promise<void>;
|
|
67
67
|
/**
|
|
68
68
|
* Aplica o estado das colunas.
|
|
69
69
|
*/
|
|
@@ -615,13 +615,13 @@ export namespace Components {
|
|
|
615
615
|
/**
|
|
616
616
|
* Adiciona item de menu nas colunas.
|
|
617
617
|
*/
|
|
618
|
-
"addColumnMenuItem": (label: string, name: string, action: Function) => Promise<void>;
|
|
618
|
+
"addColumnMenuItem": (label: string, name: string, action: Function, icon: HTMLElement | string) => Promise<void>;
|
|
619
619
|
/**
|
|
620
620
|
* Configuração de exibição da grade.
|
|
621
621
|
*/
|
|
622
622
|
"config": IGridConfig;
|
|
623
623
|
/**
|
|
624
|
-
* Unidade de dados. Responsável pelo controle de edição de registros e
|
|
624
|
+
* Unidade de dados. Responsável pelo controle de edição de registros e informações pertinentes aos campos.
|
|
625
625
|
*/
|
|
626
626
|
"dataUnit": DataUnit;
|
|
627
627
|
/**
|
|
@@ -2445,7 +2445,7 @@ declare namespace LocalJSX {
|
|
|
2445
2445
|
*/
|
|
2446
2446
|
"config"?: IGridConfig;
|
|
2447
2447
|
/**
|
|
2448
|
-
* Unidade de dados. Responsável pelo controle de edição de registros e
|
|
2448
|
+
* Unidade de dados. Responsável pelo controle de edição de registros e informações pertinentes aos campos.
|
|
2449
2449
|
*/
|
|
2450
2450
|
"dataUnit"?: DataUnit;
|
|
2451
2451
|
/**
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as s,g as e}from"./p-bfc7b8ca.js";import{FloatingManager as r}from"@sankhyalabs/core";const h=class{constructor(o){t(this,o),this.ezVisibilityChange=i(this,"ezVisibilityChange",7),this._firstRender=!0,this._bodyOverflow="",this.innerClickTest=(t,i,o)=>{const s=[t];this.innerElement&&("string"==typeof this.innerElement?s.push(document.querySelector(`#${this.innerElement}`)):this.innerElement.forEach((t=>{s.push(document.querySelector(`#${t}`))})));for(var e=0;e<s.length;e++){let t=s[e];if(null!=t){if(t.contains(i))return!0;if(o&&"nodeType"in(null==o?void 0:o.target)&&t.contains(o.target))return!0;if(t.shadowRoot&&t.shadowRoot.contains(i))return!0;if(t=this._host,t.lastElementChild.shadowRoot?t.lastElementChild.shadowRoot.contains(i):t.contains(i))return!0;const s=i.getRootNode();if(s instanceof ShadowRoot&&o.composedPath().includes(s.host))return!0}}return!1},this.backClickListener=()=>{this.ezVisibilityChange.emit(!1)},this.autoClose=!0,this.top="0px",this.left="0px",this.bottom="0px",this.right="0px",this.boxWidth="fit-content",this.opened=void 0,this.innerElement=void 0,this.overlayType="light"}observeOpened(t,i){t!=i&&(i?this.hide():this.show(),this.ezVisibilityChange.emit(t))}observeConfig(){this.manageOverflow()}manageOverflow(){this.opened&&(this._bodyOverflow=window.document.body.style.overflow),window.document.body.style.overflow=this.opened?"hidden":this._bodyOverflow}async updatePosition(t=this.top,i=this.left,o=this.bottom,s=this.right){r.updateFloatPosition(this._box,this._container,{autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:this.innerClickTest,backClickListener:this.backClickListener})}async show(t=this.top,i=this.left,o=this.bottom,s=this.right){const e="none"!==this.overlayType,h=`ez-scrim ez-scrim--${this.overlayType}`;let n={autoClose:this.autoClose,top:t,left:i,bottom:o,right:s,innerClickTest:this.innerClickTest,backClickListener:this.backClickListener};e&&(n=Object.assign(Object.assign({},n),{autoClose:!0,useOverlay:e,overlayClassName:h})),this._floatingID=r.float(this._box,this._container,n),this.opened=!0}async hide(){void 0!==this._floatingID&&(r.close(this._floatingID),this._floatingID=void 0,this.opened=!1)}componentDidRender(){this._firstRender&&(this._box.remove(),this._firstRender=!1)}render(){return o(s,null,o("section",{ref:t=>this._container=t},o("div",{class:"popover__box "+("fit-content"===this.boxWidth?"popover__box--fit-content":"popover__box--full-width"),ref:t=>this._box=t},o("slot",null))))}get _host(){return e(this)}static get watchers(){return{opened:["observeOpened","observeConfig"]}}};h.style=":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--most-visible, 3);position:relative;display:flex;user-select:none}.popover__box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.popover__box--fit-content{width:fit-content}.popover__box--full-width{width:100%}";export{h as ez_popover}
|