@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
@@ -23,6 +23,11 @@ class CSSVarsUtils {
23
23
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height');
24
24
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--background-color');
25
25
  CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--disabled--color');
26
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--height--slim');
27
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input--border-radius');
28
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--focus--border-color');
29
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__icon--width');
30
+ CSSVarsUtils.applyIfExists(host, child, '--ez-text-input__input--focus--icon-color');
26
31
  }
27
32
  }
28
33
  static applyVarsButton(host, child) {
@@ -0,0 +1,99 @@
1
+ import { UserInterface } from '@sankhyalabs/core';
2
+ import { A as ApplicationUtils } from './ApplicationUtils-d9a34a16.js';
3
+
4
+ const buildFieldMetadata = (descriptor, config) => {
5
+ let { name, label, group } = Object.assign({}, config);
6
+ let { readOnly, required } = Object.assign({}, config);
7
+ let props;
8
+ let userInterface;
9
+ if (descriptor) {
10
+ label = label || descriptor.label;
11
+ name = name || descriptor.name;
12
+ required = descriptor.required || (config === null || config === void 0 ? void 0 : config.required);
13
+ readOnly = descriptor.readOnly || (config === null || config === void 0 ? void 0 : config.readOnly);
14
+ props = descriptor.properties;
15
+ userInterface = descriptor.userInterface;
16
+ }
17
+ return {
18
+ name, label, group,
19
+ readOnly, required,
20
+ props,
21
+ userInterface: userInterface || UserInterface.SHORTTEXT
22
+ };
23
+ };
24
+
25
+ class RecordValidationProcessor {
26
+ constructor(dataUnit, validationSource, validator) {
27
+ this._dataUnit = dataUnit;
28
+ this._validationSource = validationSource;
29
+ this._validator = validator;
30
+ }
31
+ validate() {
32
+ return new Promise((accept, reject) => {
33
+ const records = this._dataUnit.getModifiedRecords();
34
+ for (let i = 0; i < records.length; i++) {
35
+ const record = records[i];
36
+ const invalidResults = [];
37
+ let validationResult = this.validateRequired(record);
38
+ if (validationResult && !validationResult.isValid) {
39
+ invalidResults.push(validationResult);
40
+ }
41
+ if (this._validator) {
42
+ validationResult = this._validator.validateRecord(record);
43
+ if (validationResult && !validationResult.isValid) {
44
+ invalidResults.push(validationResult);
45
+ }
46
+ }
47
+ if (invalidResults.length > 0) {
48
+ this.processValidationResult(invalidResults, record.__record__id__);
49
+ reject();
50
+ break;
51
+ }
52
+ }
53
+ return accept();
54
+ });
55
+ }
56
+ validateRequired(record) {
57
+ const requiredFields = this._validationSource.getRequiredFields();
58
+ const invalidFields = [];
59
+ new Set(requiredFields).forEach(field => {
60
+ const value = record[field];
61
+ if (value == undefined || value === "") {
62
+ const errorMessage = this._validationSource.getMessageForField(field, record.__record__id__);
63
+ if (errorMessage) {
64
+ invalidFields.push({ name: field, message: errorMessage });
65
+ }
66
+ else {
67
+ invalidFields.push({ name: field, message: "Essa informação é obrigatória" });
68
+ }
69
+ }
70
+ });
71
+ if (invalidFields.length > 0) {
72
+ return { isValid: false, invalidFields, infoMessage: "Há pelo menos um campo obrigatório não preenchido." };
73
+ }
74
+ return undefined;
75
+ }
76
+ processValidationResult(validationResult, recordId) {
77
+ validationResult.forEach(invalidResult => {
78
+ const invalidFields = invalidResult.invalidFields;
79
+ if (invalidFields) {
80
+ invalidFields.forEach(field => {
81
+ this.markAsInvalid(field, recordId);
82
+ });
83
+ }
84
+ if (invalidResult.infoMessage) {
85
+ ApplicationUtils.info(invalidResult.infoMessage);
86
+ }
87
+ if (invalidResult.errorMessage) {
88
+ const { errorTitle, errorMessage } = invalidResult;
89
+ ApplicationUtils.error(errorTitle, errorMessage);
90
+ }
91
+ });
92
+ }
93
+ markAsInvalid(field, recordId) {
94
+ this._dataUnit.setInvalidField(field.name, field.message, recordId);
95
+ this._validationSource.markAsInvalid(field, recordId);
96
+ }
97
+ }
98
+
99
+ export { RecordValidationProcessor as R, buildFieldMetadata as b };
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
2
2
  import { FloatingManager, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import './ApplicationUtils-d9a34a16.js';
4
- import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
4
+ import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
7
 
@@ -1,4 +1,4 @@
1
- import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-296b8458.js';
1
+ import { r as registerInstance, c as createEvent, f as forceUpdate, h, g as getElement } from './index-296b8458.js';
2
2
  import { FloatingManager } from '@sankhyalabs/core';
3
3
 
4
4
  const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-container--z-index:var(--more-visible, 2);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar__container{display:flex;z-index:var(--more-visible, 2)}.calendar{display:flex;flex-direction:column;z-index:var(--more-visible, 2);background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset;color:var(--ez-calendar--color)}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;padding:0px;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendar-time{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto;scrollbar-width:none}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendar-time__header{display:flex;justify-content:space-between;padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
@@ -24,15 +24,24 @@ const EzCalendar = class {
24
24
  */
25
25
  async show(top, left, bottom, right) {
26
26
  if (this.floating) {
27
- this._floatingID = FloatingManager.float(this._box, this._container, { autoClose: true, top, left, bottom, right });
28
- window.requestAnimationFrame(() => {
29
- this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
27
+ this._floatingID = FloatingManager.float(this._box, this._container, {
28
+ isFixed: this.isFixed(),
29
+ autoClose: true,
30
+ top,
31
+ left,
32
+ bottom,
33
+ right
30
34
  });
31
- this.scroll();
35
+ if (!this.isFixed()) {
36
+ window.requestAnimationFrame(() => {
37
+ this._box.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
38
+ });
39
+ this.scroll();
40
+ }
32
41
  }
33
42
  }
34
43
  /**
35
- * Ajusta o posicionamento do ez-calendar conforme a disponibilidade de espaço.
44
+ * Ajusta o posicionamento vertical do ez-calendar conforme a disponibilidade de espaço.
36
45
  */
37
46
  async fitVertical(topOffset, bottomOffset) {
38
47
  const neededHeight = this._container.getBoundingClientRect().bottom + this._calendarHeight;
@@ -44,6 +53,16 @@ const EzCalendar = class {
44
53
  this.show("unset", undefined, bottomOffset + "px");
45
54
  }
46
55
  }
56
+ /**
57
+ * Ajusta o posicionamento horizontal do ez-calendar conforme a disponibilidade de espaço.
58
+ */
59
+ async fitHorizontal(rightOffset) {
60
+ const neededWidth = this._container.getBoundingClientRect().right + this._calendarWidth;
61
+ const availableRight = (window.innerWidth || document.documentElement.clientWidth) > neededWidth;
62
+ if (!availableRight) {
63
+ this.show(undefined, "unset", undefined, rightOffset + "px");
64
+ }
65
+ }
47
66
  /**
48
67
  * Oculta o ez-calendar.
49
68
  */
@@ -59,6 +78,14 @@ const EzCalendar = class {
59
78
  this._currentPosition.setDate(1);
60
79
  }
61
80
  }
81
+ scrollListener() {
82
+ if (this.floating && this.isFixed()) {
83
+ this.hide();
84
+ }
85
+ }
86
+ isFixed() {
87
+ return this._hostElem.dataset.isFixed === "true";
88
+ }
62
89
  getMonthLabel() {
63
90
  return this._monthLabels[this._currentPosition.getMonth()] + " " + this._currentPosition.getFullYear();
64
91
  }
@@ -123,6 +150,7 @@ const EzCalendar = class {
123
150
  componentDidRender() {
124
151
  if (this.floating && this._firstRender) {
125
152
  this._calendarHeight = this._box.clientHeight;
153
+ this._calendarWidth = this._box.clientWidth;
126
154
  this._box.remove();
127
155
  this._firstRender = false;
128
156
  }
@@ -196,6 +224,7 @@ const EzCalendar = class {
196
224
  }
197
225
  })))))));
