aril 0.0.13 → 0.0.14
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.
- package/esm2022/http/lib/enums.mjs +3 -1
- package/esm2022/theme/layout/app/layout/app.layout.component.mjs +20 -4
- package/esm2022/theme/layout/app/menu/app.menu.component.mjs +13 -1
- package/esm2022/theme/layout/app/sidebar/app.sidebar.component.mjs +8 -4
- package/esm2022/theme/layout/service/app.layout.service.mjs +1 -1
- package/esm2022/theme/layout/service/app.menu.service.mjs +2 -1
- package/esm2022/ui/button/src/button.component.mjs +3 -3
- package/esm2022/ui/mask/src/mask.component.mjs +2 -2
- package/esm2022/ui/number/src/number.component.mjs +2 -2
- package/esm2022/ui/password/src/password.component.mjs +2 -2
- package/esm2022/ui/selectBox/src/select-box.component.mjs +3 -3
- package/esm2022/ui/table/src/table-column.component.mjs +1 -1
- package/esm2022/ui/text/src/text.component.mjs +2 -2
- package/esm2022/ui/tree/src/tree.component.mjs +3 -16
- package/esm2022/util/lib/src/interfaces.mjs +1 -1
- package/fesm2022/aril-http.mjs +2 -0
- package/fesm2022/aril-http.mjs.map +1 -1
- package/fesm2022/aril-theme-layout.mjs +38 -5
- package/fesm2022/aril-theme-layout.mjs.map +1 -1
- package/fesm2022/aril-ui-button.mjs +2 -2
- package/fesm2022/aril-ui-button.mjs.map +1 -1
- package/fesm2022/aril-ui-mask.mjs +1 -1
- package/fesm2022/aril-ui-mask.mjs.map +1 -1
- package/fesm2022/aril-ui-number.mjs +1 -1
- package/fesm2022/aril-ui-number.mjs.map +1 -1
- package/fesm2022/aril-ui-password.mjs +1 -1
- package/fesm2022/aril-ui-password.mjs.map +1 -1
- package/fesm2022/aril-ui-selectBox.mjs +2 -2
- package/fesm2022/aril-ui-selectBox.mjs.map +1 -1
- package/fesm2022/aril-ui-table.mjs.map +1 -1
- package/fesm2022/aril-ui-text.mjs +1 -1
- package/fesm2022/aril-ui-text.mjs.map +1 -1
- package/fesm2022/aril-ui-tree.mjs +2 -15
- package/fesm2022/aril-ui-tree.mjs.map +1 -1
- package/fesm2022/aril-util-lib.mjs.map +1 -1
- package/http/lib/enums.d.ts +3 -1
- package/package.json +13 -13
- package/styles/ui/ui.common.scss +24 -8
- package/theme/layout/app/layout/app.layout.component.d.ts +5 -2
- package/theme/layout/app/layout/app.layout.component.ts +30 -3
- package/theme/layout/app/menu/app.menu.component.d.ts +6 -0
- package/theme/layout/app/menu/app.menu.component.ts +10 -0
- package/theme/layout/app/menu/app.sub.menu.component.html +9 -0
- package/theme/layout/app/sidebar/app.sidebar.component.d.ts +3 -1
- package/theme/layout/app/sidebar/app.sidebar.component.html +8 -0
- package/theme/layout/app/sidebar/app.sidebar.component.ts +8 -5
- package/theme/layout/service/app.layout.service.ts +178 -178
- package/theme/layout/service/app.menu.service.d.ts +2 -0
- package/theme/layout/service/app.menu.service.ts +2 -0
- package/ui/button/src/button.component.d.ts +1 -1
- package/ui/mask/src/mask.component.d.ts +1 -1
- package/ui/number/src/number.component.d.ts +1 -1
- package/ui/password/src/password.component.d.ts +1 -1
- package/ui/text/src/text.component.d.ts +2 -2
- package/ui/tree/src/tree.component.d.ts +0 -3
- package/util/lib/src/interfaces.d.ts +3 -0
|
@@ -341,3 +341,13 @@ export class AppMenuItemComponent implements OnInit, OnDestroy {
|
|
|
341
341
|
export class AppMenuComponent {
|
|
342
342
|
menuService = inject(MenuService);
|
|
343
343
|
}
|
|
344
|
+
@Component({
|
|
345
|
+
standalone: true,
|
|
346
|
+
selector: 'app-sub-menu',
|
|
347
|
+
imports: [AppMenuItemComponent],
|
|
348
|
+
templateUrl: './app.sub.menu.component.html'
|
|
349
|
+
})
|
|
350
|
+
export class AppSubMenuComponent {
|
|
351
|
+
menuService = inject(MenuService);
|
|
352
|
+
globalThis: any = globalThis;
|
|
353
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<ul class="layout-menu">
|
|
2
|
+
@for (subItem of menuService.subMenuItems()[globalThis.activeMF]; track $index) {
|
|
3
|
+
@if (subItem.separator) {
|
|
4
|
+
<li class="menu-separator"></li>
|
|
5
|
+
} @else {
|
|
6
|
+
<li app-menuitem [item]="subItem" [index]="$index" [root]="true"></li>
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
</ul>
|
|
@@ -4,9 +4,11 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
export declare class AppSidebarComponent {
|
|
5
5
|
layoutService: LayoutService;
|
|
6
6
|
el: ElementRef;
|
|
7
|
+
constructor(layoutService: LayoutService, el: ElementRef);
|
|
7
8
|
timeout: any;
|
|
9
|
+
globalThis: any;
|
|
8
10
|
menuContainer: ElementRef;
|
|
9
|
-
|
|
11
|
+
subMenuContainer: ElementRef;
|
|
10
12
|
onMouseEnter(): void;
|
|
11
13
|
onMouseLeave(): void;
|
|
12
14
|
anchor(): void;
|
|
@@ -43,3 +43,11 @@
|
|
|
43
43
|
<app-menu></app-menu>
|
|
44
44
|
</div>
|
|
45
45
|
</div>
|
|
46
|
+
|
|
47
|
+
@if (globalThis.isMFEMode && globalThis.activeMF) {
|
|
48
|
+
<div class="layout-sidebar" (mouseenter)="onMouseEnter()" (mouseleave)="onMouseLeave()">
|
|
49
|
+
<div #subMenuContainer class="layout-menu-container">
|
|
50
|
+
<app-sub-menu></app-sub-menu>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
}
|
|
@@ -2,23 +2,26 @@ import { RouterLink } from '@angular/router';
|
|
|
2
2
|
import { Component, ElementRef, ViewChild } from '@angular/core';
|
|
3
3
|
|
|
4
4
|
import { LayoutService } from '../../service/app.layout.service';
|
|
5
|
-
import { AppMenuComponent } from '../menu/app.menu.component';
|
|
5
|
+
import { AppMenuComponent, AppSubMenuComponent } from '../menu/app.menu.component';
|
|
6
6
|
|
|
7
7
|
@Component({
|
|
8
8
|
standalone: true,
|
|
9
9
|
selector: 'app-sidebar',
|
|
10
|
-
imports: [RouterLink, AppMenuComponent],
|
|
10
|
+
imports: [RouterLink, AppMenuComponent, AppSubMenuComponent],
|
|
11
11
|
templateUrl: './app.sidebar.component.html'
|
|
12
12
|
})
|
|
13
13
|
export class AppSidebarComponent {
|
|
14
|
-
timeout: any = null;
|
|
15
|
-
|
|
16
|
-
@ViewChild('menuContainer') menuContainer!: ElementRef;
|
|
17
14
|
constructor(
|
|
18
15
|
public layoutService: LayoutService,
|
|
19
16
|
public el: ElementRef
|
|
20
17
|
) {}
|
|
21
18
|
|
|
19
|
+
timeout: any = null;
|
|
20
|
+
globalThis: any = globalThis;
|
|
21
|
+
|
|
22
|
+
@ViewChild('menuContainer') menuContainer!: ElementRef;
|
|
23
|
+
@ViewChild('subMenuContainer') subMenuContainer!: ElementRef;
|
|
24
|
+
|
|
22
25
|
onMouseEnter() {
|
|
23
26
|
if (!this.layoutService.state.anchored) {
|
|
24
27
|
if (this.timeout) {
|
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
import { Injectable, effect, signal } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
|
|
5
|
-
export type MenuMode = 'static' | 'overlay' | 'horizontal' | 'slim' | 'slim-plus' | 'reveal' | 'drawer';
|
|
6
|
-
|
|
7
|
-
export type ColorScheme = 'light' | 'dark' | 'dim';
|
|
8
|
-
|
|
9
|
-
export type MenuColorScheme = 'colorScheme' | 'primaryColor' | 'transparent';
|
|
10
|
-
|
|
11
|
-
export interface AppConfig {
|
|
12
|
-
inputStyle: string;
|
|
13
|
-
colorScheme: ColorScheme;
|
|
14
|
-
theme: string;
|
|
15
|
-
ripple: boolean;
|
|
16
|
-
menuMode: MenuMode;
|
|
17
|
-
scale: number;
|
|
18
|
-
menuTheme: MenuColorScheme;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface LayoutState {
|
|
22
|
-
staticMenuDesktopInactive: boolean;
|
|
23
|
-
overlayMenuActive: boolean;
|
|
24
|
-
profileSidebarVisible: boolean;
|
|
25
|
-
configSidebarVisible: boolean;
|
|
26
|
-
staticMenuMobileActive: boolean;
|
|
27
|
-
menuHoverActive: boolean;
|
|
28
|
-
sidebarActive: boolean;
|
|
29
|
-
anchored: boolean;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@Injectable({
|
|
33
|
-
providedIn: 'root'
|
|
34
|
-
})
|
|
35
|
-
export class LayoutService {
|
|
36
|
-
_config: AppConfig = {
|
|
37
|
-
ripple: false,
|
|
38
|
-
inputStyle: 'filled',
|
|
39
|
-
menuMode: 'horizontal',
|
|
40
|
-
colorScheme: 'light',
|
|
41
|
-
theme: 'indigo',
|
|
42
|
-
scale: 12,
|
|
43
|
-
menuTheme: 'colorScheme'
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
// TODO: Set User Config
|
|
47
|
-
config = signal<AppConfig>(this._config);
|
|
48
|
-
|
|
49
|
-
state: LayoutState = {
|
|
50
|
-
staticMenuDesktopInactive: false,
|
|
51
|
-
overlayMenuActive: false,
|
|
52
|
-
profileSidebarVisible: false,
|
|
53
|
-
configSidebarVisible: false,
|
|
54
|
-
staticMenuMobileActive: false,
|
|
55
|
-
menuHoverActive: false,
|
|
56
|
-
sidebarActive: false,
|
|
57
|
-
anchored: false
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
private configUpdate = new Subject<AppConfig>();
|
|
61
|
-
|
|
62
|
-
private overlayOpen = new Subject<any>();
|
|
63
|
-
|
|
64
|
-
configUpdate$ = this.configUpdate.asObservable();
|
|
65
|
-
|
|
66
|
-
overlayOpen$ = this.overlayOpen.asObservable();
|
|
67
|
-
|
|
68
|
-
constructor() {
|
|
69
|
-
effect(() => {
|
|
70
|
-
const config = this.config();
|
|
71
|
-
if (this.updateStyle(config)) {
|
|
72
|
-
this.changeTheme();
|
|
73
|
-
}
|
|
74
|
-
this.changeScale(config.scale);
|
|
75
|
-
this.onConfigUpdate();
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
updateStyle(config: AppConfig) {
|
|
80
|
-
return config.theme !== this._config.theme || config.colorScheme !== this._config.colorScheme;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
onMenuToggle() {
|
|
84
|
-
if (this.isOverlay()) {
|
|
85
|
-
this.state.overlayMenuActive = !this.state.overlayMenuActive;
|
|
86
|
-
|
|
87
|
-
if (this.state.overlayMenuActive) {
|
|
88
|
-
this.overlayOpen.next(null);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
if (this.isDesktop()) {
|
|
93
|
-
this.state.staticMenuDesktopInactive = !this.state.staticMenuDesktopInactive;
|
|
94
|
-
} else {
|
|
95
|
-
this.state.staticMenuMobileActive = !this.state.staticMenuMobileActive;
|
|
96
|
-
|
|
97
|
-
if (this.state.staticMenuMobileActive) {
|
|
98
|
-
this.overlayOpen.next(null);
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
onOverlaySubmenuOpen() {
|
|
104
|
-
this.overlayOpen.next(null);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
showProfileSidebar() {
|
|
108
|
-
this.state.profileSidebarVisible = true;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
showConfigSidebar() {
|
|
112
|
-
this.state.configSidebarVisible = true;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
isOverlay() {
|
|
116
|
-
return this.config().menuMode === 'overlay';
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
isDesktop() {
|
|
120
|
-
return window.innerWidth > 991;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
isSlim() {
|
|
124
|
-
return this.config().menuMode === 'slim';
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
isSlimPlus() {
|
|
128
|
-
return this.config().menuMode === 'slim-plus';
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
isHorizontal() {
|
|
132
|
-
return this.config().menuMode === 'horizontal';
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
isMobile() {
|
|
136
|
-
return !this.isDesktop();
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
onConfigUpdate() {
|
|
140
|
-
this._config = { ...this.config() };
|
|
141
|
-
this.configUpdate.next(this.config());
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
changeTheme() {
|
|
145
|
-
const config = this.config();
|
|
146
|
-
const themeLink = <HTMLLinkElement>document.getElementById('theme-link');
|
|
147
|
-
const themeLinkHref = themeLink.getAttribute('href')!;
|
|
148
|
-
const newHref = themeLinkHref
|
|
149
|
-
.split('/')
|
|
150
|
-
.map((el) =>
|
|
151
|
-
el == this._config.theme ? (el = config.theme)
|
|
152
|
-
: el == `theme-${this._config.colorScheme}` ? (el = `theme-${config.colorScheme}`)
|
|
153
|
-
: el
|
|
154
|
-
)
|
|
155
|
-
.join('/');
|
|
156
|
-
|
|
157
|
-
this.replaceThemeLink(newHref);
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
replaceThemeLink(href: string) {
|
|
161
|
-
const id = 'theme-link';
|
|
162
|
-
let themeLink = <HTMLLinkElement>document.getElementById(id);
|
|
163
|
-
const cloneLinkElement = <HTMLLinkElement>themeLink.cloneNode(true);
|
|
164
|
-
|
|
165
|
-
cloneLinkElement.setAttribute('href', href);
|
|
166
|
-
cloneLinkElement.setAttribute('id', id + '-clone');
|
|
167
|
-
|
|
168
|
-
themeLink.parentNode!.insertBefore(cloneLinkElement, themeLink.nextSibling);
|
|
169
|
-
cloneLinkElement.addEventListener('load', () => {
|
|
170
|
-
themeLink.remove();
|
|
171
|
-
cloneLinkElement.setAttribute('id', id);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
changeScale(value: number) {
|
|
176
|
-
document.documentElement.style.fontSize = `${value}px`;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
1
|
+
import { Injectable, effect, signal } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
import { Subject } from 'rxjs';
|
|
4
|
+
|
|
5
|
+
export type MenuMode = 'static' | 'overlay' | 'horizontal' | 'slim' | 'slim-plus' | 'reveal' | 'drawer';
|
|
6
|
+
|
|
7
|
+
export type ColorScheme = 'light' | 'dark' | 'dim';
|
|
8
|
+
|
|
9
|
+
export type MenuColorScheme = 'colorScheme' | 'primaryColor' | 'transparent';
|
|
10
|
+
|
|
11
|
+
export interface AppConfig {
|
|
12
|
+
inputStyle: string;
|
|
13
|
+
colorScheme: ColorScheme;
|
|
14
|
+
theme: string;
|
|
15
|
+
ripple: boolean;
|
|
16
|
+
menuMode: MenuMode;
|
|
17
|
+
scale: number;
|
|
18
|
+
menuTheme: MenuColorScheme;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface LayoutState {
|
|
22
|
+
staticMenuDesktopInactive: boolean;
|
|
23
|
+
overlayMenuActive: boolean;
|
|
24
|
+
profileSidebarVisible: boolean;
|
|
25
|
+
configSidebarVisible: boolean;
|
|
26
|
+
staticMenuMobileActive: boolean;
|
|
27
|
+
menuHoverActive: boolean;
|
|
28
|
+
sidebarActive: boolean;
|
|
29
|
+
anchored: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@Injectable({
|
|
33
|
+
providedIn: 'root'
|
|
34
|
+
})
|
|
35
|
+
export class LayoutService {
|
|
36
|
+
_config: AppConfig = {
|
|
37
|
+
ripple: false,
|
|
38
|
+
inputStyle: 'filled',
|
|
39
|
+
menuMode: 'horizontal',
|
|
40
|
+
colorScheme: 'light',
|
|
41
|
+
theme: 'indigo',
|
|
42
|
+
scale: 12,
|
|
43
|
+
menuTheme: 'colorScheme'
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// TODO: Set User Config
|
|
47
|
+
config = signal<AppConfig>(this._config);
|
|
48
|
+
|
|
49
|
+
state: LayoutState = {
|
|
50
|
+
staticMenuDesktopInactive: false,
|
|
51
|
+
overlayMenuActive: false,
|
|
52
|
+
profileSidebarVisible: false,
|
|
53
|
+
configSidebarVisible: false,
|
|
54
|
+
staticMenuMobileActive: false,
|
|
55
|
+
menuHoverActive: false,
|
|
56
|
+
sidebarActive: false,
|
|
57
|
+
anchored: false
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
private configUpdate = new Subject<AppConfig>();
|
|
61
|
+
|
|
62
|
+
private overlayOpen = new Subject<any>();
|
|
63
|
+
|
|
64
|
+
configUpdate$ = this.configUpdate.asObservable();
|
|
65
|
+
|
|
66
|
+
overlayOpen$ = this.overlayOpen.asObservable();
|
|
67
|
+
|
|
68
|
+
constructor() {
|
|
69
|
+
effect(() => {
|
|
70
|
+
const config = this.config();
|
|
71
|
+
if (this.updateStyle(config)) {
|
|
72
|
+
this.changeTheme();
|
|
73
|
+
}
|
|
74
|
+
this.changeScale(config.scale);
|
|
75
|
+
this.onConfigUpdate();
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
updateStyle(config: AppConfig) {
|
|
80
|
+
return config.theme !== this._config.theme || config.colorScheme !== this._config.colorScheme;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
onMenuToggle() {
|
|
84
|
+
if (this.isOverlay()) {
|
|
85
|
+
this.state.overlayMenuActive = !this.state.overlayMenuActive;
|
|
86
|
+
|
|
87
|
+
if (this.state.overlayMenuActive) {
|
|
88
|
+
this.overlayOpen.next(null);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (this.isDesktop()) {
|
|
93
|
+
this.state.staticMenuDesktopInactive = !this.state.staticMenuDesktopInactive;
|
|
94
|
+
} else {
|
|
95
|
+
this.state.staticMenuMobileActive = !this.state.staticMenuMobileActive;
|
|
96
|
+
|
|
97
|
+
if (this.state.staticMenuMobileActive) {
|
|
98
|
+
this.overlayOpen.next(null);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
onOverlaySubmenuOpen() {
|
|
104
|
+
this.overlayOpen.next(null);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
showProfileSidebar() {
|
|
108
|
+
this.state.profileSidebarVisible = true;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
showConfigSidebar() {
|
|
112
|
+
this.state.configSidebarVisible = true;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
isOverlay() {
|
|
116
|
+
return this.config().menuMode === 'overlay';
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
isDesktop() {
|
|
120
|
+
return window.innerWidth > 991;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
isSlim() {
|
|
124
|
+
return this.config().menuMode === 'slim';
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
isSlimPlus() {
|
|
128
|
+
return this.config().menuMode === 'slim-plus';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
isHorizontal() {
|
|
132
|
+
return this.config().menuMode === 'horizontal';
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
isMobile() {
|
|
136
|
+
return !this.isDesktop();
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
onConfigUpdate() {
|
|
140
|
+
this._config = { ...this.config() };
|
|
141
|
+
this.configUpdate.next(this.config());
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
changeTheme() {
|
|
145
|
+
const config = this.config();
|
|
146
|
+
const themeLink = <HTMLLinkElement>document.getElementById('theme-link');
|
|
147
|
+
const themeLinkHref = themeLink.getAttribute('href')!;
|
|
148
|
+
const newHref = themeLinkHref
|
|
149
|
+
.split('/')
|
|
150
|
+
.map((el) =>
|
|
151
|
+
el == this._config.theme ? (el = config.theme)
|
|
152
|
+
: el == `theme-${this._config.colorScheme}` ? (el = `theme-${config.colorScheme}`)
|
|
153
|
+
: el
|
|
154
|
+
)
|
|
155
|
+
.join('/');
|
|
156
|
+
|
|
157
|
+
this.replaceThemeLink(newHref);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
replaceThemeLink(href: string) {
|
|
161
|
+
const id = 'theme-link';
|
|
162
|
+
let themeLink = <HTMLLinkElement>document.getElementById(id);
|
|
163
|
+
const cloneLinkElement = <HTMLLinkElement>themeLink.cloneNode(true);
|
|
164
|
+
|
|
165
|
+
cloneLinkElement.setAttribute('href', href);
|
|
166
|
+
cloneLinkElement.setAttribute('id', id + '-clone');
|
|
167
|
+
|
|
168
|
+
themeLink.parentNode!.insertBefore(cloneLinkElement, themeLink.nextSibling);
|
|
169
|
+
cloneLinkElement.addEventListener('load', () => {
|
|
170
|
+
themeLink.remove();
|
|
171
|
+
cloneLinkElement.setAttribute('id', id);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
changeScale(value: number) {
|
|
176
|
+
document.documentElement.style.fontSize = `${value}px`;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { MenuItem } from 'primeng/api';
|
|
2
|
+
import { Interfaces } from 'aril/util/lib';
|
|
2
3
|
import { MenuChangeEvent } from './menuchangeevent';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
export declare class MenuService {
|
|
5
6
|
private menuSource;
|
|
6
7
|
private resetSource;
|
|
7
8
|
menuItems: import("@angular/core").WritableSignal<MenuItem[]>;
|
|
9
|
+
subMenuItems: import("@angular/core").WritableSignal<Interfaces.MapStringArray<MenuItem>>;
|
|
8
10
|
menuSource$: import("rxjs").Observable<MenuChangeEvent>;
|
|
9
11
|
resetSource$: import("rxjs").Observable<unknown>;
|
|
10
12
|
onMenuStateChange(event: MenuChangeEvent): void;
|
|
@@ -2,6 +2,7 @@ import { Injectable, signal } from '@angular/core';
|
|
|
2
2
|
|
|
3
3
|
import { Subject } from 'rxjs';
|
|
4
4
|
import { MenuItem } from 'primeng/api';
|
|
5
|
+
import { Interfaces } from 'aril/util/lib';
|
|
5
6
|
|
|
6
7
|
import { MenuChangeEvent } from './menuchangeevent';
|
|
7
8
|
|
|
@@ -13,6 +14,7 @@ export class MenuService {
|
|
|
13
14
|
private resetSource = new Subject();
|
|
14
15
|
|
|
15
16
|
public menuItems = signal<MenuItem[]>([]);
|
|
17
|
+
public subMenuItems = signal<Interfaces.MapStringArray<MenuItem>>({});
|
|
16
18
|
|
|
17
19
|
menuSource$ = this.menuSource.asObservable();
|
|
18
20
|
resetSource$ = this.resetSource.asObservable();
|
|
@@ -13,7 +13,7 @@ export declare class ButtonComponent {
|
|
|
13
13
|
size: import("@angular/core").InputSignal<Size, Size>;
|
|
14
14
|
icon: import("@angular/core").InputSignal<PrimeIcon | undefined, PrimeIcon | undefined>;
|
|
15
15
|
color: import("@angular/core").InputSignal<Colors, Colors>;
|
|
16
|
-
clickEvent: EventEmitter<
|
|
16
|
+
clickEvent: EventEmitter<Event>;
|
|
17
17
|
_icon: import("@angular/core").Signal<string>;
|
|
18
18
|
_color: import("@angular/core").Signal<string>;
|
|
19
19
|
_styleClass: import("@angular/core").Signal<string>;
|
|
@@ -11,7 +11,7 @@ import * as i1 from "aril/ui/lib";
|
|
|
11
11
|
export declare class MaskComponent extends BaseInputComponent {
|
|
12
12
|
mask: import("@angular/core").InputSignal<string, string>;
|
|
13
13
|
slotChar: import("@angular/core").InputSignal<string, string>;
|
|
14
|
-
placeholder: import("@angular/core").InputSignal<string
|
|
14
|
+
placeholder: import("@angular/core").InputSignal<string, string>;
|
|
15
15
|
maxlength: import("@angular/core").InputSignal<number, number>;
|
|
16
16
|
usageInGrid: import("@angular/core").InputSignal<boolean, boolean>;
|
|
17
17
|
tabindex: import("@angular/core").InputSignal<number | undefined, number | undefined>;
|
|
@@ -6,7 +6,7 @@ export declare class NumberComponent extends BaseInputComponent {
|
|
|
6
6
|
min: import("@angular/core").InputSignal<number | undefined, number | undefined>;
|
|
7
7
|
max: import("@angular/core").InputSignal<number | undefined, number | undefined>;
|
|
8
8
|
showButtons: import("@angular/core").InputSignal<boolean, boolean>;
|
|
9
|
-
placeholder: import("@angular/core").InputSignal<string
|
|
9
|
+
placeholder: import("@angular/core").InputSignal<string, string>;
|
|
10
10
|
prefix: import("@angular/core").InputSignal<string | undefined, string | undefined>;
|
|
11
11
|
suffix: import("@angular/core").InputSignal<string | undefined, string | undefined>;
|
|
12
12
|
maxlength: import("@angular/core").InputSignal<any, any>;
|
|
@@ -4,7 +4,7 @@ import * as i1 from "aril/ui/lib";
|
|
|
4
4
|
export declare class PasswordComponent extends BaseInputComponent {
|
|
5
5
|
feedback: import("@angular/core").InputSignal<boolean, boolean>;
|
|
6
6
|
passwordCriterias: import("@angular/core").InputSignal<string[] | undefined, string[] | undefined>;
|
|
7
|
-
placeholder: import("@angular/core").InputSignal<string
|
|
7
|
+
placeholder: import("@angular/core").InputSignal<string, string>;
|
|
8
8
|
tabindex: import("@angular/core").InputSignal<number | undefined, number | undefined>;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<PasswordComponent, never>;
|
|
10
10
|
static ɵcmp: i0.ɵɵComponentDeclaration<PasswordComponent, "aril-password[ngModel], aril-password[formControl], aril-password[formControlName]", never, { "feedback": { "alias": "feedback"; "required": false; "isSignal": true; }; "passwordCriterias": { "alias": "passwordCriterias"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.ValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
@@ -3,14 +3,14 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
import * as i1 from "aril/ui/lib";
|
|
4
4
|
type Size = 'sm' | 'md' | 'lg';
|
|
5
5
|
export declare class TextComponent extends BaseInputComponent {
|
|
6
|
-
placeholder: import("@angular/core").InputSignal<string
|
|
6
|
+
placeholder: import("@angular/core").InputSignal<string, string>;
|
|
7
7
|
tabindex: import("@angular/core").InputSignal<number | undefined, number | undefined>;
|
|
8
8
|
icon: import("@angular/core").InputSignal<PrimeIcon | undefined, PrimeIcon | undefined>;
|
|
9
9
|
iconPos: import("@angular/core").InputSignal<IconPosTypes, IconPosTypes>;
|
|
10
10
|
size: import("@angular/core").InputSignal<Size, Size>;
|
|
11
11
|
_icon: import("@angular/core").Signal<string>;
|
|
12
12
|
_iconPosClass: import("@angular/core").Signal<string>;
|
|
13
|
-
_sizeClass: import("@angular/core").Signal<"p-inputtext-sm" | "
|
|
13
|
+
_sizeClass: import("@angular/core").Signal<"" | "p-inputtext-sm" | "p-inputtext-lg">;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<TextComponent, never>;
|
|
15
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<TextComponent, "aril-text[ngModel], aril-text[formControl], aril-text[formControlName]", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "tabindex": { "alias": "tabindex"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPos": { "alias": "iconPos"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; }, {}, never, never, true, [{ directive: typeof i1.ValueAccessorDirective; inputs: {}; outputs: {}; }]>;
|
|
16
16
|
}
|
|
@@ -10,10 +10,7 @@ export declare class TreeComponent {
|
|
|
10
10
|
selectionMode: import("@angular/core").InputSignal<SelectionModes | undefined, SelectionModes | undefined>;
|
|
11
11
|
expandEvent: EventEmitter<unknown>;
|
|
12
12
|
selectionEvent: EventEmitter<any>;
|
|
13
|
-
isExpended: boolean;
|
|
14
13
|
selectedNodes: TreeNode | TreeNode[] | null;
|
|
15
|
-
toggleTree(): void;
|
|
16
|
-
expandRecursive(node: TreeNode[]): void;
|
|
17
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<TreeComponent, never>;
|
|
18
15
|
static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent, "aril-tree", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; "contextMenu": { "alias": "contextMenu"; "required": false; "isSignal": true; }; "filterPlaceholder": { "alias": "filterPlaceholder"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; }, { "expandEvent": "expandEvent"; "selectionEvent": "selectionEvent"; }, never, never, true, never>;
|
|
19
16
|
}
|