@memberjunction/ng-explorer-core 0.9.2
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/ask-skip/ask-skip.component.d.ts +83 -0
- package/dist/lib/ask-skip/ask-skip.component.js +591 -0
- package/dist/lib/ask-skip/skip-dynamic-report-wrapper.d.ts +12 -0
- package/dist/lib/ask-skip/skip-dynamic-report-wrapper.js +49 -0
- package/dist/lib/auth-button/auth-button.component.d.ts +12 -0
- package/dist/lib/auth-button/auth-button.component.js +43 -0
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts +14 -0
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +55 -0
- package/dist/lib/data-browser-component/data-browser.component.d.ts +14 -0
- package/dist/lib/data-browser-component/data-browser.component.js +91 -0
- package/dist/lib/favorites/favorites.component.d.ts +13 -0
- package/dist/lib/favorites/favorites.component.js +100 -0
- package/dist/lib/generic/base-form-component.d.ts +76 -0
- package/dist/lib/generic/base-form-component.js +436 -0
- package/dist/lib/generic/base-form-section-component.d.ts +6 -0
- package/dist/lib/generic/base-form-section-component.js +10 -0
- package/dist/lib/generic/base-record-component.d.ts +6 -0
- package/dist/lib/generic/base-record-component.js +13 -0
- package/dist/lib/generic/base-resource-component.d.ts +34 -0
- package/dist/lib/generic/base-resource-component.js +75 -0
- package/dist/lib/generic/dynamic-chart.d.ts +26 -0
- package/dist/lib/generic/dynamic-chart.js +180 -0
- package/dist/lib/generic/dynamic-grid.d.ts +24 -0
- package/dist/lib/generic/dynamic-grid.js +135 -0
- package/dist/lib/generic/dynamic-report.d.ts +38 -0
- package/dist/lib/generic/dynamic-report.js +399 -0
- package/dist/lib/generic/form-toolbar.d.ts +7 -0
- package/dist/lib/generic/form-toolbar.js +98 -0
- package/dist/lib/generic/resource-container-component.d.ts +25 -0
- package/dist/lib/generic/resource-container-component.js +103 -0
- package/dist/lib/generic/section-loader-component.d.ts +17 -0
- package/dist/lib/generic/section-loader-component.js +65 -0
- package/dist/lib/generic-browse-list/generic-browse-list.component.d.ts +16 -0
- package/dist/lib/generic-browse-list/generic-browse-list.component.js +91 -0
- package/dist/lib/guards/auth-guard.service.d.ts +11 -0
- package/dist/lib/guards/auth-guard.service.js +24 -0
- package/dist/lib/guards/entities.guard.d.ts +3 -0
- package/dist/lib/guards/entities.guard.js +38 -0
- package/dist/lib/header/MSFT_UserImageService.d.ts +11 -0
- package/dist/lib/header/MSFT_UserImageService.js +23 -0
- package/dist/lib/header/header.component.d.ts +51 -0
- package/dist/lib/header/header.component.js +208 -0
- package/dist/lib/home-component/home.component.d.ts +9 -0
- package/dist/lib/home-component/home.component.js +54 -0
- package/dist/lib/join-grid/join-grid.component.d.ts +30 -0
- package/dist/lib/join-grid/join-grid.component.js +225 -0
- package/dist/lib/navigation/navigation.component.d.ts +102 -0
- package/dist/lib/navigation/navigation.component.js +970 -0
- package/dist/lib/report-browser-component/report-browser.component.d.ts +14 -0
- package/dist/lib/report-browser-component/report-browser.component.js +55 -0
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +8 -0
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +49 -0
- package/dist/lib/resource-wrappers/record-resource.component.d.ts +8 -0
- package/dist/lib/resource-wrappers/record-resource.component.js +55 -0
- package/dist/lib/resource-wrappers/report-resource.component.d.ts +10 -0
- package/dist/lib/resource-wrappers/report-resource.component.js +53 -0
- package/dist/lib/resource-wrappers/resource-wrappers-loader.d.ts +1 -0
- package/dist/lib/resource-wrappers/resource-wrappers-loader.js +12 -0
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts +10 -0
- package/dist/lib/resource-wrappers/search-results-resource.component.js +50 -0
- package/dist/lib/resource-wrappers/view-resource.component.d.ts +8 -0
- package/dist/lib/resource-wrappers/view-resource.component.js +51 -0
- package/dist/lib/settings/settings.component.d.ts +5 -0
- package/dist/lib/settings/settings.component.js +14 -0
- package/dist/lib/shared/shared.service.d.ts +87 -0
- package/dist/lib/shared/shared.service.js +302 -0
- package/dist/lib/shared/urlPipe.d.ts +7 -0
- package/dist/lib/shared/urlPipe.js +16 -0
- package/dist/lib/single-application/single-application.component.d.ts +21 -0
- package/dist/lib/single-application/single-application.component.js +132 -0
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts +28 -0
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +212 -0
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +26 -0
- package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +169 -0
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts +55 -0
- package/dist/lib/single-dashboard/single-dashboard.component.js +266 -0
- package/dist/lib/single-entity/single-entity.component.d.ts +33 -0
- package/dist/lib/single-entity/single-entity.component.js +252 -0
- package/dist/lib/single-record/single-record.component.d.ts +20 -0
- package/dist/lib/single-record/single-record.component.js +95 -0
- package/dist/lib/single-report/single-report.component.d.ts +22 -0
- package/dist/lib/single-report/single-report.component.js +87 -0
- package/dist/lib/single-search-result/single-search-result.component.d.ts +15 -0
- package/dist/lib/single-search-result/single-search-result.component.js +60 -0
- package/dist/lib/single-view/single-view.component.d.ts +34 -0
- package/dist/lib/single-view/single-view.component.js +154 -0
- package/dist/lib/user-notifications/user-notifications.component.d.ts +32 -0
- package/dist/lib/user-notifications/user-notifications.component.js +282 -0
- package/dist/lib/user-profile/user-profile.component.d.ts +10 -0
- package/dist/lib/user-profile/user-profile.component.js +41 -0
- package/dist/lib/user-view-properties/view-properties-dialog.component.d.ts +70 -0
- package/dist/lib/user-view-properties/view-properties-dialog.component.js +568 -0
- package/dist/module.d.ts +64 -0
- package/dist/module.js +332 -0
- package/dist/public-api.d.ts +47 -0
- package/dist/public-api.js +50 -0
- package/package.json +39 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { LogError } from '@memberjunction/core';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@progress/kendo-angular-charts";
|
|
6
|
+
import * as i3 from "@memberjunction/ng-container-directives";
|
|
7
|
+
function DynamicChartComponent_kendo_chart_category_axis_item_3_Template(rf, ctx) { if (rf & 1) {
|
|
8
|
+
i0.ɵɵelement(0, "kendo-chart-category-axis-item", 4);
|
|
9
|
+
} if (rf & 2) {
|
|
10
|
+
const axis_r2 = ctx.$implicit;
|
|
11
|
+
i0.ɵɵproperty("categories", axis_r2.categories);
|
|
12
|
+
} }
|
|
13
|
+
function DynamicChartComponent_kendo_chart_series_item_5_Template(rf, ctx) { if (rf & 1) {
|
|
14
|
+
i0.ɵɵelement(0, "kendo-chart-series-item", 5);
|
|
15
|
+
} if (rf & 2) {
|
|
16
|
+
const item_r3 = ctx.$implicit;
|
|
17
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
18
|
+
i0.ɵɵproperty("type", ctx_r1.kendoSeriesType)("data", item_r3.data)("name", item_r3.name)("color", ctx_r1.getSeriesColor(item_r3));
|
|
19
|
+
} }
|
|
20
|
+
export class DynamicChartComponent {
|
|
21
|
+
constructor() {
|
|
22
|
+
this._data = [];
|
|
23
|
+
this.chartTitle = 'Chart Title';
|
|
24
|
+
this.chartType = 'column';
|
|
25
|
+
this.xAxis = null;
|
|
26
|
+
this.yAxis = null;
|
|
27
|
+
this.columns = [];
|
|
28
|
+
this._axes = [];
|
|
29
|
+
this._series = [];
|
|
30
|
+
this.colors = [
|
|
31
|
+
'#e6194b', '#3cb44b', '#ffe119', '#4363d8', '#f58231', '#911eb4', '#46f0f0', '#f032e6', '#bcf60c', '#fabebe',
|
|
32
|
+
'#008080', '#e6beff', '#9a6324', '#fffac8', '#800000', '#aaffc3', '#808000', '#ffd8b1', '#000075', '#808080',
|
|
33
|
+
'#000000', '#7cb9e8', '#c9ffe5', '#b284be', '#5d8aa8', '#00308f', '#72a0c1', '#e32636', '#c46210', '#efdecd'
|
|
34
|
+
// ... add more colors if needed
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
get data() {
|
|
38
|
+
return this._data;
|
|
39
|
+
}
|
|
40
|
+
set data(value) {
|
|
41
|
+
// reset the series and axes when the data changes
|
|
42
|
+
this._series = [];
|
|
43
|
+
this._axes = [];
|
|
44
|
+
this._data = value;
|
|
45
|
+
}
|
|
46
|
+
get SkipData() {
|
|
47
|
+
return this._skipData ? this._skipData : undefined;
|
|
48
|
+
}
|
|
49
|
+
set SkipData(d) {
|
|
50
|
+
this._skipData = d;
|
|
51
|
+
if (d) {
|
|
52
|
+
this.data = d.SQLResults.results;
|
|
53
|
+
this.columns = d.SQLResults.columns;
|
|
54
|
+
this.xAxis = d.ChartOptions.xAxis;
|
|
55
|
+
this.yAxis = d.ChartOptions.yAxis;
|
|
56
|
+
this.chartType = d.DisplayType;
|
|
57
|
+
this.chartTitle = d.ReportTitle;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
get kendoSeriesType() {
|
|
61
|
+
return this.chartType;
|
|
62
|
+
}
|
|
63
|
+
get chartCategoryAxes() {
|
|
64
|
+
if (this._axes.length === 0) {
|
|
65
|
+
const result = [];
|
|
66
|
+
if (this.xAxis) {
|
|
67
|
+
const xArray = this.convertAxisToArray(this.xAxis);
|
|
68
|
+
for (let i = 0; i < xArray.length; i++) {
|
|
69
|
+
const xItem = xArray[i];
|
|
70
|
+
if (xItem !== null && xItem !== undefined && xItem.length > 0)
|
|
71
|
+
result.push({ categories: this.data.map(x => x[xItem]) });
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
this._axes = result;
|
|
75
|
+
return result;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
return this._axes;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
convertAxisToArray(axis) {
|
|
82
|
+
if (Array.isArray(axis)) {
|
|
83
|
+
return axis;
|
|
84
|
+
}
|
|
85
|
+
else if (axis !== null && axis !== undefined && axis.length > 0) {
|
|
86
|
+
if (!axis.includes(',')) {
|
|
87
|
+
return [axis];
|
|
88
|
+
}
|
|
89
|
+
else
|
|
90
|
+
return axis.split(',');
|
|
91
|
+
}
|
|
92
|
+
else
|
|
93
|
+
return [];
|
|
94
|
+
}
|
|
95
|
+
get chartSeries() {
|
|
96
|
+
var _a;
|
|
97
|
+
if (this._series.length === 0) {
|
|
98
|
+
const result = [];
|
|
99
|
+
if (this.yAxis) {
|
|
100
|
+
const yArray = this.convertAxisToArray(this.yAxis);
|
|
101
|
+
for (let i = 0; i < yArray.length; i++) {
|
|
102
|
+
const yItem = yArray[i];
|
|
103
|
+
if (yItem !== null && yItem !== undefined && yItem.length > 0) {
|
|
104
|
+
const colDisplayName = ((_a = this.columns.find(col => col.FieldName === yItem)) === null || _a === void 0 ? void 0 : _a.DisplayName) || yItem;
|
|
105
|
+
result.push({ data: this.data.map(x => x[yItem]), name: colDisplayName });
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
this._series = result;
|
|
110
|
+
return result;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
return this._series;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
getSeriesColor(item) {
|
|
117
|
+
try {
|
|
118
|
+
// HILTON - this is where you use the newly provided SKIP data to determine the color of the series
|
|
119
|
+
const index = this.chartSeries.indexOf(item);
|
|
120
|
+
return this.colors[index % this.colors.length];
|
|
121
|
+
}
|
|
122
|
+
catch (ex) {
|
|
123
|
+
LogError(ex);
|
|
124
|
+
return '#000000';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
DynamicChartComponent.ɵfac = function DynamicChartComponent_Factory(t) { return new (t || DynamicChartComponent)(); };
|
|
129
|
+
DynamicChartComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DynamicChartComponent, selectors: [["app-dynamic-chart"]], inputs: { data: "data", chartTitle: "chartTitle", chartType: "chartType", xAxis: "xAxis", yAxis: "yAxis", columns: "columns", SkipData: "SkipData" }, decls: 6, vars: 3, consts: [["mjFillContainer", ""], [3, "text"], [3, "categories", 4, "ngFor", "ngForOf"], [3, "type", "data", "name", "color", 4, "ngFor", "ngForOf"], [3, "categories"], [3, "type", "data", "name", "color"]], template: function DynamicChartComponent_Template(rf, ctx) { if (rf & 1) {
|
|
130
|
+
i0.ɵɵelementStart(0, "kendo-chart", 0);
|
|
131
|
+
i0.ɵɵelement(1, "kendo-chart-title", 1);
|
|
132
|
+
i0.ɵɵelementStart(2, "kendo-chart-category-axis");
|
|
133
|
+
i0.ɵɵtemplate(3, DynamicChartComponent_kendo_chart_category_axis_item_3_Template, 1, 1, "kendo-chart-category-axis-item", 2);
|
|
134
|
+
i0.ɵɵelementEnd();
|
|
135
|
+
i0.ɵɵelementStart(4, "kendo-chart-series");
|
|
136
|
+
i0.ɵɵtemplate(5, DynamicChartComponent_kendo_chart_series_item_5_Template, 1, 4, "kendo-chart-series-item", 3);
|
|
137
|
+
i0.ɵɵelementEnd()();
|
|
138
|
+
} if (rf & 2) {
|
|
139
|
+
i0.ɵɵadvance(1);
|
|
140
|
+
i0.ɵɵproperty("text", ctx.chartTitle);
|
|
141
|
+
i0.ɵɵadvance(2);
|
|
142
|
+
i0.ɵɵproperty("ngForOf", ctx.chartCategoryAxes);
|
|
143
|
+
i0.ɵɵadvance(2);
|
|
144
|
+
i0.ɵɵproperty("ngForOf", ctx.chartSeries);
|
|
145
|
+
} }, dependencies: [i1.NgForOf, i2.ChartComponent, i2.CategoryAxisComponent, i2.CategoryAxisItemComponent, i2.SeriesComponent, i2.SeriesItemComponent, i2.TitleComponent, i3.FillContainer], encapsulation: 2 });
|
|
146
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DynamicChartComponent, [{
|
|
147
|
+
type: Component,
|
|
148
|
+
args: [{
|
|
149
|
+
selector: 'app-dynamic-chart',
|
|
150
|
+
template: `
|
|
151
|
+
<kendo-chart mjFillContainer>
|
|
152
|
+
<kendo-chart-title [text]="chartTitle"></kendo-chart-title>
|
|
153
|
+
<kendo-chart-category-axis>
|
|
154
|
+
<kendo-chart-category-axis-item *ngFor="let axis of chartCategoryAxes" [categories]="axis.categories"></kendo-chart-category-axis-item>
|
|
155
|
+
</kendo-chart-category-axis>
|
|
156
|
+
<kendo-chart-series>
|
|
157
|
+
<kendo-chart-series-item *ngFor="let item of chartSeries"
|
|
158
|
+
[type]="kendoSeriesType"
|
|
159
|
+
[data]="item.data"
|
|
160
|
+
[name]="item.name"
|
|
161
|
+
[color]="getSeriesColor(item)"></kendo-chart-series-item>
|
|
162
|
+
</kendo-chart-series>
|
|
163
|
+
</kendo-chart>
|
|
164
|
+
`
|
|
165
|
+
}]
|
|
166
|
+
}], null, { data: [{
|
|
167
|
+
type: Input
|
|
168
|
+
}], chartTitle: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], chartType: [{
|
|
171
|
+
type: Input
|
|
172
|
+
}], xAxis: [{
|
|
173
|
+
type: Input
|
|
174
|
+
}], yAxis: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}], columns: [{
|
|
177
|
+
type: Input
|
|
178
|
+
}], SkipData: [{
|
|
179
|
+
type: Input
|
|
180
|
+
}] }); })();
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AfterViewInit } from '@angular/core';
|
|
2
|
+
import { SkipColumnInfo, SkipData } from '../ask-skip/ask-skip.component';
|
|
3
|
+
import { DecimalPipe, DatePipe } from '@angular/common';
|
|
4
|
+
import { GridDataResult, PageChangeEvent } from '@progress/kendo-angular-grid';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class DynamicGridComponent implements AfterViewInit {
|
|
7
|
+
private decimalPipe;
|
|
8
|
+
private datePipe;
|
|
9
|
+
data: any[];
|
|
10
|
+
columns: SkipColumnInfo[];
|
|
11
|
+
pageSize: number;
|
|
12
|
+
startingRow: number;
|
|
13
|
+
private _skipData;
|
|
14
|
+
get SkipData(): SkipData | undefined;
|
|
15
|
+
set SkipData(d: SkipData | undefined);
|
|
16
|
+
gridView: GridDataResult;
|
|
17
|
+
constructor(decimalPipe: DecimalPipe, datePipe: DatePipe);
|
|
18
|
+
formatData(dataType: string, data: any): any;
|
|
19
|
+
ngAfterViewInit(): void;
|
|
20
|
+
pageChange(event: PageChangeEvent): void;
|
|
21
|
+
private loadGridView;
|
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicGridComponent, never>;
|
|
23
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicGridComponent, "app-dynamic-grid", never, { "data": "data"; "columns": "columns"; "pageSize": "pageSize"; "startingRow": "startingRow"; "SkipData": "SkipData"; }, {}, never, never, false, never>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { DecimalPipe, DatePipe } from '@angular/common';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "@progress/kendo-angular-grid";
|
|
6
|
+
function DynamicGridComponent_ng_container_1_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
7
|
+
i0.ɵɵtext(0);
|
|
8
|
+
} if (rf & 2) {
|
|
9
|
+
const dataItem_r3 = ctx.$implicit;
|
|
10
|
+
const col_r1 = i0.ɵɵnextContext().$implicit;
|
|
11
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
12
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.formatData(col_r1.DataType, dataItem_r3[col_r1.FieldName]), " ");
|
|
13
|
+
} }
|
|
14
|
+
const _c0 = function () { return { "font-weight": "bold", "background-color": "#cyan" }; };
|
|
15
|
+
function DynamicGridComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
16
|
+
i0.ɵɵelementContainerStart(0);
|
|
17
|
+
i0.ɵɵelementStart(1, "kendo-grid-column", 2);
|
|
18
|
+
i0.ɵɵtemplate(2, DynamicGridComponent_ng_container_1_ng_template_2_Template, 1, 1, "ng-template", 3);
|
|
19
|
+
i0.ɵɵelementEnd();
|
|
20
|
+
i0.ɵɵelementContainerEnd();
|
|
21
|
+
} if (rf & 2) {
|
|
22
|
+
const col_r1 = ctx.$implicit;
|
|
23
|
+
i0.ɵɵadvance(1);
|
|
24
|
+
i0.ɵɵpropertyInterpolate("field", col_r1.FieldName);
|
|
25
|
+
i0.ɵɵpropertyInterpolate("title", col_r1.DisplayName);
|
|
26
|
+
i0.ɵɵproperty("headerStyle", i0.ɵɵpureFunction0(3, _c0));
|
|
27
|
+
} }
|
|
28
|
+
export class DynamicGridComponent {
|
|
29
|
+
get SkipData() {
|
|
30
|
+
return this._skipData ? this._skipData : undefined;
|
|
31
|
+
}
|
|
32
|
+
set SkipData(d) {
|
|
33
|
+
this._skipData = d;
|
|
34
|
+
if (d) {
|
|
35
|
+
this.data = d.SQLResults.results;
|
|
36
|
+
this.columns = d.SQLResults.columns;
|
|
37
|
+
this.loadGridView();
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
constructor(decimalPipe, datePipe) {
|
|
41
|
+
this.decimalPipe = decimalPipe;
|
|
42
|
+
this.datePipe = datePipe;
|
|
43
|
+
this.data = [];
|
|
44
|
+
this.columns = [];
|
|
45
|
+
this.pageSize = 30;
|
|
46
|
+
this.startingRow = 0;
|
|
47
|
+
}
|
|
48
|
+
formatData(dataType, data) {
|
|
49
|
+
switch (dataType) {
|
|
50
|
+
case 'bigint':
|
|
51
|
+
case 'smallint':
|
|
52
|
+
case 'int':
|
|
53
|
+
case 'tinyint':
|
|
54
|
+
return data; // No specific formatting for integer types
|
|
55
|
+
case 'decimal':
|
|
56
|
+
case 'numeric':
|
|
57
|
+
case 'smallmoney':
|
|
58
|
+
case 'money':
|
|
59
|
+
return this.decimalPipe.transform(data, '1.2-2'); // Format as decimal with 2 digits after the decimal point
|
|
60
|
+
case 'date':
|
|
61
|
+
case 'datetime':
|
|
62
|
+
case 'datetime2':
|
|
63
|
+
case 'smalldatetime':
|
|
64
|
+
return this.datePipe.transform(data, 'short'); // Format as short date
|
|
65
|
+
// Add more cases as needed for other SQL Server datatypes
|
|
66
|
+
default:
|
|
67
|
+
return data; // For data types not handled, return data as is
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
ngAfterViewInit() {
|
|
71
|
+
if (this.data) {
|
|
72
|
+
this.loadGridView();
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
pageChange(event) {
|
|
76
|
+
this.startingRow = event.skip;
|
|
77
|
+
this.loadGridView();
|
|
78
|
+
}
|
|
79
|
+
loadGridView() {
|
|
80
|
+
this.gridView = {
|
|
81
|
+
data: this.data.slice(this.startingRow, this.startingRow + this.pageSize),
|
|
82
|
+
total: this.data.length,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
DynamicGridComponent.ɵfac = function DynamicGridComponent_Factory(t) { return new (t || DynamicGridComponent)(i0.ɵɵdirectiveInject(i1.DecimalPipe), i0.ɵɵdirectiveInject(i1.DatePipe)); };
|
|
87
|
+
DynamicGridComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DynamicGridComponent, selectors: [["app-dynamic-grid"]], inputs: { data: "data", columns: "columns", pageSize: "pageSize", startingRow: "startingRow", SkipData: "SkipData" }, features: [i0.ɵɵProvidersFeature([DecimalPipe, DatePipe])], decls: 2, vars: 8, consts: [["scrollable", "virtual", 3, "data", "skip", "pageSize", "rowHeight", "reorderable", "resizable", "navigable", "pageChange"], [4, "ngFor", "ngForOf"], [3, "field", "title", "headerStyle"], ["kendoGridCellTemplate", ""]], template: function DynamicGridComponent_Template(rf, ctx) { if (rf & 1) {
|
|
88
|
+
i0.ɵɵelementStart(0, "kendo-grid", 0);
|
|
89
|
+
i0.ɵɵlistener("pageChange", function DynamicGridComponent_Template_kendo_grid_pageChange_0_listener($event) { return ctx.pageChange($event); });
|
|
90
|
+
i0.ɵɵtemplate(1, DynamicGridComponent_ng_container_1_Template, 3, 4, "ng-container", 1);
|
|
91
|
+
i0.ɵɵelementEnd();
|
|
92
|
+
} if (rf & 2) {
|
|
93
|
+
i0.ɵɵproperty("data", ctx.gridView)("skip", ctx.startingRow)("pageSize", ctx.pageSize)("rowHeight", 36)("reorderable", true)("resizable", true)("navigable", true);
|
|
94
|
+
i0.ɵɵadvance(1);
|
|
95
|
+
i0.ɵɵproperty("ngForOf", ctx.columns);
|
|
96
|
+
} }, dependencies: [i1.NgForOf, i2.GridComponent, i2.ColumnComponent, i2.CellTemplateDirective], encapsulation: 2 });
|
|
97
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DynamicGridComponent, [{
|
|
98
|
+
type: Component,
|
|
99
|
+
args: [{
|
|
100
|
+
selector: 'app-dynamic-grid',
|
|
101
|
+
template: `
|
|
102
|
+
<kendo-grid [data]="gridView"
|
|
103
|
+
[skip]="startingRow"
|
|
104
|
+
[pageSize]="pageSize"
|
|
105
|
+
scrollable="virtual"
|
|
106
|
+
[rowHeight]="36"
|
|
107
|
+
[reorderable]="true"
|
|
108
|
+
[resizable]="true"
|
|
109
|
+
(pageChange)="pageChange($event)"
|
|
110
|
+
[navigable]="true">
|
|
111
|
+
<ng-container *ngFor="let col of columns">
|
|
112
|
+
<kendo-grid-column
|
|
113
|
+
field="{{col.FieldName}}"
|
|
114
|
+
title="{{col.DisplayName}}"
|
|
115
|
+
[headerStyle]="{ 'font-weight' : 'bold', 'background-color': '#cyan' }">
|
|
116
|
+
<ng-template kendoGridCellTemplate let-dataItem>
|
|
117
|
+
{{ formatData(col.DataType, dataItem[col.FieldName]) }}
|
|
118
|
+
</ng-template>
|
|
119
|
+
</kendo-grid-column>
|
|
120
|
+
</ng-container>
|
|
121
|
+
</kendo-grid>
|
|
122
|
+
`,
|
|
123
|
+
providers: [DecimalPipe, DatePipe]
|
|
124
|
+
}]
|
|
125
|
+
}], function () { return [{ type: i1.DecimalPipe }, { type: i1.DatePipe }]; }, { data: [{
|
|
126
|
+
type: Input
|
|
127
|
+
}], columns: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], pageSize: [{
|
|
130
|
+
type: Input
|
|
131
|
+
}], startingRow: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], SkipData: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}] }); })();
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { SkipColumnInfo, SkipData } from '../ask-skip/ask-skip.component';
|
|
3
|
+
import { SharedService } from '../shared/shared.service';
|
|
4
|
+
import { DynamicGridComponent } from './dynamic-grid';
|
|
5
|
+
import { DynamicChartComponent } from './dynamic-chart';
|
|
6
|
+
import { SelectEvent, TabStripComponent } from '@progress/kendo-angular-layout';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class DynamicReportComponent {
|
|
9
|
+
private sharedService;
|
|
10
|
+
private router;
|
|
11
|
+
ShowDetailsTab: boolean;
|
|
12
|
+
ShowCreateReportButton: boolean;
|
|
13
|
+
ConversationID: number | null;
|
|
14
|
+
ConversationName: string | null;
|
|
15
|
+
ConversationDetailID: number | null;
|
|
16
|
+
private _skipData;
|
|
17
|
+
get SkipData(): SkipData | undefined;
|
|
18
|
+
set SkipData(d: SkipData | undefined);
|
|
19
|
+
theGrid: DynamicGridComponent;
|
|
20
|
+
theChart: DynamicChartComponent;
|
|
21
|
+
tabStrip: TabStripComponent;
|
|
22
|
+
constructor(sharedService: SharedService, router: Router);
|
|
23
|
+
matchingReportID: number | null;
|
|
24
|
+
matchingReportName: string | null;
|
|
25
|
+
private _loaded;
|
|
26
|
+
ngAfterViewInit(): Promise<void>;
|
|
27
|
+
clickMatchingReport(): void;
|
|
28
|
+
activeTabIndex: number;
|
|
29
|
+
onTabSelect(e: SelectEvent): void;
|
|
30
|
+
isTabSelected(index: number): boolean;
|
|
31
|
+
get Columns(): SkipColumnInfo[];
|
|
32
|
+
get IsChart(): boolean;
|
|
33
|
+
get IsTable(): boolean;
|
|
34
|
+
createAnalysisHtml(): string;
|
|
35
|
+
doCreateReport(): Promise<void>;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicReportComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicReportComponent, "app-dynamic-report", never, { "ShowDetailsTab": "ShowDetailsTab"; "ShowCreateReportButton": "ShowCreateReportButton"; "ConversationID": "ConversationID"; "ConversationName": "ConversationName"; "ConversationDetailID": "ConversationDetailID"; "SkipData": "SkipData"; }, {}, never, never, false, never>;
|
|
38
|
+
}
|