@memberjunction/ng-credentials 6.2.0-edge.0 → 6.2.0-edge.2
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/dist/lib/dialogs/credential-dialog.component.d.ts +18 -2
- package/dist/lib/dialogs/credential-dialog.component.d.ts.map +1 -1
- package/dist/lib/dialogs/credential-dialog.component.js +47 -15
- package/dist/lib/dialogs/credential-dialog.component.js.map +1 -1
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.d.ts +76 -8
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.d.ts.map +1 -1
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.js +164 -50
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.js.map +1 -1
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.d.ts +129 -16
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.d.ts.map +1 -1
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.js +338 -124
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.js.map +1 -1
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.d.ts +81 -9
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.d.ts.map +1 -1
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.js +207 -71
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.js.map +1 -1
- package/dist/lib/services/credential-dialog.service.d.ts +10 -0
- package/dist/lib/services/credential-dialog.service.d.ts.map +1 -1
- package/dist/lib/services/credential-dialog.service.js +27 -7
- package/dist/lib/services/credential-dialog.service.js.map +1 -1
- package/package.json +9 -9
|
@@ -8,23 +8,103 @@ import * as i3 from "@memberjunction/ng-shared-generic";
|
|
|
8
8
|
export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
9
9
|
cdr;
|
|
10
10
|
confirmService;
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
CredentialType = null;
|
|
12
|
+
/** @deprecated Use {@link CredentialType}. */
|
|
13
|
+
set credentialType(value) {
|
|
14
|
+
this.CredentialType = value;
|
|
15
|
+
}
|
|
16
|
+
/** @deprecated Use {@link CredentialType}. */
|
|
17
|
+
get credentialType() {
|
|
18
|
+
return this.CredentialType;
|
|
19
|
+
}
|
|
20
|
+
IsOpen = false;
|
|
21
|
+
/** @deprecated Use {@link IsOpen}. */
|
|
22
|
+
set isOpen(value) {
|
|
23
|
+
this.IsOpen = value;
|
|
24
|
+
}
|
|
25
|
+
/** @deprecated Use {@link IsOpen}. */
|
|
26
|
+
get isOpen() {
|
|
27
|
+
return this.IsOpen;
|
|
28
|
+
}
|
|
13
29
|
close = new EventEmitter();
|
|
14
|
-
|
|
15
|
-
|
|
30
|
+
Saved = new EventEmitter();
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use {@link Saved}.
|
|
33
|
+
*
|
|
34
|
+
* The same emitter under the old binding name, so a template still binding
|
|
35
|
+
* (saved) keeps working. Must stay AFTER Saved: class fields
|
|
36
|
+
* initialise in order, and the other way round this captures undefined.
|
|
37
|
+
*/
|
|
38
|
+
saved = this.Saved;
|
|
39
|
+
Deleted = new EventEmitter();
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Use {@link Deleted}.
|
|
42
|
+
*
|
|
43
|
+
* The same emitter under the old binding name, so a template still binding
|
|
44
|
+
* (deleted) keeps working. Must stay AFTER Deleted: class fields
|
|
45
|
+
* initialise in order, and the other way round this captures undefined.
|
|
46
|
+
*/
|
|
47
|
+
deleted = this.Deleted;
|
|
16
48
|
isLoading = false;
|
|
17
|
-
|
|
18
|
-
|
|
49
|
+
IsSaving = false;
|
|
50
|
+
/** @deprecated Use {@link IsSaving}. */
|
|
51
|
+
get isSaving() {
|
|
52
|
+
return this.IsSaving;
|
|
53
|
+
}
|
|
54
|
+
/** @deprecated Use {@link IsSaving}. */
|
|
55
|
+
set isSaving(value) {
|
|
56
|
+
this.IsSaving = value;
|
|
57
|
+
}
|
|
58
|
+
IsNew = false;
|
|
59
|
+
/** @deprecated Use {@link IsNew}. */
|
|
60
|
+
get isNew() {
|
|
61
|
+
return this.IsNew;
|
|
62
|
+
}
|
|
63
|
+
/** @deprecated Use {@link IsNew}. */
|
|
64
|
+
set isNew(value) {
|
|
65
|
+
this.IsNew = value;
|
|
66
|
+
}
|
|
19
67
|
// Form fields
|
|
20
68
|
name = '';
|
|
21
69
|
description = '';
|
|
22
70
|
category = 'Integration';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
71
|
+
IconClass = '';
|
|
72
|
+
/** @deprecated Use {@link IconClass}. */
|
|
73
|
+
get iconClass() {
|
|
74
|
+
return this.IconClass;
|
|
75
|
+
}
|
|
76
|
+
/** @deprecated Use {@link IconClass}. */
|
|
77
|
+
set iconClass(value) {
|
|
78
|
+
this.IconClass = value;
|
|
79
|
+
}
|
|
80
|
+
ValidationEndpoint = '';
|
|
81
|
+
/** @deprecated Use {@link ValidationEndpoint}. */
|
|
82
|
+
get validationEndpoint() {
|
|
83
|
+
return this.ValidationEndpoint;
|
|
84
|
+
}
|
|
85
|
+
/** @deprecated Use {@link ValidationEndpoint}. */
|
|
86
|
+
set validationEndpoint(value) {
|
|
87
|
+
this.ValidationEndpoint = value;
|
|
88
|
+
}
|
|
89
|
+
SchemaFields = [];
|
|
90
|
+
/** @deprecated Use {@link SchemaFields}. */
|
|
91
|
+
get schemaFields() {
|
|
92
|
+
return this.SchemaFields;
|
|
93
|
+
}
|
|
94
|
+
/** @deprecated Use {@link SchemaFields}. */
|
|
95
|
+
set schemaFields(value) {
|
|
96
|
+
this.SchemaFields = value;
|
|
97
|
+
}
|
|
26
98
|
// Available categories
|
|
27
|
-
|
|
99
|
+
Categories = ['AI', 'Authentication', 'Communication', 'Database', 'Integration', 'Storage'];
|
|
100
|
+
/** @deprecated Use {@link Categories}. */
|
|
101
|
+
get categories() {
|
|
102
|
+
return this.Categories;
|
|
103
|
+
}
|
|
104
|
+
/** @deprecated Use {@link Categories}. */
|
|
105
|
+
set categories(value) {
|
|
106
|
+
this.Categories = value;
|
|
107
|
+
}
|
|
28
108
|
get _metadata() { return this.ProviderToUse; }
|
|
29
109
|
constructor(cdr, confirmService) {
|
|
30
110
|
super();
|
|
@@ -32,17 +112,25 @@ export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
|
32
112
|
this.confirmService = confirmService;
|
|
33
113
|
}
|
|
34
114
|
ngOnInit() { }
|
|
115
|
+
get PanelTitle() {
|
|
116
|
+
return this.IsNew ? 'Create Credential Type' : 'Edit Credential Type';
|
|
117
|
+
}
|
|
118
|
+
/** @deprecated Use {@link PanelTitle}. */
|
|
35
119
|
get panelTitle() {
|
|
36
|
-
return this.
|
|
120
|
+
return this.PanelTitle;
|
|
37
121
|
}
|
|
38
|
-
get
|
|
122
|
+
get CanSave() {
|
|
39
123
|
return this.name.trim().length > 0 && this.category.length > 0;
|
|
40
124
|
}
|
|
41
|
-
|
|
125
|
+
/** @deprecated Use {@link CanSave}. */
|
|
126
|
+
get canSave() {
|
|
127
|
+
return this.CanSave;
|
|
128
|
+
}
|
|
129
|
+
async Open(credentialType) {
|
|
42
130
|
this.isLoading = true;
|
|
43
|
-
this.
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
131
|
+
this.IsOpen = true;
|
|
132
|
+
this.CredentialType = credentialType;
|
|
133
|
+
this.IsNew = !credentialType || !credentialType.ID;
|
|
46
134
|
this.cdr.markForCheck();
|
|
47
135
|
this.resetForm();
|
|
48
136
|
if (credentialType && credentialType.ID) {
|
|
@@ -51,33 +139,37 @@ export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
|
51
139
|
this.isLoading = false;
|
|
52
140
|
this.cdr.markForCheck();
|
|
53
141
|
}
|
|
142
|
+
/** @deprecated Use {@link Open}. */
|
|
143
|
+
async open(credentialType) {
|
|
144
|
+
return this.Open(credentialType);
|
|
145
|
+
}
|
|
54
146
|
resetForm() {
|
|
55
147
|
this.name = '';
|
|
56
148
|
this.description = '';
|
|
57
149
|
this.category = 'Integration';
|
|
58
|
-
this.
|
|
59
|
-
this.
|
|
60
|
-
this.
|
|
150
|
+
this.IconClass = '';
|
|
151
|
+
this.ValidationEndpoint = '';
|
|
152
|
+
this.SchemaFields = [];
|
|
61
153
|
}
|
|
62
154
|
populateFromType(credentialType) {
|
|
63
155
|
this.name = credentialType.Name || '';
|
|
64
156
|
this.description = credentialType.Description || '';
|
|
65
157
|
this.category = credentialType.Category || 'Integration';
|
|
66
|
-
this.
|
|
67
|
-
this.
|
|
158
|
+
this.IconClass = credentialType.IconClass || '';
|
|
159
|
+
this.ValidationEndpoint = credentialType.ValidationEndpoint || '';
|
|
68
160
|
// Parse field schema
|
|
69
161
|
this.parseFieldSchema(credentialType.FieldSchema);
|
|
70
162
|
}
|
|
71
163
|
parseFieldSchema(schemaJson) {
|
|
72
164
|
try {
|
|
73
165
|
if (!schemaJson) {
|
|
74
|
-
this.
|
|
166
|
+
this.SchemaFields = [];
|
|
75
167
|
return;
|
|
76
168
|
}
|
|
77
169
|
const schema = JSON.parse(schemaJson);
|
|
78
170
|
const properties = schema.properties || {};
|
|
79
171
|
const required = schema.required || [];
|
|
80
|
-
this.
|
|
172
|
+
this.SchemaFields = Object.entries(properties).map(([name, prop]) => ({
|
|
81
173
|
name,
|
|
82
174
|
type: prop.type || 'string',
|
|
83
175
|
title: prop.title || name,
|
|
@@ -86,21 +178,21 @@ export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
|
86
178
|
required: required.includes(name),
|
|
87
179
|
order: typeof prop.order === 'number' ? prop.order : 999
|
|
88
180
|
}));
|
|
89
|
-
this.
|
|
181
|
+
this.SchemaFields.sort((a, b) => a.order - b.order);
|
|
90
182
|
}
|
|
91
183
|
catch (e) {
|
|
92
184
|
console.error('Error parsing field schema:', e);
|
|
93
|
-
this.
|
|
185
|
+
this.SchemaFields = [];
|
|
94
186
|
}
|
|
95
187
|
}
|
|
96
188
|
buildFieldSchema() {
|
|
97
|
-
if (this.
|
|
189
|
+
if (this.SchemaFields.length === 0) {
|
|
98
190
|
return JSON.stringify({ type: 'object', properties: {}, required: [] });
|
|
99
191
|
}
|
|
100
192
|
const properties = {};
|
|
101
193
|
const required = [];
|
|
102
|
-
for (let i = 0; i < this.
|
|
103
|
-
const field = this.
|
|
194
|
+
for (let i = 0; i < this.SchemaFields.length; i++) {
|
|
195
|
+
const field = this.SchemaFields[i];
|
|
104
196
|
properties[field.name] = {
|
|
105
197
|
type: field.type,
|
|
106
198
|
title: field.title,
|
|
@@ -120,65 +212,81 @@ export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
|
120
212
|
}, null, 2);
|
|
121
213
|
}
|
|
122
214
|
// Schema field management
|
|
123
|
-
|
|
124
|
-
this.
|
|
215
|
+
AddSchemaField() {
|
|
216
|
+
this.SchemaFields.push({
|
|
125
217
|
name: '',
|
|
126
218
|
type: 'string',
|
|
127
219
|
title: '',
|
|
128
220
|
description: '',
|
|
129
221
|
isSecret: false,
|
|
130
222
|
required: false,
|
|
131
|
-
order: this.
|
|
223
|
+
order: this.SchemaFields.length
|
|
132
224
|
});
|
|
133
225
|
this.cdr.markForCheck();
|
|
134
226
|
}
|
|
135
|
-
|
|
136
|
-
|
|
227
|
+
/** @deprecated Use {@link AddSchemaField}. */
|
|
228
|
+
addSchemaField() {
|
|
229
|
+
return this.AddSchemaField();
|
|
230
|
+
}
|
|
231
|
+
RemoveSchemaField(index) {
|
|
232
|
+
this.SchemaFields.splice(index, 1);
|
|
137
233
|
this.cdr.markForCheck();
|
|
138
234
|
}
|
|
139
|
-
|
|
235
|
+
/** @deprecated Use {@link RemoveSchemaField}. */
|
|
236
|
+
removeSchemaField(index) {
|
|
237
|
+
return this.RemoveSchemaField(index);
|
|
238
|
+
}
|
|
239
|
+
MoveFieldUp(index) {
|
|
140
240
|
if (index > 0) {
|
|
141
|
-
const temp = this.
|
|
142
|
-
this.
|
|
143
|
-
this.
|
|
241
|
+
const temp = this.SchemaFields[index];
|
|
242
|
+
this.SchemaFields[index] = this.SchemaFields[index - 1];
|
|
243
|
+
this.SchemaFields[index - 1] = temp;
|
|
144
244
|
this.cdr.markForCheck();
|
|
145
245
|
}
|
|
146
246
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
247
|
+
/** @deprecated Use {@link MoveFieldUp}. */
|
|
248
|
+
moveFieldUp(index) {
|
|
249
|
+
return this.MoveFieldUp(index);
|
|
250
|
+
}
|
|
251
|
+
MoveFieldDown(index) {
|
|
252
|
+
if (index < this.SchemaFields.length - 1) {
|
|
253
|
+
const temp = this.SchemaFields[index];
|
|
254
|
+
this.SchemaFields[index] = this.SchemaFields[index + 1];
|
|
255
|
+
this.SchemaFields[index + 1] = temp;
|
|
152
256
|
this.cdr.markForCheck();
|
|
153
257
|
}
|
|
154
258
|
}
|
|
259
|
+
/** @deprecated Use {@link MoveFieldDown}. */
|
|
260
|
+
moveFieldDown(index) {
|
|
261
|
+
return this.MoveFieldDown(index);
|
|
262
|
+
}
|
|
155
263
|
async save() {
|
|
156
|
-
if (!this.
|
|
264
|
+
if (!this.CanSave) {
|
|
157
265
|
MJNotificationService.Instance.CreateSimpleNotification('Please fill in all required fields', 'warning', 3000);
|
|
158
266
|
return;
|
|
159
267
|
}
|
|
160
|
-
this.
|
|
268
|
+
this.IsSaving = true;
|
|
161
269
|
this.cdr.markForCheck();
|
|
162
270
|
try {
|
|
163
271
|
let entity;
|
|
164
|
-
if (this.
|
|
272
|
+
if (this.IsNew) {
|
|
165
273
|
entity = await this._metadata.GetEntityObject('MJ: Credential Types');
|
|
166
274
|
}
|
|
167
275
|
else {
|
|
168
|
-
entity = this.
|
|
276
|
+
entity = this.CredentialType;
|
|
169
277
|
}
|
|
170
278
|
entity.Name = this.name.trim();
|
|
171
279
|
entity.Description = this.description.trim() || null;
|
|
172
280
|
entity.Category = this.category;
|
|
173
|
-
entity.IconClass = this.
|
|
174
|
-
entity.ValidationEndpoint = this.
|
|
281
|
+
entity.IconClass = this.IconClass.trim() || null;
|
|
282
|
+
entity.ValidationEndpoint = this.ValidationEndpoint.trim() || null;
|
|
175
283
|
entity.FieldSchema = this.buildFieldSchema();
|
|
176
284
|
const success = await entity.Save();
|
|
177
285
|
if (success) {
|
|
178
|
-
const action = this.
|
|
286
|
+
const action = this.IsNew ? 'created' : 'updated';
|
|
179
287
|
MJNotificationService.Instance.CreateSimpleNotification(`Credential type "${entity.Name}" ${action} successfully`, 'success', 3000);
|
|
180
|
-
this.
|
|
181
|
-
this.
|
|
288
|
+
this.Saved.emit(entity);
|
|
289
|
+
this.ClosePanel();
|
|
182
290
|
}
|
|
183
291
|
else {
|
|
184
292
|
const errorMessage = entity.LatestResult?.Message || 'Unknown error';
|
|
@@ -191,27 +299,27 @@ export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
|
191
299
|
MJNotificationService.Instance.CreateSimpleNotification('Error saving credential type', 'error', 3000);
|
|
192
300
|
}
|
|
193
301
|
finally {
|
|
194
|
-
this.
|
|
302
|
+
this.IsSaving = false;
|
|
195
303
|
this.cdr.markForCheck();
|
|
196
304
|
}
|
|
197
305
|
}
|
|
198
|
-
async
|
|
199
|
-
if (this.
|
|
306
|
+
async DeleteType() {
|
|
307
|
+
if (this.IsNew || !this.CredentialType)
|
|
200
308
|
return;
|
|
201
|
-
const confirmed = await this.confirmService.ConfirmDelete({ title: 'Delete Type', message: `Delete "${this.
|
|
309
|
+
const confirmed = await this.confirmService.ConfirmDelete({ title: 'Delete Type', message: `Delete "${this.CredentialType.Name}"?`, detail: 'This action cannot be undone.' });
|
|
202
310
|
if (!confirmed)
|
|
203
311
|
return;
|
|
204
|
-
this.
|
|
312
|
+
this.IsSaving = true;
|
|
205
313
|
this.cdr.markForCheck();
|
|
206
314
|
try {
|
|
207
|
-
const success = await this.
|
|
315
|
+
const success = await this.CredentialType.Delete();
|
|
208
316
|
if (success) {
|
|
209
|
-
MJNotificationService.Instance.CreateSimpleNotification(`Credential type "${this.
|
|
210
|
-
this.
|
|
211
|
-
this.
|
|
317
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Credential type "${this.CredentialType.Name}" deleted successfully`, 'success', 3000);
|
|
318
|
+
this.Deleted.emit(this.CredentialType.ID);
|
|
319
|
+
this.ClosePanel();
|
|
212
320
|
}
|
|
213
321
|
else {
|
|
214
|
-
const errorMessage = this.
|
|
322
|
+
const errorMessage = this.CredentialType.LatestResult?.Message || 'Unknown error';
|
|
215
323
|
MJNotificationService.Instance.CreateSimpleNotification(`Failed to delete credential type: ${errorMessage}`, 'error', 5000);
|
|
216
324
|
}
|
|
217
325
|
}
|
|
@@ -220,23 +328,35 @@ export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
|
220
328
|
MJNotificationService.Instance.CreateSimpleNotification('Error deleting credential type', 'error', 3000);
|
|
221
329
|
}
|
|
222
330
|
finally {
|
|
223
|
-
this.
|
|
331
|
+
this.IsSaving = false;
|
|
224
332
|
this.cdr.markForCheck();
|
|
225
333
|
}
|
|
226
334
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
this.
|
|
335
|
+
/** @deprecated Use {@link DeleteType}. */
|
|
336
|
+
async deleteType() {
|
|
337
|
+
return this.DeleteType();
|
|
338
|
+
}
|
|
339
|
+
ClosePanel() {
|
|
340
|
+
this.IsOpen = false;
|
|
341
|
+
this.CredentialType = null;
|
|
230
342
|
this.resetForm();
|
|
231
343
|
this.close.emit();
|
|
232
344
|
this.cdr.markForCheck();
|
|
233
345
|
}
|
|
234
|
-
|
|
346
|
+
/** @deprecated Use {@link ClosePanel}. */
|
|
347
|
+
closePanel() {
|
|
348
|
+
return this.ClosePanel();
|
|
349
|
+
}
|
|
350
|
+
OnBackdropClick(event) {
|
|
235
351
|
if (event.target.classList.contains('panel-backdrop')) {
|
|
236
|
-
this.
|
|
352
|
+
this.ClosePanel();
|
|
237
353
|
}
|
|
238
354
|
}
|
|
239
|
-
|
|
355
|
+
/** @deprecated Use {@link OnBackdropClick}. */
|
|
356
|
+
onBackdropClick(event) {
|
|
357
|
+
return this.OnBackdropClick(event);
|
|
358
|
+
}
|
|
359
|
+
GetCategoryIcon(category) {
|
|
240
360
|
const iconMap = {
|
|
241
361
|
'AI': 'fa-solid fa-brain',
|
|
242
362
|
'Communication': 'fa-solid fa-envelope',
|
|
@@ -247,7 +367,11 @@ export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
|
247
367
|
};
|
|
248
368
|
return iconMap[category] || 'fa-solid fa-key';
|
|
249
369
|
}
|
|
250
|
-
|
|
370
|
+
/** @deprecated Use {@link GetCategoryIcon}. */
|
|
371
|
+
getCategoryIcon(category) {
|
|
372
|
+
return this.GetCategoryIcon(category);
|
|
373
|
+
}
|
|
374
|
+
GetCategoryColor(category) {
|
|
251
375
|
const colorMap = {
|
|
252
376
|
'AI': 'var(--mj-brand-primary)',
|
|
253
377
|
'Communication': 'var(--mj-brand-primary)',
|
|
@@ -258,20 +382,32 @@ export class CredentialTypeEditPanelComponent extends BaseAngularComponent {
|
|
|
258
382
|
};
|
|
259
383
|
return colorMap[category] || 'var(--mj-brand-primary)';
|
|
260
384
|
}
|
|
385
|
+
/** @deprecated Use {@link GetCategoryColor}. */
|
|
386
|
+
getCategoryColor(category) {
|
|
387
|
+
return this.GetCategoryColor(category);
|
|
388
|
+
}
|
|
261
389
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CredentialTypeEditPanelComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.MJConfirmService }], target: i0.ɵɵFactoryTarget.Component });
|
|
262
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: CredentialTypeEditPanelComponent, isStandalone: false, selector: "mj-credential-type-edit-panel", inputs: { credentialType: "credentialType", isOpen: "isOpen" }, outputs: { close: "close", saved: "saved", deleted: "deleted" }, usesInheritance: true, ngImport: i0, template: "@if (isOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"edit-panel\" [class.open]=\"isOpen\">\n <!-- Panel Header -->\n <div class=\"panel-header\">\n <div class=\"header-content\">\n <div class=\"header-icon\" [style.backgroundColor]=\"getCategoryColor(category) + '15'\" [style.color]=\"getCategoryColor(category)\">\n <i [class]=\"iconClass || getCategoryIcon(category)\"></i>\n </div>\n <div class=\"header-text\">\n <h2>{{panelTitle}}</h2>\n <span class=\"header-subtitle\">{{category}} credential type</span>\n </div>\n </div>\n <button class=\"close-btn\" (click)=\"closePanel()\" [disabled]=\"isSaving\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <!-- Panel Body -->\n <div class=\"panel-body\">\n @if (isLoading) {\n <mj-loading text=\"Loading...\"></mj-loading>\n }\n @if (!isLoading) {\n <form class=\"type-form\" (submit)=\"$event.preventDefault(); save()\">\n <!-- Basic Info Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Basic Information\n </h3>\n <div class=\"form-group\">\n <label for=\"typeName\" class=\"required\">Name</label>\n <input\n type=\"text\"\n id=\"typeName\"\n name=\"typeName\"\n [(ngModel)]=\"name\"\n placeholder=\"e.g., OpenAI, SendGrid, AWS S3\"\n [disabled]=\"isSaving\"\n required\n />\n </div>\n <div class=\"form-group\">\n <label for=\"typeCategory\" class=\"required\">Category</label>\n <div class=\"category-selector\">\n @for (cat of categories; track cat) {\n <button\n type=\"button\"\n class=\"category-btn\"\n [class.selected]=\"category === cat\"\n [style.--cat-color]=\"getCategoryColor(cat)\"\n (click)=\"category = cat\"\n [disabled]=\"isSaving\"\n >\n <i [class]=\"getCategoryIcon(cat)\"></i>\n <span>{{cat}}</span>\n </button>\n }\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"typeDescription\">Description</label>\n <textarea\n id=\"typeDescription\"\n name=\"typeDescription\"\n [(ngModel)]=\"description\"\n placeholder=\"Optional description of this credential type...\"\n rows=\"3\"\n [disabled]=\"isSaving\"\n ></textarea>\n </div>\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"typeIcon\">Icon Class</label>\n <input\n type=\"text\"\n id=\"typeIcon\"\n name=\"typeIcon\"\n [(ngModel)]=\"iconClass\"\n placeholder=\"e.g., fa-brands fa-openai\"\n [disabled]=\"isSaving\"\n />\n <span class=\"field-hint\">Font Awesome icon class</span>\n </div>\n <div class=\"form-group\">\n <label for=\"validationEndpoint\">Validation Endpoint</label>\n <input\n type=\"text\"\n id=\"validationEndpoint\"\n name=\"validationEndpoint\"\n [(ngModel)]=\"validationEndpoint\"\n placeholder=\"https://api.example.com/validate\"\n [disabled]=\"isSaving\"\n />\n <span class=\"field-hint\">Optional API endpoint to validate credentials</span>\n </div>\n </div>\n </div>\n <!-- Field Schema Section -->\n <div class=\"form-section\">\n <div class=\"section-header-row\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-list-check\"></i>\n Field Schema\n </h3>\n <button\n type=\"button\"\n class=\"btn-add-field\"\n (click)=\"addSchemaField()\"\n [disabled]=\"isSaving\"\n >\n <i class=\"fa-solid fa-plus\"></i>\n Add Field\n </button>\n </div>\n @if (schemaFields.length > 0) {\n <div class=\"schema-fields\">\n @for (field of schemaFields; track field; let i = $index) {\n <div class=\"schema-field\">\n <div class=\"field-drag-handle\">\n <button type=\"button\" class=\"move-btn\" (click)=\"moveFieldUp(i)\" [disabled]=\"i === 0 || isSaving\">\n <i class=\"fa-solid fa-chevron-up\"></i>\n </button>\n <button type=\"button\" class=\"move-btn\" (click)=\"moveFieldDown(i)\" [disabled]=\"i === schemaFields.length - 1 || isSaving\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n </div>\n <div class=\"field-content\">\n <div class=\"field-row\">\n <input\n type=\"text\"\n [name]=\"'fieldName_' + i\"\n [(ngModel)]=\"field.name\"\n placeholder=\"Field name (e.g., apiKey)\"\n class=\"field-name-input\"\n [disabled]=\"isSaving\"\n />\n <input\n type=\"text\"\n [name]=\"'fieldTitle_' + i\"\n [(ngModel)]=\"field.title\"\n placeholder=\"Display title\"\n class=\"field-title-input\"\n [disabled]=\"isSaving\"\n />\n <select [name]=\"'fieldType_' + i\" [(ngModel)]=\"field.type\" class=\"field-type-select\" [disabled]=\"isSaving\">\n <option value=\"string\">String</option>\n <option value=\"number\">Number</option>\n <option value=\"boolean\">Boolean</option>\n </select>\n </div>\n <div class=\"field-row\">\n <input\n type=\"text\"\n [name]=\"'fieldDesc_' + i\"\n [(ngModel)]=\"field.description\"\n placeholder=\"Field description (optional)\"\n class=\"field-desc-input\"\n [disabled]=\"isSaving\"\n />\n </div>\n <div class=\"field-options\">\n <label class=\"checkbox-label\">\n <input type=\"checkbox\" [name]=\"'fieldRequired_' + i\" [(ngModel)]=\"field.required\" [disabled]=\"isSaving\" />\n <span>Required</span>\n </label>\n <label class=\"checkbox-label\">\n <input type=\"checkbox\" [name]=\"'fieldSecret_' + i\" [(ngModel)]=\"field.isSecret\" [disabled]=\"isSaving\" />\n <span><i class=\"fa-solid fa-lock\"></i> Secret</span>\n </label>\n </div>\n </div>\n <button\n type=\"button\"\n class=\"remove-field-btn\"\n (click)=\"removeSchemaField(i)\"\n [disabled]=\"isSaving\"\n title=\"Remove field\"\n >\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n @if (schemaFields.length === 0) {\n <div class=\"no-fields-message\">\n <i class=\"fa-solid fa-info-circle\"></i>\n <span>No fields defined. Add fields that credentials of this type will need to store.</span>\n </div>\n }\n </div>\n </form>\n }\n </div>\n <!-- Panel Footer -->\n <div class=\"panel-footer\">\n <div class=\"footer-left\">\n @if (!isNew) {\n <button\n class=\"btn-delete\"\n (click)=\"deleteType()\"\n [disabled]=\"isSaving\"\n >\n <i class=\"fa-solid fa-trash\"></i>\n <span>Delete</span>\n </button>\n }\n </div>\n <div class=\"footer-right\">\n <button\n class=\"btn-secondary\"\n (click)=\"closePanel()\"\n [disabled]=\"isSaving\"\n >\n Cancel\n </button>\n <button\n class=\"btn-primary\"\n (click)=\"save()\"\n [disabled]=\"isSaving || !canSave\"\n >\n @if (isSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n @if (!isSaving) {\n <i class=\"fa-solid fa-check\"></i>\n }\n <span>{{isNew ? 'Create' : 'Save'}}</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n", styles: ["/* Panel Backdrop */\n.panel-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1000;\n display: flex;\n justify-content: flex-end;\n animation: fadeIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Slide-in Panel */\n.edit-panel {\n width: 100%;\n max-width: 600px;\n height: 100%;\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);\n transform: translateX(100%);\n animation: slideIn 0.3s ease-out forwards;\n}\n\n@keyframes slideIn {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n/* Panel Header */\n.panel-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.header-content {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n.header-icon {\n width: 48px;\n height: 48px;\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 20px;\n flex-shrink: 0;\n}\n\n.header-text h2 {\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 4px 0;\n}\n\n.header-subtitle {\n font-size: 13px;\n color: var(--mj-text-muted);\n}\n\n.close-btn {\n width: 36px;\n height: 36px;\n border: none;\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n cursor: pointer;\n color: var(--mj-text-muted);\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n}\n\n.close-btn:hover:not(:disabled) {\n background: var(--mj-border-default);\n color: var(--mj-text-secondary);\n}\n\n.close-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Panel Body */\n.panel-body {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch;\n}\n\n/* Form Sections */\n.form-section {\n margin-bottom: 28px;\n}\n\n.form-section:last-child {\n margin-bottom: 0;\n}\n\n.section-title {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n margin: 0 0 16px 0;\n padding-bottom: 10px;\n border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.section-title i {\n color: var(--mj-brand-primary);\n font-size: 14px;\n}\n\n.section-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n\n.section-header-row .section-title {\n margin: 0;\n padding: 0;\n border: none;\n}\n\n.btn-add-field {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-add-field:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.btn-add-field:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Form Groups */\n.form-group {\n margin-bottom: 18px;\n}\n\n.form-group:last-child {\n margin-bottom: 0;\n}\n\n.form-group label {\n display: block;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n margin-bottom: 6px;\n}\n\n.form-group label.required::after {\n content: '*';\n color: var(--mj-status-error);\n margin-left: 4px;\n}\n\n.form-group input[type=\"text\"],\n.form-group input[type=\"number\"],\n.form-group select,\n.form-group textarea {\n width: 100%;\n padding: 10px 14px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 8px;\n font-size: 14px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n transition: all 0.15s ease;\n box-sizing: border-box;\n}\n\n.form-group input:focus,\n.form-group select:focus,\n.form-group textarea:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.form-group input:disabled,\n.form-group select:disabled,\n.form-group textarea:disabled {\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-disabled);\n cursor: not-allowed;\n}\n\n.form-group textarea {\n resize: vertical;\n min-height: 80px;\n}\n\n.field-hint {\n display: block;\n font-size: 12px;\n color: var(--mj-text-disabled);\n margin-top: 5px;\n}\n\n.form-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n}\n\n/* Category Selector */\n.category-selector {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 10px;\n}\n\n.category-btn {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 6px;\n padding: 12px 8px;\n border: 2px solid var(--mj-border-default);\n border-radius: 10px;\n background: var(--mj-bg-surface);\n cursor: pointer;\n transition: all 0.2s ease;\n color: var(--mj-text-muted);\n}\n\n.category-btn i {\n font-size: 18px;\n}\n\n.category-btn span {\n font-size: 11px;\n font-weight: 500;\n}\n\n.category-btn:hover:not(:disabled) {\n border-color: var(--cat-color);\n background: color-mix(in srgb, var(--cat-color) 5%, var(--mj-bg-surface));\n}\n\n.category-btn.selected {\n border-color: var(--cat-color);\n background: color-mix(in srgb, var(--cat-color) 10%, var(--mj-bg-surface));\n color: var(--cat-color);\n}\n\n.category-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Schema Fields */\n.schema-fields {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.schema-field {\n display: flex;\n gap: 12px;\n padding: 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n}\n\n.field-drag-handle {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.move-btn {\n width: 24px;\n height: 24px;\n border: none;\n background: var(--mj-border-default);\n border-radius: 4px;\n cursor: pointer;\n color: var(--mj-text-muted);\n font-size: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n}\n\n.move-btn:hover:not(:disabled) {\n background: var(--mj-border-strong);\n color: var(--mj-text-secondary);\n}\n\n.move-btn:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.field-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.field-row {\n display: flex;\n gap: 10px;\n}\n\n.field-name-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n font-family: monospace;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-title-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-type-select {\n width: 100px;\n padding: 8px 10px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n cursor: pointer;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-desc-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-options {\n display: flex;\n gap: 16px;\n}\n\n.checkbox-label {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-text-muted);\n cursor: pointer;\n}\n\n.checkbox-label input[type=\"checkbox\"] {\n width: 14px;\n height: 14px;\n accent-color: var(--mj-brand-primary);\n}\n\n.checkbox-label i {\n font-size: 10px;\n color: var(--mj-status-warning);\n}\n\n.remove-field-btn {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: var(--mj-text-disabled);\n cursor: pointer;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n align-self: flex-start;\n}\n\n.remove-field-btn:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n}\n\n.remove-field-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.no-fields-message {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 16px;\n background: var(--mj-bg-surface-card);\n border: 2px dashed var(--mj-border-default);\n border-radius: 10px;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n.no-fields-message i {\n color: var(--mj-text-disabled);\n}\n\n/* Panel Footer */\n.panel-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.footer-left,\n.footer-right {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.btn-primary,\n.btn-secondary,\n.btn-delete {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-primary {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.btn-primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.btn-primary:disabled {\n background: color-mix(in srgb, var(--mj-brand-primary) 25%, var(--mj-bg-surface));\n cursor: not-allowed;\n}\n\n.btn-secondary {\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-strong);\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: var(--mj-bg-surface-sunken);\n border-color: var(--mj-text-disabled);\n}\n\n.btn-secondary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-delete {\n background: transparent;\n color: var(--mj-status-error);\n padding: 10px 16px;\n}\n\n.btn-delete:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n}\n\n.btn-delete:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Mobile Responsiveness */\n@media (max-width: 768px) {\n .edit-panel {\n max-width: 100%;\n }\n\n .panel-header {\n padding: 16px 20px;\n }\n\n .header-icon {\n width: 40px;\n height: 40px;\n font-size: 18px;\n }\n\n .header-text h2 {\n font-size: 16px;\n }\n\n .panel-body {\n padding: 20px;\n }\n\n .form-row {\n grid-template-columns: 1fr;\n }\n\n .category-selector {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .schema-field {\n flex-direction: column;\n }\n\n .field-drag-handle {\n flex-direction: row;\n justify-content: flex-end;\n order: 1;\n }\n\n .field-content {\n order: 0;\n }\n\n .remove-field-btn {\n order: 2;\n align-self: flex-end;\n }\n\n .field-row {\n flex-direction: column;\n }\n\n .field-type-select {\n width: 100%;\n }\n\n .panel-footer {\n padding: 14px 20px;\n flex-direction: column-reverse;\n gap: 12px;\n }\n\n .footer-left,\n .footer-right {\n width: 100%;\n }\n\n .footer-right {\n flex-direction: row;\n }\n\n .footer-right .btn-primary,\n .footer-right .btn-secondary {\n flex: 1;\n justify-content: center;\n }\n\n .btn-delete {\n width: 100%;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n }\n}\n\n@media (max-width: 480px) {\n .panel-header {\n padding: 14px 16px;\n }\n\n .header-content {\n gap: 12px;\n }\n\n .header-icon {\n width: 36px;\n height: 36px;\n font-size: 16px;\n border-radius: 10px;\n }\n\n .header-text h2 {\n font-size: 15px;\n }\n\n .header-subtitle {\n font-size: 12px;\n }\n\n .panel-body {\n padding: 16px;\n }\n\n .category-selector {\n grid-template-columns: repeat(3, 1fr);\n }\n\n .category-btn {\n padding: 10px 6px;\n }\n\n .category-btn i {\n font-size: 16px;\n }\n\n .category-btn span {\n font-size: 10px;\n }\n\n .schema-field {\n padding: 12px;\n }\n\n .field-name-input,\n .field-title-input,\n .field-desc-input,\n .field-type-select {\n font-size: 14px;\n padding: 10px 12px;\n }\n\n .panel-footer {\n padding: 12px 16px;\n }\n\n .btn-primary,\n .btn-secondary {\n padding: 10px 16px;\n font-size: 13px;\n }\n}\n\n/* Custom scrollbar */\n.panel-body::-webkit-scrollbar {\n width: 6px;\n}\n\n.panel-body::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.panel-body::-webkit-scrollbar-thumb {\n background: var(--mj-border-strong);\n border-radius: 3px;\n}\n\n.panel-body::-webkit-scrollbar-thumb:hover {\n background: var(--mj-text-disabled);\n}\n\n/* Animations */\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n.fa-spin {\n animation: spin 1s linear infinite;\n}\n"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3.LoadingComponent, selector: "mj-loading", inputs: ["text", "showText", "animationDuration", "size", "textColor", "logoColor", "logoGradient", "animation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
390
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.22", type: CredentialTypeEditPanelComponent, isStandalone: false, selector: "mj-credential-type-edit-panel", inputs: { CredentialType: "CredentialType", credentialType: "credentialType", IsOpen: "IsOpen", isOpen: "isOpen" }, outputs: { close: "close", Saved: "Saved", saved: "saved", Deleted: "Deleted", deleted: "deleted" }, usesInheritance: true, ngImport: i0, template: "@if (isOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"edit-panel\" [class.open]=\"isOpen\">\n <!-- Panel Header -->\n <div class=\"panel-header\">\n <div class=\"header-content\">\n <div class=\"header-icon\" [style.backgroundColor]=\"getCategoryColor(category) + '15'\" [style.color]=\"getCategoryColor(category)\">\n <i [class]=\"iconClass || getCategoryIcon(category)\"></i>\n </div>\n <div class=\"header-text\">\n <h2>{{panelTitle}}</h2>\n <span class=\"header-subtitle\">{{category}} credential type</span>\n </div>\n </div>\n <button class=\"close-btn\" (click)=\"closePanel()\" [disabled]=\"isSaving\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <!-- Panel Body -->\n <div class=\"panel-body\">\n @if (isLoading) {\n <mj-loading text=\"Loading...\"></mj-loading>\n }\n @if (!isLoading) {\n <form class=\"type-form\" (submit)=\"$event.preventDefault(); save()\">\n <!-- Basic Info Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Basic Information\n </h3>\n <div class=\"form-group\">\n <label for=\"typeName\" class=\"required\">Name</label>\n <input\n type=\"text\"\n id=\"typeName\"\n name=\"typeName\"\n [(ngModel)]=\"name\"\n placeholder=\"e.g., OpenAI, SendGrid, AWS S3\"\n [disabled]=\"isSaving\"\n required\n />\n </div>\n <div class=\"form-group\">\n <label for=\"typeCategory\" class=\"required\">Category</label>\n <div class=\"category-selector\">\n @for (cat of categories; track cat) {\n <button\n type=\"button\"\n class=\"category-btn\"\n [class.selected]=\"category === cat\"\n [style.--cat-color]=\"getCategoryColor(cat)\"\n (click)=\"category = cat\"\n [disabled]=\"isSaving\"\n >\n <i [class]=\"getCategoryIcon(cat)\"></i>\n <span>{{cat}}</span>\n </button>\n }\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"typeDescription\">Description</label>\n <textarea\n id=\"typeDescription\"\n name=\"typeDescription\"\n [(ngModel)]=\"description\"\n placeholder=\"Optional description of this credential type...\"\n rows=\"3\"\n [disabled]=\"isSaving\"\n ></textarea>\n </div>\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"typeIcon\">Icon Class</label>\n <input\n type=\"text\"\n id=\"typeIcon\"\n name=\"typeIcon\"\n [(ngModel)]=\"iconClass\"\n placeholder=\"e.g., fa-brands fa-openai\"\n [disabled]=\"isSaving\"\n />\n <span class=\"field-hint\">Font Awesome icon class</span>\n </div>\n <div class=\"form-group\">\n <label for=\"validationEndpoint\">Validation Endpoint</label>\n <input\n type=\"text\"\n id=\"validationEndpoint\"\n name=\"validationEndpoint\"\n [(ngModel)]=\"validationEndpoint\"\n placeholder=\"https://api.example.com/validate\"\n [disabled]=\"isSaving\"\n />\n <span class=\"field-hint\">Optional API endpoint to validate credentials</span>\n </div>\n </div>\n </div>\n <!-- Field Schema Section -->\n <div class=\"form-section\">\n <div class=\"section-header-row\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-list-check\"></i>\n Field Schema\n </h3>\n <button\n type=\"button\"\n class=\"btn-add-field\"\n (click)=\"addSchemaField()\"\n [disabled]=\"isSaving\"\n >\n <i class=\"fa-solid fa-plus\"></i>\n Add Field\n </button>\n </div>\n @if (schemaFields.length > 0) {\n <div class=\"schema-fields\">\n @for (field of schemaFields; track field; let i = $index) {\n <div class=\"schema-field\">\n <div class=\"field-drag-handle\">\n <button type=\"button\" class=\"move-btn\" (click)=\"moveFieldUp(i)\" [disabled]=\"i === 0 || isSaving\">\n <i class=\"fa-solid fa-chevron-up\"></i>\n </button>\n <button type=\"button\" class=\"move-btn\" (click)=\"moveFieldDown(i)\" [disabled]=\"i === schemaFields.length - 1 || isSaving\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n </div>\n <div class=\"field-content\">\n <div class=\"field-row\">\n <input\n type=\"text\"\n [name]=\"'fieldName_' + i\"\n [(ngModel)]=\"field.name\"\n placeholder=\"Field name (e.g., apiKey)\"\n class=\"field-name-input\"\n [disabled]=\"isSaving\"\n />\n <input\n type=\"text\"\n [name]=\"'fieldTitle_' + i\"\n [(ngModel)]=\"field.title\"\n placeholder=\"Display title\"\n class=\"field-title-input\"\n [disabled]=\"isSaving\"\n />\n <select [name]=\"'fieldType_' + i\" [(ngModel)]=\"field.type\" class=\"field-type-select\" [disabled]=\"isSaving\">\n <option value=\"string\">String</option>\n <option value=\"number\">Number</option>\n <option value=\"boolean\">Boolean</option>\n </select>\n </div>\n <div class=\"field-row\">\n <input\n type=\"text\"\n [name]=\"'fieldDesc_' + i\"\n [(ngModel)]=\"field.description\"\n placeholder=\"Field description (optional)\"\n class=\"field-desc-input\"\n [disabled]=\"isSaving\"\n />\n </div>\n <div class=\"field-options\">\n <label class=\"checkbox-label\">\n <input type=\"checkbox\" [name]=\"'fieldRequired_' + i\" [(ngModel)]=\"field.required\" [disabled]=\"isSaving\" />\n <span>Required</span>\n </label>\n <label class=\"checkbox-label\">\n <input type=\"checkbox\" [name]=\"'fieldSecret_' + i\" [(ngModel)]=\"field.isSecret\" [disabled]=\"isSaving\" />\n <span><i class=\"fa-solid fa-lock\"></i> Secret</span>\n </label>\n </div>\n </div>\n <button\n type=\"button\"\n class=\"remove-field-btn\"\n (click)=\"removeSchemaField(i)\"\n [disabled]=\"isSaving\"\n title=\"Remove field\"\n >\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n @if (schemaFields.length === 0) {\n <div class=\"no-fields-message\">\n <i class=\"fa-solid fa-info-circle\"></i>\n <span>No fields defined. Add fields that credentials of this type will need to store.</span>\n </div>\n }\n </div>\n </form>\n }\n </div>\n <!-- Panel Footer -->\n <div class=\"panel-footer\">\n <div class=\"footer-left\">\n @if (!isNew) {\n <button\n class=\"btn-delete\"\n (click)=\"deleteType()\"\n [disabled]=\"isSaving\"\n >\n <i class=\"fa-solid fa-trash\"></i>\n <span>Delete</span>\n </button>\n }\n </div>\n <div class=\"footer-right\">\n <button\n class=\"btn-secondary\"\n (click)=\"closePanel()\"\n [disabled]=\"isSaving\"\n >\n Cancel\n </button>\n <button\n class=\"btn-primary\"\n (click)=\"save()\"\n [disabled]=\"isSaving || !canSave\"\n >\n @if (isSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n @if (!isSaving) {\n <i class=\"fa-solid fa-check\"></i>\n }\n <span>{{isNew ? 'Create' : 'Save'}}</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n", styles: ["/* Panel Backdrop */\n.panel-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1000;\n display: flex;\n justify-content: flex-end;\n animation: fadeIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Slide-in Panel */\n.edit-panel {\n width: 100%;\n max-width: 600px;\n height: 100%;\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);\n transform: translateX(100%);\n animation: slideIn 0.3s ease-out forwards;\n}\n\n@keyframes slideIn {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n/* Panel Header */\n.panel-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.header-content {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n.header-icon {\n width: 48px;\n height: 48px;\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 20px;\n flex-shrink: 0;\n}\n\n.header-text h2 {\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 4px 0;\n}\n\n.header-subtitle {\n font-size: 13px;\n color: var(--mj-text-muted);\n}\n\n.close-btn {\n width: 36px;\n height: 36px;\n border: none;\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n cursor: pointer;\n color: var(--mj-text-muted);\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n}\n\n.close-btn:hover:not(:disabled) {\n background: var(--mj-border-default);\n color: var(--mj-text-secondary);\n}\n\n.close-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Panel Body */\n.panel-body {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch;\n}\n\n/* Form Sections */\n.form-section {\n margin-bottom: 28px;\n}\n\n.form-section:last-child {\n margin-bottom: 0;\n}\n\n.section-title {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n margin: 0 0 16px 0;\n padding-bottom: 10px;\n border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.section-title i {\n color: var(--mj-brand-primary);\n font-size: 14px;\n}\n\n.section-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n\n.section-header-row .section-title {\n margin: 0;\n padding: 0;\n border: none;\n}\n\n.btn-add-field {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-add-field:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.btn-add-field:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Form Groups */\n.form-group {\n margin-bottom: 18px;\n}\n\n.form-group:last-child {\n margin-bottom: 0;\n}\n\n.form-group label {\n display: block;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n margin-bottom: 6px;\n}\n\n.form-group label.required::after {\n content: '*';\n color: var(--mj-status-error);\n margin-left: 4px;\n}\n\n.form-group input[type=\"text\"],\n.form-group input[type=\"number\"],\n.form-group select,\n.form-group textarea {\n width: 100%;\n padding: 10px 14px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 8px;\n font-size: 14px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n transition: all 0.15s ease;\n box-sizing: border-box;\n}\n\n.form-group input:focus,\n.form-group select:focus,\n.form-group textarea:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.form-group input:disabled,\n.form-group select:disabled,\n.form-group textarea:disabled {\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-disabled);\n cursor: not-allowed;\n}\n\n.form-group textarea {\n resize: vertical;\n min-height: 80px;\n}\n\n.field-hint {\n display: block;\n font-size: 12px;\n color: var(--mj-text-disabled);\n margin-top: 5px;\n}\n\n.form-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n}\n\n/* Category Selector */\n.category-selector {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 10px;\n}\n\n.category-btn {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 6px;\n padding: 12px 8px;\n border: 2px solid var(--mj-border-default);\n border-radius: 10px;\n background: var(--mj-bg-surface);\n cursor: pointer;\n transition: all 0.2s ease;\n color: var(--mj-text-muted);\n}\n\n.category-btn i {\n font-size: 18px;\n}\n\n.category-btn span {\n font-size: 11px;\n font-weight: 500;\n}\n\n.category-btn:hover:not(:disabled) {\n border-color: var(--cat-color);\n background: color-mix(in srgb, var(--cat-color) 5%, var(--mj-bg-surface));\n}\n\n.category-btn.selected {\n border-color: var(--cat-color);\n background: color-mix(in srgb, var(--cat-color) 10%, var(--mj-bg-surface));\n color: var(--cat-color);\n}\n\n.category-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Schema Fields */\n.schema-fields {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.schema-field {\n display: flex;\n gap: 12px;\n padding: 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n}\n\n.field-drag-handle {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.move-btn {\n width: 24px;\n height: 24px;\n border: none;\n background: var(--mj-border-default);\n border-radius: 4px;\n cursor: pointer;\n color: var(--mj-text-muted);\n font-size: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n}\n\n.move-btn:hover:not(:disabled) {\n background: var(--mj-border-strong);\n color: var(--mj-text-secondary);\n}\n\n.move-btn:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.field-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.field-row {\n display: flex;\n gap: 10px;\n}\n\n.field-name-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n font-family: monospace;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-title-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-type-select {\n width: 100px;\n padding: 8px 10px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n cursor: pointer;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-desc-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-options {\n display: flex;\n gap: 16px;\n}\n\n.checkbox-label {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-text-muted);\n cursor: pointer;\n}\n\n.checkbox-label input[type=\"checkbox\"] {\n width: 14px;\n height: 14px;\n accent-color: var(--mj-brand-primary);\n}\n\n.checkbox-label i {\n font-size: 10px;\n color: var(--mj-status-warning);\n}\n\n.remove-field-btn {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: var(--mj-text-disabled);\n cursor: pointer;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n align-self: flex-start;\n}\n\n.remove-field-btn:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n}\n\n.remove-field-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.no-fields-message {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 16px;\n background: var(--mj-bg-surface-card);\n border: 2px dashed var(--mj-border-default);\n border-radius: 10px;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n.no-fields-message i {\n color: var(--mj-text-disabled);\n}\n\n/* Panel Footer */\n.panel-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.footer-left,\n.footer-right {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.btn-primary,\n.btn-secondary,\n.btn-delete {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-primary {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.btn-primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.btn-primary:disabled {\n background: color-mix(in srgb, var(--mj-brand-primary) 25%, var(--mj-bg-surface));\n cursor: not-allowed;\n}\n\n.btn-secondary {\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-strong);\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: var(--mj-bg-surface-sunken);\n border-color: var(--mj-text-disabled);\n}\n\n.btn-secondary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-delete {\n background: transparent;\n color: var(--mj-status-error);\n padding: 10px 16px;\n}\n\n.btn-delete:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n}\n\n.btn-delete:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Mobile Responsiveness */\n@media (max-width: 768px) {\n .edit-panel {\n max-width: 100%;\n }\n\n .panel-header {\n padding: 16px 20px;\n }\n\n .header-icon {\n width: 40px;\n height: 40px;\n font-size: 18px;\n }\n\n .header-text h2 {\n font-size: 16px;\n }\n\n .panel-body {\n padding: 20px;\n }\n\n .form-row {\n grid-template-columns: 1fr;\n }\n\n .category-selector {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .schema-field {\n flex-direction: column;\n }\n\n .field-drag-handle {\n flex-direction: row;\n justify-content: flex-end;\n order: 1;\n }\n\n .field-content {\n order: 0;\n }\n\n .remove-field-btn {\n order: 2;\n align-self: flex-end;\n }\n\n .field-row {\n flex-direction: column;\n }\n\n .field-type-select {\n width: 100%;\n }\n\n .panel-footer {\n padding: 14px 20px;\n flex-direction: column-reverse;\n gap: 12px;\n }\n\n .footer-left,\n .footer-right {\n width: 100%;\n }\n\n .footer-right {\n flex-direction: row;\n }\n\n .footer-right .btn-primary,\n .footer-right .btn-secondary {\n flex: 1;\n justify-content: center;\n }\n\n .btn-delete {\n width: 100%;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n }\n}\n\n@media (max-width: 480px) {\n .panel-header {\n padding: 14px 16px;\n }\n\n .header-content {\n gap: 12px;\n }\n\n .header-icon {\n width: 36px;\n height: 36px;\n font-size: 16px;\n border-radius: 10px;\n }\n\n .header-text h2 {\n font-size: 15px;\n }\n\n .header-subtitle {\n font-size: 12px;\n }\n\n .panel-body {\n padding: 16px;\n }\n\n .category-selector {\n grid-template-columns: repeat(3, 1fr);\n }\n\n .category-btn {\n padding: 10px 6px;\n }\n\n .category-btn i {\n font-size: 16px;\n }\n\n .category-btn span {\n font-size: 10px;\n }\n\n .schema-field {\n padding: 12px;\n }\n\n .field-name-input,\n .field-title-input,\n .field-desc-input,\n .field-type-select {\n font-size: 14px;\n padding: 10px 12px;\n }\n\n .panel-footer {\n padding: 12px 16px;\n }\n\n .btn-primary,\n .btn-secondary {\n padding: 10px 16px;\n font-size: 13px;\n }\n}\n\n/* Custom scrollbar */\n.panel-body::-webkit-scrollbar {\n width: 6px;\n}\n\n.panel-body::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.panel-body::-webkit-scrollbar-thumb {\n background: var(--mj-border-strong);\n border-radius: 3px;\n}\n\n.panel-body::-webkit-scrollbar-thumb:hover {\n background: var(--mj-text-disabled);\n}\n\n/* Animations */\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n.fa-spin {\n animation: spin 1s linear infinite;\n}\n"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { 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.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i3.LoadingComponent, selector: "mj-loading", inputs: ["Text", "text", "ShowText", "showText", "AnimationDuration", "animationDuration", "Size", "size", "TextColor", "textColor", "LogoColor", "logoColor", "LogoGradient", "logoGradient", "Animation", "animation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
263
391
|
}
|
|
264
392
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.22", ngImport: i0, type: CredentialTypeEditPanelComponent, decorators: [{
|
|
265
393
|
type: Component,
|
|
266
394
|
args: [{ standalone: false, selector: 'mj-credential-type-edit-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isOpen) {\n <div class=\"panel-backdrop\" (click)=\"onBackdropClick($event)\">\n <div class=\"edit-panel\" [class.open]=\"isOpen\">\n <!-- Panel Header -->\n <div class=\"panel-header\">\n <div class=\"header-content\">\n <div class=\"header-icon\" [style.backgroundColor]=\"getCategoryColor(category) + '15'\" [style.color]=\"getCategoryColor(category)\">\n <i [class]=\"iconClass || getCategoryIcon(category)\"></i>\n </div>\n <div class=\"header-text\">\n <h2>{{panelTitle}}</h2>\n <span class=\"header-subtitle\">{{category}} credential type</span>\n </div>\n </div>\n <button class=\"close-btn\" (click)=\"closePanel()\" [disabled]=\"isSaving\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n <!-- Panel Body -->\n <div class=\"panel-body\">\n @if (isLoading) {\n <mj-loading text=\"Loading...\"></mj-loading>\n }\n @if (!isLoading) {\n <form class=\"type-form\" (submit)=\"$event.preventDefault(); save()\">\n <!-- Basic Info Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Basic Information\n </h3>\n <div class=\"form-group\">\n <label for=\"typeName\" class=\"required\">Name</label>\n <input\n type=\"text\"\n id=\"typeName\"\n name=\"typeName\"\n [(ngModel)]=\"name\"\n placeholder=\"e.g., OpenAI, SendGrid, AWS S3\"\n [disabled]=\"isSaving\"\n required\n />\n </div>\n <div class=\"form-group\">\n <label for=\"typeCategory\" class=\"required\">Category</label>\n <div class=\"category-selector\">\n @for (cat of categories; track cat) {\n <button\n type=\"button\"\n class=\"category-btn\"\n [class.selected]=\"category === cat\"\n [style.--cat-color]=\"getCategoryColor(cat)\"\n (click)=\"category = cat\"\n [disabled]=\"isSaving\"\n >\n <i [class]=\"getCategoryIcon(cat)\"></i>\n <span>{{cat}}</span>\n </button>\n }\n </div>\n </div>\n <div class=\"form-group\">\n <label for=\"typeDescription\">Description</label>\n <textarea\n id=\"typeDescription\"\n name=\"typeDescription\"\n [(ngModel)]=\"description\"\n placeholder=\"Optional description of this credential type...\"\n rows=\"3\"\n [disabled]=\"isSaving\"\n ></textarea>\n </div>\n <div class=\"form-row\">\n <div class=\"form-group\">\n <label for=\"typeIcon\">Icon Class</label>\n <input\n type=\"text\"\n id=\"typeIcon\"\n name=\"typeIcon\"\n [(ngModel)]=\"iconClass\"\n placeholder=\"e.g., fa-brands fa-openai\"\n [disabled]=\"isSaving\"\n />\n <span class=\"field-hint\">Font Awesome icon class</span>\n </div>\n <div class=\"form-group\">\n <label for=\"validationEndpoint\">Validation Endpoint</label>\n <input\n type=\"text\"\n id=\"validationEndpoint\"\n name=\"validationEndpoint\"\n [(ngModel)]=\"validationEndpoint\"\n placeholder=\"https://api.example.com/validate\"\n [disabled]=\"isSaving\"\n />\n <span class=\"field-hint\">Optional API endpoint to validate credentials</span>\n </div>\n </div>\n </div>\n <!-- Field Schema Section -->\n <div class=\"form-section\">\n <div class=\"section-header-row\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-list-check\"></i>\n Field Schema\n </h3>\n <button\n type=\"button\"\n class=\"btn-add-field\"\n (click)=\"addSchemaField()\"\n [disabled]=\"isSaving\"\n >\n <i class=\"fa-solid fa-plus\"></i>\n Add Field\n </button>\n </div>\n @if (schemaFields.length > 0) {\n <div class=\"schema-fields\">\n @for (field of schemaFields; track field; let i = $index) {\n <div class=\"schema-field\">\n <div class=\"field-drag-handle\">\n <button type=\"button\" class=\"move-btn\" (click)=\"moveFieldUp(i)\" [disabled]=\"i === 0 || isSaving\">\n <i class=\"fa-solid fa-chevron-up\"></i>\n </button>\n <button type=\"button\" class=\"move-btn\" (click)=\"moveFieldDown(i)\" [disabled]=\"i === schemaFields.length - 1 || isSaving\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n </div>\n <div class=\"field-content\">\n <div class=\"field-row\">\n <input\n type=\"text\"\n [name]=\"'fieldName_' + i\"\n [(ngModel)]=\"field.name\"\n placeholder=\"Field name (e.g., apiKey)\"\n class=\"field-name-input\"\n [disabled]=\"isSaving\"\n />\n <input\n type=\"text\"\n [name]=\"'fieldTitle_' + i\"\n [(ngModel)]=\"field.title\"\n placeholder=\"Display title\"\n class=\"field-title-input\"\n [disabled]=\"isSaving\"\n />\n <select [name]=\"'fieldType_' + i\" [(ngModel)]=\"field.type\" class=\"field-type-select\" [disabled]=\"isSaving\">\n <option value=\"string\">String</option>\n <option value=\"number\">Number</option>\n <option value=\"boolean\">Boolean</option>\n </select>\n </div>\n <div class=\"field-row\">\n <input\n type=\"text\"\n [name]=\"'fieldDesc_' + i\"\n [(ngModel)]=\"field.description\"\n placeholder=\"Field description (optional)\"\n class=\"field-desc-input\"\n [disabled]=\"isSaving\"\n />\n </div>\n <div class=\"field-options\">\n <label class=\"checkbox-label\">\n <input type=\"checkbox\" [name]=\"'fieldRequired_' + i\" [(ngModel)]=\"field.required\" [disabled]=\"isSaving\" />\n <span>Required</span>\n </label>\n <label class=\"checkbox-label\">\n <input type=\"checkbox\" [name]=\"'fieldSecret_' + i\" [(ngModel)]=\"field.isSecret\" [disabled]=\"isSaving\" />\n <span><i class=\"fa-solid fa-lock\"></i> Secret</span>\n </label>\n </div>\n </div>\n <button\n type=\"button\"\n class=\"remove-field-btn\"\n (click)=\"removeSchemaField(i)\"\n [disabled]=\"isSaving\"\n title=\"Remove field\"\n >\n <i class=\"fa-solid fa-trash\"></i>\n </button>\n </div>\n }\n </div>\n }\n @if (schemaFields.length === 0) {\n <div class=\"no-fields-message\">\n <i class=\"fa-solid fa-info-circle\"></i>\n <span>No fields defined. Add fields that credentials of this type will need to store.</span>\n </div>\n }\n </div>\n </form>\n }\n </div>\n <!-- Panel Footer -->\n <div class=\"panel-footer\">\n <div class=\"footer-left\">\n @if (!isNew) {\n <button\n class=\"btn-delete\"\n (click)=\"deleteType()\"\n [disabled]=\"isSaving\"\n >\n <i class=\"fa-solid fa-trash\"></i>\n <span>Delete</span>\n </button>\n }\n </div>\n <div class=\"footer-right\">\n <button\n class=\"btn-secondary\"\n (click)=\"closePanel()\"\n [disabled]=\"isSaving\"\n >\n Cancel\n </button>\n <button\n class=\"btn-primary\"\n (click)=\"save()\"\n [disabled]=\"isSaving || !canSave\"\n >\n @if (isSaving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n }\n @if (!isSaving) {\n <i class=\"fa-solid fa-check\"></i>\n }\n <span>{{isNew ? 'Create' : 'Save'}}</span>\n </button>\n </div>\n </div>\n </div>\n </div>\n}\n", styles: ["/* Panel Backdrop */\n.panel-backdrop {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.5);\n z-index: 1000;\n display: flex;\n justify-content: flex-end;\n animation: fadeIn 0.2s ease-out;\n}\n\n@keyframes fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n/* Slide-in Panel */\n.edit-panel {\n width: 100%;\n max-width: 600px;\n height: 100%;\n background: var(--mj-bg-surface);\n display: flex;\n flex-direction: column;\n box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);\n transform: translateX(100%);\n animation: slideIn 0.3s ease-out forwards;\n}\n\n@keyframes slideIn {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n/* Panel Header */\n.panel-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 20px 24px;\n border-bottom: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.header-content {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n.header-icon {\n width: 48px;\n height: 48px;\n border-radius: 12px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 20px;\n flex-shrink: 0;\n}\n\n.header-text h2 {\n font-size: 18px;\n font-weight: 600;\n color: var(--mj-text-primary);\n margin: 0 0 4px 0;\n}\n\n.header-subtitle {\n font-size: 13px;\n color: var(--mj-text-muted);\n}\n\n.close-btn {\n width: 36px;\n height: 36px;\n border: none;\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n cursor: pointer;\n color: var(--mj-text-muted);\n font-size: 16px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n}\n\n.close-btn:hover:not(:disabled) {\n background: var(--mj-border-default);\n color: var(--mj-text-secondary);\n}\n\n.close-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Panel Body */\n.panel-body {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch;\n}\n\n/* Form Sections */\n.form-section {\n margin-bottom: 28px;\n}\n\n.form-section:last-child {\n margin-bottom: 0;\n}\n\n.section-title {\n display: flex;\n align-items: center;\n gap: 10px;\n font-size: 14px;\n font-weight: 600;\n color: var(--mj-text-secondary);\n margin: 0 0 16px 0;\n padding-bottom: 10px;\n border-bottom: 1px solid var(--mj-bg-surface-sunken);\n}\n\n.section-title i {\n color: var(--mj-brand-primary);\n font-size: 14px;\n}\n\n.section-header-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 16px;\n}\n\n.section-header-row .section-title {\n margin: 0;\n padding: 0;\n border: none;\n}\n\n.btn-add-field {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 6px 12px;\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border: none;\n border-radius: 6px;\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-add-field:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.btn-add-field:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Form Groups */\n.form-group {\n margin-bottom: 18px;\n}\n\n.form-group:last-child {\n margin-bottom: 0;\n}\n\n.form-group label {\n display: block;\n font-size: 13px;\n font-weight: 500;\n color: var(--mj-text-secondary);\n margin-bottom: 6px;\n}\n\n.form-group label.required::after {\n content: '*';\n color: var(--mj-status-error);\n margin-left: 4px;\n}\n\n.form-group input[type=\"text\"],\n.form-group input[type=\"number\"],\n.form-group select,\n.form-group textarea {\n width: 100%;\n padding: 10px 14px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 8px;\n font-size: 14px;\n color: var(--mj-text-primary);\n background: var(--mj-bg-surface);\n transition: all 0.15s ease;\n box-sizing: border-box;\n}\n\n.form-group input:focus,\n.form-group select:focus,\n.form-group textarea:focus {\n outline: none;\n border-color: var(--mj-brand-primary);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n.form-group input:disabled,\n.form-group select:disabled,\n.form-group textarea:disabled {\n background: var(--mj-bg-surface-card);\n color: var(--mj-text-disabled);\n cursor: not-allowed;\n}\n\n.form-group textarea {\n resize: vertical;\n min-height: 80px;\n}\n\n.field-hint {\n display: block;\n font-size: 12px;\n color: var(--mj-text-disabled);\n margin-top: 5px;\n}\n\n.form-row {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 16px;\n}\n\n/* Category Selector */\n.category-selector {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 10px;\n}\n\n.category-btn {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 6px;\n padding: 12px 8px;\n border: 2px solid var(--mj-border-default);\n border-radius: 10px;\n background: var(--mj-bg-surface);\n cursor: pointer;\n transition: all 0.2s ease;\n color: var(--mj-text-muted);\n}\n\n.category-btn i {\n font-size: 18px;\n}\n\n.category-btn span {\n font-size: 11px;\n font-weight: 500;\n}\n\n.category-btn:hover:not(:disabled) {\n border-color: var(--cat-color);\n background: color-mix(in srgb, var(--cat-color) 5%, var(--mj-bg-surface));\n}\n\n.category-btn.selected {\n border-color: var(--cat-color);\n background: color-mix(in srgb, var(--cat-color) 10%, var(--mj-bg-surface));\n color: var(--cat-color);\n}\n\n.category-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Schema Fields */\n.schema-fields {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.schema-field {\n display: flex;\n gap: 12px;\n padding: 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-default);\n border-radius: 10px;\n}\n\n.field-drag-handle {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.move-btn {\n width: 24px;\n height: 24px;\n border: none;\n background: var(--mj-border-default);\n border-radius: 4px;\n cursor: pointer;\n color: var(--mj-text-muted);\n font-size: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n}\n\n.move-btn:hover:not(:disabled) {\n background: var(--mj-border-strong);\n color: var(--mj-text-secondary);\n}\n\n.move-btn:disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n\n.field-content {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.field-row {\n display: flex;\n gap: 10px;\n}\n\n.field-name-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n font-family: monospace;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-title-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-type-select {\n width: 100px;\n padding: 8px 10px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n cursor: pointer;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-desc-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid var(--mj-border-strong);\n border-radius: 6px;\n font-size: 13px;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n}\n\n.field-options {\n display: flex;\n gap: 16px;\n}\n\n.checkbox-label {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--mj-text-muted);\n cursor: pointer;\n}\n\n.checkbox-label input[type=\"checkbox\"] {\n width: 14px;\n height: 14px;\n accent-color: var(--mj-brand-primary);\n}\n\n.checkbox-label i {\n font-size: 10px;\n color: var(--mj-status-warning);\n}\n\n.remove-field-btn {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: var(--mj-text-disabled);\n cursor: pointer;\n border-radius: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.15s ease;\n align-self: flex-start;\n}\n\n.remove-field-btn:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n color: var(--mj-status-error);\n}\n\n.remove-field-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.no-fields-message {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 16px;\n background: var(--mj-bg-surface-card);\n border: 2px dashed var(--mj-border-default);\n border-radius: 10px;\n color: var(--mj-text-muted);\n font-size: 13px;\n}\n\n.no-fields-message i {\n color: var(--mj-text-disabled);\n}\n\n/* Panel Footer */\n.panel-footer {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 16px 24px;\n border-top: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface-card);\n}\n\n.footer-left,\n.footer-right {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.btn-primary,\n.btn-secondary,\n.btn-delete {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 10px 20px;\n border: none;\n border-radius: 8px;\n font-size: 14px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.btn-primary {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n}\n\n.btn-primary:hover:not(:disabled) {\n background: var(--mj-brand-primary-hover);\n}\n\n.btn-primary:disabled {\n background: color-mix(in srgb, var(--mj-brand-primary) 25%, var(--mj-bg-surface));\n cursor: not-allowed;\n}\n\n.btn-secondary {\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n border: 1px solid var(--mj-border-strong);\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: var(--mj-bg-surface-sunken);\n border-color: var(--mj-text-disabled);\n}\n\n.btn-secondary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-delete {\n background: transparent;\n color: var(--mj-status-error);\n padding: 10px 16px;\n}\n\n.btn-delete:hover:not(:disabled) {\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n}\n\n.btn-delete:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* Mobile Responsiveness */\n@media (max-width: 768px) {\n .edit-panel {\n max-width: 100%;\n }\n\n .panel-header {\n padding: 16px 20px;\n }\n\n .header-icon {\n width: 40px;\n height: 40px;\n font-size: 18px;\n }\n\n .header-text h2 {\n font-size: 16px;\n }\n\n .panel-body {\n padding: 20px;\n }\n\n .form-row {\n grid-template-columns: 1fr;\n }\n\n .category-selector {\n grid-template-columns: repeat(2, 1fr);\n }\n\n .schema-field {\n flex-direction: column;\n }\n\n .field-drag-handle {\n flex-direction: row;\n justify-content: flex-end;\n order: 1;\n }\n\n .field-content {\n order: 0;\n }\n\n .remove-field-btn {\n order: 2;\n align-self: flex-end;\n }\n\n .field-row {\n flex-direction: column;\n }\n\n .field-type-select {\n width: 100%;\n }\n\n .panel-footer {\n padding: 14px 20px;\n flex-direction: column-reverse;\n gap: 12px;\n }\n\n .footer-left,\n .footer-right {\n width: 100%;\n }\n\n .footer-right {\n flex-direction: row;\n }\n\n .footer-right .btn-primary,\n .footer-right .btn-secondary {\n flex: 1;\n justify-content: center;\n }\n\n .btn-delete {\n width: 100%;\n justify-content: center;\n background: color-mix(in srgb, var(--mj-status-error) 8%, var(--mj-bg-surface));\n }\n}\n\n@media (max-width: 480px) {\n .panel-header {\n padding: 14px 16px;\n }\n\n .header-content {\n gap: 12px;\n }\n\n .header-icon {\n width: 36px;\n height: 36px;\n font-size: 16px;\n border-radius: 10px;\n }\n\n .header-text h2 {\n font-size: 15px;\n }\n\n .header-subtitle {\n font-size: 12px;\n }\n\n .panel-body {\n padding: 16px;\n }\n\n .category-selector {\n grid-template-columns: repeat(3, 1fr);\n }\n\n .category-btn {\n padding: 10px 6px;\n }\n\n .category-btn i {\n font-size: 16px;\n }\n\n .category-btn span {\n font-size: 10px;\n }\n\n .schema-field {\n padding: 12px;\n }\n\n .field-name-input,\n .field-title-input,\n .field-desc-input,\n .field-type-select {\n font-size: 14px;\n padding: 10px 12px;\n }\n\n .panel-footer {\n padding: 12px 16px;\n }\n\n .btn-primary,\n .btn-secondary {\n padding: 10px 16px;\n font-size: 13px;\n }\n}\n\n/* Custom scrollbar */\n.panel-body::-webkit-scrollbar {\n width: 6px;\n}\n\n.panel-body::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.panel-body::-webkit-scrollbar-thumb {\n background: var(--mj-border-strong);\n border-radius: 3px;\n}\n\n.panel-body::-webkit-scrollbar-thumb:hover {\n background: var(--mj-text-disabled);\n}\n\n/* Animations */\n@keyframes spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n.fa-spin {\n animation: spin 1s linear infinite;\n}\n"] }]
|
|
267
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.MJConfirmService }], propDecorators: {
|
|
395
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1.MJConfirmService }], propDecorators: { CredentialType: [{
|
|
396
|
+
type: Input
|
|
397
|
+
}], credentialType: [{
|
|
398
|
+
type: Input
|
|
399
|
+
}], IsOpen: [{
|
|
268
400
|
type: Input
|
|
269
401
|
}], isOpen: [{
|
|
270
402
|
type: Input
|
|
271
403
|
}], close: [{
|
|
272
404
|
type: Output
|
|
405
|
+
}], Saved: [{
|
|
406
|
+
type: Output
|
|
273
407
|
}], saved: [{
|
|
274
408
|
type: Output
|
|
409
|
+
}], Deleted: [{
|
|
410
|
+
type: Output
|
|
275
411
|
}], deleted: [{
|
|
276
412
|
type: Output
|
|
277
413
|
}] } });
|