@memberjunction/ng-core-entity-forms 2.69.1 → 2.71.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.
Files changed (72) hide show
  1. package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts +65 -0
  2. package/dist/lib/custom/AIAgents/add-action-dialog.component.d.ts.map +1 -0
  3. package/dist/lib/custom/AIAgents/add-action-dialog.component.js +578 -0
  4. package/dist/lib/custom/AIAgents/add-action-dialog.component.js.map +1 -0
  5. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.d.ts +1 -0
  6. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.d.ts.map +1 -0
  7. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.js +282 -0
  8. package/dist/lib/custom/AIAgents/agent-advanced-settings-dialog.component.js.map +1 -0
  9. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts +58 -0
  10. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.d.ts.map +1 -0
  11. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js +400 -0
  12. package/dist/lib/custom/AIAgents/agent-prompt-advanced-settings-dialog.component.js.map +1 -0
  13. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts +119 -23
  14. package/dist/lib/custom/AIAgents/ai-agent-form.component.d.ts.map +1 -1
  15. package/dist/lib/custom/AIAgents/ai-agent-form.component.js +1815 -924
  16. package/dist/lib/custom/AIAgents/ai-agent-form.component.js.map +1 -1
  17. package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts +159 -0
  18. package/dist/lib/custom/AIAgents/ai-agent-management.service.d.ts.map +1 -0
  19. package/dist/lib/custom/AIAgents/ai-agent-management.service.js +315 -0
  20. package/dist/lib/custom/AIAgents/ai-agent-management.service.js.map +1 -0
  21. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts +67 -0
  22. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.d.ts.map +1 -0
  23. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js +463 -0
  24. package/dist/lib/custom/AIAgents/create-prompt-dialog.component.js.map +1 -0
  25. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts +82 -0
  26. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.d.ts.map +1 -0
  27. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js +708 -0
  28. package/dist/lib/custom/AIAgents/create-sub-agent-dialog.component.js.map +1 -0
  29. package/dist/lib/custom/AIAgents/new-agent-dialog.component.js +2 -2
  30. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts +65 -0
  31. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.d.ts.map +1 -0
  32. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js +379 -0
  33. package/dist/lib/custom/AIAgents/prompt-selector-dialog.component.js.map +1 -0
  34. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts +58 -0
  35. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.d.ts.map +1 -0
  36. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js +373 -0
  37. package/dist/lib/custom/AIAgents/sub-agent-advanced-settings-dialog.component.js.map +1 -0
  38. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts +61 -0
  39. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.d.ts.map +1 -0
  40. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js +459 -0
  41. package/dist/lib/custom/AIAgents/sub-agent-selector-dialog.component.js.map +1 -0
  42. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts +12 -2
  43. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.d.ts.map +1 -1
  44. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js +385 -228
  45. package/dist/lib/custom/AIPromptRuns/ai-prompt-run-form.component.js.map +1 -1
  46. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts +72 -0
  47. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.d.ts.map +1 -0
  48. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js +526 -0
  49. package/dist/lib/custom/AIPromptRuns/chat-message-viewer.component.js.map +1 -0
  50. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts +90 -10
  51. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.d.ts.map +1 -1
  52. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js +1159 -687
  53. package/dist/lib/custom/AIPrompts/ai-prompt-form.component.js.map +1 -1
  54. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts +27 -0
  55. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.d.ts.map +1 -0
  56. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js +88 -0
  57. package/dist/lib/custom/AIPrompts/ai-prompt-management.service.js.map +1 -0
  58. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts +69 -0
  59. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.d.ts.map +1 -0
  60. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js +442 -0
  61. package/dist/lib/custom/AIPrompts/template-selector-dialog.component.js.map +1 -0
  62. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js +2 -2
  63. package/dist/lib/custom/ai-agent-run/ai-agent-run.component.js.map +1 -1
  64. package/dist/lib/custom/custom-forms.module.d.ts +40 -32
  65. package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
  66. package/dist/lib/custom/custom-forms.module.js +35 -3
  67. package/dist/lib/custom/custom-forms.module.js.map +1 -1
  68. package/dist/lib/shared/components/template-editor.component.d.ts +8 -2
  69. package/dist/lib/shared/components/template-editor.component.d.ts.map +1 -1
  70. package/dist/lib/shared/components/template-editor.component.js +58 -23
  71. package/dist/lib/shared/components/template-editor.component.js.map +1 -1
  72. package/package.json +16 -16
