@sankhyalabs/ezui 5.10.8 → 5.11.0-dev.2

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 (137) hide show
  1. package/README.md +0 -1
  2. package/dist/cjs/{CSSVarsUtils-af809e73.js → CSSVarsUtils-b136a156.js} +5 -0
  3. package/dist/cjs/RecordValidationProcessor-edd23705.js +102 -0
  4. package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
  5. package/dist/cjs/ez-calendar.cjs.entry.js +34 -5
  6. package/dist/cjs/ez-combo-box.cjs.entry.js +89 -14
  7. package/dist/cjs/ez-date-input.cjs.entry.js +53 -22
  8. package/dist/cjs/ez-date-time-input.cjs.entry.js +53 -19
  9. package/dist/cjs/ez-filter-input_2.cjs.entry.js +1 -1
  10. package/dist/cjs/ez-form.cjs.entry.js +9 -83
  11. package/dist/cjs/ez-grid.cjs.entry.js +488 -6
  12. package/dist/cjs/ez-number-input.cjs.entry.js +39 -15
  13. package/dist/cjs/ez-search.cjs.entry.js +11 -2
  14. package/dist/cjs/ez-text-area.cjs.entry.js +6 -2
  15. package/dist/cjs/ez-text-input.cjs.entry.js +7 -4
  16. package/dist/cjs/ez-time-input.cjs.entry.js +11 -7
  17. package/dist/cjs/ezui.cjs.js +1 -1
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/collection/collection-manifest.json +2 -2
  20. package/dist/collection/components/ez-calendar/ez-calendar.js +63 -6
  21. package/dist/collection/components/ez-combo-box/ez-combo-box.css +6 -0
  22. package/dist/collection/components/ez-combo-box/ez-combo-box.js +122 -12
  23. package/dist/collection/components/ez-date-input/ez-date-input.js +71 -21
  24. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +71 -18
  25. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +40 -7
  26. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +1 -0
  27. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +230 -0
  28. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +49 -0
  29. package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js +10 -0
  30. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js +4 -0
  31. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +38 -0
  32. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +40 -0
  33. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +20 -0
  34. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +15 -0
  35. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +41 -0
  36. package/dist/collection/components/ez-grid/ez-grid.js +67 -0
  37. package/dist/collection/components/ez-number-input/ez-number-input.css +4 -0
  38. package/dist/collection/components/ez-number-input/ez-number-input.js +62 -15
  39. package/dist/collection/components/ez-search/ez-search.css +1 -1
  40. package/dist/collection/components/ez-search/ez-search.js +46 -1
  41. package/dist/collection/components/ez-text-area/ez-text-area.css +4 -0
  42. package/dist/collection/components/ez-text-area/ez-text-area.js +23 -1
  43. package/dist/collection/components/ez-text-input/ez-text-input.css +8 -1
  44. package/dist/collection/components/ez-text-input/ez-text-input.js +14 -5
  45. package/dist/collection/components/ez-time-input/ez-time-input.css +4 -0
  46. package/dist/collection/components/ez-time-input/ez-time-input.js +18 -7
  47. package/dist/collection/utils/CSSVarsUtils.js +5 -0
  48. package/dist/collection/utils/form/DataBinder.js +7 -62
  49. package/dist/collection/utils/form/FormMetadata.js +3 -22
  50. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +21 -0
  51. package/dist/collection/utils/validators/recordvalidator/IValidationResult.js +1 -0
  52. package/dist/collection/utils/validators/recordvalidator/IValidationSource.js +1 -0
  53. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +74 -0
  54. package/dist/custom-elements/index.js +922 -203
  55. package/dist/esm/{CSSVarsUtils-00f67f32.js → CSSVarsUtils-a97cfa29.js} +5 -0
  56. package/dist/esm/RecordValidationProcessor-abc814af.js +99 -0
  57. package/dist/esm/ez-actions-button.entry.js +1 -1
  58. package/dist/esm/ez-calendar.entry.js +35 -6
  59. package/dist/esm/ez-combo-box.entry.js +89 -14
  60. package/dist/esm/ez-date-input.entry.js +53 -22
  61. package/dist/esm/ez-date-time-input.entry.js +53 -19
  62. package/dist/esm/ez-filter-input_2.entry.js +1 -1
  63. package/dist/esm/ez-form.entry.js +10 -84
  64. package/dist/esm/ez-grid.entry.js +489 -7
  65. package/dist/esm/ez-number-input.entry.js +39 -15
  66. package/dist/esm/ez-search.entry.js +11 -2
  67. package/dist/esm/ez-text-area.entry.js +6 -2
  68. package/dist/esm/ez-text-input.entry.js +7 -4
  69. package/dist/esm/ez-time-input.entry.js +11 -7
  70. package/dist/esm/ezui.js +1 -1
  71. package/dist/esm/loader.js +1 -1
  72. package/dist/ezui/ezui.esm.js +1 -1
  73. package/dist/ezui/p-028f264f.entry.js +1 -0
  74. package/dist/ezui/p-391de0e4.entry.js +1 -0
  75. package/dist/ezui/p-4535da17.entry.js +1 -0
  76. package/dist/ezui/p-5cef0264.entry.js +1 -0
  77. package/dist/ezui/p-7eb3e1a5.js +1 -0
  78. package/dist/ezui/p-86a2036d.js +1 -0
  79. package/dist/ezui/{p-12303d2e.entry.js → p-87e85160.entry.js} +1 -1
  80. package/dist/ezui/p-90fa4cb3.entry.js +1 -0
  81. package/dist/ezui/p-9f41b414.entry.js +1 -0
  82. package/dist/ezui/p-ce035beb.entry.js +1 -0
  83. package/dist/ezui/p-d43b22f3.entry.js +1 -0
  84. package/dist/ezui/p-e2dfd935.entry.js +1 -0
  85. package/dist/ezui/p-e67d0bd5.entry.js +1 -0
  86. package/dist/ezui/{p-c7a23be9.entry.js → p-fd54b5b4.entry.js} +2 -2
  87. package/dist/ezui/{p-f1a537e3.entry.js → p-ff82b176.entry.js} +1 -1
  88. package/dist/types/components/ez-calendar/ez-calendar.d.ts +9 -1
  89. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +14 -0
  90. package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
  91. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
  92. package/dist/types/components/ez-form-view/interfaces/IFormViewField.d.ts +2 -14
  93. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +18 -0
  94. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -0
  95. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +38 -0
  96. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +10 -0
  97. package/dist/types/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.d.ts +1 -0
  98. package/dist/types/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.d.ts +9 -0
  99. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +10 -0
  100. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.d.ts +4 -0
  101. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.d.ts +5 -0
  102. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.d.ts +4 -0
  103. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.d.ts +3 -0
  104. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.d.ts +4 -0
  105. package/dist/types/components/ez-grid/ez-grid.d.ts +13 -0
  106. package/dist/types/components/ez-number-input/ez-number-input.d.ts +5 -1
  107. package/dist/types/components/ez-search/ez-search.d.ts +6 -1
  108. package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
  109. package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -1
  110. package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -1
  111. package/dist/types/components.d.ts +65 -6
  112. package/dist/types/utils/form/DataBinder.d.ts +1 -3
  113. package/dist/types/utils/form/interfaces/IFormConfig.d.ts +1 -1
  114. package/dist/types/utils/form/interfaces/index.d.ts +4 -4
  115. package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +17 -0
  116. package/dist/types/utils/{form/interfaces → interfaces}/IFieldConfig.d.ts +2 -2
  117. package/dist/types/utils/validators/recordvalidator/IValidationSource.d.ts +6 -0
  118. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +13 -0
  119. package/package.json +2 -2
  120. package/dist/ezui/p-00c7c25d.entry.js +0 -1
  121. package/dist/ezui/p-0b160fec.entry.js +0 -1
  122. package/dist/ezui/p-0bd54a6f.entry.js +0 -1
  123. package/dist/ezui/p-39153935.entry.js +0 -1
  124. package/dist/ezui/p-4a5e37a7.js +0 -1
  125. package/dist/ezui/p-5782443e.entry.js +0 -1
  126. package/dist/ezui/p-5d45e384.entry.js +0 -1
  127. package/dist/ezui/p-70ea4beb.entry.js +0 -1
  128. package/dist/ezui/p-78a6e049.entry.js +0 -1
  129. package/dist/ezui/p-8bcb197f.entry.js +0 -1
  130. package/dist/ezui/p-a4c9f3c4.entry.js +0 -1
  131. /package/dist/collection/{utils/form/interfaces/IFieldConfig.js → components/ez-grid/controller/ag-grid/editor/IUICellEditor.js} +0 -0
  132. /package/dist/collection/utils/{form/interfaces/IInvalidField.js → interfaces/IFieldConfig.js} +0 -0
  133. /package/dist/collection/utils/{form/interfaces/IRecordValidator.js → validators/recordvalidator/IInvalidField.js} +0 -0
  134. /package/dist/collection/utils/{form/interfaces/IValidationResult.js → validators/recordvalidator/IRecordValidator.js} +0 -0
  135. /package/dist/types/utils/{form/interfaces → validators/recordvalidator}/IInvalidField.d.ts +0 -0
  136. /package/dist/types/utils/{form/interfaces → validators/recordvalidator}/IRecordValidator.d.ts +0 -0
  137. /package/dist/types/utils/{form/interfaces → validators/recordvalidator}/IValidationResult.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
2
2
  export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
3
- import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode, ArrayUtils as ArrayUtils$1, MaskFormatter } from '@sankhyalabs/core';
3
+ import { UserInterface, DateUtils as DateUtils$1, Action, WaitingChangeException, ApplicationContext, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, StringUtils as StringUtils$1, TimeFormatter, DataUnit, HTMLBuilder, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, ArrayUtils as ArrayUtils$1 } from '@sankhyalabs/core';
4
4
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
5
5
 
6
6
  // Unique ID creation requires a high quality random # generator. In the browser we therefore
@@ -193,6 +193,11 @@ class CSSVarsUtils {
193
193
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
194
194
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--background-color');
195
195
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--color');
196
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height--slim');
197
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--border-radius');
198
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--focus--border-color');
199
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__icon--width');
200
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--focus--icon-color');
196
201
  }
197
202
  }
198
203
  static applyVarsButton(host, child) {
@@ -243,6 +248,27 @@ var CheckMode;
243
248
  CheckMode["SWITCH"] = "SWITCH";
244
249
  })(CheckMode || (CheckMode = {}));
245
250
 
251
+ const buildFieldMetadata = (descriptor, config) => {
252
+ let { name, label, group } = Object.assign({}, config);
253
+ let { readOnly, required } = Object.assign({}, config);
254
+ let props;
255
+ let userInterface;
256
+ if (descriptor) {
257
+ label = label || descriptor.label;
258
+ name = name || descriptor.name;
259
+ required = descriptor.required || (config === null || config === void 0 ? void 0 : config.required);
260
+ readOnly = descriptor.readOnly || (config === null || config === void 0 ? void 0 : config.readOnly);
261
+ props = descriptor.properties;
262
+ userInterface = descriptor.userInterface;
263
+ }
264
+ return {
265
+ name, label, group,
266
+ readOnly, required,
267
+ props,
268
+ userInterface: userInterface || UserInterface.SHORTTEXT
269
+ };
270
+ };
271
+
246
272
  const DETAIL_PATTERN = /child\[([^\]]+)\]/;
247
273
  const REGEX_DEFAULT_VAR_KEY = /\$\{.+\}/;
