cloud-ide-layout 1.0.47 → 1.0.50

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 (20) hide show
  1. package/fesm2022/{cloud-ide-layout-cloud-ide-layout-C5X2le0W.mjs → cloud-ide-layout-cloud-ide-layout-BT6krb0-.mjs} +535 -561
  2. package/fesm2022/cloud-ide-layout-cloud-ide-layout-BT6krb0-.mjs.map +1 -0
  3. package/fesm2022/cloud-ide-layout-drawer-theme.component-DQxKNHV2.mjs +297 -0
  4. package/fesm2022/cloud-ide-layout-drawer-theme.component-DQxKNHV2.mjs.map +1 -0
  5. package/fesm2022/{cloud-ide-layout-floating-entity-selection.component-DTeaVXp3.mjs → cloud-ide-layout-floating-entity-selection.component-Bk1F1fD4.mjs} +64 -66
  6. package/fesm2022/cloud-ide-layout-floating-entity-selection.component-Bk1F1fD4.mjs.map +1 -0
  7. package/fesm2022/cloud-ide-layout-home-wrapper.component-nOJs_t7D.mjs +202 -0
  8. package/fesm2022/cloud-ide-layout-home-wrapper.component-nOJs_t7D.mjs.map +1 -0
  9. package/fesm2022/cloud-ide-layout-sidedrawer-notes.component-CpXybU-I.mjs +256 -0
  10. package/fesm2022/cloud-ide-layout-sidedrawer-notes.component-CpXybU-I.mjs.map +1 -0
  11. package/fesm2022/cloud-ide-layout.mjs +1 -1
  12. package/package.json +1 -1
  13. package/fesm2022/cloud-ide-layout-cloud-ide-layout-C5X2le0W.mjs.map +0 -1
  14. package/fesm2022/cloud-ide-layout-drawer-theme.component-CBi6mgCC.mjs +0 -297
  15. package/fesm2022/cloud-ide-layout-drawer-theme.component-CBi6mgCC.mjs.map +0 -1
  16. package/fesm2022/cloud-ide-layout-floating-entity-selection.component-DTeaVXp3.mjs.map +0 -1
  17. package/fesm2022/cloud-ide-layout-home-wrapper.component-Dq9wbuoU.mjs +0 -202
  18. package/fesm2022/cloud-ide-layout-home-wrapper.component-Dq9wbuoU.mjs.map +0 -1
  19. package/fesm2022/cloud-ide-layout-sidedrawer-notes.component-DB4-p0ao.mjs +0 -256
  20. package/fesm2022/cloud-ide-layout-sidedrawer-notes.component-DB4-p0ao.mjs.map +0 -1
