@memberjunction/ng-core-entity-forms 2.73.0 → 2.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/custom/Queries/query-category-dialog.component.d.ts +33 -0
- package/dist/lib/custom/Queries/query-category-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/Queries/query-category-dialog.component.js +241 -0
- package/dist/lib/custom/Queries/query-category-dialog.component.js.map +1 -0
- package/dist/lib/custom/Queries/query-form.component.d.ts +135 -0
- package/dist/lib/custom/Queries/query-form.component.d.ts.map +1 -0
- package/dist/lib/custom/Queries/query-form.component.js +1563 -0
- package/dist/lib/custom/Queries/query-form.component.js.map +1 -0
- package/dist/lib/custom/Queries/query-run-dialog.component.d.ts +66 -0
- package/dist/lib/custom/Queries/query-run-dialog.component.d.ts.map +1 -0
- package/dist/lib/custom/Queries/query-run-dialog.component.js +788 -0
- package/dist/lib/custom/Queries/query-run-dialog.component.js.map +1 -0
- package/dist/lib/custom/custom-forms.module.d.ts +25 -22
- package/dist/lib/custom/custom-forms.module.d.ts.map +1 -1
- package/dist/lib/custom/custom-forms.module.js +18 -3
- package/dist/lib/custom/custom-forms.module.js.map +1 -1
- package/dist/lib/generated/Entities/Query/query.form.component.js +14 -4
- package/dist/lib/generated/Entities/Query/query.form.component.js.map +1 -1
- package/dist/lib/generated/Entities/Query/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/Query/sections/details.component.js +13 -4
- package/dist/lib/generated/Entities/Query/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/QueryEntity/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/QueryEntity/sections/details.component.js +22 -4
- package/dist/lib/generated/Entities/QueryEntity/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/QueryField/sections/details.component.d.ts.map +1 -1
- package/dist/lib/generated/Entities/QueryField/sections/details.component.js +22 -4
- package/dist/lib/generated/Entities/QueryField/sections/details.component.js.map +1 -1
- package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.d.ts +10 -0
- package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.js +59 -0
- package/dist/lib/generated/Entities/QueryParameter/queryparameter.form.component.js.map +1 -0
- package/dist/lib/generated/Entities/QueryParameter/sections/details.component.d.ts +11 -0
- package/dist/lib/generated/Entities/QueryParameter/sections/details.component.d.ts.map +1 -0
- package/dist/lib/generated/Entities/QueryParameter/sections/details.component.js +172 -0
- package/dist/lib/generated/Entities/QueryParameter/sections/details.component.js.map +1 -0
- package/dist/lib/generated/generated-forms.module.d.ts +265 -263
- package/dist/lib/generated/generated-forms.module.d.ts.map +1 -1
- package/dist/lib/generated/generated-forms.module.js +74 -66
- package/dist/lib/generated/generated-forms.module.js.map +1 -1
- package/package.json +16 -16
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { QueryCategoryEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
interface CategoryNode {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
fullPath: string;
|
|
8
|
+
children: CategoryNode[];
|
|
9
|
+
level: number;
|
|
10
|
+
}
|
|
11
|
+
export declare class QueryCategoryDialogComponent implements OnInit {
|
|
12
|
+
isVisible: boolean;
|
|
13
|
+
isVisibleChange: EventEmitter<boolean>;
|
|
14
|
+
onCategoryCreated: EventEmitter<QueryCategoryEntity>;
|
|
15
|
+
categoryName: string;
|
|
16
|
+
selectedParentId: string | null;
|
|
17
|
+
categories: QueryCategoryEntity[];
|
|
18
|
+
categoryTree: CategoryNode[];
|
|
19
|
+
flattenedCategories: CategoryNode[];
|
|
20
|
+
isCreating: boolean;
|
|
21
|
+
ngOnInit(): Promise<void>;
|
|
22
|
+
loadCategories(): Promise<void>;
|
|
23
|
+
private buildCategoryTree;
|
|
24
|
+
private flattenCategories;
|
|
25
|
+
createCategory(): Promise<void>;
|
|
26
|
+
close(): void;
|
|
27
|
+
getCategoryIndent(category: CategoryNode): string;
|
|
28
|
+
getFullPath(): string;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryCategoryDialogComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QueryCategoryDialogComponent, "mj-query-category-dialog", never, { "isVisible": { "alias": "isVisible"; "required": false; }; }, { "isVisibleChange": "isVisibleChange"; "onCategoryCreated": "onCategoryCreated"; }, never, never, false, never>;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=query-category-dialog.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-category-dialog.component.d.ts","sourceRoot":"","sources":["../../../../src/lib/custom/Queries/query-category-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;;AAIpE,UAAU,YAAY;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,qBAKa,4BAA6B,YAAW,MAAM;IAC9C,SAAS,UAAS;IACjB,eAAe,wBAA+B;IAC9C,iBAAiB,oCAA2C;IAE/D,YAAY,SAAM;IAClB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IACvC,UAAU,EAAE,mBAAmB,EAAE,CAAM;IACvC,YAAY,EAAE,YAAY,EAAE,CAAM;IAClC,mBAAmB,EAAE,YAAY,EAAE,CAAM;IACzC,UAAU,UAAS;IAEpB,QAAQ;IAIR,cAAc;IAmBpB,OAAO,CAAC,iBAAiB;IAqCzB,OAAO,CAAC,iBAAiB;IAYnB,cAAc;IA4CpB,KAAK;IAOL,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM;IAIjD,WAAW,IAAI,MAAM;yCA3IZ,4BAA4B;2CAA5B,4BAA4B;CAgJxC"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter } from '@angular/core';
|
|
2
|
+
import { Metadata, RunView } from '@memberjunction/core';
|
|
3
|
+
import { MJNotificationService } from '@memberjunction/ng-notifications';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "@angular/common";
|
|
6
|
+
import * as i2 from "@angular/forms";
|
|
7
|
+
import * as i3 from "@progress/kendo-angular-dialog";
|
|
8
|
+
import * as i4 from "@progress/kendo-angular-inputs";
|
|
9
|
+
import * as i5 from "@progress/kendo-angular-dropdowns";
|
|
10
|
+
import * as i6 from "@progress/kendo-angular-buttons";
|
|
11
|
+
const _c0 = () => ({ id: null, name: "-- No Parent (Top Level) --" });
|
|
12
|
+
function QueryCategoryDialogComponent_kendo_dialog_0_ng_template_18_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
13
|
+
i0.ɵɵelement(0, "i", 19);
|
|
14
|
+
} }
|
|
15
|
+
function QueryCategoryDialogComponent_kendo_dialog_0_ng_template_18_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
16
|
+
i0.ɵɵelement(0, "i", 20);
|
|
17
|
+
} }
|
|
18
|
+
function QueryCategoryDialogComponent_kendo_dialog_0_ng_template_18_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
+
i0.ɵɵelementStart(0, "div");
|
|
20
|
+
i0.ɵɵtemplate(1, QueryCategoryDialogComponent_kendo_dialog_0_ng_template_18_Conditional_1_Template, 1, 0, "i", 19)(2, QueryCategoryDialogComponent_kendo_dialog_0_ng_template_18_Conditional_2_Template, 1, 0, "i", 20);
|
|
21
|
+
i0.ɵɵelementStart(3, "span");
|
|
22
|
+
i0.ɵɵtext(4);
|
|
23
|
+
i0.ɵɵelementEnd()();
|
|
24
|
+
} if (rf & 2) {
|
|
25
|
+
const dataItem_r3 = ctx.$implicit;
|
|
26
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
27
|
+
i0.ɵɵstyleMapInterpolate1("padding-left: ", ctx_r1.getCategoryIndent(dataItem_r3), "; display: flex; align-items: center; gap: 6px;");
|
|
28
|
+
i0.ɵɵadvance();
|
|
29
|
+
i0.ɵɵconditional(dataItem_r3.children && dataItem_r3.children.length > 0 ? 1 : 2);
|
|
30
|
+
i0.ɵɵadvance(3);
|
|
31
|
+
i0.ɵɵtextInterpolate(dataItem_r3.name);
|
|
32
|
+
} }
|
|
33
|
+
function QueryCategoryDialogComponent_kendo_dialog_0_Conditional_19_Template(rf, ctx) { if (rf & 1) {
|
|
34
|
+
i0.ɵɵelementStart(0, "div", 15);
|
|
35
|
+
i0.ɵɵelement(1, "i", 21);
|
|
36
|
+
i0.ɵɵtext(2);
|
|
37
|
+
i0.ɵɵelementEnd();
|
|
38
|
+
} if (rf & 2) {
|
|
39
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
40
|
+
i0.ɵɵadvance(2);
|
|
41
|
+
i0.ɵɵtextInterpolate1(" Full path: ", ctx_r1.getFullPath(), " ");
|
|
42
|
+
} }
|
|
43
|
+
function QueryCategoryDialogComponent_kendo_dialog_0_Conditional_25_Template(rf, ctx) { if (rf & 1) {
|
|
44
|
+
i0.ɵɵelement(0, "i", 22);
|
|
45
|
+
i0.ɵɵtext(1, " Creating... ");
|
|
46
|
+
} }
|
|
47
|
+
function QueryCategoryDialogComponent_kendo_dialog_0_Conditional_26_Template(rf, ctx) { if (rf & 1) {
|
|
48
|
+
i0.ɵɵelement(0, "i", 23);
|
|
49
|
+
i0.ɵɵtext(1, " Create Category ");
|
|
50
|
+
} }
|
|
51
|
+
function QueryCategoryDialogComponent_kendo_dialog_0_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
53
|
+
i0.ɵɵelementStart(0, "kendo-dialog", 1);
|
|
54
|
+
i0.ɵɵlistener("close", function QueryCategoryDialogComponent_kendo_dialog_0_Template_kendo_dialog_close_0_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.close()); });
|
|
55
|
+
i0.ɵɵelementStart(1, "kendo-dialog-titlebar")(2, "div", 2);
|
|
56
|
+
i0.ɵɵelement(3, "i", 3);
|
|
57
|
+
i0.ɵɵtext(4, " Create New Query Category ");
|
|
58
|
+
i0.ɵɵelementEnd()();
|
|
59
|
+
i0.ɵɵelementStart(5, "div", 4)(6, "div", 5)(7, "label", 6);
|
|
60
|
+
i0.ɵɵelement(8, "i", 7);
|
|
61
|
+
i0.ɵɵtext(9, " Category Name ");
|
|
62
|
+
i0.ɵɵelementStart(10, "span", 8);
|
|
63
|
+
i0.ɵɵtext(11, "*");
|
|
64
|
+
i0.ɵɵelementEnd()();
|
|
65
|
+
i0.ɵɵelementStart(12, "kendo-textbox", 9);
|
|
66
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryCategoryDialogComponent_kendo_dialog_0_Template_kendo_textbox_ngModelChange_12_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.categoryName, $event) || (ctx_r1.categoryName = $event); return i0.ɵɵresetView($event); });
|
|
67
|
+
i0.ɵɵelementEnd()();
|
|
68
|
+
i0.ɵɵelementStart(13, "div", 10)(14, "label", 11);
|
|
69
|
+
i0.ɵɵelement(15, "i", 12);
|
|
70
|
+
i0.ɵɵtext(16, " Parent Category (Optional) ");
|
|
71
|
+
i0.ɵɵelementEnd();
|
|
72
|
+
i0.ɵɵelementStart(17, "kendo-dropdownlist", 13);
|
|
73
|
+
i0.ɵɵtwoWayListener("ngModelChange", function QueryCategoryDialogComponent_kendo_dialog_0_Template_kendo_dropdownlist_ngModelChange_17_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); i0.ɵɵtwoWayBindingSet(ctx_r1.selectedParentId, $event) || (ctx_r1.selectedParentId = $event); return i0.ɵɵresetView($event); });
|
|
74
|
+
i0.ɵɵtemplate(18, QueryCategoryDialogComponent_kendo_dialog_0_ng_template_18_Template, 5, 5, "ng-template", 14);
|
|
75
|
+
i0.ɵɵelementEnd();
|
|
76
|
+
i0.ɵɵtemplate(19, QueryCategoryDialogComponent_kendo_dialog_0_Conditional_19_Template, 3, 1, "div", 15);
|
|
77
|
+
i0.ɵɵelementEnd()();
|
|
78
|
+
i0.ɵɵelementStart(20, "kendo-dialog-actions")(21, "button", 16);
|
|
79
|
+
i0.ɵɵlistener("click", function QueryCategoryDialogComponent_kendo_dialog_0_Template_button_click_21_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.close()); });
|
|
80
|
+
i0.ɵɵelement(22, "i", 17);
|
|
81
|
+
i0.ɵɵtext(23, " Cancel ");
|
|
82
|
+
i0.ɵɵelementEnd();
|
|
83
|
+
i0.ɵɵelementStart(24, "button", 18);
|
|
84
|
+
i0.ɵɵlistener("click", function QueryCategoryDialogComponent_kendo_dialog_0_Template_button_click_24_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.createCategory()); });
|
|
85
|
+
i0.ɵɵtemplate(25, QueryCategoryDialogComponent_kendo_dialog_0_Conditional_25_Template, 2, 0)(26, QueryCategoryDialogComponent_kendo_dialog_0_Conditional_26_Template, 2, 0);
|
|
86
|
+
i0.ɵɵelementEnd()()();
|
|
87
|
+
} if (rf & 2) {
|
|
88
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
89
|
+
i0.ɵɵproperty("width", 500)("height", 400);
|
|
90
|
+
i0.ɵɵadvance(12);
|
|
91
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.categoryName);
|
|
92
|
+
i0.ɵɵadvance(5);
|
|
93
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx_r1.selectedParentId);
|
|
94
|
+
i0.ɵɵproperty("data", ctx_r1.flattenedCategories)("textField", "name")("valueField", "id")("valuePrimitive", true)("defaultItem", i0.ɵɵpureFunction0(13, _c0));
|
|
95
|
+
i0.ɵɵadvance(2);
|
|
96
|
+
i0.ɵɵconditional(ctx_r1.selectedParentId ? 19 : -1);
|
|
97
|
+
i0.ɵɵadvance(5);
|
|
98
|
+
i0.ɵɵproperty("themeColor", "primary")("disabled", !ctx_r1.categoryName.trim() || ctx_r1.isCreating);
|
|
99
|
+
i0.ɵɵadvance();
|
|
100
|
+
i0.ɵɵconditional(ctx_r1.isCreating ? 25 : 26);
|
|
101
|
+
} }
|
|
102
|
+
export class QueryCategoryDialogComponent {
|
|
103
|
+
constructor() {
|
|
104
|
+
this.isVisible = false;
|
|
105
|
+
this.isVisibleChange = new EventEmitter();
|
|
106
|
+
this.onCategoryCreated = new EventEmitter();
|
|
107
|
+
this.categoryName = '';
|
|
108
|
+
this.selectedParentId = null;
|
|
109
|
+
this.categories = [];
|
|
110
|
+
this.categoryTree = [];
|
|
111
|
+
this.flattenedCategories = [];
|
|
112
|
+
this.isCreating = false;
|
|
113
|
+
}
|
|
114
|
+
async ngOnInit() {
|
|
115
|
+
await this.loadCategories();
|
|
116
|
+
}
|
|
117
|
+
async loadCategories() {
|
|
118
|
+
try {
|
|
119
|
+
const rv = new RunView();
|
|
120
|
+
const result = await rv.RunView({
|
|
121
|
+
EntityName: 'Query Categories',
|
|
122
|
+
OrderBy: 'Name',
|
|
123
|
+
ResultType: 'entity_object'
|
|
124
|
+
});
|
|
125
|
+
if (result.Success && result.Results) {
|
|
126
|
+
this.categories = result.Results;
|
|
127
|
+
this.categoryTree = this.buildCategoryTree(this.categories);
|
|
128
|
+
this.flattenedCategories = this.flattenCategories(this.categoryTree, 0);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
console.error('Error loading categories:', error);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
buildCategoryTree(categories) {
|
|
136
|
+
const categoryMap = new Map();
|
|
137
|
+
const rootCategories = [];
|
|
138
|
+
// Create nodes for all categories
|
|
139
|
+
categories.forEach(cat => {
|
|
140
|
+
categoryMap.set(cat.ID, {
|
|
141
|
+
id: cat.ID,
|
|
142
|
+
name: cat.Name,
|
|
143
|
+
fullPath: cat.Name,
|
|
144
|
+
children: [],
|
|
145
|
+
level: 0
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
// Build the tree structure
|
|
149
|
+
categories.forEach(cat => {
|
|
150
|
+
const node = categoryMap.get(cat.ID);
|
|
151
|
+
if (cat.ParentID && categoryMap.has(cat.ParentID)) {
|
|
152
|
+
const parent = categoryMap.get(cat.ParentID);
|
|
153
|
+
parent.children.push(node);
|
|
154
|
+
node.fullPath = `${parent.fullPath} / ${node.name}`;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
rootCategories.push(node);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
// Sort children alphabetically
|
|
161
|
+
const sortNodes = (nodes) => {
|
|
162
|
+
nodes.sort((a, b) => a.name.localeCompare(b.name));
|
|
163
|
+
nodes.forEach(node => sortNodes(node.children));
|
|
164
|
+
};
|
|
165
|
+
sortNodes(rootCategories);
|
|
166
|
+
return rootCategories;
|
|
167
|
+
}
|
|
168
|
+
flattenCategories(nodes, level) {
|
|
169
|
+
const result = [];
|
|
170
|
+
nodes.forEach(node => {
|
|
171
|
+
node.level = level;
|
|
172
|
+
result.push(node);
|
|
173
|
+
if (node.children.length > 0) {
|
|
174
|
+
result.push(...this.flattenCategories(node.children, level + 1));
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
return result;
|
|
178
|
+
}
|
|
179
|
+
async createCategory() {
|
|
180
|
+
if (!this.categoryName.trim()) {
|
|
181
|
+
MJNotificationService.Instance.CreateSimpleNotification('Please enter a category name', 'warning');
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
this.isCreating = true;
|
|
185
|
+
try {
|
|
186
|
+
const md = new Metadata();
|
|
187
|
+
const newCategory = await md.GetEntityObject('Query Categories');
|
|
188
|
+
newCategory.Name = this.categoryName.trim();
|
|
189
|
+
newCategory.ParentID = this.selectedParentId;
|
|
190
|
+
newCategory.UserID = md.CurrentUser.ID;
|
|
191
|
+
const saved = await newCategory.Save();
|
|
192
|
+
if (saved) {
|
|
193
|
+
MJNotificationService.Instance.CreateSimpleNotification('Category created successfully', 'success');
|
|
194
|
+
this.onCategoryCreated.emit(newCategory);
|
|
195
|
+
this.close();
|
|
196
|
+
}
|
|
197
|
+
else {
|
|
198
|
+
MJNotificationService.Instance.CreateSimpleNotification(`Failed to create category: ${newCategory.LatestResult?.Message || 'Unknown error'}`, 'error');
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
catch (error) {
|
|
202
|
+
console.error('Error creating category:', error);
|
|
203
|
+
MJNotificationService.Instance.CreateSimpleNotification('Error creating category', 'error');
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
this.isCreating = false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
close() {
|
|
210
|
+
this.categoryName = '';
|
|
211
|
+
this.selectedParentId = null;
|
|
212
|
+
this.isVisible = false;
|
|
213
|
+
this.isVisibleChange.emit(false);
|
|
214
|
+
}
|
|
215
|
+
getCategoryIndent(category) {
|
|
216
|
+
return `${category.level * 20}px`;
|
|
217
|
+
}
|
|
218
|
+
getFullPath() {
|
|
219
|
+
const parent = this.flattenedCategories.find(c => c.id === this.selectedParentId);
|
|
220
|
+
const name = this.categoryName || 'New Category';
|
|
221
|
+
return parent ? `${parent.fullPath} / ${name}` : name;
|
|
222
|
+
}
|
|
223
|
+
static { this.ɵfac = function QueryCategoryDialogComponent_Factory(t) { return new (t || QueryCategoryDialogComponent)(); }; }
|
|
224
|
+
static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryCategoryDialogComponent, selectors: [["mj-query-category-dialog"]], inputs: { isVisible: "isVisible" }, outputs: { isVisibleChange: "isVisibleChange", onCategoryCreated: "onCategoryCreated" }, decls: 1, vars: 1, consts: [[3, "width", "height", "close", 4, "ngIf"], [3, "close", "width", "height"], [2, "display", "flex", "align-items", "center", "gap", "8px"], [1, "fa-solid", "fa-folder-plus", 2, "color", "#28a745"], [2, "padding", "20px"], [1, "form-group", 2, "margin-bottom", "20px"], ["for", "categoryName", 2, "display", "block", "margin-bottom", "8px", "font-weight", "600", "color", "#495057"], [1, "fa-solid", "fa-tag"], [2, "color", "#dc3545"], ["name", "categoryName", "placeholder", "Enter category name...", 2, "width", "100%", 3, "ngModelChange", "ngModel"], [1, "form-group"], ["for", "parentCategory", 2, "display", "block", "margin-bottom", "8px", "font-weight", "600", "color", "#495057"], [1, "fa-solid", "fa-folder-tree"], ["name", "parentCategory", 2, "width", "100%", 3, "ngModelChange", "ngModel", "data", "textField", "valueField", "valuePrimitive", "defaultItem"], ["kendoDropDownListItemTemplate", ""], [2, "margin-top", "8px", "padding", "8px", "background", "#f8f9fa", "border-radius", "4px", "font-size", "0.85em", "color", "#6c757d"], ["kendoButton", "", 3, "click"], [1, "fa-solid", "fa-times"], ["kendoButton", "", 3, "click", "themeColor", "disabled"], [1, "fa-solid", "fa-folder", 2, "color", "#ffc107", "font-size", "0.9em"], [1, "fa-solid", "fa-folder-open", 2, "color", "#6c757d", "font-size", "0.9em"], [1, "fa-solid", "fa-info-circle"], [1, "fa-solid", "fa-spinner", "fa-spin"], [1, "fa-solid", "fa-check"]], template: function QueryCategoryDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
225
|
+
i0.ɵɵtemplate(0, QueryCategoryDialogComponent_kendo_dialog_0_Template, 27, 14, "kendo-dialog", 0);
|
|
226
|
+
} if (rf & 2) {
|
|
227
|
+
i0.ɵɵproperty("ngIf", ctx.isVisible);
|
|
228
|
+
} }, dependencies: [i1.NgIf, i2.NgControlStatus, i2.NgModel, i3.DialogComponent, i3.DialogTitleBarComponent, i3.DialogActionsComponent, i4.TextBoxComponent, i5.ItemTemplateDirective, i5.DropDownListComponent, i6.ButtonComponent], styles: ["\n\n.form-group[_ngcontent-%COMP%] {\n margin-bottom: 20px;\n}\n\n.form-group[_ngcontent-%COMP%] label[_ngcontent-%COMP%] {\n display: block;\n margin-bottom: 8px;\n font-weight: 600;\n color: #495057;\n}\n\n .k-dialog {\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15);\n}\n\n .k-dialog-titlebar {\n background: #f8f9fa;\n border-bottom: 1px solid #dee2e6;\n padding: 16px 20px;\n}\n\n .k-dialog-content {\n padding: 0;\n}"] }); }
|
|
229
|
+
}
|
|
230
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryCategoryDialogComponent, [{
|
|
231
|
+
type: Component,
|
|
232
|
+
args: [{ selector: 'mj-query-category-dialog', template: "<kendo-dialog \n *ngIf=\"isVisible\"\n [width]=\"500\"\n [height]=\"400\"\n (close)=\"close()\">\n \n <kendo-dialog-titlebar>\n <div style=\"display: flex; align-items: center; gap: 8px;\">\n <i class=\"fa-solid fa-folder-plus\" style=\"color: #28a745;\"></i>\n Create New Query Category\n </div>\n </kendo-dialog-titlebar>\n \n <div style=\"padding: 20px;\">\n <div class=\"form-group\" style=\"margin-bottom: 20px;\">\n <label for=\"categoryName\" style=\"display: block; margin-bottom: 8px; font-weight: 600; color: #495057;\">\n <i class=\"fa-solid fa-tag\"></i> Category Name <span style=\"color: #dc3545;\">*</span>\n </label>\n <kendo-textbox \n [(ngModel)]=\"categoryName\"\n name=\"categoryName\"\n placeholder=\"Enter category name...\"\n style=\"width: 100%;\">\n </kendo-textbox>\n </div>\n \n <div class=\"form-group\">\n <label for=\"parentCategory\" style=\"display: block; margin-bottom: 8px; font-weight: 600; color: #495057;\">\n <i class=\"fa-solid fa-folder-tree\"></i> Parent Category (Optional)\n </label>\n <kendo-dropdownlist\n [(ngModel)]=\"selectedParentId\"\n name=\"parentCategory\"\n [data]=\"flattenedCategories\"\n [textField]=\"'name'\"\n [valueField]=\"'id'\"\n [valuePrimitive]=\"true\"\n [defaultItem]=\"{id: null, name: '-- No Parent (Top Level) --'}\"\n style=\"width: 100%;\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <div style=\"padding-left: {{getCategoryIndent(dataItem)}}; display: flex; align-items: center; gap: 6px;\">\n @if (dataItem.children && dataItem.children.length > 0) {\n <i class=\"fa-solid fa-folder\" style=\"color: #ffc107; font-size: 0.9em;\"></i>\n } @else {\n <i class=\"fa-solid fa-folder-open\" style=\"color: #6c757d; font-size: 0.9em;\"></i>\n }\n <span>{{ dataItem.name }}</span>\n </div>\n </ng-template>\n </kendo-dropdownlist>\n \n @if (selectedParentId) {\n <div style=\"margin-top: 8px; padding: 8px; background: #f8f9fa; border-radius: 4px; font-size: 0.85em; color: #6c757d;\">\n <i class=\"fa-solid fa-info-circle\"></i>\n Full path: {{ getFullPath() }}\n </div>\n }\n </div>\n </div>\n \n <kendo-dialog-actions>\n <button kendoButton (click)=\"close()\">\n <i class=\"fa-solid fa-times\"></i> Cancel\n </button>\n <button kendoButton \n [themeColor]=\"'primary'\"\n [disabled]=\"!categoryName.trim() || isCreating\"\n (click)=\"createCategory()\">\n @if (isCreating) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Creating...\n } @else {\n <i class=\"fa-solid fa-check\"></i> Create Category\n }\n </button>\n </kendo-dialog-actions>\n</kendo-dialog>", styles: ["/* Category Dialog Styles */\n.form-group {\n margin-bottom: 20px;\n}\n\n.form-group label {\n display: block;\n margin-bottom: 8px;\n font-weight: 600;\n color: #495057;\n}\n\n::ng-deep .k-dialog {\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15);\n}\n\n::ng-deep .k-dialog-titlebar {\n background: #f8f9fa;\n border-bottom: 1px solid #dee2e6;\n padding: 16px 20px;\n}\n\n::ng-deep .k-dialog-content {\n padding: 0;\n}"] }]
|
|
233
|
+
}], null, { isVisible: [{
|
|
234
|
+
type: Input
|
|
235
|
+
}], isVisibleChange: [{
|
|
236
|
+
type: Output
|
|
237
|
+
}], onCategoryCreated: [{
|
|
238
|
+
type: Output
|
|
239
|
+
}] }); })();
|
|
240
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryCategoryDialogComponent, { className: "QueryCategoryDialogComponent", filePath: "src/lib/custom/Queries/query-category-dialog.component.ts", lineNumber: 19 }); })();
|
|
241
|
+
//# sourceMappingURL=query-category-dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query-category-dialog.component.js","sourceRoot":"","sources":["../../../../src/lib/custom/Queries/query-category-dialog.component.ts","../../../../src/lib/custom/Queries/query-category-dialog.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAU,MAAM,eAAe,CAAC;AAE/E,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;;;;;;ICuC7C,wBAA4E;;;IAE5E,wBAAiF;;;IAJzF,2BAA0G;IAGpG,AAFF,kHAAyD,qGAEhD;IAGT,4BAAM;IAAA,YAAmB;IAC7B,AAD6B,iBAAO,EAC9B;;;;IAPD,qIAAoG;IACrG,cAIC;IAJD,iFAIC;IACK,eAAmB;IAAnB,sCAAmB;;;IAMjC,+BAAwH;IACpH,wBAAuC;IACvC,YACJ;IAAA,iBAAM;;;IADF,eACJ;IADI,gEACJ;;;IAcA,wBAA2C;IAAC,6BAChD;;;IACI,wBAAiC;IAAC,iCACtC;;;;IAxEZ,uCAIsB;IAAlB,uMAAS,cAAO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ueryEntity, QueryParameterEntity, QueryCategoryEntity, QueryFieldEntity, QueryEntityEntity, QueryPermissionEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import { QueryFormComponent } from '../../generated/Entities/Query/query.form.component';
|
|
4
|
+
import { CodeEditorComponent } from '@memberjunction/ng-code-editor';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
interface CategoryTreeNode {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
items?: CategoryTreeNode[];
|
|
10
|
+
}
|
|
11
|
+
export declare class QueryFormExtendedComponent extends QueryFormComponent implements OnInit, OnDestroy, AfterViewInit {
|
|
12
|
+
cdr: ChangeDetectorRef;
|
|
13
|
+
record: QueryEntity;
|
|
14
|
+
queryParameters: QueryParameterEntity[];
|
|
15
|
+
queryFields: QueryFieldEntity[];
|
|
16
|
+
queryEntities: QueryEntityEntity[];
|
|
17
|
+
queryPermissions: QueryPermissionEntity[];
|
|
18
|
+
isLoadingParameters: boolean;
|
|
19
|
+
isLoadingFields: boolean;
|
|
20
|
+
isLoadingEntities: boolean;
|
|
21
|
+
isLoadingPermissions: boolean;
|
|
22
|
+
hasUnsavedChanges: boolean;
|
|
23
|
+
showFiltersHelp: boolean;
|
|
24
|
+
showRunDialog: boolean;
|
|
25
|
+
showCategoryDialog: boolean;
|
|
26
|
+
sqlPanelExpanded: boolean;
|
|
27
|
+
parametersPanelExpanded: boolean;
|
|
28
|
+
fieldsPanelExpanded: boolean;
|
|
29
|
+
entitiesPanelExpanded: boolean;
|
|
30
|
+
detailsPanelExpanded: boolean;
|
|
31
|
+
permissionsPanelExpanded: boolean;
|
|
32
|
+
categoryOptions: Array<{
|
|
33
|
+
text: string;
|
|
34
|
+
value: string;
|
|
35
|
+
}>;
|
|
36
|
+
categories: QueryCategoryEntity[];
|
|
37
|
+
categoryTreeData: CategoryTreeNode[];
|
|
38
|
+
private isCategoriesLoaded;
|
|
39
|
+
statusOptions: {
|
|
40
|
+
text: string;
|
|
41
|
+
value: string;
|
|
42
|
+
}[];
|
|
43
|
+
sqlEditor: CodeEditorComponent | null;
|
|
44
|
+
sqlFilters: import("@memberjunction/core").RunQuerySQLFilter[];
|
|
45
|
+
private destroy$;
|
|
46
|
+
private isUpdatingEditorValue;
|
|
47
|
+
ngOnInit(): Promise<void>;
|
|
48
|
+
ngOnDestroy(): void;
|
|
49
|
+
ngAfterViewInit(): void;
|
|
50
|
+
EndEditMode(): void;
|
|
51
|
+
StartEditMode(): void;
|
|
52
|
+
CancelEdit(): void;
|
|
53
|
+
private updateEditorValue;
|
|
54
|
+
isFormReadOnly(): boolean;
|
|
55
|
+
loadQueryParameters(): Promise<void>;
|
|
56
|
+
loadQueryFields(): Promise<void>;
|
|
57
|
+
loadQueryEntities(): Promise<void>;
|
|
58
|
+
loadQueryPermissions(): Promise<void>;
|
|
59
|
+
loadCategories(): Promise<void>;
|
|
60
|
+
private buildCategoryTree;
|
|
61
|
+
getCategoryPath(): string;
|
|
62
|
+
onCategoryChange(value: string): Promise<void>;
|
|
63
|
+
private isDuplicateCategory;
|
|
64
|
+
/**
|
|
65
|
+
* Updates the hasUnsavedChanges flag based on entity dirty states
|
|
66
|
+
*/
|
|
67
|
+
private updateUnsavedChangesFlag;
|
|
68
|
+
toggleFiltersHelp(): void;
|
|
69
|
+
/**
|
|
70
|
+
* Run the query with parameter dialog
|
|
71
|
+
*/
|
|
72
|
+
runQuery(): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Handle run dialog close
|
|
75
|
+
*/
|
|
76
|
+
onRunDialogClose(): void;
|
|
77
|
+
/**
|
|
78
|
+
* Add a new parameter
|
|
79
|
+
*/
|
|
80
|
+
addParameter(): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Edit a parameter
|
|
83
|
+
*/
|
|
84
|
+
editParameter(param: QueryParameterEntity): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Delete a parameter
|
|
87
|
+
*/
|
|
88
|
+
deleteParameter(param: QueryParameterEntity): Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Handle category creation from dialog
|
|
91
|
+
*/
|
|
92
|
+
onCategoryCreated(newCategory: QueryCategoryEntity): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Format date for display
|
|
95
|
+
*/
|
|
96
|
+
formatDate(date: Date | string | null): string;
|
|
97
|
+
SaveRecord(StopEditModeAfterSave?: boolean): Promise<boolean>;
|
|
98
|
+
getStatusBadgeColor(): string;
|
|
99
|
+
/**
|
|
100
|
+
* Handle SQL value changes from the code editor
|
|
101
|
+
*/
|
|
102
|
+
onSQLChange(value: any): void;
|
|
103
|
+
/**
|
|
104
|
+
* Add a new field
|
|
105
|
+
*/
|
|
106
|
+
addField(): Promise<void>;
|
|
107
|
+
/**
|
|
108
|
+
* Delete a field
|
|
109
|
+
*/
|
|
110
|
+
deleteField(field: QueryFieldEntity): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Add a new entity
|
|
113
|
+
*/
|
|
114
|
+
addEntity(): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Delete an entity
|
|
117
|
+
*/
|
|
118
|
+
deleteEntity(entity: QueryEntityEntity): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Get entity options for dropdown
|
|
121
|
+
*/
|
|
122
|
+
getEntityOptions(): Array<{
|
|
123
|
+
text: string;
|
|
124
|
+
id: string;
|
|
125
|
+
}>;
|
|
126
|
+
/**
|
|
127
|
+
* Get the grid edit mode based on component edit mode
|
|
128
|
+
*/
|
|
129
|
+
GridEditMode(): "None" | "Save" | "Queue";
|
|
130
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryFormExtendedComponent, never>;
|
|
131
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QueryFormExtendedComponent, "mj-query-form", never, {}, {}, never, never, false, never>;
|
|
132
|
+
}
|
|
133
|
+
export declare function LoadQueryFormExtendedComponent(): void;
|
|
134
|
+
export {};
|
|
135
|
+
//# sourceMappingURL=query-form.component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