cloud-ide-layout 1.0.297 → 1.0.302
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/fesm2022/cloud-ide-layout-api-endpoint-manager.component-h6VzYckg.mjs +288 -0
- package/fesm2022/cloud-ide-layout-api-endpoint-manager.component-h6VzYckg.mjs.map +1 -0
- package/fesm2022/{cloud-ide-layout-cloud-ide-layout-DgwU-sCr.mjs → cloud-ide-layout-cloud-ide-layout-B3aNlPnd.mjs} +36 -21
- package/fesm2022/{cloud-ide-layout-cloud-ide-layout-DgwU-sCr.mjs.map → cloud-ide-layout-cloud-ide-layout-B3aNlPnd.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout-dashboard-manager.component-DdEEGw7d.mjs +706 -0
- package/fesm2022/cloud-ide-layout-dashboard-manager.component-DdEEGw7d.mjs.map +1 -0
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-BWSMDvLy.mjs → cloud-ide-layout-drawer-theme.component-DZxUoK7a.mjs} +4 -4
- package/fesm2022/{cloud-ide-layout-drawer-theme.component-BWSMDvLy.mjs.map → cloud-ide-layout-drawer-theme.component-DZxUoK7a.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-CH7LlO1x.mjs → cloud-ide-layout-home-wrapper.component-1SSET2sB.mjs} +2 -2
- package/fesm2022/{cloud-ide-layout-home-wrapper.component-CH7LlO1x.mjs.map → cloud-ide-layout-home-wrapper.component-1SSET2sB.mjs.map} +1 -1
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-DVj6eU3V.mjs → cloud-ide-layout-sidedrawer-notes.component-D4UliYnP.mjs} +4 -4
- package/fesm2022/{cloud-ide-layout-sidedrawer-notes.component-DVj6eU3V.mjs.map → cloud-ide-layout-sidedrawer-notes.component-D4UliYnP.mjs.map} +1 -1
- package/fesm2022/cloud-ide-layout.mjs +1 -1
- package/index.d.ts +1 -1
- package/package.json +1 -1
- package/README.md +0 -63
- package/fesm2022/cloud-ide-layout-dashboard-manager.component-CHthRoQj.mjs +0 -653
- package/fesm2022/cloud-ide-layout-dashboard-manager.component-CHthRoQj.mjs.map +0 -1
|
@@ -1,653 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, signal, computed, Component } from '@angular/core';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as i1 from '@angular/forms';
|
|
5
|
-
import { FormsModule } from '@angular/forms';
|
|
6
|
-
import { C as CideLytSharedWrapperComponent } from './cloud-ide-layout-cloud-ide-layout-DgwU-sCr.mjs';
|
|
7
|
-
import { D as DashboardCardsService } from './cloud-ide-layout-dashboard-cards.service-BGaKcq7H.mjs';
|
|
8
|
-
import { NotificationService, ConfirmationService, CideEleDataGridComponent, CideEleButtonComponent, CideInputComponent, CideSelectComponent } from 'cloud-ide-element';
|
|
9
|
-
|
|
10
|
-
class DashboardManagerComponent {
|
|
11
|
-
dashboardCardsService = inject(DashboardCardsService);
|
|
12
|
-
notificationService = inject(NotificationService);
|
|
13
|
-
confirmationService = inject(ConfirmationService);
|
|
14
|
-
shared_wrapper_setup_param = {
|
|
15
|
-
sypg_page_code: "cide_lyt_dashboard_manager"
|
|
16
|
-
};
|
|
17
|
-
cardsList = signal([], ...(ngDevMode ? [{ debugName: "cardsList" }] : []));
|
|
18
|
-
loading = signal(false, ...(ngDevMode ? [{ debugName: "loading" }] : []));
|
|
19
|
-
showModal = signal(false, ...(ngDevMode ? [{ debugName: "showModal" }] : []));
|
|
20
|
-
editingCard = signal(null, ...(ngDevMode ? [{ debugName: "editingCard" }] : []));
|
|
21
|
-
apiEndpoints = signal([], ...(ngDevMode ? [{ debugName: "apiEndpoints" }] : []));
|
|
22
|
-
gridConfig = computed(() => ({
|
|
23
|
-
id: 'dashboard-cards-grid',
|
|
24
|
-
columns: [
|
|
25
|
-
{
|
|
26
|
-
key: 'cdc_title',
|
|
27
|
-
header: 'Title',
|
|
28
|
-
type: 'text',
|
|
29
|
-
sortable: true
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
key: 'cdc_type',
|
|
33
|
-
header: 'Type',
|
|
34
|
-
type: 'text',
|
|
35
|
-
sortable: true
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
key: 'cdc_api_endpoint',
|
|
39
|
-
header: 'API Endpoint',
|
|
40
|
-
type: 'text'
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
key: 'cdc_visible',
|
|
44
|
-
header: 'Visible',
|
|
45
|
-
type: 'status',
|
|
46
|
-
statusConfig: {
|
|
47
|
-
activeValue: true,
|
|
48
|
-
activeLabel: 'Visible',
|
|
49
|
-
inactiveLabel: 'Hidden',
|
|
50
|
-
activeClass: 'tw-bg-green-100 tw-text-green-800',
|
|
51
|
-
inactiveClass: 'tw-bg-gray-100 tw-text-gray-800'
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
key: 'actions',
|
|
56
|
-
header: 'Actions',
|
|
57
|
-
type: 'actions',
|
|
58
|
-
actions: [
|
|
59
|
-
{
|
|
60
|
-
key: 'edit',
|
|
61
|
-
label: 'Edit',
|
|
62
|
-
icon: 'edit',
|
|
63
|
-
variant: 'primary',
|
|
64
|
-
onClick: 'edit'
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
key: 'delete',
|
|
68
|
-
label: 'Delete',
|
|
69
|
-
icon: 'delete',
|
|
70
|
-
variant: 'danger',
|
|
71
|
-
onClick: 'delete'
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
key: 'toggle',
|
|
75
|
-
label: 'Toggle Visibility',
|
|
76
|
-
icon: 'visibility',
|
|
77
|
-
variant: 'outline',
|
|
78
|
-
onClick: 'toggle'
|
|
79
|
-
}
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
],
|
|
83
|
-
data: this.cardsList(),
|
|
84
|
-
pagination: {
|
|
85
|
-
enabled: true,
|
|
86
|
-
pageSize: 10,
|
|
87
|
-
pageSizeOptions: [10, 25, 50, 100],
|
|
88
|
-
showQuickJump: true,
|
|
89
|
-
showPageInfo: true,
|
|
90
|
-
showRefresh: true
|
|
91
|
-
},
|
|
92
|
-
search: {
|
|
93
|
-
enabled: true,
|
|
94
|
-
placeholder: 'Search cards...',
|
|
95
|
-
searchableColumns: ['cdc_title', 'cdc_type', 'cdc_api_endpoint']
|
|
96
|
-
},
|
|
97
|
-
loading: {
|
|
98
|
-
useDefer: true,
|
|
99
|
-
skeletonRows: 5,
|
|
100
|
-
showOverlay: false
|
|
101
|
-
},
|
|
102
|
-
responsive: true,
|
|
103
|
-
striped: false,
|
|
104
|
-
bordered: true,
|
|
105
|
-
compact: true
|
|
106
|
-
}), ...(ngDevMode ? [{ debugName: "gridConfig" }] : []));
|
|
107
|
-
cardTypes = [
|
|
108
|
-
{ value: 'stats', label: 'Stats' },
|
|
109
|
-
{ value: 'chart', label: 'Chart' },
|
|
110
|
-
{ value: 'table', label: 'Table' },
|
|
111
|
-
{ value: 'module-card', label: 'Module Card' },
|
|
112
|
-
{ value: 'activity-feed', label: 'Activity Feed' },
|
|
113
|
-
{ value: 'events', label: 'Events' },
|
|
114
|
-
{ value: 'custom', label: 'Custom' }
|
|
115
|
-
];
|
|
116
|
-
cardForm = {
|
|
117
|
-
title: '',
|
|
118
|
-
description: '',
|
|
119
|
-
type: 'custom',
|
|
120
|
-
apiEndpoint: '',
|
|
121
|
-
icon: '',
|
|
122
|
-
color: '#3B82F6',
|
|
123
|
-
position: {
|
|
124
|
-
row: 1,
|
|
125
|
-
col: 1,
|
|
126
|
-
colspan: 1,
|
|
127
|
-
rowspan: 1
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
apiEndpointsOptions = computed(() => {
|
|
131
|
-
return this.apiEndpoints().map(api => ({
|
|
132
|
-
value: api.endpoint,
|
|
133
|
-
label: `${api.method} ${api.endpoint} - ${api.description}`
|
|
134
|
-
}));
|
|
135
|
-
}, ...(ngDevMode ? [{ debugName: "apiEndpointsOptions" }] : []));
|
|
136
|
-
ngOnInit() {
|
|
137
|
-
this.loadCards();
|
|
138
|
-
this.loadApiEndpoints();
|
|
139
|
-
}
|
|
140
|
-
loadCards() {
|
|
141
|
-
this.loading.set(true);
|
|
142
|
-
this.dashboardCardsService.getDashboardCardsList({}).subscribe({
|
|
143
|
-
next: (response) => {
|
|
144
|
-
if (response.success && response.data) {
|
|
145
|
-
// Map DashboardCardsListResponse to CoreDashboardCards
|
|
146
|
-
const mappedCards = response.data.map((card) => ({
|
|
147
|
-
...card,
|
|
148
|
-
cdc_entity_id_syen: card.cdc_entity_id_syen?._id || card.cdc_entity_id_syen,
|
|
149
|
-
cdc_created_by_user: card.cdc_created_by_user?._id || card.cdc_created_by_user,
|
|
150
|
-
cdc_modified_by_user: card.cdc_modified_by_user?._id || card.cdc_modified_by_user
|
|
151
|
-
}));
|
|
152
|
-
this.cardsList.set(mappedCards);
|
|
153
|
-
}
|
|
154
|
-
this.loading.set(false);
|
|
155
|
-
},
|
|
156
|
-
error: (error) => {
|
|
157
|
-
console.error('Error loading cards:', error);
|
|
158
|
-
this.notificationService.error('Error loading dashboard cards');
|
|
159
|
-
this.loading.set(false);
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
}
|
|
163
|
-
loadApiEndpoints() {
|
|
164
|
-
this.dashboardCardsService.getApiList().subscribe({
|
|
165
|
-
next: (response) => {
|
|
166
|
-
if (response.success && response.data) {
|
|
167
|
-
this.apiEndpoints.set(response.data);
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
error: (error) => {
|
|
171
|
-
console.error('Error loading API endpoints:', error);
|
|
172
|
-
}
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
openAddCardModal() {
|
|
176
|
-
this.editingCard.set(null);
|
|
177
|
-
this.cardForm = {
|
|
178
|
-
title: '',
|
|
179
|
-
description: '',
|
|
180
|
-
type: 'custom',
|
|
181
|
-
apiEndpoint: '',
|
|
182
|
-
icon: '',
|
|
183
|
-
color: '#3B82F6',
|
|
184
|
-
position: {
|
|
185
|
-
row: 1,
|
|
186
|
-
col: 1,
|
|
187
|
-
colspan: 1,
|
|
188
|
-
rowspan: 1
|
|
189
|
-
}
|
|
190
|
-
};
|
|
191
|
-
this.showModal.set(true);
|
|
192
|
-
}
|
|
193
|
-
editCard(card) {
|
|
194
|
-
this.editingCard.set(card);
|
|
195
|
-
this.cardForm = {
|
|
196
|
-
title: card.cdc_title || '',
|
|
197
|
-
description: card.cdc_description || '',
|
|
198
|
-
type: card.cdc_type || 'custom',
|
|
199
|
-
apiEndpoint: card.cdc_api_endpoint || '',
|
|
200
|
-
icon: card.cdc_icon || '',
|
|
201
|
-
color: card.cdc_color || '#3B82F6',
|
|
202
|
-
position: card.cdc_position && typeof card.cdc_position === 'object' &&
|
|
203
|
-
'row' in card.cdc_position && 'col' in card.cdc_position &&
|
|
204
|
-
'colspan' in card.cdc_position && 'rowspan' in card.cdc_position
|
|
205
|
-
? {
|
|
206
|
-
row: card.cdc_position.row || 1,
|
|
207
|
-
col: card.cdc_position.col || 1,
|
|
208
|
-
colspan: card.cdc_position.colspan || 1,
|
|
209
|
-
rowspan: card.cdc_position.rowspan || 1
|
|
210
|
-
}
|
|
211
|
-
: {
|
|
212
|
-
row: 1,
|
|
213
|
-
col: 1,
|
|
214
|
-
colspan: 1,
|
|
215
|
-
rowspan: 1
|
|
216
|
-
}
|
|
217
|
-
};
|
|
218
|
-
this.showModal.set(true);
|
|
219
|
-
}
|
|
220
|
-
closeModal() {
|
|
221
|
-
this.showModal.set(false);
|
|
222
|
-
this.editingCard.set(null);
|
|
223
|
-
}
|
|
224
|
-
saveCard() {
|
|
225
|
-
const payload = {
|
|
226
|
-
core_dashboard_cards: {
|
|
227
|
-
_id: this.editingCard()?._id,
|
|
228
|
-
cdc_title: this.cardForm.title,
|
|
229
|
-
cdc_description: this.cardForm.description,
|
|
230
|
-
cdc_type: this.cardForm.type,
|
|
231
|
-
cdc_api_endpoint: this.cardForm.apiEndpoint,
|
|
232
|
-
cdc_icon: this.cardForm.icon,
|
|
233
|
-
cdc_color: this.cardForm.color,
|
|
234
|
-
cdc_position: this.cardForm.position,
|
|
235
|
-
cdc_visible: true,
|
|
236
|
-
cdc_draggable: true
|
|
237
|
-
}
|
|
238
|
-
};
|
|
239
|
-
this.dashboardCardsService.saveUpdateDashboardCard(payload).subscribe({
|
|
240
|
-
next: (response) => {
|
|
241
|
-
if (response.success) {
|
|
242
|
-
this.notificationService.success(this.editingCard() ? 'Card updated successfully' : 'Card created successfully');
|
|
243
|
-
this.closeModal();
|
|
244
|
-
this.loadCards();
|
|
245
|
-
}
|
|
246
|
-
else {
|
|
247
|
-
this.notificationService.error(response.message || 'Error saving card');
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
error: (error) => {
|
|
251
|
-
console.error('Error saving card:', error);
|
|
252
|
-
this.notificationService.error('Error saving card');
|
|
253
|
-
}
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
deleteCard(card) {
|
|
257
|
-
if (!card._id)
|
|
258
|
-
return;
|
|
259
|
-
this.confirmationService.ask({
|
|
260
|
-
title: 'Delete Card',
|
|
261
|
-
message: `Are you sure you want to delete "${card.cdc_title}"?`,
|
|
262
|
-
type: 'danger',
|
|
263
|
-
icon: 'delete_forever',
|
|
264
|
-
confirmText: 'Delete',
|
|
265
|
-
cancelText: 'Cancel'
|
|
266
|
-
}).then((confirmed) => {
|
|
267
|
-
if (confirmed) {
|
|
268
|
-
this.dashboardCardsService.deleteDashboardCard(card._id).subscribe({
|
|
269
|
-
next: (response) => {
|
|
270
|
-
if (response.success) {
|
|
271
|
-
this.notificationService.success('Card deleted successfully');
|
|
272
|
-
this.loadCards();
|
|
273
|
-
}
|
|
274
|
-
else {
|
|
275
|
-
this.notificationService.error(response.message || 'Error deleting card');
|
|
276
|
-
}
|
|
277
|
-
},
|
|
278
|
-
error: (error) => {
|
|
279
|
-
console.error('Error deleting card:', error);
|
|
280
|
-
this.notificationService.error('Error deleting card');
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
toggleVisibility(card) {
|
|
287
|
-
const payload = {
|
|
288
|
-
core_dashboard_cards: {
|
|
289
|
-
_id: card._id,
|
|
290
|
-
cdc_visible: !card.cdc_visible
|
|
291
|
-
}
|
|
292
|
-
};
|
|
293
|
-
this.dashboardCardsService.saveUpdateDashboardCard(payload).subscribe({
|
|
294
|
-
next: (response) => {
|
|
295
|
-
if (response.success) {
|
|
296
|
-
this.loadCards();
|
|
297
|
-
}
|
|
298
|
-
},
|
|
299
|
-
error: (error) => {
|
|
300
|
-
console.error('Error toggling visibility:', error);
|
|
301
|
-
this.notificationService.error('Error updating card');
|
|
302
|
-
}
|
|
303
|
-
});
|
|
304
|
-
}
|
|
305
|
-
onGridEvent(event) {
|
|
306
|
-
if (event.type === 'action' && event.action) {
|
|
307
|
-
const card = event.data;
|
|
308
|
-
if (event.action.key === 'edit') {
|
|
309
|
-
this.editCard(card);
|
|
310
|
-
}
|
|
311
|
-
else if (event.action.key === 'delete') {
|
|
312
|
-
this.deleteCard(card);
|
|
313
|
-
}
|
|
314
|
-
else if (event.action.key === 'toggle') {
|
|
315
|
-
this.toggleVisibility(card);
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
onTypeChange(value) {
|
|
320
|
-
this.cardForm.type = value;
|
|
321
|
-
}
|
|
322
|
-
onApiEndpointChange(value) {
|
|
323
|
-
this.cardForm.apiEndpoint = String(value);
|
|
324
|
-
}
|
|
325
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DashboardManagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
326
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.15", type: DashboardManagerComponent, isStandalone: true, selector: "cide-lyt-dashboard-manager", ngImport: i0, template: `
|
|
327
|
-
<cide-lyt-shared-wrapper [shared_wrapper_setup_param]="shared_wrapper_setup_param">
|
|
328
|
-
<div class="tw-p-4 tw-space-y-4">
|
|
329
|
-
<!-- Header -->
|
|
330
|
-
<div class="tw-flex tw-justify-between tw-items-center">
|
|
331
|
-
<h2 class="tw-text-2xl tw-font-bold">Dashboard Manager</h2>
|
|
332
|
-
<cide-ele-button
|
|
333
|
-
[label]="'Add New Card'"
|
|
334
|
-
leftIcon="add"
|
|
335
|
-
(click)="openAddCardModal()"
|
|
336
|
-
variant="primary">
|
|
337
|
-
</cide-ele-button>
|
|
338
|
-
</div>
|
|
339
|
-
|
|
340
|
-
<!-- Cards Grid -->
|
|
341
|
-
<cide-ele-data-grid
|
|
342
|
-
[config]="gridConfig()"
|
|
343
|
-
(gridEvent)="onGridEvent($event)">
|
|
344
|
-
</cide-ele-data-grid>
|
|
345
|
-
|
|
346
|
-
<!-- Add/Edit Card Modal -->
|
|
347
|
-
@if (showModal()) {
|
|
348
|
-
<div class="tw-fixed tw-inset-0 tw-bg-black tw-bg-opacity-50 tw-flex tw-items-center tw-justify-center tw-z-50">
|
|
349
|
-
<div class="tw-bg-white tw-rounded-lg tw-p-6 tw-max-w-2xl tw-w-full tw-max-h-[90vh] tw-overflow-y-auto">
|
|
350
|
-
<h3 class="tw-text-xl tw-font-bold tw-mb-4">
|
|
351
|
-
{{ editingCard() ? 'Edit Card' : 'Add New Card' }}
|
|
352
|
-
</h3>
|
|
353
|
-
|
|
354
|
-
<form (ngSubmit)="saveCard()" class="tw-space-y-4">
|
|
355
|
-
<div class="tw-grid tw-grid-cols-2 tw-gap-4">
|
|
356
|
-
<div>
|
|
357
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Title</label>
|
|
358
|
-
<cide-ele-input
|
|
359
|
-
[(ngModel)]="cardForm.title"
|
|
360
|
-
[name]="'title'"
|
|
361
|
-
[required]="true"
|
|
362
|
-
[placeholder]="'Enter card title'">
|
|
363
|
-
</cide-ele-input>
|
|
364
|
-
</div>
|
|
365
|
-
|
|
366
|
-
<div>
|
|
367
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Type</label>
|
|
368
|
-
<cide-ele-select
|
|
369
|
-
[ngModel]="cardForm.type || 'custom'"
|
|
370
|
-
(ngModelChange)="onTypeChange($event)"
|
|
371
|
-
[options]="cardTypes"
|
|
372
|
-
[required]="true">
|
|
373
|
-
</cide-ele-select>
|
|
374
|
-
</div>
|
|
375
|
-
</div>
|
|
376
|
-
|
|
377
|
-
<div>
|
|
378
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Description</label>
|
|
379
|
-
<cide-ele-input
|
|
380
|
-
[(ngModel)]="cardForm.description"
|
|
381
|
-
[name]="'description'"
|
|
382
|
-
[type]="'text'"
|
|
383
|
-
[placeholder]="'Enter card description'">
|
|
384
|
-
</cide-ele-input>
|
|
385
|
-
</div>
|
|
386
|
-
|
|
387
|
-
<div>
|
|
388
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">API Endpoint</label>
|
|
389
|
-
<cide-ele-select
|
|
390
|
-
[ngModel]="cardForm.apiEndpoint"
|
|
391
|
-
(ngModelChange)="onApiEndpointChange($event)"
|
|
392
|
-
[options]="apiEndpointsOptions()"
|
|
393
|
-
[placeholder]="'Select API endpoint'">
|
|
394
|
-
</cide-ele-select>
|
|
395
|
-
</div>
|
|
396
|
-
|
|
397
|
-
<div class="tw-grid tw-grid-cols-2 tw-gap-4">
|
|
398
|
-
<div>
|
|
399
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Icon</label>
|
|
400
|
-
<cide-ele-input
|
|
401
|
-
[(ngModel)]="cardForm.icon"
|
|
402
|
-
[name]="'icon'"
|
|
403
|
-
[placeholder]="'e.g., dashboard, analytics'">
|
|
404
|
-
</cide-ele-input>
|
|
405
|
-
</div>
|
|
406
|
-
|
|
407
|
-
<div>
|
|
408
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Color</label>
|
|
409
|
-
<cide-ele-input
|
|
410
|
-
[(ngModel)]="cardForm.color"
|
|
411
|
-
[name]="'color'"
|
|
412
|
-
[type]="'text'"
|
|
413
|
-
[placeholder]="'#3B82F6'">
|
|
414
|
-
</cide-ele-input>
|
|
415
|
-
</div>
|
|
416
|
-
</div>
|
|
417
|
-
|
|
418
|
-
<div class="tw-grid tw-grid-cols-4 tw-gap-4">
|
|
419
|
-
<div>
|
|
420
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Row</label>
|
|
421
|
-
<cide-ele-input
|
|
422
|
-
[(ngModel)]="cardForm.position.row"
|
|
423
|
-
[name]="'row'"
|
|
424
|
-
[type]="'number'"
|
|
425
|
-
[min]="1">
|
|
426
|
-
</cide-ele-input>
|
|
427
|
-
</div>
|
|
428
|
-
|
|
429
|
-
<div>
|
|
430
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Col</label>
|
|
431
|
-
<cide-ele-input
|
|
432
|
-
[(ngModel)]="cardForm.position.col"
|
|
433
|
-
[name]="'col'"
|
|
434
|
-
[type]="'number'"
|
|
435
|
-
[min]="1">
|
|
436
|
-
</cide-ele-input>
|
|
437
|
-
</div>
|
|
438
|
-
|
|
439
|
-
<div>
|
|
440
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Col Span</label>
|
|
441
|
-
<cide-ele-input
|
|
442
|
-
[(ngModel)]="cardForm.position.colspan"
|
|
443
|
-
[name]="'colspan'"
|
|
444
|
-
[type]="'number'"
|
|
445
|
-
[min]="1"
|
|
446
|
-
[max]="12">
|
|
447
|
-
</cide-ele-input>
|
|
448
|
-
</div>
|
|
449
|
-
|
|
450
|
-
<div>
|
|
451
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Row Span</label>
|
|
452
|
-
<cide-ele-input
|
|
453
|
-
[(ngModel)]="cardForm.position.rowspan"
|
|
454
|
-
[name]="'rowspan'"
|
|
455
|
-
[type]="'number'"
|
|
456
|
-
[min]="1">
|
|
457
|
-
</cide-ele-input>
|
|
458
|
-
</div>
|
|
459
|
-
</div>
|
|
460
|
-
|
|
461
|
-
<div class="tw-flex tw-gap-2 tw-pt-4">
|
|
462
|
-
<cide-ele-button
|
|
463
|
-
[label]="'Cancel'"
|
|
464
|
-
variant="secondary"
|
|
465
|
-
(click)="closeModal()">
|
|
466
|
-
</cide-ele-button>
|
|
467
|
-
<cide-ele-button
|
|
468
|
-
[label]="'Save'"
|
|
469
|
-
variant="primary"
|
|
470
|
-
[type]="'submit'">
|
|
471
|
-
</cide-ele-button>
|
|
472
|
-
</div>
|
|
473
|
-
</form>
|
|
474
|
-
</div>
|
|
475
|
-
</div>
|
|
476
|
-
}
|
|
477
|
-
</div>
|
|
478
|
-
</cide-lyt-shared-wrapper>
|
|
479
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: CideLytSharedWrapperComponent, selector: "cide-lyt-shared-wrapper", inputs: ["shared_wrapper_setup_param", "breadcrumb_data"] }, { kind: "component", type: CideEleDataGridComponent, selector: "cide-ele-data-grid", inputs: ["config", "templateRenderers", "customFormatters", "actionHandlers", "serverSidePagination", "totalServerItems", "currentServerPage", "currentServerPageSize", "dragDropEnabled"], outputs: ["gridEvent"] }, { kind: "component", type: CideEleButtonComponent, selector: "button[cideEleButton], a[cideEleButton], cide-ele-button", inputs: ["label", "variant", "size", "type", "shape", "elevation", "disabled", "id", "loading", "fullWidth", "leftIcon", "rightIcon", "customClass", "tooltip", "ariaLabel", "testId", "routerLink", "routerExtras", "preventDoubleClick", "animated", "adaptive"], outputs: ["btnClick", "doubleClick"] }, { kind: "component", type: CideInputComponent, selector: "cide-ele-input", inputs: ["fill", "label", "labelHide", "disabled", "clearInput", "labelPlacement", "labelDir", "placeholder", "leadingIcon", "trailingIcon", "helperText", "helperTextCollapse", "hideHelperAndErrorText", "errorText", "maxlength", "minlength", "required", "autocapitalize", "autocomplete", "type", "width", "id", "ngModel", "option", "min", "max", "step", "size"], outputs: ["ngModelChange"] }, { 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", "treeView"], outputs: ["ngModelChange", "change", "searchChange"] }] });
|
|
480
|
-
}
|
|
481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: DashboardManagerComponent, decorators: [{
|
|
482
|
-
type: Component,
|
|
483
|
-
args: [{
|
|
484
|
-
selector: 'cide-lyt-dashboard-manager',
|
|
485
|
-
standalone: true,
|
|
486
|
-
imports: [
|
|
487
|
-
CommonModule,
|
|
488
|
-
FormsModule,
|
|
489
|
-
CideLytSharedWrapperComponent,
|
|
490
|
-
CideEleDataGridComponent,
|
|
491
|
-
CideEleButtonComponent,
|
|
492
|
-
CideInputComponent,
|
|
493
|
-
CideSelectComponent
|
|
494
|
-
],
|
|
495
|
-
template: `
|
|
496
|
-
<cide-lyt-shared-wrapper [shared_wrapper_setup_param]="shared_wrapper_setup_param">
|
|
497
|
-
<div class="tw-p-4 tw-space-y-4">
|
|
498
|
-
<!-- Header -->
|
|
499
|
-
<div class="tw-flex tw-justify-between tw-items-center">
|
|
500
|
-
<h2 class="tw-text-2xl tw-font-bold">Dashboard Manager</h2>
|
|
501
|
-
<cide-ele-button
|
|
502
|
-
[label]="'Add New Card'"
|
|
503
|
-
leftIcon="add"
|
|
504
|
-
(click)="openAddCardModal()"
|
|
505
|
-
variant="primary">
|
|
506
|
-
</cide-ele-button>
|
|
507
|
-
</div>
|
|
508
|
-
|
|
509
|
-
<!-- Cards Grid -->
|
|
510
|
-
<cide-ele-data-grid
|
|
511
|
-
[config]="gridConfig()"
|
|
512
|
-
(gridEvent)="onGridEvent($event)">
|
|
513
|
-
</cide-ele-data-grid>
|
|
514
|
-
|
|
515
|
-
<!-- Add/Edit Card Modal -->
|
|
516
|
-
@if (showModal()) {
|
|
517
|
-
<div class="tw-fixed tw-inset-0 tw-bg-black tw-bg-opacity-50 tw-flex tw-items-center tw-justify-center tw-z-50">
|
|
518
|
-
<div class="tw-bg-white tw-rounded-lg tw-p-6 tw-max-w-2xl tw-w-full tw-max-h-[90vh] tw-overflow-y-auto">
|
|
519
|
-
<h3 class="tw-text-xl tw-font-bold tw-mb-4">
|
|
520
|
-
{{ editingCard() ? 'Edit Card' : 'Add New Card' }}
|
|
521
|
-
</h3>
|
|
522
|
-
|
|
523
|
-
<form (ngSubmit)="saveCard()" class="tw-space-y-4">
|
|
524
|
-
<div class="tw-grid tw-grid-cols-2 tw-gap-4">
|
|
525
|
-
<div>
|
|
526
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Title</label>
|
|
527
|
-
<cide-ele-input
|
|
528
|
-
[(ngModel)]="cardForm.title"
|
|
529
|
-
[name]="'title'"
|
|
530
|
-
[required]="true"
|
|
531
|
-
[placeholder]="'Enter card title'">
|
|
532
|
-
</cide-ele-input>
|
|
533
|
-
</div>
|
|
534
|
-
|
|
535
|
-
<div>
|
|
536
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Type</label>
|
|
537
|
-
<cide-ele-select
|
|
538
|
-
[ngModel]="cardForm.type || 'custom'"
|
|
539
|
-
(ngModelChange)="onTypeChange($event)"
|
|
540
|
-
[options]="cardTypes"
|
|
541
|
-
[required]="true">
|
|
542
|
-
</cide-ele-select>
|
|
543
|
-
</div>
|
|
544
|
-
</div>
|
|
545
|
-
|
|
546
|
-
<div>
|
|
547
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Description</label>
|
|
548
|
-
<cide-ele-input
|
|
549
|
-
[(ngModel)]="cardForm.description"
|
|
550
|
-
[name]="'description'"
|
|
551
|
-
[type]="'text'"
|
|
552
|
-
[placeholder]="'Enter card description'">
|
|
553
|
-
</cide-ele-input>
|
|
554
|
-
</div>
|
|
555
|
-
|
|
556
|
-
<div>
|
|
557
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">API Endpoint</label>
|
|
558
|
-
<cide-ele-select
|
|
559
|
-
[ngModel]="cardForm.apiEndpoint"
|
|
560
|
-
(ngModelChange)="onApiEndpointChange($event)"
|
|
561
|
-
[options]="apiEndpointsOptions()"
|
|
562
|
-
[placeholder]="'Select API endpoint'">
|
|
563
|
-
</cide-ele-select>
|
|
564
|
-
</div>
|
|
565
|
-
|
|
566
|
-
<div class="tw-grid tw-grid-cols-2 tw-gap-4">
|
|
567
|
-
<div>
|
|
568
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Icon</label>
|
|
569
|
-
<cide-ele-input
|
|
570
|
-
[(ngModel)]="cardForm.icon"
|
|
571
|
-
[name]="'icon'"
|
|
572
|
-
[placeholder]="'e.g., dashboard, analytics'">
|
|
573
|
-
</cide-ele-input>
|
|
574
|
-
</div>
|
|
575
|
-
|
|
576
|
-
<div>
|
|
577
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Color</label>
|
|
578
|
-
<cide-ele-input
|
|
579
|
-
[(ngModel)]="cardForm.color"
|
|
580
|
-
[name]="'color'"
|
|
581
|
-
[type]="'text'"
|
|
582
|
-
[placeholder]="'#3B82F6'">
|
|
583
|
-
</cide-ele-input>
|
|
584
|
-
</div>
|
|
585
|
-
</div>
|
|
586
|
-
|
|
587
|
-
<div class="tw-grid tw-grid-cols-4 tw-gap-4">
|
|
588
|
-
<div>
|
|
589
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Row</label>
|
|
590
|
-
<cide-ele-input
|
|
591
|
-
[(ngModel)]="cardForm.position.row"
|
|
592
|
-
[name]="'row'"
|
|
593
|
-
[type]="'number'"
|
|
594
|
-
[min]="1">
|
|
595
|
-
</cide-ele-input>
|
|
596
|
-
</div>
|
|
597
|
-
|
|
598
|
-
<div>
|
|
599
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Col</label>
|
|
600
|
-
<cide-ele-input
|
|
601
|
-
[(ngModel)]="cardForm.position.col"
|
|
602
|
-
[name]="'col'"
|
|
603
|
-
[type]="'number'"
|
|
604
|
-
[min]="1">
|
|
605
|
-
</cide-ele-input>
|
|
606
|
-
</div>
|
|
607
|
-
|
|
608
|
-
<div>
|
|
609
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Col Span</label>
|
|
610
|
-
<cide-ele-input
|
|
611
|
-
[(ngModel)]="cardForm.position.colspan"
|
|
612
|
-
[name]="'colspan'"
|
|
613
|
-
[type]="'number'"
|
|
614
|
-
[min]="1"
|
|
615
|
-
[max]="12">
|
|
616
|
-
</cide-ele-input>
|
|
617
|
-
</div>
|
|
618
|
-
|
|
619
|
-
<div>
|
|
620
|
-
<label class="tw-block tw-text-sm tw-font-medium tw-mb-1">Row Span</label>
|
|
621
|
-
<cide-ele-input
|
|
622
|
-
[(ngModel)]="cardForm.position.rowspan"
|
|
623
|
-
[name]="'rowspan'"
|
|
624
|
-
[type]="'number'"
|
|
625
|
-
[min]="1">
|
|
626
|
-
</cide-ele-input>
|
|
627
|
-
</div>
|
|
628
|
-
</div>
|
|
629
|
-
|
|
630
|
-
<div class="tw-flex tw-gap-2 tw-pt-4">
|
|
631
|
-
<cide-ele-button
|
|
632
|
-
[label]="'Cancel'"
|
|
633
|
-
variant="secondary"
|
|
634
|
-
(click)="closeModal()">
|
|
635
|
-
</cide-ele-button>
|
|
636
|
-
<cide-ele-button
|
|
637
|
-
[label]="'Save'"
|
|
638
|
-
variant="primary"
|
|
639
|
-
[type]="'submit'">
|
|
640
|
-
</cide-ele-button>
|
|
641
|
-
</div>
|
|
642
|
-
</form>
|
|
643
|
-
</div>
|
|
644
|
-
</div>
|
|
645
|
-
}
|
|
646
|
-
</div>
|
|
647
|
-
</cide-lyt-shared-wrapper>
|
|
648
|
-
`
|
|
649
|
-
}]
|
|
650
|
-
}] });
|
|
651
|
-
|
|
652
|
-
export { DashboardManagerComponent };
|
|
653
|
-
//# sourceMappingURL=cloud-ide-layout-dashboard-manager.component-CHthRoQj.mjs.map
|