@zeedhi/common 3.0.1 → 3.0.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 (383) hide show
  1. package/coverage/clover.xml +1858 -3152
  2. package/coverage/coverage-final.json +143 -172
  3. package/coverage/lcov-report/index.html +40 -130
  4. package/coverage/lcov-report/src/components/index.html +5 -5
  5. package/coverage/lcov-report/src/components/index.ts.html +154 -160
  6. package/coverage/lcov-report/src/components/zd-alert/alert.ts.html +3 -3
  7. package/coverage/lcov-report/src/components/zd-alert/index.html +1 -1
  8. package/coverage/lcov-report/src/components/zd-badge/badge.ts.html +3 -3
  9. package/coverage/lcov-report/src/components/zd-badge/index.html +1 -1
  10. package/coverage/lcov-report/src/components/zd-breadcrumbs/breadcrumbs.ts.html +3 -3
  11. package/coverage/lcov-report/src/components/zd-breadcrumbs/index.html +1 -1
  12. package/coverage/lcov-report/src/components/zd-button/button.ts.html +35 -35
  13. package/coverage/lcov-report/src/components/zd-button/index.html +1 -1
  14. package/coverage/lcov-report/src/components/zd-button-group/button-group.ts.html +3 -3
  15. package/coverage/lcov-report/src/components/zd-button-group/index.html +1 -1
  16. package/coverage/lcov-report/src/components/zd-card/card.ts.html +3 -3
  17. package/coverage/lcov-report/src/components/zd-card/index.html +1 -1
  18. package/coverage/lcov-report/src/components/zd-carousel/carousel.ts.html +3 -3
  19. package/coverage/lcov-report/src/components/zd-carousel/index.html +1 -1
  20. package/coverage/lcov-report/src/components/zd-checkbox/checkbox.ts.html +5 -5
  21. package/coverage/lcov-report/src/components/zd-checkbox/index.html +1 -1
  22. package/coverage/lcov-report/src/components/zd-checkbox-multiple/checkbox-multiple.ts.html +6 -6
  23. package/coverage/lcov-report/src/components/zd-checkbox-multiple/index.html +1 -1
  24. package/coverage/lcov-report/src/components/zd-chip/chip.ts.html +3 -3
  25. package/coverage/lcov-report/src/components/zd-chip/index.html +1 -1
  26. package/coverage/lcov-report/src/components/zd-code-viewer/code-viewer.ts.html +4 -4
  27. package/coverage/lcov-report/src/components/zd-code-viewer/index.html +1 -1
  28. package/coverage/lcov-report/src/components/zd-col/col.ts.html +3 -3
  29. package/coverage/lcov-report/src/components/zd-col/index.html +1 -1
  30. package/coverage/lcov-report/src/components/zd-collapse-card/collapse-card.ts.html +3 -3
  31. package/coverage/lcov-report/src/components/zd-collapse-card/index.html +1 -1
  32. package/coverage/lcov-report/src/components/zd-component/child-not-found.ts.html +2 -2
  33. package/coverage/lcov-report/src/components/zd-component/component-render.ts.html +5 -5
  34. package/coverage/lcov-report/src/components/zd-component/component.ts.html +63 -63
  35. package/coverage/lcov-report/src/components/zd-component/index.html +1 -1
  36. package/coverage/lcov-report/src/components/zd-container/container.ts.html +3 -3
  37. package/coverage/lcov-report/src/components/zd-container/index.html +1 -1
  38. package/coverage/lcov-report/src/components/zd-currency/currency.ts.html +9 -9
  39. package/coverage/lcov-report/src/components/zd-currency/index.html +1 -1
  40. package/coverage/lcov-report/src/components/zd-date-input/date-input.ts.html +33 -15
  41. package/coverage/lcov-report/src/components/zd-date-input/index.html +7 -7
  42. package/coverage/lcov-report/src/components/zd-date-range/date-range.ts.html +146 -38
  43. package/coverage/lcov-report/src/components/zd-date-range/index.html +9 -9
  44. package/coverage/lcov-report/src/components/zd-dialog/dialog.ts.html +30 -30
  45. package/coverage/lcov-report/src/components/zd-dialog/index.html +1 -1
  46. package/coverage/lcov-report/src/components/zd-divider/divider.ts.html +3 -3
  47. package/coverage/lcov-report/src/components/zd-divider/index.html +1 -1
  48. package/coverage/lcov-report/src/components/zd-dropdown/dropdown.ts.html +3 -3
  49. package/coverage/lcov-report/src/components/zd-dropdown/index.html +1 -1
  50. package/coverage/lcov-report/src/components/zd-footer/footer.ts.html +3 -3
  51. package/coverage/lcov-report/src/components/zd-footer/index.html +1 -1
  52. package/coverage/lcov-report/src/components/zd-form/form.ts.html +22 -22
  53. package/coverage/lcov-report/src/components/zd-form/index.html +1 -1
  54. package/coverage/lcov-report/src/components/zd-frame/frame.ts.html +7 -7
  55. package/coverage/lcov-report/src/components/zd-frame/index.html +1 -1
  56. package/coverage/lcov-report/src/components/zd-frame-page/frame-page.ts.html +4 -4
  57. package/coverage/lcov-report/src/components/zd-frame-page/index.html +1 -1
  58. package/coverage/lcov-report/src/components/zd-grid/data-navigator.ts.html +3 -3
  59. package/coverage/lcov-report/src/components/zd-grid/data-selector.ts.html +4 -4
  60. package/coverage/lcov-report/src/components/zd-grid/grid-column.ts.html +11 -11
  61. package/coverage/lcov-report/src/components/zd-grid/grid-events.ts.html +4 -4
  62. package/coverage/lcov-report/src/components/zd-grid/grid.ts.html +85 -85
  63. package/coverage/lcov-report/src/components/zd-grid/index.html +1 -1
  64. package/coverage/lcov-report/src/components/zd-grid/index.ts.html +12 -12
  65. package/coverage/lcov-report/src/components/zd-grid/iterable-table.ts.html +11 -11
  66. package/coverage/lcov-report/src/components/zd-grid/keymap-merger.ts.html +15 -15
  67. package/coverage/lcov-report/src/components/zd-grid/keymap-navigation.ts.html +3 -3
  68. package/coverage/lcov-report/src/components/zd-grid/table-action-builder.ts.html +5 -5
  69. package/coverage/lcov-report/src/components/zd-grid/view-navigator.ts.html +3 -3
  70. package/coverage/lcov-report/src/components/zd-grid-editable/data-editor-with-add.ts.html +32 -32
  71. package/coverage/lcov-report/src/components/zd-grid-editable/data-editor.ts.html +15 -15
  72. package/coverage/lcov-report/src/components/zd-grid-editable/errors/index.html +1 -1
  73. package/coverage/lcov-report/src/components/zd-grid-editable/errors/index.ts.html +3 -3
  74. package/coverage/lcov-report/src/components/zd-grid-editable/errors/not-editing.ts.html +2 -2
  75. package/coverage/lcov-report/src/components/zd-grid-editable/errors/row-not-found.ts.html +2 -2
  76. package/coverage/lcov-report/src/components/zd-grid-editable/grid-column-editable.ts.html +7 -7
  77. package/coverage/lcov-report/src/components/zd-grid-editable/grid-editable-controller.ts.html +3 -3
  78. package/coverage/lcov-report/src/components/zd-grid-editable/grid-editable-events.ts.html +5 -5
  79. package/coverage/lcov-report/src/components/zd-grid-editable/grid-editable.ts.html +9 -9
  80. package/coverage/lcov-report/src/components/zd-grid-editable/index.html +5 -5
  81. package/coverage/lcov-report/src/components/zd-grid-editable/index.ts.html +13 -10
  82. package/coverage/lcov-report/src/components/zd-grid-editable/keymap-editing.ts.html +3 -3
  83. package/coverage/lcov-report/src/components/zd-header/header.ts.html +3 -3
  84. package/coverage/lcov-report/src/components/zd-header/index.html +1 -1
  85. package/coverage/lcov-report/src/components/zd-icon/icon.ts.html +3 -3
  86. package/coverage/lcov-report/src/components/zd-icon/index.html +1 -1
  87. package/coverage/lcov-report/src/components/zd-image/image.ts.html +3 -3
  88. package/coverage/lcov-report/src/components/zd-image/index.html +1 -1
  89. package/coverage/lcov-report/src/components/zd-increment/increment.ts.html +5 -5
  90. package/coverage/lcov-report/src/components/zd-increment/index.html +1 -1
  91. package/coverage/lcov-report/src/components/zd-input/index.html +1 -1
  92. package/coverage/lcov-report/src/components/zd-input/input-factory.ts.html +4 -4
  93. package/coverage/lcov-report/src/components/zd-input/input.ts.html +48 -48
  94. package/coverage/lcov-report/src/components/zd-iterable/column-not-found.ts.html +2 -2
  95. package/coverage/lcov-report/src/components/zd-iterable/column.ts.html +96 -96
  96. package/coverage/lcov-report/src/components/zd-iterable/conditions-manager.ts.html +24 -24
  97. package/coverage/lcov-report/src/components/zd-iterable/index.html +15 -15
  98. package/coverage/lcov-report/src/components/zd-iterable/iterable-columns-button-controller.ts.html +3 -3
  99. package/coverage/lcov-report/src/components/zd-iterable/iterable-columns-button.ts.html +15 -15
  100. package/coverage/lcov-report/src/components/zd-iterable/iterable-controller.ts.html +4 -4
  101. package/coverage/lcov-report/src/components/zd-iterable/iterable-page-component.ts.html +5 -5
  102. package/coverage/lcov-report/src/components/zd-iterable/iterable-page-info.ts.html +3 -3
  103. package/coverage/lcov-report/src/components/zd-iterable/iterable-page-size.ts.html +5 -5
  104. package/coverage/lcov-report/src/components/zd-iterable/iterable-pagination.ts.html +3 -3
  105. package/coverage/lcov-report/src/components/zd-iterable/iterable.ts.html +43 -43
  106. package/coverage/lcov-report/src/components/zd-iterable/search.ts.html +8 -8
  107. package/coverage/lcov-report/src/components/zd-iterable-component-render/index.html +1 -1
  108. package/coverage/lcov-report/src/components/zd-iterable-component-render/iterable-component-render.ts.html +5 -5
  109. package/coverage/lcov-report/src/components/zd-layout/index.html +1 -1
  110. package/coverage/lcov-report/src/components/zd-layout/layout.ts.html +3 -3
  111. package/coverage/lcov-report/src/components/zd-list/index.html +1 -1
  112. package/coverage/lcov-report/src/components/zd-list/item-not-found.ts.html +2 -2
  113. package/coverage/lcov-report/src/components/zd-list/list-group.ts.html +4 -4
  114. package/coverage/lcov-report/src/components/zd-list/list-item.ts.html +3 -3
  115. package/coverage/lcov-report/src/components/zd-list/list.ts.html +4 -4
  116. package/coverage/lcov-report/src/components/zd-loading/index.html +1 -1
  117. package/coverage/lcov-report/src/components/zd-loading/loading.ts.html +3 -3
  118. package/coverage/lcov-report/src/components/zd-login/index.html +1 -1
  119. package/coverage/lcov-report/src/components/zd-login/login-button.ts.html +4 -4
  120. package/coverage/lcov-report/src/components/zd-login/login.ts.html +3 -3
  121. package/coverage/lcov-report/src/components/zd-main/index.html +1 -1
  122. package/coverage/lcov-report/src/components/zd-main/main.ts.html +3 -3
  123. package/coverage/lcov-report/src/components/zd-master-detail/detail-not-found.ts.html +3 -3
  124. package/coverage/lcov-report/src/components/zd-master-detail/index.html +1 -1
  125. package/coverage/lcov-report/src/components/zd-master-detail/master-detail.ts.html +6 -6
  126. package/coverage/lcov-report/src/components/zd-master-detail/master-not-found.ts.html +3 -3
  127. package/coverage/lcov-report/src/components/zd-menu/index.html +1 -1
  128. package/coverage/lcov-report/src/components/zd-menu/menu-button.ts.html +4 -4
  129. package/coverage/lcov-report/src/components/zd-menu/menu-group.ts.html +3 -3
  130. package/coverage/lcov-report/src/components/zd-menu/menu-link.ts.html +3 -3
  131. package/coverage/lcov-report/src/components/zd-menu/menu-separator.ts.html +3 -3
  132. package/coverage/lcov-report/src/components/zd-menu/menu.ts.html +4 -4
  133. package/coverage/lcov-report/src/components/zd-modal/index.html +1 -1
  134. package/coverage/lcov-report/src/components/zd-modal/modal-close-button.ts.html +4 -4
  135. package/coverage/lcov-report/src/components/zd-modal/modal.ts.html +27 -27
  136. package/coverage/lcov-report/src/components/zd-month/index.html +1 -1
  137. package/coverage/lcov-report/src/components/zd-month/month.ts.html +6 -6
  138. package/coverage/lcov-report/src/components/zd-number-input/index.html +1 -1
  139. package/coverage/lcov-report/src/components/zd-number-input/number-input.ts.html +9 -9
  140. package/coverage/lcov-report/src/components/zd-password/index.html +1 -1
  141. package/coverage/lcov-report/src/components/zd-password/password.ts.html +7 -7
  142. package/coverage/lcov-report/src/components/zd-progress/index.html +1 -1
  143. package/coverage/lcov-report/src/components/zd-progress/progress.ts.html +3 -3
  144. package/coverage/lcov-report/src/components/zd-radio/index.html +1 -1
  145. package/coverage/lcov-report/src/components/zd-radio/radio.ts.html +6 -6
  146. package/coverage/lcov-report/src/components/zd-row/index.html +1 -1
  147. package/coverage/lcov-report/src/components/zd-row/row.ts.html +3 -3
  148. package/coverage/lcov-report/src/components/zd-select/index.html +1 -1
  149. package/coverage/lcov-report/src/components/zd-select/select.ts.html +9 -9
  150. package/coverage/lcov-report/src/components/zd-select-multiple/index.html +1 -1
  151. package/coverage/lcov-report/src/components/zd-select-multiple/select-multiple.ts.html +5 -5
  152. package/coverage/lcov-report/src/components/zd-svg-map/index.html +1 -1
  153. package/coverage/lcov-report/src/components/zd-svg-map/svg-map.ts.html +4 -4
  154. package/coverage/lcov-report/src/components/zd-switch/index.html +1 -1
  155. package/coverage/lcov-report/src/components/zd-switch/switch.ts.html +5 -5
  156. package/coverage/lcov-report/src/components/zd-table/index.html +1 -1
  157. package/coverage/lcov-report/src/components/zd-table/table.ts.html +4 -4
  158. package/coverage/lcov-report/src/components/zd-tabs/index.html +1 -1
  159. package/coverage/lcov-report/src/components/zd-tabs/tab-not-found.ts.html +2 -2
  160. package/coverage/lcov-report/src/components/zd-tabs/tab.ts.html +3 -3
  161. package/coverage/lcov-report/src/components/zd-tabs/tabs.ts.html +5 -5
  162. package/coverage/lcov-report/src/components/zd-tag/index.html +1 -1
  163. package/coverage/lcov-report/src/components/zd-tag/tag.ts.html +4 -4
  164. package/coverage/lcov-report/src/components/zd-text/index.html +1 -1
  165. package/coverage/lcov-report/src/components/zd-text/text.ts.html +10 -10
  166. package/coverage/lcov-report/src/components/zd-text-input/index.html +1 -1
  167. package/coverage/lcov-report/src/components/zd-text-input/text-input.ts.html +25 -16
  168. package/coverage/lcov-report/src/components/zd-textarea/index.html +1 -1
  169. package/coverage/lcov-report/src/components/zd-textarea/textarea.ts.html +5 -5
  170. package/coverage/lcov-report/src/components/zd-time/index.html +7 -7
  171. package/coverage/lcov-report/src/components/zd-time/time-format-selector.ts.html +2 -2
  172. package/coverage/lcov-report/src/components/zd-time/time.ts.html +32 -14
  173. package/coverage/lcov-report/src/components/zd-toggleable/index.html +1 -1
  174. package/coverage/lcov-report/src/components/zd-toggleable/toggleable.ts.html +5 -5
  175. package/coverage/lcov-report/src/components/zd-tooltip/index.html +1 -1
  176. package/coverage/lcov-report/src/components/zd-tooltip/tooltip.ts.html +3 -3
  177. package/coverage/lcov-report/src/components/zd-tree/index.html +1 -1
  178. package/coverage/lcov-report/src/components/zd-tree/tree.ts.html +7 -7
  179. package/coverage/lcov-report/src/components/zd-tree-grid/index.html +1 -1
  180. package/coverage/lcov-report/src/components/zd-tree-grid/index.ts.html +7 -7
  181. package/coverage/lcov-report/src/components/zd-tree-grid/iterable-tree.ts.html +2 -2
  182. package/coverage/lcov-report/src/components/zd-tree-grid/keymap-tree.ts.html +2 -2
  183. package/coverage/lcov-report/src/components/zd-tree-grid/tree-data-navigator.ts.html +3 -3
  184. package/coverage/lcov-report/src/components/zd-tree-grid/tree-data-selector.ts.html +3 -3
  185. package/coverage/lcov-report/src/components/zd-tree-grid/tree-grid.ts.html +11 -11
  186. package/coverage/lcov-report/src/error/delete-rows.ts.html +3 -3
  187. package/coverage/lcov-report/src/error/index.html +9 -24
  188. package/coverage/lcov-report/src/{utils/is-nil.ts.html → error/index.ts.html} +13 -13
  189. package/coverage/lcov-report/src/error/non-initialized.ts.html +5 -5
  190. package/coverage/lcov-report/src/error/zeedhi-error.ts.html +3 -3
  191. package/coverage/lcov-report/src/index.html +5 -5
  192. package/coverage/lcov-report/src/index.ts.html +13 -13
  193. package/coverage/lcov-report/src/services/index.html +1 -1
  194. package/coverage/lcov-report/src/services/index.ts.html +5 -5
  195. package/coverage/lcov-report/src/services/zd-alert/alert-queue.ts.html +3 -3
  196. package/coverage/lcov-report/src/services/zd-alert/alert-replace.ts.html +3 -3
  197. package/coverage/lcov-report/src/services/zd-alert/alert-service.ts.html +5 -5
  198. package/coverage/lcov-report/src/services/zd-alert/alert-stack.ts.html +3 -3
  199. package/coverage/lcov-report/src/services/zd-alert/index.html +1 -1
  200. package/coverage/lcov-report/src/services/zd-alert/index.ts.html +6 -6
  201. package/coverage/lcov-report/src/services/zd-dialog/dialog-service.ts.html +4 -4
  202. package/coverage/lcov-report/src/services/zd-dialog/index.html +1 -1
  203. package/coverage/lcov-report/src/services/zd-loading/index.html +1 -1
  204. package/coverage/lcov-report/src/services/zd-loading/loading-service.ts.html +2 -2
  205. package/coverage/lcov-report/src/services/zd-modal/index.html +1 -1
  206. package/coverage/lcov-report/src/services/zd-modal/modal-service.ts.html +10 -10
  207. package/coverage/lcov-report/src/utils/data-value-out/data-value-out.ts.html +3 -3
  208. package/coverage/lcov-report/src/utils/data-value-out/index.html +1 -1
  209. package/coverage/lcov-report/src/utils/data-value-out/index.ts.html +3 -3
  210. package/coverage/lcov-report/src/utils/datasource-searcher/datasource-searcher.ts.html +3 -3
  211. package/coverage/lcov-report/src/utils/datasource-searcher/index.html +1 -1
  212. package/coverage/lcov-report/src/utils/datasource-searcher/index.ts.html +3 -3
  213. package/coverage/lcov-report/src/utils/icons/icons.ts.html +6 -6
  214. package/coverage/lcov-report/src/utils/icons/index.html +1 -1
  215. package/coverage/lcov-report/src/utils/index.html +7 -22
  216. package/coverage/lcov-report/src/utils/index.ts.html +10 -19
  217. package/coverage/lcov-report/src/utils/omit/index.html +1 -1
  218. package/coverage/lcov-report/src/utils/omit/omit.ts.html +2 -2
  219. package/coverage/lcov-report/src/utils/theme/index.html +1 -1
  220. package/coverage/lcov-report/src/utils/theme/theme.ts.html +4 -4
  221. package/coverage/lcov-report/src/utils/tree-data-structure/index.html +1 -1
  222. package/coverage/lcov-report/src/utils/tree-data-structure/index.ts.html +3 -3
  223. package/coverage/lcov-report/src/utils/tree-data-structure/tree-data-structure.ts.html +2 -2
  224. package/coverage/lcov-report/src/utils/unique-by/index.html +1 -1
  225. package/coverage/lcov-report/src/utils/unique-by/unique-by.ts.html +3 -3
  226. package/coverage/lcov-report/tests/unit/components/zd-component/ComponentMock.ts.html +1 -1
  227. package/coverage/lcov-report/tests/unit/components/zd-component/index.html +1 -1
  228. package/coverage/lcov.info +2471 -5080
  229. package/dist/types/components/index.d.ts +0 -1
  230. package/dist/types/components/zd-date-input/date-input.d.ts +1 -0
  231. package/dist/types/components/zd-date-range/date-range.d.ts +8 -2
  232. package/dist/types/components/zd-grid-editable/index.d.ts +1 -0
  233. package/dist/types/components/zd-text-input/interfaces.d.ts +1 -0
  234. package/dist/types/components/zd-text-input/text-input.d.ts +1 -0
  235. package/dist/types/components/zd-time/time.d.ts +1 -0
  236. package/dist/types/error/index.d.ts +1 -0
  237. package/dist/types/index.d.ts +2 -1
  238. package/dist/types/utils/index.d.ts +0 -3
  239. package/dist/zd-common.js +187 -3433
  240. package/dist/zd-common.min.js +187 -3433
  241. package/package.json +3 -3
  242. package/src/components/index.ts +0 -2
  243. package/src/components/zd-date-input/date-input.ts +6 -0
  244. package/src/components/zd-date-range/date-range.ts +47 -11
  245. package/src/components/zd-grid-editable/index.ts +1 -0
  246. package/src/components/zd-text-input/interfaces.ts +1 -0
  247. package/src/components/zd-text-input/text-input.ts +3 -0
  248. package/src/components/zd-time/time.ts +7 -1
  249. package/src/error/index.ts +1 -0
  250. package/src/index.ts +2 -2
  251. package/src/utils/index.ts +0 -3
  252. package/coverage/lcov-report/src/components/tek-grid/columns-searcher.ts.html +0 -151
  253. package/coverage/lcov-report/src/components/tek-grid/dynamic-filter-datasource-factory.ts.html +0 -145
  254. package/coverage/lcov-report/src/components/tek-grid/filter-helper.ts.html +0 -145
  255. package/coverage/lcov-report/src/components/tek-grid/grid-filter-button.ts.html +0 -1351
  256. package/coverage/lcov-report/src/components/tek-grid/grouped-data-manager.ts.html +0 -1429
  257. package/coverage/lcov-report/src/components/tek-grid/grouped-data-selector.ts.html +0 -205
  258. package/coverage/lcov-report/src/components/tek-grid/grouped-view-navigator.ts.html +0 -340
  259. package/coverage/lcov-report/src/components/tek-grid/index.html +0 -326
  260. package/coverage/lcov-report/src/components/tek-grid/index.ts.html +0 -139
  261. package/coverage/lcov-report/src/components/tek-grid/interfaces.ts.html +0 -1072
  262. package/coverage/lcov-report/src/components/tek-grid/keymap-grouped.ts.html +0 -148
  263. package/coverage/lcov-report/src/components/tek-grid/layout-options.ts.html +0 -829
  264. package/coverage/lcov-report/src/components/tek-grid/tek-datasource/index.html +0 -161
  265. package/coverage/lcov-report/src/components/tek-grid/tek-datasource/index.ts.html +0 -94
  266. package/coverage/lcov-report/src/components/tek-grid/tek-datasource/interfaces.ts.html +0 -193
  267. package/coverage/lcov-report/src/components/tek-grid/tek-datasource/tek-memory-datasource.ts.html +0 -1027
  268. package/coverage/lcov-report/src/components/tek-grid/tek-datasource/tek-rest-datasource.ts.html +0 -757
  269. package/coverage/lcov-report/src/components/tek-grid/tek-grid-column.ts.html +0 -664
  270. package/coverage/lcov-report/src/components/tek-grid/tek-grid-columns-button/index.html +0 -131
  271. package/coverage/lcov-report/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.ts.html +0 -169
  272. package/coverage/lcov-report/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.ts.html +0 -196
  273. package/coverage/lcov-report/src/components/tek-grid/tek-grid-controller.ts.html +0 -505
  274. package/coverage/lcov-report/src/components/tek-grid/tek-grid-events.ts.html +0 -400
  275. package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.ts.html +0 -163
  276. package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.html +0 -146
  277. package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.ts.html +0 -94
  278. package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.ts.html +0 -340
  279. package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/index.html +0 -131
  280. package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/index.ts.html +0 -91
  281. package/coverage/lcov-report/src/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.ts.html +0 -1186
  282. package/coverage/lcov-report/src/components/tek-grid/tek-grid.ts.html +0 -3451
  283. package/coverage/lcov-report/src/components/zd-code-editor/code-editor.ts.html +0 -1045
  284. package/coverage/lcov-report/src/components/zd-code-editor/index.html +0 -116
  285. package/coverage/lcov-report/src/components/zd-field-group/field-group.ts.html +0 -325
  286. package/coverage/lcov-report/src/components/zd-field-group/index.html +0 -116
  287. package/coverage/lcov-report/src/error/tek-grid-delete-rows.ts.html +0 -130
  288. package/coverage/lcov-report/src/error/teknisa-common-error.ts.html +0 -109
  289. package/coverage/lcov-report/src/utils/is-filled-object/index.html +0 -116
  290. package/coverage/lcov-report/src/utils/is-filled-object/is-filled-object.ts.html +0 -100
  291. package/coverage/lcov-report/tests/unit/__helpers__/component-event-helper.ts.html +0 -106
  292. package/coverage/lcov-report/tests/unit/__helpers__/flush-promises-helper.ts.html +0 -94
  293. package/coverage/lcov-report/tests/unit/__helpers__/index.html +0 -146
  294. package/coverage/lcov-report/tests/unit/__helpers__/mock-http-get-helper.ts.html +0 -172
  295. package/dist/types/components/tek-breadcrumb-header/breadcrumb-header.d.ts +0 -14
  296. package/dist/types/components/tek-breadcrumb-header/interfaces.d.ts +0 -7
  297. package/dist/types/components/tek-grid/columns-searcher.d.ts +0 -5
  298. package/dist/types/components/tek-grid/dynamic-filter-datasource-factory.d.ts +0 -6
  299. package/dist/types/components/tek-grid/filter-helper.d.ts +0 -7
  300. package/dist/types/components/tek-grid/grid-filter-button.d.ts +0 -27
  301. package/dist/types/components/tek-grid/grouped-data-manager.d.ts +0 -82
  302. package/dist/types/components/tek-grid/grouped-data-selector.d.ts +0 -7
  303. package/dist/types/components/tek-grid/grouped-view-navigator.d.ts +0 -14
  304. package/dist/types/components/tek-grid/index.d.ts +0 -18
  305. package/dist/types/components/tek-grid/interfaces.d.ts +0 -259
  306. package/dist/types/components/tek-grid/keymap-grouped.d.ts +0 -7
  307. package/dist/types/components/tek-grid/layout-options.d.ts +0 -39
  308. package/dist/types/components/tek-grid/tek-datasource/index.d.ts +0 -3
  309. package/dist/types/components/tek-grid/tek-datasource/interfaces.d.ts +0 -16
  310. package/dist/types/components/tek-grid/tek-datasource/tek-memory-datasource.d.ts +0 -93
  311. package/dist/types/components/tek-grid/tek-datasource/tek-rest-datasource.d.ts +0 -95
  312. package/dist/types/components/tek-grid/tek-grid-column.d.ts +0 -42
  313. package/dist/types/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.d.ts +0 -8
  314. package/dist/types/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.d.ts +0 -12
  315. package/dist/types/components/tek-grid/tek-grid-controller.d.ts +0 -31
  316. package/dist/types/components/tek-grid/tek-grid-events.d.ts +0 -31
  317. package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.d.ts +0 -17
  318. package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/index.d.ts +0 -3
  319. package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.d.ts +0 -5
  320. package/dist/types/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.d.ts +0 -12
  321. package/dist/types/components/tek-grid/tek-grid-toolbar-provider/index.d.ts +0 -2
  322. package/dist/types/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.d.ts +0 -23
  323. package/dist/types/components/tek-grid/tek-grid.d.ts +0 -220
  324. package/dist/types/components/zd-field-group/field-group.d.ts +0 -53
  325. package/dist/types/components/zd-field-group/interfaces.d.ts +0 -16
  326. package/dist/types/components/zd-number/interfaces.d.ts +0 -8
  327. package/dist/types/components/zd-number/number.d.ts +0 -43
  328. package/dist/types/error/tek-grid-delete-rows.d.ts +0 -7
  329. package/dist/types/error/teknisa-common-error.d.ts +0 -6
  330. package/dist/types/utils/config/config.d.ts +0 -7
  331. package/dist/types/utils/is-filled-object/is-filled-object.d.ts +0 -2
  332. package/dist/types/utils/is-nil.d.ts +0 -1
  333. package/src/components/tek-grid/columns-searcher.ts +0 -22
  334. package/src/components/tek-grid/dynamic-filter-datasource-factory.ts +0 -20
  335. package/src/components/tek-grid/filter-helper.ts +0 -20
  336. package/src/components/tek-grid/grid-filter-button.ts +0 -422
  337. package/src/components/tek-grid/grouped-data-manager.ts +0 -448
  338. package/src/components/tek-grid/grouped-data-selector.ts +0 -40
  339. package/src/components/tek-grid/grouped-view-navigator.ts +0 -85
  340. package/src/components/tek-grid/index.ts +0 -18
  341. package/src/components/tek-grid/interfaces.ts +0 -329
  342. package/src/components/tek-grid/keymap-grouped.ts +0 -21
  343. package/src/components/tek-grid/layout-options.ts +0 -248
  344. package/src/components/tek-grid/tek-datasource/index.ts +0 -3
  345. package/src/components/tek-grid/tek-datasource/interfaces.ts +0 -36
  346. package/src/components/tek-grid/tek-datasource/tek-memory-datasource.ts +0 -314
  347. package/src/components/tek-grid/tek-datasource/tek-rest-datasource.ts +0 -224
  348. package/src/components/tek-grid/tek-grid-column.ts +0 -193
  349. package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button-controller.ts +0 -28
  350. package/src/components/tek-grid/tek-grid-columns-button/tek-grid-columns-button.ts +0 -37
  351. package/src/components/tek-grid/tek-grid-controller.ts +0 -140
  352. package/src/components/tek-grid/tek-grid-events.ts +0 -105
  353. package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/button-option.ts +0 -26
  354. package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/index.ts +0 -3
  355. package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/interfaces.ts +0 -6
  356. package/src/components/tek-grid/tek-grid-toolbar-provider/export-options/multi-option.ts +0 -85
  357. package/src/components/tek-grid/tek-grid-toolbar-provider/index.ts +0 -2
  358. package/src/components/tek-grid/tek-grid-toolbar-provider/tek-grid-toolbar-provider.ts +0 -367
  359. package/src/components/tek-grid/tek-grid.ts +0 -1122
  360. package/src/error/tek-grid-delete-rows.ts +0 -15
  361. package/src/error/teknisa-common-error.ts +0 -8
  362. package/src/utils/config/config.ts +0 -8
  363. package/src/utils/is-filled-object/is-filled-object.ts +0 -5
  364. package/src/utils/is-nil.ts +0 -3
  365. package/tests/unit/components/tek-grid/button-option.spec.ts +0 -49
  366. package/tests/unit/components/tek-grid/columns-searcher.spec.ts +0 -112
  367. package/tests/unit/components/tek-grid/dynamic-filter-datasource-factory.spec.ts +0 -90
  368. package/tests/unit/components/tek-grid/filter-helper.spec.ts +0 -52
  369. package/tests/unit/components/tek-grid/grid-filter-button.spec.ts +0 -842
  370. package/tests/unit/components/tek-grid/grouped-data-manager.spec.ts +0 -593
  371. package/tests/unit/components/tek-grid/grouped-data-selector.spec.ts +0 -136
  372. package/tests/unit/components/tek-grid/grouped-view-navigator.spec.ts +0 -244
  373. package/tests/unit/components/tek-grid/keymap-grouped.spec.ts +0 -20
  374. package/tests/unit/components/tek-grid/layout-options.spec.ts +0 -1020
  375. package/tests/unit/components/tek-grid/multi-option.spec.ts +0 -139
  376. package/tests/unit/components/tek-grid/tek-grid-column.spec.ts +0 -312
  377. package/tests/unit/components/tek-grid/tek-grid-columns-button.spec.ts +0 -228
  378. package/tests/unit/components/tek-grid/tek-grid-controller.spec.ts +0 -253
  379. package/tests/unit/components/tek-grid/tek-grid-events.spec.ts +0 -186
  380. package/tests/unit/components/tek-grid/tek-grid-toolbar-provider.spec.ts +0 -34
  381. package/tests/unit/components/tek-grid/tek-grid.spec.ts +0 -895
  382. package/tests/unit/components/tek-grid/tek-memory-datasource.spec.ts +0 -482
  383. package/tests/unit/components/tek-grid/tek-rest-datasource.spec.ts +0 -422
