@sankhyalabs/ezui 2.0.2 → 2.0.3
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-check.cjs.entry.js +6 -19
- package/dist/cjs/ez-grid.cjs.entry.js +87 -11
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-check/ez-check.css +24 -8
- package/dist/collection/components/ez-check/ez-check.js +23 -20
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +47 -11
- package/dist/collection/components/ez-grid/controller/ag-grid/components/selectionHeader.js +40 -0
- package/dist/custom-elements/index.js +94 -31
- package/dist/esm/ez-check.entry.js +6 -19
- package/dist/esm/ez-grid.entry.js +87 -11
- 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-0bd0afcf.entry.js +1 -0
- package/dist/ezui/{p-ae5af8f9.entry.js → p-e120b25a.entry.js} +1 -1
- package/dist/types/components/ez-check/ez-check.d.ts +5 -2
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +12 -0
- package/dist/types/components.d.ts +8 -0
- package/package.json +1 -1
- package/dist/ezui/p-2213da1f.entry.js +0 -1
|
@@ -17,6 +17,10 @@ export declare class EzCheck {
|
|
|
17
17
|
* Deixa o campo disponível ou não para interação com o usuário.
|
|
18
18
|
*/
|
|
19
19
|
enabled: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Deixa o campo em um estado indeterminado, nem marcado nem desmarcado (não disponível em modo "switch").
|
|
22
|
+
*/
|
|
23
|
+
indeterminate: boolean;
|
|
20
24
|
/**
|
|
21
25
|
* Existem dois modos de visualização: regular e switch.
|
|
22
26
|
* Se esta propriedade for omitida, o componete assume o formato "regular".
|
|
@@ -24,7 +28,6 @@ export declare class EzCheck {
|
|
|
24
28
|
* No modo "switch" o campo tem uma interface em formato de um pino liga/desliga.
|
|
25
29
|
*/
|
|
26
30
|
mode: string;
|
|
27
|
-
observeMode(): void;
|
|
28
31
|
/**
|
|
29
32
|
* Devolve o modo escolhido para o componente
|
|
30
33
|
*/
|
|
@@ -33,8 +36,8 @@ export declare class EzCheck {
|
|
|
33
36
|
* Faz o foco no componente de input
|
|
34
37
|
*/
|
|
35
38
|
setFocus(): Promise<void>;
|
|
36
|
-
componentDidLoad(): void;
|
|
37
39
|
changeValue(): void;
|
|
38
40
|
getLabelClasses(): string;
|
|
41
|
+
getInputClasses(): "switch-mode" | "regular-mode";
|
|
39
42
|
render(): any;
|
|
40
43
|
}
|
|
@@ -19,12 +19,15 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
19
19
|
private _dataSource;
|
|
20
20
|
private _colDefs;
|
|
21
21
|
private _statusResolver;
|
|
22
|
+
private _selectionChangeDeboucing;
|
|
22
23
|
constructor(enterprise: boolean);
|
|
23
24
|
getSort(): Array<Sort>;
|
|
24
25
|
initDatagrid(container: HTMLElement, options: EzGridOptions): void;
|
|
25
26
|
private getRowHeight;
|
|
26
27
|
private setOptionsEvents;
|
|
27
28
|
private setOptionsSupress;
|
|
29
|
+
private getSelectionHeaderStatus;
|
|
30
|
+
private updateSelectionForAll;
|
|
28
31
|
setData(data: Array<any>): void;
|
|
29
32
|
addRows(): void;
|
|
30
33
|
updateRows(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHeaderParams, IHeaderComp } from "ag-grid-community";
|
|
2
|
+
export default class SelectionHeader implements IHeaderComp {
|
|
3
|
+
private element;
|
|
4
|
+
private checkBox;
|
|
5
|
+
private headerCheckStatusGetter;
|
|
6
|
+
private updatingValue;
|
|
7
|
+
updateCheckbox(): void;
|
|
8
|
+
init(params: IHeaderParams): void;
|
|
9
|
+
getGui(): HTMLElement;
|
|
10
|
+
destroy(): void;
|
|
11
|
+
refresh(_params: IHeaderParams): boolean;
|
|
12
|
+
}
|
|
@@ -144,6 +144,10 @@ export namespace Components {
|
|
|
144
144
|
* Devolve o modo escolhido para o componente
|
|
145
145
|
*/
|
|
146
146
|
"getMode": () => Promise<string>;
|
|
147
|
+
/**
|
|
148
|
+
* Deixa o campo em um estado indeterminado, nem marcado nem desmarcado (não disponível em modo "switch").
|
|
149
|
+
*/
|
|
150
|
+
"indeterminate": boolean;
|
|
147
151
|
/**
|
|
148
152
|
* Título do campo
|
|
149
153
|
*/
|
|
@@ -1439,6 +1443,10 @@ declare namespace LocalJSX {
|
|
|
1439
1443
|
* Deixa o campo disponível ou não para interação com o usuário.
|
|
1440
1444
|
*/
|
|
1441
1445
|
"enabled"?: boolean;
|
|
1446
|
+
/**
|
|
1447
|
+
* Deixa o campo em um estado indeterminado, nem marcado nem desmarcado (não disponível em modo "switch").
|
|
1448
|
+
*/
|
|
1449
|
+
"indeterminate"?: boolean;
|
|
1442
1450
|
/**
|
|
1443
1451
|
* Título do campo
|
|
1444
1452
|
*/
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,c as r,h as o,H as c}from"./p-3c7ea91b.js";import{C as a}from"./p-b853763b.js";let i=class{constructor(o){e(this,o),this.ezChange=r(this,"ezChange",7),this.enabled=!0,this.mode=a.REGULAR}observeMode(){var e;(null===(e=this.mode)||void 0===e?void 0:e.toUpperCase())===a.SWITCH?(this._inputElem.classList.remove("regular-mode"),this._inputElem.classList.add("switch-mode")):(this._inputElem.classList.remove("switch-mode"),this._inputElem.classList.add("regular-mode"))}async getMode(){return this.mode}async setFocus(){this._inputElem.focus()}componentDidLoad(){this.observeMode()}changeValue(){this.enabled&&(this.value=!this.value,this.ezChange.emit(this.value))}getLabelClasses(){let e="label";return this.enabled||(e+=" label--disabled"),e}render(){return o(c,null,o("input",{type:"checkbox",class:"regular-mode",checked:!0===this.value,onChange:()=>{this.changeValue()},disabled:!this.enabled,ref:e=>this._inputElem=e}),this.label?o("label",{class:this.getLabelClasses(),onClick:()=>{this.changeValue()},title:this.label},this.label):void 0)}static get watchers(){return{mode:["observeMode"]}}};i.style=':host{--ez-check--box--width:18px;--ez-check--box--height:18px;--ez-check--width:calc(var(--ez-check--box--width) + 14px);--ez-check--height:calc(var(--ez-check--box--width) + 14px);--ez-check--border-radius:var(--border--radius-small);--ez-check--checked--background-color:var(--color--primary-200);--ez-check--focus--background-color:var(--color--strokes, #FFFFFF);--ez-check--hover--background-color:var(--background--medium);--ez-check--checked--disabled--background-color:var(--color--disable-secondary);--ez-check--border:var(--border--medium) var(--title--primary);--ez-check--disabled--border:var(--border--medium) var(--color--strokes);--ez-check--checked--border:var(--border--medium) var(--color--primary);--ez-check--checked--hover--background-color:var(--color--primary-200);--ez-check--checked--focus--background-color:var(--color--primary-300, #FFFFFF);--ez-check--check--image:url(\'data:image/svg+xml;utf8,<svg width="8" height="7" viewBox="0 0 8 7" version="1.1" xmlns="http://www.w3.org/2000/svg"><path d="M7.70002 0.398999L7.48502 0.207997C7.31524 0.0598858 7.09376 -0.0150438 6.86894 -0.000430025C6.64411 0.0141838 6.43419 0.117153 6.28502 0.285997L2.70002 4.332L1.61802 3.384C1.44837 3.23576 1.22697 3.16067 1.00214 3.17509C0.77732 3.18952 0.567332 3.2923 0.418019 3.461L0.229019 3.674C0.0752361 3.84797 -0.00437434 4.07521 0.00721192 4.30713C0.0187982 4.53904 0.120661 4.75722 0.291019 4.915L2.27402 6.762C2.35832 6.8432 2.45842 6.90618 2.56811 6.94702C2.67779 6.98787 2.79471 7.00571 2.91159 6.99942C3.02846 6.99314 3.14279 6.96287 3.24747 6.91049C3.35214 6.85812 3.44492 6.78477 3.52002 6.695L7.79102 1.638C7.94063 1.46048 8.01486 1.23149 7.99786 0.999963C7.98085 0.768436 7.87396 0.552749 7.70002 0.398999Z"/></svg>\');--ez-check--check--background-color:var(--color--primary);--ez-check--check--disabled--background-color:var(--color--strokes);--ez-switch--slider--width:34px;--ez-switch--slider--height:14px;--ez-switch--pin--width:19px;--ez-switch--pin--height:19px;--ez-switch--focus--width:32px;--ez-switch--focus--height:32px;--ez-switch--background-color:var(--color--strokes);--ez-switch--disabled--background-color:var(--color--disable-secondary);--ez-switch--disabled--checked--background-color:var(--color--primary-300);--ez-switch--checked--background-color:var(--color--primary);--ez-switch--pin--background-color:var(--background--xlight);--ez-switch--pin--disabled--background-color:var(--color--disable-primary);--ez-switch--pin--checked--background-color:var(--background--xlight);--ez-switch--pin--checked--disabled--background-color:#E8F7F4;--ez-switch--pin--focus--background-color:var(--text--disable);--ez-switch--pin--checked--focus--background-color:var(--color--primary);--ez-switch--pin--border-color:var(--text--primary);--ez-switch--pin--disabled--border-color:var(--text--secondary);--ez-check--label--font-size:var(--text--medium, 14px);--ez-check--label--font-family:var(--font-pattern, Arial);--ez-check--label--color:var(--title--primary, #000);--ez-check--label--disabled--color:var(--text--disable, #AFB6C0);display:flex;width:100%;align-items:center;margin:0}input.regular-mode{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;box-sizing:border-box;-webkit-appearance:none;appearance:none;cursor:pointer;border-radius:50%;position:relative;width:var(--ez-check--width);height:var(--ez-check--height)}input.regular-mode:enabled:hover{background-color:var(--ez-check--hover--background-color)}input.regular-mode:enabled:focus{outline:none;background-color:var(--ez-check--focus--background-color)}input.regular-mode:disabled{cursor:auto;background:none}input.regular-mode::before{box-sizing:border-box;content:"";display:block;width:var(--ez-check--box--width);height:var(--ez-check--box--height);border-radius:var(--ez-check--border-radius);border:var(--ez-check--border)}input.regular-mode:disabled::before{border:var(--ez-check--disabled--border)}input.regular-mode:checked:enabled:hover{background-color:var(--ez-check--checked--hover--background-color)}input.regular-mode:checked:enabled:focus{background-color:var(--ez-check--checked--focus--background-color)}input.regular-mode:checked::before{border:var(--ez-check--checked--border);background-color:var(--ez-check--checked--background-color)}input.regular-mode:checked:disabled:before{border:var(--ez-check--disabled--border);background-color:var(--ez-check--checked--disabled--background-color)}input.regular-mode:checked::after{display:flex;position:absolute;content:"";background-color:var(--ez-check--check--background-color);width:8px;height:7px;-webkit-mask-image:var(--ez-check--check--image);mask-image:var(--ez-check--check--image)}input.regular-mode:checked:disabled::after{background-color:var(--ez-check--check--disabled--background-color)}input.switch-mode{flex-shrink:0;-webkit-appearance:none;appearance:none;position:relative;outline:none;cursor:pointer;border-radius:20px;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);transition:background-color var(--transition);width:var(--ez-switch--slider--width);height:var(--ez-switch--slider--height);background-color:var(--ez-switch--background-color)}input.switch-mode:disabled{background-color:var(--ez-switch--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked:disabled{background-color:var(--ez-switch--disabled--checked--background-color)}input.switch-mode::after{content:"";display:block;position:absolute;box-shadow:var(--shadow);transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(-2px) translateY(-4px);border-radius:50%;border:var(--border--small, 1px solid) var(--ez-switch--pin--border-color, #626e82);width:var(--ez-switch--pin--width);height:var(--ez-switch--pin--height);background-color:var(--ez-switch--pin--background-color)}input.switch-mode:disabled::after{background-color:var(--ez-switch--pin--disabled--background-color);border:var(--border--small, 1px solid) var(--ez-switch--pin--disabled--border-color, #a2abb9)}input.switch-mode:checked{transition:background-color var(--transition), border var(--transition);background-color:var(--ez-switch--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode::before{display:block;content:"";display:block;position:absolute;border-radius:50%;opacity:0;width:var(--ez-switch--focus--width);height:var(--ez-switch--focus--height);top:calc((var(--ez-switch--slider--height) - var(--ez-switch--focus--height)) / 2);left:calc((var(--ez-switch--pin--width) - var(--ez-switch--focus--width) - 2px) / 2);background-color:var(--ez-switch--pin--focus--background-color)}input.switch-mode:focus::before{opacity:0.24;transition:opacity var(--transition)}input.switch-mode:checked:focus::before{background-color:var(--ez-switch--pin--checked--focus--background-color);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width) + 2px))}input.switch-mode:checked::after{transition:transform var(--transition);transition:background-color var(--transition);transition:border-color var(--transition);transform:translateX(calc(var(--ez-switch--slider--width) - var(--ez-switch--pin--width))) translateY(-4px);box-shadow:var(--shadow);background-color:var(--ez-switch--pin--checked--background-color);border:var(--border--small, 1px solid) var(--color--primary, #008561)}input.switch-mode:checked:disabled::after{background-color:var(--ez-switch--pin--checked--disabled--background-color)}.label{flex-shrink:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-check--label--color);font-size:var(--ez-check--label--font-size);font-family:var(--ez-check--label--font-family);cursor:default;padding-left:var(--space--small)}.label--disabled{color:var(--ez-check--label--disabled--color)}';export{i as ez_check}
|