@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,227 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-a7b0c73d.js');
6
+ const index$1 = require('./index-a8537087.js');
7
+ const core = require('@sankhyalabs/core');
8
+
9
+ 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}";
10
+
11
+ const EzGridPagination = class {
12
+ constructor(hostRef) {
13
+ index.registerInstance(this, hostRef);
14
+ this.pageChange = index.createEvent(this, "pageChange", 7);
15
+ this._dataUnitInitialized = false;
16
+ this.paginationInfo = undefined;
17
+ this.leftButtonDisabled = undefined;
18
+ this.rightButtonDisabled = undefined;
19
+ this.paginationCounterMode = 'auto';
20
+ this.dataUnit = undefined;
21
+ this.paginationTextPosition = 'left';
22
+ this.buttonsSize = 'large';
23
+ }
24
+ /**
25
+ * Navega para a página anterior.
26
+ */
27
+ async previousPage() {
28
+ if (!this.dataUnit) {
29
+ return;
30
+ }
31
+ await this.dataUnit.previousPage();
32
+ this.handlePageChange('previous');
33
+ }
34
+ /**
35
+ * Navega para a próxima página.
36
+ */
37
+ async nextPage() {
38
+ if (!this.dataUnit) {
39
+ return;
40
+ }
41
+ await this.dataUnit.nextPage();
42
+ this.handlePageChange('next');
43
+ }
44
+ /**
45
+ * Navega para a primeira página.
46
+ */
47
+ async firstPage() {
48
+ if (!this.dataUnit) {
49
+ return;
50
+ }
51
+ await this.dataUnit.gotoPage(0);
52
+ this.handlePageChange('previous');
53
+ }
54
+ /**
55
+ * Navega para a primeira página.
56
+ */
57
+ async lastPage() {
58
+ if (!this.dataUnit) {
59
+ return;
60
+ }
61
+ await this.dataUnit.gotoPage(this.getTotalPages() - 1);
62
+ this.handlePageChange('next');
63
+ }
64
+ onDataUnitChange() {
65
+ this.initializeDataUnit();
66
+ }
67
+ shouldPresentPaginationLabel() {
68
+ return this.paginationCounterMode !== 'hidden';
69
+ }
70
+ getRemainingPageLabel() {
71
+ var _a;
72
+ if (!this.paginationInfo)
73
+ return '';
74
+ return `${this.paginationInfo.total == undefined
75
+ ? this.i18n('ez-grid-pagination.remainingPageLabel', { count: ((_a = this.paginationInfo.count) !== null && _a !== void 0 ? _a : 0) + 1 })
76
+ : this.i18n('ez-grid-pagination.remainingTotalLabel', { total: this.paginationInfo.total, count: this.paginationInfo.count })}`;
77
+ }
78
+ getActualPageLabel() {
79
+ var _a, _b;
80
+ if (!this.paginationInfo)
81
+ return '0-0';
82
+ return `${(_a = this.paginationInfo.firstRecord) !== null && _a !== void 0 ? _a : 0} - ${(_b = this.paginationInfo.lastRecord) !== null && _b !== void 0 ? _b : 0}`;
83
+ }
84
+ getPaginationCount() {
85
+ var _a;
86
+ if (!this.paginationInfo || !this.dataUnit)
87
+ return '0-0';
88
+ const currentPage = ((_a = this.paginationInfo.currentPage) !== null && _a !== void 0 ? _a : 0) + 1;
89
+ let totalPages = this.getTotalPages();
90
+ return this.i18n('ez-grid-pagination.pageCounter', { currentPage, totalPages });
91
+ }
92
+ getTotalPages() {
93
+ var _a;
94
+ if (this.paginationInfo.total !== undefined) {
95
+ return Math.ceil(this.paginationInfo.total / this.dataUnit.pageSize);
96
+ }
97
+ else {
98
+ return Math.ceil(((_a = this.paginationInfo.count) !== null && _a !== void 0 ? _a : 0) / this.dataUnit.pageSize);
99
+ }
100
+ }
101
+ handlePageChange(direction) {
102
+ this.setPaginationInfo();
103
+ this.setStatusButtonPagination();
104
+ this.pageChange.emit(direction);
105
+ }
106
+ async handleCancelPagination() {
107
+ var _a;
108
+ if (!this.dataUnit)
109
+ return;
110
+ this.dataUnit.cancelPagination = true;
111
+ await ((_a = this._cancelPaginationPopoverElement) === null || _a === void 0 ? void 0 : _a.hide());
112
+ }
113
+ handleShowCancelPagination() {
114
+ var _a, _b, _c;
115
+ if (!this.hasToShowCancelPagination()) {
116
+ (_a = this._cancelPaginationPopoverElement) === null || _a === void 0 ? void 0 : _a.hide();
117
+ return;
118
+ }
119
+ if ((_b = this._cancelPaginationPopoverElement) === null || _b === void 0 ? void 0 : _b.opened)
120
+ return;
121
+ (_c = this._cancelPaginationPopoverElement) === null || _c === void 0 ? void 0 : _c.show('15px');
122
+ }
123
+ hasToShowCancelPagination() {
124
+ if (!this.dataUnit || !this.paginationInfo)
125
+ return false;
126
+ const hasMore = this.paginationInfo.total === undefined;
127
+ return !this.dataUnit.cancelPagination && hasMore && this.paginationInfo.count > this.dataUnit.pageSize;
128
+ }
129
+ setPaginationInfo() {
130
+ if (!this.dataUnit) {
131
+ this.paginationInfo = null;
132
+ return;
133
+ }
134
+ this.paginationInfo = this.dataUnit.getPaginationInfo() || null;
135
+ }
136
+ dataUnitObserver(action) {
137
+ switch (action.type) {
138
+ case core.Action.PAGINATION_UPDATED:
139
+ this.setPaginationInfo();
140
+ this.setStatusButtonPagination();
141
+ this.handleShowCancelPagination();
142
+ break;
143
+ case core.Action.DATA_LOADED:
144
+ this.setPaginationInfo();
145
+ break;
146
+ }
147
+ }
148
+ getLeftButtonDisabledStatus() {
149
+ var _a, _b;
150
+ if (!this.dataUnit)
151
+ return true;
152
+ return ((_b = (_a = this.paginationInfo) === null || _a === void 0 ? void 0 : _a.currentPage) !== null && _b !== void 0 ? _b : 0) <= 0;
153
+ }
154
+ getRightButtonDisabledStatus() {
155
+ var _a;
156
+ if (!this.dataUnit)
157
+ return true;
158
+ return !((_a = this.paginationInfo) === null || _a === void 0 ? void 0 : _a.hasMore);
159
+ }
160
+ setStatusButtonPagination() {
161
+ this.leftButtonDisabled = this.getLeftButtonDisabledStatus();
162
+ this.rightButtonDisabled = this.getRightButtonDisabledStatus();
163
+ }
164
+ initializeDataUnit() {
165
+ if (!this.dataUnit || this._dataUnitInitialized) {
166
+ return;
167
+ }
168
+ this.setPaginationInfo();
169
+ this.setStatusButtonPagination();
170
+ this._dataUnitObserverBound = this.dataUnitObserver.bind(this);
171
+ this.dataUnit.subscribe(this._dataUnitObserverBound);
172
+ this._dataUnitInitialized = true;
173
+ }
174
+ addInfoId() {
175
+ if (this._element) {
176
+ core.ElementIDUtils.addIDInfo(this._element);
177
+ }
178
+ }
179
+ renderCancelPagination() {
180
+ return (index.h("ez-popover", { ref: (element) => (this._cancelPaginationPopoverElement = element), "overlay-type": "none", autoClose: false }, index.h("div", { class: 'cancel-pagination' }, index.h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), index.h("span", { onClick: () => this.handleCancelPagination(), class: 'cancel-pagination-btn' }, this.i18n('ez-grid-pagination.cancelPagination')))));
181
+ }
182
+ async connectedCallback() {
183
+ this.i18n = await index$1.initI18n();
184
+ this.initializeDataUnit();
185
+ }
186
+ componentDidLoad() {
187
+ this.addInfoId();
188
+ }
189
+ disconnectedCallback() {
190
+ if (this.dataUnit && this._dataUnitInitialized && this._dataUnitObserverBound) {
191
+ this.dataUnit.unsubscribe(this._dataUnitObserverBound);
192
+ }
193
+ }
194
+ render() {
195
+ return (index.h(index.Host, null, index.h("div", { id: 'grid-pagination--container', class: {
196
+ 'pagination__container': true,
197
+ 'pagination-expanded': this.paginationCounterMode !== 'hidden',
198
+ 'pagination-contracted': this.paginationCounterMode === 'hidden',
199
+ 'pagination-text-right': this.paginationTextPosition === 'right',
200
+ } }, index.h("div", { id: "grid-pagination--page-navigator", class: "pagination__page-navigator" }, index.h("div", { id: 'grid-pagination--row-summary-panel', class: "pagination__row-summary-panel" }, index.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(), index.h("div", { id: 'grid-pagination--page-summary-panel', class: {
201
+ 'pagination__page-summary-panel': true,
202
+ 'pagination__container': true,
203
+ 'pagination-expanded': this.paginationCounterMode !== 'hidden',
204
+ 'pagination-contracted': this.paginationCounterMode === 'hidden',
205
+ 'pagination-text-right': this.paginationTextPosition === 'right',
206
+ } }, index.h("div", { id: 'grid-pagination--first-tooltip', class: {
207
+ 'pagination__buttons-container': true,
208
+ 'disabled': this.leftButtonDisabled
209
+ } }, index.h("ez-tooltip", { message: this.i18n('ez-grid-pagination.firstPage') }, index.h("ez-icon", { size: this.buttonsSize, iconName: "dual-chevron-left", onClick: () => !this.leftButtonDisabled && this.firstPage() }))), index.h("div", { id: 'grid-pagination--previous-tooltip', class: {
210
+ 'pagination__buttons-container': true,
211
+ 'disabled': this.leftButtonDisabled
212
+ } }, index.h("ez-tooltip", { message: this.i18n('ez-grid-pagination.previousPage') }, index.h("ez-icon", { size: this.buttonsSize, iconName: "chevron-left", onClick: () => !this.leftButtonDisabled && this.previousPage() }))), index.h("div", { class: "pagination__container-label" }, index.h("span", { class: "pagination__label", "aria-live": "polite", "aria-atomic": "true", title: `${this.getActualPageLabel()} ${this.getRemainingPageLabel()}` }, this.shouldPresentPaginationLabel() && this.getPaginationCount())), index.h("div", { id: 'grid-pagination--next-tooltip', class: {
213
+ 'pagination__buttons-container': true,
214
+ 'disabled': this.rightButtonDisabled
215
+ } }, index.h("ez-tooltip", { message: this.i18n('ez-grid-pagination.nextPage') }, index.h("ez-icon", { size: this.buttonsSize, iconName: "chevron-right", onClick: () => !this.rightButtonDisabled && this.nextPage() }))), index.h("div", { id: 'grid-pagination--last-tooltip', class: {
216
+ 'pagination__buttons-container': true,
217
+ 'disabled': this.rightButtonDisabled
218
+ } }, index.h("ez-tooltip", { message: this.i18n('ez-grid-pagination.lastPage') }, index.h("ez-icon", { size: this.buttonsSize, iconName: "dual-chevron-right", onClick: () => !this.rightButtonDisabled && this.lastPage() }))))))));
219
+ }
220
+ get _element() { return index.getElement(this); }
221
+ static get watchers() { return {
222
+ "dataUnit": ["onDataUnitChange"]
223
+ }; }
224
+ };
225
+ EzGridPagination.style = ezGridPaginationCss;
226
+
227
+ exports.ez_grid_pagination = EzGridPagination;
@@ -5,13 +5,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index$1 = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const DataUnit = require('@sankhyalabs/core/dist/dataunit/DataUnit');
8
- const ApplicationUtils = require('./ApplicationUtils-006ca96f.js');
8
+ const ApplicationUtils = require('./ApplicationUtils-dc653b57.js');
9
9
  require('./DialogType-2114c337.js');
