@updevs/components 1.0.0-alpha.6 → 1.0.0-alpha.61

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 (693) hide show
  1. package/README.md +1 -11
  2. package/assets/styles/_bootstrap-components.scss +18 -1
  3. package/assets/styles/_core.scss +9 -0
  4. package/assets/styles/_debug.scss +49 -0
  5. package/assets/styles/_props.scss +91 -0
  6. package/assets/styles/_seven-columns.scss +73 -0
  7. package/assets/styles/_updevs.scss +16 -0
  8. package/assets/styles/_utilities-marketing.scss +209 -0
  9. package/assets/styles/_utilities.scss +127 -92
  10. package/assets/styles/_variables-dark.scss +8 -6
  11. package/assets/styles/_variables.scss +325 -256
  12. package/assets/styles/helpers/_index.scss +143 -0
  13. package/assets/styles/layout/_core.scss +3 -2
  14. package/assets/styles/layout/_dark.scss +40 -35
  15. package/assets/styles/layout/_footer.scss +1 -1
  16. package/assets/styles/layout/_navbar.scss +31 -19
  17. package/assets/styles/layout/_page.scss +6 -5
  18. package/assets/styles/layout/_root.scss +26 -34
  19. package/assets/styles/marketing/_browser.scss +67 -0
  20. package/assets/styles/marketing/_core.scss +8 -0
  21. package/assets/styles/marketing/_filters.scss +0 -0
  22. package/assets/styles/marketing/_hero.scss +70 -0
  23. package/assets/styles/marketing/_pricing.scss +111 -0
  24. package/assets/styles/marketing/_sections.scss +124 -0
  25. package/assets/styles/marketing/_shape.scss +31 -0
  26. package/assets/styles/mixins/_functions.scss +53 -0
  27. package/assets/styles/mixins/_mixins.scss +9 -9
  28. package/assets/styles/ui/_accordion.scss +165 -11
  29. package/assets/styles/ui/_alerts.scss +80 -38
  30. package/assets/styles/ui/_avatars.scss +36 -9
  31. package/assets/styles/ui/_badges.scss +47 -13
  32. package/assets/styles/ui/_button-group.scss +1 -1
  33. package/assets/styles/ui/_buttons.scss +33 -37
  34. package/assets/styles/ui/_calendars.scss +2 -2
  35. package/assets/styles/ui/_cards.scss +9 -0
  36. package/assets/styles/ui/_carousel.scss +1 -1
  37. package/assets/styles/ui/_charts.scss +1 -1
  38. package/assets/styles/ui/_chat.scss +38 -0
  39. package/assets/styles/ui/_close.scss +54 -1
  40. package/assets/styles/ui/_datagrid.scss +1 -1
  41. package/assets/styles/ui/_dropdowns.scss +3 -0
  42. package/assets/styles/ui/_empty.scss +0 -5
  43. package/assets/styles/ui/_flags.scss +2 -2
  44. package/assets/styles/ui/_forms.scss +33 -7
  45. package/assets/styles/ui/_grid.scss +1 -1
  46. package/assets/styles/ui/_icons.scss +1 -1
  47. package/assets/styles/ui/_images.scss +4 -0
  48. package/assets/styles/ui/_lists.scss +12 -16
  49. package/assets/styles/ui/_loaders.scss +1 -1
  50. package/assets/styles/ui/_markdown.scss +15 -4
  51. package/assets/styles/ui/_modals.scss +2 -2
  52. package/assets/styles/ui/_nav.scss +17 -3
  53. package/assets/styles/ui/_offcanvas.scss +2 -2
  54. package/assets/styles/ui/_pagination.scss +2 -0
  55. package/assets/styles/ui/_payments.scss +1 -1
  56. package/assets/styles/ui/_placeholder.scss +1 -1
  57. package/assets/styles/ui/_progress.scss +1 -1
  58. package/assets/styles/ui/_ribbons.scss +1 -0
  59. package/assets/styles/ui/_segmented.scss +101 -0
  60. package/assets/styles/ui/_signature.scss +15 -0
  61. package/assets/styles/ui/_social.scss +52 -0
  62. package/assets/styles/ui/_status.scss +1 -1
  63. package/assets/styles/ui/_steps.scss +5 -1
  64. package/assets/styles/ui/_switch-icon.scss +1 -1
  65. package/assets/styles/ui/_tables.scss +27 -1
  66. package/assets/styles/ui/_tags.scss +1 -1
  67. package/assets/styles/ui/_timeline.scss +1 -1
  68. package/assets/styles/ui/_toasts.scss +0 -1
  69. package/assets/styles/ui/_tracking.scss +1 -1
  70. package/assets/styles/ui/_type.scss +169 -8
  71. package/assets/styles/ui/forms/_form-check.scss +1 -1
  72. package/assets/styles/ui/forms/_form-colorinput.scss +1 -1
  73. package/assets/styles/ui/forms/_form-custom.scss +1 -1
  74. package/assets/styles/ui/forms/_form-imagecheck.scss +6 -5
  75. package/assets/styles/ui/forms/_form-selectgroup.scss +2 -2
  76. package/assets/styles/ui/typo/_hr.scss +4 -2
  77. package/assets/styles/utils/_colors.scss +72 -11
  78. package/assets/styles/utils/_opacity.scss +1 -1
  79. package/assets/styles/utils/_scroll.scss +0 -2
  80. package/assets/styles/utils/_sizing.scss +1 -1
  81. package/assets/styles/utils/_text.scss +1 -2
  82. package/assets/styles/vendor/_apexcharts.scss +52 -0
  83. package/assets/styles/vendor/_coloris.scss +72 -0
  84. package/assets/styles/vendor/_dropzone.scss +27 -0
  85. package/assets/styles/vendor/_fslightbox.scss +13 -0
  86. package/assets/styles/vendor/_jsvectormap.scss +47 -0
  87. package/assets/styles/vendor/_litepicker.scss +69 -0
  88. package/assets/styles/vendor/_nouislider.scss +49 -0
  89. package/assets/styles/vendor/_plyr.scss +3 -0
  90. package/assets/styles/vendor/_stars-rating.scss +22 -0
  91. package/assets/styles/vendor/_tom-select.scss +81 -0
  92. package/assets/styles/vendor/_turbo.scss +3 -0
  93. package/assets/styles/vendor/_typed.scss +4 -0
  94. package/assets/styles/vendor/_wysiwyg.scss +46 -0
  95. package/badge/badge-config.model.d.ts +14 -0
  96. package/badge/badge.component.d.ts +23 -0
  97. package/badge/badge.config.d.ts +12 -0
  98. package/badge/index.d.ts +1 -0
  99. package/badge/public-api.d.ts +3 -0
  100. package/badge/upd-badge.module.d.ts +8 -0
  101. package/button/button.component.d.ts +51 -33
  102. package/button/upd-button.module.d.ts +3 -1
  103. package/calendar/calendar.component.d.ts +63 -0
  104. package/calendar/index.d.ts +1 -0
  105. package/calendar/models/calendar-date.model.d.ts +10 -0
  106. package/calendar/models/calendar-month.model.d.ts +7 -0
  107. package/calendar/models/calendar-selected.model.d.ts +5 -0
  108. package/calendar/models/calendar-user-event.model.d.ts +4 -0
  109. package/calendar/models/calendar-year.model.d.ts +6 -0
  110. package/calendar/models/date-range.model.d.ts +22 -0
  111. package/calendar/models/enums/calendar-view.enum.d.ts +5 -0
  112. package/calendar/models/public-api.d.ts +7 -0
  113. package/calendar/public-api.d.ts +5 -0
  114. package/calendar/services/calendar-range-strategy.service.d.ts +35 -0
  115. package/calendar/services/calendar-signals.service.d.ts +24 -0
  116. package/calendar/services/public-api.d.ts +1 -0
  117. package/calendar/types/calendar-view.type.d.ts +1 -0
  118. package/calendar/types/public-api.d.ts +1 -0
  119. package/calendar/upd-calendar.module.d.ts +13 -0
  120. package/card/card.component.d.ts +2 -2
  121. package/card/directives/card-actions.directive.d.ts +1 -2
  122. package/card/directives/card-footer.directive.d.ts +1 -2
  123. package/card/directives/card-header.directive.d.ts +1 -2
  124. package/card/directives/card-image.directive.d.ts +1 -2
  125. package/card/public-api.d.ts +1 -0
  126. package/card/types/public-api.d.ts +5 -0
  127. package/drag-and-drop/drag-and-drop.component.d.ts +26 -0
  128. package/drag-and-drop/index.d.ts +1 -0
  129. package/drag-and-drop/models/drag-and-drop-column.config.d.ts +8 -0
  130. package/drag-and-drop/models/drag-and-drop-column.model.d.ts +10 -0
  131. package/drag-and-drop/models/drag-and-drop-item.d.ts +7 -0
  132. package/drag-and-drop/models/drag-and-drop-item.model.d.ts +13 -0
  133. package/drag-and-drop/models/drag-and-drop.config.d.ts +6 -0
  134. package/drag-and-drop/models/public-api.d.ts +4 -0
  135. package/drag-and-drop/public-api.d.ts +3 -0
  136. package/drag-and-drop/upd-drag-and-drop.module.d.ts +9 -0
  137. package/dropdown/dropdown.component.d.ts +23 -6
  138. package/dropdown/models/dropdown-action-clicked.model.d.ts +6 -0
  139. package/dropdown/models/dropdown-item.d.ts +7 -2
  140. package/dropdown/models/dropdown-item.type.d.ts +1 -1
  141. package/dropdown/models/public-api.d.ts +2 -0
  142. package/dropdown/models/toolbar.type.d.ts +1 -0
  143. package/esm2022/badge/badge-config.model.mjs +14 -0
  144. package/esm2022/badge/badge.component.mjs +48 -0
  145. package/esm2022/badge/badge.config.mjs +2 -0
  146. package/esm2022/badge/index.mjs +2 -0
  147. package/esm2022/badge/public-api.mjs +4 -0
  148. package/esm2022/badge/upd-badge.module.mjs +24 -0
  149. package/esm2022/badge/updevs-components-badge.mjs +5 -0
  150. package/esm2022/button/button.component.mjs +126 -132
  151. package/esm2022/button/index.mjs +1 -1
  152. package/esm2022/button/public-api.mjs +1 -1
  153. package/esm2022/button/upd-button.module.mjs +14 -6
  154. package/esm2022/button/updevs-components-button.mjs +1 -1
  155. package/esm2022/calendar/assets/i18n/en.json +16 -0
  156. package/esm2022/calendar/assets/i18n/pt.json +16 -0
  157. package/esm2022/calendar/calendar.component.mjs +318 -0
  158. package/esm2022/calendar/index.mjs +2 -0
  159. package/esm2022/calendar/models/calendar-date.model.mjs +2 -0
  160. package/esm2022/calendar/models/calendar-month.model.mjs +2 -0
  161. package/esm2022/calendar/models/calendar-selected.model.mjs +2 -0
  162. package/esm2022/calendar/models/calendar-user-event.model.mjs +2 -0
  163. package/esm2022/calendar/models/calendar-year.model.mjs +2 -0
  164. package/esm2022/calendar/models/date-range.model.mjs +18 -0
  165. package/esm2022/calendar/models/enums/calendar-view.enum.mjs +7 -0
  166. package/esm2022/calendar/models/public-api.mjs +8 -0
  167. package/esm2022/calendar/public-api.mjs +6 -0
  168. package/esm2022/calendar/services/calendar-range-strategy.service.mjs +99 -0
  169. package/esm2022/calendar/services/calendar-signals.service.mjs +47 -0
  170. package/esm2022/calendar/services/public-api.mjs +2 -0
  171. package/esm2022/calendar/types/calendar-view.type.mjs +2 -0
  172. package/esm2022/calendar/types/public-api.mjs +2 -0
  173. package/esm2022/calendar/upd-calendar.module.mjs +52 -0
  174. package/esm2022/calendar/updevs-components-calendar.mjs +5 -0
  175. package/esm2022/card/card.component.mjs +4 -4
  176. package/esm2022/card/directives/card-actions.directive.mjs +8 -8
  177. package/esm2022/card/directives/card-footer.directive.mjs +8 -8
  178. package/esm2022/card/directives/card-header.directive.mjs +8 -8
  179. package/esm2022/card/directives/card-image.directive.mjs +8 -8
  180. package/esm2022/card/directives/public-api.mjs +1 -1
  181. package/esm2022/card/index.mjs +1 -1
  182. package/esm2022/card/public-api.mjs +2 -1
  183. package/esm2022/card/types/card-state.type.mjs +1 -1
  184. package/esm2022/card/types/card-style.type.mjs +1 -1
  185. package/esm2022/card/types/hover-effect.type.mjs +1 -1
  186. package/esm2022/card/types/public-api.mjs +6 -0
  187. package/esm2022/card/types/ribbon-style.type.mjs +1 -1
  188. package/esm2022/card/types/status-position.type.mjs +1 -1
  189. package/esm2022/card/upd-card.module.mjs +5 -5
  190. package/esm2022/card/updevs-components-card.mjs +1 -1
  191. package/esm2022/drag-and-drop/drag-and-drop.component.mjs +134 -0
  192. package/esm2022/drag-and-drop/index.mjs +2 -0
  193. package/esm2022/drag-and-drop/models/drag-and-drop-column.config.mjs +2 -0
  194. package/esm2022/drag-and-drop/models/drag-and-drop-column.model.mjs +9 -0
  195. package/esm2022/drag-and-drop/models/drag-and-drop-item.mjs +2 -0
  196. package/esm2022/drag-and-drop/models/drag-and-drop-item.model.mjs +14 -0
  197. package/esm2022/drag-and-drop/models/drag-and-drop.config.mjs +2 -0
  198. package/esm2022/drag-and-drop/models/public-api.mjs +5 -0
  199. package/esm2022/drag-and-drop/public-api.mjs +4 -0
  200. package/esm2022/drag-and-drop/upd-drag-and-drop.module.mjs +28 -0
  201. package/esm2022/drag-and-drop/updevs-components-drag-and-drop.mjs +5 -0
  202. package/esm2022/dropdown/dropdown.component.mjs +75 -18
  203. package/esm2022/dropdown/index.mjs +1 -1
  204. package/esm2022/dropdown/models/dropdown-action-clicked.model.mjs +2 -0
  205. package/esm2022/dropdown/models/dropdown-item.mjs +1 -1
  206. package/esm2022/dropdown/models/dropdown-item.type.mjs +1 -1
  207. package/esm2022/dropdown/models/public-api.mjs +3 -1
  208. package/esm2022/dropdown/models/toolbar.type.mjs +2 -0
  209. package/esm2022/dropdown/public-api.mjs +1 -1
  210. package/esm2022/dropdown/upd-dropdown.module.mjs +5 -5
  211. package/esm2022/dropdown/updevs-components-dropdown.mjs +1 -1
  212. package/esm2022/form/assets/i18n/en.json +17 -0
  213. package/esm2022/form/assets/i18n/pt.json +17 -0
  214. package/esm2022/form/components/dynamic-field/dynamic-field.component.mjs +174 -0
  215. package/esm2022/form/form.component.mjs +180 -0
  216. package/esm2022/form/index.mjs +1 -1
  217. package/esm2022/form/models/attachment-rule.model.mjs +2 -0
  218. package/esm2022/form/models/button-field.model.mjs +2 -0
  219. package/esm2022/form/models/button-group-field.model.mjs +2 -0
  220. package/esm2022/form/models/checkbox-field.model.mjs +2 -0
  221. package/esm2022/form/models/checkbox-group-field.model.mjs +2 -0
  222. package/esm2022/form/models/dynamic-field.model.mjs +2 -0
  223. package/esm2022/form/models/enums/attachment-type.enum.mjs +15 -0
  224. package/esm2022/form/models/enums/dynamic-field.type.mjs +17 -0
  225. package/esm2022/form/models/enums/public-api.mjs +3 -0
  226. package/esm2022/form/models/file-upload-field.model.mjs +2 -0
  227. package/esm2022/form/models/form-config.mjs +2 -0
  228. package/esm2022/form/models/form-row.model.mjs +2 -0
  229. package/esm2022/form/models/form-update-on.type.mjs +2 -0
  230. package/esm2022/form/models/input-field.model.mjs +2 -0
  231. package/esm2022/form/models/masked-input-field.model.mjs +2 -0
  232. package/esm2022/form/models/public-api.mjs +19 -0
  233. package/esm2022/form/models/radio-field.model.mjs +2 -0
  234. package/esm2022/form/models/radio-group-field.model.mjs +2 -0
  235. package/esm2022/form/models/select-field.model.mjs +2 -0
  236. package/esm2022/form/models/single-select-field.model.mjs +2 -0
  237. package/esm2022/form/models/textarea-field.model.mjs +2 -0
  238. package/esm2022/form/models/validator-config.mjs +2 -0
  239. package/esm2022/form/public-api.mjs +4 -2
  240. package/esm2022/form/tools/errors-helper.mjs +54 -0
  241. package/esm2022/form/upd-form.module.mjs +84 -0
  242. package/esm2022/form/updevs-components-form.mjs +1 -1
  243. package/esm2022/form-controls/abstractions/base-control.mjs +46 -0
  244. package/esm2022/form-controls/abstractions/index.mjs +2 -0
  245. package/esm2022/form-controls/abstractions/public-api.mjs +2 -0
  246. package/esm2022/form-controls/abstractions/updevs-components-form-controls-abstractions.mjs +5 -0
  247. package/esm2022/form-controls/checkbox/checkbox.component.mjs +37 -51
  248. package/esm2022/form-controls/checkbox/index.mjs +1 -1
  249. package/esm2022/form-controls/checkbox/public-api.mjs +1 -1
  250. package/esm2022/form-controls/checkbox/upd-checkbox.module.mjs +12 -8
  251. package/esm2022/form-controls/checkbox/updevs-components-form-controls-checkbox.mjs +1 -1
  252. package/esm2022/form-controls/date-picker/date-picker.component.mjs +132 -0
  253. package/esm2022/form-controls/date-picker/index.mjs +2 -0
  254. package/esm2022/form-controls/date-picker/public-api.mjs +3 -0
  255. package/esm2022/form-controls/date-picker/upd-date-picker.module.mjs +40 -0
  256. package/esm2022/form-controls/date-picker/updevs-components-form-controls-date-picker.mjs +5 -0
  257. package/esm2022/form-controls/file-upload/assets/i18n/en.json +15 -0
  258. package/esm2022/form-controls/file-upload/assets/i18n/pt.json +15 -0
  259. package/esm2022/form-controls/file-upload/file-upload-changed.event.mjs +2 -0
  260. package/esm2022/form-controls/file-upload/file-upload.component.mjs +169 -0
  261. package/esm2022/form-controls/file-upload/index.mjs +2 -0
  262. package/esm2022/form-controls/file-upload/public-api.mjs +4 -0
  263. package/esm2022/form-controls/file-upload/upd-file-upload.module.mjs +48 -0
  264. package/esm2022/form-controls/file-upload/updevs-components-form-controls-file-upload.mjs +5 -0
  265. package/esm2022/form-controls/input/directives/input-append.directive.mjs +8 -8
  266. package/esm2022/form-controls/input/directives/input-prepend.directive.mjs +8 -8
  267. package/esm2022/form-controls/input/directives/public-api.mjs +1 -1
  268. package/esm2022/form-controls/input/index.mjs +1 -1
  269. package/esm2022/form-controls/input/input.component.mjs +64 -34
  270. package/esm2022/form-controls/input/public-api.mjs +1 -1
  271. package/esm2022/form-controls/input/types/input.type.mjs +1 -1
  272. package/esm2022/form-controls/input/types/loader-position.type.mjs +1 -1
  273. package/esm2022/form-controls/input/types/public-api.mjs +1 -1
  274. package/esm2022/form-controls/input/upd-input.module.mjs +5 -5
  275. package/esm2022/form-controls/input/updevs-components-form-controls-input.mjs +1 -1
  276. package/esm2022/form-controls/radio/index.mjs +1 -1
  277. package/esm2022/form-controls/radio/public-api.mjs +1 -1
  278. package/esm2022/form-controls/radio/radio.component.mjs +12 -25
  279. package/esm2022/form-controls/radio/upd-radio.module.mjs +14 -6
  280. package/esm2022/form-controls/radio/updevs-components-form-controls-radio.mjs +1 -1
  281. package/esm2022/form-controls/select/components/multiple/select-multiple.component.mjs +33 -10
  282. package/esm2022/form-controls/select/components/single/select.component.mjs +31 -8
  283. package/esm2022/form-controls/select/index.mjs +1 -1
  284. package/esm2022/form-controls/select/models/abstractions/base-select.component.mjs +109 -88
  285. package/esm2022/form-controls/select/models/defaults.mjs +8 -0
  286. package/esm2022/form-controls/select/models/public-api.mjs +2 -1
  287. package/esm2022/form-controls/select/models/select-item.mjs +1 -1
  288. package/esm2022/form-controls/select/public-api.mjs +1 -1
  289. package/esm2022/form-controls/select/upd-select.module.mjs +10 -6
  290. package/esm2022/form-controls/select/updevs-components-form-controls-select.mjs +1 -1
  291. package/esm2022/form-controls/textarea/index.mjs +1 -1
  292. package/esm2022/form-controls/textarea/public-api.mjs +1 -1
  293. package/esm2022/form-controls/textarea/textarea.component.mjs +18 -36
  294. package/esm2022/form-controls/textarea/upd-textarea.module.mjs +5 -5
  295. package/esm2022/form-controls/textarea/updevs-components-form-controls-textarea.mjs +1 -1
  296. package/esm2022/form-controls/time-picker/index.mjs +1 -1
  297. package/esm2022/form-controls/time-picker/public-api.mjs +1 -1
  298. package/esm2022/form-controls/time-picker/time-picker.component.mjs +4 -4
  299. package/esm2022/form-controls/time-picker/time-selector/time-selector.component.mjs +7 -8
  300. package/esm2022/form-controls/time-picker/upd-time-picker.module.mjs +9 -8
  301. package/esm2022/form-controls/time-picker/updevs-components-form-controls-time-picker.mjs +1 -1
  302. package/esm2022/index.mjs +2 -0
  303. package/esm2022/layout/abstractions/base-page.component.mjs +8 -9
  304. package/esm2022/layout/abstractions/base.layout.mjs +31 -0
  305. package/esm2022/layout/abstractions/public-api.mjs +1 -1
  306. package/esm2022/layout/assets/i18n/en.json +24 -2
  307. package/esm2022/layout/assets/i18n/pt.json +24 -2
  308. package/esm2022/layout/index.mjs +1 -1
  309. package/esm2022/layout/layouts/blank-layout/blank-layout.component.mjs +18 -7
  310. package/esm2022/layout/layouts/blank-layout/blank-layout.module.mjs +32 -6
  311. package/esm2022/layout/layouts/public-api.mjs +1 -1
  312. package/esm2022/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.mjs +13 -29
  313. package/esm2022/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.mjs +25 -28
  314. package/esm2022/layout/models/login-page-config.model.mjs +20 -0
  315. package/esm2022/layout/models/login-page.config.mjs +2 -0
  316. package/esm2022/layout/models/public-api.mjs +2 -1
  317. package/esm2022/layout/models/security-layout-config.model.mjs +10 -0
  318. package/esm2022/layout/models/security-layout.config.mjs +2 -0
  319. package/esm2022/layout/models/upd-layout-config.model.mjs +11 -17
  320. package/esm2022/layout/models/upd-layout.config.mjs +1 -1
  321. package/esm2022/layout/pages/auth-flow/auth-flow-routing.module.mjs +5 -5
  322. package/esm2022/layout/pages/auth-flow/auth-flow.module.mjs +36 -9
  323. package/esm2022/layout/pages/auth-flow/logged-out/logged-out.component.mjs +4 -4
  324. package/esm2022/layout/pages/auth-flow/login/login.component.mjs +95 -12
  325. package/esm2022/layout/pages/auth-flow/oauth-callback/oauth-callback.component.mjs +4 -4
  326. package/esm2022/layout/pages/auth-flow/public-api.mjs +1 -1
  327. package/esm2022/layout/pages/public-api.mjs +1 -1
  328. package/esm2022/layout/partials/footer/footer.component.mjs +13 -27
  329. package/esm2022/layout/partials/footer/footer.module.mjs +28 -0
  330. package/esm2022/layout/partials/footer/public-api.mjs +2 -2
  331. package/esm2022/layout/partials/header/header-style.type.mjs +1 -1
  332. package/esm2022/layout/partials/header/header.component.mjs +121 -60
  333. package/esm2022/layout/partials/header/header.module.mjs +40 -0
  334. package/esm2022/layout/partials/header/public-api.mjs +2 -1
  335. package/esm2022/layout/partials/page-header/page-header.component.mjs +11 -11
  336. package/esm2022/layout/partials/page-header/public-api.mjs +1 -1
  337. package/esm2022/layout/partials/public-api.mjs +1 -1
  338. package/esm2022/layout/partials/sidebar/public-api.mjs +1 -1
  339. package/esm2022/layout/partials/sidebar/sidebar.component.mjs +185 -95
  340. package/esm2022/layout/public-api.mjs +1 -1
  341. package/esm2022/layout/services/public-api.mjs +1 -1
  342. package/esm2022/layout/services/upd-layout-config.service.mjs +6 -6
  343. package/esm2022/layout/tools/layout.constants.mjs +1 -1
  344. package/esm2022/layout/upd-layout.module.mjs +12 -8
  345. package/esm2022/layout/updevs-components-layout.mjs +1 -1
  346. package/esm2022/lib/index.mjs +1 -1
  347. package/esm2022/lib/models/public-api.mjs +2 -0
  348. package/esm2022/lib/models/row-column-size.mjs +2 -0
  349. package/esm2022/lib/public-api.mjs +3 -1
  350. package/esm2022/lib/tools/column-size.helper.mjs +12 -0
  351. package/esm2022/lib/tools/public-api.mjs +2 -0
  352. package/esm2022/lib/types/component-size.type.mjs +1 -1
  353. package/esm2022/lib/types/horizontal-vertical.type.mjs +2 -0
  354. package/esm2022/lib/types/public-api.mjs +2 -1
  355. package/esm2022/lib/types/validation-status.type.mjs +1 -1
  356. package/esm2022/lib/upd-components.module.mjs +5 -5
  357. package/esm2022/link/index.mjs +1 -1
  358. package/esm2022/link/link.component.mjs +4 -4
  359. package/esm2022/link/public-api.mjs +1 -1
  360. package/esm2022/link/target.type.mjs +1 -1
  361. package/esm2022/link/upd-link.module.mjs +5 -5
  362. package/esm2022/link/updevs-components-link.mjs +1 -1
  363. package/esm2022/list/assets/i18n/en.json +7 -3
  364. package/esm2022/list/assets/i18n/pt.json +7 -3
  365. package/esm2022/list/index.mjs +1 -1
  366. package/esm2022/list/list.component.mjs +14 -34
  367. package/esm2022/list/models/badge-position.type.mjs +1 -1
  368. package/esm2022/list/models/list-item.mjs +1 -1
  369. package/esm2022/list/models/list-item.model.mjs +7 -2
  370. package/esm2022/list/models/public-api.mjs +1 -1
  371. package/esm2022/list/public-api.mjs +1 -1
  372. package/esm2022/list/upd-list.module.mjs +9 -8
  373. package/esm2022/list/updevs-components-list.mjs +1 -1
  374. package/esm2022/modal/assets/i18n/en.json +17 -0
  375. package/esm2022/modal/assets/i18n/pt.json +17 -0
  376. package/esm2022/modal/components/modal-container/modal-container.component.mjs +216 -0
  377. package/esm2022/modal/index.mjs +2 -0
  378. package/esm2022/modal/models/base.modal.mjs +14 -0
  379. package/esm2022/modal/models/modal-config.model.mjs +20 -0
  380. package/esm2022/modal/models/modal-ref.mjs +2 -0
  381. package/esm2022/modal/models/modal.config.mjs +2 -0
  382. package/esm2022/modal/models/public-api.mjs +4 -0
  383. package/esm2022/modal/public-api.mjs +4 -0
  384. package/esm2022/modal/services/modal-alert.service.mjs +99 -0
  385. package/esm2022/modal/services/modal.service.mjs +30 -0
  386. package/esm2022/modal/services/public-api.mjs +3 -0
  387. package/esm2022/modal/types/modal-footer-style.type.mjs +2 -0
  388. package/esm2022/modal/types/modal-size.type.mjs +2 -0
  389. package/esm2022/modal/upd-modal.module.mjs +90 -0
  390. package/esm2022/modal/updevs-components-modal.mjs +5 -0
  391. package/esm2022/paginator/assets/i18n/en.json +15 -0
  392. package/esm2022/paginator/assets/i18n/pt.json +15 -0
  393. package/esm2022/paginator/index.mjs +2 -0
  394. package/esm2022/paginator/paginator.component.mjs +66 -0
  395. package/esm2022/paginator/public-api.mjs +3 -0
  396. package/esm2022/paginator/upd-paginator.module.mjs +47 -0
  397. package/esm2022/paginator/updevs-components-paginator.mjs +5 -0
  398. package/esm2022/popover/index.mjs +1 -1
  399. package/esm2022/popover/popover.component.mjs +7 -7
  400. package/esm2022/popover/popover.directive.mjs +33 -42
  401. package/esm2022/popover/public-api.mjs +1 -1
  402. package/esm2022/popover/upd-popover.module.mjs +5 -5
  403. package/esm2022/popover/updevs-components-popover.mjs +1 -1
  404. package/esm2022/pricing-cards/index.mjs +2 -0
  405. package/esm2022/pricing-cards/models/price-item-feature.model.mjs +2 -0
  406. package/esm2022/pricing-cards/models/price-item-features-group.model.mjs +2 -0
  407. package/esm2022/pricing-cards/models/price-item-tag.model.mjs +2 -0
  408. package/esm2022/pricing-cards/models/price-item.model.mjs +2 -0
  409. package/esm2022/pricing-cards/models/public-api.mjs +5 -0
  410. package/esm2022/pricing-cards/pricing-cards.component.mjs +25 -0
  411. package/esm2022/pricing-cards/public-api.mjs +4 -0
  412. package/esm2022/pricing-cards/upd-pricing-cards.module.mjs +40 -0
  413. package/esm2022/pricing-cards/updevs-components-pricing-cards.mjs +5 -0
  414. package/esm2022/public-api.mjs +1 -1
  415. package/esm2022/table/abstractions/base-column.model.mjs +52 -0
  416. package/esm2022/table/abstractions/base.column.mjs +84 -0
  417. package/esm2022/table/abstractions/filters-operands.service.mjs +3 -0
  418. package/esm2022/table/abstractions/public-api.mjs +3 -0
  419. package/esm2022/table/assets/i18n/en.json +74 -0
  420. package/esm2022/table/assets/i18n/pt.json +74 -0
  421. package/esm2022/table/components/columns/boolean-column/boolean-column.component.mjs +26 -0
  422. package/esm2022/table/components/columns/date-time-column/date-time-column.component.mjs +13 -0
  423. package/esm2022/table/components/columns/number-column/number-column.component.mjs +13 -0
  424. package/esm2022/table/components/columns/text-column/text-column.component.mjs +31 -0
  425. package/esm2022/table/components/columns-manager/columns-manager.component.mjs +36 -0
  426. package/esm2022/table/components/filter-row/filter-row.component.mjs +114 -0
  427. package/esm2022/table/components/save-search/save-search.component.mjs +72 -0
  428. package/esm2022/table/components/search-section/search-section.component.mjs +93 -0
  429. package/esm2022/table/directives/public-api.mjs +2 -0
  430. package/esm2022/table/directives/table-column.directive.mjs +52 -0
  431. package/esm2022/table/index.mjs +2 -0
  432. package/esm2022/table/models/columns/boolean-column.model.mjs +22 -0
  433. package/esm2022/table/models/columns/date-time-column.model.mjs +16 -0
  434. package/esm2022/table/models/columns/guid-column.model.mjs +13 -0
  435. package/esm2022/table/models/columns/image-column.model.mjs +11 -0
  436. package/esm2022/table/models/columns/number-column.model.mjs +17 -0
  437. package/esm2022/table/models/columns/public-api.mjs +7 -0
  438. package/esm2022/table/models/columns/text-column.model.mjs +11 -0
  439. package/esm2022/table/models/enums/column-type.enum.mjs +15 -0
  440. package/esm2022/table/models/enums/public-api.mjs +2 -0
  441. package/esm2022/table/models/filter-item.model.mjs +2 -0
  442. package/esm2022/table/models/filter-operand.config.mjs +2 -0
  443. package/esm2022/table/models/operands-lists/boolean-filter-operands-list.model.mjs +25 -0
  444. package/esm2022/table/models/operands-lists/date-filter-operands-list.model.mjs +25 -0
  445. package/esm2022/table/models/operands-lists/date-or-number-operands-list.config.mjs +31 -0
  446. package/esm2022/table/models/operands-lists/filter-operands-list.config.mjs +31 -0
  447. package/esm2022/table/models/operands-lists/guid-filter-operands-list.model.mjs +16 -0
  448. package/esm2022/table/models/operands-lists/number-filter-operands-list.model.mjs +25 -0
  449. package/esm2022/table/models/operands-lists/string-filter-operands-list.model.mjs +45 -0
  450. package/esm2022/table/models/public-api.mjs +5 -0
  451. package/esm2022/table/models/saved-view.model.mjs +2 -0
  452. package/esm2022/table/models/table-config.model.mjs +29 -0
  453. package/esm2022/table/models/table.config.mjs +2 -0
  454. package/esm2022/table/models/upd-table-config.model.mjs +9 -0
  455. package/esm2022/table/models/upd-table.config.mjs +2 -0
  456. package/esm2022/table/public-api.mjs +6 -0
  457. package/esm2022/table/services/default-filters-operands.service.mjs +60 -0
  458. package/esm2022/table/services/storages/saved-views.storage.mjs +56 -0
  459. package/esm2022/table/services/stores/filters-operands.store.mjs +19 -0
  460. package/esm2022/table/services/upd-table-config.service.mjs +18 -0
  461. package/esm2022/table/table.component.mjs +439 -0
  462. package/esm2022/table/tools/filters.tools.mjs +48 -0
  463. package/esm2022/table/tools/table.constants.mjs +15 -0
  464. package/esm2022/table/upd-table.module.mjs +150 -0
  465. package/esm2022/table/updevs-components-table.mjs +5 -0
  466. package/esm2022/updevs-components.mjs +2 -2
  467. package/fesm2022/updevs-components-badge.mjs +89 -0
  468. package/fesm2022/updevs-components-badge.mjs.map +1 -0
  469. package/fesm2022/updevs-components-button.mjs +138 -136
  470. package/fesm2022/updevs-components-button.mjs.map +1 -1
  471. package/fesm2022/updevs-components-calendar.mjs +582 -0
  472. package/fesm2022/updevs-components-calendar.mjs.map +1 -0
  473. package/fesm2022/updevs-components-card.mjs +32 -32
  474. package/fesm2022/updevs-components-card.mjs.map +1 -1
  475. package/fesm2022/updevs-components-drag-and-drop.mjs +185 -0
  476. package/fesm2022/updevs-components-drag-and-drop.mjs.map +1 -0
  477. package/fesm2022/updevs-components-dropdown.mjs +78 -21
  478. package/fesm2022/updevs-components-dropdown.mjs.map +1 -1
  479. package/fesm2022/updevs-components-form-controls-abstractions.mjs +53 -0
  480. package/fesm2022/updevs-components-form-controls-abstractions.mjs.map +1 -0
  481. package/fesm2022/updevs-components-form-controls-checkbox.mjs +47 -57
  482. package/fesm2022/updevs-components-form-controls-checkbox.mjs.map +1 -1
  483. package/fesm2022/updevs-components-form-controls-date-picker.mjs +175 -0
  484. package/fesm2022/updevs-components-form-controls-date-picker.mjs.map +1 -0
  485. package/fesm2022/updevs-components-form-controls-file-upload.mjs +264 -0
  486. package/fesm2022/updevs-components-form-controls-file-upload.mjs.map +1 -0
  487. package/fesm2022/updevs-components-form-controls-input.mjs +80 -50
  488. package/fesm2022/updevs-components-form-controls-input.mjs.map +1 -1
  489. package/fesm2022/updevs-components-form-controls-radio.mjs +25 -30
  490. package/fesm2022/updevs-components-form-controls-radio.mjs.map +1 -1
  491. package/fesm2022/updevs-components-form-controls-select.mjs +185 -108
  492. package/fesm2022/updevs-components-form-controls-select.mjs.map +1 -1
  493. package/fesm2022/updevs-components-form-controls-textarea.mjs +21 -39
  494. package/fesm2022/updevs-components-form-controls-textarea.mjs.map +1 -1
  495. package/fesm2022/updevs-components-form-controls-time-picker.mjs +18 -18
  496. package/fesm2022/updevs-components-form-controls-time-picker.mjs.map +1 -1
  497. package/fesm2022/updevs-components-form.mjs +541 -10
  498. package/fesm2022/updevs-components-form.mjs.map +1 -1
  499. package/fesm2022/updevs-components-layout.mjs +774 -395
  500. package/fesm2022/updevs-components-layout.mjs.map +1 -1
  501. package/fesm2022/updevs-components-link.mjs +8 -8
  502. package/fesm2022/updevs-components-link.mjs.map +1 -1
  503. package/fesm2022/updevs-components-list.mjs +44 -58
  504. package/fesm2022/updevs-components-list.mjs.map +1 -1
  505. package/fesm2022/updevs-components-modal.mjs +504 -0
  506. package/fesm2022/updevs-components-modal.mjs.map +1 -0
  507. package/fesm2022/updevs-components-paginator.mjs +160 -0
  508. package/fesm2022/updevs-components-paginator.mjs.map +1 -0
  509. package/fesm2022/updevs-components-popover.mjs +41 -50
  510. package/fesm2022/updevs-components-popover.mjs.map +1 -1
  511. package/fesm2022/updevs-components-pricing-cards.mjs +69 -0
  512. package/fesm2022/updevs-components-pricing-cards.mjs.map +1 -0
  513. package/fesm2022/updevs-components-table.mjs +1754 -0
  514. package/fesm2022/updevs-components-table.mjs.map +1 -0
  515. package/fesm2022/updevs-components.mjs +17 -5
  516. package/fesm2022/updevs-components.mjs.map +1 -1
  517. package/form/components/dynamic-field/dynamic-field.component.d.ts +63 -0
  518. package/form/form.component.d.ts +64 -0
  519. package/form/models/attachment-rule.model.d.ts +35 -0
  520. package/form/models/button-field.model.d.ts +5 -0
  521. package/form/models/button-group-field.model.d.ts +5 -0
  522. package/form/models/checkbox-field.model.d.ts +4 -0
  523. package/form/models/checkbox-group-field.model.d.ts +6 -0
  524. package/form/models/dynamic-field.model.d.ts +50 -0
  525. package/form/models/enums/attachment-type.enum.d.ts +13 -0
  526. package/form/models/enums/dynamic-field.type.d.ts +15 -0
  527. package/form/models/enums/public-api.d.ts +2 -0
  528. package/form/models/file-upload-field.model.d.ts +16 -0
  529. package/form/models/form-config.d.ts +2 -0
  530. package/form/models/form-row.model.d.ts +10 -0
  531. package/form/models/form-update-on.type.d.ts +1 -0
  532. package/form/models/input-field.model.d.ts +9 -0
  533. package/form/models/masked-input-field.model.d.ts +6 -0
  534. package/form/models/public-api.d.ts +18 -0
  535. package/form/models/radio-field.model.d.ts +4 -0
  536. package/form/models/radio-group-field.model.d.ts +6 -0
  537. package/form/models/select-field.model.d.ts +29 -0
  538. package/form/models/single-select-field.model.d.ts +4 -0
  539. package/form/models/textarea-field.model.d.ts +10 -0
  540. package/form/models/validator-config.d.ts +5 -0
  541. package/form/public-api.d.ts +3 -1
  542. package/form/tools/errors-helper.d.ts +11 -0
  543. package/form/upd-form.module.d.ts +22 -0
  544. package/form-controls/abstractions/base-control.d.ts +29 -0
  545. package/form-controls/abstractions/index.d.ts +2 -0
  546. package/form-controls/abstractions/public-api.d.ts +2 -0
  547. package/form-controls/checkbox/checkbox.component.d.ts +14 -20
  548. package/form-controls/checkbox/upd-checkbox.module.d.ts +2 -1
  549. package/form-controls/date-picker/date-picker.component.d.ts +66 -0
  550. package/form-controls/date-picker/index.d.ts +1 -0
  551. package/form-controls/date-picker/public-api.d.ts +2 -0
  552. package/form-controls/date-picker/upd-date-picker.module.d.ts +12 -0
  553. package/form-controls/file-upload/file-upload-changed.event.d.ts +4 -0
  554. package/form-controls/file-upload/file-upload.component.d.ts +46 -0
  555. package/form-controls/file-upload/index.d.ts +1 -0
  556. package/form-controls/file-upload/public-api.d.ts +3 -0
  557. package/form-controls/file-upload/upd-file-upload.module.d.ts +14 -0
  558. package/form-controls/input/directives/input-append.directive.d.ts +1 -2
  559. package/form-controls/input/directives/input-prepend.directive.d.ts +1 -2
  560. package/form-controls/input/input.component.d.ts +24 -14
  561. package/form-controls/radio/radio.component.d.ts +5 -12
  562. package/form-controls/radio/upd-radio.module.d.ts +3 -1
  563. package/form-controls/select/components/multiple/select-multiple.component.d.ts +13 -2
  564. package/form-controls/select/components/single/select.component.d.ts +10 -2
  565. package/form-controls/select/models/abstractions/base-select.component.d.ts +35 -31
  566. package/form-controls/select/models/defaults.d.ts +8 -0
  567. package/form-controls/select/models/public-api.d.ts +1 -0
  568. package/form-controls/select/upd-select.module.d.ts +3 -2
  569. package/form-controls/textarea/textarea.component.d.ts +11 -15
  570. package/form-controls/time-picker/upd-time-picker.module.d.ts +2 -2
  571. package/index.d.ts +1 -4
  572. package/layout/abstractions/base-page.component.d.ts +1 -2
  573. package/layout/abstractions/base.layout.d.ts +15 -0
  574. package/layout/layouts/blank-layout/blank-layout.component.d.ts +5 -1
  575. package/layout/layouts/blank-layout/blank-layout.module.d.ts +8 -1
  576. package/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.d.ts +2 -9
  577. package/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.d.ts +14 -13
  578. package/layout/models/login-page-config.model.d.ts +46 -0
  579. package/layout/models/login-page.config.d.ts +44 -0
  580. package/layout/models/public-api.d.ts +1 -0
  581. package/layout/models/security-layout-config.model.d.ts +12 -0
  582. package/layout/models/security-layout.config.d.ts +10 -0
  583. package/layout/models/upd-layout-config.model.d.ts +9 -0
  584. package/layout/models/upd-layout.config.d.ts +9 -0
  585. package/layout/pages/auth-flow/auth-flow.module.d.ts +9 -2
  586. package/layout/pages/auth-flow/login/login.component.d.ts +20 -6
  587. package/layout/partials/footer/footer.component.d.ts +4 -15
  588. package/layout/partials/footer/footer.module.d.ts +9 -0
  589. package/layout/partials/footer/public-api.d.ts +1 -1
  590. package/layout/partials/header/header.component.d.ts +44 -26
  591. package/layout/partials/header/header.module.d.ts +12 -0
  592. package/layout/partials/header/public-api.d.ts +1 -0
  593. package/layout/partials/page-header/page-header.component.d.ts +2 -2
  594. package/layout/partials/sidebar/sidebar.component.d.ts +29 -4
  595. package/layout/upd-layout.module.d.ts +2 -1
  596. package/lib/index.d.ts +1 -0
  597. package/lib/models/public-api.d.ts +2 -0
  598. package/lib/models/row-column-size.d.ts +23 -0
  599. package/lib/public-api.d.ts +3 -0
  600. package/lib/tools/column-size.helper.d.ts +6 -0
  601. package/lib/tools/public-api.d.ts +2 -0
  602. package/lib/types/component-size.type.d.ts +1 -0
  603. package/lib/types/horizontal-vertical.type.d.ts +2 -0
  604. package/lib/types/public-api.d.ts +2 -0
  605. package/lib/types/validation-status.type.d.ts +1 -0
  606. package/lib/upd-components.module.d.ts +1 -0
  607. package/list/list.component.d.ts +4 -20
  608. package/list/models/list-item.d.ts +4 -2
  609. package/list/models/list-item.model.d.ts +4 -2
  610. package/list/upd-list.module.d.ts +2 -2
  611. package/modal/components/modal-container/modal-container.component.d.ts +74 -0
  612. package/modal/index.d.ts +1 -0
  613. package/modal/models/base.modal.d.ts +8 -0
  614. package/modal/models/modal-config.model.d.ts +32 -0
  615. package/modal/models/modal-ref.d.ts +6 -0
  616. package/modal/models/modal.config.d.ts +30 -0
  617. package/modal/models/public-api.d.ts +3 -0
  618. package/modal/public-api.d.ts +3 -0
  619. package/modal/services/modal-alert.service.d.ts +22 -0
  620. package/modal/services/modal.service.d.ts +12 -0
  621. package/modal/services/public-api.d.ts +2 -0
  622. package/modal/types/modal-footer-style.type.d.ts +1 -0
  623. package/modal/types/modal-size.type.d.ts +1 -0
  624. package/modal/upd-modal.module.d.ts +18 -0
  625. package/package.json +72 -11
  626. package/paginator/index.d.ts +1 -0
  627. package/paginator/paginator.component.d.ts +42 -0
  628. package/paginator/public-api.d.ts +2 -0
  629. package/paginator/upd-paginator.module.d.ts +14 -0
  630. package/popover/popover.component.d.ts +2 -2
  631. package/popover/popover.directive.d.ts +8 -10
  632. package/pricing-cards/index.d.ts +1 -0
  633. package/pricing-cards/models/price-item-feature.model.d.ts +5 -0
  634. package/pricing-cards/models/price-item-features-group.model.d.ts +5 -0
  635. package/pricing-cards/models/price-item-tag.model.d.ts +6 -0
  636. package/pricing-cards/models/price-item.model.d.ts +20 -0
  637. package/pricing-cards/models/public-api.d.ts +4 -0
  638. package/pricing-cards/pricing-cards.component.d.ts +11 -0
  639. package/pricing-cards/public-api.d.ts +3 -0
  640. package/pricing-cards/upd-pricing-cards.module.d.ts +12 -0
  641. package/public-api.d.ts +1 -0
  642. package/table/abstractions/base-column.model.d.ts +31 -0
  643. package/table/abstractions/base.column.d.ts +26 -0
  644. package/table/abstractions/filters-operands.service.d.ts +8 -0
  645. package/table/abstractions/public-api.d.ts +2 -0
  646. package/table/components/columns/boolean-column/boolean-column.component.d.ts +9 -0
  647. package/table/components/columns/date-time-column/date-time-column.component.d.ts +7 -0
  648. package/table/components/columns/number-column/number-column.component.d.ts +7 -0
  649. package/table/components/columns/text-column/text-column.component.d.ts +9 -0
  650. package/table/components/columns-manager/columns-manager.component.d.ts +15 -0
  651. package/table/components/filter-row/filter-row.component.d.ts +40 -0
  652. package/table/components/save-search/save-search.component.d.ts +17 -0
  653. package/table/components/search-section/search-section.component.d.ts +36 -0
  654. package/table/directives/public-api.d.ts +1 -0
  655. package/table/directives/table-column.directive.d.ts +14 -0
  656. package/table/index.d.ts +1 -0
  657. package/table/models/columns/boolean-column.model.d.ts +15 -0
  658. package/table/models/columns/date-time-column.model.d.ts +8 -0
  659. package/table/models/columns/guid-column.model.d.ts +4 -0
  660. package/table/models/columns/image-column.model.d.ts +6 -0
  661. package/table/models/columns/number-column.model.d.ts +8 -0
  662. package/table/models/columns/public-api.d.ts +6 -0
  663. package/table/models/columns/text-column.model.d.ts +6 -0
  664. package/table/models/enums/column-type.enum.d.ts +13 -0
  665. package/table/models/enums/public-api.d.ts +1 -0
  666. package/table/models/filter-item.model.d.ts +6 -0
  667. package/table/models/filter-operand.config.d.ts +9 -0
  668. package/table/models/operands-lists/boolean-filter-operands-list.model.d.ts +6 -0
  669. package/table/models/operands-lists/date-filter-operands-list.model.d.ts +6 -0
  670. package/table/models/operands-lists/date-or-number-operands-list.config.d.ts +5 -0
  671. package/table/models/operands-lists/filter-operands-list.config.d.ts +5 -0
  672. package/table/models/operands-lists/guid-filter-operands-list.model.d.ts +6 -0
  673. package/table/models/operands-lists/number-filter-operands-list.model.d.ts +6 -0
  674. package/table/models/operands-lists/string-filter-operands-list.model.d.ts +6 -0
  675. package/table/models/public-api.d.ts +4 -0
  676. package/table/models/saved-view.model.d.ts +11 -0
  677. package/table/models/table-config.model.d.ts +33 -0
  678. package/table/models/table.config.d.ts +31 -0
  679. package/table/models/upd-table-config.model.d.ts +6 -0
  680. package/table/models/upd-table.config.d.ts +6 -0
  681. package/table/public-api.d.ts +5 -0
  682. package/table/services/default-filters-operands.service.d.ts +17 -0
  683. package/table/services/storages/saved-views.storage.d.ts +19 -0
  684. package/table/services/stores/filters-operands.store.d.ts +11 -0
  685. package/table/services/upd-table-config.service.d.ts +12 -0
  686. package/table/table.component.d.ts +81 -0
  687. package/table/tools/filters.tools.d.ts +9 -0
  688. package/table/tools/table.constants.d.ts +15 -0
  689. package/table/upd-table.module.d.ts +40 -0
  690. package/esm2022/form/form.module.mjs +0 -18
  691. package/esm2022/layout/partials/footer/footer-copyright.directive.mjs +0 -15
  692. package/form/form.module.d.ts +0 -7
  693. package/layout/partials/footer/footer-copyright.directive.d.ts +0 -6
