@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-78812-2.0 → 0.0.0-bugfix-dev-KB-76362.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/RecordValidationProcessor-10846595.js +108 -0
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item_3.cjs.entry.js +19 -12
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +10 -46
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +2 -3
- package/dist/cjs/ez-date-input.cjs.entry.js +2 -8
- package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -8
- package/dist/cjs/ez-dialog.cjs.entry.js +2 -10
- package/dist/cjs/ez-form-view.cjs.entry.js +2 -2
- package/dist/cjs/ez-form.cjs.entry.js +325 -5
- package/dist/cjs/ez-grid.cjs.entry.js +70518 -14636
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +100 -151
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +0 -7
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +22 -67
- package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js +4 -14
- package/dist/cjs/ez-text-area.cjs.entry.js +4 -66
- package/dist/cjs/ez-text-input.cjs.entry.js +7 -49
- package/dist/cjs/ez-time-input.cjs.entry.js +0 -6
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ez-button/ez-button.css +2 -2
- package/dist/collection/components/ez-card-item/ez-card-item.css +5 -14
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +14 -75
- package/dist/collection/components/ez-date-input/ez-date-input.js +4 -35
- package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +4 -35
- package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
- package/dist/collection/components/ez-dialog/ez-dialog.js +1 -9
- package/dist/collection/components/ez-filter-input/ez-filter-input.css +11 -0
- package/dist/collection/components/ez-filter-input/ez-filter-input.js +52 -22
- package/dist/collection/components/ez-form/ez-form.js +0 -1
- package/dist/collection/components/ez-form-view/custom-input/ez-custom-form-input.js +2 -3
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +27 -100
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +0 -8
- package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +46 -164
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +0 -7
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +0 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +1 -4
- package/dist/collection/components/ez-grid/ez-grid.js +3 -90
- package/dist/collection/components/ez-icon/ez-icon.css +149 -153
- package/dist/collection/components/ez-list/ez-list.css +5 -5
- package/dist/collection/components/ez-list/ez-list.js +170 -152
- package/dist/collection/components/ez-modal/ez-modal.css +0 -4
- package/dist/collection/components/ez-modal/ez-modal.js +2 -2
- package/dist/collection/components/ez-number-input/ez-number-input.js +0 -25
- package/dist/collection/components/ez-popover/ez-popover.css +10 -3
- package/dist/collection/components/ez-popup/ez-popup.css +8 -4
- package/dist/collection/components/ez-search/ez-search.css +1 -1
- package/dist/collection/components/ez-search/ez-search.js +24 -94
- package/dist/collection/components/ez-split-button/ez-split-button.css +2 -2
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +4 -35
- package/dist/collection/components/ez-text-area/ez-text-area.css +0 -49
- package/dist/collection/components/ez-text-area/ez-text-area.js +2 -102
- package/dist/collection/components/ez-text-input/ez-text-input.css +53 -27
- package/dist/collection/components/ez-text-input/ez-text-input.js +6 -84
- package/dist/collection/components/ez-time-input/ez-time-input.js +0 -24
- package/dist/collection/utils/form/DataBinder.js +3 -18
- package/dist/collection/utils/form/FormMetadata.js +1 -1
- package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/custom-elements/index.js +71099 -15536
- package/dist/esm/RecordValidationProcessor-9c6cc267.js +105 -0
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-card-item_3.entry.js +19 -12
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +11 -47
- package/dist/esm/ez-custom-form-input_2.entry.js +2 -3
- package/dist/esm/ez-date-input.entry.js +2 -8
- package/dist/esm/ez-date-time-input.entry.js +2 -8
- package/dist/esm/ez-dialog.entry.js +2 -10
- package/dist/esm/ez-form-view.entry.js +2 -2
- package/dist/esm/ez-form.entry.js +324 -4
- package/dist/esm/ez-grid.entry.js +70545 -14663
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +101 -152
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +0 -7
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +22 -67
- package/dist/esm/ez-split-button.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js +5 -15
- package/dist/esm/ez-text-area.entry.js +4 -66
- package/dist/esm/ez-text-input.entry.js +7 -49
- package/dist/esm/ez-time-input.entry.js +0 -6
- 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-00687830.entry.js +1 -0
- package/dist/ezui/p-044d46d5.entry.js +1 -0
- package/dist/ezui/p-11b09aa1.entry.js +1 -0
- package/dist/ezui/p-190c190f.entry.js +304 -0
- package/dist/ezui/p-2de9f0aa.entry.js +1 -0
- package/dist/ezui/p-36180f4d.entry.js +1 -0
- package/dist/ezui/{p-2f53435e.entry.js → p-3b546374.entry.js} +1 -1
- package/dist/ezui/p-3f8c33e0.entry.js +1 -0
- package/dist/ezui/p-52100a6e.entry.js +1 -0
- package/dist/ezui/p-5a40c77a.entry.js +1 -0
- package/dist/ezui/p-61059f6b.entry.js +1 -0
- package/dist/ezui/p-68267f59.entry.js +1 -0
- package/dist/ezui/p-823cc11b.entry.js +1 -0
- package/dist/ezui/p-85b500bb.entry.js +1 -0
- package/dist/ezui/p-8ac13678.entry.js +1 -0
- package/dist/ezui/p-940760bf.entry.js +1 -0
- package/dist/ezui/p-9e08ddb0.entry.js +1 -0
- package/dist/ezui/p-b2a1398f.entry.js +1 -0
- package/dist/ezui/p-ba5f4ee7.entry.js +1 -0
- package/dist/ezui/p-d40b93a7.entry.js +1 -0
- package/dist/ezui/p-d4aba783.entry.js +1 -0
- package/dist/ezui/p-e3ec7422.entry.js +1 -0
- package/dist/ezui/p-f291db18.entry.js +1 -0
- package/dist/ezui/p-f42855b9.js +1 -0
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -7
- package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -6
- package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +1 -6
- package/dist/types/components/ez-dialog/ez-dialog.d.ts +0 -2
- package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +11 -4
- package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/EzGridController.d.ts +0 -12
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -7
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -2
- package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -19
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +1 -3
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
- package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +0 -1
- package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +1 -11
- package/dist/types/components/ez-list/ez-list.d.ts +26 -3
- package/dist/types/components/ez-modal/ez-modal.d.ts +1 -1
- package/dist/types/components/ez-number-input/ez-number-input.d.ts +0 -4
- package/dist/types/components/ez-search/ez-search.d.ts +2 -10
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +0 -4
- package/dist/types/components/ez-text-area/ez-text-area.d.ts +0 -17
- package/dist/types/components/ez-text-input/ez-text-input.d.ts +0 -9
- package/dist/types/components/ez-time-input/ez-time-input.d.ts +0 -4
- package/dist/types/components.d.ts +44 -114
- package/dist/types/utils/form/DataBinder.d.ts +0 -3
- package/package.json +4 -11
- package/dist/cjs/DataBinder-3b083480.js +0 -445
- package/dist/cjs/FocusResolver-885f2173.js +0 -35
- package/dist/collection/components/ez-split-panel/interfaces/IPanelSizeInfo.js +0 -1
- package/dist/collection/utils/FocusResolver.js +0 -31
- package/dist/esm/DataBinder-02fa9bb9.js +0 -441
- package/dist/esm/FocusResolver-1ccbf850.js +0 -33
- package/dist/ezui/p-16e21a40.entry.js +0 -1
- package/dist/ezui/p-33675dae.entry.js +0 -1
- package/dist/ezui/p-397e3026.entry.js +0 -1
- package/dist/ezui/p-3af64edd.entry.js +0 -1
- package/dist/ezui/p-3c10cd94.entry.js +0 -1
- package/dist/ezui/p-3cc9b84a.entry.js +0 -1
- package/dist/ezui/p-3d38bfea.entry.js +0 -1
- package/dist/ezui/p-455e737c.js +0 -1
- package/dist/ezui/p-46a46507.entry.js +0 -1
- package/dist/ezui/p-6bc25bc8.entry.js +0 -1
- package/dist/ezui/p-6bda82d1.entry.js +0 -1
- package/dist/ezui/p-6d31c43c.entry.js +0 -1
- package/dist/ezui/p-7f5afb1f.entry.js +0 -1
- package/dist/ezui/p-8f026744.entry.js +0 -1
- package/dist/ezui/p-9fddffe3.entry.js +0 -309
- package/dist/ezui/p-a4ee2991.entry.js +0 -1
- package/dist/ezui/p-aa7779d0.entry.js +0 -1
- package/dist/ezui/p-be34c77f.entry.js +0 -1
- package/dist/ezui/p-bfc30e61.entry.js +0 -1
- package/dist/ezui/p-bfc59380.entry.js +0 -1
- package/dist/ezui/p-d960a031.entry.js +0 -1
- package/dist/ezui/p-dc628ed3.js +0 -1
- package/dist/ezui/p-dfca5946.entry.js +0 -1
- package/dist/ezui/p-efbe0b73.entry.js +0 -1
- package/dist/types/components/ez-split-panel/interfaces/IPanelSizeInfo.d.ts +0 -9
- package/dist/types/utils/FocusResolver.d.ts +0 -5
|
@@ -13,7 +13,6 @@ export class EzDateTimeInput {
|
|
|
13
13
|
this.showSeconds = false;
|
|
14
14
|
this.mode = "regular";
|
|
15
15
|
this.canShowError = true;
|
|
16
|
-
this.autoFocus = false;
|
|
17
16
|
}
|
|
18
17
|
observeLabel() {
|
|
19
18
|
if (this._textInput) {
|
|
@@ -50,8 +49,8 @@ export class EzDateTimeInput {
|
|
|
50
49
|
/**
|
|
51
50
|
* Aplica o foco no campo.
|
|
52
51
|
*/
|
|
53
|
-
async setFocus(
|
|
54
|
-
this._textInput.setFocus(
|
|
52
|
+
async setFocus() {
|
|
53
|
+
this._textInput.setFocus();
|
|
55
54
|
}
|
|
56
55
|
/**
|
|
57
56
|
* Remove o foco do campo.
|
|
@@ -218,11 +217,6 @@ export class EzDateTimeInput {
|
|
|
218
217
|
componentDidLoad() {
|
|
219
218
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
220
219
|
this.setInputValue();
|
|
221
|
-
if (this.autoFocus) {
|
|
222
|
-
requestAnimationFrame(() => {
|
|
223
|
-
this.setFocus({ selectText: true });
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
220
|
}
|
|
227
221
|
render() {
|
|
228
222
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -366,24 +360,6 @@ export class EzDateTimeInput {
|
|
|
366
360
|
"attribute": "can-show-error",
|
|
367
361
|
"reflect": true,
|
|
368
362
|
"defaultValue": "true"
|
|
369
|
-
},
|
|
370
|
-
"autoFocus": {
|
|
371
|
-
"type": "boolean",
|
|
372
|
-
"mutable": false,
|
|
373
|
-
"complexType": {
|
|
374
|
-
"original": "boolean",
|
|
375
|
-
"resolved": "boolean",
|
|
376
|
-
"references": {}
|
|
377
|
-
},
|
|
378
|
-
"required": false,
|
|
379
|
-
"optional": false,
|
|
380
|
-
"docs": {
|
|
381
|
-
"tags": [],
|
|
382
|
-
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
383
|
-
},
|
|
384
|
-
"attribute": "auto-focus",
|
|
385
|
-
"reflect": false,
|
|
386
|
-
"defaultValue": "false"
|
|
387
363
|
}
|
|
388
364
|
};
|
|
389
365
|
}
|
|
@@ -448,18 +424,11 @@ export class EzDateTimeInput {
|
|
|
448
424
|
return {
|
|
449
425
|
"setFocus": {
|
|
450
426
|
"complexType": {
|
|
451
|
-
"signature": "(
|
|
452
|
-
"parameters": [
|
|
453
|
-
"tags": [],
|
|
454
|
-
"text": ""
|
|
455
|
-
}],
|
|
427
|
+
"signature": "() => Promise<void>",
|
|
428
|
+
"parameters": [],
|
|
456
429
|
"references": {
|
|
457
430
|
"Promise": {
|
|
458
431
|
"location": "global"
|
|
459
|
-
},
|
|
460
|
-
"TFocusOptions": {
|
|
461
|
-
"location": "import",
|
|
462
|
-
"path": "../ez-text-input/ez-text-input"
|
|
463
432
|
}
|
|
464
433
|
},
|
|
465
434
|
"return": "Promise<void>"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/* Container */
|
|
4
4
|
/*@doc Define o espaçamento do container.*/
|
|
5
|
-
--dialog__container-padding: var(--space--
|
|
5
|
+
--dialog__container-padding: var(--space--large, 24px);
|
|
6
6
|
|
|
7
7
|
/* Botões */
|
|
8
8
|
/*@doc Define a cor de fundo do botão de fechar.*/
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
/*@doc Define o peso do texto da mensagem.*/
|
|
32
32
|
--dialog__body--text-weight--medium: var(--text-weight--medium, 400);
|
|
33
33
|
/*@doc Define o espaçamento inferior do texto da mensagem.*/
|
|
34
|
-
--dialog__body--padding-bottom: var(--space--
|
|
34
|
+
--dialog__body--padding-bottom: var(--space--large, 24px);
|
|
35
35
|
/*@doc Define o tamanho do texto da mensagem.*/
|
|
36
36
|
--dialog__body--font-size: var(--text--medium, 14px);
|
|
37
37
|
/*@doc Define a cor do texto da mensagem.*/
|
|
@@ -141,7 +141,7 @@ h2 {
|
|
|
141
141
|
color: var(--dialog__body--color);
|
|
142
142
|
max-height: 30vh;
|
|
143
143
|
content-visibility: auto;
|
|
144
|
-
margin-bottom:
|
|
144
|
+
margin-bottom: 24px;
|
|
145
145
|
overflow-y: auto;
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { h, forceUpdate, } from '@stencil/core';
|
|
2
2
|
import { DialogType } from "./DialogType";
|
|
3
3
|
import { ElementIDUtils, FloatingManager } from "@sankhyalabs/core";
|
|
4
|
-
import FocusResolver from '../../utils/FocusResolver';
|
|
5
4
|
class Message {
|
|
6
5
|
constructor(title, message, dialogType, confirm, icon, labelCancel, labelConfirm, btnConfirmDanger, callBack, beforeClose) {
|
|
7
6
|
this.title = title;
|
|
@@ -165,7 +164,6 @@ export class EzDialog {
|
|
|
165
164
|
const dialog = this._element.shadowRoot.querySelector('.overlay .dialog');
|
|
166
165
|
if (dialog instanceof HTMLDivElement) {
|
|
167
166
|
dialog.style.outline = 'none';
|
|
168
|
-
this._lastActiveElement = document.activeElement;
|
|
169
167
|
dialog.focus();
|
|
170
168
|
}
|
|
171
169
|
}
|
|
@@ -178,13 +176,7 @@ export class EzDialog {
|
|
|
178
176
|
focusOnPrimaryButton() {
|
|
179
177
|
const btnConfirm = this._element.shadowRoot.querySelector(`#${this.PRIMARY_BUTTON_ID}`);
|
|
180
178
|
const buttonElement = btnConfirm === null || btnConfirm === void 0 ? void 0 : btnConfirm.shadowRoot.querySelector('button');
|
|
181
|
-
|
|
182
|
-
buttonElement === null || buttonElement === void 0 ? void 0 : buttonElement.focus();
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
disconnectedCallback() {
|
|
186
|
-
FocusResolver.resolveFocus(this._lastActiveElement);
|
|
187
|
-
this._lastActiveElement = undefined;
|
|
179
|
+
buttonElement === null || buttonElement === void 0 ? void 0 : buttonElement.focus();
|
|
188
180
|
}
|
|
189
181
|
render() {
|
|
190
182
|
if (this.opened && this._currentMessage) {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
:host {
|
|
2
|
+
/*@doc Define a largura do slot direito.*/
|
|
3
|
+
--ez-filter-slot--right--width: 70px;
|
|
4
|
+
|
|
2
5
|
display: block;
|
|
3
6
|
width: 100%;
|
|
4
7
|
}
|
|
8
|
+
|
|
9
|
+
.pointerCursor {
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
ez-text-input {
|
|
14
|
+
--ez-text-input__icon--right--width: var(--ez-filter-slot--right--width)
|
|
15
|
+
}
|
|
@@ -5,13 +5,16 @@ export class EzFilterInput {
|
|
|
5
5
|
constructor() {
|
|
6
6
|
this._searchingText = "";
|
|
7
7
|
this.handleFocus = () => {
|
|
8
|
+
this.ezFocusIn.emit();
|
|
9
|
+
if (!this.asyncSearch) {
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
8
12
|
if (this._searchingText === "") {
|
|
9
13
|
this._textInput.value = "";
|
|
10
14
|
}
|
|
11
15
|
else {
|
|
12
16
|
this._textInput.value = this._searchingText;
|
|
13
17
|
}
|
|
14
|
-
this.ezFocusIn.emit();
|
|
15
18
|
};
|
|
16
19
|
this.label = undefined;
|
|
17
20
|
this.value = undefined;
|
|
@@ -21,7 +24,7 @@ export class EzFilterInput {
|
|
|
21
24
|
this.mode = "regular";
|
|
22
25
|
this.asyncSearch = false;
|
|
23
26
|
this.canShowError = true;
|
|
24
|
-
this.
|
|
27
|
+
this.enabledIconClick = false;
|
|
25
28
|
}
|
|
26
29
|
observeLabel() {
|
|
27
30
|
if (this._textInput) {
|
|
@@ -42,8 +45,8 @@ export class EzFilterInput {
|
|
|
42
45
|
/**
|
|
43
46
|
* Aplica o foco no campo.
|
|
44
47
|
*/
|
|
45
|
-
async setFocus(
|
|
46
|
-
this._textInput.setFocus(
|
|
48
|
+
async setFocus() {
|
|
49
|
+
this._textInput.setFocus();
|
|
47
50
|
}
|
|
48
51
|
/**
|
|
49
52
|
* Remove o foco do campo.
|
|
@@ -83,6 +86,14 @@ export class EzFilterInput {
|
|
|
83
86
|
this._textInput.value = this.value;
|
|
84
87
|
}
|
|
85
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Método usado para emitir o evento de clique no ícone
|
|
91
|
+
*/
|
|
92
|
+
async handleIconClick() {
|
|
93
|
+
if (this.enabledIconClick) {
|
|
94
|
+
this.ezIconClick.emit(true);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
86
97
|
handleChange(evt) {
|
|
87
98
|
const newValue = evt.detail;
|
|
88
99
|
this.errorMessage = "";
|
|
@@ -96,15 +107,10 @@ export class EzFilterInput {
|
|
|
96
107
|
}
|
|
97
108
|
componentDidLoad() {
|
|
98
109
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
99
|
-
if (this.autoFocus) {
|
|
100
|
-
requestAnimationFrame(() => {
|
|
101
|
-
this.setFocus({ selectText: true });
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
110
|
}
|
|
105
111
|
render() {
|
|
106
112
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
107
|
-
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "search" })));
|
|
113
|
+
return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, label: this.label, onEzChange: evt => this.handleChange(evt), value: this.value, enabled: this.enabled, errorMessage: this.errorMessage, restrict: this.restrict, mode: this.mode, onFocusin: this.handleFocus, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "search", onClick: () => this.handleIconClick(), class: this.enabledIconClick ? 'pointerCursor' : '' }), h("slot", { name: "right", slot: "rightIcon" })));
|
|
108
114
|
}
|
|
109
115
|
static get is() { return "ez-filter-input"; }
|
|
110
116
|
static get encapsulation() { return "shadow"; }
|
|
@@ -260,7 +266,7 @@ export class EzFilterInput {
|
|
|
260
266
|
"reflect": true,
|
|
261
267
|
"defaultValue": "true"
|
|
262
268
|
},
|
|
263
|
-
"
|
|
269
|
+
"enabledIconClick": {
|
|
264
270
|
"type": "boolean",
|
|
265
271
|
"mutable": false,
|
|
266
272
|
"complexType": {
|
|
@@ -272,9 +278,9 @@ export class EzFilterInput {
|
|
|
272
278
|
"optional": false,
|
|
273
279
|
"docs": {
|
|
274
280
|
"tags": [],
|
|
275
|
-
"text": "Se true
|
|
281
|
+
"text": "Se true permite ao usu\u00E1rio interagir com o \u00EDcone de pesquisa"
|
|
276
282
|
},
|
|
277
|
-
"attribute": "
|
|
283
|
+
"attribute": "enabled-icon-click",
|
|
278
284
|
"reflect": false,
|
|
279
285
|
"defaultValue": "false"
|
|
280
286
|
}
|
|
@@ -326,24 +332,32 @@ export class EzFilterInput {
|
|
|
326
332
|
"resolved": "void",
|
|
327
333
|
"references": {}
|
|
328
334
|
}
|
|
335
|
+
}, {
|
|
336
|
+
"method": "ezIconClick",
|
|
337
|
+
"name": "ezIconClick",
|
|
338
|
+
"bubbles": true,
|
|
339
|
+
"cancelable": true,
|
|
340
|
+
"composed": true,
|
|
341
|
+
"docs": {
|
|
342
|
+
"tags": [],
|
|
343
|
+
"text": "Emitido quando tem intera\u00E7\u00E3o com o \u00CDcone de pesquisa"
|
|
344
|
+
},
|
|
345
|
+
"complexType": {
|
|
346
|
+
"original": "boolean",
|
|
347
|
+
"resolved": "boolean",
|
|
348
|
+
"references": {}
|
|
349
|
+
}
|
|
329
350
|
}];
|
|
330
351
|
}
|
|
331
352
|
static get methods() {
|
|
332
353
|
return {
|
|
333
354
|
"setFocus": {
|
|
334
355
|
"complexType": {
|
|
335
|
-
"signature": "(
|
|
336
|
-
"parameters": [
|
|
337
|
-
"tags": [],
|
|
338
|
-
"text": ""
|
|
339
|
-
}],
|
|
356
|
+
"signature": "() => Promise<void>",
|
|
357
|
+
"parameters": [],
|
|
340
358
|
"references": {
|
|
341
359
|
"Promise": {
|
|
342
360
|
"location": "global"
|
|
343
|
-
},
|
|
344
|
-
"TFocusOptions": {
|
|
345
|
-
"location": "import",
|
|
346
|
-
"path": "../ez-text-input/ez-text-input"
|
|
347
361
|
}
|
|
348
362
|
},
|
|
349
363
|
"return": "Promise<void>"
|
|
@@ -419,6 +433,22 @@ export class EzFilterInput {
|
|
|
419
433
|
"text": "M\u00E9todo respons\u00E1vel por resetar o valor do campo para o ultimo valor inputado.",
|
|
420
434
|
"tags": []
|
|
421
435
|
}
|
|
436
|
+
},
|
|
437
|
+
"handleIconClick": {
|
|
438
|
+
"complexType": {
|
|
439
|
+
"signature": "() => Promise<void>",
|
|
440
|
+
"parameters": [],
|
|
441
|
+
"references": {
|
|
442
|
+
"Promise": {
|
|
443
|
+
"location": "global"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
"return": "Promise<void>"
|
|
447
|
+
},
|
|
448
|
+
"docs": {
|
|
449
|
+
"text": "M\u00E9todo usado para emitir o evento de clique no \u00EDcone",
|
|
450
|
+
"tags": []
|
|
451
|
+
}
|
|
422
452
|
}
|
|
423
453
|
};
|
|
424
454
|
}
|
|
@@ -94,7 +94,6 @@ export class EzForm {
|
|
|
94
94
|
if (this.dataUnit === undefined) {
|
|
95
95
|
this.dataUnit = new DataUnit("ez-form");
|
|
96
96
|
}
|
|
97
|
-
this.dataUnit.unsubscribe(this.onDataUnitAction);
|
|
98
97
|
this.dataUnit.subscribe(this.onDataUnitAction);
|
|
99
98
|
this._dataBinder = new DataBinder(this.dataUnit);
|
|
100
99
|
this._store = createStore(formReducer);
|
|
@@ -56,7 +56,7 @@ export class EzCustomFormInput {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
getContent() {
|
|
59
|
-
var _a, _b
|
|
59
|
+
var _a, _b;
|
|
60
60
|
const fieldProps = new Map();
|
|
61
61
|
for (const prop in this.formViewField.props) {
|
|
62
62
|
fieldProps.set(prop, this.formViewField.props[prop]);
|
|
@@ -94,8 +94,7 @@ export class EzCustomFormInput {
|
|
|
94
94
|
if (typeof gui === 'string') {
|
|
95
95
|
gui = HTMLBuilder.parseElement(gui);
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
gui.setAttribute('value', value);
|
|
97
|
+
gui.setAttribute('value', this.value);
|
|
99
98
|
this.gui = h("div", { key: StringUtils.generateUUID(), ref: el => el && el.appendChild(gui) });
|
|
100
99
|
}
|
|
101
100
|
setValue(value) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
|
-
export const buildTextInput = ({ name, label, readOnly, contextName, canShowError
|
|
3
|
-
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError
|
|
2
|
+
export const buildTextInput = ({ name, label, readOnly, contextName, canShowError }) => {
|
|
3
|
+
return (h("div", { class: "ez-col ez-col--sd-12 ez-padding-horizontal--small" }, h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
|
|
4
4
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ApplicationContext, DataType,
|
|
2
|
-
import { Grid } from
|
|
3
|
-
import { LicenseManager } from '
|
|
1
|
+
import { ApplicationContext, DataType, MaskFormatter, NumberUtils, SortMode, StringUtils, UserInterface, } from '@sankhyalabs/core';
|
|
2
|
+
import { Grid, } from 'ag-grid-community';
|
|
3
|
+
import { Grid as EnterpriseGrid, LicenseManager } from 'ag-grid-enterprise';
|
|
4
4
|
import DataSource from './DataSource';
|
|
5
5
|
import { EzGridCustomHeader } from './components/EzGridCustomHeader';
|
|
6
6
|
import { CellRendererStatus } from './components/cellRendererStatus';
|
|
@@ -8,12 +8,6 @@ import SelectionHeader from './components/selectionHeader';
|
|
|
8
8
|
import gridTerms from './i18n/pt-BR';
|
|
9
9
|
import { DISTINCT_FILTER_NAME_PREFIX, EZ_GRID_LOADING_SOURCE } from '../../../../utils/constants';
|
|
10
10
|
import GridEditionManager from './GridEditionManager';
|
|
11
|
-
import { ModuleRegistry } from '@ag-grid-community/core';
|
|
12
|
-
import { EnterpriseCoreModule } from '@ag-grid-enterprise/core';
|
|
13
|
-
import { RangeSelectionModule } from '@ag-grid-enterprise/range-selection';
|
|
14
|
-
import { ServerSideRowModelModule } from '@ag-grid-enterprise/server-side-row-model';
|
|
15
|
-
import { ClipboardModule } from '@ag-grid-enterprise/clipboard';
|
|
16
|
-
import { MenuModule } from '@ag-grid-enterprise/menu';
|
|
17
11
|
export default class AgGridController {
|
|
18
12
|
configFilterColumn(filterColumn) {
|
|
19
13
|
this._filterColumn = filterColumn;
|
|
@@ -33,7 +27,7 @@ export default class AgGridController {
|
|
|
33
27
|
var _a;
|
|
34
28
|
(_a = this._filterColumn) === null || _a === void 0 ? void 0 : _a.show(configs);
|
|
35
29
|
}
|
|
36
|
-
constructor(
|
|
30
|
+
constructor(enterprise) {
|
|
37
31
|
this.DEFAULT_ROW_HEIGHT = 30;
|
|
38
32
|
this.DEFAULT_HEADER_ROW_HEIGHT = 32;
|
|
39
33
|
this.CHECK_BOX_COL_ID = 'checkBoxColumn';
|
|
@@ -49,13 +43,7 @@ export default class AgGridController {
|
|
|
49
43
|
this._customFormatters = new Map();
|
|
50
44
|
this._gridShowDom = false;
|
|
51
45
|
this.peddingExecutionsOnGridShow = [];
|
|
52
|
-
|
|
53
|
-
EnterpriseCoreModule,
|
|
54
|
-
RangeSelectionModule,
|
|
55
|
-
ServerSideRowModelModule,
|
|
56
|
-
ClipboardModule,
|
|
57
|
-
MenuModule
|
|
58
|
-
]);
|
|
46
|
+
this._enterprise = enterprise;
|
|
59
47
|
}
|
|
60
48
|
getGridConfig() {
|
|
61
49
|
return this._gridConfig;
|
|
@@ -133,7 +121,6 @@ export default class AgGridController {
|
|
|
133
121
|
var _a;
|
|
134
122
|
this._options = options;
|
|
135
123
|
this._container = container;
|
|
136
|
-
const lockerId = options.enableLockManger ? LockManager.addLockManagerCtxId(this._container) : null;
|
|
137
124
|
if (this._grid === undefined) {
|
|
138
125
|
LicenseManager.setLicenseKey(ApplicationContext.getContextValue('__EZUI__GRID_LICENSE__'));
|
|
139
126
|
this._columnStateChangeCallback = options.onColumnStateChange;
|
|
@@ -141,7 +128,7 @@ export default class AgGridController {
|
|
|
141
128
|
this._doubleClickCallBack = options.onDoubleClick;
|
|
142
129
|
this._multipleSelection = options.allowMultipleSelection;
|
|
143
130
|
this._dataUnit = options.dataUnit;
|
|
144
|
-
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert, options.enableGridInsert
|
|
131
|
+
this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled, options.customEditors || this._customEditors, options.customRenders || this._customRenders, options.enableContinuousInsert, options.enableGridInsert);
|
|
145
132
|
this._statusResolver = options.statusResolver;
|
|
146
133
|
if (this._dataUnit) {
|
|
147
134
|
this._dataUnit.sortingProvider = this;
|
|
@@ -188,7 +175,12 @@ export default class AgGridController {
|
|
|
188
175
|
this.setOptionsEvents(this._gridOptions);
|
|
189
176
|
this.setOptionsSupress(this._gridOptions);
|
|
190
177
|
this._gridOptions = this._editionManager.configureGrid(this._gridOptions);
|
|
191
|
-
|
|
178
|
+
if (this._enterprise) {
|
|
179
|
+
this._grid = new EnterpriseGrid(container, this._gridOptions);
|
|
180
|
+
}
|
|
181
|
+
else {
|
|
182
|
+
this._grid = new Grid(container, this._gridOptions);
|
|
183
|
+
}
|
|
192
184
|
const selection = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getSelectionInfo();
|
|
193
185
|
if (selection === null || selection === void 0 ? void 0 : selection.isAllRecords()) {
|
|
194
186
|
this.selectAll(true);
|
|
@@ -348,7 +340,7 @@ export default class AgGridController {
|
|
|
348
340
|
defineRowModelType(opt, sourceOptions) {
|
|
349
341
|
if (this._dataUnit != undefined) {
|
|
350
342
|
opt.rowModelType = 'serverSide';
|
|
351
|
-
opt.serverSideDatasource =
|
|
343
|
+
opt.serverSideDatasource = new DataSource(this._dataUnit, this, sourceOptions);
|
|
352
344
|
opt.serverSideSortOnServer = true;
|
|
353
345
|
opt.columnDefs = this._colDefs;
|
|
354
346
|
}
|
|
@@ -499,7 +491,7 @@ export default class AgGridController {
|
|
|
499
491
|
r.setData(data);
|
|
500
492
|
});
|
|
501
493
|
this._gridOptions.api.refreshCells({ force: true });
|
|
502
|
-
const invalidCell = this._editionManager.
|
|
494
|
+
const invalidCell = this._editionManager.getInvalidCell();
|
|
503
495
|
if (invalidCell) {
|
|
504
496
|
const rowNode = this._gridOptions.api.getRowNode(invalidCell.recordId);
|
|
505
497
|
if (rowNode && invalidCell.field) {
|
|
@@ -509,8 +501,6 @@ export default class AgGridController {
|
|
|
509
501
|
}
|
|
510
502
|
}
|
|
511
503
|
savingCanceled(fields, recordId) {
|
|
512
|
-
if (!this._gridShowDom)
|
|
513
|
-
return;
|
|
514
504
|
const displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
515
505
|
const rowIndex = this._gridOptions.api.getRowNode(recordId).rowIndex;
|
|
516
506
|
const columnFocus = displayedColumns.find(column => this.isColumnEditable(rowIndex, column) && fields.find(field => field.name === column.getColId()));
|
|
@@ -521,7 +511,6 @@ export default class AgGridController {
|
|
|
521
511
|
if (this._grid === undefined) {
|
|
522
512
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
523
513
|
}
|
|
524
|
-
this._gridOptions.api.clearRangeSelection();
|
|
525
514
|
this._gridOptions.api.refreshServerSide({ purge: true });
|
|
526
515
|
this._options.onRefresh();
|
|
527
516
|
if (scrollToSelectedRow)
|
|
@@ -544,15 +533,12 @@ export default class AgGridController {
|
|
|
544
533
|
}
|
|
545
534
|
setFocus() {
|
|
546
535
|
var _a, _b;
|
|
547
|
-
if (
|
|
548
|
-
this.focusOnGridContainer();
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
if (!this._dataUnit.getSelectedRecord()) {
|
|
536
|
+
if ((_b = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.records) === null || _b === void 0 ? void 0 : _b.length) {
|
|
552
537
|
this.setFocusFirstRow();
|
|
553
|
-
return;
|
|
554
538
|
}
|
|
555
|
-
|
|
539
|
+
else {
|
|
540
|
+
this.focusOnGridContainer();
|
|
541
|
+
}
|
|
556
542
|
}
|
|
557
543
|
setAutoFocus(autoFocus) {
|
|
558
544
|
var _a;
|
|
@@ -596,26 +582,7 @@ export default class AgGridController {
|
|
|
596
582
|
this.startEditionOnRowByIndex(newRowIndex);
|
|
597
583
|
}
|
|
598
584
|
}
|
|
599
|
-
syncSelectWithDataUnit() {
|
|
600
|
-
const rowNode = this._gridOptions.api.getRowNode(this._dataUnit.getSelectedRecord().__record__id__);
|
|
601
|
-
if ((rowNode === null || rowNode === void 0 ? void 0 : rowNode.rowIndex) < 0)
|
|
602
|
-
return;
|
|
603
|
-
const rowRange = this._gridOptions.api.getCellRanges().find(row => row.startRow.rowIndex === rowNode.rowIndex);
|
|
604
|
-
if ((rowRange === null || rowRange === void 0 ? void 0 : rowRange.columns.length) > 0) {
|
|
605
|
-
if (this._dataUnit.hasNewRecord()) {
|
|
606
|
-
this.startEdition(rowNode.rowIndex, rowRange.columns[0]);
|
|
607
|
-
return;
|
|
608
|
-
}
|
|
609
|
-
this.focusByCollAndRow(rowRange.columns[0], rowNode.rowIndex);
|
|
610
|
-
this._gridOptions.api.addCellRange({ rowStartIndex: rowNode.rowIndex, rowEndIndex: rowNode.rowIndex, columns: rowRange.columns });
|
|
611
|
-
return;
|
|
612
|
-
}
|
|
613
|
-
this._gridOptions.api.clearRangeSelection();
|
|
614
|
-
this.setFocusOnRow(rowNode.rowIndex);
|
|
615
|
-
}
|
|
616
585
|
startEdition(rowIndex, firstCol) {
|
|
617
|
-
if (!this._gridShowDom)
|
|
618
|
-
return;
|
|
619
586
|
this._gridOptions.api.clearRangeSelection();
|
|
620
587
|
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstCol] });
|
|
621
588
|
this._gridOptions.api.setFocusedCell(rowIndex, firstCol);
|
|
@@ -645,7 +612,6 @@ export default class AgGridController {
|
|
|
645
612
|
let displayedColumns = this._gridOptions.columnApi.getAllDisplayedColumns();
|
|
646
613
|
let firstColl = displayedColumns.find(column => column.getColDef().headerName !== '');
|
|
647
614
|
this.focusByCollAndRow(firstColl, rowIndex);
|
|
648
|
-
this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [firstColl] });
|
|
649
615
|
}
|
|
650
616
|
focusByCollAndRow(firstCell, rowIndex) {
|
|
651
617
|
this._gridOptions.api.ensureColumnVisible(firstCell);
|
|
@@ -685,14 +651,6 @@ export default class AgGridController {
|
|
|
685
651
|
this._gridOptions.api.setColumnDefs(this._colDefs);
|
|
686
652
|
}
|
|
687
653
|
}
|
|
688
|
-
hideSelectionColumn() {
|
|
689
|
-
var _a, _b;
|
|
690
|
-
(_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.columnApi) === null || _b === void 0 ? void 0 : _b.setColumnVisible(this.CHECK_BOX_COL_ID, false);
|
|
691
|
-
}
|
|
692
|
-
showSelectionColumn() {
|
|
693
|
-
var _a, _b;
|
|
694
|
-
(_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.columnApi) === null || _b === void 0 ? void 0 : _b.setColumnVisible(this.CHECK_BOX_COL_ID, true);
|
|
695
|
-
}
|
|
696
654
|
getColumnsDef() {
|
|
697
655
|
if (this._grid === undefined) {
|
|
698
656
|
throw new Error('Erro interno: Grid ainda não inicializado.');
|
|
@@ -977,24 +935,18 @@ export default class AgGridController {
|
|
|
977
935
|
return false;
|
|
978
936
|
}
|
|
979
937
|
onSelectionChange(event) {
|
|
980
|
-
var _a, _b;
|
|
981
|
-
const selectedRowId = (_b = (_a = event.api.getSelectedNodes()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id;
|
|
982
|
-
const isNewRecord = this._dataUnit.isNewRecord(selectedRowId);
|
|
983
938
|
if (!this._selectionChangeCallback)
|
|
984
939
|
return;
|
|
985
940
|
clearTimeout(this._selectionChangeDeboucing);
|
|
986
|
-
this._selectionChangeDeboucing = window.setTimeout(
|
|
987
|
-
|
|
988
|
-
if (!saveSuccess)
|
|
989
|
-
return;
|
|
941
|
+
this._selectionChangeDeboucing = window.setTimeout(() => {
|
|
942
|
+
this.handleExecuteProceedAutosave();
|
|
990
943
|
this.processBuildSelectionChangeCallback(event);
|
|
991
944
|
}, 0);
|
|
992
945
|
}
|
|
993
|
-
|
|
946
|
+
handleExecuteProceedAutosave() {
|
|
994
947
|
if (this._gridShowDom) {
|
|
995
|
-
|
|
948
|
+
this._editionManager.proceedAutoSave();
|
|
996
949
|
}
|
|
997
|
-
return true;
|
|
998
950
|
}
|
|
999
951
|
processBuildSelectionChangeCallback(event) {
|
|
1000
952
|
if (this._dataUnit) {
|
|
@@ -1019,12 +971,7 @@ export default class AgGridController {
|
|
|
1019
971
|
});
|
|
1020
972
|
}
|
|
1021
973
|
onRowDoubleClick(evt) {
|
|
1022
|
-
|
|
1023
|
-
if (this._doubleClickCallBack && (!this._options.enableGridInsert || !this._dataUnit.hasNewRecord())) {
|
|
1024
|
-
/**
|
|
1025
|
-
* Evita mudança de view e a grade permanecer no modo de edição.
|
|
1026
|
-
*/
|
|
1027
|
-
(_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.stopEditing();
|
|
974
|
+
if (this._doubleClickCallBack) {
|
|
1028
975
|
this._doubleClickCallBack(evt.data);
|
|
1029
976
|
}
|
|
1030
977
|
}
|
|
@@ -1040,29 +987,22 @@ export default class AgGridController {
|
|
|
1040
987
|
}
|
|
1041
988
|
}
|
|
1042
989
|
setCellEditors(customEditors) {
|
|
1043
|
-
var _a
|
|
990
|
+
var _a;
|
|
1044
991
|
if (!this._editionManager) {
|
|
1045
992
|
this._customEditors = customEditors;
|
|
1046
993
|
return;
|
|
1047
994
|
}
|
|
1048
|
-
const currentEditingCells = (_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.getEditingCells();
|
|
1049
995
|
this._editionManager.setCellEditors(customEditors);
|
|
1050
|
-
|
|
1051
|
-
this._gridOptions.api.startEditingCell({ colKey: (_d = (_c = currentEditingCells[0]) === null || _c === void 0 ? void 0 : _c.column) === null || _d === void 0 ? void 0 : _d.getColId(), rowIndex: (_e = currentEditingCells[0]) === null || _e === void 0 ? void 0 : _e.rowIndex });
|
|
1052
|
-
}
|
|
996
|
+
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
|
|
1053
997
|
}
|
|
1054
998
|
setCellRenders(customRenders) {
|
|
1055
|
-
var _a
|
|
999
|
+
var _a;
|
|
1056
1000
|
if (!this._editionManager) {
|
|
1057
1001
|
this._customRenders = customRenders;
|
|
1058
1002
|
return;
|
|
1059
1003
|
}
|
|
1060
1004
|
this._editionManager.setCellRenders(customRenders);
|
|
1061
|
-
|
|
1062
|
-
(_c = this._gridOptions) === null || _c === void 0 ? void 0 : _c.api.redrawRows();
|
|
1063
|
-
if ((currentEditingCells === null || currentEditingCells === void 0 ? void 0 : currentEditingCells.length) > 0) {
|
|
1064
|
-
this._gridOptions.api.startEditingCell({ colKey: (_e = (_d = currentEditingCells[0]) === null || _d === void 0 ? void 0 : _d.column) === null || _e === void 0 ? void 0 : _e.getColId(), rowIndex: (_f = currentEditingCells[0]) === null || _f === void 0 ? void 0 : _f.rowIndex });
|
|
1065
|
-
}
|
|
1005
|
+
(_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api.redrawRows();
|
|
1066
1006
|
}
|
|
1067
1007
|
clearInvalidCells(stopEdition) {
|
|
1068
1008
|
if (!this._editionManager)
|
|
@@ -1074,19 +1014,6 @@ export default class AgGridController {
|
|
|
1074
1014
|
this._editionManager.processContinuousInsert();
|
|
1075
1015
|
}
|
|
1076
1016
|
destroy() {
|
|
1077
|
-
var _a;
|
|
1078
1017
|
this.observer.disconnect();
|
|
1079
|
-
(_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
1080
|
-
}
|
|
1081
|
-
registryListeners() {
|
|
1082
|
-
var _a;
|
|
1083
|
-
(_a = this._dataSource) === null || _a === void 0 ? void 0 : _a.registryListeners();
|
|
1084
|
-
}
|
|
1085
|
-
resetPaginationState() {
|
|
1086
|
-
var _a, _b;
|
|
1087
|
-
(_b = (_a = this._gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.clearRangeSelection();
|
|
1088
|
-
}
|
|
1089
|
-
stopEdit() {
|
|
1090
|
-
this._gridOptions.api.stopEditing();
|
|
1091
1018
|
}
|
|
1092
1019
|
}
|
|
@@ -6,14 +6,12 @@ export default class DataSource {
|
|
|
6
6
|
this._controller.clearInvalidCells();
|
|
7
7
|
this.handleRefreshOrReload(action);
|
|
8
8
|
this._controller.processContinuousInsert();
|
|
9
|
-
this._controller.showSelectionColumn();
|
|
10
9
|
}
|
|
11
10
|
handleEditionCanceled(action) {
|
|
12
11
|
if (this._options.enableGridInsert) {
|
|
13
12
|
this._controller.processEditionCanceled();
|
|
14
13
|
}
|
|
15
14
|
this.handleRefreshOrReload(action);
|
|
16
|
-
this._controller.showSelectionColumn();
|
|
17
15
|
}
|
|
18
16
|
handleSavingCanceled(action) {
|
|
19
17
|
var _a, _b, _c, _d;
|
|
@@ -68,7 +66,6 @@ export default class DataSource {
|
|
|
68
66
|
}
|
|
69
67
|
handleRecordsAdded() {
|
|
70
68
|
if (this._options.enableGridInsert) {
|
|
71
|
-
this._controller.hideSelectionColumn();
|
|
72
69
|
this._controller.refresh();
|
|
73
70
|
this.focusOnNewRecord();
|
|
74
71
|
}
|
|
@@ -216,11 +213,6 @@ export default class DataSource {
|
|
|
216
213
|
destroy() {
|
|
217
214
|
this._dataUnit.unsubscribe(this.duObserver);
|
|
218
215
|
}
|
|
219
|
-
registryListeners() {
|
|
220
|
-
var _a, _b;
|
|
221
|
-
(_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.unsubscribe(this.duObserver);
|
|
222
|
-
(_b = this._dataUnit) === null || _b === void 0 ? void 0 : _b.subscribe(this.duObserver);
|
|
223
|
-
}
|
|
224
216
|
buildColumnDefs() {
|
|
225
217
|
const gridConfig = this._controller.getGridConfig() || [];
|
|
226
218
|
const columnDefs = [];
|