@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.
Files changed (97) hide show
  1. package/dist/lib/ask-skip/ask-skip.component.d.ts +83 -0
  2. package/dist/lib/ask-skip/ask-skip.component.js +591 -0
  3. package/dist/lib/ask-skip/skip-dynamic-report-wrapper.d.ts +12 -0
  4. package/dist/lib/ask-skip/skip-dynamic-report-wrapper.js +49 -0
  5. package/dist/lib/auth-button/auth-button.component.d.ts +12 -0
  6. package/dist/lib/auth-button/auth-button.component.js +43 -0
  7. package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts +14 -0
  8. package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +55 -0
  9. package/dist/lib/data-browser-component/data-browser.component.d.ts +14 -0
  10. package/dist/lib/data-browser-component/data-browser.component.js +91 -0
  11. package/dist/lib/favorites/favorites.component.d.ts +13 -0
  12. package/dist/lib/favorites/favorites.component.js +100 -0
  13. package/dist/lib/generic/base-form-component.d.ts +76 -0
  14. package/dist/lib/generic/base-form-component.js +436 -0
  15. package/dist/lib/generic/base-form-section-component.d.ts +6 -0
  16. package/dist/lib/generic/base-form-section-component.js +10 -0
  17. package/dist/lib/generic/base-record-component.d.ts +6 -0
  18. package/dist/lib/generic/base-record-component.js +13 -0
  19. package/dist/lib/generic/base-resource-component.d.ts +34 -0
  20. package/dist/lib/generic/base-resource-component.js +75 -0
  21. package/dist/lib/generic/dynamic-chart.d.ts +26 -0
  22. package/dist/lib/generic/dynamic-chart.js +180 -0
  23. package/dist/lib/generic/dynamic-grid.d.ts +24 -0
  24. package/dist/lib/generic/dynamic-grid.js +135 -0
  25. package/dist/lib/generic/dynamic-report.d.ts +38 -0
  26. package/dist/lib/generic/dynamic-report.js +399 -0
  27. package/dist/lib/generic/form-toolbar.d.ts +7 -0
  28. package/dist/lib/generic/form-toolbar.js +98 -0
  29. package/dist/lib/generic/resource-container-component.d.ts +25 -0
  30. package/dist/lib/generic/resource-container-component.js +103 -0
  31. package/dist/lib/generic/section-loader-component.d.ts +17 -0
  32. package/dist/lib/generic/section-loader-component.js +65 -0
  33. package/dist/lib/generic-browse-list/generic-browse-list.component.d.ts +16 -0
  34. package/dist/lib/generic-browse-list/generic-browse-list.component.js +91 -0
  35. package/dist/lib/guards/auth-guard.service.d.ts +11 -0
  36. package/dist/lib/guards/auth-guard.service.js +24 -0
  37. package/dist/lib/guards/entities.guard.d.ts +3 -0
  38. package/dist/lib/guards/entities.guard.js +38 -0
  39. package/dist/lib/header/MSFT_UserImageService.d.ts +11 -0
  40. package/dist/lib/header/MSFT_UserImageService.js +23 -0
  41. package/dist/lib/header/header.component.d.ts +51 -0
  42. package/dist/lib/header/header.component.js +208 -0
  43. package/dist/lib/home-component/home.component.d.ts +9 -0
  44. package/dist/lib/home-component/home.component.js +54 -0
  45. package/dist/lib/join-grid/join-grid.component.d.ts +30 -0
  46. package/dist/lib/join-grid/join-grid.component.js +225 -0
  47. package/dist/lib/navigation/navigation.component.d.ts +102 -0
  48. package/dist/lib/navigation/navigation.component.js +970 -0
  49. package/dist/lib/report-browser-component/report-browser.component.d.ts +14 -0
  50. package/dist/lib/report-browser-component/report-browser.component.js +55 -0
  51. package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +8 -0
  52. package/dist/lib/resource-wrappers/dashboard-resource.component.js +49 -0
  53. package/dist/lib/resource-wrappers/record-resource.component.d.ts +8 -0
  54. package/dist/lib/resource-wrappers/record-resource.component.js +55 -0
  55. package/dist/lib/resource-wrappers/report-resource.component.d.ts +10 -0
  56. package/dist/lib/resource-wrappers/report-resource.component.js +53 -0
  57. package/dist/lib/resource-wrappers/resource-wrappers-loader.d.ts +1 -0
  58. package/dist/lib/resource-wrappers/resource-wrappers-loader.js +12 -0
  59. package/dist/lib/resource-wrappers/search-results-resource.component.d.ts +10 -0
  60. package/dist/lib/resource-wrappers/search-results-resource.component.js +50 -0
  61. package/dist/lib/resource-wrappers/view-resource.component.d.ts +8 -0
  62. package/dist/lib/resource-wrappers/view-resource.component.js +51 -0
  63. package/dist/lib/settings/settings.component.d.ts +5 -0
  64. package/dist/lib/settings/settings.component.js +14 -0
  65. package/dist/lib/shared/shared.service.d.ts +87 -0
  66. package/dist/lib/shared/shared.service.js +302 -0
  67. package/dist/lib/shared/urlPipe.d.ts +7 -0
  68. package/dist/lib/shared/urlPipe.js +16 -0
  69. package/dist/lib/single-application/single-application.component.d.ts +21 -0
  70. package/dist/lib/single-application/single-application.component.js +132 -0
  71. package/dist/lib/single-dashboard/Components/add-item/add-item.component.d.ts +28 -0
  72. package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +212 -0
  73. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.d.ts +26 -0
  74. package/dist/lib/single-dashboard/Components/edit-dashboard/edit-dashboard.component.js +169 -0
  75. package/dist/lib/single-dashboard/single-dashboard.component.d.ts +55 -0
  76. package/dist/lib/single-dashboard/single-dashboard.component.js +266 -0
  77. package/dist/lib/single-entity/single-entity.component.d.ts +33 -0
  78. package/dist/lib/single-entity/single-entity.component.js +252 -0
  79. package/dist/lib/single-record/single-record.component.d.ts +20 -0
  80. package/dist/lib/single-record/single-record.component.js +95 -0
  81. package/dist/lib/single-report/single-report.component.d.ts +22 -0
  82. package/dist/lib/single-report/single-report.component.js +87 -0
  83. package/dist/lib/single-search-result/single-search-result.component.d.ts +15 -0
  84. package/dist/lib/single-search-result/single-search-result.component.js +60 -0
  85. package/dist/lib/single-view/single-view.component.d.ts +34 -0
  86. package/dist/lib/single-view/single-view.component.js +154 -0
  87. package/dist/lib/user-notifications/user-notifications.component.d.ts +32 -0
  88. package/dist/lib/user-notifications/user-notifications.component.js +282 -0
  89. package/dist/lib/user-profile/user-profile.component.d.ts +10 -0
  90. package/dist/lib/user-profile/user-profile.component.js +41 -0
  91. package/dist/lib/user-view-properties/view-properties-dialog.component.d.ts +70 -0
  92. package/dist/lib/user-view-properties/view-properties-dialog.component.js +568 -0
  93. package/dist/module.d.ts +64 -0
  94. package/dist/module.js +332 -0
  95. package/dist/public-api.d.ts +47 -0
  96. package/dist/public-api.js +50 -0
  97. package/package.json +39 -0