@@ -1,24 +1,31 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Directive, Component, NgModule, TemplateRef, ViewEncapsulation, HostBinding, ContentChild, Input, InjectionToken, Injectable, Inject } from '@angular/core';
3
- import * as i1$1 from '@updevs/sdk/layout';
4
- import { BaseComponent, LayoutService, UpdCoreLayoutModule } from '@updevs/sdk/layout';
5
- import * as i2 from '@angular/common';
2
+ import { inject, Directive, HostBinding, ViewEncapsulation, Component, NgModule, viewChild, ElementRef, input, computed, signal, InjectionToken, Inject, Injectable, model } from '@angular/core';
3
+ import { BaseComponent, LayoutService, UpdCoreLayoutConfigService, PreferencesStorage, UpdCoreLayoutModule } from '@updevs/sdk/layout';
4
+ import * as i1 from '@angular/common';
6
5
  import { CommonModule } from '@angular/common';
7
- import * as i1$2 from '@angular/router';
8
- import { NavigationStart, RouterModule } from '@angular/router';
9
- import * as i4 from '@updevs/icons';
6
+ import * as i1$3 from '@angular/router';
7
+ import { RouterOutlet, Router, NavigationStart, RouterModule } from '@angular/router';
8
+ import * as i1$2 from '@updevs/icons';
10
9
  import { UpdIconsModule } from '@updevs/icons';
