aril 0.0.6 → 0.0.7

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 (129) hide show
  1. package/aril-0.0.7.tgz +0 -0
  2. package/esm2022/http/lib/enums.mjs +2 -1
  3. package/esm2022/http/lib/interfaces.mjs +1 -1
  4. package/esm2022/http/src/httpClient.mjs +1 -1
  5. package/esm2022/http/src/serviceBase.mjs +5 -5
  6. package/esm2022/http/src/serviceStateMethods.mjs +5 -2
  7. package/esm2022/theme/layout/app/breadcrumb/app.breadcrumb.component.mjs +41 -0
  8. package/esm2022/theme/layout/app/config/app.config.component.mjs +134 -0
  9. package/esm2022/theme/layout/app/layout/app.layout.component.mjs +131 -0
  10. package/esm2022/theme/layout/app/menu/app.menu.component.mjs +399 -0
  11. package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +25 -0
  12. package/esm2022/theme/layout/app/sidebar/app.sidebar.component.mjs +41 -0
  13. package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +29 -0
  14. package/esm2022/theme/layout/aril-theme-layout.mjs +5 -0
  15. package/esm2022/theme/layout/index.mjs +2 -0
  16. package/esm2022/theme/layout/service/app.layout.service.mjs +132 -0
  17. package/esm2022/theme/layout/service/app.menu.service.mjs +27 -0
  18. package/esm2022/theme/layout/service/menuchangeevent.mjs +2 -0
  19. package/esm2022/ui/badge/src/badge.component.mjs +1 -1
  20. package/esm2022/ui/button/src/button.component.mjs +1 -1
  21. package/esm2022/ui/button/src/split-button.component.mjs +1 -1
  22. package/esm2022/ui/calendar/src/calendar.component.mjs +1 -1
  23. package/esm2022/ui/checkbox/src/check-box.component.mjs +3 -3
  24. package/esm2022/ui/checkbox/src/tri-state-checkbox.component.mjs +3 -3
  25. package/esm2022/ui/field/src/field.component.mjs +1 -1
  26. package/esm2022/ui/fileUpload/src/file-upload.component.mjs +1 -1
  27. package/esm2022/ui/form/index.mjs +20 -13
  28. package/esm2022/ui/form/src/form-submit-button.component.mjs +4 -3
  29. package/esm2022/ui/form/src/form.component.mjs +3 -3
  30. package/esm2022/ui/lib/src/form/form-error-message.component.mjs +1 -1
  31. package/esm2022/ui/lib/src/form/form-error-message.directive.mjs +1 -1
  32. package/esm2022/ui/lib/src/input/baseInput.mjs +1 -1
  33. package/esm2022/ui/lib/src/input/common-input-validators.service.mjs +1 -1
  34. package/esm2022/ui/lib/src/input/dx-input-error-message.pipe.mjs +1 -1
  35. package/esm2022/ui/mask/src/mask.component.mjs +3 -3
  36. package/esm2022/ui/number/src/number.component.mjs +2 -2
  37. package/esm2022/ui/overlayPanel/src/overlay-panel.component.mjs +1 -1
  38. package/esm2022/ui/panel/src/panel.component.mjs +2 -2
  39. package/esm2022/ui/password/src/password.component.mjs +1 -1
  40. package/esm2022/ui/radioButton/src/radio-button.component.mjs +1 -1
  41. package/esm2022/ui/selectBox/src/select-box.component.mjs +1 -1
  42. package/esm2022/ui/switch/src/switch.component.mjs +1 -1
  43. package/esm2022/ui/table/index.mjs +26 -17
  44. package/esm2022/ui/table/src/table-column.component.mjs +6 -4
  45. package/esm2022/ui/table/src/table.component.mjs +24 -42
  46. package/esm2022/ui/tagBox/src/tag-box.component.mjs +1 -1
  47. package/esm2022/ui/text/src/text.component.mjs +1 -1
  48. package/esm2022/ui/textArea/src/text-area.component.mjs +1 -1
  49. package/esm2022/ui/tree/src/tree.component.mjs +29 -45
  50. package/esm2022/ui/treeTable/src/tree-table.component.mjs +39 -43
  51. package/esm2022/ui/value/src/value.component.mjs +3 -3
  52. package/fesm2022/aril-http.mjs +7 -4
  53. package/fesm2022/aril-http.mjs.map +1 -1
  54. package/fesm2022/aril-theme-layout.mjs +918 -0
  55. package/fesm2022/aril-theme-layout.mjs.map +1 -0
  56. package/fesm2022/aril-ui-badge.mjs.map +1 -1
  57. package/fesm2022/aril-ui-button.mjs.map +1 -1
  58. package/fesm2022/aril-ui-calendar.mjs.map +1 -1
  59. package/fesm2022/aril-ui-checkbox.mjs +4 -4
  60. package/fesm2022/aril-ui-checkbox.mjs.map +1 -1
  61. package/fesm2022/aril-ui-field.mjs.map +1 -1
  62. package/fesm2022/aril-ui-fileUpload.mjs.map +1 -1
  63. package/fesm2022/aril-ui-form.mjs +22 -19
  64. package/fesm2022/aril-ui-form.mjs.map +1 -1
  65. package/fesm2022/aril-ui-lib.mjs.map +1 -1
  66. package/fesm2022/aril-ui-mask.mjs +3 -3
  67. package/fesm2022/aril-ui-mask.mjs.map +1 -1
  68. package/fesm2022/aril-ui-number.mjs +2 -2
  69. package/fesm2022/aril-ui-number.mjs.map +1 -1
  70. package/fesm2022/aril-ui-overlayPanel.mjs.map +1 -1
  71. package/fesm2022/aril-ui-panel.mjs.map +1 -1
  72. package/fesm2022/aril-ui-password.mjs.map +1 -1
  73. package/fesm2022/aril-ui-radioButton.mjs.map +1 -1
  74. package/fesm2022/aril-ui-selectBox.mjs.map +1 -1
  75. package/fesm2022/aril-ui-switch.mjs.map +1 -1
  76. package/fesm2022/aril-ui-table.mjs +45 -57
  77. package/fesm2022/aril-ui-table.mjs.map +1 -1
  78. package/fesm2022/aril-ui-tagBox.mjs.map +1 -1
  79. package/fesm2022/aril-ui-text.mjs.map +1 -1
  80. package/fesm2022/aril-ui-textArea.mjs.map +1 -1
  81. package/fesm2022/aril-ui-tree.mjs +28 -44
  82. package/fesm2022/aril-ui-tree.mjs.map +1 -1
  83. package/fesm2022/aril-ui-treeTable.mjs +38 -42
  84. package/fesm2022/aril-ui-treeTable.mjs.map +1 -1
  85. package/fesm2022/aril-ui-value.mjs +2 -2
  86. package/fesm2022/aril-ui-value.mjs.map +1 -1
  87. package/http/lib/enums.d.ts +1 -0
  88. package/http/lib/interfaces.d.ts +2 -0
  89. package/http/src/serviceStateMethods.d.ts +2 -1
  90. package/package.json +7 -1
  91. package/theme/layout/app/breadcrumb/app.breadcrumb.component.d.ts +16 -0
  92. package/theme/layout/app/breadcrumb/app.breadcrumb.component.html +10 -0
  93. package/theme/layout/app/breadcrumb/app.breadcrumb.component.ts +52 -0
  94. package/theme/layout/app/config/app.config.component.d.ts +36 -0
  95. package/theme/layout/app/config/app.config.component.html +191 -0
  96. package/theme/layout/app/config/app.config.component.ts +152 -0
  97. package/theme/layout/app/layout/app.layout.component.d.ts +51 -0
  98. package/theme/layout/app/layout/app.layout.component.html +13 -0
  99. package/theme/layout/app/layout/app.layout.component.ts +183 -0
  100. package/theme/layout/app/menu/app.menu.component.d.ts +44 -0
  101. package/theme/layout/app/menu/app.menu.component.html +9 -0
  102. package/theme/layout/app/menu/app.menu.component.ts +317 -0
  103. package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +10 -0
  104. package/theme/layout/app/profileSidebar/app.profilesidebar.component.html +165 -0
  105. package/theme/layout/app/profileSidebar/app.profilesidebar.component.ts +25 -0
  106. package/theme/layout/app/sidebar/app.sidebar.component.d.ts +15 -0
  107. package/theme/layout/app/sidebar/app.sidebar.component.html +67 -0
  108. package/theme/layout/app/sidebar/app.sidebar.component.ts +40 -0
  109. package/theme/layout/app/topbar/app.topbar.component.d.ts +13 -0
  110. package/theme/layout/app/topbar/app.topbar.component.html +41 -0
  111. package/theme/layout/app/topbar/app.topbar.component.ts +29 -0
  112. package/theme/layout/index.d.ts +1 -0
  113. package/theme/layout/index.ts +1 -0
  114. package/theme/layout/ng-package.json +6 -0
  115. package/theme/layout/service/app.layout.service.d.ts +51 -0
  116. package/theme/layout/service/app.layout.service.ts +197 -0
  117. package/theme/layout/service/app.menu.service.d.ts +14 -0
  118. package/theme/layout/service/app.menu.service.ts +28 -0
  119. package/theme/layout/service/menuchangeevent.d.ts +4 -0
  120. package/theme/layout/service/menuchangeevent.ts +4 -0
  121. package/ui/calendar/src/calendar.component.d.ts +1 -1
  122. package/ui/form/index.d.ts +9 -0
  123. package/ui/form/src/form-submit-button.component.d.ts +1 -1
  124. package/ui/form/src/form.component.d.ts +1 -1
  125. package/ui/table/index.d.ts +14 -0
  126. package/ui/table/src/table-column.component.d.ts +5 -4
  127. package/ui/table/src/table.component.d.ts +7 -15
  128. package/ui/tree/src/tree.component.d.ts +13 -18
  129. package/ui/treeTable/src/tree-table.component.d.ts +14 -18
