@sankhyalabs/ezui 0.0.0-feat-dev-kb-4158.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (527) hide show
  1. package/README.md +80 -0
  2. package/dist/assets/actions-sprite.svg +257 -0
  3. package/dist/cjs/ApplicationUtils-2e444734.js +162 -0
  4. package/dist/cjs/CSSVarsUtils-b136a156.js +77 -0
  5. package/dist/cjs/CheckMode-ecb90b87.js +7 -0
  6. package/dist/cjs/DialogType-2114c337.js +9 -0
  7. package/dist/cjs/EzScrollDirection-b2c99895.js +8 -0
  8. package/dist/cjs/RecordValidationProcessor-edd23705.js +102 -0
  9. package/dist/cjs/constants-3a1d64fb.js +7 -0
  10. package/dist/cjs/ez-actions-button.cjs.entry.js +212 -0
  11. package/dist/cjs/ez-alert.cjs.entry.js +30 -0
  12. package/dist/cjs/ez-application.cjs.entry.js +26 -0
  13. package/dist/cjs/ez-badge.cjs.entry.js +120 -0
  14. package/dist/cjs/ez-breadcrumb.cjs.entry.js +285 -0
  15. package/dist/cjs/ez-button.cjs.entry.js +87 -0
  16. package/dist/cjs/ez-calendar.cjs.entry.js +238 -0
  17. package/dist/cjs/ez-card-item.cjs.entry.js +52 -0
  18. package/dist/cjs/ez-check.cjs.entry.js +95 -0
  19. package/dist/cjs/ez-chip.cjs.entry.js +116 -0
  20. package/dist/cjs/ez-collapsible-box.cjs.entry.js +133 -0
  21. package/dist/cjs/ez-combo-box.cjs.entry.js +682 -0
  22. package/dist/cjs/ez-date-input.cjs.entry.js +188 -0
  23. package/dist/cjs/ez-date-time-input.cjs.entry.js +242 -0
  24. package/dist/cjs/ez-dialog.cjs.entry.js +180 -0
  25. package/dist/cjs/ez-dropdown.cjs.entry.js +515 -0
  26. package/dist/cjs/ez-file-item.cjs.entry.js +74 -0
  27. package/dist/cjs/ez-filter-input_2.cjs.entry.js +137 -0
  28. package/dist/cjs/ez-form-view.cjs.entry.js +155 -0
  29. package/dist/cjs/ez-form.cjs.entry.js +932 -0
  30. package/dist/cjs/ez-grid.cjs.entry.js +120789 -0
  31. package/dist/cjs/ez-guide-navigator.cjs.entry.js +96 -0
  32. package/dist/cjs/ez-icon.cjs.entry.js +44 -0
  33. package/dist/cjs/ez-list.cjs.entry.js +558 -0
  34. package/dist/cjs/ez-loading-bar.cjs.entry.js +32 -0
  35. package/dist/cjs/ez-modal-container.cjs.entry.js +64 -0
  36. package/dist/cjs/ez-modal.cjs.entry.js +72 -0
  37. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +181 -0
  38. package/dist/cjs/ez-number-input.cjs.entry.js +181 -0
  39. package/dist/cjs/ez-popover.cjs.entry.js +156 -0
  40. package/dist/cjs/ez-popup.cjs.entry.js +66 -0
  41. package/dist/cjs/ez-radio-button.cjs.entry.js +48 -0
  42. package/dist/cjs/ez-scroller_3.cjs.entry.js +792 -0
  43. package/dist/cjs/ez-search.cjs.entry.js +94 -0
  44. package/dist/cjs/ez-skeleton.cjs.entry.js +67 -0
  45. package/dist/cjs/ez-tabselector.cjs.entry.js +228 -0
  46. package/dist/cjs/ez-text-area.cjs.entry.js +179 -0
  47. package/dist/cjs/ez-text-edit.cjs.entry.js +107 -0
  48. package/dist/cjs/ez-text-input.cjs.entry.js +247 -0
  49. package/dist/cjs/ez-time-input.cjs.entry.js +168 -0
  50. package/dist/cjs/ez-toast.cjs.entry.js +101 -0
  51. package/dist/cjs/ez-upload.cjs.entry.js +395 -0
  52. package/dist/cjs/ez-view-stack.cjs.entry.js +86 -0
  53. package/dist/cjs/ezui.cjs.js +23 -0
  54. package/dist/cjs/filter-column.cjs.entry.js +128 -0
  55. package/dist/cjs/index-1064511f.js +2340 -0
  56. package/dist/cjs/index.cjs.js +2 -0
  57. package/dist/cjs/loader.cjs.js +22 -0
  58. package/dist/collection/collection-manifest.json +184 -0
  59. package/dist/collection/components/assets/actions-sprite.svg +257 -0
  60. package/dist/collection/components/ez-actions-button/ez-actions-button.css +139 -0
  61. package/dist/collection/components/ez-actions-button/ez-actions-button.js +440 -0
  62. package/dist/collection/components/ez-alert/ez-alert.css +76 -0
  63. package/dist/collection/components/ez-alert/ez-alert.js +53 -0
  64. package/dist/collection/components/ez-application/ez-application.css +3 -0
  65. package/dist/collection/components/ez-application/ez-application.js +41 -0
  66. package/dist/collection/components/ez-badge/enum/sizes.js +9 -0
  67. package/dist/collection/components/ez-badge/ez-badge.css +165 -0
  68. package/dist/collection/components/ez-badge/ez-badge.js +211 -0
  69. package/dist/collection/components/ez-badge/interfaces/IPosition.js +1 -0
  70. package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.css +66 -0
  71. package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js +373 -0
  72. package/dist/collection/components/ez-breadcrumb/subcomponents/breadcrumb-item.js +20 -0
  73. package/dist/collection/components/ez-button/ez-button.css +255 -0
  74. package/dist/collection/components/ez-button/ez-button.js +241 -0
  75. package/dist/collection/components/ez-calendar/ez-calendar.css +318 -0
  76. package/dist/collection/components/ez-calendar/ez-calendar.js +439 -0
  77. package/dist/collection/components/ez-card-item/ez-card-item.css +126 -0
  78. package/dist/collection/components/ez-card-item/ez-card-item.js +97 -0
  79. package/dist/collection/components/ez-check/CheckMode.js +5 -0
  80. package/dist/collection/components/ez-check/ez-check.css +366 -0
  81. package/dist/collection/components/ez-check/ez-check.js +272 -0
  82. package/dist/collection/components/ez-chip/ez-chip.css +163 -0
  83. package/dist/collection/components/ez-chip/ez-chip.js +312 -0
  84. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +254 -0
  85. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +442 -0
  86. package/dist/collection/components/ez-combo-box/ez-combo-box.css +334 -0
  87. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1081 -0
  88. package/dist/collection/components/ez-date-input/ez-date-input.css +49 -0
  89. package/dist/collection/components/ez-date-input/ez-date-input.js +432 -0
  90. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +44 -0
  91. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +504 -0
  92. package/dist/collection/components/ez-dialog/DialogType.js +7 -0
  93. package/dist/collection/components/ez-dialog/ez-dialog.css +544 -0
  94. package/dist/collection/components/ez-dialog/ez-dialog.js +401 -0
  95. package/dist/collection/components/ez-dropdown/ez-dropdown.css +349 -0
  96. package/dist/collection/components/ez-dropdown/ez-dropdown.js +356 -0
  97. package/dist/collection/components/ez-dropdown/structure/DropdownItem.js +30 -0
  98. package/dist/collection/components/ez-dropdown/structure/SubmenuControl.js +241 -0
  99. package/dist/collection/components/ez-file-item/ez-file-item.css +125 -0
  100. package/dist/collection/components/ez-file-item/ez-file-item.js +200 -0
  101. package/dist/collection/components/ez-filter-input/ez-filter-input.css +4 -0
  102. package/dist/collection/components/ez-filter-input/ez-filter-input.js +407 -0
  103. package/dist/collection/components/ez-form/ez-form.css +10 -0
  104. package/dist/collection/components/ez-form/ez-form.js +217 -0
  105. package/dist/collection/components/ez-form/store/form.slice.js +42 -0
  106. package/dist/collection/components/ez-form-view/ez-form-view.css +6 -0
  107. package/dist/collection/components/ez-form-view/ez-form-view.js +131 -0
  108. package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +27 -0
  109. package/dist/collection/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.js +11 -0
  110. package/dist/collection/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.js +13 -0
  111. package/dist/collection/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.js +10 -0
  112. package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +11 -0
  113. package/dist/collection/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.js +12 -0
  114. package/dist/collection/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.js +4 -0
  115. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.js +4 -0
  116. package/dist/collection/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.js +4 -0
  117. package/dist/collection/components/ez-form-view/interfaces/IFormViewField.js +1 -0
  118. package/dist/collection/components/ez-form-view/interfaces/index.js +1 -0
  119. package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
  120. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +791 -0
  121. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +8 -0
  122. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +101 -0
  123. package/dist/collection/components/ez-grid/controller/ag-grid/GridEditionManager.js +230 -0
  124. package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +88 -0
  125. package/dist/collection/components/ez-grid/controller/ag-grid/components/cellRendererStatus.js +43 -0
  126. package/dist/collection/components/ez-grid/controller/ag-grid/components/selectionHeader.js +40 -0
  127. package/dist/collection/components/ez-grid/controller/ag-grid/editor/EzCellEditor.js +49 -0
  128. package/dist/collection/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.js +10 -0
  129. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.js +4 -0
  130. package/dist/collection/components/ez-grid/controller/ag-grid/editor/IUICellEditor.js +1 -0
  131. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.js +38 -0
  132. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.js +40 -0
  133. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.js +20 -0
  134. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.js +15 -0
  135. package/dist/collection/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.js +41 -0
  136. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
  137. package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
  138. package/dist/collection/components/ez-grid/ez-grid.css +97 -0
  139. package/dist/collection/components/ez-grid/ez-grid.js +861 -0
  140. package/dist/collection/components/ez-grid/interfaces/ISelection.js +1 -0
  141. package/dist/collection/components/ez-grid/interfaces/ISelectionToastConfig.js +1 -0
  142. package/dist/collection/components/ez-grid/interfaces/index.js +2 -0
  143. package/dist/collection/components/ez-grid/subcomponents/filter-column.css +34 -0
  144. package/dist/collection/components/ez-grid/subcomponents/filter-column.js +335 -0
  145. package/dist/collection/components/ez-grid/subcomponents/selection-counter.js +29 -0
  146. package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.css +66 -0
  147. package/dist/collection/components/ez-guide-navigator/ez-guide-navigator.js +385 -0
  148. package/dist/collection/components/ez-guide-navigator/interfaces/IGuideItem.js +1 -0
  149. package/dist/collection/components/ez-guide-navigator/interfaces/index.js +1 -0
  150. package/dist/collection/components/ez-icon/ez-icon.css +223 -0
  151. package/dist/collection/components/ez-icon/ez-icon.js +101 -0
  152. package/dist/collection/components/ez-list/ez-list.css +434 -0
  153. package/dist/collection/components/ez-list/ez-list.js +911 -0
  154. package/dist/collection/components/ez-loading-bar/ez-loading-bar.css +85 -0
  155. package/dist/collection/components/ez-loading-bar/ez-loading-bar.js +74 -0
  156. package/dist/collection/components/ez-modal/ez-modal.css +369 -0
  157. package/dist/collection/components/ez-modal/ez-modal.js +239 -0
  158. package/dist/collection/components/ez-modal-container/ez-modal-container.css +55 -0
  159. package/dist/collection/components/ez-modal-container/ez-modal-container.js +191 -0
  160. package/dist/collection/components/ez-modal-container/index.js +2 -0
  161. package/dist/collection/components/ez-modal-container/modal-action.js +8 -0
  162. package/dist/collection/components/ez-modal-container/modal-button-status.js +7 -0
  163. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.css +36 -0
  164. package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +318 -0
  165. package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.js +1 -0
  166. package/dist/collection/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.js +1 -0
  167. package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.css +18 -0
  168. package/dist/collection/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.js +41 -0
  169. package/dist/collection/components/ez-number-input/ez-number-input.css +8 -0
  170. package/dist/collection/components/ez-number-input/ez-number-input.js +457 -0
  171. package/dist/collection/components/ez-popover/ez-popover.css +42 -0
  172. package/dist/collection/components/ez-popover/ez-popover.js +365 -0
  173. package/dist/collection/components/ez-popup/ez-popup.css +418 -0
  174. package/dist/collection/components/ez-popup/ez-popup.js +180 -0
  175. package/dist/collection/components/ez-radio-button/ez-radio-button.css +217 -0
  176. package/dist/collection/components/ez-radio-button/ez-radio-button.js +163 -0
  177. package/dist/collection/components/ez-scroller/EzScrollDirection.js +6 -0
  178. package/dist/collection/components/ez-scroller/ez-scroller.css +192 -0
  179. package/dist/collection/components/ez-scroller/ez-scroller.js +293 -0
  180. package/dist/collection/components/ez-search/ez-search.css +3 -0
  181. package/dist/collection/components/ez-search/ez-search.js +424 -0
  182. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.css +63 -0
  183. package/dist/collection/components/ez-sidebar-button/ez-sidebar-button.js +47 -0
  184. package/dist/collection/components/ez-skeleton/ez-skeleton.constants.js +1 -0
  185. package/dist/collection/components/ez-skeleton/ez-skeleton.css +94 -0
  186. package/dist/collection/components/ez-skeleton/ez-skeleton.js +211 -0
  187. package/dist/collection/components/ez-tabselector/ez-tabselector.css +149 -0
  188. package/dist/collection/components/ez-tabselector/ez-tabselector.js +321 -0
  189. package/dist/collection/components/ez-text-area/ez-text-area.css +242 -0
  190. package/dist/collection/components/ez-text-area/ez-text-area.js +428 -0
  191. package/dist/collection/components/ez-text-edit/ez-text-edit.css +19 -0
  192. package/dist/collection/components/ez-text-edit/ez-text-edit.js +202 -0
  193. package/dist/collection/components/ez-text-input/ez-text-input.css +301 -0
  194. package/dist/collection/components/ez-text-input/ez-text-input.js +491 -0
  195. package/dist/collection/components/ez-time-input/ez-time-input.css +14 -0
  196. package/dist/collection/components/ez-time-input/ez-time-input.js +412 -0
  197. package/dist/collection/components/ez-toast/ez-toast.css +167 -0
  198. package/dist/collection/components/ez-toast/ez-toast.js +209 -0
  199. package/dist/collection/components/ez-tree/ez-tree.css +159 -0
  200. package/dist/collection/components/ez-tree/ez-tree.js +696 -0
  201. package/dist/collection/components/ez-tree/interfaces/ITree.js +1 -0
  202. package/dist/collection/components/ez-tree/interfaces/ITreeItem.js +1 -0
  203. package/dist/collection/components/ez-tree/subcomponents/DefaultIconResolver.js +8 -0
  204. package/dist/collection/components/ez-tree/subcomponents/DefaultTooltipResolver.js +3 -0
  205. package/dist/collection/components/ez-tree/subcomponents/TreeItem.js +24 -0
  206. package/dist/collection/components/ez-tree/subcomponents/index.js +2 -0
  207. package/dist/collection/components/ez-tree/types/Node.js +110 -0
  208. package/dist/collection/components/ez-tree/types/Tree.js +132 -0
  209. package/dist/collection/components/ez-upload/RemoteFile.js +94 -0
  210. package/dist/collection/components/ez-upload/ez-upload.css +582 -0
  211. package/dist/collection/components/ez-upload/ez-upload.js +587 -0
  212. package/dist/collection/components/ez-view-stack/ez-view-stack.css +9 -0
  213. package/dist/collection/components/ez-view-stack/ez-view-stack.js +126 -0
  214. package/dist/collection/index.js +1 -0
  215. package/dist/collection/servidor.js +101 -0
  216. package/dist/collection/setupTests.js +1 -0
  217. package/dist/collection/utils/ApplicationUtils.js +94 -0
  218. package/dist/collection/utils/AssetsUtils.js +19 -0
  219. package/dist/collection/utils/CSSVarsUtils.js +73 -0
  220. package/dist/collection/utils/constants.js +3 -0
  221. package/dist/collection/utils/form/DataBinder.js +287 -0
  222. package/dist/collection/utils/form/FormMetadata.js +176 -0
  223. package/dist/collection/utils/form/index.js +2 -0
  224. package/dist/collection/utils/form/interfaces/IDefaultConfig.js +1 -0
  225. package/dist/collection/utils/form/interfaces/IFormCardConfig.js +1 -0
  226. package/dist/collection/utils/form/interfaces/IFormConfig.js +1 -0
  227. package/dist/collection/utils/form/interfaces/IFormSheetMetadata.js +1 -0
  228. package/dist/collection/utils/form/interfaces/ISummaryField.js +1 -0
  229. package/dist/collection/utils/form/interfaces/ITabConfig.js +1 -0
  230. package/dist/collection/utils/form/interfaces/index.js +1 -0
  231. package/dist/collection/utils/index.js +6 -0
  232. package/dist/collection/utils/interfaces/AbstractFieldMetadata.js +21 -0
  233. package/dist/collection/utils/interfaces/IFieldConfig.js +1 -0
  234. package/dist/collection/utils/mock/ez-upload-mock.js +30 -0
  235. package/dist/collection/utils/utils.js +6 -0
  236. package/dist/collection/utils/validators/recordvalidator/IInvalidField.js +1 -0
  237. package/dist/collection/utils/validators/recordvalidator/IRecordValidator.js +1 -0
  238. package/dist/collection/utils/validators/recordvalidator/IValidationResult.js +1 -0
  239. package/dist/collection/utils/validators/recordvalidator/IValidationSource.js +1 -0
  240. package/dist/collection/utils/validators/recordvalidator/RecordValidationProcessor.js +74 -0
  241. package/dist/custom-elements/index.d.ts +321 -0
  242. package/dist/custom-elements/index.js +129534 -0
  243. package/dist/esm/ApplicationUtils-d9a34a16.js +160 -0
  244. package/dist/esm/CSSVarsUtils-a97cfa29.js +75 -0
  245. package/dist/esm/CheckMode-bdb2ec19.js +7 -0
  246. package/dist/esm/DialogType-54a62731.js +9 -0
  247. package/dist/esm/EzScrollDirection-2df26c93.js +8 -0
  248. package/dist/esm/RecordValidationProcessor-abc814af.js +99 -0
  249. package/dist/esm/constants-6dab64f7.js +4 -0
  250. package/dist/esm/ez-actions-button.entry.js +208 -0
  251. package/dist/esm/ez-alert.entry.js +26 -0
  252. package/dist/esm/ez-application.entry.js +22 -0
  253. package/dist/esm/ez-badge.entry.js +116 -0
  254. package/dist/esm/ez-breadcrumb.entry.js +281 -0
  255. package/dist/esm/ez-button.entry.js +83 -0
  256. package/dist/esm/ez-calendar.entry.js +234 -0
  257. package/dist/esm/ez-card-item.entry.js +48 -0
  258. package/dist/esm/ez-check.entry.js +91 -0
  259. package/dist/esm/ez-chip.entry.js +112 -0
  260. package/dist/esm/ez-collapsible-box.entry.js +129 -0
  261. package/dist/esm/ez-combo-box.entry.js +678 -0
  262. package/dist/esm/ez-date-input.entry.js +184 -0
  263. package/dist/esm/ez-date-time-input.entry.js +238 -0
  264. package/dist/esm/ez-dialog.entry.js +176 -0
  265. package/dist/esm/ez-dropdown.entry.js +511 -0
  266. package/dist/esm/ez-file-item.entry.js +70 -0
  267. package/dist/esm/ez-filter-input_2.entry.js +132 -0
  268. package/dist/esm/ez-form-view.entry.js +151 -0
  269. package/dist/esm/ez-form.entry.js +928 -0
  270. package/dist/esm/ez-grid.entry.js +120785 -0
  271. package/dist/esm/ez-guide-navigator.entry.js +92 -0
  272. package/dist/esm/ez-icon.entry.js +40 -0
  273. package/dist/esm/ez-list.entry.js +554 -0
  274. package/dist/esm/ez-loading-bar.entry.js +28 -0
  275. package/dist/esm/ez-modal-container.entry.js +60 -0
  276. package/dist/esm/ez-modal.entry.js +68 -0
  277. package/dist/esm/ez-multi-selection-list.entry.js +177 -0
  278. package/dist/esm/ez-number-input.entry.js +177 -0
  279. package/dist/esm/ez-popover.entry.js +152 -0
  280. package/dist/esm/ez-popup.entry.js +62 -0
  281. package/dist/esm/ez-radio-button.entry.js +44 -0
  282. package/dist/esm/ez-scroller_3.entry.js +786 -0
  283. package/dist/esm/ez-search.entry.js +90 -0
  284. package/dist/esm/ez-skeleton.entry.js +63 -0
  285. package/dist/esm/ez-tabselector.entry.js +224 -0
  286. package/dist/esm/ez-text-area.entry.js +175 -0
  287. package/dist/esm/ez-text-edit.entry.js +103 -0
  288. package/dist/esm/ez-text-input.entry.js +243 -0
  289. package/dist/esm/ez-time-input.entry.js +164 -0
  290. package/dist/esm/ez-toast.entry.js +97 -0
  291. package/dist/esm/ez-upload.entry.js +391 -0
  292. package/dist/esm/ez-view-stack.entry.js +82 -0
  293. package/dist/esm/ezui.js +18 -0
  294. package/dist/esm/filter-column.entry.js +124 -0
  295. package/dist/esm/index-296b8458.js +2309 -0
  296. package/dist/esm/index.js +1 -0
  297. package/dist/esm/loader.js +18 -0
  298. package/dist/esm/polyfills/core-js.js +11 -0
  299. package/dist/esm/polyfills/css-shim.js +1 -0
  300. package/dist/esm/polyfills/dom.js +79 -0
  301. package/dist/esm/polyfills/es5-html-element.js +1 -0
  302. package/dist/esm/polyfills/index.js +34 -0
  303. package/dist/esm/polyfills/system.js +6 -0
  304. package/dist/ezui/ezui.esm.js +1 -0
  305. package/dist/ezui/index.esm.js +0 -0
  306. package/dist/ezui/p-028f264f.entry.js +1 -0
  307. package/dist/ezui/p-050247dc.entry.js +1 -0
  308. package/dist/ezui/p-1e7c4986.entry.js +1 -0
  309. package/dist/ezui/p-244dfe8a.entry.js +1 -0
  310. package/dist/ezui/p-27a01a26.js +1 -0
  311. package/dist/ezui/p-2a0e1679.entry.js +1 -0
  312. package/dist/ezui/p-2da09f70.entry.js +1 -0
  313. package/dist/ezui/p-32b4163f.entry.js +1 -0
  314. package/dist/ezui/p-37673563.entry.js +1 -0
  315. package/dist/ezui/p-391de0e4.entry.js +1 -0
  316. package/dist/ezui/p-4535da17.entry.js +1 -0
  317. package/dist/ezui/p-4c8b029b.entry.js +1 -0
  318. package/dist/ezui/p-4e31b69b.entry.js +1 -0
  319. package/dist/ezui/p-5ce6548c.entry.js +1 -0
  320. package/dist/ezui/p-5cef0264.entry.js +1 -0
  321. package/dist/ezui/p-5d6f2550.entry.js +1 -0
  322. package/dist/ezui/p-60ba28ea.entry.js +1 -0
  323. package/dist/ezui/p-68352e41.entry.js +1 -0
  324. package/dist/ezui/p-7525e604.entry.js +1 -0
  325. package/dist/ezui/p-7eb3e1a5.js +1 -0
  326. package/dist/ezui/p-83885b21.entry.js +1 -0
  327. package/dist/ezui/p-86a2036d.js +1 -0
  328. package/dist/ezui/p-87e85160.entry.js +1 -0
  329. package/dist/ezui/p-8bd3903b.entry.js +1 -0
  330. package/dist/ezui/p-90fa4cb3.entry.js +1 -0
  331. package/dist/ezui/p-9285b53e.entry.js +1 -0
  332. package/dist/ezui/p-95426f93.entry.js +1 -0
  333. package/dist/ezui/p-98bb8b16.js +1 -0
  334. package/dist/ezui/p-9b347f04.entry.js +1 -0
  335. package/dist/ezui/p-9f41b414.entry.js +1 -0
  336. package/dist/ezui/p-a01068e1.entry.js +1 -0
  337. package/dist/ezui/p-a510a4c5.entry.js +1 -0
  338. package/dist/ezui/p-a5e09759.entry.js +1 -0
  339. package/dist/ezui/p-ab574d59.js +1 -0
  340. package/dist/ezui/p-b11f035c.entry.js +1 -0
  341. package/dist/ezui/p-b853763b.js +1 -0
  342. package/dist/ezui/p-c49dbf23.entry.js +1 -0
  343. package/dist/ezui/p-ccb4ccd9.entry.js +1 -0
  344. package/dist/ezui/p-cd19a6f8.entry.js +1 -0
  345. package/dist/ezui/p-ce035beb.entry.js +1 -0
  346. package/dist/ezui/p-d43b22f3.entry.js +1 -0
  347. package/dist/ezui/p-d51aa09b.entry.js +1 -0
  348. package/dist/ezui/p-db528b31.entry.js +1 -0
  349. package/dist/ezui/p-e2dfd935.entry.js +1 -0
  350. package/dist/ezui/p-e318d280.js +2 -0
  351. package/dist/ezui/p-e67d0bd5.entry.js +1 -0
  352. package/dist/ezui/p-e7fa0ad6.entry.js +1 -0
  353. package/dist/ezui/p-f15ec3bb.js +1 -0
  354. package/dist/ezui/p-f4208819.entry.js +1 -0
  355. package/dist/ezui/p-fa571a4e.entry.js +1 -0
  356. package/dist/ezui/p-fd54b5b4.entry.js +304 -0
  357. package/dist/ezui/p-ff82b176.entry.js +1 -0
  358. package/dist/index.cjs.js +1 -0
  359. package/dist/index.js +1 -0
  360. package/dist/types/components/ez-actions-button/ez-actions-button.d.ts +82 -0
  361. package/dist/types/components/ez-alert/ez-alert.d.ts +10 -0
  362. package/dist/types/components/ez-application/ez-application.d.ts +10 -0
  363. package/dist/types/components/ez-badge/enum/sizes.d.ts +8 -0
  364. package/dist/types/components/ez-badge/ez-badge.d.ts +35 -0
  365. package/dist/types/components/ez-badge/interfaces/IPosition.d.ts +4 -0
  366. package/dist/types/components/ez-breadcrumb/ez-breadcrumb.d.ts +71 -0
  367. package/dist/types/components/ez-breadcrumb/subcomponents/breadcrumb-item.d.ts +13 -0
  368. package/dist/types/components/ez-button/ez-button.d.ts +41 -0
  369. package/dist/types/components/ez-calendar/ez-calendar.d.ts +74 -0
  370. package/dist/types/components/ez-card-item/ez-card-item.d.ts +32 -0
  371. package/dist/types/components/ez-check/CheckMode.d.ts +4 -0
  372. package/dist/types/components/ez-check/ez-check.d.ts +49 -0
  373. package/dist/types/components/ez-chip/ez-chip.d.ts +60 -0
  374. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +91 -0
  375. package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +173 -0
  376. package/dist/types/components/ez-date-input/ez-date-input.d.ts +72 -0
  377. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +80 -0
  378. package/dist/types/components/ez-dialog/DialogType.d.ts +6 -0
  379. package/dist/types/components/ez-dialog/ez-dialog.d.ts +82 -0
  380. package/dist/types/components/ez-dropdown/ez-dropdown.d.ts +60 -0
  381. package/dist/types/components/ez-dropdown/structure/DropdownItem.d.ts +28 -0
  382. package/dist/types/components/ez-dropdown/structure/SubmenuControl.d.ts +78 -0
  383. package/dist/types/components/ez-file-item/ez-file-item.d.ts +36 -0
  384. package/dist/types/components/ez-filter-input/ez-filter-input.d.ts +77 -0
  385. package/dist/types/components/ez-form/ez-form.d.ts +42 -0
  386. package/dist/types/components/ez-form/store/form.slice.d.ts +27 -0
  387. package/dist/types/components/ez-form-view/ez-form-view.d.ts +17 -0
  388. package/dist/types/components/ez-form-view/fieldbuilder/FieldBuilder.d.ts +2 -0
  389. package/dist/types/components/ez-form-view/fieldbuilder/templates/CheckBox.tpl.d.ts +3 -0
  390. package/dist/types/components/ez-form-view/fieldbuilder/templates/ComboBox.tpl.d.ts +2 -0
  391. package/dist/types/components/ez-form-view/fieldbuilder/templates/DateInput.tpl.d.ts +4 -0
  392. package/dist/types/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.d.ts +2 -0
  393. package/dist/types/components/ez-form-view/fieldbuilder/templates/NumberInput.tpl.d.ts +3 -0
  394. package/dist/types/components/ez-form-view/fieldbuilder/templates/SearchInput.tpl.d.ts +2 -0
  395. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextArea.tpl.d.ts +2 -0
  396. package/dist/types/components/ez-form-view/fieldbuilder/templates/TextInput.tpl.d.ts +2 -0
  397. package/dist/types/components/ez-form-view/interfaces/IFormViewField.d.ts +3 -0
  398. package/dist/types/components/ez-form-view/interfaces/index.d.ts +1 -0
  399. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +287 -0
  400. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +89 -0
  401. package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +1 -0
  402. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +20 -0
  403. package/dist/types/components/ez-grid/controller/ag-grid/GridEditionManager.d.ts +38 -0
  404. package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +32 -0
  405. package/dist/types/components/ez-grid/controller/ag-grid/components/cellRendererStatus.d.ts +11 -0
  406. package/dist/types/components/ez-grid/controller/ag-grid/components/selectionHeader.d.ts +12 -0
  407. package/dist/types/components/ez-grid/controller/ag-grid/editor/EzCellEditor.d.ts +10 -0
  408. package/dist/types/components/ez-grid/controller/ag-grid/editor/GridEditorUtils.d.ts +1 -0
  409. package/dist/types/components/ez-grid/controller/ag-grid/editor/IEditorMetadata.d.ts +9 -0
  410. package/dist/types/components/ez-grid/controller/ag-grid/editor/IUICellEditor.d.ts +10 -0
  411. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/ComboBox.tpl.d.ts +4 -0
  412. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/DateInput.tpl.d.ts +5 -0
  413. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/NumberInput.tpl.d.ts +4 -0
  414. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/Search.tpl.d.ts +3 -0
  415. package/dist/types/components/ez-grid/controller/ag-grid/editor/templates/TextInput.tpl.d.ts +4 -0
  416. package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
  417. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
  418. package/dist/types/components/ez-grid/ez-grid.d.ts +141 -0
  419. package/dist/types/components/ez-grid/interfaces/ISelection.d.ts +3 -0
  420. package/dist/types/components/ez-grid/interfaces/ISelectionToastConfig.d.ts +3 -0
  421. package/dist/types/components/ez-grid/interfaces/index.d.ts +2 -0
  422. package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +49 -0
  423. package/dist/types/components/ez-grid/subcomponents/selection-counter.d.ts +15 -0
  424. package/dist/types/components/ez-guide-navigator/ez-guide-navigator.d.ts +64 -0
  425. package/dist/types/components/ez-guide-navigator/interfaces/IGuideItem.d.ts +4 -0
  426. package/dist/types/components/ez-guide-navigator/interfaces/index.d.ts +1 -0
  427. package/dist/types/components/ez-icon/ez-icon.d.ts +20 -0
  428. package/dist/types/components/ez-list/ez-list.d.ts +133 -0
  429. package/dist/types/components/ez-loading-bar/ez-loading-bar.d.ts +12 -0
  430. package/dist/types/components/ez-modal/ez-modal.d.ts +53 -0
  431. package/dist/types/components/ez-modal-container/ez-modal-container.d.ts +47 -0
  432. package/dist/types/components/ez-modal-container/index.d.ts +2 -0
  433. package/dist/types/components/ez-modal-container/modal-action.d.ts +7 -0
  434. package/dist/types/components/ez-modal-container/modal-button-status.d.ts +6 -0
  435. package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +64 -0
  436. package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource.d.ts +4 -0
  437. package/dist/types/components/ez-multi-selection-list/interfaces/IMultiSelectionOption.d.ts +4 -0
  438. package/dist/types/components/ez-multi-selection-list/subcomponents/multi-selection-box-message.d.ts +4 -0
  439. package/dist/types/components/ez-number-input/ez-number-input.d.ts +81 -0
  440. package/dist/types/components/ez-popover/ez-popover.d.ts +60 -0
  441. package/dist/types/components/ez-popup/ez-popup.d.ts +37 -0
  442. package/dist/types/components/ez-radio-button/ez-radio-button.d.ts +37 -0
  443. package/dist/types/components/ez-scroller/EzScrollDirection.d.ts +5 -0
  444. package/dist/types/components/ez-scroller/ez-scroller.d.ts +38 -0
  445. package/dist/types/components/ez-search/ez-search.d.ts +76 -0
  446. package/dist/types/components/ez-sidebar-button/ez-sidebar-button.d.ts +11 -0
  447. package/dist/types/components/ez-skeleton/ez-skeleton.constants.d.ts +1 -0
  448. package/dist/types/components/ez-skeleton/ez-skeleton.d.ts +54 -0
  449. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +52 -0
  450. package/dist/types/components/ez-text-area/ez-text-area.d.ts +78 -0
  451. package/dist/types/components/ez-text-edit/ez-text-edit.d.ts +41 -0
  452. package/dist/types/components/ez-text-input/ez-text-input.d.ts +82 -0
  453. package/dist/types/components/ez-time-input/ez-time-input.d.ts +74 -0
  454. package/dist/types/components/ez-toast/ez-toast.d.ts +45 -0
  455. package/dist/types/components/ez-tree/ez-tree.d.ts +101 -0
  456. package/dist/types/components/ez-tree/interfaces/ITree.d.ts +5 -0
  457. package/dist/types/components/ez-tree/interfaces/ITreeItem.d.ts +11 -0
  458. package/dist/types/components/ez-tree/subcomponents/DefaultIconResolver.d.ts +2 -0
  459. package/dist/types/components/ez-tree/subcomponents/DefaultTooltipResolver.d.ts +2 -0
  460. package/dist/types/components/ez-tree/subcomponents/TreeItem.d.ts +15 -0
  461. package/dist/types/components/ez-tree/subcomponents/index.d.ts +2 -0
  462. package/dist/types/components/ez-tree/types/Node.d.ts +22 -0
  463. package/dist/types/components/ez-tree/types/Tree.d.ts +21 -0
  464. package/dist/types/components/ez-upload/RemoteFile.d.ts +14 -0
  465. package/dist/types/components/ez-upload/ez-upload.d.ts +101 -0
  466. package/dist/types/components/ez-view-stack/ez-view-stack.d.ts +25 -0
  467. package/dist/types/components.d.ts +3413 -0
  468. package/dist/types/index.d.ts +1 -0
  469. package/dist/types/stencil-public-runtime.d.ts +1637 -0
  470. package/dist/types/utils/ApplicationUtils.d.ts +31 -0
  471. package/dist/types/utils/AssetsUtils.d.ts +1 -0
  472. package/dist/types/utils/CSSVarsUtils.d.ts +6 -0
  473. package/dist/types/utils/constants.d.ts +3 -0
  474. package/dist/types/utils/form/DataBinder.d.ts +30 -0
  475. package/dist/types/utils/form/FormMetadata.d.ts +23 -0
  476. package/dist/types/utils/form/index.d.ts +2 -0
  477. package/dist/types/utils/form/interfaces/IDefaultConfig.d.ts +5 -0
  478. package/dist/types/utils/form/interfaces/IFormCardConfig.d.ts +5 -0
  479. package/dist/types/utils/form/interfaces/IFormConfig.d.ts +13 -0
  480. package/dist/types/utils/form/interfaces/IFormSheetMetadata.d.ts +6 -0
  481. package/dist/types/utils/form/interfaces/ISummaryField.d.ts +4 -0
  482. package/dist/types/utils/form/interfaces/ITabConfig.d.ts +6 -0
  483. package/dist/types/utils/form/interfaces/index.d.ts +10 -0
  484. package/dist/types/utils/index.d.ts +6 -0
  485. package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +17 -0
  486. package/dist/types/utils/interfaces/IFieldConfig.d.ts +13 -0
  487. package/dist/types/utils/utils.d.ts +2 -0
  488. package/dist/types/utils/validators/recordvalidator/IInvalidField.d.ts +4 -0
  489. package/dist/types/utils/validators/recordvalidator/IRecordValidator.d.ts +5 -0
  490. package/dist/types/utils/validators/recordvalidator/IValidationResult.d.ts +8 -0
  491. package/dist/types/utils/validators/recordvalidator/IValidationSource.d.ts +6 -0
  492. package/dist/types/utils/validators/recordvalidator/RecordValidationProcessor.d.ts +13 -0
  493. package/loader/cdn.js +3 -0
  494. package/loader/index.cjs.js +3 -0
  495. package/loader/index.d.ts +21 -0
  496. package/loader/index.es2017.js +3 -0
  497. package/loader/index.js +4 -0
  498. package/loader/package.json +11 -0
  499. package/package.json +95 -0
  500. package/react/.keepfolder +0 -0
  501. package/react/components.d.ts +48 -0
  502. package/react/components.js +52 -0
  503. package/react/components.js.map +1 -0
  504. package/react/react-component-lib/createComponent.d.ts +10 -0
  505. package/react/react-component-lib/createComponent.js +59 -0
  506. package/react/react-component-lib/createComponent.js.map +1 -0
  507. package/react/react-component-lib/createOverlayComponent.d.ts +20 -0
  508. package/react/react-component-lib/createOverlayComponent.js +89 -0
  509. package/react/react-component-lib/createOverlayComponent.js.map +1 -0
  510. package/react/react-component-lib/index.d.ts +2 -0
  511. package/react/react-component-lib/index.js +3 -0
  512. package/react/react-component-lib/index.js.map +1 -0
  513. package/react/react-component-lib/interfaces.d.ts +29 -0
  514. package/react/react-component-lib/interfaces.js +1 -0
  515. package/react/react-component-lib/interfaces.js.map +1 -0
  516. package/react/react-component-lib/utils/attachProps.d.ts +12 -0
  517. package/react/react-component-lib/utils/attachProps.js +96 -0
  518. package/react/react-component-lib/utils/attachProps.js.map +1 -0
  519. package/react/react-component-lib/utils/case.d.ts +2 -0
  520. package/react/react-component-lib/utils/case.js +7 -0
  521. package/react/react-component-lib/utils/case.js.map +1 -0
  522. package/react/react-component-lib/utils/dev.d.ts +2 -0
  523. package/react/react-component-lib/utils/dev.js +13 -0
  524. package/react/react-component-lib/utils/dev.js.map +1 -0
  525. package/react/react-component-lib/utils/index.d.ts +7 -0
  526. package/react/react-component-lib/utils/index.js +21 -0
  527. package/react/react-component-lib/utils/index.js.map +1 -0
