@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.
Files changed (149) hide show
  1. package/dist/cjs/RecordValidationProcessor-10846595.js +108 -0
  2. package/dist/cjs/ez-card-item_3.cjs.entry.js +19 -12
  3. package/dist/cjs/ez-chart.cjs.entry.js +1 -1
  4. package/dist/cjs/ez-combo-box.cjs.entry.js +10 -46
  5. package/dist/cjs/ez-date-input.cjs.entry.js +2 -8
  6. package/dist/cjs/ez-date-time-input.cjs.entry.js +2 -8
  7. package/dist/cjs/ez-dialog.cjs.entry.js +2 -10
  8. package/dist/cjs/ez-form-view.cjs.entry.js +2 -2
  9. package/dist/cjs/ez-form.cjs.entry.js +324 -4
  10. package/dist/cjs/ez-grid.cjs.entry.js +70542 -14645
  11. package/dist/cjs/ez-list.cjs.entry.js +100 -151
  12. package/dist/cjs/ez-number-input.cjs.entry.js +0 -7
  13. package/dist/cjs/ez-popover.cjs.entry.js +1 -1
  14. package/dist/cjs/ez-popup.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-search.cjs.entry.js +12 -28
  16. package/dist/cjs/ez-text-area.cjs.entry.js +4 -66
  17. package/dist/cjs/ez-text-input.cjs.entry.js +7 -49
  18. package/dist/cjs/ez-time-input.cjs.entry.js +0 -6
  19. package/dist/cjs/ezui.cjs.js +1 -1
  20. package/dist/cjs/loader.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -1
  22. package/dist/collection/components/ez-card-item/ez-card-item.css +5 -14
  23. package/dist/collection/components/ez-combo-box/ez-combo-box.js +14 -75
  24. package/dist/collection/components/ez-date-input/ez-date-input.js +4 -35
  25. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +4 -35
  26. package/dist/collection/components/ez-dialog/ez-dialog.css +3 -3
  27. package/dist/collection/components/ez-dialog/ez-dialog.js +1 -9
  28. package/dist/collection/components/ez-filter-input/ez-filter-input.css +11 -0
  29. package/dist/collection/components/ez-filter-input/ez-filter-input.js +52 -22
  30. package/dist/collection/components/ez-form/ez-form.js +0 -1
  31. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +2 -2
  32. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +25 -80
  33. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +0 -8
  34. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +46 -167
  35. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.js +0 -7
  36. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +0 -1
  37. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +0 -1
  38. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +0 -1
  39. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +0 -1
  40. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +1 -4
  41. package/dist/collection/components/ez-grid/ez-grid.js +3 -90
  42. package/dist/collection/components/ez-list/ez-list.css +5 -5
  43. package/dist/collection/components/ez-list/ez-list.js +170 -152
  44. package/dist/collection/components/ez-number-input/ez-number-input.js +0 -25
  45. package/dist/collection/components/ez-popover/ez-popover.css +10 -3
  46. package/dist/collection/components/ez-popup/ez-popup.js +1 -1
  47. package/dist/collection/components/ez-search/ez-search.css +1 -1
  48. package/dist/collection/components/ez-search/ez-search.js +14 -55
  49. package/dist/collection/components/ez-text-area/ez-text-area.css +0 -49
  50. package/dist/collection/components/ez-text-area/ez-text-area.js +2 -102
  51. package/dist/collection/components/ez-text-input/ez-text-input.css +53 -27
  52. package/dist/collection/components/ez-text-input/ez-text-input.js +6 -84
  53. package/dist/collection/components/ez-time-input/ez-time-input.js +0 -24
  54. package/dist/collection/utils/form/DataBinder.js +3 -18
  55. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +1 -1
  56. package/dist/custom-elements/index.js +70890 -15272
  57. package/dist/esm/RecordValidationProcessor-9c6cc267.js +105 -0
  58. package/dist/esm/ez-card-item_3.entry.js +19 -12
  59. package/dist/esm/ez-chart.entry.js +1 -1
  60. package/dist/esm/ez-combo-box.entry.js +11 -47
  61. package/dist/esm/ez-date-input.entry.js +2 -8
  62. package/dist/esm/ez-date-time-input.entry.js +2 -8
  63. package/dist/esm/ez-dialog.entry.js +2 -10
  64. package/dist/esm/ez-form-view.entry.js +2 -2
  65. package/dist/esm/ez-form.entry.js +323 -3
  66. package/dist/esm/ez-grid.entry.js +70542 -14645
  67. package/dist/esm/ez-list.entry.js +101 -152
  68. package/dist/esm/ez-number-input.entry.js +0 -7
  69. package/dist/esm/ez-popover.entry.js +1 -1
  70. package/dist/esm/ez-popup.entry.js +1 -1
  71. package/dist/esm/ez-search.entry.js +12 -28
  72. package/dist/esm/ez-text-area.entry.js +4 -66
  73. package/dist/esm/ez-text-input.entry.js +7 -49
  74. package/dist/esm/ez-time-input.entry.js +0 -6
  75. package/dist/esm/ezui.js +1 -1
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/ezui/ezui.esm.js +1 -1
  78. package/dist/ezui/p-188f1c4c.entry.js +1 -0
  79. package/dist/ezui/p-49456b34.entry.js +1 -0
  80. package/dist/ezui/p-5a90d7d1.entry.js +1 -0
  81. package/dist/ezui/p-5b205c80.entry.js +1 -0
  82. package/dist/ezui/p-62732269.entry.js +1 -0
  83. package/dist/ezui/p-86b6aa01.entry.js +1 -0
  84. package/dist/ezui/p-b3b94f72.entry.js +1 -0
  85. package/dist/ezui/p-b95632e8.entry.js +1 -0
  86. package/dist/ezui/p-bcd47eda.entry.js +1 -0
  87. package/dist/ezui/p-c3c3d640.entry.js +304 -0
  88. package/dist/ezui/p-cdc472cc.entry.js +1 -0
  89. package/dist/ezui/p-d2c06f38.entry.js +1 -0
  90. package/dist/ezui/p-d8f64bb7.entry.js +1 -0
  91. package/dist/ezui/p-dc4ada32.entry.js +1 -0
  92. package/dist/ezui/p-e85c48d7.entry.js +1 -0
  93. package/dist/ezui/p-f299c608.entry.js +1 -0
  94. package/dist/ezui/p-f42855b9.js +1 -0
  95. package/dist/ezui/p-f80ac647.entry.js +1 -0
  96. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +1 -7
  97. package/dist/types/components/ez-date-input/ez-date-input.d.ts +1 -6
  98. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +1 -6
  99. package/dist/types/components/ez-dialog/ez-dialog.d.ts +0 -2
  100. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +11 -4
  101. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +1 -1
  102. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +0 -12
  103. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -7
  104. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +1 -2
  105. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +7 -19
  106. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellEditor.d.ts +1 -3
  107. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomCellRender.d.ts +1 -1
  108. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  109. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +1 -1
  110. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +1 -1
  111. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +1 -1
  112. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellRender.d.ts +1 -1
  113. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +0 -1
  114. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +1 -1
  115. package/dist/types/components/ez-grid/ez-grid.d.ts +1 -11
  116. package/dist/types/components/ez-list/ez-list.d.ts +26 -3
  117. package/dist/types/components/ez-number-input/ez-number-input.d.ts +0 -4
  118. package/dist/types/components/ez-search/ez-search.d.ts +1 -6
  119. package/dist/types/components/ez-text-area/ez-text-area.d.ts +0 -17
  120. package/dist/types/components/ez-text-input/ez-text-input.d.ts +0 -9
  121. package/dist/types/components/ez-time-input/ez-time-input.d.ts +0 -4
  122. package/dist/types/components.d.ts +42 -107
  123. package/dist/types/utils/form/DataBinder.d.ts +0 -3
  124. package/package.json +4 -11
  125. package/dist/cjs/DataBinder-3b083480.js +0 -445
  126. package/dist/cjs/FocusResolver-885f2173.js +0 -35
  127. package/dist/collection/utils/FocusResolver.js +0 -31
  128. package/dist/esm/DataBinder-02fa9bb9.js +0 -441
  129. package/dist/esm/FocusResolver-1ccbf850.js +0 -33
  130. package/dist/ezui/p-0a75bb05.entry.js +0 -1
  131. package/dist/ezui/p-0db68715.entry.js +0 -1
  132. package/dist/ezui/p-19098a3f.entry.js +0 -1
  133. package/dist/ezui/p-1f830a2f.entry.js +0 -1
  134. package/dist/ezui/p-2aa8e4b2.entry.js +0 -1
  135. package/dist/ezui/p-3dd919b7.entry.js +0 -1
  136. package/dist/ezui/p-455e737c.js +0 -1
  137. package/dist/ezui/p-8d0f02c7.entry.js +0 -309
  138. package/dist/ezui/p-91266ddd.entry.js +0 -1
  139. package/dist/ezui/p-97af4b13.entry.js +0 -1
  140. package/dist/ezui/p-a5b91a77.entry.js +0 -1
  141. package/dist/ezui/p-a80b1287.entry.js +0 -1
  142. package/dist/ezui/p-b54e17d2.entry.js +0 -1
  143. package/dist/ezui/p-bfad39eb.entry.js +0 -1
  144. package/dist/ezui/p-c27b2e17.entry.js +0 -1
  145. package/dist/ezui/p-cd2e78f0.entry.js +0 -1
  146. package/dist/ezui/p-d0ca26fe.entry.js +0 -1
  147. package/dist/ezui/p-dc628ed3.js +0 -1
  148. package/dist/ezui/p-ffd246f5.entry.js +0 -1
  149. package/dist/types/utils/FocusResolver.d.ts +0 -5
