@updevs/components 1.0.0-alpha.1 → 1.0.0-alpha.100

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 (198) hide show
  1. package/README.md +1 -24
  2. package/assets/styles/_bootstrap-components.scss +55 -0
  3. package/assets/styles/_bootstrap-config.scss +7 -0
  4. package/assets/styles/_bootstrap-override.scss +78 -0
  5. package/assets/styles/_config.scss +9 -0
  6. package/assets/styles/_core.scss +80 -0
  7. package/assets/styles/_debug.scss +49 -0
  8. package/assets/styles/_mixins.scss +2 -0
  9. package/assets/styles/_props.scss +91 -0
  10. package/assets/styles/_seven-columns.scss +73 -0
  11. package/assets/styles/_updevs.scss +25 -0
  12. package/assets/styles/_utilities-marketing.scss +209 -0
  13. package/assets/styles/_utilities.scss +133 -0
  14. package/assets/styles/_variables-dark.scss +19 -0
  15. package/assets/styles/_variables.scss +1003 -0
  16. package/assets/styles/fonts/_webfonts.scss +15 -0
  17. package/assets/styles/helpers/_index.scss +143 -0
  18. package/assets/styles/layout/_animations.scss +62 -0
  19. package/assets/styles/layout/_core.scss +62 -0
  20. package/assets/styles/layout/_dark.scss +77 -0
  21. package/assets/styles/layout/_footer.scss +12 -0
  22. package/assets/styles/layout/_navbar.scss +392 -0
  23. package/assets/styles/layout/_page.scss +170 -0
  24. package/assets/styles/layout/_root.scss +64 -0
  25. package/assets/styles/marketing/_browser.scss +67 -0
  26. package/assets/styles/marketing/_core.scss +8 -0
  27. package/assets/styles/marketing/_filters.scss +0 -0
  28. package/assets/styles/marketing/_hero.scss +70 -0
  29. package/assets/styles/marketing/_pricing.scss +111 -0
  30. package/assets/styles/marketing/_sections.scss +124 -0
  31. package/assets/styles/marketing/_shape.scss +31 -0
  32. package/assets/styles/mixins/_functions.scss +96 -0
  33. package/assets/styles/mixins/_mixins.scss +68 -0
  34. package/assets/styles/ui/_accordion.scss +178 -0
  35. package/assets/styles/ui/_alerts.scss +101 -0
  36. package/assets/styles/ui/_avatars.scss +145 -0
  37. package/assets/styles/ui/_badges.scss +113 -0
  38. package/assets/styles/ui/_breadcrumbs.scss +50 -0
  39. package/assets/styles/ui/_button-group.scss +16 -0
  40. package/assets/styles/ui/_buttons.scss +261 -0
  41. package/assets/styles/ui/_calendars.scss +104 -0
  42. package/assets/styles/ui/_cards.scss +595 -0
  43. package/assets/styles/ui/_carousel.scss +68 -0
  44. package/assets/styles/ui/_charts.scss +61 -0
  45. package/assets/styles/ui/_chat.scss +38 -0
  46. package/assets/styles/ui/_chips.scss +0 -0
  47. package/assets/styles/ui/_close.scss +60 -0
  48. package/assets/styles/ui/_datagrid.scss +17 -0
  49. package/assets/styles/ui/_dropdowns.scss +120 -0
  50. package/assets/styles/ui/_empty.scss +60 -0
  51. package/assets/styles/ui/_flags.scss +31 -0
  52. package/assets/styles/ui/_forms.scss +250 -0
  53. package/assets/styles/ui/_grid.scss +115 -0
  54. package/assets/styles/ui/_icons.scss +72 -0
  55. package/assets/styles/ui/_images.scss +19 -0
  56. package/assets/styles/ui/_legend.scss +12 -0
  57. package/assets/styles/ui/_lists.scss +123 -0
  58. package/assets/styles/ui/_loaders.scss +72 -0
  59. package/assets/styles/ui/_login.scss +3 -0
  60. package/assets/styles/ui/_markdown.scss +53 -0
  61. package/assets/styles/ui/_modals.scss +67 -0
  62. package/assets/styles/ui/_nav.scss +106 -0
  63. package/assets/styles/ui/_offcanvas.scss +17 -0
  64. package/assets/styles/ui/_pagination.scss +58 -0
  65. package/assets/styles/ui/_payments.scss +28 -0
  66. package/assets/styles/ui/_placeholder.scss +9 -0
  67. package/assets/styles/ui/_popovers.scss +2 -0
  68. package/assets/styles/ui/_progress.scss +107 -0
  69. package/assets/styles/ui/_ribbons.scss +157 -0
  70. package/assets/styles/ui/_segmented.scss +101 -0
  71. package/assets/styles/ui/_signature.scss +15 -0
  72. package/assets/styles/ui/_social.scss +52 -0
  73. package/assets/styles/ui/_stars.scss +13 -0
  74. package/assets/styles/ui/_status.scss +163 -0
  75. package/assets/styles/ui/_steps.scss +156 -0
  76. package/assets/styles/ui/_switch-icon.scss +211 -0
  77. package/assets/styles/ui/_tables.scss +176 -0
  78. package/assets/styles/ui/_tags.scss +57 -0
  79. package/assets/styles/ui/_timeline.scss +61 -0
  80. package/assets/styles/ui/_toasts.scss +18 -0
  81. package/assets/styles/ui/_toolbar.scss +10 -0
  82. package/assets/styles/ui/_tracking.scss +29 -0
  83. package/assets/styles/ui/_type.scss +330 -0
  84. package/assets/styles/ui/forms/_form-check.scss +91 -0
  85. package/assets/styles/ui/forms/_form-colorinput.scss +54 -0
  86. package/assets/styles/ui/forms/_form-custom.scss +28 -0
  87. package/assets/styles/ui/forms/_form-icon.scss +35 -0
  88. package/assets/styles/ui/forms/_form-imagecheck.scss +105 -0
  89. package/assets/styles/ui/forms/_form-selectgroup.scss +153 -0
  90. package/assets/styles/ui/forms/_validation.scss +13 -0
  91. package/assets/styles/ui/typo/_hr.scss +76 -0
  92. package/assets/styles/utils/_background.scss +15 -0
  93. package/assets/styles/utils/_colors.scss +101 -0
  94. package/assets/styles/utils/_opacity.scss +7 -0
  95. package/assets/styles/utils/_scroll.scss +45 -0
  96. package/assets/styles/utils/_shadow.scss +17 -0
  97. package/assets/styles/utils/_sizing.scss +10 -0
  98. package/assets/styles/utils/_text.scss +14 -0
  99. package/assets/styles/vendor/_apexcharts.scss +52 -0
  100. package/assets/styles/vendor/_coloris.scss +72 -0
  101. package/assets/styles/vendor/_dropzone.scss +27 -0
  102. package/assets/styles/vendor/_fslightbox.scss +13 -0
  103. package/assets/styles/vendor/_jsvectormap.scss +47 -0
  104. package/assets/styles/vendor/_litepicker.scss +69 -0
  105. package/assets/styles/vendor/_nouislider.scss +49 -0
  106. package/assets/styles/vendor/_plyr.scss +3 -0
  107. package/assets/styles/vendor/_stars-rating.scss +22 -0
  108. package/assets/styles/vendor/_tom-select.scss +81 -0
  109. package/assets/styles/vendor/_turbo.scss +3 -0
  110. package/assets/styles/vendor/_typed.scss +4 -0
  111. package/assets/styles/vendor/_wysiwyg.scss +46 -0
  112. package/fesm2022/updevs-components-badge.mjs +89 -0
  113. package/fesm2022/updevs-components-badge.mjs.map +1 -0
  114. package/fesm2022/updevs-components-button.mjs +193 -0
  115. package/fesm2022/updevs-components-button.mjs.map +1 -0
  116. package/fesm2022/updevs-components-calendar.mjs +582 -0
  117. package/fesm2022/updevs-components-calendar.mjs.map +1 -0
  118. package/fesm2022/updevs-components-card.mjs +242 -0
  119. package/fesm2022/updevs-components-card.mjs.map +1 -0
  120. package/fesm2022/updevs-components-drag-and-drop.mjs +185 -0
  121. package/fesm2022/updevs-components-drag-and-drop.mjs.map +1 -0
  122. package/fesm2022/updevs-components-dropdown.mjs +247 -0
  123. package/fesm2022/updevs-components-dropdown.mjs.map +1 -0
  124. package/fesm2022/updevs-components-form-controls-abstractions.mjs +106 -0
  125. package/fesm2022/updevs-components-form-controls-abstractions.mjs.map +1 -0
  126. package/fesm2022/updevs-components-form-controls-checkbox.mjs +99 -0
  127. package/fesm2022/updevs-components-form-controls-checkbox.mjs.map +1 -0
  128. package/fesm2022/updevs-components-form-controls-date-picker.mjs +175 -0
  129. package/fesm2022/updevs-components-form-controls-date-picker.mjs.map +1 -0
  130. package/fesm2022/updevs-components-form-controls-file-upload.mjs +272 -0
  131. package/fesm2022/updevs-components-form-controls-file-upload.mjs.map +1 -0
  132. package/fesm2022/updevs-components-form-controls-input.mjs +281 -0
  133. package/fesm2022/updevs-components-form-controls-input.mjs.map +1 -0
  134. package/fesm2022/updevs-components-form-controls-radio.mjs +98 -0
  135. package/fesm2022/updevs-components-form-controls-radio.mjs.map +1 -0
  136. package/fesm2022/updevs-components-form-controls-select.mjs +600 -0
  137. package/fesm2022/updevs-components-form-controls-select.mjs.map +1 -0
  138. package/fesm2022/updevs-components-form-controls-textarea.mjs +79 -0
  139. package/fesm2022/updevs-components-form-controls-textarea.mjs.map +1 -0
  140. package/fesm2022/updevs-components-form-controls-time-picker.mjs +345 -0
  141. package/fesm2022/updevs-components-form-controls-time-picker.mjs.map +1 -0
  142. package/fesm2022/updevs-components-form.mjs +562 -0
  143. package/fesm2022/updevs-components-form.mjs.map +1 -0
  144. package/fesm2022/updevs-components-layout.mjs +1054 -0
  145. package/fesm2022/updevs-components-layout.mjs.map +1 -0
  146. package/fesm2022/updevs-components-link.mjs +79 -0
  147. package/fesm2022/updevs-components-link.mjs.map +1 -0
  148. package/fesm2022/updevs-components-list.mjs +215 -0
  149. package/fesm2022/updevs-components-list.mjs.map +1 -0
  150. package/fesm2022/updevs-components-modal.mjs +505 -0
  151. package/fesm2022/updevs-components-modal.mjs.map +1 -0
  152. package/fesm2022/updevs-components-paginator.mjs +160 -0
  153. package/fesm2022/updevs-components-paginator.mjs.map +1 -0
  154. package/fesm2022/updevs-components-popover.mjs +215 -0
  155. package/fesm2022/updevs-components-popover.mjs.map +1 -0
  156. package/fesm2022/updevs-components-pricing.mjs +130 -0
  157. package/fesm2022/updevs-components-pricing.mjs.map +1 -0
  158. package/fesm2022/updevs-components-table.mjs +2060 -0
  159. package/fesm2022/updevs-components-table.mjs.map +1 -0
  160. package/fesm2022/updevs-components.mjs +33 -0
  161. package/fesm2022/updevs-components.mjs.map +1 -0
  162. package/package.json +127 -14
  163. package/types/updevs-components-badge.d.ts +44 -0
  164. package/types/updevs-components-button.d.ts +75 -0
  165. package/types/updevs-components-calendar.d.ts +175 -0
  166. package/types/updevs-components-card.d.ts +92 -0
  167. package/types/updevs-components-drag-and-drop.d.ts +74 -0
  168. package/types/updevs-components-dropdown.d.ts +124 -0
  169. package/types/updevs-components-form-controls-abstractions.d.ts +49 -0
  170. package/types/updevs-components-form-controls-checkbox.d.ts +33 -0
  171. package/types/updevs-components-form-controls-date-picker.d.ts +80 -0
  172. package/types/updevs-components-form-controls-file-upload.d.ts +69 -0
  173. package/types/updevs-components-form-controls-input.d.ts +95 -0
  174. package/types/updevs-components-form-controls-radio.d.ts +32 -0
  175. package/types/updevs-components-form-controls-select.d.ts +200 -0
  176. package/types/updevs-components-form-controls-textarea.d.ts +31 -0
  177. package/types/updevs-components-form-controls-time-picker.d.ts +164 -0
  178. package/types/updevs-components-form.d.ts +356 -0
  179. package/types/updevs-components-layout.d.ts +490 -0
  180. package/types/updevs-components-link.d.ts +34 -0
  181. package/types/updevs-components-list.d.ts +107 -0
  182. package/types/updevs-components-modal.d.ts +155 -0
  183. package/types/updevs-components-paginator.d.ts +58 -0
  184. package/types/updevs-components-popover.d.ts +63 -0
  185. package/types/updevs-components-pricing.d.ts +91 -0
  186. package/types/updevs-components-table.d.ts +619 -0
  187. package/types/updevs-components.d.ts +44 -0
  188. package/CHANGELOG.md +0 -8
  189. package/ng-package.json +0 -7
  190. package/src/lib/components.component.spec.ts +0 -23
  191. package/src/lib/components.component.ts +0 -14
  192. package/src/lib/components.module.ts +0 -17
  193. package/src/lib/components.service.spec.ts +0 -16
  194. package/src/lib/components.service.ts +0 -9
  195. package/src/public-api.ts +0 -7
  196. package/tsconfig.lib.json +0 -14
  197. package/tsconfig.lib.prod.json +0 -10
  198. package/tsconfig.spec.json +0 -14
