@sankhyalabs/ezui 5.10.8 → 5.11.0-dev.10

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 (168) hide show
  1. package/README.md +8 -11
  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-card-item.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-combo-box.cjs.entry.js +99 -16
  8. package/dist/cjs/ez-date-input.cjs.entry.js +53 -22
  9. package/dist/cjs/ez-date-time-input.cjs.entry.js +53 -19
  10. package/dist/cjs/ez-filter-input_2.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-form-view.cjs.entry.js +42 -1
  12. package/dist/cjs/ez-form.cjs.entry.js +11 -84
  13. package/dist/cjs/ez-grid.cjs.entry.js +575 -44
  14. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -1
  15. package/dist/cjs/ez-number-input.cjs.entry.js +39 -15
  16. package/dist/cjs/ez-search.cjs.entry.js +13 -2
  17. package/dist/cjs/ez-text-area.cjs.entry.js +6 -2
  18. package/dist/cjs/ez-text-input.cjs.entry.js +7 -4
  19. package/dist/cjs/ez-time-input.cjs.entry.js +11 -7
  20. package/dist/cjs/ezui.cjs.js +1 -1
  21. package/dist/cjs/filter-column.cjs.entry.js +30 -7
  22. package/dist/cjs/loader.cjs.js +1 -1
  23. package/dist/collection/collection-manifest.json +2 -2
  24. package/dist/collection/components/ez-calendar/ez-calendar.js +63 -6
  25. package/dist/collection/components/ez-card-item/ez-card-item.css +1 -0
  26. package/dist/collection/components/ez-combo-box/ez-combo-box.css +6 -0
  27. package/dist/collection/components/ez-combo-box/ez-combo-box.js +168 -14
  28. package/dist/collection/components/ez-date-input/ez-date-input.js +71 -21
  29. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +71 -18
  30. package/dist/collection/components/ez-form/ez-form.js +20 -0
  31. package/dist/collection/components/ez-form-view/ez-form-view.js +23 -0
  32. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +4 -1
  33. package/dist/collection/components/ez-form-view/structure/index.js +34 -0
  34. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +41 -8
  35. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +1 -0
  36. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +230 -0
  37. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
  38. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +49 -0
  39. package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js +10 -0
  40. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js +4 -0
  41. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +38 -0
  42. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +40 -0
  43. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +20 -0
  44. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +15 -0
  45. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +41 -0
  46. package/dist/collection/components/ez-grid/ez-grid.js +78 -39
  47. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +50 -8
  48. package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +78 -0
  49. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +21 -1
  50. package/dist/collection/components/ez-number-input/ez-number-input.css +4 -0
  51. package/dist/collection/components/ez-number-input/ez-number-input.js +62 -15
  52. package/dist/collection/components/ez-search/ez-search.css +1 -1
  53. package/dist/collection/components/ez-search/ez-search.js +84 -1
  54. package/dist/collection/components/ez-text-area/ez-text-area.css +4 -0
  55. package/dist/collection/components/ez-text-area/ez-text-area.js +23 -1
  56. package/dist/collection/components/ez-text-input/ez-text-input.css +8 -1
  57. package/dist/collection/components/ez-text-input/ez-text-input.js +14 -5
  58. package/dist/collection/components/ez-time-input/ez-time-input.css +4 -0
  59. package/dist/collection/components/ez-time-input/ez-time-input.js +18 -7
  60. package/dist/collection/utils/CSSVarsUtils.js +5 -0
  61. package/dist/collection/utils/form/DataBinder.js +8 -63
  62. package/dist/collection/utils/form/FormMetadata.js +3 -22
  63. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +21 -0
  64. package/dist/collection/utils/validators/recordvalidator/IValidationResult.js +1 -0
  65. package/dist/collection/utils/validators/recordvalidator/IValidationSource.js +1 -0
  66. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +74 -0
  67. package/dist/custom-elements/index.js +1101 -256
  68. package/dist/esm/{CSSVarsUtils-00f67f32.js → CSSVarsUtils-a97cfa29.js} +5 -0
  69. package/dist/esm/RecordValidationProcessor-abc814af.js +99 -0
  70. package/dist/esm/ez-actions-button.entry.js +1 -1
  71. package/dist/esm/ez-calendar.entry.js +35 -6
  72. package/dist/esm/ez-card-item.entry.js +1 -1
  73. package/dist/esm/ez-combo-box.entry.js +99 -16
  74. package/dist/esm/ez-date-input.entry.js +53 -22
  75. package/dist/esm/ez-date-time-input.entry.js +53 -19
  76. package/dist/esm/ez-filter-input_2.entry.js +1 -1
  77. package/dist/esm/ez-form-view.entry.js +42 -1
  78. package/dist/esm/ez-form.entry.js +12 -85
  79. package/dist/esm/ez-grid.entry.js +576 -45
  80. package/dist/esm/ez-multi-selection-list.entry.js +3 -1
  81. package/dist/esm/ez-number-input.entry.js +39 -15
  82. package/dist/esm/ez-search.entry.js +13 -2
  83. package/dist/esm/ez-text-area.entry.js +6 -2
  84. package/dist/esm/ez-text-input.entry.js +7 -4
  85. package/dist/esm/ez-time-input.entry.js +11 -7
  86. package/dist/esm/ezui.js +1 -1
  87. package/dist/esm/filter-column.entry.js +30 -7
  88. package/dist/esm/loader.js +1 -1
  89. package/dist/ezui/ezui.esm.js +1 -1
  90. package/dist/ezui/p-028f264f.entry.js +1 -0
  91. package/dist/ezui/p-061f4d73.entry.js +1 -0
  92. package/dist/ezui/p-25562cf8.entry.js +1 -0
  93. package/dist/ezui/p-3078d25c.entry.js +1 -0
  94. package/dist/ezui/p-391de0e4.entry.js +1 -0
  95. package/dist/ezui/{p-68352e41.entry.js → p-47afb974.entry.js} +1 -1
  96. package/dist/ezui/p-5cef0264.entry.js +1 -0
  97. package/dist/ezui/p-5e55a42b.entry.js +1 -0
  98. package/dist/ezui/p-7526f2b6.entry.js +1 -0
  99. package/dist/ezui/p-7eb3e1a5.js +1 -0
  100. package/dist/ezui/p-86a2036d.js +1 -0
  101. package/dist/ezui/{p-12303d2e.entry.js → p-87e85160.entry.js} +1 -1
  102. package/dist/ezui/{p-c7a23be9.entry.js → p-964e5571.entry.js} +2 -2
  103. package/dist/ezui/p-ce035beb.entry.js +1 -0
  104. package/dist/ezui/p-d43b22f3.entry.js +1 -0
  105. package/dist/ezui/p-df93558d.entry.js +1 -0
  106. package/dist/ezui/p-e2dfd935.entry.js +1 -0
  107. package/dist/ezui/p-e67d0bd5.entry.js +1 -0
  108. package/dist/ezui/{p-f1a537e3.entry.js → p-ff82b176.entry.js} +1 -1
  109. package/dist/types/components/ez-calendar/ez-calendar.d.ts +9 -1
  110. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +23 -0
  111. package/dist/types/components/ez-date-input/ez-date-input.d.ts +4 -0
  112. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +4 -0
  113. package/dist/types/components/ez-form/ez-form.d.ts +5 -0
  114. package/dist/types/components/ez-form-view/ez-form-view.d.ts +5 -0
  115. package/dist/types/components/ez-form-view/interfaces/IFormViewField.d.ts +2 -14
  116. package/dist/types/components/ez-form-view/structure/index.d.ts +15 -0
  117. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +18 -0
  118. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -0
  119. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +38 -0
  120. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
  121. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +10 -0
  122. package/dist/types/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.d.ts +1 -0
  123. package/dist/types/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.d.ts +9 -0
  124. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +10 -0
  125. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.d.ts +4 -0
  126. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.d.ts +5 -0
  127. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.d.ts +4 -0
  128. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.d.ts +3 -0
  129. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.d.ts +4 -0
  130. package/dist/types/components/ez-grid/ez-grid.d.ts +16 -5
  131. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
  132. package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +16 -0
  133. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
  134. package/dist/types/components/ez-number-input/ez-number-input.d.ts +5 -1
  135. package/dist/types/components/ez-search/ez-search.d.ts +14 -1
  136. package/dist/types/components/ez-text-area/ez-text-area.d.ts +4 -0
  137. package/dist/types/components/ez-text-input/ez-text-input.d.ts +4 -1
  138. package/dist/types/components/ez-time-input/ez-time-input.d.ts +2 -1
  139. package/dist/types/components.d.ts +116 -6
  140. package/dist/types/utils/form/DataBinder.d.ts +1 -3
  141. package/dist/types/utils/form/interfaces/IFormConfig.d.ts +1 -1
  142. package/dist/types/utils/form/interfaces/index.d.ts +4 -4
  143. package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +17 -0
  144. package/dist/types/utils/{form/interfaces → interfaces}/IFieldConfig.d.ts +2 -2
  145. package/dist/types/utils/validators/recordvalidator/IValidationSource.d.ts +6 -0
  146. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +13 -0
  147. package/package.json +3 -3
  148. package/dist/ezui/p-00c7c25d.entry.js +0 -1
  149. package/dist/ezui/p-0b160fec.entry.js +0 -1
  150. package/dist/ezui/p-0bd54a6f.entry.js +0 -1
  151. package/dist/ezui/p-2a0e1679.entry.js +0 -1
  152. package/dist/ezui/p-39153935.entry.js +0 -1
  153. package/dist/ezui/p-4a5e37a7.js +0 -1
  154. package/dist/ezui/p-4c8b029b.entry.js +0 -1
  155. package/dist/ezui/p-4e31b69b.entry.js +0 -1
  156. package/dist/ezui/p-5782443e.entry.js +0 -1
  157. package/dist/ezui/p-5d45e384.entry.js +0 -1
  158. package/dist/ezui/p-70ea4beb.entry.js +0 -1
  159. package/dist/ezui/p-78a6e049.entry.js +0 -1
  160. package/dist/ezui/p-8bcb197f.entry.js +0 -1
  161. package/dist/ezui/p-a4c9f3c4.entry.js +0 -1
  162. /package/dist/collection/{utils/form/interfaces/IFieldConfig.js → components/ez-grid/controller/ag-grid/editor/IUICellEditor.js} +0 -0
  163. /package/dist/collection/utils/{form/interfaces/IInvalidField.js → interfaces/IFieldConfig.js} +0 -0
  164. /package/dist/collection/utils/{form/interfaces/IRecordValidator.js → validators/recordvalidator/IInvalidField.js} +0 -0
  165. /package/dist/collection/utils/{form/interfaces/IValidationResult.js → validators/recordvalidator/IRecordValidator.js} +0 -0
  166. /package/dist/types/utils/{form/interfaces → validators/recordvalidator}/IInvalidField.d.ts +0 -0
  167. /package/dist/types/utils/{form/interfaces → validators/recordvalidator}/IRecordValidator.d.ts +0 -0
  168. /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) {
@@ -656,7 +681,7 @@ class DataBinder {
656
681
  this._dataUnit.addRecord();
657
682
  }
658
683
  this._dataUnit.clearInvalid(this.getCurrentRecordId(), fieldName);
659
- this._dataUnit.setFieldValue(fieldName, newValue);
684
+ this._dataUnit.setFieldValue(fieldName, newValue, [this.getCurrentRecordId()]);
660
685
  if (this._dataUnit.waitingForChange(fieldName)) {
661
686
  const bind = this._fields.get(fieldName);
662
687
  if (bind) {
@@ -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,13 +1743,14 @@ 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
  }; }
1696
1750
  static get style() { return ezCalendarCss; }
1697
1751
  };
1698
1752
 
1699
- const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
1753
+ const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
1700
1754
 