10
10
  require('./CheckMode-ecb90b87.js');
11
- const index = require('./index-350d0fa0.js');
11
+ const index = require('./index-a8537087.js');
12
12
  const types = require('./types-6a5df0c7.js');
13
13
  require('./FormLayout-fe8da83c.js');
14
- const searchColumn = require('./search-column-fbf680d7.js');
14
+ const searchColumn = require('./search-column-cd0e44be.js');
15
15
  const constants = require('./constants-72b7e05e.js');
16
16
  const FocusResolver = require('./FocusResolver-885f2173.js');
17
17
  const purify = require('./purify-b30a5718.js');
@@ -64867,6 +64867,29 @@ function resolveAggFunc(aggFunc) {
64867
64867
  return fn;
64868
64868
  }
64869
64869
 
64870
+ /**
64871
+ * Larguras padrão das colunas do grid por tipo de UserInterface
64872
+ */
64873
+ const GRID_COLUMN_DEFAULT_WIDTHS = {
64874
+ [core.UserInterface.SEARCH]: 200,
64875
+ [core.UserInterface.SEARCHPLUS]: 100,
64876
+ [core.UserInterface.DATE]: 120,
64877
+ [core.UserInterface.DATETIME]: 160,
64878
+ [core.UserInterface.TIME]: 100,
64879
+ [core.UserInterface.ELAPSEDTIME]: 100,
64880
+ [core.UserInterface.DECIMALNUMBER]: 130,
64881
+ [core.UserInterface.INTEGERNUMBER]: 120,
64882
+ [core.UserInterface.SWITCH]: 80,
64883
+ [core.UserInterface.FILE]: 100,
64884
+ [core.UserInterface.HTML]: 200,
64885
+ [core.UserInterface.LONGTEXT]: 200,
64886
+ [core.UserInterface.CHECKBOX]: 80,
64887
+ [core.UserInterface.OPTIONSELECTOR]: 100,
64888
+ [core.UserInterface.SHORTTEXT]: 200,
64889
+ [core.UserInterface.PASSWORD]: 100,
64890
+ [core.UserInterface.MASKEDTEXT]: 100,
64891
+ };
64892
+
64870
64893
  class AgGridController {
64871
64894
  configFilterColumn(filterColumn) {
64872
64895
  this._filterColumn = filterColumn;
@@ -64895,10 +64918,10 @@ class AgGridController {
64895
64918
  this.COLUMN_FOOTER_OPER = 'gridFooterOper';
64896
64919
  this.RECORD_ARCHIVE_COL_ID = '__RECORD_ARCHIVE__';
64897
64920
  this.BLOCK_LOAD_DEBOUNCE = 100;
64898
- this.DEFAULT_FONT_SIZE = 14;
64921
+ this.DEFAULT_FONT_SIZE = 8;
64899
64922
  this.DEFAULT_FONT_SIZE_HTML5 = 32;
64900
- this.DEFAULT_ICON_SIZE = 12;
64901
- this.DEFAULT_MAX_SIZE = 200;
64923
+ this.DEFAULT_ICON_SIZE = 40;
64924
+ this.DEFAULT_MAX_SIZE = 300;
64902
64925
  this._menuItems = [];
64903
64926
  this._idAttribName = '__record__id__';
64904
64927
  this._gridConfig = [];
@@ -65884,9 +65907,11 @@ class AgGridController {
65884
65907
  tooltip = this._i18n('ez-grid.columnCantBeOrder');
65885
65908
  }
65886
65909
  const presentationFrom = (_d = source === null || source === void 0 ? void 0 : source.props) === null || _d === void 0 ? void 0 : _d.get(constants.PRESENTATION_FROM_COL_PROP_NAME);
65910
+ const initialWidth = this.getInitialColumnWidth(source.userInterface, source.label);
65887
65911
  return this._editionManager.configureColumn({
65888
65912
  headerName: source.label,
65889
65913
  field: source.name,
65914
+ width: initialWidth,
65890
65915
  aggFunc: this.getAggFunc(source),
65891
65916
  sortable: propSortable,
65892
65917
  resizable: true,
@@ -66232,10 +66257,21 @@ class AgGridController {
66232
66257
  }
66233
66258
  const field = (_a = this._dataUnit) === null || _a === void 0 ? void 0 : _a.getField(cfgColumn.name);
66234
66259
  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;
66235
- if ((field === null || field === void 0 ? void 0 : field.userInterface) === core.UserInterface.SEARCH) {
66236
- return this.DEFAULT_MAX_SIZE;
66260
+ return this.getInitialColumnWidth(field === null || field === void 0 ? void 0 : field.userInterface, label);
66261
+ }
66262
+ getInitialColumnWidth(userInterface, label) {
66263
+ const columnWidthByLabel = this.getColumnWidthByLabel(label);
66264
+ const defaultWidth = this.getDefaultWidthByUserInterface(userInterface);
66265
+ if (!defaultWidth) {
66266
+ return columnWidthByLabel;
66267
+ }
66268
+ return Math.max(defaultWidth, columnWidthByLabel);
66269
+ }
66270
+ getDefaultWidthByUserInterface(userInterface) {
66271
+ if (!userInterface) {
66272
+ return undefined;
66237
66273
  }
66238
- return this.getColumnWidthByLabel(label);
66274
+ return GRID_COLUMN_DEFAULT_WIDTHS[userInterface];
66239
66275
  }
66240
66276
  getColumnWidthByLabel(label) {
66241
66277
  const labelSize = ((label === null || label === void 0 ? void 0 : label.length) || 0) * this.DEFAULT_FONT_SIZE + this.DEFAULT_ICON_SIZE;
@@ -66429,7 +66465,7 @@ class InMemoryFilterColumnDataSource {
66429
66465
  }
66430
66466
  }
66431
66467
 
66432
- 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)}}";
66468
+ 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)}";
66433
66469
 