198
226
  }
227
+ get _hostElem() { return getElement(this); }
199
228
  static get watchers() { return {
200
229
  "value": ["observeValue"]
201
230
  }; }
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
2
2
  import { StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
 
4
- 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)}";
4
+ 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)}";
5
5
 
6
6
  const EzCardItem = class {
7
7
  constructor(hostRef) {
@@ -1,12 +1,12 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
2
2
  import { ObjectUtils, FloatingManager, StringUtils, ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { A as ApplicationUtils } from './ApplicationUtils-d9a34a16.js';
4
- import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
4
+ import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
7
  import { R as REQUIRED_INFO } from './constants-6dab64f7.js';
8
8
 
9
- 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)}}";
9
+ 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)}}";
10
10
 
11
11
  const EzComboBox = class {
12
12
  constructor(hostRef) {
@@ -38,6 +38,9 @@ const EzComboBox = class {
38
38
  this.suppressEmptyOption = false;
39
39
  this.canShowError = true;
40
40
  this.mode = "regular";
41
+ this.hideErrorOnFocusOut = true;
42
+ this.listOptionsPosition = undefined;
43
+ this.isTextSearch = false;
41
44
  }
42
45
  observeErrorMessage() {
43
46
  var _a;
@@ -80,17 +83,38 @@ const EzComboBox = class {
80
83
  return;
81
84
  this.loadOptions(SearchMode.PRELOAD);
82
85
  }
86
+ /*
87
+ * Retorna uma promise com o valor da opção selecionada,
88
+ * que será resolvida quando o backend devolver este dado.
89
+ */
90
+ async getValueAsync() {
91
+ if (!this._showLoading) {
92
+ return new Promise(resolve => resolve(this.value));
93
+ }
94
+ return new Promise(resolve => {
95
+ let id = setInterval(() => {
96
+ if (!this._showLoading) {
97
+ clearInterval(id);
98
+ resolve(this.value);
99
+ }
100
+ }, 100);
101
+ });
102
+ }
83
103
  /**
84
104
  * Aplica o foco no campo.
85
105
  */
86
106
  async setFocus() {
87
- this._textInput.setFocus();
107
+ if (this._textInput) {
108
+ this._textInput.setFocus();
109
+ }
88
110
  }
89
111
  /**
90
112
  * Remove o foco do campo.
91
113
  */
92
114
  async setBlur() {
93
- this._textInput.setBlur();
115
+ if (this._textInput) {
116
+ this._textInput.setBlur();
117
+ }
94
118
  }
95
119
  /**
96
120
  * Retorna se o conteúdo é inválido.
@@ -105,16 +129,61 @@ const EzComboBox = class {
105
129
  this.clearSearch();
106
130
  }
107
131
  scrollListener() {
108
- if (!this._floatingID)
132
+ var _a;
133
+ if (this._floatingID == undefined) {
109
134
  return;
110
- window.requestAnimationFrame(() => {
111
- this.updateListPosition();
112
- });
135
+ }
136
+ if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
137
+ this.hideOptions();
138
+ }
139
+ else {
140
+ window.requestAnimationFrame(() => {
141
+ this.updateListPosition();
142
+ });
143
+ }
113
144
  }
114
145
  updateListPosition() {
115
- const { top } = this._listContainer.getBoundingClientRect();
116
- const margin = (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13;
117
- this._listWrapper.style.top = `${(top + margin)}px`;
146
+ let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
147
+ const elementRect = this._listWrapper.getBoundingClientRect();
148
+ const containerRect = this._listContainer.getBoundingClientRect();
149
+ const textInputRect = this._textInput.getBoundingClientRect();
150
+ const limitHeight = bottomLimit || window.innerHeight;
151
+ const neededHeight = containerRect.bottom + elementRect.height;
152
+ if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
153
+ fromBottom = true;
154
+ }
155
+ if (!hardPosition) {
156
+ verticalPosition = verticalPosition || 0;
157
+ horizontalPosition = horizontalPosition || 0;
158
+ if (fromBottom) {
159
+ verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
160
+ }
161
+ else {
162
+ verticalPosition += containerRect.top;
163
+ }
164
+ if (fromRight) {
165
+ horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
166
+ }
167
+ else {
168
+ horizontalPosition += containerRect.left;
169
+ }
170
+ }
171
+ if (verticalPosition != undefined) {
172
+ this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
173
+ this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
174
+ }
175
+ if (horizontalPosition != undefined) {
176
+ this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
177
+ this._listWrapper.style[fromRight ? "left" : "right"] = "";
178
+ }
179
+ }
180
+ getListPosition() {
181
+ if (this.listOptionsPosition) {
182
+ return this.listOptionsPosition;
183
+ }
184
+ return {
185
+ verticalPosition: (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13
186
+ };
118
187
  }
119
188
  isDifferentValues(firstValue, secondValue) {
120
189
  return ObjectUtils.objectToString(firstValue || {}) !== ObjectUtils.objectToString(secondValue || {});
@@ -197,13 +266,18 @@ const EzComboBox = class {
197
266
  showOptions() {
198
267
  if (!this.enabled)
199
268
  return;
269
+ if (this.isOptionsVisible()) {
270
+ return;
271
+ }
200
272
  if (!!this._resizeObserver)
201
273
  this._resizeObserver.observe(this._textInput);
202
- this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true });
274
+ this._floatingID = FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
203
275
  this.setFocus();
204
276
  window.requestAnimationFrame(() => {
205
277
  this.updateListPosition();
206
- this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
278
+ if (!this.listOptionsPosition) {
279
+ this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
280
+ }
207
281
  });
208
282
  }
209
283
  hideOptions() {
@@ -233,7 +307,7 @@ const EzComboBox = class {
233
307
  window.requestAnimationFrame(() => {
234
308
  const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
235
309
  if (liElem)
236
- liElem.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "start" });
310
+ liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
237
311
  });
238
312
  }
239
313
  selectCurrentOption() {
@@ -473,6 +547,12 @@ const EzComboBox = class {
473
547
  handlerIconClick() {
474
548
  this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
475
549
  }
550
+ buildNumberArgument(argument) {
551
+ if (this.isTextSearch) {
552
+ return NaN;
553
+ }
554
+ return Number(argument || undefined);
555
+ }
476
556
  onTextInputChangeHandler(event) {
477
557
  var _a;
478
558
  this.clearDeboucingTimeout();
@@ -483,7 +563,7 @@ const EzComboBox = class {
483
563
  return;
484
564
  }
485
565
  const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
486
- const argumentNumber = Number(argument || undefined);
566
+ const argumentNumber = this.buildNumberArgument(argument);
487
567
  if (!this._criteria) {
488
568
  this._textInput.value = event.data || argument;
489
569
  }
@@ -546,9 +626,11 @@ const EzComboBox = class {
546
626
  switch (event.key) {
547
627
  case "ArrowDown":
548
628
  this.nextOption();
629
+ event.stopPropagation();
549
630
  break;
550
631
  case "ArrowUp":
551
632
  this.previousOption();
633
+ event.stopPropagation();
552
634
  break;
553
635
  case "Enter":
554
636
  this.selectCurrentOption();
@@ -568,7 +650,8 @@ const EzComboBox = class {
568
650
  //event.stopPropagation();
569
651
  }
570
652
  onTextInputFocusOutHandler() {
571
- this.cancelPreselection();
653
+ if (this.hideErrorOnFocusOut)
654
+ this.cancelPreselection();
572
655
  }
573
656
  canShowListOptions() {
574
657
  return !this._showLoading && this._visibleOptions.length > 0;
@@ -1,6 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-296b8458.js';
2
2
  import { DateUtils, ElementIDUtils } from '@sankhyalabs/core';
3
- import { C as CSSVarsUtils } from './CSSVarsUtils-00f67f32.js';
3
+ import { C as CSSVarsUtils } from './CSSVarsUtils-a97cfa29.js';
4
4
 
5
5
  const ezDateInputCss = ":host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"15px\"><path d=\"M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z\"/></svg>')}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}";
6
6
 
@@ -10,7 +10,9 @@ const EzDateInput = class {
10
10
  this.ezChange = createEvent(this, "ezChange", 7);
11
11
  this.ezStartChange = createEvent(this, "ezStartChange", 7);
12
12
  this.ezCancelWaitingChange = createEvent(this, "ezCancelWaitingChange", 7);
13
+ this._changePending = false;
13
14
  this._focused = false;
15
+ this._valuePromiseCallbacks = [];
14
16
  this.label = undefined;
15
17
  this.value = undefined;
16
18
  this.enabled = true;
@@ -48,6 +50,7 @@ const EzDateInput = class {
48
50
  this.ezChange.emit(valueEmitted);
49
51
  }
50
52
  }
53
+ this._changePending = false;
51
54
  }
52
55
  /**
53
56
  * Aplica o foco no campo.
@@ -67,6 +70,18 @@ const EzDateInput = class {
67
70
  async isInvalid() {
68
71
  return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
69
72
  }
73
+ /*
74
+ * Retorna uma promise com o valor da opção selecionada,
75
+ * que será resolvida quando o backend devolver este dado.
76
+ */
77
+ async getValueAsync() {
78
+ if (this._changePending) {
79
+ return new Promise(accept => {
80
+ this._valuePromiseCallbacks.push(accept);
81
+ });
82
+ }
83
+ return Promise.resolve(this.value);
84
+ }
70
85
  changeValue(newValue) {
71
86
  const currentValue = DateUtils.validateDate(this.value);
72
87
  const newValueValidated = DateUtils.validateDate(newValue);
@@ -77,10 +92,14 @@ const EzDateInput = class {
77
92
  showCalendar() {
78
93
  this.handleBlur();
79
94
  this._calendar.value = this.value;
80
- //FIXME: Provavelmente isso fará com que o popup abra em uma
81
- //posição errada no futuro. Preferi fazer simples no começo,
82
- //porque não quis onerar o text input com essa funcionalidade...
83
- const top = this.errorMessage || this.mode === "slim" ? 6 : -13;
95
+ let top;
96
+ if (this.isFixed()) {
97
+ top = 29;
98
+ this._calendar.fitHorizontal(0);
99
+ }
100
+ else {
101
+ top = this.errorMessage || this.mode === "slim" ? 6 : -13;
102
+ }
84
103
  this._calendar.fitVertical(top, this._elem.clientHeight);
85
104
  }
86
105
  hideCalendar() {
@@ -88,27 +107,35 @@ const EzDateInput = class {
88
107
  this._calendar.hide();
89
108
  }
90
109
  handleBlur() {
91
- const strValue = this._textInput.value;
92
- const newValue = DateUtils.strToDate(strValue);
93
- if (newValue || !strValue) {
94
- this.errorMessage = "";
95
- const currentValue = DateUtils.validateDate(this.value);
96
- const newValueValidated = DateUtils.validateDate(newValue);
97
- if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
98
- if (newValueValidated) {
99
- this._textInput.value = this.getTextValue(newValueValidated) || '';
100
- this._focused = false;
110
+ try {
111
+ const strValue = this._textInput.value;
112
+ const newValue = DateUtils.strToDate(strValue);
113
+ if (newValue || !strValue) {
114
+ this.errorMessage = "";
115
+ const currentValue = DateUtils.validateDate(this.value);
116
+ const newValueValidated = DateUtils.validateDate(newValue);
117
+ if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) === (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
118
+ if (newValueValidated) {
119
+ this._textInput.value = this.getTextValue(newValueValidated) || '';
120
+ this._focused = false;
121
+ }
122
+ this.ezCancelWaitingChange.emit();
123
+ }
124
+ else {
125
+ this.changeValue(newValueValidated);
101
126
  }
102
- this.ezCancelWaitingChange.emit();
103
127
  }
104
128
  else {
105
- this.changeValue(newValueValidated);
129
+ this.changeValue(undefined);
130
+ this.ezCancelWaitingChange.emit();
131
+ this.errorMessage = "O valor digitado não é uma data válida";
106
132
  }
107
133
  }
108
- else {
109
- this.changeValue(undefined);
110
- this.ezCancelWaitingChange.emit();
111
- this.errorMessage = "O valor digitado não é uma data válida";
134
+ finally {
135
+ for (const callback of this._valuePromiseCallbacks) {
136
+ callback(this.value);
137
+ }
138
+ this._valuePromiseCallbacks = [];
112
139
  }
113
140
  }
114
141
  getTextValue(d) {
@@ -120,6 +147,7 @@ const EzDateInput = class {
120
147
  const currentValue = DateUtils.validateDate(this.value);
121
148
  const newValueValidated = DateUtils.validateDate(newValue);
122
149
  if ((currentValue === null || currentValue === void 0 ? void 0 : currentValue.getTime()) !== (newValueValidated === null || newValueValidated === void 0 ? void 0 : newValueValidated.getTime())) {
150
+ this._changePending = true;
123
151
  this._focused = true;
124
152
  this.ezStartChange.emit({ waitmessage: "", blocking: false });
125
153
  }
@@ -133,13 +161,16 @@ const EzDateInput = class {
133
161
  this._textInput.value = textValue;
134
162
  }
135
163
  }
164
+ isFixed() {
165
+ return this._elem.dataset.isFixed === "true";
166
+ }
136
167
  componentDidLoad() {
137
168
  CSSVarsUtils.applyVarsTextInput(this._elem, this._textInput);
138
169
  this.setInputValue();
139
170
  }
140
171
  render() {
141
172
  ElementIDUtils.addIDInfoIfNotExists(this._elem, 'input');
142
- 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 })));
173
+ 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 })));
143
174
  }
144
175
  get _elem() { return getElement(this); }
145
176
  static get watchers() { return {