1701
1755
  const EzCardItem$1 = class extends HTMLElement$1 {
1702
1756
  constructor() {
@@ -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,9 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2101
2155
  this.suppressEmptyOption = false;
2102
2156
  this.canShowError = true;
2103
2157
  this.mode = "regular";
2158
+ this.hideErrorOnFocusOut = true;
2159
+ this.listOptionsPosition = undefined;
2160
+ this.isTextSearch = false;
2104
2161
  }
2105
2162
  observeErrorMessage() {
2106
2163
  var _a;
@@ -2143,17 +2200,38 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2143
2200
  return;
2144
2201
  this.loadOptions(SearchMode.PRELOAD);
2145
2202
  }
2203
+ /*
2204
+ * Retorna uma promise com o valor da opção selecionada,
2205
+ * que será resolvida quando o backend devolver este dado.
2206
+ */
2207
+ async getValueAsync() {
2208
+ if (!this._showLoading) {
2209
+ return new Promise(resolve => resolve(this.value));
2210
+ }
2211
+ return new Promise(resolve => {
2212
+ let id = setInterval(() => {
2213
+ if (!this._showLoading) {
2214
+ clearInterval(id);
2215
+ resolve(this.value);
2216
+ }
2217
+ }, 100);
2218
+ });
2219
+ }
2146
2220
  /**
2147
2221
  * Aplica o foco no campo.
2148
2222
  */
2149
2223
  async setFocus() {
2150
- this._textInput.setFocus();
2224
+ if (this._textInput) {
2225
+ this._textInput.setFocus();
2226
+ }
2151
2227
  }
2152
2228
  /**
2153
2229
  * Remove o foco do campo.
2154
2230
  */
2155
2231
  async setBlur() {
2156
- this._textInput.setBlur();
2232
+ if (this._textInput) {
2233
+ this._textInput.setBlur();
2234
+ }
2157
2235
  }
2158
2236
  /**
2159
2237
  * Retorna se o conteúdo é inválido.
@@ -2168,16 +2246,61 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2168
2246
  this.clearSearch();
2169
2247
  }
2170
2248
  scrollListener() {
2171
- if (!this._floatingID)
2249
+ var _a;
2250
+ if (this._floatingID == undefined) {
2172
2251
  return;
2173
- window.requestAnimationFrame(() => {
2174
- this.updateListPosition();
2175
- });
2252
+ }
2253
+ if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
2254
+ this.hideOptions();
2255
+ }
2256
+ else {
2257
+ window.requestAnimationFrame(() => {
2258
+ this.updateListPosition();
2259
+ });
2260
+ }
2176
2261
  }
2177
2262
  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`;
2263
+ let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
2264
+ const elementRect = this._listWrapper.getBoundingClientRect();
2265
+ const containerRect = this._listContainer.getBoundingClientRect();
2266
+ const textInputRect = this._textInput.getBoundingClientRect();
2267
+ const limitHeight = bottomLimit || window.innerHeight;
2268
+ const neededHeight = containerRect.bottom + elementRect.height;
2269
+ if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
2270
+ fromBottom = true;
2271
+ }
2272
+ if (!hardPosition) {
2273
+ verticalPosition = verticalPosition || 0;
2274
+ horizontalPosition = horizontalPosition || 0;
2275
+ if (fromBottom) {
2276
+ verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
2277
+ }
2278
+ else {
2279
+ verticalPosition += containerRect.top;
2280
+ }
2281
+ if (fromRight) {
2282
+ horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
2283
+ }
2284
+ else {
2285
+ horizontalPosition += containerRect.left;
2286
+ }
2287
+ }
2288
+ if (verticalPosition != undefined) {
2289
+ this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
2290
+ this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
2291
+ }
2292
+ if (horizontalPosition != undefined) {
2293
+ this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
2294
+ this._listWrapper.style[fromRight ? "left" : "right"] = "";
2295
+ }
2296
+ }
2297
+ getListPosition() {
2298
+ if (this.listOptionsPosition) {
2299
+ return this.listOptionsPosition;
2300
+ }
2301
+ return {
2302
+ verticalPosition: (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13
2303
+ };
2181
2304
  }
2182
2305
  isDifferentValues(firstValue, secondValue) {
2183
2306
  return ObjectUtils$1.objectToString(firstValue || {}) !== ObjectUtils$1.objectToString(secondValue || {});
@@ -2260,13 +2383,18 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2260
2383
  showOptions() {
2261
2384
  if (!this.enabled)
2262
2385
  return;
2386
+ if (this.isOptionsVisible()) {
2387
+ return;
2388
+ }
2263
2389
  if (!!this._resizeObserver)
2264
2390
  this._resizeObserver.observe(this._textInput);
2265
- this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true });
2391
+ this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
2266
2392
  this.setFocus();
2267
2393
  window.requestAnimationFrame(() => {
2268
2394
  this.updateListPosition();
2269
- this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
2395
+ if (!this.listOptionsPosition) {
2396
+ this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
2397
+ }
2270
2398
  });
2271
2399
  }
2272
2400
  hideOptions() {
@@ -2296,7 +2424,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2296
2424
  window.requestAnimationFrame(() => {
2297
2425
  const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
2298
2426
  if (liElem)
2299
- liElem.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
2427
+ liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
2300
2428
  });
2301
2429
  }
2302
2430
  selectCurrentOption() {
@@ -2536,6 +2664,12 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2536
2664
  handlerIconClick() {
2537
2665
  this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
2538
2666
  }
2667
+ buildNumberArgument(argument) {
2668
+ if (this.isTextSearch) {
2669
+ return NaN;
2670
+ }
2671
+ return Number(argument || undefined);
2672
+ }
2539
2673
  onTextInputChangeHandler(event) {
2540
2674
  var _a;
2541
2675
  this.clearDeboucingTimeout();
@@ -2546,7 +2680,7 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2546
2680
  return;
2547
2681
  }
2548
2682
  const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
2549
- const argumentNumber = Number(argument || undefined);
2683
+ const argumentNumber = this.buildNumberArgument(argument);
2550
2684
  if (!this._criteria) {
2551
2685
  this._textInput.value = event.data || argument;
2552
2686
  }
@@ -2609,9 +2743,11 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2609
2743
  switch (event.key) {
2610
2744
  case "ArrowDown":
2611
2745
  this.nextOption();
2746
+ event.stopPropagation();
2612
2747
  break;
2613
2748
  case "ArrowUp":
2614
2749
  this.previousOption();
2750
+ event.stopPropagation();
2615
2751
  break;
2616
2752
  case "Enter":
2617
2753
  this.selectCurrentOption();
@@ -2631,7 +2767,8 @@ const EzComboBox$1 = class extends HTMLElement$1 {
2631
2767
  //event.stopPropagation();
2632
2768
  }
2633
2769
  onTextInputFocusOutHandler() {
2634
- this.cancelPreselection();
2770
+ if (this.hideErrorOnFocusOut)
2771
+ this.cancelPreselection();
2635
2772
  }
2636
2773
  canShowListOptions() {
2637
2774
  return !this._showLoading && this._visibleOptions.length > 0;
@@ -2673,7 +2810,9 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2673
2810
  this.ezChange = createEvent(this, "ezChange", 7);
2674
2811
  this.ezStartChange = createEvent(this, "ezStartChange", 7);
2675
2812
  this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
2813
+ this._changePending = false;
2676
2814
  this._focused = false;
2815
+ this._valuePromiseCallbacks = [];
2677
2816
  this.label = undefined;
2678
2817
  this.value = undefined;
2679
2818
  this.enabled = true;
@@ -2711,6 +2850,7 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2711
2850
  this.ezChange.emit(valueEmitted);
2712
2851
  }
2713
2852
  }
2853
+ this._changePending = false;
2714
2854
  }
2715
2855
  /**
2716
2856
  * Aplica o foco no campo.
@@ -2730,6 +2870,18 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2730
2870
  async isInvalid() {
2731
2871
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
2732
2872
  }
2873
+ /*
2874
+ * Retorna uma promise com o valor da opção selecionada,
2875
+ * que será resolvida quando o backend devolver este dado.
2876
+ */
2877
+ async getValueAsync() {
2878
+ if (this._changePending) {
2879
+ return new Promise(accept => {
2880
+ this._valuePromiseCallbacks.push(accept);
2881
+ });
2882
+ }
2883
+ return Promise.resolve(this.value);
2884
+ }
2733
2885
  changeValue(newValue) {
2734
2886
  const currentValue = DateUtils$1.validateDate(this.value);
2735
2887
  const newValueValidated = DateUtils$1.validateDate(newValue);
@@ -2740,10 +2892,14 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2740
2892
  showCalendar() {
2741
2893
  this.handleBlur();
2742
2894
  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;
2895
+ let top;
2896
+ if (this.isFixed()) {
2897
+ top = 29;
2898
+ this._calendar.fitHorizontal(0);
2899
+ }
2900
+ else {
2901
+ top = this.errorMessage || this.mode === "slim" ? 6 : -13;
2902
+ }
2747
2903
  this._calendar.fitVertical(top, this._elem.clientHeight);
2748
2904
  }
2749
2905
  hideCalendar() {
@@ -2751,27 +2907,35 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2751
2907
  this._calendar.hide();
2752
2908
  }
2753
2909
  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;
2910
+ try {
2911
+ const strValue = this._textInput.value;
2912
+ const newValue = DateUtils$1.strToDate(strValue);
2913
+ if (newValue || !strValue) {
2914
+ this.errorMessage = "";
2915
+ const currentValue = DateUtils$1.validateDate(this.value);
2916
+ const newValueValidated = DateUtils$1.validateDate(newValue);
2917
+ if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
2918
+ if (newValueValidated) {
2919
+ this._textInput.value = this.getTextValue(newValueValidated) || '';
2920
+ this._focused = false;
2921
+ }
2922
+ this.ezCancelWaitingChange.emit();
2923
+ }
2924
+ else {
2925
+ this.changeValue(newValueValidated);
2764
2926
  }
2765
- this.ezCancelWaitingChange.emit();
2766
2927
  }
2767
2928
  else {
2768
- this.changeValue(newValueValidated);
2929
+ this.changeValue(undefined);
2930
+ this.ezCancelWaitingChange.emit();
2931
+ this.errorMessage = "O valor digitado não é uma data válida";
2769
2932
  }
2770
2933
  }
2771
- else {
2772
- this.changeValue(undefined);
2773
- this.ezCancelWaitingChange.emit();
2774
- this.errorMessage = "O valor digitado não é uma data válida";
2934
+ finally {
2935
+ for (const callback of this._valuePromiseCallbacks) {
2936
+ callback(this.value);
2937
+ }
2938
+ this._valuePromiseCallbacks = [];
2775
2939
  }
2776
2940
  }
2777
2941
  getTextValue(d) {
@@ -2783,6 +2947,7 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2783
2947
  const currentValue = DateUtils$1.validateDate(this.value);
2784
2948
  const newValueValidated = DateUtils$1.validateDate(newValue);
2785
2949
  if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
2950
+ this._changePending = true;
2786
2951
  this._focused = true;
2787
2952
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
2788
2953
  }
@@ -2796,13 +2961,16 @@ const EzDateInput$1 = class extends HTMLElement$1 {
2796
2961
  this._textInput.value = textValue;
2797
2962
  }
2798
2963
  }
2964
+ isFixed() {
2965
+ return this._elem.dataset.isFixed === "true";
2966
+ }
2799
2967
  componentDidLoad() {
2800
2968
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
2801
2969
  this.setInputValue();
2802
2970
  }
2803
2971
  render() {
2804
2972
  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 })));
2973
+ 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
2974
  }
2807
2975
  get _elem() { return this; }
2808
2976
  static get watchers() { return {
@@ -2823,7 +2991,9 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2823
2991
  this.ezChange = createEvent(this, "ezChange", 7);
2824
2992
  this.ezStartChange = createEvent(this, "ezStartChange", 7);
2825
2993
  this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
2994
+ this._changePending = false;
2826
2995
  this._focused = false;
2996
+ this._valuePromiseCallbacks = [];
2827
2997
  this.label = undefined;
2828
2998
  this.value = undefined;
2829
2999
  this.enabled = true;
@@ -2862,6 +3032,7 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2862
3032
  this.ezChange.emit(valueEmitted);
2863
3033
  }
2864
3034
  }
3035
+ this._changePending = false;
2865
3036
  }
2866
3037
  /**
2867
3038
  * Aplica o foco no campo.
@@ -2881,6 +3052,18 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2881
3052
  async isInvalid() {
2882
3053
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
2883
3054
  }
3055
+ /*
3056
+ * Retorna uma promise com o valor da opção selecionada,
3057
+ * que será resolvida quando o backend devolver este dado.
3058
+ */
3059
+ async getValueAsync() {
3060
+ if (this._changePending) {
3061
+ return new Promise(accept => {
3062
+ this._valuePromiseCallbacks.push(accept);
3063
+ });
3064
+ }
3065
+ return Promise.resolve(this.value);
3066
+ }
2884
3067
  handleKeyDown(event) {
2885
3068
  const input = this._textInput.shadowRoot.querySelector('input');
2886
3069
  if (event.shiftKey && event.key === "Tab") {
@@ -2925,7 +3108,14 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2925
3108
  }
2926
3109
  }
2927
3110
  showCalendar() {
2928
- const top = this.errorMessage || this.mode === "slim" ? 6 : -13;
3111
+ let top;
3112
+ if (this.isFixed()) {
3113
+ top = 29;
3114
+ this._calendar.fitHorizontal(0);
3115
+ }
3116
+ else {
3117
+ top = this.errorMessage || this.mode === "slim" ? 6 : -13;
3118
+ }
2929
3119
  this._calendar.fitVertical(top, this._elem.clientHeight);
2930
3120
  this._calendar.style.visibility = 'inherit';
2931
3121
  }
