@sankhyalabs/ezui 7.2.0-dev.1 → 7.2.0-dev.3

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 (240) hide show
  1. package/dist/cjs/{ApplicationUtils-006ca96f.js → ApplicationUtils-dc653b57.js} +1 -1
  2. package/dist/cjs/{app-globals-5cb12916.js → app-globals-16ec1ff7.js} +1 -1
  3. package/dist/cjs/classic-search-list_7.cjs.entry.js +2 -2
  4. package/dist/cjs/ez-actions-button.cjs.entry.js +2 -2
  5. package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-avatar.cjs.entry.js +1 -1
  7. package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
  8. package/dist/cjs/ez-classic-combo-box.cjs.entry.js +2 -1
  9. package/dist/cjs/ez-classic-date-input.cjs.entry.js +2 -2
  10. package/dist/cjs/ez-classic-date-time-input.cjs.entry.js +1 -1
  11. package/dist/cjs/ez-classic-number-input.cjs.entry.js +1 -1
  12. package/dist/cjs/ez-classic-search-plus.cjs.entry.js +4 -4
  13. package/dist/cjs/ez-classic-search.cjs.entry.js +2 -2
  14. package/dist/cjs/ez-classic-time-input.cjs.entry.js +4 -3
  15. package/dist/cjs/ez-collapsible-box.cjs.entry.js +2 -2
  16. package/dist/cjs/ez-combo-box.cjs.entry.js +2 -2
  17. package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
  18. package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
  19. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  20. package/dist/cjs/ez-double-list.cjs.entry.js +1 -1
  21. package/dist/cjs/ez-dropdown.cjs.entry.js +1 -1
  22. package/dist/cjs/ez-empty-card.cjs.entry.js +1 -1
  23. package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
  24. package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
  25. package/dist/cjs/ez-form.cjs.entry.js +3 -3
  26. package/dist/cjs/ez-grid-pagination.cjs.entry.js +227 -0
  27. package/dist/cjs/ez-grid.cjs.entry.js +62 -154
  28. package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
  29. package/dist/cjs/ez-icon.cjs.entry.js +1 -1
  30. package/dist/cjs/ez-link-builder_6.cjs.entry.js +1 -1
  31. package/dist/cjs/ez-list.cjs.entry.js +1 -1
  32. package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
  33. package/dist/cjs/ez-modal.cjs.entry.js +1 -1
  34. package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
  35. package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
  36. package/dist/cjs/ez-pagination.cjs.entry.js +1 -1
  37. package/dist/cjs/ez-popover-core.cjs.entry.js +1 -1
  38. package/dist/cjs/ez-popup.cjs.entry.js +1 -2
  39. package/dist/cjs/ez-record-navigation.cjs.entry.js +121 -0
  40. package/dist/cjs/ez-scroller_2.cjs.entry.js +81 -14
  41. package/dist/cjs/ez-search-plus.cjs.entry.js +4 -4
  42. package/dist/cjs/ez-search-result-list.cjs.entry.js +1 -1
  43. package/dist/cjs/ez-search.cjs.entry.js +3 -3
  44. package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
  45. package/dist/cjs/ez-skeleton.cjs.entry.js +1 -1
  46. package/dist/cjs/ez-sortable-list.cjs.entry.js +98 -113
  47. package/dist/cjs/ez-spinner.cjs.entry.js +1 -1
  48. package/dist/cjs/ez-split-button.cjs.entry.js +4 -4
  49. package/dist/cjs/ez-split-item.cjs.entry.js +2 -2
  50. package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
  51. package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
  52. package/dist/cjs/ez-tree.cjs.entry.js +1 -1
  53. package/dist/cjs/ez-upload.cjs.entry.js +2 -2
  54. package/dist/cjs/ezui.cjs.js +3 -3
  55. package/dist/cjs/filter-column.cjs.entry.js +1 -1
  56. package/dist/cjs/{floating-ui.dom.esm-f4d87617.js → floating-ui.dom.esm-bea31048.js} +165 -119
  57. package/dist/cjs/index-a7b0c73d.js +8 -0
  58. package/dist/cjs/{index-350d0fa0.js → index-a8537087.js} +85 -30
  59. package/dist/cjs/loader.cjs.js +3 -3
  60. package/dist/cjs/{search-column-fbf680d7.js → search-column-cd0e44be.js} +4 -7
  61. package/dist/collection/collection-manifest.json +7 -0
  62. package/dist/collection/components/ez-classic-combo-box/ez-classic-combo-box.js +2 -1
  63. package/dist/collection/components/ez-classic-date-input/ez-classic-date-input.js +1 -1
  64. package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.css +22 -0
  65. package/dist/collection/components/ez-classic-search-plus/ez-classic-search-plus.js +1 -1
  66. package/dist/collection/components/ez-classic-time-input/ez-classic-time-input.js +3 -2
  67. package/dist/collection/components/ez-dropdown/ez-dropdown.css +1 -1
  68. package/dist/collection/components/ez-empty-card/ez-empty-card.js +7 -7
  69. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +20 -6
  70. package/dist/collection/components/ez-grid/controller/ag-grid/gridColumnDefaultWidths.js +23 -0
  71. package/dist/collection/components/ez-grid/ez-grid.css +1 -60
  72. package/dist/collection/components/ez-grid/ez-grid.js +52 -150
  73. package/dist/collection/components/ez-grid/utils/index.js +1 -0
  74. package/dist/collection/components/ez-grid-pagination/ez-grid-pagination.css +111 -0
  75. package/dist/collection/components/ez-grid-pagination/ez-grid-pagination.js +410 -0
  76. package/dist/collection/components/ez-icon/ez-icon.css +5 -5
  77. package/dist/collection/components/ez-popup/ez-popup.js +0 -1
  78. package/dist/collection/components/ez-record-navigation/ez-record-navigation.css +51 -0
  79. package/dist/collection/components/ez-record-navigation/ez-record-navigation.js +246 -0
  80. package/dist/collection/components/ez-scroller/EzScrollNavigationMode.js +5 -0
  81. package/dist/collection/components/ez-scroller/ez-scroller.css +117 -11
  82. package/dist/collection/components/ez-scroller/ez-scroller.js +118 -13
  83. package/dist/collection/components/ez-search/ez-search.css +4 -0
  84. package/dist/collection/components/ez-search-plus/ez-search-plus.js +2 -2
  85. package/dist/collection/components/ez-split-button/ez-split-button.css +1 -1
  86. package/dist/collection/components/ez-split-button/ez-split-button.js +2 -2
  87. package/dist/collection/utils/i18n/locales/en-us.js +25 -4
  88. package/dist/collection/utils/i18n/locales/es-es.js +25 -4
  89. package/dist/collection/utils/i18n/locales/pt-br.js +25 -4
  90. package/dist/collection/utils/searchColumn/search-column.js +2 -5
  91. package/dist/custom-elements/index.d.ts +12 -0
  92. package/dist/custom-elements/index.js +835 -439
  93. package/dist/esm/{ApplicationUtils-0c5cb207.js → ApplicationUtils-e99e53c8.js} +1 -1
  94. package/dist/esm/{app-globals-1db10325.js → app-globals-6e27b3bb.js} +1 -1
  95. package/dist/esm/classic-search-list_7.entry.js +2 -2
  96. package/dist/esm/ez-actions-button.entry.js +2 -2
  97. package/dist/esm/ez-alert-list.entry.js +1 -1
  98. package/dist/esm/ez-avatar.entry.js +1 -1
  99. package/dist/esm/ez-calendar.entry.js +1 -1
  100. package/dist/esm/ez-classic-combo-box.entry.js +2 -1
  101. package/dist/esm/ez-classic-date-input.entry.js +2 -2
  102. package/dist/esm/ez-classic-date-time-input.entry.js +1 -1
  103. package/dist/esm/ez-classic-number-input.entry.js +1 -1
  104. package/dist/esm/ez-classic-search-plus.entry.js +4 -4
  105. package/dist/esm/ez-classic-search.entry.js +2 -2
  106. package/dist/esm/ez-classic-time-input.entry.js +4 -3
  107. package/dist/esm/ez-collapsible-box.entry.js +2 -2
  108. package/dist/esm/ez-combo-box.entry.js +2 -2
  109. package/dist/esm/ez-date-input.entry.js +1 -1
  110. package/dist/esm/ez-date-time-input.entry.js +1 -1
  111. package/dist/esm/ez-dialog.entry.js +1 -1
  112. package/dist/esm/ez-double-list.entry.js +1 -1
  113. package/dist/esm/ez-dropdown.entry.js +1 -1
  114. package/dist/esm/ez-empty-card.entry.js +1 -1
  115. package/dist/esm/ez-file-item.entry.js +1 -1
  116. package/dist/esm/ez-form-view.entry.js +1 -1
  117. package/dist/esm/ez-form.entry.js +3 -3
  118. package/dist/esm/ez-grid-pagination.entry.js +223 -0
  119. package/dist/esm/ez-grid.entry.js +63 -155
  120. package/dist/esm/ez-guide-navigator.entry.js +1 -1
  121. package/dist/esm/ez-icon.entry.js +1 -1
  122. package/dist/esm/ez-link-builder_6.entry.js +1 -1
  123. package/dist/esm/ez-list.entry.js +1 -1
  124. package/dist/esm/ez-modal-container.entry.js +1 -1
  125. package/dist/esm/ez-modal.entry.js +1 -1
  126. package/dist/esm/ez-multi-selection-list.entry.js +1 -1
  127. package/dist/esm/ez-number-input.entry.js +1 -1
  128. package/dist/esm/ez-pagination.entry.js +1 -1
  129. package/dist/esm/ez-popover-core.entry.js +1 -1
  130. package/dist/esm/ez-popup.entry.js +1 -2
  131. package/dist/esm/ez-record-navigation.entry.js +117 -0
  132. package/dist/esm/ez-scroller_2.entry.js +81 -14
  133. package/dist/esm/ez-search-plus.entry.js +4 -4
  134. package/dist/esm/ez-search-result-list.entry.js +1 -1
  135. package/dist/esm/ez-search.entry.js +3 -3
  136. package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
  137. package/dist/esm/ez-skeleton.entry.js +1 -1
  138. package/dist/esm/ez-sortable-list.entry.js +98 -113
  139. package/dist/esm/ez-spinner.entry.js +1 -1
  140. package/dist/esm/ez-split-button.entry.js +4 -4
  141. package/dist/esm/ez-split-item.entry.js +2 -2
  142. package/dist/esm/ez-time-input.entry.js +1 -1
  143. package/dist/esm/ez-tooltip.entry.js +1 -1
  144. package/dist/esm/ez-tree.entry.js +1 -1
  145. package/dist/esm/ez-upload.entry.js +2 -2
  146. package/dist/esm/ezui.js +3 -3
  147. package/dist/esm/filter-column.entry.js +1 -1
  148. package/dist/esm/{floating-ui.dom.esm-ad30f2f0.js → floating-ui.dom.esm-2964eae1.js} +165 -119
  149. package/dist/esm/{index-225aa0c3.js → index-a031816b.js} +85 -30
  150. package/dist/esm/index-baa5e267.js +8 -0
  151. package/dist/esm/loader.js +3 -3
  152. package/dist/esm/{search-column-40a78cac.js → search-column-33d72c20.js} +4 -7
  153. package/dist/ezui/ezui.esm.js +1 -1
  154. package/dist/ezui/p-05e4541a.entry.js +7 -0
  155. package/dist/ezui/{p-56565777.entry.js → p-0bc16f75.entry.js} +1 -1
  156. package/dist/ezui/p-0d80e3ec.entry.js +1 -0
  157. package/dist/ezui/{p-556bf329.entry.js → p-0fc981e9.entry.js} +1 -1
  158. package/dist/ezui/{p-26cd4c2e.entry.js → p-1244fac0.entry.js} +1 -1
  159. package/dist/ezui/{p-0625743b.entry.js → p-160a268d.entry.js} +1 -1
  160. package/dist/ezui/p-178cb9df.entry.js +1 -0
  161. package/dist/ezui/{p-6ac056d7.entry.js → p-1ab5ba19.entry.js} +1 -1
  162. package/dist/ezui/p-2241dea1.js +1 -0
  163. package/dist/ezui/{p-9825c1d2.js → p-24582dd6.js} +1 -1
  164. package/dist/ezui/{p-62c149cb.entry.js → p-2887cbf9.entry.js} +1 -1
  165. package/dist/ezui/p-2b65728f.entry.js +1 -0
  166. package/dist/ezui/{p-b705b342.entry.js → p-318d4dc9.entry.js} +1 -1
  167. package/dist/ezui/{p-8e5f1c74.entry.js → p-32b8f057.entry.js} +1 -1
  168. package/dist/ezui/{p-f5552540.entry.js → p-3311e7ef.entry.js} +1 -1
  169. package/dist/ezui/{p-b0a716ef.entry.js → p-39d2bce5.entry.js} +1 -1
  170. package/dist/ezui/{p-e3cd5080.entry.js → p-3d772561.entry.js} +1 -1
  171. package/dist/ezui/{p-c56ee8c0.entry.js → p-473a397f.entry.js} +1 -1
  172. package/dist/ezui/{p-729bd1be.entry.js → p-4991931a.entry.js} +1 -1
  173. package/dist/ezui/{p-d5dc6b01.entry.js → p-4ca4e8d1.entry.js} +1 -1
  174. package/dist/ezui/{p-4f7ad3ee.entry.js → p-4f76dc28.entry.js} +1 -1
  175. package/dist/ezui/{p-2da9faf1.entry.js → p-510eccc7.entry.js} +1 -1
  176. package/dist/ezui/p-54975948.entry.js +1 -0
  177. package/dist/ezui/p-69344c23.js +1 -0
  178. package/dist/ezui/p-6bb36afc.entry.js +1 -0
  179. package/dist/ezui/{p-5abb220b.entry.js → p-700af412.entry.js} +1 -1
  180. package/dist/ezui/{p-a4351519.entry.js → p-7f475884.entry.js} +1 -1
  181. package/dist/ezui/{p-4c76b365.entry.js → p-84be1391.entry.js} +1 -1
  182. package/dist/ezui/{p-987185c4.entry.js → p-879cee4d.entry.js} +1 -1
  183. package/dist/ezui/{p-34d459e4.entry.js → p-8980b477.entry.js} +1 -1
  184. package/dist/ezui/p-8a5efec5.entry.js +1 -0
  185. package/dist/ezui/p-91ff4511.entry.js +1 -0
  186. package/dist/ezui/{p-7134726a.entry.js → p-93097edc.entry.js} +1 -1
  187. package/dist/ezui/{p-e2972977.entry.js → p-96e5eaa2.entry.js} +1 -1
  188. package/dist/ezui/{p-0248846f.entry.js → p-a383fbc5.entry.js} +1 -1
  189. package/dist/ezui/{p-351fb12f.entry.js → p-a4735a12.entry.js} +1 -1
  190. package/dist/ezui/{p-a3bad8f8.entry.js → p-a4911d89.entry.js} +1 -1
  191. package/dist/ezui/{p-7edc3ef7.entry.js → p-a8f807ed.entry.js} +1 -1
  192. package/dist/ezui/{p-e3a42f47.entry.js → p-ab41edab.entry.js} +1 -1
  193. package/dist/ezui/{p-7953ecb9.entry.js → p-ab4da973.entry.js} +1 -1
  194. package/dist/ezui/{p-e493ad57.entry.js → p-adee66db.entry.js} +1 -1
  195. package/dist/ezui/{p-544605c4.entry.js → p-b5f45319.entry.js} +1 -1
  196. package/dist/ezui/p-c2d44132.entry.js +1 -0
  197. package/dist/ezui/{p-df802548.entry.js → p-c33d46e0.entry.js} +1 -1
  198. package/dist/ezui/{p-b36475f9.entry.js → p-c8584e28.entry.js} +1 -1
  199. package/dist/ezui/{p-a872c642.entry.js → p-caf3cd8f.entry.js} +1 -1
  200. package/dist/ezui/{p-4d30b703.entry.js → p-cf66ace0.entry.js} +1 -1
  201. package/dist/ezui/p-d2601b25.js +1 -0
  202. package/dist/ezui/{p-4c2a4435.entry.js → p-d98dd01a.entry.js} +1 -1
  203. package/dist/ezui/p-dd5326e6.entry.js +1 -0
  204. package/dist/ezui/{p-4af745e1.entry.js → p-ddc6432d.entry.js} +1 -1
  205. package/dist/ezui/{p-5a74d132.entry.js → p-ea0f78d1.entry.js} +46 -46
  206. package/dist/ezui/{p-97312709.entry.js → p-ed6b6e0f.entry.js} +1 -1
  207. package/dist/ezui/{p-4e869617.entry.js → p-f1390be9.entry.js} +1 -1
  208. package/dist/ezui/{p-6a794336.js → p-f71a4d97.js} +1 -1
  209. package/dist/ezui/{p-ef8bd3e8.entry.js → p-fc72aeb8.entry.js} +1 -1
  210. package/dist/ezui/p-fcdd861e.entry.js +1 -0
  211. package/dist/types/components/ez-empty-card/ez-empty-card.d.ts +2 -2
  212. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +2 -0
  213. package/dist/types/components/ez-grid/controller/ag-grid/gridColumnDefaultWidths.d.ts +4 -0
  214. package/dist/types/components/ez-grid/ez-grid.d.ts +10 -27
  215. package/dist/types/components/ez-grid/utils/index.d.ts +1 -0
  216. package/dist/types/components/ez-grid-pagination/ez-grid-pagination.d.ts +75 -0
  217. package/dist/types/components/ez-record-navigation/ez-record-navigation.d.ts +43 -0
  218. package/dist/types/components/ez-scroller/EzScrollNavigationMode.d.ts +4 -0
  219. package/dist/types/components/ez-scroller/ez-scroller.d.ts +16 -2
  220. package/dist/types/components.d.ts +154 -6
  221. package/dist/types/utils/i18n/locales/en-us.d.ts +24 -3
  222. package/dist/types/utils/i18n/locales/es-es.d.ts +24 -3
  223. package/dist/types/utils/i18n/locales/pt-br.d.ts +24 -3
  224. package/dist/types/utils/i18n/translations.d.ts +72 -9
  225. package/package.json +2 -2
  226. package/react/components.d.ts +2 -0
  227. package/react/components.js +2 -0
  228. package/react/components.js.map +1 -1
  229. package/dist/ezui/p-07fb22c3.entry.js +0 -1
  230. package/dist/ezui/p-288631d1.entry.js +0 -1
  231. package/dist/ezui/p-2a806303.js +0 -1
  232. package/dist/ezui/p-2de94faf.entry.js +0 -1
  233. package/dist/ezui/p-619225ce.entry.js +0 -1
  234. package/dist/ezui/p-a813a748.entry.js +0 -1
  235. package/dist/ezui/p-b8078832.entry.js +0 -1
  236. package/dist/ezui/p-c0ae79fa.entry.js +0 -1
  237. package/dist/ezui/p-c178730b.js +0 -1
  238. package/dist/ezui/p-ce0a0036.entry.js +0 -7
  239. package/dist/ezui/p-d2645bdf.entry.js +0 -1
  240. package/dist/ezui/p-ff4312d5.js +0 -1