@@ -0,0 +1,682 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-1064511f.js');
6
+ const core = require('@sankhyalabs/core');
7
+ const ApplicationUtils = require('./ApplicationUtils-2e444734.js');
8
+ const CSSVarsUtils = require('./CSSVarsUtils-b136a156.js');
9
+ require('./DialogType-2114c337.js');
10
+ require('./CheckMode-ecb90b87.js');
11
+ const constants = require('./constants-3a1d64fb.js');
12
+
13
+ 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)}}";
14
+
15
+ const EzComboBox = class {
16
+ constructor(hostRef) {
17
+ index.registerInstance(this, hostRef);
18
+ this.ezChange = index.createEvent(this, "ezChange", 7);
19
+ this._changeDeboucingTimeout = null;
20
+ this._limitCharsToSearch = 3;
21
+ this._deboucingTime = 300;
22
+ this._maxWidthValue = 0;
23
+ this._tabPressed = false;
24
+ this._textEmptyList = "Nenhum resultado encontrado";
25
+ this._textEmptySearch = "Nenhum resultado de {0} encontrado";
26
+ this._lookupMode = false;
27
+ this._preSelection = undefined;
28
+ this._visibleOptions = undefined;
29
+ this._startLoading = false;
30
+ this._showLoading = true;
31
+ this._criteria = undefined;
32
+ this.value = undefined;
33
+ this.label = undefined;
34
+ this.enabled = true;
35
+ this.options = undefined;
36
+ this.errorMessage = undefined;
37
+ this.searchMode = undefined;
38
+ this.showSelectedValue = false;
39
+ this.showOptionValue = false;
40
+ this.suppressSearch = false;
41
+ this.optionLoader = undefined;
42
+ this.suppressEmptyOption = false;
43
+ this.canShowError = true;
44
+ this.mode = "regular";
45
+ this.listOptionsPosition = undefined;
46
+ }
47
+ observeErrorMessage() {
48
+ var _a;
49
+ if (this._textInput) {
50
+ this._textInput.errorMessage = this.errorMessage;
51
+ if (!((_a = this.errorMessage) === null || _a === void 0 ? void 0 : _a.trim())) {
52
+ this.setInputValue();
53
+ }
54
+ }
55
+ }
56
+ observeValue(newValue, oldValue) {
57
+ if (this._textInput && newValue != oldValue) {
58
+ try {
59
+ if (this.searchMode && typeof newValue === "string") {
60
+ this.setInputValue();
61
+ return;
62
+ }
63
+ const newValueSelected = this.getSelectedOption(newValue);
64
+ const oldValueSelected = this.getSelectedOption(oldValue);
65
+ const currentValue = this.getSelectedOption(this.value);
66
+ if (this.isDifferentValues(currentValue, newValueSelected)) {
67
+ this.value = newValueSelected;
68
+ }
69
+ if (this.isDifferentValues(newValueSelected, oldValueSelected)) {
70
+ this.setInputValue();
71
+ const valueEmitted = newValueSelected === null ? undefined : newValueSelected;
72
+ if (!this._lookupMode) {
73
+ this.ezChange.emit(valueEmitted);
74
+ }
75
+ }
76
+ this.resetOptions();
77
+ }
78
+ finally {
79
+ this._lookupMode = false;
80
+ }
81
+ }
82
+ }
83
+ observeOptions(newOptions, oldOptions) {
84
+ if ((newOptions === null || newOptions === void 0 ? void 0 : newOptions.join('')) === (oldOptions === null || oldOptions === void 0 ? void 0 : oldOptions.join('')))
85
+ return;
86
+ this.loadOptions(SearchMode.PRELOAD);
87
+ }
88
+ /*
89
+ * Retorna uma promise com o valor da opção selecionada,
90
+ * que será resolvida quando o backend devolver este dado.
91
+ */
92
+ async getValueAsync() {
93
+ if (!this._showLoading) {
94
+ return new Promise(resolve => resolve(this.value));
95
+ }
96
+ return new Promise(resolve => {
97
+ let id = setInterval(() => {
98
+ if (!this._showLoading) {
99
+ clearInterval(id);
100
+ resolve(this.value);
101
+ }
102
+ }, 100);
103
+ });
104
+ }
105
+ /**
106
+ * Aplica o foco no campo.
107
+ */
108
+ async setFocus() {
109
+ if (this._textInput) {
110
+ this._textInput.setFocus();
111
+ }
112
+ }
113
+ /**
114
+ * Remove o foco do campo.
115
+ */
116
+ async setBlur() {
117
+ if (this._textInput) {
118
+ this._textInput.setBlur();
119
+ }
120
+ }
121
+ /**
122
+ * Retorna se o conteúdo é inválido.
123
+ */
124
+ async isInvalid() {
125
+ return typeof this.errorMessage === "string" && this.errorMessage.trim() !== "";
126
+ }
127
+ /**
128
+ * Limpa o valor do campo de pesquisa
129
+ */
130
+ async clearValue() {
131
+ this.clearSearch();
132
+ }
133
+ scrollListener() {
134
+ var _a;
135
+ if (this._floatingID == undefined) {
136
+ return;
137
+ }
138
+ if ((_a = this.listOptionsPosition) === null || _a === void 0 ? void 0 : _a.hardPosition) {
139
+ this.hideOptions();
140
+ }
141
+ else {
142
+ window.requestAnimationFrame(() => {
143
+ this.updateListPosition();
144
+ });
145
+ }
146
+ }
147
+ updateListPosition() {
148
+ let { verticalPosition, horizontalPosition, fromBottom, fromRight, bottomLimit, hardPosition } = this.getListPosition();
149
+ const elementRect = this._listWrapper.getBoundingClientRect();
150
+ const containerRect = this._listContainer.getBoundingClientRect();
151
+ const textInputRect = this._textInput.getBoundingClientRect();
152
+ const limitHeight = bottomLimit || window.innerHeight;
153
+ const neededHeight = containerRect.bottom + elementRect.height;
154
+ if (!fromBottom && (elementRect.top < 0 || neededHeight > limitHeight)) {
155
+ fromBottom = true;
156
+ }
157
+ if (!hardPosition) {
158
+ verticalPosition = verticalPosition || 0;
159
+ horizontalPosition = horizontalPosition || 0;
160
+ if (fromBottom) {
161
+ verticalPosition = window.innerHeight - textInputRect.top + verticalPosition;
162
+ }
163
+ else {
164
+ verticalPosition += containerRect.top;
165
+ }
166
+ if (fromRight) {
167
+ horizontalPosition = window.innerWidth - textInputRect.right + horizontalPosition;
168
+ }
169
+ else {
170
+ horizontalPosition += containerRect.left;
171
+ }
172
+ }
173
+ if (verticalPosition != undefined) {
174
+ this._listWrapper.style[fromBottom ? "bottom" : "top"] = `${verticalPosition}px`;
175
+ this._listWrapper.style[fromBottom ? "top" : "bottom"] = "";
176
+ }
177
+ if (horizontalPosition != undefined) {
178
+ this._listWrapper.style[fromRight ? "right" : "left"] = `${horizontalPosition}px`;
179
+ this._listWrapper.style[fromRight ? "left" : "right"] = "";
180
+ }
181
+ }
182
+ getListPosition() {
183
+ if (this.listOptionsPosition) {
184
+ return this.listOptionsPosition;
185
+ }
186
+ return {
187
+ verticalPosition: (this.errorMessage || !this.canShowError || this.mode === "slim") ? 6 : -13
188
+ };
189
+ }
190
+ isDifferentValues(firstValue, secondValue) {
191
+ return core.ObjectUtils.objectToString(firstValue || {}) !== core.ObjectUtils.objectToString(secondValue || {});
192
+ }
193
+ getFormattedText(currentValue) {
194
+ if (currentValue == undefined) {
195
+ return;
196
+ }
197
+ if (!this.showSelectedValue || currentValue.value == undefined) {
198
+ return currentValue.label;
199
+ }
200
+ return currentValue.label ? `${currentValue.value} - ${currentValue.label}` : currentValue.value;
201
+ }
202
+ getText() {
203
+ const currentValue = this.getSelectedOption(this.value);
204
+ const text = this.getFormattedText(currentValue);
205
+ if (text == undefined) {
206
+ return;
207
+ }
208
+ return String(text)
209
+ .replace(/&amp;/g, '&')
210
+ .replace(/&lt;/g, '<')
211
+ .replace(/&gt;/g, '>')
212
+ .replace(/&quot;/g, '"');
213
+ }
214
+ getSelectedOption(value) {
215
+ if (typeof value === "string" || value instanceof String) {
216
+ return this._visibleOptions.find(o => o.value === value);
217
+ }
218
+ return value;
219
+ }
220
+ updateVisibleOptions() {
221
+ let opts = this._source || [];
222
+ if (!this.searchMode && this._criteria) {
223
+ const upperCriteria = this._criteria.toUpperCase();
224
+ opts = opts.filter(opt => opt.label.toLocaleUpperCase().indexOf(upperCriteria) > -1);
225
+ }
226
+ if (this.suppressEmptyOption) {
227
+ this._visibleOptions = opts;
228
+ }
229
+ else {
230
+ this._visibleOptions = [{ value: undefined, label: "" }].concat(opts);
231
+ }
232
+ this._maxWidthValue = this.getMaxWidthValue();
233
+ }
234
+ getMaxWidthValue() {
235
+ var _a;
236
+ if (this.showOptionValue) {
237
+ const arrValues = [];
238
+ (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.forEach(opt => {
239
+ const widthValue = this.getWidthValue(opt.value);
240
+ if (!arrValues.includes(widthValue)) {
241
+ arrValues.push(widthValue);
242
+ }
243
+ });
244
+ return arrValues.length > 1 ? Math.max(...arrValues) : 0;
245
+ }
246
+ return 0;
247
+ }
248
+ getWidthValue(value) {
249
+ if (this._itemValueBasis != undefined) {
250
+ const span = this._itemValueBasis;
251
+ if (value != undefined) {
252
+ span.innerHTML = value;
253
+ return span.clientWidth > 0 ? (span.clientWidth + 2) : 0;
254
+ }
255
+ else {
256
+ span.innerHTML = "";
257
+ }
258
+ }
259
+ return 0;
260
+ }
261
+ buildItem(opt, index$1) {
262
+ const widthValue = this.showOptionValue && this._maxWidthValue > 0 ? `${this._maxWidthValue}px` : '';
263
+ opt.label = opt.label || opt.value;
264
+ return index.h("li", { class: index$1 === this._preSelection ? "item preselected" : "item", id: `item_${opt.value}`, onMouseDown: () => this.selectOption(opt), onMouseOver: () => this._preSelection = index$1 }, this.showOptionValue
265
+ ? index.h("span", { class: "item__value", title: opt.value, style: { width: widthValue, minWidth: widthValue, maxWidth: widthValue } }, opt.value)
266
+ : undefined, index.h("span", { class: "item__label " + (this.showOptionValue ? "item__label--bold" : ""), title: opt.label }, opt.label));
267
+ }
268
+ showOptions() {
269
+ if (!this.enabled)
270
+ return;
271
+ if (this.isOptionsVisible()) {
272
+ return;
273
+ }
274
+ if (!!this._resizeObserver)
275
+ this._resizeObserver.observe(this._textInput);
276
+ this._floatingID = core.FloatingManager.float(this._listWrapper, this._listContainer, { autoClose: true, isFixed: true, backClickListener: () => this.hideOptions() });
277
+ this.setFocus();
278
+ window.requestAnimationFrame(() => {
279
+ this.updateListPosition();
280
+ if (!this.listOptionsPosition) {
281
+ this._listWrapper.scrollIntoView({ behavior: "smooth", block: "nearest", inline: "nearest" });
282
+ }
283
+ });
284
+ }
285
+ hideOptions() {
286
+ if (this._floatingID !== undefined) {
287
+ core.FloatingManager.close(this._floatingID);
288
+ }
289
+ this._floatingID = undefined;
290
+ if (!!this._resizeObserver)
291
+ this._resizeObserver.unobserve(this._textInput);
292
+ }
293
+ isOptionsVisible() {
294
+ return this._floatingID !== undefined && core.FloatingManager.isFloating(this._floatingID);
295
+ }
296
+ nextOption() {
297
+ if (this.searchMode && !this.isOptionsVisible()) {
298
+ return;
299
+ }
300
+ this.showOptions();
301
+ this._preSelection = this._preSelection === undefined ? 0 : Math.min(this._preSelection + 1, this._visibleOptions.length - 1);
302
+ this.scrollToOption(this._visibleOptions[this._preSelection]);
303
+ }
304
+ previousOption() {
305
+ this._preSelection = this._preSelection === undefined ? 0 : Math.max(this._preSelection - 1, 0);
306
+ this.scrollToOption(this._visibleOptions[this._preSelection]);
307
+ }
308
+ scrollToOption(opt) {
309
+ window.requestAnimationFrame(() => {
310
+ const liElem = (opt === null || opt === void 0 ? void 0 : opt.value) ? this._optionsList.querySelector(`li#item_${opt.value.replace(/[<>\[\]#=]/g, '\\$&').replace(/:/g, '\\:')}`) : undefined;
311
+ if (liElem)
312
+ liElem.scrollIntoView({ behavior: "smooth", block: "nearest" });
313
+ });
314
+ }
315
+ selectCurrentOption() {
316
+ if (this._preSelection !== undefined) {
317
+ this.selectOption(this._visibleOptions[this._preSelection]);
318
+ this._preSelection = undefined;
319
+ }
320
+ else {
321
+ this.controlListWithOnlyOne();
322
+ }
323
+ }
324
+ updateSource(source) {
325
+ this._startLoading = false;
326
+ if (source instanceof Promise) {
327
+ this._showLoading = true;
328
+ source.then(result => {
329
+ this._showLoading = false;
330
+ this.updateSource(result);
331
+ }).catch(() => this._showLoading = false);
332
+ this.updateVisibleOptions();
333
+ }
334
+ else {
335
+ this._showLoading = false;
336
+ if (Array.isArray(source)) {
337
+ this._source = source;
338
+ this.updateVisibleOptions();
339
+ if (this._tabPressed) {
340
+ this._tabPressed = false;
341
+ this.controlEmptySearch();
342
+ }
343
+ }
344
+ else {
345
+ this.selectOption(source);
346
+ }
347
+ }
348
+ }
349
+ clearSource() {
350
+ this._source = [];
351
+ this.updateVisibleOptions();
352
+ }
353
+ selectOption(newOption) {
354
+ var _a, _b;
355
+ const currentValue = this.getSelectedOption(this.value);
356
+ if ((((_a = currentValue === null || currentValue === void 0 ? void 0 : currentValue.value) === null || _a === void 0 ? void 0 : _a.toString()) !== ((_b = newOption === null || newOption === void 0 ? void 0 : newOption.value) === null || _b === void 0 ? void 0 : _b.toString()))
357
+ || (currentValue == undefined && newOption != undefined && "value" in newOption)) {
358
+ const adjustedOpt = !(newOption === null || newOption === void 0 ? void 0 : newOption.value) ? undefined : newOption;
359
+ this.value = adjustedOpt;
360
+ }
361
+ else {
362
+ this.resetOptions();
363
+ }
364
+ if (this.searchMode) {
365
+ this._visibleOptions = [];
366
+ this.clearSource();
367
+ }
368
+ this.setFocus();
369
+ }
370
+ loadOptions(mode, argument = "") {
371
+ this._criteria = argument;
372
+ this._startLoading = true;
373
+ if (this.optionLoader) {
374
+ const searchArgument = { mode, argument };
375
+ this.updateSource(this.optionLoader(searchArgument));
376
+ }
377
+ else {
378
+ this.updateSource(this.options);
379
+ }
380
+ }
381
+ cancelPreselection() {
382
+ if (!this._textInput.value && this.value) {
383
+ this.selectOption(undefined);
384
+ }
385
+ else {
386
+ window.setTimeout(() => {
387
+ this.setInputValue();
388
+ }, this._deboucingTime);
389
+ }
390
+ this.resetOptions();
391
+ }
392
+ setInputValue(clearError = true) {
393
+ const textValue = this.getText();
394
+ if ((this._textInput.value || '') !== textValue) {
395
+ this._textInput.value = textValue;
396
+ if (clearError) {
397
+ this.errorMessage = null;
398
+ }
399
+ }
400
+ }
401
+ clearSearch() {
402
+ this.value = null;
403
+ }
404
+ controlListWithOnlyOne() {
405
+ var _a;
406
+ if (this.searchMode) {
407
+ const source = (_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.filter((opt) => opt.label !== "" && opt.value != undefined);
408
+ if ((source === null || source === void 0 ? void 0 : source.length) === 1) {
409
+ this.selectOption(source[0]);
410
+ }
411
+ }
412
+ }
413
+ controlEmptySearch() {
414
+ var _a;
415
+ if (this.searchMode) {
416
+ if (!((_a = this._visibleOptions) === null || _a === void 0 ? void 0 : _a.length)) {
417
+ this.clearSearch();
418
+ ApplicationUtils.ApplicationUtils.info(this._textEmptyList);
419
+ }
420
+ else {
421
+ this.controlListWithOnlyOne();
422
+ }
423
+ }
424
+ }
425
+ validateDescriptionValue() {
426
+ if (!this.searchMode || core.StringUtils.isEmpty(this.value)) {
427
+ return;
428
+ }
429
+ let value = this.value;
430
+ if (typeof value === "object") {
431
+ return;
432
+ }
433
+ if (core.StringUtils.isEmpty(value)) {
434
+ return;
435
+ }
436
+ this.loadDescriptionValue(value);
437
+ }
438
+ async loadDescriptionValue(argument) {
439
+ var _a, _b;
440
+ if (argument == undefined) {
441
+ return;
442
+ }
443
+ if (((_a = this.options) === null || _a === void 0 ? void 0 : _a.length) > 0) {
444
+ this.loadOptionValue(argument);
445
+ return;
446
+ }
447
+ const searchArgument = {
448
+ mode: SearchMode.PREDICTIVE,
449
+ argument
450
+ };
451
+ const source = await ((_b = this.optionLoader) === null || _b === void 0 ? void 0 : _b.call(this, searchArgument));
452
+ if (source == undefined) {
453
+ return;
454
+ }
455
+ if (source instanceof Promise) {
456
+ source.then((result) => {
457
+ this.setDescriptionValue(result);
458
+ });
459
+ }
460
+ else {
461
+ this.setDescriptionValue(source);
462
+ }
463
+ }
464
+ setDescriptionValue(source) {
465
+ const value = (source === null || source === void 0 ? void 0 : source[0]) || source;
466
+ if (value == undefined || !Object.keys(value).length) {
467
+ this.showNoResultMessage();
468
+ return;
469
+ }
470
+ this._lookupMode = true;
471
+ this.value = value;
472
+ }
473
+ loadOptionValue(argument) {
474
+ var _a;
475
+ const source = (_a = this.options) === null || _a === void 0 ? void 0 : _a.find((opt) => opt.value === argument);
476
+ if (source != undefined) {
477
+ this.selectOption(source);
478
+ }
479
+ else {
480
+ this.showNoResultMessage();
481
+ }
482
+ }
483
+ async showNoResultMessage() {
484
+ this.clearSearch();
485
+ ApplicationUtils.ApplicationUtils.info(this._textEmptySearch.replace("{0}", this.getFieldLabel()));
486
+ }
487
+ getFieldLabel() {
488
+ var _a;
489
+ return (_a = this.label) === null || _a === void 0 ? void 0 : _a.replace(constants.REQUIRED_INFO, "").toUpperCase();
490
+ }
491
+ resetOptions() {
492
+ this.hideOptions();
493
+ this._criteria = undefined;
494
+ this._preSelection = undefined;
495
+ this.updateVisibleOptions();
496
+ }
497
+ //---------------------------------------------
498
+ // Lifecycle web component
499
+ //---------------------------------------------
500
+ componentWillLoad() {
501
+ if (this.options === undefined) {
502
+ this.options = [];
503
+ const optionsTags = this.el.querySelectorAll("option");
504
+ if (optionsTags) {
505
+ optionsTags.forEach(e => {
506
+ let label = e.innerText;
507
+ let value = e.getAttribute("value");
508
+ if (!value) {
509
+ value = label;
510
+ }
511
+ this.options.push({ label, value });
512
+ e.hidden = true;
513
+ });
514
+ }
515
+ }
516
+ if (this.searchMode) {
517
+ this.updateSource([]);
518
+ }
519
+ else {
520
+ this.loadOptions(SearchMode.PRELOAD);
521
+ }
522
+ }
523
+ componentDidRender() {
524
+ var _a;
525
+ if (this._floatingID === undefined) {
526
+ this._listWrapper.remove();
527
+ }
528
+ (_a = this._optionsList) === null || _a === void 0 ? void 0 : _a.querySelectorAll(".item").forEach((elem) => {
529
+ core.ElementIDUtils.addIDInfoIfNotExists(elem, "itemComboBox");
530
+ });
531
+ this.validateDescriptionValue();
532
+ }
533
+ componentDidLoad() {
534
+ CSSVarsUtils.CSSVarsUtils.applyVarsTextInput(this.el, this._textInput);
535
+ this.setInputValue(false);
536
+ this._resizeObserver = new ResizeObserver((entries) => {
537
+ window.requestAnimationFrame(() => {
538
+ if (!Array.isArray(entries) || !entries.length)
539
+ return;
540
+ const { clientWidth } = this._listContainer;
541
+ if (clientWidth > 0 && !!this._listWrapper) {
542
+ this._listWrapper.style.width = `${clientWidth}px`;
543
+ }
544
+ });
545
+ });
546
+ }
547
+ //---------------------------------------------
548
+ // Event handlers
549
+ //---------------------------------------------
550
+ handlerIconClick() {
551
+ this.searchMode ? this.loadOptions(SearchMode.ADVANCED) : this.showOptions();
552
+ }
553
+ onTextInputChangeHandler(event) {
554
+ var _a;
555
+ this.clearDeboucingTimeout();
556
+ if (this._startLoading) {
557
+ this._changeDeboucingTimeout = window.setTimeout(() => {
558
+ this.onTextInputChangeHandler(event);
559
+ }, this._deboucingTime);
560
+ return;
561
+ }
562
+ const argument = (_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim();
563
+ const argumentNumber = Number(argument || undefined);
564
+ if (!this._criteria) {
565
+ this._textInput.value = event.data || argument;
566
+ }
567
+ this._criteria = argument;
568
+ if (argument) {
569
+ if (this.searchMode) {
570
+ this._showLoading = false;
571
+ this.clearSource();
572
+ if (!isNaN(argumentNumber) || argument.length >= this._limitCharsToSearch) {
573
+ this._showLoading = true;
574
+ this._changeDeboucingTimeout = window.setTimeout(() => {
575
+ this.loadOptions(SearchMode.PREDICTIVE, isNaN(argumentNumber) ? argument : argumentNumber.toString());
576
+ }, this._deboucingTime);
577
+ this.showOptions();
578
+ }
579
+ else {
580
+ this.hideOptions();
581
+ }
582
+ }
583
+ else {
584
+ this.updateVisibleOptions();
585
+ this.showOptions();
586
+ }
587
+ }
588
+ else {
589
+ this.hideOptions();
590
+ if (this.searchMode) {
591
+ this._showLoading = false;
592
+ this.clearSource();
593
+ }
594
+ else {
595
+ this.updateVisibleOptions();
596
+ }
597
+ }
598
+ }
599
+ clearDeboucingTimeout() {
600
+ if (this._changeDeboucingTimeout) {
601
+ window.clearTimeout(this._changeDeboucingTimeout);
602
+ this._changeDeboucingTimeout = null;
603
+ }
604
+ }
605
+ onTextInputClickHandler() {
606
+ if (!this.searchMode) {
607
+ this.showOptions();
608
+ }
609
+ }
610
+ keyDownHandler(event) {
611
+ this._tabPressed = false;
612
+ if (event.ctrlKey) {
613
+ if (event.key === "f" || event.key === "F") {
614
+ this.loadOptions(SearchMode.ADVANCED);
615
+ //ATENÇÃO: Ctrl + F tem ação específica nos browsers
616
+ //nesse caso, como vamos abrir o popup de busca avançada,
617
+ //não é interessante deixar o evento propagar;
618
+ event.stopPropagation();
619
+ event.stopImmediatePropagation();
620
+ event.preventDefault();
621
+ }
622
+ }
623
+ switch (event.key) {
624
+ case "ArrowDown":
625
+ this.nextOption();
626
+ event.stopPropagation();
627
+ break;
628
+ case "ArrowUp":
629
+ this.previousOption();
630
+ event.stopPropagation();
631
+ break;
632
+ case "Enter":
633
+ this.selectCurrentOption();
634
+ break;
635
+ case "Escape":
636
+ this.cancelPreselection();
637
+ break;
638
+ case "Tab":
639
+ this._tabPressed = true;
640
+ this.controlListWithOnlyOne();
641
+ break;
642
+ }
643
+ //ATENÇÃO: Existe a necessidade de propagar o evento de teclado.
644
+ //Por exemplo, quando o usuário dá um Enter, além de selecionar
645
+ //um valor, também significa que a ateração finalizou,
646
+ //e o contexto pode reagir (fechar um popup por exemplo).
647
+ //event.stopPropagation();
648
+ }
649
+ onTextInputFocusOutHandler() {
650
+ this.cancelPreselection();
651
+ }
652
+ canShowListOptions() {
653
+ return !this._showLoading && this._visibleOptions.length > 0;
654
+ }
655
+ render() {
656
+ var _a;
657
+ core.ElementIDUtils.addIDInfoIfNotExists(this.el, 'input');
658
+ return (index.h(index.Host, null, index.h("ez-text-input", { "data-element-id": core.ElementIDUtils.getInternalIDInfo("textInput"), class: this.suppressSearch ? "suppressed-search-input" : "", ref: elem => this._textInput = elem, "data-slave-mode": "true", enabled: this.enabled && !this.suppressSearch, onInput: event => this.onTextInputChangeHandler(event), onClick: () => this.onTextInputClickHandler(), onFocusout: () => this.onTextInputFocusOutHandler(), onKeyDown: event => this.keyDownHandler(event), label: this.label, canShowError: this.canShowError, errorMessage: this.errorMessage, mode: this.mode }, index.h("button", { class: "btn", slot: this.searchMode ? "leftIcon" : "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.handlerIconClick() }, index.h("ez-icon", { iconName: this.searchMode ? "search" : "chevron-down" })), this.searchMode && ((_a = this._textInput) === null || _a === void 0 ? void 0 : _a.value) && (this._criteria || this.value)
659
+ ? index.h("button", { class: "btn btn__close", slot: "rightIcon", disabled: !this.enabled, tabindex: -1, onClick: () => this.clearSearch() }, index.h("ez-icon", { iconName: "close" }))
660
+ : undefined), index.h("section", { class: "list-container", ref: elem => this._listContainer = elem }, index.h("div", { class: "list-wrapper", ref: elem => this._listWrapper = elem }, index.h("ul", { class: "list-options", ref: elem => this._optionsList = elem }, !this._showLoading
661
+ && this._visibleOptions.length === 0
662
+ && index.h("div", { class: "message" }, index.h("span", { class: "message__no-result" }, this._textEmptyList)), this._showLoading
663
+ && index.h("div", { class: "message" }, index.h("div", { class: "message__loading" })), this.showOptionValue
664
+ ? index.h("span", { class: "item__value item__value--hidden", ref: elem => this._itemValueBasis = elem })
665
+ : undefined, this.canShowListOptions() && this._visibleOptions.map((opt, index) => this.buildItem(opt, index)))))));
666
+ }
667
+ get el() { return index.getElement(this); }
668
+ static get watchers() { return {
669
+ "errorMessage": ["observeErrorMessage"],
670
+ "value": ["observeValue"],
671
+ "options": ["observeOptions"]
672
+ }; }
673
+ };
674
+ var SearchMode;
675
+ (function (SearchMode) {
676
+ SearchMode["ADVANCED"] = "ADVANCED";
677
+ SearchMode["PRELOAD"] = "PRELOAD";
678
+ SearchMode["PREDICTIVE"] = "PREDICTIVE";
679
+ })(SearchMode || (SearchMode = {}));
680
+ EzComboBox.style = ezComboBoxCss;
681
+
682
+ exports.ez_combo_box = EzComboBox;