@sankhyalabs/ezui 5.10.8 → 5.11.0-dev.10
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/README.md +8 -11
- package/dist/cjs/{CSSVarsUtils-af809e73.js → CSSVarsUtils-b136a156.js} +5 -0
- package/dist/cjs/RecordValidationProcessor-edd23705.js +102 -0
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +34 -5
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +99 -16
- package/dist/cjs/ez-date-input.cjs.entry.js +53 -22
- package/dist/cjs/ez-date-time-input.cjs.entry.js +53 -19
- package/dist/cjs/ez-filter-input_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-form-view.cjs.entry.js +42 -1
- package/dist/cjs/ez-form.cjs.entry.js +11 -84
- package/dist/cjs/ez-grid.cjs.entry.js +575 -44
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +39 -15
- package/dist/cjs/ez-search.cjs.entry.js +13 -2
- package/dist/cjs/ez-text-area.cjs.entry.js +6 -2
- package/dist/cjs/ez-text-input.cjs.entry.js +7 -4
- package/dist/cjs/ez-time-input.cjs.entry.js +11 -7
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +30 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/ez-calendar/ez-calendar.js +63 -6
- package/dist/collection/components/ez-card-item/ez-card-item.css +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.css +6 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +168 -14
- package/dist/collection/components/ez-date-input/ez-date-input.js +71 -21
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +71 -18
- package/dist/collection/components/ez-form/ez-form.js +20 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +23 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +4 -1
- package/dist/collection/components/ez-form-view/structure/index.js +34 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +41 -8
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +1 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +230 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +49 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js +10 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js +4 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +38 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +40 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +20 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +15 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +41 -0
- package/dist/collection/components/ez-grid/ez-grid.js +78 -39
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +50 -8
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +78 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +21 -1
- package/dist/collection/components/ez-number-input/ez-number-input.css +4 -0
- package/dist/collection/components/ez-number-input/ez-number-input.js +62 -15
- package/dist/collection/components/ez-search/ez-search.css +1 -1
- package/dist/collection/components/ez-search/ez-search.js +84 -1
- package/dist/collection/components/ez-text-area/ez-text-area.css +4 -0
- package/dist/collection/components/ez-text-area/ez-text-area.js +23 -1
- package/dist/collection/components/ez-text-input/ez-text-input.css +8 -1
- package/dist/collection/components/ez-text-input/ez-text-input.js +14 -5
- package/dist/collection/components/ez-time-input/ez-time-input.css +4 -0
- package/dist/collection/components/ez-time-input/ez-time-input.js +18 -7
- package/dist/collection/utils/CSSVarsUtils.js +5 -0
- package/dist/collection/utils/form/DataBinder.js +8 -63
- package/dist/collection/utils/form/FormMetadata.js +3 -22
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +21 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationResult.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/IValidationSource.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +74 -0
- package/dist/custom-elements/index.js +1101 -256
- package/dist/esm/{CSSVarsUtils-00f67f32.js → CSSVarsUtils-a97cfa29.js} +5 -0
- package/dist/esm/RecordValidationProcessor-abc814af.js +99 -0
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +35 -6
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +99 -16
- package/dist/esm/ez-date-input.entry.js +53 -22
- package/dist/esm/ez-date-time-input.entry.js +53 -19
- package/dist/esm/ez-filter-input_2.entry.js +1 -1
- package/dist/esm/ez-form-view.entry.js +42 -1
- package/dist/esm/ez-form.entry.js +12 -85
- package/dist/esm/ez-grid.entry.js +576 -45
- package/dist/esm/ez-multi-selection-list.entry.js +3 -1
- package/dist/esm/ez-number-input.entry.js +39 -15
- package/dist/esm/ez-search.entry.js +13 -2
- package/dist/esm/ez-text-area.entry.js +6 -2
- package/dist/esm/ez-text-input.entry.js +7 -4
- package/dist/esm/ez-time-input.entry.js +11 -7
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +30 -7
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-028f264f.entry.js +1 -0
- package/dist/ezui/p-061f4d73.entry.js +1 -0
- package/dist/ezui/p-25562cf8.entry.js +1 -0
- package/dist/ezui/p-3078d25c.entry.js +1 -0
- package/dist/ezui/p-391de0e4.entry.js +1 -0
- package/dist/ezui/{p-68352e41.entry.js → p-47afb974.entry.js} +1 -1
- package/dist/ezui/p-5cef0264.entry.js +1 -0
- package/dist/ezui/p-5e55a42b.entry.js +1 -0
- package/dist/ezui/p-7526f2b6.entry.js +1 -0
- package/dist/ezui/p-7eb3e1a5.js +1 -0
- package/dist/ezui/p-86a2036d.js +1 -0
- package/dist/ezui/{p-12303d2e.entry.js → p-87e85160.entry.js} +1 -1
- package/dist/ezui/{p-c7a23be9.entry.js → p-964e5571.entry.js} +2 -2
- package/dist/ezui/p-ce035beb.entry.js +1 -0
- package/dist/ezui/p-d43b22f3.entry.js +1 -0
- package/dist/ezui/p-df93558d.entry.js +1 -0
- package/dist/ezui/p-e2dfd935.entry.js +1 -0
- package/dist/ezui/p-e67d0bd5.entry.js +1 -0
- package/dist/ezui/{p-f1a537e3.entry.js → p-ff82b176.entry.js} +1 -1
- package/dist/types/components/ez-calendar/ez-calendar.d.ts +9 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +23 -0
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
- package/dist/types/components/ez-form/ez-form.d.ts +5 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +5 -0
- package/dist/types/components/ez-form-view/interfaces/IFormViewField.d.ts +2 -14
- package/dist/types/components/ez-form-view/structure/index.d.ts +15 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +18 -0
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +38 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +10 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.d.ts +1 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.d.ts +9 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +10 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.d.ts +5 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.d.ts +3 -0
- package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.d.ts +4 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +16 -5
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +16 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +5 -1
- package/dist/types/components/ez-search/ez-search.d.ts +14 -1
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -1
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -1
- package/dist/types/components.d.ts +116 -6
- package/dist/types/utils/form/DataBinder.d.ts +1 -3
- package/dist/types/utils/form/interfaces/IFormConfig.d.ts +1 -1
- package/dist/types/utils/form/interfaces/index.d.ts +4 -4
- package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +17 -0
- package/dist/types/utils/{form/interfaces → interfaces}/IFieldConfig.d.ts +2 -2
- package/dist/types/utils/validators/recordvalidator/IValidationSource.d.ts +6 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +13 -0
- package/package.json +3 -3
- package/dist/ezui/p-00c7c25d.entry.js +0 -1
- package/dist/ezui/p-0b160fec.entry.js +0 -1
- package/dist/ezui/p-0bd54a6f.entry.js +0 -1
- package/dist/ezui/p-2a0e1679.entry.js +0 -1
- package/dist/ezui/p-39153935.entry.js +0 -1
- package/dist/ezui/p-4a5e37a7.js +0 -1
- package/dist/ezui/p-4c8b029b.entry.js +0 -1
- package/dist/ezui/p-4e31b69b.entry.js +0 -1
- package/dist/ezui/p-5782443e.entry.js +0 -1
- package/dist/ezui/p-5d45e384.entry.js +0 -1
- package/dist/ezui/p-70ea4beb.entry.js +0 -1
- package/dist/ezui/p-78a6e049.entry.js +0 -1
- package/dist/ezui/p-8bcb197f.entry.js +0 -1
- package/dist/ezui/p-a4c9f3c4.entry.js +0 -1
- /package/dist/collection/{utils/form/interfaces/IFieldConfig.js → components/ez-grid/controller/ag-grid/editor/IUICellEditor.js} +0 -0
- /package/dist/collection/utils/{form/interfaces/IInvalidField.js → interfaces/IFieldConfig.js} +0 -0
- /package/dist/collection/utils/{form/interfaces/IRecordValidator.js → validators/recordvalidator/IInvalidField.js} +0 -0
- /package/dist/collection/utils/{form/interfaces/IValidationResult.js → validators/recordvalidator/IRecordValidator.js} +0 -0
- /package/dist/types/utils/{form/interfaces → validators/recordvalidator}/IInvalidField.d.ts +0 -0
- /package/dist/types/utils/{form/interfaces → validators/recordvalidator}/IRecordValidator.d.ts +0 -0
- /package/dist/types/utils/{form/interfaces → validators/recordvalidator}/IValidationResult.d.ts +0 -0
|
@@ -5,6 +5,8 @@ import { IMultiSelectionOption } from '../../ez-multi-selection-list/interfaces/
|
|
|
5
5
|
export declare class FilterColumn {
|
|
6
6
|
private readonly TOP_POSITION;
|
|
7
7
|
private readonly TOP_POSITION_HEADER_HIDDEN;
|
|
8
|
+
private readonly TOP_POSITION_NO_TASKBAR;
|
|
9
|
+
private readonly TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN;
|
|
8
10
|
private readonly DEFAULT_HEIGHT;
|
|
9
11
|
private ezPopoverElement;
|
|
10
12
|
private ezMultiSelectionList;
|
|
@@ -13,19 +15,24 @@ export declare class FilterColumn {
|
|
|
13
15
|
columnName: string;
|
|
14
16
|
columnLabel: string;
|
|
15
17
|
gridHeaderHidden: boolean;
|
|
18
|
+
noHeaderTaskBar: boolean;
|
|
16
19
|
dataSource: IMultiSelectionListDataSource;
|
|
17
20
|
dataUnit: DataUnit;
|
|
18
21
|
options: IMultiSelectionOption[];
|
|
19
22
|
selectedItems: IMultiSelectionOption[];
|
|
20
23
|
fieldDescriptor: FieldDescriptor;
|
|
21
24
|
useOptions: boolean;
|
|
25
|
+
isTextSearch: boolean;
|
|
22
26
|
hide(): Promise<void>;
|
|
23
27
|
/**
|
|
24
28
|
* Abre o filtro de coluna.
|
|
25
29
|
* @Params IFilterColumnConfigs informações para configurar o filtro
|
|
26
30
|
*/
|
|
27
31
|
show(configs: IFilterColumnConfigs): Promise<void>;
|
|
32
|
+
private calculateLeftPosition;
|
|
33
|
+
private buildIsTextSearch;
|
|
28
34
|
private calcTopPosition;
|
|
35
|
+
private buildReferenceTopPosition;
|
|
29
36
|
private clearConfigs;
|
|
30
37
|
private canShow;
|
|
31
38
|
private submit;
|
|
@@ -42,6 +49,7 @@ export interface IFilterColumnConfigs {
|
|
|
42
49
|
columnLabel: string;
|
|
43
50
|
leftPosition: string;
|
|
44
51
|
filteredOptions?: IMultiSelectionOption[];
|
|
52
|
+
fromIcon?: boolean;
|
|
45
53
|
}
|
|
46
54
|
export interface IAppliedFilterColumnOptions {
|
|
47
55
|
field: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IMultiSelectionListDataSource } from '../../ez-multi-selection-list/interfaces/IMultiSelectionListDataSource';
|
|
2
|
+
import { IMultiSelectionOption } from '../../ez-multi-selection-list/interfaces/IMultiSelectionOption';
|
|
3
|
+
import { DataUnit } from '@sankhyalabs/core';
|
|
4
|
+
export default class InMemoryFilterColumnDataSource implements IMultiSelectionListDataSource {
|
|
5
|
+
private dataUnit;
|
|
6
|
+
private originalRecords;
|
|
7
|
+
constructor(dataUnit: DataUnit);
|
|
8
|
+
onDataUnitAction: (action: any) => void;
|
|
9
|
+
fetchData(filterTerm: string, fieldName: string): Promise<Array<IMultiSelectionOption>>;
|
|
10
|
+
private buildFieldOption;
|
|
11
|
+
private buildValue;
|
|
12
|
+
private removeDuplicatedOptions;
|
|
13
|
+
private includesSearchTerm;
|
|
14
|
+
private buildLabel;
|
|
15
|
+
private formatLabel;
|
|
16
|
+
}
|
|
@@ -27,6 +27,10 @@ export declare class EzMuiltiSelectionList {
|
|
|
27
27
|
* Opções de filtros a serem exibidas na listagem.
|
|
28
28
|
*/
|
|
29
29
|
options: IMultiSelectionOption[];
|
|
30
|
+
/**
|
|
31
|
+
* Informa se a pesquisa é do tipo texto.
|
|
32
|
+
*/
|
|
33
|
+
isTextSearch: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Guarda o estado das opções de filtragem (check = true ou false).
|
|
32
36
|
* @private
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { WaitingChange } from "@sankhyalabs/core";
|
|
2
2
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
3
|
+
import { TFocusOptions } from "../ez-text-input/ez-text-input";
|
|
3
4
|
export declare class EzNumberInput {
|
|
4
5
|
private _textInput;
|
|
5
6
|
private _focused;
|
|
7
|
+
private _changePending;
|
|
8
|
+
private _valuePromiseCallbacks;
|
|
6
9
|
private _elem;
|
|
7
10
|
/**
|
|
8
11
|
* Emitido quando acontece a alteração de valor do campo.
|
|
@@ -52,7 +55,7 @@ export declare class EzNumberInput {
|
|
|
52
55
|
/**
|
|
53
56
|
* Aplica o foco no campo.
|
|
54
57
|
*/
|
|
55
|
-
setFocus(): Promise<void>;
|
|
58
|
+
setFocus(options?: TFocusOptions): Promise<void>;
|
|
56
59
|
/**
|
|
57
60
|
* Remove o foco do campo.
|
|
58
61
|
*/
|
|
@@ -61,6 +64,7 @@ export declare class EzNumberInput {
|
|
|
61
64
|
* Retorna se o conteúdo é inválido.
|
|
62
65
|
*/
|
|
63
66
|
isInvalid(): Promise<boolean>;
|
|
67
|
+
getValueAsync(): Promise<number>;
|
|
64
68
|
observeLabel(): void;
|
|
65
69
|
observeErrorMessage(): void;
|
|
66
70
|
observeValue(newValue: number, oldValue: number): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import { IOption, ISearchArgument } from
|
|
2
|
+
import { IEzCheckBoxListPosition, IOption, ISearchArgument } from '../ez-combo-box/ez-combo-box';
|
|
3
3
|
export declare class EzSearch {
|
|
4
4
|
private _elem;
|
|
5
5
|
private _comboElement;
|
|
@@ -43,6 +43,18 @@ export declare class EzSearch {
|
|
|
43
43
|
* Se false deixa de exibir a mensagem de erro dentro do campo.
|
|
44
44
|
*/
|
|
45
45
|
canShowError: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
48
|
+
*/
|
|
49
|
+
hideErrorOnFocusOut: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Define um posicionamento fixo para a lista de opções do CheckBox.
|
|
52
|
+
*/
|
|
53
|
+
listOptionsPosition: IEzCheckBoxListPosition;
|
|
54
|
+
/**
|
|
55
|
+
* Informa se a pesquisa é do tipo texto.
|
|
56
|
+
*/
|
|
57
|
+
isTextSearch: boolean;
|
|
46
58
|
/**
|
|
47
59
|
* Emitido quando acontece a alteração de valor do campo.
|
|
48
60
|
*/
|
|
@@ -65,6 +77,7 @@ export declare class EzSearch {
|
|
|
65
77
|
* Limpa o valor do campo de pesquisa
|
|
66
78
|
*/
|
|
67
79
|
clearValue(): Promise<void>;
|
|
80
|
+
getValueAsync(): Promise<unknown>;
|
|
68
81
|
onComboChange(event: any): void;
|
|
69
82
|
componentDidLoad(): void;
|
|
70
83
|
render(): any;
|
|
@@ -38,6 +38,10 @@ export declare class EzTextArea {
|
|
|
38
38
|
* Define o tamanho do campo.
|
|
39
39
|
*/
|
|
40
40
|
mode: "slim" | "regular";
|
|
41
|
+
/**
|
|
42
|
+
* Ativa a opção de fazer resize do input.
|
|
43
|
+
*/
|
|
44
|
+
enableResize: boolean;
|
|
41
45
|
observeErrorMessage(): void;
|
|
42
46
|
observeValue(newValue: string, oldValue: string): void;
|
|
43
47
|
observeMode(): void;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
export type TFocusOptions = {
|
|
3
|
+
selectText: boolean;
|
|
4
|
+
};
|
|
2
5
|
export declare class EzTextInput {
|
|
3
6
|
private _inputElem;
|
|
4
7
|
private _labelElem;
|
|
@@ -58,7 +61,7 @@ export declare class EzTextInput {
|
|
|
58
61
|
/**
|
|
59
62
|
* Aplica o foco no campo.
|
|
60
63
|
*/
|
|
61
|
-
setFocus(): Promise<void>;
|
|
64
|
+
setFocus(options?: TFocusOptions): Promise<void>;
|
|
62
65
|
/**
|
|
63
66
|
* Remove o foco do campo.
|
|
64
67
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
2
|
import { WaitingChange } from "@sankhyalabs/core";
|
|
3
|
+
import { TFocusOptions } from "../ez-text-input/ez-text-input";
|
|
3
4
|
export declare class EzTimeInput {
|
|
4
5
|
private _textInput;
|
|
5
6
|
private _maskFormatter;
|
|
@@ -56,7 +57,7 @@ export declare class EzTimeInput {
|
|
|
56
57
|
/**
|
|
57
58
|
* Aplica o foco no campo.
|
|
58
59
|
*/
|
|
59
|
-
setFocus(): Promise<void>;
|
|
60
|
+
setFocus({ selectText }: TFocusOptions): Promise<void>;
|
|
60
61
|
/**
|
|
61
62
|
* Remove o foco do campo.
|
|
62
63
|
*/
|
|
@@ -10,11 +10,12 @@ import { IPosition } from "./components/ez-badge/interfaces/IPosition";
|
|
|
10
10
|
import { IBreadcrumbItem } from "./components/ez-breadcrumb/ez-breadcrumb";
|
|
11
11
|
import { CardItem } from "./components/ez-card-item/ez-card-item";
|
|
12
12
|
import { CheckMode } from "./components/ez-check/CheckMode";
|
|
13
|
-
import { IOption, ISearchArgument } from "./components/ez-combo-box/ez-combo-box";
|
|
13
|
+
import { IEzCheckBoxListPosition, IOption, ISearchArgument } from "./components/ez-combo-box/ez-combo-box";
|
|
14
14
|
import { DataUnit, WaitingChange } from "@sankhyalabs/core";
|
|
15
15
|
import { DialogType } from "./components/ez-dialog/DialogType";
|
|
16
16
|
import { IDropdownItem, IDropdownSubAction } from "./components/ez-dropdown/structure/DropdownItem";
|
|
17
17
|
import { IFormConfig, IRecordValidator } from "./utils/form/interfaces";
|
|
18
|
+
import { FormItems } from "./components/ez-form-view/structure";
|
|
18
19
|
import { IFormViewField } from "./components/ez-form-view/interfaces/IFormViewField";
|
|
19
20
|
import { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent, IGridConfig, IStatusResolver, StatusResolverFunction } from "./components/ez-grid/controller/EzGridController";
|
|
20
21
|
import { ISelection, ISelectionToastConfig } from "./components/ez-grid/interfaces";
|
|
@@ -23,12 +24,14 @@ import { IGuideItem } from "./components/ez-guide-navigator/interfaces";
|
|
|
23
24
|
import { ListGroup, ListItem, SlotBuilder, TListMode } from "./components/ez-list/ez-list";
|
|
24
25
|
import { THeightMode } from "./components/ez-modal/ez-modal";
|
|
25
26
|
import { IMultiSelectionOption } from "./components/ez-multi-selection-list/interfaces/IMultiSelectionOption";
|
|
27
|
+
import { TFocusOptions } from "./components/ez-text-input/ez-text-input";
|
|
26
28
|
import { IEzPopoverAnchorOptions } from "./components/ez-popover/ez-popover";
|
|
27
29
|
import { Radio } from "./components/ez-radio-button/ez-radio-button";
|
|
28
30
|
import { EzScrollDirection } from "./components/ez-scroller/EzScrollDirection";
|
|
29
|
-
import { IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-combo-box/ez-combo-box";
|
|
31
|
+
import { IEzCheckBoxListPosition as IEzCheckBoxListPosition1, IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-combo-box/ez-combo-box";
|
|
30
32
|
import { Tab } from "./components/ez-tabselector/ez-tabselector";
|
|
31
33
|
import { IStyled } from "./components/ez-text-edit/ez-text-edit";
|
|
34
|
+
import { TFocusOptions as TFocusOptions1 } from "./components/ez-text-input/ez-text-input";
|
|
32
35
|
import { ITreeItem } from "./components/ez-tree/interfaces/ITreeItem";
|
|
33
36
|
import { Node } from "./components/ez-tree/types/Node";
|
|
34
37
|
import { EzFile } from "./components/ez-upload/ez-upload";
|
|
@@ -164,7 +167,11 @@ export namespace Components {
|
|
|
164
167
|
}
|
|
165
168
|
interface EzCalendar {
|
|
166
169
|
/**
|
|
167
|
-
* Ajusta o posicionamento do ez-calendar conforme a disponibilidade de espaço.
|
|
170
|
+
* Ajusta o posicionamento horizontal do ez-calendar conforme a disponibilidade de espaço.
|
|
171
|
+
*/
|
|
172
|
+
"fitHorizontal": (rightOffset: number) => Promise<void>;
|
|
173
|
+
/**
|
|
174
|
+
* Ajusta o posicionamento vertical do ez-calendar conforme a disponibilidade de espaço.
|
|
168
175
|
*/
|
|
169
176
|
"fitVertical": (topOffset: number, bottomOffset: number) => Promise<void>;
|
|
170
177
|
/**
|
|
@@ -337,14 +344,27 @@ export namespace Components {
|
|
|
337
344
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
338
345
|
*/
|
|
339
346
|
"errorMessage": string;
|
|
347
|
+
"getValueAsync": () => Promise<unknown>;
|
|
348
|
+
/**
|
|
349
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
350
|
+
*/
|
|
351
|
+
"hideErrorOnFocusOut": boolean;
|
|
340
352
|
/**
|
|
341
353
|
* Retorna se o conteúdo é inválido.
|
|
342
354
|
*/
|
|
343
355
|
"isInvalid": () => Promise<boolean>;
|
|
356
|
+
/**
|
|
357
|
+
* Informa se a pesquisa é do tipo texto.
|
|
358
|
+
*/
|
|
359
|
+
"isTextSearch": boolean;
|
|
344
360
|
/**
|
|
345
361
|
* Texto a ser apresentado como título do campo.
|
|
346
362
|
*/
|
|
347
363
|
"label": string;
|
|
364
|
+
/**
|
|
365
|
+
* Define um posicionamento fixo para a lista de opções do CheckBox.
|
|
366
|
+
*/
|
|
367
|
+
"listOptionsPosition": IEzCheckBoxListPosition;
|
|
348
368
|
/**
|
|
349
369
|
* Define o tamanho do campo.
|
|
350
370
|
*/
|
|
@@ -403,6 +423,7 @@ export namespace Components {
|
|
|
403
423
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
404
424
|
*/
|
|
405
425
|
"errorMessage": string;
|
|
426
|
+
"getValueAsync": () => Promise<Date>;
|
|
406
427
|
/**
|
|
407
428
|
* Retorna se o conteúdo é inválido.
|
|
408
429
|
*/
|
|
@@ -441,6 +462,7 @@ export namespace Components {
|
|
|
441
462
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
442
463
|
*/
|
|
443
464
|
"errorMessage": string;
|
|
465
|
+
"getValueAsync": () => Promise<Date>;
|
|
444
466
|
/**
|
|
445
467
|
* Retorna se o conteúdo é inválido.
|
|
446
468
|
*/
|
|
@@ -624,6 +646,10 @@ export namespace Components {
|
|
|
624
646
|
* Adiciona item de menu nas colunas.
|
|
625
647
|
*/
|
|
626
648
|
"addColumnMenuItem": (label: string, name: string, action: Function, icon: HTMLElement | string) => Promise<void>;
|
|
649
|
+
/**
|
|
650
|
+
* Define se a edição está habilitada na grid.
|
|
651
|
+
*/
|
|
652
|
+
"canEdit": boolean;
|
|
627
653
|
/**
|
|
628
654
|
* Define um `IMultiSelectionListDataSource` responsável por alimentar o filtro de colunas.
|
|
629
655
|
*/
|
|
@@ -656,6 +682,10 @@ export namespace Components {
|
|
|
656
682
|
* Aplica um filtro rápido.
|
|
657
683
|
*/
|
|
658
684
|
"quickFilter": (term: string) => Promise<void>;
|
|
685
|
+
/**
|
|
686
|
+
* Define um validador responsável pela integridade dos registros.
|
|
687
|
+
*/
|
|
688
|
+
"recordsValidator": IRecordValidator;
|
|
659
689
|
/**
|
|
660
690
|
* Configuração da seleção de grade no toast.
|
|
661
691
|
*/
|
|
@@ -680,6 +710,10 @@ export namespace Components {
|
|
|
680
710
|
* Define um `IStatusResolver` responsável pelo estado da coluna de status.
|
|
681
711
|
*/
|
|
682
712
|
"statusResolver": IStatusResolver | StatusResolverFunction;
|
|
713
|
+
/**
|
|
714
|
+
* Quando verdadeiro, o ENTER fará a navegação como se fosse a tecla TAB na grade.
|
|
715
|
+
*/
|
|
716
|
+
"useEnterLikeTab": boolean;
|
|
683
717
|
}
|
|
684
718
|
interface EzGuideNavigator {
|
|
685
719
|
/**
|
|
@@ -881,6 +915,10 @@ export namespace Components {
|
|
|
881
915
|
* Classe que implementa o método fetchData, responsável por realizar a pesquisa dos dados, com base no termo informado pelo usuário.
|
|
882
916
|
*/
|
|
883
917
|
"dataSource": IMultiSelectionListDataSource;
|
|
918
|
+
/**
|
|
919
|
+
* Informa se a pesquisa é do tipo texto.
|
|
920
|
+
*/
|
|
921
|
+
"isTextSearch": boolean;
|
|
884
922
|
/**
|
|
885
923
|
* Opções de filtros a serem exibidas na listagem.
|
|
886
924
|
*/
|
|
@@ -903,6 +941,7 @@ export namespace Components {
|
|
|
903
941
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
904
942
|
*/
|
|
905
943
|
"errorMessage": string;
|
|
944
|
+
"getValueAsync": () => Promise<number>;
|
|
906
945
|
/**
|
|
907
946
|
* Retorna se o conteúdo é inválido.
|
|
908
947
|
*/
|
|
@@ -930,7 +969,7 @@ export namespace Components {
|
|
|
930
969
|
/**
|
|
931
970
|
* Aplica o foco no campo.
|
|
932
971
|
*/
|
|
933
|
-
"setFocus": () => Promise<void>;
|
|
972
|
+
"setFocus": (options?: TFocusOptions) => Promise<void>;
|
|
934
973
|
/**
|
|
935
974
|
* Define o valor do campo.
|
|
936
975
|
*/
|
|
@@ -1049,14 +1088,27 @@ export namespace Components {
|
|
|
1049
1088
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
1050
1089
|
*/
|
|
1051
1090
|
"errorMessage": string;
|
|
1091
|
+
"getValueAsync": () => Promise<unknown>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
1094
|
+
*/
|
|
1095
|
+
"hideErrorOnFocusOut": boolean;
|
|
1052
1096
|
/**
|
|
1053
1097
|
* Retorna se o conteúdo é inválido.
|
|
1054
1098
|
*/
|
|
1055
1099
|
"isInvalid": () => Promise<boolean>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Informa se a pesquisa é do tipo texto.
|
|
1102
|
+
*/
|
|
1103
|
+
"isTextSearch": boolean;
|
|
1056
1104
|
/**
|
|
1057
1105
|
* Texto a ser apresentado como título do campo.
|
|
1058
1106
|
*/
|
|
1059
1107
|
"label": string;
|
|
1108
|
+
/**
|
|
1109
|
+
* Define um posicionamento fixo para a lista de opções do CheckBox.
|
|
1110
|
+
*/
|
|
1111
|
+
"listOptionsPosition": IEzCheckBoxListPosition1;
|
|
1060
1112
|
/**
|
|
1061
1113
|
* Define o tamanho do campo.
|
|
1062
1114
|
*/
|
|
@@ -1153,6 +1205,10 @@ export namespace Components {
|
|
|
1153
1205
|
* Se false deixa de exibir a mensagem de erro dentro do campo.
|
|
1154
1206
|
*/
|
|
1155
1207
|
"canShowError": boolean;
|
|
1208
|
+
/**
|
|
1209
|
+
* Ativa a opção de fazer resize do input.
|
|
1210
|
+
*/
|
|
1211
|
+
"enableResize": boolean;
|
|
1156
1212
|
/**
|
|
1157
1213
|
* Se false o usuário não pode interagir com o campo.
|
|
1158
1214
|
*/
|
|
@@ -1248,7 +1304,7 @@ export namespace Components {
|
|
|
1248
1304
|
/**
|
|
1249
1305
|
* Aplica o foco no campo.
|
|
1250
1306
|
*/
|
|
1251
|
-
"setFocus": () => Promise<void>;
|
|
1307
|
+
"setFocus": (options?: TFocusOptions) => Promise<void>;
|
|
1252
1308
|
/**
|
|
1253
1309
|
* Define o valor do campo.
|
|
1254
1310
|
*/
|
|
@@ -1286,7 +1342,7 @@ export namespace Components {
|
|
|
1286
1342
|
/**
|
|
1287
1343
|
* Aplica o foco no campo.
|
|
1288
1344
|
*/
|
|
1289
|
-
"setFocus": () => Promise<void>;
|
|
1345
|
+
"setFocus": ({ selectText }: TFocusOptions) => Promise<void>;
|
|
1290
1346
|
/**
|
|
1291
1347
|
* Se true considera segundos.
|
|
1292
1348
|
*/
|
|
@@ -1448,6 +1504,7 @@ export namespace Components {
|
|
|
1448
1504
|
"dataUnit": DataUnit;
|
|
1449
1505
|
"gridHeaderHidden": boolean;
|
|
1450
1506
|
"hide": () => Promise<void>;
|
|
1507
|
+
"noHeaderTaskBar": boolean;
|
|
1451
1508
|
"opened": boolean;
|
|
1452
1509
|
"options": IMultiSelectionOption[];
|
|
1453
1510
|
/**
|
|
@@ -2237,10 +2294,22 @@ declare namespace LocalJSX {
|
|
|
2237
2294
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
2238
2295
|
*/
|
|
2239
2296
|
"errorMessage"?: string;
|
|
2297
|
+
/**
|
|
2298
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
2299
|
+
*/
|
|
2300
|
+
"hideErrorOnFocusOut"?: boolean;
|
|
2301
|
+
/**
|
|
2302
|
+
* Informa se a pesquisa é do tipo texto.
|
|
2303
|
+
*/
|
|
2304
|
+
"isTextSearch"?: boolean;
|
|
2240
2305
|
/**
|
|
2241
2306
|
* Texto a ser apresentado como título do campo.
|
|
2242
2307
|
*/
|
|
2243
2308
|
"label"?: string;
|
|
2309
|
+
/**
|
|
2310
|
+
* Define um posicionamento fixo para a lista de opções do CheckBox.
|
|
2311
|
+
*/
|
|
2312
|
+
"listOptionsPosition"?: IEzCheckBoxListPosition;
|
|
2244
2313
|
/**
|
|
2245
2314
|
* Define o tamanho do campo.
|
|
2246
2315
|
*/
|
|
@@ -2511,6 +2580,10 @@ declare namespace LocalJSX {
|
|
|
2511
2580
|
* Evento disparado quando o formulário está disponível na DOM.
|
|
2512
2581
|
*/
|
|
2513
2582
|
"onEzReady"?: (event: EzFormCustomEvent<void>) => void;
|
|
2583
|
+
/**
|
|
2584
|
+
* Responsável por notificar quando ocorrer a renderização de itens do formulário.
|
|
2585
|
+
*/
|
|
2586
|
+
"onFormItemsReady"?: (event: EzFormCustomEvent<FormItems>) => void;
|
|
2514
2587
|
/**
|
|
2515
2588
|
* Define um validador responsável pela integridade dos registros.
|
|
2516
2589
|
*/
|
|
@@ -2525,8 +2598,16 @@ declare namespace LocalJSX {
|
|
|
2525
2598
|
* Evento emitido quando o componente foi totalmente carregado na DOM.
|
|
2526
2599
|
*/
|
|
2527
2600
|
"onEzContentReady"?: (event: EzFormViewCustomEvent<Array<HTMLElement>>) => void;
|
|
2601
|
+
/**
|
|
2602
|
+
* Responsável por notificar quando ocorrer a renderização de itens do formulário.
|
|
2603
|
+
*/
|
|
2604
|
+
"onFormItemsReady"?: (event: EzFormViewCustomEvent<FormItems>) => void;
|
|
2528
2605
|
}
|
|
2529
2606
|
interface EzGrid {
|
|
2607
|
+
/**
|
|
2608
|
+
* Define se a edição está habilitada na grid.
|
|
2609
|
+
*/
|
|
2610
|
+
"canEdit"?: boolean;
|
|
2530
2611
|
/**
|
|
2531
2612
|
* Define um `IMultiSelectionListDataSource` responsável por alimentar o filtro de colunas.
|
|
2532
2613
|
*/
|
|
@@ -2563,6 +2644,10 @@ declare namespace LocalJSX {
|
|
|
2563
2644
|
* Emitido quando acontece a alteração de seleção de linhas.
|
|
2564
2645
|
*/
|
|
2565
2646
|
"onEzSelectionChange"?: (event: EzGridCustomEvent<ISelection>) => void;
|
|
2647
|
+
/**
|
|
2648
|
+
* Define um validador responsável pela integridade dos registros.
|
|
2649
|
+
*/
|
|
2650
|
+
"recordsValidator"?: IRecordValidator;
|
|
2566
2651
|
/**
|
|
2567
2652
|
* Configuração da seleção de grade no toast.
|
|
2568
2653
|
*/
|
|
@@ -2575,6 +2660,10 @@ declare namespace LocalJSX {
|
|
|
2575
2660
|
* Define um `IStatusResolver` responsável pelo estado da coluna de status.
|
|
2576
2661
|
*/
|
|
2577
2662
|
"statusResolver"?: IStatusResolver | StatusResolverFunction;
|
|
2663
|
+
/**
|
|
2664
|
+
* Quando verdadeiro, o ENTER fará a navegação como se fosse a tecla TAB na grade.
|
|
2665
|
+
*/
|
|
2666
|
+
"useEnterLikeTab"?: boolean;
|
|
2578
2667
|
}
|
|
2579
2668
|
interface EzGuideNavigator {
|
|
2580
2669
|
/**
|
|
@@ -2741,6 +2830,10 @@ declare namespace LocalJSX {
|
|
|
2741
2830
|
* Classe que implementa o método fetchData, responsável por realizar a pesquisa dos dados, com base no termo informado pelo usuário.
|
|
2742
2831
|
*/
|
|
2743
2832
|
"dataSource"?: IMultiSelectionListDataSource;
|
|
2833
|
+
/**
|
|
2834
|
+
* Informa se a pesquisa é do tipo texto.
|
|
2835
|
+
*/
|
|
2836
|
+
"isTextSearch"?: boolean;
|
|
2744
2837
|
/**
|
|
2745
2838
|
* Evento que informa que a lista de opções selecionadas sofreu alteração.
|
|
2746
2839
|
*/
|
|
@@ -2905,10 +2998,22 @@ declare namespace LocalJSX {
|
|
|
2905
2998
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
2906
2999
|
*/
|
|
2907
3000
|
"errorMessage"?: string;
|
|
3001
|
+
/**
|
|
3002
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
3003
|
+
*/
|
|
3004
|
+
"hideErrorOnFocusOut"?: boolean;
|
|
3005
|
+
/**
|
|
3006
|
+
* Informa se a pesquisa é do tipo texto.
|
|
3007
|
+
*/
|
|
3008
|
+
"isTextSearch"?: boolean;
|
|
2908
3009
|
/**
|
|
2909
3010
|
* Texto a ser apresentado como título do campo.
|
|
2910
3011
|
*/
|
|
2911
3012
|
"label"?: string;
|
|
3013
|
+
/**
|
|
3014
|
+
* Define um posicionamento fixo para a lista de opções do CheckBox.
|
|
3015
|
+
*/
|
|
3016
|
+
"listOptionsPosition"?: IEzCheckBoxListPosition1;
|
|
2912
3017
|
/**
|
|
2913
3018
|
* Define o tamanho do campo.
|
|
2914
3019
|
*/
|
|
@@ -3004,6 +3109,10 @@ declare namespace LocalJSX {
|
|
|
3004
3109
|
* Se false deixa de exibir a mensagem de erro dentro do campo.
|
|
3005
3110
|
*/
|
|
3006
3111
|
"canShowError"?: boolean;
|
|
3112
|
+
/**
|
|
3113
|
+
* Ativa a opção de fazer resize do input.
|
|
3114
|
+
*/
|
|
3115
|
+
"enableResize"?: boolean;
|
|
3007
3116
|
/**
|
|
3008
3117
|
* Se false o usuário não pode interagir com o campo.
|
|
3009
3118
|
*/
|
|
@@ -3241,6 +3350,7 @@ declare namespace LocalJSX {
|
|
|
3241
3350
|
"dataSource"?: IMultiSelectionListDataSource;
|
|
3242
3351
|
"dataUnit"?: DataUnit;
|
|
3243
3352
|
"gridHeaderHidden"?: boolean;
|
|
3353
|
+
"noHeaderTaskBar"?: boolean;
|
|
3244
3354
|
"onApplyFilterColumnOptions"?: (event: FilterColumnCustomEvent<IAppliedFilterColumnOptions>) => void;
|
|
3245
3355
|
"opened"?: boolean;
|
|
3246
3356
|
"options"?: IMultiSelectionOption[];
|
|
@@ -6,7 +6,7 @@ export default class DataBinder implements DUActionInterceptor {
|
|
|
6
6
|
private _dataUnit;
|
|
7
7
|
private _fields;
|
|
8
8
|
private _formMetadata;
|
|
9
|
-
private
|
|
9
|
+
private _recordValidatorProcessor;
|
|
10
10
|
constructor(dataUnit: DataUnit);
|
|
11
11
|
private applyDefaultValues;
|
|
12
12
|
bind(fields: Array<HTMLElement>, currentContextName: string, formMetadata: FormMetadata, recordsValidator: IRecordValidator): void;
|
|
@@ -16,8 +16,6 @@ export default class DataBinder implements DUActionInterceptor {
|
|
|
16
16
|
private clearInvalid;
|
|
17
17
|
private updateValue;
|
|
18
18
|
validate(): Promise<void>;
|
|
19
|
-
private validateRequired;
|
|
20
|
-
private processValidationResult;
|
|
21
19
|
private updateErrorMessage;
|
|
22
20
|
private getErrorMessage;
|
|
23
21
|
private updateBind;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { IInvalidField } from "
|
|
2
|
-
export { IValidationResult } from "
|
|
3
|
-
export { IFieldConfig } from "
|
|
1
|
+
export { IInvalidField } from "../../validators/recordvalidator/IInvalidField";
|
|
2
|
+
export { IValidationResult } from "../../validators/recordvalidator/IValidationResult";
|
|
3
|
+
export { IFieldConfig } from "../../interfaces/IFieldConfig";
|
|
4
4
|
export { IFormConfig } from "./IFormConfig";
|
|
5
5
|
export { IFormSheetMetadata } from "./IFormSheetMetadata";
|
|
6
6
|
export { ITabConfig } from "./ITabConfig";
|
|
7
7
|
export { IDefaultConfig } from "./IDefaultConfig";
|
|
8
|
-
export { IRecordValidator } from "
|
|
8
|
+
export { IRecordValidator } from "../../validators/recordvalidator/IRecordValidator";
|
|
9
9
|
export { IFormCardConfig } from "./IFormCardConfig";
|
|
10
10
|
export { ISummaryField } from "./ISummaryField";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FieldDescriptor, UserInterface } from "@sankhyalabs/core";
|
|
2
|
+
import { IOption, ISearchArgument } from "../../components/ez-combo-box/ez-combo-box";
|
|
3
|
+
import { IFieldConfig } from "./IFieldConfig";
|
|
4
|
+
export default interface IAbstractFieldMetadata {
|
|
5
|
+
userInterface: UserInterface;
|
|
6
|
+
name: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
group?: string;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
props?: any;
|
|
12
|
+
contextName?: string;
|
|
13
|
+
canShowError?: boolean;
|
|
14
|
+
rows?: number;
|
|
15
|
+
optionLoader?: (argument: ISearchArgument) => Promise<Array<IOption>> | Array<IOption> | IOption;
|
|
16
|
+
}
|
|
17
|
+
export declare const buildFieldMetadata: (descriptor: FieldDescriptor, config?: IFieldConfig) => IAbstractFieldMetadata;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDefaultConfig } from "
|
|
2
|
-
import { ITabConfig } from "
|
|
1
|
+
import { IDefaultConfig } from "../form/interfaces/IDefaultConfig";
|
|
2
|
+
import { ITabConfig } from "../form/interfaces/ITabConfig";
|
|
3
3
|
export interface IFieldConfig {
|
|
4
4
|
name: string;
|
|
5
5
|
label?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DataUnit } from "@sankhyalabs/core";
|
|
2
|
+
import { IRecordValidator } from "../../form/interfaces";
|
|
3
|
+
import { IValidationSource } from "./IValidationSource";
|
|
4
|
+
export declare class RecordValidationProcessor {
|
|
5
|
+
private _dataUnit;
|
|
6
|
+
private _validationSource;
|
|
7
|
+
private _validator;
|
|
8
|
+
constructor(dataUnit: DataUnit, validationSource: IValidationSource, validator: IRecordValidator);
|
|
9
|
+
validate(): Promise<void>;
|
|
10
|
+
private validateRequired;
|
|
11
|
+
private processValidationResult;
|
|
12
|
+
private markAsInvalid;
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sankhyalabs/ezui",
|
|
3
|
-
"version": "5.10
|
|
3
|
+
"version": "5.11.0-dev.10",
|
|
4
4
|
"description": "Biblioteca de componentes Sankhya.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
38
|
-
"url": "https://
|
|
38
|
+
"url": "https://gitlab.sankhya.com.br/dti/design-system/ez-ui.git"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@babel/preset-env": "^7.16.11",
|
|
50
50
|
"@commitlint/cli": "^18.4.3",
|
|
51
51
|
"@commitlint/config-conventional": "^18.4.3",
|
|
52
|
-
"@sankhyalabs/core": "^
|
|
52
|
+
"@sankhyalabs/core": "^5.9.0",
|
|
53
53
|
"@sankhyalabs/docscss": "^1.0.4",
|
|
54
54
|
"@sankhyalabs/ez-design": "^4.0.0",
|
|
55
55
|
"@sankhyalabs/skippeerdeps": "^1.0.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,g as e}from"./p-e318d280.js";import{NumberUtils as h,ElementIDUtils as r}from"@sankhyalabs/core";import{C as a}from"./p-4a5e37a7.js";const o=class{constructor(i){t(this,i),this.ezChange=s(this,"ezChange",7),this.ezStartChange=s(this,"ezStartChange",7),this.ezCancelWaitingChange=s(this,"ezCancelWaitingChange",7),this._focused=!1,this.label=void 0,this.value=void 0,this.enabled=!0,this.canShowError=!0,this.errorMessage=void 0,this.precision=void 0,this.prettyPrecision=void 0,this.mode="regular"}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}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,s){if(this._textInput&&t!=s){const i=this.validateValue(t),e=this.validateValue(s);if(null===i&&(this._textInput.value=""),i!=e){const t=this.getTextValue(i)||"";(this._textInput.value||"")!==t&&(void 0===this.getParsedNumber(t)&&this._focused||(this._textInput.value=t,this._focused=!1,this.errorMessage="")),this.ezChange.emit(null===i?void 0:i)}}}validateValue(t){return isNaN(t)||void 0===t?null:t}getTextValue(t){if(null!=t)return this.precision>0?h.format(t.toString(),Number(this.precision),Number(this.prettyPrecision)):t.toString()}changeValue(t){this.errorMessage="",this.value!=t?this.value=void 0===t?null:t:(this.setInputValue(),this.ezCancelWaitingChange.emit())}setError(t){this.value=null,this.errorMessage=t,this.ezCancelWaitingChange.emit()}handleBlur(){const t=this.getParsedNumber();if(void 0!==t&&isNaN(t))this.setError("O valor digitado não é um número válido");else try{this.changeValue(t)}catch(t){return void this.setError(t.message)}}handleInput(){this.getParsedNumber()!==this.value&&(this._focused=!0,this.ezStartChange.emit({waitmessage:"",blocking:!1}))}getParsedNumber(t){var s;return void 0===t&&(t=null===(s=this._textInput)||void 0===s?void 0:s.value),(null==t?void 0:t.trim())?h.stringToNumber(t):void 0}setInputValue(){const t=this.getTextValue(this.value)||"";(this._textInput.value||"")!==t&&(this._textInput.value=t)}componentDidLoad(){a.applyVarsTextInput(this._elem,this._textInput),this.setInputValue()}render(){return r.addIDInfoIfNotExists(this._elem,"input"),i("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",label:this.label,onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),restrict:this.precision>0?"0123456789-,.":"0123456789-",enabled:this.enabled,errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError})}get _elem(){return e(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};o.style=":host{display:block;width:100%}";export{o as ez_number_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e,g as h}from"./p-e318d280.js";import{TimeFormatter as r,MaskFormatter as a,NumberUtils as o,ElementIDUtils as n}from"@sankhyalabs/core";import{C as l}from"./p-4a5e37a7.js";const u=class{constructor(i){t(this,i),this.ezChange=s(this,"ezChange",7),this.ezStartChange=s(this,"ezStartChange",7),this.ezCancelWaitingChange=s(this,"ezCancelWaitingChange",7),this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.showSeconds=!1,this.mode="regular",this.canShowError=!0}observeErrorMessage(){var t;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(t=this.errorMessage)||void 0===t?void 0:t.trim())||(this.prepareValue(this._viewValue),(this._textInput.value||"")!==this._viewValue&&(this._textInput.value=this._viewValue)))}observeShowSeconds(){this.prepareMask(this.showSeconds?"##:##:##":"##:##")}observeValue(t,s){if(this._textInput&&t!=s){let i=this.validateValue(t);i!=this.validateValue(s)&&(this._viewValue=null==i?"":i.toString(),this.prepareValue(this._viewValue),this._viewValue&&!r.validateTime(this._viewValue,this.showSeconds)?(this.setError("Favor inserir um horário válido."),i=void 0):this.setError(""),this.ezChange.emit(null===i?void 0:i))}}prepareMask(t){null==this._maskFormatter?this._maskFormatter=new a(t):this._maskFormatter.mask=t}validateValue(t){return isNaN(t)||void 0===t?null:t}setError(t){this.errorMessage=t,this._textInput&&(null==t?void 0:t.trim())&&this.ezCancelWaitingChange.emit()}getViewValue(){return this._viewValue}prepareValue(t){try{this._viewValue=r.prepareValue(t,this.showSeconds),this._textInput&&this._textInput.value!==this._viewValue&&(this._textInput.value=this._viewValue)}catch(t){this.setError(t.message)}}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}handleBlur(){this._textInput&&(this._viewValue=this._textInput.value,this.prepareValue(this._viewValue),this.value=o.stringToNumber(this._viewValue.replace(/\D/g,"")))}handleInput(){o.stringToNumber(this._textInput.value.replace(/\D/g,""))!==this.value&&this.ezStartChange.emit({waitmessage:"",blocking:!1})}componentDidLoad(){l.applyVarsTextInput(this._elem,this._textInput)}componentWillLoad(){this.observeShowSeconds(),this.value?this.prepareValue(this.value.toString()):this._viewValue&&this.prepareValue(this._viewValue)}render(){return n.addIDInfoIfNotExists(this._elem,"input"),i(e,null,i("ez-text-input",{"data-element-id":n.getInternalIDInfo("textInput"),ref:t=>this._textInput=t,"data-slave-mode":"true",value:this._viewValue,enabled:this.enabled,label:this.label,restrict:"0123456789:",onBlur:()=>this.handleBlur(),onInput:()=>this.handleInput(),errorMessage:this.errorMessage,mode:this.mode,canShowError:this.canShowError},i("ez-icon",{slot:"leftIcon",iconName:"timer-outline"})))}static get assetsDirs(){return["../assets"]}get _elem(){return h(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],showSeconds:["observeShowSeconds"],value:["observeValue"]}}};u.style=":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";export{u as ez_time_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as s,c as t,h as e,g as i}from"./p-e318d280.js";import{C as h}from"./p-4a5e37a7.js";import{ElementIDUtils as o}from"@sankhyalabs/core";const r=class{constructor(e){s(this,e),this.ezChange=t(this,"ezChange",7),this.value=void 0,this.label=void 0,this.enabled=!0,this.errorMessage=void 0,this.optionLoader=void 0,this.showSelectedValue=!0,this.showOptionValue=!0,this.suppressEmptyOption=!1,this.mode="regular",this.canShowError=!0}observeErrorMessage(){this._comboElement&&(this._comboElement.errorMessage=this.errorMessage)}observeValue(){this._comboElement&&(this._comboElement.value=this.value)}async setFocus(){this._comboElement.setFocus()}async setBlur(){this._comboElement.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){var s,t;null===(t=null===(s=this._comboElement)||void 0===s?void 0:s.clearValue)||void 0===t||t.call(s)}onComboChange(s){s.stopPropagation(),this.value=s.detail,this.ezChange.emit(s.detail),this.errorMessage!==this._comboElement.errorMessage&&(this.errorMessage=this._comboElement.errorMessage)}componentDidLoad(){h.applyVarsTextInput(this._elem,this._comboElement)}render(){return o.addIDInfoIfNotExists(this._elem,"input"),e("ez-combo-box",{"data-element-id":o.getInternalIDInfo("combo"),ref:s=>this._comboElement=s,value:this.value,label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,optionLoader:this.optionLoader,searchMode:!0,onEzChange:s=>this.onComboChange(s),showSelectedValue:this.showSelectedValue,showOptionValue:this.showOptionValue,suppressEmptyOption:this.suppressEmptyOption,mode:this.mode,canShowError:this.canShowError})}get _elem(){return i(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"]}}};r.style=":host{width:100%}";export{r as ez_search}
|