@@ -0,0 +1,317 @@
1
+ import { NgClass, NgTemplateOutlet } from '@angular/common';
2
+ import { ChangeDetectorRef, Component, ElementRef, HostBinding, Input, OnDestroy, OnInit, ViewChild, inject } from '@angular/core';
3
+ import { NavigationEnd, Router, RouterLink, RouterLinkActive } from '@angular/router';
4
+ import { animate, state, style, transition, trigger, AnimationEvent } from '@angular/animations';
5
+
6
+ import { MenuItem } from 'primeng/api';
7
+ import { DomHandler } from 'primeng/dom';
8
+ import { RippleModule } from 'primeng/ripple';
9
+ import { TooltipModule } from 'primeng/tooltip';
10
+
11
+ import { Subscription } from 'rxjs';
12
+ import { filter } from 'rxjs/operators';
13
+
14
+ import { MenuService } from '../../service/app.menu.service';
15
+ import { LayoutService } from '../../service/app.layout.service';
16
+
17
+ @Component({
18
+ standalone: true,
19
+ selector: '[app-menuitem]',
20
+ template: `
21
+ <ng-container>
22
+ @if (root) {
23
+ <div class="layout-menuitem-root-text">
24
+ {{ item.label }}
25
+ </div>
26
+ }
27
+ @if (item.items?.length) {
28
+ <a
29
+ [attr.href]="item.url"
30
+ (click)="itemClick($event)"
31
+ (mouseenter)="onMouseEnter()"
32
+ [attr.target]="item.target"
33
+ tabindex="0"
34
+ pRipple
35
+ [pTooltip]="item.label"
36
+ [tooltipDisabled]="!(isSlim && root && !active)">
37
+ <i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
38
+ <span class="layout-menuitem-text">{{ item.label }}</span>
39
+ @if (item.items) {
40
+ <i
41
+ class="pi pi-fw pi-angle-down layout-submenu-toggler"
42
+ ></i>
43
+ }
44
+ </a>
45
+ }
46
+ @else {
47
+ <a
48
+ (click)="itemClick($event)"
49
+ (mouseenter)="onMouseEnter()"
50
+ [routerLink]="item.routerLink"
51
+ routerLinkActive="active-route"
52
+ [routerLinkActiveOptions]="
53
+ item.routerLinkActiveOptions || {
54
+ paths: 'exact',
55
+ queryParams: 'ignored',
56
+ matrixParams: 'ignored',
57
+ fragment: 'ignored'
58
+ }
59
+ "
60
+ [fragment]="item.fragment"
61
+ [queryParamsHandling]="item.queryParamsHandling"
62
+ [preserveFragment]="item.preserveFragment"
63
+ [skipLocationChange]="item.skipLocationChange"
64
+ [replaceUrl]="item.replaceUrl"
65
+ [state]="item.state"
66
+ [queryParams]="item.queryParams"
67
+ [attr.target]="item.target"
68
+ tabindex="0"
69
+ pRipple
70
+ [pTooltip]="item.label"
71
+ [tooltipDisabled]="!(isSlim && root)">
72
+
73
+ <i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
74
+
75
+ <span class="layout-menuitem-text">{{ item.label }}</span>
76
+
77
+ @if (item.items) {
78
+ <i
79
+ class="pi pi-fw pi-angle-down layout-submenu-toggler"
80
+ ></i>
81
+ }
82
+ </a>
83
+ }
84
+
85
+ @if (item.items) {
86
+ <ul
87
+ #submenu
88
+ [@children]="submenuAnimation"
89
+ (@children.done)="onSubmenuAnimated($event)">
90
+
91
+ @for (child of item.items; track child; let i = $index) {
92
+ <li
93
+ app-menuitem
94
+ [item]="child"
95
+ [index]="i"
96
+ [parentKey]="key">
97
+ </li>
98
+ }
99
+ </ul>
100
+ }
101
+ </ng-container>
102
+ `,
103
+ imports: [NgClass, RouterLink, RouterLinkActive, NgTemplateOutlet, TooltipModule, RippleModule],
104
+ animations: [
105
+ trigger('children', [
106
+ state('collapsed', style({
107
+ height: '0'
108
+ })),
109
+ state('expanded', style({
110
+ height: '*'
111
+ })),
112
+ state('hidden', style({
113
+ display: 'none'
114
+ })),
115
+ state('visible', style({
116
+ display: 'block'
117
+ })),
118
+ transition('collapsed <=> expanded', animate('400ms cubic-bezier(0.86, 0, 0.07, 1)'))
119
+ ])
120
+ ]
121
+ })
122
+ export class AppMenuItemComponent implements OnInit, OnDestroy {
123
+
124
+ @Input() item!: MenuItem;
125
+
126
+ @Input() index!: number;
127
+
128
+ @Input() @HostBinding('class.layout-root-menuitem') root!: boolean;
129
+
130
+ @Input() parentKey!: string;
131
+
132
+ @ViewChild('submenu') submenu!: ElementRef;
133
+
134
+ active = false;
135
+
136
+ menuSourceSubscription: Subscription;
137
+
138
+ menuResetSubscription: Subscription;
139
+
140
+ key: string = "";
141
+
142
+ constructor(public layoutService: LayoutService, private cd: ChangeDetectorRef, public router: Router, private menuService: MenuService) {
143
+ this.menuSourceSubscription = this.menuService.menuSource$.subscribe(value => {
144
+ Promise.resolve(null).then(() => {
145
+ if (value.routeEvent) {
146
+ this.active = (value.key === this.key || value.key.startsWith(this.key + '-')) ? true : false;
147
+ }
148
+ else {
149
+ if (value.key !== this.key && !value.key.startsWith(this.key + '-')) {
150
+ this.active = false;
151
+ }
152
+ }
153
+ });
154
+ });
155
+
156
+ this.menuResetSubscription = this.menuService.resetSource$.subscribe(() => {
157
+ this.active = false;
158
+ });
159
+
160
+ this.router.events.pipe(filter(event => event instanceof NavigationEnd))
161
+ .subscribe(params => {
162
+ if (this.isSlimPlus || this.isSlim || this.isHorizontal) {
163
+ this.active = false;
164
+ }
165
+ else {
166
+ if (this.item.routerLink) {
167
+ this.updateActiveStateFromRoute();
168
+ }
169
+ }
170
+ });
171
+ }
172
+
173
+ ngOnInit() {
174
+ this.key = this.parentKey ? this.parentKey + '-' + this.index : String(this.index);
175
+
176
+ if (!(this.isSlimPlus || this.isSlim || this.isHorizontal) && this.item.routerLink) {
177
+ this.updateActiveStateFromRoute();
178
+ }
179
+ }
180
+
181
+ ngAfterViewChecked() {
182
+ if (this.root && this.active && this.layoutService.isDesktop() && (this.layoutService.isHorizontal() || this.layoutService.isSlim() || this.layoutService.isSlimPlus())) {
183
+ this.calculatePosition(this.submenu?.nativeElement, this.submenu?.nativeElement.parentElement);
184
+ }
185
+ }
186
+
187
+ updateActiveStateFromRoute() {
188
+ let activeRoute = this.router.isActive(this.item.routerLink[0], { paths: 'exact', queryParams: 'ignored', matrixParams: 'ignored', fragment: 'ignored' });
189
+
190
+ if (activeRoute) {
191
+ this.menuService.onMenuStateChange({ key: this.key, routeEvent: true });
192
+ }
193
+ }
194
+
195
+ onSubmenuAnimated(event: AnimationEvent) {
196
+ if (event.toState === 'visible' && this.layoutService.isDesktop() && (this.layoutService.isHorizontal() || this.layoutService.isSlim() || this.layoutService.isSlimPlus())) {
197
+ const el = <HTMLUListElement>event.element;
198
+ const elParent = <HTMLUListElement>el.parentElement;
199
+ this.calculatePosition(el, elParent);
200
+ }
201
+ }
202
+
203
+ calculatePosition(overlay: HTMLElement, target: HTMLElement) {
204
+ if (overlay) {
205
+ const { left, top } = target.getBoundingClientRect();
206
+ const [vWidth, vHeight] = [window.innerWidth, window.innerHeight];
207
+ const [oWidth, oHeight] = [overlay.offsetWidth, overlay.offsetHeight];
208
+ const scrollbarWidth = DomHandler.calculateScrollbarWidth();
209
+ // reset
210
+ overlay.style.top = '';
211
+ overlay.style.left = '';
212
+
213
+ if (this.layoutService.isHorizontal()) {
214
+ const width = left + oWidth + scrollbarWidth;
215
+ overlay.style.left = vWidth < width ? `${left - (width - vWidth)}px` : `${left}px`;
216
+ } else if (this.layoutService.isSlim() || this.layoutService.isSlimPlus()) {
217
+ const height = top + oHeight;
218
+ overlay.style.top = vHeight < height ? `${top - (height - vHeight)}px` : `${top}px`;
219
+ }
220
+ }
221
+ }
222
+
223
+ itemClick(event: Event) {
224
+ // avoid processing disabled items
225
+ if (this.item.disabled) {
226
+ event.preventDefault();
227
+ return;
228
+ }
229
+
230
+ // navigate with hover
231
+ if (this.root && this.isSlim || this.isHorizontal || this.isSlimPlus) {
232
+ this.layoutService.state.menuHoverActive = !this.layoutService.state.menuHoverActive;
233
+ }
234
+
235
+ // execute command
236
+ if (this.item.command) {
237
+ this.item.command({ originalEvent: event, item: this.item });
238
+ }
239
+
240
+ // toggle active state
241
+ if (this.item.items) {
242
+ this.active = !this.active;
243
+
244
+ if (this.root && this.active && (this.isSlim || this.isHorizontal || this.isSlimPlus)) {
245
+ this.layoutService.onOverlaySubmenuOpen();
246
+ }
247
+ }
248
+ else {
249
+ if (this.layoutService.isMobile()) {
250
+ this.layoutService.state.staticMenuMobileActive = false;
251
+ }
252
+
253
+ if (this.isSlim || this.isHorizontal || this.isSlimPlus) {
254
+ this.menuService.reset();
255
+ this.layoutService.state.menuHoverActive = false;
256
+ }
257
+ }
258
+
259
+ this.menuService.onMenuStateChange({ key: this.key });
260
+ }
261
+
262
+ onMouseEnter() {
263
+ // activate item on hover
264
+ if (this.root && (this.isSlim || this.isHorizontal || this.isSlimPlus) && this.layoutService.isDesktop()) {
265
+ if (this.layoutService.state.menuHoverActive) {
266
+ this.active = true;
267
+ this.menuService.onMenuStateChange({ key: this.key });
268
+ }
269
+ }
270
+ }
271
+
272
+ get submenuAnimation() {
273
+ if (this.layoutService.isDesktop() && (this.layoutService.isHorizontal() || this.layoutService.isSlim() || this.layoutService.isSlimPlus())) {
274
+ return this.active ? 'visible' : 'hidden';
275
+ }
276
+
277
+ else
278
+ return this.root ? 'expanded' : (this.active ? 'expanded' : 'collapsed');
279
+ }
280
+
281
+ get isHorizontal() {
282
+ return this.layoutService.isHorizontal();
283
+ }
284
+
285
+ get isSlim() {
286
+ return this.layoutService.isSlim();
287
+ }
288
+
289
+ get isSlimPlus() {
290
+ return this.layoutService.isSlimPlus();
291
+ }
292
+
293
+ @HostBinding('class.active-menuitem')
294
+ get activeClass() {
295
+ return this.active && !this.root;
296
+ }
297
+
298
+ ngOnDestroy() {
299
+ if (this.menuSourceSubscription) {
300
+ this.menuSourceSubscription.unsubscribe();
301
+ }
302
+
303
+ if (this.menuResetSubscription) {
304
+ this.menuResetSubscription.unsubscribe();
305
+ }
306
+ }
307
+ }
308
+
309
+ @Component({
310
+ standalone: true,
311
+ selector: 'app-menu',
312
+ imports: [AppMenuItemComponent],
313
+ templateUrl: './app.menu.component.html'
314
+ })
315
+ export class AppMenuComponent {
316
+ menuService = inject(MenuService);
317
+ }
@@ -0,0 +1,10 @@
1
+ import { LayoutService } from '../../service/app.layout.service';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AppProfileSidebarComponent {
4
+ layoutService: LayoutService;
5
+ constructor(layoutService: LayoutService);
6
+ get visible(): boolean;
7
+ set visible(_val: boolean);
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppProfileSidebarComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppProfileSidebarComponent, "app-profilemenu", never, {}, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,165 @@
1
+ <p-sidebar
2
+ [(visible)]="visible"
3
+ position="right"
4
+ [transitionOptions]="'.3s cubic-bezier(0, 0, 0.2, 1)'"
5
+ styleClass="layout-profile-sidebar w-full sm:w-25rem">
6
+ <div class="flex flex-column mx-auto md:mx-0">
7
+ <span class="mb-2 font-semibold">Welcome</span>
8
+ <span class="text-color-secondary font-medium mb-5">Isabella Andolini</span>
9
+
10
+ <ul class="list-none m-0 p-0">
11
+ <li>
12
+ <a
13
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
14
+ <span>
15
+ <i class="pi pi-user text-xl text-primary"></i>
16
+ </span>
17
+ <div class="ml-3">
18
+ <span class="mb-2 font-semibold">Profile</span>
19
+ <p class="text-color-secondary m-0">Lorem ipsum date visale</p>
20
+ </div>
21
+ </a>
22
+ </li>
23
+ <li>
24
+ <a
25
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
26
+ <span>
27
+ <i class="pi pi-user text-xl text-primary"></i>
28
+ </span>
29
+ <div class="ml-3">
30
+ <span class="mb-2 font-semibold">Billing</span>
31
+ <p class="text-color-secondary m-0">Amet mimin mıollit</p>
32
+ </div>
33
+ </a>
34
+ </li>
35
+ <li>
36
+ <a
37
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
38
+ <span>
39
+ <i class="pi pi-cog text-xl text-primary"></i>
40
+ </span>
41
+ <div class="ml-3">
42
+ <span class="mb-2 font-semibold">Settings</span>
43
+ <p class="text-color-secondary m-0">Exercitation veniam</p>
44
+ </div>
45
+ </a>
46
+ </li>
47
+ <li>
48
+ <a
49
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
50
+ <span>
51
+ <i class="pi pi-power-off text-xl text-primary"></i>
52
+ </span>
53
+ <div class="ml-3">
54
+ <span class="mb-2 font-semibold">Sign Out</span>
55
+ <p class="text-color-secondary m-0">Sed ut perspiciatis</p>
56
+ </div>
57
+ </a>
58
+ </li>
59
+ </ul>
60
+ </div>
61
+
62
+ <div class="flex flex-column mt-5 mx-auto md:mx-0">
63
+ <span class="mb-2 font-semibold">Notifications</span>
64
+ <span class="text-color-secondary font-medium mb-5"
65
+ >You have 3 notifications</span
66
+ >
67
+
68
+ <ul class="list-none m-0 p-0">
69
+ <li>
70
+ <a
71
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
72
+ <span>
73
+ <i class="pi pi-comment text-xl text-primary"></i>
74
+ </span>
75
+ <div class="ml-3">
76
+ <span class="mb-2 font-semibold">Your post has new comments</span>
77
+ <p class="text-color-secondary m-0">5 min ago</p>
78
+ </div>
79
+ </a>
80
+ </li>
81
+ <li>
82
+ <a
83
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
84
+ <span>
85
+ <i class="pi pi-trash text-xl text-primary"></i>
86
+ </span>
87
+ <div class="ml-3">
88
+ <span class="mb-2 font-semibold">Your post has been deleted</span>
89
+ <p class="text-color-secondary m-0">15min ago</p>
90
+ </div>
91
+ </a>
92
+ </li>
93
+ <li>
94
+ <a
95
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
96
+ <span>
97
+ <i class="pi pi-folder text-xl text-primary"></i>
98
+ </span>
99
+ <div class="ml-3">
100
+ <span class="mb-2 font-semibold">Post has been updated</span>
101
+ <p class="text-color-secondary m-0">3h ago</p>
102
+ </div>
103
+ </a>
104
+ </li>
105
+ </ul>
106
+ </div>
107
+
108
+ <div class="flex flex-column mt-5 mx-auto md:mx-0">
109
+ <span class="mb-2 font-semibold">Messages</span>
110
+ <span class="text-color-secondary font-medium mb-5"
111
+ >You have new messages</span
112
+ >
113
+
114
+ <ul class="list-none m-0 p-0">
115
+ <li>
116
+ <a
117
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
118
+ <span>
119
+ <img
120
+ src="assets/demo/images/avatar/circle/avatar-m-8.png"
121
+ alt="Avatar"
122
+ class="w-2rem h-2rem" />
123
+ </span>
124
+ <div class="ml-3">
125
+ <span class="mb-2 font-semibold">James Robinson</span>
126
+ <p class="text-color-secondary m-0">10 min ago</p>
127
+ </div>
128
+ <p-tag value="3" class="ml-auto"></p-tag>
129
+ </a>
130
+ </li>
131
+ <li>
132
+ <a
133
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
134
+ <span>
135
+ <img
136
+ src="assets/demo/images/avatar/circle/avatar-f-8.png"
137
+ alt="Avatar"
138
+ class="w-2rem h-2rem" />
139
+ </span>
140
+ <div class="ml-3">
141
+ <span class="mb-2 font-semibold">Mary Watson</span>
142
+ <p class="text-color-secondary m-0">15min ago</p>
143
+ </div>
144
+ <p-tag value="1" class="ml-auto"></p-tag>
145
+ </a>
146
+ </li>
147
+ <li>
148
+ <a
149
+ class="cursor-pointer flex surface-border mb-3 p-3 align-items-center border-1 surface-border border-round hover:surface-hover transition-colors transition-duration-150">
150
+ <span>
151
+ <img
152
+ src="assets/demo/images/avatar/circle/avatar-f-4.png"
153
+ alt="Avatar"
154
+ class="w-2rem h-2rem" />
155
+ </span>
156
+ <div class="ml-3">
157
+ <span class="mb-2 font-semibold">Aisha Webb</span>
158
+ <p class="text-color-secondary m-0">3h ago</p>
159
+ </div>
160
+ <p-tag value="2" class="ml-auto"></p-tag>
161
+ </a>
162
+ </li>
163
+ </ul>
164
+ </div>
165
+ </p-sidebar>
@@ -0,0 +1,25 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ import { TagModule } from 'primeng/tag';
4
+ import { SidebarModule } from 'primeng/sidebar';
5
+
6
+ import { LayoutService } from '../../service/app.layout.service';
7
+
8
+ @Component({
9
+ standalone: true,
10
+ selector: 'app-profilemenu',
11
+ imports: [SidebarModule, TagModule],
12
+ templateUrl: './app.profilesidebar.component.html'
13
+ })
14
+ export class AppProfileSidebarComponent {
15
+
16
+ constructor(public layoutService: LayoutService) { }
17
+
18
+ get visible(): boolean {
19
+ return this.layoutService.state.profileSidebarVisible;
20
+ }
21
+
22
+ set visible(_val: boolean) {
23
+ this.layoutService.state.profileSidebarVisible = _val;
24
+ }
25
+ }
@@ -0,0 +1,15 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { LayoutService } from '../../service/app.layout.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AppSidebarComponent {
5
+ layoutService: LayoutService;
6
+ el: ElementRef;
7
+ timeout: any;
8
+ menuContainer: ElementRef;
9
+ constructor(layoutService: LayoutService, el: ElementRef);
10
+ onMouseEnter(): void;
11
+ onMouseLeave(): void;
12
+ anchor(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppSidebarComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppSidebarComponent, "app-sidebar", never, {}, {}, never, never, true, never>;
15
+ }
@@ -0,0 +1,67 @@
1
+ <div
2
+ class="layout-sidebar"
3
+ (mouseenter)="onMouseEnter()"
4
+ (mouseleave)="onMouseLeave()">
5
+ <div class="sidebar-header">
6
+ <a [routerLink]="['/']" class="app-logo">
7
+ <svg
8
+ viewBox="0 0 124 22"
9
+ fill="none"
10
+ xmlns="http://www.w3.org/2000/svg"
11
+ class="app-logo-normal">
12
+ <path
13
+ d="M10.4851 0L0 20.9465H3.53702L10.4856 6.07843L17.2944 20.9465H20.9715L10.4851 0Z"
14
+ fill="var(--logo-color)" />
15
+ <path
16
+ d="M13.84 15.7927L16.2077 21.0016H11.7682L13.84 15.7927Z"
17
+ fill="var(--logo-color)" />
18
+ <path
19
+ d="M9.04645 21.0016L6.67875 15.7927L4.60701 21.0016H9.04645Z"
20
+ fill="var(--logo-color)" />
21
+ <path
22
+ d="M40.9033 14.5217H34.771L33.1753 18.0007H30.8467L37.9346 2.77661L44.772 18.0007H42.4062L40.9033 14.5217ZM40.022 12.49L37.8975 7.61938L35.6709 12.49H40.022Z"
23
+ fill="var(--logo-color)" />
24
+ <path
25
+ d="M52.4927 12.1838V18.0007H50.3311V3.67651H52.7803C53.9802 3.67651 54.8862 3.76001 55.4985 3.927C56.117 4.09399 56.6613 4.40942 57.1314 4.87329C57.954 5.67733 58.3652 6.69165 58.3652 7.91626C58.3652 9.22746 57.9261 10.2665 57.0479 11.0334C56.1696 11.8004 54.9852 12.1838 53.4946 12.1838H52.4927ZM52.4927 10.1799H53.2998C55.2852 10.1799 56.2778 9.4161 56.2778 7.88843C56.2778 6.41024 55.2542 5.67114 53.207 5.67114H52.4927V10.1799Z"
26
+ fill="var(--logo-color)" />
27
+ <path
28
+ d="M63.6367 10.7737C63.6367 8.75741 64.3758 7.02563 65.854 5.57837C67.326 4.1311 69.0949 3.40747 71.1607 3.40747C73.2017 3.40747 74.952 4.13729 76.4116 5.59692C77.8775 7.05656 78.6104 8.80998 78.6104 10.8572C78.6104 12.9167 77.8744 14.664 76.4024 16.0989C74.9242 17.54 73.1398 18.2605 71.0493 18.2605C69.2001 18.2605 67.5394 17.6204 66.0674 16.3401C64.447 14.9237 63.6367 13.0683 63.6367 10.7737ZM65.8169 10.8015C65.8169 12.3848 66.3488 13.6868 67.4126 14.7073C68.4702 15.7278 69.6918 16.238 71.0772 16.238C72.5801 16.238 73.848 15.7185 74.8809 14.6794C75.9138 13.628 76.4302 12.3477 76.4302 10.8386C76.4302 9.31095 75.9199 8.03068 74.8994 6.9978C73.8851 5.95874 72.6296 5.43921 71.1328 5.43921C69.6423 5.43921 68.3836 5.95874 67.357 6.9978C66.3303 8.0245 65.8169 9.2924 65.8169 10.8015Z"
29
+ fill="var(--logo-color)" />
30
+ <path
31
+ d="M87.2495 3.67651V15.969H91.4615V18.0007H85.0879V3.67651H87.2495Z"
32
+ fill="var(--logo-color)" />
33
+ <path
34
+ d="M99.4327 3.67651V15.969H103.645V18.0007H97.271V3.67651H99.4327Z"
35
+ fill="var(--logo-color)" />
36
+ <path
37
+ d="M108.146 10.7737C108.146 8.75741 108.885 7.02563 110.363 5.57837C111.835 4.1311 113.604 3.40747 115.67 3.40747C117.711 3.40747 119.461 4.13729 120.921 5.59692C122.387 7.05656 123.12 8.80998 123.12 10.8572C123.12 12.9167 122.384 14.664 120.912 16.0989C119.433 17.54 117.649 18.2605 115.559 18.2605C113.709 18.2605 112.049 17.6204 110.577 16.3401C108.956 14.9237 108.146 13.0683 108.146 10.7737ZM110.326 10.8015C110.326 12.3848 110.858 13.6868 111.922 14.7073C112.98 15.7278 114.201 16.238 115.586 16.238C117.089 16.238 118.357 15.7185 119.39 14.6794C120.423 13.628 120.94 12.3477 120.94 10.8386C120.94 9.31095 120.429 8.03068 119.409 6.9978C118.394 5.95874 117.139 5.43921 115.642 5.43921C114.152 5.43921 112.893 5.95874 111.866 6.9978C110.84 8.0245 110.326 9.2924 110.326 10.8015Z"
38
+ fill="var(--logo-color)" />
39
+ </svg>
40
+ <svg
41
+ width="21"
42
+ height="22"
43
+ viewBox="0 0 21 22"
44
+ fill="none"
45
+ xmlns="http://www.w3.org/2000/svg"
46
+ class="app-logo-small">
47
+ <path
48
+ d="M10.4851 0L0 20.9465H3.53702L10.4856 6.07843L17.2944 20.9465H20.9715L10.4851 0Z"
49
+ fill="var(--logo-color)" />
50
+ <path
51
+ d="M13.8399 15.793L16.2076 21.0019H11.7681L13.8399 15.793Z"
52
+ fill="var(--logo-color)" />
53
+ <path
54
+ d="M9.04637 21.0019L6.67867 15.793L4.60693 21.0019H9.04637Z"
55
+ fill="var(--logo-color)" />
56
+ </svg>
57
+ </a>
58
+ <button
59
+ class="layout-sidebar-anchor p-link z-2 mb-2"
60
+ type="button"
61
+ (click)="anchor()"></button>
62
+ </div>
63
+
64
+ <div #menuContainer class="layout-menu-container">
65
+ <app-menu></app-menu>
66
+ </div>
67
+ </div>
@@ -0,0 +1,40 @@
1
+ import { RouterLink } from '@angular/router';
2
+ import { Component, ElementRef, ViewChild, input } from '@angular/core';
3
+
4
+ import { LayoutService } from '../../service/app.layout.service';
5
+ import { AppMenuComponent } from '../menu/app.menu.component';
6
+
7
+ @Component({
8
+ standalone: true,
9
+ selector: 'app-sidebar',
10
+ imports: [RouterLink, AppMenuComponent],
11
+ templateUrl: './app.sidebar.component.html'
12
+ })
13
+ export class AppSidebarComponent {
14
+ timeout: any = null;
15
+
16
+ @ViewChild('menuContainer') menuContainer!: ElementRef;
17
+ constructor(public layoutService: LayoutService, public el: ElementRef) { }
18
+
19
+ onMouseEnter() {
20
+ if (!this.layoutService.state.anchored) {
21
+ if (this.timeout) {
22
+ clearTimeout(this.timeout);
23
+ this.timeout = null;
24
+ }
25
+ this.layoutService.state.sidebarActive = true;
26
+ }
27
+ }
28
+
29
+ onMouseLeave() {
30
+ if (!this.layoutService.state.anchored) {
31
+ if (!this.timeout) {
32
+ this.timeout = setTimeout(() => this.layoutService.state.sidebarActive = false, 300);
33
+ }
34
+ }
35
+ }
36
+
37
+ anchor() {
38
+ this.layoutService.state.anchored = !this.layoutService.state.anchored;
39
+ }
40
+ }
@@ -0,0 +1,13 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { LayoutService } from '../../service/app.layout.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AppTopbarComponent {
5
+ layoutService: LayoutService;
6
+ menuButton: ElementRef;
7
+ constructor(layoutService: LayoutService);
8
+ onMenuButtonClick(): void;
9
+ onProfileButtonClick(): void;
10
+ onConfigButtonClick(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppTopbarComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppTopbarComponent, "app-topbar", never, {}, {}, never, never, true, never>;
13
+ }