@@ -1,4 +1,4 @@
1
- import { ElementIDUtils, FloatingManager, ObjectUtils, StringUtils } from "@sankhyalabs/core";
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 = true;
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(options) {
96
+ async setFocus() {
98
97
  if (this._textInput) {
99
- this._textInput.setFocus(options);
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(focusOnInput = true) {
304
+ selectCurrentOption() {
310
305
  if (this._preSelection !== undefined) {
311
- this.selectOption(this._visibleOptions[this._preSelection], focusOnInput);
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, focusOnInput = true) {
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
- if (this.isOptionsVisible()) {
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(false);
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": "true"
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": "(options?: TFocusOptions) => Promise<void>",
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(options) {
53
- this._textInput.setFocus(options);
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": "(options?: TFocusOptions) => Promise<void>",
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(options) {
54
- this._textInput.setFocus(options);
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": "(options?: TFocusOptions) => Promise<void>",
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--sm, 24px);
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--medium, 12px);
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: var(--space--medium);
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
- requestAnimationFrame(() => {
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.autoFocus = false;
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(options) {
46
- this._textInput.setFocus(options);
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
- "autoFocus": {
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 o campo de texto receber\u00E1 o foco ao ser renderizado."
281
+ "text": "Se true permite ao usu\u00E1rio interagir com o \u00EDcone de pesquisa"
276
282
  },
277
- "attribute": "auto-focus",
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": "(options?: TFocusOptions) => Promise<void>",
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, props }) => {
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, mask: props === null || props === void 0 ? void 0 : props.mask, "clean-value-mask": props === null || props === void 0 ? void 0 : props.cleanValueMask })));
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
  };