11
- import * as i2$1 from '@updevs/components/button';
12
- import { UpdButtonModule } from '@updevs/components/button';
13
- import * as i5 from '@updevs/components/link';
10
+ import * as i2 from '@updevs/components/dropdown';
11
+ import { UpdDropdownModule } from '@updevs/components/dropdown';
12
+ import * as i3 from '@updevs/components/link';
14
13
  import { UpdLinkModule } from '@updevs/components/link';
15
- import * as i1 from '@ngneat/transloco';
16
- import { TranslocoModule } from '@ngneat/transloco';
17
- import { RouteDataModel } from '@updevs/sdk/routes';
18
- import { filter } from 'rxjs';
19
- import { AuthService } from '@updevs/sdk/security';
20
- import * as i3 from '@angular/forms';
21
- import { FormsModule } from '@angular/forms';
14
+ import * as i1$1 from '@jsverse/transloco';
15
+ import { TranslocoModule, TranslocoService, TranslocoPipe, TranslocoDirective } from '@jsverse/transloco';
16
+ import { TextService } from '@updevs/sdk';
17
+ import { NotificationsService, UpdNotificationsModule } from '@updevs/sdk/notifications';
18
+ import { SecurityStorage, AuthService } from '@updevs/sdk/security';
19
+ import * as i1$4 from '@updevs/components/button';
20
+ import { UpdButtonModule } from '@updevs/components/button';
21
+ import { MenuService } from '@updevs/sdk/routes';
22
+ import { filter, finalize } from 'rxjs';
23
+ import * as i3$1 from '@angular/forms';
24
+ import { FormGroup, Validators, FormsModule } from '@angular/forms';
25
+ import * as i7 from '@updevs/components/form';
26
+ import { DynamicFieldType, UpdFormModule } from '@updevs/components/form';
27
+ import * as i6 from '@updevs/components/card';
28
+ import { UpdCardModule } from '@updevs/components/card';
22
29
 
