@updevs/components 1.0.0-alpha.3 → 1.0.0-alpha.31

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 (813) hide show
  1. package/README.md +5 -4
  2. package/assets/styles/_bootstrap-components.scss +18 -1
  3. package/assets/styles/_seven-columns.scss +73 -0
  4. package/assets/styles/_updevs.scss +4 -0
  5. package/assets/styles/_variables.scss +1 -1
  6. package/assets/styles/utils/_colors.scss +1 -1
  7. package/badge/badge-config.model.d.ts +14 -0
  8. package/badge/badge.component.d.ts +24 -0
  9. package/badge/badge.config.d.ts +12 -0
  10. package/badge/public-api.d.ts +3 -0
  11. package/badge/upd-badge.module.d.ts +8 -0
  12. package/button/button.component.d.ts +61 -0
  13. package/button/upd-button.module.d.ts +10 -0
  14. package/calendar/calendar.component.d.ts +127 -0
  15. package/calendar/components/calendar-body/calendar-body.component.d.ts +263 -0
  16. package/calendar/components/calendar-header/calendar-header.component.d.ts +57 -0
  17. package/calendar/components/calendar-month-view/calendar-month-view.component.d.ts +151 -0
  18. package/calendar/components/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +10 -0
  19. package/calendar/components/calendar-year-view/calendar-year-view.component.d.ts +9 -0
  20. package/calendar/models/calendar-cell.model.d.ts +16 -0
  21. package/calendar/models/calendar-user-event.model.d.ts +4 -0
  22. package/calendar/models/date-range.model.d.ts +26 -0
  23. package/calendar/models/public-api.d.ts +2 -0
  24. package/calendar/public-api.d.ts +5 -0
  25. package/calendar/services/calendar-range-strategy.service.d.ts +35 -0
  26. package/calendar/services/calendar-signals.service.d.ts +24 -0
  27. package/calendar/services/calendar.service.d.ts +15 -0
  28. package/calendar/services/public-api.d.ts +1 -0
  29. package/calendar/tools/events-options.d.ts +12 -0
  30. package/calendar/tools/keyboard-tools.d.ts +9 -0
  31. package/calendar/tools/passive-listeners.d.ts +16 -0
  32. package/calendar/types/calendar-cell-class-function.type.d.ts +3 -0
  33. package/calendar/types/calendar-cell-css-classes.type.d.ts +3 -0
  34. package/calendar/types/calendar-view.type.d.ts +1 -0
  35. package/calendar/types/modifier-key.type.d.ts +1 -0
  36. package/calendar/types/public-api.d.ts +1 -0
  37. package/calendar/upd-calendar.module.d.ts +18 -0
  38. package/card/card.component.d.ts +54 -0
  39. package/card/directives/card-actions.directive.d.ts +7 -0
  40. package/card/directives/card-footer.directive.d.ts +7 -0
  41. package/card/directives/card-header.directive.d.ts +7 -0
  42. package/card/directives/card-image.directive.d.ts +7 -0
  43. package/card/upd-card.module.d.ts +14 -0
  44. package/drag-and-drop/drag-and-drop.component.d.ts +26 -0
  45. package/drag-and-drop/models/drag-and-drop-column.config.d.ts +8 -0
  46. package/drag-and-drop/models/drag-and-drop-column.model.d.ts +10 -0
  47. package/drag-and-drop/models/drag-and-drop-item.d.ts +7 -0
  48. package/drag-and-drop/models/drag-and-drop-item.model.d.ts +13 -0
  49. package/drag-and-drop/models/drag-and-drop.config.d.ts +6 -0
  50. package/drag-and-drop/models/public-api.d.ts +4 -0
  51. package/drag-and-drop/public-api.d.ts +3 -0
  52. package/drag-and-drop/upd-drag-and-drop.module.d.ts +9 -0
  53. package/dropdown/dropdown.component.d.ts +76 -0
  54. package/dropdown/models/dropdown-action-clicked.model.d.ts +6 -0
  55. package/dropdown/{src/models/dropdown-item.ts → models/dropdown-item.d.ts} +7 -4
  56. package/dropdown/{src/models/dropdown-item.type.ts → models/dropdown-item.type.d.ts} +1 -1
  57. package/dropdown/models/public-api.d.ts +4 -0
  58. package/dropdown/models/toolbar.type.d.ts +1 -0
  59. package/dropdown/upd-dropdown.module.d.ts +12 -0
  60. package/esm2022/badge/badge-config.model.mjs +14 -0
  61. package/esm2022/badge/badge.component.mjs +50 -0
  62. package/esm2022/badge/badge.config.mjs +2 -0
  63. package/esm2022/badge/index.mjs +2 -0
  64. package/esm2022/badge/public-api.mjs +4 -0
  65. package/esm2022/badge/upd-badge.module.mjs +24 -0
  66. package/esm2022/badge/updevs-components-badge.mjs +5 -0
  67. package/esm2022/button/button.component.mjs +157 -0
  68. package/esm2022/button/index.mjs +2 -0
  69. package/esm2022/button/public-api.mjs +3 -0
  70. package/esm2022/button/upd-button.module.mjs +32 -0
  71. package/esm2022/button/updevs-components-button.mjs +5 -0
  72. package/esm2022/calendar/assets/i18n/en.json +16 -0
  73. package/esm2022/calendar/assets/i18n/pt.json +16 -0
  74. package/esm2022/calendar/calendar.component.mjs +247 -0
  75. package/esm2022/calendar/components/calendar-body/calendar-body.component.mjs +515 -0
  76. package/esm2022/calendar/components/calendar-header/calendar-header.component.mjs +144 -0
  77. package/esm2022/calendar/components/calendar-month-view/calendar-month-view.component.mjs +423 -0
  78. package/esm2022/calendar/components/calendar-multi-year-view/calendar-multi-year-view.component.mjs +18 -0
  79. package/esm2022/calendar/components/calendar-year-view/calendar-year-view.component.mjs +17 -0
  80. package/esm2022/calendar/index.mjs +2 -0
  81. package/esm2022/calendar/models/calendar-cell.model.mjs +18 -0
  82. package/esm2022/calendar/models/calendar-user-event.model.mjs +2 -0
  83. package/esm2022/calendar/models/date-range.model.mjs +18 -0
  84. package/esm2022/calendar/models/public-api.mjs +3 -0
  85. package/esm2022/calendar/public-api.mjs +6 -0
  86. package/esm2022/calendar/services/calendar-range-strategy.service.mjs +99 -0
  87. package/esm2022/calendar/services/calendar-signals.service.mjs +47 -0
  88. package/esm2022/calendar/services/calendar.service.mjs +40 -0
  89. package/esm2022/calendar/services/public-api.mjs +2 -0
  90. package/esm2022/calendar/tools/events-options.mjs +14 -0
  91. package/esm2022/calendar/tools/keyboard-tools.mjs +14 -0
  92. package/esm2022/calendar/tools/passive-listeners.mjs +29 -0
  93. package/esm2022/calendar/types/calendar-cell-class-function.type.mjs +2 -0
  94. package/esm2022/calendar/types/calendar-cell-css-classes.type.mjs +2 -0
  95. package/esm2022/calendar/types/calendar-view.type.mjs +2 -0
  96. package/esm2022/calendar/types/modifier-key.type.mjs +2 -0
  97. package/esm2022/calendar/types/public-api.mjs +2 -0
  98. package/esm2022/calendar/upd-calendar.module.mjs +70 -0
  99. package/esm2022/calendar/updevs-components-calendar.mjs +5 -0
  100. package/esm2022/card/card.component.mjs +136 -0
  101. package/esm2022/card/directives/card-actions.directive.mjs +16 -0
  102. package/esm2022/card/directives/card-footer.directive.mjs +16 -0
  103. package/esm2022/card/directives/card-header.directive.mjs +16 -0
  104. package/esm2022/card/directives/card-image.directive.mjs +16 -0
  105. package/esm2022/card/directives/public-api.mjs +5 -0
  106. package/esm2022/card/index.mjs +2 -0
  107. package/esm2022/card/public-api.mjs +4 -0
  108. package/esm2022/card/types/card-state.type.mjs +2 -0
  109. package/esm2022/card/types/card-style.type.mjs +2 -0
  110. package/esm2022/card/types/hover-effect.type.mjs +2 -0
  111. package/esm2022/card/types/ribbon-style.type.mjs +2 -0
  112. package/esm2022/card/types/status-position.type.mjs +2 -0
  113. package/esm2022/card/upd-card.module.mjs +50 -0
  114. package/esm2022/card/updevs-components-card.mjs +5 -0
  115. package/esm2022/drag-and-drop/drag-and-drop.component.mjs +134 -0
  116. package/esm2022/drag-and-drop/index.mjs +2 -0
  117. package/esm2022/drag-and-drop/models/drag-and-drop-column.config.mjs +2 -0
  118. package/esm2022/drag-and-drop/models/drag-and-drop-column.model.mjs +9 -0
  119. package/esm2022/drag-and-drop/models/drag-and-drop-item.mjs +2 -0
  120. package/esm2022/drag-and-drop/models/drag-and-drop-item.model.mjs +14 -0
  121. package/esm2022/drag-and-drop/models/drag-and-drop.config.mjs +2 -0
  122. package/esm2022/drag-and-drop/models/public-api.mjs +5 -0
  123. package/esm2022/drag-and-drop/public-api.mjs +4 -0
  124. package/esm2022/drag-and-drop/upd-drag-and-drop.module.mjs +28 -0
  125. package/esm2022/drag-and-drop/updevs-components-drag-and-drop.mjs +5 -0
  126. package/esm2022/dropdown/dropdown.component.mjs +182 -0
  127. package/esm2022/dropdown/index.mjs +2 -0
  128. package/esm2022/dropdown/models/dropdown-action-clicked.model.mjs +2 -0
  129. package/esm2022/dropdown/models/dropdown-item.mjs +2 -0
  130. package/esm2022/dropdown/models/dropdown-item.type.mjs +2 -0
  131. package/esm2022/dropdown/models/public-api.mjs +5 -0
  132. package/esm2022/dropdown/models/toolbar.type.mjs +2 -0
  133. package/esm2022/dropdown/public-api.mjs +4 -0
  134. package/esm2022/dropdown/upd-dropdown.module.mjs +40 -0
  135. package/esm2022/dropdown/updevs-components-dropdown.mjs +5 -0
  136. package/esm2022/form/assets/i18n/en.json +17 -0
  137. package/esm2022/form/assets/i18n/pt.json +17 -0
  138. package/esm2022/form/components/dynamic-field/dynamic-field.component.mjs +127 -0
  139. package/esm2022/form/form.component.mjs +122 -0
  140. package/esm2022/form/index.mjs +2 -0
  141. package/esm2022/form/models/checkbox-field.model.mjs +2 -0
  142. package/esm2022/form/models/checkbox-group-field.model.mjs +2 -0
  143. package/esm2022/form/models/dynamic-field.model.mjs +2 -0
  144. package/esm2022/form/models/enums/dynamic-field.type.mjs +14 -0
  145. package/esm2022/form/models/enums/public-api.mjs +2 -0
  146. package/esm2022/form/models/file-upload-field.model.mjs +2 -0
  147. package/esm2022/form/models/form-config.mjs +2 -0
  148. package/esm2022/form/models/form-row.model.mjs +2 -0
  149. package/esm2022/form/models/input-field.model.mjs +2 -0
  150. package/esm2022/form/models/public-api.mjs +15 -0
  151. package/esm2022/form/models/radio-field.model.mjs +2 -0
  152. package/esm2022/form/models/radio-group-field.model.mjs +2 -0
  153. package/esm2022/form/models/select-field.model.mjs +2 -0
  154. package/esm2022/form/models/single-select-field.model.mjs +2 -0
  155. package/esm2022/form/models/textarea-field.model.mjs +2 -0
  156. package/esm2022/form/models/validator-config.mjs +2 -0
  157. package/esm2022/form/public-api.mjs +4 -0
  158. package/esm2022/form/tools/errors-helper.mjs +54 -0
  159. package/esm2022/form/upd-form.module.mjs +84 -0
  160. package/esm2022/form/updevs-components-form.mjs +5 -0
  161. package/esm2022/form-controls/abstractions/base-control.mjs +46 -0
  162. package/esm2022/form-controls/abstractions/index.mjs +2 -0
  163. package/esm2022/form-controls/abstractions/public-api.mjs +2 -0
  164. package/esm2022/form-controls/abstractions/updevs-components-form-controls-abstractions.mjs +5 -0
  165. package/esm2022/form-controls/checkbox/checkbox.component.mjs +51 -0
  166. package/esm2022/form-controls/checkbox/index.mjs +2 -0
  167. package/esm2022/form-controls/checkbox/public-api.mjs +3 -0
  168. package/esm2022/form-controls/checkbox/upd-checkbox.module.mjs +32 -0
  169. package/esm2022/form-controls/checkbox/updevs-components-form-controls-checkbox.mjs +5 -0
  170. package/esm2022/form-controls/date-picker/date-picker.component.mjs +147 -0
  171. package/esm2022/form-controls/date-picker/index.mjs +2 -0
  172. package/esm2022/form-controls/date-picker/public-api.mjs +3 -0
  173. package/esm2022/form-controls/date-picker/upd-date-picker.module.mjs +40 -0
  174. package/esm2022/form-controls/date-picker/updevs-components-form-controls-date-picker.mjs +5 -0
  175. package/esm2022/form-controls/file-upload/assets/i18n/en.json +15 -0
  176. package/esm2022/form-controls/file-upload/assets/i18n/pt.json +15 -0
  177. package/esm2022/form-controls/file-upload/file-upload-changed.event.mjs +2 -0
  178. package/esm2022/form-controls/file-upload/file-upload.component.mjs +169 -0
  179. package/esm2022/form-controls/file-upload/index.mjs +2 -0
  180. package/esm2022/form-controls/file-upload/public-api.mjs +4 -0
  181. package/esm2022/form-controls/file-upload/upd-file-upload.module.mjs +48 -0
  182. package/esm2022/form-controls/file-upload/updevs-components-form-controls-file-upload.mjs +5 -0
  183. package/esm2022/form-controls/input/directives/input-append.directive.mjs +16 -0
  184. package/esm2022/form-controls/input/directives/input-prepend.directive.mjs +16 -0
  185. package/esm2022/form-controls/input/directives/public-api.mjs +3 -0
  186. package/esm2022/form-controls/input/index.mjs +2 -0
  187. package/esm2022/form-controls/input/input.component.mjs +185 -0
  188. package/esm2022/form-controls/input/public-api.mjs +5 -0
  189. package/esm2022/form-controls/input/types/input.type.mjs +2 -0
  190. package/esm2022/form-controls/input/types/loader-position.type.mjs +2 -0
  191. package/esm2022/form-controls/input/types/public-api.mjs +3 -0
  192. package/esm2022/form-controls/input/upd-input.module.mjs +46 -0
  193. package/esm2022/form-controls/input/updevs-components-form-controls-input.mjs +5 -0
  194. package/esm2022/form-controls/radio/index.mjs +2 -0
  195. package/esm2022/form-controls/radio/public-api.mjs +3 -0
  196. package/esm2022/form-controls/radio/radio.component.mjs +51 -0
  197. package/esm2022/form-controls/radio/upd-radio.module.mjs +32 -0
  198. package/esm2022/form-controls/radio/updevs-components-form-controls-radio.mjs +5 -0
  199. package/esm2022/form-controls/select/components/multiple/select-multiple.component.mjs +76 -0
  200. package/esm2022/form-controls/select/components/single/select.component.mjs +72 -0
  201. package/esm2022/form-controls/select/index.mjs +2 -0
  202. package/esm2022/form-controls/select/models/abstractions/base-select.component.mjs +215 -0
  203. package/esm2022/form-controls/select/models/defaults.mjs +8 -0
  204. package/esm2022/form-controls/select/models/public-api.mjs +3 -0
  205. package/esm2022/form-controls/select/models/select-item.mjs +2 -0
  206. package/esm2022/form-controls/select/public-api.mjs +5 -0
  207. package/esm2022/form-controls/select/upd-select.module.mjs +57 -0
  208. package/esm2022/form-controls/select/updevs-components-form-controls-select.mjs +5 -0
  209. package/esm2022/form-controls/textarea/index.mjs +2 -0
  210. package/esm2022/form-controls/textarea/public-api.mjs +3 -0
  211. package/esm2022/form-controls/textarea/textarea.component.mjs +44 -0
  212. package/esm2022/form-controls/textarea/upd-textarea.module.mjs +24 -0
  213. package/esm2022/form-controls/textarea/updevs-components-form-controls-textarea.mjs +5 -0
  214. package/esm2022/form-controls/time-picker/index.mjs +2 -0
  215. package/esm2022/form-controls/time-picker/public-api.mjs +4 -0
  216. package/esm2022/form-controls/time-picker/time-picker.component.mjs +130 -0
  217. package/esm2022/form-controls/time-picker/time-selector/time-selector.component.mjs +124 -0
  218. package/esm2022/form-controls/time-picker/upd-time-picker.module.mjs +61 -0
  219. package/esm2022/form-controls/time-picker/updevs-components-form-controls-time-picker.mjs +5 -0
  220. package/esm2022/index.mjs +2 -0
  221. package/esm2022/layout/abstractions/base-page.component.mjs +23 -0
  222. package/esm2022/layout/abstractions/base.layout.mjs +31 -0
  223. package/esm2022/layout/abstractions/public-api.mjs +2 -0
  224. package/esm2022/layout/assets/i18n/en.json +27 -0
  225. package/esm2022/layout/assets/i18n/pt.json +27 -0
  226. package/esm2022/layout/index.mjs +2 -0
  227. package/esm2022/layout/layouts/blank-layout/blank-layout.component.mjs +22 -0
  228. package/esm2022/layout/layouts/blank-layout/blank-layout.module.mjs +50 -0
  229. package/esm2022/layout/layouts/public-api.mjs +5 -0
  230. package/esm2022/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.mjs +17 -0
  231. package/esm2022/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.mjs +83 -0
  232. package/esm2022/layout/models/login-page-config.model.mjs +20 -0
  233. package/esm2022/layout/models/login-page.config.mjs +2 -0
  234. package/esm2022/layout/models/public-api.mjs +3 -0
  235. package/esm2022/layout/models/security-layout-config.model.mjs +10 -0
  236. package/esm2022/layout/models/security-layout.config.mjs +2 -0
  237. package/esm2022/layout/models/upd-layout-config.model.mjs +24 -0
  238. package/esm2022/layout/models/upd-layout.config.mjs +2 -0
  239. package/esm2022/layout/pages/auth-flow/auth-flow-routing.module.mjs +28 -0
  240. package/esm2022/layout/pages/auth-flow/auth-flow.module.mjs +73 -0
  241. package/esm2022/layout/pages/auth-flow/logged-out/logged-out.component.mjs +11 -0
  242. package/esm2022/layout/pages/auth-flow/login/login.component.mjs +110 -0
  243. package/esm2022/layout/pages/auth-flow/oauth-callback/oauth-callback.component.mjs +11 -0
  244. package/esm2022/layout/pages/auth-flow/public-api.mjs +6 -0
  245. package/esm2022/layout/pages/public-api.mjs +2 -0
  246. package/esm2022/layout/partials/footer/footer-copyright.directive.mjs +13 -0
  247. package/esm2022/layout/partials/footer/footer.component.mjs +55 -0
  248. package/esm2022/layout/partials/footer/footer.module.mjs +28 -0
  249. package/esm2022/layout/partials/footer/public-api.mjs +4 -0
  250. package/esm2022/layout/partials/header/header-style.type.mjs +2 -0
  251. package/esm2022/layout/partials/header/header.component.mjs +129 -0
  252. package/esm2022/layout/partials/header/header.module.mjs +40 -0
  253. package/esm2022/layout/partials/header/public-api.mjs +4 -0
  254. package/esm2022/layout/partials/page-header/page-header.component.mjs +15 -0
  255. package/esm2022/layout/partials/page-header/public-api.mjs +2 -0
  256. package/esm2022/layout/partials/public-api.mjs +5 -0
  257. package/esm2022/layout/partials/sidebar/public-api.mjs +2 -0
  258. package/esm2022/layout/partials/sidebar/sidebar.component.mjs +114 -0
  259. package/esm2022/layout/public-api.mjs +8 -0
  260. package/esm2022/layout/services/public-api.mjs +2 -0
  261. package/esm2022/layout/services/upd-layout-config.service.mjs +21 -0
  262. package/esm2022/layout/tools/layout.constants.mjs +15 -0
  263. package/esm2022/layout/upd-layout.module.mjs +47 -0
  264. package/esm2022/layout/updevs-components-layout.mjs +5 -0
  265. package/esm2022/lib/index.mjs +2 -0
  266. package/esm2022/lib/models/public-api.mjs +2 -0
  267. package/esm2022/lib/models/row-column-size.mjs +2 -0
  268. package/esm2022/lib/public-api.mjs +5 -0
  269. package/esm2022/lib/tools/column-size.helper.mjs +12 -0
  270. package/esm2022/lib/tools/public-api.mjs +2 -0
  271. package/esm2022/lib/types/component-size.type.mjs +2 -0
  272. package/esm2022/lib/types/horizontal-vertical.type.mjs +2 -0
  273. package/esm2022/lib/types/public-api.mjs +4 -0
  274. package/esm2022/lib/types/validation-status.type.mjs +2 -0
  275. package/esm2022/lib/upd-components.module.mjs +14 -0
  276. package/esm2022/link/index.mjs +2 -0
  277. package/esm2022/link/link.component.mjs +51 -0
  278. package/esm2022/link/public-api.mjs +4 -0
  279. package/esm2022/link/target.type.mjs +2 -0
  280. package/esm2022/link/upd-link.module.mjs +24 -0
  281. package/esm2022/link/updevs-components-link.mjs +5 -0
  282. package/esm2022/list/assets/i18n/en.json +9 -0
  283. package/esm2022/list/assets/i18n/pt.json +9 -0
  284. package/esm2022/list/index.mjs +2 -0
  285. package/esm2022/list/list.component.mjs +113 -0
  286. package/esm2022/list/models/badge-position.type.mjs +2 -0
  287. package/esm2022/list/models/list-item.mjs +2 -0
  288. package/esm2022/list/models/list-item.model.mjs +15 -0
  289. package/esm2022/list/models/public-api.mjs +3 -0
  290. package/esm2022/list/public-api.mjs +4 -0
  291. package/esm2022/list/upd-list.module.mjs +44 -0
  292. package/esm2022/list/updevs-components-list.mjs +5 -0
  293. package/esm2022/modal/assets/i18n/en.json +17 -0
  294. package/esm2022/modal/assets/i18n/pt.json +17 -0
  295. package/esm2022/modal/components/modal-container/modal-container.component.mjs +216 -0
  296. package/esm2022/modal/index.mjs +2 -0
  297. package/esm2022/modal/models/base.modal.mjs +14 -0
  298. package/esm2022/modal/models/modal-config.model.mjs +20 -0
  299. package/esm2022/modal/models/modal-ref.mjs +2 -0
  300. package/esm2022/modal/models/modal.config.mjs +2 -0
  301. package/esm2022/modal/models/public-api.mjs +4 -0
  302. package/esm2022/modal/public-api.mjs +4 -0
  303. package/esm2022/modal/services/modal-alert.service.mjs +99 -0
  304. package/esm2022/modal/services/modal.service.mjs +30 -0
  305. package/esm2022/modal/services/public-api.mjs +3 -0
  306. package/esm2022/modal/types/modal-footer-style.type.mjs +2 -0
  307. package/esm2022/modal/types/modal-size.type.mjs +2 -0
  308. package/esm2022/modal/upd-modal.module.mjs +90 -0
  309. package/esm2022/modal/updevs-components-modal.mjs +5 -0
  310. package/esm2022/paginator/assets/i18n/en.json +15 -0
  311. package/esm2022/paginator/assets/i18n/pt.json +15 -0
  312. package/esm2022/paginator/index.mjs +2 -0
  313. package/esm2022/paginator/paginator.component.mjs +66 -0
  314. package/esm2022/paginator/public-api.mjs +3 -0
  315. package/esm2022/paginator/upd-paginator.module.mjs +47 -0
  316. package/esm2022/paginator/updevs-components-paginator.mjs +5 -0
  317. package/esm2022/popover/index.mjs +2 -0
  318. package/esm2022/popover/popover.component.mjs +65 -0
  319. package/esm2022/popover/popover.directive.mjs +129 -0
  320. package/esm2022/popover/public-api.mjs +4 -0
  321. package/esm2022/popover/upd-popover.module.mjs +29 -0
  322. package/esm2022/popover/updevs-components-popover.mjs +5 -0
  323. package/esm2022/public-api.mjs +2 -0
  324. package/esm2022/table/abstractions/base-column.model.mjs +52 -0
  325. package/esm2022/table/abstractions/base.column.mjs +98 -0
  326. package/esm2022/table/abstractions/filters-operands.service.mjs +3 -0
  327. package/esm2022/table/abstractions/public-api.mjs +3 -0
  328. package/esm2022/table/assets/i18n/en.json +74 -0
  329. package/esm2022/table/assets/i18n/pt.json +74 -0
  330. package/esm2022/table/components/columns/boolean-column/boolean-column.component.mjs +26 -0
  331. package/esm2022/table/components/columns/date-time-column/date-time-column.component.mjs +13 -0
  332. package/esm2022/table/components/columns/number-column/number-column.component.mjs +13 -0
  333. package/esm2022/table/components/columns/text-column/text-column.component.mjs +31 -0
  334. package/esm2022/table/components/columns-manager/columns-manager.component.mjs +36 -0
  335. package/esm2022/table/components/filter-row/filter-row.component.mjs +114 -0
  336. package/esm2022/table/components/save-search/save-search.component.mjs +72 -0
  337. package/esm2022/table/components/search-section/search-section.component.mjs +93 -0
  338. package/esm2022/table/directives/public-api.mjs +2 -0
  339. package/esm2022/table/directives/table-column.directive.mjs +51 -0
  340. package/esm2022/table/index.mjs +2 -0
  341. package/esm2022/table/models/columns/boolean-column.model.mjs +22 -0
  342. package/esm2022/table/models/columns/date-time-column.model.mjs +16 -0
  343. package/esm2022/table/models/columns/guid-column.model.mjs +13 -0
  344. package/esm2022/table/models/columns/image-column.model.mjs +11 -0
  345. package/esm2022/table/models/columns/number-column.model.mjs +17 -0
  346. package/esm2022/table/models/columns/public-api.mjs +7 -0
  347. package/esm2022/table/models/columns/text-column.model.mjs +11 -0
  348. package/esm2022/table/models/enums/column-type.enum.mjs +15 -0
  349. package/esm2022/table/models/enums/public-api.mjs +2 -0
  350. package/esm2022/table/models/filter-item.model.mjs +2 -0
  351. package/esm2022/table/models/filter-operand.config.mjs +2 -0
  352. package/esm2022/table/models/operands-lists/boolean-filter-operands-list.model.mjs +25 -0
  353. package/esm2022/table/models/operands-lists/date-filter-operands-list.model.mjs +25 -0
  354. package/esm2022/table/models/operands-lists/date-or-number-operands-list.config.mjs +31 -0
  355. package/esm2022/table/models/operands-lists/filter-operands-list.config.mjs +31 -0
  356. package/esm2022/table/models/operands-lists/guid-filter-operands-list.model.mjs +16 -0
  357. package/esm2022/table/models/operands-lists/number-filter-operands-list.model.mjs +25 -0
  358. package/esm2022/table/models/operands-lists/string-filter-operands-list.model.mjs +45 -0
  359. package/esm2022/table/models/public-api.mjs +5 -0
  360. package/esm2022/table/models/saved-view.model.mjs +2 -0
  361. package/esm2022/table/models/table-config.model.mjs +22 -0
  362. package/esm2022/table/models/table.config.mjs +2 -0
  363. package/esm2022/table/models/upd-table-config.model.mjs +9 -0
  364. package/esm2022/table/models/upd-table.config.mjs +2 -0
  365. package/esm2022/table/public-api.mjs +6 -0
  366. package/esm2022/table/services/default-filters-operands.service.mjs +60 -0
  367. package/esm2022/table/services/storages/saved-views.storage.mjs +56 -0
  368. package/esm2022/table/services/stores/filters-operands.store.mjs +19 -0
  369. package/esm2022/table/services/upd-table-config.service.mjs +18 -0
  370. package/esm2022/table/table.component.mjs +386 -0
  371. package/esm2022/table/tools/filters.tools.mjs +48 -0
  372. package/esm2022/table/tools/table.constants.mjs +15 -0
  373. package/esm2022/table/upd-table.module.mjs +150 -0
  374. package/esm2022/table/updevs-components-table.mjs +5 -0
  375. package/esm2022/updevs-components.mjs +5 -0
  376. package/fesm2022/updevs-components-badge.mjs +91 -0
  377. package/fesm2022/updevs-components-badge.mjs.map +1 -0
  378. package/fesm2022/updevs-components-button.mjs +193 -0
  379. package/fesm2022/updevs-components-button.mjs.map +1 -0
  380. package/fesm2022/updevs-components-calendar.mjs +1712 -0
  381. package/fesm2022/updevs-components-calendar.mjs.map +1 -0
  382. package/fesm2022/updevs-components-card.mjs +238 -0
  383. package/fesm2022/updevs-components-card.mjs.map +1 -0
  384. package/fesm2022/updevs-components-drag-and-drop.mjs +185 -0
  385. package/fesm2022/updevs-components-drag-and-drop.mjs.map +1 -0
  386. package/fesm2022/updevs-components-dropdown.mjs +226 -0
  387. package/fesm2022/updevs-components-dropdown.mjs.map +1 -0
  388. package/fesm2022/updevs-components-form-controls-abstractions.mjs +53 -0
  389. package/fesm2022/updevs-components-form-controls-abstractions.mjs.map +1 -0
  390. package/fesm2022/updevs-components-form-controls-checkbox.mjs +87 -0
  391. package/fesm2022/updevs-components-form-controls-checkbox.mjs.map +1 -0
  392. package/fesm2022/updevs-components-form-controls-date-picker.mjs +190 -0
  393. package/fesm2022/updevs-components-form-controls-date-picker.mjs.map +1 -0
  394. package/fesm2022/updevs-components-form-controls-file-upload.mjs +264 -0
  395. package/fesm2022/updevs-components-form-controls-file-upload.mjs.map +1 -0
  396. package/fesm2022/updevs-components-form-controls-input.mjs +259 -0
  397. package/fesm2022/updevs-components-form-controls-input.mjs.map +1 -0
  398. package/fesm2022/updevs-components-form-controls-radio.mjs +87 -0
  399. package/fesm2022/updevs-components-form-controls-radio.mjs.map +1 -0
  400. package/fesm2022/updevs-components-form-controls-select.mjs +417 -0
  401. package/fesm2022/updevs-components-form-controls-select.mjs.map +1 -0
  402. package/fesm2022/updevs-components-form-controls-textarea.mjs +72 -0
  403. package/fesm2022/updevs-components-form-controls-textarea.mjs.map +1 -0
  404. package/fesm2022/updevs-components-form-controls-time-picker.mjs +345 -0
  405. package/fesm2022/updevs-components-form-controls-time-picker.mjs.map +1 -0
  406. package/fesm2022/updevs-components-form.mjs +436 -0
  407. package/fesm2022/updevs-components-form.mjs.map +1 -0
  408. package/fesm2022/updevs-components-layout.mjs +940 -0
  409. package/fesm2022/updevs-components-layout.mjs.map +1 -0
  410. package/fesm2022/updevs-components-link.mjs +79 -0
  411. package/fesm2022/updevs-components-link.mjs.map +1 -0
  412. package/fesm2022/updevs-components-list.mjs +206 -0
  413. package/fesm2022/updevs-components-list.mjs.map +1 -0
  414. package/fesm2022/updevs-components-modal.mjs +504 -0
  415. package/fesm2022/updevs-components-modal.mjs.map +1 -0
  416. package/fesm2022/updevs-components-paginator.mjs +160 -0
  417. package/fesm2022/updevs-components-paginator.mjs.map +1 -0
  418. package/fesm2022/updevs-components-popover.mjs +223 -0
  419. package/fesm2022/updevs-components-popover.mjs.map +1 -0
  420. package/fesm2022/updevs-components-table.mjs +1714 -0
  421. package/fesm2022/updevs-components-table.mjs.map +1 -0
  422. package/fesm2022/updevs-components.mjs +33 -0
  423. package/fesm2022/updevs-components.mjs.map +1 -0
  424. package/form/components/dynamic-field/dynamic-field.component.d.ts +55 -0
  425. package/form/form.component.d.ts +60 -0
  426. package/form/models/checkbox-field.model.d.ts +4 -0
  427. package/form/models/checkbox-group-field.model.d.ts +6 -0
  428. package/form/models/dynamic-field.model.d.ts +28 -0
  429. package/form/models/enums/dynamic-field.type.d.ts +12 -0
  430. package/form/models/enums/public-api.d.ts +1 -0
  431. package/form/models/file-upload-field.model.d.ts +16 -0
  432. package/form/models/form-config.d.ts +2 -0
  433. package/form/models/form-row.model.d.ts +10 -0
  434. package/form/models/input-field.model.d.ts +9 -0
  435. package/form/models/public-api.d.ts +14 -0
  436. package/form/models/radio-field.model.d.ts +4 -0
  437. package/form/models/radio-group-field.model.d.ts +6 -0
  438. package/form/models/select-field.model.d.ts +28 -0
  439. package/form/models/single-select-field.model.d.ts +4 -0
  440. package/form/models/textarea-field.model.d.ts +10 -0
  441. package/form/models/validator-config.d.ts +5 -0
  442. package/form/public-api.d.ts +3 -0
  443. package/form/tools/errors-helper.d.ts +11 -0
  444. package/form/upd-form.module.d.ts +22 -0
  445. package/form-controls/abstractions/base-control.d.ts +29 -0
  446. package/form-controls/abstractions/index.d.ts +2 -0
  447. package/form-controls/abstractions/public-api.d.ts +2 -0
  448. package/form-controls/checkbox/checkbox.component.d.ts +19 -0
  449. package/form-controls/checkbox/{src/public-api.ts → public-api.d.ts} +0 -1
  450. package/form-controls/checkbox/upd-checkbox.module.d.ts +10 -0
  451. package/form-controls/date-picker/date-picker.component.d.ts +87 -0
  452. package/form-controls/date-picker/public-api.d.ts +2 -0
  453. package/form-controls/date-picker/upd-date-picker.module.d.ts +12 -0
  454. package/form-controls/file-upload/file-upload-changed.event.d.ts +4 -0
  455. package/form-controls/file-upload/file-upload.component.d.ts +46 -0
  456. package/form-controls/file-upload/public-api.d.ts +3 -0
  457. package/form-controls/file-upload/upd-file-upload.module.d.ts +14 -0
  458. package/form-controls/input/directives/input-append.directive.d.ts +7 -0
  459. package/form-controls/input/directives/input-prepend.directive.d.ts +7 -0
  460. package/form-controls/input/input.component.d.ts +64 -0
  461. package/form-controls/input/upd-input.module.d.ts +13 -0
  462. package/form-controls/radio/radio.component.d.ts +17 -0
  463. package/form-controls/radio/upd-radio.module.d.ts +10 -0
  464. package/form-controls/select/components/multiple/select-multiple.component.d.ts +25 -0
  465. package/form-controls/select/components/single/select.component.d.ts +26 -0
  466. package/form-controls/select/models/abstractions/base-select.component.d.ts +77 -0
  467. package/form-controls/select/models/defaults.d.ts +8 -0
  468. package/form-controls/select/{src/models/public-api.ts → models/public-api.d.ts} +1 -0
  469. package/form-controls/select/{src/models/select-item.ts → models/select-item.d.ts} +0 -1
  470. package/form-controls/select/upd-select.module.d.ts +16 -0
  471. package/form-controls/textarea/textarea.component.d.ts +19 -0
  472. package/form-controls/textarea/upd-textarea.module.d.ts +8 -0
  473. package/form-controls/time-picker/time-picker.component.d.ts +78 -0
  474. package/form-controls/time-picker/time-selector/time-selector.component.d.ts +69 -0
  475. package/form-controls/time-picker/upd-time-picker.module.d.ts +17 -0
  476. package/index.d.ts +2 -0
  477. package/layout/abstractions/base-page.component.d.ts +12 -0
  478. package/layout/abstractions/base.layout.d.ts +15 -0
  479. package/layout/index.d.ts +1 -0
  480. package/layout/layouts/blank-layout/blank-layout.component.d.ts +9 -0
  481. package/layout/layouts/blank-layout/blank-layout.module.d.ts +15 -0
  482. package/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.d.ts +6 -0
  483. package/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.d.ts +22 -0
  484. package/layout/models/login-page-config.model.d.ts +46 -0
  485. package/layout/models/login-page.config.d.ts +44 -0
  486. package/layout/{src/models/public-api.ts → models/public-api.d.ts} +1 -0
  487. package/layout/models/security-layout-config.model.d.ts +12 -0
  488. package/layout/models/security-layout.config.d.ts +10 -0
  489. package/layout/models/upd-layout-config.model.d.ts +48 -0
  490. package/layout/{src/models/upd-layout.config.ts → models/upd-layout.config.d.ts} +9 -0
  491. package/layout/pages/auth-flow/auth-flow-routing.module.d.ts +12 -0
  492. package/layout/pages/auth-flow/auth-flow.module.d.ts +20 -0
  493. package/layout/pages/auth-flow/logged-out/logged-out.component.d.ts +5 -0
  494. package/layout/pages/auth-flow/login/login.component.d.ts +26 -0
  495. package/layout/pages/auth-flow/oauth-callback/oauth-callback.component.d.ts +5 -0
  496. package/layout/partials/footer/footer-copyright.directive.d.ts +5 -0
  497. package/layout/partials/footer/footer.component.d.ts +34 -0
  498. package/layout/partials/footer/footer.module.d.ts +9 -0
  499. package/layout/{src/partials/footer/public-api.ts → partials/footer/public-api.d.ts} +1 -0
  500. package/layout/partials/header/header.component.d.ts +48 -0
  501. package/layout/partials/header/header.module.d.ts +12 -0
  502. package/layout/{src/partials/header/public-api.ts → partials/header/public-api.d.ts} +1 -0
  503. package/layout/partials/page-header/page-header.component.d.ts +7 -0
  504. package/layout/partials/sidebar/sidebar.component.d.ts +24 -0
  505. package/layout/services/upd-layout-config.service.d.ts +15 -0
  506. package/layout/{src/tools/layout.constants.ts → tools/layout.constants.d.ts} +3 -6
  507. package/layout/upd-layout.module.d.ts +19 -0
  508. package/lib/index.d.ts +2 -0
  509. package/lib/models/public-api.d.ts +2 -0
  510. package/lib/models/row-column-size.d.ts +6 -0
  511. package/lib/public-api.d.ts +5 -0
  512. package/lib/tools/column-size.helper.d.ts +6 -0
  513. package/lib/tools/public-api.d.ts +2 -0
  514. package/{src/lib/types/component-size.type.ts → lib/types/component-size.type.d.ts} +1 -0
  515. package/lib/types/horizontal-vertical.type.d.ts +2 -0
  516. package/lib/types/public-api.d.ts +4 -0
  517. package/lib/types/validation-status.type.d.ts +2 -0
  518. package/lib/upd-components.module.d.ts +7 -0
  519. package/link/index.d.ts +1 -0
  520. package/link/link.component.d.ts +22 -0
  521. package/link/upd-link.module.d.ts +8 -0
  522. package/list/index.d.ts +1 -0
  523. package/list/list.component.d.ts +46 -0
  524. package/list/{src/models/list-item.ts → models/list-item.d.ts} +3 -4
  525. package/list/models/list-item.model.d.ts +25 -0
  526. package/list/upd-list.module.d.ts +13 -0
  527. package/modal/components/modal-container/modal-container.component.d.ts +74 -0
  528. package/modal/index.d.ts +1 -0
  529. package/modal/models/base.modal.d.ts +8 -0
  530. package/modal/models/modal-config.model.d.ts +32 -0
  531. package/modal/models/modal-ref.d.ts +6 -0
  532. package/modal/models/modal.config.d.ts +30 -0
  533. package/modal/models/public-api.d.ts +3 -0
  534. package/modal/public-api.d.ts +3 -0
  535. package/modal/services/modal-alert.service.d.ts +22 -0
  536. package/modal/services/modal.service.d.ts +12 -0
  537. package/modal/services/public-api.d.ts +2 -0
  538. package/modal/types/modal-footer-style.type.d.ts +1 -0
  539. package/modal/types/modal-size.type.d.ts +1 -0
  540. package/modal/upd-modal.module.d.ts +18 -0
  541. package/package.json +169 -21
  542. package/paginator/index.d.ts +1 -0
  543. package/paginator/paginator.component.d.ts +42 -0
  544. package/paginator/public-api.d.ts +2 -0
  545. package/paginator/upd-paginator.module.d.ts +14 -0
  546. package/popover/index.d.ts +1 -0
  547. package/popover/popover.component.d.ts +22 -0
  548. package/popover/popover.directive.d.ts +33 -0
  549. package/popover/upd-popover.module.d.ts +9 -0
  550. package/public-api.d.ts +2 -0
  551. package/table/abstractions/base-column.model.d.ts +31 -0
  552. package/table/abstractions/base.column.d.ts +22 -0
  553. package/table/abstractions/filters-operands.service.d.ts +8 -0
  554. package/table/abstractions/public-api.d.ts +2 -0
  555. package/table/components/columns/boolean-column/boolean-column.component.d.ts +9 -0
  556. package/table/components/columns/date-time-column/date-time-column.component.d.ts +7 -0
  557. package/table/components/columns/number-column/number-column.component.d.ts +7 -0
  558. package/table/components/columns/text-column/text-column.component.d.ts +9 -0
  559. package/table/components/columns-manager/columns-manager.component.d.ts +15 -0
  560. package/table/components/filter-row/filter-row.component.d.ts +40 -0
  561. package/table/components/save-search/save-search.component.d.ts +17 -0
  562. package/table/components/search-section/search-section.component.d.ts +36 -0
  563. package/table/directives/public-api.d.ts +1 -0
  564. package/table/directives/table-column.directive.d.ts +14 -0
  565. package/table/index.d.ts +1 -0
  566. package/table/models/columns/boolean-column.model.d.ts +15 -0
  567. package/table/models/columns/date-time-column.model.d.ts +8 -0
  568. package/table/models/columns/guid-column.model.d.ts +4 -0
  569. package/table/models/columns/image-column.model.d.ts +6 -0
  570. package/table/models/columns/number-column.model.d.ts +8 -0
  571. package/table/models/columns/public-api.d.ts +6 -0
  572. package/table/models/columns/text-column.model.d.ts +6 -0
  573. package/table/models/enums/column-type.enum.d.ts +13 -0
  574. package/table/models/enums/public-api.d.ts +1 -0
  575. package/table/models/filter-item.model.d.ts +6 -0
  576. package/table/models/filter-operand.config.d.ts +9 -0
  577. package/table/models/operands-lists/boolean-filter-operands-list.model.d.ts +6 -0
  578. package/table/models/operands-lists/date-filter-operands-list.model.d.ts +6 -0
  579. package/table/models/operands-lists/date-or-number-operands-list.config.d.ts +5 -0
  580. package/table/models/operands-lists/filter-operands-list.config.d.ts +5 -0
  581. package/table/models/operands-lists/guid-filter-operands-list.model.d.ts +6 -0
  582. package/table/models/operands-lists/number-filter-operands-list.model.d.ts +6 -0
  583. package/table/models/operands-lists/string-filter-operands-list.model.d.ts +6 -0
  584. package/table/models/public-api.d.ts +4 -0
  585. package/table/models/saved-view.model.d.ts +11 -0
  586. package/table/models/table-config.model.d.ts +26 -0
  587. package/table/models/table.config.d.ts +24 -0
  588. package/table/models/upd-table-config.model.d.ts +6 -0
  589. package/table/models/upd-table.config.d.ts +6 -0
  590. package/table/public-api.d.ts +5 -0
  591. package/table/services/default-filters-operands.service.d.ts +17 -0
  592. package/table/services/storages/saved-views.storage.d.ts +19 -0
  593. package/table/services/stores/filters-operands.store.d.ts +11 -0
  594. package/table/services/upd-table-config.service.d.ts +12 -0
  595. package/table/table.component.d.ts +79 -0
  596. package/table/tools/filters.tools.d.ts +9 -0
  597. package/table/tools/table.constants.d.ts +15 -0
  598. package/table/upd-table.module.d.ts +40 -0
  599. package/CHANGELOG.md +0 -8
  600. package/button/ng-package.json +0 -7
  601. package/button/src/button.component.html +0 -8
  602. package/button/src/button.component.scss +0 -5
  603. package/button/src/button.component.spec.ts +0 -23
  604. package/button/src/button.component.ts +0 -154
  605. package/button/src/upd-button.module.ts +0 -17
  606. package/card/ng-package.json +0 -7
  607. package/card/src/card.component.html +0 -105
  608. package/card/src/card.component.scss +0 -47
  609. package/card/src/card.component.spec.ts +0 -23
  610. package/card/src/card.component.ts +0 -112
  611. package/card/src/directives/card-actions.directive.spec.ts +0 -8
  612. package/card/src/directives/card-actions.directive.ts +0 -11
  613. package/card/src/directives/card-footer.directive.spec.ts +0 -8
  614. package/card/src/directives/card-footer.directive.ts +0 -11
  615. package/card/src/directives/card-header.directive.spec.ts +0 -8
  616. package/card/src/directives/card-header.directive.ts +0 -11
  617. package/card/src/directives/card-image.directive.spec.ts +0 -8
  618. package/card/src/directives/card-image.directive.ts +0 -11
  619. package/card/src/types/public-api.ts +0 -5
  620. package/card/src/upd-card.module.ts +0 -32
  621. package/dropdown/ng-package.json +0 -7
  622. package/dropdown/src/dropdown.component.html +0 -32
  623. package/dropdown/src/dropdown.component.scss +0 -19
  624. package/dropdown/src/dropdown.component.spec.ts +0 -23
  625. package/dropdown/src/dropdown.component.ts +0 -182
  626. package/dropdown/src/models/public-api.ts +0 -2
  627. package/dropdown/src/upd-dropdown.module.ts +0 -25
  628. package/form/ng-package.json +0 -7
  629. package/form/src/form.module.ts +0 -10
  630. package/form/src/public-api.ts +0 -1
  631. package/form-controls/checkbox/ng-package.json +0 -7
  632. package/form-controls/checkbox/src/checkbox.component.html +0 -7
  633. package/form-controls/checkbox/src/checkbox.component.scss +0 -0
  634. package/form-controls/checkbox/src/checkbox.component.spec.ts +0 -23
  635. package/form-controls/checkbox/src/checkbox.component.ts +0 -48
  636. package/form-controls/checkbox/src/upd-checkbox.module.ts +0 -19
  637. package/form-controls/input/ng-package.json +0 -7
  638. package/form-controls/input/src/directives/input-append.directive.spec.ts +0 -8
  639. package/form-controls/input/src/directives/input-append.directive.ts +0 -11
  640. package/form-controls/input/src/directives/input-prepend.directive.spec.ts +0 -8
  641. package/form-controls/input/src/directives/input-prepend.directive.ts +0 -11
  642. package/form-controls/input/src/input.component.html +0 -82
  643. package/form-controls/input/src/input.component.scss +0 -13
  644. package/form-controls/input/src/input.component.spec.ts +0 -23
  645. package/form-controls/input/src/input.component.ts +0 -124
  646. package/form-controls/input/src/upd-input.module.ts +0 -29
  647. package/form-controls/radio/ng-package.json +0 -7
  648. package/form-controls/radio/src/radio.component.html +0 -7
  649. package/form-controls/radio/src/radio.component.scss +0 -0
  650. package/form-controls/radio/src/radio.component.spec.ts +0 -23
  651. package/form-controls/radio/src/radio.component.ts +0 -47
  652. package/form-controls/radio/src/upd-radio.module.ts +0 -17
  653. package/form-controls/select/ng-package.json +0 -7
  654. package/form-controls/select/src/components/multiple/select-multiple.component.html +0 -41
  655. package/form-controls/select/src/components/multiple/select-multiple.component.scss +0 -6
  656. package/form-controls/select/src/components/multiple/select-multiple.component.spec.ts +0 -21
  657. package/form-controls/select/src/components/multiple/select-multiple.component.ts +0 -69
  658. package/form-controls/select/src/components/shared.scss +0 -40
  659. package/form-controls/select/src/components/single/select.component.html +0 -53
  660. package/form-controls/select/src/components/single/select.component.scss +0 -3
  661. package/form-controls/select/src/components/single/select.component.spec.ts +0 -23
  662. package/form-controls/select/src/components/single/select.component.ts +0 -58
  663. package/form-controls/select/src/models/abstractions/base-select.component.ts +0 -259
  664. package/form-controls/select/src/upd-select.module.ts +0 -32
  665. package/form-controls/textarea/ng-package.json +0 -7
  666. package/form-controls/textarea/src/textarea.component.html +0 -8
  667. package/form-controls/textarea/src/textarea.component.scss +0 -0
  668. package/form-controls/textarea/src/textarea.component.spec.ts +0 -23
  669. package/form-controls/textarea/src/textarea.component.ts +0 -47
  670. package/form-controls/textarea/src/upd-textarea.module.ts +0 -17
  671. package/form-controls/time-picker/ng-package.json +0 -7
  672. package/form-controls/time-picker/src/time-picker.component.html +0 -17
  673. package/form-controls/time-picker/src/time-picker.component.scss +0 -10
  674. package/form-controls/time-picker/src/time-picker.component.spec.ts +0 -21
  675. package/form-controls/time-picker/src/time-picker.component.ts +0 -110
  676. package/form-controls/time-picker/src/time-selector/time-selector.component.html +0 -44
  677. package/form-controls/time-picker/src/time-selector/time-selector.component.scss +0 -47
  678. package/form-controls/time-picker/src/time-selector/time-selector.component.spec.ts +0 -21
  679. package/form-controls/time-picker/src/time-selector/time-selector.component.ts +0 -107
  680. package/form-controls/time-picker/src/upd-time-picker.module.ts +0 -39
  681. package/layout/ng-package.json +0 -7
  682. package/layout/src/abstractions/base-page.component.ts +0 -21
  683. package/layout/src/assets/i18n/en.json +0 -5
  684. package/layout/src/assets/i18n/pt.json +0 -5
  685. package/layout/src/layouts/blank-layout/blank-layout.component.html +0 -1
  686. package/layout/src/layouts/blank-layout/blank-layout.component.scss +0 -0
  687. package/layout/src/layouts/blank-layout/blank-layout.component.spec.ts +0 -23
  688. package/layout/src/layouts/blank-layout/blank-layout.component.ts +0 -10
  689. package/layout/src/layouts/blank-layout/blank-layout.module.ts +0 -17
  690. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.html +0 -14
  691. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.scss +0 -0
  692. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.spec.ts +0 -23
  693. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.ts +0 -31
  694. package/layout/src/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.ts +0 -52
  695. package/layout/src/models/upd-layout-config.model.ts +0 -71
  696. package/layout/src/pages/auth-flow/auth-flow-routing.module.ts +0 -21
  697. package/layout/src/pages/auth-flow/auth-flow.module.ts +0 -29
  698. package/layout/src/pages/auth-flow/logged-out/logged-out.component.html +0 -1
  699. package/layout/src/pages/auth-flow/logged-out/logged-out.component.scss +0 -0
  700. package/layout/src/pages/auth-flow/logged-out/logged-out.component.spec.ts +0 -23
  701. package/layout/src/pages/auth-flow/logged-out/logged-out.component.ts +0 -10
  702. package/layout/src/pages/auth-flow/login/login.component.html +0 -96
  703. package/layout/src/pages/auth-flow/login/login.component.scss +0 -0
  704. package/layout/src/pages/auth-flow/login/login.component.spec.ts +0 -23
  705. package/layout/src/pages/auth-flow/login/login.component.ts +0 -26
  706. package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.html +0 -1
  707. package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.scss +0 -0
  708. package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.spec.ts +0 -23
  709. package/layout/src/pages/auth-flow/oauth-callback/oauth-callback.component.ts +0 -10
  710. package/layout/src/partials/footer/footer-copyright.directive.spec.ts +0 -8
  711. package/layout/src/partials/footer/footer-copyright.directive.ts +0 -9
  712. package/layout/src/partials/footer/footer.component.html +0 -30
  713. package/layout/src/partials/footer/footer.component.scss +0 -0
  714. package/layout/src/partials/footer/footer.component.spec.ts +0 -23
  715. package/layout/src/partials/footer/footer.component.ts +0 -73
  716. package/layout/src/partials/header/header.component.html +0 -163
  717. package/layout/src/partials/header/header.component.scss +0 -0
  718. package/layout/src/partials/header/header.component.spec.ts +0 -23
  719. package/layout/src/partials/header/header.component.ts +0 -86
  720. package/layout/src/partials/page-header/page-header.component.html +0 -19
  721. package/layout/src/partials/page-header/page-header.component.scss +0 -0
  722. package/layout/src/partials/page-header/page-header.component.spec.ts +0 -23
  723. package/layout/src/partials/page-header/page-header.component.ts +0 -11
  724. package/layout/src/partials/sidebar/sidebar.component.html +0 -62
  725. package/layout/src/partials/sidebar/sidebar.component.scss +0 -0
  726. package/layout/src/partials/sidebar/sidebar.component.spec.ts +0 -23
  727. package/layout/src/partials/sidebar/sidebar.component.ts +0 -161
  728. package/layout/src/services/upd-layout-config.service.spec.ts +0 -16
  729. package/layout/src/services/upd-layout-config.service.ts +0 -20
  730. package/layout/src/upd-layout.module.ts +0 -34
  731. package/link/ng-package.json +0 -7
  732. package/link/src/link.component.html +0 -3
  733. package/link/src/link.component.scss +0 -3
  734. package/link/src/link.component.spec.ts +0 -23
  735. package/link/src/link.component.ts +0 -48
  736. package/link/src/upd-link.module.ts +0 -17
  737. package/list/ng-package.json +0 -7
  738. package/list/src/assets/i18n/en.json +0 -5
  739. package/list/src/assets/i18n/pt.json +0 -5
  740. package/list/src/list.component.html +0 -58
  741. package/list/src/list.component.scss +0 -21
  742. package/list/src/list.component.spec.ts +0 -23
  743. package/list/src/list.component.ts +0 -147
  744. package/list/src/models/list-item.model.ts +0 -35
  745. package/list/src/upd-list.module.ts +0 -30
  746. package/ng-package.json +0 -10
  747. package/popover/ng-package.json +0 -7
  748. package/popover/src/popover.component.html +0 -20
  749. package/popover/src/popover.component.scss +0 -8
  750. package/popover/src/popover.component.spec.ts +0 -23
  751. package/popover/src/popover.component.ts +0 -53
  752. package/popover/src/popover.directive.spec.ts +0 -8
  753. package/popover/src/popover.directive.ts +0 -128
  754. package/popover/src/upd-popover.module.ts +0 -20
  755. package/src/lib/public-api.ts +0 -2
  756. package/src/lib/types/public-api.ts +0 -2
  757. package/src/lib/types/validation-status.type.ts +0 -1
  758. package/src/lib/upd-components.module.ts +0 -6
  759. package/src/public-api.ts +0 -1
  760. package/tsconfig.lib.json +0 -14
  761. package/tsconfig.lib.prod.json +0 -10
  762. package/tsconfig.spec.json +0 -14
  763. /package/{button/src/index.ts → badge/index.d.ts} +0 -0
  764. /package/{card/src/index.ts → button/index.d.ts} +0 -0
  765. /package/button/{src/public-api.ts → public-api.d.ts} +0 -0
  766. /package/{dropdown/src/index.ts → calendar/index.d.ts} +0 -0
  767. /package/card/{src/directives/public-api.ts → directives/public-api.d.ts} +0 -0
  768. /package/{form-controls/checkbox/src/index.ts → card/index.d.ts} +0 -0
  769. /package/card/{src/public-api.ts → public-api.d.ts} +0 -0
  770. /package/card/{src/types/card-state.type.ts → types/card-state.type.d.ts} +0 -0
  771. /package/card/{src/types/card-style.type.ts → types/card-style.type.d.ts} +0 -0
  772. /package/card/{src/types/hover-effect.type.ts → types/hover-effect.type.d.ts} +0 -0
  773. /package/card/{src/types/ribbon-style.type.ts → types/ribbon-style.type.d.ts} +0 -0
  774. /package/card/{src/types/status-position.type.ts → types/status-position.type.d.ts} +0 -0
  775. /package/{form-controls/input/src/index.ts → drag-and-drop/index.d.ts} +0 -0
  776. /package/{form-controls/radio/src/index.ts → dropdown/index.d.ts} +0 -0
  777. /package/dropdown/{src/public-api.ts → public-api.d.ts} +0 -0
  778. /package/{form-controls/time-picker/src → esm2022/form-controls/time-picker}/assets/i18n/en.json +0 -0
  779. /package/{form-controls/time-picker/src → esm2022/form-controls/time-picker}/assets/i18n/pt.json +0 -0
  780. /package/{src/lib/index.ts → form/index.d.ts} +0 -0
  781. /package/form-controls/{select/src/index.ts → checkbox/index.d.ts} +0 -0
  782. /package/form-controls/{textarea/src/index.ts → date-picker/index.d.ts} +0 -0
  783. /package/form-controls/{time-picker/src/index.ts → file-upload/index.d.ts} +0 -0
  784. /package/form-controls/input/{src/directives/public-api.ts → directives/public-api.d.ts} +0 -0
  785. /package/{form/src/index.ts → form-controls/input/index.d.ts} +0 -0
  786. /package/form-controls/input/{src/public-api.ts → public-api.d.ts} +0 -0
  787. /package/form-controls/input/{src/types/input.type.ts → types/input.type.d.ts} +0 -0
  788. /package/form-controls/input/{src/types/loader-position.type.ts → types/loader-position.type.d.ts} +0 -0
  789. /package/form-controls/input/{src/types/public-api.ts → types/public-api.d.ts} +0 -0
  790. /package/{layout/src/index.ts → form-controls/radio/index.d.ts} +0 -0
  791. /package/form-controls/radio/{src/public-api.ts → public-api.d.ts} +0 -0
  792. /package/{link/src/index.ts → form-controls/select/index.d.ts} +0 -0
  793. /package/form-controls/select/{src/public-api.ts → public-api.d.ts} +0 -0
  794. /package/{list/src/index.ts → form-controls/textarea/index.d.ts} +0 -0
  795. /package/form-controls/textarea/{src/public-api.ts → public-api.d.ts} +0 -0
  796. /package/{popover/src/index.ts → form-controls/time-picker/index.d.ts} +0 -0
  797. /package/form-controls/time-picker/{src/public-api.ts → public-api.d.ts} +0 -0
  798. /package/layout/{src/abstractions/public-api.ts → abstractions/public-api.d.ts} +0 -0
  799. /package/layout/{src/layouts/public-api.ts → layouts/public-api.d.ts} +0 -0
  800. /package/layout/{src/pages/auth-flow/public-api.ts → pages/auth-flow/public-api.d.ts} +0 -0
  801. /package/layout/{src/pages/public-api.ts → pages/public-api.d.ts} +0 -0
  802. /package/layout/{src/partials/header/header-style.type.ts → partials/header/header-style.type.d.ts} +0 -0
  803. /package/layout/{src/partials/page-header/public-api.ts → partials/page-header/public-api.d.ts} +0 -0
  804. /package/layout/{src/partials/public-api.ts → partials/public-api.d.ts} +0 -0
  805. /package/layout/{src/partials/sidebar/public-api.ts → partials/sidebar/public-api.d.ts} +0 -0
  806. /package/layout/{src/public-api.ts → public-api.d.ts} +0 -0
  807. /package/layout/{src/services/public-api.ts → services/public-api.d.ts} +0 -0
  808. /package/link/{src/public-api.ts → public-api.d.ts} +0 -0
  809. /package/link/{src/target.type.ts → target.type.d.ts} +0 -0
  810. /package/list/{src/models/badge-position.type.ts → models/badge-position.type.d.ts} +0 -0
  811. /package/list/{src/models/public-api.ts → models/public-api.d.ts} +0 -0
  812. /package/list/{src/public-api.ts → public-api.d.ts} +0 -0
  813. /package/popover/{src/public-api.ts → public-api.d.ts} +0 -0
