@memberjunction/ng-credentials 0.0.1 → 4.0.0
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/credentials.module.d.ts +16 -0
- package/dist/lib/credentials.module.d.ts.map +1 -0
- package/dist/lib/credentials.module.js +76 -0
- package/dist/lib/credentials.module.js.map +1 -0
- package/dist/lib/dialogs/credential-dialog.component.d.ts +67 -0
- package/dist/lib/dialogs/credential-dialog.component.d.ts.map +1 -0
- package/dist/lib/dialogs/credential-dialog.component.js +185 -0
- package/dist/lib/dialogs/credential-dialog.component.js.map +1 -0
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.d.ts +43 -0
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.d.ts.map +1 -0
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.js +233 -0
- package/dist/lib/panels/credential-category-edit-panel/credential-category-edit-panel.component.js.map +1 -0
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.d.ts +95 -0
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.d.ts.map +1 -0
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.js +529 -0
- package/dist/lib/panels/credential-edit-panel/credential-edit-panel.component.js.map +1 -0
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.d.ts +55 -0
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.d.ts.map +1 -0
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.js +274 -0
- package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.js.map +1 -0
- package/dist/lib/services/credential-dialog.service.d.ts +89 -0
- package/dist/lib/services/credential-dialog.service.d.ts.map +1 -0
- package/dist/lib/services/credential-dialog.service.js +166 -0
- package/dist/lib/services/credential-dialog.service.js.map +1 -0
- package/dist/public-api.d.ts +15 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +19 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +43 -6
- package/README.md +0 -45
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-edit-panel.component.js","sourceRoot":"","sources":["../../../../src/lib/panels/credential-edit-panel/credential-edit-panel.component.ts","../../../../src/lib/panels/credential-edit-panel/credential-edit-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,uBAAuB,EAAqB,YAAY,EAAE,MAAM,eAAe,CAAC;AAEpJ,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;AAiCzE,MAAM,OAAO,4BAA4B;IA8BjB;IA7BX,UAAU,GAA4B,IAAI,CAAC;IAC3C,eAAe,GAA2B,EAAE,CAAC;IAC7C,MAAM,GAAG,KAAK,CAAC;IAEd,KAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;IACjC,KAAK,GAAG,IAAI,YAAY,EAAoB,CAAC;IAC7C,OAAO,GAAG,IAAI,YAAY,EAAU,CAAC;IAExC,SAAS,GAAG,KAAK,CAAC;IAClB,QAAQ,GAAG,KAAK,CAAC;IACjB,KAAK,GAAG,KAAK,CAAC;IACd,UAAU,GAA+B,EAAE,CAAC;IAEnD,cAAc;IACP,IAAI,GAAG,EAAE,CAAC;IACV,WAAW,GAAG,EAAE,CAAC;IACjB,cAAc,GAAG,EAAE,CAAC;IACpB,kBAAkB,GAAG,EAAE,CAAC;IACxB,QAAQ,GAAG,IAAI,CAAC;IAChB,SAAS,GAAG,KAAK,CAAC;IAClB,SAAS,GAAgB,IAAI,CAAC;IAErC,iDAAiD;IAC1C,gBAAgB,GAAqB,EAAE,CAAC;IACxC,YAAY,GAA0B,EAAE,CAAC;IACzC,gBAAgB,GAAgB,IAAI,GAAG,EAAE,CAAC;IAEzC,SAAS,GAAG,IAA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B;YACxB,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QAChC,CAAC;QAED,OAAO,OAAO,CAAC;IACnB,CAAC;uGAtkBQ,4BAA4B;2FAA5B,4BAA4B,6TCpCzC,kjaA8SA;;2FD1Qa,4BAA4B;kBAPxC,SAAS;iCACI,KAAK,YACL,0BAA0B,mBAGnB,uBAAuB,CAAC,MAAM;;sBAG9C,KAAK;;sBACL,KAAK;;sBACL,KAAK;;sBAEL,MAAM;;sBACN,MAAM;;sBACN,MAAM;;sBAiXN,YAAY;uBAAC,yBAAyB,EAAE,CAAC,QAAQ,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { EventEmitter, ChangeDetectorRef, OnInit } from '@angular/core';
|
|
2
|
+
import { CredentialTypeEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
type CategoryType = 'AI' | 'Authentication' | 'Communication' | 'Database' | 'Integration' | 'Storage';
|
|
5
|
+
interface SchemaField {
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description: string;
|
|
10
|
+
isSecret: boolean;
|
|
11
|
+
required: boolean;
|
|
12
|
+
order: number;
|
|
13
|
+
}
|
|
14
|
+
export declare class CredentialTypeEditPanelComponent implements OnInit {
|
|
15
|
+
private cdr;
|
|
16
|
+
credentialType: CredentialTypeEntity | null;
|
|
17
|
+
isOpen: boolean;
|
|
18
|
+
close: EventEmitter<void>;
|
|
19
|
+
saved: EventEmitter<CredentialTypeEntity>;
|
|
20
|
+
deleted: EventEmitter<string>;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
isSaving: boolean;
|
|
23
|
+
isNew: boolean;
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
category: CategoryType;
|
|
27
|
+
iconClass: string;
|
|
28
|
+
validationEndpoint: string;
|
|
29
|
+
schemaFields: SchemaField[];
|
|
30
|
+
categories: CategoryType[];
|
|
31
|
+
private _metadata;
|
|
32
|
+
constructor(cdr: ChangeDetectorRef);
|
|
33
|
+
ngOnInit(): void;
|
|
34
|
+
get panelTitle(): string;
|
|
35
|
+
get canSave(): boolean;
|
|
36
|
+
open(credentialType: CredentialTypeEntity | null): Promise<void>;
|
|
37
|
+
private resetForm;
|
|
38
|
+
private populateFromType;
|
|
39
|
+
private parseFieldSchema;
|
|
40
|
+
private buildFieldSchema;
|
|
41
|
+
addSchemaField(): void;
|
|
42
|
+
removeSchemaField(index: number): void;
|
|
43
|
+
moveFieldUp(index: number): void;
|
|
44
|
+
moveFieldDown(index: number): void;
|
|
45
|
+
save(): Promise<void>;
|
|
46
|
+
deleteType(): Promise<void>;
|
|
47
|
+
closePanel(): void;
|
|
48
|
+
onBackdropClick(event: MouseEvent): void;
|
|
49
|
+
getCategoryIcon(category: string): string;
|
|
50
|
+
getCategoryColor(category: string): string;
|
|
51
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CredentialTypeEditPanelComponent, never>;
|
|
52
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CredentialTypeEditPanelComponent, "mj-credential-type-edit-panel", never, { "credentialType": { "alias": "credentialType"; "required": false; }; "isOpen": { "alias": "isOpen"; "required": false; }; }, { "close": "close"; "saved": "saved"; "deleted": "deleted"; }, never, never, false, never>;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=credential-type-edit-panel.component.d.ts.map
|
package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-type-edit-panel.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,iBAAiB,EAA2B,MAAM,EAAE,MAAM,eAAe,CAAC;AAC3H,OAAO,EAAE,oBAAoB,EAAE,MAAM,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AM,GAAG,IAAI;IAShC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAS5B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IA0DrB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAwCjC,UAAU,IAAI,IAAI;IAQlB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAMxC,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAYzC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;yCAvSxC,gCAAgC;2CAAhC,gCAAgC;CAkT5C"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { Metadata } from '@memberjunction/core';
|
|
3
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
import * as i2 from "@memberjunction/ng-shared-generic";
|
|
7
|
+
export class CredentialTypeEditPanelComponent {
|
|
8
|
+
cdr;
|
|
9
|
+
credentialType = null;
|
|
10
|
+
isOpen = false;
|
|
11
|
+
close = new EventEmitter();
|
|
12
|
+
saved = new EventEmitter();
|
|
13
|
+
deleted = new EventEmitter();
|
|
14
|
+
isLoading = false;
|
|
15
|
+
isSaving = false;
|
|
16
|
+
isNew = false;
|
|
17
|
+
// Form fields
|
|
18
|
+
name = '';
|
|
19
|
+
description = '';
|
|
20
|
+
category = 'Integration';
|
|
21
|
+
iconClass = '';
|
|
22
|
+
validationEndpoint = '';
|
|
23
|
+
schemaFields = [];
|
|
24
|
+
// Available categories
|
|
25
|
+
categories = ['AI', 'Authentication', 'Communication', 'Database', 'Integration', 'Storage'];
|
|
26
|
+
_metadata = new Metadata();
|
|
27
|
+
constructor(cdr) {
|
|
28
|
+
this.cdr = cdr;
|
|
29
|
+
}
|
|
30
|
+
ngOnInit() { }
|
|
31
|
+
get panelTitle() {
|
|
32
|
+
return this.isNew ? 'Create Credential Type' : 'Edit Credential Type';
|
|
33
|
+
}
|
|
34
|
+
get canSave() {
|
|
35
|
+
return this.name.trim().length > 0 && this.category.length > 0;
|
|
36
|
+
}
|
|
37
|
+
async open(credentialType) {
|
|
38
|
+
this.isLoading = true;
|
|
39
|
+
this.isOpen = true;
|
|
40
|
+
this.credentialType = credentialType;
|
|
41
|
+
this.isNew = !credentialType || !credentialType.ID;
|
|
42
|
+
this.cdr.markForCheck();
|
|
43
|
+
this.resetForm();
|
|
44
|
+
if (credentialType && credentialType.ID) {
|
|
45
|
+
this.populateFromType(credentialType);
|
|
46
|
+
}
|
|
47
|
+
this.isLoading = false;
|
|
48
|
+
this.cdr.markForCheck();
|
|
49
|
+
}
|
|
50
|
+
resetForm() {
|
|
51
|
+
this.name = '';
|
|
52
|
+
this.description = '';
|
|
53
|
+
this.category = 'Integration';
|
|
54
|
+
this.iconClass = '';
|
|
55
|
+
this.validationEndpoint = '';
|
|
56
|
+
this.schemaFields = [];
|
|
57
|
+
}
|
|
58
|
+
populateFromType(credentialType) {
|
|
59
|
+
this.name = credentialType.Name || '';
|
|
60
|
+
this.description = credentialType.Description || '';
|
|
61
|
+
this.category = credentialType.Category || 'Integration';
|
|
62
|
+
this.iconClass = credentialType.IconClass || '';
|
|
63
|
+
this.validationEndpoint = credentialType.ValidationEndpoint || '';
|
|
64
|
+
// Parse field schema
|
|
65
|
+
this.parseFieldSchema(credentialType.FieldSchema);
|
|
66
|
+
}
|
|
67
|
+
parseFieldSchema(schemaJson) {
|
|
68
|
+
try {
|
|
69
|
+
if (!schemaJson) {
|
|
70
|
+
this.schemaFields = [];
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const schema = JSON.parse(schemaJson);
|
|
74
|
+
const properties = schema.properties || {};
|
|
75
|
+
const required = schema.required || [];
|
|
76
|
+
this.schemaFields = Object.entries(properties).map(([name, prop]) => ({
|
|
77
|
+
name,
|
|
78
|
+
type: prop.type || 'string',
|
|
79
|
+
title: prop.title || name,
|
|
80
|
+
description: prop.description || '',
|
|
81
|
+
isSecret: prop.isSecret === true,
|
|
82
|
+
required: required.includes(name),
|
|
83
|
+
order: typeof prop.order === 'number' ? prop.order : 999
|
|
84
|
+
}));
|
|
85
|
+
this.schemaFields.sort((a, b) => a.order - b.order);
|
|
86
|
+
}
|
|
87
|
+
catch (e) {
|
|
88
|
+
console.error('Error parsing field schema:', e);
|
|
89
|
+
this.schemaFields = [];
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
buildFieldSchema() {
|
|
93
|
+
if (this.schemaFields.length === 0) {
|
|
94
|
+
return JSON.stringify({ type: 'object', properties: {}, required: [] });
|
|
95
|
+
}
|
|
96
|
+
const properties = {};
|
|
97
|
+
const required = [];
|
|
98
|
+
for (let i = 0; i < this.schemaFields.length; i++) {
|
|
99
|
+
const field = this.schemaFields[i];
|
|
100
|
+
properties[field.name] = {
|
|
101
|
+
type: field.type,
|
|
102
|
+
title: field.title,
|
|
103
|
+
description: field.description,
|
|
104
|
+
isSecret: field.isSecret,
|
|
105
|
+
order: i
|
|
106
|
+
};
|
|
107
|
+
if (field.required) {
|
|
108
|
+
required.push(field.name);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return JSON.stringify({
|
|
112
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
113
|
+
type: 'object',
|
|
114
|
+
properties,
|
|
115
|
+
required
|
|
116
|
+
}, null, 2);
|
|
117
|
+
}
|
|
118
|
+
// Schema field management
|
|
119
|
+
addSchemaField() {
|
|
120
|
+
this.schemaFields.push({
|
|
121
|
+
name: '',
|
|
122
|
+
type: 'string',
|
|
123
|
+
title: '',
|
|
124
|
+
description: '',
|
|
125
|
+
isSecret: false,
|
|
126
|
+
required: false,
|
|
127
|
+
order: this.schemaFields.length
|
|
128
|
+
});
|
|
129
|
+
this.cdr.markForCheck();
|
|
130
|
+
}
|
|
131
|
+
removeSchemaField(index) {
|
|
132
|
+
this.schemaFields.splice(index, 1);
|
|
133
|
+
this.cdr.markForCheck();
|
|
134
|
+
}
|
|
135
|
+
moveFieldUp(index) {
|
|
136
|
+
if (index > 0) {
|
|
137
|
+
const temp = this.schemaFields[index];
|
|
138
|
+
this.schemaFields[index] = this.schemaFields[index - 1];
|
|
139
|
+
this.schemaFields[index - 1] = temp;
|
|
140
|
+
this.cdr.markForCheck();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
moveFieldDown(index) {
|
|
144
|
+
if (index < this.schemaFields.length - 1) {
|
|
145
|
+
const temp = this.schemaFields[index];
|
|
146
|
+
this.schemaFields[index] = this.schemaFields[index + 1];
|
|
147
|
+
this.schemaFields[index + 1] = temp;
|
|
148
|
+
this.cdr.markForCheck();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
async save() {
|
|
152
|
+
if (!this.canSave) {
|
|
153
|
+
MJNotificationService.Instance.CreateSimpleNotification('Please fill in all required fields', 'warning', 3000);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.isSaving = true;
|
|
157
|
+
this.cdr.markForCheck();
|
|
158
|
+
try {
|
|
159
|
+
let entity;
|
|
160
|
+
if (this.isNew) {
|
|
161
|
+
entity = await this._metadata.GetEntityObject('MJ: Credential Types');
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
entity = this.credentialType;
|
|
165
|
+
}
|
|
166
|
+
entity.Name = this.name.trim();
|
|
167
|
+
entity.Description = this.description.trim() || null;
|
|
168
|
+
entity.Category = this.category;
|
|
169
|
+
entity.IconClass = this.iconClass.trim() || null;
|
|
170
|
+
entity.ValidationEndpoint = this.validationEndpoint.trim() || null;
|
|
171
|
+
entity.FieldSchema = this.buildFieldSchema();
|
|
172
|
+
const success = await entity.Save();
|
|
173
|
+
if (success) {
|
|
174
|
+
const action = this.isNew ? 'created' : 'updated';
|
|
175
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Credential type "${entity.Name}" ${action} successfully`, 'success', 3000);
|
|
176
|
+
this.saved.emit(entity);
|
|
177
|
+
this.closePanel();
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
180
|
+
const errorMessage = entity.LatestResult?.Message || 'Unknown error';
|
|
181
|
+
console.error('Save failed:', errorMessage);
|
|
182
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to save credential type: ${errorMessage}`, 'error', 5000);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
console.error('Error saving credential type:', error);
|
|
187
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error saving credential type', 'error', 3000);
|
|
188
|
+
}
|
|
189
|
+
finally {
|
|
190
|
+
this.isSaving = false;
|
|
191
|
+
this.cdr.markForCheck();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
async deleteType() {
|
|
195
|
+
if (this.isNew || !this.credentialType)
|
|
196
|
+
return;
|
|
197
|
+
const confirmed = confirm(`Are you sure you want to delete "${this.credentialType.Name}"? This action cannot be undone.`);
|
|
198
|
+
if (!confirmed)
|
|
199
|
+
return;
|
|
200
|
+
this.isSaving = true;
|
|
201
|
+
this.cdr.markForCheck();
|
|
202
|
+
try {
|
|
203
|
+
const success = await this.credentialType.Delete();
|
|
204
|
+
if (success) {
|
|
205
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Credential type "${this.credentialType.Name}" deleted successfully`, 'success', 3000);
|
|
206
|
+
this.deleted.emit(this.credentialType.ID);
|
|
207
|
+
this.closePanel();
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
const errorMessage = this.credentialType.LatestResult?.Message || 'Unknown error';
|
|
211
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to delete credential type: ${errorMessage}`, 'error', 5000);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
console.error('Error deleting credential type:', error);
|
|
216
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error deleting credential type', 'error', 3000);
|
|
217
|
+
}
|
|
218
|
+
finally {
|
|
219
|
+
this.isSaving = false;
|
|
220
|
+
this.cdr.markForCheck();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
closePanel() {
|
|
224
|
+
this.isOpen = false;
|
|
225
|
+
this.credentialType = null;
|
|
226
|
+
this.resetForm();
|
|
227
|
+
this.close.emit();
|
|
228
|
+
this.cdr.markForCheck();
|
|
229
|
+
}
|
|
230
|
+
onBackdropClick(event) {
|
|
231
|
+
if (event.target.classList.contains('panel-backdrop')) {
|
|
232
|
+
this.closePanel();
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
getCategoryIcon(category) {
|
|
236
|
+
const iconMap = {
|
|
237
|
+
'AI': 'fa-solid fa-brain',
|
|
238
|
+
'Communication': 'fa-solid fa-envelope',
|
|
239
|
+
'Storage': 'fa-solid fa-cloud',
|
|
240
|
+
'Database': 'fa-solid fa-database',
|
|
241
|
+
'Authentication': 'fa-solid fa-shield-halved',
|
|
242
|
+
'Integration': 'fa-solid fa-plug'
|
|
243
|
+
};
|
|
244
|
+
return iconMap[category] || 'fa-solid fa-key';
|
|
245
|
+
}
|
|
246
|
+
getCategoryColor(category) {
|
|
247
|
+
const colorMap = {
|
|
248
|
+
'AI': '#8b5cf6',
|
|
249
|
+
'Communication': '#3b82f6',
|
|
250
|
+
'Storage': '#06b6d4',
|
|
251
|
+
'Database': '#f59e0b',
|
|
252
|
+
'Authentication': '#10b981',
|
|
253
|
+
'Integration': '#ec4899'
|
|
254
|
+
};
|
|
255
|
+
return colorMap[category] || '#6366f1';
|
|
256
|
+
}
|
|
257
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: CredentialTypeEditPanelComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
258
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.3", type: CredentialTypeEditPanelComponent, isStandalone: false, selector: "mj-credential-type-edit-panel", inputs: { credentialType: "credentialType", isOpen: "isOpen" }, outputs: { close: "close", saved: "saved", deleted: "deleted" }, 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: #ffffff;\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 #e5e7eb;\n background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);\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: #1e293b;\n margin: 0 0 4px 0;\n}\n\n.header-subtitle {\n font-size: 13px;\n color: #64748b;\n}\n\n.close-btn {\n width: 36px;\n height: 36px;\n border: none;\n background: #f1f5f9;\n border-radius: 8px;\n cursor: pointer;\n color: #64748b;\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: #e2e8f0;\n color: #334155;\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: #334155;\n margin: 0 0 16px 0;\n padding-bottom: 10px;\n border-bottom: 1px solid #f1f5f9;\n}\n\n.section-title i {\n color: #6366f1;\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: #6366f1;\n color: white;\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: #4f46e5;\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: #475569;\n margin-bottom: 6px;\n}\n\n.form-group label.required::after {\n content: '*';\n color: #ef4444;\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 #d1d5db;\n border-radius: 8px;\n font-size: 14px;\n color: #1e293b;\n background: #ffffff;\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: #6366f1;\n box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);\n}\n\n.form-group input:disabled,\n.form-group select:disabled,\n.form-group textarea:disabled {\n background: #f8fafc;\n color: #94a3b8;\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: #94a3b8;\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 #e5e7eb;\n border-radius: 10px;\n background: #ffffff;\n cursor: pointer;\n transition: all 0.2s ease;\n color: #64748b;\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%, white);\n}\n\n.category-btn.selected {\n border-color: var(--cat-color);\n background: color-mix(in srgb, var(--cat-color) 10%, white);\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: #f8fafc;\n border: 1px solid #e5e7eb;\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: #e2e8f0;\n border-radius: 4px;\n cursor: pointer;\n color: #64748b;\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: #cbd5e1;\n color: #334155;\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 #d1d5db;\n border-radius: 6px;\n font-size: 13px;\n font-family: monospace;\n}\n\n.field-title-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 13px;\n}\n\n.field-type-select {\n width: 100px;\n padding: 8px 10px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 13px;\n cursor: pointer;\n}\n\n.field-desc-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 13px;\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: #64748b;\n cursor: pointer;\n}\n\n.checkbox-label input[type=\"checkbox\"] {\n width: 14px;\n height: 14px;\n accent-color: #6366f1;\n}\n\n.checkbox-label i {\n font-size: 10px;\n color: #f59e0b;\n}\n\n.remove-field-btn {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: #94a3b8;\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: #fef2f2;\n color: #dc2626;\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: #f8fafc;\n border: 2px dashed #e2e8f0;\n border-radius: 10px;\n color: #64748b;\n font-size: 13px;\n}\n\n.no-fields-message i {\n color: #94a3b8;\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 #e5e7eb;\n background: #f8fafc;\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: #6366f1;\n color: #ffffff;\n}\n\n.btn-primary:hover:not(:disabled) {\n background: #4f46e5;\n}\n\n.btn-primary:disabled {\n background: #c7d2fe;\n cursor: not-allowed;\n}\n\n.btn-secondary {\n background: #ffffff;\n color: #475569;\n border: 1px solid #d1d5db;\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: #f1f5f9;\n border-color: #94a3b8;\n}\n\n.btn-secondary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-delete {\n background: transparent;\n color: #dc2626;\n padding: 10px 16px;\n}\n\n.btn-delete:hover:not(:disabled) {\n background: #fef2f2;\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: #fef2f2;\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: #d1d5db;\n border-radius: 3px;\n}\n\n.panel-body::-webkit-scrollbar-thumb:hover {\n background: #94a3b8;\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: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.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: i1.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],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]):not([formArray]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i2.LoadingComponent, selector: "mj-loading", inputs: ["text", "showText", "animationDuration", "size", "textColor", "logoColor", "logoGradient", "animation"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
259
|
+
}
|
|
260
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.3", ngImport: i0, type: CredentialTypeEditPanelComponent, decorators: [{
|
|
261
|
+
type: Component,
|
|
262
|
+
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: #ffffff;\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 #e5e7eb;\n background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);\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: #1e293b;\n margin: 0 0 4px 0;\n}\n\n.header-subtitle {\n font-size: 13px;\n color: #64748b;\n}\n\n.close-btn {\n width: 36px;\n height: 36px;\n border: none;\n background: #f1f5f9;\n border-radius: 8px;\n cursor: pointer;\n color: #64748b;\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: #e2e8f0;\n color: #334155;\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: #334155;\n margin: 0 0 16px 0;\n padding-bottom: 10px;\n border-bottom: 1px solid #f1f5f9;\n}\n\n.section-title i {\n color: #6366f1;\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: #6366f1;\n color: white;\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: #4f46e5;\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: #475569;\n margin-bottom: 6px;\n}\n\n.form-group label.required::after {\n content: '*';\n color: #ef4444;\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 #d1d5db;\n border-radius: 8px;\n font-size: 14px;\n color: #1e293b;\n background: #ffffff;\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: #6366f1;\n box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);\n}\n\n.form-group input:disabled,\n.form-group select:disabled,\n.form-group textarea:disabled {\n background: #f8fafc;\n color: #94a3b8;\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: #94a3b8;\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 #e5e7eb;\n border-radius: 10px;\n background: #ffffff;\n cursor: pointer;\n transition: all 0.2s ease;\n color: #64748b;\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%, white);\n}\n\n.category-btn.selected {\n border-color: var(--cat-color);\n background: color-mix(in srgb, var(--cat-color) 10%, white);\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: #f8fafc;\n border: 1px solid #e5e7eb;\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: #e2e8f0;\n border-radius: 4px;\n cursor: pointer;\n color: #64748b;\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: #cbd5e1;\n color: #334155;\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 #d1d5db;\n border-radius: 6px;\n font-size: 13px;\n font-family: monospace;\n}\n\n.field-title-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 13px;\n}\n\n.field-type-select {\n width: 100px;\n padding: 8px 10px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 13px;\n cursor: pointer;\n}\n\n.field-desc-input {\n flex: 1;\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n font-size: 13px;\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: #64748b;\n cursor: pointer;\n}\n\n.checkbox-label input[type=\"checkbox\"] {\n width: 14px;\n height: 14px;\n accent-color: #6366f1;\n}\n\n.checkbox-label i {\n font-size: 10px;\n color: #f59e0b;\n}\n\n.remove-field-btn {\n width: 32px;\n height: 32px;\n border: none;\n background: transparent;\n color: #94a3b8;\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: #fef2f2;\n color: #dc2626;\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: #f8fafc;\n border: 2px dashed #e2e8f0;\n border-radius: 10px;\n color: #64748b;\n font-size: 13px;\n}\n\n.no-fields-message i {\n color: #94a3b8;\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 #e5e7eb;\n background: #f8fafc;\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: #6366f1;\n color: #ffffff;\n}\n\n.btn-primary:hover:not(:disabled) {\n background: #4f46e5;\n}\n\n.btn-primary:disabled {\n background: #c7d2fe;\n cursor: not-allowed;\n}\n\n.btn-secondary {\n background: #ffffff;\n color: #475569;\n border: 1px solid #d1d5db;\n}\n\n.btn-secondary:hover:not(:disabled) {\n background: #f1f5f9;\n border-color: #94a3b8;\n}\n\n.btn-secondary:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-delete {\n background: transparent;\n color: #dc2626;\n padding: 10px 16px;\n}\n\n.btn-delete:hover:not(:disabled) {\n background: #fef2f2;\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: #fef2f2;\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: #d1d5db;\n border-radius: 3px;\n}\n\n.panel-body::-webkit-scrollbar-thumb:hover {\n background: #94a3b8;\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"] }]
|
|
263
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { credentialType: [{
|
|
264
|
+
type: Input
|
|
265
|
+
}], isOpen: [{
|
|
266
|
+
type: Input
|
|
267
|
+
}], close: [{
|
|
268
|
+
type: Output
|
|
269
|
+
}], saved: [{
|
|
270
|
+
type: Output
|
|
271
|
+
}], deleted: [{
|
|
272
|
+
type: Output
|
|
273
|
+
}] } });
|
|
274
|
+
//# sourceMappingURL=credential-type-edit-panel.component.js.map
|
package/dist/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-type-edit-panel.component.js","sourceRoot":"","sources":["../../../../src/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.ts","../../../../src/lib/panels/credential-type-edit-panel/credential-type-edit-panel.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAqB,uBAAuB,EAAU,MAAM,eAAe,CAAC;AAE3H,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;AAqBzE,MAAM,OAAO,gCAAgC;IAyBrB;IAxBX,cAAc,GAAgC,IAAI,CAAC;IACnD,MAAM,GAAG,KAAK,CAAC;IAEd,KAAK,GAAG,IAAI,YAAY,EAAQ,CAAC;IACjC,KAAK,GAAG,IAAI,YAAY,EAAwB,CAAC;IACjD,OAAO,GAAG,IAAI,YAAY,EAAU,CAAC;IAExC,SAAS,GAAG,KAAK,CAAC;IAClB,QAAQ,GAAG,KAAK,CAAC;IACjB,KAAK,GAAG,KAAK,CAAC;IAErB,cAAc;IACP,IAAI,GAAG,EAAE,CAAC;IACV,WAAW,GAAG,EAAE,CAAC;IACjB,QAAQ,GAAiB,aAAa,CAAC;IACvC,SAAS,GAAG,EAAE,CAAC;IACf,kBAAkB,GAAG,EAAE,CAAC;IACxB,YAAY,GAAkB,EAAE,CAAC;IA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|
+
*
|
|
4
|
+
* A service that provides easy programmatic access to credential dialogs.
|
|
5
|
+
* Use this service to open credential creation/editing dialogs from anywhere
|
|
6
|
+
* in your application without needing to include the component in your template.
|
|
7
|
+
*/
|
|
8
|
+
import { ViewContainerRef } from '@angular/core';
|
|
9
|
+
import { CredentialEntity, CredentialTypeEntity } from '@memberjunction/core-entities';
|
|
10
|
+
import { CredentialDialogOptions, CredentialDialogResult } from '../dialogs/credential-dialog.component';
|
|
11
|
+
import * as i0 from "@angular/core";
|
|
12
|
+
/**
|
|
13
|
+
* Service for programmatically opening credential dialogs.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* // Inject the service
|
|
18
|
+
* constructor(private credentialDialog: CredentialDialogService) {}
|
|
19
|
+
*
|
|
20
|
+
* // Open dialog to create a new credential
|
|
21
|
+
* async createCredential() {
|
|
22
|
+
* const result = await this.credentialDialog.openDialog(this.viewContainerRef);
|
|
23
|
+
* if (result.success && result.credential) {
|
|
24
|
+
* console.log('Created credential:', result.credential.Name);
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* // Open dialog with pre-selected type
|
|
29
|
+
* async createApiKey() {
|
|
30
|
+
* const result = await this.credentialDialog.openDialog(this.viewContainerRef, {
|
|
31
|
+
* preselectedTypeId: 'api-key-type-id'
|
|
32
|
+
* });
|
|
33
|
+
* }
|
|
34
|
+
*
|
|
35
|
+
* // Edit an existing credential
|
|
36
|
+
* async editCredential(credential: CredentialEntity) {
|
|
37
|
+
* const result = await this.credentialDialog.openDialog(this.viewContainerRef, {
|
|
38
|
+
* credential
|
|
39
|
+
* });
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare class CredentialDialogService {
|
|
44
|
+
private _credentialTypes;
|
|
45
|
+
private _credentialTypesLoading;
|
|
46
|
+
private _credentialTypesLoadPromise;
|
|
47
|
+
/**
|
|
48
|
+
* Opens a credential dialog and returns a promise that resolves when the dialog closes.
|
|
49
|
+
*
|
|
50
|
+
* @param viewContainerRef - The ViewContainerRef to attach the dialog to
|
|
51
|
+
* @param options - Optional configuration for the dialog
|
|
52
|
+
* @returns Promise resolving to the dialog result
|
|
53
|
+
*/
|
|
54
|
+
openDialog(viewContainerRef: ViewContainerRef, options?: CredentialDialogOptions): Promise<CredentialDialogResult>;
|
|
55
|
+
/**
|
|
56
|
+
* Opens a dialog to create a new credential with optional pre-selections.
|
|
57
|
+
* Convenience method that wraps openDialog with create-specific defaults.
|
|
58
|
+
*
|
|
59
|
+
* @param viewContainerRef - The ViewContainerRef to attach the dialog to
|
|
60
|
+
* @param preselectedTypeId - Optional credential type to pre-select
|
|
61
|
+
* @param preselectedCategoryId - Optional category to pre-select
|
|
62
|
+
* @returns Promise resolving to the dialog result
|
|
63
|
+
*/
|
|
64
|
+
createCredential(viewContainerRef: ViewContainerRef, preselectedTypeId?: string, preselectedCategoryId?: string): Promise<CredentialDialogResult>;
|
|
65
|
+
/**
|
|
66
|
+
* Opens a dialog to edit an existing credential.
|
|
67
|
+
* Convenience method that wraps openDialog with edit-specific defaults.
|
|
68
|
+
*
|
|
69
|
+
* @param viewContainerRef - The ViewContainerRef to attach the dialog to
|
|
70
|
+
* @param credential - The credential to edit
|
|
71
|
+
* @returns Promise resolving to the dialog result
|
|
72
|
+
*/
|
|
73
|
+
editCredential(viewContainerRef: ViewContainerRef, credential: CredentialEntity): Promise<CredentialDialogResult>;
|
|
74
|
+
/**
|
|
75
|
+
* Gets cached credential types or loads them if not cached.
|
|
76
|
+
* Types are cached to avoid repeated database calls.
|
|
77
|
+
*/
|
|
78
|
+
getCredentialTypes(): Promise<CredentialTypeEntity[]>;
|
|
79
|
+
/**
|
|
80
|
+
* Clears the cached credential types.
|
|
81
|
+
* Call this if you need to refresh the list after adding new types.
|
|
82
|
+
*/
|
|
83
|
+
clearCache(): void;
|
|
84
|
+
private loadCredentialTypes;
|
|
85
|
+
private doLoadCredentialTypes;
|
|
86
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CredentialDialogService, never>;
|
|
87
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CredentialDialogService>;
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=credential-dialog.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential-dialog.service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/credential-dialog.service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA4B,gBAAgB,EAAQ,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAGvF,OAAO,EAA6B,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;;AAEpI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAGa,uBAAuB;IAChC,OAAO,CAAC,gBAAgB,CAAuC;IAC/D,OAAO,CAAC,uBAAuB,CAAS;IACxC,OAAO,CAAC,2BAA2B,CAAgD;IAEnF;;;;;;OAMG;IACU,UAAU,CACnB,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,CAAC,EAAE,uBAAuB,GAClC,OAAO,CAAC,sBAAsB,CAAC;IAwBlC;;;;;;;;OAQG;IACU,gBAAgB,CACzB,gBAAgB,EAAE,gBAAgB,EAClC,iBAAiB,CAAC,EAAE,MAAM,EAC1B,qBAAqB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,sBAAsB,CAAC;IASlC;;;;;;;OAOG;IACU,cAAc,CACvB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,gBAAgB,GAC7B,OAAO,CAAC,sBAAsB,CAAC;IAOlC;;;OAGG;IACU,kBAAkB,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAIlE;;;OAGG;IACI,UAAU,IAAI,IAAI;YAKX,mBAAmB;YAsBnB,qBAAqB;yCAtH1B,uBAAuB;6CAAvB,uBAAuB;CA0InC"}
|