23
30
  /**
24
31
  * Basic page structure.
@@ -26,93 +33,23 @@ import { FormsModule } from '@angular/forms';
26
33
  // eslint-disable-next-line @angular-eslint/directive-class-suffix
27
34
  class BasePageComponent extends BaseComponent {
28
35
  constructor() {
29
- super();
36
+ super(...arguments);
30
37
  this._layoutService = inject(LayoutService);
31
38
  }
32
39
  ngOnDestroy() {
33
40
  super.ngOnDestroy();
34
- // TODO: clear subheader.
41
+ this._layoutService.pageHeader.set(undefined);
35
42
  }
36
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BasePageComponent, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
37
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.11", type: BasePageComponent, usesInheritance: true, ngImport: i0 }); }
38
- }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BasePageComponent, decorators: [{
40
- type: Directive,
41
- args: [{}]
42
- }], ctorParameters: function () { return []; } });
43
-
44
- class BlankLayoutComponent {
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BlankLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
46
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: BlankLayoutComponent, selector: "upd-blank-layout", ngImport: i0, template: "<p>blank-layout works!</p>\n", styles: [""] }); }
43
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BasePageComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
44
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.0", type: BasePageComponent, usesInheritance: true, ngImport: i0 }); }
47
45
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BlankLayoutComponent, decorators: [{
49
- type: Component,
50
- args: [{ selector: 'upd-blank-layout', template: "<p>blank-layout works!</p>\n" }]
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BasePageComponent, decorators: [{
47
+ type: Directive
51
48
  }] });
52
49
 
53
- class BlankLayoutModule {
54
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BlankLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
55
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.11", ngImport: i0, type: BlankLayoutModule, declarations: [BlankLayoutComponent], imports: [CommonModule], exports: [BlankLayoutComponent] }); }
56
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BlankLayoutModule, imports: [CommonModule] }); }
57
- }
58
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: BlankLayoutModule, decorators: [{
59
- type: NgModule,
60
- args: [{
61
- imports: [
62
- CommonModule
63
- ],
64
- declarations: [
65
- BlankLayoutComponent
66
- ],
67
- exports: [
68
- BlankLayoutComponent
69
- ]
70
- }]
71
- }] });
72
-
73
- var Footer$1 = {
74
- AllRightsReserved: "All rights reserved."
75
- };
76
- var en = {
77
- Footer: Footer$1
78
- };
79
-
80
- var en$1 = /*#__PURE__*/Object.freeze({
81
- __proto__: null,
82
- Footer: Footer$1,
83
- default: en
84
- });
85
-
86
- var Footer = {
87
- AllRightsReserved: "Todos os direitos reservados."
88
- };
89
- var pt = {
90
- Footer: Footer
91
- };
92
-
93
- var pt$1 = /*#__PURE__*/Object.freeze({
94
- __proto__: null,
95
- Footer: Footer,
96
- default: pt
97
- });
98
-
99
- class FooterCopyrightDirective {
100
- constructor() {
101
- }
102
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: FooterCopyrightDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
103
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.11", type: FooterCopyrightDirective, selector: "[updFooterCopyright]", ngImport: i0 }); }
104
- }
105
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: FooterCopyrightDirective, decorators: [{
106
- type: Directive,
107
- args: [{
108
- selector: '[updFooterCopyright]'
109
- }]
110
- }], ctorParameters: function () { return []; } });
111
-
112
50
  class FooterComponent extends BaseComponent {
113
- constructor(translocoService) {
114
- super();
115
- this.translocoService = translocoService;
51
+ constructor() {
52
+ super(...arguments);
116
53
  this.wrapperClasses = '';
117
54
  /**
118
55
  * Whether the footer will always be shown.
@@ -130,20 +67,11 @@ class FooterComponent extends BaseComponent {
130
67
  * Current year.
131
68
  */
132
69
  this.currentYear = new Date().getFullYear();
133
- /**
134
- * Text displayed in the copyright section before the symbol and year.
135
- */
136
- this.copyrightPrefix = 'Copyright';
137
- /**
138
- * Text displayed in the copyright section after the symbol and year.
139
- */
140
- this.copyrightSuffix = '';
70
+ this.layoutService = inject(LayoutService);
141
71
  this.baseWrapperClasses = 'footer d-print-none';
142
72
  }
143
73
  ngOnInit() {
144
- const footerCpsSub = this.translocoService.selectTranslate('Footer.AllRightsReserved').subscribe(r => this.copyrightSuffix = r);
145
74
  this.updateWrapperClasses();
146
- this.addSubscriptions(footerCpsSub);
147
75
  }
148
76
  ngOnChanges(changes) {
149
77
  if (!!changes['isSticky'].currentValue || !!changes['isTransparent'].currentValue) {
@@ -155,218 +83,651 @@ class FooterComponent extends BaseComponent {
155
83
  const transparentCls = this.isTransparent ? ' footer-transparent' : '';
156
84
  this.wrapperClasses = `${this.baseWrapperClasses}${stickyBottomCls}${transparentCls}`;
157
85
  }
158
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: FooterComponent, deps: [{ token: i1.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
159
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: FooterComponent, selector: "upd-footer", host: { properties: { "class": "this.wrapperClasses" } }, queries: [{ propertyName: "footerCopyrightTemplate", first: true, predicate: FooterCopyrightDirective, descendants: true, read: TemplateRef, static: true }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"container-xl\">\n <div class=\"row text-center align-items-center flex-row-reverse\">\n <div class=\"col-lg-auto ms-lg-auto\">\n <ul *ngIf=\"links.length > 0\" class=\"list-inline list-inline-dots mb-0\">\n <li *ngFor=\"let link of links\" class=\"list-inline-item\">\n <a href=\"{{link.url}}\" target=\"{{link.target}}\" class=\"link-secondary\">\n <span [innerHTML]=\"link.text\"></span>\n <ng-container *transloco=\"let t\">\n {{t('Layout.Aloha')}}\n </ng-container>\n </a>\n </li>\n </ul>\n </div>\n <div class=\"col-12 col-lg-auto mt-3 mt-lg-0\">\n <ng-container *ngIf=\"!!footerCopyrightTemplate; else defaultFooterTpl\"\n [ngTemplateOutlet]=\"footerCopyrightTemplate\"></ng-container>\n <ng-template #defaultFooterTpl>\n <ul class=\"list-inline list-inline-dots mb-0\">\n <li class=\"list-inline-item\">\n {{copyrightPrefix}} &copy; {{currentYear}} {{copyrightSuffix}}\n </li>\n <li *ngIf=\"!!version\" class=\"list-inline-item\">\n {{version}}\n </li>\n </ul>\n </ng-template>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoLang", "translocoLoadingTpl"] }], encapsulation: i0.ViewEncapsulation.None }); }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
87
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: FooterComponent, selector: "upd-footer", host: { properties: { "class": "this.wrapperClasses" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"container-xl\">\n <div class=\"row text-center align-items-center flex-row-reverse\">\n <div class=\"col-lg-auto ms-lg-auto\">\n @if (!!layoutService.rightFooter()) {\n <ng-container [ngTemplateOutlet]=\"layoutService.rightFooter()!\"></ng-container>\n }\n\n @if (links.length > 0) {\n <ul class=\"list-inline list-inline-dots mb-0\">\n @for (link of links; track link) {\n <li class=\"list-inline-item\">\n <a href=\"{{link.url}}\" target=\"{{link.target}}\" class=\"link-secondary\">\n <span [innerHTML]=\"link.text\"></span>\n </a>\n </li>\n }\n </ul>\n }\n </div>\n <div class=\"col-12 col-lg-auto mt-3 mt-lg-0\">\n <ul class=\"list-inline list-inline-dots mb-0\">\n <li class=\"list-inline-item\">\n <ng-container *transloco=\"let t; prefix: 'UpDevs.Footer'\">\n {{ t('Prefix') }} {{ t('Symbol') }} {{ currentYear }} {{ t('Suffix') }}\n </ng-container>\n </li>\n @if (!!version) {\n <li class=\"list-inline-item\">\n {{ version }}\n </li>\n }\n </ul>\n\n @if (!!layoutService.leftFooter()) {\n <ng-container [ngTemplateOutlet]=\"layoutService.leftFooter()!\"></ng-container>\n }\n </div>\n </div>\n</div>\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"] }], encapsulation: i0.ViewEncapsulation.None }); }
160
88
  }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: FooterComponent, decorators: [{
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FooterComponent, decorators: [{
162
90
  type: Component,
163
- args: [{ selector: 'upd-footer', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-xl\">\n <div class=\"row text-center align-items-center flex-row-reverse\">\n <div class=\"col-lg-auto ms-lg-auto\">\n <ul *ngIf=\"links.length > 0\" class=\"list-inline list-inline-dots mb-0\">\n <li *ngFor=\"let link of links\" class=\"list-inline-item\">\n <a href=\"{{link.url}}\" target=\"{{link.target}}\" class=\"link-secondary\">\n <span [innerHTML]=\"link.text\"></span>\n <ng-container *transloco=\"let t\">\n {{t('Layout.Aloha')}}\n </ng-container>\n </a>\n </li>\n </ul>\n </div>\n <div class=\"col-12 col-lg-auto mt-3 mt-lg-0\">\n <ng-container *ngIf=\"!!footerCopyrightTemplate; else defaultFooterTpl\"\n [ngTemplateOutlet]=\"footerCopyrightTemplate\"></ng-container>\n <ng-template #defaultFooterTpl>\n <ul class=\"list-inline list-inline-dots mb-0\">\n <li class=\"list-inline-item\">\n {{copyrightPrefix}} &copy; {{currentYear}} {{copyrightSuffix}}\n </li>\n <li *ngIf=\"!!version\" class=\"list-inline-item\">\n {{version}}\n </li>\n </ul>\n </ng-template>\n </div>\n </div>\n</div>\n" }]
164
- }], ctorParameters: function () { return [{ type: i1.TranslocoService }]; }, propDecorators: { wrapperClasses: [{
91
+ args: [{ selector: 'upd-footer', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-xl\">\n <div class=\"row text-center align-items-center flex-row-reverse\">\n <div class=\"col-lg-auto ms-lg-auto\">\n @if (!!layoutService.rightFooter()) {\n <ng-container [ngTemplateOutlet]=\"layoutService.rightFooter()!\"></ng-container>\n }\n\n @if (links.length > 0) {\n <ul class=\"list-inline list-inline-dots mb-0\">\n @for (link of links; track link) {\n <li class=\"list-inline-item\">\n <a href=\"{{link.url}}\" target=\"{{link.target}}\" class=\"link-secondary\">\n <span [innerHTML]=\"link.text\"></span>\n </a>\n </li>\n }\n </ul>\n }\n </div>\n <div class=\"col-12 col-lg-auto mt-3 mt-lg-0\">\n <ul class=\"list-inline list-inline-dots mb-0\">\n <li class=\"list-inline-item\">\n <ng-container *transloco=\"let t; prefix: 'UpDevs.Footer'\">\n {{ t('Prefix') }} {{ t('Symbol') }} {{ currentYear }} {{ t('Suffix') }}\n </ng-container>\n </li>\n @if (!!version) {\n <li class=\"list-inline-item\">\n {{ version }}\n </li>\n }\n </ul>\n\n @if (!!layoutService.leftFooter()) {\n <ng-container [ngTemplateOutlet]=\"layoutService.leftFooter()!\"></ng-container>\n }\n </div>\n </div>\n</div>\n" }]
92
+ }], propDecorators: { wrapperClasses: [{
165
93
  type: HostBinding,
166
94
  args: ['class']
167
- }], footerCopyrightTemplate: [{
168
- type: ContentChild,
169
- args: [FooterCopyrightDirective, { read: TemplateRef, static: true }]
170
95
  }] } });
171
96
 
97
+ class FooterModule {
98
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
99
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: FooterModule, declarations: [FooterComponent], imports: [CommonModule,
100
+ TranslocoModule], exports: [FooterComponent] }); }
101
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FooterModule, imports: [CommonModule,
102
+ TranslocoModule] }); }
103
+ }
104
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FooterModule, decorators: [{
105
+ type: NgModule,
106
+ args: [{
107
+ imports: [
108
+ CommonModule,
109
+ TranslocoModule
110
+ ],
111
+ declarations: [
112
+ FooterComponent
113
+ ],
114
+ exports: [
115
+ FooterComponent
116
+ ]
117
+ }]
118
+ }] });
119
+
172
120
  class HeaderComponent extends BaseComponent {
173
- constructor(coreLayoutConfigService, layoutService, translocoService) {
174
- super();
175
- this.coreLayoutConfigService = coreLayoutConfigService;
176
- this.layoutService = layoutService;
177
- this.translocoService = translocoService;
178
- this.wrapperClasses = '';
179
- this.style = 'light';
180
- this.showSearchBar = true;
181
- this.nextThemeIcon = 'moon';
182
- this.nextThemeColor = 'black';
183
- this.currentNotificationsIcon = 'bell';
184
- this.hasNewNotifications = false;
185
- this.showNotifications = false;
186
- this.showLanguageSwitcher = true; // TODO: add on config.
187
- this.showUserMenu = false;
188
- this.baseWrapperClasses = 'navbar navbar-expand-md d-none d-lg-flex d-print-none';
121
+ constructor() {
122
+ super(...arguments);
123
+ this.languageSwitcherRef = viewChild('languageSwitcherBtn', { read: ElementRef });
124
+ this.notificationsRef = viewChild('notificationsBtn', { read: ElementRef });
125
+ this.loggedUserRef = viewChild('loggedUserBtn', { read: ElementRef });
126
+ this.isLanguageSwitcherDropdownOpen = false;
127
+ this.isNotificationsDropdownOpen = false;
128
+ this.isLoggedUserDropdownOpen = false;
129
+ this.style = input('light');
130
+ this.nextThemeIcon = computed(() => this.currentPreferences()?.isDarkTheme ? 'sun' : 'moon-stars');
131
+ this.currentNotificationsIcon = computed(() => this.hasNewNotifications() ? 'bell-ringing' : 'bell');
132
+ this.hasNewNotifications = computed(() => this.currentNotifications().some(n => !n.dateRead));
133
+ this.userInfo = computed(() => this.securityStorage.getUserInfo());
134
+ this.textService = inject(TextService);
135
+ this.isSidebarMobileOpen = signal(false);
136
+ this.shouldBlinkIfNewNotifications = computed(() => !!this.coreLayoutConfigService.config.shouldBlinkIfNewNotifications);
137
+ this.languagesOptions = computed(() => {
138
+ const allLanguagesOptions = [];
139
+ const availableLanguages = (this.coreLayoutConfigService.config.availableLanguages || {});
140
+ Object.keys(availableLanguages).forEach(key => {
141
+ allLanguagesOptions.push({
142
+ id: key,
143
+ type: 'default',
144
+ text: availableLanguages[key],
145
+ isActive: this.currentLanguageKey() === key
146
+ });
147
+ });
148
+ return allLanguagesOptions;
149
+ });
150
+ this.loggedUserOptions = computed(() => {
151
+ const userActions = [];
152
+ this.coreLayoutConfigService.config.loggedUserMenuActions.forEach(act => userActions.push({
153
+ id: act.id(),
154
+ text: act.text(),
155
+ type: 'default',
156
+ icon: act.iconModel?.()
157
+ }));
158
+ return userActions;
159
+ });
160
+ this.userIdentification = computed(() => !!this.userInfo() ? this.coreLayoutConfigService.config.getUserName(this.userInfo()) : '');
161
+ this.userDescription = computed(() => !!this.coreLayoutConfigService.config.getUserDescription
162
+ ? this.coreLayoutConfigService.config.getUserDescription(this.userInfo())
163
+ : '');
164
+ this.latestNotifications = computed(() => {
165
+ const unreadNotifications = this.currentNotifications()
166
+ .filter(n => !n.dateRead)
167
+ .sort((a, b) => new Date(b.dateReceived).getTime() - new Date(a.dateReceived).getTime())
168
+ .slice(0, this.coreLayoutConfigService.config.numberOfLastNotificationsDisplayed);
169
+ const readNotifications = this.currentNotifications()
170
+ .filter(n => !!n.dateRead)
171
+ .sort((a, b) => new Date(b.dateReceived).getTime() - new Date(a.dateReceived).getTime())
172
+ .slice(0, this.coreLayoutConfigService.config.numberOfLastNotificationsDisplayed);
173
+ return [
174
+ ...unreadNotifications,
175
+ ...readNotifications
176
+ ].slice(0, this.coreLayoutConfigService.config.numberOfLastNotificationsDisplayed);
177
+ });
178
+ this.userInitials = computed(() => {
179
+ const firstChar = this.userIdentification().charAt(0);
180
+ const lastSpaceIndex = this.userIdentification().lastIndexOf(' ');
181
+ const firstAfterLastSpace = lastSpaceIndex !== -1 ? this.userIdentification().charAt(lastSpaceIndex + 1) : '';
182
+ return `${firstChar}${firstAfterLastSpace}`;
183
+ });
184
+ this.securityStorage = inject(SecurityStorage);
185
+ this.coreLayoutConfigService = inject(UpdCoreLayoutConfigService);
186
+ this.layoutService = inject(LayoutService);
187
+ this.translocoService = inject(TranslocoService);
188
+ this.preferencesStorage = inject(PreferencesStorage);
189
+ this.notificationsService = inject(NotificationsService);
190
+ this.currentPreferences = this.preferencesStorage.getPreferences();
191
+ this.currentNotifications = this.notificationsService.notifications;
192
+ this.currentLanguageKey = signal('');
193
+ this.wrapperClasses = computed(() => `navbar navbar-expand-md d-none d-lg-flex d-print-none navbar-${this.style()}`);
194
+ // eslint-disable-next-line @typescript-eslint/member-ordering
195
+ this.config = computed(() => this.layoutService.mainHeaderConfig());
196
+ }
197
+ get classes() {
198
+ return this.wrapperClasses();
189
199
  }
190
200
  ngOnInit() {
191
- this.updateWrapperClasses();
192
- if (this.coreLayoutConfigService.config.showNotificationsButton) {
193
- this.setupNotifications();
201
+ if (!!this.currentPreferences()?.isDarkTheme) {
202
+ this.layoutService.setDarkMode();
194
203
  }
195
- if (this.coreLayoutConfigService.config.showUserMenu) {
196
- this.showUserMenu = true;
197
- }
198
- }
199
- ngOnChanges(changes) {
200
- if (!!changes['style'].currentValue) {
201
- this.updateWrapperClasses();
204
+ if (!!this.currentPreferences()?.currentLanguageCode) {
205
+ const code = this.currentPreferences().currentLanguageCode;
206
+ this.currentLanguageKey.set(code);
207
+ this.translocoService.setActiveLang(code);
202
208
  }
203
209
  }
204
210
  switchTheme() {
205
- const isDarkMode = this.nextThemeIcon === 'moon';
206
- this.nextThemeIcon = isDarkMode ? 'sun' : 'moon';
207
- this.nextThemeColor = isDarkMode ? 'white' : 'black';
208
- this.layoutService.toggleDarkMode(isDarkMode);
211
+ this.layoutService.toggleDarkMode();
209
212
  }
210
- // TODO: implement.
211
- switchLanguage() {
212
- const currentLang = this.translocoService.getActiveLang();
213
- this.translocoService.setActiveLang(currentLang === 'en' ? 'pt' : 'en');
213
+ switchLanguage(item) {
214
+ this.currentLanguageKey.set(item.id);
215
+ this.translocoService.setActiveLang(item.id);
216
+ this.preferencesStorage.savePreferences({ ...this.currentPreferences(), currentLanguageCode: item.id });
217
+ this.layoutService.notifyUserChangedLanguage(item.id);
218
+ this.isLanguageSwitcherDropdownOpen = false;
214
219
  }
215
- openNotifications() {
216
- this.updateNotificationsIcon();
220
+ selectLoggedUserMenuItem(item) {
221
+ const btn = this.coreLayoutConfigService.config.loggedUserMenuActions.find(b => b.id() === item.id);
222
+ if (!!btn?.clickFunction) {
223
+ btn.clickFunction({ data: this.userInfo() });
224
+ }
217
225
  }
218
- setupNotifications() {
219
- this.showNotifications = true;
226
+ readNotification(notification) {
227
+ if (!notification.dateRead) {
228
+ this.notificationsService.markAsRead(notification.id);
229
+ }
230
+ this.notificationsService.clickOnNotification(notification);
220
231
  }
221
- updateNotificationsIcon() {
222
- this.currentNotificationsIcon = this.currentNotificationsIcon === 'bell' ? 'bell-ringing' : 'bell';
223
- this.hasNewNotifications = !this.hasNewNotifications;
232
+ removeNotification(notification) {
233
+ this.notificationsService.removeNotifications(notification.id);
224
234
  }
225
- updateWrapperClasses() {
226
- this.wrapperClasses = `${this.baseWrapperClasses} navbar-${this.style}`;
235
+ toggleSidebarOnMobile() {
236
+ this.isSidebarMobileOpen.set(!this.isSidebarMobileOpen());
227
237
  }
228
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: HeaderComponent, deps: [{ token: i1$1.UpdCoreLayoutConfigService }, { token: i1$1.LayoutService }, { token: i1.TranslocoService }], target: i0.ɵɵFactoryTarget.Component }); }
229
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: HeaderComponent, selector: "upd-header", inputs: { style: "style", showSearchBar: "showSearchBar" }, host: { properties: { "class": "this.wrapperClasses" } }, usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"container-xl\">\n <button class=\"navbar-toggler\" type=\"button\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-nav flex-row order-md-last\">\n <div class=\"d-none d-md-flex me-3\">\n <div class=\"nav-item\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"switchTheme()\">\n <upd-icon [tablerIcon]=\"nextThemeIcon\"></upd-icon>\n </upd-link>\n </div>\n <div *ngIf=\"showLanguageSwitcher\" class=\"nav-item\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"switchLanguage()\">\n <upd-icon tablerIcon=\"flag\"></upd-icon>\n </upd-link>\n </div>\n <div *ngIf=\"showNotifications\" class=\"nav-item dropdown d-none d-md-flex\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"openNotifications()\">\n <upd-icon [tablerIcon]=\"currentNotificationsIcon\"></upd-icon>\n <span *ngIf=\"hasNewNotifications\" class=\"badge bg-red\"></span>\n </upd-link>\n <div class=\"dropdown-menu dropdown-menu-arrow dropdown-menu-end dropdown-menu-card\">\n <div class=\"card\">\n <div class=\"card-header\">\n <h3 class=\"card-title\">Last updates</h3>\n </div>\n <div class=\"list-group list-group-flush list-group-hoverable\">\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\"><span\n class=\"status-dot status-dot-animated bg-red d-block\"></span></div>\n <div class=\"col text-truncate\">\n <a href=\"#\" class=\"text-body d-block\">Example 1</a>\n <div class=\"d-block text-muted text-truncate mt-n1\">\n Change deprecated html tags to text decoration classes (#29604)\n </div>\n </div>\n <div class=\"col-auto\">\n <a href=\"#\" class=\"list-group-item-actions\">\n <!-- Download SVG icon from http://tabler-icons.io/i/star -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-muted\"\n width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"/>\n </svg>\n </a>\n </div>\n </div>\n </div>\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\"><span class=\"status-dot d-block\"></span></div>\n <div class=\"col text-truncate\">\n <a href=\"#\" class=\"text-body d-block\">Example 2</a>\n <div class=\"d-block text-muted text-truncate mt-n1\">\n justify-content:between \u21D2 justify-content:space-between (#29734)\n </div>\n </div>\n <div class=\"col-auto\">\n <a href=\"#\" class=\"list-group-item-actions show\">\n <!-- Download SVG icon from http://tabler-icons.io/i/star -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-yellow\"\n width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"/>\n </svg>\n </a>\n </div>\n </div>\n </div>\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\"><span class=\"status-dot d-block\"></span></div>\n <div class=\"col text-truncate\">\n <a href=\"#\" class=\"text-body d-block\">Example 3</a>\n <div class=\"d-block text-muted text-truncate mt-n1\">\n Update change-version.js (#29736)\n </div>\n </div>\n <div class=\"col-auto\">\n <a href=\"#\" class=\"list-group-item-actions\">\n <!-- Download SVG icon from http://tabler-icons.io/i/star -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-muted\"\n width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"/>\n </svg>\n </a>\n </div>\n </div>\n </div>\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\"><span\n class=\"status-dot status-dot-animated bg-green d-block\"></span></div>\n <div class=\"col text-truncate\">\n <a href=\"#\" class=\"text-body d-block\">Example 4</a>\n <div class=\"d-block text-muted text-truncate mt-n1\">\n Regenerate package-lock.json (#29730)\n </div>\n </div>\n <div class=\"col-auto\">\n <a href=\"#\" class=\"list-group-item-actions\">\n <!-- Download SVG icon from http://tabler-icons.io/i/star -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-muted\"\n width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"/>\n </svg>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"showUserMenu\" class=\"nav-item dropdown\">\n <a href=\"#\" class=\"nav-link d-flex lh-1 text-reset p-0\" data-bs-toggle=\"dropdown\"\n aria-label=\"Open user menu\">\n <!--<span class=\"avatar avatar-sm\" style=\"background-image: url(./static/avatars/000m.jpg)\"></span>-->\n <span class=\"avatar avatar-sm\"></span>\n <div class=\"d-none d-xl-block ps-2\">\n <div>Eros Stein</div>\n <div class=\"mt-1 small text-muted\">Administrator</div>\n </div>\n </a>\n <div class=\"dropdown-menu dropdown-menu-end dropdown-menu-arrow\">\n <a href=\"#\" class=\"dropdown-item\">Status</a>\n <a href=\"./profile.html\" class=\"dropdown-item\">Profile</a>\n <a href=\"#\" class=\"dropdown-item\">Feedback</a>\n <div class=\"dropdown-divider\"></div>\n <a href=\"./settings.html\" class=\"dropdown-item\">Settings</a>\n <a href=\"./sign-in.html\" class=\"dropdown-item\">Logout</a>\n </div>\n </div>\n </div>\n <div *ngIf=\"showSearchBar\" class=\"collapse navbar-collapse\">\n <div>\n <form autocomplete=\"off\" novalidate>\n <div class=\"input-icon\">\n <span class=\"input-icon-addon\">\n <upd-icon tablerIcon=\"search\"></upd-icon>\n </span>\n <input type=\"text\" value=\"\" class=\"form-control\" placeholder=\"Search\u2026\">\n </div>\n </form>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "removeDefaultClasses", "customClasses", "tablerIcon", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i5.LinkComponent, selector: "upd-link", inputs: ["href", "target", "customClasses", "isNavigation"], outputs: ["clicked"] }], encapsulation: i0.ViewEncapsulation.None }); }
238
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
239
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: HeaderComponent, selector: "upd-header", inputs: { style: { classPropertyName: "style", publicName: "style", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "this.classes" } }, viewQueries: [{ propertyName: "languageSwitcherRef", first: true, predicate: ["languageSwitcherBtn"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "notificationsRef", first: true, predicate: ["notificationsBtn"], descendants: true, read: ElementRef, isSignal: true }, { propertyName: "loggedUserRef", first: true, predicate: ["loggedUserBtn"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container-xl\">\n <button class=\"navbar-toggler\" type=\"button\" (click)=\"toggleSidebarOnMobile()\" [attr.aria-expanded]=\"isSidebarMobileOpen()\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-nav flex-row order-md-last\">\n <div class=\"d-none d-md-flex me-3\">\n @if (!!config().showThemeSwitcher) {\n <div class=\"nav-item\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"switchTheme()\">\n <upd-icon [tablerIcon]=\"nextThemeIcon()\"></upd-icon>\n </upd-link>\n </div>\n }\n @if (!!config().showLanguageSwitcher && languagesOptions().length > 0) {\n <div class=\"nav-item\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"isLanguageSwitcherDropdownOpen=true\"\n #languageSwitcherBtn>\n <upd-icon tablerIcon=\"language\"></upd-icon>\n </upd-link>\n <upd-dropdown wrapperClasses=\"mt-1\" [isOpen]=\"isLanguageSwitcherDropdownOpen\"\n [dropdownReference]=\"languageSwitcherRef()\" [items]=\"languagesOptions()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isLanguageSwitcherDropdownOpen = $event\" (selectedItem)=\"switchLanguage($event)\">\n </upd-dropdown>\n </div>\n }\n @if (!!config().showNotifications && !!userInfo()) {\n <div class=\"nav-item dropdown d-none d-md-flex\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"isNotificationsDropdownOpen = true\"\n #notificationsBtn>\n <upd-icon [tablerIcon]=\"currentNotificationsIcon()\"></upd-icon>\n @if (hasNewNotifications()) {\n <span class=\"badge bg-red\" [class.badge-blink]=\"shouldBlinkIfNewNotifications()\"></span>\n }\n </upd-link>\n <upd-dropdown wrapperClasses=\"mt-1 dropdown-menu-card\" [isOpen]=\"isNotificationsDropdownOpen\"\n [dropdownReference]=\"notificationsRef()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isNotificationsDropdownOpen = $event\" [minWidth]=\"400\" arrowType=\"right\">\n <div class=\"card\">\n <div class=\"card-header\">\n <h3 class=\"card-title\">{{ 'UpDevs.NotificationCenter.Title' | transloco }}</h3>\n </div>\n @for (notification of latestNotifications(); track notification) {\n <div class=\"list-group list-group-flush list-group-hoverable\" (click)=\"readNotification(notification)\">\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\">\n @if (!!notification.dateRead) {\n <span class=\"status-dot d-block\"></span>\n } @else {\n <span class=\"status-dot status-dot-animated bg-primary d-block\"></span>\n }\n </div>\n <div class=\"col text-truncate\">\n <a href=\"javascript:void(0)\" class=\"text-body d-block\"\n [class.fw-bold]=\"!notification.dateRead\">\n {{ textService.getText(notification.title) }}\n </a>\n @if (!!notification.description) {\n <div class=\"d-block text-secondary text-truncate mt-n1\">\n {{ textService.getText(notification.description) }}\n </div>\n }\n </div>\n <div class=\"col-auto\">\n <upd-link [customClasses]=\"['list-group-item-actions']\"\n (clicked)=\"removeNotification(notification)\">\n <upd-icon tablerIcon=\"x\"></upd-icon>\n </upd-link>\n </div>\n </div>\n </div>\n </div>\n } @empty {\n <div class=\"empty\">\n <h1 class=\"text-body-tertiary\">{{ 'UpDevs.NotificationCenter.NoNotifications' | transloco }}</h1>\n </div>\n }\n </div>\n </upd-dropdown>\n </div>\n }\n </div>\n @if (!!config().showUserMenu && !!userInfo()) {\n <div class=\"nav-item dropdown\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"isLoggedUserDropdownOpen = true\" #loggedUserBtn>\n @if (!!userInfo()!.avatar) {\n <span class=\"avatar avatar-sm\" style=\"background-image: url({{userInfo()?.avatar}})\"></span>\n } @else {\n <span class=\"avatar avatar-sm\">{{ userInitials() }}</span>\n }\n\n <div class=\"d-none d-xl-block px-2\">\n <div>{{ userIdentification() }}</div>\n @if (!!userDescription()) {\n <div class=\"mt-1 small text-muted\">{{ userDescription() }}</div>\n }\n </div>\n </upd-link>\n @if (loggedUserOptions().length > 0) {\n <upd-dropdown wrapperClasses=\"mt-1\" [isOpen]=\"isLoggedUserDropdownOpen\" [dropdownReference]=\"loggedUserRef()\"\n [items]=\"loggedUserOptions()\" [shouldCloseOnOutsideClick]=\"true\" (selectedItem)=\"selectLoggedUserMenuItem($event)\"\n (isOpenChange)=\"isLoggedUserDropdownOpen = $event\" arrowType=\"right\">\n </upd-dropdown>\n }\n </div>\n }\n </div>\n @if (!!config().showSearchBar && !!userInfo()) {\n <div class=\"collapse navbar-collapse\" [class.show]=\"isSidebarMobileOpen()\">\n <div class=\"me-2\" [class.w-100]=\"config().shouldUseFullSearchBar\">\n <form autocomplete=\"off\" novalidate>\n <div class=\"input-icon\">\n <span class=\"input-icon-addon\">\n <upd-icon tablerIcon=\"search\"></upd-icon>\n </span>\n <input type=\"text\" value=\"\" class=\"form-control\" placeholder=\"{{'UpDevs.Header.Search' | transloco}}...\">\n </div>\n </form>\n </div>\n </div>\n } @else {\n <div></div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: i1$2.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i2.DropdownComponent, selector: "upd-dropdown", inputs: ["items", "header", "isOpen", "shouldCloseOnOutsideClick", "arrowType", "wrapperClasses", "elementsExcludedFromOutsideClick", "minHeight", "maxHeight", "minWidth", "maxWidth", "dropdownReference", "dropdownReferencePosition", "textOverflowStrategy"], outputs: ["isOpenChange", "selectedItem", "checkboxChanged"] }, { kind: "component", type: i3.LinkComponent, selector: "upd-link", inputs: ["href", "target", "customClasses", "isNavigation"], outputs: ["clicked"] }, { kind: "pipe", type: i1$1.TranslocoPipe, name: "transloco" }], encapsulation: i0.ViewEncapsulation.None }); }
230
240
  }
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: HeaderComponent, decorators: [{
241
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HeaderComponent, decorators: [{
232
242
  type: Component,
233
- args: [{ selector: 'upd-header', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-xl\">\n <button class=\"navbar-toggler\" type=\"button\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-nav flex-row order-md-last\">\n <div class=\"d-none d-md-flex me-3\">\n <div class=\"nav-item\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"switchTheme()\">\n <upd-icon [tablerIcon]=\"nextThemeIcon\"></upd-icon>\n </upd-link>\n </div>\n <div *ngIf=\"showLanguageSwitcher\" class=\"nav-item\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"switchLanguage()\">\n <upd-icon tablerIcon=\"flag\"></upd-icon>\n </upd-link>\n </div>\n <div *ngIf=\"showNotifications\" class=\"nav-item dropdown d-none d-md-flex\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"openNotifications()\">\n <upd-icon [tablerIcon]=\"currentNotificationsIcon\"></upd-icon>\n <span *ngIf=\"hasNewNotifications\" class=\"badge bg-red\"></span>\n </upd-link>\n <div class=\"dropdown-menu dropdown-menu-arrow dropdown-menu-end dropdown-menu-card\">\n <div class=\"card\">\n <div class=\"card-header\">\n <h3 class=\"card-title\">Last updates</h3>\n </div>\n <div class=\"list-group list-group-flush list-group-hoverable\">\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\"><span\n class=\"status-dot status-dot-animated bg-red d-block\"></span></div>\n <div class=\"col text-truncate\">\n <a href=\"#\" class=\"text-body d-block\">Example 1</a>\n <div class=\"d-block text-muted text-truncate mt-n1\">\n Change deprecated html tags to text decoration classes (#29604)\n </div>\n </div>\n <div class=\"col-auto\">\n <a href=\"#\" class=\"list-group-item-actions\">\n <!-- Download SVG icon from http://tabler-icons.io/i/star -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-muted\"\n width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"/>\n </svg>\n </a>\n </div>\n </div>\n </div>\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\"><span class=\"status-dot d-block\"></span></div>\n <div class=\"col text-truncate\">\n <a href=\"#\" class=\"text-body d-block\">Example 2</a>\n <div class=\"d-block text-muted text-truncate mt-n1\">\n justify-content:between \u21D2 justify-content:space-between (#29734)\n </div>\n </div>\n <div class=\"col-auto\">\n <a href=\"#\" class=\"list-group-item-actions show\">\n <!-- Download SVG icon from http://tabler-icons.io/i/star -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-yellow\"\n width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"/>\n </svg>\n </a>\n </div>\n </div>\n </div>\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\"><span class=\"status-dot d-block\"></span></div>\n <div class=\"col text-truncate\">\n <a href=\"#\" class=\"text-body d-block\">Example 3</a>\n <div class=\"d-block text-muted text-truncate mt-n1\">\n Update change-version.js (#29736)\n </div>\n </div>\n <div class=\"col-auto\">\n <a href=\"#\" class=\"list-group-item-actions\">\n <!-- Download SVG icon from http://tabler-icons.io/i/star -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-muted\"\n width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"/>\n </svg>\n </a>\n </div>\n </div>\n </div>\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\"><span\n class=\"status-dot status-dot-animated bg-green d-block\"></span></div>\n <div class=\"col text-truncate\">\n <a href=\"#\" class=\"text-body d-block\">Example 4</a>\n <div class=\"d-block text-muted text-truncate mt-n1\">\n Regenerate package-lock.json (#29730)\n </div>\n </div>\n <div class=\"col-auto\">\n <a href=\"#\" class=\"list-group-item-actions\">\n <!-- Download SVG icon from http://tabler-icons.io/i/star -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-muted\"\n width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\"\n stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873z\"/>\n </svg>\n </a>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <div *ngIf=\"showUserMenu\" class=\"nav-item dropdown\">\n <a href=\"#\" class=\"nav-link d-flex lh-1 text-reset p-0\" data-bs-toggle=\"dropdown\"\n aria-label=\"Open user menu\">\n <!--<span class=\"avatar avatar-sm\" style=\"background-image: url(./static/avatars/000m.jpg)\"></span>-->\n <span class=\"avatar avatar-sm\"></span>\n <div class=\"d-none d-xl-block ps-2\">\n <div>Eros Stein</div>\n <div class=\"mt-1 small text-muted\">Administrator</div>\n </div>\n </a>\n <div class=\"dropdown-menu dropdown-menu-end dropdown-menu-arrow\">\n <a href=\"#\" class=\"dropdown-item\">Status</a>\n <a href=\"./profile.html\" class=\"dropdown-item\">Profile</a>\n <a href=\"#\" class=\"dropdown-item\">Feedback</a>\n <div class=\"dropdown-divider\"></div>\n <a href=\"./settings.html\" class=\"dropdown-item\">Settings</a>\n <a href=\"./sign-in.html\" class=\"dropdown-item\">Logout</a>\n </div>\n </div>\n </div>\n <div *ngIf=\"showSearchBar\" class=\"collapse navbar-collapse\">\n <div>\n <form autocomplete=\"off\" novalidate>\n <div class=\"input-icon\">\n <span class=\"input-icon-addon\">\n <upd-icon tablerIcon=\"search\"></upd-icon>\n </span>\n <input type=\"text\" value=\"\" class=\"form-control\" placeholder=\"Search\u2026\">\n </div>\n </form>\n </div>\n </div>\n</div>\n" }]
234
- }], ctorParameters: function () { return [{ type: i1$1.UpdCoreLayoutConfigService }, { type: i1$1.LayoutService }, { type: i1.TranslocoService }]; }, propDecorators: { wrapperClasses: [{
243
+ args: [{ selector: 'upd-header', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-xl\">\n <button class=\"navbar-toggler\" type=\"button\" (click)=\"toggleSidebarOnMobile()\" [attr.aria-expanded]=\"isSidebarMobileOpen()\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <div class=\"navbar-nav flex-row order-md-last\">\n <div class=\"d-none d-md-flex me-3\">\n @if (!!config().showThemeSwitcher) {\n <div class=\"nav-item\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"switchTheme()\">\n <upd-icon [tablerIcon]=\"nextThemeIcon()\"></upd-icon>\n </upd-link>\n </div>\n }\n @if (!!config().showLanguageSwitcher && languagesOptions().length > 0) {\n <div class=\"nav-item\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"isLanguageSwitcherDropdownOpen=true\"\n #languageSwitcherBtn>\n <upd-icon tablerIcon=\"language\"></upd-icon>\n </upd-link>\n <upd-dropdown wrapperClasses=\"mt-1\" [isOpen]=\"isLanguageSwitcherDropdownOpen\"\n [dropdownReference]=\"languageSwitcherRef()\" [items]=\"languagesOptions()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isLanguageSwitcherDropdownOpen = $event\" (selectedItem)=\"switchLanguage($event)\">\n </upd-dropdown>\n </div>\n }\n @if (!!config().showNotifications && !!userInfo()) {\n <div class=\"nav-item dropdown d-none d-md-flex\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"isNotificationsDropdownOpen = true\"\n #notificationsBtn>\n <upd-icon [tablerIcon]=\"currentNotificationsIcon()\"></upd-icon>\n @if (hasNewNotifications()) {\n <span class=\"badge bg-red\" [class.badge-blink]=\"shouldBlinkIfNewNotifications()\"></span>\n }\n </upd-link>\n <upd-dropdown wrapperClasses=\"mt-1 dropdown-menu-card\" [isOpen]=\"isNotificationsDropdownOpen\"\n [dropdownReference]=\"notificationsRef()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isNotificationsDropdownOpen = $event\" [minWidth]=\"400\" arrowType=\"right\">\n <div class=\"card\">\n <div class=\"card-header\">\n <h3 class=\"card-title\">{{ 'UpDevs.NotificationCenter.Title' | transloco }}</h3>\n </div>\n @for (notification of latestNotifications(); track notification) {\n <div class=\"list-group list-group-flush list-group-hoverable\" (click)=\"readNotification(notification)\">\n <div class=\"list-group-item\">\n <div class=\"row align-items-center\">\n <div class=\"col-auto\">\n @if (!!notification.dateRead) {\n <span class=\"status-dot d-block\"></span>\n } @else {\n <span class=\"status-dot status-dot-animated bg-primary d-block\"></span>\n }\n </div>\n <div class=\"col text-truncate\">\n <a href=\"javascript:void(0)\" class=\"text-body d-block\"\n [class.fw-bold]=\"!notification.dateRead\">\n {{ textService.getText(notification.title) }}\n </a>\n @if (!!notification.description) {\n <div class=\"d-block text-secondary text-truncate mt-n1\">\n {{ textService.getText(notification.description) }}\n </div>\n }\n </div>\n <div class=\"col-auto\">\n <upd-link [customClasses]=\"['list-group-item-actions']\"\n (clicked)=\"removeNotification(notification)\">\n <upd-icon tablerIcon=\"x\"></upd-icon>\n </upd-link>\n </div>\n </div>\n </div>\n </div>\n } @empty {\n <div class=\"empty\">\n <h1 class=\"text-body-tertiary\">{{ 'UpDevs.NotificationCenter.NoNotifications' | transloco }}</h1>\n </div>\n }\n </div>\n </upd-dropdown>\n </div>\n }\n </div>\n @if (!!config().showUserMenu && !!userInfo()) {\n <div class=\"nav-item dropdown\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"isLoggedUserDropdownOpen = true\" #loggedUserBtn>\n @if (!!userInfo()!.avatar) {\n <span class=\"avatar avatar-sm\" style=\"background-image: url({{userInfo()?.avatar}})\"></span>\n } @else {\n <span class=\"avatar avatar-sm\">{{ userInitials() }}</span>\n }\n\n <div class=\"d-none d-xl-block px-2\">\n <div>{{ userIdentification() }}</div>\n @if (!!userDescription()) {\n <div class=\"mt-1 small text-muted\">{{ userDescription() }}</div>\n }\n </div>\n </upd-link>\n @if (loggedUserOptions().length > 0) {\n <upd-dropdown wrapperClasses=\"mt-1\" [isOpen]=\"isLoggedUserDropdownOpen\" [dropdownReference]=\"loggedUserRef()\"\n [items]=\"loggedUserOptions()\" [shouldCloseOnOutsideClick]=\"true\" (selectedItem)=\"selectLoggedUserMenuItem($event)\"\n (isOpenChange)=\"isLoggedUserDropdownOpen = $event\" arrowType=\"right\">\n </upd-dropdown>\n }\n </div>\n }\n </div>\n @if (!!config().showSearchBar && !!userInfo()) {\n <div class=\"collapse navbar-collapse\" [class.show]=\"isSidebarMobileOpen()\">\n <div class=\"me-2\" [class.w-100]=\"config().shouldUseFullSearchBar\">\n <form autocomplete=\"off\" novalidate>\n <div class=\"input-icon\">\n <span class=\"input-icon-addon\">\n <upd-icon tablerIcon=\"search\"></upd-icon>\n </span>\n <input type=\"text\" value=\"\" class=\"form-control\" placeholder=\"{{'UpDevs.Header.Search' | transloco}}...\">\n </div>\n </form>\n </div>\n </div>\n } @else {\n <div></div>\n }\n</div>\n" }]
244
+ }], propDecorators: { classes: [{
235
245
  type: HostBinding,
236
246
  args: ['class']
237
- }], style: [{
238
- type: Input
239
- }], showSearchBar: [{
240
- type: Input
241
247
  }] } });
242
248
 
249
+ class HeaderModule {
250
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
251
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: HeaderModule, declarations: [HeaderComponent], imports: [CommonModule,
252
+ TranslocoModule,
253
+ UpdIconsModule,
254
+ UpdDropdownModule,
255
+ UpdLinkModule], exports: [HeaderComponent] }); }
256
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HeaderModule, imports: [CommonModule,
257
+ TranslocoModule,
258
+ UpdIconsModule,
259
+ UpdDropdownModule,
260
+ UpdLinkModule] }); }
261
+ }
262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: HeaderModule, decorators: [{
263
+ type: NgModule,
264
+ args: [{
265
+ imports: [
266
+ CommonModule,
267
+ TranslocoModule,
268
+ UpdIconsModule,
269
+ UpdDropdownModule,
270
+ UpdLinkModule
271
+ ],
272
+ declarations: [
273
+ HeaderComponent
274
+ ],
275
+ exports: [
276
+ HeaderComponent
277
+ ]
278
+ }]
279
+ }] });
280
+
281
+ /**
282
+ * Configuration of the login page layout.
283
+ */
284
+ class LoginPageConfigModel {
285
+ constructor(init) {
286
+ /**
287
+ * Buttons used for social login (google, facebook, etc).
288
+ */
289
+ this.socialLoginButtons = [];
290
+ Object.assign(this, init);
291
+ this.layout = init?.layout || 'centered-box';
292
+ this.borderColor = init?.borderColor || 'primary';
293
+ this.signInButtonColor = init?.signInButtonColor || 'primary';
294
+ this.linksColor = init?.linksColor || this.signInButtonColor;
295
+ if (init?.socialLoginButtons) {
296
+ this.socialLoginButtons = init.socialLoginButtons;
297
+ }
298
+ }
299
+ }
300
+
301
+ /**
302
+ * Configuration for the pages related to the security.
303
+ */
304
+ class SecurityLayoutConfigModel {
305
+ constructor(init) {
306
+ this.loginPage = new LoginPageConfigModel(init?.loginPage);
307
+ }
308
+ }
309
+
310
+ /**
311
+ * Layout configuration.
312
+ */
313
+ class UpdLayoutConfigModel {
314
+ constructor(init) {
315
+ if (init?.mainLogo === undefined) {
316
+ // this.mainLogo = LogoConstants.defaultLogo; // TODO: add images
317
+ }
318
+ if (init?.smallLogo === undefined) {
319
+ // this.smallLogo = LogoConstants.smallLogo;
320
+ }
321
+ if (init?.loggedOutBackground === undefined) {
322
+ // this.loggedOutBackground = ImageConstants.loggedOutBackground;
323
+ }
324
+ this.menuTitle = init?.menuTitle || 'UpDevs';
325
+ this.showNotificationsButton = init?.showNotificationsButton || true;
326
+ this.showUserMenu = init?.showUserMenu || true;
327
+ this.displayReportErrorButton = init?.displayReportErrorButton || false;
328
+ this.useFluidLayout = init?.useFluidLayout || false;
329
+ this.securityLayoutConfig = new SecurityLayoutConfigModel(init?.securityLayoutConfig);
330
+ }
331
+ }
332
+
333
+ /**
334
+ * Layout constants.
335
+ */
336
+ class LayoutConstants {
337
+ /**
338
+ * Key to inject the default configuration.
339
+ */
340
+ static { this.defaultOptionsKey = 'upd-layout-default-options'; }
341
+ /**
342
+ * Injection token for the default configuration.
343
+ */
344
+ static { this.defaultOptionsInjectionToken = new InjectionToken(LayoutConstants.defaultOptionsKey); }
345
+ }
346
+
347
+ /**
348
+ * Layout configuration data.
349
+ */
350
+ class UpdLayoutConfigService {
351
+ constructor(layoutConfig) {
352
+ this.config = new UpdLayoutConfigModel(layoutConfig);
353
+ }
354
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdLayoutConfigService, deps: [{ token: LayoutConstants.defaultOptionsInjectionToken }], target: i0.ɵɵFactoryTarget.Injectable }); }
355
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdLayoutConfigService }); }
356
+ }
357
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdLayoutConfigService, decorators: [{
358
+ type: Injectable
359
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
360
+ type: Inject,
361
+ args: [LayoutConstants.defaultOptionsInjectionToken]
362
+ }] }] });
363
+
364
+ /**
365
+ * Basic layout structure.
366
+ */
367
+ class BaseLayout extends BaseComponent {
368
+ constructor() {
369
+ super(...arguments);
370
+ this._layoutConfigService = inject(UpdLayoutConfigService);
371
+ this._layoutService = inject(LayoutService);
372
+ }
373
+ ngOnInit() {
374
+ if (this._layoutConfigService.config.useFluidLayout) {
375
+ this._layoutService.addBodyClasses('layout-fluid');
376
+ }
377
+ }
378
+ ngOnDestroy() {
379
+ super.ngOnDestroy();
380
+ if (this._layoutConfigService.config.useFluidLayout) {
381
+ this._layoutService.removeBodyClasses('layout-fluid');
382
+ }
383
+ }
384
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseLayout, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
385
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.0", type: BaseLayout, usesInheritance: true, ngImport: i0 }); }
386
+ }
387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseLayout, decorators: [{
388
+ type: Directive
389
+ }] });
390
+
391
+ class BlankLayoutComponent extends BaseLayout {
392
+ constructor() {
393
+ super(...arguments);
394
+ this.config = computed(() => this._layoutService.mainHeaderConfig());
395
+ }
396
+ ngOnInit() {
397
+ // Overriding layout fluid from parent.
398
+ }
399
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BlankLayoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
400
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: BlankLayoutComponent, selector: "upd-blank-layout", usesInheritance: true, ngImport: i0, template: "<div class=\"page\" [class.page-center]=\"_layoutService.isPageCentered()\">\n @if (!config().shouldHideTopBarIfBlankLayout) {\n <upd-header [style]=\"'transparent'\"></upd-header>\n }\n\n <router-outlet></router-outlet>\n\n @if (!config().shouldHideFooterIfBlankLayout) {\n <upd-footer></upd-footer>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: FooterComponent, selector: "upd-footer" }, { kind: "component", type: HeaderComponent, selector: "upd-header", inputs: ["style"] }] }); }
401
+ }
402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BlankLayoutComponent, decorators: [{
403
+ type: Component,
404
+ args: [{ selector: 'upd-blank-layout', template: "<div class=\"page\" [class.page-center]=\"_layoutService.isPageCentered()\">\n @if (!config().shouldHideTopBarIfBlankLayout) {\n <upd-header [style]=\"'transparent'\"></upd-header>\n }\n\n <router-outlet></router-outlet>\n\n @if (!config().shouldHideFooterIfBlankLayout) {\n <upd-footer></upd-footer>\n }\n</div>\n" }]
405
+ }] });
406
+
407
+ class BlankLayoutModule {
408
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BlankLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
409
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: BlankLayoutModule, declarations: [BlankLayoutComponent], imports: [CommonModule,
410
+ RouterOutlet,
411
+ TranslocoPipe,
412
+ UpdDropdownModule,
413
+ UpdIconsModule,
414
+ UpdLinkModule,
415
+ FooterModule,
416
+ HeaderModule], exports: [BlankLayoutComponent] }); }
417
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BlankLayoutModule, imports: [CommonModule,
418
+ UpdDropdownModule,
419
+ UpdIconsModule,
420
+ UpdLinkModule,
421
+ FooterModule,
422
+ HeaderModule] }); }
423
+ }
424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BlankLayoutModule, decorators: [{
425
+ type: NgModule,
426
+ args: [{
427
+ imports: [
428
+ CommonModule,
429
+ RouterOutlet,
430
+ TranslocoPipe,
431
+ UpdDropdownModule,
432
+ UpdIconsModule,
433
+ UpdLinkModule,
434
+ FooterModule,
435
+ HeaderModule
436
+ ],
437
+ declarations: [
438
+ BlankLayoutComponent
439
+ ],
440
+ exports: [
441
+ BlankLayoutComponent
442
+ ]
443
+ }]
444
+ }] });
445
+
446
+ var UpDevs$1 = {
447
+ Login: {
448
+ Title: "Login",
449
+ NoAccountYet: "Don't have an account?",
450
+ SignUp: "Sign-up",
451
+ SignIn: "Sign-in",
452
+ RecoverPassword: "Recover my password",
453
+ RememberMe: "Remember me on this device",
454
+ Or: "or",
455
+ Email: "Email",
456
+ Password: "Password"
457
+ },
458
+ Footer: {
459
+ Prefix: "Copyright",
460
+ "Symbol": "©",
461
+ Suffix: "All rights reserved."
462
+ },
463
+ NotificationCenter: {
464
+ Title: "Latest notifications",
465
+ NoNotifications: "No notifications"
466
+ },
467
+ Header: {
468
+ Search: "Search"
469
+ }
470
+ };
471
+ var en = {
472
+ UpDevs: UpDevs$1
473
+ };
474
+
475
+ var en$1 = /*#__PURE__*/Object.freeze({
476
+ __proto__: null,
477
+ UpDevs: UpDevs$1,
478
+ default: en
479
+ });
480
+
481
+ var UpDevs = {
482
+ Login: {
483
+ Title: "Login",
484
+ NoAccountYet: "Não tem conta?",
485
+ SignUp: "Cadastre-se",
486
+ SignIn: "Entrar",
487
+ RecoverPassword: "Recuperar minha senha",
488
+ RememberMe: "Lembrar",
489
+ Or: "ou",
490
+ Email: "Email",
491
+ Password: "Senha"
492
+ },
493
+ Footer: {
494
+ Prefix: "Copyright",
495
+ "Symbol": "©",
496
+ Suffix: "Todos os direitos reservados."
497
+ },
498
+ NotificationCenter: {
499
+ Title: "Últimas notificações",
500
+ NoNotifications: "Sem notificações"
501
+ },
502
+ Header: {
503
+ Search: "Pesquisar"
504
+ }
505
+ };
506
+ var pt = {
507
+ UpDevs: UpDevs
508
+ };
509
+
510
+ var pt$1 = /*#__PURE__*/Object.freeze({
511
+ __proto__: null,
512
+ UpDevs: UpDevs,
513
+ default: pt
514
+ });
515
+
243
516
  class SidebarComponent extends BaseComponent {
244
- constructor(router) {
245
- super();
246
- this.router = router;
517
+ constructor() {
518
+ super(...arguments);
247
519
  this.wrapperClasses = 'navbar navbar-vertical navbar-expand-lg';
248
520
  this.theme = 'dark';
249
521
  this.menuItems = [];
250
- }
251
- ngOnInit() {
252
- // TODO: remove demo code.
253
- const sampleCardsItem = new RouteDataModel({
254
- title: 'Sample cards',
255
- icon: { tablerIcon: 'home' }
256
- });
257
- const cardActionsItem = new RouteDataModel({
258
- title: 'Card actions',
259
- icon: { tablerIcon: 'folder' }
522
+ this.isLoggedUserDropdownOpen = false;
523
+ this.loggedUserRef = viewChild('loggedUserBtn', { read: ElementRef });
524
+ this.textService = inject(TextService);
525
+ this.isSidebarMobileOpen = signal(false);
526
+ this.config = computed(() => this.layoutService.mainHeaderConfig());
527
+ this.userInfo = computed(() => this.securityStorage.getUserInfo());
528
+ this.userIdentification = computed(() => !!this.userInfo() ? this.coreLayoutConfigService.config.getUserName(this.userInfo()) : '');
529
+ this.userDescription = computed(() => !!this.coreLayoutConfigService.config.getUserDescription
530
+ ? this.coreLayoutConfigService.config.getUserDescription(this.userInfo())
531
+ : '');
532
+ this.loggedUserOptions = computed(() => {
533
+ const userActions = [];
534
+ this.coreLayoutConfigService.config.loggedUserMenuActions.forEach(act => userActions.push({
535
+ id: act.id(),
536
+ text: act.text(),
537
+ type: 'default',
538
+ icon: act.iconModel?.()
539
+ }));
540
+ return userActions;
260
541
  });
261
- const emptyPageItem = new RouteDataModel({
262
- title: 'Empty page',
263
- icon: { tablerIcon: 'home' }
542
+ this.userInitials = computed(() => {
543
+ const firstChar = this.userIdentification().charAt(0);
544
+ const lastSpaceIndex = this.userIdentification().lastIndexOf(' ');
545
+ const firstAfterLastSpace = lastSpaceIndex !== -1 ? this.userIdentification().charAt(lastSpaceIndex + 1) : '';
546
+ return `${firstChar}${firstAfterLastSpace}`;
264
547
  });
265
- const cardsItem = new RouteDataModel({
266
- title: 'Cards',
267
- icon: { tablerIcon: 'user' },
268
- children: [
269
- sampleCardsItem,
270
- cardActionsItem
271
- ]
548
+ this.currentRoute = '';
549
+ this.menuItemsBackup = [];
550
+ this.router = inject(Router);
551
+ this.menuService = inject(MenuService);
552
+ this.layoutService = inject(LayoutService);
553
+ this.securityStorage = inject(SecurityStorage);
554
+ this.coreLayoutConfigService = inject(UpdCoreLayoutConfigService);
555
+ }
556
+ ngOnInit() {
557
+ this.currentRoute = this.router.url;
558
+ this.menuItems = this.menuService.generateMenu();
559
+ this.menuItemsBackup = [...this.menuItems];
560
+ const menuRefreshSub = this.menuService.refreshSubject.subscribe(() => {
561
+ this.menuItems = [...this.menuService.generateMenu()];
562
+ this.menuItemsBackup = [...this.menuItems];
563
+ this.updateActiveRoute();
272
564
  });
273
- const interfaceItem = new RouteDataModel({
274
- title: 'Interface',
275
- icon: { tablerIcon: 'device-desktop' },
276
- children: [
277
- emptyPageItem,
278
- cardsItem
279
- ]
565
+ const routerSub = this.router.events.pipe(filter(event => event instanceof NavigationStart)).subscribe(event => {
566
+ this.currentRoute = event.url;
567
+ this.updateActiveRoute();
280
568
  });
281
- sampleCardsItem.parent = cardsItem;
282
- cardActionsItem.parent = cardsItem;
283
- emptyPageItem.parent = interfaceItem;
284
- cardsItem.parent = interfaceItem;
285
- this.menuItems = [
286
- new RouteDataModel({
287
- title: 'Home',
288
- icon: { tablerIcon: 'home' }
289
- }),
290
- new RouteDataModel({
291
- title: 'Archives',
292
- icon: { tablerIcon: 'folder' }
293
- }),
294
- interfaceItem,
295
- new RouteDataModel({
296
- title: 'Library',
297
- icon: { tablerIcon: 'building' }
298
- })
299
- ];
300
- // END demo code
301
- const routerSub = this.router.events.pipe(filter(event => event instanceof NavigationStart)).subscribe(event => this.updateActiveRoute(event.url));
302
- this.updateActiveRoute(this.router.url);
303
- this.addSubscriptions(routerSub);
569
+ this.updateActiveRoute();
570
+ this.addSubscriptions(routerSub, menuRefreshSub);
304
571
  }
305
572
  onMenuItemClick(item) {
306
- this.resetMenuState(this.menuItems);
307
- item.isActive = true;
308
- this.updateParents(item);
573
+ if (item.isLocked) {
574
+ if (!!item.lockedClickFunction) {
575
+ item.lockedClickFunction();
576
+ }
577
+ return;
578
+ }
579
+ let newMenuItems = this.resetMenuState(this.menuItems);
580
+ newMenuItems = this.setItemActive(newMenuItems, item, this.hasChildren(item) ? !item.isActive : true);
581
+ newMenuItems = this.updateParents(newMenuItems, item);
582
+ this.menuItems = newMenuItems;
309
583
  if (!!item.clickFunction) {
310
584
  item.clickFunction();
311
585
  return;
312
586
  }
313
- if ((item.children?.length || 0) > 0) {
587
+ if (this.hasChildren(item)) {
314
588
  return;
315
589
  }
316
- this.router.navigate(item.getFullPath()).then();
590
+ const fullPath = this.findItemById(this.menuItemsBackup, item.id).getFullPath();
591
+ this.router.navigate(fullPath).then();
317
592
  }
318
593
  hasChildren(item) {
319
594
  return (item.children?.length || 0) > 0;
320
595
  }
596
+ asMenuItem(item) {
597
+ return item;
598
+ }
599
+ getItemClasses(item, activeClass, ...classes) {
600
+ return [
601
+ ...classes,
602
+ item.isActive ? activeClass : '',
603
+ item.isLocked ? 'disabled' : ''
604
+ ];
605
+ }
606
+ toggleSidebarOnMobile() {
607
+ this.isSidebarMobileOpen.set(!this.isSidebarMobileOpen());
608
+ }
609
+ selectLoggedUserMenuItem(item) {
610
+ const btn = this.coreLayoutConfigService.config.loggedUserMenuActions.find(b => b.id() === item.id);
611
+ if (!!btn?.clickFunction) {
612
+ btn.clickFunction({ data: this.userInfo() });
613
+ }
614
+ }
321
615
  findActiveNode(item, fullPath) {
322
616
  if (item.fullPath === fullPath) {
323
617
  return item;
324
618
  }
325
- else if (item.children.length > 0) {
326
- let result;
327
- for (let i = 0; !result && i < item.children.length; i++) {
328
- result = this.findActiveNode(item.children[i], fullPath);
619
+ for (const child of item.children) {
620
+ const found = this.findActiveNode(child, fullPath);
621
+ if (found) {
622
+ return found;
329
623
  }
330
- return result;
331
624
  }
332
625
  return undefined;
333
626
  }
334
- updateActiveRoute(newPath) {
335
- this.resetMenuState(this.menuItems);
336
- let item;
337
- for (const mi of this.menuItems) {
338
- item = this.findActiveNode(mi, newPath);
339
- if (!!item) {
627
+ updateActiveRoute() {
628
+ let newMenuItems = this.resetMenuState(this.menuItems);
629
+ const activePath = this.getActivePath(newMenuItems);
630
+ newMenuItems = this.setActivePath(newMenuItems, activePath);
631
+ this.menuItems = newMenuItems;
632
+ }
633
+ setActivePath(items, path) {
634
+ if (path.length === 0) {
635
+ return items;
636
+ }
637
+ return items.map(item => {
638
+ const pathItem = path.find(p => p.id === item.id);
639
+ if (!pathItem) {
640
+ return item;
641
+ }
642
+ const newItem = { ...item, isActive: true };
643
+ if (newItem.children?.length) {
644
+ newItem.children = this.setActivePath(newItem.children, path.filter(p => p.parent?.id === newItem.id));
645
+ newItem.children.forEach(child => child.parent = newItem);
646
+ }
647
+ return newItem;
648
+ });
649
+ }
650
+ getActivePath(items) {
651
+ let activeItem;
652
+ // Find the deepest active item.
653
+ for (const item of items) {
654
+ activeItem = this.findActiveNode(item, this.currentRoute);
655
+ if (activeItem) {
340
656
  break;
341
657
  }
342
658
  }
343
- while (!!item) {
344
- item.isActive = true;
345
- item = item.parent;
659
+ // Collect parent hierarchy.
660
+ const path = [];
661
+ while (activeItem) {
662
+ path.unshift(activeItem);
663
+ activeItem = activeItem.parent;
346
664
  }
665
+ return path;
347
666
  }
348
667
  resetMenuState(items) {
349
- items.forEach(i => {
350
- i.isActive = false;
351
- if (i.children.length > 0) {
352
- this.resetMenuState(i.children);
668
+ return items.map(item => {
669
+ const newItem = { ...item, isActive: false };
670
+ if (newItem.children?.length) {
671
+ newItem.children = this.resetMenuState(newItem.children);
672
+ newItem.children.forEach(child => child.parent = newItem);
673
+ }
674
+ return newItem;
675
+ });
676
+ }
677
+ setItemActive(items, target, isActive) {
678
+ return items.map(item => {
679
+ if (item.id === target.id) {
680
+ const newItem = { ...item, isActive };
681
+ if (newItem.children?.length) {
682
+ newItem.children = this.setItemActive(newItem.children, target, isActive);
683
+ newItem.children.forEach(child => child.parent = newItem);
684
+ }
685
+ return newItem;
686
+ }
687
+ if (item.children?.length) {
688
+ const newChildren = this.setItemActive(item.children, target, isActive);
689
+ const newItem = { ...item, children: newChildren };
690
+ newChildren.forEach(child => child.parent = newItem);
691
+ return newItem;
353
692
  }
693
+ return item;
354
694
  });
355
695
  }
356
- updateParents(menuItem) {
357
- let item = menuItem;
358
- while (!!item) {
359
- item.isActive = true;
360
- item = item.parent;
696
+ updateParents(items, childItem) {
697
+ let parent = childItem.parent;
698
+ let updatedItems = [...items];
699
+ while (parent) {
700
+ updatedItems = updatedItems.map(item => {
701
+ if (item.id === parent.id) {
702
+ return { ...parent, isActive: true };
703
+ }
704
+ return item;
705
+ });
706
+ parent = parent.parent;
361
707
  }
708
+ return updatedItems;
362
709
  }
363
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: SidebarComponent, deps: [{ token: i1$2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
364
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: SidebarComponent, selector: "upd-sidebar", host: { properties: { "class": "this.wrapperClasses", "attr.data-bs-theme": "this.theme" } }, usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid\">\n <button class=\"navbar-toggler\" type=\"button\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <h1 class=\"navbar-brand navbar-brand-autodark\">\n <a href=\".\">\n <img width=\"110\" height=\"32\" class=\"navbar-brand-image upd-brand-logo\"/>\n </a>\n </h1>\n <div class=\"collapse navbar-collapse\">\n <ul class=\"navbar-nav pt-lg-3\">\n <li *ngFor=\"let item of menuItems\" class=\"nav-item\" [class.dropdown]=\"hasChildren(item)\"\n [class.active]=\"item.isActive\">\n <ng-container [ngTemplateOutlet]=\"itemTpl\" [ngTemplateOutletContext]=\"{menuItem: item}\">\n </ng-container>\n </li>\n </ul>\n </div>\n</div>\n\n<ng-template #itemTpl let-item=\"menuItem\">\n <upd-link [isNavigation]=\"true\" (clicked)=\"onMenuItemClick(item)\"\n [customClasses]=\"[hasChildren(item) ? 'dropdown-toggle' : '', item.isActive ? 'show' : '']\">\n <span class=\"nav-link-icon d-md-none d-lg-inline-block\">\n <upd-icon [model]=\"item.icon\"></upd-icon>\n </span>\n <span class=\"nav-link-title\">{{item.title}}</span>\n </upd-link>\n <ng-container *ngIf=\"hasChildren(item)\" [ngTemplateOutlet]=\"childrenTpl\" [ngTemplateOutletContext]=\"{menuItem: item}\">\n </ng-container>\n</ng-template>\n\n<ng-template #childrenTpl let-item=\"menuItem\">\n <div class=\"dropdown-menu\" [class.show]=\"item.isActive\">\n <div class=\"dropdown-menu-columns\">\n <div class=\"dropdown-menu-column\">\n <ng-container *ngFor=\"let child of item.children\">\n <upd-link *ngIf=\"!hasChildren(child); else grandchildTpl\" (clicked)=\"onMenuItemClick(child)\"\n [customClasses]=\"['dropdown-item', child.isActive ? 'active' : '']\">\n {{child.title}}\n </upd-link>\n <ng-template #grandchildTpl>\n <div class=\"dropend\">\n <upd-link (clicked)=\"onMenuItemClick(child)\"\n [customClasses]=\"['dropdown-item', 'dropdown-toggle', child.isActive ? 'active' : '']\">\n {{child.title}}\n </upd-link>\n <div class=\"dropdown-menu\" [class.show]=\"child.isActive\">\n <ng-container *ngFor=\"let grandchild of child.children\">\n <upd-link (clicked)=\"onMenuItemClick(grandchild)\"\n [customClasses]=\"['dropdown-item', grandchild.isActive ? 'active' : '']\">\n {{grandchild.title}}\n </upd-link>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i4.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "removeDefaultClasses", "customClasses", "tablerIcon", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i5.LinkComponent, selector: "upd-link", inputs: ["href", "target", "customClasses", "isNavigation"], outputs: ["clicked"] }], encapsulation: i0.ViewEncapsulation.None }); }
710
+ findItemById(items, targetId) {
711
+ for (const item of items) {
712
+ if (item.id === targetId) {
713
+ return item;
714
+ }
715
+ if (item.children?.length) {
716
+ const child = this.findItemById(item.children, targetId);
717
+ if (!!child) {
718
+ return child;
719
+ }
720
+ }
721
+ }
722
+ return undefined;
723
+ }
724
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SidebarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
725
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: SidebarComponent, selector: "upd-sidebar", host: { properties: { "class": "this.wrapperClasses", "attr.data-bs-theme": "this.theme" } }, viewQueries: [{ propertyName: "loggedUserRef", first: true, predicate: ["loggedUserBtn"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"container-fluid\">\n <button class=\"navbar-toggler\" type=\"button\" (click)=\"toggleSidebarOnMobile()\" [attr.aria-expanded]=\"isSidebarMobileOpen()\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <h1 class=\"navbar-brand navbar-brand-autodark\">\n <a href=\".\">\n <img width=\"110\" height=\"32\" class=\"navbar-brand-image upd-brand-logo\" />\n </a>\n </h1>\n\n @if (!!config().showUserMenu && !!userInfo()) {\n <div class=\"navbar-nav flex-row d-lg-none\">\n <div class=\"nav-item dropdown\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"isLoggedUserDropdownOpen = true\" #loggedUserBtn>\n @if (!!userInfo()!.avatar) {\n <span class=\"avatar avatar-sm\" style=\"background-image: url({{userInfo()?.avatar}})\"></span>\n } @else {\n <span class=\"avatar avatar-sm\">{{ userInitials() }}</span>\n }\n\n <div class=\"d-none d-xl-block px-2\">\n <div>{{ userIdentification() }}</div>\n @if (!!userDescription()) {\n <div class=\"mt-1 small text-muted\">{{ userDescription() }}</div>\n }\n </div>\n </upd-link>\n @if (loggedUserOptions().length > 0) {\n <upd-dropdown wrapperClasses=\"mt-1\" [isOpen]=\"isLoggedUserDropdownOpen\" [dropdownReference]=\"loggedUserRef()\"\n [items]=\"loggedUserOptions()\" [shouldCloseOnOutsideClick]=\"true\" (selectedItem)=\"selectLoggedUserMenuItem($event)\"\n (isOpenChange)=\"isLoggedUserDropdownOpen = $event\" arrowType=\"right\">\n </upd-dropdown>\n }\n </div>\n </div>\n }\n\n <div class=\"collapse navbar-collapse\" [class.show]=\"isSidebarMobileOpen()\">\n <ul class=\"navbar-nav pt-lg-3\">\n @for (item of menuItems; track item.id) {\n <li class=\"nav-item\" [class.dropdown]=\"hasChildren(item)\" [class.active]=\"item.isActive\">\n <ng-container [ngTemplateOutlet]=\"itemTpl\" [ngTemplateOutletContext]=\"{menuItem: item}\"></ng-container>\n </li>\n }\n </ul>\n </div>\n</div>\n\n<ng-template #itemTpl let-item=\"menuItem\">\n <upd-link [isNavigation]=\"true\" (clicked)=\"onMenuItemClick(item)\"\n [customClasses]=\"getItemClasses(item, 'show', hasChildren(item) ? 'dropdown-toggle':'')\">\n <ng-container [ngTemplateOutlet]=\"linkContent\" [ngTemplateOutletContext]=\"{menuItem: item}\"></ng-container>\n </upd-link>\n @if (hasChildren(item)) {\n <ng-container [ngTemplateOutlet]=\"childrenTpl\" [ngTemplateOutletContext]=\"{menuItem: item}\"></ng-container>\n }\n</ng-template>\n\n<ng-template #linkContent let-item=\"menuItem\">\n @if (!!item.icon) {\n <span class=\"nav-link-icon d-md-none d-lg-inline-block\">\n <upd-icon [model]=\"item.icon\"></upd-icon>\n </span>\n }\n <span class=\"nav-link-title\">{{ textService.getText(item.title) }}</span>\n @if (item.isLocked) {\n <upd-icon class=\"ms-auto\" [model]=\"{tablerIcon: 'lock'}\"></upd-icon>\n }\n</ng-template>\n\n<ng-template #childrenTpl let-item=\"menuItem\">\n <div class=\"dropdown-menu\" [class.show]=\"item.isActive\">\n <div class=\"dropdown-menu-columns\">\n <div class=\"dropdown-menu-column\">\n @for (child of asMenuItem(item).children; track child.id) {\n @if (!hasChildren(child)) {\n <upd-link (clicked)=\"onMenuItemClick(child)\" [customClasses]=\"getItemClasses(child, 'active', 'dropdown-item')\">\n <ng-container [ngTemplateOutlet]=\"linkContent\" [ngTemplateOutletContext]=\"{menuItem: child}\"></ng-container>\n </upd-link>\n } @else {\n <div class=\"dropend\">\n <upd-link (clicked)=\"onMenuItemClick(child)\" [customClasses]=\"getItemClasses(child, 'active', 'dropdown-item')\">\n <ng-container [ngTemplateOutlet]=\"linkContent\" [ngTemplateOutletContext]=\"{menuItem: child}\"></ng-container>\n </upd-link>\n <div class=\"dropdown-menu\" [class.show]=\"child.isActive\">\n @for (grandchild of child.children; track grandchild) {\n <upd-link (clicked)=\"onMenuItemClick(grandchild)\"\n [customClasses]=\"getItemClasses(grandchild, 'active', 'dropdown-item')\">\n <ng-container [ngTemplateOutlet]=\"linkContent\" [ngTemplateOutletContext]=\"{menuItem: grandchild}\">\n </ng-container>\n </upd-link>\n }\n </div>\n </div>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1$2.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i3.LinkComponent, selector: "upd-link", inputs: ["href", "target", "customClasses", "isNavigation"], outputs: ["clicked"] }, { kind: "component", type: i2.DropdownComponent, selector: "upd-dropdown", inputs: ["items", "header", "isOpen", "shouldCloseOnOutsideClick", "arrowType", "wrapperClasses", "elementsExcludedFromOutsideClick", "minHeight", "maxHeight", "minWidth", "maxWidth", "dropdownReference", "dropdownReferencePosition", "textOverflowStrategy"], outputs: ["isOpenChange", "selectedItem", "checkboxChanged"] }], encapsulation: i0.ViewEncapsulation.None }); }
365
726
  }
366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: SidebarComponent, decorators: [{
727
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SidebarComponent, decorators: [{
367
728
  type: Component,
368
- args: [{ selector: 'upd-sidebar', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-fluid\">\n <button class=\"navbar-toggler\" type=\"button\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <h1 class=\"navbar-brand navbar-brand-autodark\">\n <a href=\".\">\n <img width=\"110\" height=\"32\" class=\"navbar-brand-image upd-brand-logo\"/>\n </a>\n </h1>\n <div class=\"collapse navbar-collapse\">\n <ul class=\"navbar-nav pt-lg-3\">\n <li *ngFor=\"let item of menuItems\" class=\"nav-item\" [class.dropdown]=\"hasChildren(item)\"\n [class.active]=\"item.isActive\">\n <ng-container [ngTemplateOutlet]=\"itemTpl\" [ngTemplateOutletContext]=\"{menuItem: item}\">\n </ng-container>\n </li>\n </ul>\n </div>\n</div>\n\n<ng-template #itemTpl let-item=\"menuItem\">\n <upd-link [isNavigation]=\"true\" (clicked)=\"onMenuItemClick(item)\"\n [customClasses]=\"[hasChildren(item) ? 'dropdown-toggle' : '', item.isActive ? 'show' : '']\">\n <span class=\"nav-link-icon d-md-none d-lg-inline-block\">\n <upd-icon [model]=\"item.icon\"></upd-icon>\n </span>\n <span class=\"nav-link-title\">{{item.title}}</span>\n </upd-link>\n <ng-container *ngIf=\"hasChildren(item)\" [ngTemplateOutlet]=\"childrenTpl\" [ngTemplateOutletContext]=\"{menuItem: item}\">\n </ng-container>\n</ng-template>\n\n<ng-template #childrenTpl let-item=\"menuItem\">\n <div class=\"dropdown-menu\" [class.show]=\"item.isActive\">\n <div class=\"dropdown-menu-columns\">\n <div class=\"dropdown-menu-column\">\n <ng-container *ngFor=\"let child of item.children\">\n <upd-link *ngIf=\"!hasChildren(child); else grandchildTpl\" (clicked)=\"onMenuItemClick(child)\"\n [customClasses]=\"['dropdown-item', child.isActive ? 'active' : '']\">\n {{child.title}}\n </upd-link>\n <ng-template #grandchildTpl>\n <div class=\"dropend\">\n <upd-link (clicked)=\"onMenuItemClick(child)\"\n [customClasses]=\"['dropdown-item', 'dropdown-toggle', child.isActive ? 'active' : '']\">\n {{child.title}}\n </upd-link>\n <div class=\"dropdown-menu\" [class.show]=\"child.isActive\">\n <ng-container *ngFor=\"let grandchild of child.children\">\n <upd-link (clicked)=\"onMenuItemClick(grandchild)\"\n [customClasses]=\"['dropdown-item', grandchild.isActive ? 'active' : '']\">\n {{grandchild.title}}\n </upd-link>\n </ng-container>\n </div>\n </div>\n </ng-template>\n </ng-container>\n </div>\n </div>\n </div>\n</ng-template>\n" }]
369
- }], ctorParameters: function () { return [{ type: i1$2.Router }]; }, propDecorators: { wrapperClasses: [{
729
+ args: [{ selector: 'upd-sidebar', encapsulation: ViewEncapsulation.None, template: "<div class=\"container-fluid\">\n <button class=\"navbar-toggler\" type=\"button\" (click)=\"toggleSidebarOnMobile()\" [attr.aria-expanded]=\"isSidebarMobileOpen()\">\n <span class=\"navbar-toggler-icon\"></span>\n </button>\n <h1 class=\"navbar-brand navbar-brand-autodark\">\n <a href=\".\">\n <img width=\"110\" height=\"32\" class=\"navbar-brand-image upd-brand-logo\" />\n </a>\n </h1>\n\n @if (!!config().showUserMenu && !!userInfo()) {\n <div class=\"navbar-nav flex-row d-lg-none\">\n <div class=\"nav-item dropdown\">\n <upd-link [isNavigation]=\"true\" [customClasses]=\"['px-0']\" (clicked)=\"isLoggedUserDropdownOpen = true\" #loggedUserBtn>\n @if (!!userInfo()!.avatar) {\n <span class=\"avatar avatar-sm\" style=\"background-image: url({{userInfo()?.avatar}})\"></span>\n } @else {\n <span class=\"avatar avatar-sm\">{{ userInitials() }}</span>\n }\n\n <div class=\"d-none d-xl-block px-2\">\n <div>{{ userIdentification() }}</div>\n @if (!!userDescription()) {\n <div class=\"mt-1 small text-muted\">{{ userDescription() }}</div>\n }\n </div>\n </upd-link>\n @if (loggedUserOptions().length > 0) {\n <upd-dropdown wrapperClasses=\"mt-1\" [isOpen]=\"isLoggedUserDropdownOpen\" [dropdownReference]=\"loggedUserRef()\"\n [items]=\"loggedUserOptions()\" [shouldCloseOnOutsideClick]=\"true\" (selectedItem)=\"selectLoggedUserMenuItem($event)\"\n (isOpenChange)=\"isLoggedUserDropdownOpen = $event\" arrowType=\"right\">\n </upd-dropdown>\n }\n </div>\n </div>\n }\n\n <div class=\"collapse navbar-collapse\" [class.show]=\"isSidebarMobileOpen()\">\n <ul class=\"navbar-nav pt-lg-3\">\n @for (item of menuItems; track item.id) {\n <li class=\"nav-item\" [class.dropdown]=\"hasChildren(item)\" [class.active]=\"item.isActive\">\n <ng-container [ngTemplateOutlet]=\"itemTpl\" [ngTemplateOutletContext]=\"{menuItem: item}\"></ng-container>\n </li>\n }\n </ul>\n </div>\n</div>\n\n<ng-template #itemTpl let-item=\"menuItem\">\n <upd-link [isNavigation]=\"true\" (clicked)=\"onMenuItemClick(item)\"\n [customClasses]=\"getItemClasses(item, 'show', hasChildren(item) ? 'dropdown-toggle':'')\">\n <ng-container [ngTemplateOutlet]=\"linkContent\" [ngTemplateOutletContext]=\"{menuItem: item}\"></ng-container>\n </upd-link>\n @if (hasChildren(item)) {\n <ng-container [ngTemplateOutlet]=\"childrenTpl\" [ngTemplateOutletContext]=\"{menuItem: item}\"></ng-container>\n }\n</ng-template>\n\n<ng-template #linkContent let-item=\"menuItem\">\n @if (!!item.icon) {\n <span class=\"nav-link-icon d-md-none d-lg-inline-block\">\n <upd-icon [model]=\"item.icon\"></upd-icon>\n </span>\n }\n <span class=\"nav-link-title\">{{ textService.getText(item.title) }}</span>\n @if (item.isLocked) {\n <upd-icon class=\"ms-auto\" [model]=\"{tablerIcon: 'lock'}\"></upd-icon>\n }\n</ng-template>\n\n<ng-template #childrenTpl let-item=\"menuItem\">\n <div class=\"dropdown-menu\" [class.show]=\"item.isActive\">\n <div class=\"dropdown-menu-columns\">\n <div class=\"dropdown-menu-column\">\n @for (child of asMenuItem(item).children; track child.id) {\n @if (!hasChildren(child)) {\n <upd-link (clicked)=\"onMenuItemClick(child)\" [customClasses]=\"getItemClasses(child, 'active', 'dropdown-item')\">\n <ng-container [ngTemplateOutlet]=\"linkContent\" [ngTemplateOutletContext]=\"{menuItem: child}\"></ng-container>\n </upd-link>\n } @else {\n <div class=\"dropend\">\n <upd-link (clicked)=\"onMenuItemClick(child)\" [customClasses]=\"getItemClasses(child, 'active', 'dropdown-item')\">\n <ng-container [ngTemplateOutlet]=\"linkContent\" [ngTemplateOutletContext]=\"{menuItem: child}\"></ng-container>\n </upd-link>\n <div class=\"dropdown-menu\" [class.show]=\"child.isActive\">\n @for (grandchild of child.children; track grandchild) {\n <upd-link (clicked)=\"onMenuItemClick(grandchild)\"\n [customClasses]=\"getItemClasses(grandchild, 'active', 'dropdown-item')\">\n <ng-container [ngTemplateOutlet]=\"linkContent\" [ngTemplateOutletContext]=\"{menuItem: grandchild}\">\n </ng-container>\n </upd-link>\n }\n </div>\n </div>\n }\n }\n </div>\n </div>\n </div>\n</ng-template>\n" }]
730
+ }], propDecorators: { wrapperClasses: [{
370
731
  type: HostBinding,
371
732
  args: ['class']
372
733
  }], theme: [{
@@ -375,48 +736,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
375
736
  }] } });
376
737
 
377
738
  class PageHeaderComponent {
378
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: PageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
379
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: PageHeaderComponent, selector: "upd-page-header", inputs: { model: "model" }, ngImport: i0, template: "<div class=\"page-header d-print-none\">\n <div class=\"container-xl\">\n <div class=\"row g-2 align-items-center\">\n <div class=\"col\">\n <div class=\"page-pretitle\">\n {{model.titleHeader}}\n </div>\n <h2 class=\"page-title\">\n {{model.title}}\n </h2>\n </div>\n <div *ngIf=\"(model.actionButtons?.length || 0) > 0\" class=\"col-auto ms-auto d-print-none\">\n <div class=\"btn-list\">\n <upd-button *ngFor=\"let btn of model.actionButtons\" [model]=\"btn!\"></upd-button>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "upd-button", inputs: ["text", "model", "colorStyle", "brandColorStyle", "customClasses", "isActive", "isDisabled", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "shouldIgnoreBtnClass"], outputs: ["clicked"] }] }); }
739
+ constructor() {
740
+ this.model = input.required();
741
+ }
742
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
743
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: PageHeaderComponent, selector: "upd-page-header", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"page-header d-print-none\">\n <div class=\"container-xl\">\n <div class=\"row g-2 align-items-center\">\n <div class=\"col\">\n <div class=\"page-pretitle\">\n {{ model().titleHeader }}\n </div>\n <h2 class=\"page-title\">\n {{ model().title }}\n </h2>\n </div>\n @if (model().actionButtons.length > 0) {\n <div class=\"col-auto ms-auto d-print-none\">\n <div class=\"btn-list\">\n @for (btn of model().actionButtons; track btn) {\n <upd-button [model]=\"btn\"></upd-button>\n }\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: i1$4.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"] }] }); }
380
744
  }
381
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: PageHeaderComponent, decorators: [{
745
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: PageHeaderComponent, decorators: [{
382
746
  type: Component,
383
- args: [{ selector: 'upd-page-header', template: "<div class=\"page-header d-print-none\">\n <div class=\"container-xl\">\n <div class=\"row g-2 align-items-center\">\n <div class=\"col\">\n <div class=\"page-pretitle\">\n {{model.titleHeader}}\n </div>\n <h2 class=\"page-title\">\n {{model.title}}\n </h2>\n </div>\n <div *ngIf=\"(model.actionButtons?.length || 0) > 0\" class=\"col-auto ms-auto d-print-none\">\n <div class=\"btn-list\">\n <upd-button *ngFor=\"let btn of model.actionButtons\" [model]=\"btn!\"></upd-button>\n </div>\n </div>\n </div>\n </div>\n</div>\n" }]
384
- }], propDecorators: { model: [{
385
- type: Input
386
- }] } });
747
+ args: [{ selector: 'upd-page-header', template: "<div class=\"page-header d-print-none\">\n <div class=\"container-xl\">\n <div class=\"row g-2 align-items-center\">\n <div class=\"col\">\n <div class=\"page-pretitle\">\n {{ model().titleHeader }}\n </div>\n <h2 class=\"page-title\">\n {{ model().title }}\n </h2>\n </div>\n @if (model().actionButtons.length > 0) {\n <div class=\"col-auto ms-auto d-print-none\">\n <div class=\"btn-list\">\n @for (btn of model().actionButtons; track btn) {\n <upd-button [model]=\"btn\"></upd-button>\n }\n </div>\n </div>\n }\n </div>\n </div>\n</div>\n" }]
748
+ }] });
387
749
 
388
- class VerticalSidebarLayoutComponent extends BaseComponent {
389
- constructor(changeDetectorRef, layoutService) {
390
- super();
391
- this.changeDetectorRef = changeDetectorRef;
392
- this.layoutService = layoutService;
393
- this.showPageHeader = false;
394
- }
395
- ngOnInit() {
396
- const pHeaderSub = this.layoutService.onPageHeaderChange.subscribe(ph => {
397
- this.showPageHeader = !!ph;
398
- this.pageHeader = ph;
399
- this.changeDetectorRef.detectChanges();
400
- });
401
- this.addSubscriptions(pHeaderSub);
402
- }
403
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: VerticalSidebarLayoutComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$1.LayoutService }], target: i0.ɵɵFactoryTarget.Component }); }
404
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: VerticalSidebarLayoutComponent, selector: "upd-vertical-sidebar-layout", usesInheritance: true, ngImport: i0, template: "<div class=\"page\">\n <upd-sidebar></upd-sidebar>\n <upd-header></upd-header>\n\n <div class=\"page-wrapper\">\n <upd-page-header *ngIf=\"showPageHeader\" [model]=\"pageHeader!\"></upd-page-header>\n <div class=\"page-body\">\n <div class=\"container-xl\">\n <router-outlet></router-outlet>\n </div>\n </div>\n <upd-footer></upd-footer>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: FooterComponent, selector: "upd-footer" }, { kind: "component", type: HeaderComponent, selector: "upd-header", inputs: ["style", "showSearchBar"] }, { kind: "component", type: SidebarComponent, selector: "upd-sidebar" }, { kind: "component", type: PageHeaderComponent, selector: "upd-page-header", inputs: ["model"] }], encapsulation: i0.ViewEncapsulation.None }); }
750
+ class VerticalSidebarLayoutComponent extends BaseLayout {
751
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: VerticalSidebarLayoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
752
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: VerticalSidebarLayoutComponent, selector: "upd-vertical-sidebar-layout", usesInheritance: true, ngImport: i0, template: "<div class=\"page\">\n <upd-sidebar></upd-sidebar>\n <upd-header></upd-header>\n\n <div class=\"page-wrapper\">\n @if (!!_layoutService.pageHeader()) {\n <upd-page-header [model]=\"_layoutService.pageHeader()!\"></upd-page-header>\n }\n <div class=\"page-body\">\n <div class=\"container-xl\">\n <router-outlet></router-outlet>\n </div>\n </div>\n <upd-footer></upd-footer>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$3.RouterOutlet, selector: "router-outlet", inputs: ["name"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: FooterComponent, selector: "upd-footer" }, { kind: "component", type: HeaderComponent, selector: "upd-header", inputs: ["style"] }, { kind: "component", type: SidebarComponent, selector: "upd-sidebar" }, { kind: "component", type: PageHeaderComponent, selector: "upd-page-header", inputs: ["model"] }], encapsulation: i0.ViewEncapsulation.None }); }
405
753
  }
406
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: VerticalSidebarLayoutComponent, decorators: [{
754
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: VerticalSidebarLayoutComponent, decorators: [{
407
755
  type: Component,
408
- args: [{ selector: 'upd-vertical-sidebar-layout', encapsulation: ViewEncapsulation.None, template: "<div class=\"page\">\n <upd-sidebar></upd-sidebar>\n <upd-header></upd-header>\n\n <div class=\"page-wrapper\">\n <upd-page-header *ngIf=\"showPageHeader\" [model]=\"pageHeader!\"></upd-page-header>\n <div class=\"page-body\">\n <div class=\"container-xl\">\n <router-outlet></router-outlet>\n </div>\n </div>\n <upd-footer></upd-footer>\n </div>\n</div>\n" }]
409
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$1.LayoutService }]; } });
756
+ args: [{ selector: 'upd-vertical-sidebar-layout', encapsulation: ViewEncapsulation.None, template: "<div class=\"page\">\n <upd-sidebar></upd-sidebar>\n <upd-header></upd-header>\n\n <div class=\"page-wrapper\">\n @if (!!_layoutService.pageHeader()) {\n <upd-page-header [model]=\"_layoutService.pageHeader()!\"></upd-page-header>\n }\n <div class=\"page-body\">\n <div class=\"container-xl\">\n <router-outlet></router-outlet>\n </div>\n </div>\n <upd-footer></upd-footer>\n </div>\n</div>\n" }]
757
+ }] });
410
758
 
411
759
  class VerticalSidebarLayoutModule {
412
760
  constructor(translocoService) {
761
+ translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });
413
762
  translocoService.setTranslation(en$1, 'en');
414
763
  translocoService.setTranslation(pt$1, 'pt');
415
764
  }
416
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: VerticalSidebarLayoutModule, deps: [{ token: i1.TranslocoService }], target: i0.ɵɵFactoryTarget.NgModule }); }
417
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.11", ngImport: i0, type: VerticalSidebarLayoutModule, declarations: [VerticalSidebarLayoutComponent,
418
- FooterComponent,
419
- HeaderComponent,
765
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: VerticalSidebarLayoutModule, deps: [{ token: i1$1.TranslocoService }], target: i0.ɵɵFactoryTarget.NgModule }); }
766
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: VerticalSidebarLayoutModule, declarations: [VerticalSidebarLayoutComponent,
420
767
  SidebarComponent,
421
768
  PageHeaderComponent], imports: [CommonModule,
422
769
  RouterModule,
@@ -424,22 +771,24 @@ class VerticalSidebarLayoutModule {
424
771
  UpdIconsModule,
425
772
  UpdCoreLayoutModule,
426
773
  UpdButtonModule,
427
- UpdLinkModule], exports: [VerticalSidebarLayoutComponent,
428
- FooterComponent,
429
- HeaderComponent,
774
+ UpdLinkModule,
775
+ UpdDropdownModule,
776
+ FooterModule,
777
+ HeaderModule], exports: [VerticalSidebarLayoutComponent,
430
778
  SidebarComponent,
431
779
  PageHeaderComponent] }); }
