@memberjunction/ng-dashboards 2.127.0 → 2.129.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/AI/components/agents/agent-configuration.component.d.ts +34 -1
- package/dist/AI/components/agents/agent-configuration.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-configuration.component.js +419 -109
- package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.d.ts +1 -1
- package/dist/AI/components/agents/agent-editor.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-filter-panel.component.d.ts +1 -1
- package/dist/AI/components/agents/agent-filter-panel.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-filter-panel.component.js +3 -3
- package/dist/AI/components/agents/agent-filter-panel.component.js.map +1 -1
- package/dist/AI/components/execution-monitoring.component.d.ts +1 -1
- package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
- package/dist/AI/components/execution-monitoring.component.js +3 -3
- package/dist/AI/components/execution-monitoring.component.js.map +1 -1
- package/dist/AI/components/models/{model-management-v2.component.d.ts → model-management.component.d.ts} +21 -5
- package/dist/AI/components/models/model-management.component.d.ts.map +1 -0
- package/dist/AI/components/models/model-management.component.js +1283 -0
- package/dist/AI/components/models/model-management.component.js.map +1 -0
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts +2 -1
- package/dist/AI/components/prompts/model-prompt-priority-matrix.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/prompt-filter-panel.component.js +2 -2
- package/dist/AI/components/prompts/{prompt-management-v2.component.d.ts → prompt-management.component.d.ts} +30 -5
- package/dist/AI/components/prompts/prompt-management.component.d.ts.map +1 -0
- package/dist/AI/components/prompts/prompt-management.component.js +1079 -0
- package/dist/AI/components/prompts/prompt-management.component.js.map +1 -0
- package/dist/AI/components/prompts/prompt-version-control.component.d.ts +2 -1
- package/dist/AI/components/prompts/prompt-version-control.component.d.ts.map +1 -1
- package/dist/AI/components/prompts/prompt-version-control.component.js +1 -1
- package/dist/AI/components/prompts/prompt-version-control.component.js.map +1 -1
- package/dist/AI/components/system/system-config-filter-panel.component.js +2 -2
- package/dist/AI/components/system/system-configuration.component.d.ts +55 -11
- package/dist/AI/components/system/system-configuration.component.d.ts.map +1 -1
- package/dist/AI/components/system/system-configuration.component.js +790 -131
- package/dist/AI/components/system/system-configuration.component.js.map +1 -1
- package/dist/AI/components/widgets/kpi-card.component.d.ts.map +1 -1
- package/dist/AI/components/widgets/kpi-card.component.js +3 -3
- package/dist/AI/components/widgets/kpi-card.component.js.map +1 -1
- package/dist/AI/index.d.ts +2 -2
- package/dist/AI/index.d.ts.map +1 -1
- package/dist/AI/index.js +2 -2
- package/dist/AI/index.js.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.d.ts +5 -6
- package/dist/AI/services/ai-instrumentation.service.d.ts.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.js.map +1 -1
- package/dist/Communication/communication-dashboard.component.d.ts +2 -0
- package/dist/Communication/communication-dashboard.component.d.ts.map +1 -1
- package/dist/Communication/communication-dashboard.component.js +5 -2
- package/dist/Communication/communication-dashboard.component.js.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts +3 -2
- package/dist/ComponentStudio/component-studio-dashboard.component.d.ts.map +1 -1
- package/dist/ComponentStudio/component-studio-dashboard.component.js +7 -3
- package/dist/ComponentStudio/component-studio-dashboard.component.js.map +1 -1
- package/dist/Credentials/components/credential-category-edit-panel.component.d.ts +44 -0
- package/dist/Credentials/components/credential-category-edit-panel.component.d.ts.map +1 -0
- package/dist/Credentials/components/credential-category-edit-panel.component.js +456 -0
- package/dist/Credentials/components/credential-category-edit-panel.component.js.map +1 -0
- package/dist/Credentials/components/credential-edit-panel.component.d.ts +70 -0
- package/dist/Credentials/components/credential-edit-panel.component.d.ts.map +1 -0
- package/dist/Credentials/components/credential-edit-panel.component.js +694 -0
- package/dist/Credentials/components/credential-edit-panel.component.js.map +1 -0
- package/dist/Credentials/components/credential-type-edit-panel.component.d.ts +56 -0
- package/dist/Credentials/components/credential-type-edit-panel.component.d.ts.map +1 -0
- package/dist/Credentials/components/credential-type-edit-panel.component.js +563 -0
- package/dist/Credentials/components/credential-type-edit-panel.component.js.map +1 -0
- package/dist/Credentials/components/credentials-audit-resource.component.d.ts +81 -0
- package/dist/Credentials/components/credentials-audit-resource.component.d.ts.map +1 -0
- package/dist/Credentials/components/credentials-audit-resource.component.js +864 -0
- package/dist/Credentials/components/credentials-audit-resource.component.js.map +1 -0
- package/dist/Credentials/components/credentials-categories-resource.component.d.ts +61 -0
- package/dist/Credentials/components/credentials-categories-resource.component.d.ts.map +1 -0
- package/dist/Credentials/components/credentials-categories-resource.component.js +816 -0
- package/dist/Credentials/components/credentials-categories-resource.component.js.map +1 -0
- package/dist/Credentials/components/credentials-list-resource.component.d.ts +83 -0
- package/dist/Credentials/components/credentials-list-resource.component.d.ts.map +1 -0
- package/dist/Credentials/components/credentials-list-resource.component.js +1253 -0
- package/dist/Credentials/components/credentials-list-resource.component.js.map +1 -0
- package/dist/Credentials/components/credentials-overview-resource.component.d.ts +99 -0
- package/dist/Credentials/components/credentials-overview-resource.component.d.ts.map +1 -0
- package/dist/Credentials/components/credentials-overview-resource.component.js +936 -0
- package/dist/Credentials/components/credentials-overview-resource.component.js.map +1 -0
- package/dist/Credentials/components/credentials-types-resource.component.d.ts +70 -0
- package/dist/Credentials/components/credentials-types-resource.component.d.ts.map +1 -0
- package/dist/Credentials/components/credentials-types-resource.component.js +868 -0
- package/dist/Credentials/components/credentials-types-resource.component.js.map +1 -0
- package/dist/Credentials/credentials-dashboard.component.d.ts +37 -0
- package/dist/Credentials/credentials-dashboard.component.d.ts.map +1 -0
- package/dist/Credentials/credentials-dashboard.component.js +290 -0
- package/dist/Credentials/credentials-dashboard.component.js.map +1 -0
- package/dist/Credentials/index.d.ts +7 -0
- package/dist/Credentials/index.d.ts.map +1 -0
- package/dist/Credentials/index.js +9 -0
- package/dist/Credentials/index.js.map +1 -0
- package/dist/Credentials/pipes/group-by.pipe.d.ts +13 -0
- package/dist/Credentials/pipes/group-by.pipe.d.ts.map +1 -0
- package/dist/Credentials/pipes/group-by.pipe.js +29 -0
- package/dist/Credentials/pipes/group-by.pipe.js.map +1 -0
- package/dist/DataExplorer/components/navigation-panel/navigation-panel.component.d.ts +2 -2
- package/dist/DataExplorer/components/view-config-panel/view-config-panel.component.d.ts +3 -3
- package/dist/DataExplorer/components/view-config-panel/view-config-panel.component.d.ts.map +1 -1
- package/dist/DataExplorer/components/view-config-panel/view-config-panel.component.js +50 -19
- package/dist/DataExplorer/components/view-config-panel/view-config-panel.component.js.map +1 -1
- package/dist/DataExplorer/components/view-selector/view-selector.component.d.ts +17 -1
- package/dist/DataExplorer/components/view-selector/view-selector.component.d.ts.map +1 -1
- package/dist/DataExplorer/components/view-selector/view-selector.component.js +77 -45
- package/dist/DataExplorer/components/view-selector/view-selector.component.js.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts +36 -0
- package/dist/DataExplorer/data-explorer-dashboard.component.d.ts.map +1 -1
- package/dist/DataExplorer/data-explorer-dashboard.component.js +552 -368
- package/dist/DataExplorer/data-explorer-dashboard.component.js.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.d.ts +5 -5
- package/dist/DataExplorer/services/explorer-state.service.d.ts.map +1 -1
- package/dist/DataExplorer/services/explorer-state.service.js +125 -151
- package/dist/DataExplorer/services/explorer-state.service.js.map +1 -1
- package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts +15 -19
- package/dist/EntityAdmin/entity-admin-dashboard.component.d.ts.map +1 -1
- package/dist/EntityAdmin/entity-admin-dashboard.component.js +70 -26
- package/dist/EntityAdmin/entity-admin-dashboard.component.js.map +1 -1
- package/dist/Home/home-dashboard.component.d.ts +6 -5
- package/dist/Home/home-dashboard.component.d.ts.map +1 -1
- package/dist/Home/home-dashboard.component.js +174 -166
- package/dist/Home/home-dashboard.component.js.map +1 -1
- package/dist/Scheduling/scheduling-dashboard.component.d.ts +2 -0
- package/dist/Scheduling/scheduling-dashboard.component.d.ts.map +1 -1
- package/dist/Scheduling/scheduling-dashboard.component.js +5 -2
- package/dist/Scheduling/scheduling-dashboard.component.js.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.d.ts.map +1 -1
- package/dist/Scheduling/services/scheduling-instrumentation.service.js +4 -2
- package/dist/Scheduling/services/scheduling-instrumentation.service.js.map +1 -1
- package/dist/SystemDiagnostics/index.d.ts +2 -0
- package/dist/SystemDiagnostics/index.d.ts.map +1 -0
- package/dist/SystemDiagnostics/index.js +3 -0
- package/dist/SystemDiagnostics/index.js.map +1 -0
- package/dist/SystemDiagnostics/system-diagnostics.component.d.ts +497 -0
- package/dist/SystemDiagnostics/system-diagnostics.component.d.ts.map +1 -0
- package/dist/SystemDiagnostics/system-diagnostics.component.js +6063 -0
- package/dist/SystemDiagnostics/system-diagnostics.component.js.map +1 -0
- package/dist/Testing/testing-dashboard.component.d.ts +2 -0
- package/dist/Testing/testing-dashboard.component.d.ts.map +1 -1
- package/dist/Testing/testing-dashboard.component.js +5 -2
- package/dist/Testing/testing-dashboard.component.js.map +1 -1
- package/dist/module.d.ts +103 -94
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +94 -29
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +3 -1
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +21 -1
- package/dist/public-api.js.map +1 -1
- package/package.json +28 -25
- package/dist/AI/components/models/model-management-v2.component.d.ts.map +0 -1
- package/dist/AI/components/models/model-management-v2.component.js +0 -981
- package/dist/AI/components/models/model-management-v2.component.js.map +0 -1
- package/dist/AI/components/prompts/prompt-management-v2.component.d.ts.map +0 -1
- package/dist/AI/components/prompts/prompt-management-v2.component.js +0 -811
- package/dist/AI/components/prompts/prompt-management-v2.component.js.map +0 -1
- package/dist/EntityAdmin/components/entity-details.component.d.ts +0 -50
- package/dist/EntityAdmin/components/entity-details.component.d.ts.map +0 -1
- package/dist/EntityAdmin/components/entity-details.component.js +0 -680
- package/dist/EntityAdmin/components/entity-details.component.js.map +0 -1
- package/dist/EntityAdmin/components/entity-filter-panel.component.d.ts +0 -31
- package/dist/EntityAdmin/components/entity-filter-panel.component.d.ts.map +0 -1
- package/dist/EntityAdmin/components/entity-filter-panel.component.js +0 -160
- package/dist/EntityAdmin/components/entity-filter-panel.component.js.map +0 -1
- package/dist/EntityAdmin/components/erd-composite.component.d.ts +0 -73
- package/dist/EntityAdmin/components/erd-composite.component.d.ts.map +0 -1
- package/dist/EntityAdmin/components/erd-composite.component.js +0 -271
- package/dist/EntityAdmin/components/erd-composite.component.js.map +0 -1
- package/dist/EntityAdmin/components/erd-diagram.component.d.ts +0 -47
- package/dist/EntityAdmin/components/erd-diagram.component.d.ts.map +0 -1
- package/dist/EntityAdmin/components/erd-diagram.component.js +0 -618
- package/dist/EntityAdmin/components/erd-diagram.component.js.map +0 -1
|
@@ -0,0 +1,694 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
|
|
2
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
3
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "@memberjunction/ng-shared-generic";
|
|
8
|
+
function CredentialEditPanelComponent_div_0_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
9
|
+
i0.ɵɵelementStart(0, "div", 23);
|
|
10
|
+
i0.ɵɵelement(1, "i");
|
|
11
|
+
i0.ɵɵelementEnd();
|
|
12
|
+
} if (rf & 2) {
|
|
13
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
14
|
+
i0.ɵɵstyleProp("background-color", ctx_r1.getTypeColor(ctx_r1.selectedType) + "15")("color", ctx_r1.getTypeColor(ctx_r1.selectedType));
|
|
15
|
+
i0.ɵɵadvance();
|
|
16
|
+
i0.ɵɵclassMap(ctx_r1.getTypeIcon(ctx_r1.selectedType));
|
|
17
|
+
} }
|
|
18
|
+
function CredentialEditPanelComponent_div_0_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
i0.ɵɵelementStart(0, "div", 24);
|
|
20
|
+
i0.ɵɵelement(1, "i", 25);
|
|
21
|
+
i0.ɵɵelementEnd();
|
|
22
|
+
} }
|
|
23
|
+
function CredentialEditPanelComponent_div_0_span_9_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
i0.ɵɵelementStart(0, "span", 26);
|
|
25
|
+
i0.ɵɵtext(1);
|
|
26
|
+
i0.ɵɵelementEnd();
|
|
27
|
+
} if (rf & 2) {
|
|
28
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
29
|
+
i0.ɵɵadvance();
|
|
30
|
+
i0.ɵɵtextInterpolate(ctx_r1.selectedType.Name);
|
|
31
|
+
} }
|
|
32
|
+
function CredentialEditPanelComponent_div_0_span_10_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
+
i0.ɵɵelementStart(0, "span", 26);
|
|
34
|
+
i0.ɵɵtext(1, "Select a credential type");
|
|
35
|
+
i0.ɵɵelementEnd();
|
|
36
|
+
} }
|
|
37
|
+
function CredentialEditPanelComponent_div_0_mj_loading_14_Template(rf, ctx) { if (rf & 1) {
|
|
38
|
+
i0.ɵɵelement(0, "mj-loading", 27);
|
|
39
|
+
} }
|
|
40
|
+
function CredentialEditPanelComponent_div_0_form_15_optgroup_15_option_1_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
+
i0.ɵɵelementStart(0, "option", 37);
|
|
42
|
+
i0.ɵɵtext(1);
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
const type_r4 = ctx.$implicit;
|
|
46
|
+
i0.ɵɵproperty("ngValue", type_r4.ID);
|
|
47
|
+
i0.ɵɵadvance();
|
|
48
|
+
i0.ɵɵtextInterpolate1(" ", type_r4.Name, " ");
|
|
49
|
+
} }
|
|
50
|
+
function CredentialEditPanelComponent_div_0_form_15_optgroup_15_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
+
i0.ɵɵelementStart(0, "optgroup", 60);
|
|
52
|
+
i0.ɵɵtemplate(1, CredentialEditPanelComponent_div_0_form_15_optgroup_15_option_1_Template, 2, 2, "option", 42);
|
|
53
|
+
i0.ɵɵelementEnd();
|
|
54
|
+
} if (rf & 2) {
|
|
55
|
+
const group_r5 = ctx.$implicit;
|
|
56
|
+
i0.ɵɵproperty("label", group_r5.category);
|
|
57
|
+
i0.ɵɵadvance();
|
|
58
|
+
i0.ɵɵproperty("ngForOf", group_r5.types);
|
|
59
|
+
} }
|
|
60
|
+
function CredentialEditPanelComponent_div_0_form_15_span_16_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
i0.ɵɵelementStart(0, "span", 59);
|
|
62
|
+
i0.ɵɵtext(1, "Type cannot be changed after creation");
|
|
63
|
+
i0.ɵɵelementEnd();
|
|
64
|
+
} }
|
|
65
|
+
function CredentialEditPanelComponent_div_0_form_15_option_23_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
+
i0.ɵɵelementStart(0, "option", 37);
|
|
67
|
+
i0.ɵɵtext(1);
|
|
68
|
+
i0.ɵɵelementEnd();
|
|
69
|
+
} if (rf & 2) {
|
|
70
|
+
const cat_r6 = ctx.$implicit;
|
|
71
|
+
i0.ɵɵproperty("ngValue", cat_r6.ID);
|
|
72
|
+
i0.ɵɵadvance();
|
|
73
|
+
i0.ɵɵtextInterpolate(cat_r6.Name);
|
|
74
|
+
} }
|
|
75
|
+
function CredentialEditPanelComponent_div_0_form_15_div_28_div_7_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
76
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
77
|
+
i0.ɵɵelementStart(0, "div", 66)(1, "input", 67);
|
|
78
|
+
i0.ɵɵlistener("input", function CredentialEditPanelComponent_div_0_form_15_div_28_div_7_div_3_Template_input_input_1_listener($event) { i0.ɵɵrestoreView(_r7); const field_r8 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.onValueChange(field_r8.name, $event.target.value)); });
|
|
79
|
+
i0.ɵɵelementEnd();
|
|
80
|
+
i0.ɵɵelementStart(2, "button", 68);
|
|
81
|
+
i0.ɵɵlistener("click", function CredentialEditPanelComponent_div_0_form_15_div_28_div_7_div_3_Template_button_click_2_listener() { i0.ɵɵrestoreView(_r7); const field_r8 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.toggleSecretVisibility(field_r8.name)); });
|
|
82
|
+
i0.ɵɵelement(3, "i");
|
|
83
|
+
i0.ɵɵelementEnd()();
|
|
84
|
+
} if (rf & 2) {
|
|
85
|
+
const field_r8 = i0.ɵɵnextContext().$implicit;
|
|
86
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
87
|
+
i0.ɵɵadvance();
|
|
88
|
+
i0.ɵɵproperty("type", ctx_r1.isSecretVisible(field_r8.name) ? "text" : "password")("id", "field-" + field_r8.name)("name", "field-" + field_r8.name)("value", ctx_r1.credentialValues[field_r8.name])("placeholder", field_r8.description || "Enter " + field_r8.title)("disabled", ctx_r1.isSaving)("required", field_r8.required);
|
|
89
|
+
i0.ɵɵadvance();
|
|
90
|
+
i0.ɵɵproperty("title", ctx_r1.isSecretVisible(field_r8.name) ? "Hide" : "Show");
|
|
91
|
+
i0.ɵɵadvance();
|
|
92
|
+
i0.ɵɵclassMap(ctx_r1.isSecretVisible(field_r8.name) ? "fa-solid fa-eye-slash" : "fa-solid fa-eye");
|
|
93
|
+
} }
|
|
94
|
+
function CredentialEditPanelComponent_div_0_form_15_div_28_div_7_ng_template_4_input_0_Template(rf, ctx) { if (rf & 1) {
|
|
95
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
96
|
+
i0.ɵɵelementStart(0, "input", 70);
|
|
97
|
+
i0.ɵɵlistener("input", function CredentialEditPanelComponent_div_0_form_15_div_28_div_7_ng_template_4_input_0_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r9); const field_r8 = i0.ɵɵnextContext(2).$implicit; const ctx_r1 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r1.onValueChange(field_r8.name, $event.target.value)); });
|
|
98
|
+
i0.ɵɵelementEnd();
|
|
99
|
+
} if (rf & 2) {
|
|
100
|
+
const field_r8 = i0.ɵɵnextContext(2).$implicit;
|
|
101
|
+
const ctx_r1 = i0.ɵɵnextContext(4);
|
|
102
|
+
i0.ɵɵproperty("type", field_r8.type === "number" ? "number" : "text")("id", "field-" + field_r8.name)("name", "field-" + field_r8.name)("value", ctx_r1.credentialValues[field_r8.name])("placeholder", field_r8.description || "Enter " + field_r8.title)("disabled", ctx_r1.isSaving)("required", field_r8.required);
|
|
103
|
+
} }
|
|
104
|
+
function CredentialEditPanelComponent_div_0_form_15_div_28_div_7_ng_template_4_Template(rf, ctx) { if (rf & 1) {
|
|
105
|
+
i0.ɵɵtemplate(0, CredentialEditPanelComponent_div_0_form_15_div_28_div_7_ng_template_4_input_0_Template, 1, 7, "input", 69);
|
|
106
|
+
} if (rf & 2) {
|
|
107
|
+
const field_r8 = i0.ɵɵnextContext().$implicit;
|
|
108
|
+
i0.ɵɵproperty("ngIf", field_r8.type === "string" || field_r8.type === "number");
|
|
109
|
+
} }
|
|
110
|
+
function CredentialEditPanelComponent_div_0_form_15_div_28_div_7_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
111
|
+
i0.ɵɵelementStart(0, "span", 59);
|
|
112
|
+
i0.ɵɵtext(1);
|
|
113
|
+
i0.ɵɵelementEnd();
|
|
114
|
+
} if (rf & 2) {
|
|
115
|
+
const field_r8 = i0.ɵɵnextContext().$implicit;
|
|
116
|
+
i0.ɵɵadvance();
|
|
117
|
+
i0.ɵɵtextInterpolate(field_r8.description);
|
|
118
|
+
} }
|
|
119
|
+
function CredentialEditPanelComponent_div_0_form_15_div_28_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
120
|
+
i0.ɵɵelementStart(0, "div", 32)(1, "label", 64);
|
|
121
|
+
i0.ɵɵtext(2);
|
|
122
|
+
i0.ɵɵelementEnd();
|
|
123
|
+
i0.ɵɵtemplate(3, CredentialEditPanelComponent_div_0_form_15_div_28_div_7_div_3_Template, 4, 10, "div", 65)(4, CredentialEditPanelComponent_div_0_form_15_div_28_div_7_ng_template_4_Template, 1, 1, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor)(6, CredentialEditPanelComponent_div_0_form_15_div_28_div_7_span_6_Template, 2, 1, "span", 39);
|
|
124
|
+
i0.ɵɵelementEnd();
|
|
125
|
+
} if (rf & 2) {
|
|
126
|
+
const field_r8 = ctx.$implicit;
|
|
127
|
+
const regularField_r10 = i0.ɵɵreference(5);
|
|
128
|
+
i0.ɵɵadvance();
|
|
129
|
+
i0.ɵɵclassProp("required", field_r8.required);
|
|
130
|
+
i0.ɵɵproperty("for", "field-" + field_r8.name);
|
|
131
|
+
i0.ɵɵadvance();
|
|
132
|
+
i0.ɵɵtextInterpolate1(" ", field_r8.title, " ");
|
|
133
|
+
i0.ɵɵadvance();
|
|
134
|
+
i0.ɵɵproperty("ngIf", field_r8.isSecret)("ngIfElse", regularField_r10);
|
|
135
|
+
i0.ɵɵadvance(3);
|
|
136
|
+
i0.ɵɵproperty("ngIf", field_r8.description && !field_r8.isSecret);
|
|
137
|
+
} }
|
|
138
|
+
function CredentialEditPanelComponent_div_0_form_15_div_28_Template(rf, ctx) { if (rf & 1) {
|
|
139
|
+
i0.ɵɵelementStart(0, "div", 29)(1, "h3", 30);
|
|
140
|
+
i0.ɵɵelement(2, "i", 25);
|
|
141
|
+
i0.ɵɵtext(3, " Credential Values ");
|
|
142
|
+
i0.ɵɵelementStart(4, "span", 61);
|
|
143
|
+
i0.ɵɵelement(5, "i", 62);
|
|
144
|
+
i0.ɵɵtext(6, " Encrypted ");
|
|
145
|
+
i0.ɵɵelementEnd()();
|
|
146
|
+
i0.ɵɵtemplate(7, CredentialEditPanelComponent_div_0_form_15_div_28_div_7_Template, 7, 7, "div", 63);
|
|
147
|
+
i0.ɵɵelementEnd();
|
|
148
|
+
} if (rf & 2) {
|
|
149
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
150
|
+
i0.ɵɵadvance(7);
|
|
151
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.schemaFields);
|
|
152
|
+
} }
|
|
153
|
+
function CredentialEditPanelComponent_div_0_form_15_div_29_Template(rf, ctx) { if (rf & 1) {
|
|
154
|
+
i0.ɵɵelementStart(0, "div", 71)(1, "div", 72);
|
|
155
|
+
i0.ɵɵelement(2, "i", 73);
|
|
156
|
+
i0.ɵɵelementEnd();
|
|
157
|
+
i0.ɵɵelementStart(3, "p");
|
|
158
|
+
i0.ɵɵtext(4, "Select a credential type above to configure the credential values.");
|
|
159
|
+
i0.ɵɵelementEnd()();
|
|
160
|
+
} }
|
|
161
|
+
function CredentialEditPanelComponent_div_0_form_15_Template(rf, ctx) { if (rf & 1) {
|
|
162
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
163
|
+
i0.ɵɵelementStart(0, "form", 28);
|
|
164
|
+
i0.ɵɵlistener("submit", function CredentialEditPanelComponent_div_0_form_15_Template_form_submit_0_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); $event.preventDefault(); return i0.ɵɵresetView(ctx_r1.save()); });
|
|
165
|
+
i0.ɵɵelementStart(1, "div", 29)(2, "h3", 30);
|
|
166
|
+
i0.ɵɵelement(3, "i", 31);
|
|
167
|
+
i0.ɵɵtext(4, " Basic Information ");
|
|
168
|
+
i0.ɵɵelementEnd();
|
|
169
|
+
i0.ɵɵelementStart(5, "div", 32)(6, "label", 33);
|
|
170
|
+
i0.ɵɵtext(7, "Name");
|
|
171
|
+
i0.ɵɵelementEnd();
|
|
172
|
+
i0.ɵɵelementStart(8, "input", 34);
|
|
173
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CredentialEditPanelComponent_div_0_form_15_Template_input_ngModelChange_8_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.name, $event) || (ctx_r1.name = $event); return i0.ɵɵresetView($event); });
|
|
174
|
+
i0.ɵɵelementEnd()();
|
|
175
|
+
i0.ɵɵelementStart(9, "div", 32)(10, "label", 35);
|
|
176
|
+
i0.ɵɵtext(11, "Credential Type");
|
|
177
|
+
i0.ɵɵelementEnd();
|
|
178
|
+
i0.ɵɵelementStart(12, "select", 36);
|
|
179
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CredentialEditPanelComponent_div_0_form_15_Template_select_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedTypeId, $event) || (ctx_r1.selectedTypeId = $event); return i0.ɵɵresetView($event); });
|
|
180
|
+
i0.ɵɵlistener("ngModelChange", function CredentialEditPanelComponent_div_0_form_15_Template_select_ngModelChange_12_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onTypeChange()); });
|
|
181
|
+
i0.ɵɵelementStart(13, "option", 37);
|
|
182
|
+
i0.ɵɵtext(14, "Select a type...");
|
|
183
|
+
i0.ɵɵelementEnd();
|
|
184
|
+
i0.ɵɵtemplate(15, CredentialEditPanelComponent_div_0_form_15_optgroup_15_Template, 2, 2, "optgroup", 38);
|
|
185
|
+
i0.ɵɵelementEnd();
|
|
186
|
+
i0.ɵɵtemplate(16, CredentialEditPanelComponent_div_0_form_15_span_16_Template, 2, 0, "span", 39);
|
|
187
|
+
i0.ɵɵelementEnd();
|
|
188
|
+
i0.ɵɵelementStart(17, "div", 32)(18, "label", 40);
|
|
189
|
+
i0.ɵɵtext(19, "Category");
|
|
190
|
+
i0.ɵɵelementEnd();
|
|
191
|
+
i0.ɵɵelementStart(20, "select", 41);
|
|
192
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CredentialEditPanelComponent_div_0_form_15_Template_select_ngModelChange_20_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedCategoryId, $event) || (ctx_r1.selectedCategoryId = $event); return i0.ɵɵresetView($event); });
|
|
193
|
+
i0.ɵɵelementStart(21, "option", 37);
|
|
194
|
+
i0.ɵɵtext(22, "No category");
|
|
195
|
+
i0.ɵɵelementEnd();
|
|
196
|
+
i0.ɵɵtemplate(23, CredentialEditPanelComponent_div_0_form_15_option_23_Template, 2, 2, "option", 42);
|
|
197
|
+
i0.ɵɵelementEnd()();
|
|
198
|
+
i0.ɵɵelementStart(24, "div", 32)(25, "label", 43);
|
|
199
|
+
i0.ɵɵtext(26, "Description");
|
|
200
|
+
i0.ɵɵelementEnd();
|
|
201
|
+
i0.ɵɵelementStart(27, "textarea", 44);
|
|
202
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CredentialEditPanelComponent_div_0_form_15_Template_textarea_ngModelChange_27_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.description, $event) || (ctx_r1.description = $event); return i0.ɵɵresetView($event); });
|
|
203
|
+
i0.ɵɵelementEnd()()();
|
|
204
|
+
i0.ɵɵtemplate(28, CredentialEditPanelComponent_div_0_form_15_div_28_Template, 8, 1, "div", 45)(29, CredentialEditPanelComponent_div_0_form_15_div_29_Template, 5, 0, "div", 46);
|
|
205
|
+
i0.ɵɵelementStart(30, "div", 29)(31, "h3", 30);
|
|
206
|
+
i0.ɵɵelement(32, "i", 47);
|
|
207
|
+
i0.ɵɵtext(33, " Settings ");
|
|
208
|
+
i0.ɵɵelementEnd();
|
|
209
|
+
i0.ɵɵelementStart(34, "div", 48)(35, "label", 49)(36, "span", 50)(37, "input", 51);
|
|
210
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CredentialEditPanelComponent_div_0_form_15_Template_input_ngModelChange_37_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.isActive, $event) || (ctx_r1.isActive = $event); return i0.ɵɵresetView($event); });
|
|
211
|
+
i0.ɵɵelementEnd();
|
|
212
|
+
i0.ɵɵelement(38, "span", 52);
|
|
213
|
+
i0.ɵɵelementEnd();
|
|
214
|
+
i0.ɵɵelementStart(39, "span", 53)(40, "span", 54);
|
|
215
|
+
i0.ɵɵtext(41, "Active");
|
|
216
|
+
i0.ɵɵelementEnd();
|
|
217
|
+
i0.ɵɵelementStart(42, "span", 55);
|
|
218
|
+
i0.ɵɵtext(43, "Enable this credential for use");
|
|
219
|
+
i0.ɵɵelementEnd()()()();
|
|
220
|
+
i0.ɵɵelementStart(44, "div", 48)(45, "label", 49)(46, "span", 50)(47, "input", 56);
|
|
221
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CredentialEditPanelComponent_div_0_form_15_Template_input_ngModelChange_47_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); i0.ɵɵtwoWayBindingSet(ctx_r1.isDefault, $event) || (ctx_r1.isDefault = $event); return i0.ɵɵresetView($event); });
|
|
222
|
+
i0.ɵɵelementEnd();
|
|
223
|
+
i0.ɵɵelement(48, "span", 52);
|
|
224
|
+
i0.ɵɵelementEnd();
|
|
225
|
+
i0.ɵɵelementStart(49, "span", 53)(50, "span", 54);
|
|
226
|
+
i0.ɵɵtext(51, "Default");
|
|
227
|
+
i0.ɵɵelementEnd();
|
|
228
|
+
i0.ɵɵelementStart(52, "span", 55);
|
|
229
|
+
i0.ɵɵtext(53, "Use as default for this credential type");
|
|
230
|
+
i0.ɵɵelementEnd()()()();
|
|
231
|
+
i0.ɵɵelementStart(54, "div", 32)(55, "label", 57);
|
|
232
|
+
i0.ɵɵtext(56, "Expiration Date");
|
|
233
|
+
i0.ɵɵelementEnd();
|
|
234
|
+
i0.ɵɵelementStart(57, "input", 58);
|
|
235
|
+
i0.ɵɵlistener("change", function CredentialEditPanelComponent_div_0_form_15_Template_input_change_57_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.onExpiresAtChange($event.target.value)); });
|
|
236
|
+
i0.ɵɵelementEnd();
|
|
237
|
+
i0.ɵɵelementStart(58, "span", 59);
|
|
238
|
+
i0.ɵɵtext(59, "Leave empty for no expiration");
|
|
239
|
+
i0.ɵɵelementEnd()()()();
|
|
240
|
+
} if (rf & 2) {
|
|
241
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
242
|
+
i0.ɵɵadvance(8);
|
|
243
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.name);
|
|
244
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving);
|
|
245
|
+
i0.ɵɵadvance(4);
|
|
246
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.selectedTypeId);
|
|
247
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving || !ctx_r1.isNew);
|
|
248
|
+
i0.ɵɵadvance();
|
|
249
|
+
i0.ɵɵproperty("ngValue", "");
|
|
250
|
+
i0.ɵɵadvance(2);
|
|
251
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.groupedCredentialTypes);
|
|
252
|
+
i0.ɵɵadvance();
|
|
253
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isNew);
|
|
254
|
+
i0.ɵɵadvance(4);
|
|
255
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.selectedCategoryId);
|
|
256
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving);
|
|
257
|
+
i0.ɵɵadvance();
|
|
258
|
+
i0.ɵɵproperty("ngValue", "");
|
|
259
|
+
i0.ɵɵadvance(2);
|
|
260
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.categories);
|
|
261
|
+
i0.ɵɵadvance(4);
|
|
262
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.description);
|
|
263
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving);
|
|
264
|
+
i0.ɵɵadvance();
|
|
265
|
+
i0.ɵɵproperty("ngIf", ctx_r1.schemaFields.length > 0);
|
|
266
|
+
i0.ɵɵadvance();
|
|
267
|
+
i0.ɵɵproperty("ngIf", ctx_r1.isNew && !ctx_r1.selectedTypeId);
|
|
268
|
+
i0.ɵɵadvance(8);
|
|
269
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.isActive);
|
|
270
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving);
|
|
271
|
+
i0.ɵɵadvance(10);
|
|
272
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.isDefault);
|
|
273
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving);
|
|
274
|
+
i0.ɵɵadvance(10);
|
|
275
|
+
i0.ɵɵproperty("value", ctx_r1.formatDateForInput(ctx_r1.expiresAt))("disabled", ctx_r1.isSaving);
|
|
276
|
+
} }
|
|
277
|
+
function CredentialEditPanelComponent_div_0_button_18_Template(rf, ctx) { if (rf & 1) {
|
|
278
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
279
|
+
i0.ɵɵelementStart(0, "button", 74);
|
|
280
|
+
i0.ɵɵlistener("click", function CredentialEditPanelComponent_div_0_button_18_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.deleteCredential()); });
|
|
281
|
+
i0.ɵɵelement(1, "i", 75);
|
|
282
|
+
i0.ɵɵelementStart(2, "span");
|
|
283
|
+
i0.ɵɵtext(3, "Delete");
|
|
284
|
+
i0.ɵɵelementEnd()();
|
|
285
|
+
} if (rf & 2) {
|
|
286
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
287
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving);
|
|
288
|
+
} }
|
|
289
|
+
function CredentialEditPanelComponent_div_0_i_23_Template(rf, ctx) { if (rf & 1) {
|
|
290
|
+
i0.ɵɵelement(0, "i", 76);
|
|
291
|
+
} }
|
|
292
|
+
function CredentialEditPanelComponent_div_0_i_24_Template(rf, ctx) { if (rf & 1) {
|
|
293
|
+
i0.ɵɵelement(0, "i", 77);
|
|
294
|
+
} }
|
|
295
|
+
function CredentialEditPanelComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
296
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
297
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
298
|
+
i0.ɵɵlistener("click", function CredentialEditPanelComponent_div_0_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onBackdropClick($event)); });
|
|
299
|
+
i0.ɵɵelementStart(1, "div", 3)(2, "div", 4)(3, "div", 5);
|
|
300
|
+
i0.ɵɵtemplate(4, CredentialEditPanelComponent_div_0_div_4_Template, 2, 6, "div", 6)(5, CredentialEditPanelComponent_div_0_div_5_Template, 2, 0, "div", 7);
|
|
301
|
+
i0.ɵɵelementStart(6, "div", 8)(7, "h2");
|
|
302
|
+
i0.ɵɵtext(8);
|
|
303
|
+
i0.ɵɵelementEnd();
|
|
304
|
+
i0.ɵɵtemplate(9, CredentialEditPanelComponent_div_0_span_9_Template, 2, 1, "span", 9)(10, CredentialEditPanelComponent_div_0_span_10_Template, 2, 0, "span", 9);
|
|
305
|
+
i0.ɵɵelementEnd()();
|
|
306
|
+
i0.ɵɵelementStart(11, "button", 10);
|
|
307
|
+
i0.ɵɵlistener("click", function CredentialEditPanelComponent_div_0_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closePanel()); });
|
|
308
|
+
i0.ɵɵelement(12, "i", 11);
|
|
309
|
+
i0.ɵɵelementEnd()();
|
|
310
|
+
i0.ɵɵelementStart(13, "div", 12);
|
|
311
|
+
i0.ɵɵtemplate(14, CredentialEditPanelComponent_div_0_mj_loading_14_Template, 1, 0, "mj-loading", 13)(15, CredentialEditPanelComponent_div_0_form_15_Template, 60, 21, "form", 14);
|
|
312
|
+
i0.ɵɵelementEnd();
|
|
313
|
+
i0.ɵɵelementStart(16, "div", 15)(17, "div", 16);
|
|
314
|
+
i0.ɵɵtemplate(18, CredentialEditPanelComponent_div_0_button_18_Template, 4, 1, "button", 17);
|
|
315
|
+
i0.ɵɵelementEnd();
|
|
316
|
+
i0.ɵɵelementStart(19, "div", 18)(20, "button", 19);
|
|
317
|
+
i0.ɵɵlistener("click", function CredentialEditPanelComponent_div_0_Template_button_click_20_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.closePanel()); });
|
|
318
|
+
i0.ɵɵtext(21, " Cancel ");
|
|
319
|
+
i0.ɵɵelementEnd();
|
|
320
|
+
i0.ɵɵelementStart(22, "button", 20);
|
|
321
|
+
i0.ɵɵlistener("click", function CredentialEditPanelComponent_div_0_Template_button_click_22_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.save()); });
|
|
322
|
+
i0.ɵɵtemplate(23, CredentialEditPanelComponent_div_0_i_23_Template, 1, 0, "i", 21)(24, CredentialEditPanelComponent_div_0_i_24_Template, 1, 0, "i", 22);
|
|
323
|
+
i0.ɵɵelementStart(25, "span");
|
|
324
|
+
i0.ɵɵtext(26);
|
|
325
|
+
i0.ɵɵelementEnd()()()()()();
|
|
326
|
+
} if (rf & 2) {
|
|
327
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
328
|
+
i0.ɵɵadvance();
|
|
329
|
+
i0.ɵɵclassProp("open", ctx_r1.isOpen);
|
|
330
|
+
i0.ɵɵadvance(3);
|
|
331
|
+
i0.ɵɵproperty("ngIf", ctx_r1.selectedType);
|
|
332
|
+
i0.ɵɵadvance();
|
|
333
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.selectedType);
|
|
334
|
+
i0.ɵɵadvance(3);
|
|
335
|
+
i0.ɵɵtextInterpolate(ctx_r1.panelTitle);
|
|
336
|
+
i0.ɵɵadvance();
|
|
337
|
+
i0.ɵɵproperty("ngIf", ctx_r1.selectedType);
|
|
338
|
+
i0.ɵɵadvance();
|
|
339
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.selectedType);
|
|
340
|
+
i0.ɵɵadvance();
|
|
341
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving);
|
|
342
|
+
i0.ɵɵadvance(3);
|
|
343
|
+
i0.ɵɵproperty("ngIf", ctx_r1.isLoading);
|
|
344
|
+
i0.ɵɵadvance();
|
|
345
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isLoading);
|
|
346
|
+
i0.ɵɵadvance(3);
|
|
347
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isNew);
|
|
348
|
+
i0.ɵɵadvance(2);
|
|
349
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving);
|
|
350
|
+
i0.ɵɵadvance(2);
|
|
351
|
+
i0.ɵɵproperty("disabled", ctx_r1.isSaving || !ctx_r1.canSave);
|
|
352
|
+
i0.ɵɵadvance();
|
|
353
|
+
i0.ɵɵproperty("ngIf", ctx_r1.isSaving);
|
|
354
|
+
i0.ɵɵadvance();
|
|
355
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.isSaving);
|
|
356
|
+
i0.ɵɵadvance(2);
|
|
357
|
+
i0.ɵɵtextInterpolate(ctx_r1.isNew ? "Create" : "Save");
|
|
358
|
+
} }
|
|
359
|
+
export function LoadCredentialEditPanel() {
|
|
360
|
+
// Prevents tree-shaking
|
|
361
|
+
}
|
|
362
|
+
export class CredentialEditPanelComponent {
|
|
363
|
+
cdr;
|
|
364
|
+
credential = null;
|
|
365
|
+
credentialTypes = [];
|
|
366
|
+
isOpen = false;
|
|
367
|
+
close = new EventEmitter();
|
|
368
|
+
saved = new EventEmitter();
|
|
369
|
+
deleted = new EventEmitter();
|
|
370
|
+
isLoading = false;
|
|
371
|
+
isSaving = false;
|
|
372
|
+
isNew = false;
|
|
373
|
+
categories = [];
|
|
374
|
+
// Form fields
|
|
375
|
+
name = '';
|
|
376
|
+
description = '';
|
|
377
|
+
selectedTypeId = '';
|
|
378
|
+
selectedCategoryId = '';
|
|
379
|
+
isActive = true;
|
|
380
|
+
isDefault = false;
|
|
381
|
+
expiresAt = null;
|
|
382
|
+
// Dynamic credential values based on type schema
|
|
383
|
+
credentialValues = {};
|
|
384
|
+
schemaFields = [];
|
|
385
|
+
showSecretFields = new Set();
|
|
386
|
+
_metadata = new Metadata();
|
|
387
|
+
constructor(cdr) {
|
|
388
|
+
this.cdr = cdr;
|
|
389
|
+
}
|
|
390
|
+
ngOnInit() {
|
|
391
|
+
this.loadCategories();
|
|
392
|
+
}
|
|
393
|
+
ngOnDestroy() {
|
|
394
|
+
// Cleanup
|
|
395
|
+
}
|
|
396
|
+
get selectedType() {
|
|
397
|
+
return this.credentialTypes.find(t => t.ID === this.selectedTypeId) || null;
|
|
398
|
+
}
|
|
399
|
+
get panelTitle() {
|
|
400
|
+
return this.isNew ? 'Create Credential' : 'Edit Credential';
|
|
401
|
+
}
|
|
402
|
+
get canSave() {
|
|
403
|
+
if (!this.name.trim() || !this.selectedTypeId) {
|
|
404
|
+
return false;
|
|
405
|
+
}
|
|
406
|
+
// Check required fields
|
|
407
|
+
for (const field of this.schemaFields) {
|
|
408
|
+
if (field.required && !this.credentialValues[field.name]) {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
return true;
|
|
413
|
+
}
|
|
414
|
+
async open(credential, preselectedTypeId, preselectedCategoryId) {
|
|
415
|
+
this.isLoading = true;
|
|
416
|
+
this.isOpen = true;
|
|
417
|
+
this.credential = credential;
|
|
418
|
+
this.isNew = !credential || !credential.ID;
|
|
419
|
+
this.cdr.markForCheck();
|
|
420
|
+
// Reset form
|
|
421
|
+
this.resetForm();
|
|
422
|
+
if (credential && credential.ID) {
|
|
423
|
+
// Edit mode - populate from existing credential
|
|
424
|
+
this.populateFromCredential(credential);
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
// Create mode with optional preselections
|
|
428
|
+
if (preselectedTypeId) {
|
|
429
|
+
this.selectedTypeId = preselectedTypeId;
|
|
430
|
+
this.onTypeChange();
|
|
431
|
+
}
|
|
432
|
+
if (preselectedCategoryId) {
|
|
433
|
+
this.selectedCategoryId = preselectedCategoryId;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
this.isLoading = false;
|
|
437
|
+
this.cdr.markForCheck();
|
|
438
|
+
}
|
|
439
|
+
resetForm() {
|
|
440
|
+
this.name = '';
|
|
441
|
+
this.description = '';
|
|
442
|
+
this.selectedTypeId = '';
|
|
443
|
+
this.selectedCategoryId = '';
|
|
444
|
+
this.isActive = true;
|
|
445
|
+
this.isDefault = false;
|
|
446
|
+
this.expiresAt = null;
|
|
447
|
+
this.credentialValues = {};
|
|
448
|
+
this.schemaFields = [];
|
|
449
|
+
this.showSecretFields.clear();
|
|
450
|
+
}
|
|
451
|
+
populateFromCredential(credential) {
|
|
452
|
+
this.name = credential.Name || '';
|
|
453
|
+
this.description = credential.Description || '';
|
|
454
|
+
this.selectedTypeId = credential.CredentialTypeID || '';
|
|
455
|
+
this.selectedCategoryId = credential.CategoryID || '';
|
|
456
|
+
this.isActive = credential.IsActive;
|
|
457
|
+
this.isDefault = credential.IsDefault;
|
|
458
|
+
this.expiresAt = credential.ExpiresAt ? new Date(credential.ExpiresAt) : null;
|
|
459
|
+
// Parse the type schema
|
|
460
|
+
this.onTypeChange();
|
|
461
|
+
// Parse stored values
|
|
462
|
+
try {
|
|
463
|
+
if (credential.Values) {
|
|
464
|
+
this.credentialValues = JSON.parse(credential.Values);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
catch (e) {
|
|
468
|
+
console.error('Error parsing credential values:', e);
|
|
469
|
+
this.credentialValues = {};
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
async loadCategories() {
|
|
473
|
+
try {
|
|
474
|
+
const rv = new RunView();
|
|
475
|
+
const result = await rv.RunView({
|
|
476
|
+
EntityName: 'MJ: Credential Categories',
|
|
477
|
+
OrderBy: 'Name',
|
|
478
|
+
ResultType: 'entity_object'
|
|
479
|
+
});
|
|
480
|
+
if (result.Success) {
|
|
481
|
+
this.categories = result.Results;
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
catch (error) {
|
|
485
|
+
console.error('Error loading categories:', error);
|
|
486
|
+
}
|
|
487
|
+
this.cdr.markForCheck();
|
|
488
|
+
}
|
|
489
|
+
onTypeChange() {
|
|
490
|
+
const type = this.selectedType;
|
|
491
|
+
if (!type || !type.FieldSchema) {
|
|
492
|
+
this.schemaFields = [];
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
try {
|
|
496
|
+
const schema = JSON.parse(type.FieldSchema);
|
|
497
|
+
const properties = schema.properties || {};
|
|
498
|
+
const required = schema.required || [];
|
|
499
|
+
this.schemaFields = Object.entries(properties).map(([name, prop]) => ({
|
|
500
|
+
name,
|
|
501
|
+
type: prop.type || 'string',
|
|
502
|
+
title: prop.title || name,
|
|
503
|
+
description: prop.description || '',
|
|
504
|
+
isSecret: prop.isSecret === true,
|
|
505
|
+
required: required.includes(name),
|
|
506
|
+
order: typeof prop.order === 'number' ? prop.order : 999
|
|
507
|
+
}));
|
|
508
|
+
// Sort by order
|
|
509
|
+
this.schemaFields.sort((a, b) => a.order - b.order);
|
|
510
|
+
// Initialize any missing values
|
|
511
|
+
for (const field of this.schemaFields) {
|
|
512
|
+
if (!(field.name in this.credentialValues)) {
|
|
513
|
+
this.credentialValues[field.name] = '';
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
catch (e) {
|
|
518
|
+
console.error('Error parsing field schema:', e);
|
|
519
|
+
this.schemaFields = [];
|
|
520
|
+
}
|
|
521
|
+
this.cdr.markForCheck();
|
|
522
|
+
}
|
|
523
|
+
toggleSecretVisibility(fieldName) {
|
|
524
|
+
if (this.showSecretFields.has(fieldName)) {
|
|
525
|
+
this.showSecretFields.delete(fieldName);
|
|
526
|
+
}
|
|
527
|
+
else {
|
|
528
|
+
this.showSecretFields.add(fieldName);
|
|
529
|
+
}
|
|
530
|
+
this.cdr.markForCheck();
|
|
531
|
+
}
|
|
532
|
+
isSecretVisible(fieldName) {
|
|
533
|
+
return this.showSecretFields.has(fieldName);
|
|
534
|
+
}
|
|
535
|
+
async save() {
|
|
536
|
+
if (!this.canSave) {
|
|
537
|
+
MJNotificationService.Instance.CreateSimpleNotification('Please fill in all required fields', 'warning', 3000);
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
540
|
+
this.isSaving = true;
|
|
541
|
+
this.cdr.markForCheck();
|
|
542
|
+
try {
|
|
543
|
+
let entity;
|
|
544
|
+
if (this.isNew) {
|
|
545
|
+
// Create new credential
|
|
546
|
+
entity = await this._metadata.GetEntityObject('MJ: Credentials');
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
entity = this.credential;
|
|
550
|
+
}
|
|
551
|
+
// Set all fields
|
|
552
|
+
entity.Name = this.name.trim();
|
|
553
|
+
entity.Description = this.description.trim() || null;
|
|
554
|
+
entity.CredentialTypeID = this.selectedTypeId;
|
|
555
|
+
entity.CategoryID = this.selectedCategoryId || null;
|
|
556
|
+
entity.IsActive = this.isActive;
|
|
557
|
+
entity.IsDefault = this.isDefault;
|
|
558
|
+
entity.ExpiresAt = this.expiresAt;
|
|
559
|
+
entity.Values = JSON.stringify(this.credentialValues);
|
|
560
|
+
const success = await entity.Save();
|
|
561
|
+
if (success) {
|
|
562
|
+
const action = this.isNew ? 'created' : 'updated';
|
|
563
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Credential "${entity.Name}" ${action} successfully`, 'success', 3000);
|
|
564
|
+
this.saved.emit(entity);
|
|
565
|
+
this.closePanel();
|
|
566
|
+
}
|
|
567
|
+
else {
|
|
568
|
+
const errorMessage = entity.LatestResult?.Message || 'Unknown error';
|
|
569
|
+
console.error('Save failed:', errorMessage);
|
|
570
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to save credential: ${errorMessage}`, 'error', 5000);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
catch (error) {
|
|
574
|
+
console.error('Error saving credential:', error);
|
|
575
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error saving credential', 'error', 3000);
|
|
576
|
+
}
|
|
577
|
+
finally {
|
|
578
|
+
this.isSaving = false;
|
|
579
|
+
this.cdr.markForCheck();
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
async deleteCredential() {
|
|
583
|
+
if (this.isNew || !this.credential)
|
|
584
|
+
return;
|
|
585
|
+
const confirmed = confirm(`Are you sure you want to delete "${this.credential.Name}"? This action cannot be undone.`);
|
|
586
|
+
if (!confirmed)
|
|
587
|
+
return;
|
|
588
|
+
this.isSaving = true;
|
|
589
|
+
this.cdr.markForCheck();
|
|
590
|
+
try {
|
|
591
|
+
const success = await this.credential.Delete();
|
|
592
|
+
if (success) {
|
|
593
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Credential "${this.credential.Name}" deleted successfully`, 'success', 3000);
|
|
594
|
+
this.deleted.emit(this.credential.ID);
|
|
595
|
+
this.closePanel();
|
|
596
|
+
}
|
|
597
|
+
else {
|
|
598
|
+
const errorMessage = this.credential.LatestResult?.Message || 'Unknown error';
|
|
599
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to delete credential: ${errorMessage}`, 'error', 5000);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
catch (error) {
|
|
603
|
+
console.error('Error deleting credential:', error);
|
|
604
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error deleting credential', 'error', 3000);
|
|
605
|
+
}
|
|
606
|
+
finally {
|
|
607
|
+
this.isSaving = false;
|
|
608
|
+
this.cdr.markForCheck();
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
closePanel() {
|
|
612
|
+
this.isOpen = false;
|
|
613
|
+
this.credential = null;
|
|
614
|
+
this.resetForm();
|
|
615
|
+
this.close.emit();
|
|
616
|
+
this.cdr.markForCheck();
|
|
617
|
+
}
|
|
618
|
+
onBackdropClick(event) {
|
|
619
|
+
if (event.target.classList.contains('panel-backdrop')) {
|
|
620
|
+
this.closePanel();
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
get groupedCredentialTypes() {
|
|
624
|
+
const grouped = new Map();
|
|
625
|
+
for (const type of this.credentialTypes) {
|
|
626
|
+
const category = type.Category || 'Other';
|
|
627
|
+
if (!grouped.has(category)) {
|
|
628
|
+
grouped.set(category, []);
|
|
629
|
+
}
|
|
630
|
+
grouped.get(category).push(type);
|
|
631
|
+
}
|
|
632
|
+
return Array.from(grouped.entries()).map(([category, types]) => ({ category, types }));
|
|
633
|
+
}
|
|
634
|
+
getTypeIcon(type) {
|
|
635
|
+
const iconMap = {
|
|
636
|
+
'AI': 'fa-solid fa-brain',
|
|
637
|
+
'Communication': 'fa-solid fa-envelope',
|
|
638
|
+
'Storage': 'fa-solid fa-cloud',
|
|
639
|
+
'Database': 'fa-solid fa-database',
|
|
640
|
+
'Authentication': 'fa-solid fa-shield-halved',
|
|
641
|
+
'Integration': 'fa-solid fa-plug'
|
|
642
|
+
};
|
|
643
|
+
return type.IconClass || iconMap[type.Category] || 'fa-solid fa-key';
|
|
644
|
+
}
|
|
645
|
+
getTypeColor(type) {
|
|
646
|
+
const colorMap = {
|
|
647
|
+
'AI': '#8b5cf6',
|
|
648
|
+
'Communication': '#3b82f6',
|
|
649
|
+
'Storage': '#06b6d4',
|
|
650
|
+
'Database': '#f59e0b',
|
|
651
|
+
'Authentication': '#10b981',
|
|
652
|
+
'Integration': '#ec4899'
|
|
653
|
+
};
|
|
654
|
+
return colorMap[type.Category] || '#6366f1';
|
|
655
|
+
}
|
|
656
|
+
onValueChange(fieldName, value) {
|
|
657
|
+
this.credentialValues[fieldName] = value;
|
|
658
|
+
this.cdr.markForCheck();
|
|
659
|
+
}
|
|
660
|
+
formatDateForInput(date) {
|
|
661
|
+
if (!date)
|
|
662
|
+
return '';
|
|
663
|
+
const d = new Date(date);
|
|
664
|
+
return d.toISOString().split('T')[0];
|
|
665
|
+
}
|
|
666
|
+
onExpiresAtChange(value) {
|
|
667
|
+
this.expiresAt = value ? new Date(value) : null;
|
|
668
|
+
this.cdr.markForCheck();
|
|
669
|
+
}
|
|
670
|
+
static ɵfac = function CredentialEditPanelComponent_Factory(t) { return new (t || CredentialEditPanelComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
671
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CredentialEditPanelComponent, selectors: [["mj-credential-edit-panel"]], inputs: { credential: "credential", credentialTypes: "credentialTypes", isOpen: "isOpen" }, outputs: { close: "close", saved: "saved", deleted: "deleted" }, decls: 1, vars: 1, consts: [["regularField", ""], ["class", "panel-backdrop", 3, "click", 4, "ngIf"], [1, "panel-backdrop", 3, "click"], [1, "edit-panel"], [1, "panel-header"], [1, "header-content"], ["class", "header-icon", 3, "backgroundColor", "color", 4, "ngIf"], ["class", "header-icon default", 4, "ngIf"], [1, "header-text"], ["class", "header-subtitle", 4, "ngIf"], [1, "close-btn", 3, "click", "disabled"], [1, "fa-solid", "fa-times"], [1, "panel-body"], ["text", "Loading...", 4, "ngIf"], ["class", "credential-form", 3, "submit", 4, "ngIf"], [1, "panel-footer"], [1, "footer-left"], ["class", "btn-delete", 3, "disabled", "click", 4, "ngIf"], [1, "footer-right"], [1, "btn-secondary", 3, "click", "disabled"], [1, "btn-primary", 3, "click", "disabled"], ["class", "fa-solid fa-spinner fa-spin", 4, "ngIf"], ["class", "fa-solid fa-check", 4, "ngIf"], [1, "header-icon"], [1, "header-icon", "default"], [1, "fa-solid", "fa-key"], [1, "header-subtitle"], ["text", "Loading..."], [1, "credential-form", 3, "submit"], [1, "form-section"], [1, "section-title"], [1, "fa-solid", "fa-info-circle"], [1, "form-group"], ["for", "credentialName", 1, "required"], ["type", "text", "id", "credentialName", "name", "credentialName", "placeholder", "e.g., Production OpenAI Key", "required", "", 3, "ngModelChange", "ngModel", "disabled"], ["for", "credentialType", 1, "required"], ["id", "credentialType", "name", "credentialType", "required", "", 3, "ngModelChange", "ngModel", "disabled"], [3, "ngValue"], [3, "label", 4, "ngFor", "ngForOf"], ["class", "field-hint", 4, "ngIf"], ["for", "credentialCategory"], ["id", "credentialCategory", "name", "credentialCategory", 3, "ngModelChange", "ngModel", "disabled"], [3, "ngValue", 4, "ngFor", "ngForOf"], ["for", "credentialDescription"], ["id", "credentialDescription", "name", "credentialDescription", "placeholder", "Optional description...", "rows", "3", 3, "ngModelChange", "ngModel", "disabled"], ["class", "form-section", 4, "ngIf"], ["class", "no-type-message", 4, "ngIf"], [1, "fa-solid", "fa-cog"], [1, "toggle-group"], [1, "toggle-label"], [1, "toggle-wrapper"], ["type", "checkbox", "name", "isActive", 3, "ngModelChange", "ngModel", "disabled"], [1, "toggle-slider"], [1, "toggle-text"], [1, "toggle-title"], [1, "toggle-description"], ["type", "checkbox", "name", "isDefault", 3, "ngModelChange", "ngModel", "disabled"], ["for", "expiresAt"], ["type", "date", "id", "expiresAt", "name", "expiresAt", 3, "change", "value", "disabled"], [1, "field-hint"], [3, "label"], [1, "encrypted-badge"], [1, "fa-solid", "fa-lock"], ["class", "form-group", 4, "ngFor", "ngForOf"], [3, "for"], ["class", "secret-field-wrapper", 4, "ngIf", "ngIfElse"], [1, "secret-field-wrapper"], ["autocomplete", "off", 3, "input", "type", "id", "name", "value", "placeholder", "disabled", "required"], ["type", "button", 1, "toggle-visibility-btn", 3, "click", "title"], [3, "type", "id", "name", "value", "placeholder", "disabled", "required", "input", 4, "ngIf"], [3, "input", "type", "id", "name", "value", "placeholder", "disabled", "required"], [1, "no-type-message"], [1, "message-icon"], [1, "fa-solid", "fa-hand-pointer"], [1, "btn-delete", 3, "click", "disabled"], [1, "fa-solid", "fa-trash"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-check"]], template: function CredentialEditPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
672
|
+
i0.ɵɵtemplate(0, CredentialEditPanelComponent_div_0_Template, 27, 16, "div", 1);
|
|
673
|
+
} if (rf & 2) {
|
|
674
|
+
i0.ɵɵproperty("ngIf", ctx.isOpen);
|
|
675
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.ɵNgNoValidate, i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i2.DefaultValueAccessor, i2.CheckboxControlValueAccessor, i2.SelectControlValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.RequiredValidator, i2.NgModel, i2.NgForm, i3.LoadingComponent], styles: ["\n\n.panel-backdrop[_ngcontent-%COMP%] {\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: _ngcontent-%COMP%_fadeIn 0.2s ease-out;\n}\n\n@keyframes _ngcontent-%COMP%_fadeIn {\n from { opacity: 0; }\n to { opacity: 1; }\n}\n\n\n\n.edit-panel[_ngcontent-%COMP%] {\n width: 100%;\n max-width: 520px;\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: _ngcontent-%COMP%_slideIn 0.3s ease-out forwards;\n}\n\n@keyframes _ngcontent-%COMP%_slideIn {\n from { transform: translateX(100%); }\n to { transform: translateX(0); }\n}\n\n\n\n.panel-header[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n.header-icon[_ngcontent-%COMP%] {\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-icon.default[_ngcontent-%COMP%] {\n background: #f1f5f9;\n color: #64748b;\n}\n\n.header-text[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n font-size: 18px;\n font-weight: 600;\n color: #1e293b;\n margin: 0 0 4px 0;\n}\n\n.header-subtitle[_ngcontent-%COMP%] {\n font-size: 13px;\n color: #64748b;\n}\n\n.close-btn[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #e2e8f0;\n color: #334155;\n}\n\n.close-btn[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n\n\n.panel-body[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n padding: 24px;\n}\n\n\n\n.form-section[_ngcontent-%COMP%] {\n margin-bottom: 28px;\n}\n\n.form-section[_ngcontent-%COMP%]:last-child {\n margin-bottom: 0;\n}\n\n.section-title[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #6366f1;\n font-size: 14px;\n}\n\n.encrypted-badge[_ngcontent-%COMP%] {\n margin-left: auto;\n background: #dcfce7;\n color: #166534;\n padding: 4px 10px;\n border-radius: 20px;\n font-size: 11px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.encrypted-badge[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #16a34a;\n font-size: 10px;\n}\n\n\n\n.form-group[_ngcontent-%COMP%] {\n margin-bottom: 18px;\n}\n\n.form-group[_ngcontent-%COMP%]:last-child {\n margin-bottom: 0;\n}\n\n.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: block;\n font-size: 13px;\n font-weight: 500;\n color: #475569;\n margin-bottom: 6px;\n}\n\n.form-group[_ngcontent-%COMP%] label.required[_ngcontent-%COMP%]::after {\n content: '*';\n color: #ef4444;\n margin-left: 4px;\n}\n\n.form-group[_ngcontent-%COMP%] input[type=\"text\"][_ngcontent-%COMP%], \n.form-group[_ngcontent-%COMP%] input[type=\"password\"][_ngcontent-%COMP%], \n.form-group[_ngcontent-%COMP%] input[type=\"number\"][_ngcontent-%COMP%], \n.form-group[_ngcontent-%COMP%] input[type=\"date\"][_ngcontent-%COMP%], \n.form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%], \n.form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus, \n.form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:focus, \n.form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]: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[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled, \n.form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:disabled, \n.form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:disabled {\n background: #f8fafc;\n color: #94a3b8;\n cursor: not-allowed;\n}\n\n.form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] {\n resize: vertical;\n min-height: 80px;\n}\n\n.form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\n.field-hint[_ngcontent-%COMP%] {\n display: block;\n font-size: 12px;\n color: #94a3b8;\n margin-top: 5px;\n}\n\n\n\n.secret-field-wrapper[_ngcontent-%COMP%] {\n position: relative;\n display: flex;\n}\n\n.secret-field-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n flex: 1;\n padding-right: 44px;\n}\n\n.toggle-visibility-btn[_ngcontent-%COMP%] {\n position: absolute;\n right: 4px;\n top: 50%;\n transform: translateY(-50%);\n width: 36px;\n height: 36px;\n border: none;\n background: transparent;\n color: #94a3b8;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n transition: all 0.15s ease;\n}\n\n.toggle-visibility-btn[_ngcontent-%COMP%]:hover {\n background: #f1f5f9;\n color: #6366f1;\n}\n\n\n\n.toggle-group[_ngcontent-%COMP%] {\n margin-bottom: 16px;\n}\n\n.toggle-group[_ngcontent-%COMP%]:last-child {\n margin-bottom: 0;\n}\n\n.toggle-label[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 14px;\n cursor: pointer;\n}\n\n.toggle-wrapper[_ngcontent-%COMP%] {\n position: relative;\n width: 44px;\n height: 24px;\n flex-shrink: 0;\n}\n\n.toggle-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.toggle-slider[_ngcontent-%COMP%] {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: #d1d5db;\n border-radius: 12px;\n transition: all 0.2s ease;\n}\n\n.toggle-slider[_ngcontent-%COMP%]::before {\n content: '';\n position: absolute;\n top: 2px;\n left: 2px;\n width: 20px;\n height: 20px;\n background: #ffffff;\n border-radius: 50%;\n transition: all 0.2s ease;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);\n}\n\n.toggle-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .toggle-slider[_ngcontent-%COMP%] {\n background: #6366f1;\n}\n\n.toggle-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:checked + .toggle-slider[_ngcontent-%COMP%]::before {\n transform: translateX(20px);\n}\n\n.toggle-wrapper[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:disabled + .toggle-slider[_ngcontent-%COMP%] {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.toggle-text[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.toggle-title[_ngcontent-%COMP%] {\n font-size: 14px;\n font-weight: 500;\n color: #334155;\n}\n\n.toggle-description[_ngcontent-%COMP%] {\n font-size: 12px;\n color: #94a3b8;\n}\n\n\n\n.no-type-message[_ngcontent-%COMP%] {\n text-align: center;\n padding: 32px 20px;\n background: #f8fafc;\n border-radius: 12px;\n border: 2px dashed #e2e8f0;\n}\n\n.message-icon[_ngcontent-%COMP%] {\n width: 56px;\n height: 56px;\n background: #e2e8f0;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 auto 16px;\n font-size: 24px;\n color: #94a3b8;\n}\n\n.no-type-message[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n color: #64748b;\n font-size: 14px;\n}\n\n\n\n.panel-footer[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%], \n.footer-right[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 12px;\n}\n\n.btn-primary[_ngcontent-%COMP%], \n.btn-secondary[_ngcontent-%COMP%], \n.btn-delete[_ngcontent-%COMP%] {\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[_ngcontent-%COMP%] {\n background: #6366f1;\n color: #ffffff;\n}\n\n.btn-primary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #4f46e5;\n}\n\n.btn-primary[_ngcontent-%COMP%]:disabled {\n background: #c7d2fe;\n cursor: not-allowed;\n}\n\n.btn-secondary[_ngcontent-%COMP%] {\n background: #ffffff;\n color: #475569;\n border: 1px solid #d1d5db;\n}\n\n.btn-secondary[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #f1f5f9;\n border-color: #94a3b8;\n}\n\n.btn-secondary[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.btn-delete[_ngcontent-%COMP%] {\n background: transparent;\n color: #dc2626;\n padding: 10px 16px;\n}\n\n.btn-delete[_ngcontent-%COMP%]:hover:not(:disabled) {\n background: #fef2f2;\n}\n\n.btn-delete[_ngcontent-%COMP%]:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n\n\n@media (max-width: 768px) {\n .edit-panel[_ngcontent-%COMP%] {\n max-width: 100%;\n }\n\n .panel-header[_ngcontent-%COMP%] {\n padding: 16px 20px;\n }\n\n .header-icon[_ngcontent-%COMP%] {\n width: 40px;\n height: 40px;\n font-size: 18px;\n }\n\n .header-text[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n font-size: 16px;\n }\n\n .panel-body[_ngcontent-%COMP%] {\n padding: 20px;\n }\n\n .form-section[_ngcontent-%COMP%] {\n margin-bottom: 24px;\n }\n\n .section-title[_ngcontent-%COMP%] {\n font-size: 13px;\n }\n\n .form-group[_ngcontent-%COMP%] input[_ngcontent-%COMP%], \n .form-group[_ngcontent-%COMP%] select[_ngcontent-%COMP%], \n .form-group[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%] {\n padding: 12px 14px;\n font-size: 16px; \n\n }\n\n .panel-footer[_ngcontent-%COMP%] {\n padding: 14px 20px;\n flex-direction: column-reverse;\n gap: 12px;\n }\n\n .footer-left[_ngcontent-%COMP%], \n .footer-right[_ngcontent-%COMP%] {\n width: 100%;\n }\n\n .footer-right[_ngcontent-%COMP%] {\n flex-direction: row;\n }\n\n .footer-right[_ngcontent-%COMP%] .btn-primary[_ngcontent-%COMP%], \n .footer-right[_ngcontent-%COMP%] .btn-secondary[_ngcontent-%COMP%] {\n flex: 1;\n justify-content: center;\n }\n\n .btn-delete[_ngcontent-%COMP%] {\n width: 100%;\n justify-content: center;\n background: #fef2f2;\n }\n\n .toggle-label[_ngcontent-%COMP%] {\n gap: 12px;\n }\n\n .encrypted-badge[_ngcontent-%COMP%] {\n display: none;\n }\n}\n\n@media (max-width: 480px) {\n .panel-header[_ngcontent-%COMP%] {\n padding: 14px 16px;\n }\n\n .header-content[_ngcontent-%COMP%] {\n gap: 12px;\n }\n\n .header-icon[_ngcontent-%COMP%] {\n width: 36px;\n height: 36px;\n font-size: 16px;\n border-radius: 10px;\n }\n\n .header-text[_ngcontent-%COMP%] h2[_ngcontent-%COMP%] {\n font-size: 15px;\n }\n\n .header-subtitle[_ngcontent-%COMP%] {\n font-size: 12px;\n }\n\n .panel-body[_ngcontent-%COMP%] {\n padding: 16px;\n }\n\n .section-title[_ngcontent-%COMP%] {\n font-size: 12px;\n gap: 8px;\n }\n\n .form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n font-size: 12px;\n }\n\n .toggle-title[_ngcontent-%COMP%] {\n font-size: 13px;\n }\n\n .toggle-description[_ngcontent-%COMP%] {\n font-size: 11px;\n }\n\n .no-type-message[_ngcontent-%COMP%] {\n padding: 24px 16px;\n }\n\n .message-icon[_ngcontent-%COMP%] {\n width: 48px;\n height: 48px;\n font-size: 20px;\n }\n\n .panel-footer[_ngcontent-%COMP%] {\n padding: 12px 16px;\n }\n\n .btn-primary[_ngcontent-%COMP%], \n .btn-secondary[_ngcontent-%COMP%] {\n padding: 10px 16px;\n font-size: 13px;\n }\n}\n\n\n\n@keyframes _ngcontent-%COMP%_spin {\n from { transform: rotate(0deg); }\n to { transform: rotate(360deg); }\n}\n\n.fa-spin[_ngcontent-%COMP%] {\n animation: _ngcontent-%COMP%_spin 1s linear infinite;\n}\n\n\n\n.panel-body[_ngcontent-%COMP%] {\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch;\n}\n\n\n\n.panel-body[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 6px;\n}\n\n.panel-body[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.panel-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #d1d5db;\n border-radius: 3px;\n}\n\n.panel-body[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #94a3b8;\n}"], changeDetection: 0 });
|
|
676
|
+
}
|
|
677
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CredentialEditPanelComponent, [{
|
|
678
|
+
type: Component,
|
|
679
|
+
args: [{ selector: 'mj-credential-edit-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"panel-backdrop\" *ngIf=\"isOpen\" (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\" *ngIf=\"selectedType\" [style.backgroundColor]=\"getTypeColor(selectedType) + '15'\" [style.color]=\"getTypeColor(selectedType)\">\n <i [class]=\"getTypeIcon(selectedType)\"></i>\n </div>\n <div class=\"header-icon default\" *ngIf=\"!selectedType\">\n <i class=\"fa-solid fa-key\"></i>\n </div>\n <div class=\"header-text\">\n <h2>{{panelTitle}}</h2>\n <span class=\"header-subtitle\" *ngIf=\"selectedType\">{{selectedType.Name}}</span>\n <span class=\"header-subtitle\" *ngIf=\"!selectedType\">Select a 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\n <!-- Panel Body -->\n <div class=\"panel-body\">\n <mj-loading *ngIf=\"isLoading\" text=\"Loading...\"></mj-loading>\n\n <form *ngIf=\"!isLoading\" class=\"credential-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\n <div class=\"form-group\">\n <label for=\"credentialName\" class=\"required\">Name</label>\n <input\n type=\"text\"\n id=\"credentialName\"\n name=\"credentialName\"\n [(ngModel)]=\"name\"\n placeholder=\"e.g., Production OpenAI Key\"\n [disabled]=\"isSaving\"\n required\n />\n </div>\n\n <div class=\"form-group\">\n <label for=\"credentialType\" class=\"required\">Credential Type</label>\n <select\n id=\"credentialType\"\n name=\"credentialType\"\n [(ngModel)]=\"selectedTypeId\"\n (ngModelChange)=\"onTypeChange()\"\n [disabled]=\"isSaving || !isNew\"\n required\n >\n <option [ngValue]=\"''\">Select a type...</option>\n <optgroup *ngFor=\"let group of groupedCredentialTypes\" [label]=\"group.category\">\n <option *ngFor=\"let type of group.types\" [ngValue]=\"type.ID\">\n {{type.Name}}\n </option>\n </optgroup>\n </select>\n <span class=\"field-hint\" *ngIf=\"!isNew\">Type cannot be changed after creation</span>\n </div>\n\n <div class=\"form-group\">\n <label for=\"credentialCategory\">Category</label>\n <select\n id=\"credentialCategory\"\n name=\"credentialCategory\"\n [(ngModel)]=\"selectedCategoryId\"\n [disabled]=\"isSaving\"\n >\n <option [ngValue]=\"''\">No category</option>\n <option *ngFor=\"let cat of categories\" [ngValue]=\"cat.ID\">{{cat.Name}}</option>\n </select>\n </div>\n\n <div class=\"form-group\">\n <label for=\"credentialDescription\">Description</label>\n <textarea\n id=\"credentialDescription\"\n name=\"credentialDescription\"\n [(ngModel)]=\"description\"\n placeholder=\"Optional description...\"\n rows=\"3\"\n [disabled]=\"isSaving\"\n ></textarea>\n </div>\n </div>\n\n <!-- Credential Values Section -->\n <div class=\"form-section\" *ngIf=\"schemaFields.length > 0\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-key\"></i>\n Credential Values\n <span class=\"encrypted-badge\">\n <i class=\"fa-solid fa-lock\"></i>\n Encrypted\n </span>\n </h3>\n\n <div class=\"form-group\" *ngFor=\"let field of schemaFields\">\n <label [for]=\"'field-' + field.name\" [class.required]=\"field.required\">\n {{field.title}}\n </label>\n\n <div class=\"secret-field-wrapper\" *ngIf=\"field.isSecret; else regularField\">\n <input\n [type]=\"isSecretVisible(field.name) ? 'text' : 'password'\"\n [id]=\"'field-' + field.name\"\n [name]=\"'field-' + field.name\"\n [value]=\"credentialValues[field.name]\"\n (input)=\"onValueChange(field.name, $any($event.target).value)\"\n [placeholder]=\"field.description || 'Enter ' + field.title\"\n [disabled]=\"isSaving\"\n [required]=\"field.required\"\n autocomplete=\"off\"\n />\n <button\n type=\"button\"\n class=\"toggle-visibility-btn\"\n (click)=\"toggleSecretVisibility(field.name)\"\n [title]=\"isSecretVisible(field.name) ? 'Hide' : 'Show'\"\n >\n <i [class]=\"isSecretVisible(field.name) ? 'fa-solid fa-eye-slash' : 'fa-solid fa-eye'\"></i>\n </button>\n </div>\n\n <ng-template #regularField>\n <input\n *ngIf=\"field.type === 'string' || field.type === 'number'\"\n [type]=\"field.type === 'number' ? 'number' : 'text'\"\n [id]=\"'field-' + field.name\"\n [name]=\"'field-' + field.name\"\n [value]=\"credentialValues[field.name]\"\n (input)=\"onValueChange(field.name, $any($event.target).value)\"\n [placeholder]=\"field.description || 'Enter ' + field.title\"\n [disabled]=\"isSaving\"\n [required]=\"field.required\"\n />\n </ng-template>\n\n <span class=\"field-hint\" *ngIf=\"field.description && !field.isSecret\">{{field.description}}</span>\n </div>\n </div>\n\n <!-- No Type Selected Message -->\n <div class=\"no-type-message\" *ngIf=\"isNew && !selectedTypeId\">\n <div class=\"message-icon\">\n <i class=\"fa-solid fa-hand-pointer\"></i>\n </div>\n <p>Select a credential type above to configure the credential values.</p>\n </div>\n\n <!-- Settings Section -->\n <div class=\"form-section\">\n <h3 class=\"section-title\">\n <i class=\"fa-solid fa-cog\"></i>\n Settings\n </h3>\n\n <div class=\"toggle-group\">\n <label class=\"toggle-label\">\n <span class=\"toggle-wrapper\">\n <input\n type=\"checkbox\"\n name=\"isActive\"\n [(ngModel)]=\"isActive\"\n [disabled]=\"isSaving\"\n />\n <span class=\"toggle-slider\"></span>\n </span>\n <span class=\"toggle-text\">\n <span class=\"toggle-title\">Active</span>\n <span class=\"toggle-description\">Enable this credential for use</span>\n </span>\n </label>\n </div>\n\n <div class=\"toggle-group\">\n <label class=\"toggle-label\">\n <span class=\"toggle-wrapper\">\n <input\n type=\"checkbox\"\n name=\"isDefault\"\n [(ngModel)]=\"isDefault\"\n [disabled]=\"isSaving\"\n />\n <span class=\"toggle-slider\"></span>\n </span>\n <span class=\"toggle-text\">\n <span class=\"toggle-title\">Default</span>\n <span class=\"toggle-description\">Use as default for this credential type</span>\n </span>\n </label>\n </div>\n\n <div class=\"form-group\">\n <label for=\"expiresAt\">Expiration Date</label>\n <input\n type=\"date\"\n id=\"expiresAt\"\n name=\"expiresAt\"\n [value]=\"formatDateForInput(expiresAt)\"\n (change)=\"onExpiresAtChange($any($event.target).value)\"\n [disabled]=\"isSaving\"\n />\n <span class=\"field-hint\">Leave empty for no expiration</span>\n </div>\n </div>\n </form>\n </div>\n\n <!-- Panel Footer -->\n <div class=\"panel-footer\">\n <div class=\"footer-left\">\n <button\n class=\"btn-delete\"\n *ngIf=\"!isNew\"\n (click)=\"deleteCredential()\"\n [disabled]=\"isSaving\"\n >\n <i class=\"fa-solid fa-trash\"></i>\n <span>Delete</span>\n </button>\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 <i class=\"fa-solid fa-spinner fa-spin\" *ngIf=\"isSaving\"></i>\n <i class=\"fa-solid fa-check\" *ngIf=\"!isSaving\"></i>\n <span>{{isNew ? 'Create' : 'Save'}}</span>\n </button>\n </div>\n </div>\n </div>\n</div>\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: 520px;\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-icon.default {\n background: #f1f5f9;\n color: #64748b;\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}\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.encrypted-badge {\n margin-left: auto;\n background: #dcfce7;\n color: #166534;\n padding: 4px 10px;\n border-radius: 20px;\n font-size: 11px;\n font-weight: 500;\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.encrypted-badge i {\n color: #16a34a;\n font-size: 10px;\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=\"password\"],\n.form-group input[type=\"number\"],\n.form-group input[type=\"date\"],\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.form-group select {\n cursor: pointer;\n}\n\n.field-hint {\n display: block;\n font-size: 12px;\n color: #94a3b8;\n margin-top: 5px;\n}\n\n/* Secret Field Wrapper */\n.secret-field-wrapper {\n position: relative;\n display: flex;\n}\n\n.secret-field-wrapper input {\n flex: 1;\n padding-right: 44px;\n}\n\n.toggle-visibility-btn {\n position: absolute;\n right: 4px;\n top: 50%;\n transform: translateY(-50%);\n width: 36px;\n height: 36px;\n border: none;\n background: transparent;\n color: #94a3b8;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n transition: all 0.15s ease;\n}\n\n.toggle-visibility-btn:hover {\n background: #f1f5f9;\n color: #6366f1;\n}\n\n/* Toggle Groups */\n.toggle-group {\n margin-bottom: 16px;\n}\n\n.toggle-group:last-child {\n margin-bottom: 0;\n}\n\n.toggle-label {\n display: flex;\n align-items: flex-start;\n gap: 14px;\n cursor: pointer;\n}\n\n.toggle-wrapper {\n position: relative;\n width: 44px;\n height: 24px;\n flex-shrink: 0;\n}\n\n.toggle-wrapper input {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.toggle-slider {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: #d1d5db;\n border-radius: 12px;\n transition: all 0.2s ease;\n}\n\n.toggle-slider::before {\n content: '';\n position: absolute;\n top: 2px;\n left: 2px;\n width: 20px;\n height: 20px;\n background: #ffffff;\n border-radius: 50%;\n transition: all 0.2s ease;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);\n}\n\n.toggle-wrapper input:checked + .toggle-slider {\n background: #6366f1;\n}\n\n.toggle-wrapper input:checked + .toggle-slider::before {\n transform: translateX(20px);\n}\n\n.toggle-wrapper input:disabled + .toggle-slider {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n.toggle-text {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.toggle-title {\n font-size: 14px;\n font-weight: 500;\n color: #334155;\n}\n\n.toggle-description {\n font-size: 12px;\n color: #94a3b8;\n}\n\n/* No Type Message */\n.no-type-message {\n text-align: center;\n padding: 32px 20px;\n background: #f8fafc;\n border-radius: 12px;\n border: 2px dashed #e2e8f0;\n}\n\n.message-icon {\n width: 56px;\n height: 56px;\n background: #e2e8f0;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin: 0 auto 16px;\n font-size: 24px;\n color: #94a3b8;\n}\n\n.no-type-message p {\n margin: 0;\n color: #64748b;\n font-size: 14px;\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-section {\n margin-bottom: 24px;\n }\n\n .section-title {\n font-size: 13px;\n }\n\n .form-group input,\n .form-group select,\n .form-group textarea {\n padding: 12px 14px;\n font-size: 16px; /* Prevents iOS zoom on focus */\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 .toggle-label {\n gap: 12px;\n }\n\n .encrypted-badge {\n display: none;\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 .section-title {\n font-size: 12px;\n gap: 8px;\n }\n\n .form-group label {\n font-size: 12px;\n }\n\n .toggle-title {\n font-size: 13px;\n }\n\n .toggle-description {\n font-size: 11px;\n }\n\n .no-type-message {\n padding: 24px 16px;\n }\n\n .message-icon {\n width: 48px;\n height: 48px;\n font-size: 20px;\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/* Animations for saving state */\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\n/* Smooth scrolling */\n.panel-body {\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch;\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"] }]
|
|
680
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { credential: [{
|
|
681
|
+
type: Input
|
|
682
|
+
}], credentialTypes: [{
|
|
683
|
+
type: Input
|
|
684
|
+
}], isOpen: [{
|
|
685
|
+
type: Input
|
|
686
|
+
}], close: [{
|
|
687
|
+
type: Output
|
|
688
|
+
}], saved: [{
|
|
689
|
+
type: Output
|
|
690
|
+
}], deleted: [{
|
|
691
|
+
type: Output
|
|
692
|
+
}] }); })();
|
|
693
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CredentialEditPanelComponent, { className: "CredentialEditPanelComponent", filePath: "src/Credentials/components/credential-edit-panel.component.ts", lineNumber: 30 }); })();
|
|
694
|
+
//# sourceMappingURL=credential-edit-panel.component.js.map
|