66434
66470
  const windowInstace = window;
66435
66471
  const matches = (text, filter) => {
@@ -66482,6 +66518,7 @@ const EzGrid = class {
66482
66518
  this.useSearchColumn = true;
66483
66519
  this.suppressHorizontalScroll = false;
66484
66520
  this.mode = "complete";
66521
+ this.hidePagination = false;
66485
66522
  }
66486
66523
  /**
66487
66524
  * Aplica a definição de colunas.
@@ -66631,26 +66668,17 @@ const EzGrid = class {
66631
66668
  return;
66632
66669
  this._gridController.stopEdit();
66633
66670
  }
66671
+ /**
66672
+ * Manipula a mudança de página da grid.
66673
+ */
66674
+ async handlePageChange() {
66675
+ this.resetPaginationState();
66676
+ this._gridController.setFocusFirstRow();
66677
+ this.ezPageChangedChanged.emit();
66678
+ }
66634
66679
  observeConfig(config) {
66635
66680
  this._gridController.setColumnsState(config === null || config === void 0 ? void 0 : config.columns);
66636
66681
  }
66637
- updatePaginationTooltip() {
66638
- this.handleShowCancelPagination();
66639
- if (!this._refPaginationLabelTooltip)
66640
- return;
66641
- const alreadyDefined = this._refPaginationLabelTooltip.getAttribute('data-tooltip');
66642
- if (alreadyDefined) {
66643
- this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
66644
- }
66645
- }
66646
- observePaginationCounterMode(newValue) {
66647
- if (newValue === 'hidden') {
66648
- this._hidePaginationDescription();
66649
- }
66650
- if (newValue === 'show') {
66651
- this._showPaginationDescription();
66652
- }
66653
- }
66654
66682
  async observeModeChange(newMode = this.mode) {
66655
66683
  if (newMode === "simple") {
66656
66684
  this.canEdit = false;
@@ -66813,23 +66841,6 @@ const EzGrid = class {
66813
66841
  core.ElementIDUtils.addIDInfo(this._refPaginationControl, 'pagination', dtInfo);
66814
66842
  }
66815
66843
  }
66816
- handlePageChange() {
66817
- this.resetPaginationState();
66818
- this._gridController.setFocusFirstRow();
66819
- this.ezPageChangedChanged.emit();
66820
- }
66821
- previousPage() {
66822
- if (this.dataUnit) {
66823
- this.dataUnit.previousPage()
66824
- .then(() => this.handlePageChange());
66825
- }
66826
- }
66827
- nextPage() {
66828
- if (this.dataUnit) {
66829
- this.dataUnit.nextPage()
66830
- .then(() => this.handlePageChange());
66831
- }
66832
- }
66833
66844
  nextRecord() {
66834
66845
  if (this.dataUnit) {
66835
66846
  if (this.dataUnit.getSelectionInfo().records.length === 0) {
@@ -66849,38 +66860,6 @@ const EzGrid = class {
66849
66860
  this._paginationChangedByKeyboard = false;
66850
66861
  (_a = this._gridController) === null || _a === void 0 ? void 0 : _a.resetPaginationState();
66851
66862
  }
66852
- resolvePaginationClassMode() {
66853
- if (this.shouldPresentPaginationLabel())
66854
- return "pagination-expanded";
66855
- return "pagination-contracted";
66856
- }
66857
- async handleCancelPagination() {
66858
- var _a;
66859
- this.dataUnit.cancelPagination = true;
66860
- await ((_a = this._cancelPaginationPopoverElement) === null || _a === void 0 ? void 0 : _a.hide());
66861
- }
66862
- renderCancelPagination() {
66863
- return (index$1.h("ez-popover", { ref: (element) => (this._cancelPaginationPopoverElement = element), "overlay-type": 'none', autoClose: false }, index$1.h("div", { class: 'cancel-pagination' }, index$1.h("ez-icon", { iconName: "sync", size: "x-large", class: "spin" }), index$1.h("span", { onClick: () => this.handleCancelPagination(), class: 'cancel-pagination-btn' }, this.i18n("ez-grid.cancelPagination")))));
66864
- }
66865
- handleShowCancelPagination() {
66866
- var _a, _b, _c;
66867
- if (!this._hasToShowCancelPagination()) {
66868
- (_a = this._cancelPaginationPopoverElement) === null || _a === void 0 ? void 0 : _a.hide();
66869
- return;
66870
- }
66871
- if ((_b = this._cancelPaginationPopoverElement) === null || _b === void 0 ? void 0 : _b.opened)
66872
- return;
66873
- (_c = this._cancelPaginationPopoverElement) === null || _c === void 0 ? void 0 : _c.show("15px");
66874
- }
66875
- getPaginationControl() {
66876
- if (!this._paginationInfo)
66877
- return null;
66878
- const { currentPage, hasMore } = this._paginationInfo;
66879
- return (index$1.h("div", { class: `grid-header__container grid-header__pagination ${this.resolvePaginationClassMode()}`, ref: ref => (this._refPaginationControl = ref) }, this.renderCancelPagination(), index$1.h("div", { class: "ez-text ez-text--primary ez-text--medium ez-margin-right--medium", ref: (element) => (this._refPaginationLabel = element) }, index$1.h("span", { class: "grid-header__pagination-label" }, this.shouldPresentPaginationLabel() && index$1.h("strong", { class: "ez-text ez-text--primary ez-text--medium" }, this._getActualPageLabel()), this.shouldPresentPaginationLabel() && this._getRemainingPageLabel())), index$1.h("div", { id: "grid-pagination-tooltip", ref: (element) => (this._refPaginationLabelTooltip = element), class: "ez-flex ez-margin-right--medium", title: `${this._getActualPageLabel()} ${this._getRemainingPageLabel()}` }, index$1.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") }), index$1.h("ez-button", { size: "small", iconName: "chevron-right", mode: "icon", enabled: hasMore, onClick: () => this.nextPage(), label: this.i18n("ez-grid.nextPage") }))));
66880
- }
66881
- shouldPresentPaginationLabel() {
66882
- return this.paginationCounterMode === 'show' || this.paginationCounterMode === 'auto';
66883
- }
66884
66863
  componentDidLoad() {
66885
66864
  const _application = core.ApplicationContext.getContextValue("__SNK__APPLICATION__");
66886
66865
  this.enableLockManagerLoadingComp = (!_application || (_application === null || _application === void 0 ? void 0 : _application.enableLockManagerLoadingApp)) ? this.enableLockManagerLoadingComp : false;
@@ -66945,76 +66924,9 @@ const EzGrid = class {
66945
66924
  }
66946
66925
  this._paginationInfo = paginationInfo;
66947
66926
  }
66948
- _getActualPageLabel() {
66949
- const { firstRecord, lastRecord } = this._paginationInfo;
66950
- return `${firstRecord}-${lastRecord}`;
66951
- }
66952
- _getRemainingPageLabel() {
66953
- const { total, count } = this._paginationInfo;
66954
- return `${total == undefined ? this.i18n("ez-grid.remainingPageLabel", { count: count + 1 }) : this.i18n("ez-grid.remainingTotalLabel", { total })}`;
66955
- }
66956
- _hasToShowCancelPagination() {
66957
- var _a;
66958
- const { total, count } = (_a = this._paginationInfo) !== null && _a !== void 0 ? _a : {};
66959
- const hasMore = (total === undefined);
66960
- return !this.dataUnit.cancelPagination && hasMore && count > this.dataUnit.pageSize;
66961
- }
66962
- _getPaginationTooltip() {
66963
- return this._getActualPageLabel() + this._getRemainingPageLabel();
66964
- }
66965
- _initHeaderOverflowWatcher() {
66966
- var _a;
66967
- (_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
66968
- if (this._refPaginationControl)
66969
- this._headerOverflowWatcher = new core.OverflowWatcher(this.buildOverFlowWatcherParams());
66970
- }
66971
- buildOverFlowWatcherParams() {
66972
- return {
66973
- element: this._refPaginationControl,
66974
- callback: this.handleOverFlow.bind(this),
66975
- notOverFlow: ["grid-pagination-tooltip"]
66976
- };
66977
- }
66978
- handleOverFlow() {
66979
- if (!this._refPaginationLabel || !this._refPaginationControl)
66980
- return;
66981
- const controlWidth = this._refPaginationControl.clientWidth;
66982
- const labelWidth = this._refPaginationLabel.scrollWidth;
66983
- const buttonsElement = this._refPaginationControl.querySelector('#grid-pagination-tooltip');
66984
- const buttonsWidth = (buttonsElement === null || buttonsElement === void 0 ? void 0 : buttonsElement.clientWidth) || 0;
66985
- const totalMargins = this._getElementMargins(this._refPaginationLabel) + (buttonsElement ? this._getElementMargins(buttonsElement) : 0);
66986
- const paginationWidthWithoutDescription = labelWidth + buttonsWidth + totalMargins;
66987
- const paginationWidthWithDescription = paginationWidthWithoutDescription + this._getPaginationDescriptionWidth();
66988
- if (controlWidth > paginationWidthWithDescription) {
66989
- this._showPaginationDescription();
66990
- }
66991
- else if (controlWidth <= paginationWidthWithoutDescription) {
66992
- this._hidePaginationDescription();
66993
- }
66994
- }
66995
- _getPaginationDescriptionWidth() {
66996
- var _a;
66997
- return ((_a = this._refPaginationLabelTooltip) === null || _a === void 0 ? void 0 : _a.scrollWidth) || 0;
66998
- }
66999
- _getElementMargins(element) {
67000
- const style = getComputedStyle(element);
67001
- return parseFloat(style.marginLeft) + parseFloat(style.marginRight);
67002
- }
67003
- _hidePaginationDescription() {
67004
- this._refPaginationLabel.classList.add(core.OVERFLOWED_CLASS_NAME);
67005
- this._refPaginationLabelTooltip.setAttribute('data-flow', 'bottom');
67006
- this._refPaginationLabelTooltip.setAttribute('data-tooltip', this._getPaginationTooltip());
67007
- }
67008
- ;
67009
- _showPaginationDescription() {
67010
- this._refPaginationLabel.classList.remove(core.OVERFLOWED_CLASS_NAME);
67011
- this._refPaginationLabelTooltip.removeAttribute('data-flow');
67012
- this._refPaginationLabelTooltip.removeAttribute('data-tooltip');
67013
- }
67014
66927
  disconnectedCallback() {
67015
- var _a, _b;
67016
- (_a = this._headerOverflowWatcher) === null || _a === void 0 ? void 0 : _a.destroy();
67017
- (_b = this._gridController) === null || _b === void 0 ? void 0 : _b.destroy();
66928
+ var _a;
66929
+ (_a = this._gridController) === null || _a === void 0 ? void 0 : _a.destroy();
67018
66930
  this.removeShortcuts();
67019
66931
  }
67020
66932
  connectedCallback() {
@@ -67043,8 +66955,6 @@ const EzGrid = class {
67043
66955
  if (this.dataUnit && this._showSelectionCounter) {
67044
66956
  this.setSelection(this.dataUnit.getSelectionInfo());
67045
66957
  }
67046
- if (this.paginationCounterMode === 'auto')
67047
- this._initHeaderOverflowWatcher();
67048
66958
  }
67049
66959
  getDataSource() {
67050
66960
  if (!this.columnfilterDataSource) {
@@ -67056,7 +66966,7 @@ const EzGrid = class {
67056
66966
  if (this.mode === "simple") {
67057
66967
  return true;
67058
66968
  }
67059
- return !this._hasLeftButtons && !this._paginationInfo;
66969
+ return !this._hasLeftButtons;
67060
66970
  }
67061
66971
  resolveLeftHeaderClass() {
67062
66972
  if (this.paginationCounterMode == 'show')
@@ -67081,7 +66991,7 @@ const EzGrid = class {
67081
66991
  return;
67082
66992
  const { currentPage } = this._paginationInfo;
67083
66993
  if (currentPage > 0) {
67084
- this.previousPage();
66994
+ this._refGridPagination.previousPage();
67085
66995
  }
67086
66996
  }, { description: this.i18n("ez-grid.previousPage"), element: this._element })
67087
66997
  .bind("ctrl + alt + ArrowRight", () => {
@@ -67089,7 +66999,7 @@ const EzGrid = class {
67089
66999
  return;
67090
67000
  const { hasMore } = this._paginationInfo;
67091
67001
  if (hasMore) {
67092
- this.nextPage();
67002
+ this._refGridPagination.nextPage();
67093
67003
  }
67094
67004
  }, { description: this.i18n("ez-grid.nextPage"), element: this._element });
67095
67005
  if (this.useSearchColumn) {
@@ -67142,16 +67052,14 @@ const EzGrid = class {
67142
67052
  'ez-box ez-padding--small grid-header': true,
67143
67053
  'outline-mode': this.outlineMode,
67144
67054
  'shadow-mode': !this.outlineMode && !this.hideHeader(),
67145
- }, tabindex: "0" }, index$1.h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), index$1.h("div", { class: "grid-header__position" }, index$1.h("div", { class: `grid-header__container grid-header__left-container ${this.resolveLeftHeaderClass()}` }, index$1.h("slot", { name: "leftButtons" })), this.getPaginationControl())), index$1.h("ez-popover", { ref: elem => (this._ezPopoverSearchColumn = elem), overlayType: "none" }, this.renderFieldSearchColumn()), index$1.h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
67055
+ }, tabindex: "0" }, index$1.h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), index$1.h("div", { class: "grid-header__position" }, index$1.h("div", { class: `grid-header__container grid-header__left-container ${this.resolveLeftHeaderClass()}` }, index$1.h("slot", { name: "leftButtons" })))), index$1.h("ez-popover", { ref: elem => (this._ezPopoverSearchColumn = elem), overlayType: "none" }, this.renderFieldSearchColumn()), index$1.h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
67146
67056
  ${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
67147
- ` }, index$1.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) })), index$1.h("div", { class: "grid__footer" }, index$1.h("slot", { name: "footer" }))));
67057
+ ` }, index$1.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) })), index$1.h("div", { class: "grid__footer" }, (this.mode !== "simple" && !this.hidePagination) && (index$1.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() })), index$1.h("slot", { name: "footer" }))));
67148
67058
  }
67149
67059
  static get assetsDirs() { return ["../assets"]; }
67150
67060
  get _element() { return index$1.getElement(this); }
67151
67061
  static get watchers() { return {
67152
67062
  "config": ["observeConfig"],
67153
- "_paginationInfo": ["updatePaginationTooltip"],
67154
- "paginationCounterMode": ["observePaginationCounterMode"],
67155
67063
  "mode": ["observeModeChange"]
67156
67064
  }; }
67157
67065
  };
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-a7b0c73d.js');
6
6
  const core = require('@sankhyalabs/core');
7
7
  const EzScrollDirection = require('./EzScrollDirection-b2c99895.js');
8
- const index$1 = require('./index-350d0fa0.js');
8
+ const index$1 = require('./index-a8537087.js');
9
9
 
10
10
  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}";
11
11