248
274
  class FormMetadata {
@@ -344,7 +370,7 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
344
370
  if (!sheets.has(tabConfig)) {
345
371
  sheets.set(tabConfig, []);
346
372
  }
347
- const formField = buildFormField(descriptor, field);
373
+ const formField = buildFieldMetadata(descriptor, field);
348
374
  sheets.get(tabConfig).push(formField);
349
375
  if (formField.required) {
350
376
  requiredFields.push(field.name);
@@ -403,26 +429,6 @@ const buildFormMetadata = (config, dataUnit, includeDetails = false) => {
403
429
  metadata.addDefaultValues(defaultValues);
404
430
  return metadata;
405
431
  };
406
- const buildFormField = (descriptor, config) => {
407
- let { name, label, group } = Object.assign({}, config);
408
- let { readOnly, required } = Object.assign({}, config);
409
- let props;
410
- let userInterface;
411
- if (descriptor) {
412
- label = label || descriptor.label;
413
- name = name || descriptor.name;
414
- required = descriptor.required || (config === null || config === void 0 ? void 0 : config.required);
415
- readOnly = descriptor.readOnly || (config === null || config === void 0 ? void 0 : config.readOnly);
416
- props = descriptor.properties;
417
- userInterface = descriptor.userInterface;
418
- }
419
- return {
420
- name, label, group,
421
- readOnly, required,
422
- props,
423
- userInterface: userInterface || UserInterface.SHORTTEXT
424
- };
425
- };
426
432
  const getTabConfig = (tab, sheets) => {
427
433
  const tabConfig = (typeof tab === "string" ? Array.from(sheets.keys()).find(t => t.label === tab) : tab);
428
434
  return tabConfig || { label: tab, visible: true };
@@ -438,6 +444,80 @@ const buildDetailSheet = (child) => {
438
444
  };
439
445
  };
440
446
 
447
+ class RecordValidationProcessor {
448
+ constructor(dataUnit, validationSource, validator) {
449
+ this._dataUnit = dataUnit;
450
+ this._validationSource = validationSource;
451
+ this._validator = validator;
452
+ }
453
+ validate() {
454
+ return new Promise((accept, reject) => {
455
+ const records = this._dataUnit.getModifiedRecords();
456
+ for (let i = 0; i < records.length; i++) {
457
+ const record = records[i];
458
+ const invalidResults = [];
459
+ let validationResult = this.validateRequired(record);
460
+ if (validationResult && !validationResult.isValid) {
461
+ invalidResults.push(validationResult);
462
+ }
463
+ if (this._validator) {
464
+ validationResult = this._validator.validateRecord(record);
465
+ if (validationResult && !validationResult.isValid) {
466
+ invalidResults.push(validationResult);
467
+ }
468
+ }
469
+ if (invalidResults.length > 0) {
470
+ this.processValidationResult(invalidResults, record.__record__id__);
471
+ reject();
472
+ break;
473
+ }
474
+ }
475
+ return accept();
476
+ });
477
+ }
478
+ validateRequired(record) {
479
+ const requiredFields = this._validationSource.getRequiredFields();
480
+ const invalidFields = [];
481
+ new Set(requiredFields).forEach(field => {
482
+ const value = record[field];
483
+ if (value == undefined || value === "") {
484
+ const errorMessage = this._validationSource.getMessageForField(field, record.__record__id__);
485
+ if (errorMessage) {
486
+ invalidFields.push({ name: field, message: errorMessage });
487
+ }
488
+ else {
489
+ invalidFields.push({ name: field, message: "Essa informação é obrigatória" });
490
+ }
491
+ }
492
+ });
493
+ if (invalidFields.length > 0) {
494
+ return { isValid: false, invalidFields, infoMessage: "Há pelo menos um campo obrigatório não preenchido." };
495
+ }
496
+ return undefined;
497
+ }
498
+ processValidationResult(validationResult, recordId) {
499
+ validationResult.forEach(invalidResult => {
500
+ const invalidFields = invalidResult.invalidFields;
501
+ if (invalidFields) {
502
+ invalidFields.forEach(field => {
503
+ this.markAsInvalid(field, recordId);
504
+ });
505
+ }
506
+ if (invalidResult.infoMessage) {
507
+ ApplicationUtils.info(invalidResult.infoMessage);
508
+ }
509
+ if (invalidResult.errorMessage) {
510
+ const { errorTitle, errorMessage } = invalidResult;
511
+ ApplicationUtils.error(errorTitle, errorMessage);
512
+ }
513
+ });
514
+ }
515
+ markAsInvalid(field, recordId) {
516
+ this._dataUnit.setInvalidField(field.name, field.message, recordId);
517
+ this._validationSource.markAsInvalid(field, recordId);
518
+ }
519
+ }
520
+
441
521
  class DataBinder {
442
522
  constructor(dataUnit) {
443
523
  this.onDataUnitEvent = (action) => {
@@ -493,7 +573,11 @@ class DataBinder {
493
573
  }
494
574
  });
495
575
  this._formMetadata = formMetadata;
496
- this._recordsValidator = recordsValidator;
576
+ this._recordValidatorProcessor = new RecordValidationProcessor(this._dataUnit, {
577
+ getRequiredFields: () => this._formMetadata.getRequiredFields(),
578
+ markAsInvalid: field => this.markInvalid(field),
579
+ getMessageForField: field => this.getErrorMessage(field)
580
+ }, recordsValidator);
497
581
  }
498
582
  onDisconnectedCallback() {
499
583
  this._dataUnit.unsubscribe(this.onDataUnitEvent);
@@ -504,7 +588,6 @@ class DataBinder {
504
588
  return record === null || record === void 0 ? void 0 : record.__record__id__;
505
589
  }
506
590
  markInvalid(field) {
507
- this._dataUnit.setInvalidField(field.name, field.message, this.getCurrentRecordId());
508
591
  if (this._fields.has(field.name)) {
509
592
  const fieldElement = this._fields.get(field.name).field;
510
593
  this.updateErrorMessage(field.name, fieldElement, field.message);
@@ -533,65 +616,7 @@ class DataBinder {
533
616
  }
534
617
  }
535
618
  validate() {
536
- return new Promise((accept, reject) => {
537
- var _a;
538
- const records = this._dataUnit.getModifiedRecords();
539
- for (let i = 0; i < records.length; i++) {
540
- const record = records[i];
541
- const invalidResults = [];
542
- let validationResult = this.validateRequired(record);
543
- if (validationResult && !validationResult.isValid) {
544
- invalidResults.push(validationResult);
545
- }
546
- validationResult = (_a = this._recordsValidator) === null || _a === void 0 ? void 0 : _a.validateRecord(record);
547
- if (validationResult && !validationResult.isValid) {
548
- invalidResults.push(validationResult);
549
- }
550
- if (invalidResults.length > 0) {
551
- this.processValidationResult(invalidResults);
552
- reject();
553
- break;
554
- }
555
- }
556
- return accept();
557
- });
558
- }
559
- validateRequired(record) {
560
- const requiredFields = this._formMetadata.getRequiredFields();
561
- const invalidFields = [];
562
- new Set(requiredFields).forEach(field => {
563
- const value = record[field];
564
- if (value == undefined || value === "") {
565
- const errorMessage = this.getErrorMessage(field);
566
- if (errorMessage) {
567
- invalidFields.push({ name: field, message: errorMessage });
568
- }
569
- else {
570
- invalidFields.push({ name: field, message: "Essa informação é obrigatória" });
571
- }
572
- }
573
- });
574
- if (invalidFields.length > 0) {
575
- return { isValid: false, invalidFields, infoMessage: "Há pelo menos um campo obrigatório não preenchido." };
576
- }
577
- return undefined;
578
- }
579
- processValidationResult(validationResult) {
580
- validationResult.forEach(invalidResult => {
581
- const invalidFields = invalidResult.invalidFields;
582
- if (invalidFields) {
583
- invalidFields.forEach(field => {
584
- this.markInvalid(field);
585
- });
586
- }
587
- if (invalidResult.infoMessage) {
588
- ApplicationUtils.info(invalidResult.infoMessage);
589
- }
590
- if (invalidResult.errorMessage) {
591
- const { errorTitle, errorMessage } = invalidResult;
592
- ApplicationUtils.error(errorTitle, errorMessage);
593
- }
594
- });
619
+ return this._recordValidatorProcessor.validate();
595
620
  }
596
621
  updateErrorMessage(fieldName, field, message) {
597
622
  if (message == undefined) {
@@ -1518,15 +1543,24 @@ const EzCalendar$1 = class extends HTMLElement$1 {
1518
1543
  */
1519
1544
  async show(top, left, bottom, right) {
1520
1545
  if (this.floating) {
1521
- this._floatingID = FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
1522
- window.requestAnimationFrame(() => {
1523
- this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
1546
+ this._floatingID = FloatingManager.float(this._box, this._container, {
1547
+ isFixed: this.isFixed(),
1548
+ autoClose: true,
1549
+ top,
1550
+ left,
1551
+ bottom,
1552
+ right
1524
1553
  });
1525
- this.scroll();
1554
+ if (!this.isFixed()) {
1555
+ window.requestAnimationFrame(() => {
1556
+ this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
1557
+ });
1558
+ this.scroll();
1559
+ }
1526
1560
  }
1527
1561
  }
1528
1562
  /**
1529
- * Ajusta o posicionamento do ez-calendar conforme a disponibilidade de espaço.
1563
+ * Ajusta o posicionamento vertical do ez-calendar conforme a disponibilidade de espaço.
1530
1564
  */
1531
1565
  async fitVertical(topOffset, bottomOffset) {
1532
1566
  const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
@@ -1538,6 +1572,16 @@ const EzCalendar$1 = class extends HTMLElement$1 {
1538
1572
  this.show("unset", undefined, bottomOffset + "px");
1539
1573
  }
1540
1574
  }
1575
+ /**
1576
+ * Ajusta o posicionamento horizontal do ez-calendar conforme a disponibilidade de espaço.
1577
+ */
1578
+ async fitHorizontal(rightOffset) {
1579
+ const neededWidth = this._container.getBoundingClientRect().right + this._calendarWidth;
1580
+ const availableRight = (window.innerWidth || document.documentElement.clientWidth) > neededWidth;
1581
+ if (!availableRight) {
1582
+ this.show(undefined, "unset", undefined, rightOffset + "px");
1583
+ }
1584
+ }
1541
1585
  /**
1542
1586
  * Oculta o ez-calendar.
1543
1587
  */
@@ -1553,6 +1597,14 @@ const EzCalendar$1 = class extends HTMLElement$1 {
1553
1597
  this._currentPosition.setDate(1);
1554
1598
  }
1555
1599
  }
1600
+ scrollListener() {
1601
+ if (this.floating && this.isFixed()) {
1602
+ this.hide();
1603
+ }
1604
+ }
1605
+ isFixed() {
1606
+ return this._hostElem.dataset.isFixed === "true";
1607
+ }
1556
1608
  getMonthLabel() {
1557
1609
  return this._monthLabels[this._currentPosition.getMonth()] + " " + this._currentPosition.getFullYear();
1558
1610
  }
@@ -1617,6 +1669,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
1617
1669
  componentDidRender() {
1618
1670
  if (this.floating && this._firstRender) {
1619
1671
  this._calendarHeight = this._box.clientHeight;
1672
+ this._calendarWidth = this._box.clientWidth;
1620
1673
  this._box.remove();
1621
1674
  this._firstRender = false;
1622
1675
  }
@@ -1690,6 +1743,7 @@ const EzCalendar$1 = class extends HTMLElement$1 {
1690
1743
  }
1691
1744
  })))))));
1692
1745
  }
1746
+ get _hostElem() { return this; }
1693
1747
  static get watchers() { return {
1694
1748
  "value": ["observeValue"]
1695
1749
  }; }