@@ -0,0 +1,1714 @@
1
+ import { DataTypeEnum, StringColumnFilter, GuidColumnFilter, NumberColumnFilter, DateColumnFilter, BooleanColumnFilter, ColumnSort, SortDirectionEnum, BaseStore, FilterOperandEnum, FilterDateOperandEnum, FilterNumberOperandEnum, FilterBooleanOperandEnum, FilterGuidOperandEnum } from '@updevs/sdk/stores';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, Directive, Component, input, ViewContainerRef, effect, computed, signal, Injectable, model, InjectionToken, Inject, EventEmitter, HostBinding, Output, viewChild, ElementRef, NgModule } from '@angular/core';
4
+ import { DynamicComponentLoaderService, BaseComponent, ButtonModel } from '@updevs/sdk/layout';
5
+ import { TextService } from '@updevs/sdk';
6
+ import * as i1 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import * as i3 from '@updevs/icons';
9
+ import { UpdIconsModule } from '@updevs/icons';
10
+ import { DateTimeFormatEnum, Tools, SelectionModel, ServerResponseService } from '@updevs/sdk/core';
11
+ import { BaseModal, ModalService, ModalAlertService, UpdModalModule } from '@updevs/components/modal';
12
+ import { Subject, distinctUntilChanged, debounceTime, tap, switchMap, catchError, of, finalize, forkJoin } from 'rxjs';
13
+ import * as i1$1 from '@jsverse/transloco';
14
+ import { TranslocoDirective } from '@jsverse/transloco';
15
+ import * as i2 from '@updevs/components/drag-and-drop';
16
+ import { UpdDragAndDropModule } from '@updevs/components/drag-and-drop';
17
+ import { FormGroup, Validators } from '@angular/forms';
18
+ import * as i3$1 from '@updevs/components/form';
19
+ import { DynamicFieldType, UpdFormModule } from '@updevs/components/form';
20
+ import { BaseByUserSignalStorage } from '@updevs/sdk/security';
21
+ import * as i4 from '@updevs/components/button';
22
+ import { UpdButtonModule } from '@updevs/components/button';
23
+ import * as i5$1 from '@updevs/components/paginator';
24
+ import { UpdPaginatorModule } from '@updevs/components/paginator';
25
+ import * as i6 from '@updevs/components/form-controls/checkbox';
26
+ import { UpdCheckboxModule } from '@updevs/components/form-controls/checkbox';
27
+ import * as i7 from '@updevs/components/dropdown';
28
+ import { UpdDropdownModule } from '@updevs/components/dropdown';
29
+ import * as i8 from '@updevs/components/popover';
30
+ import { UpdPopoverModule } from '@updevs/components/popover';
31
+ import * as i5 from '@updevs/components/form-controls/input';
32
+ import { UpdInputModule } from '@updevs/components/form-controls/input';
33
+ import * as i3$2 from '@updevs/components/form-controls/select';
34
+ import { UpdSelectModule } from '@updevs/components/form-controls/select';
35
+ import { UpdTimePickerModule } from '@updevs/components/form-controls/time-picker';
36
+ import { UpdBadgeModule } from '@updevs/components/badge';
37
+
38
+ var ColumnTypeEnum;
39
+ (function (ColumnTypeEnum) {
40
+ ColumnTypeEnum[ColumnTypeEnum["Text"] = 1] = "Text";
41
+ ColumnTypeEnum[ColumnTypeEnum["DateTime"] = 2] = "DateTime";
42
+ ColumnTypeEnum[ColumnTypeEnum["Number"] = 3] = "Number";
43
+ ColumnTypeEnum[ColumnTypeEnum["Boolean"] = 4] = "Boolean";
44
+ ColumnTypeEnum[ColumnTypeEnum["Date"] = 5] = "Date";
45
+ ColumnTypeEnum[ColumnTypeEnum["Time"] = 6] = "Time";
46
+ ColumnTypeEnum[ColumnTypeEnum["Image"] = 7] = "Image";
47
+ ColumnTypeEnum[ColumnTypeEnum["Currency"] = 8] = "Currency";
48
+ ColumnTypeEnum[ColumnTypeEnum["Custom"] = 9] = "Custom";
49
+ ColumnTypeEnum[ColumnTypeEnum["Masked"] = 10] = "Masked";
50
+ ColumnTypeEnum[ColumnTypeEnum["Guid"] = 11] = "Guid";
51
+ })(ColumnTypeEnum || (ColumnTypeEnum = {}));
52
+
53
+ class BaseColumnModel {
54
+ get dataType() {
55
+ switch (this.type) {
56
+ case ColumnTypeEnum.Boolean:
57
+ return DataTypeEnum.Boolean;
58
+ case ColumnTypeEnum.DateTime:
59
+ case ColumnTypeEnum.Date:
60
+ case ColumnTypeEnum.Time:
61
+ return DataTypeEnum.Date;
62
+ case ColumnTypeEnum.Currency:
63
+ case ColumnTypeEnum.Number:
64
+ return DataTypeEnum.Number;
65
+ case ColumnTypeEnum.Guid:
66
+ return DataTypeEnum.Guid;
67
+ default:
68
+ return DataTypeEnum.String;
69
+ }
70
+ }
71
+ get widthClass() {
72
+ if (!this.width || !!this.width.pixels) {
73
+ return '';
74
+ }
75
+ const prefix = !!this.width.gridColumn ? 'col' : 'w';
76
+ const auto = !!this.width.gridColumn && this.width.gridColumn === 0 ? 'auto' : '';
77
+ return `${prefix}-${auto || this.widthSize}`;
78
+ }
79
+ get widthSize() {
80
+ return !this.width ? 0 : this.width.gridColumn || this.width.percentage || 0;
81
+ }
82
+ get pixelsSize() {
83
+ return this.width?.pixels;
84
+ }
85
+ constructor(columnType, init) {
86
+ this.titleAlignment = 'left';
87
+ this.allowSort = true;
88
+ this.isItalic = false;
89
+ this.type = ColumnTypeEnum.Text;
90
+ this.alignment = 'left';
91
+ this.weight = 'normal';
92
+ this.overflowStrategy = 'truncate';
93
+ this.shouldSpaceAfterPrefix = true;
94
+ this.shouldSpaceBeforeSuffix = true;
95
+ this.isHidden = false;
96
+ if (!!init) {
97
+ Object.assign(this, init);
98
+ }
99
+ this.type = columnType;
100
+ }
101
+ }
102
+
103
+ class FiltersOperandsService {
104
+ }
105
+
106
+ class BaseColumn {
107
+ constructor() {
108
+ this.textService = inject(TextService);
109
+ }
110
+ get value() {
111
+ return this.record[this.config.name];
112
+ }
113
+ get isTextType() {
114
+ return this.config.type !== ColumnTypeEnum.Boolean
115
+ && this.config.type !== ColumnTypeEnum.Image
116
+ && this.config.type !== ColumnTypeEnum.Custom;
117
+ }
118
+ get prefix() {
119
+ return this.textService.getText(this.config.prefix);
120
+ }
121
+ get suffix() {
122
+ return this.textService.getText(this.config.suffix);
123
+ }
124
+ get prefixSpace() {
125
+ return !!this.prefix && this.config.shouldSpaceAfterPrefix ? ' ' : '';
126
+ }
127
+ get suffixSpace() {
128
+ return !!this.suffix && this.config.shouldSpaceBeforeSuffix ? ' ' : '';
129
+ }
130
+ get alignmentClass() {
131
+ const prefix = this.isTextType ? 'text' : 'justify-content';
132
+ switch (this.config.alignment) {
133
+ case 'justify':
134
+ return `${prefix}-${(this.isTextType ? 'justify' : 'between')}`;
135
+ case 'center':
136
+ return `${prefix}-center`;
137
+ case 'right':
138
+ return `${prefix}-end`;
139
+ default:
140
+ return `${prefix}-start`;
141
+ }
142
+ }
143
+ get overflowClass() {
144
+ switch (this.config.overflowStrategy) {
145
+ case 'no-wrap':
146
+ return 'text-nowrap';
147
+ case 'wrap':
148
+ return 'text-wrap';
149
+ case 'word-break':
150
+ return 'text-break';
151
+ default:
152
+ return 'text-truncate';
153
+ }
154
+ }
155
+ get decorationClass() {
156
+ switch (this.config.decoration) {
157
+ case 'underline':
158
+ return 'text-decoration-underline';
159
+ case 'strikethrough':
160
+ return 'text-decoration-line-through';
161
+ case 'none':
162
+ return 'text-decoration-none';
163
+ default:
164
+ return '';
165
+ }
166
+ }
167
+ get weightClass() {
168
+ switch (this.config.weight) {
169
+ case 'bold':
170
+ return 'fw-bold';
171
+ case 'bolder':
172
+ return 'fw-bolder';
173
+ case 'light':
174
+ return 'fw-light';
175
+ case 'lighter':
176
+ return 'fw-lighter';
177
+ default:
178
+ return 'fw-normal';
179
+ }
180
+ }
181
+ getRecordAs() {
182
+ return this.record;
183
+ }
184
+ getClasses() {
185
+ return [
186
+ this.alignmentClass,
187
+ this.overflowClass,
188
+ this.decorationClass,
189
+ this.weightClass,
190
+ this.config.isItalic ? 'fst-italic' : ''
191
+ ];
192
+ }
193
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseColumn, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
194
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.0", type: BaseColumn, ngImport: i0 }); }
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseColumn, decorators: [{
197
+ type: Directive
198
+ }] });
199
+
200
+ class TextColumnComponent extends BaseColumn {
201
+ getClasses() {
202
+ return [
203
+ ...super.getClasses(),
204
+ this.transformClass
205
+ ];
206
+ }
207
+ get transformClass() {
208
+ switch (this.config.transform) {
209
+ case 'capitalize':
210
+ return 'text-capitalize';
211
+ case 'lowercase':
212
+ return 'text-lowercase';
213
+ case 'uppercase':
214
+ return 'text-uppercase';
215
+ default:
216
+ return '';
217
+ }
218
+ }
219
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TextColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
220
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: TextColumnComponent, selector: "upd-text-column", usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value }}{{ suffixSpace }}{{ suffix }}</span>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
221
+ }
222
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TextColumnComponent, decorators: [{
223
+ type: Component,
224
+ args: [{ selector: 'upd-text-column', template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value }}{{ suffixSpace }}{{ suffix }}</span>\n" }]
225
+ }] });
226
+
227
+ class NumberColumnComponent extends BaseColumn {
228
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NumberColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
229
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: NumberColumnComponent, selector: "upd-number-column", usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value | number:config.numberFormat }}{{ suffixSpace }}{{ suffix }}</span>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] }); }
230
+ }
231
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NumberColumnComponent, decorators: [{
232
+ type: Component,
233
+ args: [{ selector: 'upd-number-column', template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value | number:config.numberFormat }}{{ suffixSpace }}{{ suffix }}</span>\n" }]
234
+ }] });
235
+
236
+ class BooleanColumnComponent extends BaseColumn {
237
+ getClasses() {
238
+ return [
239
+ ...super.getClasses(),
240
+ this.colorClass
241
+ ];
242
+ }
243
+ get colorClass() {
244
+ if (!this.config.shouldColorHighlight) {
245
+ return '';
246
+ }
247
+ return `text-${(!!this.value ? this.config.trueColor : this.config.falseColor)}`;
248
+ }
249
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BooleanColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
250
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: BooleanColumnComponent, selector: "upd-boolean-column", usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"getClasses()\">\n @switch (config.displayType) {\n @case ('text') {\n {{ prefix }}{{ prefixSpace }}{{ !!value ? textService.getText(config.trueText) : textService.getText(config.falseText) }}{{ suffixSpace }}{{ suffix }}\n }\n @case ('toggle') {\n {{ prefix }}{{ prefixSpace }}\n <upd-icon [tablerIcon]=\"!!value ? 'toggle-right' : 'toggle-left'\"></upd-icon>{{ suffixSpace }}{{ suffix }}\n }\n @case ('icon') {\n {{ prefix }}{{ prefixSpace }}\n <upd-icon [model]=\"!!value ? config.trueIcon : config.falseIcon\"></upd-icon>{{ suffixSpace }}{{ suffix }}\n }\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }] }); }
251
+ }
252
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BooleanColumnComponent, decorators: [{
253
+ type: Component,
254
+ args: [{ selector: 'upd-boolean-column', template: "<div [ngClass]=\"getClasses()\">\n @switch (config.displayType) {\n @case ('text') {\n {{ prefix }}{{ prefixSpace }}{{ !!value ? textService.getText(config.trueText) : textService.getText(config.falseText) }}{{ suffixSpace }}{{ suffix }}\n }\n @case ('toggle') {\n {{ prefix }}{{ prefixSpace }}\n <upd-icon [tablerIcon]=\"!!value ? 'toggle-right' : 'toggle-left'\"></upd-icon>{{ suffixSpace }}{{ suffix }}\n }\n @case ('icon') {\n {{ prefix }}{{ prefixSpace }}\n <upd-icon [model]=\"!!value ? config.trueIcon : config.falseIcon\"></upd-icon>{{ suffixSpace }}{{ suffix }}\n }\n }\n</div>\n" }]
255
+ }] });
256
+
257
+ class DateTimeColumnComponent extends BaseColumn {
258
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DateTimeColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
259
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: DateTimeColumnComponent, selector: "upd-date-time-column", usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value | date:config.dateTimeFormat }}{{ suffixSpace }}{{ suffix }}</span>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] }); }
260
+ }
261
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DateTimeColumnComponent, decorators: [{
262
+ type: Component,
263
+ args: [{ selector: 'upd-date-time-column', template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value | date:config.dateTimeFormat }}{{ suffixSpace }}{{ suffix }}</span>\n" }]
264
+ }] });
265
+
266
+ class TableColumnDirective {
267
+ constructor() {
268
+ this.record = input.required();
269
+ this.config = input.required();
270
+ this.viewContainerRef = inject(ViewContainerRef);
271
+ this.dynamicLoaderService = inject(DynamicComponentLoaderService);
272
+ effect(() => {
273
+ const component = this.dynamicLoaderService.load(this.getComponentType(), this.viewContainerRef);
274
+ component.instance.record = this.record();
275
+ component.instance.config = this.config();
276
+ });
277
+ }
278
+ getComponentType() {
279
+ switch (this.config().type) {
280
+ case ColumnTypeEnum.Text:
281
+ // @ts-ignore
282
+ return TextColumnComponent;
283
+ case ColumnTypeEnum.Number:
284
+ // @ts-ignore
285
+ return NumberColumnComponent;
286
+ case ColumnTypeEnum.Boolean:
287
+ // @ts-ignore
288
+ return BooleanColumnComponent;
289
+ case ColumnTypeEnum.Date:
290
+ // @ts-ignore
291
+ return DateTimeColumnComponent;
292
+ case ColumnTypeEnum.Guid:
293
+ // @ts-ignore
294
+ return TextColumnComponent;
295
+ default:
296
+ throw Error();
297
+ }
298
+ }
299
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
300
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.0", type: TableColumnDirective, selector: "[updTableColumn]", inputs: { record: { classPropertyName: "record", publicName: "record", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
301
+ }
302
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableColumnDirective, decorators: [{
303
+ type: Directive,
304
+ args: [{
305
+ selector: '[updTableColumn]'
306
+ }]
307
+ }], ctorParameters: () => [] });
308
+
309
+ class BooleanColumnModel extends BaseColumnModel {
310
+ constructor(init) {
311
+ super(ColumnTypeEnum.Boolean, init);
312
+ this.displayType = 'text';
313
+ this.trueText = { text: 'UpDevs.Table.Filters.Boolean.True', isTranslated: false };
314
+ this.falseText = { text: 'UpDevs.Table.Filters.Boolean.False', isTranslated: false };
315
+ this.trueIcon = { tablerIcon: 'square-check' };
316
+ this.falseIcon = { tablerIcon: 'square' };
317
+ this.trueColor = 'success';
318
+ this.falseColor = 'secondary';
319
+ this.shouldColorHighlight = true;
320
+ if (this.displayType !== 'text') {
321
+ this.alignment = 'center';
322
+ }
323
+ if (!!init) {
324
+ Object.assign(this, init);
325
+ }
326
+ }
327
+ }
328
+
329
+ class DateTimeColumnModel extends BaseColumnModel {
330
+ get dateTimeFormat() {
331
+ return this.customFormat || this.format;
332
+ }
333
+ constructor(init) {
334
+ super(ColumnTypeEnum.DateTime, init);
335
+ this.format = DateTimeFormatEnum.ShortDate;
336
+ if (!!init) {
337
+ Object.assign(this, init);
338
+ }
339
+ }
340
+ }
341
+
342
+ class TextColumnModel extends BaseColumnModel {
343
+ constructor(init) {
344
+ super(ColumnTypeEnum.Text, init);
345
+ if (!!init) {
346
+ Object.assign(this, init);
347
+ }
348
+ }
349
+ }
350
+
351
+ class GuidColumnModel extends TextColumnModel {
352
+ constructor(init) {
353
+ super(init);
354
+ this.transform = 'uppercase';
355
+ if (!!init) {
356
+ Object.assign(this, init);
357
+ }
358
+ this.type = ColumnTypeEnum.Guid;
359
+ }
360
+ }
361
+
362
+ class ImageColumnModel extends BaseColumnModel {
363
+ constructor(init) {
364
+ super(ColumnTypeEnum.Image, init);
365
+ if (!!init) {
366
+ Object.assign(this, init);
367
+ }
368
+ }
369
+ }
370
+
371
+ class NumberColumnModel extends BaseColumnModel {
372
+ get numberFormat() {
373
+ return `${this.minIntegerDigits}.${this.minFractionDigits}-${this.maxFractionDigits}`;
374
+ }
375
+ constructor(init) {
376
+ super(ColumnTypeEnum.Number, init);
377
+ this.minIntegerDigits = 1;
378
+ this.minFractionDigits = 0;
379
+ this.maxFractionDigits = 3;
380
+ if (!!init) {
381
+ Object.assign(this, init);
382
+ }
383
+ }
384
+ }
385
+
386
+ class TableConfigModel {
387
+ constructor(init) {
388
+ this.columns = [];
389
+ this.canSearch = true;
390
+ this.canSaveViews = true;
391
+ this.canLoadSavedViews = true;
392
+ this.canManageColumns = true;
393
+ this.shouldAutoSearch = true;
394
+ this.hasCheckboxColumn = true;
395
+ this.isResponsive = true;
396
+ this.hasStickyHeader = false;
397
+ this.data = [];
398
+ this.preSelectedItems = [];
399
+ this.searchInputDebounceTime = 300;
400
+ this.customActions = [];
401
+ this.getIdFunction = (item) => item.id;
402
+ if (!!init) {
403
+ Object.assign(this, init);
404
+ }
405
+ }
406
+ }
407
+
408
+ class ColumnsManagerComponent extends BaseModal {
409
+ constructor() {
410
+ super(...arguments);
411
+ this.config = computed(() => ({ columns: [this.visibleColumn(), this.hiddenColumn()], canReorder: true }));
412
+ this.columns = signal([]);
413
+ this.visibleColumn = computed(() => ({
414
+ name: 'visible',
415
+ title: { text: 'UpDevs.Table.VisibleColumns', isTranslated: false },
416
+ canBeEmpty: false,
417
+ items: this.data().columns.filter(c => !c.isHidden).map(c => ({
418
+ name: c.name,
419
+ text: c.title || { text: 'UpDevs.Table.ColumnTitleNotSet', isTranslated: false }
420
+ }))
421
+ }));
422
+ this.hiddenColumn = computed(() => ({
423
+ name: 'hidden',
424
+ title: { text: 'UpDevs.Table.HiddenColumns', isTranslated: false },
425
+ items: this.data().columns.filter(c => c.isHidden).map(c => ({
426
+ name: c.name,
427
+ text: c.title || { text: 'UpDevs.Table.ColumnTitleNotSet', isTranslated: false }
428
+ }))
429
+ }));
430
+ }
431
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ColumnsManagerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
432
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: ColumnsManagerComponent, selector: "upd-columns-manager", usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table.ColumnsManager'\">\n <upd-drag-and-drop [config]=\"config()\" [(columns)]=\"columns\"></upd-drag-and-drop>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i2.DragAndDropComponent, selector: "upd-drag-and-drop", inputs: ["config", "columns"], outputs: ["columnsChange"] }] }); }
433
+ }
434
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ColumnsManagerComponent, decorators: [{
435
+ type: Component,
436
+ args: [{ selector: 'upd-columns-manager', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table.ColumnsManager'\">\n <upd-drag-and-drop [config]=\"config()\" [(columns)]=\"columns\"></upd-drag-and-drop>\n</ng-container>\n" }]
437
+ }] });
438
+
439
+ class SavedViewsStorage extends BaseByUserSignalStorage {
440
+ constructor() {
441
+ super('saved-views');
442
+ this.lastStateKey = 'last-state';
443
+ }
444
+ saveView(data) {
445
+ data.id = data.id || Tools.Guid.generate();
446
+ data.userId = this._loggedUserId;
447
+ this.save(data, this._getUserKey(data.id, data.tableName));
448
+ }
449
+ saveLastState(data) {
450
+ data.id = this.lastStateKey;
451
+ this.saveView(data);
452
+ }
453
+ getById(tableName, id) {
454
+ return this.get(this._getUserKey(id, tableName));
455
+ }
456
+ getAll(tableName) {
457
+ return computed(() => {
458
+ const records = this.getAllItems();
459
+ return records().filter(sv => sv.tableName.toLowerCase() === tableName.toLowerCase()
460
+ && sv.userId === this._loggedUserId
461
+ && sv.id !== this.lastStateKey);
462
+ });
463
+ }
464
+ getLastState(tableName) {
465
+ return this.getById(tableName, this.lastStateKey);
466
+ }
467
+ resetAllIsDefault(tableName) {
468
+ const savedViews = this.getAll(tableName)();
469
+ savedViews.forEach(sv => {
470
+ sv.isDefault = false;
471
+ this.saveView(sv);
472
+ });
473
+ }
474
+ removeViews(tableName, ...keys) {
475
+ super.remove(...keys.map(k => this._getUserKey(k, tableName)));
476
+ }
477
+ getByName(tableName, name) {
478
+ const records = this.getAllItems();
479
+ return records().find(sv => sv.tableName.toLowerCase() === tableName.toLowerCase()
480
+ && sv.userId === this._loggedUserId
481
+ && sv.name?.toLowerCase() === name?.toLowerCase()
482
+ && sv.id !== this.lastStateKey);
483
+ }
484
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SavedViewsStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
485
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SavedViewsStorage }); }
486
+ }
487
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SavedViewsStorage, decorators: [{
488
+ type: Injectable
489
+ }], ctorParameters: () => [] });
490
+
491
+ class SaveSearchComponent extends BaseModal {
492
+ constructor() {
493
+ super(...arguments);
494
+ this.formGroup = model(new FormGroup({}));
495
+ this.formRows = [];
496
+ this.savedViewsStorage = inject(SavedViewsStorage);
497
+ this.uniqueNameValidator = () => (control) => {
498
+ const existingRecord = this.savedViewsStorage.getByName(this.data().tableName, control.value);
499
+ return !!existingRecord
500
+ ? { nameNotUnique: { errorText: { text: 'UpDevs.Table.SavedViews.NameNotUnique', isTranslated: false } } }
501
+ // eslint-disable-next-line no-null/no-null
502
+ : null;
503
+ };
504
+ }
505
+ ngOnInit() {
506
+ this.formRows = [
507
+ {
508
+ fields: [
509
+ {
510
+ name: 'name',
511
+ type: DynamicFieldType.Input,
512
+ colSize: { default: 12 },
513
+ label: { text: 'UpDevs.Table.SaveSearch.Name', isTranslated: false },
514
+ validators: [Validators.required, Validators.minLength(3), this.uniqueNameValidator()],
515
+ initValue: this.data().name
516
+ }
517
+ ]
518
+ },
519
+ {
520
+ fields: [
521
+ {
522
+ name: 'isDefault',
523
+ type: DynamicFieldType.Checkbox,
524
+ colSize: { default: 6 },
525
+ label: { text: 'UpDevs.Table.SaveSearch.IsDefault', isTranslated: false },
526
+ hint: { text: 'UpDevs.Table.SaveSearch.IsDefaultHint', isTranslated: false },
527
+ hintAsTooltip: true,
528
+ initValue: this.data().isDefault || false
529
+ }
530
+ ]
531
+ }
532
+ ];
533
+ }
534
+ cancel() {
535
+ this.modalRef().close();
536
+ }
537
+ save() {
538
+ const formValue = this.formGroup().value;
539
+ const data = { ...this.data(), name: formValue.name, isDefault: formValue.isDefault };
540
+ if (data.isDefault) {
541
+ this.savedViewsStorage.resetAllIsDefault(this.data().tableName);
542
+ }
543
+ this.savedViewsStorage.saveView(data);
544
+ this.modalRef().close();
545
+ }
546
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SaveSearchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
547
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: SaveSearchComponent, selector: "upd-save-search", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formGroup: "formGroupChange" }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table.SaveSearch'\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">{{ t('Title') }}</h5>\n </div>\n <div class=\"modal-body py-4\">\n <upd-form [rows]=\"formRows\" [hasActionsSection]=\"false\" [(formGroup)]=\"formGroup\"></upd-form>\n </div>\n <div class=\"modal-footer\">\n <upd-button colorStyle=\"secondary\" [isLink]=\"true\" (clicked)=\"cancel()\">\n {{ t('Cancel') }}\n </upd-button>\n <upd-button colorStyle=\"primary\" [iconModel]=\"{tablerIcon:'device-floppy'}\" (clicked)=\"save()\" [isDisabled]=\"!formGroup().valid\">\n {{ t('Save') }}\n </upd-button>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i3$1.FormComponent, selector: "upd-form", inputs: ["rows", "layout", "title", "hasActionsSection", "isCard", "isDisabled", "isLoading", "isSaving", "formData", "formGroup"], outputs: ["initialized", "dataLoaded", "submitted", "formDataChange", "formGroupChange"] }] }); }
548
+ }
549
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SaveSearchComponent, decorators: [{
550
+ type: Component,
551
+ args: [{ selector: 'upd-save-search', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table.SaveSearch'\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">{{ t('Title') }}</h5>\n </div>\n <div class=\"modal-body py-4\">\n <upd-form [rows]=\"formRows\" [hasActionsSection]=\"false\" [(formGroup)]=\"formGroup\"></upd-form>\n </div>\n <div class=\"modal-footer\">\n <upd-button colorStyle=\"secondary\" [isLink]=\"true\" (clicked)=\"cancel()\">\n {{ t('Cancel') }}\n </upd-button>\n <upd-button colorStyle=\"primary\" [iconModel]=\"{tablerIcon:'device-floppy'}\" (clicked)=\"save()\" [isDisabled]=\"!formGroup().valid\">\n {{ t('Save') }}\n </upd-button>\n </div>\n</ng-container>\n" }]
552
+ }] });
553
+
554
+ class FilterTools {
555
+ static convertToFilterItem(filters, operands) {
556
+ return filters.map(f => ({
557
+ name: f.column,
558
+ value: f.value,
559
+ operandConfig: operands[f.dataType].find(op => op.operand === f.operand)
560
+ }));
561
+ }
562
+ static convertToRequestFilter(filters, columns) {
563
+ return filters.map(af => {
564
+ const col = columns.find(c => c.name === af.name);
565
+ switch (col?.dataType) {
566
+ case DataTypeEnum.Boolean:
567
+ return new BooleanColumnFilter({
568
+ column: af.name,
569
+ value: af.value,
570
+ operand: !!af.operandConfig ? af.operandConfig.operand : undefined
571
+ });
572
+ case DataTypeEnum.Date:
573
+ return new DateColumnFilter({
574
+ column: af.name,
575
+ value: af.value,
576
+ operand: !!af.operandConfig ? af.operandConfig.operand : undefined
577
+ });
578
+ case DataTypeEnum.Number:
579
+ return new NumberColumnFilter({
580
+ column: af.name,
581
+ value: af.value,
582
+ operand: !!af.operandConfig ? af.operandConfig.operand : undefined
583
+ });
584
+ case DataTypeEnum.Guid:
585
+ return new GuidColumnFilter({
586
+ column: af.name,
587
+ value: af.value,
588
+ operand: !!af.operandConfig ? af.operandConfig.operand : undefined
589
+ });
590
+ default:
591
+ return new StringColumnFilter({
592
+ column: af.name,
593
+ value: af.value,
594
+ operand: !!af.operandConfig ? af.operandConfig.operand : undefined
595
+ });
596
+ }
597
+ });
598
+ }
599
+ }
600
+
601
+ /**
602
+ * Table constants.
603
+ */
604
+ class TableConstants {
605
+ /**
606
+ * Key to inject the default configuration.
607
+ */
608
+ static { this.defaultOptionsKey = 'upd-table-default-options'; }
609
+ /**
610
+ * Injection token for the default configuration.
611
+ */
612
+ static { this.defaultOptionsInjectionToken = new InjectionToken(TableConstants.defaultOptionsKey); }
613
+ }
614
+
615
+ class UpdTableConfigModel {
616
+ constructor(init) {
617
+ this.shouldLoadFieldsFromServer = false;
618
+ if (!!init) {
619
+ Object.assign(this, init);
620
+ }
621
+ }
622
+ }
623
+
624
+ class UpdTableConfigService {
625
+ constructor(layoutConfig) {
626
+ this.config = new UpdTableConfigModel(layoutConfig);
627
+ }
628
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableConfigService, deps: [{ token: TableConstants.defaultOptionsInjectionToken }], target: i0.ɵɵFactoryTarget.Injectable }); }
629
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableConfigService }); }
630
+ }
631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableConfigService, decorators: [{
632
+ type: Injectable
633
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
634
+ type: Inject,
635
+ args: [TableConstants.defaultOptionsInjectionToken]
636
+ }] }] });
637
+
638
+ class FilterRowComponent extends BaseComponent {
639
+ constructor() {
640
+ super(...arguments);
641
+ this.wrapperClasses = 'd-flex gap-2';
642
+ this.removed = new EventEmitter();
643
+ this.DataTypeEnum = DataTypeEnum;
644
+ this.activeFilters = model.required();
645
+ this.rowIndex = input.required();
646
+ this.columns = input.required();
647
+ this.isDisabled = input.required();
648
+ this.store = input();
649
+ this.currentFilter = input();
650
+ this.currentField = signal(undefined);
651
+ this.currentOperand = signal(undefined);
652
+ this.fieldsOptions = signal([]);
653
+ this.comparisonOperatorOptions = signal([]);
654
+ this.isValueSectionEnabled = signal(true);
655
+ this.currentOperands = [];
656
+ this.configService = inject(UpdTableConfigService);
657
+ this.filtersOperandsService = inject(FiltersOperandsService);
658
+ this.textService = inject(TextService);
659
+ }
660
+ get fieldType() {
661
+ return this.currentField()?.objectData || DataTypeEnum.String;
662
+ }
663
+ get selectedField() {
664
+ const currentFilter = this.currentFilter();
665
+ return !!currentFilter?.name
666
+ ? this.fieldsOptions().find(f => f.value === currentFilter.name)
667
+ : undefined;
668
+ }
669
+ get selectedOperand() {
670
+ const currentFilter = this.currentFilter();
671
+ return !!currentFilter?.name
672
+ ? this.comparisonOperatorOptions().find(co => co.value === currentFilter.operandConfig?.operand)
673
+ : undefined;
674
+ }
675
+ get selectedValue() {
676
+ const currentFilter = this.currentFilter();
677
+ return !!currentFilter?.name ? currentFilter.value : undefined;
678
+ }
679
+ ngOnInit() {
680
+ if (!!this.store() && this.configService.config.shouldLoadFieldsFromServer) {
681
+ this.store().getFilterableFields().subscribe(fields => this.fieldsOptions.set(fields.map(f => ({ value: f.name, text: f.description, objectData: f.type }))));
682
+ }
683
+ else {
684
+ this.fieldsOptions.set(this.columns().filter(c => !!c.title).map(c => ({ value: c.name, text: this.textService.getText(c.title), objectData: c.dataType })));
685
+ }
686
+ if (!!this.selectedField) {
687
+ if (!!this.selectedOperand) {
688
+ this.onSelectOperand(this.selectedOperand);
689
+ }
690
+ this.onSelectField(this.selectedField);
691
+ }
692
+ }
693
+ onSelectField(item) {
694
+ this.currentField.set(item);
695
+ const dataType = item?.objectData;
696
+ if (!!dataType) {
697
+ this.currentOperands = this.filtersOperandsService.getOperands(dataType);
698
+ this.comparisonOperatorOptions.set(this.currentOperands.map(o => ({ value: o.operand, text: this.textService.getText(o.text), listItem: { icon: o.icon } })));
699
+ }
700
+ else {
701
+ this.comparisonOperatorOptions.set([]);
702
+ }
703
+ this.activeFilters.update(curr => {
704
+ curr[this.rowIndex()].name = this.currentField()?.value;
705
+ return [...curr];
706
+ });
707
+ }
708
+ onSelectOperand(item) {
709
+ this.currentOperand.set(this.currentOperands.find(co => co.operand === item?.value));
710
+ this.isValueSectionEnabled.set(!!this.currentOperand()?.requiresValue);
711
+ this.activeFilters.update(curr => {
712
+ curr[this.rowIndex()].operandConfig = this.currentOperand();
713
+ return [...curr];
714
+ });
715
+ }
716
+ updateValue(value) {
717
+ this.activeFilters.update(curr => {
718
+ curr[this.rowIndex()].value = value;
719
+ return [...curr];
720
+ });
721
+ }
722
+ removeFilterItem() {
723
+ this.activeFilters.update(curr => {
724
+ curr.splice(this.rowIndex(), 1);
725
+ return [...curr];
726
+ });
727
+ this.removed.emit();
728
+ }
729
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FilterRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
730
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: FilterRowComponent, selector: "upd-filter-row", inputs: { activeFilters: { classPropertyName: "activeFilters", publicName: "activeFilters", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: true, transformFunction: null }, store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: false, transformFunction: null }, currentFilter: { classPropertyName: "currentFilter", publicName: "currentFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { removed: "removed", activeFilters: "activeFiltersChange" }, host: { properties: { "class": "this.wrapperClasses" } }, usesInheritance: true, ngImport: i0, template: "<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"fieldsOptions()\" (selectedItem)=\"onSelectField($event)\"\n [selected]=\"selectedField\">\n</upd-select>\n<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"comparisonOperatorOptions()\" (selectedItem)=\"onSelectOperand($event)\"\n [selected]=\"selectedOperand\">\n</upd-select>\n\n@if (isValueSectionEnabled()) {\n @switch (fieldType) {\n @case (DataTypeEnum.Number) {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"number\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n @case (DataTypeEnum.Date) {\n\n }\n @default {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"text\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n }\n} @else {\n <div class=\"w-100\">\n <input type=\"text\" class=\"form-control h-100\" disabled>\n </div>\n}\n\n<upd-button class=\"flex-shrink-1\" colorStyle=\"danger\" [isDisabled]=\"isDisabled()\" [isOutline]=\"true\" [isIcon]=\"true\"\n [iconModel]=\"{tablerIcon:'x'}\" (clicked)=\"removeFilterItem()\"></upd-button>\n", styles: [""], dependencies: [{ kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i5.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "maxLength", "isPlainText", "isReadOnly", "isLoading", "isRound", "isFlush", "isInputGroupFlat", "isPrependButton", "isAppendButton", "isFloating", "loaderPosition", "prependIconModel", "appendIconModel", "isValidationStatusLight", "layout"], outputs: ["valueChange", "blurred", "keyDown", "keyDownEsc", "keyUpEnter"] }, { kind: "component", type: i3$2.SelectComponent, selector: "upd-select", inputs: ["useSystemStyle", "shouldShowClearButton", "isCompact", "selected"], outputs: ["selectedItem"] }] }); }
731
+ }
732
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FilterRowComponent, decorators: [{
733
+ type: Component,
734
+ args: [{ selector: 'upd-filter-row', template: "<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"fieldsOptions()\" (selectedItem)=\"onSelectField($event)\"\n [selected]=\"selectedField\">\n</upd-select>\n<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"comparisonOperatorOptions()\" (selectedItem)=\"onSelectOperand($event)\"\n [selected]=\"selectedOperand\">\n</upd-select>\n\n@if (isValueSectionEnabled()) {\n @switch (fieldType) {\n @case (DataTypeEnum.Number) {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"number\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n @case (DataTypeEnum.Date) {\n\n }\n @default {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"text\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n }\n} @else {\n <div class=\"w-100\">\n <input type=\"text\" class=\"form-control h-100\" disabled>\n </div>\n}\n\n<upd-button class=\"flex-shrink-1\" colorStyle=\"danger\" [isDisabled]=\"isDisabled()\" [isOutline]=\"true\" [isIcon]=\"true\"\n [iconModel]=\"{tablerIcon:'x'}\" (clicked)=\"removeFilterItem()\"></upd-button>\n" }]
735
+ }], propDecorators: { wrapperClasses: [{
736
+ type: HostBinding,
737
+ args: ['class']
738
+ }], removed: [{
739
+ type: Output
740
+ }] } });
741
+
742
+ class SearchSectionComponent extends BaseComponent {
743
+ constructor() {
744
+ super();
745
+ this.wrapperClass = 'card-body border-bottom py-3 d-flex flex-column gap-2';
746
+ this.searchRequest = model.required();
747
+ this.hasChanges = model.required();
748
+ this.columns = input.required();
749
+ this.isSearching = input.required();
750
+ this.searchRequestSubject = input.required();
751
+ this.config = input.required();
752
+ this.actionsTpl = input();
753
+ this.activeFilters = signal([]);
754
+ this.isFilterSectionOpen = signal(false);
755
+ this.canApplyFilters = computed(() => this.activeFilters().length > 0
756
+ && this.activeFilters().every(af => !!af.name && !!af.operandConfig?.operand && (!af.operandConfig?.requiresValue || !!af.value)));
757
+ this.canPerformActions = computed(() => this.canApplyFilters() && !this.isSearching());
758
+ this.badgeConfig = computed(() => (this.searchRequest().filters?.length || 0) > 0
759
+ ? ({
760
+ isNotification: true,
761
+ isPill: true,
762
+ bgColor: 'primary-lt',
763
+ text: { text: this.searchRequest().filters.length.toString(), isTranslated: true }
764
+ })
765
+ : undefined);
766
+ this.filterSectionBtnColor = computed(() => this.isFilterSectionOpen() ? 'primary' : undefined);
767
+ this.searchSubject = new Subject();
768
+ this.filtersOperandsService = inject(FiltersOperandsService);
769
+ effect(() => {
770
+ if ((this.searchRequest().filters?.length || 0) > 0) {
771
+ this.activeFilters.set([...FilterTools.convertToFilterItem(this.searchRequest().filters || [], this.filtersOperandsService.getAllOperands())]);
772
+ }
773
+ else {
774
+ this.activeFilters.set([]);
775
+ this.isFilterSectionOpen.set(false);
776
+ }
777
+ }, { allowSignalWrites: true });
778
+ }
779
+ ngOnInit() {
780
+ const searchSub = this.searchSubject
781
+ .pipe(distinctUntilChanged(), debounceTime(this.config().searchInputDebounceTime))
782
+ .subscribe(term => this.searchRequestSubject().next({
783
+ ...this.searchRequest(),
784
+ description: term
785
+ }));
786
+ this.addSubscriptions(searchSub);
787
+ }
788
+ search() {
789
+ this.searchRequestSubject().next({
790
+ ...this.searchRequest(),
791
+ filters: FilterTools.convertToRequestFilter(this.activeFilters(), this.config().columns)
792
+ });
793
+ }
794
+ toggleFilterSection() {
795
+ if (this.activeFilters().length === 0) {
796
+ this.addEmptyFilterRow();
797
+ }
798
+ this.isFilterSectionOpen.update(isOpen => !isOpen);
799
+ }
800
+ onRowRemoved() {
801
+ if (this.activeFilters().length === 0) {
802
+ this.isFilterSectionOpen.set(false);
803
+ }
804
+ this.search();
805
+ }
806
+ addEmptyFilterRow() {
807
+ this.activeFilters.update(curr => {
808
+ curr.push({});
809
+ return [...curr];
810
+ });
811
+ }
812
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SearchSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
813
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: SearchSectionComponent, selector: "upd-search-section", inputs: { searchRequest: { classPropertyName: "searchRequest", publicName: "searchRequest", isSignal: true, isRequired: true, transformFunction: null }, hasChanges: { classPropertyName: "hasChanges", publicName: "hasChanges", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, isSearching: { classPropertyName: "isSearching", publicName: "isSearching", isSignal: true, isRequired: true, transformFunction: null }, searchRequestSubject: { classPropertyName: "searchRequestSubject", publicName: "searchRequestSubject", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, actionsTpl: { classPropertyName: "actionsTpl", publicName: "actionsTpl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchRequest: "searchRequestChange", hasChanges: "hasChangesChange" }, host: { properties: { "class": "this.wrapperClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n @if (!!actionsTpl()) {\n <ng-template [ngTemplateOutlet]=\"actionsTpl()!\"></ng-template>\n }\n\n <div class=\"d-flex align-items-center gap-2\">\n <upd-input wrapperClasses=\"w-100\" [placeholder]=\"{text:'UpDevs.Table.Search', isTranslated:false}\" [isAppendButton]=\"true\"\n (valueChange)=\"searchSubject.next($event)\" [value]=\"searchRequest().description\">\n <ng-template updInputAppend>\n <upd-button [isIcon]=\"true\" [colorStyle]=\"filterSectionBtnColor()\" (clicked)=\"toggleFilterSection()\"\n [badgeConfig]=\"badgeConfig()\">\n <upd-icon [tablerIcon]=\"isFilterSectionOpen() ? 'filter-up' : 'filter-down'\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n </ng-template>\n </upd-input>\n </div>\n\n @if (isFilterSectionOpen()) {\n @for (row of activeFilters(); track row; let i = $index) {\n <upd-filter-row [store]=\"config().store\" [currentFilter]=\"row\" [(activeFilters)]=\"activeFilters\" [columns]=\"columns()\"\n [rowIndex]=\"i\" (removed)=\"onRowRemoved()\" [isDisabled]=\"isSearching()\">\n </upd-filter-row>\n }\n\n <div class=\"ms-auto d-flex gap-2\">\n <upd-button customClasses=\"gap-2\" colorStyle=\"primary\" [isOutline]=\"true\" (clicked)=\"addEmptyFilterRow()\"\n [isDisabled]=\"!canPerformActions()\">\n <upd-icon tablerIcon=\"plus\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('AddNewFilter') }}\n </upd-button>\n <upd-button customClasses=\"gap-2\" colorStyle=\"success\" [isDisabled]=\"!canPerformActions()\" (clicked)=\"search()\">\n <upd-icon tablerIcon=\"checks\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ApplyFilters') }}\n </upd-button>\n </div>\n }\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i5.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "maxLength", "isPlainText", "isReadOnly", "isLoading", "isRound", "isFlush", "isInputGroupFlat", "isPrependButton", "isAppendButton", "isFloating", "loaderPosition", "prependIconModel", "appendIconModel", "isValidationStatusLight", "layout"], outputs: ["valueChange", "blurred", "keyDown", "keyDownEsc", "keyUpEnter"] }, { kind: "directive", type: i5.InputAppendDirective, selector: "ng-template[updInputAppend]" }, { kind: "component", type: FilterRowComponent, selector: "upd-filter-row", inputs: ["activeFilters", "rowIndex", "columns", "isDisabled", "store", "currentFilter"], outputs: ["removed", "activeFiltersChange"] }] }); }
814
+ }
815
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SearchSectionComponent, decorators: [{
816
+ type: Component,
817
+ args: [{ selector: 'upd-search-section', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n @if (!!actionsTpl()) {\n <ng-template [ngTemplateOutlet]=\"actionsTpl()!\"></ng-template>\n }\n\n <div class=\"d-flex align-items-center gap-2\">\n <upd-input wrapperClasses=\"w-100\" [placeholder]=\"{text:'UpDevs.Table.Search', isTranslated:false}\" [isAppendButton]=\"true\"\n (valueChange)=\"searchSubject.next($event)\" [value]=\"searchRequest().description\">\n <ng-template updInputAppend>\n <upd-button [isIcon]=\"true\" [colorStyle]=\"filterSectionBtnColor()\" (clicked)=\"toggleFilterSection()\"\n [badgeConfig]=\"badgeConfig()\">\n <upd-icon [tablerIcon]=\"isFilterSectionOpen() ? 'filter-up' : 'filter-down'\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n </ng-template>\n </upd-input>\n </div>\n\n @if (isFilterSectionOpen()) {\n @for (row of activeFilters(); track row; let i = $index) {\n <upd-filter-row [store]=\"config().store\" [currentFilter]=\"row\" [(activeFilters)]=\"activeFilters\" [columns]=\"columns()\"\n [rowIndex]=\"i\" (removed)=\"onRowRemoved()\" [isDisabled]=\"isSearching()\">\n </upd-filter-row>\n }\n\n <div class=\"ms-auto d-flex gap-2\">\n <upd-button customClasses=\"gap-2\" colorStyle=\"primary\" [isOutline]=\"true\" (clicked)=\"addEmptyFilterRow()\"\n [isDisabled]=\"!canPerformActions()\">\n <upd-icon tablerIcon=\"plus\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('AddNewFilter') }}\n </upd-button>\n <upd-button customClasses=\"gap-2\" colorStyle=\"success\" [isDisabled]=\"!canPerformActions()\" (clicked)=\"search()\">\n <upd-icon tablerIcon=\"checks\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ApplyFilters') }}\n </upd-button>\n </div>\n }\n</ng-container>\n" }]
818
+ }], ctorParameters: () => [], propDecorators: { wrapperClass: [{
819
+ type: HostBinding,
820
+ args: ['class']
821
+ }] } });
822
+
823
+ var Utils = Tools.Utils;
824
+ class TableComponent extends BaseComponent {
825
+ get numberOfColumns() {
826
+ return this.columns().length + (this.configModel().hasCheckboxColumn ? 1 : 0) + (!!this.pendingWidthColClass ? 1 : 0);
827
+ }
828
+ get hasWidth() {
829
+ return this.columns().some(rec => !!rec.width);
830
+ }
831
+ get pendingWidthColClass() {
832
+ if (!this.hasWidth || this.isWidthInPixels) {
833
+ return '';
834
+ }
835
+ const isGrid = this.columns().some(rec => !!rec.width?.gridColumn);
836
+ const total = isGrid ? 12 : 100;
837
+ const remainingSize = total - this.columns().reduce((acc, item) => acc + item.widthSize, 0);
838
+ return remainingSize > 0 ? `${(isGrid ? 'col' : 'w')}-${remainingSize}` : '';
839
+ }
840
+ get isWidthInPixels() {
841
+ return this.columns().some(rec => !!rec.width?.pixels);
842
+ }
843
+ get isRemote() {
844
+ return !!this.configModel().store;
845
+ }
846
+ get store() {
847
+ return this.configModel().store;
848
+ }
849
+ constructor() {
850
+ super();
851
+ this.savedViewsRef = viewChild('savedViewsBtn', { read: ElementRef });
852
+ this.config = model.required();
853
+ this.isSearching = signal(false);
854
+ this.selectedItems = computed(() => this.selectionModel().selected());
855
+ this.activeSavedView = signal(undefined);
856
+ this.isMainCheckboxChecked = false;
857
+ this.isMainCheckboxIndeterminate = false;
858
+ this.isSavedViewsDropdownOpen = false;
859
+ this.searchRequest = model({});
860
+ this.activeFilters = model([]);
861
+ this.currentPage = model(1);
862
+ this.pageSize = model(0);
863
+ this.hasSearchChanged = signal(false);
864
+ this.totalRecords = signal(0);
865
+ this.configModel = computed(() => new TableConfigModel(this.config()));
866
+ this.data = computed(() => this.configModel().data.length > 0 ? this.configModel().data : this.currentData());
867
+ this.selectionModel = computed(() => new SelectionModel(this.configModel().getIdFunction));
868
+ this.currentSorting = signal(undefined);
869
+ this.hiddenColumns = computed(() => this.configModel().canManageColumns ? this.configModel().columns.filter(c => c.isHidden).length : 0);
870
+ this.columns = signal([]);
871
+ this.searchRequestSubject = new Subject();
872
+ this.textService = inject(TextService);
873
+ this.savedViewsOptions = computed(() => {
874
+ const allSavedViewsOptions = [];
875
+ this.allSavedViews().forEach(sv => allSavedViewsOptions.push(this.getSavedViewOption(sv)));
876
+ return allSavedViewsOptions;
877
+ });
878
+ this.shouldForceSearch = false;
879
+ this.columnsBackup = [];
880
+ this.currentData = signal([]);
881
+ this.currentFavoriteButtons = computed(() => this.favoriteButtons);
882
+ this.smallSizeSignal = signal('small');
883
+ this.allSavedViews = computed(() => this.savedViewsStorage.getAll(this.configModel().name)());
884
+ this.favoriteButtons = [];
885
+ this.serverResponseService = inject(ServerResponseService);
886
+ this.savedViewsStorage = inject(SavedViewsStorage);
887
+ this.modalService = inject(ModalService);
888
+ this.modalAlertService = inject(ModalAlertService);
889
+ effect(() => {
890
+ if (this.data().length > 0 && this.configModel().data.length > 0) {
891
+ this.setupPreSelected();
892
+ }
893
+ if (this.selectedItems().length > 0) {
894
+ if (this.selectedItems().length !== this.data().length) {
895
+ this.isMainCheckboxChecked = false;
896
+ this.isMainCheckboxIndeterminate = true;
897
+ }
898
+ else {
899
+ this.isMainCheckboxIndeterminate = false;
900
+ this.isMainCheckboxChecked = true;
901
+ }
902
+ }
903
+ else {
904
+ this.isMainCheckboxChecked = false;
905
+ this.isMainCheckboxIndeterminate = false;
906
+ }
907
+ });
908
+ }
909
+ ngOnInit() {
910
+ this.columnsBackup = [...this.config().columns];
911
+ const searchSubjectSub = this.searchRequestSubject
912
+ .pipe(distinctUntilChanged((prev, curr) => !this.shouldForceSearch || Utils.areEqual(prev, curr)), tap((request) => {
913
+ this.isSearching.set(true);
914
+ this.currentData.set([]);
915
+ this.searchRequest.set(request);
916
+ if ((request.filters?.length || 0) > 0
917
+ || (request.description || '').length > 0
918
+ || (request.sortings?.length || 0) > 0) {
919
+ this.hasSearchChanged.set(true);
920
+ }
921
+ }), switchMap(() => this.store.search(this.searchRequest()).pipe(catchError(() => of()) // Already handled by the ServerResponseService.
922
+ )), finalize(() => this.shouldForceSearch = false))
923
+ .subscribe(resp => this.setupSearchResults(resp));
924
+ const serverResponseSub = this.serverResponseService.onError.subscribe(error => {
925
+ if (!!error) {
926
+ this.isSearching.set(false);
927
+ }
928
+ });
929
+ if (this.configModel().shouldAutoSearch && this.isRemote) {
930
+ this.shouldForceSearch = true;
931
+ this.searchRequestSubject.next({});
932
+ }
933
+ this.updateColumns(this.configModel().columns);
934
+ this.addSubscriptions(searchSubjectSub, serverResponseSub);
935
+ }
936
+ toggleAllSelection(isChecked) {
937
+ if (isChecked) {
938
+ this.selectionModel().select(...this.currentData());
939
+ }
940
+ else {
941
+ this.selectionModel().clearSelection();
942
+ }
943
+ }
944
+ toggleItemSelection(record) {
945
+ if (this.selectionModel().isSelected(record)) {
946
+ this.selectionModel().deselect(record);
947
+ }
948
+ else {
949
+ this.selectionModel().select(record);
950
+ }
951
+ }
952
+ canSortColumn(columnName) {
953
+ return this.getColumnByName(columnName).allowSort;
954
+ }
955
+ sortByColumn(columnName) {
956
+ if (!this.currentSorting()) {
957
+ this.currentSorting.set(new ColumnSort({ column: columnName }));
958
+ }
959
+ else {
960
+ this.currentSorting.set(new ColumnSort({
961
+ column: columnName,
962
+ direction: this.currentSorting().column === columnName
963
+ ? (this.currentSorting().direction === SortDirectionEnum.Asc ? SortDirectionEnum.Desc : SortDirectionEnum.Asc)
964
+ : SortDirectionEnum.Asc
965
+ }));
966
+ }
967
+ if (this.isRemote) {
968
+ this.searchRequest.set({
969
+ ...this.searchRequest(),
970
+ sortings: [this.currentSorting()]
971
+ });
972
+ this.searchRequestSubject.next(this.searchRequest());
973
+ }
974
+ else {
975
+ const col = this.getColumnByName(columnName);
976
+ // TODO: local sort
977
+ }
978
+ }
979
+ getSortingIcon(columnName) {
980
+ return !!this.currentSorting() && this.currentSorting().column === columnName
981
+ ? (this.currentSorting().direction === SortDirectionEnum.Asc ? 'sort-ascending' : 'sort-descending')
982
+ : 'arrows-sort';
983
+ }
984
+ onPageSettingsChanged() {
985
+ this.searchRequest.set({
986
+ ...this.searchRequest(),
987
+ pageSize: this.pageSize(),
988
+ pageIndex: this.currentPage()
989
+ });
990
+ this.searchRequestSubject.next(this.searchRequest());
991
+ }
992
+ getRecordId(record) {
993
+ return this.configModel().getIdFunction(record);
994
+ }
995
+ openColumnsManagerModal() {
996
+ const ref = this.modalService.open(undefined, {
997
+ bodyContentType: ColumnsManagerComponent,
998
+ showCloseButton: false,
999
+ showCancelButton: true,
1000
+ data: this.config(),
1001
+ isTextCentered: false,
1002
+ actionButtons: [
1003
+ new ButtonModel({
1004
+ text: signal({ text: 'UpDevs.Table.ColumnsManager.Apply', isTranslated: false }),
1005
+ colorStyle: signal('primary'),
1006
+ iconModel: signal({ tablerIcon: 'checks' }),
1007
+ clickFunction: () => ref.close()
1008
+ })
1009
+ ]
1010
+ });
1011
+ ref.afterClose = () => {
1012
+ const result = ref.getBodyInstance()?.columns();
1013
+ if (!!result) {
1014
+ const previousVisibleColumnsOrder = this.columns().map(c => c.name);
1015
+ const visibleColumnsNames = result.find(c => c.name === 'visible')?.items().map(i => i.name) || [];
1016
+ const newColumns = [];
1017
+ this.config.update(config => {
1018
+ visibleColumnsNames.forEach(name => {
1019
+ const col = config.columns.find(c => c.name === name);
1020
+ col.isHidden = false;
1021
+ newColumns.push(col);
1022
+ });
1023
+ config.columns.forEach(c => {
1024
+ if (!visibleColumnsNames.includes(c.name)) {
1025
+ c.isHidden = true;
1026
+ newColumns.push(c);
1027
+ }
1028
+ });
1029
+ return { ...config, columns: [...newColumns] };
1030
+ });
1031
+ this.updateColumns(newColumns);
1032
+ const newVisibleColumnsOrder = newColumns.map(c => c.name);
1033
+ if (previousVisibleColumnsOrder.length !== newVisibleColumnsOrder.length
1034
+ || !previousVisibleColumnsOrder.every((v, i) => v === newVisibleColumnsOrder[i])) {
1035
+ this.hasSearchChanged.set(true);
1036
+ }
1037
+ }
1038
+ };
1039
+ }
1040
+ openSaveSearchModal(data) {
1041
+ data = data || {
1042
+ tableName: this.configModel().name,
1043
+ request: this.searchRequest(),
1044
+ columns: this.configModel().columns
1045
+ };
1046
+ this.modalService.open(SaveSearchComponent, { showCloseButton: false, data });
1047
+ }
1048
+ selectSavedView(item) {
1049
+ const savedView = this.savedViewsStorage.getById(this.configModel().name, item.id)();
1050
+ this.isSavedViewsDropdownOpen = false;
1051
+ if (!!savedView) {
1052
+ this.updateColumns(savedView.columns);
1053
+ this.config.update(curr => {
1054
+ curr.columns = savedView.columns;
1055
+ return { ...curr };
1056
+ });
1057
+ this.activeSavedView.set(savedView);
1058
+ this.searchRequestSubject.next({ ...savedView.request });
1059
+ }
1060
+ }
1061
+ resetViewState() {
1062
+ this.activeSavedView.set(undefined);
1063
+ this.updateColumns(this.columnsBackup);
1064
+ this.config.update(curr => {
1065
+ curr.columns = this.columnsBackup;
1066
+ return { ...curr };
1067
+ });
1068
+ this.searchRequestSubject.next({});
1069
+ }
1070
+ reload() {
1071
+ this.shouldForceSearch = true;
1072
+ this.searchRequestSubject.next({});
1073
+ }
1074
+ updateColumns(columns) {
1075
+ this.columns.set(columns.filter(c => !c.isHidden).map(c => new BaseColumnModel(c.type, { ...c })));
1076
+ }
1077
+ getColumnByName(columnName) {
1078
+ const col = this.columns().find(c => c.name === columnName);
1079
+ if (!col) {
1080
+ throw Error('Tried accessing non existing column');
1081
+ }
1082
+ return col;
1083
+ }
1084
+ setupPreSelected() {
1085
+ this.configModel().preSelectedItems.forEach(item => {
1086
+ const id = this.getRecordId(item);
1087
+ if (this.data().find(d => this.getRecordId(d) === id) && !this.selectionModel().isSelected(item)) {
1088
+ this.selectionModel().select(item);
1089
+ }
1090
+ });
1091
+ }
1092
+ setupSearchResults(resp) {
1093
+ this.isSearching.set(false);
1094
+ this.currentData.set(resp.records);
1095
+ this.totalRecords.set(resp.totalRecords || 0);
1096
+ this.currentPage.set(resp.pageIndex || 0);
1097
+ this.pageSize.set(resp.pageSize || 0);
1098
+ this.setupPreSelected();
1099
+ }
1100
+ getActionButtons(currentFavoriteButtons, savedView) {
1101
+ return [
1102
+ new ButtonModel({
1103
+ isIcon: signal(true),
1104
+ isGhost: signal(true),
1105
+ colorStyle: signal('primary'),
1106
+ size: this.smallSizeSignal,
1107
+ title: signal({ text: 'UpDevs.Table.SavedViews.MarkAsDefault', isTranslated: false }),
1108
+ isActive: signal(savedView.isDefault || false),
1109
+ iconModel: signal({ tablerIcon: 'heart' }),
1110
+ clickFunction: (evt) => {
1111
+ const btnModel = evt.data;
1112
+ const isButtonActive = btnModel.button.isActive();
1113
+ if (!isButtonActive) {
1114
+ this.savedViewsStorage.resetAllIsDefault(this.configModel().name);
1115
+ }
1116
+ savedView.isDefault = !isButtonActive;
1117
+ currentFavoriteButtons().forEach(cfb => cfb.isActive.set(false));
1118
+ btnModel.button.isActive.set(!isButtonActive);
1119
+ this.savedViewsStorage.saveView(savedView);
1120
+ }
1121
+ }),
1122
+ new ButtonModel({
1123
+ isIcon: signal(true),
1124
+ isGhost: signal(true),
1125
+ colorStyle: signal('secondary'),
1126
+ size: this.smallSizeSignal,
1127
+ title: signal({ text: 'UpDevs.Table.SavedViews.Duplicate', isTranslated: false }),
1128
+ iconModel: signal({ tablerIcon: 'copy' }),
1129
+ clickFunction: () => {
1130
+ const duplicateView = {
1131
+ ...savedView,
1132
+ id: Tools.Guid.generate(),
1133
+ name: savedView.name +
1134
+ ` (${this.textService.getText({ text: 'UpDevs.Table.SavedViews.DuplicateSuffix', isTranslated: false })})`
1135
+ };
1136
+ this.openSaveSearchModal(duplicateView);
1137
+ }
1138
+ }),
1139
+ new ButtonModel({
1140
+ isIcon: signal(true),
1141
+ isGhost: signal(true),
1142
+ colorStyle: signal('secondary'),
1143
+ size: this.smallSizeSignal,
1144
+ title: signal({ text: 'UpDevs.Table.SavedViews.Edit', isTranslated: false }),
1145
+ iconModel: signal({ tablerIcon: 'edit' }),
1146
+ clickFunction: () => this.openSaveSearchModal(savedView)
1147
+ }),
1148
+ new ButtonModel({
1149
+ isIcon: signal(true),
1150
+ isGhost: signal(true),
1151
+ colorStyle: signal('danger'),
1152
+ size: this.smallSizeSignal,
1153
+ title: signal({ text: 'UpDevs.Table.SavedViews.Remove', isTranslated: false }),
1154
+ iconModel: signal({ tablerIcon: 'x' }),
1155
+ clickFunction: () => {
1156
+ const title = this.textService.getText({ text: 'UpDevs.Table.SavedViews.ConfirmRemove', isTranslated: false }, { view: savedView.name });
1157
+ this.modalAlertService.showConfirm({ text: title, isTranslated: true }).subscribe(isConfirmed => {
1158
+ if (isConfirmed) {
1159
+ this.savedViewsStorage.removeViews(this.configModel().name, savedView.id);
1160
+ }
1161
+ });
1162
+ }
1163
+ })
1164
+ ];
1165
+ }
1166
+ getSavedViewOption(savedView) {
1167
+ const actionButtons = this.getActionButtons(this.currentFavoriteButtons, savedView);
1168
+ this.favoriteButtons.push(actionButtons.find(ab => ab.iconModel?.().tablerIcon === 'heart'));
1169
+ return {
1170
+ id: savedView.id,
1171
+ type: 'with-toolbar',
1172
+ text: { text: savedView.name, isTranslated: true },
1173
+ toolbarType: 'spaced',
1174
+ isActive: this.activeSavedView()?.id === savedView.id,
1175
+ actionButtons
1176
+ };
1177
+ }
1178
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1179
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: TableComponent, selector: "upd-table", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, searchRequest: { classPropertyName: "searchRequest", publicName: "searchRequest", isSignal: true, isRequired: false, transformFunction: null }, activeFilters: { classPropertyName: "activeFilters", publicName: "activeFilters", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { config: "configChange", searchRequest: "searchRequestChange", activeFilters: "activeFiltersChange", currentPage: "currentPageChange", pageSize: "pageSizeChange" }, viewQueries: [{ propertyName: "savedViewsRef", first: true, predicate: ["savedViewsBtn"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n <div class=\"card\">\n @if (!!configModel().title || !configModel().canSearch) {\n <div class=\"card-header\">\n @if (!!configModel().title) {\n <h3 class=\"card-title\">{{ textService.getText(configModel().title) }}</h3>\n }\n <ng-template [ngTemplateOutlet]=\"actionsTpl\"></ng-template>\n </div>\n }\n\n @if (configModel().customActions.length > 0) {\n <div class=\"card-body py-3 d-flex flex-column gap-2\">\n <div class=\"ms-auto d-flex gap-2\">\n @for (btn of configModel().customActions; track btn) {\n <upd-button customClasses=\"gap-2\" [model]=\"btn\"></upd-button>\n }\n </div>\n </div>\n }\n\n @if (configModel().canSearch) {\n <upd-search-section [actionsTpl]=\"!configModel().title ? actionsTpl : undefined\" [isSearching]=\"isSearching()\"\n [(searchRequest)]=\"searchRequest\" [searchRequestSubject]=\"searchRequestSubject\" [config]=\"configModel()\"\n [(hasChanges)]=\"hasSearchChanged\" [columns]=\"columns()\">\n </upd-search-section>\n }\n\n <div [class.table-responsive]=\"configModel().isResponsive\">\n <!-- TODO: implement pixel sized table -->\n <table class=\"table card-table table-vcenter table-nowrap\" [class.fixed]=\"hasWidth\"\n [class.pixel-sized]=\"isWidthInPixels\">\n <thead [class.sticky-top]=\"configModel().hasStickyHeader\">\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <th class=\"checkbox-selector\">\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleAllSelection($event)\"\n [(isChecked)]=\"isMainCheckboxChecked\"\n [(isIndeterminate)]=\"isMainCheckboxIndeterminate\"></upd-checkbox>\n </th>\n }\n\n @for (col of columns(); track col) {\n <th [ngClass]=\"col.widthClass\" [style.width.px]=\"col.pixelsSize\">\n {{ textService.getText(col.title) }}\n @if (canSortColumn(col.name)) {\n <upd-icon [tablerIcon]=\"getSortingIcon(col.name)\" tablerIconWeight=\"bold\" colorClass=\"text-body-tertiary\"\n [tablerIconSize]=\"16\" (click)=\"sortByColumn(col.name)\">\n </upd-icon>\n }\n </th>\n }\n\n @if (!!pendingWidthColClass) {\n <th [ngClass]=\"pendingWidthColClass\"></th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSearching()) {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <h1 class=\"text-body-tertiary\">{{ t('Loading') }}...</h1>\n <div class=\"progress progress-sm w-25\">\n <div class=\"progress-bar progress-bar-indeterminate bg-body-tertiary\"></div>\n </div>\n </div>\n </td>\n </tr>\n } @else {\n @for (record of data(); track record) {\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <td>\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleItemSelection(record)\"\n [isChecked]=\"selectionModel().isSelected(record)\"></upd-checkbox>\n </td>\n }\n\n @for (col of columns(); track col) {\n <td>\n <ng-container updTableColumn [record]=\"record\" [config]=\"col\"></ng-container>\n </td>\n }\n\n @if (!!pendingWidthColClass) {\n <td></td>\n }\n </tr>\n } @empty {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <p class=\"empty-title\">{{ t('NoRecordsFoundTitle') }}</p>\n <p class=\"empty-subtitle text-secondary\">{{ t('NoRecordsFoundSubtitle') }}</p>\n </div>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n <upd-paginator wrapperClasses=\"card-footer\" [shouldDisplayPreviousText]=\"false\" [shouldDisplayNextText]=\"false\"\n [(pageSize)]=\"pageSize\" [shouldDisplayFirstText]=\"false\" [shouldDisplayLastText]=\"false\"\n [(currentPage)]=\"currentPage\"\n [totalRecords]=\"totalRecords()\" (changed)=\"onPageSettingsChanged()\">\n </upd-paginator>\n </div>\n\n <ng-template #actionsTpl>\n <div class=\"ms-auto d-flex gap-2\">\n @if (!!activeSavedView()) {\n @if (activeSavedView()!.isDefault) {\n <div class=\"ribbon ribbon-top ribbon-start\">\n <upd-icon tablerIcon=\"heart\" [tablerIconSize]=\"20\"></upd-icon>\n </div>\n }\n <div class=\"tag align-self-center py-3 text-primary bg-primary-lt border-primary\"\n updPopover=\"{{ t('CurrentSavedView') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"list-details\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ activeSavedView()!.name }}</span>\n </div>\n }\n @if (hiddenColumns() > 0) {\n <div class=\"tag align-self-center py-3 text-orange bg-orange-lt border-orange\"\n updPopover=\"{{ t('HiddenColumnsTooltip') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"eye-off\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ hiddenColumns() }}</span>\n </div>\n }\n @if (!!activeSavedView() || hiddenColumns() > 0) {\n <upd-button (clicked)=\"resetViewState()\" colorStyle=\"danger\" updPopover=\"{{ t('ResetView') }}\"\n [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\" [isOutline]=\"true\">\n <upd-icon tablerIcon=\"restore\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canSaveViews) {\n <upd-button customClasses=\"gap-2\" [isDisabled]=\"!hasSearchChanged()\" (clicked)=\"openSaveSearchModal()\"\n updPopover=\"{{ t('SaveCurrentView') }}\" [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\">\n <upd-icon tablerIcon=\"device-floppy\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canManageColumns) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"openColumnsManagerModal()\">\n <upd-icon tablerIcon=\"columns\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ColumnsManagerButton') }}\n </upd-button>\n }\n @if (configModel().canSaveViews || configModel().canLoadSavedViews) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"isSavedViewsDropdownOpen = true\" #savedViewsBtn>\n <upd-icon tablerIcon=\"folders\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('SavedViews.ButtonTitle') }}\n </upd-button>\n <upd-dropdown wrapperClasses=\"overflow-x-hidden mt-1\" [isOpen]=\"isSavedViewsDropdownOpen\"\n [dropdownReference]=\"savedViewsRef()\" [items]=\"savedViewsOptions()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isSavedViewsDropdownOpen = $event\" [minWidth]=\"350\" (selectedItem)=\"selectSavedView($event)\">\n @if (savedViewsOptions().length < 1) {\n <span class=\"m-2\">{{ t('NoSavedViews') }}</span>\n }\n </upd-dropdown>\n }\n </div>\n </ng-template>\n</ng-container>\n", styles: [".fixed{table-layout:fixed!important}.fixed td,.fixed th{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.checkbox-selector{width:52px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i5$1.PaginatorComponent, selector: "upd-paginator", inputs: ["startPageIndex", "currentPage", "wrapperClasses", "availablePageSizes", "defaultInitPageSize", "pageSize", "shouldDisplayFirstIcon", "shouldDisplayFirstText", "shouldDisplayPreviousIcon", "shouldDisplayPreviousText", "shouldDisplayNextIcon", "shouldDisplayNextText", "shouldDisplayLastIcon", "shouldDisplayLastText", "previousDescription", "nextDescription", "totalRecords"], outputs: ["changed", "currentPageChange", "pageSizeChange"] }, { kind: "component", type: i6.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline", "isSwitch", "isIndeterminate"], outputs: ["changed", "isCheckedChange", "isIndeterminateChange"] }, { kind: "component", type: i7.DropdownComponent, selector: "upd-dropdown", inputs: ["items", "header", "isOpen", "shouldCloseOnOutsideClick", "arrowType", "wrapperClasses", "elementsExcludedFromOutsideClick", "minHeight", "maxHeight", "minWidth", "maxWidth", "dropdownReference", "dropdownReferencePosition", "textOverflowStrategy"], outputs: ["isOpenChange", "selectedItem", "checkboxChanged"] }, { kind: "directive", type: i8.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }, { kind: "component", type: SearchSectionComponent, selector: "upd-search-section", inputs: ["searchRequest", "hasChanges", "columns", "isSearching", "searchRequestSubject", "config", "actionsTpl"], outputs: ["searchRequestChange", "hasChangesChange"] }, { kind: "directive", type: TableColumnDirective, selector: "[updTableColumn]", inputs: ["record", "config"] }] }); }
1180
+ }
1181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableComponent, decorators: [{
1182
+ type: Component,
1183
+ args: [{ selector: 'upd-table', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n <div class=\"card\">\n @if (!!configModel().title || !configModel().canSearch) {\n <div class=\"card-header\">\n @if (!!configModel().title) {\n <h3 class=\"card-title\">{{ textService.getText(configModel().title) }}</h3>\n }\n <ng-template [ngTemplateOutlet]=\"actionsTpl\"></ng-template>\n </div>\n }\n\n @if (configModel().customActions.length > 0) {\n <div class=\"card-body py-3 d-flex flex-column gap-2\">\n <div class=\"ms-auto d-flex gap-2\">\n @for (btn of configModel().customActions; track btn) {\n <upd-button customClasses=\"gap-2\" [model]=\"btn\"></upd-button>\n }\n </div>\n </div>\n }\n\n @if (configModel().canSearch) {\n <upd-search-section [actionsTpl]=\"!configModel().title ? actionsTpl : undefined\" [isSearching]=\"isSearching()\"\n [(searchRequest)]=\"searchRequest\" [searchRequestSubject]=\"searchRequestSubject\" [config]=\"configModel()\"\n [(hasChanges)]=\"hasSearchChanged\" [columns]=\"columns()\">\n </upd-search-section>\n }\n\n <div [class.table-responsive]=\"configModel().isResponsive\">\n <!-- TODO: implement pixel sized table -->\n <table class=\"table card-table table-vcenter table-nowrap\" [class.fixed]=\"hasWidth\"\n [class.pixel-sized]=\"isWidthInPixels\">\n <thead [class.sticky-top]=\"configModel().hasStickyHeader\">\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <th class=\"checkbox-selector\">\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleAllSelection($event)\"\n [(isChecked)]=\"isMainCheckboxChecked\"\n [(isIndeterminate)]=\"isMainCheckboxIndeterminate\"></upd-checkbox>\n </th>\n }\n\n @for (col of columns(); track col) {\n <th [ngClass]=\"col.widthClass\" [style.width.px]=\"col.pixelsSize\">\n {{ textService.getText(col.title) }}\n @if (canSortColumn(col.name)) {\n <upd-icon [tablerIcon]=\"getSortingIcon(col.name)\" tablerIconWeight=\"bold\" colorClass=\"text-body-tertiary\"\n [tablerIconSize]=\"16\" (click)=\"sortByColumn(col.name)\">\n </upd-icon>\n }\n </th>\n }\n\n @if (!!pendingWidthColClass) {\n <th [ngClass]=\"pendingWidthColClass\"></th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSearching()) {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <h1 class=\"text-body-tertiary\">{{ t('Loading') }}...</h1>\n <div class=\"progress progress-sm w-25\">\n <div class=\"progress-bar progress-bar-indeterminate bg-body-tertiary\"></div>\n </div>\n </div>\n </td>\n </tr>\n } @else {\n @for (record of data(); track record) {\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <td>\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleItemSelection(record)\"\n [isChecked]=\"selectionModel().isSelected(record)\"></upd-checkbox>\n </td>\n }\n\n @for (col of columns(); track col) {\n <td>\n <ng-container updTableColumn [record]=\"record\" [config]=\"col\"></ng-container>\n </td>\n }\n\n @if (!!pendingWidthColClass) {\n <td></td>\n }\n </tr>\n } @empty {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <p class=\"empty-title\">{{ t('NoRecordsFoundTitle') }}</p>\n <p class=\"empty-subtitle text-secondary\">{{ t('NoRecordsFoundSubtitle') }}</p>\n </div>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n <upd-paginator wrapperClasses=\"card-footer\" [shouldDisplayPreviousText]=\"false\" [shouldDisplayNextText]=\"false\"\n [(pageSize)]=\"pageSize\" [shouldDisplayFirstText]=\"false\" [shouldDisplayLastText]=\"false\"\n [(currentPage)]=\"currentPage\"\n [totalRecords]=\"totalRecords()\" (changed)=\"onPageSettingsChanged()\">\n </upd-paginator>\n </div>\n\n <ng-template #actionsTpl>\n <div class=\"ms-auto d-flex gap-2\">\n @if (!!activeSavedView()) {\n @if (activeSavedView()!.isDefault) {\n <div class=\"ribbon ribbon-top ribbon-start\">\n <upd-icon tablerIcon=\"heart\" [tablerIconSize]=\"20\"></upd-icon>\n </div>\n }\n <div class=\"tag align-self-center py-3 text-primary bg-primary-lt border-primary\"\n updPopover=\"{{ t('CurrentSavedView') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"list-details\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ activeSavedView()!.name }}</span>\n </div>\n }\n @if (hiddenColumns() > 0) {\n <div class=\"tag align-self-center py-3 text-orange bg-orange-lt border-orange\"\n updPopover=\"{{ t('HiddenColumnsTooltip') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"eye-off\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ hiddenColumns() }}</span>\n </div>\n }\n @if (!!activeSavedView() || hiddenColumns() > 0) {\n <upd-button (clicked)=\"resetViewState()\" colorStyle=\"danger\" updPopover=\"{{ t('ResetView') }}\"\n [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\" [isOutline]=\"true\">\n <upd-icon tablerIcon=\"restore\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canSaveViews) {\n <upd-button customClasses=\"gap-2\" [isDisabled]=\"!hasSearchChanged()\" (clicked)=\"openSaveSearchModal()\"\n updPopover=\"{{ t('SaveCurrentView') }}\" [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\">\n <upd-icon tablerIcon=\"device-floppy\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canManageColumns) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"openColumnsManagerModal()\">\n <upd-icon tablerIcon=\"columns\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ColumnsManagerButton') }}\n </upd-button>\n }\n @if (configModel().canSaveViews || configModel().canLoadSavedViews) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"isSavedViewsDropdownOpen = true\" #savedViewsBtn>\n <upd-icon tablerIcon=\"folders\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('SavedViews.ButtonTitle') }}\n </upd-button>\n <upd-dropdown wrapperClasses=\"overflow-x-hidden mt-1\" [isOpen]=\"isSavedViewsDropdownOpen\"\n [dropdownReference]=\"savedViewsRef()\" [items]=\"savedViewsOptions()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isSavedViewsDropdownOpen = $event\" [minWidth]=\"350\" (selectedItem)=\"selectSavedView($event)\">\n @if (savedViewsOptions().length < 1) {\n <span class=\"m-2\">{{ t('NoSavedViews') }}</span>\n }\n </upd-dropdown>\n }\n </div>\n </ng-template>\n</ng-container>\n", styles: [".fixed{table-layout:fixed!important}.fixed td,.fixed th{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.checkbox-selector{width:52px!important}\n"] }]
1184
+ }], ctorParameters: () => [] });
1185
+
1186
+ var UpDevs$1 = {
1187
+ Table: {
1188
+ Search: "Search",
1189
+ NoRecordsFoundTitle: "No records found",
1190
+ NoRecordsFoundSubtitle: "Please, adjust your search terms to find what you're looking for",
1191
+ HiddenColumnsTooltip: "Hidden columns",
1192
+ SaveCurrentView: "Save current view",
1193
+ ApplyFilters: "Apply filters",
1194
+ AddNewFilter: "Add new filter",
1195
+ Loading: "Loading",
1196
+ VisibleColumns: "Visible",
1197
+ HiddenColumns: "Hidden",
1198
+ ColumnTitleNotSet: "Title not set",
1199
+ NoSavedViews: "No saved views",
1200
+ CurrentSavedView: "View currently applied",
1201
+ ColumnsManagerButton: "Columns manager",
1202
+ ResetView: "Reset table state",
1203
+ Filters: {
1204
+ General: {
1205
+ Equals: "Equals",
1206
+ NotEquals: "Different than",
1207
+ IsEmpty: "Is empty",
1208
+ IsNotEmpty: "Is not empty"
1209
+ },
1210
+ "String": {
1211
+ StartsWith: "Starts with",
1212
+ EndsWith: "Ends with",
1213
+ Contains: "Contains",
1214
+ NotContains: "Doesn't contain",
1215
+ In: "In"
1216
+ },
1217
+ "Boolean": {
1218
+ True: "True",
1219
+ False: "False"
1220
+ },
1221
+ DateOrNumber: {
1222
+ GreaterThan: "Greater than",
1223
+ LessThan: "Less than",
1224
+ GreaterThanOrEqualTo: "Greater than or equal to",
1225
+ LessThanOrEqualTo: "Less than or equal to"
1226
+ },
1227
+ "Date": {
1228
+ Between: "Between"
1229
+ },
1230
+ "Number": {
1231
+ In: "In"
1232
+ }
1233
+ },
1234
+ ColumnsManager: {
1235
+ Apply: "Apply"
1236
+ },
1237
+ SaveSearch: {
1238
+ Title: "Save view",
1239
+ Save: "Save",
1240
+ Cancel: "Cancel",
1241
+ Name: "Name",
1242
+ IsDefault: "Is default",
1243
+ IsDefaultHint: "If this option is checked, this view will be loaded by default.",
1244
+ NoSavedViews: "No saved views"
1245
+ },
1246
+ SavedViews: {
1247
+ ButtonTitle: "Saved views",
1248
+ MarkAsDefault: "Mark as default (loads on start)",
1249
+ Duplicate: "Duplicate",
1250
+ DuplicateSuffix: "copy",
1251
+ Edit: "Edit",
1252
+ Remove: "Remove",
1253
+ ConfirmRemove: "Are you sure you would like to remove the view \"{{view}}\"?<br><br><b class='text-danger'>This action can not be undone.</b>",
1254
+ NameNotUnique: "There is already a saved view with that name, please choose another."
1255
+ }
1256
+ }
1257
+ };
1258
+ var en = {
1259
+ UpDevs: UpDevs$1
1260
+ };
1261
+
1262
+ var en$1 = /*#__PURE__*/Object.freeze({
1263
+ __proto__: null,
1264
+ UpDevs: UpDevs$1,
1265
+ default: en
1266
+ });
1267
+
1268
+ var UpDevs = {
1269
+ Table: {
1270
+ Search: "Pesquisar",
1271
+ NoRecordsFoundTitle: "Nenhum registro encontrado",
1272
+ NoRecordsFoundSubtitle: "Por favor, ajuste sua pesquisa para encontrar o que você está procurando",
1273
+ HiddenColumnsTooltip: "Colunas ocultas",
1274
+ SaveCurrentView: "Salvar consulta atual",
1275
+ ApplyFilters: "Aplicar filtros",
1276
+ AddNewFilter: "Adicionar novo filtro",
1277
+ Loading: "Carregando",
1278
+ VisibleColumns: "Visíveis",
1279
+ HiddenColumns: "Ocultas",
1280
+ ColumnTitleNotSet: "Título não definido",
1281
+ NoSavedViews: "Nenhuma consulta salva",
1282
+ CurrentSavedView: "Consulta sendo visualizada",
1283
+ ColumnsManagerButton: "Gerenciar colunas",
1284
+ ResetView: "Restaurar a condição tabela",
1285
+ Filters: {
1286
+ General: {
1287
+ Equals: "Igual à",
1288
+ NotEquals: "Diferente de",
1289
+ IsEmpty: "Está vazio",
1290
+ IsNotEmpty: "Não está vazio"
1291
+ },
1292
+ "String": {
1293
+ StartsWith: "Começa com",
1294
+ EndsWith: "Termina com",
1295
+ Contains: "Contém",
1296
+ NotContains: "Não contém",
1297
+ In: "Está em"
1298
+ },
1299
+ "Boolean": {
1300
+ True: "Verdadeiro",
1301
+ False: "Falso"
1302
+ },
1303
+ DateOrNumber: {
1304
+ GreaterThan: "Maior que",
1305
+ LessThan: "Menor que",
1306
+ GreaterThanOrEqualTo: "Maior que ou igual à",
1307
+ LessThanOrEqualTo: "Menor que ou igual à"
1308
+ },
1309
+ "Date": {
1310
+ Between: "Entre"
1311
+ },
1312
+ "Number": {
1313
+ In: "Está em"
1314
+ }
1315
+ },
1316
+ ColumnsManager: {
1317
+ Apply: "Aplicar"
1318
+ },
1319
+ SaveSearch: {
1320
+ Title: "Salvar consulta",
1321
+ Save: "Salvar",
1322
+ Cancel: "Cancelar",
1323
+ Name: "Nome",
1324
+ IsDefault: "É padrão",
1325
+ IsDefaultHint: "Se esta opção estiver marcada, esta consulta será carregada por padrão.",
1326
+ NoSavedViews: "Sem consultas salvas"
1327
+ },
1328
+ SavedViews: {
1329
+ ButtonTitle: "Consultas salvas",
1330
+ MarkAsDefault: "Mark como padrão (carrega automaticamente)",
1331
+ Duplicate: "Duplicar",
1332
+ DuplicateSuffix: "cópia",
1333
+ Edit: "Editar",
1334
+ Remove: "Remover",
1335
+ ConfirmRemove: "Deseja realmente remover a consulta \"{{view}}\"?<br><br><b class='text-danger'>Esta ação não pode ser desfeita.</b>",
1336
+ NameNotUnique: "Já existe uma consulta com esse nome, favor escolher outro."
1337
+ }
1338
+ }
1339
+ };
1340
+ var pt = {
1341
+ UpDevs: UpDevs
1342
+ };
1343
+
1344
+ var pt$1 = /*#__PURE__*/Object.freeze({
1345
+ __proto__: null,
1346
+ UpDevs: UpDevs,
1347
+ default: pt
1348
+ });
1349
+
1350
+ class FiltersOperandsStore extends BaseStore {
1351
+ constructor(configService) {
1352
+ super({ baseUrl: configService.config.urlToLoadOperandsFromServer || '' });
1353
+ }
1354
+ load(fieldType) {
1355
+ return this._requestService.makeGet(this.getRequestModel(fieldType.toString()));
1356
+ }
1357
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FiltersOperandsStore, deps: [{ token: UpdTableConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
1358
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FiltersOperandsStore }); }
1359
+ }
1360
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FiltersOperandsStore, decorators: [{
1361
+ type: Injectable
1362
+ }], ctorParameters: () => [{ type: UpdTableConfigService }] });
1363
+
1364
+ const translationKey$3 = 'UpDevs.Table.Filters.General';
1365
+ class FilterOperandsListConfig {
1366
+ static { this.options = {
1367
+ [FilterOperandEnum.Equals]: {
1368
+ operand: FilterOperandEnum.Equals,
1369
+ text: { text: `${translationKey$3}.Equals`, isTranslated: false },
1370
+ icon: { tablerIcon: 'equal' },
1371
+ requiresValue: true
1372
+ },
1373
+ [FilterOperandEnum.NotEquals]: {
1374
+ operand: FilterOperandEnum.NotEquals,
1375
+ text: { text: `${translationKey$3}.NotEquals`, isTranslated: false },
1376
+ icon: { tablerIcon: 'equal-not' },
1377
+ requiresValue: true
1378
+ },
1379
+ [FilterOperandEnum.IsEmpty]: {
1380
+ operand: FilterOperandEnum.IsEmpty,
1381
+ text: { text: `${translationKey$3}.IsEmpty`, isTranslated: false },
1382
+ icon: { tablerIcon: 'droplet' },
1383
+ requiresValue: false
1384
+ },
1385
+ [FilterOperandEnum.IsNotEmpty]: {
1386
+ operand: FilterOperandEnum.IsNotEmpty,
1387
+ text: { text: `${translationKey$3}.IsNotEmpty`, isTranslated: false },
1388
+ icon: { tablerIcon: 'droplet', tablerIconType: 'solid' },
1389
+ requiresValue: false
1390
+ }
1391
+ }; }
1392
+ }
1393
+
1394
+ const translationKey$2 = 'UpDevs.Table.Filters.String';
1395
+ class StringFilterOperandsListModel {
1396
+ static { this.options = {
1397
+ [FilterOperandEnum.Equals]: FilterOperandsListConfig.options[FilterOperandEnum.Equals],
1398
+ [FilterOperandEnum.NotEquals]: FilterOperandsListConfig.options[FilterOperandEnum.NotEquals],
1399
+ [FilterOperandEnum.StartsWith]: {
1400
+ operand: FilterOperandEnum.StartsWith,
1401
+ text: { text: `${translationKey$2}.StartsWith`, isTranslated: false },
1402
+ icon: { tablerIcon: 'brackets-contain-start' },
1403
+ requiresValue: true
1404
+ },
1405
+ [FilterOperandEnum.EndsWith]: {
1406
+ operand: FilterOperandEnum.EndsWith,
1407
+ text: { text: `${translationKey$2}.EndsWith`, isTranslated: false },
1408
+ icon: { tablerIcon: 'brackets-contain-end' },
1409
+ requiresValue: true
1410
+ },
1411
+ [FilterOperandEnum.Contains]: {
1412
+ operand: FilterOperandEnum.Contains,
1413
+ text: { text: `${translationKey$2}.Contains`, isTranslated: false },
1414
+ icon: { tablerIcon: 'brackets-contain' },
1415
+ requiresValue: true
1416
+ },
1417
+ [FilterOperandEnum.NotContains]: {
1418
+ operand: FilterOperandEnum.NotContains,
1419
+ text: { text: `${translationKey$2}.NotContains`, isTranslated: false },
1420
+ icon: { tablerIcon: 'brackets-off' },
1421
+ requiresValue: true
1422
+ },
1423
+ [FilterOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
1424
+ [FilterOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty],
1425
+ [FilterOperandEnum.In]: {
1426
+ operand: FilterOperandEnum.In,
1427
+ text: { text: `${translationKey$2}.In`, isTranslated: false },
1428
+ icon: { tablerIcon: 'spacing-horizontal' },
1429
+ requiresValue: true
1430
+ }
1431
+ }; }
1432
+ static get optionsAsList() {
1433
+ return (Object.values(this.options) || []);
1434
+ }
1435
+ }
1436
+
1437
+ const translationKey$1 = 'UpDevs.Table.Filters.DateOrNumber';
1438
+ class DateOrNumberOperandsListConfig {
1439
+ static { this.options = {
1440
+ [FilterDateOperandEnum.GreaterThan]: {
1441
+ operand: FilterDateOperandEnum.GreaterThan,
1442
+ text: { text: `${translationKey$1}.GreaterThan`, isTranslated: false },
1443
+ icon: { tablerIcon: 'math-greater' },
1444
+ requiresValue: true
1445
+ },
1446
+ [FilterDateOperandEnum.LessThan]: {
1447
+ operand: FilterDateOperandEnum.LessThan,
1448
+ text: { text: `${translationKey$1}.LessThan`, isTranslated: false },
1449
+ icon: { tablerIcon: 'math-lower' },
1450
+ requiresValue: true
1451
+ },
1452
+ [FilterDateOperandEnum.GreaterThanOrEqualTo]: {
1453
+ operand: FilterDateOperandEnum.GreaterThanOrEqualTo,
1454
+ text: { text: `${translationKey$1}.GreaterThanOrEqualTo`, isTranslated: false },
1455
+ icon: { tablerIcon: 'math-equal-greater' },
1456
+ requiresValue: true
1457
+ },
1458
+ [FilterDateOperandEnum.LessThanOrEqualTo]: {
1459
+ operand: FilterDateOperandEnum.LessThanOrEqualTo,
1460
+ text: { text: `${translationKey$1}.LessThanOrEqualTo`, isTranslated: false },
1461
+ icon: { tablerIcon: 'math-equal-lower' },
1462
+ requiresValue: true
1463
+ }
1464
+ }; }
1465
+ }
1466
+
1467
+ class NumberFilterOperandsListModel {
1468
+ static { this.options = {
1469
+ [FilterNumberOperandEnum.Equals]: FilterOperandsListConfig.options[FilterOperandEnum.Equals],
1470
+ [FilterNumberOperandEnum.NotEquals]: FilterOperandsListConfig.options[FilterOperandEnum.NotEquals],
1471
+ [FilterNumberOperandEnum.GreaterThan]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.GreaterThan],
1472
+ [FilterNumberOperandEnum.LessThan]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.LessThan],
1473
+ [FilterNumberOperandEnum.GreaterThanOrEqualTo]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.GreaterThanOrEqualTo],
1474
+ [FilterNumberOperandEnum.LessThanOrEqualTo]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.LessThanOrEqualTo],
1475
+ [FilterNumberOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
1476
+ [FilterNumberOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty],
1477
+ [FilterNumberOperandEnum.In]: {
1478
+ operand: FilterNumberOperandEnum.In,
1479
+ text: { text: 'UpDevs.Table.Filters.Number.In', isTranslated: false },
1480
+ icon: { tablerIcon: 'spacing-horizontal' },
1481
+ requiresValue: true
1482
+ }
1483
+ }; }
1484
+ static get optionsAsList() {
1485
+ return (Object.values(this.options) || []);
1486
+ }
1487
+ }
1488
+
1489
+ const translationKey = 'UpDevs.Table.Filters.Boolean';
1490
+ class BooleanFilterOperandsListModel {
1491
+ static { this.options = {
1492
+ [FilterBooleanOperandEnum.True]: {
1493
+ operand: FilterBooleanOperandEnum.True,
1494
+ text: { text: `${translationKey}.True`, isTranslated: false },
1495
+ icon: { tablerIcon: 'toggle-right' },
1496
+ requiresValue: false
1497
+ },
1498
+ [FilterBooleanOperandEnum.False]: {
1499
+ operand: FilterBooleanOperandEnum.False,
1500
+ text: { text: `${translationKey}.False`, isTranslated: false },
1501
+ icon: { tablerIcon: 'toggle-left' },
1502
+ requiresValue: false
1503
+ },
1504
+ [FilterBooleanOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
1505
+ [FilterBooleanOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty]
1506
+ }; }
1507
+ static get optionsAsList() {
1508
+ return (Object.values(this.options) || []);
1509
+ }
1510
+ }
1511
+
1512
+ class DateFilterOperandsListModel {
1513
+ static { this.options = {
1514
+ [FilterDateOperandEnum.Equals]: FilterOperandsListConfig.options[FilterOperandEnum.Equals],
1515
+ [FilterDateOperandEnum.NotEquals]: FilterOperandsListConfig.options[FilterOperandEnum.NotEquals],
1516
+ [FilterDateOperandEnum.GreaterThan]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.GreaterThan],
1517
+ [FilterDateOperandEnum.LessThan]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.LessThan],
1518
+ [FilterDateOperandEnum.GreaterThanOrEqualTo]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.GreaterThanOrEqualTo],
1519
+ [FilterDateOperandEnum.LessThanOrEqualTo]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.LessThanOrEqualTo],
1520
+ [FilterDateOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
1521
+ [FilterDateOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty],
1522
+ [FilterDateOperandEnum.Between]: {
1523
+ operand: FilterDateOperandEnum.Between,
1524
+ text: { text: 'UpDevs.Table.Filters.Date.Between', isTranslated: false },
1525
+ icon: { tablerIcon: 'spacing-horizontal' },
1526
+ requiresValue: true
1527
+ }
1528
+ }; }
1529
+ static get optionsAsList() {
1530
+ return (Object.values(this.options) || []);
1531
+ }
1532
+ }
1533
+
1534
+ class GuidFilterOperandsListModel {
1535
+ static { this.options = {
1536
+ [FilterGuidOperandEnum.Equals]: FilterOperandsListConfig.options[FilterOperandEnum.Equals],
1537
+ [FilterGuidOperandEnum.NotEquals]: FilterOperandsListConfig.options[FilterOperandEnum.NotEquals],
1538
+ [FilterGuidOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
1539
+ [FilterGuidOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty],
1540
+ [FilterGuidOperandEnum.In]: StringFilterOperandsListModel.options[FilterOperandEnum.In]
1541
+ }; }
1542
+ static get optionsAsList() {
1543
+ return (Object.values(this.options) || []);
1544
+ }
1545
+ }
1546
+
1547
+ class DefaultFiltersOperandsService extends FiltersOperandsService {
1548
+ get isLoaded() {
1549
+ return this._isLoaded;
1550
+ }
1551
+ constructor() {
1552
+ super();
1553
+ this._isLoaded = false;
1554
+ this.configService = inject(UpdTableConfigService);
1555
+ this.filterOperandsStore = inject(FiltersOperandsStore);
1556
+ this.cachedData = {};
1557
+ if (!!this.configService.config.urlToLoadOperandsFromServer) {
1558
+ forkJoin({
1559
+ guidOps: this.filterOperandsStore.load(DataTypeEnum.Guid),
1560
+ stringOps: this.filterOperandsStore.load(DataTypeEnum.String),
1561
+ numberOps: this.filterOperandsStore.load(DataTypeEnum.Number),
1562
+ dateOps: this.filterOperandsStore.load(DataTypeEnum.Date),
1563
+ booleanOps: this.filterOperandsStore.load(DataTypeEnum.Boolean)
1564
+ }).subscribe(resp => {
1565
+ this.cachedData[DataTypeEnum.Guid] = resp.guidOps;
1566
+ this.cachedData[DataTypeEnum.String] = resp.stringOps;
1567
+ this.cachedData[DataTypeEnum.Number] = resp.numberOps;
1568
+ this.cachedData[DataTypeEnum.Date] = resp.dateOps;
1569
+ this.cachedData[DataTypeEnum.Boolean] = resp.booleanOps;
1570
+ this._isLoaded = true;
1571
+ });
1572
+ }
1573
+ else {
1574
+ this.cachedData[DataTypeEnum.Guid] = GuidFilterOperandsListModel.optionsAsList;
1575
+ this.cachedData[DataTypeEnum.String] = StringFilterOperandsListModel.optionsAsList;
1576
+ this.cachedData[DataTypeEnum.Number] = NumberFilterOperandsListModel.optionsAsList;
1577
+ this.cachedData[DataTypeEnum.Date] = DateFilterOperandsListModel.optionsAsList;
1578
+ this.cachedData[DataTypeEnum.Boolean] = BooleanFilterOperandsListModel.optionsAsList;
1579
+ this._isLoaded = true;
1580
+ }
1581
+ }
1582
+ getOperands(type) {
1583
+ return this._isLoaded ? this.cachedData[type] : [];
1584
+ }
1585
+ getAllOperands() {
1586
+ return this.cachedData;
1587
+ }
1588
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DefaultFiltersOperandsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1589
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DefaultFiltersOperandsService }); }
1590
+ }
1591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DefaultFiltersOperandsService, decorators: [{
1592
+ type: Injectable
1593
+ }], ctorParameters: () => [] });
1594
+
1595
+ class UpdTableModule {
1596
+ constructor(translocoService) {
1597
+ translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });
1598
+ translocoService.setTranslation(en$1, 'en');
1599
+ translocoService.setTranslation(pt$1, 'pt');
1600
+ }
1601
+ /**
1602
+ * Sets up the table module with the provided configuration.
1603
+ * @param config Configuration.
1604
+ */
1605
+ static forRoot(config) {
1606
+ const customizableProviders = [
1607
+ config.filtersOperandsService || {
1608
+ provide: FiltersOperandsService,
1609
+ useClass: DefaultFiltersOperandsService
1610
+ }
1611
+ ];
1612
+ return {
1613
+ ngModule: UpdTableModule,
1614
+ providers: [
1615
+ { provide: TableConstants.defaultOptionsInjectionToken, useValue: config },
1616
+ ...customizableProviders
1617
+ ]
1618
+ };
1619
+ }
1620
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableModule, deps: [{ token: i1$1.TranslocoService }], target: i0.ɵɵFactoryTarget.NgModule }); }
1621
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: UpdTableModule, declarations: [TableComponent,
1622
+ SearchSectionComponent,
1623
+ FilterRowComponent,
1624
+ TableColumnDirective,
1625
+ NumberColumnComponent,
1626
+ DateTimeColumnComponent,
1627
+ BooleanColumnComponent,
1628
+ TextColumnComponent,
1629
+ ColumnsManagerComponent,
1630
+ SaveSearchComponent], imports: [CommonModule,
1631
+ TranslocoDirective,
1632
+ UpdIconsModule,
1633
+ UpdButtonModule,
1634
+ UpdModalModule,
1635
+ UpdPaginatorModule,
1636
+ UpdInputModule,
1637
+ UpdCheckboxModule,
1638
+ UpdSelectModule,
1639
+ UpdDragAndDropModule,
1640
+ UpdFormModule,
1641
+ UpdDropdownModule,
1642
+ UpdTimePickerModule,
1643
+ UpdBadgeModule,
1644
+ UpdPopoverModule], exports: [TableComponent,
1645
+ TableColumnDirective] }); }
1646
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableModule, providers: [
1647
+ UpdTableConfigService,
1648
+ FiltersOperandsStore,
1649
+ SavedViewsStorage
1650
+ ], imports: [CommonModule,
1651
+ UpdIconsModule,
1652
+ UpdButtonModule,
1653
+ UpdModalModule,
1654
+ UpdPaginatorModule,
1655
+ UpdInputModule,
1656
+ UpdCheckboxModule,
1657
+ UpdSelectModule,
1658
+ UpdDragAndDropModule,
1659
+ UpdFormModule,
1660
+ UpdDropdownModule,
1661
+ UpdTimePickerModule,
1662
+ UpdBadgeModule,
1663
+ UpdPopoverModule] }); }
1664
+ }
1665
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableModule, decorators: [{
1666
+ type: NgModule,
1667
+ args: [{
1668
+ imports: [
1669
+ CommonModule,
1670
+ TranslocoDirective,
1671
+ UpdIconsModule,
1672
+ UpdButtonModule,
1673
+ UpdModalModule,
1674
+ UpdPaginatorModule,
1675
+ UpdInputModule,
1676
+ UpdCheckboxModule,
1677
+ UpdSelectModule,
1678
+ UpdDragAndDropModule,
1679
+ UpdFormModule,
1680
+ UpdDropdownModule,
1681
+ UpdTimePickerModule,
1682
+ UpdBadgeModule,
1683
+ UpdPopoverModule
1684
+ ],
1685
+ declarations: [
1686
+ TableComponent,
1687
+ SearchSectionComponent,
1688
+ FilterRowComponent,
1689
+ TableColumnDirective,
1690
+ NumberColumnComponent,
1691
+ DateTimeColumnComponent,
1692
+ BooleanColumnComponent,
1693
+ TextColumnComponent,
1694
+ ColumnsManagerComponent,
1695
+ SaveSearchComponent
1696
+ ],
1697
+ exports: [
1698
+ TableComponent,
1699
+ TableColumnDirective
1700
+ ],
1701
+ providers: [
1702
+ UpdTableConfigService,
1703
+ FiltersOperandsStore,
1704
+ SavedViewsStorage
1705
+ ]
1706
+ }]
1707
+ }], ctorParameters: () => [{ type: i1$1.TranslocoService }] });
1708
+
1709
+ /**
1710
+ * Generated bundle index. Do not edit.
1711
+ */
1712
+
1713
+ export { BaseColumnModel, BooleanColumnModel, ColumnTypeEnum, DateTimeColumnModel, FiltersOperandsService, GuidColumnModel, ImageColumnModel, NumberColumnModel, TableColumnDirective, TableComponent, TextColumnModel, UpdTableModule };
1714
+ //# sourceMappingURL=updevs-components-table.mjs.map