432
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: VerticalSidebarLayoutModule, providers: [
433
- FooterCopyrightDirective
434
- ], imports: [CommonModule,
780
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: VerticalSidebarLayoutModule, imports: [CommonModule,
435
781
  RouterModule,
436
782
  TranslocoModule,
437
783
  UpdIconsModule,
438
784
  UpdCoreLayoutModule,
439
785
  UpdButtonModule,
440
- UpdLinkModule] }); }
786
+ UpdLinkModule,
787
+ UpdDropdownModule,
788
+ FooterModule,
789
+ HeaderModule] }); }
441
790
  }
442
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: VerticalSidebarLayoutModule, decorators: [{
791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: VerticalSidebarLayoutModule, decorators: [{
443
792
  type: NgModule,
444
793
  args: [{
445
794
  imports: [
@@ -449,62 +798,130 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
449
798
  UpdIconsModule,
450
799
  UpdCoreLayoutModule,
451
800
  UpdButtonModule,
452
- UpdLinkModule
801
+ UpdLinkModule,
802
+ UpdDropdownModule,
803
+ FooterModule,
804
+ HeaderModule
453
805
  ],
454
806
  declarations: [
455
807
  VerticalSidebarLayoutComponent,
456
- FooterComponent,
457
- HeaderComponent,
458
808
  SidebarComponent,
459
809
  PageHeaderComponent
460
810
  ],
461
811
  exports: [
462
812
  VerticalSidebarLayoutComponent,
463
- FooterComponent,
464
- HeaderComponent,
465
813
  SidebarComponent,
466
814
  PageHeaderComponent
467
- ],
468
- providers: [
469
- FooterCopyrightDirective
470
815
  ]
471
816
  }]
472
- }], ctorParameters: function () { return [{ type: i1.TranslocoService }]; } });
817
+ }], ctorParameters: () => [{ type: i1$1.TranslocoService }] });
473
818
 