@@ -2950,27 +3140,35 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2950
3140
  }
2951
3141
  handleBlur() {
2952
3142
  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;
3143
+ try {
3144
+ const strValue = ((_b = (_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.trim()) || "";
3145
+ const newValue = this.getParsedDateTime();
3146
+ if (newValue || !strValue) {
3147
+ this.errorMessage = "";
3148
+ const currentValue = DateUtils$1.validateDate(this.value, true);
3149
+ const newValueValidated = DateUtils$1.validateDate(newValue, true);
3150
+ if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
3151
+ if (newValueValidated) {
3152
+ this._textInput.value = this.getTextValue(newValueValidated) || '';
3153
+ this._focused = false;
3154
+ }
3155
+ this.ezCancelWaitingChange.emit();
3156
+ }
3157
+ else {
3158
+ this.changeValue(newValueValidated);
2963
3159
  }
2964
- this.ezCancelWaitingChange.emit();
2965
3160
  }
2966
3161
  else {
2967
- this.changeValue(newValueValidated);
3162
+ this.changeValue(undefined);
3163
+ this.ezCancelWaitingChange.emit();
3164
+ this.errorMessage = "O valor digitado não é uma data válida";
2968
3165
  }
2969
3166
  }
2970
- else {
2971
- this.changeValue(undefined);
2972
- this.ezCancelWaitingChange.emit();
2973
- this.errorMessage = "O valor digitado não é uma data válida";
3167
+ finally {
3168
+ for (const callback of this._valuePromiseCallbacks) {
3169
+ callback(this.value);
3170
+ }
3171
+ this._valuePromiseCallbacks = [];
2974
3172
  }
2975
3173
  }
2976
3174
  getTextValue(date) {
@@ -2984,6 +3182,7 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2984
3182
  const currentValue = DateUtils$1.validateDate(this.value, true);
2985
3183
  const newValueValidated = DateUtils$1.validateDate(newValue, true);
2986
3184
  if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
3185
+ this._changePending = true;
2987
3186
  this._focused = true;
2988
3187
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
2989
3188
  }
@@ -2997,13 +3196,16 @@ const EzDateTimeInput$1 = class extends HTMLElement$1 {
2997
3196
  this._textInput.value = textValue;
2998
3197
  }
2999
3198
  }
3199
+ isFixed() {
3200
+ return this._elem.dataset.isFixed === "true";
3201
+ }
3000
3202
  componentDidLoad() {
3001
3203
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
3002
3204
  this.setInputValue();
3003
3205
  }
3004
3206
  render() {
3005
3207
  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 })));
3208
+ 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
3209
  }
3008
3210
  get _elem() { return this; }