@@ -0,0 +1,297 @@
1
+ import { NgFor, NgIf, NgClass } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, PLATFORM_ID, Inject, Component } from '@angular/core';
4
+ import * as i2 from '@angular/forms';
5
+ import { FormsModule } from '@angular/forms';
6
+ import { CideSelectComponent, CideEleButtonComponent } from 'cloud-ide-element';
7
+ import { A as AppStateHelperService, s as setCSSVariable, d as CideLytThemeService } from './cloud-ide-layout-cloud-ide-layout-BT6krb0-.mjs';
8
+ import _, { cloneDeep, isEqual } from 'lodash';
9
+
10
+ class CideLytDrawerThemeComponent {
11
+ themeService;
12
+ platformId;
13
+ appState = inject(AppStateHelperService);
14
+ // Preset themes
15
+ presetThemes = [];
16
+ selectedTheme = '';
17
+ isLoadingThemes = false;
18
+ themeLoadError = '';
19
+ mergedTheme = {};
20
+ isRTL = false;
21
+ originalThemeGroupValues = [];
22
+ originalApiThemeValues = {}; // Store original API values
23
+ themeGroups = [
24
+ {
25
+ label: 'Brand Colors',
26
+ items: [
27
+ { label: 'Primary', varName: '--cide-theme-color-brand-primary', value: '#4f46e5', type: 'text' },
28
+ { label: 'Accent', varName: '--cide-theme-color-brand-accent', value: '#4338ca', type: 'text' },
29
+ { label: 'Separator', varName: '--cide-theme-color-brand-separator', value: '#e5e7eb', type: 'text' }
30
+ ]
31
+ },
32
+ {
33
+ label: 'Text Colors',
34
+ items: [
35
+ { label: 'Body Text', varName: '--cide-theme-color-text-body', value: '#374151', type: 'text' },
36
+ { label: 'Heading Text', varName: '--cide-theme-color-text-heading', value: '#111827', type: 'text' },
37
+ { label: 'Link Text', varName: '--cide-theme-color-text-link', value: '#3b82f6', type: 'text' },
38
+ { label: 'Muted Text', varName: '--cide-theme-color-text-muted', value: '#6b7280', type: 'text' }
39
+ ]
40
+ },
41
+ {
42
+ label: 'Background Colors',
43
+ items: [
44
+ { label: 'Body Background', varName: '--cide-theme-color-background-body', value: '#ffffff', type: 'text' }
45
+ ]
46
+ },
47
+ {
48
+ label: 'Layout Dimensions',
49
+ items: [
50
+ { label: 'Stack Wrapper Width', varName: '--cide-lyt-stack-wrapper-width', value: '60', type: 'number', min: 20, max: 120 }
51
+ ]
52
+ },
53
+ {
54
+ label: 'Font Sizes',
55
+ items: [
56
+ { label: 'XXXL Font Size', varName: '--cide-theme-font-size-xxxl', value: '3.052', type: 'number', min: 1, max: 10 },
57
+ { label: 'XXL Font Size', varName: '--cide-theme-font-size-xxl', value: '2.441', type: 'number', min: 1, max: 10 },
58
+ { label: 'XL Font Size', varName: '--cide-theme-font-size-xl', value: '1.953', type: 'number', min: 1, max: 10 },
59
+ { label: 'LG Font Size', varName: '--cide-theme-font-size-lg', value: '1.563', type: 'number', min: 1, max: 10 },
60
+ { label: 'MD Font Size', varName: '--cide-theme-font-size-md', value: '1.25', type: 'number', min: 1, max: 10 },
61
+ { label: 'Paragraph Font Size', varName: '--cide-theme-font-size-p', value: '1', type: 'number', min: 0.5, max: 5 },
62
+ { label: 'SM Font Size', varName: '--cide-theme-font-size-sm', value: '0.9', type: 'number', min: 0.5, max: 5 },
63
+ { label: 'XS Font Size', varName: '--cide-theme-font-size-xs', value: '0.8', type: 'number', min: 0.5, max: 5 }
64
+ ]
65
+ },
66
+ {
67
+ label: 'Line Heights',
68
+ items: [
69
+ { label: 'Body Line Height', varName: '--cide-theme-line-height-body', value: '1.6', type: 'number', min: 1, max: 3 },
70
+ { label: 'Heading Line Height', varName: '--cide-theme-line-height-heading', value: '1.2', type: 'number', min: 1, max: 3 }
71
+ ]
72
+ }
73
+ ];
74
+ constructor(themeService, platformId) {
75
+ this.themeService = themeService;
76
+ this.platformId = platformId;
77
+ }
78
+ ngOnInit() {
79
+ // Modern Angular v20 pattern: Use Signals directly
80
+ this.selectedTheme = this.themeService.selectedTheme();
81
+ // fetch the system themes list
82
+ this.isLoadingThemes = true;
83
+ this.themeService.fetchSystemThemesList().subscribe({
84
+ next: (res) => {
85
+ const themes = res?.data?.core_system_themes || [];
86
+ this.presetThemes = themes.map((theme) => ({
87
+ value: theme._id || '',
88
+ label: theme.syth_theme_name || theme.syth_theme_id || '',
89
+ theme
90
+ }));
91
+ this.isLoadingThemes = false;
92
+ // If user has no theme set, select and apply the default theme
93
+ if (!this.selectedTheme) {
94
+ const defaultTheme = this.presetThemes.find(t => t.theme.syth_is_default);
95
+ if (defaultTheme) {
96
+ this.selectedTheme = defaultTheme.value;
97
+ // Apply the default theme as CSS variables
98
+ if (defaultTheme.theme.syth_properties) {
99
+ Object.entries(defaultTheme.theme.syth_properties).forEach(([varName, value]) => {
100
+ this.updateVar(varName, value);
101
+ });
102
+ }
103
+ }
104
+ }
105
+ },
106
+ error: () => {
107
+ this.themeLoadError = 'Failed to load themes';
108
+ this.isLoadingThemes = false;
109
+ }
110
+ });
111
+ this.loadAndApplyUserTheme();
112
+ }
113
+ loadAndApplyUserTheme() {
114
+ this.themeService.loadTheme().subscribe({
115
+ next: (res) => {
116
+ const base = res?.data?.core_system_themes;
117
+ const org = res?.data?.core_system_organization_themes;
118
+ const user = res?.data?.core_system_theme_user_preferences;
119
+ // Start with base theme properties
120
+ let merged = { ...(base?.syth_properties || {}) };
121
+ // Override with org overrides
122
+ if (org?.syoth_overrides) {
123
+ merged = { ...merged, ...org.syoth_overrides };
124
+ }
125
+ // Override with user overrides
126
+ if (user?.syupth_overrides) {
127
+ merged = { ...merged, ...user.syupth_overrides };
128
+ }
129
+ this.mergedTheme = merged;
130
+ // Store original API values for reset functionality
131
+ this.originalApiThemeValues = { ...merged };
132
+ // Apply merged theme as CSS variables
133
+ Object.entries(this.mergedTheme).forEach(([varName, value]) => {
134
+ this.updateVar(varName, value);
135
+ });
136
+ for (const group of this.themeGroups) {
137
+ for (const item of group.items) {
138
+ const key = item.varName.replace(/-/g, '_');
139
+ item.value = merged[item.varName] || merged[key] || item.value;
140
+ if (key.includes('font_size') || key.includes('line_height')) {
141
+ item.value = parseFloat(item.value);
142
+ }
143
+ }
144
+ }
145
+ // Store a deep copy of the current values for reset
146
+ this.originalThemeGroupValues = cloneDeep(this.themeGroups);
147
+ },
148
+ error: () => {
149
+ // handle error if needed
150
+ }
151
+ });
152
+ }
153
+ // Update CSS variable in real time
154
+ updateVar(varName, value) {
155
+ // You can use either the utility function directly or the service method
156
+ setCSSVariable(varName, value, this.platformId);
157
+ // Alternative: this.themeService.updateCSSVariable(varName, value);
158
+ }
159
+ onThemeChange(event) {
160
+ this.selectedTheme = event.value;
161
+ const selected = this.presetThemes.find(t => t.value === this.selectedTheme);
162
+ if (selected && selected.theme && selected.theme.syth_properties) {
163
+ // here we will check the theme selected by organization is same if yes then overide also for user preferences
164
+ if (this.themeService.selectedTheme() === selected.theme._id) {
165
+ this.loadAndApplyUserTheme();
166
+ }
167
+ else {
168
+ // Store original API values for the selected theme
169
+ this.originalApiThemeValues = _.cloneDeep(selected.theme.syth_properties);
170
+ // Update all group values from the selected theme
171
+ for (const group of this.themeGroups) {
172
+ for (const item of group.items) {
173
+ const key = item.varName.replace(/-/g, '_');
174
+ item.value = selected.theme.syth_properties[item.varName] ||
175
+ selected.theme.syth_properties[key] ||
176
+ item.value;
177
+ this.updateVar(item.varName, item.value);
178
+ if (key.includes('font_size') || key.includes('line_height')) {
179
+ item.value = parseFloat(item.value);
180
+ }
181
+ }
182
+ }
183
+ // Store a deep copy of the current values for reset
184
+ this.originalThemeGroupValues = cloneDeep(this.themeGroups);
185
+ }
186
+ }
187
+ }
188
+ onReset() {
189
+ // Restore all values from the original API values
190
+ for (const group of this.themeGroups) {
191
+ for (const item of group.items) {
192
+ const key = item.varName.replace(/-/g, '_');
193
+ // Get the original API value
194
+ const originalValue = this.originalApiThemeValues[item.varName] ||
195
+ this.originalApiThemeValues[key] ||
196
+ item.value;
197
+ // Update the item value
198
+ item.value = originalValue;
199
+ // Apply the CSS variable
200
+ this.updateVar(item.varName, item.value);
201
+ if (key.includes('font_size') || key.includes('line_height')) {
202
+ item.value = parseFloat(item.value);
203
+ }
204
+ }
205
+ }
206
+ // Update the originalThemeGroupValues to reflect the reset state
207
+ this.originalThemeGroupValues = cloneDeep(this.themeGroups);
208
+ }
209
+ onSave() {
210
+ // Collect all current values
211
+ const themeVars = {};
212
+ for (const group of this.themeGroups) {
213
+ for (const item of group.items) {
214
+ themeVars[item.varName?.replaceAll('-', '_')] = item.value;
215
+ }
216
+ }
217
+ const systemThemePreferences = {
218
+ syupth_overrides: {
219
+ ...themeVars
220
+ },
221
+ syupth_system_theme_id_syth: this.selectedTheme, // LATER: need to upadate LATER
222
+ syupth_user_id_user: this.appState.currentUser()?._id || '', // LATER: need to get user id from user
223
+ syupth_entity_id_syen: this.appState.getActiveEntityId() || '', // LATER: need to get entity id from user
224
+ syth_theme_id: "" // need to upadate LATER
225
+ };
226
+ // TODO: Send themeVars to backend or emit event by designConfigRoutesUrl?.systemThemeUserPreferences
227
+ this.themeService.saveSystemThemeUserPreferences(systemThemePreferences).subscribe({
228
+ next: (res) => {
229
+ console.log('Theme saved:', res);
230
+ // Modern Angular v20 pattern: Update Signal through service method
231
+ // Note: The theme service should provide a method to update the selected theme
232
+ // For now, we'll just log the change since the service doesn't expose a setter
233
+ console.log('Theme selected:', this.selectedTheme);
234
+ },
235
+ error: (error) => {
236
+ console.error('Error saving theme:', error);
237
+ }
238
+ });
239
+ }
240
+ hasUnsavedChanges() {
241
+ // chec selected theme is different
242
+ if (this.themeService.selectedTheme() !== this.selectedTheme) {
243
+ return true;
244
+ }
245
+ // check the theme groups are different
246
+ return !isEqual(this.themeGroups, this.originalThemeGroupValues);
247
+ }
248
+ /**
249
+ * Check if current values differ from the original API values
250
+ * This is useful for determining if reset should be enabled
251
+ */
252
+ hasChangesFromOriginal() {
253
+ for (const group of this.themeGroups) {
254
+ for (const item of group.items) {
255
+ const key = item.varName.replace(/-/g, '_');
256
+ const originalValue = this.originalApiThemeValues[item.varName] ||
257
+ this.originalApiThemeValues[key];
258
+ if (originalValue !== undefined && item.value !== originalValue) {
259
+ return true;
260
+ }
261
+ }
262
+ }
263
+ return false;
264
+ }
265
+ onColorChange(event, color) {
266
+ const input = event.target;
267
+ color.value = input.value;
268
+ this.updateVar(color.varName, color.value);
269
+ }
270
+ onTypographyChange(event, setting) {
271
+ const input = event.target;
272
+ setting.value = input.value;
273
+ this.updateVar(setting.varName, setting.type === 'number' ? setting.value : setting.value);
274
+ }
275
+ onLayoutChange(event, setting) {
276
+ const input = event.target;
277
+ setting.value = input.value;
278
+ // For layout dimensions, append 'px' unit to the value
279
+ this.updateVar(setting.varName, setting.value + 'px');
280
+ }
281
+ onDirectionToggle(event) {
282
+ this.isRTL = event.target.checked;
283
+ document.documentElement.dir = this.isRTL ? 'rtl' : 'ltr';
284
+ }
285
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytDrawerThemeComponent, deps: [{ token: CideLytThemeService }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Component });
286
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CideLytDrawerThemeComponent, isStandalone: true, selector: "cide-lyt-drawer-theme", ngImport: i0, template: "<div class=\"tw-relative tw-h-full tw-bg-white tw-overflow-hidden tw-flex tw-flex-col\">\n <!-- STICKY HEADER SECTION -->\n <div class=\"tw-bg-white tw-sticky tw-top-0 tw-border-b tw-border-gray-200 tw-z-10 tw-flex-shrink-0\">\n <!-- DYNAMIC HEADING -->\n <div class=\"tw-flex tw-justify-between tw-items-center tw-p-2 tw-bg-white tw-border-b tw-border-gray-200\">\n <h6 class=\"tw-font-semibold tw-text-gray-800\">Preset Theme</h6>\n </div>\n </div>\n\n <!-- SCROLLABLE CONTENT AREA -->\n <div class=\"tw-flex-1 tw-overflow-y-auto tw-scroll-smooth tw-p-2 tw-flex tw-flex-col tw-gap-5 tw-text-sm tw-pb-3 theme-scroll-container\">\n <!-- Preset Theme -->\n <section>\n <cide-ele-select id=\"theme-selector\" [(ngModel)]=\"selectedTheme\" (change)=\"onThemeChange($event)\"\n [options]=\"presetThemes\" [size]=\"'sm'\"></cide-ele-select>\n </section>\n\n <!-- Direction Toggle -->\n <section>\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-2\">\n <h2 class=\"tw-text-md tw-font-semibold tw-text-gray-800\">Text Direction</h2>\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <span class=\"tw-text-xs tw-text-gray-500\">LTR</span>\n <label for=\"direction-toggle\" class=\"tw-relative tw-inline-block tw-w-9 tw-h-5\">\n <input type=\"checkbox\" id=\"direction-toggle\" class=\"tw-opacity-0 tw-w-0 tw-h-0\" [(ngModel)]=\"isRTL\"\n (change)=\"onDirectionToggle($event)\">\n <span\n class=\"tw-absolute tw-cursor-pointer tw-top-0 tw-left-0 tw-right-0 tw-bottom-0 tw-bg-gray-300 tw-rounded-full tw-transition-colors checked:tw-bg-blue-500 before:tw-absolute before:tw-content-[''] before:tw-h-4 before:tw-w-4 before:tw-left-0.5 before:tw-bottom-0.5 before:tw-bg-white before:tw-rounded-full before:tw-transition-transform checked:before:tw-translate-x-4\"></span>\n </label>\n <span class=\"tw-text-xs tw-text-gray-500\">RTL</span>\n </div>\n </div>\n </section>\n\n <!-- Theme Property Groups (Brand, Text, Background, Font Sizes, Line Heights) -->\n <section *ngFor=\"let group of themeGroups\" class=\"theme-section\">\n <h2 class=\"tw-text-md tw-font-semibold tw-mb-2 tw-text-gray-800\">{{ group.label }}</h2>\n <div class=\"tw-grid tw-grid-cols-2 tw-gap-2 tw-gap-x-4\">\n <div *ngFor=\"let item of group.items\"\n class=\"tw-flex tw-items-center tw-gap-2 tw-p-1 tw-rounded-lg tw-bg-gray-50\"\n [ngClass]=\"{'tw-flex-col tw-items-stretch': (group.label === 'Font Sizes' || group.label === 'Line Heights' || group.label === 'Layout Dimensions')}\">\n <!-- Font Sizes: label on top, input in middle, unit at bottom -->\n <ng-container *ngIf=\"group.label === 'Font Sizes'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"0.001\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">rem</span>\n </div>\n </ng-container>\n <!-- Line Heights: label on top, input and unit on same line -->\n <ng-container *ngIf=\"group.label === 'Line Heights'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"0.1\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">unitless</span>\n </div>\n </ng-container>\n <!-- Layout Dimensions: label on top, input in middle, px unit at bottom -->\n <ng-container *ngIf=\"group.label === 'Layout Dimensions'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"1\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onLayoutChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">px</span>\n </div>\n </ng-container>\n <!-- Other groups: keep previous layout -->\n <ng-container *ngIf=\"group.label !== 'Font Sizes' && group.label !== 'Line Heights' && group.label !== 'Layout Dimensions'\">\n <!-- Color input for color variables -->\n <ng-container *ngIf=\"item.varName.includes('color')\">\n <input [id]=\"item.varName\" [attr.data-variable]=\"item.varName\" type=\"color\" [(ngModel)]=\"item.value\"\n (input)=\"onColorChange($event, item)\"\n class=\"tw-appearance-none tw-border-2 tw-border-gray-200 tw-rounded tw-w-8 tw-h-8 tw-p-0 tw-bg-none tw-shadow-none tw-cursor-pointer tw-transition-colors focus:tw-border-blue-500 color-input\">\n </ng-container>\n <!-- Number input for line heights -->\n <ng-container\n *ngIf=\"!item.varName.includes('color') && item.type === 'number' && group.label !== 'Font Sizes'\">\n <input [id]=\"item.varName\" type=\"number\" [step]=\"item.varName.includes('line-height') ? 0.1 : 0.001\"\n [min]=\"item.min ?? null\" [max]=\"item.max ?? null\" [(ngModel)]=\"item.value\"\n (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-16 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\" *ngIf=\"!item.varName.includes('line-height')\">rem</span>\n </ng-container>\n <!-- Text input fallback (if needed) -->\n <ng-container *ngIf=\"!item.varName.includes('color') && item.type !== 'number'\">\n <input [id]=\"item.varName\" type=\"text\" [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-24 tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n </ng-container>\n <div class=\"tw-flex tw-flex-col tw-gap-0.5\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700\">{{ item.label }}</label>\n <span class=\"tw-text-xs tw-text-gray-500 tw-font-mono\">{{ item.value }}</span>\n </div>\n </ng-container>\n </div>\n </div>\n </section>\n </div>\n\n <!-- STICKY ACTION BUTTONS SECTION -->\n <div class=\"tw-bg-white tw-sticky tw-bottom-0 tw-border-t tw-border-gray-200 tw-z-10 tw-flex-shrink-0 tw-p-3 tw-shadow-lg sticky-action-buttons\">\n <div class=\"tw-flex tw-gap-2 tw-justify-end\">\n <button cideEleButton \n variant=\"outline\" \n size=\"sm\" \n (btnClick)=\"onReset()\" \n [disabled]=\"!hasChangesFromOriginal()\"\n class=\"tw-transition-all tw-duration-200 hover:tw-scale-105 action-button\">\n Reset to Original\n </button>\n <button cideEleButton \n variant=\"primary\" \n size=\"sm\" \n (btnClick)=\"onSave()\" \n [disabled]=\"!hasUnsavedChanges()\"\n class=\"tw-transition-all tw-duration-200 hover:tw-scale-105 action-button\">\n Save Changes\n </button>\n </div>\n </div>\n</div>", styles: [".theme-scroll-container{scroll-behavior:smooth;-webkit-overflow-scrolling:touch}.theme-scroll-container::-webkit-scrollbar{width:6px}.theme-scroll-container::-webkit-scrollbar-track{background:#f8fafc;border-radius:3px}.theme-scroll-container::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px;transition:background-color .2s ease}.theme-scroll-container::-webkit-scrollbar-thumb:hover{background:#94a3b8}.sticky-action-buttons{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background-color:#fffffff2;border-top:1px solid #e2e8f0;box-shadow:0 -4px 6px -1px #0000001a}.action-button{transition:all .2s ease-in-out}.action-button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 8px #00000026}.action-button:active:not(:disabled){transform:translateY(0)}.action-button:disabled{opacity:.5;cursor:not-allowed;transform:none!important;box-shadow:none!important}.theme-input:focus{transform:scale(1.02);transition:transform .2s ease-in-out}.color-input{transition:all .2s ease-in-out}.color-input:hover{transform:scale(1.1);box-shadow:0 4px 8px #0003}.theme-section{transition:all .3s ease-in-out}.theme-section:hover{background-color:#f8fafc;border-radius:8px;padding:8px;margin:-8px}@media (max-width: 640px){.sticky-action-buttons{padding:12px}.action-button{font-size:14px;padding:8px 12px}}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { kind: "directive", type: i2.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinValidator, selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", inputs: ["min"] }, { kind: "directive", type: i2.MaxValidator, selector: "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", inputs: ["max"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CideSelectComponent, selector: "cide-ele-select", inputs: ["label", "labelHide", "placeholder", "helperText", "errorText", "required", "disabled", "id", "ngModel", "size", "fill", "labelPlacement", "labelDir", "leadingIcon", "trailingIcon", "clearInput", "options", "multiple", "searchable", "showSearchInput", "loading", "valueKey", "labelKey"], outputs: ["ngModelChange", "change", "searchChange"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }] });
287
+ }
288
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytDrawerThemeComponent, decorators: [{
289
+ type: Component,
290
+ args: [{ selector: 'cide-lyt-drawer-theme', standalone: true, imports: [FormsModule, NgFor, NgIf, NgClass, CideSelectComponent, CideEleButtonComponent], template: "<div class=\"tw-relative tw-h-full tw-bg-white tw-overflow-hidden tw-flex tw-flex-col\">\n <!-- STICKY HEADER SECTION -->\n <div class=\"tw-bg-white tw-sticky tw-top-0 tw-border-b tw-border-gray-200 tw-z-10 tw-flex-shrink-0\">\n <!-- DYNAMIC HEADING -->\n <div class=\"tw-flex tw-justify-between tw-items-center tw-p-2 tw-bg-white tw-border-b tw-border-gray-200\">\n <h6 class=\"tw-font-semibold tw-text-gray-800\">Preset Theme</h6>\n </div>\n </div>\n\n <!-- SCROLLABLE CONTENT AREA -->\n <div class=\"tw-flex-1 tw-overflow-y-auto tw-scroll-smooth tw-p-2 tw-flex tw-flex-col tw-gap-5 tw-text-sm tw-pb-3 theme-scroll-container\">\n <!-- Preset Theme -->\n <section>\n <cide-ele-select id=\"theme-selector\" [(ngModel)]=\"selectedTheme\" (change)=\"onThemeChange($event)\"\n [options]=\"presetThemes\" [size]=\"'sm'\"></cide-ele-select>\n </section>\n\n <!-- Direction Toggle -->\n <section>\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-2\">\n <h2 class=\"tw-text-md tw-font-semibold tw-text-gray-800\">Text Direction</h2>\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <span class=\"tw-text-xs tw-text-gray-500\">LTR</span>\n <label for=\"direction-toggle\" class=\"tw-relative tw-inline-block tw-w-9 tw-h-5\">\n <input type=\"checkbox\" id=\"direction-toggle\" class=\"tw-opacity-0 tw-w-0 tw-h-0\" [(ngModel)]=\"isRTL\"\n (change)=\"onDirectionToggle($event)\">\n <span\n class=\"tw-absolute tw-cursor-pointer tw-top-0 tw-left-0 tw-right-0 tw-bottom-0 tw-bg-gray-300 tw-rounded-full tw-transition-colors checked:tw-bg-blue-500 before:tw-absolute before:tw-content-[''] before:tw-h-4 before:tw-w-4 before:tw-left-0.5 before:tw-bottom-0.5 before:tw-bg-white before:tw-rounded-full before:tw-transition-transform checked:before:tw-translate-x-4\"></span>\n </label>\n <span class=\"tw-text-xs tw-text-gray-500\">RTL</span>\n </div>\n </div>\n </section>\n\n <!-- Theme Property Groups (Brand, Text, Background, Font Sizes, Line Heights) -->\n <section *ngFor=\"let group of themeGroups\" class=\"theme-section\">\n <h2 class=\"tw-text-md tw-font-semibold tw-mb-2 tw-text-gray-800\">{{ group.label }}</h2>\n <div class=\"tw-grid tw-grid-cols-2 tw-gap-2 tw-gap-x-4\">\n <div *ngFor=\"let item of group.items\"\n class=\"tw-flex tw-items-center tw-gap-2 tw-p-1 tw-rounded-lg tw-bg-gray-50\"\n [ngClass]=\"{'tw-flex-col tw-items-stretch': (group.label === 'Font Sizes' || group.label === 'Line Heights' || group.label === 'Layout Dimensions')}\">\n <!-- Font Sizes: label on top, input in middle, unit at bottom -->\n <ng-container *ngIf=\"group.label === 'Font Sizes'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"0.001\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">rem</span>\n </div>\n </ng-container>\n <!-- Line Heights: label on top, input and unit on same line -->\n <ng-container *ngIf=\"group.label === 'Line Heights'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"0.1\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">unitless</span>\n </div>\n </ng-container>\n <!-- Layout Dimensions: label on top, input in middle, px unit at bottom -->\n <ng-container *ngIf=\"group.label === 'Layout Dimensions'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"1\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onLayoutChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">px</span>\n </div>\n </ng-container>\n <!-- Other groups: keep previous layout -->\n <ng-container *ngIf=\"group.label !== 'Font Sizes' && group.label !== 'Line Heights' && group.label !== 'Layout Dimensions'\">\n <!-- Color input for color variables -->\n <ng-container *ngIf=\"item.varName.includes('color')\">\n <input [id]=\"item.varName\" [attr.data-variable]=\"item.varName\" type=\"color\" [(ngModel)]=\"item.value\"\n (input)=\"onColorChange($event, item)\"\n class=\"tw-appearance-none tw-border-2 tw-border-gray-200 tw-rounded tw-w-8 tw-h-8 tw-p-0 tw-bg-none tw-shadow-none tw-cursor-pointer tw-transition-colors focus:tw-border-blue-500 color-input\">\n </ng-container>\n <!-- Number input for line heights -->\n <ng-container\n *ngIf=\"!item.varName.includes('color') && item.type === 'number' && group.label !== 'Font Sizes'\">\n <input [id]=\"item.varName\" type=\"number\" [step]=\"item.varName.includes('line-height') ? 0.1 : 0.001\"\n [min]=\"item.min ?? null\" [max]=\"item.max ?? null\" [(ngModel)]=\"item.value\"\n (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-16 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\" *ngIf=\"!item.varName.includes('line-height')\">rem</span>\n </ng-container>\n <!-- Text input fallback (if needed) -->\n <ng-container *ngIf=\"!item.varName.includes('color') && item.type !== 'number'\">\n <input [id]=\"item.varName\" type=\"text\" [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-24 tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n </ng-container>\n <div class=\"tw-flex tw-flex-col tw-gap-0.5\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700\">{{ item.label }}</label>\n <span class=\"tw-text-xs tw-text-gray-500 tw-font-mono\">{{ item.value }}</span>\n </div>\n </ng-container>\n </div>\n </div>\n </section>\n </div>\n\n <!-- STICKY ACTION BUTTONS SECTION -->\n <div class=\"tw-bg-white tw-sticky tw-bottom-0 tw-border-t tw-border-gray-200 tw-z-10 tw-flex-shrink-0 tw-p-3 tw-shadow-lg sticky-action-buttons\">\n <div class=\"tw-flex tw-gap-2 tw-justify-end\">\n <button cideEleButton \n variant=\"outline\" \n size=\"sm\" \n (btnClick)=\"onReset()\" \n [disabled]=\"!hasChangesFromOriginal()\"\n class=\"tw-transition-all tw-duration-200 hover:tw-scale-105 action-button\">\n Reset to Original\n </button>\n <button cideEleButton \n variant=\"primary\" \n size=\"sm\" \n (btnClick)=\"onSave()\" \n [disabled]=\"!hasUnsavedChanges()\"\n class=\"tw-transition-all tw-duration-200 hover:tw-scale-105 action-button\">\n Save Changes\n </button>\n </div>\n </div>\n</div>", styles: [".theme-scroll-container{scroll-behavior:smooth;-webkit-overflow-scrolling:touch}.theme-scroll-container::-webkit-scrollbar{width:6px}.theme-scroll-container::-webkit-scrollbar-track{background:#f8fafc;border-radius:3px}.theme-scroll-container::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:3px;transition:background-color .2s ease}.theme-scroll-container::-webkit-scrollbar-thumb:hover{background:#94a3b8}.sticky-action-buttons{-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);background-color:#fffffff2;border-top:1px solid #e2e8f0;box-shadow:0 -4px 6px -1px #0000001a}.action-button{transition:all .2s ease-in-out}.action-button:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 8px #00000026}.action-button:active:not(:disabled){transform:translateY(0)}.action-button:disabled{opacity:.5;cursor:not-allowed;transform:none!important;box-shadow:none!important}.theme-input:focus{transform:scale(1.02);transition:transform .2s ease-in-out}.color-input{transition:all .2s ease-in-out}.color-input:hover{transform:scale(1.1);box-shadow:0 4px 8px #0003}.theme-section{transition:all .3s ease-in-out}.theme-section:hover{background-color:#f8fafc;border-radius:8px;padding:8px;margin:-8px}@media (max-width: 640px){.sticky-action-buttons{padding:12px}.action-button{font-size:14px;padding:8px 12px}}\n"] }]
291
+ }], ctorParameters: () => [{ type: CideLytThemeService }, { type: undefined, decorators: [{
292
+ type: Inject,
293
+ args: [PLATFORM_ID]
294
+ }] }] });
295
+
296
+ export { CideLytDrawerThemeComponent };
297
+ //# sourceMappingURL=cloud-ide-layout-drawer-theme.component-DQxKNHV2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-ide-layout-drawer-theme.component-DQxKNHV2.mjs","sources":["../../../projects/cloud-ide-layout/src/lib/layout/sidedrawer/drawer-theme/drawer-theme.component.ts","../../../projects/cloud-ide-layout/src/lib/layout/sidedrawer/drawer-theme/drawer-theme.component.html"],"sourcesContent":["import { NgFor, NgIf } from '@angular/common';\nimport { NgClass } from '@angular/common';\nimport { Component, OnInit, PLATFORM_ID, Inject, inject } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { CideSelectComponent, SelectOption, CideEleButtonComponent } from 'cloud-ide-element';\nimport { CideLytThemeService, Theme, setCSSVariable } from '../../../services/theme/theme.service';\nimport type { MSystemThemeUserPreferencesRequest, SystemThemesListControllerRespoonse, SystemThemeUserPreferencesControllerRespoonse } from 'cloud-ide-lms-model';\nimport type { SystemThemeControllerRespoonse } from 'cloud-ide-lms-model';\nimport type { ICoreSyth, ICoreSyoth, ICoreSyupth } from 'cloud-ide-lms-model';\nimport { isEqual, cloneDeep } from 'lodash';\nimport _ from 'lodash';\nimport { AppStateHelperService } from '../../../services/app-state';\n\ninterface ThemeColor {\n label: string;\n varName: string;\n value: string;\n}\n\ninterface TypographySetting {\n label: string;\n varName: string;\n value: string;\n type: 'number' | 'text';\n min?: number;\n max?: number;\n}\n\ntype ThemeGroup = {\n label: string;\n items: Array<{\n label: string;\n varName: string;\n value: string;\n type: 'number' | 'text';\n min?: number;\n max?: number;\n }>;\n};\n\n@Component({\n selector: 'cide-lyt-drawer-theme',\n standalone: true,\n imports: [FormsModule, NgFor, NgIf, NgClass, CideSelectComponent, CideEleButtonComponent],\n templateUrl: './drawer-theme.component.html',\n styleUrl: './drawer-theme.component.scss'\n})\nexport class CideLytDrawerThemeComponent implements OnInit {\n private readonly appState = inject(AppStateHelperService);\n // Preset themes\n presetThemes: { value: string, label: string, theme: ICoreSyth }[] = [];\n selectedTheme = '';\n isLoadingThemes = false;\n themeLoadError = '';\n mergedTheme: { [key: string]: string } = {};\n isRTL = false;\n originalThemeGroupValues: ThemeGroup[] = [];\n originalApiThemeValues: { [key: string]: string } = {}; // Store original API values\n\n themeGroups: ThemeGroup[] = [\n {\n label: 'Brand Colors',\n items: [\n { label: 'Primary', varName: '--cide-theme-color-brand-primary', value: '#4f46e5', type: 'text' },\n { label: 'Accent', varName: '--cide-theme-color-brand-accent', value: '#4338ca', type: 'text' },\n { label: 'Separator', varName: '--cide-theme-color-brand-separator', value: '#e5e7eb', type: 'text' }\n ]\n },\n {\n label: 'Text Colors',\n items: [\n { label: 'Body Text', varName: '--cide-theme-color-text-body', value: '#374151', type: 'text' },\n { label: 'Heading Text', varName: '--cide-theme-color-text-heading', value: '#111827', type: 'text' },\n { label: 'Link Text', varName: '--cide-theme-color-text-link', value: '#3b82f6', type: 'text' },\n { label: 'Muted Text', varName: '--cide-theme-color-text-muted', value: '#6b7280', type: 'text' }\n ]\n },\n {\n label: 'Background Colors',\n items: [\n { label: 'Body Background', varName: '--cide-theme-color-background-body', value: '#ffffff', type: 'text' }\n ]\n },\n {\n label: 'Layout Dimensions',\n items: [\n { label: 'Stack Wrapper Width', varName: '--cide-lyt-stack-wrapper-width', value: '60', type: 'number', min: 20, max: 120 }\n ]\n },\n {\n label: 'Font Sizes',\n items: [\n { label: 'XXXL Font Size', varName: '--cide-theme-font-size-xxxl', value: '3.052', type: 'number', min: 1, max: 10 },\n { label: 'XXL Font Size', varName: '--cide-theme-font-size-xxl', value: '2.441', type: 'number', min: 1, max: 10 },\n { label: 'XL Font Size', varName: '--cide-theme-font-size-xl', value: '1.953', type: 'number', min: 1, max: 10 },\n { label: 'LG Font Size', varName: '--cide-theme-font-size-lg', value: '1.563', type: 'number', min: 1, max: 10 },\n { label: 'MD Font Size', varName: '--cide-theme-font-size-md', value: '1.25', type: 'number', min: 1, max: 10 },\n { label: 'Paragraph Font Size', varName: '--cide-theme-font-size-p', value: '1', type: 'number', min: 0.5, max: 5 },\n { label: 'SM Font Size', varName: '--cide-theme-font-size-sm', value: '0.9', type: 'number', min: 0.5, max: 5 },\n { label: 'XS Font Size', varName: '--cide-theme-font-size-xs', value: '0.8', type: 'number', min: 0.5, max: 5 }\n ]\n },\n {\n label: 'Line Heights',\n items: [\n { label: 'Body Line Height', varName: '--cide-theme-line-height-body', value: '1.6', type: 'number', min: 1, max: 3 },\n { label: 'Heading Line Height', varName: '--cide-theme-line-height-heading', value: '1.2', type: 'number', min: 1, max: 3 }\n ]\n }\n ];\n\n constructor(\n private themeService: CideLytThemeService,\n @Inject(PLATFORM_ID) private platformId: object\n ) { }\n\n ngOnInit(): void {\n // Modern Angular v20 pattern: Use Signals directly\n this.selectedTheme = this.themeService.selectedTheme();\n\n // fetch the system themes list\n this.isLoadingThemes = true;\n this.themeService.fetchSystemThemesList().subscribe({\n next: (res: SystemThemesListControllerRespoonse) => {\n const themes: ICoreSyth[] = res?.data?.core_system_themes || [];\n this.presetThemes = themes.map((theme: ICoreSyth) => ({\n value: theme._id || '',\n label: theme.syth_theme_name || theme.syth_theme_id || '',\n theme\n }));\n this.isLoadingThemes = false;\n // If user has no theme set, select and apply the default theme\n if (!this.selectedTheme) {\n const defaultTheme = this.presetThemes.find(t => t.theme.syth_is_default);\n if (defaultTheme) {\n this.selectedTheme = defaultTheme.value;\n // Apply the default theme as CSS variables\n if (defaultTheme.theme.syth_properties) {\n Object.entries(defaultTheme.theme.syth_properties).forEach(([varName, value]) => {\n this.updateVar(varName, value as string);\n });\n }\n }\n }\n },\n error: () => {\n this.themeLoadError = 'Failed to load themes';\n this.isLoadingThemes = false;\n }\n });\n this.loadAndApplyUserTheme();\n }\n\n loadAndApplyUserTheme(): void {\n this.themeService.loadTheme().subscribe({\n next: (res: SystemThemeControllerRespoonse) => {\n const base: ICoreSyth | undefined = res?.data?.core_system_themes;\n const org: ICoreSyoth | undefined = res?.data?.core_system_organization_themes;\n const user: ICoreSyupth | undefined = res?.data?.core_system_theme_user_preferences;\n // Start with base theme properties\n let merged = { ...(base?.syth_properties || {}) };\n // Override with org overrides\n if (org?.syoth_overrides) {\n merged = { ...merged, ...org.syoth_overrides };\n }\n // Override with user overrides\n if (user?.syupth_overrides) {\n merged = { ...merged, ...user.syupth_overrides };\n }\n this.mergedTheme = merged;\n\n // Store original API values for reset functionality\n this.originalApiThemeValues = { ...merged };\n\n // Apply merged theme as CSS variables\n Object.entries(this.mergedTheme).forEach(([varName, value]) => {\n this.updateVar(varName, value as string);\n });\n\n for (const group of this.themeGroups) {\n for (const item of group.items) {\n const key = item.varName.replace(/-/g, '_');\n item.value = merged[item.varName] || merged[key] || item.value;\n\n if (key.includes('font_size') || key.includes('line_height')) {\n item.value = parseFloat(item.value) as unknown as string;\n }\n }\n }\n // Store a deep copy of the current values for reset\n this.originalThemeGroupValues = cloneDeep(this.themeGroups);\n },\n error: () => {\n // handle error if needed\n }\n });\n }\n\n // Update CSS variable in real time\n updateVar(varName: string, value: string) {\n // You can use either the utility function directly or the service method\n setCSSVariable(varName, value, this.platformId);\n // Alternative: this.themeService.updateCSSVariable(varName, value);\n }\n\n onThemeChange(event: SelectOption) {\n this.selectedTheme = event.value as string;\n const selected = this.presetThemes.find(t => t.value === this.selectedTheme);\n if (selected && selected.theme && selected.theme.syth_properties) {\n // here we will check the theme selected by organization is same if yes then overide also for user preferences\n if (this.themeService.selectedTheme() === selected.theme._id) {\n this.loadAndApplyUserTheme();\n } else {\n // Store original API values for the selected theme\n this.originalApiThemeValues = _.cloneDeep(selected.theme.syth_properties);\n\n // Update all group values from the selected theme\n for (const group of this.themeGroups) {\n for (const item of group.items) {\n const key = item.varName.replace(/-/g, '_');\n item.value = selected.theme.syth_properties[item.varName] ||\n selected.theme.syth_properties[key] ||\n item.value;\n\n this.updateVar(item.varName, item.value);\n\n if (key.includes('font_size') || key.includes('line_height')) {\n item.value = parseFloat(item.value) as unknown as string;\n }\n }\n }\n // Store a deep copy of the current values for reset\n this.originalThemeGroupValues = cloneDeep(this.themeGroups);\n }\n }\n }\n\n onReset() {\n // Restore all values from the original API values\n for (const group of this.themeGroups) {\n for (const item of group.items) {\n const key = item.varName.replace(/-/g, '_');\n // Get the original API value\n const originalValue = this.originalApiThemeValues[item.varName] ||\n this.originalApiThemeValues[key] ||\n item.value;\n\n // Update the item value\n item.value = originalValue;\n\n // Apply the CSS variable\n this.updateVar(item.varName, item.value);\n\n if (key.includes('font_size') || key.includes('line_height')) {\n item.value = parseFloat(item.value) as unknown as string;\n }\n }\n }\n\n // Update the originalThemeGroupValues to reflect the reset state\n this.originalThemeGroupValues = cloneDeep(this.themeGroups);\n }\n\n onSave() {\n // Collect all current values\n const themeVars: Theme = {\n\n };\n for (const group of this.themeGroups) {\n for (const item of group.items) {\n themeVars[item.varName?.replaceAll('-', '_')] = item.value;\n }\n }\n\n const systemThemePreferences: MSystemThemeUserPreferencesRequest = {\n syupth_overrides: {\n ...themeVars\n },\n syupth_system_theme_id_syth: this.selectedTheme, // LATER: need to upadate LATER\n syupth_user_id_user: this.appState.currentUser()?._id || '', // LATER: need to get user id from user\n syupth_entity_id_syen: this.appState.getActiveEntityId() || '', // LATER: need to get entity id from user\n syth_theme_id: \"\" // need to upadate LATER\n };\n\n // TODO: Send themeVars to backend or emit event by designConfigRoutesUrl?.systemThemeUserPreferences\n this.themeService.saveSystemThemeUserPreferences(systemThemePreferences).subscribe({\n next: (res: SystemThemeUserPreferencesControllerRespoonse) => {\n console.log('Theme saved:', res);\n // Modern Angular v20 pattern: Update Signal through service method\n // Note: The theme service should provide a method to update the selected theme\n // For now, we'll just log the change since the service doesn't expose a setter\n console.log('Theme selected:', this.selectedTheme);\n },\n error: (error) => {\n console.error('Error saving theme:', error);\n }\n });\n }\n\n hasUnsavedChanges(): boolean {\n // chec selected theme is different\n if (this.themeService.selectedTheme() !== this.selectedTheme) {\n return true;\n }\n // check the theme groups are different\n return !isEqual(this.themeGroups, this.originalThemeGroupValues);\n }\n\n /**\n * Check if current values differ from the original API values\n * This is useful for determining if reset should be enabled\n */\n hasChangesFromOriginal(): boolean {\n for (const group of this.themeGroups) {\n for (const item of group.items) {\n const key = item.varName.replace(/-/g, '_');\n const originalValue = this.originalApiThemeValues[item.varName] ||\n this.originalApiThemeValues[key];\n\n if (originalValue !== undefined && item.value !== originalValue) {\n return true;\n }\n }\n }\n return false;\n }\n\n onColorChange(event: Event, color: ThemeColor) {\n const input = event.target as HTMLInputElement;\n color.value = input.value;\n this.updateVar(color.varName, color.value);\n }\n\n onTypographyChange(event: Event, setting: TypographySetting) {\n const input = event.target as HTMLInputElement;\n setting.value = input.value;\n this.updateVar(setting.varName, setting.type === 'number' ? setting.value : setting.value);\n }\n\n onLayoutChange(event: Event, setting: TypographySetting) {\n const input = event.target as HTMLInputElement;\n setting.value = input.value;\n // For layout dimensions, append 'px' unit to the value\n this.updateVar(setting.varName, setting.value + 'px');\n }\n\n onDirectionToggle(event: Event) {\n this.isRTL = (event.target as HTMLInputElement).checked;\n document.documentElement.dir = this.isRTL ? 'rtl' : 'ltr';\n }\n}\n","<div class=\"tw-relative tw-h-full tw-bg-white tw-overflow-hidden tw-flex tw-flex-col\">\n <!-- STICKY HEADER SECTION -->\n <div class=\"tw-bg-white tw-sticky tw-top-0 tw-border-b tw-border-gray-200 tw-z-10 tw-flex-shrink-0\">\n <!-- DYNAMIC HEADING -->\n <div class=\"tw-flex tw-justify-between tw-items-center tw-p-2 tw-bg-white tw-border-b tw-border-gray-200\">\n <h6 class=\"tw-font-semibold tw-text-gray-800\">Preset Theme</h6>\n </div>\n </div>\n\n <!-- SCROLLABLE CONTENT AREA -->\n <div class=\"tw-flex-1 tw-overflow-y-auto tw-scroll-smooth tw-p-2 tw-flex tw-flex-col tw-gap-5 tw-text-sm tw-pb-3 theme-scroll-container\">\n <!-- Preset Theme -->\n <section>\n <cide-ele-select id=\"theme-selector\" [(ngModel)]=\"selectedTheme\" (change)=\"onThemeChange($event)\"\n [options]=\"presetThemes\" [size]=\"'sm'\"></cide-ele-select>\n </section>\n\n <!-- Direction Toggle -->\n <section>\n <div class=\"tw-flex tw-justify-between tw-items-center tw-mb-2\">\n <h2 class=\"tw-text-md tw-font-semibold tw-text-gray-800\">Text Direction</h2>\n <div class=\"tw-flex tw-items-center tw-gap-1\">\n <span class=\"tw-text-xs tw-text-gray-500\">LTR</span>\n <label for=\"direction-toggle\" class=\"tw-relative tw-inline-block tw-w-9 tw-h-5\">\n <input type=\"checkbox\" id=\"direction-toggle\" class=\"tw-opacity-0 tw-w-0 tw-h-0\" [(ngModel)]=\"isRTL\"\n (change)=\"onDirectionToggle($event)\">\n <span\n class=\"tw-absolute tw-cursor-pointer tw-top-0 tw-left-0 tw-right-0 tw-bottom-0 tw-bg-gray-300 tw-rounded-full tw-transition-colors checked:tw-bg-blue-500 before:tw-absolute before:tw-content-[''] before:tw-h-4 before:tw-w-4 before:tw-left-0.5 before:tw-bottom-0.5 before:tw-bg-white before:tw-rounded-full before:tw-transition-transform checked:before:tw-translate-x-4\"></span>\n </label>\n <span class=\"tw-text-xs tw-text-gray-500\">RTL</span>\n </div>\n </div>\n </section>\n\n <!-- Theme Property Groups (Brand, Text, Background, Font Sizes, Line Heights) -->\n <section *ngFor=\"let group of themeGroups\" class=\"theme-section\">\n <h2 class=\"tw-text-md tw-font-semibold tw-mb-2 tw-text-gray-800\">{{ group.label }}</h2>\n <div class=\"tw-grid tw-grid-cols-2 tw-gap-2 tw-gap-x-4\">\n <div *ngFor=\"let item of group.items\"\n class=\"tw-flex tw-items-center tw-gap-2 tw-p-1 tw-rounded-lg tw-bg-gray-50\"\n [ngClass]=\"{'tw-flex-col tw-items-stretch': (group.label === 'Font Sizes' || group.label === 'Line Heights' || group.label === 'Layout Dimensions')}\">\n <!-- Font Sizes: label on top, input in middle, unit at bottom -->\n <ng-container *ngIf=\"group.label === 'Font Sizes'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"0.001\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">rem</span>\n </div>\n </ng-container>\n <!-- Line Heights: label on top, input and unit on same line -->\n <ng-container *ngIf=\"group.label === 'Line Heights'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"0.1\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">unitless</span>\n </div>\n </ng-container>\n <!-- Layout Dimensions: label on top, input in middle, px unit at bottom -->\n <ng-container *ngIf=\"group.label === 'Layout Dimensions'\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700 tw-text-left\">{{ item.label\n }}</label>\n <div class=\"tw-flex tw-items-start\">\n <input [id]=\"item.varName\" type=\"number\" step=\"1\" [min]=\"item.min ?? null\" [max]=\"item.max ?? null\"\n [(ngModel)]=\"item.value\" (input)=\"onLayoutChange($event, item)\"\n class=\"tw-w-18 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\">px</span>\n </div>\n </ng-container>\n <!-- Other groups: keep previous layout -->\n <ng-container *ngIf=\"group.label !== 'Font Sizes' && group.label !== 'Line Heights' && group.label !== 'Layout Dimensions'\">\n <!-- Color input for color variables -->\n <ng-container *ngIf=\"item.varName.includes('color')\">\n <input [id]=\"item.varName\" [attr.data-variable]=\"item.varName\" type=\"color\" [(ngModel)]=\"item.value\"\n (input)=\"onColorChange($event, item)\"\n class=\"tw-appearance-none tw-border-2 tw-border-gray-200 tw-rounded tw-w-8 tw-h-8 tw-p-0 tw-bg-none tw-shadow-none tw-cursor-pointer tw-transition-colors focus:tw-border-blue-500 color-input\">\n </ng-container>\n <!-- Number input for line heights -->\n <ng-container\n *ngIf=\"!item.varName.includes('color') && item.type === 'number' && group.label !== 'Font Sizes'\">\n <input [id]=\"item.varName\" type=\"number\" [step]=\"item.varName.includes('line-height') ? 0.1 : 0.001\"\n [min]=\"item.min ?? null\" [max]=\"item.max ?? null\" [(ngModel)]=\"item.value\"\n (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-16 tw-text-right tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n <span class=\"tw-text-xs tw-text-gray-400\" *ngIf=\"!item.varName.includes('line-height')\">rem</span>\n </ng-container>\n <!-- Text input fallback (if needed) -->\n <ng-container *ngIf=\"!item.varName.includes('color') && item.type !== 'number'\">\n <input [id]=\"item.varName\" type=\"text\" [(ngModel)]=\"item.value\" (input)=\"onTypographyChange($event, item)\"\n class=\"tw-w-24 tw-text-sm tw-border tw-border-gray-300 tw-rounded tw-px-2 tw-py-1 focus:tw-outline-none focus:tw-ring-2 focus:tw-ring-blue-500 focus:tw-border-transparent theme-input\">\n </ng-container>\n <div class=\"tw-flex tw-flex-col tw-gap-0.5\">\n <label [for]=\"item.varName\" class=\"tw-text-sm tw-font-medium tw-text-gray-700\">{{ item.label }}</label>\n <span class=\"tw-text-xs tw-text-gray-500 tw-font-mono\">{{ item.value }}</span>\n </div>\n </ng-container>\n </div>\n </div>\n </section>\n </div>\n\n <!-- STICKY ACTION BUTTONS SECTION -->\n <div class=\"tw-bg-white tw-sticky tw-bottom-0 tw-border-t tw-border-gray-200 tw-z-10 tw-flex-shrink-0 tw-p-3 tw-shadow-lg sticky-action-buttons\">\n <div class=\"tw-flex tw-gap-2 tw-justify-end\">\n <button cideEleButton \n variant=\"outline\" \n size=\"sm\" \n (btnClick)=\"onReset()\" \n [disabled]=\"!hasChangesFromOriginal()\"\n class=\"tw-transition-all tw-duration-200 hover:tw-scale-105 action-button\">\n Reset to Original\n </button>\n <button cideEleButton \n variant=\"primary\" \n size=\"sm\" \n (btnClick)=\"onSave()\" \n [disabled]=\"!hasUnsavedChanges()\"\n class=\"tw-transition-all tw-duration-200 hover:tw-scale-105 action-button\">\n Save Changes\n </button>\n </div>\n </div>\n</div>"],"names":[],"mappings":";;;;;;;;;MA+Ca,2BAA2B,CAAA;AAiE5B,IAAA,YAAA;AACqB,IAAA,UAAA;AAjEd,IAAA,QAAQ,GAAG,MAAM,CAAC,qBAAqB,CAAC;;IAEzD,YAAY,GAAyD,EAAE;IACvE,aAAa,GAAG,EAAE;IAClB,eAAe,GAAG,KAAK;IACvB,cAAc,GAAG,EAAE;IACnB,WAAW,GAA8B,EAAE;IAC3C,KAAK,GAAG,KAAK;IACb,wBAAwB,GAAiB,EAAE;AAC3C,IAAA,sBAAsB,GAA8B,EAAE,CAAC;AAEvD,IAAA,WAAW,GAAiB;AAC1B,QAAA;AACE,YAAA,KAAK,EAAE,cAAc;AACrB,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AI,EAAA,OAAA,EACP,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,CAAC,EAAA,QAAA,EAAA,wgRAAA,EAAA,MAAA,EAAA,CAAA,uzCAAA,CAAA,EAAA;;0BAsEtF,MAAM;2BAAC,WAAW;;;;;"}
@@ -1,8 +1,8 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { input, inject, ChangeDetectionStrategy, Component } from '@angular/core';
3
3
  import { CommonModule } from '@angular/common';
