@sankhyalabs/ezui 1.1.161 → 1.2.0-beta.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/{ApplicationUtils-4a223c7a.js → ApplicationUtils-483c0a9e.js} +26 -7
- package/dist/cjs/CSSVarsUtils-09b431cc.js +55 -0
- package/dist/cjs/DialogType-a1e288e6.js +8 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +101 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +8 -4
- package/dist/cjs/ez-date-input.cjs.entry.js +6 -6
- package/dist/cjs/ez-date-time-input.cjs.entry.js +7 -7
- package/dist/cjs/ez-dialog.cjs.entry.js +33 -14
- package/dist/cjs/ez-filter-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +101 -86
- package/dist/cjs/ez-grid-config.cjs.entry.js +3 -2
- package/dist/cjs/ez-grid.cjs.entry.js +97155 -92841
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +6 -0
- package/dist/cjs/ez-radio-button.cjs.entry.js +49 -0
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +2 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/ez-actions-button/ez-actions-button.css +49 -0
- package/dist/collection/components/ez-actions-button/ez-actions-button.js +177 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +31 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +4 -1
- package/dist/collection/components/ez-date-input/ez-date-input.js +5 -3
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +6 -6
- package/dist/collection/components/ez-dialog/DialogType.js +6 -0
- package/dist/collection/components/ez-dialog/ez-dialog.css +9 -1
- package/dist/collection/components/ez-dialog/ez-dialog.js +53 -26
- package/dist/collection/components/ez-form/DataBinder.js +46 -18
- package/dist/collection/components/ez-form/ez-form.js +75 -68
- package/dist/collection/components/ez-form/fieldbuilder/tpl/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +24 -165
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +71 -44
- package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +4 -4
- package/dist/collection/components/ez-grid/ez-grid.js +36 -321
- package/dist/collection/components/ez-grid/subcomponents/ez-grid-config/ez-grid-config.js +2 -1
- package/dist/collection/components/ez-popover/ez-popover.js +6 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.css +204 -0
- package/dist/collection/components/ez-radio-button/ez-radio-button.js +160 -0
- package/dist/collection/utils/ApplicationUtils.js +25 -7
- package/dist/collection/utils/CSSVarsUtils.js +34 -0
- package/dist/collection/utils/index.js +1 -0
- package/dist/custom-elements/index.d.ts +12 -6
- package/dist/custom-elements/index.js +97132 -92676
- package/dist/esm/{ApplicationUtils-35350d20.js → ApplicationUtils-5f87ae60.js} +26 -7
- package/dist/esm/CSSVarsUtils-499b75c2.js +53 -0
- package/dist/esm/DialogType-72afa679.js +8 -0
- package/dist/esm/ez-actions-button.entry.js +97 -0
- package/dist/esm/ez-combo-box.entry.js +8 -4
- package/dist/esm/ez-date-input.entry.js +6 -6
- package/dist/esm/ez-date-time-input.entry.js +7 -7
- package/dist/esm/ez-dialog.entry.js +33 -14
- package/dist/esm/ez-filter-input.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +101 -86
- package/dist/esm/ez-grid-config.entry.js +3 -2
- package/dist/esm/ez-grid.entry.js +96694 -92380
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +6 -0
- package/dist/esm/ez-radio-button.entry.js +45 -0
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +2 -1
- 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-0b099e95.entry.js +1 -0
- package/dist/ezui/{p-ff7b4b13.entry.js → p-240a76f1.entry.js} +1 -1
- package/dist/ezui/p-3263a002.js +1 -0
- package/dist/ezui/p-787fbdfe.js +1 -0
- package/dist/ezui/p-78fc16d7.entry.js +1 -0
- package/dist/ezui/{p-4c3d136c.entry.js → p-7d29e829.entry.js} +1 -1
- package/dist/ezui/p-898b9906.js +1 -0
- package/dist/ezui/p-8aaca58b.entry.js +1 -0
- package/dist/ezui/p-99440dbc.entry.js +1 -0
- package/dist/ezui/p-a7064bc1.entry.js +1 -0
- package/dist/ezui/{p-53bbba8e.entry.js → p-ad071710.entry.js} +1 -1
- package/dist/ezui/p-b0195dae.entry.js +1 -0
- package/dist/ezui/p-ba2bfa01.entry.js +1 -0
- package/dist/ezui/p-bedef638.entry.js +1 -0
- package/dist/ezui/p-d1bc45bd.entry.js +1 -0
- package/dist/ezui/{p-003d53b1.entry.js → p-d75c3aae.entry.js} +1 -1
- package/dist/ezui/p-e5c572c1.entry.js +304 -0
- package/dist/ezui/p-f4819fa3.entry.js +1 -0
- package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +37 -0
- package/dist/types/components/ez-dialog/DialogType.d.ts +5 -0
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +22 -3
- package/dist/types/components/ez-form/DataBinder.d.ts +6 -1
- package/dist/types/components/ez-form/ez-form.d.ts +27 -3
- package/dist/types/components/ez-form/fieldbuilder/tpl/TextInput.tpl.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +0 -85
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -23
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +14 -11
- package/dist/types/components/ez-grid/ez-grid.d.ts +8 -66
- package/dist/types/components/ez-radio-button/ez-radio-button.d.ts +36 -0
- package/dist/types/components.d.ts +129 -76
- package/dist/types/utils/ApplicationUtils.d.ts +4 -1
- package/dist/types/utils/CSSVarsUtils.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +5 -5
- package/react/components.d.ts +2 -1
- package/react/components.js +2 -1
- package/react/components.js.map +1 -1
- package/dist/cjs/CSSVarsUtils-1034b7b6.js +0 -21
- package/dist/cjs/test-du.cjs.entry.js +0 -103
- package/dist/collection/components/test-du/test-du.css +0 -3
- package/dist/collection/components/test-du/test-du.js +0 -104
- package/dist/collection/utils/interfaces/PageableComponent.js +0 -1
- package/dist/esm/CSSVarsUtils-eb4c5af6.js +0 -19
- package/dist/esm/test-du.entry.js +0 -99
- package/dist/ezui/p-0cd386db.js +0 -1
- package/dist/ezui/p-403de0a4.entry.js +0 -1
- package/dist/ezui/p-4c3cd534.entry.js +0 -1
- package/dist/ezui/p-6668c3b0.entry.js +0 -1
- package/dist/ezui/p-7fd6deec.entry.js +0 -1
- package/dist/ezui/p-8be1a4d6.entry.js +0 -1
- package/dist/ezui/p-8d73594f.entry.js +0 -369
- package/dist/ezui/p-933a7475.js +0 -1
- package/dist/ezui/p-988ff301.entry.js +0 -1
- package/dist/ezui/p-cf56d3e8.entry.js +0 -1
- package/dist/ezui/p-da156da3.entry.js +0 -1
- package/dist/ezui/p-ec7b7e26.entry.js +0 -1
- package/dist/types/components/test-du/test-du.d.ts +0 -9
- package/dist/types/utils/interfaces/PageableComponent.d.ts +0 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as a}from"./p-139ed2f6.js";import{DateUtils as n}from"@sankhyalabs/core";import{C as r}from"./p-3263a002.js";let o=class{constructor(e){t(this,e),this.ezChange=i(this,"ezChange",7),this.ezStartChange=i(this,"ezStartChange",7),this.ezCancelWaitingChange=i(this,"ezCancelWaitingChange",7),this._focused=!1,this.enabled=!0,this.mode="regular"}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||this.setInputValue())}observeValue(t,i){if(this._textInput&&t!=i){const e=this.validateValue(t),s=this.validateValue(i);if((null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())){const t=this.getTextValue(e)||"";!n.strToDate(t)&&this._focused||(this._textInput.value||"")===t||(this._textInput.value=t,this._focused=!1,this.errorMessage=""),this.ezChange.emit(null===e?void 0:e)}}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}changeValue(t){const i=this.validateValue(this.value),e=this.validateValue(t);(null==i?void 0:i.getTime())!==(null==e?void 0:e.getTime())&&(this.value=e)}showCalendar(){this.handleBlur(),this._calendar.value=this.value,this._calendar.fitVertical(this.errorMessage||"slim"===this.mode?0:-19,this._elem.clientHeight)}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}handleBlur(){const t=this._textInput.value,i=n.strToDate(t);if(i||!t){this.errorMessage="";const t=this.validateValue(this.value),e=this.validateValue(i);(null==t?void 0:t.getTime())===(null==e?void 0:e.getTime())?(e&&(this._textInput.value=this.getTextValue(e)||"",this._focused=!1),this.ezCancelWaitingChange.emit()):this.changeValue(e)}else this.changeValue(void 0),this.ezCancelWaitingChange.emit(),this.errorMessage="O valor digitado não é uma data válida"}getTextValue(t){return t?new Intl.DateTimeFormat("pt-BR").format(t):void 0}handleInput(t){const i=n.strToDate(this._textInput.value),e=this.validateValue(this.value),s=this.validateValue(i);(null==e?void 0:e.getTime())!==(null==s?void 0:s.getTime())&&(this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1})),"H"!==t.data&&"h"!==t.data||this.changeValue(new Date)}validateValue(t){return t instanceof Date&&!isNaN(t.valueOf())?n.clearTime(t):void 0}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput),this.setInputValue()}render(){return e(s,null,e("ez-text-input",{ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:t=>this.handleInput(t),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode},e("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),e("ez-calendar",{onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},floating:!0,ref:t=>this._calendar=t}))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};o.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{o as ez_date_input}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class EzActionsButton {
|
|
3
|
+
private _element;
|
|
4
|
+
private _actionsList;
|
|
5
|
+
private _listContainer;
|
|
6
|
+
private _button;
|
|
7
|
+
private _floatingID;
|
|
8
|
+
/**
|
|
9
|
+
* Deixa o campo disponível ou não para interação com usuário.
|
|
10
|
+
*/
|
|
11
|
+
enabled: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Array no formato "{value: string, label: string}" que alimenta a lista de ações
|
|
14
|
+
*/
|
|
15
|
+
actions: Array<Action>;
|
|
16
|
+
/**
|
|
17
|
+
* É possível escolher entre [small,medium,large]
|
|
18
|
+
*/
|
|
19
|
+
size: "small" | "medium" | "large" | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Evento que é disparado ao acionar uma ação
|
|
22
|
+
*/
|
|
23
|
+
ezAction: EventEmitter<Action>;
|
|
24
|
+
innerClickCheck: (floatingContainer: HTMLElement, node: HTMLElement) => boolean;
|
|
25
|
+
private showActions;
|
|
26
|
+
private hideActions;
|
|
27
|
+
private handlerButtonClick;
|
|
28
|
+
private actionClick;
|
|
29
|
+
componentWillLoad(): void;
|
|
30
|
+
componentDidLoad(): void;
|
|
31
|
+
componentDidRender(): void;
|
|
32
|
+
render(): any;
|
|
33
|
+
}
|
|
34
|
+
export interface Action {
|
|
35
|
+
value: string;
|
|
36
|
+
label: string;
|
|
37
|
+
}
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
import { DialogType } from "./DialogType";
|
|
3
|
+
declare class Message {
|
|
4
|
+
title: string;
|
|
5
|
+
message: string;
|
|
6
|
+
dialogType: DialogType;
|
|
7
|
+
confirm: boolean;
|
|
8
|
+
icon: string;
|
|
9
|
+
labelCancel: string;
|
|
10
|
+
labelConfirm: string;
|
|
11
|
+
btnConfirmDanger: boolean;
|
|
12
|
+
callBack: Function;
|
|
13
|
+
constructor(title: string, message: string, dialogType: DialogType, confirm: boolean, icon: string, labelCancel: string, labelConfirm: string, btnConfirmDanger: boolean, callBack: Function);
|
|
14
|
+
}
|
|
2
15
|
export declare class EzDialog {
|
|
3
16
|
private labelConfirm;
|
|
4
17
|
private labelCancel;
|
|
@@ -8,9 +21,9 @@ export declare class EzDialog {
|
|
|
8
21
|
*/
|
|
9
22
|
confirm: boolean;
|
|
10
23
|
/**
|
|
11
|
-
* Define se o componente terá o visual de erro ou de aviso
|
|
24
|
+
* Define se o componente terá o visual padrão, de erro ou de aviso
|
|
12
25
|
*/
|
|
13
|
-
|
|
26
|
+
dialogType: DialogType;
|
|
14
27
|
/**
|
|
15
28
|
* Menssagem exibida dentro do Dialog
|
|
16
29
|
*/
|
|
@@ -44,7 +57,13 @@ export declare class EzDialog {
|
|
|
44
57
|
/**
|
|
45
58
|
* Faz com que o componente seja exibido.
|
|
46
59
|
*/
|
|
47
|
-
show(title: string, message: string,
|
|
60
|
+
show(title: string, message: string, dialogType: DialogType, confirm: boolean, icon: string, labelCancel: string, labelConfirm: string, btnConfirmDanger: boolean): Promise<boolean>;
|
|
61
|
+
isCritical(dialogType: DialogType): boolean;
|
|
62
|
+
getIconElement(message: Message): any;
|
|
63
|
+
getTypeIndicatorElement(message: Message): any;
|
|
64
|
+
getClassContainer(message: Message): "dialog__container dialog__container--default" | "dialog__container";
|
|
65
|
+
getClassTitleLabel(message: Message): "title title__label title__label--no-icon" | "title title__label";
|
|
48
66
|
componentWillRender(): void;
|
|
49
67
|
render(): any;
|
|
50
68
|
}
|
|
69
|
+
export {};
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { DataUnit } from "@sankhyalabs/core";
|
|
2
|
+
import { InvalidField } from "./ez-form";
|
|
2
3
|
export default class DataBinder {
|
|
3
4
|
private _dataUnit;
|
|
4
5
|
private _fields;
|
|
6
|
+
private _invalidFields;
|
|
5
7
|
constructor(dataUnit: DataUnit);
|
|
6
8
|
bind(fields: Array<HTMLElement>): void;
|
|
7
9
|
onDisconnectedCallback(): void;
|
|
8
|
-
|
|
10
|
+
markInvalid(field: InvalidField): void;
|
|
11
|
+
private clearInvalid;
|
|
12
|
+
updateValue(fieldName: string, field: HTMLElement): void;
|
|
13
|
+
private updateErrorMessage;
|
|
9
14
|
private updateBind;
|
|
10
15
|
private changeStarted;
|
|
11
16
|
private cancelWaitingChange;
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import { DataUnit, DUActionInterceptor, DataUnitAction } from "@sankhyalabs/core";
|
|
2
|
+
import { DataUnit, Record, DUActionInterceptor, DataUnitAction } from "@sankhyalabs/core";
|
|
3
3
|
export declare class EzForm implements DUActionInterceptor {
|
|
4
4
|
private _element;
|
|
5
5
|
private _store;
|
|
6
6
|
private _staticFields;
|
|
7
7
|
private _dataBinder;
|
|
8
|
+
/**
|
|
9
|
+
* Repositório de dados, controla a manipulação dos dados
|
|
10
|
+
*/
|
|
8
11
|
dataUnit: DataUnit;
|
|
12
|
+
/**
|
|
13
|
+
* Configuração dos campos.
|
|
14
|
+
*/
|
|
9
15
|
config: Array<FieldConfig>;
|
|
16
|
+
/**
|
|
17
|
+
* Validador responsável por checar a integridade das informações do registro
|
|
18
|
+
*/
|
|
19
|
+
recordsValidator: RecordValidator;
|
|
10
20
|
/**
|
|
11
21
|
* Evento disparado quando o formulário está disponível na DOM.
|
|
12
22
|
*/
|
|
@@ -15,12 +25,12 @@ export declare class EzForm implements DUActionInterceptor {
|
|
|
15
25
|
cancel(): Promise<void>;
|
|
16
26
|
validate(): Promise<void>;
|
|
17
27
|
observeConfig(): void;
|
|
18
|
-
private validateError;
|
|
19
28
|
private validateRequired;
|
|
29
|
+
private processValidationResult;
|
|
20
30
|
private getDynamicContent;
|
|
21
31
|
private processMetadata;
|
|
22
32
|
private isStatic;
|
|
23
|
-
interceptAction(action: DataUnitAction): DataUnitAction
|
|
33
|
+
interceptAction(action: DataUnitAction): DataUnitAction | Promise<DataUnitAction>;
|
|
24
34
|
componentWillLoad(): void;
|
|
25
35
|
onDataUnitAction: (action: any) => void;
|
|
26
36
|
componentDidRender(): void;
|
|
@@ -43,3 +53,17 @@ export interface TabConfig {
|
|
|
43
53
|
visible?: boolean;
|
|
44
54
|
order?: number;
|
|
45
55
|
}
|
|
56
|
+
export interface RecordValidator {
|
|
57
|
+
validateRecord(form: EzForm, record: Record): ValidationResult;
|
|
58
|
+
}
|
|
59
|
+
export interface ValidationResult {
|
|
60
|
+
isValid: boolean;
|
|
61
|
+
invalidFields?: Array<InvalidField>;
|
|
62
|
+
errorTitle?: string;
|
|
63
|
+
errorMessage?: string;
|
|
64
|
+
infoMessage?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface InvalidField {
|
|
67
|
+
name: string;
|
|
68
|
+
message: string;
|
|
69
|
+
}
|
|
@@ -74,22 +74,6 @@ export default interface EzGridController {
|
|
|
74
74
|
*/
|
|
75
75
|
selectRows(rowIds: Array<string>): void;
|
|
76
76
|
/**
|
|
77
|
-
* Método para navegar para o registro anterior da grid.
|
|
78
|
-
*/
|
|
79
|
-
previousRecord(): void;
|
|
80
|
-
/**
|
|
81
|
-
* Método para navegar para o proxímo registro da grid.
|
|
82
|
-
*/
|
|
83
|
-
nextRecord(): void;
|
|
84
|
-
/**
|
|
85
|
-
* Método para verificar se existem registros anteriores.
|
|
86
|
-
*/
|
|
87
|
-
hasPreviousRecord(): boolean;
|
|
88
|
-
/**
|
|
89
|
-
* Método para verificar se existem proximos registros.
|
|
90
|
-
*/
|
|
91
|
-
hasNextRecord(): boolean;
|
|
92
|
-
/**
|
|
93
77
|
* Método responsável por alterar o valores nos registros
|
|
94
78
|
*/
|
|
95
79
|
changeValues(changes: any, rowIds?: Array<string>): void;
|
|
@@ -97,22 +81,6 @@ export default interface EzGridController {
|
|
|
97
81
|
* Método responsável por atualizar as linhas da grade
|
|
98
82
|
*/
|
|
99
83
|
refresh(): void;
|
|
100
|
-
/**
|
|
101
|
-
* Quando no modo paginado, aciona o carregamento da próxima página
|
|
102
|
-
*/
|
|
103
|
-
nextPage(): void;
|
|
104
|
-
/**
|
|
105
|
-
* Quando no modo paginado, aciona o carregamento da página anterior
|
|
106
|
-
*/
|
|
107
|
-
previousPage(): void;
|
|
108
|
-
/**
|
|
109
|
-
* Retorna se o registro selecionado é o primeiro da página.
|
|
110
|
-
*/
|
|
111
|
-
isFirstOfPage(): boolean;
|
|
112
|
-
/**
|
|
113
|
-
* Retorna se o registro selecionado é o ultimo da página.
|
|
114
|
-
*/
|
|
115
|
-
isLastOfPage(): boolean;
|
|
116
84
|
/**
|
|
117
85
|
* Adiciona um filtro rápido na grid e faz o refresh.
|
|
118
86
|
*/
|
|
@@ -142,11 +110,6 @@ export interface EzGridOptions {
|
|
|
142
110
|
* Usado para permitir múltipla seleção.
|
|
143
111
|
*/
|
|
144
112
|
allowMultipleSelection: boolean;
|
|
145
|
-
/**
|
|
146
|
-
* Determina o número de linhas de cada página. Caso informado o valor -1
|
|
147
|
-
* não haverá paginação.
|
|
148
|
-
*/
|
|
149
|
-
pageSize: number;
|
|
150
113
|
/**
|
|
151
114
|
* Endereço do servidor para buscar os dados.
|
|
152
115
|
*/
|
|
@@ -239,54 +202,6 @@ export interface EzGridColumStateEvent {
|
|
|
239
202
|
*/
|
|
240
203
|
isUserChange: boolean;
|
|
241
204
|
}
|
|
242
|
-
/**
|
|
243
|
-
* Sempre que há alterações na paginação, o grid controller passará esse status através do
|
|
244
|
-
* callback "onPaginationChange" para o host (EzGrid) reagir.
|
|
245
|
-
*/
|
|
246
|
-
export interface EzGridPaginationStatus {
|
|
247
|
-
/**
|
|
248
|
-
* Se existe página anterior.
|
|
249
|
-
*/
|
|
250
|
-
hasPrevious: boolean;
|
|
251
|
-
/**
|
|
252
|
-
* Se existe próxima página.
|
|
253
|
-
*/
|
|
254
|
-
hasNext: boolean;
|
|
255
|
-
/**
|
|
256
|
-
* Número da página atual.
|
|
257
|
-
*/
|
|
258
|
-
currentPage: number;
|
|
259
|
-
/**
|
|
260
|
-
* Número da primeira linha da página.
|
|
261
|
-
*/
|
|
262
|
-
pageStart: number;
|
|
263
|
-
/**
|
|
264
|
-
* Número da última linha da página.
|
|
265
|
-
*/
|
|
266
|
-
pageEnd: number;
|
|
267
|
-
/**
|
|
268
|
-
* Número total de linhas.
|
|
269
|
-
*/
|
|
270
|
-
totalRows: number;
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Sempre que há alterações na seleção, o grid controller passará esse status através do
|
|
274
|
-
* callback "onSelectionChange" para o host (EzGrid) reagir.
|
|
275
|
-
*/
|
|
276
|
-
export interface EzGridSelectionStatus {
|
|
277
|
-
/**
|
|
278
|
-
* Se é o registro selecionado é o primeiro da página atual
|
|
279
|
-
*/
|
|
280
|
-
isFirstOfPage: boolean;
|
|
281
|
-
/**
|
|
282
|
-
* Se é o registro selecionado é o último da página atual
|
|
283
|
-
*/
|
|
284
|
-
isLastOfPage: boolean;
|
|
285
|
-
/**
|
|
286
|
-
* Um array com os registros selecionados atualmente
|
|
287
|
-
*/
|
|
288
|
-
selection: Array<any>;
|
|
289
|
-
}
|
|
290
205
|
export interface IGridConfig {
|
|
291
206
|
/**
|
|
292
207
|
* Lista de colunas a ser apresentada.
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import EzGridController, { EzGridColumn, EzGridColumnConfig, EzGridColumnMenuItemDef, EzGridOptions } from "../EzGridController";
|
|
2
|
-
import { Sort } from "@sankhyalabs/core";
|
|
3
|
-
import { SortingProvider } from "@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";
|
|
2
|
+
import { Sort, SortingProvider } from "@sankhyalabs/core";
|
|
4
3
|
export default class AgGridController implements EzGridController, SortingProvider {
|
|
5
4
|
private readonly DEFAULT_ROW_HEIGHT;
|
|
6
5
|
private readonly CHECK_BOX_COL_ID;
|
|
@@ -10,26 +9,19 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
10
9
|
private _gridOptions;
|
|
11
10
|
private _columnStateChangeCallback;
|
|
12
11
|
private _selectionChangeCallback;
|
|
13
|
-
private _paginationChangeCallback;
|
|
14
12
|
private _doubleClickCallBack;
|
|
15
13
|
private _enterprise;
|
|
16
14
|
private _menuItems;
|
|
17
15
|
private _multipleSelection;
|
|
18
|
-
private _pageSize;
|
|
19
|
-
private _serverURL;
|
|
20
16
|
private _dataUnit;
|
|
21
17
|
private _idAttribName;
|
|
22
18
|
private _dataSource;
|
|
23
|
-
private
|
|
24
|
-
private _isLastRecordOfPage;
|
|
25
|
-
private _lastPageStatus;
|
|
19
|
+
private _colDefs;
|
|
26
20
|
constructor(enterprise: boolean);
|
|
27
21
|
getSort(): Array<Sort>;
|
|
28
22
|
initDatagrid(container: HTMLElement, options: EzGridOptions): void;
|
|
29
23
|
private getRowHeight;
|
|
30
24
|
private setOptionsEvents;
|
|
31
|
-
private syncSelection;
|
|
32
|
-
private setOptionsPagination;
|
|
33
25
|
private setOptionsSupress;
|
|
34
26
|
setData(data: Array<any>): void;
|
|
35
27
|
addRows(): void;
|
|
@@ -44,26 +36,13 @@ export default class AgGridController implements EzGridController, SortingProvid
|
|
|
44
36
|
getColumnsState(): Array<EzGridColumn>;
|
|
45
37
|
getSelection(): Array<any>;
|
|
46
38
|
addColumnMenuItem(item: EzGridColumnMenuItemDef): void;
|
|
47
|
-
nextPage(): void;
|
|
48
|
-
previousPage(): void;
|
|
49
|
-
goToPage(page: number): void;
|
|
50
39
|
quickFilter(term: string): void;
|
|
51
|
-
isLastOfPage(): boolean;
|
|
52
|
-
isFirstOfPage(): boolean;
|
|
53
|
-
previousRecord(): void;
|
|
54
|
-
nextRecord(): void;
|
|
55
|
-
private selectFirstRow;
|
|
56
|
-
hasPreviousRecord(): boolean;
|
|
57
|
-
hasNextRecord(): boolean;
|
|
58
|
-
selectLastRow(): void;
|
|
59
40
|
setSelectedIndex(index: number): void;
|
|
60
41
|
private buildColDef;
|
|
61
42
|
private getFormatterByColumn;
|
|
62
43
|
private onCallStateChange;
|
|
63
44
|
private isUIEvent;
|
|
64
45
|
private onSelectionChange;
|
|
65
|
-
private onPaginationChange;
|
|
66
|
-
private getPaginationStatus;
|
|
67
46
|
private onRowDoubleClick;
|
|
68
47
|
private conditionalSet;
|
|
69
48
|
}
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { IServerSideDatasource, IServerSideGetRowsParams } from "ag-grid-community";
|
|
2
|
-
import { DataUnit } from "@sankhyalabs/core";
|
|
2
|
+
import { DataUnit, QuickFilter } from "@sankhyalabs/core";
|
|
3
|
+
import EzGridController, { EzGridColumn, EzGridOptions } from "../EzGridController";
|
|
3
4
|
export default class DataSource implements IServerSideDatasource {
|
|
4
|
-
private
|
|
5
|
+
private _controller;
|
|
5
6
|
private _dataUnit;
|
|
6
|
-
private
|
|
7
|
-
private
|
|
8
|
-
private
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
private _options;
|
|
8
|
+
private _lastLoadingParams;
|
|
9
|
+
private _waitingForLoad;
|
|
10
|
+
quickFilter: QuickFilter;
|
|
11
|
+
readonly RECORD_ARCHIVE = "__RECORD_ARCHIVE__";
|
|
12
|
+
private duObserver;
|
|
13
|
+
constructor(dataUnit: DataUnit, controller: EzGridController, options: EzGridOptions);
|
|
12
14
|
getRows(params: IServerSideGetRowsParams): void;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
needReload(currentLoading: IServerSideGetRowsParams): boolean;
|
|
16
|
+
private callbackGetRows;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
buildColumnDefs(): Array<EzGridColumn>;
|
|
16
19
|
}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import EzGridController, { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent, IGridConfig, EzGridSelectionStatus } from "./controller/EzGridController";
|
|
3
1
|
import { DataUnit } from "@sankhyalabs/core";
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
export declare class EzGrid
|
|
2
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
3
|
+
import EzGridController, { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent, IGridConfig } from "./controller/EzGridController";
|
|
4
|
+
export declare class EzGrid {
|
|
7
5
|
_gridConfig: HTMLEzGridConfigElement;
|
|
8
6
|
_container: HTMLElement;
|
|
9
7
|
_gridController: EzGridController;
|
|
10
|
-
_dataUnitBridge: DataUnitBridge;
|
|
11
8
|
_lastColumnMovedName: string;
|
|
12
|
-
private
|
|
13
|
-
private _navigationHasNext;
|
|
14
|
-
private _navigationFirstRow;
|
|
15
|
-
private _navigationLastRow;
|
|
16
|
-
private _navigationTotalRows;
|
|
9
|
+
private _paginationInfo;
|
|
17
10
|
private _popUpGridConfig;
|
|
18
11
|
/**
|
|
19
12
|
* Evento disparado ao mudar o estado das colunas do grid. Ordenação, largura, etc.
|
|
@@ -22,7 +15,7 @@ export declare class EzGrid implements PageableComponent {
|
|
|
22
15
|
/**
|
|
23
16
|
* Evento disparado ao selecionar linhas da grade.
|
|
24
17
|
*/
|
|
25
|
-
ezSelectionChange: EventEmitter<
|
|
18
|
+
ezSelectionChange: EventEmitter<Array<any>>;
|
|
26
19
|
/**
|
|
27
20
|
* Evento disparado com o duplo clique de uma linha
|
|
28
21
|
*/
|
|
@@ -39,11 +32,6 @@ export declare class EzGrid implements PageableComponent {
|
|
|
39
32
|
* Configuração de exibição da grade.
|
|
40
33
|
*/
|
|
41
34
|
config: IGridConfig;
|
|
42
|
-
/**
|
|
43
|
-
* Determina o número de linhas de cada página. Caso informado o valor -1
|
|
44
|
-
* não haverá paginação.
|
|
45
|
-
*/
|
|
46
|
-
pageSize: number;
|
|
47
35
|
/**
|
|
48
36
|
* Endereço do servidor. Se informado, o próprio datagrid controlará a obtenção
|
|
49
37
|
* dos dados, anulando a necessidade de acionar o método "setData(data)"
|
|
@@ -83,64 +71,18 @@ export declare class EzGrid implements PageableComponent {
|
|
|
83
71
|
*/
|
|
84
72
|
getColumns(): Promise<Array<EzGridColumn>>;
|
|
85
73
|
/**
|
|
86
|
-
* Método para recarregar pagina atual da grid.
|
|
87
|
-
*/
|
|
88
|
-
refresh(): Promise<any>;
|
|
89
|
-
/**
|
|
90
74
|
* Método para fazer um filtro rápido na grid.
|
|
91
75
|
*/
|
|
92
76
|
quickFilter(term: string): Promise<any>;
|
|
93
|
-
/**
|
|
94
|
-
* Método para fazer um filtro rápido na grid.
|
|
95
|
-
*/
|
|
96
|
-
nextPage(): Promise<void>;
|
|
97
|
-
/**
|
|
98
|
-
* Método para fazer um filtro rápido na grid.
|
|
99
|
-
*/
|
|
100
|
-
previousPage(): Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* Método para fazer um filtro rápido na grid.
|
|
103
|
-
*/
|
|
104
|
-
hasNextPage(): Promise<boolean>;
|
|
105
|
-
/**
|
|
106
|
-
* Método para fazer um filtro rápido na grid.
|
|
107
|
-
*/
|
|
108
|
-
hasPreviousPage(): Promise<boolean>;
|
|
109
|
-
/**
|
|
110
|
-
* Método para verificar se o registro selecionado é o ultimo da página.
|
|
111
|
-
*/
|
|
112
|
-
isLastOfPage(): Promise<boolean>;
|
|
113
|
-
/**
|
|
114
|
-
* Método para verificar se o registro selecionado é o primeiro da página.
|
|
115
|
-
*/
|
|
116
|
-
isFirstOfPage(): Promise<boolean>;
|
|
117
|
-
/**
|
|
118
|
-
* Método para navegar para o proxímo registro da grid.
|
|
119
|
-
*/
|
|
120
|
-
nextRecord(): Promise<void>;
|
|
121
|
-
/**
|
|
122
|
-
* Método para navegar para o registro anterior da grid.
|
|
123
|
-
*/
|
|
124
|
-
previousRecord(): Promise<void>;
|
|
125
|
-
/**
|
|
126
|
-
* Método para verificar se existem proximos registros.
|
|
127
|
-
*/
|
|
128
|
-
hasNextRecord(): Promise<boolean>;
|
|
129
|
-
/**
|
|
130
|
-
* Método para verificar se existem registros anteriores.
|
|
131
|
-
*/
|
|
132
|
-
hasPreviousRecord(): Promise<boolean>;
|
|
133
|
-
/**
|
|
134
|
-
* Método para abrir a configuração da grid.
|
|
135
|
-
*/
|
|
136
|
-
openGridConfig(): Promise<void>;
|
|
137
77
|
componentWillLoad(): void;
|
|
138
78
|
onColumnStateChange(type: string, state: Array<EzGridColumn>, info: any): void;
|
|
139
79
|
private createConfigFromState;
|
|
140
80
|
componentDidLoad(): void;
|
|
141
|
-
|
|
81
|
+
previousPage(): void;
|
|
82
|
+
nextPage(): void;
|
|
142
83
|
getPaginationControl(): Array<HTMLElement>;
|
|
143
84
|
observeConfig(config: IGridConfig): void;
|
|
144
85
|
closeGridConfig(): void;
|
|
86
|
+
openGridConfig(): Promise<void>;
|
|
145
87
|
render(): any;
|
|
146
88
|
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
export declare class EzRadioButton {
|
|
3
|
+
private hostElement;
|
|
4
|
+
private _options;
|
|
5
|
+
/**
|
|
6
|
+
* Representa o valor atualmente selecionado entre as opções
|
|
7
|
+
*/
|
|
8
|
+
value: any;
|
|
9
|
+
/**
|
|
10
|
+
* Define as opções que serão apresentadas
|
|
11
|
+
*/
|
|
12
|
+
options: Array<Radio>;
|
|
13
|
+
/**
|
|
14
|
+
* Define se o componente está habilitado ou desabilitado
|
|
15
|
+
*/
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Determina a descrição do grupo
|
|
19
|
+
*/
|
|
20
|
+
label: string;
|
|
21
|
+
/**
|
|
22
|
+
* Evento disparado quando uma opção for selecionada
|
|
23
|
+
*/
|
|
24
|
+
ezChange: EventEmitter<any>;
|
|
25
|
+
/**
|
|
26
|
+
* Define a direção em que os itens são apresentadoss, podendo ser horizontal ou vertical.
|
|
27
|
+
*/
|
|
28
|
+
direction: "vertical" | "horizontal";
|
|
29
|
+
componentWillLoad(): void;
|
|
30
|
+
handleInputChange(ev: Event): void;
|
|
31
|
+
render(): any;
|
|
32
|
+
}
|
|
33
|
+
export interface Radio {
|
|
34
|
+
label: string;
|
|
35
|
+
value: any;
|
|
36
|
+
}
|