@@ -0,0 +1,1054 @@
1
+ import * as i0 from '@angular/core';
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';
5
+ import { CommonModule } from '@angular/common';
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';
9
+ import { UpdIconsModule } from '@updevs/icons';
10
+ import * as i2 from '@updevs/components/dropdown';
11
+ import { UpdDropdownModule } from '@updevs/components/dropdown';
12
+ import * as i3 from '@updevs/components/link';
13
+ import { UpdLinkModule } from '@updevs/components/link';
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';
29
+
30
+ /**
31
+ * Basic page structure.
32
+ */
33
+ // eslint-disable-next-line @angular-eslint/directive-class-suffix
34
+ class BasePageComponent extends BaseComponent {
35
+ constructor() {
36
+ super(...arguments);
37
+ this._layoutService = inject(LayoutService);
38
+ }
39
+ ngOnDestroy() {
40
+ super.ngOnDestroy();
41
+ this._layoutService.pageHeader.set(undefined);
42
+ }
43
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BasePageComponent, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
44
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.4", type: BasePageComponent, isStandalone: false, usesInheritance: true, ngImport: i0 }); }
45
+ }
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BasePageComponent, decorators: [{
47
+ type: Directive,
48
+ args: [{ standalone: false }]
49
+ }] });
50
+
51
+ class FooterComponent extends BaseComponent {
52
+ constructor() {
53
+ super(...arguments);
54
+ this.wrapperClasses = '';
55
+ /**
56
+ * Whether the footer will always be shown.
57
+ */
58
+ this.isSticky = false;
59
+ /**
60
+ * Whether the footer is transparent or not.
61
+ */
62
+ this.isTransparent = true;
63
+ /**
64
+ * Links.
65
+ */
66
+ this.links = [];
67
+ /**
68
+ * Current year.
69
+ */
70
+ this.currentYear = new Date().getFullYear();
71
+ this.layoutService = inject(LayoutService);
72
+ this.baseWrapperClasses = 'footer d-print-none';
73
+ }
74
+ ngOnInit() {
75
+ this.updateWrapperClasses();
76
+ }
77
+ ngOnChanges(changes) {
78
+ if (!!changes['isSticky'].currentValue || !!changes['isTransparent'].currentValue) {
79
+ this.updateWrapperClasses();
80
+ }
81
+ }
82
+ updateWrapperClasses() {
83
+ const stickyBottomCls = this.isSticky ? ' sticky-bottom' : '';
84
+ const transparentCls = this.isTransparent ? ' footer-transparent' : '';
85
+ this.wrapperClasses = `${this.baseWrapperClasses}${stickyBottomCls}${transparentCls}`;
86
+ }
87
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: FooterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
88
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: FooterComponent, isStandalone: false, 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 }); }
89
+ }
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: FooterComponent, decorators: [{
91
+ type: Component,
92
+ args: [{ standalone: false, 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" }]
93
+ }], propDecorators: { wrapperClasses: [{
94
+ type: HostBinding,
95
+ args: ['class']
96
+ }] } });
97
+
98
+ class FooterModule {
99
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: FooterModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
100
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: FooterModule, declarations: [FooterComponent], imports: [CommonModule,
101
+ TranslocoModule], exports: [FooterComponent] }); }
102
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: FooterModule, imports: [CommonModule,
103
+ TranslocoModule] }); }
104
+ }
105
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: FooterModule, decorators: [{
106
+ type: NgModule,
107
+ args: [{
108
+ imports: [
109
+ CommonModule,
110
+ TranslocoModule
111
+ ],
112
+ declarations: [
113
+ FooterComponent
114
+ ],
115
+ exports: [
116
+ FooterComponent
117
+ ]
118
+ }]
119
+ }] });
120
+
121
+ class HeaderComponent extends BaseComponent {
122
+ constructor() {
123
+ super(...arguments);
124
+ this.languageSwitcherRef = viewChild('languageSwitcherBtn', { ...(ngDevMode ? { debugName: "languageSwitcherRef" } : {}), read: ElementRef });
125
+ this.notificationsRef = viewChild('notificationsBtn', { ...(ngDevMode ? { debugName: "notificationsRef" } : {}), read: ElementRef });
126
+ this.loggedUserRef = viewChild('loggedUserBtn', { ...(ngDevMode ? { debugName: "loggedUserRef" } : {}), read: ElementRef });
127
+ this.isLanguageSwitcherDropdownOpen = false;
128
+ this.isNotificationsDropdownOpen = false;
129
+ this.isLoggedUserDropdownOpen = false;
130
+ this.style = input('light', ...(ngDevMode ? [{ debugName: "style" }] : []));
131
+ this.nextThemeIcon = computed(() => this.currentPreferences()?.isDarkTheme ? 'sun' : 'moon-stars', ...(ngDevMode ? [{ debugName: "nextThemeIcon" }] : []));
132
+ this.currentNotificationsIcon = computed(() => this.hasNewNotifications() ? 'bell-ringing' : 'bell', ...(ngDevMode ? [{ debugName: "currentNotificationsIcon" }] : []));
133
+ this.hasNewNotifications = computed(() => this.currentNotifications().some(n => !n.dateRead), ...(ngDevMode ? [{ debugName: "hasNewNotifications" }] : []));
134
+ this.userInfo = computed(() => this.securityStorage.getUserInfo(), ...(ngDevMode ? [{ debugName: "userInfo" }] : []));
135
+ this.textService = inject(TextService);
136
+ this.isSidebarMobileOpen = signal(false, ...(ngDevMode ? [{ debugName: "isSidebarMobileOpen" }] : []));
137
+ this.shouldBlinkIfNewNotifications = computed(() => !!this.coreLayoutConfigService.config.shouldBlinkIfNewNotifications, ...(ngDevMode ? [{ debugName: "shouldBlinkIfNewNotifications" }] : []));
138
+ this.languagesOptions = computed(() => {
139
+ const allLanguagesOptions = [];
140
+ const availableLanguages = (this.coreLayoutConfigService.config.availableLanguages || {});
141
+ Object.keys(availableLanguages).forEach(key => {
142
+ allLanguagesOptions.push({
143
+ id: key,
144
+ type: 'default',
145
+ text: availableLanguages[key],
146
+ isActive: this.currentLanguageKey() === key
147
+ });
148
+ });
149
+ return allLanguagesOptions;
150
+ }, ...(ngDevMode ? [{ debugName: "languagesOptions" }] : []));
151
+ this.loggedUserOptions = computed(() => {
152
+ const userActions = [];
153
+ this.coreLayoutConfigService.config.loggedUserMenuActions.forEach(act => userActions.push({
154
+ id: act.id(),
155
+ text: act.text(),
156
+ type: 'default',
157
+ icon: act.iconModel?.()
158
+ }));
159
+ return userActions;
160
+ }, ...(ngDevMode ? [{ debugName: "loggedUserOptions" }] : []));
161
+ this.userIdentification = computed(() => !!this.userInfo() ? this.coreLayoutConfigService.config.getUserName(this.userInfo()) : '', ...(ngDevMode ? [{ debugName: "userIdentification" }] : []));
162
+ this.userDescription = computed(() => !!this.coreLayoutConfigService.config.getUserDescription
163
+ ? this.coreLayoutConfigService.config.getUserDescription(this.userInfo())
164
+ : '', ...(ngDevMode ? [{ debugName: "userDescription" }] : []));
165
+ this.latestNotifications = computed(() => {
166
+ const unreadNotifications = this.currentNotifications()
167
+ .filter(n => !n.dateRead)
168
+ .sort((a, b) => new Date(b.dateReceived).getTime() - new Date(a.dateReceived).getTime())
169
+ .slice(0, this.coreLayoutConfigService.config.numberOfLastNotificationsDisplayed);
170
+ const readNotifications = this.currentNotifications()
171
+ .filter(n => !!n.dateRead)
172
+ .sort((a, b) => new Date(b.dateReceived).getTime() - new Date(a.dateReceived).getTime())
173
+ .slice(0, this.coreLayoutConfigService.config.numberOfLastNotificationsDisplayed);
174
+ return [
175
+ ...unreadNotifications,
176
+ ...readNotifications
177
+ ].slice(0, this.coreLayoutConfigService.config.numberOfLastNotificationsDisplayed);
178
+ }, ...(ngDevMode ? [{ debugName: "latestNotifications" }] : []));
179
+ this.userInitials = computed(() => {
180
+ const firstChar = this.userIdentification().charAt(0);
181
+ const lastSpaceIndex = this.userIdentification().lastIndexOf(' ');
182
+ const firstAfterLastSpace = lastSpaceIndex !== -1 ? this.userIdentification().charAt(lastSpaceIndex + 1) : '';
183
+ return `${firstChar}${firstAfterLastSpace}`;
184
+ }, ...(ngDevMode ? [{ debugName: "userInitials" }] : []));
185
+ this.securityStorage = inject(SecurityStorage);
186
+ this.coreLayoutConfigService = inject(UpdCoreLayoutConfigService);
187
+ this.layoutService = inject(LayoutService);
188
+ this.translocoService = inject(TranslocoService);
189
+ this.preferencesStorage = inject(PreferencesStorage);
190
+ this.notificationsService = inject(NotificationsService);
191
+ this.currentPreferences = this.preferencesStorage.getPreferences();
192
+ this.currentNotifications = this.notificationsService.notifications;
193
+ this.currentLanguageKey = signal('', ...(ngDevMode ? [{ debugName: "currentLanguageKey" }] : []));
194
+ this.wrapperClasses = computed(() => `navbar navbar-expand-md d-none d-lg-flex d-print-none navbar-${this.style()}`, ...(ngDevMode ? [{ debugName: "wrapperClasses" }] : []));
195
+ // eslint-disable-next-line @typescript-eslint/member-ordering
196
+ this.config = computed(() => this.layoutService.mainHeaderConfig(), ...(ngDevMode ? [{ debugName: "config" }] : []));
197
+ }
198
+ get classes() {
199
+ return this.wrapperClasses();
200
+ }
201
+ ngOnInit() {
202
+ if (!!this.currentPreferences()?.isDarkTheme) {
203
+ this.layoutService.setDarkMode();
204
+ }
205
+ if (!!this.currentPreferences()?.currentLanguageCode) {
206
+ const code = this.currentPreferences().currentLanguageCode;
207
+ this.currentLanguageKey.set(code);
208
+ this.translocoService.setActiveLang(code);
209
+ }
210
+ }
211
+ switchTheme() {
212
+ this.layoutService.toggleDarkMode();
213
+ }
214
+ switchLanguage(item) {
215
+ this.currentLanguageKey.set(item.id);
216
+ this.translocoService.setActiveLang(item.id);
217
+ this.preferencesStorage.savePreferences({ ...this.currentPreferences(), currentLanguageCode: item.id });
218
+ this.layoutService.notifyUserChangedLanguage(item.id);
219
+ this.isLanguageSwitcherDropdownOpen = false;
220
+ }
221
+ selectLoggedUserMenuItem(item) {
222
+ const btn = this.coreLayoutConfigService.config.loggedUserMenuActions.find(b => b.id() === item.id);
223
+ if (!!btn?.clickFunction) {
224
+ btn.clickFunction({ data: this.userInfo() });
225
+ }
226
+ }
227
+ readNotification(notification) {
228
+ if (!notification.dateRead) {
229
+ this.notificationsService.markAsRead(notification.id);
230
+ }
231
+ this.notificationsService.clickOnNotification(notification);
232
+ }
233
+ removeNotification(notification) {
234
+ this.notificationsService.removeNotifications(notification.id);
235
+ }
236
+ toggleSidebarOnMobile() {
237
+ this.isSidebarMobileOpen.set(!this.isSidebarMobileOpen());
238
+ }
239
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: HeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
240
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: HeaderComponent, isStandalone: false, 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 }); }
241
+ }
242
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: HeaderComponent, decorators: [{
243
+ type: Component,
244
+ args: [{ standalone: false, 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" }]
245
+ }], propDecorators: { classes: [{
246
+ type: HostBinding,
247
+ args: ['class']
248
+ }], languageSwitcherRef: [{ type: i0.ViewChild, args: ['languageSwitcherBtn', { ...{ read: ElementRef }, isSignal: true }] }], notificationsRef: [{ type: i0.ViewChild, args: ['notificationsBtn', { ...{ read: ElementRef }, isSignal: true }] }], loggedUserRef: [{ type: i0.ViewChild, args: ['loggedUserBtn', { ...{ read: ElementRef }, isSignal: true }] }], style: [{ type: i0.Input, args: [{ isSignal: true, alias: "style", required: false }] }] } });
249
+
250
+ class HeaderModule {
251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: HeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
252
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: HeaderModule, declarations: [HeaderComponent], imports: [CommonModule,
253
+ TranslocoModule,
254
+ UpdIconsModule,
255
+ UpdDropdownModule,
256
+ UpdLinkModule], exports: [HeaderComponent] }); }
257
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: HeaderModule, imports: [CommonModule,
258
+ TranslocoModule,
259
+ UpdIconsModule,
260
+ UpdDropdownModule,
261
+ UpdLinkModule] }); }
262
+ }
263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: HeaderModule, decorators: [{
264
+ type: NgModule,
265
+ args: [{
266
+ imports: [
267
+ CommonModule,
268
+ TranslocoModule,
269
+ UpdIconsModule,
270
+ UpdDropdownModule,
271
+ UpdLinkModule
272
+ ],
273
+ declarations: [
274
+ HeaderComponent
275
+ ],
276
+ exports: [
277
+ HeaderComponent
278
+ ]
279
+ }]
280
+ }] });
281
+
282
+ /**
283
+ * Configuration of the login page layout.
284
+ */
285
+ class LoginPageConfigModel {
286
+ constructor(init) {
287
+ /**
288
+ * Buttons used for social login (google, facebook, etc).
289
+ */
290
+ this.socialLoginButtons = [];
291
+ Object.assign(this, init);
292
+ this.layout = init?.layout || 'centered-box';
293
+ this.borderColor = init?.borderColor || 'primary';
294
+ this.signInButtonColor = init?.signInButtonColor || 'primary';
295
+ this.linksColor = init?.linksColor || this.signInButtonColor;
296
+ if (init?.socialLoginButtons) {
297
+ this.socialLoginButtons = init.socialLoginButtons;
298
+ }
299
+ }
300
+ }
301
+
302
+ /**
303
+ * Configuration for the pages related to the security.
304
+ */
305
+ class SecurityLayoutConfigModel {
306
+ constructor(init) {
307
+ this.loginPage = new LoginPageConfigModel(init?.loginPage);
308
+ }
309
+ }
310
+
311
+ /**
312
+ * Layout configuration.
313
+ */
314
+ class UpdLayoutConfigModel {
315
+ constructor(init) {
316
+ if (init?.mainLogo === undefined) {
317
+ // this.mainLogo = LogoConstants.defaultLogo; // TODO: add images
318
+ }
319
+ if (init?.smallLogo === undefined) {
320
+ // this.smallLogo = LogoConstants.smallLogo;
321
+ }
322
+ if (init?.loggedOutBackground === undefined) {
323
+ // this.loggedOutBackground = ImageConstants.loggedOutBackground;
324
+ }
325
+ this.menuTitle = init?.menuTitle || 'UpDevs';
326
+ this.showNotificationsButton = init?.showNotificationsButton || true;
327
+ this.showUserMenu = init?.showUserMenu || true;
328
+ this.displayReportErrorButton = init?.displayReportErrorButton || false;
329
+ this.useFluidLayout = init?.useFluidLayout || false;
330
+ this.securityLayoutConfig = new SecurityLayoutConfigModel(init?.securityLayoutConfig);
331
+ }
332
+ }
333
+
334
+ /**
335
+ * Layout constants.
336
+ */
337
+ class LayoutConstants {
338
+ /**
339
+ * Key to inject the default configuration.
340
+ */
341
+ static { this.defaultOptionsKey = 'upd-layout-default-options'; }
342
+ /**
343
+ * Injection token for the default configuration.
344
+ */
345
+ static { this.defaultOptionsInjectionToken = new InjectionToken(LayoutConstants.defaultOptionsKey); }
346
+ }
347
+
348
+ /**
349
+ * Layout configuration data.
350
+ */
351
+ class UpdLayoutConfigService {
352
+ constructor(layoutConfig) {
353
+ this.config = new UpdLayoutConfigModel(layoutConfig);
354
+ }
355
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: UpdLayoutConfigService, deps: [{ token: LayoutConstants.defaultOptionsInjectionToken }], target: i0.ɵɵFactoryTarget.Injectable }); }
356
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: UpdLayoutConfigService }); }
357
+ }
358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: UpdLayoutConfigService, decorators: [{
359
+ type: Injectable
360
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
361
+ type: Inject,
362
+ args: [LayoutConstants.defaultOptionsInjectionToken]
363
+ }] }] });
364
+
365
+ /**
366
+ * Basic layout structure.
367
+ */
368
+ class BaseLayout extends BaseComponent {
369
+ constructor() {
370
+ super(...arguments);
371
+ this._layoutConfigService = inject(UpdLayoutConfigService);
372
+ this._layoutService = inject(LayoutService);
373
+ }
374
+ ngOnInit() {
375
+ if (this._layoutConfigService.config.useFluidLayout) {
376
+ this._layoutService.addBodyClasses('layout-fluid');
377
+ }
378
+ }
379
+ ngOnDestroy() {
380
+ super.ngOnDestroy();
381
+ if (this._layoutConfigService.config.useFluidLayout) {
382
+ this._layoutService.removeBodyClasses('layout-fluid');
383
+ }
384
+ }
385
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BaseLayout, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
386
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.1.4", type: BaseLayout, isStandalone: false, usesInheritance: true, ngImport: i0 }); }
387
+ }
388
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BaseLayout, decorators: [{
389
+ type: Directive,
390
+ args: [{ standalone: false }]
391
+ }] });
392
+
393
+ class BlankLayoutComponent extends BaseLayout {
394
+ constructor() {
395
+ super(...arguments);
396
+ this.config = computed(() => this._layoutService.mainHeaderConfig(), ...(ngDevMode ? [{ debugName: "config" }] : []));
397
+ }
398
+ ngOnInit() {
399
+ // Overriding layout fluid from parent.
400
+ }
401
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BlankLayoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
402
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: BlankLayoutComponent, isStandalone: false, 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", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: FooterComponent, selector: "upd-footer" }, { kind: "component", type: HeaderComponent, selector: "upd-header", inputs: ["style"] }] }); }
403
+ }
404
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BlankLayoutComponent, decorators: [{
405
+ type: Component,
406
+ args: [{ standalone: false, 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" }]
407
+ }] });
408
+
409
+ class BlankLayoutModule {
410
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BlankLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
411
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: BlankLayoutModule, declarations: [BlankLayoutComponent], imports: [CommonModule,
412
+ RouterOutlet,
413
+ TranslocoPipe,
414
+ UpdDropdownModule,
415
+ UpdIconsModule,
416
+ UpdLinkModule,
417
+ FooterModule,
418
+ HeaderModule], exports: [BlankLayoutComponent] }); }
419
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BlankLayoutModule, imports: [CommonModule,
420
+ UpdDropdownModule,
421
+ UpdIconsModule,
422
+ UpdLinkModule,
423
+ FooterModule,
424
+ HeaderModule] }); }
425
+ }
426
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: BlankLayoutModule, decorators: [{
427
+ type: NgModule,
428
+ args: [{
429
+ imports: [
430
+ CommonModule,
431
+ RouterOutlet,
432
+ TranslocoPipe,
433
+ UpdDropdownModule,
434
+ UpdIconsModule,
435
+ UpdLinkModule,
436
+ FooterModule,
437
+ HeaderModule
438
+ ],
439
+ declarations: [
440
+ BlankLayoutComponent
441
+ ],
442
+ exports: [
443
+ BlankLayoutComponent
444
+ ]
445
+ }]
446
+ }] });
447
+
448
+ var UpDevs$1 = {
449
+ Login: {
450
+ Title: "Login",
451
+ NoAccountYet: "Don't have an account?",
452
+ SignUp: "Sign-up",
453
+ SignIn: "Sign-in",
454
+ RecoverPassword: "Recover my password",
455
+ RememberMe: "Remember me on this device",
456
+ Or: "or",
457
+ Email: "Email",
458
+ Password: "Password"
459
+ },
460
+ Footer: {
461
+ Prefix: "Copyright",
462
+ "Symbol": "©",
463
+ Suffix: "All rights reserved."
464
+ },
465
+ NotificationCenter: {
466
+ Title: "Latest notifications",
467
+ NoNotifications: "No notifications"
468
+ },
469
+ Header: {
470
+ Search: "Search"
471
+ }
472
+ };
473
+ var en = {
474
+ UpDevs: UpDevs$1
475
+ };
476
+
477
+ var en$1 = /*#__PURE__*/Object.freeze({
478
+ __proto__: null,
479
+ UpDevs: UpDevs$1,
480
+ default: en
481
+ });
482
+
483
+ var UpDevs = {
484
+ Login: {
485
+ Title: "Login",
486
+ NoAccountYet: "Não tem conta?",
487
+ SignUp: "Cadastre-se",
488
+ SignIn: "Entrar",
489
+ RecoverPassword: "Recuperar minha senha",
490
+ RememberMe: "Lembrar",
491
+ Or: "ou",
492
+ Email: "Email",
493
+ Password: "Senha"
494
+ },
495
+ Footer: {
496
+ Prefix: "Copyright",
497
+ "Symbol": "©",
498
+ Suffix: "Todos os direitos reservados."
499
+ },
500
+ NotificationCenter: {
501
+ Title: "Últimas notificações",
502
+ NoNotifications: "Sem notificações"
503
+ },
504
+ Header: {
505
+ Search: "Pesquisar"
506
+ }
507
+ };
508
+ var pt = {
509
+ UpDevs: UpDevs
510
+ };
511
+
512
+ var pt$1 = /*#__PURE__*/Object.freeze({
513
+ __proto__: null,
514
+ UpDevs: UpDevs,
515
+ default: pt
516
+ });
517
+
518
+ class SidebarComponent extends BaseComponent {
519
+ constructor() {
520
+ super(...arguments);
521
+ this.wrapperClasses = 'navbar navbar-vertical navbar-expand-lg';
522
+ this.theme = 'dark';
523
+ this.menuItems = [];
524
+ this.isLoggedUserDropdownOpen = false;
525
+ this.loggedUserRef = viewChild('loggedUserBtn', { ...(ngDevMode ? { debugName: "loggedUserRef" } : {}), read: ElementRef });
526
+ this.textService = inject(TextService);
527
+ this.isSidebarMobileOpen = signal(false, ...(ngDevMode ? [{ debugName: "isSidebarMobileOpen" }] : []));
528
+ this.config = computed(() => this.layoutService.mainHeaderConfig(), ...(ngDevMode ? [{ debugName: "config" }] : []));
529
+ this.userInfo = computed(() => this.securityStorage.getUserInfo(), ...(ngDevMode ? [{ debugName: "userInfo" }] : []));
530
+ this.userIdentification = computed(() => !!this.userInfo() ? this.coreLayoutConfigService.config.getUserName(this.userInfo()) : '', ...(ngDevMode ? [{ debugName: "userIdentification" }] : []));
531
+ this.userDescription = computed(() => !!this.coreLayoutConfigService.config.getUserDescription
532
+ ? this.coreLayoutConfigService.config.getUserDescription(this.userInfo())
533
+ : '', ...(ngDevMode ? [{ debugName: "userDescription" }] : []));
534
+ this.loggedUserOptions = computed(() => {
535
+ const userActions = [];
536
+ this.coreLayoutConfigService.config.loggedUserMenuActions.forEach(act => userActions.push({
537
+ id: act.id(),
538
+ text: act.text(),
539
+ type: 'default',
540
+ icon: act.iconModel?.()
541
+ }));
542
+ return userActions;
543
+ }, ...(ngDevMode ? [{ debugName: "loggedUserOptions" }] : []));
544
+ this.userInitials = computed(() => {
545
+ const firstChar = this.userIdentification().charAt(0);
546
+ const lastSpaceIndex = this.userIdentification().lastIndexOf(' ');
547
+ const firstAfterLastSpace = lastSpaceIndex !== -1 ? this.userIdentification().charAt(lastSpaceIndex + 1) : '';
548
+ return `${firstChar}${firstAfterLastSpace}`;
549
+ }, ...(ngDevMode ? [{ debugName: "userInitials" }] : []));
550
+ this.currentRoute = '';
551
+ this.menuItemsBackup = [];
552
+ this.router = inject(Router);
553
+ this.menuService = inject(MenuService);
554
+ this.layoutService = inject(LayoutService);
555
+ this.securityStorage = inject(SecurityStorage);
556
+ this.coreLayoutConfigService = inject(UpdCoreLayoutConfigService);
557
+ }
558
+ ngOnInit() {
559
+ this.currentRoute = this.router.url;
560
+ this.menuItems = this.menuService.generateMenu();
561
+ this.menuItemsBackup = [...this.menuItems];
562
+ const menuRefreshSub = this.menuService.refreshSubject.subscribe(() => {
563
+ this.menuItems = [...this.menuService.generateMenu()];
564
+ this.menuItemsBackup = [...this.menuItems];
565
+ this.updateActiveRoute();
566
+ });
567
+ const routerSub = this.router.events.pipe(filter(event => event instanceof NavigationStart)).subscribe(event => {
568
+ this.currentRoute = event.url;
569
+ this.updateActiveRoute();
570
+ });
571
+ this.updateActiveRoute();
572
+ this.addSubscriptions(routerSub, menuRefreshSub);
573
+ }
574
+ onMenuItemClick(item) {
575
+ if (item.isLocked) {
576
+ if (!!item.lockedClickFunction) {
577
+ item.lockedClickFunction();
578
+ }
579
+ return;
580
+ }
581
+ let newMenuItems = this.resetMenuState(this.menuItems);
582
+ newMenuItems = this.setItemActive(newMenuItems, item, this.hasChildren(item) ? !item.isActive : true);
583
+ newMenuItems = this.updateParents(newMenuItems, item);
584
+ this.menuItems = newMenuItems;
585
+ if (!!item.clickFunction) {
586
+ item.clickFunction();
587
+ return;
588
+ }
589
+ if (this.hasChildren(item)) {
590
+ return;
591
+ }
592
+ const fullPath = this.findItemById(this.menuItemsBackup, item.id).getFullPath();
593
+ this.router.navigate(fullPath).then();
594
+ }
595
+ hasChildren(item) {
596
+ return (item.children?.length || 0) > 0;
597
+ }
598
+ asMenuItem(item) {
599
+ return item;
600
+ }
601
+ getItemClasses(item, activeClass, ...classes) {
602
+ return [
603
+ ...classes,
604
+ item.isActive ? activeClass : '',
605
+ item.isLocked ? 'disabled' : ''
606
+ ];
607
+ }
608
+ toggleSidebarOnMobile() {
609
+ this.isSidebarMobileOpen.set(!this.isSidebarMobileOpen());
610
+ }
611
+ selectLoggedUserMenuItem(item) {
612
+ const btn = this.coreLayoutConfigService.config.loggedUserMenuActions.find(b => b.id() === item.id);
613
+ if (!!btn?.clickFunction) {
614
+ btn.clickFunction({ data: this.userInfo() });
615
+ }
616
+ }
617
+ findActiveNode(item, fullPath) {
618
+ if (item.fullPath === fullPath) {
619
+ return item;
620
+ }
621
+ for (const child of item.children) {
622
+ const found = this.findActiveNode(child, fullPath);
623
+ if (found) {
624
+ return found;
625
+ }
626
+ }
627
+ return undefined;
628
+ }
629
+ updateActiveRoute() {
630
+ let newMenuItems = this.resetMenuState(this.menuItems);
631
+ const activePath = this.getActivePath(newMenuItems);
632
+ newMenuItems = this.setActivePath(newMenuItems, activePath);
633
+ this.menuItems = newMenuItems;
634
+ }
635
+ setActivePath(items, path) {
636
+ if (path.length === 0) {
637
+ return items;
638
+ }
639
+ return items.map(item => {
640
+ const pathItem = path.find(p => p.id === item.id);
641
+ if (!pathItem) {
642
+ return item;
643
+ }
644
+ const newItem = { ...item, isActive: true };
645
+ if (newItem.children?.length) {
646
+ newItem.children = this.setActivePath(newItem.children, path.filter(p => p.parent?.id === newItem.id));
647
+ newItem.children.forEach(child => child.parent = newItem);
648
+ }
649
+ return newItem;
650
+ });
651
+ }
652
+ getActivePath(items) {
653
+ let activeItem;
654
+ // Find the deepest active item.
655
+ for (const item of items) {
656
+ activeItem = this.findActiveNode(item, this.currentRoute);
657
+ if (activeItem) {
658
+ break;
659
+ }
660
+ }
661
+ // Collect parent hierarchy.
662
+ const path = [];
663
+ while (activeItem) {
664
+ path.unshift(activeItem);
665
+ activeItem = activeItem.parent;
666
+ }
667
+ return path;
668
+ }
669
+ resetMenuState(items) {
670
+ return items.map(item => {
671
+ const newItem = { ...item, isActive: false };
672
+ if (newItem.children?.length) {
673
+ newItem.children = this.resetMenuState(newItem.children);
674
+ newItem.children.forEach(child => child.parent = newItem);
675
+ }
676
+ return newItem;
677
+ });
678
+ }
679
+ setItemActive(items, target, isActive) {
680
+ return items.map(item => {
681
+ if (item.id === target.id) {
682
+ const newItem = { ...item, isActive };
683
+ if (newItem.children?.length) {
684
+ newItem.children = this.setItemActive(newItem.children, target, isActive);
685
+ newItem.children.forEach(child => child.parent = newItem);
686
+ }
687
+ return newItem;
688
+ }
689
+ if (item.children?.length) {
690
+ const newChildren = this.setItemActive(item.children, target, isActive);
691
+ const newItem = { ...item, children: newChildren };
692
+ newChildren.forEach(child => child.parent = newItem);
693
+ return newItem;
694
+ }
695
+ return item;
696
+ });
697
+ }
698
+ updateParents(items, childItem) {
699
+ let parent = childItem.parent;
700
+ let updatedItems = [...items];
701
+ while (parent) {
702
+ updatedItems = updatedItems.map(item => {
703
+ if (item.id === parent.id) {
704
+ return { ...parent, isActive: true };
705
+ }
706
+ return item;
707
+ });
708
+ parent = parent.parent;
709
+ }
710
+ return updatedItems;
711
+ }
712
+ findItemById(items, targetId) {
713
+ for (const item of items) {
714
+ if (item.id === targetId) {
715
+ return item;
716
+ }
717
+ if (item.children?.length) {
718
+ const child = this.findItemById(item.children, targetId);
719
+ if (!!child) {
720
+ return child;
721
+ }
722
+ }
723
+ }
724
+ return undefined;
725
+ }
726
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: SidebarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
727
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: SidebarComponent, isStandalone: false, 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 }); }
728
+ }
729
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: SidebarComponent, decorators: [{
730
+ type: Component,
731
+ args: [{ standalone: false, 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" }]
732
+ }], propDecorators: { wrapperClasses: [{
733
+ type: HostBinding,
734
+ args: ['class']
735
+ }], theme: [{
736
+ type: HostBinding,
737
+ args: ['attr.data-bs-theme']
738
+ }], loggedUserRef: [{ type: i0.ViewChild, args: ['loggedUserBtn', { ...{ read: ElementRef }, isSignal: true }] }] } });
739
+
740
+ class PageHeaderComponent {
741
+ constructor() {
742
+ this.model = input.required(...(ngDevMode ? [{ debugName: "model" }] : []));
743
+ }
744
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: PageHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
745
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: PageHeaderComponent, isStandalone: false, 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", "stopPropagation"], outputs: ["clicked"] }] }); }
746
+ }
747
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: PageHeaderComponent, decorators: [{
748
+ type: Component,
749
+ args: [{ standalone: false, 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" }]
750
+ }], propDecorators: { model: [{ type: i0.Input, args: [{ isSignal: true, alias: "model", required: true }] }] } });
751
+
752
+ class VerticalSidebarLayoutComponent extends BaseLayout {
753
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: VerticalSidebarLayoutComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
754
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: VerticalSidebarLayoutComponent, isStandalone: false, 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", "routerOutletData"], 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 }); }
755
+ }
756
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: VerticalSidebarLayoutComponent, decorators: [{
757
+ type: Component,
758
+ args: [{ standalone: false, 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" }]
759
+ }] });
760
+
761
+ class VerticalSidebarLayoutModule {
762
+ constructor(translocoService) {
763
+ translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });
764
+ translocoService.setTranslation(en$1, 'en');
765
+ translocoService.setTranslation(pt$1, 'pt');
766
+ }
767
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: VerticalSidebarLayoutModule, deps: [{ token: i1$1.TranslocoService }], target: i0.ɵɵFactoryTarget.NgModule }); }
768
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: VerticalSidebarLayoutModule, declarations: [VerticalSidebarLayoutComponent,
769
+ SidebarComponent,
770
+ PageHeaderComponent], imports: [CommonModule,
771
+ RouterModule,
772
+ TranslocoModule,
773
+ UpdIconsModule,
774
+ UpdCoreLayoutModule,
775
+ UpdButtonModule,
776
+ UpdLinkModule,
777
+ UpdDropdownModule,
778
+ FooterModule,
779
+ HeaderModule], exports: [VerticalSidebarLayoutComponent,
780
+ SidebarComponent,
781
+ PageHeaderComponent] }); }
782
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: VerticalSidebarLayoutModule, imports: [CommonModule,
783
+ RouterModule,
784
+ TranslocoModule,
785
+ UpdIconsModule,
786
+ UpdCoreLayoutModule,
787
+ UpdButtonModule,
788
+ UpdLinkModule,
789
+ UpdDropdownModule,
790
+ FooterModule,
791
+ HeaderModule] }); }
792
+ }
793
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: VerticalSidebarLayoutModule, decorators: [{
794
+ type: NgModule,
795
+ args: [{
796
+ imports: [
797
+ CommonModule,
798
+ RouterModule,
799
+ TranslocoModule,
800
+ UpdIconsModule,
801
+ UpdCoreLayoutModule,
802
+ UpdButtonModule,
803
+ UpdLinkModule,
804
+ UpdDropdownModule,
805
+ FooterModule,
806
+ HeaderModule
807
+ ],
808
+ declarations: [
809
+ VerticalSidebarLayoutComponent,
810
+ SidebarComponent,
811
+ PageHeaderComponent
812
+ ],
813
+ exports: [
814
+ VerticalSidebarLayoutComponent,
815
+ SidebarComponent,
816
+ PageHeaderComponent
817
+ ]
818
+ }]
819
+ }], ctorParameters: () => [{ type: i1$1.TranslocoService }] });
820
+
821
+ class LoggedOutComponent {
822
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: LoggedOutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
823
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: LoggedOutComponent, isStandalone: false, selector: "upd-logged-out", ngImport: i0, template: "<p>logged-out works!</p>\n", styles: [""] }); }
824
+ }
825
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: LoggedOutComponent, decorators: [{
826
+ type: Component,
827
+ args: [{ standalone: false, selector: 'upd-logged-out', template: "<p>logged-out works!</p>\n" }]
828
+ }] });
829
+
830
+ class LoginComponent {
831
+ constructor() {
832
+ this.formGroup = model(new FormGroup({}), ...(ngDevMode ? [{ debugName: "formGroup" }] : []));
833
+ this.formRows = [];
834
+ this.isSigningIn = signal(false, ...(ngDevMode ? [{ debugName: "isSigningIn" }] : []));
835
+ this.layoutConfigService = inject(UpdLayoutConfigService);
836
+ this.config = this.layoutConfigService.config.securityLayoutConfig.loginPage;
837
+ this.bodyClasses = ['border-top-wide', this.border, 'd-flex', 'flex-column'];
838
+ this.router = inject(Router);
839
+ this.authService = inject(AuthService);
840
+ this.layoutService = inject(LayoutService);
841
+ }
842
+ get border() {
843
+ return `border-${this.config.borderColor}`;
844
+ }
845
+ get linkClasses() {
846
+ return [`link-${this.config.linksColor}`];
847
+ }
848
+ get boxBgColor() {
849
+ return this.config.bgColor || (!!this.config.bgStyle ? `bg-${this.config.bgStyle}` : '') || 'bg-white';
850
+ }
851
+ ngOnInit() {
852
+ this.layoutService.addBodyClasses(this.boxBgColor);
853
+ if (this.config.layout !== 'cover') {
854
+ this.layoutService.addBodyClasses(...this.bodyClasses);
855
+ }
856
+ this.formRows = [
857
+ {
858
+ fields: [
859
+ {
860
+ name: 'username',
861
+ type: DynamicFieldType.Input,
862
+ colSize: { default: 12 },
863
+ label: { text: 'UpDevs.Login.Email', isTranslated: false },
864
+ validators: [Validators.required, Validators.minLength(3)],
865
+ shouldSubmitOnEnter: true
866
+ }
867
+ ]
868
+ },
869
+ {
870
+ fields: [
871
+ {
872
+ name: 'password',
873
+ type: DynamicFieldType.Input,
874
+ inputType: 'password',
875
+ colSize: { default: 12 },
876
+ label: { text: 'UpDevs.Login.Password', isTranslated: false },
877
+ validators: [Validators.required, Validators.minLength(3)],
878
+ shouldSubmitOnEnter: true
879
+ }
880
+ ]
881
+ },
882
+ {
883
+ fields: [
884
+ {
885
+ name: 'rememberMe',
886
+ type: DynamicFieldType.Checkbox,
887
+ colSize: { default: 12 },
888
+ label: { text: 'UpDevs.Login.RememberMe', isTranslated: false },
889
+ initValue: false
890
+ }
891
+ ]
892
+ }
893
+ ];
894
+ }
895
+ ngOnDestroy() {
896
+ this.layoutService.removeBodyClasses(this.boxBgColor);
897
+ if (this.config.layout !== 'cover') {
898
+ this.layoutService.removeBodyClasses(...this.bodyClasses);
899
+ }
900
+ }
901
+ login() {
902
+ // TODO: handle remember me
903
+ this.isSigningIn.set(true);
904
+ this.authService.login(this.formGroup().value.username, this.formGroup().value.password)
905
+ .pipe(finalize(() => this.isSigningIn.set(false)))
906
+ .subscribe();
907
+ }
908
+ goToRecoverPasswordPage() {
909
+ this.router.navigate([this.config.recoverPasswordRoute]).then();
910
+ }
911
+ goToSignUpPage() {
912
+ this.router.navigate([this.config.signUpRoute]).then();
913
+ }
914
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: LoginComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
915
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: LoginComponent, isStandalone: false, 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", "stopPropagation"], outputs: ["clicked"] }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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"] }] }); }
916
+ }
917
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: LoginComponent, decorators: [{
918
+ type: Component,
919
+ args: [{ standalone: false, 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" }]
920
+ }], propDecorators: { formGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "formGroup", required: false }] }, { type: i0.Output, args: ["formGroupChange"] }] } });
921
+
922
+ class OauthCallbackComponent {
923
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: OauthCallbackComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
924
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.1.4", type: OauthCallbackComponent, isStandalone: false, selector: "upd-oauth-callback", ngImport: i0, template: "<p>oauth-callback works!</p>\n", styles: [""] }); }
925
+ }
926
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: OauthCallbackComponent, decorators: [{
927
+ type: Component,
928
+ args: [{ standalone: false, selector: 'upd-oauth-callback', template: "<p>oauth-callback works!</p>\n" }]
929
+ }] });
930
+
931
+ /**
932
+ * Auth flow routes.
933
+ */
934
+ const routes = [
935
+ { path: 'oauth/callback', component: OauthCallbackComponent },
936
+ { path: 'logged-out', component: LoggedOutComponent },
937
+ { path: 'login', component: LoginComponent }
938
+ ];
939
+ class AuthFlowRoutingModule {
940
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AuthFlowRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
941
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: AuthFlowRoutingModule, imports: [i1$3.RouterModule], exports: [RouterModule] }); }
942
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AuthFlowRoutingModule, imports: [RouterModule.forRoot(routes, { useHash: true }), RouterModule] }); }
943
+ }
944
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AuthFlowRoutingModule, decorators: [{
945
+ type: NgModule,
946
+ args: [{
947
+ imports: [RouterModule.forRoot(routes, { useHash: true })],
948
+ exports: [RouterModule]
949
+ }]
950
+ }] });
951
+
952
+ class AuthFlowModule {
953
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AuthFlowModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
954
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: AuthFlowModule, declarations: [LoginComponent,
955
+ OauthCallbackComponent,
956
+ LoggedOutComponent], imports: [CommonModule,
957
+ AuthFlowRoutingModule,
958
+ UpdButtonModule,
959
+ UpdIconsModule,
960
+ FormsModule,
961
+ TranslocoDirective,
962
+ UpdLinkModule,
963
+ UpdCardModule,
964
+ UpdFormModule,
965
+ FooterModule,
966
+ HeaderModule], exports: [LoginComponent,
967
+ OauthCallbackComponent,
968
+ LoggedOutComponent] }); }
969
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AuthFlowModule, imports: [CommonModule,
970
+ AuthFlowRoutingModule,
971
+ UpdButtonModule,
972
+ UpdIconsModule,
973
+ FormsModule,
974
+ UpdLinkModule,
975
+ UpdCardModule,
976
+ UpdFormModule,
977
+ FooterModule,
978
+ HeaderModule] }); }
979
+ }
980
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: AuthFlowModule, decorators: [{
981
+ type: NgModule,
982
+ args: [{
983
+ imports: [
984
+ CommonModule,
985
+ AuthFlowRoutingModule,
986
+ UpdButtonModule,
987
+ UpdIconsModule,
988
+ FormsModule,
989
+ TranslocoDirective,
990
+ UpdLinkModule,
991
+ UpdCardModule,
992
+ UpdFormModule,
993
+ FooterModule,
994
+ HeaderModule
995
+ ],
996
+ declarations: [
997
+ LoginComponent,
998
+ OauthCallbackComponent,
999
+ LoggedOutComponent
1000
+ ],
1001
+ exports: [
1002
+ LoginComponent,
1003
+ OauthCallbackComponent,
1004
+ LoggedOutComponent
1005
+ ]
1006
+ }]
1007
+ }] });
1008
+
1009
+ /**
1010
+ * Layout module.
1011
+ */
1012
+ class UpdLayoutModule {
1013
+ /**
1014
+ * Sets up the layout module with the provided configuration.
1015
+ * @param config Configuration (See: #updsee[p:abstractions, i:UpdCoreLayoutConfig]).
1016
+ */
1017
+ static forRoot(config) {
1018
+ return {
1019
+ ngModule: UpdLayoutModule,
1020
+ providers: [
1021
+ { provide: LayoutConstants.defaultOptionsInjectionToken, useValue: config }
1022
+ ]
1023
+ };
1024
+ }
1025
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: UpdLayoutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1026
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: UpdLayoutModule, imports: [CommonModule,
1027
+ UpdCoreLayoutModule,
1028
+ UpdNotificationsModule] }); }
1029
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: UpdLayoutModule, providers: [
1030
+ UpdLayoutConfigService
1031
+ ], imports: [CommonModule,
1032
+ UpdCoreLayoutModule,
1033
+ UpdNotificationsModule] }); }
1034
+ }
1035
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: UpdLayoutModule, decorators: [{
1036
+ type: NgModule,
1037
+ args: [{
1038
+ imports: [
1039
+ CommonModule,
1040
+ UpdCoreLayoutModule,
1041
+ UpdNotificationsModule
1042
+ ],
1043
+ providers: [
1044
+ UpdLayoutConfigService
1045
+ ]
1046
+ }]
1047
+ }] });
1048
+
1049
+ /**
1050
+ * Generated bundle index. Do not edit.
1051
+ */
1052
+
1053
+ export { AuthFlowModule, AuthFlowRoutingModule, BasePageComponent, BlankLayoutComponent, BlankLayoutModule, FooterComponent, FooterModule, HeaderComponent, HeaderModule, LoggedOutComponent, LoginComponent, OauthCallbackComponent, PageHeaderComponent, SidebarComponent, UpdLayoutConfigService, UpdLayoutModule, VerticalSidebarLayoutComponent, VerticalSidebarLayoutModule, routes };
1054
+ //# sourceMappingURL=updevs-components-layout.mjs.map