474
819
  class LoggedOutComponent {
475
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: LoggedOutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
476
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: LoggedOutComponent, selector: "upd-logged-out", ngImport: i0, template: "<p>logged-out works!</p>\n", styles: [""] }); }
820
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: LoggedOutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
821
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: LoggedOutComponent, selector: "upd-logged-out", ngImport: i0, template: "<p>logged-out works!</p>\n", styles: [""] }); }
477
822
  }
478
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: LoggedOutComponent, decorators: [{
823
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: LoggedOutComponent, decorators: [{
479
824
  type: Component,
480
825
  args: [{ selector: 'upd-logged-out', template: "<p>logged-out works!</p>\n" }]
481
826
  }] });
482
827
 
483
828
  class LoginComponent {
484
829
  constructor() {
485
- this.layout = 'centered-box';
486
- this.username = '';
487
- this.password = '';
830
+ this.formGroup = model(new FormGroup({}));
831
+ this.formRows = [];
832
+ this.isSigningIn = signal(false);
833
+ this.layoutConfigService = inject(UpdLayoutConfigService);
834
+ this.config = this.layoutConfigService.config.securityLayoutConfig.loginPage;
835
+ this.bodyClasses = ['border-top-wide', this.border, 'd-flex', 'flex-column'];
836
+ this.router = inject(Router);
488
837
  this.authService = inject(AuthService);
489
838
  this.layoutService = inject(LayoutService);
490
- this.layoutService.addBodyClasses('border-top-wide', 'border-primary', 'd-flex', 'flex-column');
839
+ }
840
+ get border() {
841
+ return `border-${this.config.borderColor}`;
842
+ }
843
+ get linkClasses() {
844
+ return [`link-${this.config.linksColor}`];
845
+ }
846
+ get boxBgColor() {
847
+ return this.config.bgColor || (!!this.config.bgStyle ? `bg-${this.config.bgStyle}` : '') || 'bg-white';
848
+ }
849
+ ngOnInit() {
850
+ this.layoutService.addBodyClasses(this.boxBgColor);
851
+ if (this.config.layout !== 'cover') {
852
+ this.layoutService.addBodyClasses(...this.bodyClasses);
853
+ }
854
+ this.formRows = [
855
+ {
856
+ fields: [
857
+ {
858
+ name: 'username',
859
+ type: DynamicFieldType.Input,
860
+ colSize: { default: 12 },
861
+ label: { text: 'UpDevs.Login.Email', isTranslated: false },
862
+ validators: [Validators.required, Validators.minLength(3)],
863
+ shouldSubmitOnEnter: true
864
+ }
865
+ ]
866
+ },
867
+ {
868
+ fields: [
869
+ {
870
+ name: 'password',
871
+ type: DynamicFieldType.Input,
872
+ inputType: 'password',
873
+ colSize: { default: 12 },
874
+ label: { text: 'UpDevs.Login.Password', isTranslated: false },
875
+ validators: [Validators.required, Validators.minLength(3)],
876
+ shouldSubmitOnEnter: true
877
+ }
878
+ ]
879
+ },
880
+ {
881
+ fields: [
882
+ {
883
+ name: 'rememberMe',
884
+ type: DynamicFieldType.Checkbox,
885
+ colSize: { default: 12 },
886
+ label: { text: 'UpDevs.Login.RememberMe', isTranslated: false },
887
+ initValue: false
888
+ }
889
+ ]
890
+ }
891
+ ];
892
+ }
893
+ ngOnDestroy() {
894
+ this.layoutService.removeBodyClasses(this.boxBgColor);
895
+ if (this.config.layout !== 'cover') {
896
+ this.layoutService.removeBodyClasses(...this.bodyClasses);
897
+ }
491
898
  }
492
899
  login() {
493
- this.authService.login(this.username, this.password).subscribe();
900
+ // TODO: handle remember me
901
+ this.isSigningIn.set(true);
902
+ this.authService.login(this.formGroup().value.username, this.formGroup().value.password)
903
+ .pipe(finalize(() => this.isSigningIn.set(false)))
904
+ .subscribe();
905
+ }
906
+ goToRecoverPasswordPage() {
907
+ this.router.navigate([this.config.recoverPasswordRoute]).then();
494
908
  }
495
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
496
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: LoginComponent, selector: "upd-login", ngImport: i0, template: "<div class=\"page page-center\">\n <ng-container [ngSwitch]=\"layout\">\n <div *ngSwitchCase=\"'centered-box'\" class=\"container container-tight py-4\">\n <ng-container [ngTemplateOutlet]=\"loginCard\"></ng-container>\n </div>\n <div *ngSwitchCase=\"'box-with-picture'\" class=\"container container-normal py-4\">\n <div class=\"row align-items-center g-4\">\n <div class=\"col-lg\">\n <div class=\"container-tight\">\n <ng-container [ngTemplateOutlet]=\"loginCard\"></ng-container>\n </div>\n </div>\n <div class=\"col-lg d-none d-lg-block\">\n <img height=\"300\" class=\"d-block mx-auto upd-right-login-image\"/>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n\n<ng-template #loginCard>\n <div class=\"text-center mb-4\">\n <a href=\".\" class=\"navbar-brand navbar-brand-autodark\">\n <img height=\"36\" class=\"navbar-brand-image upd-brand-logo\"/>\n </a>\n </div>\n <div class=\"card card-md\">\n <div class=\"card-body\">\n <h2 class=\"h2 text-center mb-4\" i18n>Login to your account</h2>\n <form action=\"./\" method=\"get\" autocomplete=\"off\" novalidate>\n <div class=\"mb-3\">\n <label class=\"form-label\">Email address</label>\n <input type=\"email\" class=\"form-control\" name=\"username\" [(ngModel)]=\"username\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">\n Password\n <span class=\"form-label-description\">\n <a href=\"./forgot-password.html\" i18n>I forgot my password</a>\n </span>\n </label>\n <div class=\"input-group input-group-flat\">\n <input type=\"password\" class=\"form-control\" name=\"password\" [(ngModel)]=\"password\">\n <span class=\"input-group-text\">\n <a href=\"#\" class=\"link-secondary\" title=\"Show password\" data-bs-toggle=\"tooltip\"><!-- Download SVG icon from http://tabler-icons.io/i/eye -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\"\n d=\"M0 0h24v24H0z\" fill=\"none\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/><path\n d=\"M22 12c-2.667 4.667 -6 7 -10 7s-7.333 -2.333 -10 -7c2.667 -4.667 6 -7 10 -7s7.333 2.333 10 7\"/></svg>\n </a>\n </span>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-check\">\n <input type=\"checkbox\" class=\"form-check-input\"/>\n <span class=\"form-check-label\" i18n>Remember me on this device</span>\n </label>\n </div>\n <div class=\"form-footer\">\n <upd-button (clicked)=\"login()\" customClasses=\"w-100\">\n <span i18n>Sign in</span>\n </upd-button>\n </div>\n </form>\n </div>\n <div class=\"hr-text\" i18n>or</div>\n <div class=\"card-body\">\n <div class=\"row\">\n <div class=\"col\"><a href=\"#\" class=\"btn w-100\">\n <!-- Download SVG icon from http://tabler-icons.io/i/brand-github -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-github\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\n stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5\"/>\n </svg>\n Login with Github\n </a></div>\n <div class=\"col\"><a href=\"#\" class=\"btn w-100\">\n <!-- Download SVG icon from http://tabler-icons.io/i/brand-twitter -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-twitter\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\n stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z\"/>\n </svg>\n Login with Twitter\n </a></div>\n </div>\n </div>\n </div>\n <div class=\"text-center text-muted mt-3\">\n Don't have account yet? <a href=\"./sign-up.html\" tabindex=\"-1\" i18n>Sign up</a>\n </div>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "component", type: i2$1.ButtonComponent, selector: "upd-button", inputs: ["text", "model", "colorStyle", "brandColorStyle", "customClasses", "isActive", "isDisabled", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "shouldIgnoreBtnClass"], outputs: ["clicked"] }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], encapsulation: i0.ViewEncapsulation.None }); }
909
+ goToSignUpPage() {
910
+ this.router.navigate([this.config.signUpRoute]).then();
911
+ }
912
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
913
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: LoginComponent, selector: "upd-login", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formGroup: "formGroupChange" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Login'\">\n <upd-header [style]=\"'transparent'\"></upd-header>\n <div class=\"page page-center\">\n @switch (config.layout) {\n @case ('centered-box') {\n <div class=\"container container-tight py-4\">\n <ng-container [ngTemplateOutlet]=\"loginCardTpl\"></ng-container>\n </div>\n }\n @case ('box-with-picture') {\n <div class=\"container container-normal py-4\">\n <div class=\"row align-items-center g-4\">\n <div class=\"col-lg\">\n <div class=\"container-tight\">\n <ng-container [ngTemplateOutlet]=\"loginCardTpl\"></ng-container>\n </div>\n </div>\n <div class=\"col-lg d-none d-lg-block\">\n <img height=\"300\" class=\"d-block mx-auto upd-right-login-image\" />\n </div>\n </div>\n </div>\n }\n @case ('cover') {\n <div class=\"row g-0 flex-fill\">\n <div class=\"col-12 col-lg-6 col-xl-4 border-top-wide d-flex flex-column justify-content-center\"\n [ngClass]=\"border\">\n <div class=\"container container-tight my-5 px-lg-5\">\n <ng-container [ngTemplateOutlet]=\"headerTpl\"></ng-container>\n\n <h2 class=\"h3 text-center mb-3\">\n {{ t('Title') }}\n </h2>\n\n <ng-container [ngTemplateOutlet]=\"loginFormTpl\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"socialLoginTpl\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"noAccountTpl\"></ng-container>\n </div>\n </div>\n <div class=\"col-12 col-lg-6 col-xl-8 d-none d-lg-block\">\n <div class=\"bg-cover h-100 min-vh-100 upd-right-login-cover-image\"></div>\n </div>\n </div>\n }\n }\n </div>\n <upd-footer></upd-footer>\n\n <ng-template #loginCardTpl>\n <ng-container [ngTemplateOutlet]=\"headerTpl\"></ng-container>\n <upd-card [removeBorder]=\"true\">\n <div class=\"p-4\">\n <h2 class=\"h2 text-center mb-4\">\n {{ t('Title') }}\n </h2>\n <ng-container [ngTemplateOutlet]=\"loginFormTpl\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"socialLoginTpl\"></ng-container>\n </upd-card>\n <ng-container [ngTemplateOutlet]=\"noAccountTpl\"></ng-container>\n </ng-template>\n\n <ng-template #loginFormTpl>\n <upd-form [rows]=\"formRows\" [hasActionsSection]=\"false\" [(formGroup)]=\"formGroup\" (submitted)=\"login()\"></upd-form>\n <div class=\"form-footer\">\n <upd-button [colorStyle]=\"config.signInButtonColor\" (clicked)=\"login()\" [isLoading]=\"isSigningIn()\"\n customClasses=\"w-100\">\n {{ t('SignIn') }}\n </upd-button>\n @if (!!config.recoverPasswordRoute) {\n <div class=\"d-flex mt-2\">\n <upd-link class=\"ms-auto\" [customClasses]=\"linkClasses\" (clicked)=\"goToRecoverPasswordPage()\">\n {{ t('RecoverPassword') }}\n </upd-link>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #socialLoginTpl>\n @if (config.socialLoginButtons.length > 0) {\n <div class=\"hr-text\">\n {{ t('Or') }}\n </div>\n <div class=\"card-body\">\n <div class=\"row\">\n @for (btn of config.socialLoginButtons; track btn) {\n <div class=\"col\">\n <upd-button [model]=\"btn\"></upd-button>\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n\n <ng-template #headerTpl>\n <div class=\"text-center mb-4\">\n <a href=\".\" class=\"navbar-brand navbar-brand-autodark\">\n <img height=\"36\" class=\"navbar-brand-image upd-brand-logo\" />\n </a>\n </div>\n </ng-template>\n\n <ng-template #noAccountTpl>\n @if (!!config.signUpRoute) {\n <div class=\"text-center text-muted mt-3\">\n {{ t('NoAccountYet') }}\n <upd-link [customClasses]=\"linkClasses\" (clicked)=\"goToSignUpPage()\">{{ t('SignUp') }}</upd-link>\n </div>\n }\n </ng-template>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1$4.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: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.LinkComponent, selector: "upd-link", inputs: ["href", "target", "customClasses", "isNavigation"], outputs: ["clicked"] }, { kind: "component", type: i6.CardComponent, selector: "upd-card", inputs: ["wrapperClasses", "title", "subtitle", "hoverEffect", "state", "type", "imagePosition", "bgColor", "stampIcon", "stampBackground", "statusBackground", "statusPosition", "ribbonBackground", "ribbonStyle", "ribbonIcon", "ribbonText", "rotate", "removeBorder", "useLightHeader", "showHeader", "isFooterTransparent", "footerText", "showProgressBar", "progress", "actions"] }, { kind: "component", type: i7.FormComponent, selector: "upd-form", inputs: ["rows", "layout", "title", "hasActionsSection", "isCard", "isDisabled", "isLoading", "isSaving", "formData", "formGroup"], outputs: ["initialized", "dataLoaded", "submitted", "formDataChange", "formGroupChange"] }, { kind: "component", type: FooterComponent, selector: "upd-footer" }, { kind: "component", type: HeaderComponent, selector: "upd-header", inputs: ["style"] }] }); }
497
914
  }
