@sankhyalabs/ezui 0.0.0-bugfix-dev-KB-77126.0 → 0.0.0-bugfix-dev-KB-77074.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-10846595.js +108 -0
- 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-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 +324 -4
- package/dist/cjs/ez-grid.cjs.entry.js +70542 -14645
- package/dist/cjs/ez-list.cjs.entry.js +100 -151
- 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 +12 -28
- 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-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/fieldbuilder/templates/TextInput.tpl.js +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +25 -80
- 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 -167
- 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-list/ez-list.css +5 -5
- package/dist/collection/components/ez-list/ez-list.js +170 -152
- 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.js +1 -1
- package/dist/collection/components/ez-search/ez-search.css +1 -1
- package/dist/collection/components/ez-search/ez-search.js +14 -55
- 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/interfaces/AbstractFieldMetadata.js +1 -1
- package/dist/custom-elements/index.js +70890 -15272
- package/dist/esm/RecordValidationProcessor-9c6cc267.js +105 -0
- 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-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 +323 -3
- package/dist/esm/ez-grid.entry.js +70542 -14645
- package/dist/esm/ez-list.entry.js +101 -152
- 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 +12 -28
- 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-188f1c4c.entry.js +1 -0
- package/dist/ezui/p-49456b34.entry.js +1 -0
- package/dist/ezui/p-5a90d7d1.entry.js +1 -0
- package/dist/ezui/p-5b205c80.entry.js +1 -0
- package/dist/ezui/p-62732269.entry.js +1 -0
- package/dist/ezui/p-86b6aa01.entry.js +1 -0
- package/dist/ezui/p-b3b94f72.entry.js +1 -0
- package/dist/ezui/p-b95632e8.entry.js +1 -0
- package/dist/ezui/p-bcd47eda.entry.js +1 -0
- package/dist/ezui/p-c3c3d640.entry.js +304 -0
- package/dist/ezui/p-cdc472cc.entry.js +1 -0
- package/dist/ezui/p-d2c06f38.entry.js +1 -0
- package/dist/ezui/p-d8f64bb7.entry.js +1 -0
- package/dist/ezui/p-dc4ada32.entry.js +1 -0
- package/dist/ezui/p-e85c48d7.entry.js +1 -0
- package/dist/ezui/p-f299c608.entry.js +1 -0
- package/dist/ezui/p-f42855b9.js +1 -0
- package/dist/ezui/p-f80ac647.entry.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-number-input/ez-number-input.d.ts +0 -4
- package/dist/types/components/ez-search/ez-search.d.ts +1 -6
- 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 +42 -107
- 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/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-0a75bb05.entry.js +0 -1
- package/dist/ezui/p-0db68715.entry.js +0 -1
- package/dist/ezui/p-19098a3f.entry.js +0 -1
- package/dist/ezui/p-1f830a2f.entry.js +0 -1
- package/dist/ezui/p-2aa8e4b2.entry.js +0 -1
- package/dist/ezui/p-3dd919b7.entry.js +0 -1
- package/dist/ezui/p-455e737c.js +0 -1
- package/dist/ezui/p-8d0f02c7.entry.js +0 -309
- package/dist/ezui/p-91266ddd.entry.js +0 -1
- package/dist/ezui/p-97af4b13.entry.js +0 -1
- package/dist/ezui/p-a5b91a77.entry.js +0 -1
- package/dist/ezui/p-a80b1287.entry.js +0 -1
- package/dist/ezui/p-b54e17d2.entry.js +0 -1
- package/dist/ezui/p-bfad39eb.entry.js +0 -1
- package/dist/ezui/p-c27b2e17.entry.js +0 -1
- package/dist/ezui/p-cd2e78f0.entry.js +0 -1
- package/dist/ezui/p-d0ca26fe.entry.js +0 -1
- package/dist/ezui/p-dc628ed3.js +0 -1
- package/dist/ezui/p-ffd246f5.entry.js +0 -1
- package/dist/types/utils/FocusResolver.d.ts +0 -5
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementIDUtils, FloatingManager, ObjectUtils
|
|
1
|
+
import { ElementIDUtils, FloatingManager, ObjectUtils } from "@sankhyalabs/core";
|
|
2
2
|
import { h, Host } from "@stencil/core";
|
|
3
3
|
import { CSSVarsUtils } from "../../utils";
|
|
4
4
|
export class EzComboBox {
|
|
@@ -25,13 +25,12 @@ export class EzComboBox {
|
|
|
25
25
|
this.suppressSearch = false;
|
|
26
26
|
this.optionLoader = undefined;
|
|
27
27
|
this.suppressEmptyOption = false;
|
|
28
|
-
this.stopPropagateEnterKeyEvent =
|
|
28
|
+
this.stopPropagateEnterKeyEvent = false;
|
|
29
29
|
this.canShowError = true;
|
|
30
30
|
this.mode = "regular";
|
|
31
31
|
this.hideErrorOnFocusOut = true;
|
|
32
32
|
this.listOptionsPosition = undefined;
|
|
33
33
|
this.isTextSearch = false;
|
|
34
|
-
this.autoFocus = false;
|
|
35
34
|
}
|
|
36
35
|
observeErrorMessage() {
|
|
37
36
|
var _a;
|
|
@@ -94,9 +93,9 @@ export class EzComboBox {
|
|
|
94
93
|
/**
|
|
95
94
|
* Aplica o foco no campo.
|
|
96
95
|
*/
|
|
97
|
-
async setFocus(
|
|
96
|
+
async setFocus() {
|
|
98
97
|
if (this._textInput) {
|
|
99
|
-
this._textInput.setFocus(
|
|
98
|
+
this._textInput.setFocus();
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
/**
|
|
@@ -256,15 +255,11 @@ export class EzComboBox {
|
|
|
256
255
|
: undefined, h("span", { class: "item__label " + (this.showOptionValue ? "item__label--bold" : ""), title: opt.label }, opt.label));
|
|
257
256
|
}
|
|
258
257
|
showOptions() {
|
|
259
|
-
var _a, _b;
|
|
260
258
|
if (!this.enabled)
|
|
261
259
|
return;
|
|
262
260
|
if (this.isOptionsVisible()) {
|
|
263
261
|
return;
|
|
264
262
|
}
|
|
265
|
-
const valueString = (_b = (_a = this.value) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : this.value;
|
|
266
|
-
const indexValue = this._visibleOptions.findIndex(option => option.value === valueString);
|
|
267
|
-
this._preSelection = indexValue === -1 ? 0 : indexValue;
|
|
268
263
|
if (!!this._resizeObserver)
|
|
269
264
|
this._resizeObserver.observe(this._textInput);
|
|
270
265
|
this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
|
|
@@ -306,26 +301,11 @@ export class EzComboBox {
|
|
|
306
301
|
liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
307
302
|
});
|
|
308
303
|
}
|
|
309
|
-
selectCurrentOption(
|
|
304
|
+
selectCurrentOption() {
|
|
310
305
|
if (this._preSelection !== undefined) {
|
|
311
|
-
this.selectOption(this._visibleOptions[this._preSelection]
|
|
306
|
+
this.selectOption(this._visibleOptions[this._preSelection]);
|
|
312
307
|
this._preSelection = undefined;
|
|
313
308
|
}
|
|
314
|
-
else {
|
|
315
|
-
this.controlListWithOnlyOne(focusOnInput);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
controlListWithOnlyOne(focusOnInput = true) {
|
|
319
|
-
var _a;
|
|
320
|
-
const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
|
|
321
|
-
if ((source === null || source === void 0 ? void 0 : source.length) > 0) {
|
|
322
|
-
let title = StringUtils.decodeHtmlEntities(source[0].label);
|
|
323
|
-
const option = {
|
|
324
|
-
value: source[0].value,
|
|
325
|
-
label: title,
|
|
326
|
-
};
|
|
327
|
-
this.selectOption(option, focusOnInput);
|
|
328
|
-
}
|
|
329
309
|
}
|
|
330
310
|
updateSource(source) {
|
|
331
311
|
this._startLoading = false;
|
|
@@ -351,7 +331,7 @@ export class EzComboBox {
|
|
|
351
331
|
}
|
|
352
332
|
}
|
|
353
333
|
}
|
|
354
|
-
selectOption(newOption
|
|
334
|
+
selectOption(newOption) {
|
|
355
335
|
var _a, _b;
|
|
356
336
|
const currentValue = this.getSelectedOption(this.value);
|
|
357
337
|
if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
|
|
@@ -362,11 +342,6 @@ export class EzComboBox {
|
|
|
362
342
|
else {
|
|
363
343
|
this.resetOptions();
|
|
364
344
|
}
|
|
365
|
-
if (focusOnInput) {
|
|
366
|
-
setTimeout(() => {
|
|
367
|
-
this.setFocus();
|
|
368
|
-
}, 0);
|
|
369
|
-
}
|
|
370
345
|
}
|
|
371
346
|
loadOptions(mode, argument = "") {
|
|
372
347
|
this._criteria = argument;
|
|
@@ -450,11 +425,6 @@ export class EzComboBox {
|
|
|
450
425
|
}
|
|
451
426
|
});
|
|
452
427
|
});
|
|
453
|
-
if (this.autoFocus) {
|
|
454
|
-
requestAnimationFrame(() => {
|
|
455
|
-
this.setFocus({ selectText: true });
|
|
456
|
-
});
|
|
457
|
-
}
|
|
458
428
|
}
|
|
459
429
|
//---------------------------------------------
|
|
460
430
|
// Event handlers
|
|
@@ -509,24 +479,18 @@ export class EzComboBox {
|
|
|
509
479
|
}
|
|
510
480
|
switch (event.key) {
|
|
511
481
|
case "ArrowDown":
|
|
512
|
-
event.stopPropagation();
|
|
513
|
-
if (this.canShowListOptions())
|
|
514
|
-
event.preventDefault();
|
|
515
482
|
this.showOptions();
|
|
516
483
|
this.nextOption();
|
|
484
|
+
event.stopPropagation();
|
|
517
485
|
break;
|
|
518
486
|
case "ArrowUp":
|
|
519
|
-
event.stopPropagation();
|
|
520
|
-
if (this.canShowListOptions())
|
|
521
|
-
event.preventDefault();
|
|
522
487
|
this.showOptions();
|
|
523
488
|
this.previousOption();
|
|
489
|
+
event.stopPropagation();
|
|
524
490
|
break;
|
|
525
491
|
case "Enter":
|
|
526
492
|
this.handleEventPropagation(event);
|
|
527
|
-
|
|
528
|
-
this.selectCurrentOption();
|
|
529
|
-
}
|
|
493
|
+
this.selectCurrentOption();
|
|
530
494
|
break;
|
|
531
495
|
case "Escape":
|
|
532
496
|
if (this.isOptionsVisible()) {
|
|
@@ -538,7 +502,7 @@ export class EzComboBox {
|
|
|
538
502
|
case "Tab":
|
|
539
503
|
this._tabPressed = true;
|
|
540
504
|
if (this.isOptionsVisible()) {
|
|
541
|
-
this.selectCurrentOption(
|
|
505
|
+
this.selectCurrentOption();
|
|
542
506
|
}
|
|
543
507
|
this.resetOptions();
|
|
544
508
|
break;
|
|
@@ -814,7 +778,7 @@ export class EzComboBox {
|
|
|
814
778
|
},
|
|
815
779
|
"attribute": "stop-propagate-enter-key-event",
|
|
816
780
|
"reflect": false,
|
|
817
|
-
"defaultValue": "
|
|
781
|
+
"defaultValue": "false"
|
|
818
782
|
},
|
|
819
783
|
"canShowError": {
|
|
820
784
|
"type": "boolean",
|
|
@@ -906,24 +870,6 @@ export class EzComboBox {
|
|
|
906
870
|
"attribute": "is-text-search",
|
|
907
871
|
"reflect": false,
|
|
908
872
|
"defaultValue": "false"
|
|
909
|
-
},
|
|
910
|
-
"autoFocus": {
|
|
911
|
-
"type": "boolean",
|
|
912
|
-
"mutable": false,
|
|
913
|
-
"complexType": {
|
|
914
|
-
"original": "boolean",
|
|
915
|
-
"resolved": "boolean",
|
|
916
|
-
"references": {}
|
|
917
|
-
},
|
|
918
|
-
"required": false,
|
|
919
|
-
"optional": false,
|
|
920
|
-
"docs": {
|
|
921
|
-
"tags": [],
|
|
922
|
-
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
923
|
-
},
|
|
924
|
-
"attribute": "auto-focus",
|
|
925
|
-
"reflect": false,
|
|
926
|
-
"defaultValue": "false"
|
|
927
873
|
}
|
|
928
874
|
};
|
|
929
875
|
}
|
|
@@ -978,18 +924,11 @@ export class EzComboBox {
|
|
|
978
924
|
},
|
|
979
925
|
"setFocus": {
|
|
980
926
|
"complexType": {
|
|
981
|
-
"signature": "(
|
|
982
|
-
"parameters": [
|
|
983
|
-
"tags": [],
|
|
984
|
-
"text": ""
|
|
985
|
-
}],
|
|
927
|
+
"signature": "() => Promise<void>",
|
|
928
|
+
"parameters": [],
|
|
986
929
|
"references": {
|
|
987
930
|
"Promise": {
|
|
988
931
|
"location": "global"
|
|
989
|
-
},
|
|
990
|
-
"TFocusOptions": {
|
|
991
|
-
"location": "import",
|
|
992
|
-
"path": "../ez-text-input/ez-text-input"
|
|
993
932
|
}
|
|
994
933
|
},
|
|
995
934
|
"return": "Promise<void>"
|
|
@@ -12,7 +12,6 @@ export class EzDateInput {
|
|
|
12
12
|
this.errorMessage = undefined;
|
|
13
13
|
this.mode = "regular";
|
|
14
14
|
this.canShowError = true;
|
|
15
|
-
this.autoFocus = false;
|
|
16
15
|
}
|
|
17
16
|
observeLabel() {
|
|
18
17
|
if (this._textInput) {
|
|
@@ -49,8 +48,8 @@ export class EzDateInput {
|
|
|
49
48
|
/**
|
|
50
49
|
* Aplica o foco no campo.
|
|
51
50
|
*/
|
|
52
|
-
async setFocus(
|
|
53
|
-
this._textInput.setFocus(
|
|
51
|
+
async setFocus() {
|
|
52
|
+
this._textInput.setFocus();
|
|
54
53
|
}
|
|
55
54
|
/**
|
|
56
55
|
* Remove o foco do campo.
|
|
@@ -168,11 +167,6 @@ export class EzDateInput {
|
|
|
168
167
|
componentDidLoad() {
|
|
169
168
|
CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
|
|
170
169
|
this.setInputValue();
|
|
171
|
-
if (this.autoFocus) {
|
|
172
|
-
requestAnimationFrame(() => {
|
|
173
|
-
this.setFocus({ selectText: true });
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
170
|
}
|
|
177
171
|
render() {
|
|
178
172
|
ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
|
|
@@ -298,24 +292,6 @@ export class EzDateInput {
|
|
|
298
292
|
"attribute": "can-show-error",
|
|
299
293
|
"reflect": true,
|
|
300
294
|
"defaultValue": "true"
|
|
301
|
-
},
|
|
302
|
-
"autoFocus": {
|
|
303
|
-
"type": "boolean",
|
|
304
|
-
"mutable": false,
|
|
305
|
-
"complexType": {
|
|
306
|
-
"original": "boolean",
|
|
307
|
-
"resolved": "boolean",
|
|
308
|
-
"references": {}
|
|
309
|
-
},
|
|
310
|
-
"required": false,
|
|
311
|
-
"optional": false,
|
|
312
|
-
"docs": {
|
|
313
|
-
"tags": [],
|
|
314
|
-
"text": "Se true o campo de texto receber\u00E1 o foco ao ser renderizado."
|
|
315
|
-
},
|
|
316
|
-
"attribute": "auto-focus",
|
|
317
|
-
"reflect": false,
|
|
318
|
-
"defaultValue": "false"
|
|
319
295
|
}
|
|
320
296
|
};
|
|
321
297
|
}
|
|
@@ -380,18 +356,11 @@ export class EzDateInput {
|
|
|
380
356
|
return {
|
|
381
357
|
"setFocus": {
|
|
382
358
|
"complexType": {
|
|
383
|
-
"signature": "(
|
|
384
|
-
"parameters": [
|
|
385
|
-
"tags": [],
|
|
386
|
-
"text": ""
|
|
387
|
-
}],
|
|
359
|
+
"signature": "() => Promise<void>",
|
|
360
|
+
"parameters": [],
|
|
388
361
|
"references": {
|
|
389
362
|
"Promise": {
|
|
390
363
|
"location": "global"
|
|
391
|
-
},
|
|
392
|
-
"TFocusOptions": {
|
|
393
|
-
"location": "import",
|
|
394
|
-
"path": "../ez-text-input/ez-text-input"
|
|
395
364
|
}
|
|
396
365
|
},
|
|
397
366
|
"return": "Promise<void>"
|
|
@@ -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);
|
|
@@ -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
|
};
|