4
- import { CideEleFloatingContainerService, CideEleButtonComponent, CideIconComponent, CideSpinnerComponent, CideEleFileImageDirective } from 'cloud-ide-element';
5
- import { e as AppStateService } from './cloud-ide-layout-cloud-ide-layout-C5X2le0W.mjs';
4
+ import { CideEleFloatingContainerService, CideEleButtonComponent, CideIconComponent } from 'cloud-ide-element';
5
+ import { e as AppStateService } from './cloud-ide-layout-cloud-ide-layout-BT6krb0-.mjs';
6
6
  import { CideSharedOrgStructureComponent } from 'cloud-ide-shared';
7
7
 
8
8
  class CideLytFloatingEntitySelectionComponent {
@@ -52,79 +52,77 @@ class CideLytFloatingEntitySelectionComponent {
52
52
  this.floatingContainerService.hideAll();
53
53
  }
54
54
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingEntitySelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
55
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideLytFloatingEntitySelectionComponent, isStandalone: true, selector: "cide-lyt-floating-entity-selection", inputs: { allowSwitching: { classPropertyName: "allowSwitching", publicName: "allowSwitching", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
56
- <!-- Entity Selection Content using Org Structure Component -->
57
- <div class="tw-flex tw-flex-col tw-h-full">
58
- <!-- Header -->
59
- <div class="tw-bg-white tw-border-b tw-border-gray-200 tw-px-4 tw-py-3 tw-flex-shrink-0">
60
- <div class="tw-flex tw-items-center tw-justify-between">
61
- <div class="tw-flex tw-items-center tw-space-x-2">
62
- <cide-ele-icon class="tw-text-blue-600">account_tree</cide-ele-icon>
63
- <h3 class="tw-text-sm tw-font-semibold tw-text-gray-900">Entity Structure</h3>
64
- </div>
65
- @if (mode() === 'selection') {
66
- <button cideEleButton variant="secondary" size="xs" type="button" (click)="onCancel()">
67
- Cancel
68
- </button>
69
- }
70
- </div>
71
- </div>
72
-
73
- <!-- Org Structure Component -->
74
- <div class="tw-flex-1 tw-overflow-hidden">
75
- <cide-shared-org-structure
76
- [allowSwitching]="allowSwitching()"
77
- [showActions]="showActions()"
78
- [mode]="mode()"
79
- (entityClick)="onEntityClick($event)"
80
- (entitySelect)="onEntitySelect($event)"
81
- (entityView)="onEntityView($event)">
82
- </cide-shared-org-structure>
83
- </div>
84
- </div>
55
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: CideLytFloatingEntitySelectionComponent, isStandalone: true, selector: "cide-lyt-floating-entity-selection", inputs: { allowSwitching: { classPropertyName: "allowSwitching", publicName: "allowSwitching", isSignal: true, isRequired: false, transformFunction: null }, showActions: { classPropertyName: "showActions", publicName: "showActions", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
56
+ <!-- Entity Selection Content using Org Structure Component -->
57
+ <div class="tw-flex tw-flex-col tw-h-full">
58
+ <!-- Header -->
59
+ <div class="tw-bg-white tw-border-b tw-border-gray-200 tw-px-4 tw-py-3 tw-flex-shrink-0">
60
+ <div class="tw-flex tw-items-center tw-justify-between">
61
+ <div class="tw-flex tw-items-center tw-space-x-2">
62
+ <cide-ele-icon class="tw-text-blue-600">account_tree</cide-ele-icon>
63
+ <h3 class="tw-text-sm tw-font-semibold tw-text-gray-900">Entity Structure</h3>
64
+ </div>
65
+ @if (mode() === 'selection') {
66
+ <button cideEleButton variant="secondary" size="xs" type="button" (click)="onCancel()">
67
+ Cancel
68
+ </button>
69
+ }
70
+ </div>
71
+ </div>
72
+
73
+ <!-- Org Structure Component -->
74
+ <div class="tw-flex-1 tw-overflow-hidden">
75
+ <cide-shared-org-structure
76
+ [allowSwitching]="allowSwitching()"
77
+ [showActions]="showActions()"
78
+ [mode]="mode()"
79
+ (entityClick)="onEntityClick($event)"
80
+ (entitySelect)="onEntitySelect($event)"
81
+ (entityView)="onEntityView($event)">
82
+ </cide-shared-org-structure>
83
+ </div>
84
+ </div>
85
85
  `, isInline: true, styles: [".tw-dashed{border-style:dashed}.tw-bg-gray-300{background-color:#d1d5db}.level-0{border-top-color:#3b82f6!important}.level-1{border-top-color:#f59e0b!important}.level-2{border-top-color:#10b981!important}.level-3{border-top-color:#8b5cf6!important}.level-4{border-top-color:#ef4444!important}.level-5{border-top-color:#06b6d4!important}.connection-line-compact{pointer-events:none}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton]", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideIconComponent, selector: "cide-ele-icon", inputs: ["size", "type", "toolTip"] }, { kind: "component", type: CideSharedOrgStructureComponent, selector: "cide-shared-org-structure", inputs: ["allowSwitching", "showActions", "mode"], outputs: ["entityClick", "entitySelect", "entityView"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
86
86
  }
87
87
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CideLytFloatingEntitySelectionComponent, decorators: [{
88
88
  type: Component,
89
- args: [{ selector: 'cide-lyt-floating-entity-selection', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
89
+ args: [{ selector: 'cide-lyt-floating-entity-selection', changeDetection: ChangeDetectionStrategy.OnPush, imports: [
90
90
  CommonModule,
91
91
  CideEleButtonComponent,
92
92
  CideIconComponent,
93
- CideSpinnerComponent,
94
- CideEleFileImageDirective,
95
93
  CideSharedOrgStructureComponent
96
- ], template: `
97
- <!-- Entity Selection Content using Org Structure Component -->
98
- <div class="tw-flex tw-flex-col tw-h-full">
99
- <!-- Header -->
100
- <div class="tw-bg-white tw-border-b tw-border-gray-200 tw-px-4 tw-py-3 tw-flex-shrink-0">
101
- <div class="tw-flex tw-items-center tw-justify-between">
102
- <div class="tw-flex tw-items-center tw-space-x-2">
103
- <cide-ele-icon class="tw-text-blue-600">account_tree</cide-ele-icon>
104
- <h3 class="tw-text-sm tw-font-semibold tw-text-gray-900">Entity Structure</h3>
105
- </div>
106
- @if (mode() === 'selection') {
107
- <button cideEleButton variant="secondary" size="xs" type="button" (click)="onCancel()">
108
- Cancel
109
- </button>
110
- }
111
- </div>
112
- </div>
113
-
114
- <!-- Org Structure Component -->
115
- <div class="tw-flex-1 tw-overflow-hidden">
116
- <cide-shared-org-structure
117
- [allowSwitching]="allowSwitching()"
118
- [showActions]="showActions()"
119
- [mode]="mode()"
120
- (entityClick)="onEntityClick($event)"
121
- (entitySelect)="onEntitySelect($event)"
122
- (entityView)="onEntityView($event)">
123
- </cide-shared-org-structure>
124
- </div>
125
- </div>
94
+ ], template: `
95
+ <!-- Entity Selection Content using Org Structure Component -->
96
+ <div class="tw-flex tw-flex-col tw-h-full">
97
+ <!-- Header -->
98
+ <div class="tw-bg-white tw-border-b tw-border-gray-200 tw-px-4 tw-py-3 tw-flex-shrink-0">
99
+ <div class="tw-flex tw-items-center tw-justify-between">
100
+ <div class="tw-flex tw-items-center tw-space-x-2">
101
+ <cide-ele-icon class="tw-text-blue-600">account_tree</cide-ele-icon>
102
+ <h3 class="tw-text-sm tw-font-semibold tw-text-gray-900">Entity Structure</h3>
103
+ </div>
104
+ @if (mode() === 'selection') {
105
+ <button cideEleButton variant="secondary" size="xs" type="button" (click)="onCancel()">
106
+ Cancel
107
+ </button>
108
+ }
109
+ </div>
110
+ </div>
111
+
112
+ <!-- Org Structure Component -->
113
+ <div class="tw-flex-1 tw-overflow-hidden">
114
+ <cide-shared-org-structure
115
+ [allowSwitching]="allowSwitching()"
116
+ [showActions]="showActions()"
117
+ [mode]="mode()"
118
+ (entityClick)="onEntityClick($event)"
119
+ (entitySelect)="onEntitySelect($event)"
120
+ (entityView)="onEntityView($event)">
121
+ </cide-shared-org-structure>
122
+ </div>
123
+ </div>
126
124
  `, styles: [".tw-dashed{border-style:dashed}.tw-bg-gray-300{background-color:#d1d5db}.level-0{border-top-color:#3b82f6!important}.level-1{border-top-color:#f59e0b!important}.level-2{border-top-color:#10b981!important}.level-3{border-top-color:#8b5cf6!important}.level-4{border-top-color:#ef4444!important}.level-5{border-top-color:#06b6d4!important}.connection-line-compact{pointer-events:none}\n"] }]
127
125
  }] });