3009
3211
  static get watchers() { return {
@@ -4253,6 +4455,7 @@ const EzForm$1 = class extends HTMLElement$1 {
4253
4455
  super();
4254
4456
  this.__registerHost();
4255
4457
  this.ezReady = createEvent(this, "ezReady", 7);
4458
+ this.formItemsReady = createEvent(this, "formItemsReady", 7);
4256
4459
  this.onDataUnitAction = (action) => {
4257
4460
  if (action.type === Action.METADATA_LOADED) {
4258
4461
  this.processMetadata();
@@ -4347,7 +4550,7 @@ const EzForm$1 = class extends HTMLElement$1 {
4347
4550
  static get style() { return ezFormCss; }
4348
4551
  };
4349
4552
 
4350
- const buildSwitch = (field) => {
4553
+ const buildSwitch$1 = (field) => {
4351
4554
  return buildField(field.name, field.label, field.readOnly, field.contextName, true);
4352
4555
  };
4353
4556
  const buildCheckBox = (field) => {
@@ -4358,7 +4561,7 @@ function buildField(fieldName, fieldLabel, readOnly, contextName, switchMode) {
4358
4561
  h("ez-check", { enabled: !readOnly, label: fieldLabel, mode: switchMode ? CheckMode.SWITCH : CheckMode.REGULAR, "data-field-name": fieldName, "data-context-name": contextName, key: fieldName })));
4359
4562
  }
4360
4563
 
4361
- const buildComboBox = ({ name, label, readOnly, required, props, contextName, canShowError }) => {
4564
+ const buildComboBox$1 = ({ name, label, readOnly, required, props, contextName, canShowError }) => {
4362
4565
  const prop = props === null || props === void 0 ? void 0 : props.options;
4363
4566
  let options;
4364
4567
  if (typeof prop === "string") {
@@ -4372,15 +4575,15 @@ const buildComboBox = ({ name, label, readOnly, required, props, contextName, ca
4372
4575
  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
4576
  };
4374
4577
 
4375
- const buildDate = ({ name, label, readOnly, canShowError }) => {
4578
+ const buildDate$1 = ({ name, label, readOnly, canShowError }) => {
4376
4579
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4377
4580
  h("ez-date-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
4378
4581
  };
4379
- const buildTime = ({ name, label, readOnly, canShowError }) => {
4582
+ const buildTime$1 = ({ name, label, readOnly, canShowError }) => {
4380
4583
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4381
4584
  h("ez-time-input", { enabled: !readOnly, label: label, "data-field-name": name, key: name, canShowError: canShowError })));
4382
4585
  };
4383
- const buildDateTime = ({ name, label, readOnly, contextName, canShowError }) => {
4586
+ const buildDateTime$1 = ({ name, label, readOnly, contextName, canShowError }) => {
4384
4587
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4385
4588
  h("ez-date-time-input", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError })));
4386
4589
  };
@@ -4396,20 +4599,20 @@ const buildFile = ({ name, label, readOnly, contextName, props }) => {
4396
4599
  h("ez-upload", Object.assign({ enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, key: name }, uploadProps))));
4397
4600
  };
4398
4601
 
4399
- const buildDecimal = ({ name, label, readOnly, props, contextName, canShowError }) => {
4602
+ const buildDecimal$1 = ({ name, label, readOnly, props, contextName, canShowError }) => {
4400
4603
  const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
4401
4604
  const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
4402
- return buildNumeric(name, label, readOnly, precision, prettyPrecision, contextName, canShowError);
4605
+ return buildNumeric$1(name, label, readOnly, precision, prettyPrecision, contextName, canShowError);
4403
4606
  };
4404
- const buildInteger = ({ name, label, readOnly, contextName, canShowError }) => {
4405
- return buildNumeric(name, label, readOnly, 0, 0, contextName, canShowError);
4607
+ const buildInteger$1 = ({ name, label, readOnly, contextName, canShowError }) => {
4608
+ return buildNumeric$1(name, label, readOnly, 0, 0, contextName, canShowError);
4406
4609
  };
4407
- function buildNumeric(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
4610
+ function buildNumeric$1(fieldName, fieldLabel, readOnly, precision, prettyPrecision, contextName, canShowError) {
4408
4611
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4409
4612
  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
4613
  }
4411
4614
 
4412
- const buildSearch = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
4615
+ const buildSearch$1 = ({ name, label, readOnly, required, contextName, canShowError, optionLoader }) => {
4413
4616
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4414
4617
  h("ez-search", { enabled: !readOnly, suppressEmptyOption: required, label: label, "data-field-name": name, "data-context-name": contextName, key: name, canShowError: canShowError, optionLoader: optionLoader })));
4415
4618
  };
@@ -4419,29 +4622,67 @@ const buildTextArea = ({ name, label, readOnly, contextName, rows, canShowError
4419
4622
  h("ez-text-area", { enabled: !readOnly, label: label, "data-field-name": name, "data-context-name": contextName, rows: rows, canShowError: canShowError })));
4420
4623
  };
4421
4624
 
4422
- const buildTextInput = ({ name, label, readOnly, contextName, canShowError }) => {
4625
+ const buildTextInput$1 = ({ name, label, readOnly, contextName, canShowError }) => {
4423
4626
  return (h("div", { class: "ez-col ez-col--sd-12 ez-col--tb-3 ez-padding-horizontal--small" },
4424
4627
  h("ez-text-input", { label: label, "data-field-name": name, "data-context-name": contextName, key: name, enabled: !readOnly, canShowError: canShowError })));
4425
4628
  };
4426
4629
 
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);
4630
+ const uiBuilders$1 = new Map();
4631
+ uiBuilders$1.set(UserInterface.CHECKBOX, buildCheckBox);
4632
+ uiBuilders$1.set(UserInterface.SWITCH, buildSwitch$1);
4633
+ uiBuilders$1.set(UserInterface.OPTIONSELECTOR, buildComboBox$1);
4634
+ uiBuilders$1.set(UserInterface.DATE, buildDate$1);
4635
+ uiBuilders$1.set(UserInterface.TIME, buildTime$1);
4636
+ uiBuilders$1.set(UserInterface.DATETIME, buildDateTime$1);
4637
+ uiBuilders$1.set(UserInterface.FILE, buildFile);
4638
+ uiBuilders$1.set(UserInterface.DECIMALNUMBER, buildDecimal$1);
4639
+ uiBuilders$1.set(UserInterface.INTEGERNUMBER, buildInteger$1);
4640
+ uiBuilders$1.set(UserInterface.SEARCH, buildSearch$1);
4641
+ uiBuilders$1.set(UserInterface.LONGTEXT, buildTextArea);
4439
4642
  const fieldBuilder = (field) => {
4440
- const builder = uiBuilders.get(field.userInterface) || buildTextInput;
4643
+ const builder = uiBuilders$1.get(field.userInterface) || buildTextInput$1;
4441
4644
  const label = field.required ? `${field.label}${REQUIRED_INFO}` : field.label;
4442
- return builder(Object.assign(Object.assign({}, field), { label }));
4645
+ const builtElement = builder(Object.assign(Object.assign({}, field), { label }));
4646
+ //@ts-ignore
4647
+ builtElement.$attrs$['data-form-item'] = field.name;
4648
+ return builtElement;
4443
4649
  };
4444
4650
 
4651
+ class FormItem {
4652
+ constructor(elem) {
4653
+ this.elem = elem;
4654
+ }
4655
+ addRightElement(el) {
4656
+ this.removeRightElement();
4657
+ el.classList.add('ez-padding-left--small');
4658
+ el.setAttribute('data-custom-item', 'true');
4659
+ this.elem.classList.add('ez-col--nowrap');
4660
+ this.elem.appendChild(el);
4661
+ }
4662
+ removeRightElement() {
4663
+ Array.from(this.elem.querySelectorAll('[data-custom-item="true"]')).forEach(item => item.remove());
4664
+ }
4665
+ get fieldName() {
4666
+ return this.elem.getAttribute('data-form-item');
4667
+ }
4668
+ }
4669
+ class FormItems {
4670
+ constructor(items, formId) {
4671
+ this.items = new Map();
4672
+ this.formId = formId;
4673
+ items.forEach(item => {
4674
+ const formItem = new FormItem(item);
4675
+ this.items.set(formItem.fieldName, formItem);
4676
+ });
4677
+ }
4678
+ getItem(name) {
4679
+ return this.items.get(name);
4680
+ }
4681
+ get formName() {
4682
+ return this.formId;
4683
+ }
4684
+ }
4685
+
4445
4686
  const ezFormViewCss = ".sc-ez-form-view-h{display:flex;flex-direction:row;flex-wrap:wrap;width:100%}";
4446
4687
 
4447
4688
  const EzFormView$1 = class extends HTMLElement$1 {
@@ -4449,6 +4690,7 @@ const EzFormView$1 = class extends HTMLElement$1 {
4449
4690
  super();
4450
4691
  this.__registerHost();
4451
4692
  this.ezContentReady = createEvent(this, "ezContentReady", 7);
4693
+ this.formItemsReady = createEvent(this, "formItemsReady", 7);
4452
4694
  this.fields = undefined;
4453
4695
  }
4454
4696
  async showUp() {
@@ -4474,6 +4716,8 @@ const EzFormView$1 = class extends HTMLElement$1 {
4474
4716
  }
4475
4717
  componentDidRender() {
4476
4718
  this.ezContentReady.emit(Array.from(this._element.querySelectorAll("[data-field-name]")));
4719
+ const formItems = new FormItems(Array.from(this._element.querySelectorAll("[data-form-item]")));
4720
+ this.formItemsReady.emit(formItems);
4477
4721
  }
4478
4722
  render() {
4479
4723
  ElementIDUtils.addIDInfoIfNotExists(this._element, 'ezFormView');
@@ -123337,6 +123581,7 @@ class DataSource {
123337
123581
  case Action.DATA_SAVED:
123338
123582
  case Action.EDITION_CANCELED:
123339
123583
  case Action.DATA_CHANGED:
123584
+ case Action.DATA_RESOLVED:
123340
123585
  this._controller.refresh();
123341
123586
  break;
123342
123587
  case Action.SELECTION_CHANGED:
@@ -123459,7 +123704,7 @@ class EzGridCustomHeader {
123459
123704
  onClickFilter() {
123460
123705
  var _a;
123461
123706
  const iconLeft = (_a = this.filterButton) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().left;
123462
- this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`);
123707
+ this.params.showColumnFilter(`${calcFilterColumnLeftPosition(iconLeft)}px`, true);
123463
123708
  }
123464
123709
  configSortIcon() {
123465
123710
  this.sortDownIcon.style.display = this.params.column.isSortDescending() ? 'flex' : 'none';
@@ -123670,6 +123915,443 @@ const gridTerms = {
123670
123915
  ctrlV: "Ctrl+V"
123671
123916
  };
123672
123917
 
123918
+ const buildEditorMetadata = (descriptor, eGridCell, dataUnit, editionManager) => {
123919
+ return Object.assign(Object.assign({}, buildFieldMetadata(descriptor)), { eGridCell, dataUnit, editionManager });
123920
+ };
123921
+
123922
+ const MINIMIUM_WIDTH_TEXTAREA = 210;
123923
+ const PADDING_VALUE_TEXTAREA = 12;
123924
+ const buildTextInput = ({ name, contextName }) => {
123925
+ return HTMLBuilder.parseElement(`<ez-text-input
123926
+ class="ez-grid grid_editor"
123927
+ data-field-name=${name}
123928
+ data-context-name=${contextName}
123929
+ mode="slim"
123930
+ />`);
123931
+ };
123932
+ const buildTextAreaInput = ({ eGridCell, editionManager }) => {
123933
+ const element = HTMLBuilder.parseElement(`<ez-text-area
123934
+ can-show-error="false"
123935
+ enable-resize="true"
123936
+ />`);
123937
+ element.addEventListener('keydown', event => handlePressEnterEvent(event, element, editionManager));
123938
+ setElementInitialWidth(eGridCell, element);
123939
+ element.isPopUp = true;
123940
+ return element;
123941
+ };
123942
+ function setElementInitialWidth(eGridCell, element) {
123943
+ const { width } = eGridCell.getBoundingClientRect();
123944
+ const newValue = width > MINIMIUM_WIDTH_TEXTAREA ? width : MINIMIUM_WIDTH_TEXTAREA;
123945
+ element.style.minWidth = `${newValue - PADDING_VALUE_TEXTAREA}px`;
123946
+ element.style.resize = "both";
123947
+ }
123948
+ function handlePressEnterEvent(event, element, editionManager) {
123949
+ if (isEnter(event)) {
123950
+ const shouldBreakLine = event.ctrlKey;
123951
+ if (shouldBreakLine) {
123952
+ element.appendTextToSelection('\n');
123953
+ event.preventDefault();
123954
+ return;
123955
+ }
123956
+ editionManager.navigateByEnterKey(event);
123957
+ }
123958
+ }
123959
+ function isEnter(event) {
123960
+ return [event.key, event.code].includes('Enter');
123961
+ }
123962
+
123963
+ const LIMIT_TIME_VALUE = 2359;
123964
+ const buildDate = () => {
123965
+ const dateInput = HTMLBuilder.parseElement(`<ez-date-input
123966
+ class="ez-grid grid_editor"
123967
+ mode="slim"
123968
+ data-is-fixed="true"
123969
+ />`);
123970
+ dateInput.valueGetter = () => dateInput.getValueAsync();
123971
+ return dateInput;
123972
+ };
123973
+ const buildTime = ({ readOnly }) => {
123974
+ const timeInputElement = HTMLBuilder.parseElement(`<ez-time-input
123975
+ class="ez-grid grid_editor"
123976
+ enabled=${!readOnly}
123977
+ mode="slim"
123978
+ />`);
123979
+ timeInputElement.valueGetter = () => {
123980
+ const value = timeInputElement.value;
123981
+ const isAllowedTime = parseInt(value) <= LIMIT_TIME_VALUE;
123982
+ return isAllowedTime ? value : null;
123983
+ };
123984
+ timeInputElement.valueSetter = (value) => {
123985
+ const isAllowedTime = parseInt(value) <= LIMIT_TIME_VALUE;
123986
+ if (!isAllowedTime)
123987
+ return timeInputElement.value = null;
123988
+ return timeInputElement.value = value;
123989
+ };
123990
+ return timeInputElement;
123991
+ };
123992
+ const buildDateTime = ({ readOnly }) => {
123993
+ const dateTimeInput = HTMLBuilder.parseElement(`<ez-date-time-input
123994
+ class="ez-grid grid_editor"
123995
+ mode="slim"
123996
+ enabled=${!readOnly}
123997
+ data-is-fixed="true"
123998
+ />`);
123999
+ dateTimeInput.valueGetter = () => dateTimeInput.getValueAsync();
124000
+ return dateTimeInput;
124001
+ };
124002
+
124003
+ const buildDecimal = ({ readOnly, props }) => {
124004
+ const precision = Number((props === null || props === void 0 ? void 0 : props.precision) || 2);
124005
+ const prettyPrecision = Number((props === null || props === void 0 ? void 0 : props.prettyPrecision) || precision);
124006
+ return buildNumeric(readOnly, precision, prettyPrecision);
124007
+ };
124008
+ const buildInteger = ({ readOnly }) => {
124009
+ return buildNumeric(readOnly, 0, 0);
124010
+ };
124011
+ function buildNumeric(readOnly, precision, prettyPrecision) {
124012
+ const input = HTMLBuilder.parseElement(`<ez-number-input
124013
+ class="ez-grid grid_editor"
124014
+ enabled=${!readOnly}
124015
+ precision=${precision}
124016
+ pretty-precision=${prettyPrecision}
124017
+ mode="slim"
124018
+ />`);
124019
+ input.valueGetter = () => input.getValueAsync();
124020
+ return input;
124021
+ }
124022
+
124023
+ function getViewPortHeight(cell) {
124024
+ let currentElem = cell;
124025
+ while (currentElem) {
124026
+ const viewPort = currentElem.querySelector("[ref=eBodyViewport]");
124027
+ if (viewPort) {
124028
+ return viewPort.getBoundingClientRect().bottom;
124029
+ }
124030
+ currentElem = currentElem.parentElement;
124031
+ }
124032
+ }
124033
+
124034
+ const BOOLEAN_OPTIONS = new Map([[true, { value: "S", label: "Sim" }], [false, { value: "N", label: "Não" }]]);
124035
+ const buildComboBox = ({ required, props, eGridCell }) => {
124036
+ const prop = props === null || props === void 0 ? void 0 : props.options;
124037
+ let options;
124038
+ if (typeof prop === "string") {
124039
+ const parsed = JSON.parse(prop);
124040
+ options = Object.keys(parsed).map(key => { return { value: key, label: parsed[key] }; });
124041
+ }
124042
+ else {
124043
+ options = prop;
124044
+ }
124045
+ const combo = HTMLBuilder.parseElement(`<ez-combo-box
124046
+ class="grid_editor"
124047
+ suppress-empty-option=${required}
124048
+ mode="slim"
124049
+ />`);
124050
+ combo.options = options;
124051
+ combo.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
124052
+ return combo;
124053
+ };
124054
+ const buildSwitch = (fieldMetadata) => {
124055
+ const combo = buildComboBox(Object.assign(Object.assign({}, fieldMetadata), { props: Object.assign(Object.assign({}, fieldMetadata.props), { options: Array.from(BOOLEAN_OPTIONS.values()) }) }));
124056
+ combo.valueGetter = () => {
124057
+ const value = combo.value;
124058
+ if (value == undefined) {
124059
+ return;
124060
+ }
124061
+ return value.value == "S";
124062
+ };
124063
+ combo.valueSetter = (value) => {
124064
+ if (value != undefined) {
124065
+ combo.value = BOOLEAN_OPTIONS.get(value);
124066
+ }
124067
+ };
124068
+ return combo;
124069
+ };
124070
+
124071
+ const buildSearch = ({ name, required, readOnly, eGridCell, dataUnit }) => {
124072
+ const ezSearch = HTMLBuilder.parseElement(`<ez-search
124073
+ class="ez-grid grid_editor"
124074
+ mode="slim"
124075
+ suppress-empty-option=${required}
124076
+ enabled=${!readOnly}
124077
+ />`);
124078
+ const loader = ApplicationContext.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");
124079
+ ezSearch.optionLoader = (argument) => loader(argument, name, dataUnit);
124080
+ ezSearch.listOptionsPosition = { verticalPosition: 29, bottomLimit: getViewPortHeight(eGridCell), hardPosition: true };
124081
+ ezSearch.valueGetter = () => ezSearch.getValueAsync();
124082
+ return ezSearch;
124083
+ };
124084
+
124085
+ const uiBuilders = new Map();
124086
+ uiBuilders.set(UserInterface.DATE, buildDate);
124087
+ uiBuilders.set(UserInterface.TIME, buildTime);
124088
+ uiBuilders.set(UserInterface.DATETIME, buildDateTime);
124089
+ uiBuilders.set(UserInterface.DECIMALNUMBER, buildDecimal);
124090
+ uiBuilders.set(UserInterface.INTEGERNUMBER, buildInteger);
124091
+ uiBuilders.set(UserInterface.SWITCH, buildSwitch);
124092
+ uiBuilders.set(UserInterface.CHECKBOX, buildSwitch);
124093
+ uiBuilders.set(UserInterface.OPTIONSELECTOR, buildComboBox);
124094
+ uiBuilders.set(UserInterface.LONGTEXT, buildTextAreaInput);
124095
+ uiBuilders.set(UserInterface.SEARCH, buildSearch);
124096
+ class EzCellEditor {
124097
+ init(params) {
124098
+ const fieldName = params.column.getColId();
124099
+ const dataUnit = params.context.dataUnit;
124100
+ const fieldMetadata = buildEditorMetadata(dataUnit.getField(fieldName), params.eGridCell, dataUnit, params.context.editionManager);
124101
+ const builder = uiBuilders.get(fieldMetadata.userInterface) || buildTextInput;
124102
+ this._gui = builder(fieldMetadata);
124103
+ if (this._gui.valueSetter != undefined) {
124104
+ this._gui.valueSetter(params.value);
124105
+ }
124106
+ else {
124107
+ this._gui.value = params.value;
124108
+ }
124109
+ }
124110
+ getGui() {
124111
+ return this._gui;
124112
+ }
124113
+ afterGuiAttached() {
124114
+ this.focusIn();
124115
+ }
124116
+ focusIn() {
124117
+ this._gui.focus();
124118
+ this._gui.setFocus({ selectText: true });
124119
+ }
124120
+ getValue() {
124121
+ return this._gui.valueGetter != undefined ? this._gui.valueGetter() : this._gui.value;
124122
+ }
124123
+ isPopup() {
124124
+ return this._gui.isPopUp;
124125
+ }
124126
+ }
124127
+
124128
+ class GridEditionManager {
124129
+ constructor(dataUnit, useEnterLikeTab, recordsValidator, editionIsDisabled) {
124130
+ this._dataUnit = dataUnit;
124131
+ this._recordValidationProcessor = new RecordValidationProcessor(this._dataUnit, {
124132
+ getRequiredFields: () => this.getRequiredFields(),
124133
+ markAsInvalid: () => { },
124134
+ getMessageForField: () => null
124135
+ }, recordsValidator);
124136
+ this._useEnterLikeTab = useEnterLikeTab;
124137
+ this._editionIsDisabled = editionIsDisabled;
124138
+ }
124139
+ configureGrid(options) {
124140
+ this._gridOptions = options;
124141
+ options.readOnlyEdit = true;
124142
+ options.onCellEditRequest = evt => this.onCellEditRequest(evt);
124143
+ options.onCellKeyDown = evt => {
124144
+ if (evt.event && evt["column"]) {
124145
+ this.onCellKeyDown(evt);
124146
+ }
124147
+ };
124148
+ return options;
124149
+ }
124150
+ proceedAutoSave() {
124151
+ if (!this._dataUnit.isDirty()) {
124152
+ this.saveSuccess();
124153
+ return;
124154
+ }
124155
+ if (!this._isGridEdition) {
124156
+ return;
124157
+ }
124158
+ const currentRercord = this._dataUnit.getSelectedRecord();
124159
+ if (currentRercord == undefined) {
124160
+ return;
124161
+ }
124162
+ this._recordValidationProcessor
124163
+ .validate()
124164
+ .then(() => {
124165
+ this._dataUnit.saveData()
124166
+ .then(() => this.saveSuccess())
124167
+ .catch(reason => this.saveFail(reason));
124168
+ })
124169
+ .catch(reason => this.saveFail(reason));
124170
+ }
124171
+ navigateByEnterKey(keyboardEvent) {
124172
+ const backwards = keyboardEvent.shiftKey;
124173
+ if (this._useEnterLikeTab) {
124174
+ if (backwards) {
124175
+ this._gridOptions.api.tabToPreviousCell(keyboardEvent);
124176
+ }
124177
+ else {
124178
+ this._gridOptions.api.tabToNextCell(keyboardEvent);
124179
+ }
124180
+ }
124181
+ else {
124182
+ const editionCell = this._gridOptions.api.getEditingCells()[0];
124183
+ if (editionCell) {
124184
+ let { rowIndex } = editionCell;
124185
+ this.nextEditionRow(rowIndex, editionCell.column, backwards);
124186
+ }
124187
+ }
124188
+ }
124189
+ getComponents() {
124190
+ return { ezCellEditor: EzCellEditor };
124191
+ }
124192
+ verifyClickToEdition(api, cellClicked) {
124193
+ if (this.isSecondClick(cellClicked)) {
124194
+ api.startEditingCell({ rowIndex: cellClicked.rowIndex, colKey: cellClicked.column.getColId() });
124195
+ }
124196
+ this._lastCellClicked = cellClicked;
124197
+ }
124198
+ configureColumn(col) {
124199
+ col.cellEditor = 'ezCellEditor';
124200
+ col.editable = params => this.canEdit(params);
124201
+ col.suppressKeyboardEvent = (params) => {
124202
+ return params.event.key === KeyCode.ENTER;
124203
+ };
124204
+ return col;
124205
+ }
124206
+ getRequiredFields() {
124207
+ return this._gridOptions.columnApi.getAllDisplayedColumns().filter(c => {
124208
+ const fieldDefinition = this._dataUnit.getField(c.getColId());
124209
+ return fieldDefinition && fieldDefinition.required;
124210
+ }).map(c => c.getColId());
124211
+ }
124212
+ saveSuccess() {
124213
+ this.focusOnCell(this._targetEditionCell);
124214
+ this._lastCellEdited = undefined;
124215
+ this._targetEditionCell = undefined;
124216
+ this._isGridEdition = false;
124217
+ }
124218
+ saveFail(reason) {
124219
+ this.focusOnCell(this._lastCellEdited);
124220
+ this._isGridEdition = false;
124221
+ if (reason) {
124222
+ Promise.reject(reason);
124223
+ }
124224
+ }
124225
+ focusOnCell(cell) {
124226
+ if (cell == undefined) {
124227
+ return;
124228
+ }
124229
+ const { rowIndex, column } = cell;
124230
+ this._gridOptions.api.getDisplayedRowAtIndex(rowIndex).setSelected(true, true);
124231
+ this._gridOptions.api.clearRangeSelection();
124232
+ this._gridOptions.api.addCellRange({ rowStartIndex: rowIndex, rowEndIndex: rowIndex, columns: [column] });
124233
+ this._gridOptions.api.startEditingCell({ colKey: column.getColId(), rowIndex });
124234
+ this._gridOptions.api.setFocusedCell(rowIndex, column.getColId());
124235
+ const cellEditor = this._gridOptions.api.getCellEditorInstances()[0];
124236
+ if (cellEditor) {
124237
+ cellEditor.focusIn();
124238
+ }
124239
+ }
124240
+ onCellKeyDown(event) {
124241
+ const keyboardEvent = event.event;
124242
+ switch (keyboardEvent.key) {
124243
+ case KeyCode.ENTER:
124244
+ this.processEnterKey(keyboardEvent, event);
124245
+ break;
124246
+ case KeyCode.UP:
124247
+ this.editPreviousRow(event.api);
124248
+ break;
124249
+ case KeyCode.DOWN:
124250
+ this.editNextRow(event.api);
124251
+ break;
124252
+ }
124253
+ }
124254
+ processEnterKey(keyboardEvent, event) {
124255
+ const editionCell = event.api.getEditingCells()[0];
124256
+ if (!editionCell) {
124257
+ event.api.startEditingCell({ colKey: event.column.getColId(), rowIndex: event.rowIndex });
124258
+ return;
124259
+ }
124260
+ this.navigateByEnterKey(keyboardEvent);
124261
+ }
124262
+ nextEditionRow(rowIndex, column, backwards) {
124263
+ if (backwards) {
124264
+ rowIndex = rowIndex - 1;
124265
+ if (rowIndex < 0) {
124266
+ rowIndex = this._dataUnit.records.length - 1;
124267
+ }
124268
+ }
124269
+ else {
124270
+ rowIndex = rowIndex + 1;
124271
+ if (rowIndex >= this._dataUnit.records.length) {
124272
+ rowIndex = 0;
124273
+ }
124274
+ }
124275
+ this._targetEditionCell = new TargetEdition(rowIndex, column, true);
124276
+ this.finishEdition();
124277
+ }
124278
+ editPreviousRow(api) {
124279
+ this.moveEditionVertically(api, -1);
124280
+ }
124281
+ editNextRow(api) {
124282
+ this.moveEditionVertically(api, 1);
124283
+ }
124284
+ moveEditionVertically(api, offset) {
124285
+ const editionCell = api.getEditingCells()[0];
124286
+ if (!editionCell) {
124287
+ return;
124288
+ }
124289
+ const rowIndex = editionCell.rowIndex + offset;
124290
+ if (api.getDisplayedRowAtIndex(rowIndex)) {
124291
+ this._targetEditionCell = new TargetEdition(rowIndex, editionCell.column, offset < 0);
124292
+ this.finishEdition();
124293
+ }
124294
+ }
124295
+ finishEdition() {
124296
+ this._gridOptions.api.stopEditing();
124297
+ setTimeout(() => {
124298
+ //O Timeout foi inserido para permitir que o ciclo de finalização prossiga
124299
+ //pois precisamos aguardar o fim da edição para executar o autosave.
124300
+ this.proceedAutoSave();
124301
+ }, 0);
124302
+ }
124303
+ canEdit(params) {
124304
+ if (this._editionIsDisabled()) {
124305
+ return false;
124306
+ }
124307
+ return this.isColEditable(params.colDef.field);
124308
+ }
124309
+ isColEditable(fieldName) {
124310
+ const fieldDefinition = this._dataUnit.getField(fieldName);
124311
+ if (fieldDefinition) {
124312
+ return !fieldDefinition.readOnly;
124313
+ }
124314
+ return false;
124315
+ }
124316
+ isSecondClick(cellClicked) {
124317
+ if (!this._lastCellClicked) {
124318
+ return false;
124319
+ }
124320
+ if (this._lastCellClicked.column != cellClicked.column) {
124321
+ return false;
124322
+ }
124323
+ if (this._lastCellClicked.rowIndex != cellClicked.rowIndex) {
124324
+ return false;
124325
+ }
124326
+ return true;
124327
+ }
124328
+ onCellEditRequest(event) {
124329
+ const fieldName = event.colDef.field;
124330
+ const value = event.newValue;
124331
+ if (event.oldValue != value) {
124332
+ if (value instanceof Promise) {
124333
+ const fieldDescriptor = this._dataUnit.getField(event.colDef.colId);
124334
+ event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: (fieldDescriptor === null || fieldDescriptor === void 0 ? void 0 : fieldDescriptor.userInterface) === UserInterface.SEARCH ? value : event.oldValue }));
124335
+ value.then(resolved => event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: resolved })));
124336
+ }
124337
+ else {
124338
+ event.node.setData(Object.assign(Object.assign({}, event.data), { [fieldName]: value }));
124339
+ }
124340
+ this._isGridEdition = true;
124341
+ this._dataUnit.setFieldValue(fieldName, value, [event.data.__record__id__]);
124342
+ this._lastCellEdited = { rowIndex: event.rowIndex, column: event.column, rowPinned: undefined };
124343
+ }
124344
+ }
124345
+ }
124346
+ class TargetEdition {
124347
+ constructor(rowIndex, column, backwards) {
124348
+ this.rowPinned = null;
124349
+ this.rowIndex = rowIndex;
124350
+ this.column = column;
124351
+ this.backwards = backwards;
124352
+ }
124353
+ }
124354
+
123673
124355
  class AgGridController {
123674
124356
  configFilterColumn(filterColumn) {
123675
124357
  this._filterColumn = filterColumn;
@@ -123705,6 +124387,9 @@ class AgGridController {
123705
124387
  getGridConfig() {
123706
124388
  return this._gridConfig;
123707
124389
  }
124390
+ getGridApi() {
124391
+ return this._gridOptions.api;
124392
+ }
123708
124393
  getSort() {
123709
124394
  const sortedColumns = [];
123710
124395
  this._gridOptions.columnApi
@@ -123765,6 +124450,7 @@ class AgGridController {
123765
124450
  this._doubleClickCallBack = options.onDoubleClick;
123766
124451
  this._multipleSelection = options.allowMultipleSelection;
123767
124452
  this._dataUnit = options.dataUnit;
124453
+ this._editionManager = new GridEditionManager(this._dataUnit, options.useEnterLikeTab, options.recordsValidator, options.editionIsDisabled);
123768
124454
  this._statusResolver = options.statusResolver;
123769
124455
  if (this._dataUnit) {
123770
124456
  this._dataUnit.sortingProvider = this;
@@ -123784,12 +124470,14 @@ class AgGridController {
123784
124470
  defaultColDef: {
123785
124471
  headerClass: 'ez-grid__cell-header',
123786
124472
  cellClass: 'ez-grid__cell-body',
124473
+ cellStyle: {
124474
+ height: '100%'
124475
+ }
123787
124476
  },
123788
- components: {
123789
- ezGridHeaderComponent: SelectionHeader,
123790
- ezGridCustomHeader: EzGridCustomHeader,
123791
- },
124477
+ components: Object.assign({ ezGridHeaderComponent: SelectionHeader, ezGridCustomHeader: EzGridCustomHeader }, this._editionManager.getComponents()),
123792
124478
  context: {
124479
+ editionManager: this._editionManager,
124480
+ dataUnit: this._dataUnit,
123793
124481
  headerCheckStatusGetter: () => this.getSelectionHeaderStatus(),
123794
124482
  headerCheckStatusSetter: (selectAll) => this.updateSelectionForAll(selectAll),
123795
124483
  },
@@ -123797,6 +124485,7 @@ class AgGridController {
123797
124485
  this.defineRowModelType(this._gridOptions, options);
123798
124486
  this.setOptionsEvents(this._gridOptions);
123799
124487
  this.setOptionsSupress(this._gridOptions);
124488
+ this._gridOptions = this._editionManager.configureGrid(this._gridOptions);
123800
124489
  if (this._enterprise) {
123801
124490
  this._grid = new Grid(container, this._gridOptions);
123802
124491
  }
@@ -123943,6 +124632,7 @@ class AgGridController {
123943
124632
  opt.onSelectionChanged = e => this.onSelectionChange(e);
123944
124633
  opt.onRowDoubleClicked = evt => this.onRowDoubleClick(evt);
123945
124634
  opt.onDragStopped = evt => this.onCallStateChange('columnMovedEnd', evt);
124635
+ opt.onCellClicked = evt => this.onCellClicked(evt);
123946
124636
  }
123947
124637
  setOptionsSupress(opt) {
123948
124638
  opt.suppressDragLeaveHidesColumns = true;
@@ -124246,7 +124936,7 @@ class AgGridController {
124246
124936
  else if (propSortable === false) {
124247
124937
  tooltip = 'Coluna não pode ser ordenada';
124248
124938
  }
124249
- return {
124939
+ return this._editionManager.configureColumn({
124250
124940
  headerName: source.label,
124251
124941
  field: source.name,
124252
124942
  sortable: propSortable,
@@ -124256,13 +124946,22 @@ class AgGridController {
124256
124946
  tooltip: tooltip,
124257
124947
  isSortable: propSortable,
124258
124948
  hasFilter: () => this.hasFilterColumn(source.name),
124259
- showColumnFilter: (leftPosition) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name) }),
124949
+ showColumnFilter: (leftPosition, fromIcon) => this.showFilterColumn({ columnName: source.name, columnLabel: source.label, leftPosition, filteredOptions: this._filteredColumns.get(source.name), fromIcon }),
124260
124950
  },
124261
124951
  valueFormatter: params => {
124952
+ if (params.value == undefined) {
124953
+ return "";
124954
+ }
124955
+ if (params.value instanceof Promise) {
124956
+ return "Carregando...";
124957
+ }
124958
+ if (this._dataUnit) {
124959
+ return this._dataUnit.getFormattedValue(source.name, params.value);
124960
+ }
124262
124961
  return this.getFormatterByColumn(params, source);
124263
124962
  },
124264
124963
  cellStyle: this.getStyleByColumn(source),
124265
- };
124964
+ });
124266
124965
  }
124267
124966
  getInitCellStyle() {
124268
124967
  return {
@@ -124335,6 +125034,13 @@ class AgGridController {
124335
125034
  return params.value.toLocaleDateString();
124336
125035
  }
124337
125036
  }
125037
+ if ((source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.ELAPSEDTIME || (source === null || source === void 0 ? void 0 : source.userInterface) === UserInterface.TIME) {
125038
+ if (!!params.value) {
125039
+ const maskFormatter = new MaskFormatter("##:##");
125040
+ const formattedValue = String(params.value).padStart(4, '0');
125041
+ return maskFormatter.format(formattedValue);
125042
+ }
125043
+ }
124338
125044
  }
124339
125045
  onCallStateChange(type, e) {
124340
125046
  const finished = !('finished' in e) || e['finished'];
@@ -124349,6 +125055,13 @@ class AgGridController {
124349
125055
  this._columnStateChangeCallback(type, this.getColumnsState(), info);
124350
125056
  }
124351
125057
  }
125058
+ onCellClicked(event) {
125059
+ this._editionManager.verifyClickToEdition(event.api, {
125060
+ rowIndex: event.rowIndex,
125061
+ column: event.column,
125062
+ rowPinned: undefined
125063
+ });
125064
+ }
124352
125065
  isElementResize(e) {
124353
125066
  return e['target'] && e['target'].getAttribute('ref') === 'eResize';
124354
125067
  }
@@ -124366,6 +125079,7 @@ class AgGridController {
124366
125079
  if (this._selectionChangeCallback) {
124367
125080
  clearTimeout(this._selectionChangeDeboucing);
124368
125081
  this._selectionChangeDeboucing = window.setTimeout(() => {
125082
+ this._editionManager.proceedAutoSave();
124369
125083
  if (this._dataUnit) {
124370
125084
  if (event.context.selectionChangeQuietly) {
124371
125085
  const selectionInfo = this._dataUnit;
@@ -124455,6 +125169,84 @@ function getElementID(sufix) {
124455
125169
  };
124456
125170
  }
124457
125171
 
125172
+ class InMemoryFilterColumnDataSource {
125173
+ constructor(dataUnit) {
125174
+ var _a;
125175
+ this.onDataUnitAction = (action) => {
125176
+ if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
125177
+ this.originalRecords = this.dataUnit.records;
125178
+ }
125179
+ };
125180
+ this.dataUnit = dataUnit;
125181
+ this.originalRecords = (_a = this.dataUnit.records) !== null && _a !== void 0 ? _a : [];
125182
+ this.dataUnit.subscribe(this.onDataUnitAction);
125183
+ }
125184
+ fetchData(filterTerm, fieldName) {
125185
+ return new Promise(resolve => {
125186
+ const filteredRecords = this.originalRecords.filter(record => this.includesSearchTerm(record, fieldName, filterTerm));
125187
+ const options = filteredRecords.map(item => this.buildFieldOption(item, fieldName));
125188
+ resolve(this.removeDuplicatedOptions(options));
125189
+ });
125190
+ }
125191
+ buildFieldOption(item, fieldName) {
125192
+ return {
125193
+ value: this.buildValue(item, fieldName),
125194
+ label: this.formatLabel(fieldName, item[fieldName]),
125195
+ check: true,
125196
+ };
125197
+ }
125198
+ buildValue(item, fieldName) {
125199
+ var _a;
125200
+ let value = item[fieldName];
125201
+ if (((_a = this.dataUnit.getField(fieldName)) === null || _a === void 0 ? void 0 : _a.dataType) === DataType.OBJECT) {
125202
+ value = value.value;
125203
+ }
125204
+ return value === null || value === void 0 ? void 0 : value.toString();
125205
+ }
125206
+ removeDuplicatedOptions(options) {
125207
+ const noDuplicatedOptions = [];
125208
+ options.forEach(option => {
125209
+ if (!noDuplicatedOptions.find(({ label }) => label === option.label)) {
125210
+ noDuplicatedOptions.push(option);
125211
+ }
125212
+ });
125213
+ return noDuplicatedOptions;
125214
+ }
125215
+ includesSearchTerm(record, fieldName, filterTerm) {
125216
+ let label = this.buildLabel(fieldName, record[fieldName]);
125217
+ return label.toLowerCase().includes(filterTerm.toLowerCase());
125218
+ }
125219
+ buildLabel(fieldName, value) {
125220
+ var _a;
125221
+ const { dataType } = this.dataUnit.getField(fieldName);
125222
+ if (dataType === DataType.NUMBER) {
125223
+ return value === null || value === void 0 ? void 0 : value.toString().replace('.', ',');
125224
+ }
125225
+ if (dataType === DataType.DATE) {
125226
+ return (typeof value === 'object')
125227
+ ? (_a = DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString()
125228
+ : value === null || value === void 0 ? void 0 : value.toString();
125229
+ }
125230
+ if (dataType === DataType.OBJECT) {
125231
+ return `${value === null || value === void 0 ? void 0 : value.value} - ${value === null || value === void 0 ? void 0 : value.label}`;
125232
+ }
125233
+ return value === null || value === void 0 ? void 0 : value.toString();
125234
+ }
125235
+ formatLabel(fieldName, value) {
125236
+ var _a, _b;
125237
+ const { userInterface, dataType } = this.dataUnit.getField(fieldName);
125238
+ if (dataType === DataType.DATE) {
125239
+ return (typeof value === 'object')
125240
+ ? DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value))
125241
+ : value === null || value === void 0 ? void 0 : value.toString();
125242
+ }
125243
+ if (dataType === DataType.NUMBER && userInterface !== UserInterface.DECIMALNUMBER) {
125244
+ return (_a = parseInt(this.dataUnit.getFormattedValue(fieldName, value))) === null || _a === void 0 ? void 0 : _a.toString();
125245
+ }
125246
+ return (_b = this.dataUnit.getFormattedValue(fieldName, value)) === null || _b === void 0 ? void 0 : _b.toString();
125247
+ }
125248
+ }
125249
+
124458
125250
  const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:0 0 16px 0 rgb(0 38 111 / 12%)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF);z-index:var(--more-visible, 2)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s;z-index:var(--ez-grid__selection-counter--z-index)}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}";
124459
125251
 
124460
125252
  const windowInstace$1 = window;
@@ -124469,18 +125261,13 @@ const EzGrid$1 = class extends HTMLElement$1 {
124469
125261
  this.componentReady = createEvent(this, "componentReady", 7);
124470
125262
  this._gridController = new AgGridController(false);
124471
125263
  this._messageFilterAppliedSuccess = 'Filtro de coluna aplicado com sucesso!';
124472
- this.onDataUnitAction = (action) => {
124473
- if (action.type === Action.DATA_SAVED || action.type === Action.RECORDS_REMOVED) {
124474
- this._originalRecords = this.dataUnit.records;
124475
- }
124476
- };
124477
125264
  this._paginationInfo = undefined;
124478
125265
  this._paginationChangedByKeyboard = true;
124479
125266
  this._showSelectionCounter = false;
124480
125267
  this._isAllSelection = false;
124481
125268
  this._currentPageSelected = undefined;
124482
125269
  this._selectionCount = undefined;
124483
- this._originalRecords = [];
125270
+ this._hasLeftButtons = false;
124484
125271
  this.multipleSelection = undefined;
124485
125272
  this.config = undefined;
124486
125273
  this.selectionToastConfig = undefined;
@@ -124488,6 +125275,9 @@ const EzGrid$1 = class extends HTMLElement$1 {
124488
125275
  this.dataUnit = undefined;
124489
125276
  this.statusResolver = undefined;
124490
125277
  this.columnfilterDataSource = undefined;
125278
+ this.useEnterLikeTab = false;
125279
+ this.recordsValidator = undefined;
125280
+ this.canEdit = true;
124491
125281
  }
124492
125282
  /**
124493
125283
  * Aplica a definição de colunas.
@@ -124721,6 +125511,9 @@ const EzGrid$1 = class extends HTMLElement$1 {
124721
125511
  serverURL: this.serverUrl,
124722
125512
  dataUnit: this.dataUnit,
124723
125513
  statusResolver: this.statusResolver,
125514
+ useEnterLikeTab: this.useEnterLikeTab,
125515
+ recordsValidator: this.recordsValidator,
125516
+ editionIsDisabled: () => !this.canEdit
124724
125517
  });
124725
125518
  if (this.config) {
124726
125519
  this.observeConfig(this.config);
@@ -124729,6 +125522,11 @@ const EzGrid$1 = class extends HTMLElement$1 {
124729
125522
  this.setEvents();
124730
125523
  this.componentReady.emit();
124731
125524
  this._gridController.configFilterColumn(this._filterColumn);
125525
+ this._container.addEventListener('focusout', (event) => {
125526
+ const api = this._gridController.getGridApi();
125527
+ if (api && !this._container.contains(event.relatedTarget))
125528
+ api.clearFocusedCell();
125529
+ });
124732
125530
  }
124733
125531
  componentWillRender() {
124734
125532
  this.configSelectionCounter();
@@ -124739,44 +125537,20 @@ const EzGrid$1 = class extends HTMLElement$1 {
124739
125537
  });
124740
125538
  }
124741
125539
  componentWillLoad() {
125540
+ this._hasLeftButtons = !!this._element.querySelector('[slot="leftButtons"]');
124742
125541
  if (!this.dataUnit.name.includes("InMemoryDataUnit"))
124743
125542
  return;
124744
- this.dataUnit.subscribe(this.onDataUnitAction);
124745
125543
  }
124746
125544
  getDataSource() {
124747
- return this.columnfilterDataSource ? this.columnfilterDataSource : this.buildDefaultDataSource();
124748
- }
124749
- buildDefaultDataSource() {
124750
- var _a, _b;
124751
- if (this._originalRecords.length === 0) {
124752
- this._originalRecords = (_b = (_a = this.dataUnit) === null || _a === void 0 ? void 0 : _a.records) !== null && _b !== void 0 ? _b : [];
124753
- }
124754
- return {
124755
- fetchData: (filterTerm, fieldName) => {
124756
- return new Promise(resolve => {
124757
- const filteredRecords = this._originalRecords.filter(record => {
124758
- var _a, _b;
124759
- const label = typeof record[fieldName] === "object" ? `${(_a = record[fieldName]) === null || _a === void 0 ? void 0 : _a.value} - ${(_b = record[fieldName]) === null || _b === void 0 ? void 0 : _b.label}` : record[fieldName];
124760
- return label === null || label === void 0 ? void 0 : label.toString().toLowerCase().includes(filterTerm.toLowerCase());
124761
- });
124762
- const options = filteredRecords.map(item => {
124763
- return { value: item[fieldName].toString(), label: this.formatLabel(fieldName, item[fieldName]), check: true };
124764
- });
124765
- resolve(options);
124766
- });
124767
- }
124768
- };
125545
+ var _a;
125546
+ return (_a = this.columnfilterDataSource) !== null && _a !== void 0 ? _a : new InMemoryFilterColumnDataSource(this.dataUnit);
124769
125547
  }
124770
- formatLabel(fieldName, value) {
124771
- const { userInterface } = this.dataUnit.getField(fieldName);
124772
- if (userInterface === UserInterface.DATETIME) {
124773
- return DateUtils$1.formatDate(this.dataUnit.valueFromString(fieldName, value));
124774
- }
124775
- return String(this.dataUnit.getFormattedValue(fieldName, value));
125548
+ hideHeader() {
125549
+ return (!!this._element.getAttribute("no-header") && !this._paginationInfo);
124776
125550
  }
124777
125551
  render() {
124778
125552
  var _a;
124779
- return (h(Host, null, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: !!this._element.getAttribute("no-header"), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter
125553
+ return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: "ez-box ez-box--shadow ez-padding--medium grid-header" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: "grid-header__container" }, h("slot", { name: "leftButtons" })), h("div", { class: "grid-header__container", ref: ref => (this._refPaginationControl = ref) }, this.getPaginationControl()))), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter
124780
125554
  ${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
124781
125555
  ` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__container ez-grid", ref: elem => (this._container = elem) }), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
124782
125556
  }
@@ -125644,6 +126418,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
125644
126418
  this.dataSource = undefined;
125645
126419
  this.useOptions = false;
125646
126420
  this.options = undefined;
126421
+ this.isTextSearch = false;
125647
126422
  this.filteredOptions = undefined;
125648
126423
  this.displayOptions = undefined;
125649
126424
  this.viewScenario = undefined;
@@ -125726,6 +126501,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
125726
126501
  this.filteredOptions = this.ordenationByCheckStateAndAlphabetically([...optionsToSort, event.detail]);
125727
126502
  }
125728
126503
  this.viewScenario = ViewScenarios.DATASOURCE_RESULTS;
126504
+ this.searchInput.value = "";
125729
126505
  }
125730
126506
  handleRemoveItemFromOptions(item) {
125731
126507
  this.filteredOptions = this.ordenationByCheckStateAndAlphabetically(this.filteredOptions.filter(i => i.value !== item.value));
@@ -125789,7 +126565,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
125789
126565
  return scenarios[view];
125790
126566
  }
125791
126567
  render() {
125792
- return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this) })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
126568
+ return (h(Host, null, h("div", { class: "multi-selection" }, this.useOptions ? (h("ez-filter-input", { ref: (element) => (this.filterInput = element), label: `Buscar..`, onEzChange: this.handleSearchOnOption.bind(this) })) : (h("ez-search", { class: "multi-selection__input", label: `Buscar...`, ref: (element) => (this.searchInput = element), suppressEmptyOption: true, showOptionValue: false, showSelectedValue: false, optionLoader: (search) => this.searchWithDataSource(search, this.columnName), onEzChange: this.handleSearchOnDataSource.bind(this), isTextSearch: this.isTextSearch })), h("ez-scroll", { class: "multi-selection__content-options" }, this.scenarioToDisplay(this.viewScenario)))));
125793
126569
  }
125794
126570
  static get watchers() { return {
125795
126571
  "useOptions": ["onChangeUseOptions"],
@@ -125799,7 +126575,7 @@ const EzMuiltiSelectionList = class extends HTMLElement$1 {
125799
126575
  static get style() { return ezMultiSelectionListCss; }
125800
126576
  };
125801
126577
 
125802
- const ezNumberInputCss = ":host{display:block;width:100%}";
126578
+ const ezNumberInputCss = ":host{display:block;width:100%}.number__input{height:100%}";
125803
126579
 
125804
126580
  const EzNumberInput$1 = class extends HTMLElement$1 {
125805
126581
  constructor() {
@@ -125810,6 +126586,8 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125810
126586
  this.ezStartChange = createEvent(this, "ezStartChange", 7);
125811
126587
  this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
125812
126588
  this._focused = false;
126589
+ this._changePending = false;
126590
+ this._valuePromiseCallbacks = [];
125813
126591
  this.label = undefined;
125814
126592
  this.value = undefined;
125815
126593
  this.enabled = true;
@@ -125822,8 +126600,8 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125822
126600
  /**
125823
126601
  * Aplica o foco no campo.
125824
126602
  */
125825
- async setFocus() {
125826
- this._textInput.setFocus();
126603
+ async setFocus(options) {
126604
+ this._textInput.setFocus(options);
125827
126605
  }
125828
126606
  /**
125829
126607
  * Remove o foco do campo.
@@ -125837,6 +126615,18 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125837
126615
  async isInvalid() {
125838
126616
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
125839
126617
  }
126618
+ /*
126619
+ * Retorna uma promise com o valor da opção selecionada,
126620
+ * que será resolvida quando o backend devolver este dado.
126621
+ */
126622
+ async getValueAsync() {
126623
+ if (this._changePending) {
126624
+ return new Promise(accept => {
126625
+ this._valuePromiseCallbacks.push(accept);
126626
+ });
126627
+ }
126628
+ return Promise.resolve(this.value);
126629
+ }
125840
126630
  observeLabel() {
125841
126631
  if (this._textInput) {
125842
126632
  this._textInput.label = this.label;
@@ -125872,6 +126662,7 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125872
126662
  this.ezChange.emit(valueEmitted);
125873
126663
  }
125874
126664
  }
126665
+ this._changePending = false;
125875
126666
  }
125876
126667
  validateValue(value) {
125877
126668
  return isNaN(value) || value === undefined ? null : value;
@@ -125898,24 +126689,33 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125898
126689
  this.ezCancelWaitingChange.emit();
125899
126690
  }
125900
126691
  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);
126692
+ try {
126693
+ const parsedNumber = this.getParsedNumber();
126694
+ if (parsedNumber !== undefined && isNaN(parsedNumber)) {
126695
+ this.setError("O valor digitado não é um número válido");
125908
126696
  }
125909
- catch (e) {
125910
- this.setError(e.message);
125911
- return;
126697
+ else {
126698
+ try {
126699
+ this.changeValue(parsedNumber);
126700
+ }
126701
+ catch (e) {
126702
+ this.setError(e.message);
126703
+ return;
126704
+ }
125912
126705
  }
125913
126706
  }
126707
+ finally {
126708
+ for (const callback of this._valuePromiseCallbacks) {
126709
+ callback(this.value);
126710
+ }
126711
+ this._valuePromiseCallbacks = [];
126712
+ }
125914
126713
  }
125915
126714
  handleInput() {
125916
126715
  const parsedNumber = this.getParsedNumber();
125917
126716
  if (parsedNumber !== this.value) {
125918
126717
  this._focused = true;
126718
+ this._changePending = true;
125919
126719
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
125920
126720
  }
125921
126721
  }
@@ -125938,7 +126738,7 @@ const EzNumberInput$1 = class extends HTMLElement$1 {
125938
126738
  }
125939
126739
  render() {
125940
126740
  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 }));
126741
+ 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
126742
  }
125943
126743
  get _elem() { return this; }
125944
126744
  static get watchers() { return {
@@ -126410,6 +127210,9 @@ const EzSearch$1 = class extends HTMLElement$1 {
126410
127210
  this.suppressEmptyOption = false;
126411
127211
  this.mode = "regular";
126412
127212
  this.canShowError = true;
127213
+ this.hideErrorOnFocusOut = true;
127214
+ this.listOptionsPosition = undefined;
127215
+ this.isTextSearch = false;
126413
127216
  }
126414
127217
  observeErrorMessage() {
126415
127218
  if (this._comboElement) {
@@ -126446,6 +127249,14 @@ const EzSearch$1 = class extends HTMLElement$1 {
126446
127249
  var _a, _b;
126447
127250
  (_b = (_a = this._comboElement) === null || _a === void 0 ? void 0 : _a['clearValue']) === null || _b === void 0 ? void 0 : _b.call(_a);
126448
127251
  }
127252
+ /*
127253
+ * Retorna uma promise com o valor da opção selecionada,
127254
+ * que será resolvida quando o backend devolver este dado.
127255
+ */
127256
+ async getValueAsync() {
127257
+ var _a;
127258
+ return (_a = this._comboElement) === null || _a === void 0 ? void 0 : _a.getValueAsync();
127259
+ }
126449
127260
  onComboChange(event) {
126450
127261
  event.stopPropagation();
126451
127262
  this.value = event.detail;
@@ -126459,7 +127270,7 @@ const EzSearch$1 = class extends HTMLElement$1 {
126459
127270
  }
126460
127271
  render() {
126461
127272
  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 }));
127273
+ 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, hideErrorOnFocusOut: this.hideErrorOnFocusOut, 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, isTextSearch: this.isTextSearch }));
126463
127274
  }
126464
127275
  ;
126465
127276
  get _elem() { return this; }
@@ -126778,7 +127589,7 @@ const EzTabselector$1 = class extends HTMLElement$1 {
126778
127589
  static get style() { return ezTabselectorCss; }
126779
127590
  };
126780
127591
 
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)}";
127592
+ 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
127593
 
126783
127594
  const EzTextArea$1 = class extends HTMLElement$1 {
126784
127595
  constructor() {
@@ -126793,6 +127604,7 @@ const EzTextArea$1 = class extends HTMLElement$1 {
126793
127604
  this.rows = 4;
126794
127605
  this.canShowError = true;
126795
127606
  this.mode = "regular";
127607
+ this.enableResize = false;
126796
127608
  }
126797
127609
  observeErrorMessage() {
126798
127610
  var _a, _b, _c, _d;
@@ -126934,7 +127746,10 @@ const EzTextArea$1 = class extends HTMLElement$1 {
126934
127746
  ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
126935
127747
  return (h(Host, null, h("div", { class: "textarea", ref: (el) => this._container = el }, this.label && this.mode != "slim" ?
126936
127748
  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" &&
127749
+ : null, h("textarea", { onFocus: () => this.handleFocus(), "data-element-id": ElementIDUtils.getInternalIDInfo("input"), ref: (el) => this._inputElem = el, value: this.value, disabled: !this.enabled, class: {
127750
+ "textarea--slim": this.mode === "slim",
127751
+ "textarea--resizable": this.enableResize
127752
+ }, placeholder: this.mode === "slim" && this.label ? this.label : "", onInput: () => { this.handleChange(); }, onFocusout: () => { this.handleFocusout(); }, rows: this.rows })), this.canShowError && this.mode != "slim" &&
126938
127753
  h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage }, this.errorMessage)));
126939
127754
  }
126940
127755
  get _hostElement() { return this; }
@@ -127045,7 +127860,7 @@ const EzTextEdit$1 = class extends HTMLElement$1 {
127045
127860
  static get style() { return ezTextEditCss; }
127046
127861
  };
127047
127862
 
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)}";
127863
+ 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
127864
 
127050
127865
  const EzTextInput$1 = class extends HTMLElement$1 {
127051
127866
  constructor() {
@@ -127146,7 +127961,10 @@ const EzTextInput$1 = class extends HTMLElement$1 {
127146
127961
  /**
127147
127962
  * Aplica o foco no campo.
127148
127963
  */
127149
- async setFocus() {
127964
+ async setFocus(options) {
127965
+ const { selectText } = options || {};
127966
+ if (selectText)
127967
+ this._inputElem.select();
127150
127968
  this._inputElem.focus();
127151
127969
  }
127152
127970
  /**
@@ -127239,7 +128057,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
127239
128057
  if (this.label && this._labelElem && !this._labelElem.classList.contains("input__label--floated")) {
127240
128058
  this._labelElem.classList.add("input__label--floated");
127241
128059
  }
127242
- this.adjustColorContentSlot("var(--ez-text-input__input--focus--border-color)");
128060
+ this.adjustColorContentSlot("var(--ez-text-input__input--focus--icon-color)");
127243
128061
  }
127244
128062
  //---------------------------------------------
127245
128063
  // Lifecycle web component
@@ -127269,7 +128087,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
127269
128087
  }
127270
128088
  render() {
127271
128089
  ElementIDUtils.addIDInfoIfNotExists(this._hostElement, 'input');
127272
- return (h(Host, null, h("slot", { name: "leftIcon", onSlotchange: (ev) => { this.handleSlotChange(ev); } }), this.label && this.mode != "slim" ?
128090
+ 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
128091
  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
128092
  : 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
128093
  h("span", { class: "message-box", ref: (el) => this._messageBoxElem = el, title: this.errorMessage, "data-element-id": ElementIDUtils.getInternalIDInfo("message_box") }, this.errorMessage)));
@@ -127283,7 +128101,7 @@ const EzTextInput$1 = class extends HTMLElement$1 {
127283
128101
  static get style() { return ezTextInputCss; }
127284
128102
  };
127285
128103
 
127286
- const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}";
128104
+ const ezTimeInputCss = ":host{display:flex;flex-wrap:wrap;position:relative;width:100%}.time__input{height:100%}";
127287
128105
 
127288
128106
  const EzTimeInput$1 = class extends HTMLElement$1 {
127289
128107
  constructor() {
@@ -127380,8 +128198,8 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
127380
128198
  /**
127381
128199
  * Aplica o foco no campo.
127382
128200
  */
127383
- async setFocus() {
127384
- this._textInput.setFocus();
128201
+ async setFocus({ selectText }) {
128202
+ this._textInput.setFocus({ selectText });
127385
128203
  }
127386
128204
  /**
127387
128205
  * Remove o foco do campo.
@@ -127402,11 +128220,15 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
127402
128220
  if (this._textInput) {
127403
128221
  this._viewValue = this._textInput.value;
127404
128222
  this.prepareValue(this._viewValue);
127405
- this.value = NumberUtils$1.stringToNumber(this._viewValue.replace(/\D/g, ""));
128223
+ const value = NumberUtils$1.stringToNumber(this._viewValue.replace(/\D/g, ""));
128224
+ this.value = ['string', 'number'].includes(typeof value) ? value : null;
127406
128225
  }
127407
128226
  }
127408
128227
  handleInput() {
127409
- const parsedNumber = NumberUtils$1.stringToNumber(this._textInput.value.replace(/\D/g, ""));
128228
+ const textInputValue = this._textInput.value;
128229
+ if (!['string', 'number'].includes(typeof textInputValue))
128230
+ return;
128231
+ const parsedNumber = NumberUtils$1.stringToNumber(textInputValue.replace(/\D/g, ""));
127410
128232
  if (parsedNumber !== this.value) {
127411
128233
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
127412
128234
  }
@@ -127428,7 +128250,7 @@ const EzTimeInput$1 = class extends HTMLElement$1 {
127428
128250
  }
127429
128251
  render() {
127430
128252
  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" }))));
128253
+ 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
128254
  }
127433
128255
  static get assetsDirs() { return ["../assets"]; }
127434
128256
  get _elem() { return this; }
@@ -128585,19 +129407,23 @@ const FilterColumn$1 = class extends HTMLElement$1 {
128585
129407
  super();
128586
129408
  this.__registerHost();
128587
129409
  this.applyFilterColumnOptions = createEvent(this, "applyFilterColumnOptions", 7);
128588
- this.TOP_POSITION = '65px';
129410
+ this.TOP_POSITION = '65';
128589
129411
  this.TOP_POSITION_HEADER_HIDDEN = '18';
129412
+ this.TOP_POSITION_NO_TASKBAR = '32';
129413
+ this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN = '20';
128590
129414
  this.DEFAULT_HEIGHT = 430;
128591
129415
  this.opened = true;
128592
129416
  this.columnName = undefined;
128593
129417
  this.columnLabel = undefined;
128594
129418
  this.gridHeaderHidden = false;
129419
+ this.noHeaderTaskBar = false;
128595
129420
  this.dataSource = undefined;
128596
129421
  this.dataUnit = undefined;
128597
129422
  this.options = undefined;
128598
129423
  this.selectedItems = undefined;
128599
129424
  this.fieldDescriptor = undefined;
128600
129425
  this.useOptions = false;
129426
+ this.isTextSearch = false;
128601
129427
  }
128602
129428
  async hide() {
128603
129429
  await this.ezPopoverElement.hide();
@@ -128611,26 +129437,45 @@ const FilterColumn$1 = class extends HTMLElement$1 {
128611
129437
  if (this.canShow(configs)) {
128612
129438
  await this.hide();
128613
129439
  this.fieldDescriptor = this.dataUnit.getField(configs.columnName);
129440
+ this.buildIsTextSearch();
128614
129441
  this.setOptions(configs.filteredOptions);
128615
129442
  this.columnName = configs.columnName;
128616
129443
  this.columnLabel = configs.columnLabel;
128617
- await this.ezPopoverElement.show(this.calcTopPosition(), configs.leftPosition);
129444
+ await this.ezPopoverElement.show(this.calcTopPosition(), this.calculateLeftPosition(configs));
129445
+ }
129446
+ }
129447
+ calculateLeftPosition(configs) {
129448
+ if (!configs.fromIcon) {
129449
+ return configs.leftPosition;
128618
129450
  }
129451
+ const difference = this.ezPopoverElement.getBoundingClientRect().left;
129452
+ const leftReference = parseInt(configs.leftPosition.replace('px', ''));
129453
+ const leftResolved = (leftReference + 16) - difference;
129454
+ return `${(leftResolved > 0 ? leftResolved : 0)}px`;
129455
+ }
129456
+ buildIsTextSearch() {
129457
+ var _a, _b;
129458
+ const userInterface = (_b = (_a = this.fieldDescriptor) === null || _a === void 0 ? void 0 : _a.userInterface) !== null && _b !== void 0 ? _b : UserInterface.SHORTTEXT;
129459
+ this.isTextSearch = !(userInterface === UserInterface.DECIMALNUMBER || userInterface === UserInterface.INTEGERNUMBER);
128619
129460
  }
128620
129461
  calcTopPosition() {
128621
- const referencePosition = this.gridHeaderHidden
128622
- ? this.TOP_POSITION_HEADER_HIDDEN
128623
- : this.TOP_POSITION.replace('px', '');
129462
+ const referencePosition = this.buildReferenceTopPosition();
128624
129463
  const totalPopoverHeight = parseInt(referencePosition) + this.DEFAULT_HEIGHT;
128625
129464
  const popoverPosition = Math.round(this.ezPopoverElement.getBoundingClientRect().top);
128626
129465
  const popoverBottomPosition = popoverPosition + totalPopoverHeight;
128627
129466
  const windowHeight = window.innerHeight;
128628
129467
  if (windowHeight > popoverBottomPosition) {
128629
- return referencePosition;
129468
+ return `${referencePosition}px`;
128630
129469
  }
128631
129470
  const differenceBetween = windowHeight - popoverBottomPosition;
128632
129471
  return `${differenceBetween}px`;
128633
129472
  }
129473
+ buildReferenceTopPosition() {
129474
+ if (this.noHeaderTaskBar) {
129475
+ return this.gridHeaderHidden ? this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN : this.TOP_POSITION_NO_TASKBAR;
129476
+ }
129477
+ return this.gridHeaderHidden ? this.TOP_POSITION_HEADER_HIDDEN : this.TOP_POSITION;
129478
+ }
128634
129479
  async clearConfigs() {
128635
129480
  var _a;
128636
129481
  await ((_a = this.ezMultiSelectionList) === null || _a === void 0 ? void 0 : _a.clearFilteredOptions());
@@ -128688,7 +129533,7 @@ const FilterColumn$1 = class extends HTMLElement$1 {
128688
129533
  }
128689
129534
  }
128690
129535
  render() {
128691
- return (h("ez-popover", { class: 'filter-column__popover', "overlay-type": 'none', ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: 'filter-column' }, h("header", { class: 'filter-column__header' }, h("span", { class: 'ez-text ez-text--medium filter-column__header-title' }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: 'icon', "icon-name": 'close', class: 'ez-button--tertiary', onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail) }), h("footer", { class: 'filter-column__footer' }, h("ez-button", { label: 'Aplicar', class: 'ez-button--primary', onClick: this.submit.bind(this) })))));
129536
+ return (h("ez-popover", { class: 'filter-column__popover', "overlay-type": 'none', ref: (element) => (this.ezPopoverElement = element), autoClose: true, onEzVisibilityChange: this.handleEzVisibilityChange.bind(this) }, h("section", { class: 'filter-column' }, h("header", { class: 'filter-column__header' }, h("span", { class: 'ez-text ez-text--medium filter-column__header-title' }, "Filtro da coluna ", this.columnLabel), h("ez-button", { mode: 'icon', "icon-name": 'close', class: 'ez-button--tertiary', onClick: () => this.hide() })), h("ez-multi-selection-list", { columnName: this.columnName, dataSource: this.dataSource, options: this.options, useOptions: this.useOptions, ref: (element) => (this.ezMultiSelectionList = element), onChangeFilteredOptions: (event) => this.changeSelectedItems(event.detail), isTextSearch: this.isTextSearch }), h("footer", { class: 'filter-column__footer' }, h("ez-button", { label: 'Aplicar', class: 'ez-button--primary', onClick: this.submit.bind(this) })))));
128692
129537
  }
128693
129538
  static get style() { return filterColumnCss; }
128694
129539
  };
@@ -128713,12 +129558,12 @@ const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-ap
128713
129558
  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
129559
  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
129560
  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"]}]);
129561
+ const EzCalendar = /*@__PURE__*/proxyCustomElement(EzCalendar$1, [1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"]},[[11,"scroll","scrollListener"]]]);
128717
129562
  const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-item",{"item":[16]}]);
128718
129563
  const EzCheck = /*@__PURE__*/proxyCustomElement(EzCheck$1, [1,"ez-check",{"label":[513],"value":[1540],"enabled":[1540],"indeterminate":[1540],"mode":[513],"compact":[4]}]);
128719
129564
  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
129565
  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"]]]);
129566
+ 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],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"],"_preSelection":[32],"_visibleOptions":[32],"_startLoading":[32],"_showLoading":[32],"_criteria":[32]},[[11,"scroll","scrollListener"]]]);
128722
129567
  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
129568
  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
129569
  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,24 +129572,24 @@ const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-ite
128727
129572
  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
129573
  const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16]}]);
128729
129574
  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"]]]);
129575
+ 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],"_hasLeftButtons":[32]},[[0,"ezSelectionChange","onSelectionChange"]]]);
128731
129576
  const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