@@ -0,0 +1,442 @@
1
+ import { Component } from '@angular/core';
2
+ import { Subject, BehaviorSubject, debounceTime, distinctUntilChanged, takeUntil } from 'rxjs';
3
+ import { FormControl, ReactiveFormsModule } from '@angular/forms';
4
+ import { CommonModule } from '@angular/common';
5
+ import { RunView } from '@memberjunction/core';
6
+ import { MJNotificationService } from '@memberjunction/ng-notifications';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@progress/kendo-angular-dialog";
9
+ import * as i2 from "@angular/common";
10
+ import * as i3 from "@angular/forms";
11
+ const _forTrack0 = ($index, $item) => $item.ID;
12
+ function TemplateSelectorDialogComponent_For_17_Template(rf, ctx) { if (rf & 1) {
13
+ i0.ɵɵelementStart(0, "option", 11);
14
+ i0.ɵɵtext(1);
15
+ i0.ɵɵelementEnd();
16
+ } if (rf & 2) {
17
+ const category_r1 = ctx.$implicit;
18
+ i0.ɵɵproperty("value", category_r1.ID);
19
+ i0.ɵɵadvance();
20
+ i0.ɵɵtextInterpolate(category_r1.Name);
21
+ } }
22
+ function TemplateSelectorDialogComponent_Conditional_19_Template(rf, ctx) { if (rf & 1) {
23
+ i0.ɵɵelementStart(0, "div", 12);
24
+ i0.ɵɵelement(1, "i", 20);
25
+ i0.ɵɵelementStart(2, "span");
26
+ i0.ɵɵtext(3, "Loading templates...");
27
+ i0.ɵɵelementEnd()();
28
+ } }
29
+ function TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_2_Template(rf, ctx) { if (rf & 1) {
30
+ const _r5 = i0.ɵɵgetCurrentView();
31
+ i0.ɵɵelementStart(0, "input", 37);
32
+ i0.ɵɵlistener("change", function TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_2_Template_input_change_0_listener() { i0.ɵɵrestoreView(_r5); const template_r3 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.toggleTemplateSelection(template_r3)); });
33
+ i0.ɵɵelementEnd();
34
+ } if (rf & 2) {
35
+ const template_r3 = i0.ɵɵnextContext().$implicit;
36
+ const ctx_r3 = i0.ɵɵnextContext(2);
37
+ i0.ɵɵproperty("checked", ctx_r3.isTemplateSelected(template_r3));
38
+ } }
39
+ function TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
40
+ const _r6 = i0.ɵɵgetCurrentView();
41
+ i0.ɵɵelementStart(0, "input", 38);
42
+ i0.ɵɵlistener("change", function TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_3_Template_input_change_0_listener() { i0.ɵɵrestoreView(_r6); const template_r3 = i0.ɵɵnextContext().$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.toggleTemplateSelection(template_r3)); });
43
+ i0.ɵɵelementEnd();
44
+ } if (rf & 2) {
45
+ const template_r3 = i0.ɵɵnextContext().$implicit;
46
+ const ctx_r3 = i0.ɵɵnextContext(2);
47
+ i0.ɵɵproperty("checked", ctx_r3.isTemplateSelected(template_r3));
48
+ } }
49
+ function TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_11_Template(rf, ctx) { if (rf & 1) {
50
+ i0.ɵɵelementStart(0, "div", 33);
51
+ i0.ɵɵtext(1);
52
+ i0.ɵɵelementEnd();
53
+ } if (rf & 2) {
54
+ const template_r3 = i0.ɵɵnextContext().$implicit;
55
+ const ctx_r3 = i0.ɵɵnextContext(2);
56
+ i0.ɵɵadvance();
57
+ i0.ɵɵtextInterpolate1(" ", ctx_r3.getTemplatePreview(template_r3), " ");
58
+ } }
59
+ function TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_17_Template(rf, ctx) { if (rf & 1) {
60
+ i0.ɵɵelementStart(0, "div", 35);
61
+ i0.ɵɵelement(1, "i", 39);
62
+ i0.ɵɵelementStart(2, "span");
63
+ i0.ɵɵtext(3);
64
+ i0.ɵɵelementEnd()();
65
+ } if (rf & 2) {
66
+ const template_r3 = i0.ɵɵnextContext().$implicit;
67
+ i0.ɵɵadvance(3);
68
+ i0.ɵɵtextInterpolate(template_r3.Category);
69
+ } }
70
+ function TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_18_Template(rf, ctx) { if (rf & 1) {
71
+ i0.ɵɵelementStart(0, "div", 35);
72
+ i0.ɵɵelement(1, "i", 40);
73
+ i0.ɵɵelementStart(2, "span");
74
+ i0.ɵɵtext(3);
75
+ i0.ɵɵelementEnd()();
76
+ } if (rf & 2) {
77
+ const template_r3 = i0.ɵɵnextContext().$implicit;
78
+ const ctx_r3 = i0.ɵɵnextContext(2);
79
+ i0.ɵɵadvance(3);
80
+ i0.ɵɵtextInterpolate(ctx_r3.formatDate(template_r3.__mj_CreatedAt));
81
+ } }
82
+ function TemplateSelectorDialogComponent_Conditional_21_For_2_Template(rf, ctx) { if (rf & 1) {
83
+ const _r2 = i0.ɵɵgetCurrentView();
84
+ i0.ɵɵelementStart(0, "div", 24);
85
+ i0.ɵɵlistener("click", function TemplateSelectorDialogComponent_Conditional_21_For_2_Template_div_click_0_listener() { const template_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r3.toggleTemplateSelection(template_r3)); });
86
+ i0.ɵɵelementStart(1, "div", 25);
87
+ i0.ɵɵtemplate(2, TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_2_Template, 1, 1, "input", 26)(3, TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_3_Template, 1, 1, "input", 27);
88
+ i0.ɵɵelementEnd();
89
+ i0.ɵɵelementStart(4, "div", 28)(5, "div", 29)(6, "h4", 30);
90
+ i0.ɵɵtext(7);
91
+ i0.ɵɵelementEnd();
92
+ i0.ɵɵelementStart(8, "div", 31)(9, "span", 32);
93
+ i0.ɵɵtext(10);
94
+ i0.ɵɵelementEnd()()();
95
+ i0.ɵɵtemplate(11, TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_11_Template, 2, 1, "div", 33);
96
+ i0.ɵɵelementStart(12, "div", 34)(13, "div", 35);
97
+ i0.ɵɵelement(14, "i", 36);
98
+ i0.ɵɵelementStart(15, "span");
99
+ i0.ɵɵtext(16);
100
+ i0.ɵɵelementEnd()();
101
+ i0.ɵɵtemplate(17, TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_17_Template, 4, 1, "div", 35)(18, TemplateSelectorDialogComponent_Conditional_21_For_2_Conditional_18_Template, 4, 1, "div", 35);
102
+ i0.ɵɵelementEnd()()();
103
+ } if (rf & 2) {
104
+ const template_r3 = ctx.$implicit;
105
+ const ctx_r3 = i0.ɵɵnextContext(2);
106
+ i0.ɵɵclassProp("selected", ctx_r3.isTemplateSelected(template_r3));
107
+ i0.ɵɵadvance(2);
108
+ i0.ɵɵconditional(ctx_r3.config.multiSelect ? 2 : 3);
109
+ i0.ɵɵadvance(5);
110
+ i0.ɵɵtextInterpolate(template_r3.Name);
111
+ i0.ɵɵadvance(2);
112
+ i0.ɵɵstyleProp("background-color", ctx_r3.getTemplateStatusColor(template_r3));
113
+ i0.ɵɵadvance();
114
+ i0.ɵɵtextInterpolate1(" ", ctx_r3.getTemplateStatusText(template_r3), " ");
115
+ i0.ɵɵadvance();
116
+ i0.ɵɵconditional(template_r3.Description ? 11 : -1);
117
+ i0.ɵɵadvance(5);
118
+ i0.ɵɵtextInterpolate(template_r3.User || "Unknown User");
119
+ i0.ɵɵadvance();
120
+ i0.ɵɵconditional(template_r3.Category ? 17 : -1);
121
+ i0.ɵɵadvance();
122
+ i0.ɵɵconditional(template_r3.__mj_CreatedAt ? 18 : -1);
123
+ } }
124
+ function TemplateSelectorDialogComponent_Conditional_21_ForEmpty_3_Template(rf, ctx) { if (rf & 1) {
125
+ i0.ɵɵelementStart(0, "div", 23);
126
+ i0.ɵɵelement(1, "i", 41);
127
+ i0.ɵɵelementStart(2, "h4");
128
+ i0.ɵɵtext(3, "No templates found");
129
+ i0.ɵɵelementEnd();
130
+ i0.ɵɵelementStart(4, "p");
131
+ i0.ɵɵtext(5, "No templates match your current search criteria.");
132
+ i0.ɵɵelementEnd()();
133
+ } }
134
+ function TemplateSelectorDialogComponent_Conditional_21_Template(rf, ctx) { if (rf & 1) {
135
+ i0.ɵɵelementStart(0, "div", 21);
136
+ i0.ɵɵrepeaterCreate(1, TemplateSelectorDialogComponent_Conditional_21_For_2_Template, 19, 11, "div", 22, _forTrack0, false, TemplateSelectorDialogComponent_Conditional_21_ForEmpty_3_Template, 6, 0, "div", 23);
137
+ i0.ɵɵpipe(4, "async");
138
+ i0.ɵɵelementEnd();
139
+ } if (rf & 2) {
140
+ const ctx_r3 = i0.ɵɵnextContext();
141
+ i0.ɵɵclassProp("grid-mode", ctx_r3.viewMode === "grid");
142
+ i0.ɵɵadvance();
143
+ i0.ɵɵrepeater(i0.ɵɵpipeBind1(4, 3, ctx_r3.filteredTemplates$));
144
+ } }
145
+ function TemplateSelectorDialogComponent_Conditional_25_Template(rf, ctx) { if (rf & 1) {
146
+ const _r7 = i0.ɵɵgetCurrentView();
147
+ i0.ɵɵelementStart(0, "button", 42);
148
+ i0.ɵɵlistener("click", function TemplateSelectorDialogComponent_Conditional_25_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r7); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.createNew()); });
149
+ i0.ɵɵelement(1, "i", 43);
150
+ i0.ɵɵtext(2, " Create New ");
151
+ i0.ɵɵelementEnd();
152
+ } }
153
+ /**
154
+ * Template selector dialog that allows users to search and select from existing templates.
155
+ * This dialog provides a searchable interface with category filtering and template preview.
156
+ */
157
+ export class TemplateSelectorDialogComponent {
158
+ constructor(dialogRef, cdr) {
159
+ this.dialogRef = dialogRef;
160
+ this.cdr = cdr;
161
+ // Input configuration
162
+ this.config = { title: 'Select Template' };
163
+ // State management
164
+ this.destroy$ = new Subject();
165
+ this.result = new Subject();
166
+ // Data and UI state
167
+ this.isLoading$ = new BehaviorSubject(false);
168
+ this.templates$ = new BehaviorSubject([]);
169
+ this.filteredTemplates$ = new BehaviorSubject([]);
170
+ this.categories$ = new BehaviorSubject([]);
171
+ // Search and filtering
172
+ this.searchControl = new FormControl('');
173
+ this.selectedCategory = null;
174
+ this.selectedTemplates = new Set();
175
+ // View mode
176
+ this.viewMode = 'list';
177
+ }
178
+ ngOnInit() {
179
+ this.setupSearch();
180
+ this.loadData();
181
+ // Initialize selected templates if provided
182
+ if (this.config.selectedTemplateIds) {
183
+ this.selectedTemplates = new Set(this.config.selectedTemplateIds);
184
+ }
185
+ }
186
+ ngOnDestroy() {
187
+ this.destroy$.next();
188
+ this.destroy$.complete();
189
+ }
190
+ setupSearch() {
191
+ this.searchControl.valueChanges
192
+ .pipe(debounceTime(300), distinctUntilChanged(), takeUntil(this.destroy$))
193
+ .subscribe(searchTerm => {
194
+ this.filterTemplates(searchTerm || '');
195
+ });
196
+ }
197
+ async loadData() {
198
+ this.isLoading$.next(true);
199
+ try {
200
+ // Load both templates and categories in parallel
201
+ await Promise.all([
202
+ this.loadTemplates(),
203
+ this.loadCategories()
204
+ ]);
205
+ }
206
+ catch (error) {
207
+ console.error('Error loading template data:', error);
208
+ MJNotificationService.Instance.CreateSimpleNotification('Error loading templates. Please try again.', 'error', 3000);
209
+ }
210
+ finally {
211
+ this.isLoading$.next(false);
212
+ }
213
+ }
214
+ async loadTemplates() {
215
+ try {
216
+ const rv = new RunView();
217
+ // Build filter
218
+ let filter = '';
219
+ if (this.config.showActiveOnly !== false) {
220
+ filter = "IsActive = 1";
221
+ }
222
+ if (this.config.extraFilter) {
223
+ filter += filter ? ` AND ${this.config.extraFilter}` : this.config.extraFilter;
224
+ }
225
+ const result = await rv.RunView({
226
+ EntityName: 'Templates',
227
+ ExtraFilter: filter,
228
+ OrderBy: 'Name ASC',
229
+ ResultType: 'entity_object',
230
+ MaxRows: 1000
231
+ });
232
+ if (result.Success) {
233
+ const templates = result.Results || [];
234
+ this.templates$.next(templates);
235
+ this.filteredTemplates$.next(templates);
236
+ }
237
+ else {
238
+ throw new Error(result.ErrorMessage || 'Failed to load templates');
239
+ }
240
+ }
241
+ catch (error) {
242
+ console.error('Error loading templates:', error);
243
+ this.templates$.next([]);
244
+ this.filteredTemplates$.next([]);
245
+ }
246
+ }
247
+ async loadCategories() {
248
+ try {
249
+ const rv = new RunView();
250
+ const result = await rv.RunView({
251
+ EntityName: 'Template Categories',
252
+ ExtraFilter: '',
253
+ OrderBy: 'Name ASC',
254
+ ResultType: 'entity_object',
255
+ MaxRows: 1000
256
+ });
257
+ if (result.Success) {
258
+ const categories = result.Results || [];
259
+ this.categories$.next(categories);
260
+ }
261
+ else {
262
+ throw new Error(result.ErrorMessage || 'Failed to load categories');
263
+ }
264
+ }
265
+ catch (error) {
266
+ console.error('Error loading categories:', error);
267
+ this.categories$.next([]);
268
+ }
269
+ }
270
+ filterTemplates(searchTerm) {
271
+ const allTemplates = this.templates$.value;
272
+ let filtered = allTemplates;
273
+ // Apply search filter
274
+ if (searchTerm.trim()) {
275
+ filtered = filtered.filter(template => template.Name?.toLowerCase().includes(searchTerm.toLowerCase()) ||
276
+ template.Description?.toLowerCase().includes(searchTerm.toLowerCase()));
277
+ }
278
+ // Apply category filter
279
+ if (this.selectedCategory) {
280
+ filtered = filtered.filter(template => template.CategoryID === this.selectedCategory);
281
+ }
282
+ this.filteredTemplates$.next(filtered);
283
+ }
284
+ // === Category Management ===
285
+ onCategoryChange(categoryId) {
286
+ this.selectedCategory = categoryId === '' ? null : categoryId;
287
+ this.filterTemplates(this.searchControl.value || '');
288
+ }
289
+ getCategoryDisplayName(categoryId) {
290
+ const category = this.categories$.value.find(c => c.ID === categoryId);
291
+ return category?.Name || 'Unknown Category';
292
+ }
293
+ // === Selection Management ===
294
+ toggleTemplateSelection(template) {
295
+ if (this.config.multiSelect) {
296
+ if (this.selectedTemplates.has(template.ID)) {
297
+ this.selectedTemplates.delete(template.ID);
298
+ }
299
+ else {
300
+ this.selectedTemplates.add(template.ID);
301
+ }
302
+ }
303
+ else {
304
+ // Single select - replace current selection
305
+ this.selectedTemplates.clear();
306
+ this.selectedTemplates.add(template.ID);
307
+ }
308
+ }
309
+ isTemplateSelected(template) {
310
+ return this.selectedTemplates.has(template.ID);
311
+ }
312
+ getSelectedTemplateObjects() {
313
+ const allTemplates = this.templates$.value;
314
+ return allTemplates.filter(template => this.selectedTemplates.has(template.ID));
315
+ }
316
+ // === UI Helpers ===
317
+ toggleViewMode() {
318
+ this.viewMode = this.viewMode === 'grid' ? 'list' : 'grid';
319
+ }
320
+ getTemplateStatusColor(template) {
321
+ if (!template.IsActive)
322
+ return '#6c757d';
323
+ if (template.DisabledAt && new Date(template.DisabledAt) <= new Date())
324
+ return '#dc3545';
325
+ if (template.ActiveAt && new Date(template.ActiveAt) > new Date())
326
+ return '#ffc107';
327
+ return '#28a745';
328
+ }
329
+ getTemplateStatusText(template) {
330
+ if (!template.IsActive)
331
+ return 'Inactive';
332
+ if (template.DisabledAt && new Date(template.DisabledAt) <= new Date())
333
+ return 'Disabled';
334
+ if (template.ActiveAt && new Date(template.ActiveAt) > new Date())
335
+ return 'Scheduled';
336
+ return 'Active';
337
+ }
338
+ getTemplatePreview(template) {
339
+ if (!template.Description)
340
+ return 'No description available';
341
+ return template.Description.length > 100
342
+ ? template.Description.substring(0, 100) + '...'
343
+ : template.Description;
344
+ }
345
+ formatDate(date) {
346
+ if (!date)
347
+ return '';
348
+ const d = new Date(date);
349
+ return d.toLocaleDateString();
350
+ }
351
+ // === Dialog Actions ===
352
+ selectTemplates() {
353
+ const selectedTemplateObjects = this.getSelectedTemplateObjects();
354
+ if (selectedTemplateObjects.length === 0) {
355
+ MJNotificationService.Instance.CreateSimpleNotification('Please select at least one template', 'warning', 2000);
356
+ return;
357
+ }
358
+ const result = {
359
+ selectedTemplates: selectedTemplateObjects
360
+ };
361
+ this.result.next(result);
362
+ this.dialogRef.close();
363
+ }
364
+ createNew() {
365
+ const result = {
366
+ selectedTemplates: [],
367
+ createNew: true
368
+ };
369
+ this.result.next(result);
370
+ this.dialogRef.close();
371
+ }
372
+ cancel() {
373
+ this.result.next(null);
374
+ this.dialogRef.close();
375
+ }
376
+ static { this.ɵfac = function TemplateSelectorDialogComponent_Factory(t) { return new (t || TemplateSelectorDialogComponent)(i0.ɵɵdirectiveInject(i1.DialogRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
377
+ static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TemplateSelectorDialogComponent, selectors: [["mj-template-selector-dialog"]], standalone: true, features: [i0.ɵɵStandaloneFeature], decls: 31, vars: 17, consts: [[1, "template-selector-dialog"], [1, "dialog-header"], [1, "header-actions"], ["kendoButton", "", "size", "small", 3, "click"], [1, "search-filter-section"], [1, "search-container"], ["placeholder", "Search templates...", 1, "k-input", "k-textbox", 3, "formControl"], [1, "fa-solid", "fa-search", "search-icon"], [1, "category-filter"], [1, "k-input", "k-dropdown", 3, "change", "value"], ["value", ""], [3, "value"], [1, "loading-container"], [1, "templates-container", 3, "grid-mode"], [1, "dialog-actions"], [1, "action-buttons"], ["kendoButton", "", "themeColor", "secondary"], ["kendoButton", "", 3, "click"], ["kendoButton", "", "themeColor", "primary", 3, "click", "disabled"], [1, "fa-solid", "fa-check"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "templates-container"], [1, "template-item", 3, "selected"], [1, "no-templates"], [1, "template-item", 3, "click"], [1, "selection-indicator"], ["type", "checkbox", 3, "checked"], ["type", "radio", 3, "checked"], [1, "template-info"], [1, "template-header"], [1, "template-name"], [1, "template-status"], [1, "status-badge"], [1, "template-description"], [1, "template-metadata"], [1, "metadata-item"], [1, "fa-solid", "fa-user"], ["type", "checkbox", 3, "change", "checked"], ["type", "radio", 3, "change", "checked"], [1, "fa-solid", "fa-folder"], [1, "fa-solid", "fa-calendar"], [1, "fa-solid", "fa-file-alt", "fa-3x"], ["kendoButton", "", "themeColor", "secondary", 3, "click"], [1, "fa-solid", "fa-plus"]], template: function TemplateSelectorDialogComponent_Template(rf, ctx) { if (rf & 1) {
378
+ i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h3");
379
+ i0.ɵɵtext(3);
380
+ i0.ɵɵelementEnd();
381
+ i0.ɵɵelementStart(4, "div", 2)(5, "button", 3);
382
+ i0.ɵɵlistener("click", function TemplateSelectorDialogComponent_Template_button_click_5_listener() { return ctx.toggleViewMode(); });
383
+ i0.ɵɵelement(6, "i");
384
+ i0.ɵɵtext(7);
385
+ i0.ɵɵelementEnd()()();
386
+ i0.ɵɵelementStart(8, "div", 4)(9, "div", 5);
387
+ i0.ɵɵelement(10, "input", 6)(11, "i", 7);
388
+ i0.ɵɵelementEnd();
389
+ i0.ɵɵelementStart(12, "div", 8)(13, "select", 9);
390
+ i0.ɵɵlistener("change", function TemplateSelectorDialogComponent_Template_select_change_13_listener($event) { return ctx.onCategoryChange($event.target.value || null); });
391
+ i0.ɵɵelementStart(14, "option", 10);
392
+ i0.ɵɵtext(15, "All Categories");
393
+ i0.ɵɵelementEnd();
394
+ i0.ɵɵrepeaterCreate(16, TemplateSelectorDialogComponent_For_17_Template, 2, 2, "option", 11, _forTrack0);
395
+ i0.ɵɵpipe(18, "async");
396
+ i0.ɵɵelementEnd()()();
397
+ i0.ɵɵtemplate(19, TemplateSelectorDialogComponent_Conditional_19_Template, 4, 0, "div", 12);
398
+ i0.ɵɵpipe(20, "async");
399
+ i0.ɵɵtemplate(21, TemplateSelectorDialogComponent_Conditional_21_Template, 5, 5, "div", 13);
400
+ i0.ɵɵpipe(22, "async");
401
+ i0.ɵɵelementStart(23, "div", 14)(24, "div", 15);
402
+ i0.ɵɵtemplate(25, TemplateSelectorDialogComponent_Conditional_25_Template, 3, 0, "button", 16);
403
+ i0.ɵɵelementStart(26, "button", 17);
404
+ i0.ɵɵlistener("click", function TemplateSelectorDialogComponent_Template_button_click_26_listener() { return ctx.cancel(); });
405
+ i0.ɵɵtext(27, " Cancel ");
406
+ i0.ɵɵelementEnd();
407
+ i0.ɵɵelementStart(28, "button", 18);
408
+ i0.ɵɵlistener("click", function TemplateSelectorDialogComponent_Template_button_click_28_listener() { return ctx.selectTemplates(); });
409
+ i0.ɵɵelement(29, "i", 19);
410
+ i0.ɵɵtext(30);
411
+ i0.ɵɵelementEnd()()()();
412
+ } if (rf & 2) {
413
+ i0.ɵɵadvance(3);
414
+ i0.ɵɵtextInterpolate(ctx.config.title);
415
+ i0.ɵɵadvance(3);
416
+ i0.ɵɵclassMap(ctx.viewMode === "list" ? "fa-solid fa-th" : "fa-solid fa-list");
417
+ i0.ɵɵadvance();
418
+ i0.ɵɵtextInterpolate1(" ", ctx.viewMode === "list" ? "Grid" : "List", " ");
419
+ i0.ɵɵadvance(3);
420
+ i0.ɵɵproperty("formControl", ctx.searchControl);
421
+ i0.ɵɵadvance(3);
422
+ i0.ɵɵproperty("value", ctx.selectedCategory || "");
423
+ i0.ɵɵadvance(3);
424
+ i0.ɵɵrepeater(i0.ɵɵpipeBind1(18, 11, ctx.categories$));
425
+ i0.ɵɵadvance(3);
426
+ i0.ɵɵconditional(i0.ɵɵpipeBind1(20, 13, ctx.isLoading$) ? 19 : -1);
427
+ i0.ɵɵadvance(2);
428
+ i0.ɵɵconditional(!i0.ɵɵpipeBind1(22, 15, ctx.isLoading$) ? 21 : -1);
429
+ i0.ɵɵadvance(4);
430
+ i0.ɵɵconditional(ctx.config.showCreateNew ? 25 : -1);
431
+ i0.ɵɵadvance(3);
432
+ i0.ɵɵproperty("disabled", ctx.selectedTemplates.size === 0);
433
+ i0.ɵɵadvance(2);
434
+ i0.ɵɵtextInterpolate1(" Select ", ctx.selectedTemplates.size > 0 ? "(" + ctx.selectedTemplates.size + ")" : "", " ");
435
+ } }, dependencies: [CommonModule, i2.AsyncPipe, ReactiveFormsModule, i3.NgSelectOption, i3.ɵNgSelectMultipleOption, i3.DefaultValueAccessor, i3.NgControlStatus, i3.FormControlDirective], styles: ["\n\n.template-selector-dialog[_ngcontent-%COMP%] {\n padding: 20px;\n width: 100%;\n max-width: 800px;\n height: 600px;\n display: flex;\n flex-direction: column;\n}\n\n\n\n.dialog-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 15px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.dialog-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.5rem;\n color: #333;\n}\n\n.header-actions[_ngcontent-%COMP%] {\n display: flex;\n gap: 10px;\n}\n\n\n\n.search-filter-section[_ngcontent-%COMP%] {\n display: flex;\n gap: 15px;\n margin-bottom: 20px;\n}\n\n.search-container[_ngcontent-%COMP%] {\n flex: 1;\n position: relative;\n}\n\n.search-icon[_ngcontent-%COMP%] {\n position: absolute;\n left: 10px;\n top: 50%;\n transform: translateY(-50%);\n color: #999;\n pointer-events: none;\n}\n\n.search-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%] {\n padding-left: 35px;\n width: 100%;\n}\n\n.category-filter[_ngcontent-%COMP%] {\n min-width: 200px;\n}\n\n.category-filter[_ngcontent-%COMP%] select[_ngcontent-%COMP%] {\n width: 100%;\n}\n\n\n\n.loading-container[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 60px;\n font-size: 1.1rem;\n color: #666;\n}\n\n.loading-container[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 1.5rem;\n color: #007bff;\n}\n\n\n\n.templates-container[_ngcontent-%COMP%] {\n flex: 1;\n overflow-y: auto;\n border: 1px solid #e0e0e0;\n border-radius: 4px;\n background: white;\n padding: 10px;\n}\n\n.templates-container.grid-mode[_ngcontent-%COMP%] {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 15px;\n}\n\n\n\n.template-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 15px;\n border: 2px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s ease;\n background: #f8f9fa;\n margin-bottom: 8px;\n}\n\n.template-item[_ngcontent-%COMP%]:hover {\n border-color: #007bff;\n background: #e3f2fd;\n}\n\n.template-item.selected[_ngcontent-%COMP%] {\n border-color: #007bff;\n background: #e3f2fd;\n}\n\n.grid-mode[_ngcontent-%COMP%] .template-item[_ngcontent-%COMP%] {\n flex-direction: column;\n margin-bottom: 0;\n}\n\n.grid-mode[_ngcontent-%COMP%] .template-item[_ngcontent-%COMP%] .selection-indicator[_ngcontent-%COMP%] {\n align-self: flex-end;\n}\n\n\n\n.selection-indicator[_ngcontent-%COMP%] {\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.selection-indicator[_ngcontent-%COMP%] input[type=\"checkbox\"][_ngcontent-%COMP%], \n.selection-indicator[_ngcontent-%COMP%] input[type=\"radio\"][_ngcontent-%COMP%] {\n width: 16px;\n height: 16px;\n cursor: pointer;\n}\n\n\n\n.template-info[_ngcontent-%COMP%] {\n flex: 1;\n min-width: 0;\n}\n\n.template-header[_ngcontent-%COMP%] {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 8px;\n}\n\n.template-name[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 1.1rem;\n font-weight: 600;\n color: #333;\n word-break: break-word;\n}\n\n.template-status[_ngcontent-%COMP%] {\n flex-shrink: 0;\n margin-left: 10px;\n}\n\n.status-badge[_ngcontent-%COMP%] {\n display: inline-block;\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 0.75rem;\n font-weight: 500;\n color: white;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n\n\n.template-description[_ngcontent-%COMP%] {\n margin-bottom: 12px;\n color: #666;\n font-size: 0.9rem;\n line-height: 1.4;\n}\n\n\n\n.template-metadata[_ngcontent-%COMP%] {\n display: flex;\n flex-wrap: wrap;\n gap: 15px;\n font-size: 0.85rem;\n color: #777;\n}\n\n.metadata-item[_ngcontent-%COMP%] {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.metadata-item[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n font-size: 0.8rem;\n color: #999;\n}\n\n\n\n.no-templates[_ngcontent-%COMP%] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 60px 20px;\n text-align: center;\n color: #666;\n}\n\n.no-templates[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n color: #ccc;\n}\n\n.no-templates[_ngcontent-%COMP%] h4[_ngcontent-%COMP%] {\n margin: 0 0 10px 0;\n font-size: 1.2rem;\n}\n\n.no-templates[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\n margin: 0;\n font-size: 0.9rem;\n color: #999;\n}\n\n\n\n.dialog-actions[_ngcontent-%COMP%] {\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e0e0;\n}\n\n.action-buttons[_ngcontent-%COMP%] {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n min-width: 100px;\n}\n\n.action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] i[_ngcontent-%COMP%] {\n margin-right: 5px;\n}\n\n\n\n@media (max-width: 768px) {\n .template-selector-dialog[_ngcontent-%COMP%] {\n padding: 15px;\n height: 500px;\n }\n \n .search-filter-section[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 10px;\n }\n \n .category-filter[_ngcontent-%COMP%] {\n min-width: auto;\n }\n \n .templates-container.grid-mode[_ngcontent-%COMP%] {\n grid-template-columns: 1fr;\n }\n \n .template-header[_ngcontent-%COMP%] {\n flex-direction: column;\n align-items: flex-start;\n }\n \n .template-status[_ngcontent-%COMP%] {\n margin-left: 0;\n margin-top: 5px;\n }\n \n .template-metadata[_ngcontent-%COMP%] {\n flex-direction: column;\n gap: 8px;\n }\n \n .action-buttons[_ngcontent-%COMP%] {\n flex-direction: column;\n }\n \n .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%] {\n min-width: auto;\n }\n}\n\n\n\n.templates-container[_ngcontent-%COMP%]::-webkit-scrollbar {\n width: 8px;\n}\n\n.templates-container[_ngcontent-%COMP%]::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 4px;\n}\n\n.templates-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.templates-container[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover {\n background: #a8a8a8;\n}"] }); }
436
+ }
437
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TemplateSelectorDialogComponent, [{
438
+ type: Component,
439
+ args: [{ selector: 'mj-template-selector-dialog', standalone: true, imports: [CommonModule, ReactiveFormsModule], template: "<!-- Template Selector Dialog -->\n<div class=\"template-selector-dialog\">\n <!-- Header -->\n <div class=\"dialog-header\">\n <h3>{{ config.title }}</h3>\n <div class=\"header-actions\">\n <button\n kendoButton\n size=\"small\"\n (click)=\"toggleViewMode()\"\n >\n <i [class]=\"viewMode === 'list' ? 'fa-solid fa-th' : 'fa-solid fa-list'\"></i>\n {{ viewMode === 'list' ? 'Grid' : 'List' }}\n </button>\n </div>\n </div>\n\n <!-- Search and Filter Section -->\n <div class=\"search-filter-section\">\n <!-- Search Input -->\n <div class=\"search-container\">\n <input\n class=\"k-input k-textbox\"\n [formControl]=\"searchControl\"\n placeholder=\"Search templates...\"\n />\n <i class=\"fa-solid fa-search search-icon\"></i>\n </div>\n\n <!-- Category Filter -->\n <div class=\"category-filter\">\n <select\n class=\"k-input k-dropdown\"\n [value]=\"selectedCategory || ''\"\n (change)=\"onCategoryChange($any($event.target).value || null)\"\n >\n <option value=\"\">All Categories</option>\n @for (category of categories$ | async; track category.ID) {\n <option [value]=\"category.ID\">{{ category.Name }}</option>\n }\n </select>\n </div>\n </div>\n\n <!-- Loading State -->\n @if (isLoading$ | async) {\n <div class=\"loading-container\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n <span>Loading templates...</span>\n </div>\n }\n\n <!-- Template List/Grid -->\n @if (!(isLoading$ | async)) {\n <div class=\"templates-container\" [class.grid-mode]=\"viewMode === 'grid'\">\n @for (template of filteredTemplates$ | async; track template.ID) {\n <div \n class=\"template-item\"\n [class.selected]=\"isTemplateSelected(template)\"\n (click)=\"toggleTemplateSelection(template)\"\n >\n <!-- Selection Checkbox -->\n <div class=\"selection-indicator\">\n @if (config.multiSelect) {\n <input\n type=\"checkbox\"\n [checked]=\"isTemplateSelected(template)\"\n (change)=\"toggleTemplateSelection(template)\"\n />\n } @else {\n <input\n type=\"radio\"\n [checked]=\"isTemplateSelected(template)\"\n (change)=\"toggleTemplateSelection(template)\"\n />\n }\n </div>\n\n <!-- Template Info -->\n <div class=\"template-info\">\n <div class=\"template-header\">\n <h4 class=\"template-name\">{{ template.Name }}</h4>\n <div class=\"template-status\">\n <span \n class=\"status-badge\"\n [style.background-color]=\"getTemplateStatusColor(template)\"\n >\n {{ getTemplateStatusText(template) }}\n </span>\n </div>\n </div>\n\n <!-- Template Description -->\n @if (template.Description) {\n <div class=\"template-description\">\n {{ getTemplatePreview(template) }}\n </div>\n }\n\n <!-- Template Metadata -->\n <div class=\"template-metadata\">\n <div class=\"metadata-item\">\n <i class=\"fa-solid fa-user\"></i>\n <span>{{ template.User || 'Unknown User' }}</span>\n </div>\n \n @if (template.Category) {\n <div class=\"metadata-item\">\n <i class=\"fa-solid fa-folder\"></i>\n <span>{{ template.Category }}</span>\n </div>\n }\n \n @if (template.__mj_CreatedAt) {\n <div class=\"metadata-item\">\n <i class=\"fa-solid fa-calendar\"></i>\n <span>{{ formatDate(template.__mj_CreatedAt) }}</span>\n </div>\n }\n </div>\n </div>\n </div>\n } @empty {\n <div class=\"no-templates\">\n <i class=\"fa-solid fa-file-alt fa-3x\"></i>\n <h4>No templates found</h4>\n <p>No templates match your current search criteria.</p>\n </div>\n }\n </div>\n }\n\n <!-- Dialog Actions -->\n <div class=\"dialog-actions\">\n <div class=\"action-buttons\">\n @if (config.showCreateNew) {\n <button\n kendoButton\n themeColor=\"secondary\"\n (click)=\"createNew()\"\n >\n <i class=\"fa-solid fa-plus\"></i>\n Create New\n </button>\n }\n \n <button\n kendoButton\n (click)=\"cancel()\"\n >\n Cancel\n </button>\n \n <button\n kendoButton\n themeColor=\"primary\"\n (click)=\"selectTemplates()\"\n [disabled]=\"selectedTemplates.size === 0\"\n >\n <i class=\"fa-solid fa-check\"></i>\n Select {{ selectedTemplates.size > 0 ? '(' + selectedTemplates.size + ')' : '' }}\n </button>\n </div>\n </div>\n</div>", styles: ["/* Template Selector Dialog Styles */\n.template-selector-dialog {\n padding: 20px;\n width: 100%;\n max-width: 800px;\n height: 600px;\n display: flex;\n flex-direction: column;\n}\n\n/* Header */\n.dialog-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 20px;\n padding-bottom: 15px;\n border-bottom: 1px solid #e0e0e0;\n}\n\n.dialog-header h3 {\n margin: 0;\n font-size: 1.5rem;\n color: #333;\n}\n\n.header-actions {\n display: flex;\n gap: 10px;\n}\n\n/* Search and Filter Section */\n.search-filter-section {\n display: flex;\n gap: 15px;\n margin-bottom: 20px;\n}\n\n.search-container {\n flex: 1;\n position: relative;\n}\n\n.search-icon {\n position: absolute;\n left: 10px;\n top: 50%;\n transform: translateY(-50%);\n color: #999;\n pointer-events: none;\n}\n\n.search-container input {\n padding-left: 35px;\n width: 100%;\n}\n\n.category-filter {\n min-width: 200px;\n}\n\n.category-filter select {\n width: 100%;\n}\n\n/* Loading State */\n.loading-container {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n padding: 60px;\n font-size: 1.1rem;\n color: #666;\n}\n\n.loading-container i {\n font-size: 1.5rem;\n color: #007bff;\n}\n\n/* Templates Container */\n.templates-container {\n flex: 1;\n overflow-y: auto;\n border: 1px solid #e0e0e0;\n border-radius: 4px;\n background: white;\n padding: 10px;\n}\n\n.templates-container.grid-mode {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));\n gap: 15px;\n}\n\n/* Template Item */\n.template-item {\n display: flex;\n align-items: flex-start;\n gap: 12px;\n padding: 15px;\n border: 2px solid transparent;\n border-radius: 6px;\n cursor: pointer;\n transition: all 0.2s ease;\n background: #f8f9fa;\n margin-bottom: 8px;\n}\n\n.template-item:hover {\n border-color: #007bff;\n background: #e3f2fd;\n}\n\n.template-item.selected {\n border-color: #007bff;\n background: #e3f2fd;\n}\n\n.grid-mode .template-item {\n flex-direction: column;\n margin-bottom: 0;\n}\n\n.grid-mode .template-item .selection-indicator {\n align-self: flex-end;\n}\n\n/* Selection Indicator */\n.selection-indicator {\n flex-shrink: 0;\n margin-top: 2px;\n}\n\n.selection-indicator input[type=\"checkbox\"],\n.selection-indicator input[type=\"radio\"] {\n width: 16px;\n height: 16px;\n cursor: pointer;\n}\n\n/* Template Info */\n.template-info {\n flex: 1;\n min-width: 0;\n}\n\n.template-header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 8px;\n}\n\n.template-name {\n margin: 0;\n font-size: 1.1rem;\n font-weight: 600;\n color: #333;\n word-break: break-word;\n}\n\n.template-status {\n flex-shrink: 0;\n margin-left: 10px;\n}\n\n.status-badge {\n display: inline-block;\n padding: 2px 8px;\n border-radius: 12px;\n font-size: 0.75rem;\n font-weight: 500;\n color: white;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n/* Template Description */\n.template-description {\n margin-bottom: 12px;\n color: #666;\n font-size: 0.9rem;\n line-height: 1.4;\n}\n\n/* Template Metadata */\n.template-metadata {\n display: flex;\n flex-wrap: wrap;\n gap: 15px;\n font-size: 0.85rem;\n color: #777;\n}\n\n.metadata-item {\n display: flex;\n align-items: center;\n gap: 5px;\n}\n\n.metadata-item i {\n font-size: 0.8rem;\n color: #999;\n}\n\n/* No Templates State */\n.no-templates {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n padding: 60px 20px;\n text-align: center;\n color: #666;\n}\n\n.no-templates i {\n margin-bottom: 20px;\n color: #ccc;\n}\n\n.no-templates h4 {\n margin: 0 0 10px 0;\n font-size: 1.2rem;\n}\n\n.no-templates p {\n margin: 0;\n font-size: 0.9rem;\n color: #999;\n}\n\n/* Dialog Actions */\n.dialog-actions {\n margin-top: 20px;\n padding-top: 20px;\n border-top: 1px solid #e0e0e0;\n}\n\n.action-buttons {\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n.action-buttons button {\n min-width: 100px;\n}\n\n.action-buttons button i {\n margin-right: 5px;\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n .template-selector-dialog {\n padding: 15px;\n height: 500px;\n }\n \n .search-filter-section {\n flex-direction: column;\n gap: 10px;\n }\n \n .category-filter {\n min-width: auto;\n }\n \n .templates-container.grid-mode {\n grid-template-columns: 1fr;\n }\n \n .template-header {\n flex-direction: column;\n align-items: flex-start;\n }\n \n .template-status {\n margin-left: 0;\n margin-top: 5px;\n }\n \n .template-metadata {\n flex-direction: column;\n gap: 8px;\n }\n \n .action-buttons {\n flex-direction: column;\n }\n \n .action-buttons button {\n min-width: auto;\n }\n}\n\n/* Scrollbar Styling */\n.templates-container::-webkit-scrollbar {\n width: 8px;\n}\n\n.templates-container::-webkit-scrollbar-track {\n background: #f1f1f1;\n border-radius: 4px;\n}\n\n.templates-container::-webkit-scrollbar-thumb {\n background: #c1c1c1;\n border-radius: 4px;\n}\n\n.templates-container::-webkit-scrollbar-thumb:hover {\n background: #a8a8a8;\n}"] }]
440
+ }], () => [{ type: i1.DialogRef }, { type: i0.ChangeDetectorRef }], null); })();
441
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TemplateSelectorDialogComponent, { className: "TemplateSelectorDialogComponent", filePath: "src/lib/custom/AIPrompts/template-selector-dialog.component.ts", lineNumber: 43 }); })();
442
+ //# sourceMappingURL=template-selector-dialog.component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-selector-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/AIPrompts/template-selector-dialog.component.ts","../../../../src/lib/custom/AIPrompts/template-selector-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAwC,MAAM,eAAe,CAAC;AAEhF,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;IC+B/D,kCAA8B;IAAA,YAAmB;IAAA,iBAAS;;;IAAlD,sCAAqB;IAAC,cAAmB;IAAnB,sCAAmB;;;IAQvD,+BAA+B;IAC7B,wBAA2C;IAC3C,4BAAM;IAAA,oCAAoB;IAC5B,AAD4B,iBAAO,EAC7B;;;;IAeI,iCAIE;IADA,4QAAU,2CAAiC,KAAC;IAH9C,iBAIE;;;;IAFA,gEAAwC;;;;IAI1C,iCAIE;IADA,4QAAU,2CAAiC,KAAC;IAH9C,iBAIE;;;;IAFA,gEAAwC;;;IAsB1C,+BAAkC;IAChC,YACF;IAAA,iBAAM;;;;IADJ,cACF;IADE,uEACF;;;IAWE,+BAA2B;IACzB,wBAAkC;IAClC,4BAAM;IAAA,YAAuB;IAC/B,AAD+B,iBAAO,EAChC;;;IADE,eAAuB;IAAvB,0CAAuB;;;IAK/B,+BAA2B;IACzB,wBAAoC;IACpC,4BAAM;IAAA,YAAyC;IACjD,AADiD,iBAAO,EAClD;;;;IADE,eAAyC;IAAzC,mEAAyC;;;;IA5DzD,+BAIC;IADC,sOAAS,2CAAiC,KAAC;IAG3C,+BAAiC;IAO7B,AANF,gHAA0B,mGAMjB;IAOX,iBAAM;IAKF,AADF,AADF,+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