@@ -0,0 +1,223 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
2
+ import { i as initI18n } from './index-a031816b.js';
3
+ import { Action, ElementIDUtils } from '@sankhyalabs/core';
4
+
5
+ const ezGridPaginationCss = ":host{display:block}.pagination__container{display:flex;align-items:center;flex-grow:1;flex-shrink:1;flex-wrap:nowrap;justify-content:flex-end}.pagination__buttons-container{display:flex;border-radius:50%;background-color:var(--color--ocean-green-90, #E1E2E5);cursor:pointer}.pagination__buttons-container ez-icon{--ez-icon--color:var(--color--ocean-green-600, #008561)}.pagination__buttons-container.disabled{background-color:#DEDEDE;cursor:not-allowed;pointer-events:auto}.pagination__buttons-container.disabled ez-icon{--ez-icon--color:var(--color--petroleum-300, #848D9C);pointer-events:none}.pagination__page-navigator{display:flex;align-items:center}.pagination__row-summary-panel{font-size:var(--font-size--default, 14px);font-family:var(--font--pattern, 'Roboto');color:var(--color--petroleum-300, #848D9C);font-weight:var(--font-weight--regular, 400);padding:var(--space--8, 8px) var(--space--16, 16px)}.pagination__page-summary-panel{display:flex;align-items:center;padding:var(--space--8, 8px) var(--space--16, 16px);gap:var(--space--4, 4px)}.pagination__container-label{margin:0 var(--space--8, 8px)}.pagination-contracted{width:100px}.pagination-expanded{min-width:150px}.pagination__label{font-family:var(--font--pattern, 'Roboto');color:var(--color--petroleum-300, #848D9C);font-weight:var(--font-weight--regular, 400);width:100%;white-space:nowrap}.cancel-pagination{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:var(--space--4, 4px);padding:var(--space--8, 8px)}.spin{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.cancel-pagination-btn{color:var(--color--red-600, #BD0025);font-size:var(--font-size--medium, 16px);font-weight:var(--font-weight--semi-bold, 600);font-family:var(--font--pattern, 'Roboto');text-wrap:nowrap;cursor:pointer}.pagination-text-right{flex-direction:row-reverse}";
6
+
7
+ const EzGridPagination = class {
8
+ constructor(hostRef) {
9
+ registerInstance(this, hostRef);
10
+ this.pageChange = createEvent(this, "pageChange", 7);
11
+ this._dataUnitInitialized = false;
12
+ this.paginationInfo = undefined;
13
+ this.leftButtonDisabled = undefined;
14
+ this.rightButtonDisabled = undefined;
15
+ this.paginationCounterMode = 'auto';
16
+ this.dataUnit = undefined;
17
+ this.paginationTextPosition = 'left';
18
+ this.buttonsSize = 'large';
19
+ }
20
+ /**
21
+ * Navega para a página anterior.
22
+ */
23
+ async previousPage() {
24
+ if (!this.dataUnit) {
25
+ return;
26
+ }
27
+ await this.dataUnit.previousPage();
28
+ this.handlePageChange('previous');
29
+ }
30
+ /**
31
+ * Navega para a próxima página.
32
+ */
33
+ async nextPage() {
34
+ if (!this.dataUnit) {
35
+ return;
36
+ }
37
+ await this.dataUnit.nextPage();
38
+ this.handlePageChange('next');
39
+ }
40
+ /**
41
+ * Navega para a primeira página.
42
+ */
43
+ async firstPage() {
44
+ if (!this.dataUnit) {
45
+ return;
46
+ }
47
+ await this.dataUnit.gotoPage(0);
48
+ this.handlePageChange('previous');
49
+ }
50
+ /**
51
+ * Navega para a primeira página.
52
+ */
53
+ async lastPage() {
54
+ if (!this.dataUnit) {
55
+ return;
56
+ }
57
+ await this.dataUnit.gotoPage(this.getTotalPages() - 1);
58
+ this.handlePageChange('next');
59
+ }
60
+ onDataUnitChange() {
61
+ this.initializeDataUnit();
62
+ }
63
+ shouldPresentPaginationLabel() {
64
+ return this.paginationCounterMode !== 'hidden';
65
+ }
66
+ getRemainingPageLabel() {
67
+ var _a;
68
+ if (!this.paginationInfo)
69
+ return '';
70
+ return `${this.paginationInfo.total == undefined
71
+ ? this.i18n('ez-grid-pagination.remainingPageLabel', { count: ((_a = this.paginationInfo.count) !== null && _a !== void 0 ? _a : 0) + 1 })
72
+ : this.i18n('ez-grid-pagination.remainingTotalLabel', { total: this.paginationInfo.total, count: this.paginationInfo.count })}`;
73
+ }
74
+ getActualPageLabel() {
75
+ var _a, _b;
76
+ if (!this.paginationInfo)
77
+ return '0-0';
78
+ return `${(_a = this.paginationInfo.firstRecord) !== null && _a !== void 0 ? _a : 0} - ${(_b = this.paginationInfo.lastRecord) !== null && _b !== void 0 ? _b : 0}`;
79
+ }
80
+ getPaginationCount() {
81
+ var _a;
82
+ if (!this.paginationInfo || !this.dataUnit)
83
+ return '0-0';
84
+ const currentPage = ((_a = this.paginationInfo.currentPage) !== null && _a !== void 0 ? _a : 0) + 1;
85
+ let totalPages = this.getTotalPages();
86
+ return this.i18n('ez-grid-pagination.pageCounter', { currentPage, totalPages });
87
+ }
88
+ getTotalPages() {
89
+ var _a;
90
+ if (this.paginationInfo.total !== undefined) {
91
+ return Math.ceil(this.paginationInfo.total / this.dataUnit.pageSize);
92
+ }
93
+ else {
94
+ return Math.ceil(((_a = this.paginationInfo.count) !== null && _a !== void 0 ? _a : 0) / this.dataUnit.pageSize);
95
+ }
96
+ }
97
+ handlePageChange(direction) {
98
+ this.setPaginationInfo();
99
+ this.setStatusButtonPagination();
100
+ this.pageChange.emit(direction);
101
+ }
102
+ async handleCancelPagination() {
103
+ var _a;
104
+ if (!this.dataUnit)
105
+ return;
106
+ this.dataUnit.cancelPagination = true;
107
+ await ((_a = this._cancelPaginationPopoverElement) === null || _a === void 0 ? void 0 : _a.hide());
108
+ }
109
+ handleShowCancelPagination() {
110
+ var _a, _b, _c;
111
+ if (!this.hasToShowCancelPagination()) {
112
+ (_a = this._cancelPaginationPopoverElement) === null || _a === void 0 ? void 0 : _a.hide();
113
+ return;
114
+ }
115
+ if ((_b = this._cancelPaginationPopoverElement) === null || _b === void 0 ? void 0 : _b.opened)
116
+ return;
117
+ (_c = this._cancelPaginationPopoverElement) === null || _c === void 0 ? void 0 : _c.show('15px');
118
+ }
119
+ hasToShowCancelPagination() {
120
+ if (!this.dataUnit || !this.paginationInfo)
121
+ return false;
122
+ const hasMore = this.paginationInfo.total === undefined;
123
+ return !this.dataUnit.cancelPagination && hasMore && this.paginationInfo.count > this.dataUnit.pageSize;
124
+ }
125
+ setPaginationInfo() {
126
+ if (!this.dataUnit) {
127
+ this.paginationInfo = null;
128
+ return;
129
+ }
130
+ this.paginationInfo = this.dataUnit.getPaginationInfo() || null;
131
+ }
132
+ dataUnitObserver(action) {
133
+ switch (action.type) {
134
+ case Action.PAGINATION_UPDATED:
135
+ this.setPaginationInfo();
136
+ this.setStatusButtonPagination();
137
+ this.handleShowCancelPagination();
138
+ break;
139
+ case Action.DATA_LOADED:
140
+ this.setPaginationInfo();
141
+ break;
142
+ }
143
+ }
144
+ getLeftButtonDisabledStatus() {
145
+ var _a, _b;
146
+ if (!this.dataUnit)
147
+ return true;
148
+ return ((_b = (_a = this.paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) !== null && _b !== void 0 ? _b : 0) <= 0;
149
+ }
150
+ getRightButtonDisabledStatus() {
151
+ var _a;
152
+ if (!this.dataUnit)
153
+ return true;
154
+ return !((_a = this.paginationInfo) === null || _a === void 0 ? void 0 : _a.hasMore);
155
+ }
156
+ setStatusButtonPagination() {
157
+ this.leftButtonDisabled = this.getLeftButtonDisabledStatus();
158
+ this.rightButtonDisabled = this.getRightButtonDisabledStatus();
159
+ }
160
+ initializeDataUnit() {
161
+ if (!this.dataUnit || this._dataUnitInitialized) {
162
+ return;
163
+ }
164
+ this.setPaginationInfo();
165
+ this.setStatusButtonPagination();
166
+ this._dataUnitObserverBound = this.dataUnitObserver.bind(this);
167
+ this.dataUnit.subscribe(this._dataUnitObserverBound);
168
+ this._dataUnitInitialized = true;
169
+ }
170
+ addInfoId() {
171
+ if (this._element) {
172
+ ElementIDUtils.addIDInfo(this._element);
173
+ }
174
+ }
175
+ renderCancelPagination() {
176
+ return (h("ez-popover", { ref: (element) => (this._cancelPaginationPopoverElement = element), "overlay-type": "none", autoClose: false }, h("div", { class: 'cancel-pagination' }, h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), h("span", { onClick: () => this.handleCancelPagination(), class: 'cancel-pagination-btn' }, this.i18n('ez-grid-pagination.cancelPagination')))));
177
+ }
178
+ async connectedCallback() {
179
+ this.i18n = await initI18n();
180
+ this.initializeDataUnit();
181
+ }
182
+ componentDidLoad() {
183
+ this.addInfoId();
184
+ }
185
+ disconnectedCallback() {
186
+ if (this.dataUnit && this._dataUnitInitialized && this._dataUnitObserverBound) {
187
+ this.dataUnit.unsubscribe(this._dataUnitObserverBound);
188
+ }
189
+ }
190
+ render() {
191
+ return (h(Host, null, h("div", { id: 'grid-pagination--container', class: {
192
+ 'pagination__container': true,
193
+ 'pagination-expanded': this.paginationCounterMode !== 'hidden',
194
+ 'pagination-contracted': this.paginationCounterMode === 'hidden',
195
+ 'pagination-text-right': this.paginationTextPosition === 'right',
196
+ } }, h("div", { id: "grid-pagination--page-navigator", class: "pagination__page-navigator" }, h("div", { id: 'grid-pagination--row-summary-panel', class: "pagination__row-summary-panel" }, h("span", { class: "pagination__label", "aria-live": "polite", "aria-atomic": "true", title: `${this.getActualPageLabel()} ${this.getRemainingPageLabel()}` }, this.shouldPresentPaginationLabel() && this.getActualPageLabel(), this.shouldPresentPaginationLabel() && this.getRemainingPageLabel())), this.renderCancelPagination(), h("div", { id: 'grid-pagination--page-summary-panel', class: {
197
+ 'pagination__page-summary-panel': true,
198
+ 'pagination__container': true,
199
+ 'pagination-expanded': this.paginationCounterMode !== 'hidden',
200
+ 'pagination-contracted': this.paginationCounterMode === 'hidden',
201
+ 'pagination-text-right': this.paginationTextPosition === 'right',
202
+ } }, h("div", { id: 'grid-pagination--first-tooltip', class: {
203
+ 'pagination__buttons-container': true,
204
+ 'disabled': this.leftButtonDisabled
205
+ } }, h("ez-tooltip", { message: this.i18n('ez-grid-pagination.firstPage') }, h("ez-icon", { size: this.buttonsSize, iconName: "dual-chevron-left", onClick: () => !this.leftButtonDisabled && this.firstPage() }))), h("div", { id: 'grid-pagination--previous-tooltip', class: {
206
+ 'pagination__buttons-container': true,
207
+ 'disabled': this.leftButtonDisabled
208
+ } }, h("ez-tooltip", { message: this.i18n('ez-grid-pagination.previousPage') }, h("ez-icon", { size: this.buttonsSize, iconName: "chevron-left", onClick: () => !this.leftButtonDisabled && this.previousPage() }))), h("div", { class: "pagination__container-label" }, h("span", { class: "pagination__label", "aria-live": "polite", "aria-atomic": "true", title: `${this.getActualPageLabel()} ${this.getRemainingPageLabel()}` }, this.shouldPresentPaginationLabel() && this.getPaginationCount())), h("div", { id: 'grid-pagination--next-tooltip', class: {
209
+ 'pagination__buttons-container': true,
210
+ 'disabled': this.rightButtonDisabled
211
+ } }, h("ez-tooltip", { message: this.i18n('ez-grid-pagination.nextPage') }, h("ez-icon", { size: this.buttonsSize, iconName: "chevron-right", onClick: () => !this.rightButtonDisabled && this.nextPage() }))), h("div", { id: 'grid-pagination--last-tooltip', class: {
212
+ 'pagination__buttons-container': true,
213
+ 'disabled': this.rightButtonDisabled
214
+ } }, h("ez-tooltip", { message: this.i18n('ez-grid-pagination.lastPage') }, h("ez-icon", { size: this.buttonsSize, iconName: "dual-chevron-right", onClick: () => !this.rightButtonDisabled && this.lastPage() }))))))));
215
+ }
216
+ get _element() { return getElement(this); }
217
+ static get watchers() { return {
218
+ "dataUnit": ["onDataUnitChange"]
219
+ }; }
220
+ };
221
+ EzGridPagination.style = ezGridPaginationCss;
222
+
223
+ export { EzGridPagination as ez_grid_pagination };
@@ -1,13 +1,13 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-baa5e267.js';
2
- import { Action, DataUnit, ObjectUtils as ObjectUtils$1, UserInterface, HTMLBuilder, ApplicationContext, StringUtils as StringUtils$1, LockManager, LockManagerOperation, DataType, NumberUtils as NumberUtils$1, MaskFormatter, SortMode, ElementIDUtils, ColumnFilterManager as ColumnFilterManager$1, DateUtils as DateUtils$1, ArrayUtils as ArrayUtils$1, FieldComparator, JSUtils, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
2
+ import { Action, DataUnit, ObjectUtils as ObjectUtils$1, UserInterface, HTMLBuilder, ApplicationContext, StringUtils as StringUtils$1, LockManager, LockManagerOperation, DataType, NumberUtils as NumberUtils$1, MaskFormatter, SortMode, ElementIDUtils, ColumnFilterManager as ColumnFilterManager$1, DateUtils as DateUtils$1, ArrayUtils as ArrayUtils$1, FieldComparator, JSUtils, KeyboardManager } from '@sankhyalabs/core';
3
3
  import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
4
- import { A as ApplicationUtils } from './ApplicationUtils-0c5cb207.js';
4
+ import { A as ApplicationUtils } from './ApplicationUtils-e99e53c8.js';
5
5
  import './DialogType-54a62731.js';
6
6
  import './CheckMode-bdb2ec19.js';
7
- import { g as getI18n, i as initI18n } from './index-225aa0c3.js';
7
+ import { g as getI18n, i as initI18n } from './index-a031816b.js';
8
8
  import { C as CustomEditorSource, a as CustomRenderSource } from './types-6f6b2650.js';
9
9
  import './FormLayout-bda67973.js';
10
- import { b as buildFieldMetadata, R as RecordValidationProcessor, D as DataBinder, S as SHORTCUT_SEARCH_FIELD, f as focusOnFieldSerch, c as SEARCH_FIELD_FULL_WIDTH, a as buildFieldSearch } from './search-column-40a78cac.js';
10
+ import { b as buildFieldMetadata, R as RecordValidationProcessor, D as DataBinder, S as SHORTCUT_SEARCH_FIELD, f as focusOnFieldSerch, c as SEARCH_FIELD_FULL_WIDTH, a as buildFieldSearch } from './search-column-33d72c20.js';
11
11
  import { D as DISTINCT_FILTER_NAME_PREFIX, E as EZ_GRID_LOADING_SOURCE, P as PRESENTATION_COL_ID_PROP_NAME, a as PRESENTATION_FROM_COL_PROP_NAME } from './constants-3fabe81e.js';
12
12
  import { F as FocusResolver } from './FocusResolver-1ccbf850.js';
13
13
  import { p as purify } from './purify-9357603c.js';
@@ -64863,6 +64863,29 @@ function resolveAggFunc(aggFunc) {
64863
64863
  return fn;
64864
64864
  }
64865
64865
 
64866
+ /**
64867
+ * Larguras padrão das colunas do grid por tipo de UserInterface
64868
+ */
64869
+ const GRID_COLUMN_DEFAULT_WIDTHS = {
64870
+ [UserInterface.SEARCH]: 200,
64871
+ [UserInterface.SEARCHPLUS]: 100,
64872
+ [UserInterface.DATE]: 120,
64873
+ [UserInterface.DATETIME]: 160,
64874
+ [UserInterface.TIME]: 100,
64875
+ [UserInterface.ELAPSEDTIME]: 100,
64876
+ [UserInterface.DECIMALNUMBER]: 130,
64877
+ [UserInterface.INTEGERNUMBER]: 120,
64878
+ [UserInterface.SWITCH]: 80,
64879
+ [UserInterface.FILE]: 100,
64880
+ [UserInterface.HTML]: 200,
64881
+ [UserInterface.LONGTEXT]: 200,
64882
+ [UserInterface.CHECKBOX]: 80,
64883
+ [UserInterface.OPTIONSELECTOR]: 100,
64884
+ [UserInterface.SHORTTEXT]: 200,
64885
+ [UserInterface.PASSWORD]: 100,
64886
+ [UserInterface.MASKEDTEXT]: 100,
64887
+ };
64888
+
64866
64889
  class AgGridController {
64867
64890
  configFilterColumn(filterColumn) {
64868
64891
  this._filterColumn = filterColumn;
@@ -64891,10 +64914,10 @@ class AgGridController {
64891
64914
  this.COLUMN_FOOTER_OPER = 'gridFooterOper';
64892
64915
  this.RECORD_ARCHIVE_COL_ID = '__RECORD_ARCHIVE__';
64893
64916
  this.BLOCK_LOAD_DEBOUNCE = 100;
64894
- this.DEFAULT_FONT_SIZE = 14;
64917
+ this.DEFAULT_FONT_SIZE = 8;
64895
64918
  this.DEFAULT_FONT_SIZE_HTML5 = 32;
64896
- this.DEFAULT_ICON_SIZE = 12;
64897
- this.DEFAULT_MAX_SIZE = 200;
64919
+ this.DEFAULT_ICON_SIZE = 40;
64920
+ this.DEFAULT_MAX_SIZE = 300;
64898
64921
  this._menuItems = [];
64899
64922
  this._idAttribName = '__record__id__';
64900
64923
  this._gridConfig = [];
@@ -65880,9 +65903,11 @@ class AgGridController {
65880
65903
  tooltip = this._i18n('ez-grid.columnCantBeOrder');
65881
65904
  }
65882
65905
  const presentationFrom = (_d = source === null || source === void 0 ? void 0 : source.props) === null || _d === void 0 ? void 0 : _d.get(PRESENTATION_FROM_COL_PROP_NAME);
65906
+ const initialWidth = this.getInitialColumnWidth(source.userInterface, source.label);
65883
65907
  return this._editionManager.configureColumn({
65884
65908
  headerName: source.label,
65885
65909
  field: source.name,
65910
+ width: initialWidth,
65886
65911
  aggFunc: this.getAggFunc(source),
65887
65912
  sortable: propSortable,
65888
65913
  resizable: true,
@@ -66228,10 +66253,21 @@ class AgGridController {
66228
66253
  }
66229
66254
  const field = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
66230
66255
  const label = (_b = field === null || field === void 0 ? void 0 : field.label) !== null && _b !== void 0 ? _b : (_f = (_e = (_d = (_c = this._gridOptions) === null || _c === void 0 ? void 0 : _c.columnApi) === null || _d === void 0 ? void 0 : _d.getColumn(cfgColumn.name)) === null || _e === void 0 ? void 0 : _e.getColDef()) === null || _f === void 0 ? void 0 : _f.headerName;
66231
- if ((field === null || field === void 0 ? void 0 : field.userInterface) === UserInterface.SEARCH) {
66232
- return this.DEFAULT_MAX_SIZE;
66256
+ return this.getInitialColumnWidth(field === null || field === void 0 ? void 0 : field.userInterface, label);
66257
+ }
66258
+ getInitialColumnWidth(userInterface, label) {
66259
+ const columnWidthByLabel = this.getColumnWidthByLabel(label);
66260
+ const defaultWidth = this.getDefaultWidthByUserInterface(userInterface);
66261
+ if (!defaultWidth) {
66262
+ return columnWidthByLabel;
66263
+ }
66264
+ return Math.max(defaultWidth, columnWidthByLabel);
66265
+ }
66266
+ getDefaultWidthByUserInterface(userInterface) {
66267
+ if (!userInterface) {
66268
+ return undefined;
66233
66269
  }
66234
- return this.getColumnWidthByLabel(label);
66270
+ return GRID_COLUMN_DEFAULT_WIDTHS[userInterface];
66235
66271
  }
66236
66272
  getColumnWidthByLabel(label) {
66237
66273
  const labelSize = ((label === null || label === void 0 ? void 0 : label.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
@@ -66425,7 +66461,7 @@ class InMemoryFilterColumnDataSource {
66425
66461
  }
66426
66462
  }
66427
66463
 
66428
- const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:var(--shadow);--ez-grid--min-height:300px;--ez-grid__container--shadow--outline:var(--shadow--outline) var(--color--strokes);--ez-grid__header--shadow:var(--shadow--xsmall);--ez-grid__header--shadow--outline:var(--shadow--outline) var(--color--strokes);--ez-grid__header--outline:none;--ez-grid__header--border:none;min-height:var(--ez-grid--min-height)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-row-start:1;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF)}.grid-header.shadow-mode.sc-ez-grid{box-shadow:var(--ez-grid__header--shadow);border:var(--ez-grid__header--border);outline:var(--ez-grid__header--outline)}.grid-header.outline-mode.sc-ez-grid{box-shadow:var(--ez-grid__header--shadow--outline);border:var(--ez-grid__header--border);outline:var(--ez-grid__header--outline)}.header-overlay.sc-ez-grid{padding-top:15px;margin-top:-12px}.grid__container.sc-ez-grid{outline:none;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color);border:var(--border--small) var(--color--strokes);border-radius:var(--border--radius-small)}.grid__container.no-scroll.sc-ez-grid{width:100vw}.sc-ez-grid-h:not([no-header]) .grid__container.sc-ez-grid{border:none}.grid__container.outline-mode.sc-ez-grid{box-shadow:var(--ez-grid__container--shadow--outline);border:none;outline:none}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center;flex-grow:1;flex-shrink:1}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}.grid-header__pagination.sc-ez-grid{justify-content:flex-end;flex-wrap:nowrap;flex-shrink:1;flex-grow:1}.grid-header__pagination-label.sc-ez-grid{width:100%;white-space:nowrap}.overflowed.sc-ez-grid{display:none}.pagination-contracted.sc-ez-grid{width:100px}.pagination-expanded.sc-ez-grid{min-width:150px}.left__header-contracted.sc-ez-grid{width:auto}.left__header-expanded.sc-ez-grid{flex-grow:1}.grid__footer.sc-ez-grid{background-color:var(--background--xlight, #FFF);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium);box-shadow:var(--shadow--small)}.cancel-pagination.sc-ez-grid{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:4px;padding:8px;width:180px}.cancel-pagination-btn.sc-ez-grid{color:var(--color--error);font-size:var(--text--medium);font-weight:var(--text-weight--large);font-family:var(--font-pattern, Roboto);text-wrap:nowrap;cursor:pointer}.spin.sc-ez-grid{animation-name:spin;animation-duration:5000ms;animation-iteration-count:infinite;animation-timing-function:linear}@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}";
66464
+ const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:var(--shadow);--ez-grid--min-height:300px;--ez-grid__container--shadow--outline:var(--shadow--outline) var(--color--strokes);--ez-grid__header--shadow:var(--shadow--xsmall);--ez-grid__header--shadow--outline:var(--shadow--outline) var(--color--strokes);--ez-grid__header--outline:none;--ez-grid__header--border:none;min-height:var(--ez-grid--min-height)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-row-start:1;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF)}.grid-header.shadow-mode.sc-ez-grid{box-shadow:var(--ez-grid__header--shadow);border:var(--ez-grid__header--border);outline:var(--ez-grid__header--outline)}.grid-header.outline-mode.sc-ez-grid{box-shadow:var(--ez-grid__header--shadow--outline);border:var(--ez-grid__header--border);outline:var(--ez-grid__header--outline)}.header-overlay.sc-ez-grid{padding-top:15px;margin-top:-12px}.grid__container.sc-ez-grid{outline:none;background-color:var(--ez-grid__header--background-color);border-radius:var(--border--radius-12, 12px) var(--border--radius-12, 12px) 0 0}.grid__container.no-scroll.sc-ez-grid{width:100vw}.sc-ez-grid-h:not([no-header]) .grid__container.sc-ez-grid{border:none}.grid__container.outline-mode.sc-ez-grid{box-shadow:var(--ez-grid__container--shadow--outline);border:none;outline:none}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center;flex-grow:1;flex-shrink:1}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}.overflowed.sc-ez-grid{display:none}.left__header-contracted.sc-ez-grid{width:auto}.left__header-expanded.sc-ez-grid{flex-grow:1}.grid__footer.sc-ez-grid{background-color:var(--background--xlight, #FFF)}";
66429
66465
 
66430
66466
  const windowInstace = window;
66431
66467
  const matches = (text, filter) => {
@@ -66478,6 +66514,7 @@ const EzGrid = class {
66478
66514
  this.useSearchColumn = true;
66479
66515
  this.suppressHorizontalScroll = false;
66480
66516
  this.mode = "complete";
66517
+ this.hidePagination = false;
66481
66518
  }
66482
66519
  /**
66483
66520
  * Aplica a definição de colunas.
@@ -66627,26 +66664,17 @@ const EzGrid = class {
66627
66664
  return;
66628
66665
  this._gridController.stopEdit();
66629
66666
  }
66667
+ /**
66668
+ * Manipula a mudança de página da grid.
66669
+ */
66670
+ async handlePageChange() {
66671
+ this.resetPaginationState();
66672
+ this._gridController.setFocusFirstRow();
66673
+ this.ezPageChangedChanged.emit();
66674
+ }
66630
66675
  observeConfig(config) {
66631
66676
  this._gridController.setColumnsState(config === null || config === void 0 ? void 0 : config.columns);
66632
66677
  }
66633
- updatePaginationTooltip() {
66634
- this.handleShowCancelPagination();
66635
- if (!this._refPaginationLabelTooltip)
66636
- return;
66637
- const alreadyDefined = this._refPaginationLabelTooltip.getAttribute('data-tooltip');
66638
- if (alreadyDefined) {
66639
- this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
66640
- }
66641
- }
66642
- observePaginationCounterMode(newValue) {
66643
- if (newValue === 'hidden') {
66644
- this._hidePaginationDescription();
66645
- }
66646
- if (newValue === 'show') {
66647
- this._showPaginationDescription();
66648
- }
66649
- }
66650
66678
  async observeModeChange(newMode = this.mode) {
66651
66679
  if (newMode === "simple") {
66652
66680
  this.canEdit = false;
@@ -66809,23 +66837,6 @@ const EzGrid = class {
66809
66837
  ElementIDUtils.addIDInfo(this._refPaginationControl, 'pagination', dtInfo);
66810
66838
  }
66811
66839
  }
66812
- handlePageChange() {
66813
- this.resetPaginationState();
66814
- this._gridController.setFocusFirstRow();
66815
- this.ezPageChangedChanged.emit();
66816
- }
66817
- previousPage() {
66818
- if (this.dataUnit) {
66819
- this.dataUnit.previousPage()
66820
- .then(() => this.handlePageChange());
66821
- }
66822
- }
66823
- nextPage() {
66824
- if (this.dataUnit) {
66825
- this.dataUnit.nextPage()
66826
- .then(() => this.handlePageChange());
66827
- }
66828
- }
66829
66840
  nextRecord() {
66830
66841
  if (this.dataUnit) {
66831
66842
  if (this.dataUnit.getSelectionInfo().records.length === 0) {
@@ -66845,38 +66856,6 @@ const EzGrid = class {
66845
66856
  this._paginationChangedByKeyboard = false;
66846
66857
  (_a = this._gridController) === null || _a === void 0 ? void 0 : _a.resetPaginationState();
66847
66858
  }
66848
- resolvePaginationClassMode() {
66849
- if (this.shouldPresentPaginationLabel())
66850
- return "pagination-expanded";
66851
- return "pagination-contracted";
66852
- }
66853
- async handleCancelPagination() {
66854
- var _a;
66855
- this.dataUnit.cancelPagination = true;
66856
- await ((_a = this._cancelPaginationPopoverElement) === null || _a === void 0 ? void 0 : _a.hide());
66857
- }
66858
- renderCancelPagination() {
66859
- return (h("ez-popover", { ref: (element) => (this._cancelPaginationPopoverElement = element), "overlay-type": 'none', autoClose: false }, h("div", { class: 'cancel-pagination' }, h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), h("span", { onClick: () => this.handleCancelPagination(), class: 'cancel-pagination-btn' }, this.i18n("ez-grid.cancelPagination")))));
66860
- }
66861
- handleShowCancelPagination() {
66862
- var _a, _b, _c;
66863
- if (!this._hasToShowCancelPagination()) {
66864
- (_a = this._cancelPaginationPopoverElement) === null || _a === void 0 ? void 0 : _a.hide();
66865
- return;
66866
- }
66867
- if ((_b = this._cancelPaginationPopoverElement) === null || _b === void 0 ? void 0 : _b.opened)
66868
- return;
66869
- (_c = this._cancelPaginationPopoverElement) === null || _c === void 0 ? void 0 : _c.show("15px");
66870
- }
66871
- getPaginationControl() {
66872
- if (!this._paginationInfo)
66873
- return null;
66874
- const { currentPage, hasMore } = this._paginationInfo;
66875
- return (h("div", { class: `grid-header__container grid-header__pagination ${this.resolvePaginationClassMode()}`, ref: ref => (this._refPaginationControl = ref) }, this.renderCancelPagination(), h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, h("span", { class: "grid-header__pagination-label" }, this.shouldPresentPaginationLabel() && h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this.shouldPresentPaginationLabel() && this._getRemainingPageLabel())), h("div", { id: "grid-pagination-tooltip", ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium", title: `${this._getActualPageLabel()} ${this._getRemainingPageLabel()}` }, h("ez-button", { size: "small", class: "ez-margin-right--medium", iconName: "chevron-left", mode: "icon", enabled: currentPage > 0, onClick: () => this.previousPage(), label: this.i18n("ez-grid.previousPage") }), h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: this.i18n("ez-grid.nextPage") }))));
66876
- }
66877
- shouldPresentPaginationLabel() {
66878
- return this.paginationCounterMode === 'show' || this.paginationCounterMode === 'auto';
66879
- }
66880
66859
  componentDidLoad() {
66881
66860
  const _application = ApplicationContext.getContextValue("__SNK__APPLICATION__");
66882
66861
  this.enableLockManagerLoadingComp = (!_application || (_application === null || _application === void 0 ? void 0 : _application.enableLockManagerLoadingApp)) ? this.enableLockManagerLoadingComp : false;
@@ -66941,76 +66920,9 @@ const EzGrid = class {
66941
66920
  }
66942
66921
  this._paginationInfo = paginationInfo;
66943
66922
  }
66944
- _getActualPageLabel() {
66945
- const { firstRecord, lastRecord } = this._paginationInfo;
66946
- return `${firstRecord}-${lastRecord}`;
66947
- }
66948
- _getRemainingPageLabel() {
66949
- const { total, count } = this._paginationInfo;
66950
- return `${total == undefined ? this.i18n("ez-grid.remainingPageLabel", { count: count + 1 }) : this.i18n("ez-grid.remainingTotalLabel", { total })}`;
66951
- }
66952
- _hasToShowCancelPagination() {
66953
- var _a;
66954
- const { total, count } = (_a = this._paginationInfo) !== null && _a !== void 0 ? _a : {};
66955
- const hasMore = (total === undefined);
66956
- return !this.dataUnit.cancelPagination && hasMore && count > this.dataUnit.pageSize;
66957
- }
66958
- _getPaginationTooltip() {
66959
- return this._getActualPageLabel() + this._getRemainingPageLabel();
66960
- }
66961
- _initHeaderOverflowWatcher() {
66962
- var _a;
66963
- (_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
66964
- if (this._refPaginationControl)
66965
- this._headerOverflowWatcher = new OverflowWatcher(this.buildOverFlowWatcherParams());
66966
- }
66967
- buildOverFlowWatcherParams() {
66968
- return {
66969
- element: this._refPaginationControl,
66970
- callback: this.handleOverFlow.bind(this),
66971
- notOverFlow: ["grid-pagination-tooltip"]
66972
- };
66973
- }
66974
- handleOverFlow() {
66975
- if (!this._refPaginationLabel || !this._refPaginationControl)
66976
- return;
66977
- const controlWidth = this._refPaginationControl.clientWidth;
66978
- const labelWidth = this._refPaginationLabel.scrollWidth;
66979
- const buttonsElement = this._refPaginationControl.querySelector('#grid-pagination-tooltip');
66980
- const buttonsWidth = (buttonsElement === null || buttonsElement === void 0 ? void 0 : buttonsElement.clientWidth) || 0;
66981
- const totalMargins = this._getElementMargins(this._refPaginationLabel) + (buttonsElement ? this._getElementMargins(buttonsElement) : 0);
66982
- const paginationWidthWithoutDescription = labelWidth + buttonsWidth + totalMargins;
66983
- const paginationWidthWithDescription = paginationWidthWithoutDescription + this._getPaginationDescriptionWidth();
66984
- if (controlWidth > paginationWidthWithDescription) {
66985
- this._showPaginationDescription();
66986
- }
66987
- else if (controlWidth <= paginationWidthWithoutDescription) {
66988
- this._hidePaginationDescription();
66989
- }
66990
- }
66991
- _getPaginationDescriptionWidth() {
66992
- var _a;
66993
- return ((_a = this._refPaginationLabelTooltip) === null || _a === void 0 ? void 0 : _a.scrollWidth) || 0;
66994
- }
66995
- _getElementMargins(element) {
66996
- const style = getComputedStyle(element);
66997
- return parseFloat(style.marginLeft) + parseFloat(style.marginRight);
66998
- }
66999
- _hidePaginationDescription() {
67000
- this._refPaginationLabel.classList.add(OVERFLOWED_CLASS_NAME);
67001
- this._refPaginationLabelTooltip.setAttribute('data-flow', 'bottom');
67002
- this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
67003
- }
67004
- ;
67005
- _showPaginationDescription() {
67006
- this._refPaginationLabel.classList.remove(OVERFLOWED_CLASS_NAME);
67007
- this._refPaginationLabelTooltip.removeAttribute('data-flow');
67008
- this._refPaginationLabelTooltip.removeAttribute('data-tooltip');
67009
- }
67010
66923
  disconnectedCallback() {
67011
- var _a, _b;
67012
- (_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
67013
- (_b = this._gridController) === null || _b === void 0 ? void 0 : _b.destroy();
66924
+ var _a;
66925
+ (_a = this._gridController) === null || _a === void 0 ? void 0 : _a.destroy();
67014
66926
  this.removeShortcuts();
67015
66927
  }
67016
66928
  connectedCallback() {
@@ -67039,8 +66951,6 @@ const EzGrid = class {
67039
66951
  if (this.dataUnit && this._showSelectionCounter) {
67040
66952
  this.setSelection(this.dataUnit.getSelectionInfo());
67041
66953
  }
67042
- if (this.paginationCounterMode === 'auto')
67043
- this._initHeaderOverflowWatcher();
67044
66954
  }
67045
66955
  getDataSource() {
67046
66956
  if (!this.columnfilterDataSource) {
@@ -67052,7 +66962,7 @@ const EzGrid = class {
67052
66962
  if (this.mode === "simple") {
67053
66963
  return true;
67054
66964
  }
67055
- return !this._hasLeftButtons && !this._paginationInfo;
66965
+ return !this._hasLeftButtons;
67056
66966
  }
67057
66967
  resolveLeftHeaderClass() {
67058
66968
  if (this.paginationCounterMode == 'show')
@@ -67077,7 +66987,7 @@ const EzGrid = class {
67077
66987
  return;
67078
66988
  const { currentPage } = this._paginationInfo;
67079
66989
  if (currentPage > 0) {
67080
- this.previousPage();
66990
+ this._refGridPagination.previousPage();
67081
66991
  }
67082
66992
  }, { description: this.i18n("ez-grid.previousPage"), element: this._element })
67083
66993
  .bind("ctrl + alt + ArrowRight", () => {
@@ -67085,7 +66995,7 @@ const EzGrid = class {
67085
66995
  return;
67086
66996
  const { hasMore } = this._paginationInfo;
67087
66997
  if (hasMore) {
67088
- this.nextPage();
66998
+ this._refGridPagination.nextPage();
67089
66999
  }
67090
67000
  }, { description: this.i18n("ez-grid.nextPage"), element: this._element });
67091
67001
  if (this.useSearchColumn) {
@@ -67138,16 +67048,14 @@ const EzGrid = class {
67138
67048
  'ez-box ez-padding--small grid-header': true,
67139
67049
  'outline-mode': this.outlineMode,
67140
67050
  'shadow-mode': !this.outlineMode && !this.hideHeader(),
67141
- }, tabindex: "0" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: `grid-header__container grid-header__left-container ${this.resolveLeftHeaderClass()}` }, h("slot", { name: "leftButtons" })), this.getPaginationControl())), h("ez-popover", { ref: elem => (this._ezPopoverSearchColumn = elem), overlayType: "none" }, this.renderFieldSearchColumn()), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
67051
+ }, tabindex: "0" }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: `grid-header__container grid-header__left-container ${this.resolveLeftHeaderClass()}` }, h("slot", { name: "leftButtons" })))), h("ez-popover", { ref: elem => (this._ezPopoverSearchColumn = elem), overlayType: "none" }, this.renderFieldSearchColumn()), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
67142
67052
  ${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
67143
- ` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, i18n: this.i18n, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
67053
+ ` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, i18n: this.i18n, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__footer" }, (this.mode !== "simple" && !this.hidePagination) && (h("ez-grid-pagination", { class: `ez-flex ez-flex--content-end`, ref: ref => (this._refGridPagination = ref), dataUnit: this.dataUnit, paginationCounterMode: this.paginationCounterMode, onPageChange: () => this.handlePageChange() })), h("slot", { name: "footer" }))));
67144
67054
  }
67145
67055
  static get assetsDirs() { return ["../assets"]; }
67146
67056
  get _element() { return getElement(this); }
67147
67057
  static get watchers() { return {
67148
67058
  "config": ["observeConfig"],
67149
- "_paginationInfo": ["updatePaginationTooltip"],
67150
- "paginationCounterMode": ["observePaginationCounterMode"],
67151
67059
  "mode": ["observeModeChange"]
67152
67060
  }; }
67153
67061
  };
@@ -1,7 +1,7 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-baa5e267.js';
2
2
  import { ElementIDUtils } from '@sankhyalabs/core';
3
3
  import { E as EzScrollDirection } from './EzScrollDirection-2df26c93.js';
4
- import { i as initI18n } from './index-225aa0c3.js';
4
+ import { i as initI18n } from './index-a031816b.js';
5
5
 
6
6
  const ezGuideNavigatorCss = ":host{--ez-guide-navigator--padding-left:var(--space--large);--ez-guide-navigator--padding-right:var(--space--small);--ez-guide-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-guide-navigator--background-color:var(--color--inverted);--ez-guide-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-guide-navigator--actions-gap:var(--space--medium);--ez-guide-navigator--actions-margin:var(--space--large) 0 var(--space--medium);--ez-guide-navigator--actions-padding-right:calc(var(--space--medium, 12px) + var(--space--small, 6px))}.inverted{transform:rotate(180deg)}.ez-guide-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;padding-left:var(--ez-guide-navigator--padding-left);padding-right:var(--ez-guide-navigator--padding-right);background-color:var(--ez-guide-navigator--background-color);-webkit-box-shadow:var(--ez-guide-navigator--box-shadow);box-shadow:var(--ez-guide-navigator--box-shadow);border-radius:var(--ez-guide-navigator--border-radius)}.ez-guide-navigator__actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-guide-navigator--actions-gap);margin:var(--ez-guide-navigator--actions-margin);padding-right:var(--ez-guide-navigator--actions-padding-right)}.hidden{display:none}";
7
7