@memberjunction/ng-query-grid 0.9.8
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.
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnInit, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { BaseEntity, PrimaryKeyValue, RunQueryParams } from '@memberjunction/core';
|
|
3
|
+
import { CellClickEvent, GridDataResult, PageChangeEvent, GridComponent, SelectableSettings } from "@progress/kendo-angular-grid";
|
|
4
|
+
import { ExcelExportComponent } from '@progress/kendo-angular-excel-export';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export type GridRowClickedEvent = {
|
|
7
|
+
entityId: number;
|
|
8
|
+
entityName: string;
|
|
9
|
+
primaryKeyValues: PrimaryKeyValue[];
|
|
10
|
+
};
|
|
11
|
+
export declare class QueryGridComponent implements OnInit, AfterViewInit {
|
|
12
|
+
title: string;
|
|
13
|
+
Params: RunQueryParams | undefined;
|
|
14
|
+
BottomMargin: number;
|
|
15
|
+
InEditMode: boolean;
|
|
16
|
+
EditMode: "None" | "Save" | "Queue";
|
|
17
|
+
AutoNavigate: boolean;
|
|
18
|
+
rowClicked: EventEmitter<GridRowClickedEvent>;
|
|
19
|
+
kendoGridElement: GridComponent | null;
|
|
20
|
+
kendoGridElementRef: ElementRef | null;
|
|
21
|
+
kendoExcelExport: ExcelExportComponent | null;
|
|
22
|
+
queryData: any[];
|
|
23
|
+
totalRowCount: number;
|
|
24
|
+
entityRecord: BaseEntity | null;
|
|
25
|
+
skip: number;
|
|
26
|
+
pageSize: number;
|
|
27
|
+
isLoading: boolean;
|
|
28
|
+
gridView: GridDataResult;
|
|
29
|
+
gridHeight: number;
|
|
30
|
+
selectableSettings: SelectableSettings;
|
|
31
|
+
selectedKeys: any[];
|
|
32
|
+
showRefreshButton: boolean;
|
|
33
|
+
viewExecutionTime: number;
|
|
34
|
+
pageChange(event: PageChangeEvent): void;
|
|
35
|
+
private virtualLoadData;
|
|
36
|
+
constructor();
|
|
37
|
+
protected CreateSimpleNotification(message: string, style: "none" | "success" | "error" | "warning" | "info", duration: number): void;
|
|
38
|
+
cellClickHandler(args: CellClickEvent): Promise<void>;
|
|
39
|
+
ngOnInit(): void;
|
|
40
|
+
ngAfterViewInit(): void;
|
|
41
|
+
private _deferLoadCount;
|
|
42
|
+
private _allowLoad;
|
|
43
|
+
get AllowLoad(): boolean;
|
|
44
|
+
set AllowLoad(value: boolean);
|
|
45
|
+
RefreshFromSavedParams(): Promise<void>;
|
|
46
|
+
Refresh(params: RunQueryParams): Promise<void>;
|
|
47
|
+
exportData: any[];
|
|
48
|
+
doExcelExport(): Promise<void>;
|
|
49
|
+
protected getExportData(): Promise<any[]>;
|
|
50
|
+
protected queryColumns(): string[] | undefined;
|
|
51
|
+
kendoSVGIcon(iconName: string): any;
|
|
52
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryGridComponent, never>;
|
|
53
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QueryGridComponent, "mj-query-grid", never, { "Params": { "alias": "Params"; "required": false; }; "BottomMargin": { "alias": "BottomMargin"; "required": false; }; "InEditMode": { "alias": "InEditMode"; "required": false; }; "EditMode": { "alias": "EditMode"; "required": false; }; "AutoNavigate": { "alias": "AutoNavigate"; "required": false; }; "AllowLoad": { "alias": "AllowLoad"; "required": false; }; }, { "rowClicked": "rowClicked"; }, never, never, false, never>;
|
|
54
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Component, ViewChild, ElementRef, Output, EventEmitter, Input } from '@angular/core';
|
|
11
|
+
import { Metadata, LogError, RunQuery } from '@memberjunction/core';
|
|
12
|
+
import { GridComponent } from "@progress/kendo-angular-grid";
|
|
13
|
+
import { ExcelExportComponent } from '@progress/kendo-angular-excel-export';
|
|
14
|
+
import { MJEventType, MJGlobal } from '@memberjunction/global';
|
|
15
|
+
import * as KendoSVGIcons from "@progress/kendo-svg-icons";
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
17
|
+
import * as i1 from "@angular/common";
|
|
18
|
+
import * as i2 from "@progress/kendo-angular-grid";
|
|
19
|
+
import * as i3 from "@progress/kendo-angular-excel-export";
|
|
20
|
+
import * as i4 from "@memberjunction/ng-container-directives";
|
|
21
|
+
import * as i5 from "@progress/kendo-angular-buttons";
|
|
22
|
+
import * as i6 from "@progress/kendo-angular-icons";
|
|
23
|
+
const _c0 = ["kendoGrid"];
|
|
24
|
+
const _c1 = ["excelExport"];
|
|
25
|
+
function QueryGridComponent_ng_template_3_button_3_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
const _r6 = i0.ɵɵgetCurrentView();
|
|
27
|
+
i0.ɵɵelementStart(0, "button", 10);
|
|
28
|
+
i0.ɵɵlistener("click", function QueryGridComponent_ng_template_3_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r5 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r5.RefreshFromSavedParams()); });
|
|
29
|
+
i0.ɵɵtext(1, " Refresh ");
|
|
30
|
+
i0.ɵɵelement(2, "kendo-svgicon", 8);
|
|
31
|
+
i0.ɵɵelementEnd();
|
|
32
|
+
} if (rf & 2) {
|
|
33
|
+
const ctx_r4 = i0.ɵɵnextContext(2);
|
|
34
|
+
i0.ɵɵproperty("primary", true);
|
|
35
|
+
i0.ɵɵadvance(2);
|
|
36
|
+
i0.ɵɵproperty("icon", ctx_r4.kendoSVGIcon("arrowRotateCcwSmall"));
|
|
37
|
+
} }
|
|
38
|
+
function QueryGridComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
39
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
40
|
+
i0.ɵɵelementStart(0, "button", 7);
|
|
41
|
+
i0.ɵɵlistener("click", function QueryGridComponent_ng_template_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.doExcelExport()); });
|
|
42
|
+
i0.ɵɵelement(1, "kendo-svgicon", 8);
|
|
43
|
+
i0.ɵɵtext(2, "Export to Excel");
|
|
44
|
+
i0.ɵɵelementEnd();
|
|
45
|
+
i0.ɵɵtemplate(3, QueryGridComponent_ng_template_3_button_3_Template, 3, 2, "button", 9);
|
|
46
|
+
} if (rf & 2) {
|
|
47
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
48
|
+
i0.ɵɵadvance();
|
|
49
|
+
i0.ɵɵproperty("icon", ctx_r1.kendoSVGIcon("fileExcel"));
|
|
50
|
+
i0.ɵɵadvance(2);
|
|
51
|
+
i0.ɵɵproperty("ngIf", ctx_r1.showRefreshButton);
|
|
52
|
+
} }
|
|
53
|
+
function QueryGridComponent_kendo_excelexport_column_6_Template(rf, ctx) { if (rf & 1) {
|
|
54
|
+
i0.ɵɵelement(0, "kendo-excelexport-column", 11);
|
|
55
|
+
} if (rf & 2) {
|
|
56
|
+
const exportCol_r9 = ctx.$implicit;
|
|
57
|
+
i0.ɵɵproperty("field", exportCol_r9)("title", exportCol_r9);
|
|
58
|
+
} }
|
|
59
|
+
export class QueryGridComponent {
|
|
60
|
+
pageChange(event) {
|
|
61
|
+
this.skip = event.skip;
|
|
62
|
+
this.virtualLoadData();
|
|
63
|
+
}
|
|
64
|
+
virtualLoadData() {
|
|
65
|
+
this.gridView = {
|
|
66
|
+
data: this.queryData.slice(this.skip, this.skip + this.pageSize),
|
|
67
|
+
total: this.queryData.length,
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
constructor() {
|
|
71
|
+
this.title = 'QueryGrid';
|
|
72
|
+
this.BottomMargin = 0;
|
|
73
|
+
this.InEditMode = false;
|
|
74
|
+
this.EditMode = "None";
|
|
75
|
+
this.AutoNavigate = true;
|
|
76
|
+
this.rowClicked = new EventEmitter();
|
|
77
|
+
this.kendoGridElement = null;
|
|
78
|
+
this.kendoGridElementRef = null;
|
|
79
|
+
this.kendoExcelExport = null;
|
|
80
|
+
this.queryData = [];
|
|
81
|
+
this.totalRowCount = 0;
|
|
82
|
+
this.entityRecord = null;
|
|
83
|
+
this.skip = 0;
|
|
84
|
+
this.pageSize = 40;
|
|
85
|
+
this.isLoading = false;
|
|
86
|
+
this.gridView = { data: [], total: 0 };
|
|
87
|
+
this.gridHeight = 750;
|
|
88
|
+
this.selectableSettings = {
|
|
89
|
+
enabled: false
|
|
90
|
+
};
|
|
91
|
+
this.selectedKeys = [];
|
|
92
|
+
this.showRefreshButton = true;
|
|
93
|
+
this.viewExecutionTime = 0;
|
|
94
|
+
this._deferLoadCount = 0;
|
|
95
|
+
this._allowLoad = true;
|
|
96
|
+
// Export Functionality
|
|
97
|
+
this.exportData = [];
|
|
98
|
+
}
|
|
99
|
+
CreateSimpleNotification(message, style, duration) {
|
|
100
|
+
const data = {
|
|
101
|
+
message: message,
|
|
102
|
+
style: style,
|
|
103
|
+
DisplayDuration: duration
|
|
104
|
+
};
|
|
105
|
+
MJGlobal.Instance.RaiseEvent({
|
|
106
|
+
component: this,
|
|
107
|
+
event: MJEventType.DisplaySimpleNotificationRequest,
|
|
108
|
+
eventCode: "",
|
|
109
|
+
args: data
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
cellClickHandler(args) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
// to do implement click handler for a query based on the entity field data
|
|
115
|
+
// bubble up the event to the parent component
|
|
116
|
+
this.rowClicked.emit(args.dataItem);
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
ngOnInit() {
|
|
120
|
+
}
|
|
121
|
+
ngAfterViewInit() {
|
|
122
|
+
//this.setGridHeight();
|
|
123
|
+
if (this.Params)
|
|
124
|
+
this.Refresh(this.Params);
|
|
125
|
+
}
|
|
126
|
+
get AllowLoad() {
|
|
127
|
+
return this._allowLoad;
|
|
128
|
+
}
|
|
129
|
+
set AllowLoad(value) {
|
|
130
|
+
this._allowLoad = value;
|
|
131
|
+
if (value === true && this._deferLoadCount === 0) {
|
|
132
|
+
this._deferLoadCount++; // only do this one time
|
|
133
|
+
if (this.Params)
|
|
134
|
+
this.Refresh(this.Params);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
RefreshFromSavedParams() {
|
|
139
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
if (this.Params)
|
|
141
|
+
this.Refresh(this.Params);
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
Refresh(params) {
|
|
145
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
+
this.Params = params;
|
|
147
|
+
if (this.AllowLoad === false) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (params && params.QueryID) {
|
|
151
|
+
const startTime = new Date().getTime();
|
|
152
|
+
this.isLoading = true;
|
|
153
|
+
const md = new Metadata();
|
|
154
|
+
const rq = new RunQuery();
|
|
155
|
+
const rqResult = yield rq.RunQuery(params);
|
|
156
|
+
if (!rqResult.Success) {
|
|
157
|
+
// it failed
|
|
158
|
+
this.CreateSimpleNotification("Error running view:\n\n" + rqResult.ErrorMessage, 'error', 5000);
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
// it worked
|
|
162
|
+
this.queryData = rqResult.Results;
|
|
163
|
+
this.totalRowCount = rqResult.RowCount;
|
|
164
|
+
this.skip = 0;
|
|
165
|
+
this.virtualLoadData();
|
|
166
|
+
}
|
|
167
|
+
this.viewExecutionTime = (new Date().getTime() - startTime) / 1000; // in seconds
|
|
168
|
+
this.isLoading = false;
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
LogError("Refresh(params) must have ViewID or ViewName or (EntityName and ExtraFilter)");
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
doExcelExport() {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
if (this.kendoExcelExport === null)
|
|
178
|
+
throw new Error("kendoExcelExport is null, cannot export data");
|
|
179
|
+
try {
|
|
180
|
+
this.CreateSimpleNotification("Working on the export, will notify you when it is complete...", 'info', 2000);
|
|
181
|
+
const data = yield this.getExportData();
|
|
182
|
+
// we have the data.
|
|
183
|
+
this.exportData = data;
|
|
184
|
+
// before we call the save, we need to let Angular do its thing that will result in the kendoExcelExport component binding properly to
|
|
185
|
+
// the exportColumns and exportData arrays. So we wait for the next tick before we call save()
|
|
186
|
+
setTimeout(() => {
|
|
187
|
+
this.kendoExcelExport.save();
|
|
188
|
+
this.CreateSimpleNotification("Excel Export Complete", 'success', 2000);
|
|
189
|
+
}, 100);
|
|
190
|
+
}
|
|
191
|
+
catch (e) {
|
|
192
|
+
this.CreateSimpleNotification("Error exporting data", 'error', 5000);
|
|
193
|
+
LogError(e);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
getExportData() {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
return this.queryData;
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
queryColumns() {
|
|
203
|
+
// take first row of the data and get the keys
|
|
204
|
+
const firstRow = this.queryData[0];
|
|
205
|
+
if (firstRow) {
|
|
206
|
+
return Object.keys(firstRow);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
kendoSVGIcon(iconName) {
|
|
210
|
+
// Cast KendoSVGIcons to any to bypass the index signature check
|
|
211
|
+
try {
|
|
212
|
+
const lookupName = iconName.endsWith('Icon') ? iconName : iconName + 'Icon';
|
|
213
|
+
const icon = KendoSVGIcons[lookupName];
|
|
214
|
+
if (!icon)
|
|
215
|
+
console.log('Icon not found: ' + iconName);
|
|
216
|
+
return icon || null;
|
|
217
|
+
}
|
|
218
|
+
catch (e) {
|
|
219
|
+
// icon not found
|
|
220
|
+
console.log('Icon not found: ' + iconName);
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
QueryGridComponent.ɵfac = function QueryGridComponent_Factory(t) { return new (t || QueryGridComponent)(); };
|
|
226
|
+
QueryGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: QueryGridComponent, selectors: [["mj-query-grid"]], viewQuery: function QueryGridComponent_Query(rf, ctx) { if (rf & 1) {
|
|
227
|
+
i0.ɵɵviewQuery(_c0, 5, GridComponent);
|
|
228
|
+
i0.ɵɵviewQuery(_c0, 5, ElementRef);
|
|
229
|
+
i0.ɵɵviewQuery(_c1, 5, ExcelExportComponent);
|
|
230
|
+
} if (rf & 2) {
|
|
231
|
+
let _t;
|
|
232
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoGridElement = _t.first);
|
|
233
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoGridElementRef = _t.first);
|
|
234
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.kendoExcelExport = _t.first);
|
|
235
|
+
} }, inputs: { Params: "Params", BottomMargin: "BottomMargin", InEditMode: "InEditMode", EditMode: "EditMode", AutoNavigate: "AutoNavigate", AllowLoad: "AllowLoad" }, outputs: { rowClicked: "rowClicked" }, decls: 7, vars: 15, consts: [["mjFillContainer", "", 1, "query-grid-wrap"], ["mjFillContainer", "", "scrollable", "virtual", "kendoGridSelectBy", "", 3, "resizable", "data", "skip", "pageSize", "rowHeight", "loading", "height", "sortable", "reorderable", "selectable", "selectedKeys", "pageChange", "selectedKeysChange", "cellClick"], ["kendoGrid", ""], ["kendoGridToolbarTemplate", ""], [3, "data", "fileName"], ["excelExport", ""], [3, "field", "title", 4, "ngFor", "ngForOf"], ["kendoButton", "", 3, "click"], [3, "icon"], ["kendoButton", "", 3, "primary", "click", 4, "ngIf"], ["kendoButton", "", 3, "primary", "click"], [3, "field", "title"]], template: function QueryGridComponent_Template(rf, ctx) { if (rf & 1) {
|
|
236
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "kendo-grid", 1, 2);
|
|
237
|
+
i0.ɵɵlistener("pageChange", function QueryGridComponent_Template_kendo_grid_pageChange_1_listener($event) { return ctx.pageChange($event); })("selectedKeysChange", function QueryGridComponent_Template_kendo_grid_selectedKeysChange_1_listener($event) { return ctx.selectedKeys = $event; })("cellClick", function QueryGridComponent_Template_kendo_grid_cellClick_1_listener($event) { return ctx.cellClickHandler($event); });
|
|
238
|
+
i0.ɵɵtemplate(3, QueryGridComponent_ng_template_3_Template, 4, 2, "ng-template", 3);
|
|
239
|
+
i0.ɵɵelementStart(4, "kendo-excelexport", 4, 5);
|
|
240
|
+
i0.ɵɵtemplate(6, QueryGridComponent_kendo_excelexport_column_6_Template, 1, 2, "kendo-excelexport-column", 6);
|
|
241
|
+
i0.ɵɵelementEnd()()();
|
|
242
|
+
} if (rf & 2) {
|
|
243
|
+
i0.ɵɵadvance();
|
|
244
|
+
i0.ɵɵproperty("resizable", true)("data", ctx.gridView)("skip", ctx.skip)("pageSize", ctx.pageSize)("rowHeight", 36)("loading", ctx.isLoading)("height", ctx.gridHeight)("sortable", true)("resizable", true)("reorderable", true)("selectable", true)("selectedKeys", ctx.selectedKeys);
|
|
245
|
+
i0.ɵɵadvance(3);
|
|
246
|
+
i0.ɵɵproperty("data", ctx.exportData)("fileName", (ctx.Params == null ? null : ctx.Params.QueryID) + "_Query.xlsx");
|
|
247
|
+
i0.ɵɵadvance(2);
|
|
248
|
+
i0.ɵɵproperty("ngForOf", ctx.queryColumns());
|
|
249
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.GridComponent, i2.ToolbarTemplateDirective, i2.SelectionDirective, i3.ExcelExportComponent, i3.ColumnComponent, i4.FillContainer, i5.ButtonComponent, i6.SVGIconComponent], styles: [".query-grid-wrap[_ngcontent-%COMP%] {\r\n height: calc(100vh-20px);\r\n}\r\n\r\n.query-grid-column-header[_ngcontent-%COMP%] {\r\n background-color: #ec8641;\r\n font-size: 20pt;\r\n font-weight: bold;\r\n}"] });
|
|
250
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryGridComponent, [{
|
|
251
|
+
type: Component,
|
|
252
|
+
args: [{ selector: 'mj-query-grid', template: "<div class=\"query-grid-wrap\" mjFillContainer>\r\n <kendo-grid #kendoGrid\r\n mjFillContainer\r\n [resizable]=\"true\"\r\n [data]=\"gridView\" \r\n [skip]=\"skip\"\r\n [pageSize]=\"pageSize\"\r\n scrollable=\"virtual\"\r\n [rowHeight]=\"36\"\r\n (pageChange)=\"pageChange($event)\"\r\n [loading]=\"isLoading\"\r\n [height]=\"gridHeight\"\r\n [sortable]=\"true\"\r\n [resizable]=\"true\"\r\n [reorderable]=\"true\"\r\n [selectable]=\"true\"\r\n kendoGridSelectBy\r\n [(selectedKeys)]=\"selectedKeys\"\r\n (cellClick)=\"cellClickHandler($event)\"\r\n >\r\n <ng-template kendoGridToolbarTemplate>\r\n <button kendoButton (click)=\"doExcelExport()\" ><kendo-svgicon [icon]=\"kendoSVGIcon('fileExcel')\" ></kendo-svgicon>Export to Excel</button>\r\n <button\r\n kendoButton\r\n [primary]=\"true\"\r\n *ngIf=\"showRefreshButton\"\r\n (click)=\"RefreshFromSavedParams()\" >\r\n Refresh\r\n <kendo-svgicon [icon]=\"kendoSVGIcon('arrowRotateCcwSmall')\"></kendo-svgicon>\r\n </button>\r\n </ng-template>\r\n\r\n <kendo-excelexport #excelExport [data]=\"exportData\" [fileName]=\"Params?.QueryID + '_Query.xlsx'\">\r\n <kendo-excelexport-column *ngFor=\"let exportCol of queryColumns()\" [field]=\"exportCol\" [title]=\"exportCol\">\r\n </kendo-excelexport-column>\r\n </kendo-excelexport>\r\n </kendo-grid>\r\n</div>\r\n ", styles: [".query-grid-wrap {\r\n height: calc(100vh-20px);\r\n}\r\n\r\n.query-grid-column-header {\r\n background-color: #ec8641;\r\n font-size: 20pt;\r\n font-weight: bold;\r\n}"] }]
|
|
253
|
+
}], () => [], { Params: [{
|
|
254
|
+
type: Input
|
|
255
|
+
}], BottomMargin: [{
|
|
256
|
+
type: Input
|
|
257
|
+
}], InEditMode: [{
|
|
258
|
+
type: Input
|
|
259
|
+
}], EditMode: [{
|
|
260
|
+
type: Input
|
|
261
|
+
}], AutoNavigate: [{
|
|
262
|
+
type: Input
|
|
263
|
+
}], rowClicked: [{
|
|
264
|
+
type: Output
|
|
265
|
+
}], kendoGridElement: [{
|
|
266
|
+
type: ViewChild,
|
|
267
|
+
args: ['kendoGrid', { read: GridComponent }]
|
|
268
|
+
}], kendoGridElementRef: [{
|
|
269
|
+
type: ViewChild,
|
|
270
|
+
args: ['kendoGrid', { read: ElementRef }]
|
|
271
|
+
}], kendoExcelExport: [{
|
|
272
|
+
type: ViewChild,
|
|
273
|
+
args: ['excelExport', { read: ExcelExportComponent }]
|
|
274
|
+
}], AllowLoad: [{
|
|
275
|
+
type: Input
|
|
276
|
+
}] }); })();
|
|
277
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(QueryGridComponent, { className: "QueryGridComponent", filePath: "src\\lib\\ng-query-grid.component.ts", lineNumber: 24 }); })();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ng-query-grid.component";
|
|
3
|
+
import * as i2 from "@angular/common";
|
|
4
|
+
import * as i3 from "@progress/kendo-angular-grid";
|
|
5
|
+
import * as i4 from "@progress/kendo-angular-dialog";
|
|
6
|
+
import * as i5 from "@progress/kendo-angular-excel-export";
|
|
7
|
+
import * as i6 from "@memberjunction/ng-compare-records";
|
|
8
|
+
import * as i7 from "@memberjunction/ng-container-directives";
|
|
9
|
+
import * as i8 from "@progress/kendo-angular-buttons";
|
|
10
|
+
import * as i9 from "@progress/kendo-angular-icons";
|
|
11
|
+
export declare class QueryGridModule {
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QueryGridModule, never>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<QueryGridModule, [typeof i1.QueryGridComponent], [typeof i2.CommonModule, typeof i3.GridModule, typeof i4.DialogsModule, typeof i5.ExcelExportModule, typeof i6.CompareRecordsModule, typeof i7.ContainerDirectivesModule, typeof i8.ButtonsModule, typeof i9.IconsModule], [typeof i1.QueryGridComponent]>;
|
|
14
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<QueryGridModule>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { QueryGridComponent } from './ng-query-grid.component';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
// Kendo UI Angular imports
|
|
5
|
+
import { GridModule } from '@progress/kendo-angular-grid';
|
|
6
|
+
import { ExcelExportModule } from '@progress/kendo-angular-excel-export';
|
|
7
|
+
import { DialogsModule } from "@progress/kendo-angular-dialog";
|
|
8
|
+
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
9
|
+
import { IconsModule } from '@progress/kendo-angular-icons';
|
|
10
|
+
import { CompareRecordsModule } from '@memberjunction/ng-compare-records';
|
|
11
|
+
import { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
export class QueryGridModule {
|
|
14
|
+
}
|
|
15
|
+
QueryGridModule.ɵfac = function QueryGridModule_Factory(t) { return new (t || QueryGridModule)(); };
|
|
16
|
+
QueryGridModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: QueryGridModule });
|
|
17
|
+
QueryGridModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
18
|
+
GridModule,
|
|
19
|
+
DialogsModule,
|
|
20
|
+
ExcelExportModule,
|
|
21
|
+
CompareRecordsModule,
|
|
22
|
+
ContainerDirectivesModule,
|
|
23
|
+
ButtonsModule,
|
|
24
|
+
IconsModule] });
|
|
25
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(QueryGridModule, [{
|
|
26
|
+
type: NgModule,
|
|
27
|
+
args: [{
|
|
28
|
+
declarations: [
|
|
29
|
+
QueryGridComponent
|
|
30
|
+
],
|
|
31
|
+
imports: [
|
|
32
|
+
CommonModule,
|
|
33
|
+
GridModule,
|
|
34
|
+
DialogsModule,
|
|
35
|
+
ExcelExportModule,
|
|
36
|
+
CompareRecordsModule,
|
|
37
|
+
ContainerDirectivesModule,
|
|
38
|
+
ButtonsModule,
|
|
39
|
+
IconsModule
|
|
40
|
+
],
|
|
41
|
+
exports: [
|
|
42
|
+
QueryGridComponent
|
|
43
|
+
]
|
|
44
|
+
}]
|
|
45
|
+
}], null, null); })();
|
|
46
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(QueryGridModule, { declarations: [QueryGridComponent], imports: [CommonModule,
|
|
47
|
+
GridModule,
|
|
48
|
+
DialogsModule,
|
|
49
|
+
ExcelExportModule,
|
|
50
|
+
CompareRecordsModule,
|
|
51
|
+
ContainerDirectivesModule,
|
|
52
|
+
ButtonsModule,
|
|
53
|
+
IconsModule], exports: [QueryGridComponent] }); })();
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@memberjunction/ng-query-grid",
|
|
3
|
+
"version": "0.9.8",
|
|
4
|
+
"description": "MemberJunction: Angular Grid to display any MemberJunction Query",
|
|
5
|
+
"main": "./dist/public-api.js",
|
|
6
|
+
"typings": "./dist/public-api.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"build": "ngc"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@angular/compiler": "^17.1.2",
|
|
19
|
+
"@angular/compiler-cli": "^17.1.2"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@angular/common": "^17.1.2",
|
|
23
|
+
"@angular/core": "^17.1.2",
|
|
24
|
+
"@angular/forms": "^17.1.2",
|
|
25
|
+
"@angular/router": "^17.1.2",
|
|
26
|
+
"@progress/kendo-angular-grid": "^15.0.1",
|
|
27
|
+
"@progress/kendo-angular-buttons": "^15.0.1",
|
|
28
|
+
"@progress/kendo-angular-dialog": "^15.0.1",
|
|
29
|
+
"@progress/kendo-svg-icons": "^15.0.1"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@memberjunction/core-entities": "^0.9.112",
|
|
33
|
+
"@memberjunction/global": "^0.9.123",
|
|
34
|
+
"@memberjunction/core": "^0.9.134",
|
|
35
|
+
"@memberjunction/ng-container-directives": "^0.9.103",
|
|
36
|
+
"tslib": "^2.3.0"
|
|
37
|
+
},
|
|
38
|
+
"sideEffects": false
|
|
39
|
+
}
|