@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-71826.0 → 0.0.0-bugfix-dev-KB-60622.0
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/{RecordValidationProcessor-4c893e04.js → RecordValidationProcessor-10846595.js} +7 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_3.cjs.entry.js +13 -4
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-grid.cjs.entry.js +254 -18
- package/dist/cjs/ez-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +3 -3
- package/dist/cjs/ez-search.cjs.entry.js +5 -6
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +2 -2
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-button/ez-button.css +2 -2
- package/dist/collection/components/ez-card-item/ez-card-item.css +60 -10
- package/dist/collection/components/ez-card-item/ez-card-item.js +30 -3
- package/dist/collection/components/ez-check/ez-check.css +1 -6
- package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +106 -4
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +83 -5
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +57 -6
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +1 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/test/constants/GridEditionMock.js +1 -0
- package/dist/collection/components/ez-grid/ez-grid.js +43 -1
- package/dist/collection/components/ez-list/ez-list.css +2 -1
- package/dist/collection/components/ez-modal/ez-modal.css +1 -1
- package/dist/collection/components/ez-modal-container/ez-modal-container.js +1 -1
- package/dist/collection/components/ez-scroller/ez-scroller.css +1 -0
- package/dist/collection/components/ez-search/ez-search.css +19 -8
- package/dist/collection/components/ez-search/ez-search.js +7 -26
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +3 -0
- package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +1 -1
- package/dist/collection/components/ez-sidebar-navigator/ez-sidebar-navigator.css +3 -1
- package/dist/collection/components/ez-split-button/ez-split-button.css +1 -1
- package/dist/collection/components/ez-split-button/ez-split-button.js +3 -3
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +1 -0
- package/dist/collection/utils/form/DataBinder.js +1 -1
- package/dist/collection/utils/validators/recordvalidator/IInvalidCells.js +1 -0
- package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +7 -1
- package/dist/custom-elements/index.js +295 -45
- package/dist/esm/{RecordValidationProcessor-b00b8b77.js → RecordValidationProcessor-9c6cc267.js} +7 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-card-item_3.entry.js +13 -4
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-grid.entry.js +254 -18
- package/dist/esm/ez-list.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +3 -3
- package/dist/esm/ez-search.entry.js +5 -6
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +2 -2
- package/dist/esm/ez-split-item.entry.js +1 -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-2480e948.entry.js +1 -0
- package/dist/ezui/p-39b31672.entry.js +1 -0
- package/dist/ezui/{p-81cffa53.entry.js → p-4b5f83a4.entry.js} +1 -1
- package/dist/ezui/p-554522db.entry.js +1 -0
- package/dist/ezui/p-93d355a1.entry.js +1 -0
- package/dist/ezui/{p-ee9315ff.entry.js → p-a7490128.entry.js} +1 -1
- package/dist/ezui/p-a921e3e7.entry.js +1 -0
- package/dist/ezui/{p-860681b8.entry.js → p-b82be651.entry.js} +2 -2
- package/dist/ezui/p-b858fc6e.entry.js +1 -0
- package/dist/ezui/p-b9fa2526.entry.js +1 -0
- package/dist/ezui/{p-9aa27e69.entry.js → p-bef7daac.entry.js} +1 -1
- package/dist/ezui/{p-3141ee18.entry.js → p-e03c2774.entry.js} +1 -1
- package/dist/ezui/{p-33792b2b.entry.js → p-e18d9e6a.entry.js} +1 -1
- package/dist/ezui/{p-31674f8e.entry.js → p-e7395eae.entry.js} +1 -1
- package/dist/ezui/p-f42855b9.js +1 -0
- package/dist/types/components/ez-card-item/ez-card-item.d.ts +5 -0
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +32 -4
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +19 -3
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +18 -0
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +13 -2
- package/dist/types/components/ez-grid/ez-grid.d.ts +9 -0
- package/dist/types/components/ez-search/ez-search.d.ts +2 -6
- package/dist/types/components/ez-split-button/ez-split-button.d.ts +1 -1
- package/dist/types/components.d.ts +34 -18
- package/dist/types/utils/validators/recordvalidator/IInvalidCells.d.ts +5 -0
- package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +1 -1
- package/package.json +1 -1
- package/dist/ezui/p-04f24913.js +0 -1
- package/dist/ezui/p-0ee0ac03.entry.js +0 -1
- package/dist/ezui/p-55324014.entry.js +0 -1
- package/dist/ezui/p-752c4069.entry.js +0 -1
- package/dist/ezui/p-81f99ace.entry.js +0 -1
- package/dist/ezui/p-9634631d.entry.js +0 -1
- package/dist/ezui/p-9a23d513.entry.js +0 -1
- package/dist/ezui/p-f1c3f85d.entry.js +0 -1
|
@@ -35,8 +35,7 @@ export class EzSearch {
|
|
|
35
35
|
this.ignoreLimitCharsToSearch = false;
|
|
36
36
|
this.options = undefined;
|
|
37
37
|
this.suppressSearch = false;
|
|
38
|
-
this.
|
|
39
|
-
this.suppressPreLoad = false;
|
|
38
|
+
this.fromGrid = false;
|
|
40
39
|
}
|
|
41
40
|
observeErrorMessage() {
|
|
42
41
|
var _a;
|
|
@@ -69,7 +68,7 @@ export class EzSearch {
|
|
|
69
68
|
}
|
|
70
69
|
}
|
|
71
70
|
observeOptions(newOptions, oldOptions) {
|
|
72
|
-
if (!newOptions.length && this.
|
|
71
|
+
if (!newOptions.length && this.fromGrid)
|
|
73
72
|
return;
|
|
74
73
|
if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
|
|
75
74
|
return;
|
|
@@ -271,7 +270,7 @@ export class EzSearch {
|
|
|
271
270
|
title: opt.label,
|
|
272
271
|
details: opt.details
|
|
273
272
|
};
|
|
274
|
-
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index }, h("ez-card-item", { item: card }));
|
|
273
|
+
return h("div", { style: { "height": "100%" }, class: index === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.createOption(card), onMouseOver: () => this._preSelection = index }, h("ez-card-item", { item: card, compacted: true }));
|
|
275
274
|
}
|
|
276
275
|
showOptions() {
|
|
277
276
|
if (!this.enabled)
|
|
@@ -663,7 +662,7 @@ export class EzSearch {
|
|
|
663
662
|
render() {
|
|
664
663
|
var _a;
|
|
665
664
|
ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
|
|
666
|
-
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "search" })), (((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value) || this.
|
|
665
|
+
return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, h("button", { class: "btn", slot: "leftIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, h("ez-icon", { iconName: "search" })), (((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value) || this.fromGrid)
|
|
667
666
|
? h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, h("ez-icon", { iconName: "close" }))
|
|
668
667
|
: undefined), h("section", { class: "list-container", ref: elem => this._listContainer = elem }, h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
|
|
669
668
|
&& this._visibleOptions.length === 0
|
|
@@ -989,7 +988,7 @@ export class EzSearch {
|
|
|
989
988
|
"reflect": false,
|
|
990
989
|
"defaultValue": "false"
|
|
991
990
|
},
|
|
992
|
-
"
|
|
991
|
+
"fromGrid": {
|
|
993
992
|
"type": "boolean",
|
|
994
993
|
"mutable": false,
|
|
995
994
|
"complexType": {
|
|
@@ -1001,27 +1000,9 @@ export class EzSearch {
|
|
|
1001
1000
|
"optional": false,
|
|
1002
1001
|
"docs": {
|
|
1003
1002
|
"tags": [],
|
|
1004
|
-
"text": "
|
|
1003
|
+
"text": "Informa se o componente est\u00E1 instanciado de dentro de uma grade"
|
|
1005
1004
|
},
|
|
1006
|
-
"attribute": "
|
|
1007
|
-
"reflect": false,
|
|
1008
|
-
"defaultValue": "false"
|
|
1009
|
-
},
|
|
1010
|
-
"suppressPreLoad": {
|
|
1011
|
-
"type": "boolean",
|
|
1012
|
-
"mutable": false,
|
|
1013
|
-
"complexType": {
|
|
1014
|
-
"original": "boolean",
|
|
1015
|
-
"resolved": "boolean",
|
|
1016
|
-
"references": {}
|
|
1017
|
-
},
|
|
1018
|
-
"required": false,
|
|
1019
|
-
"optional": false,
|
|
1020
|
-
"docs": {
|
|
1021
|
-
"tags": [],
|
|
1022
|
-
"text": "Se true, desabilita pr\u00E9-load das op\u00E7\u00F5es ao carregar componente"
|
|
1023
|
-
},
|
|
1024
|
-
"attribute": "suppress-pre-load",
|
|
1005
|
+
"attribute": "from-grid",
|
|
1025
1006
|
"reflect": false,
|
|
1026
1007
|
"defaultValue": "false"
|
|
1027
1008
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
--ez-sidebar-button--hover--width: 12px;
|
|
9
9
|
/*@doc Define a altura do span do botão.*/
|
|
10
10
|
--ez-sidebar-button--height: 96px;
|
|
11
|
+
/*@doc Define a camada em que o componente será exibido.*/
|
|
12
|
+
--ez-sidebar-navigator-button--z-index: var(--elevation--20, 20);
|
|
11
13
|
|
|
12
14
|
/* cor */
|
|
13
15
|
/*@doc Define a cor de fundo do botão.*/
|
|
@@ -35,6 +37,7 @@
|
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
button {
|
|
40
|
+
z-index: var(--ez-sidebar-navigator-button--z-index);
|
|
38
41
|
position: absolute;
|
|
39
42
|
display: flex;
|
|
40
43
|
background: var(--ez-sidebar-button--background-color--xlight);
|
|
@@ -11,7 +11,7 @@ export class EzSidebarButton {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h("button", { type: "button", onClick: () => { this.ezClick.emit(); }, ref: (el) => this._button = el }, h("span", null), h("ez-icon", { iconName: "chevron-right" })));
|
|
14
|
+
return (h("button", { type: "button", onClick: () => { this.ezClick.emit(); }, ref: (el) => this._button = el }, h("span", null), h("ez-icon", { iconName: "chevron-right", size: "small" })));
|
|
15
15
|
}
|
|
16
16
|
static get is() { return "ez-sidebar-button"; }
|
|
17
17
|
static get encapsulation() { return "shadow"; }
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
--ez-sidebar-navigator--border-radius: 0px var(--border--radius-medium) var(--border--radius-medium) 0px;
|
|
15
15
|
/*@doc Força uma altura especifica para o sidebar, o padrão é 100% da tela*/
|
|
16
16
|
--ez-sidebar-navigator--height: calc(100vh - var(--space--lg, 24px));
|
|
17
|
+
/*@doc Define a camada em que o componente será exibido.*/
|
|
18
|
+
--ez-sidebar-navigator--z-index: var(--elevation--20, 20);
|
|
17
19
|
|
|
18
20
|
/*Labels Header */
|
|
19
21
|
/*@doc Define o espaçamento entre os componente do cabeçalho*/
|
|
@@ -124,7 +126,7 @@
|
|
|
124
126
|
|
|
125
127
|
.dynamic {
|
|
126
128
|
position: absolute;
|
|
127
|
-
z-index: var(--
|
|
129
|
+
z-index: var(--ez-sidebar-navigator--z-index);
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
.fixed {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
/*@doc Define a cor do label.*/
|
|
24
24
|
--ez-split-button--color: var(--title--primary, #FFF);
|
|
25
25
|
/*@doc Define o tamanho do label.*/
|
|
26
|
-
--ez-split-button--font-size: var(--text--
|
|
26
|
+
--ez-split-button--font-size: var(--text--small, 12px);
|
|
27
27
|
/*@doc Define a família da fonte do label.*/
|
|
28
28
|
--ez-split-button--font-family: var(--font-pattern, Arial);
|
|
29
29
|
/*@doc Define o peso da fonte do label.*/
|
|
@@ -42,7 +42,7 @@ export class EzSplitButton {
|
|
|
42
42
|
}
|
|
43
43
|
getIconSize(sizeParam = 'medium') {
|
|
44
44
|
var _a;
|
|
45
|
-
const sizeList = ['medium', 'large'];
|
|
45
|
+
const sizeList = ['small', 'medium', 'large'];
|
|
46
46
|
const sizeLowerCase = (_a = this.size) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
47
47
|
return sizeList.includes(sizeLowerCase) ? sizeLowerCase : sizeParam;
|
|
48
48
|
}
|
|
@@ -311,8 +311,8 @@ export class EzSplitButton {
|
|
|
311
311
|
"type": "string",
|
|
312
312
|
"mutable": false,
|
|
313
313
|
"complexType": {
|
|
314
|
-
"original": "'medium' | 'large'",
|
|
315
|
-
"resolved": "\"large\" | \"medium\"",
|
|
314
|
+
"original": "'small' | 'medium' | 'large'",
|
|
315
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
316
316
|
"references": {}
|
|
317
317
|
},
|
|
318
318
|
"required": false,
|
|
@@ -69,7 +69,7 @@ export default class DataBinder {
|
|
|
69
69
|
this._recordValidatorProcessor = new RecordValidationProcessor(this._dataUnit, {
|
|
70
70
|
getRequiredFields: () => this._formMetadata.getRequiredFields(),
|
|
71
71
|
markAsInvalid: field => this.markInvalid(field),
|
|
72
|
-
getMessageForField: field => this.getErrorMessage(field)
|
|
72
|
+
getMessageForField: field => this.getErrorMessage(field),
|
|
73
73
|
}, recordsValidator);
|
|
74
74
|
}
|
|
75
75
|
disconnectDataUnit() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,7 +5,7 @@ export class RecordValidationProcessor {
|
|
|
5
5
|
this._validationSource = validationSource;
|
|
6
6
|
this._validator = validator;
|
|
7
7
|
}
|
|
8
|
-
validate() {
|
|
8
|
+
validate(isSaving = true) {
|
|
9
9
|
return new Promise((accept, reject) => {
|
|
10
10
|
const records = this._dataUnit.getModifiedRecords();
|
|
11
11
|
for (let i = 0; i < records.length; i++) {
|
|
@@ -22,6 +22,11 @@ export class RecordValidationProcessor {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
if (invalidResults.length > 0) {
|
|
25
|
+
if (!isSaving && invalidResults[0].invalidFields.length > 0) {
|
|
26
|
+
this._validationSource.markAsInvalid(invalidResults[0].invalidFields[0], record.__record__id__);
|
|
27
|
+
reject();
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
25
30
|
this.processValidationResult(invalidResults, record.__record__id__);
|
|
26
31
|
reject();
|
|
27
32
|
break;
|
|
@@ -53,6 +58,7 @@ export class RecordValidationProcessor {
|
|
|
53
58
|
processValidationResult(validationResult, recordId) {
|
|
54
59
|
validationResult.forEach(invalidResult => {
|
|
55
60
|
const invalidFields = invalidResult.invalidFields;
|
|
61
|
+
this._dataUnit.savingCanceled(invalidFields, recordId);
|
|
56
62
|
if (invalidFields) {
|
|
57
63
|
invalidFields.forEach(field => {
|
|
58
64
|
this.markAsInvalid(field, recordId);
|