package/dist/zd-common.js CHANGED
@@ -1,4 +1,6 @@
1
- import { Metadata, Utils, DatasourceFactory, AccessorManager, Event, KeyMap, FormatterParserProvider, Validation, Mask, Accessor, Loader, dayjs, Config, I18n, DateHelper, Router, MethodNotAssignedError, Http, Cookie, ViewService, InstanceNotFoundError, MemoryDatasource, URL, RestDatasource, Messages } from '@zeedhi/core';
1
+ import { Metadata, Utils, DatasourceFactory, AccessorManager, Event, KeyMap, FormatterParserProvider, Validation, Mask, Accessor, Loader, dayjs, Config, I18n, DateHelper, Router, MethodNotAssignedError, Http, Cookie, ViewService, InstanceNotFoundError } from '@zeedhi/core';
2
+ import AutoNumeric from '@zeedhi/autonumeric';
3
+ export { default as AutoNumeric } from '@zeedhi/autonumeric';
2
4
  import isUndefined from 'lodash.isundefined';
3
5
  import debounce from 'lodash.debounce';
4
6
  import merge from 'lodash.merge';
@@ -336,10 +338,6 @@ const uniqueBy = (a, key) => {
336
338
  });
337
339
  };
338
340
 
339
- const isFilledObject = (obj) => {
340
- return !!obj && typeof obj === 'object' && !Array.isArray(obj) && !!Object.keys(obj).length;
341
- };
342
-
343
341
  class DatasourceSearcher {
344
342
  dsSearch = {
345
343
  SEARCH: (value, searchIn) => ({
@@ -845,10 +843,6 @@ class TreeDataStructure {
845
843
  }
846
844
  }
847
845
 
848
- function isNil(value) {
849
- return value === null || value === undefined;
850
- }
851
-
852
846
  /**
853
847
  * Child not found error
854
848
  */
@@ -2171,6 +2165,7 @@ class TextInput extends Input {
2171
2165
  * Defines text input value should concat the suffix text.
2172
2166
  */
2173
2167
  valueWithSuffix = textInputDefaults.valueWithSuffix;
2168
+ inputMode;
2174
2169
  formatterFn = FormatterParserProvider.getFormatter('ZdTextInput');
2175
2170
  parserFn = FormatterParserProvider.getParser('ZdTextInput');
2176
2171
  /* istanbul ignore next */
@@ -2189,6 +2184,7 @@ class TextInput extends Input {
2189
2184
  this.type = props.type || this.type;
2190
2185
  this.valueWithPrefix = this.getInitValue('valueWithPrefix', props.valueWithPrefix, this.valueWithPrefix);
2191
2186
  this.valueWithSuffix = this.getInitValue('valueWithSuffix', props.valueWithSuffix, this.valueWithSuffix);
2187
+ this.inputMode = this.getInitValue('inputMode', props.inputMode, this.inputMode);
2192
2188
  }
2193
2189
  onCreated() {
2194
2190
  super.onCreated();
@@ -2361,6 +2357,7 @@ class DateInput extends TextInput {
2361
2357
  parserFn = FormatterParserProvider.getParser('ZdDateInput');
2362
2358
  initialMask;
2363
2359
  isSimpleDisplay;
2360
+ inputMode = 'none';
2364
2361
  /* istanbul ignore next */
2365
2362
  /**
2366
2363
  * Creates a new Date.
@@ -2422,6 +2419,10 @@ class DateInput extends TextInput {
2422
2419
  return;
2423
2420
  this.internalDisplayValue = this.formatter(value);
2424
2421
  this.internalValue = value;
2422
+ if (!value) {
2423
+ this.dateObject = null;
2424
+ return;
2425
+ }
2425
2426
  if (this.isValidFormatDate(value, this.dateFormat)) {
2426
2427
  this.dateObject = dayjs(value, this.dateFormat);
2427
2428
  }
@@ -10913,3473 +10914,192 @@ class TreeGrid extends Iterable {
10913
10914
  }
10914
10915
  }
10915
10916
 
10916
- const DynamicFilterOperations = {
10917
- CONTAINS: true,
10918
- NOT_CONTAINS: true,
10919
- EQUALS: true,
10920
- NOT_EQUALS: true,
10921
- GREATER_THAN: true,
10922
- LESS_THAN: true,
10923
- GREATER_THAN_EQUALS: true,
10924
- LESS_THAN_EQUALS: true,
10925
- IN: true,
10926
- NOT_IN: true,
10927
- BETWEEN: true,
10928
- };
10929
- const DynamicFilterRelations = {
10930
- AND: true,
10931
- OR: true,
10932
- };
10933
-
10934
- class TekMemoryDatasource extends MemoryDatasource {
10935
- /** Dynamic filter data */
10936
- dynamicFilter;
10937
- /** Search Join data */
10938
- searchJoin;
10917
+ /**
10918
+ * Base class for Checkbox multiple component.
10919
+ */
10920
+ class CheckboxMultiple extends Input {
10921
+ /**
10922
+ * Quantity of columns that will be rendered on non vertical case
10923
+ */
10924
+ columns = 4;
10925
+ /**
10926
+ * Field on datasource.data that will be used to set checkbox's label
10927
+ */
10928
+ dataLabel = '';
10929
+ /**
10930
+ * Source of checkbox items
10931
+ */
10932
+ datasource;
10939
10933
  /**
10940
- * Dynamic Filter Operations
10934
+ * Field on datasource.data that will be used to set checkbox's value
10941
10935
  */
10942
- dynamicFilterOperations = DynamicFilterOperations;
10936
+ dataValue = '';
10943
10937
  /**
10944
- * Dynamic Filter Relations
10938
+ * Defines the checkbox list direction
10945
10939
  */
10946
- dynamicFilterRelations = DynamicFilterRelations;
10940
+ vertical = true;
10947
10941
  /**
10948
- * Dynamic Filter applied flag
10942
+ * Defines if field value should be an object
10949
10943
  */
10950
- dynamicFilterApplied = '';
10944
+ returnObject = false;
10945
+ /* istanbul ignore next */
10951
10946
  /**
10952
- * Create new datasource
10953
- * @param props Datasource properties
10947
+ * Create a new Checkbox Multiple.
10948
+ * @param props CheckBpox Multiple properties
10954
10949
  */
10955
10950
  constructor(props) {
10956
10951
  super(props);
10957
- if (!this.watchUrl) {
10958
- this.dynamicFilter = this.getInitValue('dynamicFilter', props.dynamicFilter, {});
10959
- this.searchJoin = this.getInitValue('searchJoin', props.searchJoin, {});
10952
+ this.columns = this.getInitValue('columns', props.columns, this.columns);
10953
+ this.dataLabel = this.getInitValue('dataLabel', props.dataLabel, this.dataLabel);
10954
+ this.dataValue = this.getInitValue('dataValue', props.dataValue, this.dataValue);
10955
+ this.vertical = this.getInitValue('vertical', props.vertical, this.vertical);
10956
+ this.returnObject = this.getInitValue('returnObject', props.returnObject, this.returnObject);
10957
+ if (!Accessor.isAccessorDefinition(props.value)) {
10958
+ this.value = this.getInitValue('value', props.value, []);
10960
10959
  }
10961
- this.createAccessors();
10962
- this.createObjAccessors(this.dynamicFilter, 'dynamicFilter');
10963
- this.createObjAccessors(this.searchJoin, 'searchJoin');
10960
+ if (props.datasource && props.datasource.type === 'simple') {
10961
+ this.dataValue = 'value';
10962
+ this.dataLabel = this.dataValue;
10963
+ }
10964
+ this.datasource = DatasourceFactory.factory(props.datasource);
10964
10965
  }
10965
- updateReservedKeys() {
10966
- this.reservedKeys.dynamic_filter = true;
10967
- this.reservedKeys.search_join = true;
10966
+ onBeforeDestroy() {
10967
+ super.onBeforeDestroy();
10968
+ this.datasource.destroy();
10968
10969
  }
10969
- updateInternalProperties(datasource = {}) {
10970
- if (!this.watchUrl)
10971
- return;
10972
- this.updateReservedKeys();
10973
- super.updateInternalProperties(datasource);
10974
- const queryString = URL.getParsedQueryStringFromUrl();
10975
- this.dynamicFilter = this.getEncodedParam(queryString.dynamic_filter, datasource.dynamicFilter);
10976
- this.searchJoin = this.getEncodedParam(queryString.search_join, datasource.searchJoin);
10977
- }
10978
- getEncodedParam(urlParam, datasourceParam = {}) {
10979
- return urlParam ? JSON.parse(atob(urlParam)) : datasourceParam;
10980
- }
10981
- getQueryStringValues() {
10982
- const values = super.getQueryStringValues();
10983
- if (this.dynamicFilter && Object.keys(this.dynamicFilter).length) {
10984
- values.dynamic_filter = btoa(JSON.stringify(this.dynamicFilter));
10985
- }
10986
- if (this.searchJoin && Object.keys(this.searchJoin).length) {
10987
- values.search_join = btoa(JSON.stringify(this.searchJoin));
10988
- }
10989
- return values;
10990
- }
10991
- getUrlQueryString() {
10992
- const superQueryString = super.getUrlQueryString();
10993
- const query = URL.getParsedQueryStringFromUrl();
10994
- let dynamicFilterQuerystring = '';
10995
- if (query.dynamic_filter) {
10996
- dynamicFilterQuerystring = `&${URL.getFormattedQueryString({
10997
- dynamic_filter: query.dynamic_filter,
10998
- })}`;
10999
- }
11000
- let searchJoinQuerystring = '';
11001
- if (query.search_join) {
11002
- searchJoinQuerystring = `&${URL.getFormattedQueryString({
11003
- search_join: query.search_join,
11004
- })}`;
11005
- }
11006
- return superQueryString + dynamicFilterQuerystring + searchJoinQuerystring;
11007
- }
11008
- /**
11009
- * Adds a new dynamic filter position or replace if exists
11010
- * @param column Dynamic Filter column name
11011
- * @param value Dynamic Filter value
11012
- * @returns Promise with data collection
11013
- */
11014
- addDynamicFilter(column, value) {
11015
- if (this.isValidDynamicFilterValue(column, value)) {
11016
- this.dynamicFilter[column] = value;
11017
- return this.updateDynamicFilter();
11018
- }
11019
- return this.removeDynamicFilter(column);
10970
+ onCreated() {
10971
+ super.onCreated();
10972
+ this.datasource?.initialize();
11020
10973
  }
10974
+ }
10975
+ InputFactory.register('ZdCheckboxMultiple', CheckboxMultiple);
10976
+
10977
+ /**
10978
+ * Base class for Chip component.
10979
+ */
10980
+ class Chip extends Button {
11021
10981
  /**
11022
- * Removes a dynamic filter position
11023
- * @param column Dynamic Filter column name
11024
- * @returns Promise with data collection
10982
+ * Determines whether the chip is active or not
11025
10983
  */
11026
- removeDynamicFilter(column) {
11027
- delete this.dynamicFilter[column];
11028
- return this.updateDynamicFilter();
11029
- }
10984
+ active = true;
11030
10985
  /**
11031
- * Sets new dynamic filter value
11032
- * @param filter Dynamic Filter value
11033
- * @returns Promise with data collection
10986
+ * Configure the active CSS class applied when the link is active
11034
10987
  */
11035
- setDynamicFilter(filter) {
11036
- this.dynamicFilter = {};
11037
- Object.keys(filter).forEach((column) => {
11038
- if (this.isValidDynamicFilterValue(column, filter[column])) {
11039
- this.dynamicFilter[column] = filter[column];
11040
- }
11041
- else {
11042
- delete this.dynamicFilter[column];
11043
- }
11044
- });
11045
- return this.updateDynamicFilter();
11046
- }
10988
+ activeClass = '';
11047
10989
  /**
11048
- * Clears Dynamic filter value
11049
- * @returns Promise with data collection
10990
+ * Adds remove button
11050
10991
  */
11051
- clearDynamicFilter() {
11052
- this.dynamicFilter = {};
11053
- return this.updateDynamicFilter();
11054
- }
10992
+ closable = false;
11055
10993
  /**
11056
- * Resets page and selected rows and tries to update the url
11057
- * @returns Promise with data collection
10994
+ * Change the default icon used for close chips
11058
10995
  */
11059
- async updateDynamicFilter() {
11060
- this.page = this.firstPage;
11061
- this.selectedRows = [];
11062
- this.visibleSelectedRows = [];
11063
- if (this.watchUrl) {
11064
- if (this.dynamicFilter && Object.keys(this.dynamicFilter).length) {
11065
- URL.updateQueryString({
11066
- dynamic_filter: btoa(JSON.stringify(this.dynamicFilter)),
11067
- });
11068
- }
11069
- else {
11070
- URL.updateQueryString({
11071
- dynamic_filter: undefined,
11072
- });
11073
- }
11074
- }
11075
- return this.get();
11076
- }
10996
+ closeIcon = 'delete';
11077
10997
  /**
11078
- * Checks if a filter value is valid
11079
- * @param value Filter value
11080
- * @returns Is valid filter value
10998
+ * Makes the chip draggable
11081
10999
  */
11082
- isValidDynamicFilterValue(column, value) {
11083
- return (!this.reservedKeys[column] &&
11084
- value &&
11085
- value.length > 0 &&
11086
- value.every((filterValue) => this.dynamicFilterOperations[filterValue.operation] &&
11087
- this.dynamicFilterRelations[filterValue.relation] &&
11088
- filterValue.value !== '' &&
11089
- filterValue.value !== null));
11090
- }
11091
- clone() {
11092
- return {
11093
- ...super.clone(),
11094
- dynamicFilter: this.dynamicFilter,
11095
- searchJoin: this.searchJoin,
11096
- type: 'tek-memory',
11097
- };
11098
- }
11000
+ draggable = false;
11099
11001
  /**
11100
- * Updates filtered data
11002
+ * Explicitly define the chip as a link
11101
11003
  */
11102
- updateFilteredData() {
11103
- // first apply filters (simple and dynamic)
11104
- this.filteredData = Object.keys(this.filter).length
11105
- ? this.allData.filter((row) => this.getRowByFilter(row))
11106
- : Array.from(this.allData);
11107
- if (this.dynamicFilter && Object.keys(this.dynamicFilter).length) {
11108
- this.filteredData = this.filteredData.filter((row) => this.getRowByDynamicFilter(row));
11109
- }
11110
- const searchWithoutSearchJoin = (row) => {
11111
- const searchRow = { ...row };
11112
- if (this.searchJoin) {
11113
- // do not search on columns with searchJoin
11114
- Object.keys(this.searchJoin).forEach((key) => delete searchRow[key]);
11115
- }
11116
- return this.getRowBySearch(searchRow);
11117
- };
11118
- // only after do the search
11119
- const searchData = this.search ? this.filteredData.filter(searchWithoutSearchJoin) : this.filteredData;
11120
- let searchIds = searchData.map((row) => row[this.uniqueKey]);
11121
- if (this.searchJoin && Object.keys(this.searchJoin).length) {
11122
- const searchJoinData = this.filteredData.filter((row) => this.getRowBySearchJoin(row));
11123
- // get the ids from search and searchJoin
11124
- searchIds = searchIds.concat(searchJoinData.map((row) => row[this.uniqueKey])).sort();
11125
- }
11126
- // filter filteredData using searchIds
11127
- this.filteredData = this.allData.filter((row) => searchIds.indexOf(row[this.uniqueKey]) !== -1);
11128
- }
11129
- getRowByDynamicFilter(row) {
11130
- let filtered;
11131
- try {
11132
- Object.keys(this.dynamicFilter).forEach((key) => {
11133
- const filterItems = this.dynamicFilter[key];
11134
- filterItems.forEach((item) => {
11135
- if (filtered === false && item.relation === 'AND')
11136
- return;
11137
- if (filtered === true && item.relation === 'OR')
11138
- return;
11139
- const columnValue = Utils.normalize(row[key].toString());
11140
- let value = '';
11141
- if (Array.isArray(item.value)) {
11142
- value = item.value.map((val) => Utils.normalize(val.toString()));
11143
- switch (item.operation) {
11144
- case 'IN':
11145
- filtered = value.includes(columnValue);
11146
- break;
11147
- case 'NOT_IN':
11148
- filtered = !value.includes(columnValue);
11149
- break;
11150
- case 'BETWEEN':
11151
- filtered =
11152
- (Number(columnValue) || columnValue) >= (Number(value[0]) || value[0]) &&
11153
- (Number(columnValue) || columnValue) <= (Number(value[1]) || value[1]);
11154
- break;
11155
- default:
11156
- break;
11157
- }
11158
- }
11159
- else {
11160
- value = Utils.normalize(item.value.toString());
11161
- switch (item.operation) {
11162
- case 'CONTAINS':
11163
- filtered = columnValue.indexOf(value) !== -1;
11164
- break;
11165
- case 'NOT_CONTAINS':
11166
- filtered = columnValue.indexOf(value) === -1;
11167
- break;
11168
- case 'EQUALS':
11169
- filtered = columnValue === value;
11170
- break;
11171
- case 'NOT_EQUALS':
11172
- filtered = columnValue !== value;
11173
- break;
11174
- case 'GREATER_THAN':
11175
- filtered = (Number(columnValue) || columnValue) > (Number(value) || value);
11176
- break;
11177
- case 'LESS_THAN':
11178
- filtered = (Number(columnValue) || columnValue) < (Number(value) || value);
11179
- break;
11180
- case 'GREATER_THAN_EQUALS':
11181
- filtered = (Number(columnValue) || columnValue) >= (Number(value) || value);
11182
- break;
11183
- case 'LESS_THAN_EQUALS':
11184
- filtered = (Number(columnValue) || columnValue) <= (Number(value) || value);
11185
- break;
11186
- default:
11187
- break;
11188
- }
11189
- }
11190
- });
11191
- });
11192
- }
11193
- catch {
11194
- // do nothing
11195
- }
11196
- return filtered;
11197
- }
11198
- getRowBySearchJoin(row) {
11199
- return Object.keys(this.searchJoin).some((key) => this.searchJoin[key].includes(row[key]));
11200
- }
11201
- hasFilter(columnName) {
11202
- return this.dynamicFilter[columnName] && this.dynamicFilter[columnName].length > 0;
11203
- }
11204
- }
11205
- DatasourceFactory.register('tek-memory', TekMemoryDatasource);
11206
-
11207
- class TekRestDatasource extends RestDatasource {
11208
- /** Dynamic filter data */
11209
- dynamicFilter;
11210
- /** Search Join data */
11211
- searchJoin;
11004
+ link = false;
11005
+ /**
11006
+ * Removes background and applies border and text color
11007
+ */
11008
+ outlined = false;
11009
+ /**
11010
+ * Applies the ripple
11011
+ */
11012
+ ripple = true;
11013
+ /**
11014
+ * Applies a large border radius on the chip
11015
+ */
11016
+ round = true;
11212
11017
  /**
11213
- * Dynamic Filter Operations
11018
+ * Value Model
11214
11019
  */
11215
- dynamicFilterOperations = DynamicFilterOperations;
11020
+ value = false;
11216
11021
  /**
11217
- * Dynamic Filter Relations
11022
+ * Makes the component extra large
11218
11023
  */
11219
- dynamicFilterRelations = DynamicFilterRelations;
11024
+ xLarge = false;
11220
11025
  /**
11221
- * Dynamic Filter applied flag
11026
+ * Makes the component extra small
11222
11027
  */
11223
- dynamicFilterApplied = '';
11028
+ xSmall = false;
11029
+ /* istanbul ignore next */
11224
11030
  /**
11225
- * Create new datasource
11226
- * @param props Datasource properties
11031
+ * Create a new Chip
11032
+ * @param props Chip definition
11227
11033
  */
11228
11034
  constructor(props) {
11229
- super({ ...props, lazyLoad: true });
11230
- if (!this.watchUrl) {
11231
- this.dynamicFilter = this.getInitValue('dynamicFilter', props.dynamicFilter, {});
11232
- this.searchJoin = this.getInitValue('searchJoin', props.searchJoin, {});
11233
- }
11234
- this.lazyLoad = this.getInitValue('lazyLoad', props.lazyLoad, this.lazyLoad);
11035
+ super(props);
11036
+ this.active = this.getInitValue('active', props.active, this.active);
11037
+ this.activeClass = this.getInitValue('activeClass', props.activeClass, this.activeClass);
11038
+ this.closable = this.getInitValue('closable', props.closable, this.closable);
11039
+ this.closeIcon = this.getInitValue('closeIcon', props.closeIcon, this.closeIcon);
11040
+ this.draggable = this.getInitValue('draggable', props.draggable, this.draggable);
11041
+ this.link = this.getInitValue('link', props.link, this.link);
11042
+ this.outlined = this.getInitValue('outlined', props.outlined, this.outlined);
11043
+ this.ripple = this.getInitValue('ripple', props.ripple, this.ripple);
11044
+ this.round = this.getInitValue('round', props.round, this.round);
11045
+ this.value = this.getInitValue('value', props.value, this.value);
11046
+ this.xLarge = this.getInitValue('xLarge', props.xLarge, this.xLarge);
11047
+ this.xSmall = this.getInitValue('xSmall', props.xSmall, this.xSmall);
11235
11048
  this.createAccessors();
11236
- this.createObjAccessors(this.dynamicFilter, 'dynamicFilter');
11237
- this.createObjAccessors(this.searchJoin, 'searchJoin');
11238
- }
11239
- updateReservedKeys() {
11240
- this.reservedKeys.dynamic_filter = true;
11241
- this.reservedKeys.search_join = true;
11242
11049
  }
11243
- updateInternalProperties(datasource = {}) {
11244
- if (!this.watchUrl)
11245
- return;
11246
- this.updateReservedKeys();
11247
- super.updateInternalProperties(datasource);
11248
- const queryString = URL.getParsedQueryStringFromUrl();
11249
- this.dynamicFilter = this.getEncodedParam(queryString.dynamic_filter, datasource.dynamicFilter);
11250
- this.searchJoin = this.getEncodedParam(queryString.search_join, datasource.searchJoin);
11251
- }
11252
- getEncodedParam(urlParam, datasourceParam = {}) {
11253
- return urlParam ? JSON.parse(atob(urlParam)) : datasourceParam;
11254
- }
11255
- getQueryStringValues() {
11256
- const values = super.getQueryStringValues();
11257
- if (this.dynamicFilter && Object.keys(this.dynamicFilter).length) {
11258
- values.dynamic_filter = btoa(JSON.stringify(this.dynamicFilter));
11259
- }
11260
- if (this.searchJoin && Object.keys(this.searchJoin).length) {
11261
- values.search_join = btoa(JSON.stringify(this.searchJoin));
11262
- }
11263
- return values;
11264
- }
11265
- getUrlQueryString() {
11266
- const superQueryString = super.getUrlQueryString();
11267
- const query = URL.getParsedQueryStringFromUrl();
11268
- let dynamicFilterQuerystring = '';
11269
- if (query.dynamic_filter) {
11270
- dynamicFilterQuerystring = `&${URL.getFormattedQueryString({
11271
- dynamic_filter: query.dynamic_filter,
11272
- })}`;
11273
- }
11274
- let searchJoinQuerystring = '';
11275
- if (query.search_join) {
11276
- searchJoinQuerystring = `&${URL.getFormattedQueryString({
11277
- search_join: query.search_join,
11278
- })}`;
11279
- }
11280
- return superQueryString + dynamicFilterQuerystring + searchJoinQuerystring;
11281
- }
11282
- /**
11283
- * Adds a new dynamic filter position or replace if exists
11284
- * @param column Dynamic Filter column name
11285
- * @param value Dynamic Filter value
11286
- * @returns Promise with data collection
11050
+ }
11051
+
11052
+ /**
11053
+ * Base class for Progress component
11054
+ */
11055
+ class Progress extends ComponentRender {
11056
+ /**
11057
+ * Set component's background color
11287
11058
  */
11288
- addDynamicFilter(column, value) {
11289
- if (this.isValidDynamicFilterValue(column, value)) {
11290
- this.dynamicFilter[column] = value;
11291
- return this.updateDynamicFilter();
11292
- }
11293
- return this.removeDynamicFilter(column);
11294
- }
11059
+ backgroundColor = 'primary';
11295
11060
  /**
11296
- * Removes a dynamic filter position
11297
- * @param column Dynamic Filter column name
11298
- * @returns Promise with data collection
11061
+ * Set component's background opacity
11299
11062
  */
11300
- removeDynamicFilter(column) {
11301
- delete this.dynamicFilter[column];
11302
- return this.updateDynamicFilter();
11303
- }
11063
+ backgroundOpacity = '0.5';
11304
11064
  /**
11305
- * Sets new dynamic filter value
11306
- * @param filter Dynamic Filter value
11307
- * @returns Promise with data collection
11065
+ * Defines the value color
11308
11066
  */
11309
- setDynamicFilter(filter) {
11310
- this.dynamicFilter = {};
11311
- Object.keys(filter).forEach((column) => {
11312
- if (this.isValidDynamicFilterValue(column, filter[column])) {
11313
- this.dynamicFilter[column] = filter[column];
11314
- }
11315
- else {
11316
- delete this.dynamicFilter[column];
11317
- }
11318
- });
11319
- return this.updateDynamicFilter();
11320
- }
11067
+ color = 'primary';
11321
11068
  /**
11322
- * Clears Dynamic filter value
11323
- * @returns Promise with data collection
11069
+ * Sets the height for the component
11324
11070
  */
11325
- clearDynamicFilter() {
11326
- this.dynamicFilter = {};
11327
- return this.updateDynamicFilter();
11328
- }
11071
+ height = 4;
11329
11072
  /**
11330
- * Resets page and selected rows and tries to update the url
11331
- * @returns Promise with data collection
11073
+ * Animates the component constantly
11332
11074
  */
11333
- async updateDynamicFilter() {
11334
- this.page = this.firstPage;
11335
- this.selectedRows = [];
11336
- this.visibleSelectedRows = [];
11337
- if (this.watchUrl) {
11338
- if (this.dynamicFilter && Object.keys(this.dynamicFilter).length) {
11339
- URL.updateQueryString({
11340
- dynamic_filter: btoa(JSON.stringify(this.dynamicFilter)),
11341
- });
11342
- }
11343
- else {
11344
- URL.updateQueryString({
11345
- dynamic_filter: undefined,
11346
- });
11347
- }
11348
- }
11349
- return this.get();
11350
- }
11075
+ indeterminate = false;
11351
11076
  /**
11352
- * Checks if a filter value is valid
11353
- * @param value Filter value
11354
- * @returns Is valid filter value
11077
+ * Render components on the progress component
11355
11078
  */
11356
- isValidDynamicFilterValue(column, value) {
11357
- return (!this.reservedKeys[column] &&
11358
- value &&
11359
- value.length > 0 &&
11360
- value.every((filterValue) => this.dynamicFilterOperations[filterValue.operation] &&
11361
- this.dynamicFilterRelations[filterValue.relation] &&
11362
- filterValue.value !== '' &&
11363
- filterValue.value !== null));
11364
- }
11079
+ centerSlot = [];
11365
11080
  /**
11366
- * Retrieves request params
11081
+ * The percentage value for current progress
11367
11082
  */
11368
- getRequestParams() {
11369
- const requestParams = super.getRequestParams();
11370
- const isNotEmptyObj = (obj) => !!(obj && Object.keys(obj).length);
11371
- const isValid = this.dynamicFilter &&
11372
- Object.keys(this.dynamicFilter).every((column) => {
11373
- const value = this.dynamicFilter[column];
11374
- return value && value.length > 0 && this.isValidDynamicFilterValue(column, value);
11375
- });
11376
- if (isNotEmptyObj(this.dynamicFilter) && isValid) {
11377
- requestParams.dynamic_filter = btoa(JSON.stringify(this.dynamicFilter));
11378
- }
11379
- if (isNotEmptyObj(this.searchJoin)) {
11380
- requestParams.search_join = btoa(JSON.stringify(this.searchJoin));
11381
- }
11382
- return requestParams;
11383
- }
11384
- hasFilter(columnName) {
11385
- return this.dynamicFilter[columnName] && this.dynamicFilter[columnName].length > 0;
11386
- }
11387
- clone() {
11388
- return {
11389
- ...super.clone(),
11390
- dynamicFilter: this.dynamicFilter,
11391
- searchJoin: this.searchJoin,
11392
- type: 'tek-rest',
11393
- };
11394
- }
11395
- }
11396
- DatasourceFactory.register('tek-rest', TekRestDatasource);
11397
-
11398
- class ButtonOption {
11399
- config;
11400
- constructor(config) {
11401
- this.config = config;
11402
- }
11403
- buildComponent(grid) {
11404
- const { type, label, portrait = true, iconName } = this.config;
11405
- const orientation = portrait ? 'portrait' : 'landscape';
11406
- return {
11407
- label,
11408
- iconName,
11409
- name: `${grid.name}_export_${type}_${orientation}`,
11410
- component: 'ZdButton',
11411
- flat: true,
11412
- events: {
11413
- click: () => grid.getReport(type, portrait),
11414
- },
11415
- };
11416
- }
11417
- }
11418
-
11419
- class MultiOption {
11420
- config;
11421
- constructor(config) {
11422
- this.config = config;
11423
- }
11424
- formatName(id, type, grid) {
11425
- return `${grid.name}_export_${type}_${id}`;
11426
- }
11427
- buildTooltip(option, type, grid) {
11428
- const { label } = option;
11429
- return {
11430
- name: this.formatName(`tooltip_${label}`, type, grid),
11431
- component: 'ZdTooltip',
11432
- bottom: true,
11433
- label,
11434
- children: [],
11435
- };
11436
- }
11437
- buildButton(option, type, grid) {
11438
- const { cssClass, label, iconName, reportParams } = option;
11439
- const { portrait: optionPortrait, rowObj } = reportParams || {};
11440
- return {
11441
- name: this.formatName(`button_${label}`, type, grid),
11442
- component: 'ZdButton',
11443
- cssClass,
11444
- icon: true,
11445
- iconName,
11446
- events: {
11447
- click: () => grid.getReport(type, optionPortrait, rowObj),
11448
- },
11449
- };
11450
- }
11451
- buildDivider(option, type, grid) {
11452
- const { label } = option;
11453
- return {
11454
- name: this.formatName(`divider_${label}`, type, grid),
11455
- component: 'ZdDivider',
11456
- cssClass: 'zd-my-1',
11457
- vertical: true,
11458
- };
11459
- }
11460
- buildComponent(grid) {
11461
- const { type, label, multiOption } = this.config;
11462
- const optionComponents = multiOption.flatMap((option) => [
11463
- {
11464
- ...this.buildTooltip(option, type, grid),
11465
- children: [this.buildButton(option, type, grid)],
11466
- },
11467
- this.buildDivider(option, type, grid),
11468
- ]);
11469
- optionComponents.pop();
11470
- const text = {
11471
- name: this.formatName('text', type, grid),
11472
- component: 'ZdText',
11473
- cssClass: 'zd-display-flex zd-align-center zd-flex-grow-1 tek-grid-export-multioption-text',
11474
- events: {
11475
- click: ({ event }) => event?.stopPropagation(),
11476
- },
11477
- text: label || '',
11478
- };
11479
- const result = {
11480
- name: this.formatName('row', type, grid),
11481
- component: 'ZdRow',
11482
- cssClass: 'zd-display-flex zd-ma-0 zd-py-0 zd-gap-x-1 tek-grid-export-multioption-row',
11483
- children: [text, ...optionComponents],
11484
- };
11485
- return result;
11083
+ value = 0;
11084
+ /* istanbul ignore next */
11085
+ /**
11086
+ * Create a new Progress
11087
+ * @param props Progress definition
11088
+ */
11089
+ constructor(props) {
11090
+ super(props);
11091
+ this.backgroundColor = this.getInitValue('backgroundColor', props.backgroundColor, this.backgroundColor);
11092
+ this.backgroundOpacity = this.getInitValue('backgroundOpacity', props.backgroundOpacity, this.backgroundOpacity);
11093
+ this.color = this.getInitValue('color', props.color, this.color);
11094
+ this.height = this.getInitValue('height', props.height, this.height);
11095
+ this.indeterminate = this.getInitValue('indeterminate', props.indeterminate, this.indeterminate);
11096
+ this.centerSlot = this.getInitValue('centerSlot', props.centerSlot, this.centerSlot);
11097
+ this.value = this.getInitValue('value', props.value, this.value);
11486
11098
  }
11487
11099
  }
11488
11100
 
11489
11101
  /**
11490
- * Base Teknisa error
11491
- */
11492
- class TeknisaCommonError extends Error {
11493
- constructor(message) {
11494
- super(`[Teknisa Common err]: ${message}`);
11495
- }
11496
- }
11497
-
11498
- /**
11499
- * TekGridDelete rows error
11500
- */
11501
- class TekGridDeleteRowsError extends TeknisaCommonError {
11502
- constructor() {
11503
- super("TekGrid can't automatically delete rows when selectAllPages property is true." +
11504
- ' You should delete them manually using the beforeDelete event and preventing' +
11505
- ' the default execution');
11506
- this.name = 'TekGridDeleteRowsError';
11507
- }
11508
- }
11509
-
11510
- class TekGridToolbarProvider {
11511
- grid;
11512
- groupsVisibility;
11513
- constructor(grid, groupsVisibility) {
11514
- this.grid = grid;
11515
- this.groupsVisibility = groupsVisibility;
11516
- }
11517
- atoms = {
11518
- TITLE: '_gridTitle',
11519
- HIDE_BUTTON: '_hideButton',
11520
- ADD_BUTTON: '_addButton',
11521
- DELETE_BUTTON: '_deleteButton',
11522
- REFRESH_BUTTON: '_refreshButton',
11523
- COLUMNS_BUTTON: '_columnsButton',
11524
- LAYOUT_BUTTON: '_layout_options',
11525
- EXPORT_BUTTON: '_exportButton',
11526
- ACTIONS_BUTTON: '_actionsButton',
11527
- SAVE_BUTTON: '_saveButton',
11528
- CANCEL_BUTTON: '_cancelButton',
11529
- SEARCH: '_gridSearch',
11530
- FILTER_BUTTON: '_filterButton',
11531
- FILTER_MODAL: '-filter-modal',
11532
- FILTER_FORM: '-filter-form',
11533
- EXPORT_DROPDOWN: '_export_dropdown',
11534
- ACTIONS_DROPDOWN: '_actions_dropdown',
11535
- HIDE_TOOLTIP: '_hideTooltip',
11536
- TOOLBAR_DIV: '_toolbarDiv',
11537
- NOT_EDITING_SPAN: '_notEditingSpan',
11538
- ADD_TOOLTIP: '_add_tooltip',
11539
- DELETE_TOOLTIP: '_delete_tooltip',
11540
- DIVIDER1: '_divider1',
11541
- REFRESH_TOOLTIP: '_refresh_tooltip',
11542
- DIVIDER2: '_divider2',
11543
- COLUMNS_TOOLTIP: '_columns_button_tooltip',
11544
- DIVIDER_ACTIONS: '_dividerActions',
11545
- DIVIDER3: '_divider3',
11546
- FILTER_TOOLTIP: '_filter_tooltip',
11547
- };
11548
- getAtomName(key) {
11549
- return `${this.grid.name}${this.atoms[key]}`;
11550
- }
11551
- getAtomInstance(key) {
11552
- return Metadata.getInstance(`${this.grid.name}${this.atoms[key]}`);
11553
- }
11554
- getOption(config) {
11555
- if (config.multiOption)
11556
- return new MultiOption(config);
11557
- return new ButtonOption(config);
11558
- }
11559
- getExportConfigButtons() {
11560
- return this.grid.exportConfig.map((config) => {
11561
- const option = this.getOption(config);
11562
- return option.buildComponent(this.grid);
11563
- });
11564
- }
11565
- hideButtonClick({ event }) {
11566
- if (!event.defaultPrevented) {
11567
- const instance = Metadata.getInstance(`${this.grid.name}_toolbarDiv`);
11568
- if (instance) {
11569
- instance.isVisible = !instance.isVisible;
11570
- }
11571
- }
11572
- }
11573
- cancelChanges({ event }) {
11574
- this.grid.callEvent('beforeCancel', { component: this.grid, event });
11575
- if (!event.defaultPrevented) {
11576
- const cancel = async () => {
11577
- await this.grid.cancelEditedRows();
11578
- this.grid.editingNewRows = false;
11579
- };
11580
- cancel();
11581
- this.grid.callEvent('afterCancel', { component: this.grid });
11582
- }
11583
- }
11584
- saveChanges({ event }) {
11585
- this.grid.callEvent('beforeSave', { component: this.grid, event });
11586
- if (!event.defaultPrevented) {
11587
- const save = async () => {
11588
- await this.grid.saveEditedRows();
11589
- this.grid.editingNewRows = false;
11590
- };
11591
- save();
11592
- this.grid.callEvent('afterSave', { component: this.grid });
11593
- }
11594
- }
11595
- addButtonClick({ event }) {
11596
- if (this.grid.editNewRowsOnly) {
11597
- this.grid.editingNewRows = true;
11598
- }
11599
- this.grid.callEvent('addClick', { component: this.grid, event });
11600
- }
11601
- deleteButtonClick({ event }) {
11602
- this.grid.callEvent('beforeDelete', { component: this.grid, event });
11603
- if (!event.defaultPrevented) {
11604
- if (this.grid.selectAllPages) {
11605
- throw new TekGridDeleteRowsError();
11606
- }
11607
- this.grid.deleteRows();
11608
- this.grid.callEvent('afterDelete', { component: this.grid });
11609
- }
11610
- }
11611
- reloadGrid({ event }) {
11612
- this.grid.callEvent('beforeReload', { component: this.grid, event });
11613
- if (event?.defaultPrevented)
11614
- return;
11615
- this.grid.reload();
11616
- }
11617
- getProperties() {
11618
- const exportConfigButtons = this.getExportConfigButtons();
11619
- return [
11620
- {
11621
- name: this.getAtomName('TITLE'),
11622
- component: 'ZdText',
11623
- cssClass: 'toolbar-title',
11624
- tag: 'h2',
11625
- text: this.grid.title,
11626
- title: this.grid.title,
11627
- },
11628
- {
11629
- name: `${this.grid.name}_spacer`,
11630
- component: 'VSpacer',
11631
- },
11632
- {
11633
- name: this.getAtomName('HIDE_TOOLTIP'),
11634
- component: 'ZdTooltip',
11635
- label: `{{GridController_${this.grid.name}.tooltipName}}`,
11636
- bottom: true,
11637
- children: [
11638
- {
11639
- name: this.getAtomName('HIDE_BUTTON'),
11640
- component: 'ZdButton',
11641
- flat: true,
11642
- icon: true,
11643
- iconName: 'mdi-chevron-right',
11644
- color: 'grey',
11645
- isVisible: `{{GridController_${this.grid.name}.isNotEditing}}`,
11646
- cssClass: `{{GridController_${this.grid.name}.toolbarClass}}`,
11647
- events: {
11648
- click: this.hideButtonClick.bind(this),
11649
- },
11650
- },
11651
- ],
11652
- },
11653
- {
11654
- name: this.getAtomName('TOOLBAR_DIV'),
11655
- component: 'ZdTag',
11656
- tag: 'div',
11657
- cssStyle: 'display: flex; align-items: center',
11658
- isVisible: `{{GridController_${this.grid.name}.showToolbar}}`,
11659
- children: [
11660
- {
11661
- name: this.getAtomName('NOT_EDITING_SPAN'),
11662
- component: 'ZdTag',
11663
- tag: 'span',
11664
- cssStyle: 'display: flex',
11665
- isVisible: `{{GridController_${this.grid.name}.isNotEditing}}`,
11666
- children: [
11667
- {
11668
- name: this.getAtomName('ADD_TOOLTIP'),
11669
- component: 'ZdTooltip',
11670
- label: 'TEKGRID_ADD',
11671
- bottom: true,
11672
- children: [
11673
- {
11674
- name: this.getAtomName('ADD_BUTTON'),
11675
- component: 'ZdButton',
11676
- icon: true,
11677
- iconName: 'mdi-plus-box',
11678
- isVisible: `{{GridController_${this.grid.name}.showAddButton}}`,
11679
- events: {
11680
- click: this.addButtonClick.bind(this),
11681
- },
11682
- },
11683
- ],
11684
- },
11685
- {
11686
- name: this.getAtomName('DELETE_TOOLTIP'),
11687
- component: 'ZdTooltip',
11688
- label: 'TEKGRID_DELETE',
11689
- bottom: true,
11690
- children: [
11691
- {
11692
- name: this.getAtomName('DELETE_BUTTON'),
11693
- component: 'ZdButton',
11694
- icon: true,
11695
- iconName: 'mdi-trash-can-outline',
11696
- isVisible: `{{GridController_${this.grid.name}.showDeleteButton}}`,
11697
- disabled: `{{GridController_${this.grid.name}.disableDeleteButton}}`,
11698
- events: {
11699
- click: this.deleteButtonClick.bind(this),
11700
- },
11701
- },
11702
- ],
11703
- },
11704
- {
11705
- name: this.getAtomName('DIVIDER1'),
11706
- component: 'ZdDivider',
11707
- cssClass: 'toolbar-divider',
11708
- vertical: true,
11709
- isVisible: `{{GridController_${this.grid.name}.showDivider1}}`,
11710
- },
11711
- {
11712
- name: this.getAtomName('REFRESH_TOOLTIP'),
11713
- component: 'ZdTooltip',
11714
- label: 'TEKGRID_REFRESH',
11715
- bottom: true,
11716
- children: [
11717
- {
11718
- name: this.getAtomName('REFRESH_BUTTON'),
11719
- component: 'ZdButton',
11720
- icon: true,
11721
- iconName: 'refresh',
11722
- isVisible: `{{GridController_${this.grid.name}.showReloadButton}}`,
11723
- events: {
11724
- click: this.reloadGrid.bind(this),
11725
- },
11726
- },
11727
- ],
11728
- },
11729
- {
11730
- name: this.getAtomName('DIVIDER2'),
11731
- component: 'ZdDivider',
11732
- cssClass: 'toolbar-divider',
11733
- vertical: true,
11734
- isVisible: `{{GridController_${this.grid.name}.showDivider2}}`,
11735
- },
11736
- {
11737
- name: this.getAtomName('COLUMNS_BUTTON'),
11738
- component: 'TekGridColumnsButton',
11739
- isVisible: `{{GridController_${this.grid.name}.showColumnsButton}}`,
11740
- iterableComponentName: this.grid.name,
11741
- hideGroups: this.groupsVisibility === 'hide',
11742
- ignoreColumns: `{{GridController_${this.grid.name}.columnsButtonIgnore}}`,
11743
- },
11744
- {
11745
- name: this.getAtomName('LAYOUT_BUTTON'),
11746
- component: 'TekGridLayoutOptions',
11747
- isVisible: `{{GridController_${this.grid.name}.showLayoutOptionsButton}}`,
11748
- },
11749
- {
11750
- name: this.getAtomName('DIVIDER_ACTIONS'),
11751
- component: 'ZdDivider',
11752
- cssClass: 'toolbar-divider',
11753
- vertical: true,
11754
- isVisible: `{{GridController_${this.grid.name}.showActionAndExportButton}}`,
11755
- },
11756
- {
11757
- name: this.getAtomName('EXPORT_DROPDOWN'),
11758
- component: 'ZdDropdown',
11759
- cssClass: 'tekgrid-actions-dropdown',
11760
- offsetY: true,
11761
- activator: {
11762
- name: this.getAtomName('EXPORT_BUTTON'),
11763
- component: 'ZdButton',
11764
- icon: true,
11765
- iconName: 'mdi-file-download-outline',
11766
- isVisible: `{{GridController_${this.grid.name}.showExportButton}}`,
11767
- },
11768
- children: this.grid.exportActions || exportConfigButtons,
11769
- },
11770
- {
11771
- name: this.getAtomName('ACTIONS_DROPDOWN'),
11772
- component: 'ZdDropdown',
11773
- cssClass: 'tekgrid-actions-dropdown',
11774
- offsetY: true,
11775
- activator: {
11776
- name: this.getAtomName('ACTIONS_BUTTON'),
11777
- component: 'ZdButton',
11778
- icon: true,
11779
- iconName: 'mdi-dots-vertical',
11780
- isVisible: `{{GridController_${this.grid.name}.showActionsButton}}`,
11781
- },
11782
- children: this.grid.actions,
11783
- },
11784
- {
11785
- name: this.getAtomName('DIVIDER3'),
11786
- component: 'ZdDivider',
11787
- cssClass: 'toolbar-divider',
11788
- vertical: true,
11789
- isVisible: `{{GridController_${this.grid.name}.showDivider3}}`,
11790
- },
11791
- ],
11792
- },
11793
- {
11794
- name: this.getAtomName('SAVE_BUTTON'),
11795
- component: 'ZdButton',
11796
- label: 'TEKGRID_SAVE',
11797
- isVisible: `{{GridController_${this.grid.name}.showEditButtons}}`,
11798
- small: true,
11799
- events: {
11800
- click: this.saveChanges.bind(this),
11801
- },
11802
- },
11803
- {
11804
- name: this.getAtomName('CANCEL_BUTTON'),
11805
- component: 'ZdButton',
11806
- label: 'TEKGRID_CANCEL',
11807
- outline: true,
11808
- cssClass: 'zd-mx-2',
11809
- isVisible: `{{GridController_${this.grid.name}.showEditButtons}}`,
11810
- small: true,
11811
- events: {
11812
- click: this.cancelChanges.bind(this),
11813
- },
11814
- },
11815
- {
11816
- name: this.getAtomName('SEARCH'),
11817
- component: 'ZdSearch',
11818
- cssClass: 'zd-grid-search',
11819
- iterableComponentName: `${this.grid.name}`,
11820
- isVisible: `{{GridController_${this.grid.name}.showSearchInput}}`,
11821
- },
11822
- {
11823
- name: this.getAtomName('FILTER_TOOLTIP'),
11824
- component: 'ZdTooltip',
11825
- label: 'TEKGRID_FILTER',
11826
- bottom: true,
11827
- children: [
11828
- {
11829
- name: this.getAtomName('FILTER_BUTTON'),
11830
- component: 'TekGridFilterButton',
11831
- grid: this.grid,
11832
- gridName: this.grid.name,
11833
- showCheckboxAll: this.grid.showCheckboxAllFilter,
11834
- isVisible: `{{GridController_${this.grid.name}.showFilterButton}}`,
11835
- },
11836
- ],
11837
- },
11838
- ],
11839
- },
11840
- ];
11841
- }
11842
- }
11843
-
11844
- class ColumnsSearcher {
11845
- async searchColumn(columns, search) {
11846
- const lookupColumns = columns.filter((column) => !!column.componentProps?.datasource && !column.skipLookupSearch);
11847
- const searchJoin = {};
11848
- if (search) {
11849
- const promises = lookupColumns.map(async (column) => {
11850
- const searchData = await column.memorySearch(search);
11851
- const lookupId = column.componentProps.datasource.uniqueKey;
11852
- searchJoin[column.name] = searchData.map((row) => row[lookupId]);
11853
- });
11854
- await Promise.all(promises);
11855
- }
11856
- return searchJoin;
11857
- }
11858
- }
11859
-
11860
- class DynamicFilterDatasourceFactory {
11861
- factory(options) {
11862
- return DatasourceFactory.factory({
11863
- data: this.getFilterOptionsData(options),
11864
- loadAll: true,
11865
- translate: ['text'],
11866
- });
11867
- }
11868
- getFilterOptionsData(options) {
11869
- const optionsKeys = Object.keys(options);
11870
- return optionsKeys.map((item) => ({
11871
- text: `TEKGRID_${item}`,
11872
- value: item,
11873
- }));
11874
- }
11875
- }
11876
-
11877
- class TekFilterHelper {
11878
- static getLabel(name) {
11879
- return DateHelper.getLabel(name);
11880
- }
11881
- static getValue(name, column) {
11882
- return DateHelper.getValue(name, column.componentProps.dateFormat);
11883
- }
11884
- static register(name, label, fn) {
11885
- DateHelper.register(name, label, fn);
11886
- }
11887
- static unregister(name) {
11888
- DateHelper.unregister(name);
11889
- }
11890
- }
11891
-
11892
- /**
11893
- * Base class for TekGrid Filter Button component
11894
- */
11895
- class TekGridFilterButton extends Button {
11896
- gridName;
11897
- grid;
11898
- showCheckboxAll = false;
11899
- filterModal;
11900
- filterFormInputs = {};
11901
- constructor(props) {
11902
- super(props);
11903
- this.gridName = this.getInitValue('gridName', props.gridName, this.gridName);
11904
- this.grid = this.getInitValue('grid', props.grid, undefined);
11905
- this.showCheckboxAll = this.getInitValue('showCheckboxAll', props.showCheckboxAll, this.showCheckboxAll);
11906
- this.createAccessors();
11907
- if (!this.grid)
11908
- this.loadGrid();
11909
- }
11910
- loadGrid(gridName) {
11911
- if (gridName)
11912
- this.gridName = gridName;
11913
- if (!this.gridName)
11914
- return;
11915
- this.grid = Metadata.getInstances(this.gridName)[0];
11916
- }
11917
- click(event) {
11918
- this.callEvent('click', { component: this, event });
11919
- this.grid.callEvent('filterClick', { component: this.grid, event });
11920
- if (!event?.defaultPrevented) {
11921
- this.createFilterFromColumns.call(this);
11922
- }
11923
- }
11924
- loadFilterValues({ component }) {
11925
- const changedCompNames = [];
11926
- const { datasource } = this.grid;
11927
- if (datasource instanceof TekRestDatasource || datasource instanceof TekMemoryDatasource) {
11928
- const { dynamicFilter } = datasource;
11929
- const newDynamicFilter = { ...this.grid.defaultFilter, ...dynamicFilter };
11930
- Object.keys(newDynamicFilter).forEach((column) => {
11931
- if (newDynamicFilter[column] && newDynamicFilter[column].length > 0) {
11932
- newDynamicFilter[column].forEach((filterItem, index) => {
11933
- const relation = filterItem.relation || 'AND';
11934
- const operation = filterItem.operation || 'CONTAINS';
11935
- const compName = `${this.grid.name}-filter-${relation}-${operation}-${column}-${index}`;
11936
- changedCompNames.push(compName);
11937
- component.value[compName] = filterItem.value;
11938
- let helperValue = '';
11939
- const columnObj = this.grid.getColumn(column);
11940
- if (columnObj instanceof TekGridColumn) {
11941
- const { filterProps } = columnObj;
11942
- if (!Array.isArray(filterProps)) {
11943
- helperValue = filterProps.helperValue || '';
11944
- }
11945
- else {
11946
- filterProps.forEach((prop) => {
11947
- if ((prop.relation || 'AND') === relation && (prop.operation || 'CONTAINS') === operation) {
11948
- helperValue = prop.helperValue || '';
11949
- }
11950
- });
11951
- }
11952
- const inputObj = Metadata.getInstances(compName);
11953
- if (helperValue && inputObj.length && inputObj[0]) {
11954
- inputObj[0].hint = TekFilterHelper.getLabel(helperValue);
11955
- }
11956
- }
11957
- });
11958
- }
11959
- });
11960
- }
11961
- else {
11962
- const { filter } = datasource;
11963
- const newFilter = { ...this.grid.defaultFilter, ...filter };
11964
- Object.keys(newFilter).forEach((item) => {
11965
- if (newFilter[item]) {
11966
- const compName = `${this.grid.name}-filter-AND-CONTAINS-${item}-0`;
11967
- changedCompNames.push(compName);
11968
- component.value[compName] = newFilter[item];
11969
- }
11970
- });
11971
- }
11972
- Object.keys(component.value).forEach((compName) => {
11973
- if (changedCompNames.indexOf(compName) === -1) {
11974
- component.value[compName] = null;
11975
- }
11976
- });
11977
- }
11978
- hideFilterModal() {
11979
- this.filterModal.hide();
11980
- }
11981
- destroyFilterModal() {
11982
- if (this.filterModal)
11983
- this.filterModal.destroy();
11984
- }
11985
- createFilterFromColumns() {
11986
- if (!this.filterModal) {
11987
- const originalProps = {
11988
- height: 'auto',
11989
- maxHeight: '18.75rem',
11990
- persistent: true,
11991
- title: 'FILTER',
11992
- };
11993
- const mergeModalFilterProps = Object.assign(originalProps, this.grid.modalFilterProps);
11994
- const filterModalDef = {
11995
- name: `${this.grid.name}-filter-modal`,
11996
- persistent: mergeModalFilterProps.persistent,
11997
- grid: mergeModalFilterProps.grid,
11998
- cssClass: mergeModalFilterProps.cssClass,
11999
- cssStyle: mergeModalFilterProps.cssStyle,
12000
- draggable: mergeModalFilterProps.draggable,
12001
- dragHandle: mergeModalFilterProps.dragHandle,
12002
- fullscreen: mergeModalFilterProps.fullscreen,
12003
- light: mergeModalFilterProps.light,
12004
- dark: mergeModalFilterProps.dark,
12005
- escKeydownStop: false,
12006
- children: [
12007
- {
12008
- name: `${this.grid.name}-filter-header-container`,
12009
- component: 'ZdContainer',
12010
- cssClass: 'zd-pa-0 zd-display-flex',
12011
- children: [
12012
- {
12013
- name: `${this.grid.name}-filter-title`,
12014
- component: 'ZdText',
12015
- cssStyle: `color: ${'var(--v-primary-base);'}`,
12016
- text: mergeModalFilterProps.title,
12017
- tag: 'h3',
12018
- },
12019
- {
12020
- name: `${this.grid.name}-filter-spacer`,
12021
- component: 'VSpacer',
12022
- },
12023
- {
12024
- name: `${this.grid.name}-filter-close-button`,
12025
- component: 'ZdModalCloseButton',
12026
- small: true,
12027
- modalName: `${this.grid.name}-filter-modal`,
12028
- },
12029
- ],
12030
- },
12031
- {
12032
- name: `${this.grid.name}-filter-content-container`,
12033
- component: 'ZdContainer',
12034
- scrollView: true,
12035
- cssClass: 'zd-my-2 zd-pa-0 tek-grid-filter-content-container',
12036
- maxHeight: mergeModalFilterProps.maxHeight,
12037
- height: mergeModalFilterProps.height,
12038
- children: [
12039
- {
12040
- name: `${this.grid.name}-filter-form`,
12041
- component: 'ZdForm',
12042
- cssClass: 'zd-my-2 zd-pa-0',
12043
- children: this.getFilterModalComponents(),
12044
- events: {
12045
- onMounted: this.loadFilterValues.bind(this),
12046
- },
12047
- },
12048
- ],
12049
- },
12050
- {
12051
- name: `${this.grid.name}-filter-footer-container`,
12052
- component: 'ZdContainer',
12053
- cssClass: 'zd-pa-0',
12054
- children: [
12055
- {
12056
- name: `${this.grid.name}-filter-footer`,
12057
- component: 'ZdFooter',
12058
- color: 'transparent',
12059
- padless: true,
12060
- leftSlot: [
12061
- {
12062
- name: `${this.grid.name}-filter-clearButton`,
12063
- component: 'ZdButton',
12064
- label: 'CLEAR',
12065
- outline: true,
12066
- events: {
12067
- click: this.clearFilter.bind(this),
12068
- },
12069
- },
12070
- ],
12071
- rightSlot: [
12072
- {
12073
- name: `${this.grid.name}-filter-cancelButton`,
12074
- component: 'ZdButton',
12075
- label: 'CANCEL',
12076
- keyMap: {
12077
- esc: {
12078
- event: this.hideFilterModal.bind(this),
12079
- focus: true,
12080
- visible: true,
12081
- input: true,
12082
- stop: true,
12083
- },
12084
- },
12085
- outline: true,
12086
- events: {
12087
- click: this.hideFilterModal.bind(this),
12088
- },
12089
- },
12090
- {
12091
- name: `${this.grid.name}-filter-okButton`,
12092
- component: 'ZdButton',
12093
- label: 'OK',
12094
- events: {
12095
- click: this.applyFilter.bind(this),
12096
- },
12097
- keyMap: {
12098
- 'mod+enter': {
12099
- event: this.applyFilter.bind(this),
12100
- focus: true,
12101
- input: true,
12102
- stop: true,
12103
- visible: true,
12104
- },
12105
- },
12106
- },
12107
- ],
12108
- },
12109
- ],
12110
- },
12111
- ],
12112
- };
12113
- this.filterModal = ModalService.create(filterModalDef);
12114
- }
12115
- else {
12116
- this.loadFilterValues({ component: Metadata.getInstance(`${this.grid.name}-filter-form`) });
12117
- }
12118
- this.filterModal.show();
12119
- }
12120
- onBeforeDestroy() {
12121
- super.onBeforeDestroy();
12122
- this.destroyFilterModal();
12123
- }
12124
- formatFormValue(filterForm) {
12125
- // TODO: add this logic when SelectMultiple is implemented
12126
- // return Object.keys(filterForm.value).reduce((result, item) => {
12127
- // try {
12128
- // const itemInstance = filterForm.getChildInstance<Input>(item);
12129
- // if (!(itemInstance instanceof SelectMultiple) || !itemInstance.checkboxAll) return result;
12130
- // // when selectmultiple with checkboxAll, should either remove it from the filter or
12131
- // // change the value to T, depending on selectAllCompatibilityMode
12132
- // if ((Config as ITekConfig).selectAllCompatibilityMode) {
12133
- // result[item] = 'T';
12134
- // return result;
12135
- // }
12136
- // delete result[item];
12137
- // return result;
12138
- // } catch (e) {
12139
- // return result;
12140
- // }
12141
- // }, { ...filterForm.value });
12142
- return filterForm.value;
12143
- }
12144
- async applyFilter({ event }) {
12145
- const filterForm = Metadata.getInstance(`${this.grid.name}-filter-form`);
12146
- const isFormValid = await filterForm.validate();
12147
- if (isFormValid.valid) {
12148
- const { datasource } = this.grid;
12149
- const filter = {};
12150
- const formValue = this.formatFormValue(filterForm);
12151
- if (datasource instanceof TekRestDatasource || datasource instanceof TekMemoryDatasource) {
12152
- Object.keys(formValue).forEach((item) => {
12153
- const itemValue = formValue[item];
12154
- if (itemValue && !(Array.isArray(itemValue) && !itemValue.length)) {
12155
- const relationAndOperationAndName = item.split(`${this.grid.name}-filter-`)[1];
12156
- const [relation, operation] = relationAndOperationAndName.split('-');
12157
- let columnName = relationAndOperationAndName.split(`${relation}-${operation}-`)[1];
12158
- columnName = columnName.split('-').slice(0, -1).join('-'); // remove index
12159
- if (!filter[columnName]) {
12160
- filter[columnName] = [];
12161
- }
12162
- const value = itemValue;
12163
- filter[columnName].push({
12164
- relation,
12165
- operation,
12166
- value,
12167
- });
12168
- }
12169
- });
12170
- datasource.dynamicFilter = filter;
12171
- this.setFilter(filter, event, datasource.setDynamicFilter.bind(datasource));
12172
- }
12173
- else {
12174
- Object.keys(formValue).forEach((item) => {
12175
- let columnName = item.split(`${this.grid.name}-filter-AND-CONTAINS-`)[1];
12176
- columnName = columnName.split('-').slice(0, -1).join('-'); // remove index
12177
- if (formValue[item]) {
12178
- filter[columnName] = formValue[item];
12179
- }
12180
- });
12181
- datasource.filter = filter;
12182
- this.setFilter(filter, event, datasource.setFilter.bind(datasource));
12183
- }
12184
- this.grid.changeLayout(event);
12185
- }
12186
- }
12187
- setFilter(filter, event, filterFn) {
12188
- this.grid.callEvent('beforeApplyFilter', { component: this.grid, event });
12189
- if (event.defaultPrevented)
12190
- return;
12191
- filterFn(filter);
12192
- this.hideFilterModal();
12193
- }
12194
- clearFilter() {
12195
- const filterForm = Metadata.getInstance(`${this.grid.name}-filter-form`);
12196
- Object.keys(filterForm.value).forEach((item) => {
12197
- filterForm.value[item] = null;
12198
- });
12199
- }
12200
- sortFilterIndex(col1, col2) {
12201
- const index1 = col1.filterIndex !== undefined ? col1.filterIndex : Number.MAX_SAFE_INTEGER;
12202
- const index2 = col2.filterIndex !== undefined ? col2.filterIndex : Number.MAX_SAFE_INTEGER;
12203
- return index1 - index2;
12204
- }
12205
- getFilterModalComponents() {
12206
- const filterColumns = [];
12207
- let columnComponentName;
12208
- [...this.grid.columns].sort(this.sortFilterIndex).forEach((column) => {
12209
- const filterProps = Array.isArray(column.filterProps) ? column.filterProps : [column.filterProps];
12210
- if (column.filterable && filterProps && filterProps.length > 0) {
12211
- this.filterFormInputs[column.name] = [];
12212
- filterProps.forEach((filterItem, index) => {
12213
- const { datasource } = this.grid;
12214
- if (datasource instanceof TekRestDatasource || datasource instanceof TekMemoryDatasource) {
12215
- const relation = filterItem.relation || 'AND';
12216
- const operation = filterItem.operation || 'CONTAINS';
12217
- columnComponentName = `${this.grid.name}-filter-${relation}-${operation}-${column.name}-${index}`;
12218
- }
12219
- else {
12220
- columnComponentName = `${this.grid.name}-filter-AND-CONTAINS-${column.name}-${index}`;
12221
- }
12222
- this.filterFormInputs[column.name].push(columnComponentName);
12223
- const newColumnComponent = {
12224
- label: column.label,
12225
- ...column.componentProps,
12226
- ...filterItem,
12227
- name: columnComponentName,
12228
- };
12229
- if (filterItem.helperOptions) {
12230
- if (!newColumnComponent.events)
12231
- newColumnComponent.events = {};
12232
- newColumnComponent.events.change = this.changeHelperEvent.bind(this, column);
12233
- }
12234
- if (newColumnComponent.component === 'ZdSelectMultiple') {
12235
- newColumnComponent.showCheckboxAll = newColumnComponent.showCheckboxAll ?? this.showCheckboxAll;
12236
- }
12237
- filterColumns.push(newColumnComponent);
12238
- });
12239
- }
12240
- });
12241
- return filterColumns;
12242
- }
12243
- changeHelperEvent(column, { component }) {
12244
- const { helperValue } = component;
12245
- const componentName = component.name;
12246
- if (!Array.isArray(column.filterProps)) {
12247
- column.filterProps.helperValue = helperValue;
12248
- }
12249
- else {
12250
- column.filterProps.forEach((prop) => {
12251
- const relationAndOperationAndName = componentName.split(`${this.grid.name}-filter-`)[1];
12252
- const [relation, operation] = relationAndOperationAndName.split('-');
12253
- if ((prop.relation || 'AND') === relation && (prop.operation || 'CONTAINS') === operation) {
12254
- prop.helperValue = helperValue;
12255
- }
12256
- });
12257
- }
12258
- }
12259
- }
12260
-
12261
- class GroupedDataManager {
12262
- grid;
12263
- summaryColumns = [];
12264
- groups = [];
12265
- summary = {};
12266
- groupedData = [];
12267
- groupColumnNames = [];
12268
- groupColumns = [];
12269
- originalDatasourceLoadAll;
12270
- originalDatasourceLimit;
12271
- viewUpdateScrollData;
12272
- viewUpdateFixedColumns;
12273
- constructor(grid) {
12274
- this.grid = grid;
12275
- }
12276
- setViewUpdateFixedColumns(fn) {
12277
- this.viewUpdateFixedColumns = fn;
12278
- }
12279
- setViewUpdateScrollData(fn) {
12280
- this.viewUpdateScrollData = fn;
12281
- }
12282
- /**
12283
- * Tasks that should be finished before loading the grid data
12284
- */
12285
- tasksBeforeLoad = [];
12286
- registerTask(task) {
12287
- this.tasksBeforeLoad.push(task);
12288
- }
12289
- request = () => {
12290
- throw new NonInitializedError(this.constructor.name);
12291
- };
12292
- debounceUpdateGrouping = () => {
12293
- throw new NonInitializedError(this.constructor.name);
12294
- };
12295
- /**
12296
- * Loads grid data after resolving all tasks
12297
- */
12298
- async loadAfterTasks() {
12299
- Promise.all(this.tasksBeforeLoad.map((promise) => promise.catch(() => undefined)));
12300
- this.tasksBeforeLoad = [];
12301
- return this.request();
12302
- }
12303
- initializeDebounceFunctions() {
12304
- this.request = debounce(() => {
12305
- this.grid.reload();
12306
- }, 500);
12307
- this.debounceUpdateGrouping = debounce((lazyLoad = false) => {
12308
- this.updateGroupedData(lazyLoad);
12309
- }, 100);
12310
- }
12311
- /**
12312
- * Initializes grid groups, summary columns and registers the grid datasource callback
12313
- * @param lazyLoad defines if the grid should automatically load data after updating the datasource
12314
- */
12315
- initializeGrouping(lazyLoad) {
12316
- this.initializeDebounceFunctions();
12317
- this.initGroups();
12318
- this.initSummaryColumns();
12319
- this.originalDatasourceLoadAll = this.grid.datasource.loadAll;
12320
- this.originalDatasourceLimit = this.grid.datasource.limit;
12321
- this.grid.datasource.registerGetCallback((data) => this.onGet(data));
12322
- this.updateGrouping(lazyLoad);
12323
- }
12324
- onGet(data) {
12325
- if (this.isGrouped()) {
12326
- this.buildGroupedData();
12327
- }
12328
- return data;
12329
- }
12330
- resetFooterVariables(group) {
12331
- this.summaryColumns.forEach((column) => {
12332
- group.footer[column.name] = {
12333
- count: 0,
12334
- sum: undefined,
12335
- avg: undefined,
12336
- min: undefined,
12337
- max: undefined,
12338
- };
12339
- });
12340
- }
12341
- initGroups() {
12342
- this.groups = [];
12343
- this.groupColumns.forEach((column) => {
12344
- const newGroup = {
12345
- column,
12346
- name: column.name,
12347
- label: column.label,
12348
- lastValue: undefined,
12349
- initialized: false,
12350
- footer: {},
12351
- };
12352
- this.resetFooterVariables(newGroup);
12353
- this.groups.push(newGroup);
12354
- });
12355
- }
12356
- getGroupedData() {
12357
- return this.groupedData;
12358
- }
12359
- initSummaryColumns() {
12360
- this.summaryColumns = this.grid.columns.filter((column) => !!column.aggregation && !column.grouped);
12361
- this.summary = {};
12362
- }
12363
- /**
12364
- * Calls updateGroupedData with debounce
12365
- */
12366
- updateGrouping(lazyLoad) {
12367
- this.debounceUpdateGrouping(lazyLoad);
12368
- }
12369
- /**
12370
- * Inits summary columns, updates the grid datasource and, if needed, reloads the grid data
12371
- */
12372
- async updateGroupedData(lazyLoad) {
12373
- this.initSummaryColumns();
12374
- this.updateGridDatasource();
12375
- if (!lazyLoad) {
12376
- await this.loadAfterTasks();
12377
- }
12378
- if (this.grid.virtualScroll && this.viewUpdateScrollData) {
12379
- this.viewUpdateScrollData();
12380
- }
12381
- if (this.viewUpdateFixedColumns) {
12382
- this.viewUpdateFixedColumns();
12383
- }
12384
- }
12385
- /**
12386
- * When using groups, should update the grid datasource order to reflect the group order
12387
- * If the grid is not grouped, should not update the datasource order
12388
- */
12389
- updateGridDatasource() {
12390
- this.groupedData = [];
12391
- this.groupColumns = this.grid.columns.filter((column) => column.grouped);
12392
- this.groupColumnNames = this.groupColumns.map((column) => column.name);
12393
- if (this.isGrouped()) {
12394
- if (this.groupColumns.length) {
12395
- const order = this.getOrder(this.groupColumnNames, this.grid.datasource.order);
12396
- this.grid.datasource.order = order;
12397
- }
12398
- this.grid.datasource.loadAll = true;
12399
- return;
12400
- }
12401
- this.grid.datasource.loadAll = this.originalDatasourceLoadAll;
12402
- this.grid.datasource.limit = this.originalDatasourceLimit;
12403
- }
12404
- /**
12405
- * Returns the order to be used in the grid datasource based on the group column names and the grid order
12406
- */
12407
- getOrder(groupColumnNames, gridOrder) {
12408
- const groupOrderColumns = groupColumnNames.map((column) => `${column}.asc`);
12409
- const otherOrderColumns = gridOrder.filter((column) => groupColumnNames.indexOf(column.split('.')[0]) === -1);
12410
- return [...groupOrderColumns, ...otherOrderColumns];
12411
- }
12412
- /**
12413
- * Returns the summary data for the group
12414
- */
12415
- getSummaryData(group) {
12416
- const summaryData = {};
12417
- this.summaryColumns.forEach((column) => {
12418
- const { aggregation } = column;
12419
- const currentGroup = group[column.name];
12420
- if (!currentGroup) {
12421
- summaryData[column.name] = 0;
12422
- return;
12423
- }
12424
- if (aggregation === 'COUNT') {
12425
- summaryData[column.name] = currentGroup.count;
12426
- }
12427
- else if (aggregation === 'SUM') {
12428
- summaryData[column.name] = currentGroup.sum;
12429
- }
12430
- else if (aggregation === 'AVG') {
12431
- if (currentGroup.avg) {
12432
- summaryData[column.name] = currentGroup.avg;
12433
- }
12434
- else if (typeof currentGroup.sum === 'number') {
12435
- summaryData[column.name] = currentGroup.sum / currentGroup.count;
12436
- }
12437
- }
12438
- else if (aggregation === 'MIN') {
12439
- summaryData[column.name] = currentGroup.min;
12440
- }
12441
- else {
12442
- // if (aggregation === 'MAX') {
12443
- summaryData[column.name] = currentGroup.max;
12444
- }
12445
- });
12446
- return summaryData;
12447
- }
12448
- /**
12449
- * Adds group footers to the grouped data
12450
- */
12451
- addGroupFooters(groupIndex) {
12452
- if (this.summaryColumns.length === 0) {
12453
- return;
12454
- }
12455
- for (let i = this.groups.length - 1; i >= groupIndex; i -= 1) {
12456
- if (this.groups[i].initialized) {
12457
- const groupFooterRow = {
12458
- groupFooter: true,
12459
- groupIndex: i,
12460
- groupHeaders: [],
12461
- groupLabel: this.groups[i].lastGroupHeaderRow.groupLabel,
12462
- groupValue: this.groups[i].lastGroupHeaderRow.groupValue,
12463
- ...this.getSummaryData(this.groups[i].footer),
12464
- };
12465
- // add header for outer groups
12466
- for (let g = 0; g < i; g += 1) {
12467
- const { lastGroupHeaderRow } = this.groups[g];
12468
- if (lastGroupHeaderRow) {
12469
- groupFooterRow.groupHeaders.push(lastGroupHeaderRow);
12470
- }
12471
- }
12472
- this.groupedData.push(groupFooterRow);
12473
- }
12474
- }
12475
- }
12476
- getGroupValue(group, row) {
12477
- const groupColumn = this.grid.getColumn(group.column.name);
12478
- const cellsApplied = this.grid.getAppliedConditions({ row, column: groupColumn });
12479
- if (!isFilledObject(cellsApplied)) {
12480
- this.grid.reapplyConditions(row);
12481
- }
12482
- const groupValue = groupColumn.formatterByRow(row, cellsApplied);
12483
- return groupValue;
12484
- }
12485
- addGroupHeader(row, group, index) {
12486
- const groupValue = this.getGroupValue(group, row) || group.column.groupLabelForEmptyValue;
12487
- const groupHeaderRow = {
12488
- group: true,
12489
- groupRow: row,
12490
- groupColumnName: group.column.name,
12491
- groupHeader: true,
12492
- groupIndex: index,
12493
- groupLabel: I18n.translate(group.label),
12494
- groupValue,
12495
- groupOpened: group.column.groupOpened || this.grid.groupsOpened,
12496
- groupHeaders: [],
12497
- children: [],
12498
- };
12499
- // add header for outer groups to the added row
12500
- for (let i = 0; i < index; i += 1) {
12501
- groupHeaderRow.groupHeaders.push(this.groups[i].lastGroupHeaderRow);
12502
- }
12503
- group.lastGroupHeaderRow = groupHeaderRow;
12504
- group.initialized = true;
12505
- this.groupedData.push(groupHeaderRow);
12506
- }
12507
- calcSummaryValues(column, summary, row) {
12508
- const rowValue = row[column.name];
12509
- if (isNil(rowValue))
12510
- return;
12511
- summary.count += 1;
12512
- if (this.grid.events.calcSummary) {
12513
- this.grid.calcSummary(column, summary, row);
12514
- return;
12515
- }
12516
- if (summary.min === undefined)
12517
- summary.min = rowValue;
12518
- if (summary.max === undefined)
12519
- summary.max = rowValue;
12520
- summary.min = rowValue < summary.min ? rowValue : summary.min;
12521
- summary.max = rowValue > summary.max ? rowValue : summary.max;
12522
- if (typeof rowValue === 'number') {
12523
- summary.sum = (summary.sum || 0) + rowValue;
12524
- }
12525
- }
12526
- calcSummary(row) {
12527
- if (this.summaryColumns.length === 0)
12528
- return;
12529
- this.summaryColumns.forEach((column) => {
12530
- const columnName = column.name;
12531
- if (isNil(this.summary[columnName])) {
12532
- this.summary[columnName] = {
12533
- count: 0,
12534
- sum: undefined,
12535
- avg: undefined,
12536
- min: undefined,
12537
- max: undefined,
12538
- };
12539
- }
12540
- this.calcSummaryValues(column, this.summary[columnName], row);
12541
- this.groups.forEach((group) => {
12542
- this.calcSummaryValues(column, group.footer[columnName], row);
12543
- });
12544
- });
12545
- }
12546
- addSummary() {
12547
- if (this.summaryColumns.length === 0)
12548
- return;
12549
- const summaryRow = {
12550
- groupFooter: true,
12551
- groupSummary: true,
12552
- ...this.getSummaryData(this.summary),
12553
- };
12554
- this.groupedData.push(summaryRow);
12555
- }
12556
- /**
12557
- * It takes a flat array of data and groups it by the group columns specified in
12558
- * the grid.
12559
- */
12560
- buildGroupedData() {
12561
- this.initGroups();
12562
- this.initSummaryColumns();
12563
- this.groupedData = [];
12564
- const data = this.grid.getData();
12565
- data.forEach((row) => {
12566
- let groupBreak = false;
12567
- this.groups.forEach((group, index) => {
12568
- const groupValue = row[group.name];
12569
- if (group.lastValue !== groupValue || groupBreak) {
12570
- if (!groupBreak) {
12571
- this.addGroupFooters(index);
12572
- }
12573
- group.lastValue = groupValue;
12574
- this.resetFooterVariables(group);
12575
- this.addGroupHeader(row, group, index);
12576
- groupBreak = true;
12577
- }
12578
- });
12579
- this.groups.forEach((group) => {
12580
- group.lastGroupHeaderRow.children.push(row);
12581
- });
12582
- this.groupedData.push({
12583
- ...row,
12584
- groupHeaders: this.groups.map((group) => group.lastGroupHeaderRow).filter(Boolean),
12585
- });
12586
- this.calcSummary(row);
12587
- });
12588
- if (this.groupedData.length > 0) {
12589
- this.addGroupFooters(0);
12590
- if (this.grid.showSummaryTotal) {
12591
- this.addSummary();
12592
- }
12593
- }
12594
- }
12595
- openGroup(group) {
12596
- group.groupOpened = !group.groupOpened;
12597
- if (this.grid.virtualScroll && this.viewUpdateScrollData)
12598
- this.viewUpdateScrollData();
12599
- }
12600
- isItemVisible(row) {
12601
- return !row.groupHeaders || !row.groupHeaders.length || row.groupHeaders.every((group) => group.groupOpened);
12602
- }
12603
- isGrouped() {
12604
- return !!this.groupColumnNames.length || (this.grid.showSummaryTotal && !!this.summaryColumns.length);
12605
- }
12606
- isColumnSearchable(column) {
12607
- return !this.grid.searchVisibleOnly || column.isVisible || column.grouped;
12608
- }
12609
- directionalLeft() {
12610
- const { currentRow } = this.grid.datasource;
12611
- if (currentRow.group && currentRow.groupOpened) {
12612
- currentRow.groupOpened = false;
12613
- return;
12614
- }
12615
- if (this.grid.cellSelection || !currentRow.groupHeaders?.length)
12616
- return;
12617
- const newCurrentRow = currentRow.groupHeaders[currentRow.groupHeaders.length - 1];
12618
- this.grid.setCurrentRow(newCurrentRow);
12619
- }
12620
- directionalRight() {
12621
- const { currentRow } = this.grid.datasource;
12622
- if (!currentRow.group || currentRow.groupOpened)
12623
- return;
12624
- currentRow.groupOpened = true;
12625
- }
12626
- }
12627
-
12628
- class GroupedViewNavigator {
12629
- viewNavigator;
12630
- grid;
12631
- constructor(iterable) {
12632
- this.viewNavigator = new ViewNavigator();
12633
- this.grid = iterable;
12634
- }
12635
- navigateLeft(param) {
12636
- this.viewNavigator.navigateLeft(param);
12637
- }
12638
- navigateRight(param) {
12639
- this.viewNavigator.navigateRight(param);
12640
- }
12641
- setViewNavigate(viewNavigate) {
12642
- this.viewNavigator.setViewNavigate(viewNavigate);
12643
- }
12644
- getRowIndex(groupedData, index) {
12645
- if (index)
12646
- return index;
12647
- const { currentRow } = this.grid.datasource;
12648
- return groupedData.findIndex((row) => {
12649
- if (currentRow.group) {
12650
- return row.group && row.groupValue === currentRow.groupValue;
12651
- }
12652
- const rowKey = this.grid.getRowKey(row);
12653
- const currentRowKey = this.grid.getRowKey(currentRow);
12654
- return rowKey && rowKey === currentRowKey;
12655
- });
12656
- }
12657
- navigateUp(index) {
12658
- if (!this.grid.isGrouped() || this.grid.cellSelection) {
12659
- this.viewNavigator.navigateUp();
12660
- return;
12661
- }
12662
- const groupedData = this.grid.getGroupedData();
12663
- if (!groupedData.length || index === -1)
12664
- return;
12665
- let rowIndex = this.getRowIndex(groupedData, index);
12666
- if (rowIndex === -1)
12667
- rowIndex = groupedData.length;
12668
- const newRow = groupedData[rowIndex - 1];
12669
- if (!newRow || !this.grid.isItemVisible(newRow) || newRow.groupFooter) {
12670
- this.navigateUp(rowIndex - 1);
12671
- return;
12672
- }
12673
- this.grid.setCurrentRow(newRow);
12674
- }
12675
- navigateDown(index) {
12676
- if (!this.grid.isGrouped() || this.grid.cellSelection) {
12677
- this.viewNavigator.navigateDown();
12678
- return;
12679
- }
12680
- const groupedData = this.grid.getGroupedData();
12681
- if (!groupedData.length || index === groupedData.length)
12682
- return;
12683
- const rowIndex = this.getRowIndex(groupedData, index);
12684
- const newRow = groupedData[rowIndex + 1];
12685
- if (!newRow || !this.grid.isItemVisible(newRow) || newRow.groupFooter) {
12686
- this.navigateDown(rowIndex + 1);
12687
- return;
12688
- }
12689
- this.grid.setCurrentRow(newRow);
12690
- }
12691
- }
12692
-
12693
- const tuple = (...args) => args;
12694
- const columnAggregationValues = tuple('SUM', 'MIN', 'MAX', 'AVG', 'COUNT', undefined);
12695
-
12696
- class KeyMapGrouped {
12697
- getMap(instance) {
12698
- return {
12699
- left: {
12700
- event: instance.directionalLeft.bind(instance),
12701
- stop: true,
12702
- active: true,
12703
- },
12704
- right: {
12705
- event: instance.directionalRight.bind(instance),
12706
- stop: true,
12707
- active: true,
12708
- },
12709
- };
12710
- }
12711
- }
12712
-
12713
- class GroupedDataSelector extends DataSelector {
12714
- selectAll(isSelected) {
12715
- if (!this.iterable.selectable)
12716
- return;
12717
- this.iterable.selectionState = { allSelected: isSelected, except: [] };
12718
- const data = this.getData();
12719
- if (!isSelected) {
12720
- data.forEach((row) => {
12721
- const index = this.iterable.selectedRows.indexOf(row);
12722
- if (index > -1) {
12723
- this.iterable.selectedRows.splice(index, 1);
12724
- }
12725
- });
12726
- return;
12727
- }
12728
- data.forEach((row) => {
12729
- if (this.callDisableSelection(row))
12730
- return;
12731
- const key = this.iterable.getRowKey(row);
12732
- if (key && this.iterable.selectedRows.indexOf(row) === -1) {
12733
- this.iterable.selectedRows.push(row);
12734
- }
12735
- });
12736
- }
12737
- getData() {
12738
- if (this.iterable.isGrouped()) {
12739
- return this.iterable.getGroupedData();
12740
- }
12741
- return this.iterable.getData();
12742
- }
12743
- }
12744
-
12745
- /**
12746
- * Base class for TekGrid column
12747
- */
12748
- class TekGridColumn extends GridColumnEditable {
12749
- /* filter component props */
12750
- filterProps = [];
12751
- /* column can be use to filter */
12752
- filterable = true;
12753
- /* Index of the column inside filter modal */
12754
- filterIndex;
12755
- /* should not consider lookup column on search */
12756
- skipLookupSearch = false;
12757
- /* column is grouped */
12758
- groupedValue = false;
12759
- /* column group is opened */
12760
- groupOpenedValue = false;
12761
- /* Value to show when grouped value is empty */
12762
- groupLabelForEmptyValue = '';
12763
- /* column has aggregation */
12764
- aggregationValue;
12765
- /* column is visible */
12766
- isVisibleValue = true;
12767
- /**
12768
- * Defines if the column should store the componentProps datasource.data in memory
12769
- */
12770
- storeData = true;
12771
- grid;
12772
- /* istanbul ignore next */
12773
- /**
12774
- * Creates a new TekGrid Column.
12775
- * @param props TekGrid column properties
12776
- */
12777
- constructor(props, grid) {
12778
- super(props);
12779
- this.grid = grid;
12780
- this.isVisible = this.getInitValue('isVisible', props.isVisible, this.isVisible);
12781
- this.filterProps = this.getInitValue('filterProps', props.filterProps, this.filterProps);
12782
- this.filterable = this.getInitValue('filterable', props.filterable, this.filterable);
12783
- this.filterIndex = this.getInitValue('filterIndex', props.filterIndex, this.filterIndex);
12784
- this.skipLookupSearch = this.getInitValue('skipLookupSearch', props.skipLookupSearch, this.skipLookupSearch);
12785
- this.grouped = this.getInitValue('grouped', props.grouped, this.grouped);
12786
- this.groupOpened = this.getInitValue('groupOpened', props.groupOpened, this.groupOpened);
12787
- this.aggregation = this.getInitValue('aggregation', props.aggregation, this.aggregation);
12788
- this.groupLabelForEmptyValue = this.getInitValue('groupLabelForEmptyValue', props.groupLabelForEmptyValue, this.groupLabelForEmptyValue);
12789
- this.storeData = this.getInitValue('storeData', props.storeData, this.storeData);
12790
- this.createAccessors();
12791
- }
12792
- async getBatchLookupData(lookupColumn, values) {
12793
- const batch = [];
12794
- const dataToLookup = [];
12795
- values.forEach((value) => {
12796
- if (this.lookupData[value]) {
12797
- batch.push(this.lookupData[value]);
12798
- return;
12799
- }
12800
- const dataIndex = this.lookupDatasource.data.findIndex((row) => row[lookupColumn] === value);
12801
- if (dataIndex !== -1) {
12802
- this.lookupData[value] = this.lookupDatasource.data[dataIndex];
12803
- batch.push(this.lookupData[value]);
12804
- return;
12805
- }
12806
- dataToLookup.push(value);
12807
- });
12808
- if (dataToLookup.length > 0) {
12809
- await this.lookupFn(lookupColumn, dataToLookup);
12810
- dataToLookup.forEach((value) => {
12811
- const row = this.lookupData[value];
12812
- if (row)
12813
- batch.push(row);
12814
- });
12815
- }
12816
- return batch;
12817
- }
12818
- /**
12819
- * Memory search, without changing lookupDatasource
12820
- */
12821
- async memorySearch(search) {
12822
- if (!this.lookupDatasource) {
12823
- throw new Error("Can't search in a column that doesn't have a datasource");
12824
- }
12825
- let { data } = this.lookupDatasource;
12826
- if (this.storeData) {
12827
- if (!data.length) {
12828
- data = await this.lookupDatasource.get();
12829
- }
12830
- }
12831
- else {
12832
- // datasource without the lookup filters
12833
- const defaultDs = DatasourceFactory.factory({
12834
- ...this.componentProps.datasource,
12835
- lazyLoad: true,
12836
- loadAll: true,
12837
- });
12838
- defaultDs.initialize();
12839
- data = await defaultDs.get();
12840
- }
12841
- const { dataText } = this.componentProps;
12842
- const searchIn = Array.isArray(dataText) ? dataText : [dataText];
12843
- // get datasource as memory
12844
- const datasource = DatasourceFactory.factory({
12845
- searchIn,
12846
- data,
12847
- type: 'memory',
12848
- loadAll: true,
12849
- });
12850
- datasource.initialize();
12851
- return datasource.setSearch(search);
12852
- }
12853
- get grouped() {
12854
- return this.groupedValue;
12855
- }
12856
- set grouped(value) {
12857
- const changed = value !== this.groupedValue;
12858
- this.groupedValue = value;
12859
- if (changed) {
12860
- this.changeGrouping();
12861
- }
12862
- }
12863
- get aggregation() {
12864
- return this.aggregationValue;
12865
- }
12866
- set aggregation(value) {
12867
- const changed = value !== this.aggregationValue;
12868
- this.aggregationValue = value;
12869
- if (changed) {
12870
- this.changeGrouping();
12871
- }
12872
- }
12873
- get groupOpened() {
12874
- return this.groupOpenedValue;
12875
- }
12876
- set groupOpened(value) {
12877
- const changed = value !== this.groupOpenedValue;
12878
- this.groupOpenedValue = value;
12879
- if (changed) {
12880
- this.changeGrouping();
12881
- }
12882
- }
12883
- /* istanbul ignore next */
12884
- // @ts-ignore
12885
- get isVisible() {
12886
- return this.isVisibleValue && !this.grouped;
12887
- }
12888
- /* istanbul ignore next */
12889
- set isVisible(value) {
12890
- this.isVisibleValue = value;
12891
- }
12892
- changeGrouping() {
12893
- // wait for grid.constructor to be fully executed
12894
- setTimeout(() => {
12895
- this.grid.updateGrouping();
12896
- });
12897
- }
12898
- }
12899
-
12900
- class TekGridController {
12901
- grid;
12902
- openToolbar = true;
12903
- constructor(grid) {
12904
- this.grid = grid;
12905
- this.openToolbar = this.grid.toolbarOpened;
12906
- }
12907
- get gridTitle() {
12908
- return this.grid.title;
12909
- }
12910
- get showAddButton() {
12911
- return this.grid.addButton;
12912
- }
12913
- get showDeleteButton() {
12914
- return this.grid.deleteButton !== 'none';
12915
- }
12916
- get showFilterButton() {
12917
- return this.grid.filterButton;
12918
- }
12919
- get showModalFilterProps() {
12920
- return this.grid.modalFilterProps;
12921
- }
12922
- get showSearchInput() {
12923
- return this.grid.showSearch;
12924
- }
12925
- get showToolbar() {
12926
- return this.openToolbar;
12927
- }
12928
- set showToolbar(value) {
12929
- this.openToolbar = value;
12930
- }
12931
- get toolbarClass() {
12932
- return !this.openToolbar ? 'is-rotated' : '';
12933
- }
12934
- get tooltipName() {
12935
- return !this.openToolbar ? 'TEKGRID_SHOW' : 'TEKGRID_HIDE';
12936
- }
12937
- get showReloadButton() {
12938
- return this.grid.showReload;
12939
- }
12940
- get showDivider2() {
12941
- return (this.showReloadButton &&
12942
- (this.showLayoutOptionsButton ||
12943
- this.showColumnsButton ||
12944
- this.showActionsButton ||
12945
- this.showExportButton ||
12946
- this.showSearchInput));
12947
- }
12948
- get showColumnsButton() {
12949
- return this.grid.columnsButton;
12950
- }
12951
- get columnsButtonIgnore() {
12952
- return this.grid.columnsButtonIgnore;
12953
- }
12954
- get showLayoutOptionsButton() {
12955
- return this.grid.showLayoutOptions;
12956
- }
12957
- get showDivider1() {
12958
- return ((this.showAddButton || this.showDeleteButton) &&
12959
- (this.showReloadButton ||
12960
- this.showLayoutOptionsButton ||
12961
- this.showColumnsButton ||
12962
- this.showActionsButton ||
12963
- this.showExportButton ||
12964
- this.showSearchInput));
12965
- }
12966
- get showActionsButton() {
12967
- return this.grid.actions.length > 0;
12968
- }
12969
- get showExportButton() {
12970
- return this.grid.showExport;
12971
- }
12972
- get showActionAndExportButton() {
12973
- return ((this.showLayoutOptionsButton || this.showColumnsButton) &&
12974
- (this.showActionsButton || this.showExportButton || this.showSearchInput));
12975
- }
12976
- get showDivider3() {
12977
- return (this.showActionsButton || this.showExportButton) && this.showSearchInput;
12978
- }
12979
- get isEditing() {
12980
- return this.grid.editing;
12981
- }
12982
- get showEditButtons() {
12983
- return this.isEditing && this.grid.showEditButtons;
12984
- }
12985
- get isNotEditing() {
12986
- return !this.isEditing;
12987
- }
12988
- get disableDeleteButton() {
12989
- if (this.grid.deleteButton === 'selection') {
12990
- if (this.grid.selectAllPages) {
12991
- const { allSelected, except } = this.grid.selectionState;
12992
- return (allSelected && except.length === this.grid.datasource.total) || (!allSelected && except.length === 0);
12993
- }
12994
- return this.grid.selectedRows.length === 0;
12995
- }
12996
- if (this.grid.deleteButton === 'currentRow') {
12997
- return !this.grid.datasource.currentRow[this.grid.datasource.uniqueKey];
12998
- }
12999
- return false;
13000
- }
13001
- }
13002
-
13003
- class TekGridEvents extends GridEditableEvents {
13004
- tekGrid;
13005
- /**
13006
- * Flag to prevent row click
13007
- */
13008
- preventRowClick = false;
13009
- preventRowDoubleClick = false;
13010
- constructor(tekGrid) {
13011
- super(tekGrid);
13012
- this.tekGrid = tekGrid;
13013
- }
13014
- calcSummary(column, summary, row) {
13015
- this.tekGrid.callEvent('calcSummary', {
13016
- component: this.tekGrid,
13017
- column,
13018
- columnName: column.name,
13019
- summary,
13020
- row,
13021
- rowValue: row[column.name],
13022
- });
13023
- }
13024
- rowDoubleClick(row, event, element) {
13025
- if (!this.preventRowDoubleClick) {
13026
- this.tekGrid.datasource.currentRow = row;
13027
- this.tekGrid.callEvent('rowDoubleClick', {
13028
- event,
13029
- element,
13030
- row,
13031
- component: this.tekGrid,
13032
- column: undefined,
13033
- });
13034
- }
13035
- this.preventRowDoubleClick = false;
13036
- }
13037
- /**
13038
- * Dispatches group row click event
13039
- * @param row Grid row
13040
- * @param event DOM event
13041
- * @param element DOM Element
13042
- */
13043
- groupRowClick(row, event, element) {
13044
- if (!this.preventRowClick) {
13045
- this.tekGrid.callEvent('groupRowClick', {
13046
- event,
13047
- element,
13048
- row,
13049
- component: this.tekGrid,
13050
- column: undefined,
13051
- });
13052
- }
13053
- this.preventRowClick = false;
13054
- }
13055
- groupRowDoubleClick(row, event, element) {
13056
- if (!this.preventRowDoubleClick) {
13057
- this.tekGrid.callEvent('groupRowDoubleClick', {
13058
- event,
13059
- element,
13060
- row,
13061
- component: this.tekGrid,
13062
- column: undefined,
13063
- });
13064
- }
13065
- this.preventRowDoubleClick = false;
13066
- }
13067
- /**
13068
- * Dispatches group select/unselect event
13069
- * @param row Group row
13070
- * @param isSelected Row is selected
13071
- * @param event DOM event
13072
- * @param element DOM Element
13073
- */
13074
- selectGroupClick(row, isSelected, event, element) {
13075
- if (isSelected) {
13076
- this.tekGrid.callEvent('groupSelected', {
13077
- event,
13078
- element,
13079
- row,
13080
- component: this.tekGrid,
13081
- column: undefined,
13082
- });
13083
- }
13084
- else {
13085
- this.tekGrid.callEvent('groupUnselected', {
13086
- event,
13087
- element,
13088
- row,
13089
- component: this.tekGrid,
13090
- column: undefined,
13091
- });
13092
- }
13093
- }
13094
- }
13095
-
13096
- /* TekGrid Class */
13097
- class TekGrid extends Iterable {
13098
- tableActionBuilder;
13099
- iterableTable;
13100
- dataSelector;
13101
- tekGridEvents;
13102
- dataNavigator;
13103
- groupedViewNavigator;
13104
- keyMapMerger;
13105
- dataEditor;
13106
- columnsSearcher;
13107
- groupedDataManager;
13108
- tekGridToolbarProvider;
13109
- /* Grid Title */
13110
- title = '';
13111
- /* Show Add button */
13112
- addButton = false;
13113
- /* Show Delete button */
13114
- deleteButton = 'none';
13115
- /* Show Delete button */
13116
- actions = [];
13117
- /* Show edit button */
13118
- showEditButtons = true;
13119
- /* Show Filter button */
13120
- filterButton = false;
13121
- /* Show SearchInput */
13122
- showSearch = true;
13123
- /* Show Column Filter button */
13124
- columnFilterButton = false;
13125
- /* Show Columns button */
13126
- columnsButton = false;
13127
- /* Defines if the grid is the unique grid on screen */
13128
- mainGrid = true;
13129
- /* Columns to be ignored on columns button */
13130
- columnsButtonIgnore = [];
13131
- /**
13132
- * Enables column dragging
13133
- * @public
13134
- */
13135
- dragColumns = true;
13136
- /**
13137
- * Enables column resizing
13138
- * @public
13139
- */
13140
- resizeColumns = true;
13141
- /**
13142
- * Enables layout saving
13143
- * @public
13144
- */
13145
- showLayoutOptions = true;
13146
- xlsDefaultType;
13147
- modalFilterProps = {
13148
- name: this.name,
13149
- height: 'auto',
13150
- persistent: true,
13151
- cssClass: '',
13152
- cssStyle: '',
13153
- dark: false,
13154
- draggable: false,
13155
- fullscreen: false,
13156
- dragHandle: '',
13157
- title: 'FILTER',
13158
- };
13159
- /**
13160
- * Show export button
13161
- */
13162
- showExport = false;
13163
- /**
13164
- * Show refresh button
13165
- */
13166
- showReload = true;
13167
- /**
13168
- * Export config
13169
- */
13170
- exportConfig = [
13171
- {
13172
- type: 'pdf',
13173
- label: I18n.translate('TEKGRID_EXPORT_AS', { type: 'PDF' }),
13174
- multiOption: [
13175
- { label: I18n.translate('TEKGRID_PORTRAIT'), iconName: 'mdi-file-outline' },
13176
- {
13177
- label: I18n.translate('TEKGRID_LANDSCAPE'),
13178
- iconName: 'mdi-file-outline',
13179
- cssClass: 'tek-grid-export-landscape',
13180
- reportParams: { portrait: false },
13181
- },
13182
- ],
13183
- },
13184
- {
13185
- type: 'xls',
13186
- label: I18n.translate('TEKGRID_EXPORT_AS', {
13187
- type: 'XLS',
13188
- }),
13189
- },
13190
- {
13191
- type: 'xls2',
13192
- label: I18n.translate('TEKGRID_EXPORT_AS', {
13193
- type: `XLS ${I18n.translate('TEKGRID_WITH_GROUPS')}`,
13194
- }),
13195
- },
13196
- {
13197
- type: 'xls3',
13198
- label: I18n.translate('TEKGRID_EXPORT_AS', {
13199
- type: `XLS ${I18n.translate('TEKGRID_GRID_MIRROR')}`,
13200
- }),
13201
- },
13202
- {
13203
- type: 'csv',
13204
- label: I18n.translate('TEKGRID_EXPORT_AS', { type: 'CSV' }),
13205
- },
13206
- ];
13207
- /**
13208
- * Actions to overwrite the default export config
13209
- */
13210
- exportActions;
13211
- /**
13212
- * Groups should be opened by default after building
13213
- */
13214
- groupsOpened = false;
13215
- /**
13216
- * Show Total summary
13217
- */
13218
- showSummaryTotal = true;
13219
- editNewRowsOnly = false;
13220
- keyShortcutKeyMapping;
13221
- showCheckboxAllFilter = Config.gridShowCheckboxAllFilter || false;
13222
- defaultFilter = {};
13223
- toolbarOpened = true;
13224
- reportTitle = '';
13225
- editing = false;
13226
- currentColumn = null;
13227
- selectedRows = [];
13228
- selectionState = {
13229
- allSelected: false,
13230
- except: [],
13231
- };
13232
- rowStyleConditions;
13233
- selectAllPages = Config.gridSelectAllPages;
13234
- selectable = false;
13235
- disableSelection;
13236
- cellSelection = false;
13237
- toolbarSlot = [{ name: '<<NAME>>_gridSearch', component: 'ZdSearch' }];
13238
- footerSlot = [
13239
- { name: '<<NAME>>_iterablePagination', component: 'ZdIterablePagination' },
13240
- {
13241
- name: '<<NAME>>_iterableInfoDiv',
13242
- component: 'ZdTag',
13243
- cssClass: 'zd-grid-div-footer',
13244
- tag: 'div',
13245
- children: [
13246
- {
13247
- name: '<<NAME>>_iterablePageSize',
13248
- component: 'ZdIterablePageSize',
13249
- iterableComponentName: '<<NAME>>',
13250
- },
13251
- {
13252
- name: '<<NAME>>_iterablePageInfo',
13253
- component: 'ZdIterablePageInfo',
13254
- iterableComponentName: '<<NAME>>',
13255
- },
13256
- ],
13257
- },
13258
- ];
13259
- noResultsText = 'NO_RESULT';
13260
- noResultSlot = [
13261
- {
13262
- name: '<<NAME>>_no-result',
13263
- component: 'ZdText',
13264
- cssClass: 'no-result',
13265
- text: this.noResultsText,
13266
- },
13267
- ];
13268
- errorSlot = [];
13269
- dense = true;
13270
- headerBackground = '';
13271
- headerCellTextColor = '';
13272
- height = 'auto';
13273
- loadingText = 'LOADING';
13274
- maxHeight = 'none';
13275
- maxWidth = 'none';
13276
- minHeight = 'auto';
13277
- minWidth = 'auto';
13278
- noDataText = 'NO_DATA';
13279
- noDataSlot = [
13280
- {
13281
- name: '<<NAME>>_no-data',
13282
- component: 'ZdText',
13283
- cssClass: 'no-data',
13284
- text: this.noDataText,
13285
- },
13286
- ];
13287
- showFooter = true;
13288
- showHeader = true;
13289
- showSelectAll = true;
13290
- width = '100%';
13291
- backgroundColor = 'transparent';
13292
- canEditRow;
13293
- showCancelColumn = false;
13294
- doubleClickEdit = false;
13295
- singleEdit = false;
13296
- editingNewRows = false;
13297
- defaultLazy = false;
13298
- toolbarSlotProps = false;
13299
- filterRelationsDatasource;
13300
- filterOperationsDatasource;
13301
- /**
13302
- * TekGrid class constructor
13303
- * @param props TekGrid properties
13304
- */
13305
- constructor(props) {
13306
- super(props);
13307
- this.title = this.getInitValue('title', props.title, this.title);
13308
- this.addButton = this.getInitValue('addButton', props.addButton, this.addButton);
13309
- this.deleteButton = this.getInitValue('deleteButton', props.deleteButton, this.deleteButton);
13310
- this.filterButton = this.getInitValue('filterButton', props.filterButton, this.filterButton);
13311
- this.showSearch = this.getInitValue('showSearch', props.showSearch, this.showSearch);
13312
- this.columnFilterButton = this.getInitValue('columnFilterButton', props.columnFilterButton, this.columnFilterButton);
13313
- this.columnsButton = this.getInitValue('columnsButton', props.columnsButton, this.columnsButton);
13314
- this.columnsButtonIgnore = this.getInitValue('columnsButtonIgnore', props.columnsButtonIgnore, this.columnsButtonIgnore);
13315
- this.showEditButtons = this.getInitValue('showEditButtons', props.showEditButtons, this.showEditButtons);
13316
- this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
13317
- this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
13318
- this.showLayoutOptions = this.getInitValue('showLayoutOptions', props.showLayoutOptions, this.showLayoutOptions);
13319
- this.xlsDefaultType = this.getInitValue('xlsDefaultType', props.xlsDefaultType, this.xlsDefaultType);
13320
- this.showExport = this.getInitValue('showExport', props.showExport, this.showExport);
13321
- this.showReload = this.getInitValue('showReload', props.showReload, this.showReload);
13322
- this.exportConfig = this.getInitValue('exportConfig', props.exportConfig, this.exportConfig);
13323
- this.modalFilterProps = this.getInitValue('modalFilterProps', props.modalFilterProps, this.modalFilterProps);
13324
- this.exportActions = props.exportActions || this.exportActions;
13325
- this.groupsOpened = this.getInitValue('groupsOpened', props.groupsOpened, this.groupsOpened);
13326
- this.showSummaryTotal = this.getInitValue('showSummaryTotal', props.showSummaryTotal, this.showSummaryTotal);
13327
- this.showCheckboxAllFilter = this.getInitValue('showCheckboxAllFilter', props.showCheckboxAllFilter, this.showCheckboxAllFilter);
13328
- this.defaultFilter = this.getInitValue('defaultFilter', props.defaultFilter, this.defaultFilter);
13329
- this.toolbarOpened = this.getInitValue('toolbarOpened', props.toolbarOpened, this.toolbarOpened);
13330
- this.editNewRowsOnly = this.getInitValue('editNewRowsOnly', props.editNewRowsOnly, this.editNewRowsOnly);
13331
- this.mainGrid = this.getInitValue('mainGrid', props.mainGrid, this.mainGrid);
13332
- this.reportTitle = this.getInitValue('reportTitle', props.reportTitle, this.reportTitle);
13333
- this.actions = props.actions || this.actions;
13334
- this.toolbarSlotProps = props.toolbarSlot !== undefined;
13335
- this.cellSelection = this.getInitValue('cellSelection', props.cellSelection, this.cellSelection);
13336
- this.dense = this.getInitValue('dense', props.dense, this.dense);
13337
- this.disableSelection = this.getInitValue('disableSelection', props.disableSelection, this.disableSelection);
13338
- this.dragColumns = this.getInitValue('dragColumns', props.dragColumns, this.dragColumns);
13339
- this.fillHeight = this.getInitValue('fillHeight', props.fillHeight, this.fillHeight);
13340
- this.headerCellTextColor = this.getInitValue('headerCellTextColor', props.headerCellTextColor, this.headerCellTextColor);
13341
- this.height = this.getInitValue('height', props.height, this.height);
13342
- this.loadingText = this.getInitValue('loadingText', props.loadingText, this.loadingText);
13343
- this.maxHeight = this.getInitValue('maxHeight', props.maxHeight, this.maxHeight);
13344
- this.maxWidth = this.getInitValue('maxWidth', props.maxWidth, this.maxWidth);
13345
- this.minHeight = this.getInitValue('minHeight', props.minHeight, this.minHeight);
13346
- this.minWidth = this.getInitValue('minWidth', props.minWidth, this.minWidth);
13347
- this.noDataText = this.getInitValue('noDataText', props.noDataText, this.noDataText);
13348
- this.noResultsText = this.getInitValue('noResultsText', props.noResultsText, this.noResultsText);
13349
- this.resizeColumns = this.getInitValue('resizeColumns', props.resizeColumns, this.resizeColumns);
13350
- this.rowStyleConditions = this.getInitValue('rowStyleConditions', props.rowStyleConditions, this.rowStyleConditions);
13351
- this.selectable = this.getInitValue('selectable', props.selectable, this.selectable);
13352
- this.selectAllPages = this.getInitValue('selectAllPages', props.selectAllPages, this.selectAllPages);
13353
- this.showFooter = this.getInitValue('showFooter', props.showFooter, this.showFooter);
13354
- this.showHeader = this.getInitValue('showHeader', props.showHeader, this.showHeader);
13355
- this.showSelectAll = this.getInitValue('showSelectAll', props.showSelectAll, this.showSelectAll);
13356
- this.width = this.getInitValue('width', props.width, this.width);
13357
- this.backgroundColor = this.getInitValue('backgroundColor', props.backgroundColor, this.backgroundColor);
13358
- // headerBackground defaults to the backgroundColor, unless backgroundColor is transparent
13359
- const defaultHeaderBackground = this.backgroundColor === 'transparent' ? '' : this.backgroundColor;
13360
- this.headerBackground = this.getInitValue('headerBackground', props.headerBackground, defaultHeaderBackground);
13361
- this.doubleClickEdit = this.getInitValue('doubleClickEdit', props.doubleClickEdit, this.doubleClickEdit);
13362
- this.singleEdit = this.getInitValue('singleEdit', props.singleEdit, this.singleEdit);
13363
- this.showCancelColumn = this.getInitValue('showCancelColumn', props.showCancelColumn, this.showCancelColumn);
13364
- this.canEditRow = this.getInitValue('canEditRow', props.canEditRow, this.canEditRow);
13365
- this.editingNewRows = this.getInitValue('editingNewRows', props.editingNewRows, this.editingNewRows);
13366
- this.toolbarSlot = props.toolbarSlot || this.toolbarSlot;
13367
- this.footerSlot = props.footerSlot || this.footerSlot;
13368
- this.noDataSlot = props.noDataSlot || this.noDataSlot;
13369
- this.noResultSlot = props.noResultSlot || this.noResultSlot;
13370
- this.errorSlot = props.errorSlot || this.errorSlot;
13371
- this.noDataSlot = this.changeDefaultSlotNames(this.noDataSlot);
13372
- this.footerSlot = this.changeDefaultSlotNames(this.footerSlot);
13373
- this.toolbarSlot = this.changeDefaultSlotNames(this.toolbarSlot);
13374
- this.noResultSlot = this.changeDefaultSlotNames(this.noResultSlot);
13375
- this.errorSlot = this.changeDefaultSlotNames(this.errorSlot);
13376
- this.defaultLazy = this.getDefaultLazy(props);
13377
- if (this.deleteButton === 'selection') {
13378
- this.selectable = true;
13379
- }
13380
- this.tableActionBuilder = new TableActionBuilder(this);
13381
- this.iterableTable = new IterableTable(this);
13382
- this.dataSelector = new GroupedDataSelector(this);
13383
- this.tekGridEvents = new TekGridEvents(this);
13384
- this.dataNavigator = new DataNavigator(this);
13385
- this.groupedViewNavigator = new GroupedViewNavigator(this);
13386
- this.dataEditor = new DataEditorWithAdd(this);
13387
- this.columnsSearcher = new ColumnsSearcher();
13388
- this.groupedDataManager = new GroupedDataManager(this);
13389
- this.tekGridToolbarProvider = new TekGridToolbarProvider(this, 'show');
13390
- }
13391
- initializeDatasource(props) {
13392
- let datasourceProps = clonedeep(props.datasource);
13393
- // if using accessor, get props from the controller
13394
- if (typeof props.datasource === 'string' && Accessor.isAccessorDefinition(props.datasource)) {
13395
- const [controller, accessor] = Accessor.getAccessor(props.datasource);
13396
- const instance = Loader.getInstance(controller);
13397
- datasourceProps = instance[accessor];
13398
- }
13399
- this.datasource = DatasourceFactory.factory({
13400
- ...datasourceProps,
13401
- searchIn: props.datasource?.searchIn || `{{IterableController_${this.name}.searchIn}}`,
13402
- lazyLoad: true,
13403
- });
13404
- }
13405
- columnHasFilter(columnName) {
13406
- return this.datasource.hasFilter(columnName);
13407
- }
13408
- registerTask(task) {
13409
- this.groupedDataManager.registerTask(task);
13410
- }
13411
- async loadAfterTasks() {
13412
- return this.groupedDataManager.loadAfterTasks();
13413
- }
13414
- calcSummary(column, columnNamesummary, row) {
13415
- this.tekGridEvents.calcSummary(column, columnNamesummary, row);
13416
- }
13417
- getDefaultLazy(props) {
13418
- if (typeof props.datasource === 'object') {
13419
- return props.datasource.lazyLoad;
13420
- }
13421
- if (typeof props.datasource === 'string' && Accessor.isAccessorDefinition(props.datasource)) {
13422
- const [controller, accessor] = Accessor.getAccessor(props.datasource);
13423
- const instance = Loader.getInstance(controller);
13424
- return instance[accessor].lazyLoad || false;
13425
- }
13426
- return false;
13427
- }
13428
- initializeGrouping(lazyLoad) {
13429
- this.groupedDataManager.initializeGrouping(lazyLoad);
13430
- }
13431
- updateGrouping() {
13432
- return this.groupedDataManager.updateGrouping();
13433
- }
13434
- updateGroupedData(lazyLoad) {
13435
- return this.groupedDataManager.updateGroupedData(lazyLoad);
13436
- }
13437
- buildGroupedData() {
13438
- this.groupedDataManager.buildGroupedData();
13439
- }
13440
- openGroup(group) {
13441
- this.groupedDataManager.openGroup(group);
13442
- }
13443
- isItemVisible(row) {
13444
- return this.groupedDataManager.isItemVisible(row);
13445
- }
13446
- isGrouped() {
13447
- return this.groupedDataManager.isGrouped();
13448
- }
13449
- isColumnSearchable(column) {
13450
- return this.groupedDataManager.isColumnSearchable(column);
13451
- }
13452
- getGroupedData() {
13453
- return this.groupedDataManager.getGroupedData();
13454
- }
13455
- directionalLeft(param) {
13456
- this.groupedDataManager.directionalLeft(param);
13457
- this.groupedViewNavigator.navigateLeft(param);
13458
- }
13459
- directionalRight(param) {
13460
- this.groupedDataManager.directionalRight(param);
13461
- this.groupedViewNavigator.navigateRight(param);
13462
- }
13463
- getReport() {
13464
- throw new Error('Method not implemented.');
13465
- }
13466
- setViewUpdateFixedColumns(fn) {
13467
- this.groupedDataManager.setViewUpdateFixedColumns(fn);
13468
- }
13469
- setViewUpdateScrollData(fn) {
13470
- this.groupedDataManager.setViewUpdateScrollData(fn);
13471
- }
13472
- onCreated() {
13473
- super.onCreated();
13474
- Loader.addController(`GridController_${this.name}`, TekGridController, [this]);
13475
- if (!this.toolbarSlotProps)
13476
- this.toolbarSlot = this.tekGridToolbarProvider.getProperties();
13477
- this.createDynamicFilterDatasources();
13478
- }
13479
- createDynamicFilterDatasources() {
13480
- if (!(this.datasource instanceof TekRestDatasource || this.datasource instanceof TekMemoryDatasource))
13481
- return;
13482
- const datasourceFactory = new DynamicFilterDatasourceFactory();
13483
- this.filterRelationsDatasource = datasourceFactory.factory(this.datasource.dynamicFilterRelations);
13484
- this.filterOperationsDatasource = datasourceFactory.factory(this.datasource.dynamicFilterOperations);
13485
- }
13486
- onMounted(element) {
13487
- super.onMounted(element);
13488
- this.keyMapMerger = new KeyMapMerger(this, [KeyMapNavigation, KeyMapEditing, KeyMapGrouped]);
13489
- this.keyMapMerger.bind(element);
13490
- this.initializeGrouping(this.defaultLazy);
13491
- }
13492
- onBeforeDestroy() {
13493
- super.onBeforeDestroy();
13494
- this.keyMapMerger.unbind();
13495
- }
13496
- createColumn(column) {
13497
- return new TekGridColumn(column, this);
13498
- }
13499
- getConditionalProps({ row, column }) {
13500
- const rowStyle = this.getRowStyleConditions(row);
13501
- const cellsApplied = this.getAppliedConditions({ row, column });
13502
- return { ...rowStyle, ...cellsApplied };
13503
- }
13504
- changeOrder(sortBy) {
13505
- return this.iterableTable.changeOrder(sortBy);
13506
- }
13507
- selectCell(row, column) {
13508
- this.iterableTable.selectCell(row, column);
13509
- }
13510
- reapplyRowStyleConditions(row) {
13511
- return this.iterableTable.reapplyRowStyleConditions(row);
13512
- }
13513
- getRowStyleConditions(row) {
13514
- return this.iterableTable.getRowStyleConditions(row);
13515
- }
13516
- deleteRows() {
13517
- return this.iterableTable.deleteRows();
13518
- }
13519
- selectAll(isSelected) {
13520
- this.dataSelector.selectAll(isSelected);
13521
- }
13522
- toggleRow(row) {
13523
- this.dataSelector.toggleRow(row);
13524
- }
13525
- selectRow(row, select) {
13526
- this.dataSelector.selectRow(row, select);
13527
- }
13528
- callDisableSelection(row) {
13529
- return this.dataSelector.callDisableSelection(row);
13530
- }
13531
- selectClick(row, isSelected, event, element) {
13532
- this.dataSelector.selectClick(row, isSelected, event, element);
13533
- }
13534
- selectAllClick(isSelected, event, element) {
13535
- this.dataSelector.selectAllClick(isSelected, event, element);
13536
- }
13537
- navigatePageUp() {
13538
- this.dataNavigator.navigatePageUp();
13539
- }
13540
- navigatePageDown() {
13541
- this.dataNavigator.navigatePageDown();
13542
- }
13543
- setViewNavigate(viewNavigate) {
13544
- this.groupedViewNavigator.setViewNavigate(viewNavigate);
13545
- }
13546
- navigateLeft(params) {
13547
- if (!this.cellSelection)
13548
- return;
13549
- this.groupedViewNavigator.navigateLeft(params);
13550
- }
13551
- navigateRight(params) {
13552
- if (!this.cellSelection)
13553
- return;
13554
- this.groupedViewNavigator.navigateRight(params);
13555
- }
13556
- navigateUp() {
13557
- this.groupedViewNavigator.navigateUp();
13558
- }
13559
- navigateDown() {
13560
- this.groupedViewNavigator.navigateDown();
13561
- }
13562
- navigateDatasource(direction) {
13563
- this.dataNavigator.navigateDatasource(direction);
13564
- }
13565
- getActionComponent(actionComponent, column, row, parentPath) {
13566
- return this.tableActionBuilder.getActionComponent(actionComponent, column, row, parentPath);
13567
- }
13568
- addCancelColumn() {
13569
- this.dataEditor.addCancelColumn();
13570
- }
13571
- getCancelColumnProps() {
13572
- return this.dataEditor.getCancelColumnProps();
13573
- }
13574
- isAdded(row) {
13575
- return this.dataEditor.isAdded(row);
13576
- }
13577
- cancelAddedRow(key) {
13578
- return this.dataEditor.cancelAddedRow(key);
13579
- }
13580
- cancelAddedRows() {
13581
- return this.dataEditor.cancelAddedRows();
13582
- }
13583
- getAddedRows() {
13584
- return this.dataEditor.getAddedRows();
13585
- }
13586
- addNewRow(row, position) {
13587
- return this.dataEditor.addNewRow(row, position);
13588
- }
13589
- getVisibleValue(row, column) {
13590
- return this.dataEditor.getVisibleValue(row, column);
13591
- }
13592
- getEditableComponent(column, row) {
13593
- return this.dataEditor.getEditableComponent(column, row);
13594
- }
13595
- isEdited(column, row) {
13596
- return this.dataEditor.isEdited(column, row);
13597
- }
13598
- isValid(column, row, revalidate) {
13599
- return this.dataEditor.isValid(column, row, revalidate);
13600
- }
13601
- checkValid(column, row) {
13602
- return this.dataEditor.checkValid(column, row);
13603
- }
13604
- isGridValid(revalidate) {
13605
- return this.dataEditor.isGridValid(revalidate);
13606
- }
13607
- getComponent(key, columnName) {
13608
- return this.dataEditor.getComponent(key, columnName);
13609
- }
13610
- updateRow(newRow) {
13611
- this.dataEditor.updateRow(newRow);
13612
- }
13613
- updateCell(rowKey, columnName, value) {
13614
- this.dataEditor.updateCell(rowKey, columnName, value);
13615
- }
13616
- setViewEnterEdit(fn) {
13617
- this.dataEditor.setViewEnterEdit(fn);
13618
- }
13619
- enterEdit(rowKey, columnName) {
13620
- this.dataEditor.enterEdit(rowKey, columnName);
13621
- }
13622
- cancelEditedRows() {
13623
- return this.dataEditor.cancelEditedRows();
13624
- }
13625
- saveEditedRows(revalidate) {
13626
- return this.dataEditor.saveEditedRows(revalidate);
13627
- }
13628
- reapplyCanEditRow(row) {
13629
- return this.dataEditor.reapplyCanEditRow(row);
13630
- }
13631
- getCanEditRow(row) {
13632
- return this.dataEditor.getCanEditRow(row);
13633
- }
13634
- getEditedRows(revalidate, silent) {
13635
- return this.dataEditor.getEditedRows(revalidate, silent);
13636
- }
13637
- getEditedRow(row) {
13638
- return this.dataEditor.getEditedRow(row);
13639
- }
13640
- rowClick(row, event, element) {
13641
- this.tekGridEvents.rowClick(row, event, element);
13642
- }
13643
- rowDoubleClick(row, event, element) {
13644
- this.tekGridEvents.rowDoubleClick(row, event, element);
13645
- }
13646
- cellDoubleClick(row, column, event, element) {
13647
- this.tekGridEvents.cellDoubleClick(row, column, event, element);
13648
- }
13649
- inlineEdit(row, column, event, element) {
13650
- this.tekGridEvents.inlineEdit(row, column, event, element);
13651
- }
13652
- cellClick(row, column, event, element) {
13653
- this.tekGridEvents.cellClick(row, column, event, element);
13654
- }
13655
- cellClickEvent(row, column, event, element) {
13656
- this.tekGridEvents.cellClickEvent(row, column, event, element);
13657
- }
13658
- groupRowClick(row, event, element) {
13659
- this.tekGridEvents.groupRowClick(row, event, element);
13660
- }
13661
- groupRowDoubleClick(row, event, element) {
13662
- this.tekGridEvents.groupRowDoubleClick(row, event, element);
13663
- }
13664
- selectGroupClick(row, isSelected, event, element) {
13665
- this.tekGridEvents.selectGroupClick(row, isSelected, event, element);
13666
- }
13667
- async setSearch(search) {
13668
- const { datasource } = this;
13669
- if (datasource instanceof TekRestDatasource || datasource instanceof TekMemoryDatasource) {
13670
- datasource.searchJoin = await this.columnsSearcher.searchColumn(this.columns, search);
13671
- }
13672
- datasource.page = 1;
13673
- return datasource.setSearch(search);
13674
- }
13675
- getAtomInstance(key) {
13676
- return this.tekGridToolbarProvider.getAtomInstance(key);
13677
- }
13678
- getAtomName(key) {
13679
- return this.tekGridToolbarProvider.getAtomName(key);
13680
- }
13681
- }
13682
- Messages.add({
13683
- 'pt-BR': {
13684
- translation: {
13685
- TEKGRID_CONTAINS: 'contém',
13686
- TEKGRID_NOT_CONTAINS: 'não contém',
13687
- TEKGRID_EQUALS: 'é igual a',
13688
- TEKGRID_NOT_EQUALS: 'é diferente de',
13689
- TEKGRID_GREATER_THAN: 'é maior que',
13690
- TEKGRID_LESS_THAN: 'é menor que',
13691
- TEKGRID_GREATER_THAN_EQUALS: 'é maior ou igual a',
13692
- TEKGRID_LESS_THAN_EQUALS: 'é menor ou igual a',
13693
- TEKGRID_IN: 'um dos valores',
13694
- TEKGRID_NOT_IN: 'nenhum dos valores',
13695
- TEKGRID_BETWEEN: 'está entre',
13696
- TEKGRID_AND: 'e',
13697
- TEKGRID_OR: 'ou',
13698
- TEKGRID_HIDE: 'Esconder Ações',
13699
- TEKGRID_SHOW: 'Mostrar Ações',
13700
- TEKGRID_ADD: 'Adicionar',
13701
- TEKGRID_DELETE: 'Excluir',
13702
- TEKGRID_REFRESH: 'Atualizar',
13703
- TEKGRID_COLUMNS: 'Colunas',
13704
- TEKGRID_SAVE: 'Salvar',
13705
- TEKGRID_CANCEL: 'Cancelar',
13706
- TEKGRID_APPLY: 'Aplicar',
13707
- TEKGRID_FILTER: 'Filtro',
13708
- TEKGRID_MULTIPLE_VALUE_HINT: 'Separe valores usando ";"',
13709
- TEKGRID_EXPORT: 'Exportar',
13710
- TEKGRID_EXPORT_AS: 'Exportar como {{ type }}',
13711
- TEKGRID_PORTRAIT: 'Retrato',
13712
- TEKGRID_LANDSCAPE: 'Paisagem',
13713
- TEKGRID_COLUMN_VISIBLE: 'Visível',
13714
- TEKGRID_COLUMN_GROUPED: 'Grupo',
13715
- TEKGRID_COLUMN_AGGREGATION: 'Totalização',
13716
- TEKGRID_COLUMN_LABEL: 'Rótulo',
13717
- TEKGRID_COLUMN_ALIGNMENT: 'Alinhamento',
13718
- TEKGRID_COLUMN_GROUP_OPENED: 'Aberto (grupo)',
13719
- TEKGRID_COLUMN_ORDER: 'Ordem',
13720
- TEKGRID_COLUMN_ORDER_DIRECTION: 'Direção (ordem)',
13721
- TEKGRID_AGGREGATION_SUM: 'Soma',
13722
- TEKGRID_AGGREGATION_AVG: 'Média',
13723
- TEKGRID_AGGREGATION_MAX: 'Máximo',
13724
- TEKGRID_AGGREGATION_MIN: 'Mínimo',
13725
- TEKGRID_AGGREGATION_COUNT: 'Contador',
13726
- TEKGRID_MORE_OPTIONS: 'Mais opções',
13727
- TEKGRID_COLUMNS_OPTIONS: 'Configuração de colunas',
13728
- TEKGRID_CLOSE: 'Fechar',
13729
- TEKGRID_FIXED_COLUMNS: 'Colunas fixadas',
13730
- TEKGRID_VISIBLE_COLUMNS: 'Colunas visíveis',
13731
- TEKGRID_GROUPED_COLUMNS: 'Colunas agrupadas',
13732
- TEKGRID_ORDER: 'Ordem',
13733
- TEKGRID_OTHER_COLUMNS: 'Outras colunas',
13734
- TEKGRID_DROP_COLUMNS: 'Arraste colunas aqui',
13735
- TEKGRID_DETAILS_FOR: 'Detalhes para:',
13736
- TEKGRID_LEFT: 'Esquerda',
13737
- TEKGRID_CENTER: 'Centro',
13738
- TEKGRID_RIGHT: 'Direita',
13739
- TEKGRID_ASC: 'Crescente',
13740
- TEKGRID_DESC: 'Decrescente',
13741
- TEKGRID_SELECT_COLUMN: '(selecione uma ou mais colunas)',
13742
- TEKGRID_SELECT_ALL: 'Selecionar todas',
13743
- TEKGRID_HELPERVALUE_TODAY: 'Hoje',
13744
- TEKGRID_HELPERVALUE_TOMORROW: 'Amanhã',
13745
- TEKGRID_HELPERVALUE_YESTERDAY: 'Ontem',
13746
- TEKGRID_HELPERVALUE_LAST_7_DAYS: 'Últimos 7 Dias',
13747
- TEKGRID_HELPERVALUE_NEXT_7_DAYS: 'Próximos 7 Dias',
13748
- TEKGRID_HELPERVALUE_CURRENT_WEEK: 'Semana Atual',
13749
- TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Mês Atual',
13750
- TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Ano Atual',
13751
- TEKGRID_WITH_GROUPS: '(Com grupos)',
13752
- TEKGRID_GRID_MIRROR: '(Espelho do grid)',
13753
- TEKGRID_NO_DATA: 'Não há dados para gerar o relatório',
13754
- },
13755
- },
13756
- 'en-US': {
13757
- translation: {
13758
- TEKGRID_CONTAINS: 'contains',
13759
- TEKGRID_NOT_CONTAINS: 'does not contain',
13760
- TEKGRID_EQUALS: 'is equal to',
13761
- TEKGRID_NOT_EQUALS: 'is different from',
13762
- TEKGRID_GREATER_THAN: 'is greater than',
13763
- TEKGRID_LESS_THAN: 'is less than',
13764
- TEKGRID_GREATER_THAN_EQUALS: 'is greater or equals to',
13765
- TEKGRID_LESS_THAN_EQUALS: 'is less or equals to',
13766
- TEKGRID_IN: 'is in',
13767
- TEKGRID_NOT_IN: 'is not in',
13768
- TEKGRID_BETWEEN: 'is between',
13769
- TEKGRID_AND: 'and',
13770
- TEKGRID_OR: 'or',
13771
- TEKGRID_HIDE: 'Hide Actions',
13772
- TEKGRID_SHOW: 'Show Actions',
13773
- TEKGRID_ADD: 'Add',
13774
- TEKGRID_DELETE: 'Delete',
13775
- TEKGRID_REFRESH: 'Refresh',
13776
- TEKGRID_COLUMNS: 'Columns',
13777
- TEKGRID_SAVE: 'Save',
13778
- TEKGRID_CANCEL: 'Cancel',
13779
- TEKGRID_APPLY: 'Apply',
13780
- TEKGRID_FILTER: 'Filter',
13781
- TEKGRID_MULTIPLE_VALUE_HINT: 'Separate values using ";"',
13782
- TEKGRID_EXPORT: 'Export',
13783
- TEKGRID_EXPORT_AS: 'Export as {{ type }}',
13784
- TEKGRID_PORTRAIT: 'Portrait',
13785
- TEKGRID_LANDSCAPE: 'Landscape',
13786
- TEKGRID_COLUMN_VISIBLE: 'Visible',
13787
- TEKGRID_COLUMN_GROUPED: 'Grouped',
13788
- TEKGRID_COLUMN_AGGREGATION: 'Aggregation',
13789
- TEKGRID_COLUMN_LABEL: 'Label',
13790
- TEKGRID_COLUMN_ALIGNMENT: 'Alignment',
13791
- TEKGRID_COLUMN_GROUP_OPENED: 'Opened (group)',
13792
- TEKGRID_COLUMN_ORDER: 'Order',
13793
- TEKGRID_COLUMN_ORDER_DIRECTION: 'Direction (order)',
13794
- TEKGRID_AGGREGATION_SUM: 'Sum',
13795
- TEKGRID_AGGREGATION_AVG: 'Average',
13796
- TEKGRID_AGGREGATION_MAX: 'Maximum',
13797
- TEKGRID_AGGREGATION_MIN: 'Minimum',
13798
- TEKGRID_AGGREGATION_COUNT: 'Count',
13799
- TEKGRID_MORE_OPTIONS: 'More options',
13800
- TEKGRID_COLUMNS_OPTIONS: 'Columns configuration',
13801
- TEKGRID_CLOSE: 'Close',
13802
- TEKGRID_FIXED_COLUMNS: 'Fixed columns',
13803
- TEKGRID_VISIBLE_COLUMNS: 'Visible columns',
13804
- TEKGRID_GROUPED_COLUMNS: 'Grouped columns',
13805
- TEKGRID_ORDER: 'Order',
13806
- TEKGRID_OTHER_COLUMNS: 'Other columns',
13807
- TEKGRID_DROP_COLUMNS: 'Drop columns here',
13808
- TEKGRID_DETAILS_FOR: 'Details for:',
13809
- TEKGRID_LEFT: 'Left',
13810
- TEKGRID_CENTER: 'Center',
13811
- TEKGRID_RIGHT: 'Right',
13812
- TEKGRID_ASC: 'Ascending',
13813
- TEKGRID_DESC: 'Descending',
13814
- TEKGRID_SELECT_COLUMN: '(select one or more columns)',
13815
- TEKGRID_SELECT_ALL: 'Select all',
13816
- TEKGRID_HELPERVALUE_TODAY: 'Today',
13817
- TEKGRID_HELPERVALUE_TOMORROW: 'Tomorrow',
13818
- TEKGRID_HELPERVALUE_YESTERDAY: 'Yesterday',
13819
- TEKGRID_HELPERVALUE_LAST_7_DAYS: 'Last 7 Days',
13820
- TEKGRID_HELPERVALUE_NEXT_7_DAYS: 'Next 7 Days',
13821
- TEKGRID_HELPERVALUE_CURRENT_WEEK: 'Current Week',
13822
- TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Current Month',
13823
- TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Current Year',
13824
- TEKGRID_WITH_GROUPS: '(With groups)',
13825
- TEKGRID_GRID_MIRROR: '(Grid mirror)',
13826
- TEKGRID_NO_DATA: 'There is no data to generate the report',
13827
- },
13828
- },
13829
- 'es-CL': {
13830
- translation: {
13831
- TEKGRID_CONTAINS: 'contiene',
13832
- TEKGRID_NOT_CONTAINS: 'no contiene',
13833
- TEKGRID_EQUALS: 'igual',
13834
- TEKGRID_NOT_EQUALS: 'es diferente de',
13835
- TEKGRID_GREATER_THAN: 'es mayor que',
13836
- TEKGRID_LESS_THAN: 'es menor que',
13837
- TEKGRID_GREATER_THAN_EQUALS: 'es mayor o igual que',
13838
- TEKGRID_LESS_THAN_EQUALS: 'es menor o igual que',
13839
- TEKGRID_IN: 'uno de los valores',
13840
- TEKGRID_NOT_IN: 'ninguno de los valores',
13841
- TEKGRID_BETWEEN: 'está entre',
13842
- TEKGRID_AND: 'e',
13843
- TEKGRID_OR: 'o',
13844
- TEKGRID_HIDE: 'Ocultar Acciones',
13845
- TEKGRID_SHOW: 'Mostrar Acciones',
13846
- TEKGRID_ADD: 'Añadir',
13847
- TEKGRID_DELETE: 'Eliminar',
13848
- TEKGRID_REFRESH: 'Actualizar',
13849
- TEKGRID_COLUMNS: 'Colunas',
13850
- TEKGRID_SAVE: 'Guardar',
13851
- TEKGRID_CANCEL: 'Cancelar',
13852
- TEKGRID_APPLY: 'Aplicar',
13853
- TEKGRID_FILTER: 'Filtro',
13854
- TEKGRID_MULTIPLE_VALUE_HINT: 'Separe los valores usando ";"',
13855
- TEKGRID_EXPORT: 'Exportar',
13856
- TEKGRID_EXPORT_AS: 'Exportar como {{ type }}',
13857
- TEKGRID_PORTRAIT: 'Vertical',
13858
- TEKGRID_LANDSCAPE: 'Horizontal',
13859
- TEKGRID_COLUMN_VISIBLE: 'Visible',
13860
- TEKGRID_COLUMN_GROUPED: 'Grupo',
13861
- TEKGRID_COLUMN_AGGREGATION: 'Totalización',
13862
- TEKGRID_COLUMN_LABEL: 'Etiqueta',
13863
- TEKGRID_COLUMN_ALIGNMENT: 'alineación',
13864
- TEKGRID_COLUMN_GROUP_OPENED: 'Abierto (grupo)',
13865
- TEKGRID_COLUMN_ORDER: 'Orden',
13866
- TEKGRID_COLUMN_ORDER_DIRECTION: 'Dirección (orden)',
13867
- TEKGRID_AGGREGATION_SUM: 'Suma',
13868
- TEKGRID_AGGREGATION_AVG: 'Media',
13869
- TEKGRID_AGGREGATION_MAX: 'Máximo',
13870
- TEKGRID_AGGREGATION_MIN: 'Mínimo',
13871
- TEKGRID_AGGREGATION_COUNT: 'Contar',
13872
- TEKGRID_MORE_OPTIONS: 'Mas opciones',
13873
- TEKGRID_COLUMNS_OPTIONS: 'Configuración de columna',
13874
- TEKGRID_CLOSE: 'Cerrar',
13875
- TEKGRID_FIXED_COLUMNS: 'Columnas fijas',
13876
- TEKGRID_VISIBLE_COLUMNS: 'Columnas visibles',
13877
- TEKGRID_GROUPED_COLUMNS: 'Columnas agrupadas',
13878
- TEKGRID_ORDER: 'Orden',
13879
- TEKGRID_OTHER_COLUMNS: 'Otras columnas',
13880
- TEKGRID_DROP_COLUMNS: 'Arrastra columnas aquí',
13881
- TEKGRID_DETAILS_FOR: 'Detalles para',
13882
- TEKGRID_LEFT: 'Izquierda',
13883
- TEKGRID_CENTER: 'Centro',
13884
- TEKGRID_RIGHT: 'Derecha',
13885
- TEKGRID_ASC: 'Creciente',
13886
- TEKGRID_DESC: 'Decreciente',
13887
- TEKGRID_SELECT_COLUMN: '(seleccione una o más columnas)',
13888
- TEKGRID_SELECT_ALL: 'Seleccionar todas',
13889
- TEKGRID_HELPERVALUE_TODAY: 'Hoy',
13890
- TEKGRID_HELPERVALUE_TOMORROW: 'Mañana',
13891
- TEKGRID_HELPERVALUE_YESTERDAY: 'Ayer',
13892
- TEKGRID_HELPERVALUE_LAST_7_DAYS: 'Últimos 7 días',
13893
- TEKGRID_HELPERVALUE_NEXT_7_DAYS: 'Próximos 7 días',
13894
- TEKGRID_HELPERVALUE_CURRENT_WEEK: 'Semana actual',
13895
- TEKGRID_HELPERVALUE_CURRENT_MONTH: 'Mes actual',
13896
- TEKGRID_HELPERVALUE_CURRENT_YEAR: 'Año actual',
13897
- TEKGRID_WITH_GROUPS: '(Con grupos)',
13898
- TEKGRID_GRID_MIRROR: '(Espejo de grid)',
13899
- TEKGRID_NO_DATA: 'No hay datos para generar el reporte',
13900
- },
13901
- },
13902
- });
13903
- Messages.add({
13904
- 'pt-BR': {
13905
- translation: {
13906
- NO_NOTIFICATIONS: 'Nenhuma Notificação',
13907
- MARK_ALL_AS_READ: 'Marcar todas como lidas',
13908
- NOTIFICATIONS: 'Notificações',
13909
- SEE_ALL_NOTIFICATIONS: 'Ver todas notificações',
13910
- UNAVAILABLE_IMAGE: 'Imagem indisponível',
13911
- REFRESH: 'Atualizar',
13912
- ACTIONS: 'Ações',
13913
- FILTER: 'Filtro',
13914
- LAYOUT: 'Layout: ',
13915
- NEW_LAYOUT: 'Novo layout',
13916
- DEFAULT_LAYOUT: 'Padrão',
13917
- LAYOUT_MODIFIED: 'O layout atual foi modificado. Crie um novo layout, sobrescreva um existente ou descarte as alterações',
13918
- LAYOUT_NOT_MODIFIED: 'Crie um novo layout ou aplique um dos layouts já existentes',
13919
- LAYOUT_DISCART_CHANGES: 'Descartar alterações',
13920
- },
13921
- },
13922
- 'en-US': {
13923
- translation: {
13924
- NO_NOTIFICATIONS: 'No Notifications',
13925
- MARK_ALL_AS_READ: 'Mark all as read',
13926
- NOTIFICATIONS: 'Notifications',
13927
- SEE_ALL_NOTIFICATIONS: 'See all notifications',
13928
- UNAVAILABLE_IMAGE: 'Unavailable image',
13929
- REFRESH: 'Refresh',
13930
- ACTIONS: 'Actions',
13931
- FILTER: 'Filter',
13932
- LAYOUT: 'Layout: ',
13933
- NEW_LAYOUT: 'New layout',
13934
- DEFAULT_LAYOUT: 'Default',
13935
- LAYOUT_MODIFIED: 'The current layout has been modified. Create a new layout, overwrite an existing one or discard changes',
13936
- LAYOUT_NOT_MODIFIED: 'Create a new layout or apply one of the existing layouts',
13937
- LAYOUT_DISCART_CHANGES: 'Discard changes',
13938
- },
13939
- },
13940
- 'es-CL': {
13941
- translation: {
13942
- NO_NOTIFICATIONS: 'Sin Notificación',
13943
- MARK_ALL_AS_READ: 'Marcar todo como leído',
13944
- NOTIFICATIONS: 'Notificaciones',
13945
- SEE_ALL_NOTIFICATIONS: 'Ver todas las notificaciones',
13946
- UNAVAILABLE_IMAGE: 'Imagen no disponible',
13947
- REFRESH: 'Actualizar',
13948
- ACTIONS: 'Acciones',
13949
- FILTER: 'Filtro',
13950
- LAYOUT: 'Disposición: ',
13951
- NEW_LAYOUT: 'Nueva disposición',
13952
- DEFAULT_LAYOUT: 'Default',
13953
- LAYOUT_MODIFIED: 'La disposición actual ha sido modificada. Cree una nueva disposición, sobrescriba una existente o descarte los cambios',
13954
- LAYOUT_NOT_MODIFIED: 'Cree una nueva disposición o aplique una de las disposiciones existentes',
13955
- LAYOUT_DISCART_CHANGES: 'Descartar los cambios',
13956
- },
13957
- },
13958
- });
13959
-
13960
- class TekGridLayoutOptions extends ComponentRender {
13961
- currentLayoutName = '';
13962
- layoutEdited = false;
13963
- layouts = {};
13964
- layoutNames = [];
13965
- viewApplyLayout;
13966
- viewGetCurrentLayout;
13967
- originalColumnProps = [];
13968
- originalDatasourceOrder = [];
13969
- originalDatasourceDynamicFilter = {};
13970
- originalDatasourceFilter = {};
13971
- grid;
13972
- getParentGrid() {
13973
- let { parent } = this;
13974
- while (parent && !(parent.constructor === Iterable || parent.constructor.prototype instanceof Iterable)) {
13975
- parent = parent.parent;
13976
- }
13977
- return parent;
13978
- }
13979
- async onMounted(element) {
13980
- super.onMounted(element);
13981
- this.grid = this.getParentGrid();
13982
- this.originalDatasourceOrder = [...this.grid.datasource.order];
13983
- this.originalDatasourceDynamicFilter = {
13984
- ...this.grid.datasource.dynamicFilter,
13985
- };
13986
- this.originalDatasourceFilter = { ...this.grid.datasource.filter };
13987
- this.originalColumnProps = this.grid.columns.map((column) => ({
13988
- name: column.name,
13989
- label: column.label,
13990
- align: column.align,
13991
- isVisible: column.isVisible,
13992
- minWidth: column.minWidth,
13993
- maxWidth: column.maxWidth,
13994
- width: column.width,
13995
- fixed: column.fixed,
13996
- grouped: column.grouped,
13997
- groupOpened: column.groupOpened,
13998
- aggregation: column.aggregation,
13999
- filterHelperValue: this.getHelperValue(column),
14000
- }));
14001
- let layoutsInfo = {};
14002
- const promise = this.loadLayoutsInfo();
14003
- if (this.grid instanceof TekGrid) {
14004
- this.grid.registerTask(promise);
14005
- }
14006
- layoutsInfo = await promise;
14007
- if (layoutsInfo.layouts) {
14008
- this.layouts = layoutsInfo.layouts;
14009
- this.layoutNames = Object.keys(this.layouts);
14010
- if (layoutsInfo.currentLayoutName) {
14011
- this.currentLayoutName = layoutsInfo.currentLayoutName;
14012
- this.applyLayout(this.currentLayoutName, false);
14013
- }
14014
- }
14015
- }
14016
- async loadLayoutsInfo() {
14017
- const eventFunction = this.events.loadLayouts || this.grid.events.loadLayouts;
14018
- if (eventFunction && typeof eventFunction === 'function') {
14019
- return eventFunction({ component: this.grid });
14020
- }
14021
- if (Config.loadGridLayoutsEndPoint) {
14022
- const route = Config.loadGridLayoutsEndPoint;
14023
- const response = await Http.get(`${route}?id=${this.grid.name}`);
14024
- const responseData = response.data.data;
14025
- return responseData.length && responseData[0] ? responseData[0].layouts : responseData.layouts || {};
14026
- }
14027
- return JSON.parse(localStorage.getItem(this.grid.name) || '{}');
14028
- }
14029
- getHelperValue(column) {
14030
- if (column instanceof TekGridColumn) {
14031
- if (!Array.isArray(column.filterProps))
14032
- return column.filterProps.helperValue;
14033
- return column.filterProps.map((prop) => prop.helperValue);
14034
- }
14035
- return '';
14036
- }
14037
- newLayout(layout) {
14038
- this.fixColumns(layout);
14039
- this.currentLayoutName = layout.name;
14040
- this.addLayout(layout);
14041
- this.layoutEdited = false;
14042
- }
14043
- addLayout(layout) {
14044
- this.fixColumns(layout);
14045
- this.layouts[layout.name] = layout;
14046
- this.saveLayouts();
14047
- }
14048
- discardChanges() {
14049
- const layoutSelected = this.layouts[this.currentLayoutName];
14050
- if (this.viewApplyLayout) {
14051
- this.viewApplyLayout(layoutSelected);
14052
- }
14053
- this.layoutEdited = false;
14054
- }
14055
- applyLayout(name, save = true) {
14056
- this.currentLayoutName = name;
14057
- const layoutSelected = this.layouts[name];
14058
- if (this.viewApplyLayout) {
14059
- this.viewApplyLayout(layoutSelected);
14060
- }
14061
- if (save) {
14062
- this.saveLayouts();
14063
- }
14064
- this.layoutEdited = false;
14065
- }
14066
- saveLayouts() {
14067
- this.layoutNames = Object.keys(this.layouts);
14068
- const layoutInfo = {
14069
- currentLayoutName: this.currentLayoutName,
14070
- layouts: this.layouts,
14071
- };
14072
- const eventFunction = this.events.saveLayouts || this.grid.events.saveLayouts;
14073
- if (eventFunction && typeof eventFunction === 'function') {
14074
- eventFunction({ component: this.grid, layouts: layoutInfo });
14075
- }
14076
- else if (Config.saveGridLayoutsEndPoint) {
14077
- const route = Config.saveGridLayoutsEndPoint;
14078
- Http.post(route, { id: this.grid.name, layouts: layoutInfo });
14079
- }
14080
- else {
14081
- localStorage.setItem(this.grid.name, JSON.stringify(layoutInfo));
14082
- }
14083
- }
14084
- deleteLayout(name) {
14085
- if (this.currentLayoutName === name) {
14086
- this.currentLayoutName = '';
14087
- this.applyLayout(this.currentLayoutName, false);
14088
- }
14089
- delete this.layouts[name];
14090
- this.saveLayouts();
14091
- }
14092
- updateLayout(name, layout) {
14093
- this.fixColumns(layout);
14094
- this.currentLayoutName = name;
14095
- layout.name = name;
14096
- this.layouts[layout.name] = layout;
14097
- this.saveLayouts();
14098
- this.layoutEdited = false;
14099
- }
14100
- updateDefaultLayout(layout) {
14101
- this.fixColumns(layout);
14102
- this.originalDatasourceOrder = layout.order || this.originalDatasourceOrder;
14103
- this.originalDatasourceDynamicFilter = layout.dynamicFilter || this.originalDatasourceDynamicFilter;
14104
- this.originalDatasourceFilter = layout.filter || this.originalDatasourceFilter;
14105
- if (layout.columns) {
14106
- this.originalColumnProps = layout.columns.map((column) => {
14107
- const originalColumnIdx = this.originalColumnProps.findIndex((item) => item.name === column.name);
14108
- const originalColumn = originalColumnIdx !== -1 ? this.originalColumnProps[originalColumnIdx] : {};
14109
- return {
14110
- ...originalColumn,
14111
- ...column,
14112
- };
14113
- });
14114
- }
14115
- if (this.currentLayoutName === '') {
14116
- this.applyLayout(this.currentLayoutName, false);
14117
- }
14118
- }
14119
- fixColumns(layout) {
14120
- const hasLayoutColumns = !!layout.columns;
14121
- layout.columns = layout.columns || [];
14122
- const layoutColumnNames = layout.columns.map((layoutColumn) => layoutColumn.name);
14123
- this.grid.columns.forEach((gridColumn) => {
14124
- if (!hasLayoutColumns || layoutColumnNames.indexOf(gridColumn.name) === -1) {
14125
- layout.columns.push({
14126
- name: gridColumn.name,
14127
- label: gridColumn.label,
14128
- align: gridColumn.align,
14129
- isVisible: !hasLayoutColumns && gridColumn.isVisible,
14130
- width: gridColumn.width,
14131
- minWidth: gridColumn.minWidth,
14132
- maxWidth: gridColumn.maxWidth,
14133
- fixed: gridColumn.fixed,
14134
- grouped: gridColumn.grouped,
14135
- groupOpened: gridColumn.groupOpened,
14136
- aggregation: gridColumn.aggregation,
14137
- filterHelperValue: this.getHelperValue(gridColumn),
14138
- });
14139
- }
14140
- });
14141
- }
14142
- }
14143
-
14144
- class TekGridColumnsButtonController extends IterableColumnsButtonController {
14145
- changeGroupedColumn(column, { component, event, element }) {
14146
- column.grouped = component.value;
14147
- if (!column.grouped) {
14148
- const index = this.iterableComponent.datasource.order.indexOf(`${column.name}.asc`);
14149
- this.iterableComponent.datasource.order.splice(index, 1);
14150
- }
14151
- this.iterableComponent.changeLayout(event, element);
14152
- }
14153
- changeAggregationColumn(column, { component, event, element }) {
14154
- const newValue = component.value || undefined;
14155
- if (column.aggregation !== newValue) {
14156
- this.iterableComponent.changeLayout(event, element);
14157
- }
14158
- column.aggregation = newValue;
14159
- }
14160
- showHideTekColumn(column, { component, event, element }) {
14161
- if (!component.value && column.grouped)
14162
- column.grouped = false;
14163
- column.isVisible = component.value;
14164
- this.iterableComponent.changeLayout(event, element);
14165
- }
14166
- }
14167
-
14168
- /**
14169
- * Base class for TekGrid Columns Button component
14170
- */
14171
- class TekGridColumnsButton extends IterableColumnsButton {
14172
- hideGroups = false;
14173
- constructor(props) {
14174
- super(props);
14175
- this.hideGroups = this.getInitValue('hideGroups', props.hideGroups, this.hideGroups);
14176
- this.createAccessors();
14177
- }
14178
- onCreated() {
14179
- super.onCreated();
14180
- Loader.addController(`IterableColumnsButtonController_${this.name}`, TekGridColumnsButtonController, [
14181
- this.iterableComponent,
14182
- ]);
14183
- this.controller = Loader.getInstance(`IterableColumnsButtonController_${this.name}`);
14184
- }
14185
- aggregationDataSet = [];
14186
- getAggregationSelectData() {
14187
- if (!this.aggregationDataSet.length) {
14188
- this.aggregationDataSet = columnAggregationValues.filter(Boolean).map((value) => ({
14189
- text: I18n.translate(`TEKGRID_AGGREGATION_${value}`),
14190
- value,
14191
- }));
14192
- }
14193
- return this.aggregationDataSet;
14194
- }
14195
- }
14196
-
14197
- /**
14198
- * Base class for Checkbox multiple component.
14199
- */
14200
- class CheckboxMultiple extends Input {
14201
- /**
14202
- * Quantity of columns that will be rendered on non vertical case
14203
- */
14204
- columns = 4;
14205
- /**
14206
- * Field on datasource.data that will be used to set checkbox's label
14207
- */
14208
- dataLabel = '';
14209
- /**
14210
- * Source of checkbox items
14211
- */
14212
- datasource;
14213
- /**
14214
- * Field on datasource.data that will be used to set checkbox's value
14215
- */
14216
- dataValue = '';
14217
- /**
14218
- * Defines the checkbox list direction
14219
- */
14220
- vertical = true;
14221
- /**
14222
- * Defines if field value should be an object
14223
- */
14224
- returnObject = false;
14225
- /* istanbul ignore next */
14226
- /**
14227
- * Create a new Checkbox Multiple.
14228
- * @param props CheckBpox Multiple properties
14229
- */
14230
- constructor(props) {
14231
- super(props);
14232
- this.columns = this.getInitValue('columns', props.columns, this.columns);
14233
- this.dataLabel = this.getInitValue('dataLabel', props.dataLabel, this.dataLabel);
14234
- this.dataValue = this.getInitValue('dataValue', props.dataValue, this.dataValue);
14235
- this.vertical = this.getInitValue('vertical', props.vertical, this.vertical);
14236
- this.returnObject = this.getInitValue('returnObject', props.returnObject, this.returnObject);
14237
- if (!Accessor.isAccessorDefinition(props.value)) {
14238
- this.value = this.getInitValue('value', props.value, []);
14239
- }
14240
- if (props.datasource && props.datasource.type === 'simple') {
14241
- this.dataValue = 'value';
14242
- this.dataLabel = this.dataValue;
14243
- }
14244
- this.datasource = DatasourceFactory.factory(props.datasource);
14245
- }
14246
- onBeforeDestroy() {
14247
- super.onBeforeDestroy();
14248
- this.datasource.destroy();
14249
- }
14250
- onCreated() {
14251
- super.onCreated();
14252
- this.datasource?.initialize();
14253
- }
14254
- }
14255
- InputFactory.register('ZdCheckboxMultiple', CheckboxMultiple);
14256
-
14257
- /**
14258
- * Base class for Chip component.
14259
- */
14260
- class Chip extends Button {
14261
- /**
14262
- * Determines whether the chip is active or not
14263
- */
14264
- active = true;
14265
- /**
14266
- * Configure the active CSS class applied when the link is active
14267
- */
14268
- activeClass = '';
14269
- /**
14270
- * Adds remove button
14271
- */
14272
- closable = false;
14273
- /**
14274
- * Change the default icon used for close chips
14275
- */
14276
- closeIcon = 'delete';
14277
- /**
14278
- * Makes the chip draggable
14279
- */
14280
- draggable = false;
14281
- /**
14282
- * Explicitly define the chip as a link
14283
- */
14284
- link = false;
14285
- /**
14286
- * Removes background and applies border and text color
14287
- */
14288
- outlined = false;
14289
- /**
14290
- * Applies the ripple
14291
- */
14292
- ripple = true;
14293
- /**
14294
- * Applies a large border radius on the chip
14295
- */
14296
- round = true;
14297
- /**
14298
- * Value Model
14299
- */
14300
- value = false;
14301
- /**
14302
- * Makes the component extra large
14303
- */
14304
- xLarge = false;
14305
- /**
14306
- * Makes the component extra small
14307
- */
14308
- xSmall = false;
14309
- /* istanbul ignore next */
14310
- /**
14311
- * Create a new Chip
14312
- * @param props Chip definition
14313
- */
14314
- constructor(props) {
14315
- super(props);
14316
- this.active = this.getInitValue('active', props.active, this.active);
14317
- this.activeClass = this.getInitValue('activeClass', props.activeClass, this.activeClass);
14318
- this.closable = this.getInitValue('closable', props.closable, this.closable);
14319
- this.closeIcon = this.getInitValue('closeIcon', props.closeIcon, this.closeIcon);
14320
- this.draggable = this.getInitValue('draggable', props.draggable, this.draggable);
14321
- this.link = this.getInitValue('link', props.link, this.link);
14322
- this.outlined = this.getInitValue('outlined', props.outlined, this.outlined);
14323
- this.ripple = this.getInitValue('ripple', props.ripple, this.ripple);
14324
- this.round = this.getInitValue('round', props.round, this.round);
14325
- this.value = this.getInitValue('value', props.value, this.value);
14326
- this.xLarge = this.getInitValue('xLarge', props.xLarge, this.xLarge);
14327
- this.xSmall = this.getInitValue('xSmall', props.xSmall, this.xSmall);
14328
- this.createAccessors();
14329
- }
14330
- }
14331
-
14332
- /**
14333
- * Base class for Progress component
14334
- */
14335
- class Progress extends ComponentRender {
14336
- /**
14337
- * Set component's background color
14338
- */
14339
- backgroundColor = 'primary';
14340
- /**
14341
- * Set component's background opacity
14342
- */
14343
- backgroundOpacity = '0.5';
14344
- /**
14345
- * Defines the value color
14346
- */
14347
- color = 'primary';
14348
- /**
14349
- * Sets the height for the component
14350
- */
14351
- height = 4;
14352
- /**
14353
- * Animates the component constantly
14354
- */
14355
- indeterminate = false;
14356
- /**
14357
- * Render components on the progress component
14358
- */
14359
- centerSlot = [];
14360
- /**
14361
- * The percentage value for current progress
14362
- */
14363
- value = 0;
14364
- /* istanbul ignore next */
14365
- /**
14366
- * Create a new Progress
14367
- * @param props Progress definition
14368
- */
14369
- constructor(props) {
14370
- super(props);
14371
- this.backgroundColor = this.getInitValue('backgroundColor', props.backgroundColor, this.backgroundColor);
14372
- this.backgroundOpacity = this.getInitValue('backgroundOpacity', props.backgroundOpacity, this.backgroundOpacity);
14373
- this.color = this.getInitValue('color', props.color, this.color);
14374
- this.height = this.getInitValue('height', props.height, this.height);
14375
- this.indeterminate = this.getInitValue('indeterminate', props.indeterminate, this.indeterminate);
14376
- this.centerSlot = this.getInitValue('centerSlot', props.centerSlot, this.centerSlot);
14377
- this.value = this.getInitValue('value', props.value, this.value);
14378
- }
14379
- }
14380
-
14381
- /**
14382
- * Base class for Button Group component.
11102
+ * Base class for Button Group component.
14383
11103
  */
14384
11104
  class ButtonGroup extends ComponentRender {
14385
11105
  /**
@@ -15498,6 +12218,7 @@ class Time extends TextInput {
15498
12218
  initialMask;
15499
12219
  isSimpleDisplay;
15500
12220
  timeError = false;
12221
+ inputMode = 'none';
15501
12222
  /**
15502
12223
  * Create a new Time Picker.
15503
12224
  * @param props Time properties
@@ -15685,6 +12406,9 @@ class Time extends TextInput {
15685
12406
  this.removeTimeMask();
15686
12407
  this.setTimeValue(this.formatter(this.value));
15687
12408
  super.blur(event, element);
12409
+ if (!Utils.isMobile()) {
12410
+ this.showTimePicker = false;
12411
+ }
15688
12412
  }
15689
12413
  focus(event, element) {
15690
12414
  this.addTimeMask();
@@ -15914,6 +12638,7 @@ class DateRange extends TextInput {
15914
12638
  initialMask;
15915
12639
  unitMask;
15916
12640
  isSimpleDisplay;
12641
+ inputMode = 'none';
15917
12642
  /* istanbul ignore next */
15918
12643
  /**
15919
12644
  * Creates a new Date.
@@ -16002,14 +12727,44 @@ class DateRange extends TextInput {
16002
12727
  return this.internalValue;
16003
12728
  }
16004
12729
  set value(value) {
16005
- if (this.internalValue !== value) {
16006
- this.internalDisplayValue = this.formatter(value);
16007
- this.internalValue = value;
16008
- }
16009
- if (value === null) {
12730
+ if (!Array.isArray(value) && value !== null && value !== undefined)
12731
+ return;
12732
+ if (!value || value.length === 0) {
16010
12733
  this.internalValue = [];
12734
+ this.internalDisplayValue = '';
12735
+ this.dateObject = [];
12736
+ return;
12737
+ }
12738
+ if (this.internalValue === value)
12739
+ return;
12740
+ this.internalDisplayValue = this.formatter(value);
12741
+ this.internalValue = value;
12742
+ const [startDate, endDate] = value;
12743
+ const isStartValid = this.isValidFormatDate(startDate, this.dateFormat);
12744
+ // if end date is not defined, no need to validate it
12745
+ const isEndValid = !endDate || this.isValidFormatDate(endDate, this.dateFormat);
12746
+ const areDatesValid = isStartValid && isEndValid;
12747
+ if (areDatesValid) {
12748
+ this.dateObject = this.getDatesInRange(startDate, endDate);
12749
+ }
12750
+ }
12751
+ /**
12752
+ * Returns all days ranging from start to end as dayjs objects
12753
+ * @returns an array of dayjs objects containing all days between start and end
12754
+ */
12755
+ getDatesInRange(startDateStr, endDateStr) {
12756
+ const dates = [];
12757
+ let startDate = dayjs(startDateStr, this.dateFormat);
12758
+ if (!endDateStr)
12759
+ return [startDate];
12760
+ const endDate = dayjs(endDateStr, this.dateFormat);
12761
+ while (startDate.isBefore(endDate) || startDate.isSame(endDate)) {
12762
+ dates.push(startDate);
12763
+ startDate = startDate.add(1, 'day');
16011
12764
  }
12765
+ return dates;
16012
12766
  }
12767
+ ;
16013
12768
  /**
16014
12769
  * Assign the updated mask to mask property
16015
12770
  */
@@ -16038,14 +12793,14 @@ class DateRange extends TextInput {
16038
12793
  this.internalValue = this.parser(displayValue);
16039
12794
  this.dateError = false;
16040
12795
  if (lastValue !== this.displayValue)
16041
- this.change(this.value);
12796
+ this.change();
16042
12797
  }
16043
12798
  else {
16044
12799
  if (!displayValue) {
16045
12800
  this.internalDisplayValue = displayValue;
16046
12801
  this.internalValue = [];
16047
12802
  if (lastValue !== this.displayValue)
16048
- this.change(this.value);
12803
+ this.change();
16049
12804
  }
16050
12805
  this.dateError = !!displayValue;
16051
12806
  }
@@ -16100,7 +12855,7 @@ class DateRange extends TextInput {
16100
12855
  this.dateError = false;
16101
12856
  this.value = this.parseISODateRangeValue(newValue);
16102
12857
  if (!Utils.isEqual(lastValue, this.value))
16103
- this.change(this.value);
12858
+ this.change();
16104
12859
  }
16105
12860
  formatISODateRangeValue(dates) {
16106
12861
  let splitedValue;
@@ -16251,7 +13006,7 @@ class DateRange extends TextInput {
16251
13006
  .filter((obj) => obj !== null)
16252
13007
  .map((obj) => obj.format(this.dateFormat));
16253
13008
  }
16254
- dateObject = [null, null];
13009
+ dateObject = [];
16255
13010
  getNativeDate() {
16256
13011
  return this.dateObject.filter((obj) => obj !== null).map((obj) => obj.toDate());
16257
13012
  }
@@ -16364,7 +13119,6 @@ FormatterParserProvider.registerParser('ZdDateRange', (value, { dateFormat = Con
16364
13119
  });
16365
13120
  InputFactory.register('ZdDateRange', DateRange);
16366
13121
 
16367
- const AutoNumeric = require('@zeedhi/autonumeric/dist/autoNumeric');
16368
13122
  Icons.addIcons({
16369
13123
  add: 'mdi-plus-box',
16370
13124
  delete: 'mdi-trash-can-outline',
@@ -16376,4 +13130,4 @@ Icons.addIcons({
16376
13130
  layout: 'mdi-table-star',
16377
13131
  });
16378
13132
 
16379
- export { Alert, AlertQueue, AlertReplace, AlertService, AlertStack, AutoNumeric, Badge, Breadcrumbs, Button, ButtonGroup, ButtonOption, Card, Carousel, Checkbox, CheckboxMultiple, ChildNotFoundError, Chip, CodeViewer, Col, CollapseCard, Column, ColumnNotFoundError, ColumnsSearcher, Component, ComponentRender, ConditionsManager, Container, Currency, DataEditor, DataEditorWithAdd, DataNavigator, DataSelector, DataValueOutHelper, DatasourceSearcher, DateInput, DateRange, DetailNotFoundError, Dialog, DialogService, Divider, Dropdown, DynamicFilterDatasourceFactory, DynamicFilterOperations, DynamicFilterRelations, Footer, Form, Frame, FramePage, Grid, GridColumn, GridColumnEditable, GridEditable, GridEditableController, GridEditableEvents, GridEvents, GroupedDataManager, GroupedDataSelector, GroupedViewNavigator, Header, Icon, Icons, Image, Increment, Input, InputFactory, Iterable, IterableColumnsButton, IterableColumnsButtonController, IterableComponentRender, IterablePageComponent, IterablePageInfo, IterablePageSize, IterablePagination, IterableTable, IterableTree, KeyMapGrouped, KeyMapMerger, KeyMapNavigation, KeyMapTree, Layout, List, ListGroup, ListItem, Loading, LoadingService, Login, LoginButton, Main, MasterDetail, MasterNotFoundError, Menu, MenuButton, MenuGroup, MenuLink, MenuSeparator, Modal, ModalCloseButton, ModalService, Month, MultiOption, NumberInput, Password, Progress, Radio, Row, Search, Select, SelectMultiple, SvgMap, Switch, Tab, TabNotFoundError, Table, TableActionBuilder, Tabs, Tag, TekFilterHelper, TekGrid, TekGridColumn, TekGridColumnsButton, TekGridColumnsButtonController, TekGridController, TekGridEvents, TekGridFilterButton, TekGridLayoutOptions, TekGridToolbarProvider, TekMemoryDatasource, TekRestDatasource, Text, TextInput, Textarea, Time, TimeFormatSelector, Toggleable, Tooltip, Tree, TreeDataNavigator, TreeDataSelector, TreeDataStructure, TreeGrid, ViewNavigator, columnAggregationValues, initTheme, isFilledObject, isNil, omit, uniqueBy };
13133
+ export { Alert, AlertQueue, AlertReplace, AlertService, AlertStack, Badge, Breadcrumbs, Button, ButtonGroup, Card, Carousel, Checkbox, CheckboxMultiple, ChildNotFoundError, Chip, CodeViewer, Col, CollapseCard, Column, ColumnNotFoundError, Component, ComponentRender, ConditionsManager, Container, Currency, DataEditor, DataEditorWithAdd, DataNavigator, DataSelector, DataValueOutHelper, DatasourceSearcher, DateInput, DateRange, DeleteRowsError, DetailNotFoundError, Dialog, DialogService, Divider, Dropdown, Footer, Form, Frame, FramePage, Grid, GridColumn, GridColumnEditable, GridEditable, GridEditableController, GridEditableEvents, GridEvents, Header, Icon, Icons, Image, Increment, Input, InputFactory, Iterable, IterableColumnsButton, IterableColumnsButtonController, IterableComponentRender, IterablePageComponent, IterablePageInfo, IterablePageSize, IterablePagination, IterableTable, IterableTree, KeyMapEditing, KeyMapMerger, KeyMapNavigation, KeyMapTree, Layout, List, ListGroup, ListItem, Loading, LoadingService, Login, LoginButton, Main, MasterDetail, MasterNotFoundError, Menu, MenuButton, MenuGroup, MenuLink, MenuSeparator, Modal, ModalCloseButton, ModalService, Month, NonInitializedError, NumberInput, Password, Progress, Radio, Row, Search, Select, SelectMultiple, SvgMap, Switch, Tab, TabNotFoundError, Table, TableActionBuilder, Tabs, Tag, Text, TextInput, Textarea, Time, TimeFormatSelector, Toggleable, Tooltip, Tree, TreeDataNavigator, TreeDataSelector, TreeDataStructure, TreeGrid, ViewNavigator, ZeedhiCommonError, initTheme, omit, uniqueBy };