@@ -2067,7 +2121,7 @@ const EzCollapsibleBox$1 = class extends HTMLElement$1 {
2067
2121
  const REQUIRED_INFO = " (obrigatório) *";
2068
2122
  const DISTINCT_FILTER_NAME_PREFIX = 'FILTRO_COLUNA_';
2069
2123
 
2070
- const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
2124
+ const ezComboBoxCss = ":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box__list-min-width:64px;--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-combo-box__list-min-width);position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
2071
2125
 
2072
2126
  const EzComboBox$1 = class extends HTMLElement$1 {
2073
2127
  constructor() {
@@ -2101,6 +2155,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2101
2155
  this.suppressEmptyOption = false;
2102
2156
  this.canShowError = true;
2103
2157
  this.mode = "regular";
2158
+ this.listOptionsPosition = undefined;
2104
2159
  }
2105
2160
  observeErrorMessage() {
2106
2161
  var _a;
@@ -2143,17 +2198,38 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2143
2198
  return;
2144
2199
  this.loadOptions(SearchMode.PRELOAD);
2145
2200
  }
2201
+ /*
2202
+ * Retorna uma promise com o valor da opção selecionada,
2203
+ * que será resolvida quando o backend devolver este dado.
2204
+ */
2205
+ async getValueAsync() {
2206
+ if (!this._showLoading) {
2207
+ return new Promise(resolve => resolve(this.value));
2208
+ }
2209
+ return new Promise(resolve => {
2210
+ let id = setInterval(() => {
2211
+ if (!this._showLoading) {
2212
+ clearInterval(id);
2213
+ resolve(this.value);
2214
+ }
2215
+ }, 100);
2216
+ });
2217
+ }
2146
2218
  /**
2147
2219
  * Aplica o foco no campo.
2148
2220
  */
2149
2221
  async setFocus() {
2150
- this._textInput.setFocus();
2222
+ if (this._textInput) {
2223
+ this._textInput.setFocus();
2224
+ }
2151
2225
  }
2152
2226
  /**
2153
2227
  * Remove o foco do campo.
2154
2228
  */
2155
2229
  async setBlur() {
2156
- this._textInput.setBlur();
2230
+ if (this._textInput) {
2231
+ this._textInput.setBlur();
2232
+ }
2157
2233
  }
2158
2234
  /**
2159
2235
  * Retorna se o conteúdo é inválido.
@@ -2168,16 +2244,61 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2168
2244
  this.clearSearch();
2169
2245
  }
2170
2246
  scrollListener() {
2171
- if (!this._floatingID)
2247
+ var _a;
2248
+ if (this._floatingID == undefined) {
2172
2249
  return;
2173
- window.requestAnimationFrame(() => {
2174
- this.updateListPosition();
2175
- });
2250
+ }
2251
+ if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
2252
+ this.hideOptions();
2253
+ }
2254
+ else {
2255
+ window.requestAnimationFrame(() => {
2256
+ this.updateListPosition();
2257
+ });
2258
+ }
2176
2259
  }
2177
2260
  updateListPosition() {
2178
- const { top } = this._listContainer.getBoundingClientRect();
2179
- const margin = (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13;
2180
- this._listWrapper.style.top = `${(top + margin)}px`;
2261
+ let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
2262
+ const elementRect = this._listWrapper.getBoundingClientRect();
2263
+ const containerRect = this._listContainer.getBoundingClientRect();
2264
+ const textInputRect = this._textInput.getBoundingClientRect();
2265
+ const limitHeight = bottomLimit || window.innerHeight;
2266
+ const neededHeight = containerRect.bottom + elementRect.height;
2267
+ if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
2268
+ fromBottom = true;
2269
+ }
2270
+ if (!hardPosition) {
2271
+ verticalPosition = verticalPosition || 0;
2272
+ horizontalPosition = horizontalPosition || 0;
2273
+ if (fromBottom) {
2274
+ verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
2275
+ }
2276
+ else {
2277
+ verticalPosition += containerRect.top;
2278
+ }
2279
+ if (fromRight) {
2280
+ horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
2281
+ }
2282
+ else {
2283
+ horizontalPosition += containerRect.left;
2284
+ }
2285
+ }
2286
+ if (verticalPosition != undefined) {
2287
+ this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
2288
+ this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
2289
+ }
2290
+ if (horizontalPosition != undefined) {
2291
+ this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
2292
+ this._listWrapper.style[fromRight ? "left" : "right"] = "";
2293
+ }
2294
+ }
2295
+ getListPosition() {
2296
+ if (this.listOptionsPosition) {
2297
+ return this.listOptionsPosition;
2298
+ }
2299
+ return {
2300
+ verticalPosition: (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13
2301
+ };
2181
2302
  }
2182
2303
  isDifferentValues(firstValue, secondValue) {
2183
2304
  return ObjectUtils$1.objectToString(firstValue || {}) !== ObjectUtils$1.objectToString(secondValue || {});
@@ -2260,13 +2381,18 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2260
2381
  showOptions() {
2261
2382
  if (!this.enabled)
2262
2383
  return;
2384
+ if (this.isOptionsVisible()) {
2385
+ return;
2386
+ }
2263
2387
  if (!!this._resizeObserver)
2264
2388
  this._resizeObserver.observe(this._textInput);
2265
- this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true });
2389
+ this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
2266
2390
  this.setFocus();
2267
2391
  window.requestAnimationFrame(() => {
2268
2392
  this.updateListPosition();
2269
- this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
2393
+ if (!this.listOptionsPosition) {
2394
+ this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
2395
+ }
2270
2396
  });
2271
2397
  }
2272
2398
  hideOptions() {
@@ -2296,7 +2422,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2296
2422
  window.requestAnimationFrame(() => {
2297
2423
  const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
2298
2424
  if (liElem)
2299
- liElem.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
2425
+ liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
2300
2426
  });
2301
2427
  }
2302
2428
  selectCurrentOption() {
@@ -2352,6 +2478,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2352
2478
  this._visibleOptions = [];
2353
2479
  this.clearSource();
2354
2480
  }
2481
+ this.setFocus();
2355
2482
  }
2356
2483
  loadOptions(mode, argument = "") {
2357
2484
  this._criteria = argument;
@@ -2609,9 +2736,11 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2609
2736
  switch (event.key) {
2610
2737
  case "ArrowDown":
2611
2738
  this.nextOption();
2739
+ event.stopPropagation();
2612
2740
  break;
2613
2741
  case "ArrowUp":
2614
2742
  this.previousOption();
2743
+ event.stopPropagation();
2615
2744
  break;
2616
2745
  case "Enter":
2617
2746
  this.selectCurrentOption();
@@ -2673,7 +2802,9 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2673
2802
  this.ezChange = createEvent(this, "ezChange", 7);
2674
2803
  this.ezStartChange = createEvent(this, "ezStartChange", 7);
2675
2804
  this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
2805
+ this._changePending = false;
2676
2806
  this._focused = false;
2807
+ this._valuePromiseCallbacks = [];
2677
2808
  this.label = undefined;
2678
2809
  this.value = undefined;
2679
2810
  this.enabled = true;
@@ -2711,6 +2842,7 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2711
2842
  this.ezChange.emit(valueEmitted);
2712
2843
  }
2713
2844
  }
2845
+ this._changePending = false;
2714
2846
  }
2715
2847
  /**
2716
2848
  * Aplica o foco no campo.
@@ -2730,6 +2862,18 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2730
2862
  async isInvalid() {
2731
2863
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
2732
2864
  }
2865
+ /*
2866
+ * Retorna uma promise com o valor da opção selecionada,
2867
+ * que será resolvida quando o backend devolver este dado.
2868
+ */
2869
+ async getValueAsync() {
2870
+ if (this._changePending) {
2871
+ return new Promise(accept => {
2872
+ this._valuePromiseCallbacks.push(accept);
2873
+ });
2874
+ }
2875
+ return Promise.resolve(this.value);
2876
+ }
2733
2877
  changeValue(newValue) {
2734
2878
  const currentValue = DateUtils$1.validateDate(this.value);
2735
2879
  const newValueValidated = DateUtils$1.validateDate(newValue);
@@ -2740,10 +2884,14 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2740
2884
  showCalendar() {
2741
2885
  this.handleBlur();
2742
2886
  this._calendar.value = this.value;
2743
- //FIXME: Provavelmente isso fará com que o popup abra em uma
2744
- //posição errada no futuro. Preferi fazer simples no começo,
2745
- //porque não quis onerar o text input com essa funcionalidade...
2746
- const top = this.errorMessage || this.mode === "slim" ? 6 : -13;
2887
+ let top;
2888
+ if (this.isFixed()) {
2889
+ top = 29;
2890
+ this._calendar.fitHorizontal(0);
2891
+ }
2892
+ else {
2893
+ top = this.errorMessage || this.mode === "slim" ? 6 : -13;
2894
+ }
2747
2895
  this._calendar.fitVertical(top, this._elem.clientHeight);
2748
2896
  }
2749
2897
  hideCalendar() {
@@ -2751,27 +2899,35 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2751
2899
  this._calendar.hide();
2752
2900
  }
2753
2901
  handleBlur() {
2754
- const strValue = this._textInput.value;
2755
- const newValue = DateUtils$1.strToDate(strValue);
2756
- if (newValue || !strValue) {
2757
- this.errorMessage = "";
2758
- const currentValue = DateUtils$1.validateDate(this.value);
2759
- const newValueValidated = DateUtils$1.validateDate(newValue);
2760
- if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
2761
- if (newValueValidated) {
2762
- this._textInput.value = this.getTextValue(newValueValidated) || '';
2763
- this._focused = false;
2902
+ try {
2903
+ const strValue = this._textInput.value;
2904
+ const newValue = DateUtils$1.strToDate(strValue);
2905
+ if (newValue || !strValue) {
2906
+ this.errorMessage = "";
2907
+ const currentValue = DateUtils$1.validateDate(this.value);
2908
+ const newValueValidated = DateUtils$1.validateDate(newValue);
2909
+ if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
2910
+ if (newValueValidated) {
2911
+ this._textInput.value = this.getTextValue(newValueValidated) || '';
2912
+ this._focused = false;
2913
+ }
2914
+ this.ezCancelWaitingChange.emit();
2915
+ }
2916
+ else {
2917
+ this.changeValue(newValueValidated);
2764
2918
  }
2765
- this.ezCancelWaitingChange.emit();
2766
2919
  }
2767
2920
  else {
2768
- this.changeValue(newValueValidated);
2921
+ this.changeValue(undefined);
2922
+ this.ezCancelWaitingChange.emit();
2923
+ this.errorMessage = "O valor digitado não é uma data válida";
2769
2924
  }
2770
2925
  }
2771
- else {
2772
- this.changeValue(undefined);
2773
- this.ezCancelWaitingChange.emit();
2774
- this.errorMessage = "O valor digitado não é uma data válida";
2926
+ finally {
2927
+ for (const callback of this._valuePromiseCallbacks) {
2928
+ callback(this.value);
2929
+ }
2930
+ this._valuePromiseCallbacks = [];
2775
2931
  }
2776
2932
  }
2777
2933
  getTextValue(d) {
@@ -2783,6 +2939,7 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2783
2939
  const currentValue = DateUtils$1.validateDate(this.value);
2784
2940
  const newValueValidated = DateUtils$1.validateDate(newValue);
2785
2941
  if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
2942
+ this._changePending = true;
2786
2943
  this._focused = true;
2787
2944
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
2788
2945
  }
@@ -2796,13 +2953,16 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2796
2953
  this._textInput.value = textValue;
2797
2954
  }
2798
2955
  }
2956
+ isFixed() {
2957
+ return this._elem.dataset.isFixed === "true";
2958
+ }
2799
2959
  componentDidLoad() {
2800
2960
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
2801
2961
  this.setInputValue();
2802
2962
  }
2803
2963
  render() {
2804
2964
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
2805
- return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem })));
2965
+ return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), restrict: "0123456789/", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { ref: elem => this._calendar = elem, "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, "data-is-fixed": this._elem.dataset.isFixed })));
2806
2966
  }
2807
2967
  get _elem() { return this; }
2808
2968
  static get watchers() { return {
@@ -2823,7 +2983,9 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2823
2983
  this.ezChange = createEvent(this, "ezChange", 7);
2824
2984
  this.ezStartChange = createEvent(this, "ezStartChange", 7);
2825
2985
  this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
2986
+ this._changePending = false;
2826
2987
  this._focused = false;
2988
+ this._valuePromiseCallbacks = [];
2827
2989
  this.label = undefined;
2828
2990
  this.value = undefined;
2829
2991
  this.enabled = true;
@@ -2862,6 +3024,7 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2862
3024
  this.ezChange.emit(valueEmitted);
2863
3025
  }
2864
3026
  }
3027
+ this._changePending = false;
2865
3028
  }
