@acorex/platform 19.3.0-next.5 → 19.3.1
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/common/lib/app/index.d.ts +0 -1
- package/common/lib/common.module.d.ts +1 -1
- package/common/lib/configs/app.config.d.ts +12 -3
- package/common/lib/home-page/home-page.service.d.ts +6 -0
- package/common/lib/layout/logo/logo.component.d.ts +4 -0
- package/common/lib/settings/settings.service.d.ts +4 -1
- package/common/lib/utils/index.d.ts +0 -1
- package/common/lib/utils/regional-util.service.d.ts +2 -2
- package/common/lib/utils/regional.types.d.ts +6 -16
- package/core/lib/index.d.ts +1 -0
- package/{common/lib/app → core/lib/startup}/app-startup.service.d.ts +1 -5
- package/core/lib/startup/app-startup.types.d.ts +6 -0
- package/core/lib/startup/index.d.ts +2 -0
- package/core/lib/types/logo.types.d.ts +5 -9
- package/fesm2022/acorex-platform-auth.mjs +5 -1
- package/fesm2022/acorex-platform-auth.mjs.map +1 -1
- package/fesm2022/acorex-platform-common.mjs +130 -218
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +42 -13
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +17 -0
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +247 -0
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-designer.mjs +2 -2
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +44 -20
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-search.mjs +4 -3
- package/fesm2022/acorex-platform-layout-search.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-setting.mjs +5 -4
- package/fesm2022/acorex-platform-layout-setting.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs → acorex-platform-themes-default-entity-master-list-view.component-Ol8haGqF.mjs} +5 -4
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Ol8haGqF.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +18 -20
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +22 -18
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/{acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs → acorex-platform-widgets-tabular-data-edit-popup.component-1IseEVXQ.mjs} +2 -2
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-1IseEVXQ.mjs.map +1 -0
- package/fesm2022/acorex-platform-widgets.mjs +35 -3775
- package/fesm2022/acorex-platform-widgets.mjs.map +1 -1
- package/layout/builder/lib/builder/context-store.service.d.ts +2 -1
- package/layout/builder/lib/builder/widget-base.component.d.ts +1 -0
- package/layout/builder/lib/builder/widget-container.component.d.ts +1 -0
- package/layout/builder/lib/builder/widget-map.d.ts +1 -0
- package/layout/builder/lib/builder/widget-renderer.directive.d.ts +1 -0
- package/layout/components/README.md +3 -0
- package/layout/components/index.d.ts +1 -0
- package/layout/components/lib/user-avatar/index.d.ts +4 -0
- package/layout/components/lib/user-avatar/user-avatar.component.d.ts +27 -0
- package/layout/components/lib/user-avatar/user-avatar.provider.d.ts +3 -0
- package/layout/components/lib/user-avatar/user-avatar.service.d.ts +42 -0
- package/layout/components/lib/user-avatar/user-avatar.types.d.ts +12 -0
- package/layout/entity/lib/entity-master-single.viewmodel.d.ts +1 -0
- package/layout/entity/lib/entity.module.d.ts +1 -1
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-column.component.d.ts +1 -1
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget-edit.component.d.ts +1 -0
- package/layout/entity/lib/widgets/lookup-widget/lookup-widget.config.d.ts +0 -5
- package/layout/search/lib/search.module.d.ts +1 -1
- package/layout/setting/lib/settings.module.d.ts +1 -1
- package/package.json +8 -2
- package/themes/default/lib/layouts/root-layout/components/header/header.component.d.ts +12 -3
- package/themes/default/lib/layouts/root-layout/horizontal/horizontal-layout.component.d.ts +12 -6
- package/themes/default/lib/layouts/root-layout/root-layout.component.d.ts +2 -1
- package/themes/default/lib/layouts/root-layout/vertical/vertical-layout.component.d.ts +14 -5
- package/themes/shared/lib/shared.module.d.ts +1 -1
- package/widgets/lib/widgets/index.d.ts +0 -9
- package/common/lib/utils/data-generator.d.ts +0 -26
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CuyWAi6X.mjs.map +0 -1
- package/fesm2022/acorex-platform-widgets-tabular-data-edit-popup.component-CybYV1Kf.mjs.map +0 -1
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.component.d.ts +0 -41
- package/widgets/lib/widgets/charts/bar-chart/bar-chart-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/bar-chart/bar-chart.type.d.ts +0 -34
- package/widgets/lib/widgets/charts/bar-chart/index.d.ts +0 -2
- package/widgets/lib/widgets/charts/chart.type.d.ts +0 -3
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.component.d.ts +0 -40
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/clock-calendar/clock-calendar.types.d.ts +0 -50
- package/widgets/lib/widgets/charts/clock-calendar/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.component.d.ts +0 -58
- package/widgets/lib/widgets/charts/donut-chart/donut-chart-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/donut-chart/donut-chart.type.d.ts +0 -67
- package/widgets/lib/widgets/charts/donut-chart/index.d.ts +0 -2
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.component.d.ts +0 -69
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/gauge-chart/gauge-chart.type.d.ts +0 -29
- package/widgets/lib/widgets/charts/gauge-chart/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/notification/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/notification/notification-widget.component.d.ts +0 -54
- package/widgets/lib/widgets/charts/notification/notification-widget.config.d.ts +0 -10
- package/widgets/lib/widgets/charts/notification/notification.type.d.ts +0 -47
- package/widgets/lib/widgets/charts/shared/chart-base.component.d.ts +0 -44
- package/widgets/lib/widgets/charts/shared/chart-base.type.d.ts +0 -37
- package/widgets/lib/widgets/charts/shared/components/chart-tooltip/chart-tooltip.component.d.ts +0 -28
- package/widgets/lib/widgets/charts/shared/components/chart-tooltip/index.d.ts +0 -1
- package/widgets/lib/widgets/charts/sticky-note/index.d.ts +0 -2
- package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.component.d.ts +0 -21
- package/widgets/lib/widgets/charts/sticky-note/sticky-note-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/tasklist/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/tasklist/tasklist-widget.component.d.ts +0 -34
- package/widgets/lib/widgets/charts/tasklist/tasklist-widget.config.d.ts +0 -7
- package/widgets/lib/widgets/charts/tasklist/tasklist.type.d.ts +0 -36
- package/widgets/lib/widgets/charts/weather/index.d.ts +0 -4
- package/widgets/lib/widgets/charts/weather/weather-services/index.d.ts +0 -3
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.abstract.d.ts +0 -174
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.key.d.ts +0 -2
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.mock.service.d.ts +0 -47
- package/widgets/lib/widgets/charts/weather/weather-services/weather-api.service.d.ts +0 -48
- package/widgets/lib/widgets/charts/weather/weather-widget.component.d.ts +0 -109
- package/widgets/lib/widgets/charts/weather/weather-widget.config.d.ts +0 -14
- package/widgets/lib/widgets/charts/weather/weather.module.d.ts +0 -11
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Injectable, input, signal, computed, ViewEncapsulation, Component } from '@angular/core';
|
|
3
|
+
import { BehaviorSubject, timer, Subject, takeUntil } from 'rxjs';
|
|
4
|
+
import { tap } from 'rxjs/operators';
|
|
5
|
+
import { AXFormModule } from '@acorex/components/form';
|
|
6
|
+
import { AXButtonModule } from '@acorex/components/button';
|
|
7
|
+
import { AXTextBoxModule } from '@acorex/components/text-box';
|
|
8
|
+
import { AXCheckBoxModule } from '@acorex/components/check-box';
|
|
9
|
+
import { AXLabelModule } from '@acorex/components/label';
|
|
10
|
+
import { CommonModule } from '@angular/common';
|
|
11
|
+
import * as i1 from '@acorex/components/image';
|
|
12
|
+
import { AXImageModule } from '@acorex/components/image';
|
|
13
|
+
import * as i2 from '@acorex/components/badge';
|
|
14
|
+
import { AXBadgeModule } from '@acorex/components/badge';
|
|
15
|
+
|
|
16
|
+
const AXP_USER_AVATAR_PROVIDER = new InjectionToken('AXP_USER_AVATAR_PROVIDER', {
|
|
17
|
+
providedIn: 'root',
|
|
18
|
+
factory: () => {
|
|
19
|
+
return new AXPUserAvatarProviderDefault();
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
class AXPUserAvatarProviderDefault {
|
|
23
|
+
provide(username) {
|
|
24
|
+
return Promise.resolve({
|
|
25
|
+
username: username,
|
|
26
|
+
firstName: 'John',
|
|
27
|
+
lastName: 'Doe',
|
|
28
|
+
status: 'online',
|
|
29
|
+
avatarUrl: 'https://via.placeholder.com/150',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
class AXPUserAvatarService {
|
|
35
|
+
constructor() {
|
|
36
|
+
this.provider = inject(AXP_USER_AVATAR_PROVIDER);
|
|
37
|
+
// Cache configuration
|
|
38
|
+
this.cacheExpiryTime = 5 * 60 * 1000; // 5 minutes in milliseconds
|
|
39
|
+
this.refreshInterval = 3 * 60 * 1000; // 3 minutes in milliseconds
|
|
40
|
+
// Cache storage
|
|
41
|
+
this.cache = new Map();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Gets user information with caching and auto-refresh
|
|
45
|
+
* @param username The username to fetch information for
|
|
46
|
+
* @returns Observable that emits user avatar data
|
|
47
|
+
*/
|
|
48
|
+
getUserInfo$(username) {
|
|
49
|
+
// Check if we have a cached entry
|
|
50
|
+
if (!this.cache.has(username) || this.isExpired(username)) {
|
|
51
|
+
// Create a new cache entry with default values
|
|
52
|
+
const defaultData = {
|
|
53
|
+
status: 'offline',
|
|
54
|
+
username: username,
|
|
55
|
+
firstName: '',
|
|
56
|
+
lastName: ''
|
|
57
|
+
};
|
|
58
|
+
const subject = new BehaviorSubject(defaultData);
|
|
59
|
+
this.cache.set(username, {
|
|
60
|
+
data: defaultData,
|
|
61
|
+
timestamp: Date.now(),
|
|
62
|
+
subject
|
|
63
|
+
});
|
|
64
|
+
// Fetch fresh data immediately
|
|
65
|
+
this.fetchAndUpdateCache(username);
|
|
66
|
+
// Set up auto refresh
|
|
67
|
+
timer(this.refreshInterval, this.refreshInterval)
|
|
68
|
+
.pipe(tap(() => this.fetchAndUpdateCache(username)))
|
|
69
|
+
.subscribe();
|
|
70
|
+
}
|
|
71
|
+
return this.cache.get(username).subject.asObservable();
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Gets user information (Promise-based for backward compatibility)
|
|
75
|
+
* @param username The username to fetch information for
|
|
76
|
+
* @returns Promise that resolves to user avatar data
|
|
77
|
+
*/
|
|
78
|
+
async getUserInfo(username) {
|
|
79
|
+
// Check if we have an unexpired cached entry
|
|
80
|
+
if (this.cache.has(username) && !this.isExpired(username)) {
|
|
81
|
+
return this.cache.get(username).data;
|
|
82
|
+
}
|
|
83
|
+
// Fetch fresh data and cache it
|
|
84
|
+
return this.fetchAndUpdateCache(username);
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Clears the entire cache or a specific user's cache
|
|
88
|
+
* @param username Optional username to clear specific cache
|
|
89
|
+
*/
|
|
90
|
+
clearCache(username) {
|
|
91
|
+
if (username) {
|
|
92
|
+
this.cache.delete(username);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
this.cache.clear();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Force refresh data for a specific username
|
|
100
|
+
* @param username The username to refresh
|
|
101
|
+
* @returns Promise that resolves to the refreshed data
|
|
102
|
+
*/
|
|
103
|
+
async refreshUserInfo(username) {
|
|
104
|
+
return this.fetchAndUpdateCache(username);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Checks if a cache entry is expired
|
|
108
|
+
*/
|
|
109
|
+
isExpired(username) {
|
|
110
|
+
const entry = this.cache.get(username);
|
|
111
|
+
if (!entry)
|
|
112
|
+
return true;
|
|
113
|
+
return (Date.now() - entry.timestamp) > this.cacheExpiryTime;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Fetches data from provider and updates the cache
|
|
117
|
+
*/
|
|
118
|
+
async fetchAndUpdateCache(username) {
|
|
119
|
+
try {
|
|
120
|
+
const data = await this.provider.provide(username);
|
|
121
|
+
const entry = this.cache.get(username);
|
|
122
|
+
// Update the cache entry
|
|
123
|
+
if (entry) {
|
|
124
|
+
entry.data = data;
|
|
125
|
+
entry.timestamp = Date.now();
|
|
126
|
+
entry.subject.next(data);
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
// Create a new cache entry if needed
|
|
130
|
+
const subject = new BehaviorSubject(data);
|
|
131
|
+
this.cache.set(username, {
|
|
132
|
+
data,
|
|
133
|
+
timestamp: Date.now(),
|
|
134
|
+
subject
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
return data;
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
console.error(`Error fetching user info for ${username}:`, error);
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPUserAvatarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
145
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPUserAvatarService, providedIn: 'root' }); }
|
|
146
|
+
}
|
|
147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPUserAvatarService, decorators: [{
|
|
148
|
+
type: Injectable,
|
|
149
|
+
args: [{
|
|
150
|
+
providedIn: 'root',
|
|
151
|
+
}]
|
|
152
|
+
}] });
|
|
153
|
+
|
|
154
|
+
class AXPUserAvatarComponent {
|
|
155
|
+
constructor() {
|
|
156
|
+
this.userAvatarService = inject(AXPUserAvatarService);
|
|
157
|
+
this.destroy$ = new Subject();
|
|
158
|
+
this.size = input(40);
|
|
159
|
+
this.username = input('');
|
|
160
|
+
this.src = signal('');
|
|
161
|
+
this.firstName = signal('');
|
|
162
|
+
this.lastName = signal('');
|
|
163
|
+
this.title = computed(() => `${this.firstName()} ${this.lastName()}`);
|
|
164
|
+
this.isOnline = signal(false);
|
|
165
|
+
}
|
|
166
|
+
ngOnInit() {
|
|
167
|
+
this.loadUserData();
|
|
168
|
+
}
|
|
169
|
+
ngOnDestroy() {
|
|
170
|
+
this.destroy$.next();
|
|
171
|
+
this.destroy$.complete();
|
|
172
|
+
}
|
|
173
|
+
loadUserData() {
|
|
174
|
+
// Skip if no username provided
|
|
175
|
+
if (!this.username()) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
// Subscribe to the user info observable to get real-time updates
|
|
179
|
+
this.userAvatarService.getUserInfo$(this.username())
|
|
180
|
+
.pipe(takeUntil(this.destroy$))
|
|
181
|
+
.subscribe(userData => {
|
|
182
|
+
// Update component signals with user data
|
|
183
|
+
this.firstName.set(userData.firstName || '');
|
|
184
|
+
this.lastName.set(userData.lastName || '');
|
|
185
|
+
this.isOnline.set(userData.status === 'online');
|
|
186
|
+
// Generate avatar image source if needed
|
|
187
|
+
// This is a placeholder - replace with your actual avatar URL logic
|
|
188
|
+
this.generateAvatarSrc(userData);
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Generate avatar image source
|
|
193
|
+
* This is a placeholder - implement based on your actual requirements
|
|
194
|
+
*/
|
|
195
|
+
generateAvatarSrc(userData) {
|
|
196
|
+
// Example: Check if the user has a custom avatar URL
|
|
197
|
+
// If not, generate a placeholder using initials
|
|
198
|
+
if (userData.avatarUrl) {
|
|
199
|
+
this.src.set(userData.avatarUrl);
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
// Generate a placeholder - you could use an external service like UI Avatars
|
|
203
|
+
// or implement your own logic
|
|
204
|
+
const initials = this.getInitials(userData.firstName || '', userData.lastName || '');
|
|
205
|
+
this.src.set(`https://ui-avatars.com/api/?name=${encodeURIComponent(initials)}&size=${this.size()}&background=random`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Get initials from first and last name
|
|
210
|
+
*/
|
|
211
|
+
getInitials(firstName, lastName) {
|
|
212
|
+
const firstInitial = firstName.charAt(0).toUpperCase();
|
|
213
|
+
const lastInitial = lastName.charAt(0).toUpperCase();
|
|
214
|
+
return firstInitial + lastInitial;
|
|
215
|
+
}
|
|
216
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPUserAvatarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
217
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: AXPUserAvatarComponent, isStandalone: true, selector: "axp-user-avatar", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, username: { classPropertyName: "username", publicName: "username", isSignal: true, isRequired: false, transformFunction: null } }, providers: [], ngImport: i0, template: "<ax-image [src]=\"src()\" [alt]=\"title()\" [width]=\"size()\" [height]=\"size()\">\n <ax-badge [color]=\"isOnline() ? 'success' : 'danger'\"></ax-badge>\n</ax-image>\n", styles: [""], dependencies: [{ kind: "ngmodule", type:
|
|
218
|
+
// Angular
|
|
219
|
+
CommonModule }, { kind: "ngmodule", type:
|
|
220
|
+
// ACoreX
|
|
221
|
+
AXFormModule }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "ngmodule", type: AXLabelModule }, { kind: "ngmodule", type: AXCheckBoxModule }, { kind: "ngmodule", type:
|
|
222
|
+
// Platform
|
|
223
|
+
AXImageModule }, { kind: "component", type: i1.AXImageComponent, selector: "ax-image", inputs: ["width", "height", "overlayMode", "src", "alt", "priority", "lazy"], outputs: ["onLoad", "onError"] }, { kind: "ngmodule", type: AXBadgeModule }, { kind: "component", type: i2.AXBadgeComponent, selector: "ax-badge", inputs: ["color", "look", "text"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
224
|
+
}
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPUserAvatarComponent, decorators: [{
|
|
226
|
+
type: Component,
|
|
227
|
+
args: [{ selector: 'axp-user-avatar', imports: [
|
|
228
|
+
// Angular
|
|
229
|
+
CommonModule,
|
|
230
|
+
// ACoreX
|
|
231
|
+
AXFormModule,
|
|
232
|
+
AXTextBoxModule,
|
|
233
|
+
AXButtonModule,
|
|
234
|
+
AXLabelModule,
|
|
235
|
+
AXCheckBoxModule,
|
|
236
|
+
// Platform
|
|
237
|
+
AXImageModule,
|
|
238
|
+
AXBadgeModule
|
|
239
|
+
], encapsulation: ViewEncapsulation.None, providers: [], template: "<ax-image [src]=\"src()\" [alt]=\"title()\" [width]=\"size()\" [height]=\"size()\">\n <ax-badge [color]=\"isOnline() ? 'success' : 'danger'\"></ax-badge>\n</ax-image>\n" }]
|
|
240
|
+
}] });
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Generated bundle index. Do not edit.
|
|
244
|
+
*/
|
|
245
|
+
|
|
246
|
+
export { AXPUserAvatarComponent, AXPUserAvatarService, AXP_USER_AVATAR_PROVIDER };
|
|
247
|
+
//# sourceMappingURL=acorex-platform-layout-components.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acorex-platform-layout-components.mjs","sources":["../../../../libs/platform/layout/components/src/lib/user-avatar/user-avatar.provider.ts","../../../../libs/platform/layout/components/src/lib/user-avatar/user-avatar.service.ts","../../../../libs/platform/layout/components/src/lib/user-avatar/user-avatar.component.ts","../../../../libs/platform/layout/components/src/lib/user-avatar/user-avatar.component.html","../../../../libs/platform/layout/components/src/acorex-platform-layout-components.ts"],"sourcesContent":["import { InjectionToken } from \"@angular/core\";\nimport { AXPUserAvatarData, AXPUserAvatarProvider } from \"./user-avatar.types\";\n\nexport const AXP_USER_AVATAR_PROVIDER = new InjectionToken<AXPUserAvatarProvider>(\n 'AXP_USER_AVATAR_PROVIDER',\n {\n providedIn: 'root',\n factory: () => {\n return new AXPUserAvatarProviderDefault();\n }\n }\n);\n\n\nclass AXPUserAvatarProviderDefault implements AXPUserAvatarProvider {\n provide(username: string): Promise<AXPUserAvatarData> {\n return Promise.resolve({\n username: username,\n firstName: 'John',\n lastName: 'Doe',\n status: 'online',\n avatarUrl: 'https://via.placeholder.com/150',\n });\n }\n}\n","import { inject, Injectable } from \"@angular/core\";\nimport { AXPUserAvatarData } from \"./user-avatar.types\";\nimport { AXP_USER_AVATAR_PROVIDER } from \"./user-avatar.provider\";\nimport { BehaviorSubject, Observable, timer } from 'rxjs';\nimport { map, shareReplay, switchMap, tap } from 'rxjs/operators';\n\ninterface CacheEntry {\n data: AXPUserAvatarData;\n timestamp: number;\n subject: BehaviorSubject<AXPUserAvatarData>;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXPUserAvatarService {\n private provider = inject(AXP_USER_AVATAR_PROVIDER);\n\n // Cache configuration\n private readonly cacheExpiryTime = 5 * 60 * 1000; // 5 minutes in milliseconds\n private readonly refreshInterval = 3 * 60 * 1000; // 3 minutes in milliseconds\n\n // Cache storage\n private cache = new Map<string, CacheEntry>();\n\n /**\n * Gets user information with caching and auto-refresh\n * @param username The username to fetch information for\n * @returns Observable that emits user avatar data\n */\n getUserInfo$(username: string): Observable<AXPUserAvatarData> {\n // Check if we have a cached entry\n if (!this.cache.has(username) || this.isExpired(username)) {\n // Create a new cache entry with default values\n const defaultData: AXPUserAvatarData = {\n status: 'offline',\n username: username,\n firstName: '',\n lastName: ''\n };\n const subject = new BehaviorSubject<AXPUserAvatarData>(defaultData);\n this.cache.set(username, {\n data: defaultData,\n timestamp: Date.now(),\n subject\n });\n\n // Fetch fresh data immediately\n this.fetchAndUpdateCache(username);\n\n // Set up auto refresh\n timer(this.refreshInterval, this.refreshInterval)\n .pipe(\n tap(() => this.fetchAndUpdateCache(username))\n )\n .subscribe();\n }\n\n return this.cache.get(username)!.subject.asObservable();\n }\n\n /**\n * Gets user information (Promise-based for backward compatibility)\n * @param username The username to fetch information for\n * @returns Promise that resolves to user avatar data\n */\n async getUserInfo(username: string): Promise<AXPUserAvatarData> {\n // Check if we have an unexpired cached entry\n if (this.cache.has(username) && !this.isExpired(username)) {\n return this.cache.get(username)!.data;\n }\n\n // Fetch fresh data and cache it\n return this.fetchAndUpdateCache(username);\n }\n\n /**\n * Clears the entire cache or a specific user's cache\n * @param username Optional username to clear specific cache\n */\n clearCache(username?: string): void {\n if (username) {\n this.cache.delete(username);\n } else {\n this.cache.clear();\n }\n }\n\n /**\n * Force refresh data for a specific username\n * @param username The username to refresh\n * @returns Promise that resolves to the refreshed data\n */\n async refreshUserInfo(username: string): Promise<AXPUserAvatarData> {\n return this.fetchAndUpdateCache(username);\n }\n\n /**\n * Checks if a cache entry is expired\n */\n private isExpired(username: string): boolean {\n const entry = this.cache.get(username);\n if (!entry) return true;\n\n return (Date.now() - entry.timestamp) > this.cacheExpiryTime;\n }\n\n /**\n * Fetches data from provider and updates the cache\n */\n private async fetchAndUpdateCache(username: string): Promise<AXPUserAvatarData> {\n try {\n const data = await this.provider.provide(username);\n const entry = this.cache.get(username);\n\n // Update the cache entry\n if (entry) {\n entry.data = data;\n entry.timestamp = Date.now();\n entry.subject.next(data);\n } else {\n // Create a new cache entry if needed\n const subject = new BehaviorSubject<AXPUserAvatarData>(data);\n this.cache.set(username, {\n data,\n timestamp: Date.now(),\n subject\n });\n }\n\n return data;\n } catch (error) {\n console.error(`Error fetching user info for ${username}:`, error);\n throw error;\n }\n }\n}","import { Component, OnDestroy, OnInit, ViewEncapsulation, computed, inject, input, signal } from '@angular/core';\n\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXButtonModule } from '@acorex/components/button';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXCheckBoxModule } from '@acorex/components/check-box';\nimport { AXLabelModule } from '@acorex/components/label';\nimport { CommonModule } from '@angular/common';\nimport { AXImageModule } from '@acorex/components/image';\nimport { AXBadgeModule } from '@acorex/components/badge';\nimport { AXPUserAvatarService } from './user-avatar.service';\nimport { Subject, takeUntil } from 'rxjs';\n\n@Component({\n selector: 'axp-user-avatar',\n templateUrl: './user-avatar.component.html',\n styleUrl: './user-avatar.component.scss',\n imports: [\n // Angular\n CommonModule,\n // ACoreX\n AXFormModule,\n AXTextBoxModule,\n AXButtonModule,\n AXLabelModule,\n AXCheckBoxModule,\n // Platform\n AXImageModule,\n AXBadgeModule\n ],\n encapsulation: ViewEncapsulation.None,\n providers: [],\n})\nexport class AXPUserAvatarComponent implements OnInit, OnDestroy {\n private readonly userAvatarService = inject(AXPUserAvatarService);\n private readonly destroy$ = new Subject<void>();\n\n size = input<number>(40);\n username = input<string>('');\n\n src = signal<string>('');\n firstName = signal<string>('');\n lastName = signal<string>('');\n title = computed(() => `${this.firstName()} ${this.lastName()}`);\n isOnline = signal<boolean>(false);\n\n ngOnInit(): void {\n this.loadUserData();\n }\n\n ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n private loadUserData(): void {\n // Skip if no username provided\n if (!this.username()) {\n return;\n }\n\n // Subscribe to the user info observable to get real-time updates\n this.userAvatarService.getUserInfo$(this.username())\n .pipe(takeUntil(this.destroy$))\n .subscribe(userData => {\n // Update component signals with user data\n this.firstName.set(userData.firstName || '');\n this.lastName.set(userData.lastName || '');\n this.isOnline.set(userData.status === 'online');\n\n // Generate avatar image source if needed\n // This is a placeholder - replace with your actual avatar URL logic\n this.generateAvatarSrc(userData);\n });\n }\n\n /**\n * Generate avatar image source\n * This is a placeholder - implement based on your actual requirements\n */\n private generateAvatarSrc(userData: any): void {\n // Example: Check if the user has a custom avatar URL\n // If not, generate a placeholder using initials\n if (userData.avatarUrl) {\n this.src.set(userData.avatarUrl);\n } else {\n // Generate a placeholder - you could use an external service like UI Avatars\n // or implement your own logic\n const initials = this.getInitials(userData.firstName || '', userData.lastName || '');\n this.src.set(`https://ui-avatars.com/api/?name=${encodeURIComponent(initials)}&size=${this.size()}&background=random`);\n }\n }\n\n /**\n * Get initials from first and last name\n */\n private getInitials(firstName: string, lastName: string): string {\n const firstInitial = firstName.charAt(0).toUpperCase();\n const lastInitial = lastName.charAt(0).toUpperCase();\n return firstInitial + lastInitial;\n }\n}\n","<ax-image [src]=\"src()\" [alt]=\"title()\" [width]=\"size()\" [height]=\"size()\">\n <ax-badge [color]=\"isOnline() ? 'success' : 'danger'\"></ax-badge>\n</ax-image>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;MAGa,wBAAwB,GAAG,IAAI,cAAc,CACtD,0BAA0B,EAC1B;AACI,IAAA,UAAU,EAAE,MAAM;IAClB,OAAO,EAAE,MAAK;QACV,OAAO,IAAI,4BAA4B,EAAE;;AAEhD,CAAA;AAIL,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224
|
return styles;
|
|
2225
2225
|
}
|
|
2226
2226
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutDesignerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2227
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: AXPLayoutDesignerComponent, isStandalone: true, selector: "axp-layout-designer", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.__styles" } }, providers: [AXPDesignerService], viewQueries: [{ propertyName: "propertyViewer", first: true, predicate: AXPWidgetPropertyViewerComponent, descendants: true, static: true }], ngImport: i0, template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative ax-overflow-hidden\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-lightest ax-border-e ax-sm ax-flex ax-flex-col ax-items-center ax-dark\">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.png\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <!-- <ax-button look=\"blank\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button> -->\n <ax-button look=\"blank\" (onClick)=\"pages.toggle()\" title=\"Pages\">\n <ax-icon class=\"fa-solid fa-page ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"datasources.toggle()\" title=\"Data Sources\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <!-- <ax-button look=\"blank\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-b ax-flex ax-justify-between ax-px-2 ax-dark\">\n <div class=\"ax-flex ax-flex-1 ax-items-center ax-text-white ax-justify-start\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-center\">\n <axp-designer-view-sizes [(size)]=\"service.size\"></axp-designer-view-sizes>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-end\">\n <ax-dropdown-button mode=\"split\" look=\"solid\" text=\"Preview\" class=\"ax-sm\"\n (onClick)=\"service.openPreviewDialog()\">\n <ax-button-item-list>\n <ax-button-item text=\"Open in new window\" (onClick)=\"service.openPreviewWindow()\">\n <ax-prefix>\n <ax-icon icon=\"fa-regular fa-window-restore\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n </div>\n </div>\n <!-- Board -->\n <ax-drawer-container class=\"ax-w-full ax-flex-1\">\n <!-- Pages -->\n <ax-drawer #pages location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-pages></axp-designer-pages>\n </ax-content>\n </ax-drawer>\n <!-- Datasources -->\n <ax-drawer #datasources location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-data-sources></axp-designer-data-sources>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light ax-bg-lighter ax-flex ax-justify-center ax-p-10\">\n <axp-designer-board class=\"ax-rounded-lg ax-bg-lightest ax-shadow-md\"> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n <!-- Footer -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-t ax-flex ax-items-center ax-dark\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-dark axp-designer-prop-side\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-px-4 ax-border-b ax-h-10\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer [widget]=\"service.selectedNode()!\" style=\"--ax-sys-size-base: 1.875rem;\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\" class=\"ax-w-1/4\">\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>", styles: ["axp-layout-designer .axp-designer-board{background-color:#fff;background-image:linear-gradient(45deg,#f0f0f0 25%,transparent 25%,transparent 75%,#f0f0f0 75%,#f0f0f0),linear-gradient(45deg,#f0f0f0 25%,#fff 25%,#fff 75%,#f0f0f0 75%,#f0f0f0);background-size:20px 20px;background-position:0 0,10px 10px;display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-surface),var(--tw-bg-opacity, 1));padding:.75rem}axp-layout-designer .axp-designer-board ax-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1))}axp-layout-designer .axp-designer-board.axp-state-design .ax-widget-outline{outline-style:dashed;outline-width:1px;outline-offset:2px;outline-color:#d1d5db}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host{cursor:pointer;position:relative}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:2px;outline-offset:1px;outline-color:rgba(var(--ax-sys-color-lightest-surface),1);outline-color:#60a5fa}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected.ax-widget-container{outline-offset:2px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover{outline-style:dashed;outline-width:2px;outline-offset:2px;outline-color:#d946ef}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.axp-state-selected{outline-color:#60a5fa}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.ax-widget-container{outline-offset:4px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2000;height:100%;width:100%}axp-layout-designer .axp-designer-board .axp-empty-space{display:flex;flex:1 1 0%;cursor:default;align-items:center;justify-content:center;background-color:rgba(var(--ax-sys-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-sys-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-sys-color-primary-300),50%) 0,rgba(var(--ax-sys-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px;height:100%}axp-layout-designer .axp-designer-board .axp-page-widget-header,axp-layout-designer .axp-designer-board .axp-page-widget-footer{filter:grayscale(100%);opacity:.5}axp-layout-designer .axp-designer-board .axp-page-widget-header:hover,axp-layout-designer .axp-designer-board .axp-page-widget-footer:hover{filter:grayscale(0);opacity:1}axp-layout-designer .axp-designer-board .axp-page-widget-header{margin-bottom:.5rem}axp-layout-designer .axp-designer-board .axp-page-widget-footer{margin-top:.5rem}axp-layout-designer .axp-designer-prop-side{width:20rem;border-inline-start-width:1px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}axp-designer-drawer-content ul.axp-designer-drawer-list{padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li{cursor:pointer;border-radius:.125rem;padding:.25rem .5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation-duration:.15s;animation-timing-function:cubic-bezier(.4,0,.2,1)}axp-designer-drawer-content ul.axp-designer-drawer-list li:hover:not(.axp-designer-drawer-list){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li.ax-state-selected{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content .axp-designer-drawer-empty{display:flex;align-items:center;justify-content:center;padding:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: AXPDesignerBoardComponent, selector: "axp-designer-board" }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }, { kind: "component", type: AXPDesignerBreadcrumbsComponent, selector: "axp-designer-breadcrumbs" }, { kind: "component", type: AXPDesignerOutlineComponent, selector: "axp-designer-outline" }, { kind: "component", type: AXPDesignerHeaderMenuComponent, selector: "axp-designer-header-menu" }, { kind: "component", type: AXPDesignerHistoryComponent, selector: "axp-designer-history" }, { kind: "component", type: AXPDesignerDataSourcesComponent, selector: "axp-designer-data-sources" }, { kind: "component", type: AXPDesignerPagesComponent, selector: "axp-designer-pages" }, { kind: "component", type: AXPDesignerViewSizeToolbarComponent, selector: "axp-designer-view-sizes", inputs: ["size"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$1.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "closeOthers", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i3$1.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type: i5.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2227
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.3", type: AXPLayoutDesignerComponent, isStandalone: true, selector: "axp-layout-designer", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, strategy: { classPropertyName: "strategy", publicName: "strategy", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style": "this.__styles" } }, providers: [AXPDesignerService], viewQueries: [{ propertyName: "propertyViewer", first: true, predicate: AXPWidgetPropertyViewerComponent, descendants: true, static: true }], ngImport: i0, template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative ax-overflow-hidden\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-lightest ax-border-e ax-sm ax-flex ax-flex-col ax-items-center ax-dark\">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo-light.svg\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <!-- <ax-button look=\"blank\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button> -->\n <ax-button look=\"blank\" (onClick)=\"pages.toggle()\" title=\"Pages\">\n <ax-icon class=\"fa-solid fa-page ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"datasources.toggle()\" title=\"Data Sources\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <!-- <ax-button look=\"blank\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-b ax-flex ax-justify-between ax-px-2 ax-dark\">\n <div class=\"ax-flex ax-flex-1 ax-items-center ax-text-white ax-justify-start\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-center\">\n <axp-designer-view-sizes [(size)]=\"service.size\"></axp-designer-view-sizes>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-end\">\n <ax-dropdown-button\n mode=\"split\"\n look=\"solid\"\n text=\"Preview\"\n class=\"ax-sm\"\n (onClick)=\"service.openPreviewDialog()\"\n >\n <ax-button-item-list>\n <ax-button-item text=\"Open in new window\" (onClick)=\"service.openPreviewWindow()\">\n <ax-prefix>\n <ax-icon icon=\"fa-regular fa-window-restore\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n </div>\n </div>\n <!-- Board -->\n <ax-drawer-container class=\"ax-w-full ax-flex-1\">\n <!-- Pages -->\n <ax-drawer #pages location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-pages></axp-designer-pages>\n </ax-content>\n </ax-drawer>\n <!-- Datasources -->\n <ax-drawer #datasources location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-data-sources></axp-designer-data-sources>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light ax-bg-lighter ax-flex ax-justify-center ax-p-10\">\n <axp-designer-board class=\"ax-rounded-lg ax-bg-lightest ax-shadow-md\"> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n <!-- Footer -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-t ax-flex ax-items-center ax-dark\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-dark axp-designer-prop-side\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-px-4 ax-border-b ax-h-10\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer\n [widget]=\"service.selectedNode()!\"\n style=\"--ax-sys-size-base: 1.875rem\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\"\n class=\"ax-w-1/4\"\n >\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>\n", styles: ["axp-layout-designer .axp-designer-board{background-color:#fff;background-image:linear-gradient(45deg,#f0f0f0 25%,transparent 25%,transparent 75%,#f0f0f0 75%,#f0f0f0),linear-gradient(45deg,#f0f0f0 25%,#fff 25%,#fff 75%,#f0f0f0 75%,#f0f0f0);background-size:20px 20px;background-position:0 0,10px 10px;display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-surface),var(--tw-bg-opacity, 1));padding:.75rem}axp-layout-designer .axp-designer-board ax-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1))}axp-layout-designer .axp-designer-board.axp-state-design .ax-widget-outline{outline-style:dashed;outline-width:1px;outline-offset:2px;outline-color:#d1d5db}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host{cursor:pointer;position:relative}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:2px;outline-offset:1px;outline-color:rgba(var(--ax-sys-color-lightest-surface),1);outline-color:#60a5fa}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected.ax-widget-container{outline-offset:2px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover{outline-style:dashed;outline-width:2px;outline-offset:2px;outline-color:#d946ef}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.axp-state-selected{outline-color:#60a5fa}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.ax-widget-container{outline-offset:4px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2000;height:100%;width:100%}axp-layout-designer .axp-designer-board .axp-empty-space{display:flex;flex:1 1 0%;cursor:default;align-items:center;justify-content:center;background-color:rgba(var(--ax-sys-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-sys-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-sys-color-primary-300),50%) 0,rgba(var(--ax-sys-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px;height:100%}axp-layout-designer .axp-designer-board .axp-page-widget-header,axp-layout-designer .axp-designer-board .axp-page-widget-footer{filter:grayscale(100%);opacity:.5}axp-layout-designer .axp-designer-board .axp-page-widget-header:hover,axp-layout-designer .axp-designer-board .axp-page-widget-footer:hover{filter:grayscale(0);opacity:1}axp-layout-designer .axp-designer-board .axp-page-widget-header{margin-bottom:.5rem}axp-layout-designer .axp-designer-board .axp-page-widget-footer{margin-top:.5rem}axp-layout-designer .axp-designer-prop-side{width:20rem;border-inline-start-width:1px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}axp-designer-drawer-content ul.axp-designer-drawer-list{padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li{cursor:pointer;border-radius:.125rem;padding:.25rem .5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation-duration:.15s;animation-timing-function:cubic-bezier(.4,0,.2,1)}axp-designer-drawer-content ul.axp-designer-drawer-list li:hover:not(.axp-designer-drawer-list){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li.ax-state-selected{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content .axp-designer-drawer-empty{display:flex;align-items:center;justify-content:center;padding:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: AXPLayoutBuilderModule }, { kind: "component", type: AXPDesignerBoardComponent, selector: "axp-designer-board" }, { kind: "component", type: AXPWidgetPropertyViewerComponent, selector: "axp-widget-property-viewer", inputs: ["widget", "mode"], outputs: ["onChanged"] }, { kind: "component", type: AXPDesignerBreadcrumbsComponent, selector: "axp-designer-breadcrumbs" }, { kind: "component", type: AXPDesignerOutlineComponent, selector: "axp-designer-outline" }, { kind: "component", type: AXPDesignerHeaderMenuComponent, selector: "axp-designer-header-menu" }, { kind: "component", type: AXPDesignerHistoryComponent, selector: "axp-designer-history" }, { kind: "component", type: AXPDesignerDataSourcesComponent, selector: "axp-designer-data-sources" }, { kind: "component", type: AXPDesignerPagesComponent, selector: "axp-designer-pages" }, { kind: "component", type: AXPDesignerViewSizeToolbarComponent, selector: "axp-designer-view-sizes", inputs: ["size"], outputs: ["sizeChange"] }, { kind: "ngmodule", type: AXTabsModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i2.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i2.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDrawerModule }, { kind: "component", type: i3$1.AXDrawerComponent, selector: "ax-drawer", inputs: ["location", "showBackdrop", "mode", "closeOthers", "collapsed"], outputs: ["locationChange", "modeChange", "collapsedChange"] }, { kind: "component", type: i3$1.AXDrawerContainerComponent, selector: "ax-drawer-container" }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: AXMenuModule }, { kind: "ngmodule", type: AXButtonGroupModule }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "ngmodule", type: AXDropdownButtonModule }, { kind: "component", type: i5.AXDropdownButtonComponent, selector: "ax-dropdown-button", inputs: ["disabled", "size", "color", "look", "text", "type", "mode"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "lookChange", "colorChange", "disabledChange"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2228
2228
|
}
|
|
2229
2229
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: AXPLayoutDesignerComponent, decorators: [{
|
|
2230
2230
|
type: Component,
|
|
@@ -2248,7 +2248,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
|
|
|
2248
2248
|
AXButtonGroupModule,
|
|
2249
2249
|
AXDropdownModule,
|
|
2250
2250
|
AXDropdownButtonModule,
|
|
2251
|
-
], providers: [AXPDesignerService], template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative ax-overflow-hidden\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-lightest ax-border-e ax-sm ax-flex ax-flex-col ax-items-center ax-dark\">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo.
|
|
2251
|
+
], providers: [AXPDesignerService], template: "<ax-drawer-container class=\"ax-h-full ax-w-full ax-flex ax-relative ax-overflow-hidden\">\n <ax-content class=\"ax-contents\">\n <!-- Toolbar Side -->\n <div class=\"ax-min-w-10 ax-bg-lightest ax-border-e ax-sm ax-flex ax-flex-col ax-items-center ax-dark\">\n <div class=\"ax-min-w-10 ax-h-10 ax-flex ax-items-center ax-justify-center ax-border-b\">\n <img src=\"assets/logos/logo-light.svg\" class=\"ax-w-6\" />\n </div>\n <div class=\"ax-py-1\"></div>\n <div class=\"ax-flex ax-flex-col ax-gap-2\">\n <!-- <ax-button look=\"blank\">\n <ax-icon class=\"fa-solid fa-puzzle ax-text-sm\"> </ax-icon>\n </ax-button> -->\n <ax-button look=\"blank\" (onClick)=\"pages.toggle()\" title=\"Pages\">\n <ax-icon class=\"fa-solid fa-page ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"datasources.toggle()\" title=\"Data Sources\">\n <ax-icon class=\"fa-solid fa-database ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"outline.toggle()\" title=\"Outline\">\n <ax-icon class=\"fa-solid fa-list-tree ax-text-sm\"> </ax-icon>\n </ax-button>\n <ax-button look=\"blank\" (onClick)=\"history.toggle()\" title=\"History\">\n <ax-icon class=\"fa-solid fa-clock-rotate-left ax-text-sm\"> </ax-icon>\n </ax-button>\n <!-- <ax-button look=\"blank\" title=\"Timeline\">\n <ax-icon class=\"fa-solid fa-diagram-sankey ax-text-sm\"> </ax-icon>\n </ax-button> -->\n </div>\n </div>\n <!-- Main Side -->\n <div class=\"ax-col-span-10 ax-flex ax-flex-col ax-flex-1\">\n <!-- Header Toolbar -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-b ax-flex ax-justify-between ax-px-2 ax-dark\">\n <div class=\"ax-flex ax-flex-1 ax-items-center ax-text-white ax-justify-start\">\n <axp-designer-header-menu></axp-designer-header-menu>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-center\">\n <axp-designer-view-sizes [(size)]=\"service.size\"></axp-designer-view-sizes>\n </div>\n <div class=\"ax-flex ax-flex-1 ax-flex-row ax-gap-2 ax-sm ax-items-center ax-justify-end\">\n <ax-dropdown-button\n mode=\"split\"\n look=\"solid\"\n text=\"Preview\"\n class=\"ax-sm\"\n (onClick)=\"service.openPreviewDialog()\"\n >\n <ax-button-item-list>\n <ax-button-item text=\"Open in new window\" (onClick)=\"service.openPreviewWindow()\">\n <ax-prefix>\n <ax-icon icon=\"fa-regular fa-window-restore\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n </ax-button-item-list>\n </ax-dropdown-button>\n </div>\n </div>\n <!-- Board -->\n <ax-drawer-container class=\"ax-w-full ax-flex-1\">\n <!-- Pages -->\n <ax-drawer #pages location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-pages></axp-designer-pages>\n </ax-content>\n </ax-drawer>\n <!-- Datasources -->\n <ax-drawer #datasources location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-data-sources></axp-designer-data-sources>\n </ax-content>\n </ax-drawer>\n <!-- Outline Pnael -->\n <ax-drawer #outline location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-outline></axp-designer-outline>\n </ax-content>\n </ax-drawer>\n <!-- History Pnael -->\n <ax-drawer #history location=\"start\" mode=\"push\" class=\"ax-dark ax-bg-lightest\">\n <ax-content>\n <axp-designer-history></axp-designer-history>\n </ax-content>\n </ax-drawer>\n <!-- Content of board -->\n <ax-content class=\"ax-light ax-bg-lighter ax-flex ax-justify-center ax-p-10\">\n <axp-designer-board class=\"ax-rounded-lg ax-bg-lightest ax-shadow-md\"> </axp-designer-board>\n </ax-content>\n </ax-drawer-container>\n <!-- Footer -->\n <div class=\"ax-h-10 ax-bg-lightest ax-border-t ax-flex ax-items-center ax-dark\">\n <axp-designer-breadcrumbs class=\"ax-border-default ax-border-t ax-p-2 ax-font-normal\">\n </axp-designer-breadcrumbs>\n </div>\n </div>\n </ax-content>\n <!-- Property Side -->\n <ax-drawer class=\"ax-dark axp-designer-prop-side\" location=\"end\" mode=\"push\" [collapsed]=\"false\" #pd>\n <ax-content>\n <div class=\"ax-flex ax-flex-row ax-w-full ax-justify-between ax-text-white ax-px-4 ax-border-b ax-h-10\">\n <div class=\"ax-flex ax-flex-row ax-gap-2 ax-items-center\">\n <i [ngClass]=\"nodeConfig()?.icon\"></i>\n <span class=\"ax-font-semibold\">{{ nodeConfig()?.title }}</span>\n </div>\n </div>\n <axp-widget-property-viewer\n [widget]=\"service.selectedNode()!\"\n style=\"--ax-sys-size-base: 1.875rem\"\n (onChanged)=\"service.update({ values: $event.values, mode: $event.mode })\"\n class=\"ax-w-1/4\"\n >\n </axp-widget-property-viewer>\n </ax-content>\n </ax-drawer>\n</ax-drawer-container>\n", styles: ["axp-layout-designer .axp-designer-board{background-color:#fff;background-image:linear-gradient(45deg,#f0f0f0 25%,transparent 25%,transparent 75%,#f0f0f0 75%,#f0f0f0),linear-gradient(45deg,#f0f0f0 25%,#fff 25%,#fff 75%,#f0f0f0 75%,#f0f0f0);background-size:20px 20px;background-position:0 0,10px 10px;display:block;height:100%;width:100%;overflow:auto;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-surface),var(--tw-bg-opacity, 1));padding:.75rem}axp-layout-designer .axp-designer-board ax-drawer{--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1))}axp-layout-designer .axp-designer-board.axp-state-design .ax-widget-outline{outline-style:dashed;outline-width:1px;outline-offset:2px;outline-color:#d1d5db}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host{cursor:pointer;position:relative}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected{outline-style:solid;outline-width:2px;outline-offset:1px;outline-color:rgba(var(--ax-sys-color-lightest-surface),1);outline-color:#60a5fa}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-selected.ax-widget-container{outline-offset:2px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover{outline-style:dashed;outline-width:2px;outline-offset:2px;outline-color:#d946ef}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.axp-state-selected{outline-color:#60a5fa}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host.axp-state-hover.ax-widget-container{outline-offset:4px}axp-layout-designer .axp-designer-board.axp-state-design .axp-widget-host .axp-widget-overlay{position:absolute;left:0;top:0;right:0;bottom:0;z-index:2000;height:100%;width:100%}axp-layout-designer .axp-designer-board .axp-empty-space{display:flex;flex:1 1 0%;cursor:default;align-items:center;justify-content:center;background-color:rgba(var(--ax-sys-color-primary-300),10%);background-image:linear-gradient(135deg,rgba(var(--ax-sys-color-primary-300),50%) 10%,transparent 0,transparent 50%,rgba(var(--ax-sys-color-primary-300),50%) 0,rgba(var(--ax-sys-color-primary-300),50%) 60%,transparent 0,transparent);background-size:7.5px 7.5px;height:100%}axp-layout-designer .axp-designer-board .axp-page-widget-header,axp-layout-designer .axp-designer-board .axp-page-widget-footer{filter:grayscale(100%);opacity:.5}axp-layout-designer .axp-designer-board .axp-page-widget-header:hover,axp-layout-designer .axp-designer-board .axp-page-widget-footer:hover{filter:grayscale(0);opacity:1}axp-layout-designer .axp-designer-board .axp-page-widget-header{margin-bottom:.5rem}axp-layout-designer .axp-designer-board .axp-page-widget-footer{margin-top:.5rem}axp-layout-designer .axp-designer-prop-side{width:20rem;border-inline-start-width:1px;--tw-bg-opacity: 1;background-color:rgba(var(--ax-sys-color-lightest-surface),var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgba(var(--ax-sys-color-on-lightest-surface),var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}axp-designer-drawer-content ul.axp-designer-drawer-list{padding:.25rem;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li{cursor:pointer;border-radius:.125rem;padding:.25rem .5rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1);animation-duration:.15s;animation-timing-function:cubic-bezier(.4,0,.2,1)}axp-designer-drawer-content ul.axp-designer-drawer-list li:hover:not(.axp-designer-drawer-list){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content ul.axp-designer-drawer-list li.ax-state-selected{--tw-bg-opacity: 1;background-color:rgb(64 64 64 / var(--tw-bg-opacity, 1))}axp-designer-drawer-content .axp-designer-drawer-empty{display:flex;align-items:center;justify-content:center;padding:1rem;--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}\n"] }]
|
|
2252
2252
|
}], ctorParameters: () => [], propDecorators: { propertyViewer: [{
|
|
2253
2253
|
type: ViewChild,
|
|
2254
2254
|
args: [AXPWidgetPropertyViewerComponent, { static: true }]
|