@memberjunction/ng-skip-chat 2.13.4 → 2.15.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/drill-down-info.d.ts +14 -0
- package/dist/lib/drill-down-info.d.ts.map +1 -0
- package/dist/lib/drill-down-info.js +19 -0
- package/dist/lib/drill-down-info.js.map +1 -0
- package/dist/lib/dynamic-report/base-report.d.ts +73 -0
- package/dist/lib/dynamic-report/base-report.d.ts.map +1 -0
- package/dist/lib/dynamic-report/base-report.js +257 -0
- package/dist/lib/dynamic-report/base-report.js.map +1 -0
- package/dist/lib/dynamic-report/dynamic-chart.d.ts +32 -0
- package/dist/lib/dynamic-report/dynamic-chart.d.ts.map +1 -0
- package/dist/lib/dynamic-report/dynamic-chart.js +202 -0
- package/dist/lib/dynamic-report/dynamic-chart.js.map +1 -0
- package/dist/lib/dynamic-report/dynamic-grid.d.ts +36 -0
- package/dist/lib/dynamic-report/dynamic-grid.d.ts.map +1 -0
- package/dist/lib/dynamic-report/dynamic-grid.js +397 -0
- package/dist/lib/dynamic-report/dynamic-grid.js.map +1 -0
- package/dist/lib/dynamic-report/linear-report.d.ts +18 -0
- package/dist/lib/dynamic-report/linear-report.d.ts.map +1 -0
- package/dist/lib/dynamic-report/linear-report.js +179 -0
- package/dist/lib/dynamic-report/linear-report.js.map +1 -0
- package/dist/lib/dynamic-report/skip-dynamic-report-wrapper.d.ts +22 -0
- package/dist/lib/dynamic-report/skip-dynamic-report-wrapper.d.ts.map +1 -0
- package/dist/lib/dynamic-report/skip-dynamic-report-wrapper.js +64 -0
- package/dist/lib/dynamic-report/skip-dynamic-report-wrapper.js.map +1 -0
- package/dist/lib/module.d.ts +26 -9
- package/dist/lib/module.d.ts.map +1 -1
- package/dist/lib/module.js +110 -22
- package/dist/lib/module.js.map +1 -1
- package/dist/lib/skip-chat/skip-chat.component.d.ts +155 -0
- package/dist/lib/skip-chat/skip-chat.component.d.ts.map +1 -0
- package/dist/lib/skip-chat/skip-chat.component.js +1404 -0
- package/dist/lib/skip-chat/skip-chat.component.js.map +1 -0
- package/dist/lib/skip-single-message/skip-single-message.component.d.ts +64 -0
- package/dist/lib/skip-single-message/skip-single-message.component.d.ts.map +1 -0
- package/dist/lib/skip-single-message/skip-single-message.component.js +318 -0
- package/dist/lib/skip-single-message/skip-single-message.component.js.map +1 -0
- package/dist/public-api.d.ts +7 -4
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +7 -4
- package/dist/public-api.js.map +1 -1
- package/package.json +23 -4
- package/dist/lib/tab/tab.component.d.ts +0 -55
- package/dist/lib/tab/tab.component.d.ts.map +0 -1
- package/dist/lib/tab/tab.component.js +0 -138
- package/dist/lib/tab/tab.component.js.map +0 -1
- package/dist/lib/tab-body/tab-body.component.d.ts +0 -13
- package/dist/lib/tab-body/tab-body.component.d.ts.map +0 -1
- package/dist/lib/tab-body/tab-body.component.js +0 -38
- package/dist/lib/tab-body/tab-body.component.js.map +0 -1
- package/dist/lib/tab-strip/tab-strip.component.d.ts +0 -117
- package/dist/lib/tab-strip/tab-strip.component.d.ts.map +0 -1
- package/dist/lib/tab-strip/tab-strip.component.js +0 -404
- package/dist/lib/tab-strip/tab-strip.component.js.map +0 -1
- package/dist/lib/tab.base.d.ts +0 -4
- package/dist/lib/tab.base.d.ts.map +0 -1
- package/dist/lib/tab.base.js +0 -3
- package/dist/lib/tab.base.js.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Info class that has the entity name and filter to be used in the drill down
|
|
3
|
+
*/
|
|
4
|
+
export declare class DrillDownInfo {
|
|
5
|
+
EntityName: string;
|
|
6
|
+
Filter: string;
|
|
7
|
+
BaseFilter: string;
|
|
8
|
+
get UserViewGridParams(): {
|
|
9
|
+
EntityName: string;
|
|
10
|
+
ExtraFilter: string;
|
|
11
|
+
};
|
|
12
|
+
constructor(entityName: string, filter: string);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=drill-down-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drill-down-info.d.ts","sourceRoot":"","sources":["../../src/lib/drill-down-info.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,aAAa;IACf,UAAU,EAAG,MAAM,CAAC;IACpB,MAAM,EAAG,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAM;IAC/B,IAAW,kBAAkB;;;MAM5B;gBAEW,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAIjD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Info class that has the entity name and filter to be used in the drill down
|
|
3
|
+
*/
|
|
4
|
+
export class DrillDownInfo {
|
|
5
|
+
get UserViewGridParams() {
|
|
6
|
+
var _a;
|
|
7
|
+
const fullFilter = ((_a = this.BaseFilter) === null || _a === void 0 ? void 0 : _a.length) > 0 ? `(${this.Filter}) AND (${this.BaseFilter})` : this.Filter;
|
|
8
|
+
return {
|
|
9
|
+
EntityName: this.EntityName,
|
|
10
|
+
ExtraFilter: fullFilter
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
constructor(entityName, filter) {
|
|
14
|
+
this.BaseFilter = '';
|
|
15
|
+
this.EntityName = entityName;
|
|
16
|
+
this.Filter = filter;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=drill-down-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drill-down-info.js","sourceRoot":"","sources":["../../src/lib/drill-down-info.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,aAAa;IAItB,IAAW,kBAAkB;;QAC3B,MAAM,UAAU,GAAG,CAAA,MAAA,IAAI,CAAC,UAAU,0CAAE,MAAM,IAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,UAAU,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;QAC3G,OAAO;YACL,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,WAAW,EAAE,UAAU;SACxB,CAAA;IACH,CAAC;IAED,YAAY,UAAkB,EAAE,MAAc;QATvC,eAAU,GAAW,EAAE,CAAC;QAU7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACJ"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AfterViewInit, ChangeDetectorRef, EventEmitter } from "@angular/core";
|
|
2
|
+
import { IMetadataProvider } from "@memberjunction/core";
|
|
3
|
+
import { ReportEntity } from "@memberjunction/core-entities";
|
|
4
|
+
import { DataContext } from "@memberjunction/data-context";
|
|
5
|
+
import { SkipAPIAnalysisCompleteResponse, SkipColumnInfo } from "@memberjunction/skip-types";
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class SkipDynamicReportBase implements AfterViewInit {
|
|
8
|
+
protected cdRef: ChangeDetectorRef;
|
|
9
|
+
SkipData: SkipAPIAnalysisCompleteResponse | undefined;
|
|
10
|
+
ShowCreateReportButton: boolean;
|
|
11
|
+
ConversationID: string | null;
|
|
12
|
+
ConversationName: string | null;
|
|
13
|
+
ConversationDetailID: string | null;
|
|
14
|
+
DataContext: DataContext;
|
|
15
|
+
ReportEntity?: ReportEntity;
|
|
16
|
+
/**
|
|
17
|
+
* Optional, specify a provider if you want to use a different provider than the default one
|
|
18
|
+
*/
|
|
19
|
+
Provider: IMetadataProvider | null;
|
|
20
|
+
UserNotification: EventEmitter<{
|
|
21
|
+
message: string;
|
|
22
|
+
style: "none" | "success" | "error" | "warning" | "info";
|
|
23
|
+
hideAfter?: number | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
/**
|
|
26
|
+
* This event fires whenever the component has a click on a matching report link.
|
|
27
|
+
* The provided parameter is the ID of the matching report.
|
|
28
|
+
*/
|
|
29
|
+
NavigateToMatchingReport: EventEmitter<string>;
|
|
30
|
+
constructor(cdRef: ChangeDetectorRef);
|
|
31
|
+
ngAfterViewInit(): void;
|
|
32
|
+
/**
|
|
33
|
+
* This property returns the provider to use, which will either be the one specified in the input or the default one, if nothing was specified.
|
|
34
|
+
*/
|
|
35
|
+
get ProviderToUse(): IMetadataProvider;
|
|
36
|
+
matchingReportID: string | null;
|
|
37
|
+
matchingReportName: string | null;
|
|
38
|
+
private static _reportCache;
|
|
39
|
+
private _loaded;
|
|
40
|
+
RefreshMatchingReport(): Promise<void>;
|
|
41
|
+
get Columns(): SkipColumnInfo[];
|
|
42
|
+
get IsChart(): boolean;
|
|
43
|
+
get IsTable(): boolean;
|
|
44
|
+
get IsHTML(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* This method is used to create the HTML for the analysis section of the report
|
|
47
|
+
* @returns
|
|
48
|
+
*/
|
|
49
|
+
CreateAnalysisHtml(): string;
|
|
50
|
+
/**
|
|
51
|
+
* Returns true if the component is in the process of creating a report
|
|
52
|
+
*/
|
|
53
|
+
get IsCreatingReport(): boolean;
|
|
54
|
+
protected _isCreatingReport: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* This method is used to create a report from the current conversation detail
|
|
57
|
+
*/
|
|
58
|
+
DoCreateReport(): Promise<void>;
|
|
59
|
+
protected RaiseUserNotification(message: string, style: "none" | "success" | "error" | "warning" | "info", hideAfter?: number): void;
|
|
60
|
+
/**
|
|
61
|
+
* This method does the internal work with the current GraphQLDataProvider to actually create a new report on the server.
|
|
62
|
+
*/
|
|
63
|
+
protected _GraphQLCreateNewReport(): Promise<{
|
|
64
|
+
ReportID: string;
|
|
65
|
+
ReportName: string;
|
|
66
|
+
Success: boolean;
|
|
67
|
+
ErrorMessage: string;
|
|
68
|
+
}>;
|
|
69
|
+
DoRefreshReport(): Promise<void>;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkipDynamicReportBase, never>;
|
|
71
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SkipDynamicReportBase, never, never, { "SkipData": { "alias": "SkipData"; "required": false; }; "ShowCreateReportButton": { "alias": "ShowCreateReportButton"; "required": false; }; "ConversationID": { "alias": "ConversationID"; "required": false; }; "ConversationName": { "alias": "ConversationName"; "required": false; }; "ConversationDetailID": { "alias": "ConversationDetailID"; "required": false; }; "DataContext": { "alias": "DataContext"; "required": false; }; "ReportEntity": { "alias": "ReportEntity"; "required": false; }; "Provider": { "alias": "Provider"; "required": false; }; }, { "UserNotification": "UserNotification"; "NavigateToMatchingReport": "NavigateToMatchingReport"; }, never, never, false, never>;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=base-report.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-report.d.ts","sourceRoot":"","sources":["../../../src/lib/dynamic-report/base-report.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAwB,YAAY,EAAyB,MAAM,eAAe,CAAC;AAC5H,OAAO,EAAE,iBAAiB,EAAiD,MAAM,sBAAsB,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,OAAO,EAAmB,+BAA+B,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;;AAE9G,8BACsB,qBAAsB,YAAW,aAAa;IAoBpD,SAAS,CAAC,KAAK,EAAE,iBAAiB;IAnBrC,QAAQ,EAAE,+BAA+B,GAAG,SAAS,CAAC;IACtD,sBAAsB,EAAE,OAAO,CAAS;IACxC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAQ;IACrC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IACvC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC3C,WAAW,EAAG,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,YAAY,CAAC;IACrC;;OAEG;IACM,QA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) {
|
|
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 { Directive, EventEmitter, Input, Output } from "@angular/core";
|
|
11
|
+
import { LogError, Metadata, RunView } from "@memberjunction/core";
|
|
12
|
+
import { ConvertMarkdownStringToHtmlList } from "@memberjunction/global";
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
export class SkipDynamicReportBase {
|
|
15
|
+
constructor(cdRef) {
|
|
16
|
+
this.cdRef = cdRef;
|
|
17
|
+
this.ShowCreateReportButton = false;
|
|
18
|
+
this.ConversationID = null;
|
|
19
|
+
this.ConversationName = null;
|
|
20
|
+
this.ConversationDetailID = null;
|
|
21
|
+
/**
|
|
22
|
+
* Optional, specify a provider if you want to use a different provider than the default one
|
|
23
|
+
*/
|
|
24
|
+
this.Provider = null;
|
|
25
|
+
this.UserNotification = new EventEmitter();
|
|
26
|
+
/**
|
|
27
|
+
* This event fires whenever the component has a click on a matching report link.
|
|
28
|
+
* The provided parameter is the ID of the matching report.
|
|
29
|
+
*/
|
|
30
|
+
this.NavigateToMatchingReport = new EventEmitter();
|
|
31
|
+
this.matchingReportID = null;
|
|
32
|
+
this.matchingReportName = null;
|
|
33
|
+
this._loaded = false;
|
|
34
|
+
this._isCreatingReport = false;
|
|
35
|
+
}
|
|
36
|
+
ngAfterViewInit() {
|
|
37
|
+
this.RefreshMatchingReport();
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* This property returns the provider to use, which will either be the one specified in the input or the default one, if nothing was specified.
|
|
41
|
+
*/
|
|
42
|
+
get ProviderToUse() {
|
|
43
|
+
return this.Provider || Metadata.Provider;
|
|
44
|
+
}
|
|
45
|
+
RefreshMatchingReport() {
|
|
46
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
47
|
+
if (this.SkipData && !this._loaded && this.ConversationDetailID && this.ConversationID) {
|
|
48
|
+
this._loaded = true;
|
|
49
|
+
if (this.ShowCreateReportButton) {
|
|
50
|
+
// check to see if a report has been created that is linked to this ConvoID/ConvoDetailID
|
|
51
|
+
// if so don't allow the user to create another report, show a link to the existing one
|
|
52
|
+
const cachedItem = SkipDynamicReportBase._reportCache.find((x) => x.conversationId === this.ConversationID && x.conversationDetailId === this.ConversationDetailID);
|
|
53
|
+
if (cachedItem) {
|
|
54
|
+
this.matchingReportID = cachedItem.reportId;
|
|
55
|
+
this.matchingReportName = cachedItem.reportName;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
const rv = new RunView(this.ProviderToUse);
|
|
59
|
+
const matchingReports = yield rv.RunView({
|
|
60
|
+
EntityName: 'Reports',
|
|
61
|
+
ExtraFilter: `ConversationID = '${this.ConversationID}' AND ConversationDetailID = '${this.ConversationDetailID}'`,
|
|
62
|
+
});
|
|
63
|
+
if (matchingReports && matchingReports.Success && matchingReports.RowCount > 0) {
|
|
64
|
+
const item = matchingReports.Results[0];
|
|
65
|
+
this.matchingReportID = item.ID;
|
|
66
|
+
this.matchingReportName = item.Name;
|
|
67
|
+
// cache for future to avoid db call
|
|
68
|
+
SkipDynamicReportBase._reportCache.push({
|
|
69
|
+
reportId: item.ID,
|
|
70
|
+
conversationId: this.ConversationID,
|
|
71
|
+
reportName: item.Name,
|
|
72
|
+
conversationDetailId: this.ConversationDetailID,
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
this.cdRef.detectChanges(); // the above will change the view so we need to manually trigger change detection
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
get Columns() {
|
|
82
|
+
var _a;
|
|
83
|
+
return ((_a = this.SkipData) === null || _a === void 0 ? void 0 : _a.tableDataColumns) || [];
|
|
84
|
+
}
|
|
85
|
+
get IsChart() {
|
|
86
|
+
var _a, _b;
|
|
87
|
+
if (!this.SkipData)
|
|
88
|
+
return false;
|
|
89
|
+
return ((_b = (_a = this.SkipData.executionResults) === null || _a === void 0 ? void 0 : _a.resultType) === null || _b === void 0 ? void 0 : _b.trim().toLowerCase()) === 'plot';
|
|
90
|
+
}
|
|
91
|
+
get IsTable() {
|
|
92
|
+
var _a, _b;
|
|
93
|
+
if (!this.SkipData)
|
|
94
|
+
return false;
|
|
95
|
+
return ((_b = (_a = this.SkipData.executionResults) === null || _a === void 0 ? void 0 : _a.resultType) === null || _b === void 0 ? void 0 : _b.trim().toLowerCase()) === 'table';
|
|
96
|
+
}
|
|
97
|
+
get IsHTML() {
|
|
98
|
+
var _a, _b;
|
|
99
|
+
if (!this.SkipData)
|
|
100
|
+
return false;
|
|
101
|
+
return ((_b = (_a = this.SkipData.executionResults) === null || _a === void 0 ? void 0 : _a.resultType) === null || _b === void 0 ? void 0 : _b.trim().toLowerCase()) === 'html';
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* This method is used to create the HTML for the analysis section of the report
|
|
105
|
+
* @returns
|
|
106
|
+
*/
|
|
107
|
+
CreateAnalysisHtml() {
|
|
108
|
+
var _a;
|
|
109
|
+
const analysis = (_a = this.SkipData) === null || _a === void 0 ? void 0 : _a.analysis;
|
|
110
|
+
if (analysis && analysis.length > 0) {
|
|
111
|
+
return ConvertMarkdownStringToHtmlList('Unordered', analysis);
|
|
112
|
+
}
|
|
113
|
+
else
|
|
114
|
+
return '<h2>No Analysis Provided</h2>';
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Returns true if the component is in the process of creating a report
|
|
118
|
+
*/
|
|
119
|
+
get IsCreatingReport() {
|
|
120
|
+
return this._isCreatingReport;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* This method is used to create a report from the current conversation detail
|
|
124
|
+
*/
|
|
125
|
+
DoCreateReport() {
|
|
126
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
127
|
+
this._isCreatingReport = true;
|
|
128
|
+
if (!this.SkipData || !this.ConversationID || !this.ConversationName || !this.ConversationDetailID) {
|
|
129
|
+
throw new Error('Must set SkipData, ConversationID, ConversationName, and ConversationDetailID to enable saving report');
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
const result = yield this._GraphQLCreateNewReport();
|
|
133
|
+
if (result && result.Success) {
|
|
134
|
+
this.matchingReportID = result.ReportID;
|
|
135
|
+
this.matchingReportName = result.ReportName;
|
|
136
|
+
this.RaiseUserNotification(`Report "${result.ReportName}"Saved`, 'success', 2500);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
this.RaiseUserNotification('Error saving report', 'error', 2500);
|
|
140
|
+
this._isCreatingReport = false;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
RaiseUserNotification(message, style, hideAfter) {
|
|
146
|
+
this.UserNotification.emit({ message, style, hideAfter });
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* This method does the internal work with the current GraphQLDataProvider to actually create a new report on the server.
|
|
150
|
+
*/
|
|
151
|
+
_GraphQLCreateNewReport() {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
// do this via a single gql call to make it faster than doing operation via standard objects since it is a multi-step operation
|
|
154
|
+
const mutation = `mutation CreateReportFromConversationDetailIDMutation ($ConversationDetailID: String!) {
|
|
155
|
+
CreateReportFromConversationDetailID(ConversationDetailID: $ConversationDetailID) {
|
|
156
|
+
ReportID
|
|
157
|
+
ReportName
|
|
158
|
+
Success
|
|
159
|
+
ErrorMessage
|
|
160
|
+
}
|
|
161
|
+
}`;
|
|
162
|
+
const p = this.ProviderToUse;
|
|
163
|
+
const result = yield p.ExecuteGQL(mutation, {
|
|
164
|
+
ConversationDetailID: this.ConversationDetailID,
|
|
165
|
+
});
|
|
166
|
+
if (result && result.CreateReportFromConversationDetailID)
|
|
167
|
+
return result.CreateReportFromConversationDetailID;
|
|
168
|
+
else
|
|
169
|
+
return {
|
|
170
|
+
Success: false,
|
|
171
|
+
ErrorMessage: 'Failed to execute',
|
|
172
|
+
ReportID: '',
|
|
173
|
+
ReportName: '',
|
|
174
|
+
};
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
DoRefreshReport() {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
+
var _a;
|
|
180
|
+
try {
|
|
181
|
+
if (!this.SkipData) {
|
|
182
|
+
this.RaiseUserNotification('No data to refresh', 'error', 2500);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (!this.ReportEntity || !this.ReportEntity.ID) {
|
|
186
|
+
this.RaiseUserNotification('No report to refresh', 'error', 2500);
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
this.RaiseUserNotification('Refreshing report...', 'info', 2500);
|
|
190
|
+
const gql = `query ExecuteAskSkipRunScript($dataContextId: String!, $scriptText: String!) {
|
|
191
|
+
ExecuteAskSkipRunScript(DataContextId: $dataContextId, ScriptText: $scriptText) {
|
|
192
|
+
Success
|
|
193
|
+
Status
|
|
194
|
+
Result
|
|
195
|
+
ConversationId
|
|
196
|
+
UserMessageConversationDetailId
|
|
197
|
+
AIMessageConversationDetailId
|
|
198
|
+
}
|
|
199
|
+
}`;
|
|
200
|
+
const p = this.ProviderToUse;
|
|
201
|
+
const result = yield p.ExecuteGQL(gql, {
|
|
202
|
+
dataContextId: this.ReportEntity.DataContextID,
|
|
203
|
+
scriptText: (_a = this.SkipData) === null || _a === void 0 ? void 0 : _a.scriptText,
|
|
204
|
+
});
|
|
205
|
+
const resultObj = result.ExecuteAskSkipRunScript;
|
|
206
|
+
if (!resultObj.Success) {
|
|
207
|
+
LogError('Error refreshing report: resultObj.Success was false');
|
|
208
|
+
this.RaiseUserNotification('Error refreshing report', 'error', 2500);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
// it worked, refresh the report here
|
|
212
|
+
const newSkipData = JSON.parse(resultObj.Result);
|
|
213
|
+
this.SkipData = newSkipData; // this drives binding to chart and table and so forth for a refresh
|
|
214
|
+
this.ReportEntity.Configuration = JSON.stringify(newSkipData);
|
|
215
|
+
const saveResult = yield this.ReportEntity.Save();
|
|
216
|
+
if (!saveResult) {
|
|
217
|
+
LogError('Error refreshing report: failed to save report entity', undefined, this.ReportEntity.LatestResult);
|
|
218
|
+
this.RaiseUserNotification('Error refreshing report', 'error', 2500);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
this.RaiseUserNotification('Report refreshed', 'success', 2500);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
catch (err) {
|
|
225
|
+
this.RaiseUserNotification('Error refreshing report', 'error', 2500);
|
|
226
|
+
console.error(err);
|
|
227
|
+
}
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
SkipDynamicReportBase._reportCache = [];
|
|
232
|
+
SkipDynamicReportBase.ɵfac = function SkipDynamicReportBase_Factory(t) { return new (t || SkipDynamicReportBase)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
233
|
+
SkipDynamicReportBase.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: SkipDynamicReportBase, inputs: { SkipData: "SkipData", ShowCreateReportButton: "ShowCreateReportButton", ConversationID: "ConversationID", ConversationName: "ConversationName", ConversationDetailID: "ConversationDetailID", DataContext: "DataContext", ReportEntity: "ReportEntity", Provider: "Provider" }, outputs: { UserNotification: "UserNotification", NavigateToMatchingReport: "NavigateToMatchingReport" } });
|
|
234
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SkipDynamicReportBase, [{
|
|
235
|
+
type: Directive
|
|
236
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { SkipData: [{
|
|
237
|
+
type: Input
|
|
238
|
+
}], ShowCreateReportButton: [{
|
|
239
|
+
type: Input
|
|
240
|
+
}], ConversationID: [{
|
|
241
|
+
type: Input
|
|
242
|
+
}], ConversationName: [{
|
|
243
|
+
type: Input
|
|
244
|
+
}], ConversationDetailID: [{
|
|
245
|
+
type: Input
|
|
246
|
+
}], DataContext: [{
|
|
247
|
+
type: Input
|
|
248
|
+
}], ReportEntity: [{
|
|
249
|
+
type: Input
|
|
250
|
+
}], Provider: [{
|
|
251
|
+
type: Input
|
|
252
|
+
}], UserNotification: [{
|
|
253
|
+
type: Output
|
|
254
|
+
}], NavigateToMatchingReport: [{
|
|
255
|
+
type: Output
|
|
256
|
+
}] }); })();
|
|
257
|
+
//# sourceMappingURL=base-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-report.js","sourceRoot":"","sources":["../../../src/lib/dynamic-report/base-report.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAA+C,SAAS,EAAE,YAAY,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5H,OAAO,EAAuC,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAGxG,OAAO,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;;AAKzE,MAAM,OAAgB,qBAAqB;IAoBvC,YAAsB,KAAwB;QAAxB,UAAK,GAAL,KAAK,CAAmB;QAlBrC,2BAAsB,GAAY,KAAK,CAAC;QACxC,mBAAc,GAAkB,IAAI,CAAC;QACrC,qBAAgB,GAAkB,IAAI,CAAC;QACvC,yBAAoB,GAAkB,IAAI,CAAC;QAGpD;;WAEG;QACM,aAAQ,GAA6B,IAAI,CAAC;QACzC,qBAAgB,GAAG,IAAI,YAAY,EAAmG,CAAC;QAEjJ;;;WAGG;QACO,6BAAwB,GAAG,IAAI,Y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AAyB,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;gBACrE,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;KAAA;;AA7LY,kCAAY,GAAqG,EAAE,AAAvG,CAAwG;0FAlCjH,qBAAqB;wEAArB,qBAAqB;iFAArB,qBAAqB;cAD1C,SAAS;kDAEG,QAAQ;kBAAhB,KAAK;YACG,sBAAsB;kBAA9B,KAAK;YACG,cAAc;kBAAtB,KAAK;YACG,gBAAgB;kBAAxB,KAAK;YACG,oBAAoB;kBAA5B,KAAK;YACG,WAAW;kBAAnB,KAAK;YACG,YAAY;kBAApB,KAAK;YAIG,QAAQ;kBAAhB,KAAK;YACI,gBAAgB;kBAAzB,MAAM;YAMG,wBAAwB;kBAAjC,MAAM"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { SkipAPIAnalysisCompleteResponse } from '@memberjunction/skip-types';
|
|
3
|
+
import { PlotlyComponent } from 'angular-plotly.js';
|
|
4
|
+
import { DrillDownInfo } from '../drill-down-info';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SkipDynamicChartComponent implements OnInit, OnDestroy {
|
|
7
|
+
private el;
|
|
8
|
+
plotData: any;
|
|
9
|
+
plotLayout: any;
|
|
10
|
+
defaultPlotHeight: number;
|
|
11
|
+
ShowSaveAsImage: boolean;
|
|
12
|
+
AllowDrillDown: boolean;
|
|
13
|
+
AutoResizeChart: boolean;
|
|
14
|
+
DrillDownEvent: EventEmitter<DrillDownInfo>;
|
|
15
|
+
plotlyPlot: PlotlyComponent;
|
|
16
|
+
plotContainer: ElementRef;
|
|
17
|
+
private resizeObserver;
|
|
18
|
+
constructor(el: ElementRef);
|
|
19
|
+
ngOnInit(): void;
|
|
20
|
+
ngOnDestroy(): void;
|
|
21
|
+
SaveChartAsImage(): Promise<void>;
|
|
22
|
+
handleChartClick(chartClickEvent: any): Promise<void>;
|
|
23
|
+
setupResizeObserver(): void;
|
|
24
|
+
updateChartHeight(newHeight: number): void;
|
|
25
|
+
updateChartSize(newHeight: number, newWidth: number): void;
|
|
26
|
+
private _skipData;
|
|
27
|
+
get SkipData(): SkipAPIAnalysisCompleteResponse | undefined;
|
|
28
|
+
set SkipData(d: SkipAPIAnalysisCompleteResponse | undefined);
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SkipDynamicChartComponent, never>;
|
|
30
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SkipDynamicChartComponent, "skip-dynamic-chart", never, { "plotData": { "alias": "plotData"; "required": false; }; "plotLayout": { "alias": "plotLayout"; "required": false; }; "defaultPlotHeight": { "alias": "defaultPlotHeight"; "required": false; }; "ShowSaveAsImage": { "alias": "ShowSaveAsImage"; "required": false; }; "AllowDrillDown": { "alias": "AllowDrillDown"; "required": false; }; "AutoResizeChart": { "alias": "AutoResizeChart"; "required": false; }; "SkipData": { "alias": "SkipData"; "required": false; }; }, { "DrillDownEvent": "DrillDownEvent"; }, never, never, false, never>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=dynamic-chart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-chart.d.ts","sourceRoot":"","sources":["../../../src/lib/dynamic-report/dynamic-chart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAE,YAAY,EAAS,SAAS,EAAE,MAAM,EAAqB,MAAM,eAAe,CAAC;AAGjH,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;;AAEnD,qBAmBa,yBAA0B,YAAW,MAAM,EAAE,SAAS;IAcnD,OAAO,CAAC,EAAE;IAbb,QAAQ,EAAE,GAAG,CAAC;IACd,UAAU,EAAE,GAAG,CAAC;IAChB,iBAAiB,EAAE,MAAM,CAAO;IAChC,eAAe,EAAE,OAAO,CAAQ;IAChC,cAAc,EAAE,OAAO,CAAO;IAC9B,eAAe,EAAE,OAAO,CAAQ;IAC/B,cAAc,8BAAqC;IAEpC,UAAU,EAAG,eAAe,CAAC;IAC1B,aAAa,EAAG,UAAU,CAAC;IAEvD,OAAO,CAAC,cAAc,CAA6B;gBAE/B,EAAE,EAAE,UAAU;IAElC,QAAQ;IAKR,WAAW;IAME,gBAAgB;IAqBhB,gBAAgB,CAAC,eAAe,EAAE,GAAG;IA6BlD,mBAAmB;IAenB,iBAAiB,CAAC,SAAS,EAAE,MAAM;IAInC,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAUnD,OAAO,CAAC,SAAS,CAA8C;IAC/D,IAAa,QAAQ,IAAI,+BAA+B,GAAG,SAAS,CAEnE;IACD,IAAI,QAAQ,CAAC,CAAC,EAAE,+BAA+B,GAAG,SAAS,EAU1D;yCAxHQ,yBAAyB;2CAAzB,yBAAyB;CAyHrC"}
|
|
@@ -0,0 +1,202 @@
|
|
|
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, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
|
11
|
+
import { GetEntityNameFromSchemaAndViewString } from '@memberjunction/core';
|
|
12
|
+
import { SharedService } from '@memberjunction/ng-shared';
|
|
13
|
+
import * as Plotly from 'plotly.js-dist-min';
|
|
14
|
+
import { DrillDownInfo } from '../drill-down-info';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
import * as i1 from "@angular/common";
|
|
17
|
+
import * as i2 from "@memberjunction/ng-container-directives";
|
|
18
|
+
import * as i3 from "@progress/kendo-angular-buttons";
|
|
19
|
+
import * as i4 from "angular-plotly.js";
|
|
20
|
+
const _c0 = ["plotlyPlot"];
|
|
21
|
+
const _c1 = ["plotContainer"];
|
|
22
|
+
function SkipDynamicChartComponent_button_0_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
24
|
+
i0.ɵɵelementStart(0, "button", 5);
|
|
25
|
+
i0.ɵɵlistener("click", function SkipDynamicChartComponent_button_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.SaveChartAsImage()); });
|
|
26
|
+
i0.ɵɵelement(1, "span", 6);
|
|
27
|
+
i0.ɵɵtext(2, " Save ");
|
|
28
|
+
i0.ɵɵelementEnd();
|
|
29
|
+
} }
|
|
30
|
+
export class SkipDynamicChartComponent {
|
|
31
|
+
constructor(el) {
|
|
32
|
+
this.el = el;
|
|
33
|
+
this.defaultPlotHeight = 550;
|
|
34
|
+
this.ShowSaveAsImage = true;
|
|
35
|
+
this.AllowDrillDown = true;
|
|
36
|
+
this.AutoResizeChart = false;
|
|
37
|
+
this.DrillDownEvent = new EventEmitter();
|
|
38
|
+
}
|
|
39
|
+
ngOnInit() {
|
|
40
|
+
if (this.AutoResizeChart)
|
|
41
|
+
this.setupResizeObserver();
|
|
42
|
+
}
|
|
43
|
+
ngOnDestroy() {
|
|
44
|
+
if (this.resizeObserver) {
|
|
45
|
+
this.resizeObserver.disconnect();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
SaveChartAsImage() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
var _a, _b;
|
|
51
|
+
if (this.plotlyPlot) {
|
|
52
|
+
const el = this.plotContainer.nativeElement.querySelector('.js-plotly-plot');
|
|
53
|
+
const image = yield Plotly.toImage(el, { format: 'png' });
|
|
54
|
+
if (image) {
|
|
55
|
+
// Create an <a> element
|
|
56
|
+
const downloadLink = document.createElement('a');
|
|
57
|
+
// Set the download attribute with a default file name
|
|
58
|
+
downloadLink.download = ((_a = this.SkipData) === null || _a === void 0 ? void 0 : _a.reportTitle) || ((_b = this.plotLayout) === null || _b === void 0 ? void 0 : _b.title) || 'chart.png';
|
|
59
|
+
// Set the href to the data URL
|
|
60
|
+
downloadLink.href = image;
|
|
61
|
+
// Append the <a> element to the body (required for Firefox)
|
|
62
|
+
document.body.appendChild(downloadLink);
|
|
63
|
+
// Programmatically trigger a click on the <a> element
|
|
64
|
+
downloadLink.click();
|
|
65
|
+
// Remove the <a> element after download
|
|
66
|
+
document.body.removeChild(downloadLink);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
handleChartClick(chartClickEvent) {
|
|
72
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
var _a;
|
|
74
|
+
try {
|
|
75
|
+
if (!this.AllowDrillDown)
|
|
76
|
+
return;
|
|
77
|
+
const drillDownValue = chartClickEvent.points[0].label;
|
|
78
|
+
const drillDown = (_a = this.SkipData) === null || _a === void 0 ? void 0 : _a.drillDown;
|
|
79
|
+
if (drillDown && drillDownValue && drillDownValue.length > 0) {
|
|
80
|
+
// we have a valid situation to drill down where we have the configuration and we have a drill down value.
|
|
81
|
+
// we can navigate to the drill down view
|
|
82
|
+
const entityName = GetEntityNameFromSchemaAndViewString(drillDown.viewName);
|
|
83
|
+
if (entityName) {
|
|
84
|
+
const filterSQL = drillDown.filters.map(f => {
|
|
85
|
+
const isDateValue = drillDownValue instanceof Date;
|
|
86
|
+
const isNumberValue = !isNaN(parseFloat(drillDownValue));
|
|
87
|
+
const needsQuotes = isDateValue ? true : (isNumberValue ? false : true);
|
|
88
|
+
const quotes = needsQuotes ? "'" : '';
|
|
89
|
+
return `${f.viewFieldName} = ${quotes}${drillDownValue}${quotes}`;
|
|
90
|
+
}).join(' AND ');
|
|
91
|
+
this.DrillDownEvent.emit(new DrillDownInfo(entityName, filterSQL));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
catch (e) {
|
|
96
|
+
console.warn('Error handling chart click', e);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
setupResizeObserver() {
|
|
101
|
+
// Invoke manual resize from SharedService.Instance to ensure the chart is sized correctly
|
|
102
|
+
SharedService.Instance.InvokeManualResize();
|
|
103
|
+
// now wait 1ms - which really just results in the event loop being processed and the manual resize being invoked
|
|
104
|
+
setTimeout(() => {
|
|
105
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
106
|
+
for (let entry of entries) {
|
|
107
|
+
const { height, width } = entry.contentRect;
|
|
108
|
+
this.updateChartSize(height - 15, width); // some pixels of margin to make sure it all fits
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
this.resizeObserver.observe(this.el.nativeElement);
|
|
112
|
+
}, 1);
|
|
113
|
+
}
|
|
114
|
+
updateChartHeight(newHeight) {
|
|
115
|
+
if (this.plotLayout && newHeight > 0)
|
|
116
|
+
this.plotLayout.height = newHeight;
|
|
117
|
+
}
|
|
118
|
+
updateChartSize(newHeight, newWidth) {
|
|
119
|
+
if (this.plotLayout) {
|
|
120
|
+
if (newHeight > 0)
|
|
121
|
+
this.plotLayout.height = newHeight;
|
|
122
|
+
if (newWidth > 0)
|
|
123
|
+
this.plotLayout.width = newWidth;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
get SkipData() {
|
|
127
|
+
return this._skipData ? this._skipData : undefined;
|
|
128
|
+
}
|
|
129
|
+
set SkipData(d) {
|
|
130
|
+
var _a, _b, _c, _d;
|
|
131
|
+
this._skipData = d;
|
|
132
|
+
if (d) {
|
|
133
|
+
this.plotData = (_b = (_a = d.executionResults) === null || _a === void 0 ? void 0 : _a.plotData) === null || _b === void 0 ? void 0 : _b.data;
|
|
134
|
+
this.plotLayout = (_d = (_c = d.executionResults) === null || _c === void 0 ? void 0 : _c.plotData) === null || _d === void 0 ? void 0 : _d.layout;
|
|
135
|
+
if (this.plotLayout) {
|
|
136
|
+
if (this.plotLayout.height === undefined || this.plotLayout.height === null || this.plotLayout.height === 0)
|
|
137
|
+
this.plotLayout.height = this.defaultPlotHeight;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
SkipDynamicChartComponent.ɵfac = function SkipDynamicChartComponent_Factory(t) { return new (t || SkipDynamicChartComponent)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
|
|
143
|
+
SkipDynamicChartComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SkipDynamicChartComponent, selectors: [["skip-dynamic-chart"]], viewQuery: function SkipDynamicChartComponent_Query(rf, ctx) { if (rf & 1) {
|
|
144
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
145
|
+
i0.ɵɵviewQuery(_c1, 5);
|
|
146
|
+
} if (rf & 2) {
|
|
147
|
+
let _t;
|
|
148
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.plotlyPlot = _t.first);
|
|
149
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.plotContainer = _t.first);
|
|
150
|
+
} }, inputs: { plotData: "plotData", plotLayout: "plotLayout", defaultPlotHeight: "defaultPlotHeight", ShowSaveAsImage: "ShowSaveAsImage", AllowDrillDown: "AllowDrillDown", AutoResizeChart: "AutoResizeChart", SkipData: "SkipData" }, outputs: { DrillDownEvent: "DrillDownEvent" }, decls: 5, vars: 4, consts: [["plotContainer", ""], ["plotlyPlot", ""], ["kendoButton", "", 3, "click", 4, "ngIf"], ["mjFillContainer", ""], ["mjFillContainer", "", 3, "plotlyClick", "data", "layout", "useResizeHandler"], ["kendoButton", "", 3, "click"], [1, "fa-regular", "fa-image"]], template: function SkipDynamicChartComponent_Template(rf, ctx) { if (rf & 1) {
|
|
151
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
152
|
+
i0.ɵɵtemplate(0, SkipDynamicChartComponent_button_0_Template, 3, 0, "button", 2);
|
|
153
|
+
i0.ɵɵelementStart(1, "div", 3, 0)(3, "plotly-plot", 4, 1);
|
|
154
|
+
i0.ɵɵlistener("plotlyClick", function SkipDynamicChartComponent_Template_plotly_plot_plotlyClick_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleChartClick($event)); });
|
|
155
|
+
i0.ɵɵelementEnd()();
|
|
156
|
+
} if (rf & 2) {
|
|
157
|
+
i0.ɵɵproperty("ngIf", ctx.ShowSaveAsImage);
|
|
158
|
+
i0.ɵɵadvance(3);
|
|
159
|
+
i0.ɵɵproperty("data", ctx.plotData)("layout", ctx.plotLayout)("useResizeHandler", true);
|
|
160
|
+
} }, dependencies: [i1.NgIf, i2.FillContainer, i3.ButtonComponent, i4.PlotlyComponent], styles: ["button[_ngcontent-%COMP%] { margin-top: 5px; margin-bottom: 5px;}"] });
|
|
161
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SkipDynamicChartComponent, [{
|
|
162
|
+
type: Component,
|
|
163
|
+
args: [{ selector: 'skip-dynamic-chart', template: `
|
|
164
|
+
<button kendoButton *ngIf="ShowSaveAsImage" (click)="SaveChartAsImage()">
|
|
165
|
+
<span class="fa-regular fa-image"></span>
|
|
166
|
+
Save
|
|
167
|
+
</button>
|
|
168
|
+
<div #plotContainer mjFillContainer>
|
|
169
|
+
<plotly-plot #plotlyPlot
|
|
170
|
+
[data]="plotData"
|
|
171
|
+
[layout]="plotLayout"
|
|
172
|
+
mjFillContainer
|
|
173
|
+
[useResizeHandler]="true"
|
|
174
|
+
(plotlyClick)="handleChartClick($event)">
|
|
175
|
+
</plotly-plot>
|
|
176
|
+
</div>
|
|
177
|
+
`, styles: ["button { margin-top: 5px; margin-bottom: 5px;}"] }]
|
|
178
|
+
}], () => [{ type: i0.ElementRef }], { plotData: [{
|
|
179
|
+
type: Input
|
|
180
|
+
}], plotLayout: [{
|
|
181
|
+
type: Input
|
|
182
|
+
}], defaultPlotHeight: [{
|
|
183
|
+
type: Input
|
|
184
|
+
}], ShowSaveAsImage: [{
|
|
185
|
+
type: Input
|
|
186
|
+
}], AllowDrillDown: [{
|
|
187
|
+
type: Input
|
|
188
|
+
}], AutoResizeChart: [{
|
|
189
|
+
type: Input
|
|
190
|
+
}], DrillDownEvent: [{
|
|
191
|
+
type: Output
|
|
192
|
+
}], plotlyPlot: [{
|
|
193
|
+
type: ViewChild,
|
|
194
|
+
args: ['plotlyPlot']
|
|
195
|
+
}], plotContainer: [{
|
|
196
|
+
type: ViewChild,
|
|
197
|
+
args: ['plotContainer']
|
|
198
|
+
}], SkipData: [{
|
|
199
|
+
type: Input
|
|
200
|
+
}] }); })();
|
|
201
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SkipDynamicChartComponent, { className: "SkipDynamicChartComponent", filePath: "src/lib/dynamic-report/dynamic-chart.ts", lineNumber: 28 }); })();
|
|
202
|
+
//# sourceMappingURL=dynamic-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-chart.js","sourceRoot":"","sources":["../../../src/lib/dynamic-report/dynamic-chart.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAc,YAAY,EAAE,KAAK,EAAqB,MAAM,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACjH,OAAO,EAAE,oCAAoC,EAAqB,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,2B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