2866
3029
  /**
2867
3030
  * Aplica o foco no campo.
@@ -2881,6 +3044,18 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2881
3044
  async isInvalid() {
2882
3045
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
2883
3046
  }
3047
+ /*
3048
+ * Retorna uma promise com o valor da opção selecionada,
3049
+ * que será resolvida quando o backend devolver este dado.
3050
+ */
3051
+ async getValueAsync() {
3052
+ if (this._changePending) {
3053
+ return new Promise(accept => {
3054
+ this._valuePromiseCallbacks.push(accept);
3055
+ });
3056
+ }
3057
+ return Promise.resolve(this.value);
3058
+ }
2884
3059
  handleKeyDown(event) {
2885
3060
  const input = this._textInput.shadowRoot.querySelector('input');
2886
3061
  if (event.shiftKey && event.key === "Tab") {
@@ -2925,7 +3100,14 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2925
3100
  }
2926
3101
  }
2927
3102
  showCalendar() {
2928
- const top = this.errorMessage || this.mode === "slim" ? 6 : -13;
3103
+ let top;
3104
+ if (this.isFixed()) {
3105
+ top = 29;
3106
+ this._calendar.fitHorizontal(0);
3107
+ }
3108
+ else {
3109
+ top = this.errorMessage || this.mode === "slim" ? 6 : -13;
3110
+ }
2929
3111
  this._calendar.fitVertical(top, this._elem.clientHeight);
2930
3112
  this._calendar.style.visibility = 'inherit';
2931
3113
  }
@@ -2950,27 +3132,35 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2950
3132
  }
2951
3133
  handleBlur() {
2952
3134
  var _a, _b;
2953
- const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
2954
- const newValue = this.getParsedDateTime();
2955
- if (newValue || !strValue) {
2956
- this.errorMessage = "";
2957
- const currentValue = DateUtils$1.validateDate(this.value, true);
2958
- const newValueValidated = DateUtils$1.validateDate(newValue, true);
2959
- if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
2960
- if (newValueValidated) {
2961
- this._textInput.value = this.getTextValue(newValueValidated) || '';
2962
- this._focused = false;
3135
+ try {
3136
+ const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
3137
+ const newValue = this.getParsedDateTime();
3138
+ if (newValue || !strValue) {
3139
+ this.errorMessage = "";
3140
+ const currentValue = DateUtils$1.validateDate(this.value, true);
3141
+ const newValueValidated = DateUtils$1.validateDate(newValue, true);
3142
+ if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
3143
+ if (newValueValidated) {
3144
+ this._textInput.value = this.getTextValue(newValueValidated) || '';
3145
+ this._focused = false;
3146
+ }
3147
+ this.ezCancelWaitingChange.emit();
3148
+ }
3149
+ else {
3150
+ this.changeValue(newValueValidated);
2963
3151
  }
2964
- this.ezCancelWaitingChange.emit();
2965
3152
  }
2966
3153
  else {
2967
- this.changeValue(newValueValidated);
3154
+ this.changeValue(undefined);
3155
+ this.ezCancelWaitingChange.emit();
3156
+ this.errorMessage = "O valor digitado não é uma data válida";
2968
3157
  }
2969
3158
  }
2970
- else {
2971
- this.changeValue(undefined);
2972
- this.ezCancelWaitingChange.emit();
2973
- this.errorMessage = "O valor digitado não é uma data válida";
3159
+ finally {
3160
+ for (const callback of this._valuePromiseCallbacks) {
3161
+ callback(this.value);
3162
+ }
3163
+ this._valuePromiseCallbacks = [];
2974
3164
  }
2975
3165
  }
2976
3166
  getTextValue(date) {
@@ -2984,6 +3174,7 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2984
3174
  const currentValue = DateUtils$1.validateDate(this.value, true);
2985
3175
  const newValueValidated = DateUtils$1.validateDate(newValue, true);
2986
3176
  if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
3177
+ this._changePending = true;
2987
3178
  this._focused = true;
2988
3179
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
2989
3180
  }
@@ -2997,13 +3188,16 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2997
3188
  this._textInput.value = textValue;
2998
3189
  }
2999
3190
  }
3191
+ isFixed() {
3192
+ return this._elem.dataset.isFixed === "true";
3193
+ }
3000
3194
  componentDidLoad() {
3001
3195
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
3002
3196
  this.setInputValue();
3003
3197
  }
3004
3198
  render() {
3005
3199
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
3006
- return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick(), canShowError: this.canShowError }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, ref: elem => this._calendar = elem, time: true, showSeconds: this.showSeconds })));
3200
+ return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, restrict: "0123456789/: ", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, onKeyDown: event => { this.handleKeyDown(event); }, onBlur: () => this.handleBlur(), onInput: (evt) => this.handleInput(evt), onFocus: () => this.handleFocus(), onClick: () => this.handleClick(), canShowError: this.canShowError }, h("button", { disabled: !this.enabled, tabindex: -1, class: "btn-open-cal", onClick: () => this.showCalendar(), slot: "leftIcon" })), h("ez-calendar", { ref: elem => this._calendar = elem, "data-element-id": ElementIDUtils.getInternalIDInfo("calendar"), onEzChange: (event) => { this.hideCalendar(); event.stopPropagation(); }, floating: true, time: true, showSeconds: this.showSeconds, "data-is-fixed": this._elem.dataset.isFixed })));
3007
3201
  }
3008
3202
  get _elem() { return this; }
3009
3203
  static get watchers() { return {
@@ -4347,7 +4541,7 @@ const EzForm$1 = class extends HTMLElement$1 {
4347
4541
  static get style() { return ezFormCss; }
4348
4542
  };
4349
4543
 
4350
- const buildSwitch = (field) => {
4544
+ const buildSwitch$1 = (field) => {
4351
4545
  return buildField(field.name, field.label, field.readOnly, field.contextName, true);
4352
4546
  };
4353
4547
  const buildCheckBox = (field) => {
@@ -4358,7 +4552,7 @@ function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
4358
4552
  h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
4359
4553
  }
4360
4554
 
4361
- const buildComboBox = ({ name, label, readOnly, required, props, contextName, canShowError }) => {
4555
+ const buildComboBox$1 = ({ name, label, readOnly, required, props, contextName, canShowError }) => {
4362
4556
  const prop = props === null || props === void 0 ? void 0 : props.options;
4363
4557
  let options;
4364
4558
  if (typeof prop === "string") {
@@ -4372,15 +4566,15 @@ const buildComboBox = ({ name, label, readOnly, required, props, contextName, ca
4372
4566
  h("ez-combo-box", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, options: options, canShowError: canShowError })));
4373
4567
  };
4374
4568
 
4375
- const buildDate = ({ name, label, readOnly, canShowError }) => {
4569
+ const buildDate$1 = ({ name, label, readOnly, canShowError }) => {
4376
4570
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4377
4571
  h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
4378
4572
  };
4379
- const buildTime = ({ name, label, readOnly, canShowError }) => {
4573
+ const buildTime$1 = ({ name, label, readOnly, canShowError }) => {
4380
4574
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4381
4575
  h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
4382
4576
  };
4383
- const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) => {
4577
+ const buildDateTime$1 = ({ name, label, readOnly, contextName, canShowError }) => {
4384
4578
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4385
4579
  h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
4386
4580
  };
@@ -4396,20 +4590,20 @@ const buildFile = ({ name, label, readOnly, contextName, props }) => {
4396
4590
  h("ez-upload", Object.assign({ enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name }, uploadProps))));
4397
4591
  };
4398
4592
 
4399
- const buildDecimal = ({ name, label, readOnly, props, contextName, canShowError }) => {
4593
+ const buildDecimal$1 = ({ name, label, readOnly, props, contextName, canShowError }) => {
4400
4594
  const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
4401
4595
  const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
4402
- return buildNumeric(name, label, readOnly, precision, prettyPrecision, contextName, canShowError);
4596
+ return buildNumeric$1(name, label, readOnly, precision, prettyPrecision, contextName, canShowError);
4403
4597
  };
4404
- const buildInteger = ({ name, label, readOnly, contextName, canShowError }) => {
4405
- return buildNumeric(name, label, readOnly, 0, 0, contextName, canShowError);
4598
+ const buildInteger$1 = ({ name, label, readOnly, contextName, canShowError }) => {
4599
+ return buildNumeric$1(name, label, readOnly, 0, 0, contextName, canShowError);
4406
4600
  };
4407
- function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
4601
+ function buildNumeric$1(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
4408
4602
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4409
4603
  h("ez-number-input", { enabled: !readOnly, label: fieldLabel, precision: precision, prettyPrecision: prettyPrecision, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName, canShowError: canShowError })));
4410
4604
  }
4411
4605
 
4412
- const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
4606
+ const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
4413
4607
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4414
4608
  h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
4415
4609
  };
@@ -4419,25 +4613,25 @@ const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError
4419
4613
  h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, rows: rows, canShowError: canShowError })));
4420
4614
  };
4421
4615
 