128732
129577
  const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
128733
129578
  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]}]);
128734
129579
  const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
128735
129580
  const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"scrim":[1]}]);
128736
129581
  const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"]}]);
128737
- const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[16],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
129582
+ const EzMultiSelectionList = /*@__PURE__*/proxyCustomElement(EzMuiltiSelectionList, [2,"ez-multi-selection-list",{"columnName":[1,"column-name"],"dataSource":[16],"useOptions":[1028,"use-options"],"options":[16],"isTextSearch":[4,"is-text-search"],"filteredOptions":[32],"displayOptions":[32],"viewScenario":[32],"displayOptionToCheckAllItems":[32]}]);
128738
129583
  const EzNumberInput = /*@__PURE__*/proxyCustomElement(EzNumberInput$1, [1,"ez-number-input",{"label":[1],"value":[1538],"enabled":[4],"canShowError":[516,"can-show-error"],"errorMessage":[1537,"error-message"],"precision":[2],"prettyPrecision":[2,"pretty-precision"],"mode":[513]}]);
128739
129584
  const EzPopover = /*@__PURE__*/proxyCustomElement(EzPopover$1, [1,"ez-popover",{"autoClose":[516,"auto-close"],"boxWidth":[513,"box-width"],"opened":[1540],"innerElement":[1537,"inner-element"],"overlayType":[513,"overlay-type"]}]);
