@memberjunction/ng-dashboards 2.49.0 → 2.51.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/ai-dashboard.component.d.ts +4 -0
- package/dist/AI/ai-dashboard.component.d.ts.map +1 -1
- package/dist/AI/ai-dashboard.component.js +71 -23
- package/dist/AI/ai-dashboard.component.js.map +1 -1
- package/dist/AI/components/agents/agent-configuration.component.d.ts +18 -8
- package/dist/AI/components/agents/agent-configuration.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-configuration.component.js +338 -130
- package/dist/AI/components/agents/agent-configuration.component.js.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.d.ts.map +1 -1
- package/dist/AI/components/agents/agent-editor.component.js +0 -5
- package/dist/AI/components/agents/agent-editor.component.js.map +1 -1
- package/dist/AI/components/agents/agent-filter-panel.component.d.ts +16 -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 +124 -14
- package/dist/AI/components/agents/agent-filter-panel.component.js.map +1 -1
- package/dist/AI/components/charts/time-series-chart.component.d.ts +2 -0
- package/dist/AI/components/charts/time-series-chart.component.d.ts.map +1 -1
- package/dist/AI/components/charts/time-series-chart.component.js +56 -2
- package/dist/AI/components/charts/time-series-chart.component.js.map +1 -1
- package/dist/AI/components/execution-monitoring.component.d.ts +4 -7
- package/dist/AI/components/execution-monitoring.component.d.ts.map +1 -1
- package/dist/AI/components/execution-monitoring.component.js +339 -368
- package/dist/AI/components/execution-monitoring.component.js.map +1 -1
- package/dist/AI/components/models/model-management-v2.component.d.ts +92 -0
- package/dist/AI/components/models/model-management-v2.component.d.ts.map +1 -0
- package/dist/AI/components/models/model-management-v2.component.js +1004 -0
- package/dist/AI/components/models/model-management-v2.component.js.map +1 -0
- package/dist/AI/components/prompts/prompt-management-v2.component.d.ts +66 -0
- package/dist/AI/components/prompts/prompt-management-v2.component.d.ts.map +1 -0
- package/dist/AI/components/prompts/prompt-management-v2.component.js +719 -0
- package/dist/AI/components/prompts/prompt-management-v2.component.js.map +1 -0
- package/dist/AI/services/ai-instrumentation.service.d.ts +7 -6
- package/dist/AI/services/ai-instrumentation.service.d.ts.map +1 -1
- package/dist/AI/services/ai-instrumentation.service.js +141 -147
- package/dist/AI/services/ai-instrumentation.service.js.map +1 -1
- package/dist/Actions/actions-management-dashboard.component.js +8 -8
- package/dist/Actions/actions-management-dashboard.component.js.map +1 -1
- package/dist/Actions/components/actions-list-view.component.d.ts +0 -2
- package/dist/Actions/components/actions-list-view.component.d.ts.map +1 -1
- package/dist/Actions/components/actions-list-view.component.js +37 -37
- package/dist/Actions/components/actions-list-view.component.js.map +1 -1
- package/dist/Actions/components/actions-overview.component.d.ts +7 -4
- package/dist/Actions/components/actions-overview.component.d.ts.map +1 -1
- package/dist/Actions/components/actions-overview.component.js +147 -90
- package/dist/Actions/components/actions-overview.component.js.map +1 -1
- package/dist/Actions/components/categories-list-view.component.d.ts +23 -2
- package/dist/Actions/components/categories-list-view.component.d.ts.map +1 -1
- package/dist/Actions/components/categories-list-view.component.js +283 -17
- package/dist/Actions/components/categories-list-view.component.js.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.d.ts +0 -2
- package/dist/Actions/components/execution-monitoring.component.d.ts.map +1 -1
- package/dist/Actions/components/execution-monitoring.component.js +25 -37
- package/dist/Actions/components/execution-monitoring.component.js.map +1 -1
- package/dist/module.d.ts +3 -3
- package/dist/module.js +6 -6
- package/dist/module.js.map +1 -1
- package/package.json +7 -6
- package/dist/AI/components/models/model-management.component.d.ts +0 -73
- package/dist/AI/components/models/model-management.component.d.ts.map +0 -1
- package/dist/AI/components/models/model-management.component.js +0 -643
- package/dist/AI/components/models/model-management.component.js.map +0 -1
- package/dist/AI/components/prompts/prompt-management.component.d.ts +0 -118
- package/dist/AI/components/prompts/prompt-management.component.d.ts.map +0 -1
- package/dist/AI/components/prompts/prompt-management.component.js +0 -1351
- package/dist/AI/components/prompts/prompt-management.component.js.map +0 -1
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
import { Component, Output, EventEmitter, Input } from '@angular/core';
|
|
2
|
+
import { Subject, BehaviorSubject } from 'rxjs';
|
|
3
|
+
import { takeUntil, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
4
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
import * as i1 from "@memberjunction/ng-shared";
|
|
7
|
+
import * as i2 from "@angular/forms";
|
|
8
|
+
import * as i3 from "@progress/kendo-angular-layout";
|
|
9
|
+
import * as i4 from "@memberjunction/ng-container-directives";
|
|
10
|
+
import * as i5 from "./model-prompt-priority-matrix.component";
|
|
11
|
+
const _forTrack0 = ($index, $item) => $item.ID;
|
|
12
|
+
function PromptManagementV2Component_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
13
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "div", 2)(2, "div", 3);
|
|
14
|
+
i0.ɵɵelement(3, "div", 4)(4, "div", 4)(5, "div", 4);
|
|
15
|
+
i0.ɵɵelementEnd();
|
|
16
|
+
i0.ɵɵelementStart(6, "div", 5);
|
|
17
|
+
i0.ɵɵtext(7);
|
|
18
|
+
i0.ɵɵelementEnd()()();
|
|
19
|
+
} if (rf & 2) {
|
|
20
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
21
|
+
i0.ɵɵadvance(7);
|
|
22
|
+
i0.ɵɵtextInterpolate(ctx_r0.currentLoadingMessage);
|
|
23
|
+
} }
|
|
24
|
+
function PromptManagementV2Component_Conditional_2_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
+
i0.ɵɵtext(0, " Hide Filters ");
|
|
26
|
+
} }
|
|
27
|
+
function PromptManagementV2Component_Conditional_2_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
28
|
+
i0.ɵɵtext(0, " Show Filters ");
|
|
29
|
+
} }
|
|
30
|
+
function PromptManagementV2Component_Conditional_2_Conditional_23_For_26_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
i0.ɵɵelementStart(0, "option", 42);
|
|
32
|
+
i0.ɵɵtext(1);
|
|
33
|
+
i0.ɵɵelementEnd();
|
|
34
|
+
} if (rf & 2) {
|
|
35
|
+
const category_r4 = ctx.$implicit;
|
|
36
|
+
i0.ɵɵproperty("value", category_r4.ID);
|
|
37
|
+
i0.ɵɵadvance();
|
|
38
|
+
i0.ɵɵtextInterpolate(category_r4.Name);
|
|
39
|
+
} }
|
|
40
|
+
function PromptManagementV2Component_Conditional_2_Conditional_23_For_35_Template(rf, ctx) { if (rf & 1) {
|
|
41
|
+
i0.ɵɵelementStart(0, "option", 42);
|
|
42
|
+
i0.ɵɵtext(1);
|
|
43
|
+
i0.ɵɵelementEnd();
|
|
44
|
+
} if (rf & 2) {
|
|
45
|
+
const type_r5 = ctx.$implicit;
|
|
46
|
+
i0.ɵɵproperty("value", type_r5.ID);
|
|
47
|
+
i0.ɵɵadvance();
|
|
48
|
+
i0.ɵɵtextInterpolate(type_r5.Name);
|
|
49
|
+
} }
|
|
50
|
+
function PromptManagementV2Component_Conditional_2_Conditional_23_Template(rf, ctx) { if (rf & 1) {
|
|
51
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
52
|
+
i0.ɵɵelementStart(0, "kendo-splitter-pane", 24)(1, "div", 27)(2, "div", 28)(3, "h3");
|
|
53
|
+
i0.ɵɵtext(4, "Prompt Filters");
|
|
54
|
+
i0.ɵɵelementEnd();
|
|
55
|
+
i0.ɵɵelementStart(5, "div", 29)(6, "span", 30);
|
|
56
|
+
i0.ɵɵtext(7);
|
|
57
|
+
i0.ɵɵelementEnd();
|
|
58
|
+
i0.ɵɵelementStart(8, "span", 31);
|
|
59
|
+
i0.ɵɵtext(9);
|
|
60
|
+
i0.ɵɵelementEnd()();
|
|
61
|
+
i0.ɵɵelementStart(10, "button", 32);
|
|
62
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Conditional_23_Template_button_click_10_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.toggleFilterPanel()); });
|
|
63
|
+
i0.ɵɵelement(11, "span", 33);
|
|
64
|
+
i0.ɵɵelementEnd()();
|
|
65
|
+
i0.ɵɵelementStart(12, "div", 34)(13, "div", 35)(14, "label", 36);
|
|
66
|
+
i0.ɵɵelement(15, "span", 37);
|
|
67
|
+
i0.ɵɵtext(16, " Name ");
|
|
68
|
+
i0.ɵɵelementEnd();
|
|
69
|
+
i0.ɵɵelementStart(17, "input", 38);
|
|
70
|
+
i0.ɵɵlistener("input", function PromptManagementV2Component_Conditional_2_Conditional_23_Template_input_input_17_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onSearchChange($event.target.value)); });
|
|
71
|
+
i0.ɵɵelementEnd()();
|
|
72
|
+
i0.ɵɵelementStart(18, "div", 35)(19, "label", 36);
|
|
73
|
+
i0.ɵɵelement(20, "span", 39);
|
|
74
|
+
i0.ɵɵtext(21, " Category ");
|
|
75
|
+
i0.ɵɵelementEnd();
|
|
76
|
+
i0.ɵɵelementStart(22, "select", 40);
|
|
77
|
+
i0.ɵɵlistener("change", function PromptManagementV2Component_Conditional_2_Conditional_23_Template_select_change_22_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onCategoryChange($event.target.value)); });
|
|
78
|
+
i0.ɵɵelementStart(23, "option", 41);
|
|
79
|
+
i0.ɵɵtext(24, "All Categories");
|
|
80
|
+
i0.ɵɵelementEnd();
|
|
81
|
+
i0.ɵɵrepeaterCreate(25, PromptManagementV2Component_Conditional_2_Conditional_23_For_26_Template, 2, 2, "option", 42, _forTrack0);
|
|
82
|
+
i0.ɵɵelementEnd()();
|
|
83
|
+
i0.ɵɵelementStart(27, "div", 35)(28, "label", 36);
|
|
84
|
+
i0.ɵɵelement(29, "span", 43);
|
|
85
|
+
i0.ɵɵtext(30, " Type ");
|
|
86
|
+
i0.ɵɵelementEnd();
|
|
87
|
+
i0.ɵɵelementStart(31, "select", 40);
|
|
88
|
+
i0.ɵɵlistener("change", function PromptManagementV2Component_Conditional_2_Conditional_23_Template_select_change_31_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onTypeChange($event.target.value)); });
|
|
89
|
+
i0.ɵɵelementStart(32, "option", 41);
|
|
90
|
+
i0.ɵɵtext(33, "All Types");
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
i0.ɵɵrepeaterCreate(34, PromptManagementV2Component_Conditional_2_Conditional_23_For_35_Template, 2, 2, "option", 42, _forTrack0);
|
|
93
|
+
i0.ɵɵelementEnd()();
|
|
94
|
+
i0.ɵɵelementStart(36, "div", 35)(37, "label", 36);
|
|
95
|
+
i0.ɵɵelement(38, "span", 44);
|
|
96
|
+
i0.ɵɵtext(39, " Status ");
|
|
97
|
+
i0.ɵɵelementEnd();
|
|
98
|
+
i0.ɵɵelementStart(40, "select", 40);
|
|
99
|
+
i0.ɵɵlistener("change", function PromptManagementV2Component_Conditional_2_Conditional_23_Template_select_change_40_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.onStatusChange($event.target.value)); });
|
|
100
|
+
i0.ɵɵelementStart(41, "option", 41);
|
|
101
|
+
i0.ɵɵtext(42, "All Statuses");
|
|
102
|
+
i0.ɵɵelementEnd();
|
|
103
|
+
i0.ɵɵelementStart(43, "option", 45);
|
|
104
|
+
i0.ɵɵtext(44, "Active");
|
|
105
|
+
i0.ɵɵelementEnd();
|
|
106
|
+
i0.ɵɵelementStart(45, "option", 46);
|
|
107
|
+
i0.ɵɵtext(46, "Inactive");
|
|
108
|
+
i0.ɵɵelementEnd()()();
|
|
109
|
+
i0.ɵɵelementStart(47, "div", 47)(48, "button", 48);
|
|
110
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Conditional_23_Template_button_click_48_listener() { i0.ɵɵrestoreView(_r3); const ctx_r0 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r0.clearFilters()); });
|
|
111
|
+
i0.ɵɵelement(49, "span", 49);
|
|
112
|
+
i0.ɵɵtext(50, " Reset Filters ");
|
|
113
|
+
i0.ɵɵelementEnd()()()()();
|
|
114
|
+
} if (rf & 2) {
|
|
115
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
116
|
+
i0.ɵɵadvance(7);
|
|
117
|
+
i0.ɵɵtextInterpolate(ctx_r0.filteredPrompts.length);
|
|
118
|
+
i0.ɵɵadvance(2);
|
|
119
|
+
i0.ɵɵtextInterpolate1("of ", ctx_r0.prompts.length, "");
|
|
120
|
+
i0.ɵɵadvance(8);
|
|
121
|
+
i0.ɵɵproperty("value", ctx_r0.searchTerm);
|
|
122
|
+
i0.ɵɵadvance(5);
|
|
123
|
+
i0.ɵɵproperty("value", ctx_r0.selectedCategory);
|
|
124
|
+
i0.ɵɵadvance(3);
|
|
125
|
+
i0.ɵɵrepeater(ctx_r0.categories);
|
|
126
|
+
i0.ɵɵadvance(6);
|
|
127
|
+
i0.ɵɵproperty("value", ctx_r0.selectedType);
|
|
128
|
+
i0.ɵɵadvance(3);
|
|
129
|
+
i0.ɵɵrepeater(ctx_r0.types);
|
|
130
|
+
i0.ɵɵadvance(6);
|
|
131
|
+
i0.ɵɵproperty("value", ctx_r0.selectedStatus);
|
|
132
|
+
} }
|
|
133
|
+
function PromptManagementV2Component_Conditional_2_Conditional_26_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
134
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
135
|
+
i0.ɵɵelementStart(0, "button", 52);
|
|
136
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Conditional_26_Conditional_6_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.createNewPrompt()); });
|
|
137
|
+
i0.ɵɵelement(1, "i", 22);
|
|
138
|
+
i0.ɵɵtext(2, " Create First Prompt ");
|
|
139
|
+
i0.ɵɵelementEnd();
|
|
140
|
+
} }
|
|
141
|
+
function PromptManagementV2Component_Conditional_2_Conditional_26_Template(rf, ctx) { if (rf & 1) {
|
|
142
|
+
i0.ɵɵelementStart(0, "div", 26);
|
|
143
|
+
i0.ɵɵelement(1, "i", 50);
|
|
144
|
+
i0.ɵɵelementStart(2, "h3");
|
|
145
|
+
i0.ɵɵtext(3, "No prompts found");
|
|
146
|
+
i0.ɵɵelementEnd();
|
|
147
|
+
i0.ɵɵelementStart(4, "p");
|
|
148
|
+
i0.ɵɵtext(5);
|
|
149
|
+
i0.ɵɵelementEnd();
|
|
150
|
+
i0.ɵɵtemplate(6, PromptManagementV2Component_Conditional_2_Conditional_26_Conditional_6_Template, 3, 0, "button", 51);
|
|
151
|
+
i0.ɵɵelementEnd();
|
|
152
|
+
} if (rf & 2) {
|
|
153
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
154
|
+
i0.ɵɵadvance(5);
|
|
155
|
+
i0.ɵɵtextInterpolate(ctx_r0.hasActiveFilters ? "Try adjusting your filters" : "Create your first AI prompt to get started");
|
|
156
|
+
i0.ɵɵadvance();
|
|
157
|
+
i0.ɵɵconditional(!ctx_r0.hasActiveFilters ? 6 : -1);
|
|
158
|
+
} }
|
|
159
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
160
|
+
i0.ɵɵelementStart(0, "div", 66)(1, "h5");
|
|
161
|
+
i0.ɵɵtext(2, "Description");
|
|
162
|
+
i0.ɵɵelementEnd();
|
|
163
|
+
i0.ɵɵelementStart(3, "p");
|
|
164
|
+
i0.ɵɵtext(4);
|
|
165
|
+
i0.ɵɵelementEnd()();
|
|
166
|
+
} if (rf & 2) {
|
|
167
|
+
const prompt_r8 = i0.ɵɵnextContext(2).$implicit;
|
|
168
|
+
i0.ɵɵadvance(4);
|
|
169
|
+
i0.ɵɵtextInterpolate(prompt_r8.Description);
|
|
170
|
+
} }
|
|
171
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Conditional_12_Template(rf, ctx) { if (rf & 1) {
|
|
172
|
+
i0.ɵɵelement(0, "i", 75);
|
|
173
|
+
i0.ɵɵtext(1, " Yes ");
|
|
174
|
+
} }
|
|
175
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
176
|
+
i0.ɵɵelement(0, "i", 76);
|
|
177
|
+
i0.ɵɵtext(1, " No ");
|
|
178
|
+
} }
|
|
179
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
180
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
181
|
+
i0.ɵɵelementStart(0, "div", 65);
|
|
182
|
+
i0.ɵɵtemplate(1, PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Conditional_1_Template, 5, 1, "div", 66);
|
|
183
|
+
i0.ɵɵelementStart(2, "div", 67)(3, "div", 68)(4, "span", 69);
|
|
184
|
+
i0.ɵɵtext(5, "Status");
|
|
185
|
+
i0.ɵɵelementEnd();
|
|
186
|
+
i0.ɵɵelementStart(6, "span", 70);
|
|
187
|
+
i0.ɵɵtext(7);
|
|
188
|
+
i0.ɵɵelementEnd()();
|
|
189
|
+
i0.ɵɵelementStart(8, "div", 68)(9, "span", 69);
|
|
190
|
+
i0.ɵɵtext(10, "Template");
|
|
191
|
+
i0.ɵɵelementEnd();
|
|
192
|
+
i0.ɵɵelementStart(11, "span", 71);
|
|
193
|
+
i0.ɵɵtemplate(12, PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Conditional_12_Template, 2, 0)(13, PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Conditional_13_Template, 2, 0);
|
|
194
|
+
i0.ɵɵelementEnd()();
|
|
195
|
+
i0.ɵɵelementStart(14, "div", 68)(15, "span", 69);
|
|
196
|
+
i0.ɵɵtext(16, "Contents");
|
|
197
|
+
i0.ɵɵelementEnd();
|
|
198
|
+
i0.ɵɵelementStart(17, "span", 71);
|
|
199
|
+
i0.ɵɵtext(18);
|
|
200
|
+
i0.ɵɵelementEnd()()();
|
|
201
|
+
i0.ɵɵelementStart(19, "div", 72)(20, "button", 73);
|
|
202
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Template_button_click_20_listener($event) { i0.ɵɵrestoreView(_r9); const prompt_r8 = i0.ɵɵnextContext().$implicit; const ctx_r0 = i0.ɵɵnextContext(4); ctx_r0.openPrompt(prompt_r8.ID); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
203
|
+
i0.ɵɵelement(21, "i", 74);
|
|
204
|
+
i0.ɵɵtext(22, " Edit ");
|
|
205
|
+
i0.ɵɵelementEnd()()();
|
|
206
|
+
} if (rf & 2) {
|
|
207
|
+
const prompt_r8 = i0.ɵɵnextContext().$implicit;
|
|
208
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
209
|
+
i0.ɵɵadvance();
|
|
210
|
+
i0.ɵɵconditional(prompt_r8.Description ? 1 : -1);
|
|
211
|
+
i0.ɵɵadvance(5);
|
|
212
|
+
i0.ɵɵclassMap(ctx_r0.getStatusClass(prompt_r8.Status));
|
|
213
|
+
i0.ɵɵadvance();
|
|
214
|
+
i0.ɵɵtextInterpolate1(" ", prompt_r8.Status, " ");
|
|
215
|
+
i0.ɵɵadvance(5);
|
|
216
|
+
i0.ɵɵconditional(prompt_r8.TemplateEntity ? 12 : 13);
|
|
217
|
+
i0.ɵɵadvance(6);
|
|
218
|
+
i0.ɵɵtextInterpolate((prompt_r8.TemplateContents == null ? null : prompt_r8.TemplateContents.length) || 0);
|
|
219
|
+
} }
|
|
220
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
221
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
222
|
+
i0.ɵɵelementStart(0, "div", 57)(1, "div", 58);
|
|
223
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Template_div_click_1_listener() { const prompt_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.togglePromptExpansion(prompt_r8.ID)); });
|
|
224
|
+
i0.ɵɵelementStart(2, "div", 59);
|
|
225
|
+
i0.ɵɵelement(3, "i");
|
|
226
|
+
i0.ɵɵelementEnd();
|
|
227
|
+
i0.ɵɵelementStart(4, "div", 60)(5, "h4");
|
|
228
|
+
i0.ɵɵtext(6);
|
|
229
|
+
i0.ɵɵelementEnd();
|
|
230
|
+
i0.ɵɵelementStart(7, "div", 61)(8, "span", 62);
|
|
231
|
+
i0.ɵɵtext(9);
|
|
232
|
+
i0.ɵɵelementEnd();
|
|
233
|
+
i0.ɵɵelementStart(10, "span", 63);
|
|
234
|
+
i0.ɵɵtext(11);
|
|
235
|
+
i0.ɵɵelementEnd()()();
|
|
236
|
+
i0.ɵɵelement(12, "i", 64);
|
|
237
|
+
i0.ɵɵelementEnd();
|
|
238
|
+
i0.ɵɵtemplate(13, PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Conditional_13_Template, 23, 6, "div", 65);
|
|
239
|
+
i0.ɵɵelementEnd();
|
|
240
|
+
} if (rf & 2) {
|
|
241
|
+
const prompt_r8 = ctx.$implicit;
|
|
242
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
243
|
+
i0.ɵɵclassProp("expanded", ctx_r0.expandedPromptId === prompt_r8.ID);
|
|
244
|
+
i0.ɵɵadvance(3);
|
|
245
|
+
i0.ɵɵclassMap(ctx_r0.getPromptIcon(prompt_r8));
|
|
246
|
+
i0.ɵɵadvance(3);
|
|
247
|
+
i0.ɵɵtextInterpolate(prompt_r8.Name);
|
|
248
|
+
i0.ɵɵadvance(3);
|
|
249
|
+
i0.ɵɵtextInterpolate(prompt_r8.CategoryName);
|
|
250
|
+
i0.ɵɵadvance(2);
|
|
251
|
+
i0.ɵɵtextInterpolate(prompt_r8.TypeName);
|
|
252
|
+
i0.ɵɵadvance();
|
|
253
|
+
i0.ɵɵclassProp("rotated", ctx_r0.expandedPromptId === prompt_r8.ID);
|
|
254
|
+
i0.ɵɵadvance();
|
|
255
|
+
i0.ɵɵconditional(ctx_r0.expandedPromptId === prompt_r8.ID ? 13 : -1);
|
|
256
|
+
} }
|
|
257
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_Template(rf, ctx) { if (rf & 1) {
|
|
258
|
+
i0.ɵɵelementStart(0, "div", 53);
|
|
259
|
+
i0.ɵɵrepeaterCreate(1, PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_For_2_Template, 14, 10, "div", 56, _forTrack0);
|
|
260
|
+
i0.ɵɵelementEnd();
|
|
261
|
+
} if (rf & 2) {
|
|
262
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
263
|
+
i0.ɵɵadvance();
|
|
264
|
+
i0.ɵɵrepeater(ctx_r0.filteredPrompts);
|
|
265
|
+
} }
|
|
266
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_For_18_Conditional_13_Template(rf, ctx) { if (rf & 1) {
|
|
267
|
+
i0.ɵɵelement(0, "i", 75);
|
|
268
|
+
} }
|
|
269
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_For_18_Conditional_14_Template(rf, ctx) { if (rf & 1) {
|
|
270
|
+
i0.ɵɵelement(0, "i", 76);
|
|
271
|
+
} }
|
|
272
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_For_18_Template(rf, ctx) { if (rf & 1) {
|
|
273
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
274
|
+
i0.ɵɵelementStart(0, "tr")(1, "td")(2, "div", 78);
|
|
275
|
+
i0.ɵɵelement(3, "i");
|
|
276
|
+
i0.ɵɵtext(4);
|
|
277
|
+
i0.ɵɵelementEnd()();
|
|
278
|
+
i0.ɵɵelementStart(5, "td");
|
|
279
|
+
i0.ɵɵtext(6);
|
|
280
|
+
i0.ɵɵelementEnd();
|
|
281
|
+
i0.ɵɵelementStart(7, "td");
|
|
282
|
+
i0.ɵɵtext(8);
|
|
283
|
+
i0.ɵɵelementEnd();
|
|
284
|
+
i0.ɵɵelementStart(9, "td")(10, "span", 79);
|
|
285
|
+
i0.ɵɵtext(11);
|
|
286
|
+
i0.ɵɵelementEnd()();
|
|
287
|
+
i0.ɵɵelementStart(12, "td");
|
|
288
|
+
i0.ɵɵtemplate(13, PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_For_18_Conditional_13_Template, 1, 0, "i", 75)(14, PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_For_18_Conditional_14_Template, 1, 0, "i", 76);
|
|
289
|
+
i0.ɵɵelementEnd();
|
|
290
|
+
i0.ɵɵelementStart(15, "td")(16, "button", 80);
|
|
291
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_For_18_Template_button_click_16_listener() { const prompt_r11 = i0.ɵɵrestoreView(_r10).$implicit; const ctx_r0 = i0.ɵɵnextContext(4); return i0.ɵɵresetView(ctx_r0.openPrompt(prompt_r11.ID)); });
|
|
292
|
+
i0.ɵɵelement(17, "i", 74);
|
|
293
|
+
i0.ɵɵelementEnd()()();
|
|
294
|
+
} if (rf & 2) {
|
|
295
|
+
const prompt_r11 = ctx.$implicit;
|
|
296
|
+
const ctx_r0 = i0.ɵɵnextContext(4);
|
|
297
|
+
i0.ɵɵadvance(3);
|
|
298
|
+
i0.ɵɵclassMap(ctx_r0.getPromptIcon(prompt_r11));
|
|
299
|
+
i0.ɵɵadvance();
|
|
300
|
+
i0.ɵɵtextInterpolate1(" ", prompt_r11.Name, " ");
|
|
301
|
+
i0.ɵɵadvance(2);
|
|
302
|
+
i0.ɵɵtextInterpolate(prompt_r11.CategoryName);
|
|
303
|
+
i0.ɵɵadvance(2);
|
|
304
|
+
i0.ɵɵtextInterpolate(prompt_r11.TypeName);
|
|
305
|
+
i0.ɵɵadvance(2);
|
|
306
|
+
i0.ɵɵclassMap(ctx_r0.getStatusClass(prompt_r11.Status));
|
|
307
|
+
i0.ɵɵadvance();
|
|
308
|
+
i0.ɵɵtextInterpolate1(" ", prompt_r11.Status, " ");
|
|
309
|
+
i0.ɵɵadvance(2);
|
|
310
|
+
i0.ɵɵconditional(prompt_r11.TemplateEntity ? 13 : 14);
|
|
311
|
+
} }
|
|
312
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_Template(rf, ctx) { if (rf & 1) {
|
|
313
|
+
i0.ɵɵelementStart(0, "div", 54)(1, "table", 77)(2, "thead")(3, "tr")(4, "th");
|
|
314
|
+
i0.ɵɵtext(5, "Name");
|
|
315
|
+
i0.ɵɵelementEnd();
|
|
316
|
+
i0.ɵɵelementStart(6, "th");
|
|
317
|
+
i0.ɵɵtext(7, "Category");
|
|
318
|
+
i0.ɵɵelementEnd();
|
|
319
|
+
i0.ɵɵelementStart(8, "th");
|
|
320
|
+
i0.ɵɵtext(9, "Type");
|
|
321
|
+
i0.ɵɵelementEnd();
|
|
322
|
+
i0.ɵɵelementStart(10, "th");
|
|
323
|
+
i0.ɵɵtext(11, "Status");
|
|
324
|
+
i0.ɵɵelementEnd();
|
|
325
|
+
i0.ɵɵelementStart(12, "th");
|
|
326
|
+
i0.ɵɵtext(13, "Template");
|
|
327
|
+
i0.ɵɵelementEnd();
|
|
328
|
+
i0.ɵɵelementStart(14, "th");
|
|
329
|
+
i0.ɵɵtext(15, "Actions");
|
|
330
|
+
i0.ɵɵelementEnd()()();
|
|
331
|
+
i0.ɵɵelementStart(16, "tbody");
|
|
332
|
+
i0.ɵɵrepeaterCreate(17, PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_For_18_Template, 18, 9, "tr", null, _forTrack0);
|
|
333
|
+
i0.ɵɵelementEnd()()();
|
|
334
|
+
} if (rf & 2) {
|
|
335
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
336
|
+
i0.ɵɵadvance(17);
|
|
337
|
+
i0.ɵɵrepeater(ctx_r0.filteredPrompts);
|
|
338
|
+
} }
|
|
339
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Case_2_Template(rf, ctx) { if (rf & 1) {
|
|
340
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
341
|
+
i0.ɵɵelementStart(0, "div", 55)(1, "app-model-prompt-priority-matrix", 81);
|
|
342
|
+
i0.ɵɵlistener("promptSelected", function PromptManagementV2Component_Conditional_2_Conditional_27_Case_2_Template_app_model_prompt_priority_matrix_promptSelected_1_listener($event) { i0.ɵɵrestoreView(_r12); const ctx_r0 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r0.openPrompt($event.ID)); });
|
|
343
|
+
i0.ɵɵelementEnd()();
|
|
344
|
+
} if (rf & 2) {
|
|
345
|
+
const ctx_r0 = i0.ɵɵnextContext(3);
|
|
346
|
+
i0.ɵɵadvance();
|
|
347
|
+
i0.ɵɵproperty("selectedPrompts", ctx_r0.filteredPromptsAsEntities);
|
|
348
|
+
} }
|
|
349
|
+
function PromptManagementV2Component_Conditional_2_Conditional_27_Template(rf, ctx) { if (rf & 1) {
|
|
350
|
+
i0.ɵɵtemplate(0, PromptManagementV2Component_Conditional_2_Conditional_27_Case_0_Template, 3, 0, "div", 53)(1, PromptManagementV2Component_Conditional_2_Conditional_27_Case_1_Template, 19, 0, "div", 54)(2, PromptManagementV2Component_Conditional_2_Conditional_27_Case_2_Template, 2, 1, "div", 55);
|
|
351
|
+
} if (rf & 2) {
|
|
352
|
+
let tmp_2_0;
|
|
353
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
354
|
+
i0.ɵɵconditional((tmp_2_0 = ctx_r0.viewMode) === "grid" ? 0 : tmp_2_0 === "list" ? 1 : tmp_2_0 === "priority-matrix" ? 2 : -1);
|
|
355
|
+
} }
|
|
356
|
+
function PromptManagementV2Component_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
357
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
358
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "div", 7)(2, "h2", 8);
|
|
359
|
+
i0.ɵɵelement(3, "i", 9);
|
|
360
|
+
i0.ɵɵtext(4, " AI Prompts ");
|
|
361
|
+
i0.ɵɵelementEnd();
|
|
362
|
+
i0.ɵɵelementStart(5, "button", 10);
|
|
363
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.toggleFilters()); });
|
|
364
|
+
i0.ɵɵelement(6, "i", 11);
|
|
365
|
+
i0.ɵɵtemplate(7, PromptManagementV2Component_Conditional_2_Conditional_7_Template, 1, 0)(8, PromptManagementV2Component_Conditional_2_Conditional_8_Template, 1, 0);
|
|
366
|
+
i0.ɵɵelementEnd();
|
|
367
|
+
i0.ɵɵelementStart(9, "span", 12);
|
|
368
|
+
i0.ɵɵtext(10);
|
|
369
|
+
i0.ɵɵelementEnd()();
|
|
370
|
+
i0.ɵɵelementStart(11, "div", 13)(12, "div", 14)(13, "button", 15);
|
|
371
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Template_button_click_13_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.setViewMode("grid")); });
|
|
372
|
+
i0.ɵɵelement(14, "i", 16);
|
|
373
|
+
i0.ɵɵelementEnd();
|
|
374
|
+
i0.ɵɵelementStart(15, "button", 17);
|
|
375
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.setViewMode("list")); });
|
|
376
|
+
i0.ɵɵelement(16, "i", 18);
|
|
377
|
+
i0.ɵɵelementEnd();
|
|
378
|
+
i0.ɵɵelementStart(17, "button", 19);
|
|
379
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Template_button_click_17_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.setViewMode("priority-matrix")); });
|
|
380
|
+
i0.ɵɵelement(18, "i", 20);
|
|
381
|
+
i0.ɵɵelementEnd()();
|
|
382
|
+
i0.ɵɵelementStart(19, "button", 21);
|
|
383
|
+
i0.ɵɵlistener("click", function PromptManagementV2Component_Conditional_2_Template_button_click_19_listener() { i0.ɵɵrestoreView(_r2); const ctx_r0 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r0.createNewPrompt()); });
|
|
384
|
+
i0.ɵɵelement(20, "i", 22);
|
|
385
|
+
i0.ɵɵtext(21, " New Prompt ");
|
|
386
|
+
i0.ɵɵelementEnd()()();
|
|
387
|
+
i0.ɵɵelementStart(22, "kendo-splitter", 23);
|
|
388
|
+
i0.ɵɵtemplate(23, PromptManagementV2Component_Conditional_2_Conditional_23_Template, 51, 6, "kendo-splitter-pane", 24);
|
|
389
|
+
i0.ɵɵelementStart(24, "kendo-splitter-pane")(25, "div", 25);
|
|
390
|
+
i0.ɵɵtemplate(26, PromptManagementV2Component_Conditional_2_Conditional_26_Template, 7, 2, "div", 26)(27, PromptManagementV2Component_Conditional_2_Conditional_27_Template, 3, 1);
|
|
391
|
+
i0.ɵɵelementEnd()()();
|
|
392
|
+
} if (rf & 2) {
|
|
393
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
394
|
+
i0.ɵɵadvance(7);
|
|
395
|
+
i0.ɵɵconditional(ctx_r0.showFilters ? 7 : 8);
|
|
396
|
+
i0.ɵɵadvance(3);
|
|
397
|
+
i0.ɵɵtextInterpolate1("", ctx_r0.filteredPrompts.length, " prompts");
|
|
398
|
+
i0.ɵɵadvance(3);
|
|
399
|
+
i0.ɵɵclassProp("active", ctx_r0.viewMode === "grid");
|
|
400
|
+
i0.ɵɵadvance(2);
|
|
401
|
+
i0.ɵɵclassProp("active", ctx_r0.viewMode === "list");
|
|
402
|
+
i0.ɵɵadvance(2);
|
|
403
|
+
i0.ɵɵclassProp("active", ctx_r0.viewMode === "priority-matrix");
|
|
404
|
+
i0.ɵɵadvance(6);
|
|
405
|
+
i0.ɵɵconditional(ctx_r0.showFilters ? 23 : -1);
|
|
406
|
+
i0.ɵɵadvance(3);
|
|
407
|
+
i0.ɵɵconditional(ctx_r0.filteredPrompts.length === 0 ? 26 : 27);
|
|
408
|
+
} }
|
|
409
|
+
export class PromptManagementV2Component {
|
|
410
|
+
sharedService;
|
|
411
|
+
openEntityRecord = new EventEmitter();
|
|
412
|
+
stateChange = new EventEmitter();
|
|
413
|
+
initialState = null;
|
|
414
|
+
// View state
|
|
415
|
+
viewMode = 'grid';
|
|
416
|
+
isLoading = true;
|
|
417
|
+
showFilters = true;
|
|
418
|
+
expandedPromptId = null;
|
|
419
|
+
// Data
|
|
420
|
+
prompts = [];
|
|
421
|
+
filteredPrompts = [];
|
|
422
|
+
categories = [];
|
|
423
|
+
types = [];
|
|
424
|
+
// Filtering
|
|
425
|
+
searchTerm = '';
|
|
426
|
+
searchSubject = new BehaviorSubject('');
|
|
427
|
+
selectedCategory = 'all';
|
|
428
|
+
selectedType = 'all';
|
|
429
|
+
selectedStatus = 'all';
|
|
430
|
+
// Loading messages
|
|
431
|
+
loadingMessages = [
|
|
432
|
+
'Loading AI prompts...',
|
|
433
|
+
'Fetching templates...',
|
|
434
|
+
'Organizing categories...',
|
|
435
|
+
'Almost there...'
|
|
436
|
+
];
|
|
437
|
+
currentLoadingMessage = this.loadingMessages[0];
|
|
438
|
+
loadingMessageIndex = 0;
|
|
439
|
+
loadingMessageInterval;
|
|
440
|
+
destroy$ = new Subject();
|
|
441
|
+
constructor(sharedService) {
|
|
442
|
+
this.sharedService = sharedService;
|
|
443
|
+
}
|
|
444
|
+
ngOnInit() {
|
|
445
|
+
this.setupSearchListener();
|
|
446
|
+
this.startLoadingMessages();
|
|
447
|
+
this.loadInitialData();
|
|
448
|
+
if (this.initialState) {
|
|
449
|
+
this.applyInitialState(this.initialState);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
ngOnDestroy() {
|
|
453
|
+
this.destroy$.next();
|
|
454
|
+
this.destroy$.complete();
|
|
455
|
+
if (this.loadingMessageInterval) {
|
|
456
|
+
clearInterval(this.loadingMessageInterval);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
setupSearchListener() {
|
|
460
|
+
this.searchSubject.pipe(debounceTime(300), distinctUntilChanged(), takeUntil(this.destroy$)).subscribe(searchTerm => {
|
|
461
|
+
this.searchTerm = searchTerm;
|
|
462
|
+
this.applyFilters();
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
startLoadingMessages() {
|
|
466
|
+
this.loadingMessageInterval = setInterval(() => {
|
|
467
|
+
this.loadingMessageIndex = (this.loadingMessageIndex + 1) % this.loadingMessages.length;
|
|
468
|
+
this.currentLoadingMessage = this.loadingMessages[this.loadingMessageIndex];
|
|
469
|
+
}, 2000);
|
|
470
|
+
}
|
|
471
|
+
async loadInitialData() {
|
|
472
|
+
try {
|
|
473
|
+
const rv = new RunView();
|
|
474
|
+
const md = new Metadata();
|
|
475
|
+
// Load all data in parallel using RunViews
|
|
476
|
+
const [promptResults, categoryResults, typeResults, templateResults, templateContentResults] = await rv.RunViews([
|
|
477
|
+
{
|
|
478
|
+
EntityName: 'AI Prompts',
|
|
479
|
+
OrderBy: 'Name',
|
|
480
|
+
MaxRows: 1000,
|
|
481
|
+
ResultType: 'entity_object'
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
EntityName: 'AI Prompt Categories',
|
|
485
|
+
OrderBy: 'Name',
|
|
486
|
+
MaxRows: 1000,
|
|
487
|
+
ResultType: 'entity_object'
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
EntityName: 'AI Prompt Types',
|
|
491
|
+
OrderBy: 'Name',
|
|
492
|
+
MaxRows: 1000,
|
|
493
|
+
ResultType: 'entity_object'
|
|
494
|
+
},
|
|
495
|
+
{
|
|
496
|
+
EntityName: 'Templates',
|
|
497
|
+
ExtraFilter: `EntityID IN (SELECT ID FROM AIPrompt)`,
|
|
498
|
+
MaxRows: 1000,
|
|
499
|
+
ResultType: 'entity_object'
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
EntityName: 'Template Contents',
|
|
503
|
+
MaxRows: 5000,
|
|
504
|
+
ResultType: 'entity_object'
|
|
505
|
+
}
|
|
506
|
+
]);
|
|
507
|
+
this.categories = categoryResults.Results;
|
|
508
|
+
this.types = typeResults.Results;
|
|
509
|
+
// Combine prompts with their templates
|
|
510
|
+
const templates = templateResults.Results;
|
|
511
|
+
const templateContents = templateContentResults.Results;
|
|
512
|
+
// Create lookup maps
|
|
513
|
+
const templateMap = new Map(templates.map(t => [t.ID, t]));
|
|
514
|
+
const templateContentMap = new Map();
|
|
515
|
+
templateContents.forEach(tc => {
|
|
516
|
+
const contents = templateContentMap.get(tc.TemplateID) || [];
|
|
517
|
+
contents.push(tc);
|
|
518
|
+
templateContentMap.set(tc.TemplateID, contents);
|
|
519
|
+
});
|
|
520
|
+
const categoryMap = new Map(this.categories.map(c => [c.ID, c.Name]));
|
|
521
|
+
const typeMap = new Map(this.types.map(t => [t.ID, t.Name]));
|
|
522
|
+
// Combine the data
|
|
523
|
+
this.prompts = promptResults.Results.map(prompt => {
|
|
524
|
+
const template = templateMap.get(prompt.ID);
|
|
525
|
+
return {
|
|
526
|
+
...prompt,
|
|
527
|
+
TemplateEntity: template,
|
|
528
|
+
TemplateContents: template ? (templateContentMap.get(template.ID) || []) : [],
|
|
529
|
+
CategoryName: prompt.CategoryID ? categoryMap.get(prompt.CategoryID) || 'Unknown' : 'Uncategorized',
|
|
530
|
+
TypeName: prompt.TypeID ? typeMap.get(prompt.TypeID) || 'Unknown' : 'Untyped'
|
|
531
|
+
};
|
|
532
|
+
});
|
|
533
|
+
this.filteredPrompts = [...this.prompts];
|
|
534
|
+
this.applyFilters();
|
|
535
|
+
this.emitStateChange();
|
|
536
|
+
}
|
|
537
|
+
catch (error) {
|
|
538
|
+
console.error('Error loading prompt data:', error);
|
|
539
|
+
this.sharedService.CreateSimpleNotification('Error loading prompts', 'error', 3000);
|
|
540
|
+
}
|
|
541
|
+
finally {
|
|
542
|
+
this.isLoading = false;
|
|
543
|
+
if (this.loadingMessageInterval) {
|
|
544
|
+
clearInterval(this.loadingMessageInterval);
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
applyInitialState(state) {
|
|
549
|
+
if (state.viewMode)
|
|
550
|
+
this.viewMode = state.viewMode;
|
|
551
|
+
if (state.showFilters !== undefined)
|
|
552
|
+
this.showFilters = state.showFilters;
|
|
553
|
+
if (state.searchTerm)
|
|
554
|
+
this.searchTerm = state.searchTerm;
|
|
555
|
+
if (state.selectedCategory)
|
|
556
|
+
this.selectedCategory = state.selectedCategory;
|
|
557
|
+
if (state.selectedType)
|
|
558
|
+
this.selectedType = state.selectedType;
|
|
559
|
+
if (state.selectedStatus)
|
|
560
|
+
this.selectedStatus = state.selectedStatus;
|
|
561
|
+
}
|
|
562
|
+
onSearchChange(value) {
|
|
563
|
+
this.searchSubject.next(value);
|
|
564
|
+
}
|
|
565
|
+
toggleFilters() {
|
|
566
|
+
this.showFilters = !this.showFilters;
|
|
567
|
+
this.emitStateChange();
|
|
568
|
+
}
|
|
569
|
+
toggleFilterPanel() {
|
|
570
|
+
this.showFilters = !this.showFilters;
|
|
571
|
+
this.emitStateChange();
|
|
572
|
+
}
|
|
573
|
+
setViewMode(mode) {
|
|
574
|
+
this.viewMode = mode;
|
|
575
|
+
this.expandedPromptId = null;
|
|
576
|
+
this.emitStateChange();
|
|
577
|
+
}
|
|
578
|
+
togglePromptExpansion(promptId) {
|
|
579
|
+
this.expandedPromptId = this.expandedPromptId === promptId ? null : promptId;
|
|
580
|
+
}
|
|
581
|
+
applyFilters() {
|
|
582
|
+
this.filteredPrompts = this.prompts.filter(prompt => {
|
|
583
|
+
// Search filter
|
|
584
|
+
if (this.searchTerm) {
|
|
585
|
+
const searchLower = this.searchTerm.toLowerCase();
|
|
586
|
+
const matchesSearch = prompt.Name?.toLowerCase().includes(searchLower) ||
|
|
587
|
+
prompt.Description?.toLowerCase().includes(searchLower) ||
|
|
588
|
+
prompt.CategoryName?.toLowerCase().includes(searchLower) ||
|
|
589
|
+
prompt.TypeName?.toLowerCase().includes(searchLower);
|
|
590
|
+
if (!matchesSearch)
|
|
591
|
+
return false;
|
|
592
|
+
}
|
|
593
|
+
// Category filter
|
|
594
|
+
if (this.selectedCategory !== 'all' && prompt.CategoryID !== this.selectedCategory) {
|
|
595
|
+
return false;
|
|
596
|
+
}
|
|
597
|
+
// Type filter
|
|
598
|
+
if (this.selectedType !== 'all' && prompt.TypeID !== this.selectedType) {
|
|
599
|
+
return false;
|
|
600
|
+
}
|
|
601
|
+
// Status filter
|
|
602
|
+
if (this.selectedStatus !== 'all') {
|
|
603
|
+
const isActive = prompt.Status === 'Active';
|
|
604
|
+
if (this.selectedStatus === 'active' && !isActive)
|
|
605
|
+
return false;
|
|
606
|
+
if (this.selectedStatus === 'inactive' && isActive)
|
|
607
|
+
return false;
|
|
608
|
+
}
|
|
609
|
+
return true;
|
|
610
|
+
});
|
|
611
|
+
this.emitStateChange();
|
|
612
|
+
}
|
|
613
|
+
onCategoryChange(categoryId) {
|
|
614
|
+
this.selectedCategory = categoryId;
|
|
615
|
+
this.applyFilters();
|
|
616
|
+
}
|
|
617
|
+
onTypeChange(typeId) {
|
|
618
|
+
this.selectedType = typeId;
|
|
619
|
+
this.applyFilters();
|
|
620
|
+
}
|
|
621
|
+
onStatusChange(status) {
|
|
622
|
+
this.selectedStatus = status;
|
|
623
|
+
this.applyFilters();
|
|
624
|
+
}
|
|
625
|
+
openPrompt(promptId) {
|
|
626
|
+
this.openEntityRecord.emit({
|
|
627
|
+
entityName: 'AI Prompts',
|
|
628
|
+
recordId: promptId
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
async createNewPrompt() {
|
|
632
|
+
try {
|
|
633
|
+
const md = new Metadata();
|
|
634
|
+
const newPrompt = await md.GetEntityObject('AI Prompts');
|
|
635
|
+
if (newPrompt) {
|
|
636
|
+
newPrompt.Name = 'New Prompt';
|
|
637
|
+
newPrompt.Status = 'Active';
|
|
638
|
+
if (await newPrompt.Save()) {
|
|
639
|
+
this.openEntityRecord.emit({
|
|
640
|
+
entityName: 'AI Prompts',
|
|
641
|
+
recordId: newPrompt.ID
|
|
642
|
+
});
|
|
643
|
+
// Reload the data
|
|
644
|
+
await this.loadInitialData();
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
catch (error) {
|
|
649
|
+
console.error('Error creating new prompt:', error);
|
|
650
|
+
this.sharedService.CreateSimpleNotification('Error creating prompt', 'error', 3000);
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
getPromptIcon(prompt) {
|
|
654
|
+
if (prompt.TypeName?.toLowerCase().includes('system')) {
|
|
655
|
+
return 'fa-solid fa-cogs';
|
|
656
|
+
}
|
|
657
|
+
else if (prompt.TypeName?.toLowerCase().includes('user')) {
|
|
658
|
+
return 'fa-solid fa-user';
|
|
659
|
+
}
|
|
660
|
+
else if (prompt.TypeName?.toLowerCase().includes('chat')) {
|
|
661
|
+
return 'fa-solid fa-comments';
|
|
662
|
+
}
|
|
663
|
+
return 'fa-solid fa-comment-dots';
|
|
664
|
+
}
|
|
665
|
+
getStatusClass(status) {
|
|
666
|
+
return status === 'Active' ? 'active' : 'inactive';
|
|
667
|
+
}
|
|
668
|
+
emitStateChange() {
|
|
669
|
+
this.stateChange.emit({
|
|
670
|
+
viewMode: this.viewMode,
|
|
671
|
+
showFilters: this.showFilters,
|
|
672
|
+
searchTerm: this.searchTerm,
|
|
673
|
+
selectedCategory: this.selectedCategory,
|
|
674
|
+
selectedType: this.selectedType,
|
|
675
|
+
selectedStatus: this.selectedStatus,
|
|
676
|
+
promptCount: this.filteredPrompts.length
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
get hasActiveFilters() {
|
|
680
|
+
return this.searchTerm !== '' ||
|
|
681
|
+
this.selectedCategory !== 'all' ||
|
|
682
|
+
this.selectedType !== 'all' ||
|
|
683
|
+
this.selectedStatus !== 'all';
|
|
684
|
+
}
|
|
685
|
+
get filteredPromptsAsEntities() {
|
|
686
|
+
// Cast PromptWithTemplate[] to AIPromptEntity[] for the priority matrix
|
|
687
|
+
return this.filteredPrompts;
|
|
688
|
+
}
|
|
689
|
+
clearFilters() {
|
|
690
|
+
this.searchTerm = '';
|
|
691
|
+
this.selectedCategory = 'all';
|
|
692
|
+
this.selectedType = 'all';
|
|
693
|
+
this.selectedStatus = 'all';
|
|
694
|
+
this.searchSubject.next('');
|
|
695
|
+
this.applyFilters();
|
|
696
|
+
}
|
|
697
|
+
static ɵfac = function PromptManagementV2Component_Factory(t) { return new (t || PromptManagementV2Component)(i0.ɵɵdirectiveInject(i1.SharedService)); };
|
|
698
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PromptManagementV2Component, selectors: [["app-prompt-management-v2"]], inputs: { initialState: "initialState" }, outputs: { openEntityRecord: "openEntityRecord", stateChange: "stateChange" }, decls: 3, vars: 3, consts: [["mjFillContainer", "", 1, "prompt-management-v2", 3, "rightMargin", "bottomMargin"], [1, "loading-container"], [1, "loading-content"], [1, "loading-spinner"], [1, "spinner-ring"], [1, "loading-text"], [1, "dashboard-header", 2, "display", "flex !important", "justify-content", "space-between !important", "align-items", "center !important", "padding", "16px 24px !important", "background", "white !important"], [1, "header-info", 2, "display", "flex !important", "align-items", "center !important", "gap", "16px !important", "flex", "1 !important"], [1, "dashboard-title", 2, "margin", "0 !important", "display", "flex !important", "align-items", "center !important", "gap", "8px !important"], [1, "fa-solid", "fa-message"], ["type", "button", "title", "Toggle Filters", 1, "filter-toggle-btn", 3, "click"], [1, "fa-solid", "fa-filter"], [1, "item-count"], [1, "header-controls", 2, "display", "flex !important", "align-items", "center !important", "gap", "16px !important"], [1, "view-toggle"], ["type", "button", "title", "Grid View", 1, "view-btn", 3, "click"], [1, "fa-solid", "fa-grip"], ["type", "button", "title", "List View", 1, "view-btn", 3, "click"], [1, "fa-solid", "fa-list"], ["type", "button", "title", "Priority Matrix", 1, "view-btn", 3, "click"], [1, "fa-solid", "fa-chart-scatter"], ["type", "button", "title", "Create New Prompt", 1, "control-btn", "primary", 3, "click"], [1, "fa-solid", "fa-plus"], ["mjFillContainer", "", "orientation", "horizontal"], ["size", "320", "min", "250", "max", "400"], [1, "content-area"], [1, "empty-state"], [1, "filter-panel"], [1, "filter-panel-header"], [1, "filter-summary-inline"], [1, "summary-value"], [1, "summary-label"], [1, "close-btn", 3, "click"], [1, "fa-solid", "fa-times"], [1, "filter-content"], [1, "filter-group"], [1, "filter-label"], [1, "fa-solid", "fa-search"], ["type", "text", "placeholder", "Search prompts...", 1, "filter-input", 3, "input", "value"], [1, "fa-solid", "fa-folder"], [1, "filter-select", 3, "change", "value"], ["value", "all"], [3, "value"], [1, "fa-solid", "fa-tag"], [1, "fa-solid", "fa-toggle-on"], ["value", "active"], ["value", "inactive"], [1, "filter-actions"], ["title", "Reset all filters", 1, "reset-btn", 3, "click"], [1, "fa-solid", "fa-undo"], [1, "fa-solid", "fa-comment-dots", "fa-4x"], [1, "primary-action"], [1, "primary-action", 3, "click"], [1, "prompt-grid"], [1, "prompt-list"], [1, "priority-matrix-container"], [1, "prompt-card", 3, "expanded"], [1, "prompt-card"], [1, "card-header", 3, "click"], [1, "card-icon"], [1, "card-info"], [1, "card-meta"], [1, "category"], [1, "type"], [1, "fa-solid", "fa-chevron-down", "expand-icon"], [1, "card-content"], [1, "description-section"], [1, "stats-grid"], [1, "stat"], [1, "stat-label"], [1, "stat-value", "status-badge"], [1, "stat-value"], [1, "card-footer"], [1, "action-button", 3, "click"], [1, "fa-solid", "fa-edit"], [1, "fa-solid", "fa-check-circle", "text-success"], [1, "fa-solid", "fa-times-circle", "text-muted"], [1, "data-table"], [1, "name-cell"], [1, "status-badge"], [1, "action-button", "small", 3, "click"], [3, "promptSelected", "selectedPrompts"]], template: function PromptManagementV2Component_Template(rf, ctx) { if (rf & 1) {
|
|
699
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
700
|
+
i0.ɵɵtemplate(1, PromptManagementV2Component_Conditional_1_Template, 8, 1, "div", 1)(2, PromptManagementV2Component_Conditional_2_Template, 28, 10);
|
|
701
|
+
i0.ɵɵelementEnd();
|
|
702
|
+
} if (rf & 2) {
|
|
703
|
+
i0.ɵɵproperty("rightMargin", 8)("bottomMargin", 8);
|
|
704
|
+
i0.ɵɵadvance();
|
|
705
|
+
i0.ɵɵconditional(ctx.isLoading ? 1 : 2);
|
|
706
|
+
} }, dependencies: [i2.NgSelectOption, i2.ɵNgSelectMultipleOption, i3.SplitterComponent, i3.SplitterPaneComponent, i4.FillContainer, i5.ModelPromptPriorityMatrixComponent], styles: [".prompt-management-v2[_ngcontent-%COMP%] {\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #f5f7fa;\n}\n\n//[_ngcontent-%COMP%] Loading[_ngcontent-%COMP%] state\n.loading-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n background-color: #f5f7fa;\n}\n\n.loading-content[_ngcontent-%COMP%] {\n text-align: center;\n}\n\n.loading-spinner[_ngcontent-%COMP%] {\n position: relative;\n width: 80px;\n height: 80px;\n margin: 0 auto 20px;\n}\n\n.spinner-ring[_ngcontent-%COMP%] {\n position: absolute;\n width: 100%;\n height: 100%;\n border: 3px solid transparent;\n border-top-color: #17a2b8;\n border-radius: 50%;\n animation: _ngcontent-%COMP%_spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;\n \n &:nth-child(2) {\n animation-delay: 0.15s;\n width: 70%;\n height: 70%;\n top: 15%;\n left: 15%;\n border-top-color: #28a745;\n }\n \n &:nth-child(3) {\n animation-delay: 0.3s;\n width: 40%;\n height: 40%;\n top: 30%;\n left: 30%;\n border-top-color: #ffc107;\n }\n}\n\n@keyframes _ngcontent-%COMP%_spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n.loading-text[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 16px;\n animation: _ngcontent-%COMP%_pulse 2s ease-in-out infinite;\n}\n\n@keyframes _ngcontent-%COMP%_pulse {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 1; }\n}\n\n//[_ngcontent-%COMP%] Dashboard[_ngcontent-%COMP%] Header\n.dashboard-header[_ngcontent-%COMP%] {\n background: white;\n padding: 16px 24px;\n border-bottom: 1px solid #e0e6ed;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-shadow: 0 2px 4px rgba(0,0,0,0.04);\n}\n\n.header-info[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n.dashboard-title[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 20px;\n font-weight: 600;\n color: #2c3e50;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.dashboard-title[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n color: #17a2b8;\n}\n\n.filter-toggle-btn[_ngcontent-%COMP%] {\n background: #f8f9fa;\n border: 1px solid #dee2e6;\n padding: 8px 16px;\n border-radius: 6px;\n font-size: 14px;\n color: #495057;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.filter-toggle-btn[_ngcontent-%COMP%]:hover {\n background: #e9ecef;\n border-color: #ced4da;\n}\n\n.item-count[_ngcontent-%COMP%] {\n color: #6c757d;\n font-size: 14px;\n font-weight: 500;\n}\n\n.header-controls[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n//[_ngcontent-%COMP%] View[_ngcontent-%COMP%] Toggle\n.view-toggle[_ngcontent-%COMP%] {\n display: flex;\n background: #f8f9fa;\n border-radius: 6px;\n padding: 2px;\n border: 1px solid #dee2e6;\n}\n\n.view-btn[_ngcontent-%COMP%] {\n background: transparent;\n border: none;\n padding: 6px 12px;\n border-radius: 4px;\n color: #6c757d;\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: 16px;\n}\n\n.view-btn[_ngcontent-%COMP%]:hover {\n color: #495057;\n}\n\n.view-btn.active[_ngcontent-%COMP%] {\n background: white;\n color: #17a2b8;\n box-shadow: 0 1px 2px rgba(0,0,0,0.08);\n}\n\n//[_ngcontent-%COMP%] Control[_ngcontent-%COMP%] Buttons\n.control-btn[_ngcontent-%COMP%] {\n background: #f8f9fa;\n border: 1px solid #dee2e6;\n padding: 10px 20px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n color: #495057;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.control-btn[_ngcontent-%COMP%]:hover {\n background: #e9ecef;\n border-color: #ced4da;\n}\n\n.control-btn.primary[_ngcontent-%COMP%] {\n background: #17a2b8;\n border-color: #17a2b8;\n color: white;\n}\n\n.control-btn.primary[_ngcontent-%COMP%]:hover {\n background: #138496;\n border-color: #117a8b;\n transform: translateY(-1px);\n box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);\n}\n\n//[_ngcontent-%COMP%] Splitter[_ngcontent-%COMP%] content\nkendo-splitter[_ngcontent-%COMP%] {\n flex: 1;\n background-color: #f5f7fa;\n margin-top: 8px;\n}\n\n//[_ngcontent-%COMP%] Filter[_ngcontent-%COMP%] panel\n.filter-panel[_ngcontent-%COMP%] {\n height: 100%;\n background: white;\n border-right: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.filter-panel-header[_ngcontent-%COMP%] {\n padding: 16px;\n border-bottom: 1px solid #f0f0f0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n \n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 500;\n color: #333;\n flex: 1;\n }\n \n .filter-summary-inline {\n display: flex;\n align-items: baseline;\n gap: 4px;\n margin-right: 12px;\n font-size: 12px;\n \n .summary-value {\n font-weight: 600;\n color: #2196f3;\n }\n \n .summary-label {\n color: #666;\n }\n }\n \n .close-btn {\n background: none;\n border: none;\n padding: 4px;\n cursor: pointer;\n color: #666;\n border-radius: 3px;\n transition: all 0.2s;\n \n &:hover {\n background: #f0f0f0;\n color: #333;\n }\n \n .fa-solid {\n font-size: 12px;\n }\n }\n}\n\n.filter-content[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n padding: 12px;\n}\n\n.filter-group[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n \n .filter-label {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 6px;\n font-size: 12px;\n font-weight: 500;\n color: #555;\n \n .fa-solid {\n font-size: 11px;\n color: #2196f3;\n width: 12px;\n }\n }\n}\n\n.filter-input[_ngcontent-%COMP%], .filter-select[_ngcontent-%COMP%] {\n width: calc(100% - 4px);\n max-width: 100%;\n padding: 8px 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 12px;\n background: white;\n transition: border-color 0.2s;\n box-sizing: border-box;\n \n &:focus {\n outline: none;\n border-color: #2196f3;\n }\n \n &::placeholder {\n color: #999;\n }\n}\n\n.filter-select[_ngcontent-%COMP%] {\n cursor: pointer;\n}\n\n.filter-actions[_ngcontent-%COMP%] {\n margin-top: 24px;\n padding-top: 16px;\n border-top: 1px solid #f0f0f0;\n \n .reset-btn {\n width: calc(100% - 4px);\n max-width: 100%;\n padding: 8px 12px;\n background: #f8f9fa;\n border: 1px solid #e0e0e0;\n border-radius: 4px;\n color: #666;\n font-size: 12px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n transition: all 0.2s;\n box-sizing: border-box;\n \n &:hover {\n background: #e9ecef;\n border-color: #ccc;\n color: #333;\n }\n \n .fa-solid {\n font-size: 11px;\n }\n }\n}\n\n//[_ngcontent-%COMP%] Content[_ngcontent-%COMP%] area\n.content-area[_ngcontent-%COMP%] {\n height: 100%;\n padding: 24px;\n overflow-y: auto;\n background: #f5f7fa;\n}\n\n//[_ngcontent-%COMP%] Empty[_ngcontent-%COMP%] state\n.empty-state[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n text-align: center;\n color: #6c757d;\n \n i {\n margin-bottom: 24px;\n opacity: 0.3;\n }\n \n h3 {\n margin: 0 0 8px 0;\n font-size: 20px;\n font-weight: 600;\n color: #495057;\n }\n \n p {\n margin: 0 0 24px 0;\n font-size: 16px;\n }\n}\n\n//[_ngcontent-%COMP%] Grid[_ngcontent-%COMP%] view\n.prompt-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));\n}\n\n.prompt-card[_ngcontent-%COMP%] {\n margin: 20px; // instead of gap in grid, for some reason that didn't work\n background: white;\n border-radius: 12px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);\n border: 1px solid #e0e6ed;\n transition: all 0.3s ease;\n overflow: hidden;\n \n &:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n }\n \n &.expanded {\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);\n .expand-icon {\n transform: rotate(180deg);\n }\n }\n}\n\n.card-header[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n padding: 20px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n \n &:hover {\n background-color: #f8f9fa;\n }\n}\n\n.card-icon[_ngcontent-%COMP%] {\n width: 48px;\n height: 48px;\n background-color: #e3f2fd;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 16px;\n flex-shrink: 0;\n \n i {\n font-size: 24px;\n color: #17a2b8;\n }\n}\n\n.card-info[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n \n h4 {\n margin: 0 0 4px 0;\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n}\n\n.card-meta[_ngcontent-%COMP%] {\n display: flex;\n gap: 12px;\n font-size: 13px;\n color: #6c757d;\n \n .category, .type {\n display: flex;\n align-items: center;\n gap: 4px;\n \n &::before {\n content: '\u2022';\n color: #dee2e6;\n }\n \n &:first-child::before {\n display: none;\n }\n }\n}\n\n.expand-icon[_ngcontent-%COMP%] {\n color: #adb5bd;\n transition: transform 0.3s ease;\n margin-left: 12px;\n}\n\n.card-content[_ngcontent-%COMP%] {\n padding: 0 20px 20px;\n animation: slideDown 0.3s ease;\n}\n\n@keyframes _ngcontent-%COMP%_slideDown {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.description-section[_ngcontent-%COMP%] {\n margin-bottom: 16px;\n \n h5 {\n margin: 0 0 8px 0;\n font-size: 13px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n \n p {\n margin: 0;\n font-size: 14px;\n color: #495057;\n line-height: 1.6;\n }\n}\n\n.stats-grid[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n margin-bottom: 16px;\n}\n\n.stat[_ngcontent-%COMP%] {\n text-align: center;\n \n .stat-label {\n display: block;\n font-size: 12px;\n color: #6c757d;\n margin-bottom: 4px;\n }\n \n .stat-value {\n display: block;\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n }\n}\n\n.status-badge[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 12px;\n font-weight: 500;\n \n &.active {\n background-color: #d4edda;\n color: #155724;\n }\n \n &.inactive {\n background-color: #f8d7da;\n color: #721c24;\n }\n}\n\n.card-footer[_ngcontent-%COMP%] {\n padding-top: 16px;\n border-top: 1px solid #e9ecef;\n display: flex;\n gap: 8px;\n}\n\n.action-button[_ngcontent-%COMP%] {\n padding: 6px 12px;\n background-color: #f8f9fa;\n border: 1px solid #dee2e6;\n border-radius: 4px;\n color: #495057;\n font-size: 13px;\n cursor: pointer;\n transition: all 0.2s ease;\n \n &:hover {\n background-color: #e9ecef;\n border-color: #adb5bd;\n color: #212529;\n }\n \n &.small {\n padding: 4px 8px;\n font-size: 12px;\n }\n \n i {\n margin-right: 4px;\n }\n}\n\n//[_ngcontent-%COMP%] List[_ngcontent-%COMP%] view\n.prompt-list[_ngcontent-%COMP%] {\n background: white;\n border-radius: 12px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);\n border: 1px solid #e0e6ed;\n overflow: hidden;\n}\n\n.data-table[_ngcontent-%COMP%] {\n width: 100%;\n border-collapse: collapse;\n \n thead {\n background-color: #f8f9fa;\n \n tr {\n border-bottom: 2px solid #dee2e6;\n }\n \n th {\n padding: 12px 16px;\n text-align: left;\n font-size: 13px;\n font-weight: 600;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n }\n \n tbody {\n tr {\n border-bottom: 1px solid #e9ecef;\n transition: background-color 0.2s ease;\n \n &:hover {\n background-color: #f8f9fa;\n }\n \n &:last-child {\n border-bottom: none;\n }\n }\n \n td {\n padding: 16px;\n font-size: 14px;\n color: #495057;\n }\n }\n}\n\n.name-cell[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n color: #2c3e50;\n \n i {\n color: #17a2b8;\n }\n}\n\n//[_ngcontent-%COMP%] Priority[_ngcontent-%COMP%] matrix[_ngcontent-%COMP%] container\n.priority-matrix-container[_ngcontent-%COMP%] {\n height: 100%;\n background-color: white;\n border-radius: 12px;\n padding: 24px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);\n}\n\n//[_ngcontent-%COMP%] Responsive\n@media[_ngcontent-%COMP%] (max-width:[_ngcontent-%COMP%] 768px)[_ngcontent-%COMP%] {\n .prompt-header {\n flex-wrap: wrap;\n gap: 16px;\n }\n \n .header-right {\n width: 100%;\n justify-content: space-between;\n }\n \n .prompt-grid {\n grid-template-columns: 1fr;\n }\n \n .stats-grid {\n grid-template-columns: 1fr;\n }\n}\n\n//[_ngcontent-%COMP%] Text[_ngcontent-%COMP%] utility[_ngcontent-%COMP%] classes\n.text-success[_ngcontent-%COMP%] {\n color: #28a745;\n}\n\n.text-muted[_ngcontent-%COMP%] {\n color: #6c757d;\n}"] });
|
|
707
|
+
}
|
|
708
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PromptManagementV2Component, [{
|
|
709
|
+
type: Component,
|
|
710
|
+
args: [{ selector: 'app-prompt-management-v2', template: "<div class=\"prompt-management-v2\" mjFillContainer [rightMargin]=\"8\" [bottomMargin]=\"8\">\n @if (isLoading) {\n <div class=\"loading-container\">\n <div class=\"loading-content\">\n <div class=\"loading-spinner\">\n <div class=\"spinner-ring\"></div>\n <div class=\"spinner-ring\"></div>\n <div class=\"spinner-ring\"></div>\n </div>\n <div class=\"loading-text\">{{ currentLoadingMessage }}</div>\n </div>\n </div>\n } @else {\n <div class=\"dashboard-header\" style=\"display: flex !important; justify-content: space-between !important; align-items: center !important; padding: 16px 24px !important; background: white !important;\">\n <div class=\"header-info\" style=\"display: flex !important; align-items: center !important; gap: 16px !important; flex: 1 !important;\">\n <h2 class=\"dashboard-title\" style=\"margin: 0 !important; display: flex !important; align-items: center !important; gap: 8px !important;\">\n <i class=\"fa-solid fa-message\"></i>\n AI Prompts\n </h2>\n <button \n type=\"button\" \n class=\"filter-toggle-btn\"\n (click)=\"toggleFilters()\"\n title=\"Toggle Filters\">\n <i class=\"fa-solid fa-filter\"></i>\n @if (showFilters) {\n Hide Filters\n } @else {\n Show Filters\n }\n </button>\n <span class=\"item-count\">{{ filteredPrompts.length }} prompts</span>\n </div>\n \n <div class=\"header-controls\" style=\"display: flex !important; align-items: center !important; gap: 16px !important;\">\n <div class=\"view-toggle\">\n <button \n type=\"button\" \n class=\"view-btn\"\n [class.active]=\"viewMode === 'grid'\"\n (click)=\"setViewMode('grid')\"\n title=\"Grid View\">\n <i class=\"fa-solid fa-grip\"></i>\n </button>\n <button \n type=\"button\" \n class=\"view-btn\"\n [class.active]=\"viewMode === 'list'\"\n (click)=\"setViewMode('list')\"\n title=\"List View\">\n <i class=\"fa-solid fa-list\"></i>\n </button>\n <button \n type=\"button\" \n class=\"view-btn\"\n [class.active]=\"viewMode === 'priority-matrix'\"\n (click)=\"setViewMode('priority-matrix')\"\n title=\"Priority Matrix\">\n <i class=\"fa-solid fa-chart-scatter\"></i>\n </button>\n </div>\n \n <button \n type=\"button\" \n class=\"control-btn primary\"\n (click)=\"createNewPrompt()\"\n title=\"Create New Prompt\">\n <i class=\"fa-solid fa-plus\"></i>\n New Prompt\n </button>\n </div>\n </div>\n\n <kendo-splitter mjFillContainer orientation=\"horizontal\">\n @if (showFilters) {\n <kendo-splitter-pane size=\"320\" min=\"250\" max=\"400\">\n <div class=\"filter-panel\">\n <div class=\"filter-panel-header\">\n <h3>Prompt Filters</h3>\n <div class=\"filter-summary-inline\">\n <span class=\"summary-value\">{{ filteredPrompts.length }}</span>\n <span class=\"summary-label\">of {{ prompts.length }}</span>\n </div>\n <button class=\"close-btn\" (click)=\"toggleFilterPanel()\">\n <span class=\"fa-solid fa-times\"></span>\n </button>\n </div>\n \n <div class=\"filter-content\">\n <!-- Search Filter -->\n <div class=\"filter-group\">\n <label class=\"filter-label\">\n <span class=\"fa-solid fa-search\"></span>\n Name\n </label>\n <input \n type=\"text\"\n class=\"filter-input\"\n placeholder=\"Search prompts...\"\n [value]=\"searchTerm\"\n (input)=\"onSearchChange($any($event.target).value)\"\n />\n </div>\n\n <!-- Category Filter -->\n <div class=\"filter-group\">\n <label class=\"filter-label\">\n <span class=\"fa-solid fa-folder\"></span>\n Category\n </label>\n <select class=\"filter-select\" [value]=\"selectedCategory\" (change)=\"onCategoryChange($any($event.target).value)\">\n <option value=\"all\">All Categories</option>\n @for (category of categories; track category.ID) {\n <option [value]=\"category.ID\">{{ category.Name }}</option>\n }\n </select>\n </div>\n\n <!-- Type Filter -->\n <div class=\"filter-group\">\n <label class=\"filter-label\">\n <span class=\"fa-solid fa-tag\"></span>\n Type\n </label>\n <select class=\"filter-select\" [value]=\"selectedType\" (change)=\"onTypeChange($any($event.target).value)\">\n <option value=\"all\">All Types</option>\n @for (type of types; track type.ID) {\n <option [value]=\"type.ID\">{{ type.Name }}</option>\n }\n </select>\n </div>\n\n <!-- Status Filter -->\n <div class=\"filter-group\">\n <label class=\"filter-label\">\n <span class=\"fa-solid fa-toggle-on\"></span>\n Status\n </label>\n <select class=\"filter-select\" [value]=\"selectedStatus\" (change)=\"onStatusChange($any($event.target).value)\">\n <option value=\"all\">All Statuses</option>\n <option value=\"active\">Active</option>\n <option value=\"inactive\">Inactive</option>\n </select>\n </div>\n\n <!-- Reset Button -->\n <div class=\"filter-actions\">\n <button class=\"reset-btn\" (click)=\"clearFilters()\" title=\"Reset all filters\">\n <span class=\"fa-solid fa-undo\"></span>\n Reset Filters\n </button>\n </div>\n </div>\n </div>\n </kendo-splitter-pane>\n }\n\n <kendo-splitter-pane>\n <div class=\"content-area\">\n @if (filteredPrompts.length === 0) {\n <div class=\"empty-state\">\n <i class=\"fa-solid fa-comment-dots fa-4x\"></i>\n <h3>No prompts found</h3>\n <p>{{ hasActiveFilters ? 'Try adjusting your filters' : 'Create your first AI prompt to get started' }}</p>\n @if (!hasActiveFilters) {\n <button class=\"primary-action\" (click)=\"createNewPrompt()\">\n <i class=\"fa-solid fa-plus\"></i>\n Create First Prompt\n </button>\n }\n </div>\n } @else {\n @switch (viewMode) {\n @case ('grid') {\n <div class=\"prompt-grid\">\n @for (prompt of filteredPrompts; track prompt.ID) {\n <div class=\"prompt-card\" [class.expanded]=\"expandedPromptId === prompt.ID\">\n <div class=\"card-header\" (click)=\"togglePromptExpansion(prompt.ID)\">\n <div class=\"card-icon\">\n <i [class]=\"getPromptIcon(prompt)\"></i>\n </div>\n <div class=\"card-info\">\n <h4>{{ prompt.Name }}</h4>\n <div class=\"card-meta\">\n <span class=\"category\">{{ prompt.CategoryName }}</span>\n <span class=\"type\">{{ prompt.TypeName }}</span>\n </div>\n </div>\n <i class=\"fa-solid fa-chevron-down expand-icon\" [class.rotated]=\"expandedPromptId === prompt.ID\"></i>\n </div>\n\n @if (expandedPromptId === prompt.ID) {\n <div class=\"card-content\">\n @if (prompt.Description) {\n <div class=\"description-section\">\n <h5>Description</h5>\n <p>{{ prompt.Description }}</p>\n </div>\n }\n\n <div class=\"stats-grid\">\n <div class=\"stat\">\n <span class=\"stat-label\">Status</span>\n <span class=\"stat-value status-badge\" [class]=\"getStatusClass(prompt.Status)\">\n {{ prompt.Status }}\n </span>\n </div>\n <div class=\"stat\">\n <span class=\"stat-label\">Template</span>\n <span class=\"stat-value\">\n @if (prompt.TemplateEntity) {\n <i class=\"fa-solid fa-check-circle text-success\"></i> Yes\n } @else {\n <i class=\"fa-solid fa-times-circle text-muted\"></i> No\n }\n </span>\n </div>\n <div class=\"stat\">\n <span class=\"stat-label\">Contents</span>\n <span class=\"stat-value\">{{ prompt.TemplateContents?.length || 0 }}</span>\n </div>\n </div>\n\n <div class=\"card-footer\">\n <button class=\"action-button\" (click)=\"openPrompt(prompt.ID); $event.stopPropagation()\">\n <i class=\"fa-solid fa-edit\"></i>\n Edit\n </button>\n </div>\n </div>\n }\n </div>\n }\n </div>\n }\n \n @case ('list') {\n <div class=\"prompt-list\">\n <table class=\"data-table\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Category</th>\n <th>Type</th>\n <th>Status</th>\n <th>Template</th>\n <th>Actions</th>\n </tr>\n </thead>\n <tbody>\n @for (prompt of filteredPrompts; track prompt.ID) {\n <tr>\n <td>\n <div class=\"name-cell\">\n <i [class]=\"getPromptIcon(prompt)\"></i>\n {{ prompt.Name }}\n </div>\n </td>\n <td>{{ prompt.CategoryName }}</td>\n <td>{{ prompt.TypeName }}</td>\n <td>\n <span class=\"status-badge\" [class]=\"getStatusClass(prompt.Status)\">\n {{ prompt.Status }}\n </span>\n </td>\n <td>\n @if (prompt.TemplateEntity) {\n <i class=\"fa-solid fa-check-circle text-success\"></i>\n } @else {\n <i class=\"fa-solid fa-times-circle text-muted\"></i>\n }\n </td>\n <td>\n <button class=\"action-button small\" (click)=\"openPrompt(prompt.ID)\">\n <i class=\"fa-solid fa-edit\"></i>\n </button>\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n }\n \n @case ('priority-matrix') {\n <div class=\"priority-matrix-container\">\n <app-model-prompt-priority-matrix \n [selectedPrompts]=\"filteredPromptsAsEntities\"\n (promptSelected)=\"openPrompt($event.ID)\">\n </app-model-prompt-priority-matrix>\n </div>\n }\n }\n }\n </div>\n </kendo-splitter-pane>\n </kendo-splitter>\n }\n</div>", styles: [".prompt-management-v2 {\n height: 100%;\n display: flex;\n flex-direction: column;\n background-color: #f5f7fa;\n}\n\n// Loading state\n.loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n background-color: #f5f7fa;\n}\n\n.loading-content {\n text-align: center;\n}\n\n.loading-spinner {\n position: relative;\n width: 80px;\n height: 80px;\n margin: 0 auto 20px;\n}\n\n.spinner-ring {\n position: absolute;\n width: 100%;\n height: 100%;\n border: 3px solid transparent;\n border-top-color: #17a2b8;\n border-radius: 50%;\n animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;\n \n &:nth-child(2) {\n animation-delay: 0.15s;\n width: 70%;\n height: 70%;\n top: 15%;\n left: 15%;\n border-top-color: #28a745;\n }\n \n &:nth-child(3) {\n animation-delay: 0.3s;\n width: 40%;\n height: 40%;\n top: 30%;\n left: 30%;\n border-top-color: #ffc107;\n }\n}\n\n@keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n}\n\n.loading-text {\n color: #6c757d;\n font-size: 16px;\n animation: pulse 2s ease-in-out infinite;\n}\n\n@keyframes pulse {\n 0%, 100% { opacity: 0.6; }\n 50% { opacity: 1; }\n}\n\n// Dashboard Header\n.dashboard-header {\n background: white;\n padding: 16px 24px;\n border-bottom: 1px solid #e0e6ed;\n display: flex;\n justify-content: space-between;\n align-items: center;\n box-shadow: 0 2px 4px rgba(0,0,0,0.04);\n}\n\n.header-info {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n.dashboard-title {\n margin: 0;\n font-size: 20px;\n font-weight: 600;\n color: #2c3e50;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.dashboard-title i {\n color: #17a2b8;\n}\n\n.filter-toggle-btn {\n background: #f8f9fa;\n border: 1px solid #dee2e6;\n padding: 8px 16px;\n border-radius: 6px;\n font-size: 14px;\n color: #495057;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.filter-toggle-btn:hover {\n background: #e9ecef;\n border-color: #ced4da;\n}\n\n.item-count {\n color: #6c757d;\n font-size: 14px;\n font-weight: 500;\n}\n\n.header-controls {\n display: flex;\n align-items: center;\n gap: 16px;\n}\n\n// View Toggle\n.view-toggle {\n display: flex;\n background: #f8f9fa;\n border-radius: 6px;\n padding: 2px;\n border: 1px solid #dee2e6;\n}\n\n.view-btn {\n background: transparent;\n border: none;\n padding: 6px 12px;\n border-radius: 4px;\n color: #6c757d;\n cursor: pointer;\n transition: all 0.2s ease;\n font-size: 16px;\n}\n\n.view-btn:hover {\n color: #495057;\n}\n\n.view-btn.active {\n background: white;\n color: #17a2b8;\n box-shadow: 0 1px 2px rgba(0,0,0,0.08);\n}\n\n// Control Buttons\n.control-btn {\n background: #f8f9fa;\n border: 1px solid #dee2e6;\n padding: 10px 20px;\n border-radius: 6px;\n font-size: 14px;\n font-weight: 500;\n color: #495057;\n cursor: pointer;\n transition: all 0.2s ease;\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.control-btn:hover {\n background: #e9ecef;\n border-color: #ced4da;\n}\n\n.control-btn.primary {\n background: #17a2b8;\n border-color: #17a2b8;\n color: white;\n}\n\n.control-btn.primary:hover {\n background: #138496;\n border-color: #117a8b;\n transform: translateY(-1px);\n box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);\n}\n\n// Splitter content\nkendo-splitter {\n flex: 1;\n background-color: #f5f7fa;\n margin-top: 8px;\n}\n\n// Filter panel\n.filter-panel {\n height: 100%;\n background: white;\n border-right: 1px solid #e0e0e0;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\n\n.filter-panel-header {\n padding: 16px;\n border-bottom: 1px solid #f0f0f0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-shrink: 0;\n \n h3 {\n margin: 0;\n font-size: 16px;\n font-weight: 500;\n color: #333;\n flex: 1;\n }\n \n .filter-summary-inline {\n display: flex;\n align-items: baseline;\n gap: 4px;\n margin-right: 12px;\n font-size: 12px;\n \n .summary-value {\n font-weight: 600;\n color: #2196f3;\n }\n \n .summary-label {\n color: #666;\n }\n }\n \n .close-btn {\n background: none;\n border: none;\n padding: 4px;\n cursor: pointer;\n color: #666;\n border-radius: 3px;\n transition: all 0.2s;\n \n &:hover {\n background: #f0f0f0;\n color: #333;\n }\n \n .fa-solid {\n font-size: 12px;\n }\n }\n}\n\n.filter-content {\n flex: 1;\n overflow-y: auto;\n overflow-x: hidden;\n padding: 12px;\n}\n\n.filter-group {\n margin-bottom: 20px;\n \n .filter-label {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-bottom: 6px;\n font-size: 12px;\n font-weight: 500;\n color: #555;\n \n .fa-solid {\n font-size: 11px;\n color: #2196f3;\n width: 12px;\n }\n }\n}\n\n.filter-input, .filter-select {\n width: calc(100% - 4px);\n max-width: 100%;\n padding: 8px 10px;\n border: 1px solid #ddd;\n border-radius: 4px;\n font-size: 12px;\n background: white;\n transition: border-color 0.2s;\n box-sizing: border-box;\n \n &:focus {\n outline: none;\n border-color: #2196f3;\n }\n \n &::placeholder {\n color: #999;\n }\n}\n\n.filter-select {\n cursor: pointer;\n}\n\n.filter-actions {\n margin-top: 24px;\n padding-top: 16px;\n border-top: 1px solid #f0f0f0;\n \n .reset-btn {\n width: calc(100% - 4px);\n max-width: 100%;\n padding: 8px 12px;\n background: #f8f9fa;\n border: 1px solid #e0e0e0;\n border-radius: 4px;\n color: #666;\n font-size: 12px;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n transition: all 0.2s;\n box-sizing: border-box;\n \n &:hover {\n background: #e9ecef;\n border-color: #ccc;\n color: #333;\n }\n \n .fa-solid {\n font-size: 11px;\n }\n }\n}\n\n// Content area\n.content-area {\n height: 100%;\n padding: 24px;\n overflow-y: auto;\n background: #f5f7fa;\n}\n\n// Empty state\n.empty-state {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n height: 100%;\n text-align: center;\n color: #6c757d;\n \n i {\n margin-bottom: 24px;\n opacity: 0.3;\n }\n \n h3 {\n margin: 0 0 8px 0;\n font-size: 20px;\n font-weight: 600;\n color: #495057;\n }\n \n p {\n margin: 0 0 24px 0;\n font-size: 16px;\n }\n}\n\n// Grid view\n.prompt-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));\n}\n\n.prompt-card {\n margin: 20px; // instead of gap in grid, for some reason that didn't work\n background: white;\n border-radius: 12px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);\n border: 1px solid #e0e6ed;\n transition: all 0.3s ease;\n overflow: hidden;\n \n &:hover {\n transform: translateY(-2px);\n box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);\n }\n \n &.expanded {\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);\n .expand-icon {\n transform: rotate(180deg);\n }\n }\n}\n\n.card-header {\n display: flex;\n align-items: center;\n padding: 20px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n \n &:hover {\n background-color: #f8f9fa;\n }\n}\n\n.card-icon {\n width: 48px;\n height: 48px;\n background-color: #e3f2fd;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 16px;\n flex-shrink: 0;\n \n i {\n font-size: 24px;\n color: #17a2b8;\n }\n}\n\n.card-info {\n flex: 1;\n min-width: 0;\n \n h4 {\n margin: 0 0 4px 0;\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n}\n\n.card-meta {\n display: flex;\n gap: 12px;\n font-size: 13px;\n color: #6c757d;\n \n .category, .type {\n display: flex;\n align-items: center;\n gap: 4px;\n \n &::before {\n content: '\u2022';\n color: #dee2e6;\n }\n \n &:first-child::before {\n display: none;\n }\n }\n}\n\n.expand-icon {\n color: #adb5bd;\n transition: transform 0.3s ease;\n margin-left: 12px;\n}\n\n.card-content {\n padding: 0 20px 20px;\n animation: slideDown 0.3s ease;\n}\n\n@keyframes slideDown {\n from {\n opacity: 0;\n transform: translateY(-10px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n.description-section {\n margin-bottom: 16px;\n \n h5 {\n margin: 0 0 8px 0;\n font-size: 13px;\n font-weight: 600;\n color: #6c757d;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n \n p {\n margin: 0;\n font-size: 14px;\n color: #495057;\n line-height: 1.6;\n }\n}\n\n.stats-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 16px;\n margin-bottom: 16px;\n}\n\n.stat {\n text-align: center;\n \n .stat-label {\n display: block;\n font-size: 12px;\n color: #6c757d;\n margin-bottom: 4px;\n }\n \n .stat-value {\n display: block;\n font-size: 16px;\n font-weight: 600;\n color: #2c3e50;\n }\n}\n\n.status-badge {\n display: inline-block;\n padding: 4px 8px;\n border-radius: 4px;\n font-size: 12px;\n font-weight: 500;\n \n &.active {\n background-color: #d4edda;\n color: #155724;\n }\n \n &.inactive {\n background-color: #f8d7da;\n color: #721c24;\n }\n}\n\n.card-footer {\n padding-top: 16px;\n border-top: 1px solid #e9ecef;\n display: flex;\n gap: 8px;\n}\n\n.action-button {\n padding: 6px 12px;\n background-color: #f8f9fa;\n border: 1px solid #dee2e6;\n border-radius: 4px;\n color: #495057;\n font-size: 13px;\n cursor: pointer;\n transition: all 0.2s ease;\n \n &:hover {\n background-color: #e9ecef;\n border-color: #adb5bd;\n color: #212529;\n }\n \n &.small {\n padding: 4px 8px;\n font-size: 12px;\n }\n \n i {\n margin-right: 4px;\n }\n}\n\n// List view\n.prompt-list {\n background: white;\n border-radius: 12px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);\n border: 1px solid #e0e6ed;\n overflow: hidden;\n}\n\n.data-table {\n width: 100%;\n border-collapse: collapse;\n \n thead {\n background-color: #f8f9fa;\n \n tr {\n border-bottom: 2px solid #dee2e6;\n }\n \n th {\n padding: 12px 16px;\n text-align: left;\n font-size: 13px;\n font-weight: 600;\n color: #495057;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n }\n }\n \n tbody {\n tr {\n border-bottom: 1px solid #e9ecef;\n transition: background-color 0.2s ease;\n \n &:hover {\n background-color: #f8f9fa;\n }\n \n &:last-child {\n border-bottom: none;\n }\n }\n \n td {\n padding: 16px;\n font-size: 14px;\n color: #495057;\n }\n }\n}\n\n.name-cell {\n display: flex;\n align-items: center;\n gap: 8px;\n font-weight: 500;\n color: #2c3e50;\n \n i {\n color: #17a2b8;\n }\n}\n\n// Priority matrix container\n.priority-matrix-container {\n height: 100%;\n background-color: white;\n border-radius: 12px;\n padding: 24px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);\n}\n\n// Responsive\n@media (max-width: 768px) {\n .prompt-header {\n flex-wrap: wrap;\n gap: 16px;\n }\n \n .header-right {\n width: 100%;\n justify-content: space-between;\n }\n \n .prompt-grid {\n grid-template-columns: 1fr;\n }\n \n .stats-grid {\n grid-template-columns: 1fr;\n }\n}\n\n// Text utility classes\n.text-success {\n color: #28a745;\n}\n\n.text-muted {\n color: #6c757d;\n}"] }]
|
|
711
|
+
}], () => [{ type: i1.SharedService }], { openEntityRecord: [{
|
|
712
|
+
type: Output
|
|
713
|
+
}], stateChange: [{
|
|
714
|
+
type: Output
|
|
715
|
+
}], initialState: [{
|
|
716
|
+
type: Input
|
|
717
|
+
}] }); })();
|
|
718
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PromptManagementV2Component, { className: "PromptManagementV2Component", filePath: "src/AI/components/prompts/prompt-management-v2.component.ts", lineNumber: 21 }); })();
|
|
719
|
+
//# sourceMappingURL=prompt-management-v2.component.js.map
|