4422
- const buildTextInput = ({ name, label, readOnly, contextName, canShowError }) => {
4616
+ const buildTextInput$1 = ({ name, label, readOnly, contextName, canShowError }) => {
4423
4617
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4424
4618
  h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
4425
4619
  };
4426
4620
 
4427
- const uiBuilders = new Map();
4428
- uiBuilders.set(UserInterface.CHECKBOX, buildCheckBox);
4429
- uiBuilders.set(UserInterface.SWITCH, buildSwitch);
4430
- uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
4431
- uiBuilders.set(UserInterface.DATE, buildDate);
4432
- uiBuilders.set(UserInterface.TIME, buildTime);
4433
- uiBuilders.set(UserInterface.DATETIME, buildDateTime);
4434
- uiBuilders.set(UserInterface.FILE, buildFile);
4435
- uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
4436
- uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
4437
- uiBuilders.set(UserInterface.SEARCH, buildSearch);
4438
- uiBuilders.set(UserInterface.LONGTEXT, buildTextArea);
4621
+ const uiBuilders$1 = new Map();
4622
+ uiBuilders$1.set(UserInterface.CHECKBOX, buildCheckBox);
4623
+ uiBuilders$1.set(UserInterface.SWITCH, buildSwitch$1);
4624
+ uiBuilders$1.set(UserInterface.OPTIONSELECTOR, buildComboBox$1);
4625
+ uiBuilders$1.set(UserInterface.DATE, buildDate$1);
4626
+ uiBuilders$1.set(UserInterface.TIME, buildTime$1);
4627
+ uiBuilders$1.set(UserInterface.DATETIME, buildDateTime$1);
4628
+ uiBuilders$1.set(UserInterface.FILE, buildFile);
4629
+ uiBuilders$1.set(UserInterface.DECIMALNUMBER, buildDecimal$1);
4630
+ uiBuilders$1.set(UserInterface.INTEGERNUMBER, buildInteger$1);
4631
+ uiBuilders$1.set(UserInterface.SEARCH, buildSearch$1);
4632
+ uiBuilders$1.set(UserInterface.LONGTEXT, buildTextArea);
4439
4633
  const fieldBuilder = (field) => {
4440
- const builder = uiBuilders.get(field.userInterface) || buildTextInput;
4634
+ const builder = uiBuilders$1.get(field.userInterface) || buildTextInput$1;
4441
4635
  const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
4442
4636
  return builder(Object.assign(Object.assign({}, field), { label }));
4443
4637
  };
@@ -123337,6 +123531,7 @@ class DataSource {
123337
123531
  case Action.DATA_SAVED:
123338
123532
  case Action.EDITION_CANCELED:
123339
123533
  case Action.DATA_CHANGED:
123534
+ case Action.DATA_RESOLVED:
123340
123535
  this._controller.refresh();
123341
123536
  break;
123342
123537
  case Action.SELECTION_CHANGED:
@@ -123670,6 +123865,443 @@ const gridTerms = {
123670
123865
  ctrlV: "Ctrl+V"
123671
123866
  };
123672
123867
 
123868
+ const buildEditorMetadata = (descriptor, eGridCell, dataUnit, editionManager) => {
123869
+ return Object.assign(Object.assign({}, buildFieldMetadata(descriptor)), { eGridCell, dataUnit, editionManager });
123870
+ };
123871
+
123872
+ const MINIMIUM_WIDTH_TEXTAREA = 210;
123873
+ const PADDING_VALUE_TEXTAREA = 12;
123874
+ const buildTextInput = ({ name, contextName }) => {
123875
+ return HTMLBuilder.parseElement(`<ez-text-input
123876
+ class="ez-grid grid_editor"
123877
+ data-field-name=${name}
123878
+ data-context-name=${contextName}
123879
+ mode="slim"
123880
+ />`);
123881
+ };
123882
+ const buildTextAreaInput = ({ eGridCell, editionManager }) => {
123883
+ const element = HTMLBuilder.parseElement(`<ez-text-area
123884
+ can-show-error="false"
123885
+ enable-resize="true"
123886
+ />`);
123887
+ element.addEventListener('keydown', event => handlePressEnterEvent(event, element, editionManager));
123888
+ setElementInitialWidth(eGridCell, element);
123889
+ element.isPopUp = true;
123890
+ return element;
123891
+ };
123892
+ function setElementInitialWidth(eGridCell, element) {
123893
+ const { width } = eGridCell.getBoundingClientRect();
123894
+ const newValue = width > MINIMIUM_WIDTH_TEXTAREA ? width : MINIMIUM_WIDTH_TEXTAREA;
123895
+ element.style.minWidth = `${newValue - PADDING_VALUE_TEXTAREA}px`;
123896
+ element.style.resize = "both";
123897
+ }
123898
+ function handlePressEnterEvent(event, element, editionManager) {
123899
+ if (isEnter(event)) {
123900
+ const shouldBreakLine = event.ctrlKey;
123901
+ if (shouldBreakLine) {
123902
+ element.appendTextToSelection('\n');
123903
+ event.preventDefault();
123904
+ return;
123905
+ }
123906
+ editionManager.navigateByEnterKey(event);
123907
+ }
123908
+ }
123909
+ function isEnter(event) {
123910
+ return [event.key, event.code].includes('Enter');
123911
+ }
123912
+
123913
+ const LIMIT_TIME_VALUE = 2359;
123914
+ const buildDate = () => {
123915
+ const dateInput = HTMLBuilder.parseElement(`<ez-date-input
123916
+ class="ez-grid grid_editor"
123917
+ mode="slim"
123918
+ data-is-fixed="true"
123919
+ />`);
123920
+ dateInput.valueGetter = () => dateInput.getValueAsync();
123921
+ return dateInput;
123922
+ };
123923
+ const buildTime = ({ readOnly }) => {
123924
+ const timeInputElement = HTMLBuilder.parseElement(`<ez-time-input
123925
+ class="ez-grid grid_editor"
123926
+ enabled=${!readOnly}
123927
+ mode="slim"
123928
+ />`);
123929
+ timeInputElement.valueGetter = () => {
123930
+ const value = timeInputElement.value;
123931
+ const isAllowedTime = parseInt(value) <= LIMIT_TIME_VALUE;
123932
+ return isAllowedTime ? value : null;
123933
+ };
123934
+ timeInputElement.valueSetter = (value) => {
123935
+ const isAllowedTime = parseInt(value) <= LIMIT_TIME_VALUE;
123936
+ if (!isAllowedTime)
123937
+ return timeInputElement.value = null;
123938
+ return timeInputElement.value = value;
123939
+ };
123940
+ return timeInputElement;
123941
+ };
123942
+ const buildDateTime = ({ readOnly }) => {
123943
+ const dateTimeInput = HTMLBuilder.parseElement(`<ez-date-time-input
123944
+ class="ez-grid grid_editor"
123945
+ mode="slim"
123946
+ enabled=${!readOnly}
123947
+ data-is-fixed="true"
123948
+ />`);
123949
+ dateTimeInput.valueGetter = () => dateTimeInput.getValueAsync();
123950
+ return dateTimeInput;
123951
+ };
123952
+
123953
+ const buildDecimal = ({ readOnly, props }) => {
123954
+ const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
123955
+ const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
123956
+ return buildNumeric(readOnly, precision, prettyPrecision);
123957
+ };
123958
+ const buildInteger = ({ readOnly }) => {
123959
+ return buildNumeric(readOnly, 0, 0);
123960
+ };
123961
+ function buildNumeric(readOnly, precision, prettyPrecision) {
123962
+ const input = HTMLBuilder.parseElement(`<ez-number-input
123963
+ class="ez-grid grid_editor"
123964
+ enabled=${!readOnly}
123965
+ precision=${precision}
123966
+ pretty-precision=${prettyPrecision}
123967
+ mode="slim"
123968
+ />`);
123969
+ input.valueGetter = () => input.getValueAsync();
123970
+ return input;
123971
+ }
123972
+
123973
+ function getViewPortHeight(cell) {
123974
+ let currentElem = cell;
123975
+ while (currentElem) {
123976
+ const viewPort = currentElem.querySelector("[ref=eBodyViewport]");
123977
+ if (viewPort) {
123978
+ return viewPort.getBoundingClientRect().bottom;
123979
+ }
123980
+ currentElem = currentElem.parentElement;
123981
+ }
123982
+ }
123983
+
123984
+ const BOOLEAN_OPTIONS = new Map([[true, { value: "S", label: "Sim" }], [false, { value: "N", label: "Não" }]]);
123985
+ const buildComboBox = ({ required, props, eGridCell }) => {
123986
+ const prop = props === null || props === void 0 ? void 0 : props.options;
123987
+ let options;
123988
+ if (typeof prop === "string") {
123989
+ const parsed = JSON.parse(prop);
123990
+ options = Object.keys(parsed).map(key => { return { value: key, label: parsed[key] }; });
123991
+ }
123992
+ else {
123993
+ options = prop;
123994
+ }
123995
+ const combo = HTMLBuilder.parseElement(`<ez-combo-box
123996
+ class="grid_editor"
123997
+ suppress-empty-option=${required}
123998
+ mode="slim"
123999
+ />`);
124000
+ combo.options = options;
124001
+ combo.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
124002
+ return combo;
124003
+ };
124004
+ const buildSwitch = (fieldMetadata) => {
124005
+ const combo = buildComboBox(Object.assign(Object.assign({}, fieldMetadata), { props: Object.assign(Object.assign({}, fieldMetadata.props), { options: Array.from(BOOLEAN_OPTIONS.values()) }) }));
124006
+ combo.valueGetter = () => {
124007
+ const value = combo.value;
124008
+ if (value == undefined) {
124009
+ return;
124010
+ }
124011
+ return value.value == "S";
124012
+ };
124013
+ combo.valueSetter = (value) => {
124014
+ if (value != undefined) {
124015
+ combo.value = BOOLEAN_OPTIONS.get(value);
124016
+ }
124017
+ };
124018
+ return combo;
124019
+ };
124020
+
124021
+ const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
124022
+ const ezSearch = HTMLBuilder.parseElement(`<ez-search
124023
+ class="ez-grid grid_editor"
124024
+ mode="slim"
124025
+ suppress-empty-option=${required}
124026
+ enabled=${!readOnly}
124027
+ />`);
124028
+ const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
124029
+ ezSearch.optionLoader = (argument) => loader(argument, name, dataUnit);
124030
+ ezSearch.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
124031
+ ezSearch.valueGetter = () => ezSearch.getValueAsync();
124032
+ return ezSearch;
124033
+ };
124034
+
124035
+ const uiBuilders = new Map();
124036
+ uiBuilders.set(UserInterface.DATE, buildDate);
124037
+ uiBuilders.set(UserInterface.TIME, buildTime);
124038
+ uiBuilders.set(UserInterface.DATETIME, buildDateTime);
124039
+ uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
124040
+ uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
124041
+ uiBuilders.set(UserInterface.SWITCH, buildSwitch);
124042
+ uiBuilders.set(UserInterface.CHECKBOX, buildSwitch);
124043
+ uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
124044
+ uiBuilders.set(UserInterface.LONGTEXT, buildTextAreaInput);
124045
+ uiBuilders.set(UserInterface.SEARCH, buildSearch);
124046
+ class EzCellEditor {
124047
+ init(params) {
124048
+ const fieldName = params.column.getColId();
124049
+ const dataUnit = params.context.dataUnit;
124050
+ const fieldMetadata = buildEditorMetadata(dataUnit.getField(fieldName), params.eGridCell, dataUnit, params.context.editionManager);
124051
+ const builder = uiBuilders.get(fieldMetadata.userInterface) || buildTextInput;
124052
+ this._gui = builder(fieldMetadata);
124053
+ if (this._gui.valueSetter != undefined) {
124054
+ this._gui.valueSetter(params.value);
124055
+ }
124056
+ else {
124057
+ this._gui.value = params.value;
124058
+ }
124059
+ }
124060
+ getGui() {
124061
+ return this._gui;
124062
+ }
124063
+ afterGuiAttached() {
124064
+ this.focusIn();
124065
+ }
124066
+ focusIn() {
124067
+ this._gui.focus();
124068
+ this._gui.setFocus({ selectText: true });
124069
+ }
124070
+ getValue() {
124071
+ return this._gui.valueGetter != undefined ? this._gui.valueGetter() : this._gui.value;
124072
+ }
124073
+ isPopup() {
124074
+ return this._gui.isPopUp;
124075
+ }
124076
+ }
124077
+
124078
+ class GridEditionManager {
124079
+ constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled) {
124080
+ this._dataUnit = dataUnit;
124081
+ this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
124082
+ getRequiredFields: () => this.getRequiredFields(),
124083
+ markAsInvalid: () => { },
124084
+ getMessageForField: () => null
124085
+ }, recordsValidator);
124086
+ this._useEnterLikeTab = useEnterLikeTab;
124087
+ this._editionIsDisabled = editionIsDisabled;
124088
+ }
124089
+ configureGrid(options) {
124090
+ this._gridOptions = options;
124091
+ options.readOnlyEdit = true;
124092
+ options.onCellEditRequest = evt => this.onCellEditRequest(evt);
124093
+ options.onCellKeyDown = evt => {
124094
+ if (evt.event && evt["column"]) {
124095
+ this.onCellKeyDown(evt);
124096
+ }
124097
+ };
124098
+ return options;
124099
+ }
124100
+ proceedAutoSave() {
124101
+ if (!this._dataUnit.isDirty()) {
124102
+ this.saveSuccess();
124103
+ return;
124104
+ }
124105
+ if (!this._isGridEdition) {
124106
+ return;
124107
+ }
124108
+ const currentRercord = this._dataUnit.getSelectedRecord();
124109
+ if (currentRercord == undefined) {
124110
+ return;
124111
+ }
124112
+ this._recordValidationProcessor
124113
+ .validate()
124114
+ .then(() => {
124115
+ this._dataUnit.saveData()
124116
+ .then(() => this.saveSuccess())
124117
+ .catch(reason => this.saveFail(reason));
124118
+ })
124119
+ .catch(reason => this.saveFail(reason));
124120
+ }
124121
+ navigateByEnterKey(keyboardEvent) {
124122
+ const backwards = keyboardEvent.shiftKey;
124123
+ if (this._useEnterLikeTab) {
124124
+ if (backwards) {
124125
+ this._gridOptions.api.tabToPreviousCell(keyboardEvent);
124126
+ }
124127
+ else {
124128
+ this._gridOptions.api.tabToNextCell(keyboardEvent);
124129
+ }
124130
+ }
124131
+ else {
124132
+ const editionCell = this._gridOptions.api.getEditingCells()[0];
124133
+ if (editionCell) {
124134
+ let { rowIndex } = editionCell;
124135
+ this.nextEditionRow(rowIndex, editionCell.column, backwards);
124136
+ }
124137
+ }
124138
+ }
124139
+ getComponents() {
124140
+ return { ezCellEditor: EzCellEditor };
124141
+ }
124142
+ verifyClickToEdition(api, cellClicked) {
124143
+ if (this.isSecondClick(cellClicked)) {
124144
+ api.startEditingCell({ rowIndex: cellClicked.rowIndex, colKey: cellClicked.column.getColId() });
124145
+ }
124146
+ this._lastCellClicked = cellClicked;
124147
+ }
124148
+ configureColumn(col) {
124149
+ col.cellEditor = 'ezCellEditor';
124150
+ col.editable = params => this.canEdit(params);
124151
+ col.suppressKeyboardEvent = (params) => {
124152
+ return params.event.key === KeyCode.ENTER;
124153
+ };
124154
+ return col;
124155
+ }
124156
+ getRequiredFields() {
124157
+ return this._gridOptions.columnApi.getAllDisplayedColumns().filter(c => {
124158
+ const fieldDefinition = this._dataUnit.getField(c.getColId());
124159
+ return fieldDefinition && fieldDefinition.required;
124160
+ }).map(c => c.getColId());
124161
+ }
124162
+ saveSuccess() {
124163
+ this.focusOnCell(this._targetEditionCell);
124164
+ this._lastCellEdited = undefined;
124165
+ this._targetEditionCell = undefined;
124166
+ this._isGridEdition = false;
124167
+ }
124168
+ saveFail(reason) {
124169
+ this.focusOnCell(this._lastCellEdited);
124170
+ this._isGridEdition = false;
124171
+ if (reason) {
124172
+ Promise.reject(reason);
124173
+ }
124174
+ }
124175
+ focusOnCell(cell) {
124176
+ if (cell == undefined) {
124177
+ return;
124178
+ }
124179
+ const { rowIndex, column } = cell;
124180
+ this._gridOptions.api.getDisplayedRowAtIndex(rowIndex).setSelected(true, true);
124181
+ this._gridOptions.api.clearRangeSelection();
124182
+ this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [column] });
124183
+ this._gridOptions.api.startEditingCell({ colKey: column.getColId(), rowIndex });
124184
+ this._gridOptions.api.setFocusedCell(rowIndex, column.getColId());
124185
+ const cellEditor = this._gridOptions.api.getCellEditorInstances()[0];
124186
+ if (cellEditor) {
124187
+ cellEditor.focusIn();
124188
+ }
124189
+ }
124190
+ onCellKeyDown(event) {
124191
+ const keyboardEvent = event.event;
124192
+ switch (keyboardEvent.key) {
124193
+ case KeyCode.ENTER:
124194
+ this.processEnterKey(keyboardEvent, event);
124195
+ break;
124196
+ case KeyCode.UP:
124197
+ this.editPreviousRow(event.api);
124198
+ break;
124199
+ case KeyCode.DOWN:
124200
+ this.editNextRow(event.api);
124201
+ break;
124202
+ }
124203
+ }
124204
+ processEnterKey(keyboardEvent, event) {
124205
+ const editionCell = event.api.getEditingCells()[0];
124206
+ if (!editionCell) {
124207
+ event.api.startEditingCell({ colKey: event.column.getColId(), rowIndex: event.rowIndex });
124208
+ return;
124209
+ }
124210
+ this.navigateByEnterKey(keyboardEvent);
124211
+ }
124212
+ nextEditionRow(rowIndex, column, backwards) {
124213
+ if (backwards) {
124214
+ rowIndex = rowIndex - 1;
124215
+ if (rowIndex < 0) {
124216
+ rowIndex = this._dataUnit.records.length - 1;
124217
+ }
124218
+ }
124219
+ else {
124220
+ rowIndex = rowIndex + 1;
124221
+ if (rowIndex >= this._dataUnit.records.length) {
124222
+ rowIndex = 0;
124223
+ }
124224
+ }
124225
+ this._targetEditionCell = new TargetEdition(rowIndex, column, true);
124226
+ this.finishEdition();
124227
+ }
124228
+ editPreviousRow(api) {
124229
+ this.moveEditionVertically(api, -1);
124230
+ }
124231
+ editNextRow(api) {
124232
+ this.moveEditionVertically(api, 1);
124233
+ }
124234
+ moveEditionVertically(api, offset) {
124235
+ const editionCell = api.getEditingCells()[0];
124236
+ if (!editionCell) {
124237
+ return;
124238
+ }
124239
+ const rowIndex = editionCell.rowIndex + offset;
124240
+ if (api.getDisplayedRowAtIndex(rowIndex)) {
124241
+ this._targetEditionCell = new TargetEdition(rowIndex, editionCell.column, offset < 0);
124242
+ this.finishEdition();
124243
+ }
124244
+ }
124245
+ finishEdition() {
124246
+ this._gridOptions.api.stopEditing();
124247
+ setTimeout(() => {
124248
+ //O Timeout foi inserido para permitir que o ciclo de finalização prossiga
124249
+ //pois precisamos aguardar o fim da edição para executar o autosave.
124250
+ this.proceedAutoSave();
124251
+ }, 0);
124252
+ }
124253
+ canEdit(params) {
124254
+ if (this._editionIsDisabled()) {
124255
+ return false;
124256
+ }
124257
+ return this.isColEditable(params.colDef.field);
124258
+ }
124259
+ isColEditable(fieldName) {
124260
+ const fieldDefinition = this._dataUnit.getField(fieldName);
124261
+ if (fieldDefinition) {
124262
+ return !fieldDefinition.readOnly;
124263
+ }
124264
+ return false;
124265
+ }
124266
+ isSecondClick(cellClicked) {
124267
+ if (!this._lastCellClicked) {
124268
+ return false;
124269
+ }
124270
+ if (this._lastCellClicked.column != cellClicked.column) {
124271
+ return false;
124272
+ }
124273
+ if (this._lastCellClicked.rowIndex != cellClicked.rowIndex) {
124274
+ return false;
124275
+ }
124276
+ return true;
124277
+ }
124278
+ onCellEditRequest(event) {
124279
+ const fieldName = event.colDef.field;
124280
+ const value = event.newValue;
124281
+ if (event.oldValue != value) {
124282
+ if (value instanceof Promise) {
124283
+ const fieldDescriptor = this._dataUnit.getField(event.colDef.colId);
124284
+ event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: (fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.userInterface) === UserInterface.SEARCH ? value : event.oldValue }));
124285
+ value.then(resolved => event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: resolved })));
124286
+ }
124287
+ else {
124288
+ event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: value }));
124289
+ }
124290
+ this._isGridEdition = true;
124291
+ this._dataUnit.setFieldValue(fieldName, value, [event.data.__record__id__]);
124292
+ this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
124293
+ }
124294
+ }
124295
+ }
124296
+ class TargetEdition {
124297
+ constructor(rowIndex, column, backwards) {
124298
+ this.rowPinned = null;
124299
+ this.rowIndex = rowIndex;
124300
+ this.column = column;
124301
+ this.backwards = backwards;
124302
+ }
124303
+ }
124304
+
123673
124305
  class AgGridController {
123674
124306
  configFilterColumn(filterColumn) {
123675
124307
  this._filterColumn = filterColumn;
@@ -123705,6 +124337,9 @@ class AgGridController {
123705
124337
  getGridConfig() {
123706
124338
  return this._gridConfig;
123707
124339
  }
124340
+ getGridApi() {
124341
+ return this._gridOptions.api;
124342
+ }
123708
124343
  getSort() {
123709
124344
  const sortedColumns = [];
123710
124345
  this._gridOptions.columnApi
@@ -123765,6 +124400,7 @@ class AgGridController {
123765
124400
  this._doubleClickCallBack = options.onDoubleClick;
123766
124401
  this._multipleSelection = options.allowMultipleSelection;
123767
124402
  this._dataUnit = options.dataUnit;
124403
+ this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled);
123768
124404
  this._statusResolver = options.statusResolver;
123769
124405
  if (this._dataUnit) {
123770
124406
  this._dataUnit.sortingProvider = this;
@@ -123784,12 +124420,14 @@ class AgGridController {
123784
124420
  defaultColDef: {
123785
124421
  headerClass: 'ez-grid__cell-header',
123786
124422
  cellClass: 'ez-grid__cell-body',
124423
+ cellStyle: {
124424
+ height: '100%'
124425
+ }
123787
124426
  },
123788
- components: {
123789
- ezGridHeaderComponent: SelectionHeader,
123790
- ezGridCustomHeader: EzGridCustomHeader,
123791
- },
124427
+ components: Object.assign({ ezGridHeaderComponent: SelectionHeader, ezGridCustomHeader: EzGridCustomHeader }, this._editionManager.getComponents()),
123792
124428
  context: {
124429
+ editionManager: this._editionManager,
124430
+ dataUnit: this._dataUnit,
123793
124431
  headerCheckStatusGetter: () => this.getSelectionHeaderStatus(),
123794
124432
  headerCheckStatusSetter: (selectAll) => this.updateSelectionForAll(selectAll),
123795
124433
  },
@@ -123797,6 +124435,7 @@ class AgGridController {
123797
124435
  this.defineRowModelType(this._gridOptions, options);
123798
124436
  this.setOptionsEvents(this._gridOptions);
123799
124437
  this.setOptionsSupress(this._gridOptions);
124438
+ this._gridOptions = this._editionManager.configureGrid(this._gridOptions);
123800
124439
  if (this._enterprise) {
123801
124440
  this._grid = new Grid(container, this._gridOptions);
123802
124441
  }
@@ -123943,6 +124582,7 @@ class AgGridController {
123943
124582
  opt.onSelectionChanged = e => this.onSelectionChange(e);
123944
124583
  opt.onRowDoubleClicked = evt => this.onRowDoubleClick(evt);
123945
124584
  opt.onDragStopped = evt => this.onCallStateChange('columnMovedEnd', evt);
124585
+ opt.onCellClicked = evt => this.onCellClicked(evt);
123946
124586
  }
123947
124587
  setOptionsSupress(opt) {
123948
124588
  opt.suppressDragLeaveHidesColumns = true;
@@ -124246,7 +124886,7 @@ class AgGridController {
124246
124886
  else if (propSortable === false) {
124247
124887
  tooltip = 'Coluna não pode ser ordenada';
124248
124888
  }
124249
- return {
124889
+ return this._editionManager.configureColumn({
124250
124890
  headerName: source.label,
124251
124891
  field: source.name,
124252
124892
  sortable: propSortable,
@@ -124259,10 +124899,19 @@ class AgGridController {
124259
124899
  showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name) }),
124260
124900
  },
124261
124901
  valueFormatter: params => {
124902
+ if (params.value == undefined) {
124903
+ return "";
124904
+ }
124905
+ if (params.value instanceof Promise) {
124906
+ return "Carregando...";
124907
+ }
124908
+ if (this._dataUnit) {
124909
+ return this._dataUnit.getFormattedValue(source.name, params.value);
124910
+ }
124262
124911
  return this.getFormatterByColumn(params, source);
124263
124912
  },
124264
124913
  cellStyle: this.getStyleByColumn(source),
124265
- };
124914
+ });
124266
124915
  }
124267
124916
  getInitCellStyle() {
124268
124917
  return {
@@ -124335,6 +124984,13 @@ class AgGridController {
124335
124984
  return params.value.toLocaleDateString();
124336
124985
  }
124337
124986
  }
124987
+ if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.ELAPSEDTIME || (source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.TIME) {
124988
+ if (!!params.value) {
124989
+ const maskFormatter = new MaskFormatter("##:##");
124990
+ const formattedValue = String(params.value).padStart(4, '0');
124991
+ return maskFormatter.format(formattedValue);
124992
+ }
124993
+ }
124338
124994
  }
124339
124995
  onCallStateChange(type, e) {
124340
124996
  const finished = !('finished' in e) || e['finished'];
@@ -124349,6 +125005,13 @@ class AgGridController {
124349
125005
  this._columnStateChangeCallback(type, this.getColumnsState(), info);
124350
125006
  }
124351
125007
  }
125008
+ onCellClicked(event) {
125009
+ this._editionManager.verifyClickToEdition(event.api, {
125010
+ rowIndex: event.rowIndex,
125011
+ column: event.column,
125012
+ rowPinned: undefined
125013
+ });
125014
+ }
124352
125015
  isElementResize(e) {
124353
125016
  return e['target'] && e['target'].getAttribute('ref') === 'eResize';
124354
125017
  }
@@ -124366,6 +125029,7 @@ class AgGridController {
124366
125029
  if (this._selectionChangeCallback) {
124367
125030
  clearTimeout(this._selectionChangeDeboucing);
124368
125031
  this._selectionChangeDeboucing = window.setTimeout(() => {
125032
+ this._editionManager.proceedAutoSave();
124369
125033
  if (this._dataUnit) {
124370
125034
  if (event.context.selectionChangeQuietly) {
124371
125035
  const selectionInfo = this._dataUnit;
@@ -124488,6 +125152,9 @@ const EzGrid$1 = class extends HTMLElement$1 {
124488
125152
  this.dataUnit = undefined;
124489
125153
  this.statusResolver = undefined;
124490
125154
  this.columnfilterDataSource = undefined;
125155
+ this.useEnterLikeTab = false;
125156
+ this.recordsValidator = undefined;
125157
+ this.canEdit = true;
124491
125158
  }
124492
125159
  /**
124493
125160
  * Aplica a definição de colunas.
@@ -124721,6 +125388,9 @@ const EzGrid$1 = class extends HTMLElement$1 {
124721
125388
  serverURL: this.serverUrl,
124722
125389
  dataUnit: this.dataUnit,
124723
125390
  statusResolver: this.statusResolver,
125391
+ useEnterLikeTab: this.useEnterLikeTab,
125392
+ recordsValidator: this.recordsValidator,
125393
+ editionIsDisabled: () => !this.canEdit
124724
125394
  });
124725
125395
  if (this.config) {
124726
125396
  this.observeConfig(this.config);
@@ -124729,6 +125399,11 @@ const EzGrid$1 = class extends HTMLElement$1 {
124729
125399
  this.setEvents();
124730
125400
  this.componentReady.emit();
124731
125401
  this._gridController.configFilterColumn(this._filterColumn);
125402
+ this._container.addEventListener('focusout', (event) => {
125403
+ const api = this._gridController.getGridApi();
125404
+ if (api && !this._container.contains(event.relatedTarget))
125405
+ api.clearFocusedCell();
125406
+ });
124732
125407
  }
124733
125408
  componentWillRender() {
124734
125409
  this.configSelectionCounter();
@@ -125799,7 +126474,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
125799
126474
  static get style() { return ezMultiSelectionListCss; }
125800
126475
  };
125801
126476
 
125802
- const ezNumberInputCss = ":host{display:block;width:100%}";
126477
+ const ezNumberInputCss = ":host{display:block;width:100%}.number__input{height:100%}";
125803
126478
 
125804
126479
  const EzNumberInput$1 = class extends HTMLElement$1 {
125805
126480
  constructor() {
@@ -125810,6 +126485,8 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125810
126485
  this.ezStartChange = createEvent(this, "ezStartChange", 7);
125811
126486
  this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
125812
126487
  this._focused = false;
126488
+ this._changePending = false;
126489
+ this._valuePromiseCallbacks = [];
125813
126490
  this.label = undefined;
125814
126491
  this.value = undefined;
125815
126492
  this.enabled = true;
@@ -125822,8 +126499,8 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125822
126499
  /**
125823
126500
  * Aplica o foco no campo.
125824
126501
  */
125825
- async setFocus() {
125826
- this._textInput.setFocus();
126502
+ async setFocus(options) {
126503
+ this._textInput.setFocus(options);
125827
126504
  }
125828
126505
  /**
125829
126506
  * Remove o foco do campo.
@@ -125837,6 +126514,18 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125837
126514
  async isInvalid() {
125838
126515
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
125839
126516
  }
126517
+ /*
126518
+ * Retorna uma promise com o valor da opção selecionada,
126519
+ * que será resolvida quando o backend devolver este dado.
126520
+ */
126521
+ async getValueAsync() {
126522
+ if (this._changePending) {
126523
+ return new Promise(accept => {
126524
+ this._valuePromiseCallbacks.push(accept);
126525
+ });
126526
+ }
126527
+ return Promise.resolve(this.value);
126528
+ }
125840
126529
  observeLabel() {
125841
126530
  if (this._textInput) {
125842
126531
  this._textInput.label = this.label;
@@ -125872,6 +126561,7 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125872
126561
  this.ezChange.emit(valueEmitted);
125873
126562
  }
125874
126563
  }
126564
+ this._changePending = false;
125875
126565
  }
125876
126566
  validateValue(value) {
125877
126567
  return isNaN(value) || value === undefined ? null : value;
@@ -125898,24 +126588,33 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125898
126588
  this.ezCancelWaitingChange.emit();
125899
126589
  }
125900
126590
  handleBlur() {
125901
- const parsedNumber = this.getParsedNumber();
125902
- if (parsedNumber !== undefined && isNaN(parsedNumber)) {
125903
- this.setError("O valor digitado não é um número válido");
125904
- }
125905
- else {
125906
- try {
125907
- this.changeValue(parsedNumber);
126591
+ try {
126592
+ const parsedNumber = this.getParsedNumber();
126593
+ if (parsedNumber !== undefined && isNaN(parsedNumber)) {
126594
+ this.setError("O valor digitado não é um número válido");
125908
126595
  }
125909
- catch (e) {
125910
- this.setError(e.message);
125911
- return;
126596
+ else {
126597
+ try {
126598
+ this.changeValue(parsedNumber);
126599
+ }
126600
+ catch (e) {
126601
+ this.setError(e.message);
126602
+ return;
126603
+ }
125912
126604
  }
125913
126605
  }
126606
+ finally {
126607
+ for (const callback of this._valuePromiseCallbacks) {
126608
+ callback(this.value);
126609
+ }
126610
+ this._valuePromiseCallbacks = [];
126611
+ }
125914
126612
  }
125915
126613
  handleInput() {
125916
126614
  const parsedNumber = this.getParsedNumber();
125917
126615
  if (parsedNumber !== this.value) {
125918
126616
  this._focused = true;
126617
+ this._changePending = true;
125919
126618
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
125920
126619
  }
125921
126620
  }
@@ -125938,7 +126637,7 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125938
126637
  }
125939
126638
  render() {
125940
126639
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
125941
- return (h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }));
126640
+ return (h("ez-text-input", { class: "number__input", "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: elem => this._textInput = elem, "data-slave-mode": "true", label: this.label, onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), restrict: this.precision > 0 ? "0123456789-,." : "0123456789-", enabled: this.enabled, errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }));
125942
126641
  }
125943
126642
  get _elem() { return this; }
125944
126643
  static get watchers() { return {
@@ -126410,6 +127109,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
126410
127109
  this.suppressEmptyOption = false;
126411
127110
  this.mode = "regular";
126412
127111
  this.canShowError = true;
127112
+ this.listOptionsPosition = undefined;
126413
127113
  }
126414
127114
  observeErrorMessage() {
126415
127115
  if (this._comboElement) {
@@ -126446,6 +127146,14 @@ const EzSearch$1 = class extends HTMLElement$1 {
126446
127146
  var _a, _b;
126447
127147
  (_b = (_a = this._comboElement) === null || _a === void 0 ? void 0 : _a['clearValue']) === null || _b === void 0 ? void 0 : _b.call(_a);
126448
127148
  }
127149
+ /*
127150
+ * Retorna uma promise com o valor da opção selecionada,
127151
+ * que será resolvida quando o backend devolver este dado.
127152
+ */
127153
+ async getValueAsync() {
127154
+ var _a;
127155
+ return (_a = this._comboElement) === null || _a === void 0 ? void 0 : _a.getValueAsync();
127156
+ }
126449
127157
  onComboChange(event) {
126450
127158
  event.stopPropagation();
126451
127159
  this.value = event.detail;
@@ -126459,7 +127167,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
126459
127167
  }
126460
127168
  render() {
126461
127169
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
126462
- return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError }));
127170
+ return (h("ez-combo-box", { "data-element-id": ElementIDUtils.getInternalIDInfo("combo"), ref: elem => this._comboElement = elem, value: this.value, label: this.label, enabled: this.enabled, errorMessage: this.errorMessage, optionLoader: this.optionLoader, searchMode: true, onEzChange: event => this.onComboChange(event), showSelectedValue: this.showSelectedValue, showOptionValue: this.showOptionValue, suppressEmptyOption: this.suppressEmptyOption, mode: this.mode, canShowError: this.canShowError, listOptionsPosition: this.listOptionsPosition }));
126463
127171
  }
126464
127172
  ;
126465
127173
  get _elem() { return this; }
@@ -126778,7 +127486,7 @@ const EzTabselector$1 = class extends HTMLElement$1 {
126778
127486
  static get style() { return ezTabselectorCss; }
126779
127487
  };
126780
127488
 
126781
- const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;width:100%;padding:0;background:none;font-weight:var(--text-area--font-weight);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);margin-top:calc(var(--space--medium, 12px) + 4px)}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}.textarea--slim{margin-top:var(--space--small, 6px)}.textarea--slim::-webkit-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-ms-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:disabled::-webkit-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-ms-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color)}";
127489
+ const ezTextAreaCss = ":host{--text-area--width:100%;--text-area--border-radius:var(--border--radius-medium, 12px);--text-area--font-size:var(--text--medium, 14px);--text-area--font-family:var(--font-pattern, Arial);--text-area--font-weight:var(--text-weight--medium, 400);--text-area--color:var(--title--primary, #000);--text-area__input--background-color:var(--background--medium, #e0e0e0);--text-area__input--border:var(--border--medium, 2px solid);--text-area__input--border-color:var(--text-area__input--background-color);--text-area__input--focus--border-color:var(--color--primary, #008561);--text-area__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--text-area__input--disabled--color:var(--text--disable, #AFB6C0);--text-area__input--error--border-color:#CC2936;--text-area__message_box--font-size:var(--text--small, 12px);--text-area__message_box--info--color:var(--color--success, #22085d);--text-area__message_box--error--color:var(--color--error, #FF0000);--text-area__label--floating--top:6px;--text-area__label--padding-top:12px;--text-area__label--padding-left:14px;--text-area__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--text-area--width)}textarea{box-sizing:border-box;border:none;resize:none;width:100%;padding:0;background:none;font-weight:var(--text-area--font-weight);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);color:var(--text-area--color);margin-top:calc(var(--space--medium, 12px) + 4px)}textarea:focus{outline:none}textarea:disabled{background-color:transparent;color:var(--text-area__input--disabled--color)}.textarea{width:100%;box-sizing:border-box;padding-left:var(--space--medium);padding-right:var(--space--extra-small);border-radius:var(--text-area--border-radius);border:var(--text-area__input--border);border-color:var(--text-area__input--border-color);background-color:var(--text-area__input--background-color)}.textarea--resizable{resize:both}.textarea--focus{border-color:var(--text-area__input--focus--border-color)}.textarea.hasError{color:var(--text-area--color);border-color:var(--text-area__input--error--border-color)}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--text-area--font-family);font-size:var(--text-area__message_box--font-size);color:var(--text-area__message_box--info--color)}.hasError{color:var(--text-area__message_box--error--color)}.textarea__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--text-area__label--padding-right));left:var(--text-area--space--medium);font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color);top:var(--text-area__label--padding-top);left:var(--text-area__label--padding-left);padding-right:var(--text-area__label--padding-right)}.textarea__label--floated{font-family:var(--text-area--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--text-area__label--floating--top)}.textarea__label--disabled{color:var(--text-area__input--disabled--color)}.textarea--slim{margin-top:var(--space--small, 6px)}.textarea--slim::-webkit-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::-moz-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:-ms-input-placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim::placeholder{font-family:var(--text-area--font-family);font-size:var(--text-area--font-size);font-weight:var(--text-area--font-weight);color:var(--text-area--color)}.textarea--slim:disabled::-webkit-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::-moz-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled:-ms-input-placeholder{color:var(--text-area__input--disabled--color)}.textarea--slim:disabled::placeholder{color:var(--text-area__input--disabled--color)}";
126782
127490
 
126783
127491
  const EzTextArea$1 = class extends HTMLElement$1 {
126784
127492
  constructor() {
@@ -126793,6 +127501,7 @@ const EzTextArea$1 = class extends HTMLElement$1 {
126793
127501
  this.rows = 4;
126794
127502
  this.canShowError = true;
126795
127503
  this.mode = "regular";
127504
+ this.enableResize = false;
126796
127505
  }
126797
127506
  observeErrorMessage() {
126798
127507
  var _a, _b, _c, _d;
@@ -126934,7 +127643,10 @@ const EzTextArea$1 = class extends HTMLElement$1 {
126934
127643
  ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
126935
127644
  return (h(Host, null, h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
126936
127645
  h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "textarea__label" : "textarea__label textarea__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
126937
- : null, h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": ElementIDUtils.getInternalIDInfo("input"), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: this.mode === "slim" ? "textarea--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, onKeyDown: event => event.stopPropagation(), rows: this.rows })), this.canShowError && this.mode != "slim" &&
127646
+ : null, h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": ElementIDUtils.getInternalIDInfo("input"), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: {
127647
+ "textarea--slim": this.mode === "slim",
127648
+ "textarea--resizable": this.enableResize
127649
+ }, placeholder: this.mode === "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, rows: this.rows })), this.canShowError && this.mode != "slim" &&
126938
127650
  h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
126939
127651
  }
126940
127652
  get _hostElement() { return this; }
@@ -127045,7 +127757,7 @@ const EzTextEdit$1 = class extends HTMLElement$1 {
127045
127757
  static get style() { return ezTextEditCss; }
127046
127758
  };
127047
127759
 
127048
- const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}";
127760
+ const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--height--slim:32px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--medium, 400);--ez-text-input--color:var(--title--primary, #2B3A54);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--primary, #008561);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__input--noborder-color:white;--ez-text-input__input--padding:var(--space--medium, 6px);--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;--ez-text-input__input--focus--icon-color:var(--ez-text-input__input--focus--border-color);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}:host(.grid_editor){--ez-text-input--height--slim:25px}input{width:100%;box-sizing:border-box;height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color);font-weight:var(--ez-text-input--font-weight);padding:var(--ez-text-input__input--padding)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input:disabled.hasError{color:var(--ez-text-input__input--disabled--color)}input.text--right{text-align:right}input:read-only{cursor:default}.message-box{min-height:16px;min-width:100%;margin-top:3px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}.input--slim{padding-top:var(--space--small, 3px);padding-bottom:var(--space--small, 3px);height:var(--ez-text-input--height--slim)}.input__slim--title{font-size:16px;font-weight:bold}.input--slim::-webkit-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::-moz-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:-ms-input-placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim::placeholder{font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color)}.input--slim:disabled::-webkit-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::-moz-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled:-ms-input-placeholder{color:var(--ez-text-input__input--disabled--color)}.input--slim:disabled::placeholder{color:var(--ez-text-input__input--disabled--color)}input.input__slim--noborder{box-shadow:0 0 0 0;border:0 none;outline:0;background:var(--ez-text-input__input--noborder-color)}";
127049
127761
 
127050
127762
  const EzTextInput$1 = class extends HTMLElement$1 {
127051
127763
  constructor() {
@@ -127146,7 +127858,10 @@ const EzTextInput$1 = class extends HTMLElement$1 {
127146
127858
  /**
127147
127859
  * Aplica o foco no campo.
127148
127860
  */
127149
- async setFocus() {
127861
+ async setFocus(options) {
127862
+ const { selectText } = options || {};
127863
+ if (selectText)
127864
+ this._inputElem.select();
127150
127865
  this._inputElem.focus();
127151
127866
  }
127152
127867
  /**
@@ -127239,7 +127954,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
127239
127954
  if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
127240
127955
  this._labelElem.classList.add("input__label--floated");
127241
127956
  }
127242
- this.adjustColorContentSlot("var(--ez-text-input__input--focus--border-color)");
127957
+ this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)");
127243
127958
  }
127244
127959
  //---------------------------------------------
127245
127960
  // Lifecycle web component
@@ -127269,7 +127984,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
127269
127984
  }
127270
127985
  render() {
127271
127986
  ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
127272
- return (h(Host, null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
127987
+ return (h(Host, { style: this._hostElement.classList.contains("grid_editor") ? { "height": "100%" } : null }, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
127273
127988
  h("label", { ref: (el) => this._labelElem = el, class: this.enabled ? "input__label" : "input__label input__label--disabled", onClick: () => this._inputElem.focus(), title: this.label }, this.label)
127274
127989
  : null, h("input", { "data-element-id": ElementIDUtils.getInternalIDInfo("input"), onFocus: () => this.doFocus(), ref: (el) => this._inputElem = el, type: "text", class: this.mode === "slim" ? "input--slim" : "", placeholder: this.mode === "slim" && this.label ? this.label : "", value: this.value, disabled: !this.enabled, onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); } }), h("slot", { name: "rightIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.canShowError && this.mode != "slim" &&
127275
127990
  h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
@@ -127283,7 +127998,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
127283
127998
  static get style() { return ezTextInputCss; }
127284
127999
  };
127285
128000
 
127286
- const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";
128001
+ const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}.time__input{height:100%}";
127287
128002
 
127288
128003
  const EzTimeInput$1 = class extends HTMLElement$1 {
127289
128004
  constructor() {
@@ -127380,8 +128095,8 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
127380
128095
  /**
127381
128096
  * Aplica o foco no campo.
127382
128097
  */
127383
- async setFocus() {
127384
- this._textInput.setFocus();
128098
+ async setFocus({ selectText }) {
128099
+ this._textInput.setFocus({ selectText });
127385
128100
  }
127386
128101
  /**
127387
128102
  * Remove o foco do campo.
@@ -127402,11 +128117,15 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
127402
128117
  if (this._textInput) {
127403
128118
  this._viewValue = this._textInput.value;
127404
128119
  this.prepareValue(this._viewValue);
127405
- this.value = NumberUtils$1.stringToNumber(this._viewValue.replace(/\D/g, ""));
128120
+ const value = NumberUtils$1.stringToNumber(this._viewValue.replace(/\D/g, ""));
128121
+ this.value = ['string', 'number'].includes(typeof value) ? value : null;
127406
128122
  }
127407
128123
  }
127408
128124
  handleInput() {
127409
- const parsedNumber = NumberUtils$1.stringToNumber(this._textInput.value.replace(/\D/g, ""));
128125
+ const textInputValue = this._textInput.value;
128126
+ if (!['string', 'number'].includes(typeof textInputValue))
128127
+ return;
128128
+ const parsedNumber = NumberUtils$1.stringToNumber(textInputValue.replace(/\D/g, ""));
127410
128129
  if (parsedNumber !== this.value) {
127411
128130
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
127412
128131
  }
@@ -127428,7 +128147,7 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
127428
128147
  }
127429
128148
  render() {
127430
128149
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
127431
- return (h(Host, null, h("ez-text-input", { "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
128150
+ return (h(Host, null, h("ez-text-input", { class: "time__input", "data-element-id": ElementIDUtils.getInternalIDInfo("textInput"), ref: (el) => this._textInput = el, "data-slave-mode": "true", value: this._viewValue, enabled: this.enabled, label: this.label, restrict: "0123456789:", onBlur: () => this.handleBlur(), onInput: () => this.handleInput(), errorMessage: this.errorMessage, mode: this.mode, canShowError: this.canShowError }, h("ez-icon", { slot: "leftIcon", iconName: "timer-outline" }))));
127432
128151
  }
127433
128152
  static get assetsDirs() { return ["../assets"]; }
127434
128153
  get _elem() { return this; }
@@ -128713,12 +129432,12 @@ const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-ap
128713
129432
  const EzBadge = /*@__PURE__*/proxyCustomElement(EzBadge$1, [1,"ez-badge",{"size":[513],"label":[513],"iconLeft":[513,"icon-left"],"iconRight":[513,"icon-right"],"position":[1040],"hasSlot":[32]}]);
128714
129433
  const EzBreadcrumb = /*@__PURE__*/proxyCustomElement(EzBreadcrumb$1, [1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]);
128715
129434
  const EzButton = /*@__PURE__*/proxyCustomElement(EzButton$1, [1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]},[[2,"click","clickListener"]]]);
128716
- const EzCalendar = /*@__PURE__*/proxyCustomElement(EzCalendar$1, [1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"]}]);
129435
+ const EzCalendar = /*@__PURE__*/proxyCustomElement(EzCalendar$1, [1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"]},[[11,"scroll","scrollListener"]]]);
128717
129436
  const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-item",{"item":[16]}]);
128718
129437
  const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
128719
129438
  const EzChip = /*@__PURE__*/proxyCustomElement(EzChip$1, [1,"ez-chip",{"label":[513],"enabled":[516],"removePosition":[513,"remove-position"],"mode":[513],"value":[1540],"showNativeTooltip":[4,"show-native-tooltip"]}]);
128720
129439
  const EzCollapsibleBox = /*@__PURE__*/proxyCustomElement(EzCollapsibleBox$1, [1,"ez-collapsible-box",{"value":[1540],"boxBordered":[4,"box-bordered"],"label":[513],"subtitle":[513],"headerSize":[513,"header-size"],"iconPlacement":[513,"icon-placement"],"headerAlign":[513,"header-align"],"removable":[516],"editable":[516],"conditionalSave":[16],"_activeEditText":[32]}]);
128721
- const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
129440
+ const EzComboBox = /*@__PURE__*/proxyCustomElement(EzComboBox$1, [1,"ez-combo-box",{"value":[1537],"label":[513],"enabled":[516],"options":[1040],"errorMessage":[1537,"error-message"],"searchMode":[4,"search-mode"],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressSearch":[4,"suppress-search"],"optionLoader":[16],"suppressEmptyOption":[4,"suppress-empty-option"],"canShowError":[516,"can-show-error"],"mode":[513],"listOptionsPosition":[16],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
128722
129441
  const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
128723
129442
  const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
128724
129443
  const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040]}]);
@@ -128727,7 +129446,7 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
128727
129446
  const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"]}]);
128728
129447
  const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
128729
129448
  const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16]}]);
128730
- const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_originalRecords":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
129449
+ const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_originalRecords":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
128731
129450
  const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
128732
129451
  const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
128733
129452
  const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [1,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
@@ -128740,11 +129459,11 @@ const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{
128740
129459
  const EzPopup = /*@__PURE__*/proxyCustomElement(EzPopup$1, [1,"ez-popup",{"size":[1],"opened":[1540],"useHeader":[516,"use-header"],"heightMode":[513,"height-mode"],"ezTitle":[1,"ez-title"]}]);
128741
129460
  const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
128742
129461
  const EzScroller = /*@__PURE__*/proxyCustomElement(EzScroller$1, [1,"ez-scroller",{"direction":[1],"locked":[4],"activeShadow":[4,"active-shadow"],"isActive":[32]},[[2,"click","clickListener"],[1,"mousedown","mouseDownHandler"],[1,"mouseup","mouseUpHandler"],[1,"mousemove","mouseMoveHandler"]]]);
128743
- const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"]}]);
129462
+ const EzSearch = /*@__PURE__*/proxyCustomElement(EzSearch$1, [1,"ez-search",{"value":[1537],"label":[1537],"enabled":[1540],"errorMessage":[1537,"error-message"],"optionLoader":[16],"showSelectedValue":[4,"show-selected-value"],"showOptionValue":[4,"show-option-value"],"suppressEmptyOption":[4,"suppress-empty-option"],"mode":[513],"canShowError":[516,"can-show-error"],"listOptionsPosition":[16]}]);
128744
129463
  const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
128745
129464
  const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
128746
129465
  const EzTabselector = /*@__PURE__*/proxyCustomElement(EzTabselector$1, [1,"ez-tabselector",{"selectedIndex":[1538,"selected-index"],"selectedTab":[1537,"selected-tab"],"tabs":[1],"_processedTabs":[32]}]);
128747
- const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513]}]);
129466
+ const EzTextArea = /*@__PURE__*/proxyCustomElement(EzTextArea$1, [1,"ez-text-area",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"rows":[1538],"canShowError":[516,"can-show-error"],"mode":[513],"enableResize":[516,"enable-resize"]}]);
128748
129467
  const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
128749
129468
  const EzTextInput = /*@__PURE__*/proxyCustomElement(EzTextInput$1, [1,"ez-text-input",{"label":[513],"value":[1537],"enabled":[516],"errorMessage":[1537,"error-message"],"mask":[1],"canShowError":[516,"can-show-error"],"restrict":[1],"mode":[513],"noBorder":[516,"no-border"]}]);
128750
129469
  const EzTimeInput = /*@__PURE__*/proxyCustomElement(EzTimeInput$1, [1,"ez-time-input",{"label":[513],"value":[1026],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"]}]);