128
126
 
129
127
  export { CideLytFloatingEntitySelectionComponent };
130
- //# sourceMappingURL=cloud-ide-layout-floating-entity-selection.component-DTeaVXp3.mjs.map
128
+ //# sourceMappingURL=cloud-ide-layout-floating-entity-selection.component-Bk1F1fD4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloud-ide-layout-floating-entity-selection.component-Bk1F1fD4.mjs","sources":["../../../projects/cloud-ide-layout/src/lib/components/floating-entity-selection/floating-entity-selection.component.ts"],"sourcesContent":["import { Component, OnInit, inject, signal, computed, ChangeDetectionStrategy, input } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { CideEleButtonComponent } from 'cloud-ide-element';\nimport { CideIconComponent } from 'cloud-ide-element';\nimport { AppStateService } from '../../services/app-state/app-state.service';\nimport { CideEleFloatingContainerService } from 'cloud-ide-element';\nimport { CideSharedOrgStructureComponent } from 'cloud-ide-shared';\nimport { CoreSystemEntityListResponse } from 'cloud-ide-lms-model';\n\n@Component({\n selector: 'cide-lyt-floating-entity-selection',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n CideEleButtonComponent,\n CideIconComponent,\n CideSharedOrgStructureComponent\n ],\n template: `\n <!-- Entity Selection Content using Org Structure Component -->\n <div class=\"tw-flex tw-flex-col tw-h-full\">\n <!-- Header -->\n <div class=\"tw-bg-white tw-border-b tw-border-gray-200 tw-px-4 tw-py-3 tw-flex-shrink-0\">\n <div class=\"tw-flex tw-items-center tw-justify-between\">\n <div class=\"tw-flex tw-items-center tw-space-x-2\">\n <cide-ele-icon class=\"tw-text-blue-600\">account_tree</cide-ele-icon>\n <h3 class=\"tw-text-sm tw-font-semibold tw-text-gray-900\">Entity Structure</h3>\n </div>\n @if (mode() === 'selection') {\n <button cideEleButton variant=\"secondary\" size=\"xs\" type=\"button\" (click)=\"onCancel()\">\n Cancel\n </button>\n }\n </div>\n </div>\n \n <!-- Org Structure Component -->\n <div class=\"tw-flex-1 tw-overflow-hidden\">\n <cide-shared-org-structure\n [allowSwitching]=\"allowSwitching()\"\n [showActions]=\"showActions()\"\n [mode]=\"mode()\"\n (entityClick)=\"onEntityClick($event)\"\n (entitySelect)=\"onEntitySelect($event)\"\n (entityView)=\"onEntityView($event)\">\n </cide-shared-org-structure>\n </div>\n </div>\n `,\n styles: [`\n .tw-dashed {\n border-style: dashed;\n }\n .tw-bg-gray-300 {\n background-color: #d1d5db;\n }\n \n /* Level-based styling for entity cards */\n .level-0 {\n border-top-color: #3b82f6 !important; /* Blue */\n }\n .level-1 {\n border-top-color: #f59e0b !important; /* Amber */\n }\n .level-2 {\n border-top-color: #10b981 !important; /* Emerald */\n }\n .level-3 {\n border-top-color: #8b5cf6 !important; /* Violet */\n }\n .level-4 {\n border-top-color: #ef4444 !important; /* Red */\n }\n .level-5 {\n border-top-color: #06b6d4 !important; /* Cyan */\n }\n \n /* Connection line styling */\n .connection-line-compact {\n pointer-events: none;\n }\n `]\n})\nexport class CideLytFloatingEntitySelectionComponent implements OnInit {\n // Input parameters for configuration\n allowSwitching = input<boolean>(true); // Allow entity switching (default: true)\n showActions = input<boolean>(true); // Show action buttons (default: true)\n mode = input<'selection' | 'view'>('selection'); // Mode: selection or view-only\n\n // Service injections\n private appStateService = inject(AppStateService);\n private floatingContainerService = inject(CideEleFloatingContainerService);\n\n ngOnInit() {\n // No initialization needed - shared org structure component handles everything\n }\n\n /**\n * Handle entity click event from org structure\n */\n onEntityClick(entity: CoreSystemEntityListResponse): void {\n console.log('🏢 Entity clicked:', entity);\n // This is just a click event, no action needed unless specific handling is required\n }\n\n /**\n * Handle entity select event from org structure (for switching)\n */\n onEntitySelect(entity: CoreSystemEntityListResponse): void {\n console.log('🏢 Entity selected for switching:', entity);\n this.appStateService.setActiveEntity(entity);\n this.closeContainer();\n }\n\n /**\n * Handle entity view event from org structure (for viewing)\n */\n onEntityView(entity: any): void {\n console.log('👁️ Entity viewed:', entity);\n // Handle view-only mode - could show entity details or navigate\n // This can be customized based on your needs\n }\n\n /**\n * Cancel selection\n */\n onCancel(): void {\n this.closeContainer();\n }\n\n /**\n * Close the floating container\n */\n private closeContainer(): void {\n this.floatingContainerService.hideAll();\n }\n}"],"names":[],"mappings":";;;;;;;MAmFa,uCAAuC,CAAA;;AAElD,IAAA,cAAc,GAAG,KAAK,CAAU,IAAI,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC,CAAC;AACtC,IAAA,WAAW,GAAG,KAAK,CAAU,IAAI,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAC,CAAC;AACnC,IAAA,IAAI,GAAG,KAAK,CAAuB,WAAW,EAAA,IAAA,SAAA,GAAA,CAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CA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