128740
129585
  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
129586
  const EzRadioButton = /*@__PURE__*/proxyCustomElement(EzRadioButton$1, [1,"ez-radio-button",{"value":[1544],"options":[1040],"enabled":[516],"label":[513],"direction":[1537]}]);
128742
129587
  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"]}]);
129588
+ 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"],"hideErrorOnFocusOut":[4,"hide-error-on-focus-out"],"listOptionsPosition":[16],"isTextSearch":[4,"is-text-search"]}]);
128744
129589
  const EzSidebarButton = /*@__PURE__*/proxyCustomElement(EzSidebarButton$1, [1,"ez-sidebar-button"]);
128745
129590
  const EzSkeleton = /*@__PURE__*/proxyCustomElement(EzSkeleton$1, [0,"ez-skeleton",{"count":[2],"variant":[1],"width":[1],"height":[1],"marginBottom":[1,"margin-bottom"],"animation":[1]}]);
128746
129591
  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]}]);
129592
+ 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
129593
  const EzTextEdit = /*@__PURE__*/proxyCustomElement(EzTextEdit$1, [1,"ez-text-edit",{"value":[1],"styled":[16],"_newValue":[32]}]);
128749
129594
  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
129595
  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"]}]);
@@ -128752,7 +129597,7 @@ const EzToast = /*@__PURE__*/proxyCustomElement(EzToast$1, [1,"ez-toast",{"messa
128752
129597
  const EzTree = /*@__PURE__*/proxyCustomElement(EzTree$1, [1,"ez-tree",{"items":[1040],"value":[1040],"selectedId":[1537,"selected-id"],"iconResolver":[16],"tooltipResolver":[16],"_tree":[32],"_waintingForLoad":[32]},[[2,"keydown","onKeyDownListener"]]]);
128753
129598
  const EzUpload = /*@__PURE__*/proxyCustomElement(EzUpload$1, [1,"ez-upload",{"label":[1],"subtitle":[1],"enabled":[4],"maxFileSize":[2,"max-file-size"],"maxFiles":[2,"max-files"],"requestHeaders":[8,"request-headers"],"urlUpload":[1,"url-upload"],"urlDelete":[1,"url-delete"],"value":[1040]}]);
128754
129599
  const EzViewStack = /*@__PURE__*/proxyCustomElement(EzViewStack$1, [0,"ez-view-stack"]);
128755
- const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32]}]);
129600
+ const FilterColumn = /*@__PURE__*/proxyCustomElement(FilterColumn$1, [0,"filter-column",{"opened":[4],"columnName":[1,"column-name"],"columnLabel":[1,"column-label"],"gridHeaderHidden":[4,"grid-header-hidden"],"noHeaderTaskBar":[1028,"no-header-task-bar"],"dataSource":[16],"dataUnit":[16],"options":[1040],"selectedItems":[32],"fieldDescriptor":[32],"useOptions":[32],"isTextSearch":[32]}]);
128756
129601
  const MultiSelectionBoxMessage = /*@__PURE__*/proxyCustomElement(MultiSelectionBoxMessage$1, [0,"multi-selection-box-message",{"message":[1]}]);
128757
129602
  const defineCustomElements = (opts) => {
128758
129603
  if (typeof customElements !== 'undefined') {