@@ -0,0 +1,399 @@
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, Input, ViewChild } from '@angular/core';
11
+ import { HtmlListType } from '../shared/shared.service';
12
+ import { Metadata, RunView } from '@memberjunction/core';
13
+ import * as i0 from "@angular/core";
14
+ import * as i1 from "../shared/shared.service";
15
+ import * as i2 from "@angular/router";
16
+ const _c0 = ["theGrid"];
17
+ const _c1 = ["theChart"];
18
+ const _c2 = ["tabStrip"];
19
+ function DynamicReportComponent_button_1_Template(rf, ctx) { if (rf & 1) {
20
+ const _r12 = i0.ɵɵgetCurrentView();
21
+ i0.ɵɵelementStart(0, "button", 9);
22
+ i0.ɵɵlistener("click", function DynamicReportComponent_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.doCreateReport()); });
23
+ i0.ɵɵtext(1, "Create Report");
24
+ i0.ɵɵelementEnd();
25
+ } }
26
+ function DynamicReportComponent_div_2_Template(rf, ctx) { if (rf & 1) {
27
+ const _r14 = i0.ɵɵgetCurrentView();
28
+ i0.ɵɵelementStart(0, "div", 10);
29
+ i0.ɵɵlistener("click", function DynamicReportComponent_div_2_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.clickMatchingReport()); });
30
+ i0.ɵɵtext(1);
31
+ i0.ɵɵelementEnd();
32
+ } if (rf & 2) {
33
+ const ctx_r1 = i0.ɵɵnextContext();
34
+ i0.ɵɵadvance(1);
35
+ i0.ɵɵtextInterpolate2("Report: ", ctx_r1.matchingReportName, " (ID: ", ctx_r1.matchingReportID, ") Created From This Message");
36
+ } }
37
+ function DynamicReportComponent_kendo_tabstrip_tab_5_ng_template_1_Template(rf, ctx) { if (rf & 1) {
38
+ i0.ɵɵelement(0, "kendo-icon", 12);
39
+ i0.ɵɵelementStart(1, "span", 13);
40
+ i0.ɵɵtext(2, "Chart");
41
+ i0.ɵɵelementEnd();
42
+ } }
43
+ function DynamicReportComponent_kendo_tabstrip_tab_5_ng_template_2_Template(rf, ctx) { if (rf & 1) {
44
+ i0.ɵɵelement(0, "app-dynamic-chart", 14, 15);
45
+ } if (rf & 2) {
46
+ const ctx_r16 = i0.ɵɵnextContext(2);
47
+ i0.ɵɵproperty("SkipData", ctx_r16.SkipData);
48
+ } }
49
+ function DynamicReportComponent_kendo_tabstrip_tab_5_Template(rf, ctx) { if (rf & 1) {
50
+ i0.ɵɵelementStart(0, "kendo-tabstrip-tab", 11);
51
+ i0.ɵɵtemplate(1, DynamicReportComponent_kendo_tabstrip_tab_5_ng_template_1_Template, 3, 0, "ng-template", 7);
52
+ i0.ɵɵtemplate(2, DynamicReportComponent_kendo_tabstrip_tab_5_ng_template_2_Template, 2, 1, "ng-template", 8);
53
+ i0.ɵɵelementEnd();
54
+ } if (rf & 2) {
55
+ const ctx_r3 = i0.ɵɵnextContext();
56
+ i0.ɵɵproperty("selected", ctx_r3.isTabSelected(0));
57
+ } }
58
+ function DynamicReportComponent_ng_template_7_Template(rf, ctx) { if (rf & 1) {
59
+ i0.ɵɵelement(0, "kendo-icon", 16);
60
+ i0.ɵɵelementStart(1, "span", 13);
61
+ i0.ɵɵtext(2, "Table");
62
+ i0.ɵɵelementEnd();
63
+ } }
64
+ function DynamicReportComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
65
+ i0.ɵɵelement(0, "app-dynamic-grid", 14, 17);
66
+ } if (rf & 2) {
67
+ const ctx_r5 = i0.ɵɵnextContext();
68
+ i0.ɵɵproperty("SkipData", ctx_r5.SkipData);
69
+ } }
70
+ function DynamicReportComponent_ng_template_10_Template(rf, ctx) { if (rf & 1) {
71
+ i0.ɵɵelement(0, "img", 18);
72
+ i0.ɵɵelementStart(1, "span", 13);
73
+ i0.ɵɵtext(2, "Analysis");
74
+ i0.ɵɵelementEnd();
75
+ } }
76
+ function DynamicReportComponent_ng_template_11_Template(rf, ctx) { if (rf & 1) {
77
+ i0.ɵɵelement(0, "div", 19);
78
+ } if (rf & 2) {
79
+ const ctx_r7 = i0.ɵɵnextContext();
80
+ i0.ɵɵproperty("innerHTML", ctx_r7.createAnalysisHtml(), i0.ɵɵsanitizeHtml);
81
+ } }
82
+ function DynamicReportComponent_ng_template_13_Template(rf, ctx) { if (rf & 1) {
83
+ i0.ɵɵelement(0, "kendo-icon", 20);
84
+ i0.ɵɵelementStart(1, "span", 13);
85
+ i0.ɵɵtext(2, "Explanation");
86
+ i0.ɵɵelementEnd();
87
+ } }
88
+ function DynamicReportComponent_ng_template_14_Template(rf, ctx) { if (rf & 1) {
89
+ i0.ɵɵelementStart(0, "div", 0);
90
+ i0.ɵɵtext(1);
91
+ i0.ɵɵelementEnd();
92
+ } if (rf & 2) {
93
+ const ctx_r9 = i0.ɵɵnextContext();
94
+ i0.ɵɵadvance(1);
95
+ i0.ɵɵtextInterpolate((ctx_r9.SkipData == null ? null : ctx_r9.SkipData.ReportExplanation) || "No Explanation Provided");
96
+ } }
97
+ function DynamicReportComponent_kendo_tabstrip_tab_15_ng_template_1_Template(rf, ctx) { if (rf & 1) {
98
+ i0.ɵɵelement(0, "kendo-icon", 21);
99
+ i0.ɵɵelementStart(1, "span", 13);
100
+ i0.ɵɵtext(2, "Details");
101
+ i0.ɵɵelementEnd();
102
+ } }
103
+ function DynamicReportComponent_kendo_tabstrip_tab_15_ng_template_2_div_7_Template(rf, ctx) { if (rf & 1) {
104
+ i0.ɵɵelementStart(0, "div")(1, "span");
105
+ i0.ɵɵtext(2, "Skip Conversation ID:");
106
+ i0.ɵɵelementEnd();
107
+ i0.ɵɵelementStart(3, "span");
108
+ i0.ɵɵtext(4);
109
+ i0.ɵɵelementEnd()();
110
+ } if (rf & 2) {
111
+ const ctx_r21 = i0.ɵɵnextContext(3);
112
+ i0.ɵɵadvance(4);
113
+ i0.ɵɵtextInterpolate(ctx_r21.ConversationID);
114
+ } }
115
+ function DynamicReportComponent_kendo_tabstrip_tab_15_ng_template_2_div_8_Template(rf, ctx) { if (rf & 1) {
116
+ i0.ɵɵelementStart(0, "div")(1, "span");
117
+ i0.ɵɵtext(2, "Skip Conversation Detail ID:");
118
+ i0.ɵɵelementEnd();
119
+ i0.ɵɵelementStart(3, "span");
120
+ i0.ɵɵtext(4);
121
+ i0.ɵɵelementEnd()();
122
+ } if (rf & 2) {
123
+ const ctx_r22 = i0.ɵɵnextContext(3);
124
+ i0.ɵɵadvance(4);
125
+ i0.ɵɵtextInterpolate(ctx_r22.ConversationDetailID);
126
+ } }
127
+ function DynamicReportComponent_kendo_tabstrip_tab_15_ng_template_2_Template(rf, ctx) { if (rf & 1) {
128
+ i0.ɵɵelementStart(0, "div")(1, "span")(2, "b");
129
+ i0.ɵɵtext(3, "SQL:");
130
+ i0.ɵɵelementEnd()();
131
+ i0.ɵɵelementStart(4, "span")(5, "textarea", 22);
132
+ i0.ɵɵtext(6);
133
+ i0.ɵɵelementEnd()()();
134
+ i0.ɵɵtemplate(7, DynamicReportComponent_kendo_tabstrip_tab_15_ng_template_2_div_7_Template, 5, 1, "div", 23);
135
+ i0.ɵɵtemplate(8, DynamicReportComponent_kendo_tabstrip_tab_15_ng_template_2_div_8_Template, 5, 1, "div", 23);
136
+ } if (rf & 2) {
137
+ const ctx_r20 = i0.ɵɵnextContext(2);
138
+ i0.ɵɵadvance(5);
139
+ i0.ɵɵproperty("disabled", true)("fillHeight", false);
140
+ i0.ɵɵadvance(1);
141
+ i0.ɵɵtextInterpolate(ctx_r20.SkipData == null ? null : ctx_r20.SkipData.SQLResults == null ? null : ctx_r20.SkipData.SQLResults.sql);
142
+ i0.ɵɵadvance(1);
143
+ i0.ɵɵproperty("ngIf", ctx_r20.ConversationID !== null);
144
+ i0.ɵɵadvance(1);
145
+ i0.ɵɵproperty("ngIf", ctx_r20.ConversationDetailID !== null);
146
+ } }
147
+ function DynamicReportComponent_kendo_tabstrip_tab_15_Template(rf, ctx) { if (rf & 1) {
148
+ i0.ɵɵelementStart(0, "kendo-tabstrip-tab", 11);
149
+ i0.ɵɵtemplate(1, DynamicReportComponent_kendo_tabstrip_tab_15_ng_template_1_Template, 3, 0, "ng-template", 7);
150
+ i0.ɵɵtemplate(2, DynamicReportComponent_kendo_tabstrip_tab_15_ng_template_2_Template, 9, 5, "ng-template", 8);
151
+ i0.ɵɵelementEnd();
152
+ } if (rf & 2) {
153
+ const ctx_r10 = i0.ɵɵnextContext();
154
+ i0.ɵɵproperty("selected", ctx_r10.isTabSelected(4));
155
+ } }
156
+ // This component is used for dynamically rendering report data, it is wrapped by app-single-report which gets
157
+ // info from the database. This can also be used directly to render a dynamic report that is NOT saved in the DB
158
+ // which is what Skip does in its conversational UI
159
+ export class DynamicReportComponent {
160
+ get SkipData() {
161
+ return this._skipData;
162
+ }
163
+ set SkipData(d) {
164
+ this._skipData = d;
165
+ if (d && !this._loaded)
166
+ this.ngAfterViewInit();
167
+ }
168
+ constructor(sharedService, router) {
169
+ this.sharedService = sharedService;
170
+ this.router = router;
171
+ this.ShowDetailsTab = false;
172
+ this.ShowCreateReportButton = false;
173
+ this.ConversationID = null;
174
+ this.ConversationName = null;
175
+ this.ConversationDetailID = null;
176
+ this.matchingReportID = null;
177
+ this.matchingReportName = null;
178
+ this._loaded = false;
179
+ this.activeTabIndex = 0;
180
+ }
181
+ ngAfterViewInit() {
182
+ return __awaiter(this, void 0, void 0, function* () {
183
+ if (this.SkipData) {
184
+ this._loaded = true;
185
+ if (this.ShowCreateReportButton) {
186
+ // check to see if a report has been created that is linked to this ConvoID/ConvoDetailID
187
+ // if so don't allow the user to create another report, show a link to the existing one
188
+ const rv = new RunView();
189
+ const matchingReports = yield rv.RunView({
190
+ EntityName: 'Reports',
191
+ ExtraFilter: 'ConversationID = ' + this.ConversationID + ' AND ConversationDetailID = ' + this.ConversationDetailID
192
+ });
193
+ if (matchingReports && matchingReports.Success && matchingReports.RowCount > 0) {
194
+ const item = matchingReports.Results.at(0);
195
+ this.matchingReportID = item === null || item === void 0 ? void 0 : item.ID;
196
+ this.matchingReportName = item === null || item === void 0 ? void 0 : item.Name;
197
+ }
198
+ }
199
+ }
200
+ });
201
+ }
202
+ clickMatchingReport() {
203
+ if (this.matchingReportID !== null && this.matchingReportID > 0) {
204
+ // navigate to the report
205
+ this.router.navigate(['resource', 'report', this.matchingReportID]);
206
+ }
207
+ }
208
+ onTabSelect(e) {
209
+ e.preventDefault();
210
+ this.activeTabIndex = e.index;
211
+ this.sharedService.InvokeManualResize(100);
212
+ }
213
+ isTabSelected(index) {
214
+ const offset = !this.IsChart ? 1 : 0;
215
+ return this.activeTabIndex === (index - offset);
216
+ }
217
+ get Columns() {
218
+ var _a;
219
+ return ((_a = this.SkipData) === null || _a === void 0 ? void 0 : _a.SQLResults.columns) || [];
220
+ }
221
+ get IsChart() {
222
+ if (!this.SkipData)
223
+ return false;
224
+ return this.SkipData.DisplayType.trim().toLowerCase() !== 'table';
225
+ }
226
+ get IsTable() {
227
+ if (!this.SkipData)
228
+ return false;
229
+ return this.SkipData.DisplayType.trim().toLowerCase() === 'table';
230
+ }
231
+ createAnalysisHtml() {
232
+ var _a;
233
+ const analysis = (_a = this.SkipData) === null || _a === void 0 ? void 0 : _a.Analysis;
234
+ if (analysis && analysis.length > 0) {
235
+ return this.sharedService.ConvertMarkdownStringToHtmlList(HtmlListType.Unordered, analysis);
236
+ }
237
+ else
238
+ return '<h2>No Analysis Provided</h2>';
239
+ }
240
+ doCreateReport() {
241
+ return __awaiter(this, void 0, void 0, function* () {
242
+ if (!this.SkipData || !this.ConversationID || !this.ConversationName || !this.ConversationDetailID) {
243
+ throw new Error('Must set SkipData, ConversationID, ConversationName, and ConversationDetailID to enable saving report');
244
+ }
245
+ else {
246
+ if (confirm('Do you want to save this report?')) {
247
+ const md = new Metadata();
248
+ const report = yield md.GetEntityObject('Reports');
249
+ report.NewRecord();
250
+ report.Name = this.SkipData.ReportTitle;
251
+ report.Description = this.SkipData.ReportExplanation ? this.SkipData.ReportExplanation : '';
252
+ report.ConversationID = this.ConversationID;
253
+ report.ConversationDetailID = this.ConversationDetailID;
254
+ report.ReportSQL = this.SkipData.SQLResults.sql;
255
+ report.ReportConfiguration = JSON.stringify(this.SkipData);
256
+ report.SharingScope = 'None';
257
+ report.UserID = md.CurrentUser.ID;
258
+ if (yield report.Save()) {
259
+ this.matchingReportID = report.ID;
260
+ this.matchingReportName = report.Name;
261
+ this.sharedService.CreateSimpleNotification(`Report "${report.Name}"Saved`, 'success', 2500);
262
+ }
263
+ else
264
+ this.sharedService.CreateSimpleNotification('Error saving report', 'error', 2500);
265
+ }
266
+ }
267
+ });
268
+ }
269
+ }
270
+ DynamicReportComponent.ɵfac = function DynamicReportComponent_Factory(t) { return new (t || DynamicReportComponent)(i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router)); };
271
+ DynamicReportComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DynamicReportComponent, selectors: [["app-dynamic-report"]], viewQuery: function DynamicReportComponent_Query(rf, ctx) { if (rf & 1) {
272
+ i0.ɵɵviewQuery(_c0, 5);
273
+ i0.ɵɵviewQuery(_c1, 5);
274
+ i0.ɵɵviewQuery(_c2, 5);
275
+ } if (rf & 2) {
276
+ let _t;
277
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.theGrid = _t.first);
278
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.theChart = _t.first);
279
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabStrip = _t.first);
280
+ } }, inputs: { ShowDetailsTab: "ShowDetailsTab", ShowCreateReportButton: "ShowCreateReportButton", ConversationID: "ConversationID", ConversationName: "ConversationName", ConversationDetailID: "ConversationDetailID", SkipData: "SkipData" }, decls: 16, vars: 12, consts: [["mjFillContainer", ""], ["kendoButton", "", "class", "create-report-button", 3, "click", 4, "ngIf"], ["class", "report-link", 3, "click", 4, "ngIf"], ["mjFillContainer", "", 1, "report-tabstrip", 3, "keepTabContent", "animate", "tabSelect"], ["tabStrip", ""], [3, "selected", 4, "ngIf"], [3, "closable", "selected"], ["kendoTabTitle", ""], ["kendoTabContent", "", "class", "report-tab-contents"], ["kendoButton", "", 1, "create-report-button", 3, "click"], [1, "report-link", 3, "click"], [3, "selected"], ["name", "graph"], [1, "report-tab-title"], ["mjFillContainer", "", 3, "SkipData"], ["theChart", ""], ["name", "table"], ["theGrid", ""], ["src", "assets/Skip - Mark Only - Small.png", 1, "avatar", 2, "height", "16px", "width", "16px"], ["mjFillContainer", "", 3, "innerHTML"], ["name", "file"], ["name", "page-properties"], ["mjFillContainer", "", 3, "disabled", "fillHeight"], [4, "ngIf"]], template: function DynamicReportComponent_Template(rf, ctx) { if (rf & 1) {
281
+ i0.ɵɵelementStart(0, "div", 0);
282
+ i0.ɵɵtemplate(1, DynamicReportComponent_button_1_Template, 2, 0, "button", 1);
283
+ i0.ɵɵtemplate(2, DynamicReportComponent_div_2_Template, 2, 2, "div", 2);
284
+ i0.ɵɵelementStart(3, "kendo-tabstrip", 3, 4);
285
+ i0.ɵɵlistener("tabSelect", function DynamicReportComponent_Template_kendo_tabstrip_tabSelect_3_listener($event) { return ctx.onTabSelect($event); });
286
+ i0.ɵɵtemplate(5, DynamicReportComponent_kendo_tabstrip_tab_5_Template, 3, 1, "kendo-tabstrip-tab", 5);
287
+ i0.ɵɵelementStart(6, "kendo-tabstrip-tab", 6);
288
+ i0.ɵɵtemplate(7, DynamicReportComponent_ng_template_7_Template, 3, 0, "ng-template", 7);
289
+ i0.ɵɵtemplate(8, DynamicReportComponent_ng_template_8_Template, 2, 1, "ng-template", 8);
290
+ i0.ɵɵelementEnd();
291
+ i0.ɵɵelementStart(9, "kendo-tabstrip-tab", 6);
292
+ i0.ɵɵtemplate(10, DynamicReportComponent_ng_template_10_Template, 3, 0, "ng-template", 7);
293
+ i0.ɵɵtemplate(11, DynamicReportComponent_ng_template_11_Template, 1, 1, "ng-template", 8);
294
+ i0.ɵɵelementEnd();
295
+ i0.ɵɵelementStart(12, "kendo-tabstrip-tab", 6);
296
+ i0.ɵɵtemplate(13, DynamicReportComponent_ng_template_13_Template, 3, 0, "ng-template", 7);
297
+ i0.ɵɵtemplate(14, DynamicReportComponent_ng_template_14_Template, 2, 1, "ng-template", 8);
298
+ i0.ɵɵelementEnd();
299
+ i0.ɵɵtemplate(15, DynamicReportComponent_kendo_tabstrip_tab_15_Template, 3, 1, "kendo-tabstrip-tab", 5);
300
+ i0.ɵɵelementEnd()();
301
+ } if (rf & 2) {
302
+ i0.ɵɵadvance(1);
303
+ i0.ɵɵproperty("ngIf", ctx.ShowCreateReportButton && !ctx.matchingReportID);
304
+ i0.ɵɵadvance(1);
305
+ i0.ɵɵproperty("ngIf", ctx.matchingReportID !== null);
306
+ i0.ɵɵadvance(1);
307
+ i0.ɵɵproperty("keepTabContent", true)("animate", false);
308
+ i0.ɵɵadvance(2);
309
+ i0.ɵɵproperty("ngIf", ctx.IsChart);
310
+ i0.ɵɵadvance(1);
311
+ i0.ɵɵproperty("closable", false)("selected", ctx.isTabSelected(1));
312
+ i0.ɵɵadvance(3);
313
+ i0.ɵɵproperty("closable", false)("selected", ctx.isTabSelected(2));
314
+ i0.ɵɵadvance(3);
315
+ i0.ɵɵproperty("closable", false)("selected", ctx.isTabSelected(3));
316
+ i0.ɵɵadvance(3);
317
+ i0.ɵɵproperty("ngIf", ctx.ShowDetailsTab);
318
+ } }, styles: [".report-tab-title[_ngcontent-%COMP%] { margin-left: 10px;}", ".create-report-button[_ngcontent-%COMP%] { \n margin-bottom: 10px;\n margin-top: 10px;\n }", ".report-link[_ngcontent-%COMP%] {\n margin-top: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n color: blue;\n font-weight: bold;\n }"] });
319
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DynamicReportComponent, [{
320
+ type: Component,
321
+ args: [{ selector: 'app-dynamic-report', template: `
322
+ <div mjFillContainer>
323
+ <button kendoButton *ngIf="ShowCreateReportButton && !matchingReportID" (click)="doCreateReport()" class="create-report-button">Create Report</button>
324
+ <div *ngIf="matchingReportID!==null" class="report-link" (click)="clickMatchingReport()">Report: {{matchingReportName}} (ID: {{matchingReportID}}) Created From This Message</div>
325
+ <kendo-tabstrip mjFillContainer [keepTabContent]="true" [animate]="false" class="report-tabstrip" (tabSelect)="onTabSelect($event)" #tabStrip>
326
+ <kendo-tabstrip-tab *ngIf="IsChart" [selected]="isTabSelected(0)">
327
+ <ng-template kendoTabTitle>
328
+ <kendo-icon name="graph" ></kendo-icon>
329
+ <span class="report-tab-title">Chart</span>
330
+ </ng-template>
331
+ <ng-template kendoTabContent class="report-tab-contents">
332
+ <app-dynamic-chart mjFillContainer #theChart [SkipData]="SkipData">
333
+ </app-dynamic-chart>
334
+ </ng-template>
335
+ </kendo-tabstrip-tab>
336
+ <kendo-tabstrip-tab [closable]="false" [selected]="isTabSelected(1)">
337
+ <ng-template kendoTabTitle>
338
+ <kendo-icon name="table"></kendo-icon>
339
+ <span class="report-tab-title">Table</span>
340
+ </ng-template>
341
+ <ng-template kendoTabContent class="report-tab-contents">
342
+ <app-dynamic-grid mjFillContainer #theGrid [SkipData]="SkipData">
343
+ </app-dynamic-grid>
344
+ </ng-template>
345
+ </kendo-tabstrip-tab>
346
+ <kendo-tabstrip-tab [closable]="false" [selected]="isTabSelected(2)">
347
+ <ng-template kendoTabTitle>
348
+ <img src="assets/Skip - Mark Only - Small.png" class="avatar" style="height:16px;width:16px;" />
349
+ <span class="report-tab-title">Analysis</span>
350
+ </ng-template>
351
+ <ng-template kendoTabContent class="report-tab-contents">
352
+ <div mjFillContainer [innerHTML]="createAnalysisHtml()"></div>
353
+ </ng-template>
354
+ </kendo-tabstrip-tab>
355
+ <kendo-tabstrip-tab [closable]="false" [selected]="isTabSelected(3)">
356
+ <ng-template kendoTabTitle>
357
+ <kendo-icon name="file"></kendo-icon>
358
+ <span class="report-tab-title">Explanation</span>
359
+ </ng-template>
360
+ <ng-template kendoTabContent class="report-tab-contents">
361
+ <div mjFillContainer>{{SkipData?.ReportExplanation || 'No Explanation Provided'}}</div>
362
+ </ng-template>
363
+ </kendo-tabstrip-tab>
364
+ <kendo-tabstrip-tab *ngIf="ShowDetailsTab" [selected]="isTabSelected(4)">
365
+ <ng-template kendoTabTitle>
366
+ <kendo-icon name="page-properties"></kendo-icon>
367
+ <span class="report-tab-title">Details</span>
368
+ </ng-template>
369
+ <ng-template kendoTabContent class="report-tab-contents">
370
+ <div><span><b>SQL:</b></span><span><textarea [disabled]="true" mjFillContainer [fillHeight]="false">{{SkipData?.SQLResults?.sql}}</textarea></span></div>
371
+ <div *ngIf="ConversationID!==null"><span>Skip Conversation ID:</span><span>{{ConversationID}}</span></div>
372
+ <div *ngIf="ConversationDetailID!==null"><span>Skip Conversation Detail ID:</span><span>{{ConversationDetailID}}</span></div>
373
+ </ng-template>
374
+ </kendo-tabstrip-tab>
375
+ </kendo-tabstrip>
376
+ </div>
377
+ `, styles: [".report-tab-title { margin-left: 10px;}", ".create-report-button { \n margin-bottom: 10px;\n margin-top: 10px;\n }", ".report-link {\n margin-top: 10px;\n margin-bottom: 10px;\n cursor: pointer;\n color: blue;\n font-weight: bold;\n }"] }]
378
+ }], function () { return [{ type: i1.SharedService }, { type: i2.Router }]; }, { ShowDetailsTab: [{
379
+ type: Input
380
+ }], ShowCreateReportButton: [{
381
+ type: Input
382
+ }], ConversationID: [{
383
+ type: Input
384
+ }], ConversationName: [{
385
+ type: Input
386
+ }], ConversationDetailID: [{
387
+ type: Input
388
+ }], SkipData: [{
389
+ type: Input
390
+ }], theGrid: [{
391
+ type: ViewChild,
392
+ args: ['theGrid', { static: false }]
393
+ }], theChart: [{
394
+ type: ViewChild,
395
+ args: ['theChart', { static: false }]
396
+ }], tabStrip: [{
397
+ type: ViewChild,
398
+ args: ['tabStrip', { static: false }]
399
+ }] }); })();
@@ -0,0 +1,7 @@
1
+ import { BaseFormComponent } from './base-form-component';
2
+ import * as i0 from "@angular/core";
3
+ export declare class FormToolbarComponent {
4
+ form: BaseFormComponent;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormToolbarComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormToolbarComponent, "mj-form-toolbar", never, { "form": "form"; }, {}, never, never, false, never>;
7
+ }
@@ -0,0 +1,98 @@
1
+ import { Component, Input } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ import * as i1 from "@angular/common";
4
+ import * as i2 from "@progress/kendo-angular-buttons";
5
+ import * as i3 from "@memberjunction/ng-record-changes";
6
+ function FormToolbarComponent_button_0_Template(rf, ctx) { if (rf & 1) {
7
+ const _r8 = i0.ɵɵgetCurrentView();
8
+ i0.ɵɵelementStart(0, "button", 2);
9
+ i0.ɵɵlistener("click", function FormToolbarComponent_button_0_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r8); const ctx_r7 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r7.form.StartEditMode()); });
10
+ i0.ɵɵtext(1, "Edit Record");
11
+ i0.ɵɵelementEnd();
12
+ } }
13
+ function FormToolbarComponent_button_1_Template(rf, ctx) { if (rf & 1) {
14
+ const _r10 = i0.ɵɵgetCurrentView();
15
+ i0.ɵɵelementStart(0, "button", 2);
16
+ i0.ɵɵlistener("click", function FormToolbarComponent_button_1_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r10); const ctx_r9 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r9.form.SaveRecord(true)); });
17
+ i0.ɵɵtext(1, "Save Record");
18
+ i0.ɵɵelementEnd();
19
+ } }
20
+ function FormToolbarComponent_button_2_Template(rf, ctx) { if (rf & 1) {
21
+ const _r12 = i0.ɵɵgetCurrentView();
22
+ i0.ɵɵelementStart(0, "button", 2);
23
+ i0.ɵɵlistener("click", function FormToolbarComponent_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r12); const ctx_r11 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r11.form.CancelEdit()); });
24
+ i0.ɵɵtext(1, "Cancel");
25
+ i0.ɵɵelementEnd();
26
+ } }
27
+ function FormToolbarComponent_button_3_Template(rf, ctx) { if (rf & 1) {
28
+ const _r14 = i0.ɵɵgetCurrentView();
29
+ i0.ɵɵelementStart(0, "button", 2);
30
+ i0.ɵɵlistener("click", function FormToolbarComponent_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r13 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r13.form.RemoveFavorite()); });
31
+ i0.ɵɵtext(1, "Remove Favorite");
32
+ i0.ɵɵelementEnd();
33
+ } }
34
+ function FormToolbarComponent_button_4_Template(rf, ctx) { if (rf & 1) {
35
+ const _r16 = i0.ɵɵgetCurrentView();
36
+ i0.ɵɵelementStart(0, "button", 2);
37
+ i0.ɵɵlistener("click", function FormToolbarComponent_button_4_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r16); const ctx_r15 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r15.form.MakeFavorite()); });
38
+ i0.ɵɵtext(1, "Make Favorite");
39
+ i0.ɵɵelementEnd();
40
+ } }
41
+ function FormToolbarComponent_button_5_Template(rf, ctx) { if (rf & 1) {
42
+ const _r18 = i0.ɵɵgetCurrentView();
43
+ i0.ɵɵelementStart(0, "button", 2);
44
+ i0.ɵɵlistener("click", function FormToolbarComponent_button_5_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r18); const ctx_r17 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r17.form.handleHistoryDialog()); });
45
+ i0.ɵɵtext(1, "History");
46
+ i0.ɵɵelementEnd();
47
+ } }
48
+ function FormToolbarComponent_mj_record_changes_7_Template(rf, ctx) { if (rf & 1) {
49
+ const _r20 = i0.ɵɵgetCurrentView();
50
+ i0.ɵɵelementStart(0, "mj-record-changes", 3);
51
+ i0.ɵɵlistener("dialogClosed", function FormToolbarComponent_mj_record_changes_7_Template_mj_record_changes_dialogClosed_0_listener() { i0.ɵɵrestoreView(_r20); const ctx_r19 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r19.form.handleHistoryDialog()); });
52
+ i0.ɵɵelementEnd();
53
+ } if (rf & 2) {
54
+ const ctx_r6 = i0.ɵɵnextContext();
55
+ i0.ɵɵproperty("record", ctx_r6.form.record);
56
+ } }
57
+ export class FormToolbarComponent {
58
+ }
59
+ FormToolbarComponent.ɵfac = function FormToolbarComponent_Factory(t) { return new (t || FormToolbarComponent)(); };
60
+ FormToolbarComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FormToolbarComponent, selectors: [["mj-form-toolbar"]], inputs: { form: "form" }, decls: 8, vars: 7, consts: [["kendoButton", "", 3, "click", 4, "ngIf"], [3, "record", "dialogClosed", 4, "ngIf"], ["kendoButton", "", 3, "click"], [3, "record", "dialogClosed"]], template: function FormToolbarComponent_Template(rf, ctx) { if (rf & 1) {
61
+ i0.ɵɵtemplate(0, FormToolbarComponent_button_0_Template, 2, 0, "button", 0);
62
+ i0.ɵɵtemplate(1, FormToolbarComponent_button_1_Template, 2, 0, "button", 0);
63
+ i0.ɵɵtemplate(2, FormToolbarComponent_button_2_Template, 2, 0, "button", 0);
64
+ i0.ɵɵtemplate(3, FormToolbarComponent_button_3_Template, 2, 0, "button", 0);
65
+ i0.ɵɵtemplate(4, FormToolbarComponent_button_4_Template, 2, 0, "button", 0);
66
+ i0.ɵɵtemplate(5, FormToolbarComponent_button_5_Template, 2, 0, "button", 0);
67
+ i0.ɵɵelement(6, "hr");
68
+ i0.ɵɵtemplate(7, FormToolbarComponent_mj_record_changes_7_Template, 1, 1, "mj-record-changes", 1);
69
+ } if (rf & 2) {
70
+ i0.ɵɵproperty("ngIf", !ctx.form.EditMode && ctx.form.UserCanEdit);
71
+ i0.ɵɵadvance(1);
72
+ i0.ɵɵproperty("ngIf", ctx.form.EditMode);
73
+ i0.ɵɵadvance(1);
74
+ i0.ɵɵproperty("ngIf", ctx.form.EditMode);
75
+ i0.ɵɵadvance(1);
76
+ i0.ɵɵproperty("ngIf", ctx.form.FavoriteInitDone && ctx.form.IsFavorite);
77
+ i0.ɵɵadvance(1);
78
+ i0.ɵɵproperty("ngIf", ctx.form.FavoriteInitDone && !ctx.form.IsFavorite);
79
+ i0.ɵɵadvance(1);
80
+ i0.ɵɵproperty("ngIf", ctx.form.EntityInfo == null ? null : ctx.form.EntityInfo.TrackRecordChanges);
81
+ i0.ɵɵadvance(2);
82
+ i0.ɵɵproperty("ngIf", ctx.form.isHistoryDialogOpen);
83
+ } }, dependencies: [i1.NgIf, i2.Button, i3.RecordChangesComponent], styles: ["button[_ngcontent-%COMP%] { margin-right: 10px; }"] });
84
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormToolbarComponent, [{
85
+ type: Component,
86
+ args: [{ selector: 'mj-form-toolbar', template: `
87
+ <button kendoButton *ngIf="!this.form.EditMode && this.form.UserCanEdit" (click)="this.form.StartEditMode()">Edit Record</button>
88
+ <button kendoButton *ngIf="this.form.EditMode" (click)="this.form.SaveRecord(true)">Save Record</button>
89
+ <button kendoButton *ngIf="this.form.EditMode" (click)="this.form.CancelEdit()">Cancel</button>
90
+ <button kendoButton *ngIf="this.form.FavoriteInitDone && this.form.IsFavorite" (click)="this.form.RemoveFavorite()">Remove Favorite</button>
91
+ <button kendoButton *ngIf="this.form.FavoriteInitDone && !this.form.IsFavorite" (click)="this.form.MakeFavorite()">Make Favorite</button>
92
+ <button kendoButton *ngIf="this.form.EntityInfo?.TrackRecordChanges" (click)="this.form.handleHistoryDialog()">History</button>
93
+ <hr />
94
+ <mj-record-changes *ngIf="this.form.isHistoryDialogOpen" [record]="this.form.record" (dialogClosed)="this.form.handleHistoryDialog()"></mj-record-changes>
95
+ `, styles: ["button { margin-right: 10px; }"] }]
96
+ }], null, { form: [{
97
+ type: Input
98
+ }] }); })();
@@ -0,0 +1,25 @@
1
+ import { EventEmitter, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { SharedService } from '../shared/shared.service';
3
+ import { Container } from '@memberjunction/ng-container-directives';
4
+ import { BaseEntity } from '@memberjunction/core';
5
+ import { ResourceData } from './base-resource-component';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ResourceContainerComponent implements OnChanges {
8
+ sharedService: SharedService;
9
+ Data: ResourceData;
10
+ isVisible: boolean;
11
+ ResourceRecordSaved: EventEmitter<BaseEntity>;
12
+ ContentLoadingStarted: EventEmitter<ResourceContainerComponent>;
13
+ ContentLoadingComplete: EventEmitter<ResourceContainerComponent>;
14
+ private _loadStarted;
15
+ get LoadStarted(): boolean;
16
+ private _loadComplete;
17
+ get LoadComplete(): boolean;
18
+ resourceContainer: Container;
19
+ private _loaded;
20
+ constructor(sharedService: SharedService);
21
+ ngOnChanges(changes: SimpleChanges): void;
22
+ loadComponent(): void;
23
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResourceContainerComponent, never>;
24
+ static ɵcmp: i0.ɵɵComponentDeclaration<ResourceContainerComponent, "app-resource", never, { "Data": "Data"; "isVisible": "isVisible"; }, { "ResourceRecordSaved": "ResourceRecordSaved"; "ContentLoadingStarted": "ContentLoadingStarted"; "ContentLoadingComplete": "ContentLoadingComplete"; }, never, never, false, never>;
25
+ }
@@ -0,0 +1,103 @@
1
+ import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
2
+ import { Container } from '@memberjunction/ng-container-directives';
3
+ import { LogError } from '@memberjunction/core';
4
+ import { MJGlobal } from '@memberjunction/global';
5
+ import { BaseResourceComponent } from './base-resource-component';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "../shared/shared.service";
8
+ import * as i2 from "@memberjunction/ng-container-directives";
9
+ function ResourceContainerComponent_ng_template_0_Template(rf, ctx) { }
10
+ export class ResourceContainerComponent {
11
+ get LoadStarted() {
12
+ return this._loadStarted;
13
+ }
14
+ get LoadComplete() {
15
+ return this._loadComplete;
16
+ }
17
+ constructor(sharedService) {
18
+ this.sharedService = sharedService;
19
+ this.isVisible = false;
20
+ this.ResourceRecordSaved = new EventEmitter();
21
+ this.ContentLoadingStarted = new EventEmitter();
22
+ this.ContentLoadingComplete = new EventEmitter();
23
+ this._loadStarted = false;
24
+ this._loadComplete = false;
25
+ this._loaded = false;
26
+ }
27
+ ngOnChanges(changes) {
28
+ if (changes['isVisible']) {
29
+ const previousValue = changes['isVisible'].previousValue;
30
+ const currentValue = changes['isVisible'].currentValue;
31
+ if (previousValue !== currentValue) {
32
+ // visible state has changed
33
+ if (!this._loaded && currentValue) {
34
+ // first time we are loading this resource, so go ahead and load whatever our component type is
35
+ this.loadComponent();
36
+ }
37
+ }
38
+ }
39
+ }
40
+ loadComponent() {
41
+ try {
42
+ this._loaded = true;
43
+ const resourceReg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseResourceComponent, this.Data.ResourceType);
44
+ if (!resourceReg) {
45
+ throw new Error(`Unable to find resource registration for ${this.Data.ResourceType}`);
46
+ }
47
+ const viewContainerRef = this.resourceContainer.viewContainerRef;
48
+ if (!viewContainerRef) {
49
+ throw new Error(`Unable to find viewContainerRef`);
50
+ }
51
+ viewContainerRef.clear();
52
+ const componentRef = viewContainerRef.createComponent(resourceReg.SubClass);
53
+ componentRef.instance.LoadCompleteEvent = () => {
54
+ this._loadComplete = true;
55
+ this.ContentLoadingComplete.emit(this);
56
+ };
57
+ componentRef.instance.ResourceRecordSavedEvent = (resourceRecordEntity) => {
58
+ // bubble up the event
59
+ this.ResourceRecordSaved.emit(resourceRecordEntity);
60
+ };
61
+ componentRef.instance.Data = this.Data;
62
+ // do this right away since we have started
63
+ this.ContentLoadingStarted.emit(this);
64
+ // AND - wire up the event because we might start again in the future - example dashboards where a user can change the dashboard and add items etc
65
+ componentRef.instance.LoadStartedEvent = () => {
66
+ this._loadStarted = true;
67
+ this.ContentLoadingStarted.emit(this);
68
+ };
69
+ }
70
+ catch (e) {
71
+ LogError(e);
72
+ }
73
+ }
74
+ }
75
+ ResourceContainerComponent.ɵfac = function ResourceContainerComponent_Factory(t) { return new (t || ResourceContainerComponent)(i0.ɵɵdirectiveInject(i1.SharedService)); };
76
+ ResourceContainerComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ResourceContainerComponent, selectors: [["app-resource"]], viewQuery: function ResourceContainerComponent_Query(rf, ctx) { if (rf & 1) {
77
+ i0.ɵɵviewQuery(Container, 7);
78
+ } if (rf & 2) {
79
+ let _t;
80
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.resourceContainer = _t.first);
81
+ } }, inputs: { Data: "Data", isVisible: "isVisible" }, outputs: { ResourceRecordSaved: "ResourceRecordSaved", ContentLoadingStarted: "ContentLoadingStarted", ContentLoadingComplete: "ContentLoadingComplete" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 0, consts: [["mjContainer", "", "mjFillContainer", ""]], template: function ResourceContainerComponent_Template(rf, ctx) { if (rf & 1) {
82
+ i0.ɵɵtemplate(0, ResourceContainerComponent_ng_template_0_Template, 0, 0, "ng-template", 0);
83
+ } }, dependencies: [i2.FillContainer, i2.Container], encapsulation: 2 });
84
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ResourceContainerComponent, [{
85
+ type: Component,
86
+ args: [{
87
+ selector: 'app-resource',
88
+ template: `<ng-template mjContainer mjFillContainer></ng-template>`,
89
+ }]
90
+ }], function () { return [{ type: i1.SharedService }]; }, { Data: [{
91
+ type: Input
92
+ }], isVisible: [{
93
+ type: Input
94
+ }], ResourceRecordSaved: [{
95
+ type: Output
96
+ }], ContentLoadingStarted: [{
97
+ type: Output
98
+ }], ContentLoadingComplete: [{
99
+ type: Output
100
+ }], resourceContainer: [{
101
+ type: ViewChild,
102
+ args: [Container, { static: true }]
103
+ }] }); })();
@@ -0,0 +1,17 @@
1
+ import { OnDestroy, ViewContainerRef, AfterViewInit, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { BaseEntity } from '@memberjunction/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SectionLoaderComponent implements AfterViewInit, OnDestroy, OnChanges {
5
+ Entity: string;
6
+ Section: string;
7
+ record: BaseEntity;
8
+ EditMode: boolean;
9
+ container: ViewContainerRef;
10
+ private _sectionObj;
11
+ ngOnChanges(changes: SimpleChanges): void;
12
+ ngAfterViewInit(): void;
13
+ private loadComponent;
14
+ ngOnDestroy(): void;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<SectionLoaderComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionLoaderComponent, "mj-form-section", never, { "Entity": "Entity"; "Section": "Section"; "record": "record"; "EditMode": "EditMode"; }, {}, never, never, false, never>;
17
+ }