498
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: LoginComponent, decorators: [{
915
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: LoginComponent, decorators: [{
499
916
  type: Component,
500
- args: [{ selector: 'upd-login', encapsulation: ViewEncapsulation.None, template: "<div class=\"page page-center\">\n <ng-container [ngSwitch]=\"layout\">\n <div *ngSwitchCase=\"'centered-box'\" class=\"container container-tight py-4\">\n <ng-container [ngTemplateOutlet]=\"loginCard\"></ng-container>\n </div>\n <div *ngSwitchCase=\"'box-with-picture'\" class=\"container container-normal py-4\">\n <div class=\"row align-items-center g-4\">\n <div class=\"col-lg\">\n <div class=\"container-tight\">\n <ng-container [ngTemplateOutlet]=\"loginCard\"></ng-container>\n </div>\n </div>\n <div class=\"col-lg d-none d-lg-block\">\n <img height=\"300\" class=\"d-block mx-auto upd-right-login-image\"/>\n </div>\n </div>\n </div>\n </ng-container>\n</div>\n\n<ng-template #loginCard>\n <div class=\"text-center mb-4\">\n <a href=\".\" class=\"navbar-brand navbar-brand-autodark\">\n <img height=\"36\" class=\"navbar-brand-image upd-brand-logo\"/>\n </a>\n </div>\n <div class=\"card card-md\">\n <div class=\"card-body\">\n <h2 class=\"h2 text-center mb-4\" i18n>Login to your account</h2>\n <form action=\"./\" method=\"get\" autocomplete=\"off\" novalidate>\n <div class=\"mb-3\">\n <label class=\"form-label\">Email address</label>\n <input type=\"email\" class=\"form-control\" name=\"username\" [(ngModel)]=\"username\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">\n Password\n <span class=\"form-label-description\">\n <a href=\"./forgot-password.html\" i18n>I forgot my password</a>\n </span>\n </label>\n <div class=\"input-group input-group-flat\">\n <input type=\"password\" class=\"form-control\" name=\"password\" [(ngModel)]=\"password\">\n <span class=\"input-group-text\">\n <a href=\"#\" class=\"link-secondary\" title=\"Show password\" data-bs-toggle=\"tooltip\"><!-- Download SVG icon from http://tabler-icons.io/i/eye -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" stroke-width=\"2\"\n stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\"\n d=\"M0 0h24v24H0z\" fill=\"none\"/><circle cx=\"12\" cy=\"12\" r=\"2\"/><path\n d=\"M22 12c-2.667 4.667 -6 7 -10 7s-7.333 -2.333 -10 -7c2.667 -4.667 6 -7 10 -7s7.333 2.333 10 7\"/></svg>\n </a>\n </span>\n </div>\n </div>\n <div class=\"mb-2\">\n <label class=\"form-check\">\n <input type=\"checkbox\" class=\"form-check-input\"/>\n <span class=\"form-check-label\" i18n>Remember me on this device</span>\n </label>\n </div>\n <div class=\"form-footer\">\n <upd-button (clicked)=\"login()\" customClasses=\"w-100\">\n <span i18n>Sign in</span>\n </upd-button>\n </div>\n </form>\n </div>\n <div class=\"hr-text\" i18n>or</div>\n <div class=\"card-body\">\n <div class=\"row\">\n <div class=\"col\"><a href=\"#\" class=\"btn w-100\">\n <!-- Download SVG icon from http://tabler-icons.io/i/brand-github -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-github\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\n stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5\"/>\n </svg>\n Login with Github\n </a></div>\n <div class=\"col\"><a href=\"#\" class=\"btn w-100\">\n <!-- Download SVG icon from http://tabler-icons.io/i/brand-twitter -->\n <svg xmlns=\"http://www.w3.org/2000/svg\" class=\"icon text-twitter\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"\n stroke-width=\"2\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/>\n <path\n d=\"M22 4.01c-1 .49 -1.98 .689 -3 .99c-1.121 -1.265 -2.783 -1.335 -4.38 -.737s-2.643 2.06 -2.62 3.737v1c-3.245 .083 -6.135 -1.395 -8 -4c0 0 -4.182 7.433 4 11c-1.872 1.247 -3.739 2.088 -6 2c3.308 1.803 6.913 2.423 10.034 1.517c3.58 -1.04 6.522 -3.723 7.651 -7.742a13.84 13.84 0 0 0 .497 -3.753c-.002 -.249 1.51 -2.772 1.818 -4.013z\"/>\n </svg>\n Login with Twitter\n </a></div>\n </div>\n </div>\n </div>\n <div class=\"text-center text-muted mt-3\">\n Don't have account yet? <a href=\"./sign-up.html\" tabindex=\"-1\" i18n>Sign up</a>\n </div>\n</ng-template>\n" }]
501
- }], ctorParameters: function () { return []; } });
917
+ args: [{ selector: 'upd-login', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Login'\">\n <upd-header [style]=\"'transparent'\"></upd-header>\n <div class=\"page page-center\">\n @switch (config.layout) {\n @case ('centered-box') {\n <div class=\"container container-tight py-4\">\n <ng-container [ngTemplateOutlet]=\"loginCardTpl\"></ng-container>\n </div>\n }\n @case ('box-with-picture') {\n <div class=\"container container-normal py-4\">\n <div class=\"row align-items-center g-4\">\n <div class=\"col-lg\">\n <div class=\"container-tight\">\n <ng-container [ngTemplateOutlet]=\"loginCardTpl\"></ng-container>\n </div>\n </div>\n <div class=\"col-lg d-none d-lg-block\">\n <img height=\"300\" class=\"d-block mx-auto upd-right-login-image\" />\n </div>\n </div>\n </div>\n }\n @case ('cover') {\n <div class=\"row g-0 flex-fill\">\n <div class=\"col-12 col-lg-6 col-xl-4 border-top-wide d-flex flex-column justify-content-center\"\n [ngClass]=\"border\">\n <div class=\"container container-tight my-5 px-lg-5\">\n <ng-container [ngTemplateOutlet]=\"headerTpl\"></ng-container>\n\n <h2 class=\"h3 text-center mb-3\">\n {{ t('Title') }}\n </h2>\n\n <ng-container [ngTemplateOutlet]=\"loginFormTpl\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"socialLoginTpl\"></ng-container>\n <ng-container [ngTemplateOutlet]=\"noAccountTpl\"></ng-container>\n </div>\n </div>\n <div class=\"col-12 col-lg-6 col-xl-8 d-none d-lg-block\">\n <div class=\"bg-cover h-100 min-vh-100 upd-right-login-cover-image\"></div>\n </div>\n </div>\n }\n }\n </div>\n <upd-footer></upd-footer>\n\n <ng-template #loginCardTpl>\n <ng-container [ngTemplateOutlet]=\"headerTpl\"></ng-container>\n <upd-card [removeBorder]=\"true\">\n <div class=\"p-4\">\n <h2 class=\"h2 text-center mb-4\">\n {{ t('Title') }}\n </h2>\n <ng-container [ngTemplateOutlet]=\"loginFormTpl\"></ng-container>\n </div>\n <ng-container [ngTemplateOutlet]=\"socialLoginTpl\"></ng-container>\n </upd-card>\n <ng-container [ngTemplateOutlet]=\"noAccountTpl\"></ng-container>\n </ng-template>\n\n <ng-template #loginFormTpl>\n <upd-form [rows]=\"formRows\" [hasActionsSection]=\"false\" [(formGroup)]=\"formGroup\" (submitted)=\"login()\"></upd-form>\n <div class=\"form-footer\">\n <upd-button [colorStyle]=\"config.signInButtonColor\" (clicked)=\"login()\" [isLoading]=\"isSigningIn()\"\n customClasses=\"w-100\">\n {{ t('SignIn') }}\n </upd-button>\n @if (!!config.recoverPasswordRoute) {\n <div class=\"d-flex mt-2\">\n <upd-link class=\"ms-auto\" [customClasses]=\"linkClasses\" (clicked)=\"goToRecoverPasswordPage()\">\n {{ t('RecoverPassword') }}\n </upd-link>\n </div>\n }\n </div>\n </ng-template>\n\n <ng-template #socialLoginTpl>\n @if (config.socialLoginButtons.length > 0) {\n <div class=\"hr-text\">\n {{ t('Or') }}\n </div>\n <div class=\"card-body\">\n <div class=\"row\">\n @for (btn of config.socialLoginButtons; track btn) {\n <div class=\"col\">\n <upd-button [model]=\"btn\"></upd-button>\n </div>\n }\n </div>\n </div>\n }\n </ng-template>\n\n <ng-template #headerTpl>\n <div class=\"text-center mb-4\">\n <a href=\".\" class=\"navbar-brand navbar-brand-autodark\">\n <img height=\"36\" class=\"navbar-brand-image upd-brand-logo\" />\n </a>\n </div>\n </ng-template>\n\n <ng-template #noAccountTpl>\n @if (!!config.signUpRoute) {\n <div class=\"text-center text-muted mt-3\">\n {{ t('NoAccountYet') }}\n <upd-link [customClasses]=\"linkClasses\" (clicked)=\"goToSignUpPage()\">{{ t('SignUp') }}</upd-link>\n </div>\n }\n </ng-template>\n</ng-container>\n" }]
918
+ }] });
502
919
 
503
920
  class OauthCallbackComponent {
504
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: OauthCallbackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
505
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.11", type: OauthCallbackComponent, selector: "upd-oauth-callback", ngImport: i0, template: "<p>oauth-callback works!</p>\n", styles: [""] }); }
921
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: OauthCallbackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
922
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: OauthCallbackComponent, selector: "upd-oauth-callback", ngImport: i0, template: "<p>oauth-callback works!</p>\n", styles: [""] }); }
506
923
  }
507
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: OauthCallbackComponent, decorators: [{
924
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: OauthCallbackComponent, decorators: [{
508
925
  type: Component,
509
926
  args: [{ selector: 'upd-oauth-callback', template: "<p>oauth-callback works!</p>\n" }]
510
927
  }] });
@@ -518,11 +935,11 @@ const routes = [
518
935
  { path: 'login', component: LoginComponent }
519
936
  ];
520
937
  class AuthFlowRoutingModule {
521
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: AuthFlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
522
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.11", ngImport: i0, type: AuthFlowRoutingModule, imports: [i1$2.RouterModule], exports: [RouterModule] }); }
523
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: AuthFlowRoutingModule, imports: [RouterModule.forRoot(routes, { useHash: true }), RouterModule] }); }
938
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: AuthFlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
939
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: AuthFlowRoutingModule, imports: [i1$3.RouterModule], exports: [RouterModule] }); }
940
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: AuthFlowRoutingModule, imports: [RouterModule.forRoot(routes, { useHash: true }), RouterModule] }); }
524
941
  }
525
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: AuthFlowRoutingModule, decorators: [{
942
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: AuthFlowRoutingModule, decorators: [{
526
943
  type: NgModule,
527
944
  args: [{
528
945
  imports: [RouterModule.forRoot(routes, { useHash: true })],
@@ -531,28 +948,48 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
531
948
  }] });
532
949
 
533
950
  class AuthFlowModule {
534
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: AuthFlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
535
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.11", ngImport: i0, type: AuthFlowModule, declarations: [LoginComponent,
951
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: AuthFlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
952
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: AuthFlowModule, declarations: [LoginComponent,
536
953
  OauthCallbackComponent,
537
954
  LoggedOutComponent], imports: [CommonModule,
538
955
  AuthFlowRoutingModule,
539
956
  UpdButtonModule,
540
- FormsModule], exports: [LoginComponent,
957
+ UpdIconsModule,
958
+ FormsModule,
959
+ TranslocoDirective,
960
+ UpdLinkModule,
961
+ UpdCardModule,
962
+ UpdFormModule,
963
+ FooterModule,
964
+ HeaderModule], exports: [LoginComponent,
541
965
  OauthCallbackComponent,
542
966
  LoggedOutComponent] }); }
543
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: AuthFlowModule, imports: [CommonModule,
967
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: AuthFlowModule, imports: [CommonModule,
544
968
  AuthFlowRoutingModule,
545
969
  UpdButtonModule,
546
- FormsModule] }); }
970
+ UpdIconsModule,
971
+ FormsModule,
972
+ UpdLinkModule,
973
+ UpdCardModule,
974
+ UpdFormModule,
975
+ FooterModule,
976
+ HeaderModule] }); }
547
977
  }
548
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: AuthFlowModule, decorators: [{
978
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: AuthFlowModule, decorators: [{
549
979
  type: NgModule,
550
980
  args: [{
551
981
  imports: [
552
982
  CommonModule,
553
983
  AuthFlowRoutingModule,
554
984
  UpdButtonModule,
555
- FormsModule
985
+ UpdIconsModule,
986
+ FormsModule,
987
+ TranslocoDirective,
988
+ UpdLinkModule,
989
+ UpdCardModule,
990
+ UpdFormModule,
991
+ FooterModule,
992
+ HeaderModule
556
993
  ],
557
994
  declarations: [
558
995
  LoginComponent,
@@ -567,67 +1004,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
567
1004
  }]
568
1005
  }] });
569
1006
 
570
- /**
571
- * Layout configuration.
572
- */
573
- class UpdLayoutConfigModel {
574
- constructor(init) {
575
- Object.assign(this, init);
576
- if (this.mainLogo === undefined) {
577
- // this.mainLogo = LogoConstants.defaultLogo; // TODO: add images
578
- }
579
- if (this.smallLogo === undefined) {
580
- // this.smallLogo = LogoConstants.smallLogo;
581
- }
582
- if (this.loggedOutBackground === undefined) {
583
- // this.loggedOutBackground = ImageConstants.loggedOutBackground;
584
- }
585
- if (this.menuTitle === undefined) {
586
- this.menuTitle = 'UpDevs';
587
- }
588
- if (this.showNotificationsButton === undefined) {
589
- this.showNotificationsButton = true;
590
- }
591
- if (this.showUserMenu === undefined) {
592
- this.showUserMenu = true;
593
- }
594
- if (this.displayReportErrorButton === undefined) {
595
- this.displayReportErrorButton = false;
596
- }
597
- }
598
- }
599
-
600
- /**
601
- * Layout constants.
602
- */
603
- class LayoutConstants {
604
- /**
605
- * Key to inject the default configuration.
606
- */
607
- static { this.defaultOptionsKey = 'upd-layout-default-options'; }
608
- /**
609
- * Injection token for the default configuration.
610
- */
611
- static { this.defaultOptionsInjectionToken = new InjectionToken(LayoutConstants.defaultOptionsKey); }
612
- }
613
-
614
- /**
615
- * Layout configuration data.
616
- */
617
- class UpdLayoutConfigService {
618
- constructor(layoutConfig) {
619
- this.config = new UpdLayoutConfigModel(layoutConfig);
620
- }
621
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: UpdLayoutConfigService, deps: [{ token: LayoutConstants.defaultOptionsInjectionToken }], target: i0.ɵɵFactoryTarget.Injectable }); }
622
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: UpdLayoutConfigService }); }
623
- }
624
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: UpdLayoutConfigService, decorators: [{
625
- type: Injectable
626
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
627
- type: Inject,
628
- args: [LayoutConstants.defaultOptionsInjectionToken]
629
- }] }]; } });
630
-
631
1007
  /**
632
1008
  * Layout module.
633
1009
  */
@@ -644,20 +1020,23 @@ class UpdLayoutModule {
644
1020
  ]
645
1021
  };
646
1022
  }
647
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: UpdLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
648
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.11", ngImport: i0, type: UpdLayoutModule, imports: [CommonModule,
649
- UpdCoreLayoutModule] }); }
650
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: UpdLayoutModule, providers: [
1023
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1024
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: UpdLayoutModule, imports: [CommonModule,
1025
+ UpdCoreLayoutModule,
1026
+ UpdNotificationsModule] }); }
1027
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdLayoutModule, providers: [
651
1028
  UpdLayoutConfigService
652
1029
  ], imports: [CommonModule,
653
- UpdCoreLayoutModule] }); }
1030
+ UpdCoreLayoutModule,
1031
+ UpdNotificationsModule] }); }
654
1032
  }
655
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImport: i0, type: UpdLayoutModule, decorators: [{
1033
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdLayoutModule, decorators: [{
656
1034
  type: NgModule,
657
1035
  args: [{
658
1036
  imports: [
659
1037
  CommonModule,
660
- UpdCoreLayoutModule
1038
+ UpdCoreLayoutModule,
1039
+ UpdNotificationsModule
661
1040
  ],
662
1041
  providers: [
663
1042
  UpdLayoutConfigService
@@ -669,5 +1048,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.11", ngImpo
669
1048
  * Generated bundle index. Do not edit.
670
1049
  */
671
1050
 
672
- export { AuthFlowModule, AuthFlowRoutingModule, BasePageComponent, BlankLayoutComponent, BlankLayoutModule, FooterComponent, FooterCopyrightDirective, HeaderComponent, LoggedOutComponent, LoginComponent, OauthCallbackComponent, PageHeaderComponent, SidebarComponent, UpdLayoutConfigService, UpdLayoutModule, VerticalSidebarLayoutComponent, VerticalSidebarLayoutModule, routes };
1051
+ export { AuthFlowModule, AuthFlowRoutingModule, BasePageComponent, BlankLayoutComponent, BlankLayoutModule, FooterComponent, FooterModule, HeaderComponent, HeaderModule, LoggedOutComponent, LoginComponent, OauthCallbackComponent, PageHeaderComponent, SidebarComponent, UpdLayoutConfigService, UpdLayoutModule, VerticalSidebarLayoutComponent, VerticalSidebarLayoutModule, routes };
673
1052
  //# sourceMappingURL=updevs-components-layout.mjs.map