@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,95 @@
|
|
|
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 { Metadata } from '@memberjunction/core';
|
|
12
|
+
import { MJGlobal } from '@memberjunction/global';
|
|
13
|
+
import { Container } from '@memberjunction/ng-container-directives';
|
|
14
|
+
import { BaseFormComponent } from '../generic/base-form-component';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
import * as i1 from "@angular/router";
|
|
17
|
+
import * as i2 from "@angular/common";
|
|
18
|
+
import * as i3 from "@progress/kendo-angular-indicators";
|
|
19
|
+
import * as i4 from "@memberjunction/ng-container-directives";
|
|
20
|
+
function SingleRecordComponent_kendo_loader_0_Template(rf, ctx) { if (rf & 1) {
|
|
21
|
+
i0.ɵɵelement(0, "kendo-loader", 2);
|
|
22
|
+
} }
|
|
23
|
+
function SingleRecordComponent_ng_template_1_Template(rf, ctx) { }
|
|
24
|
+
export class SingleRecordComponent {
|
|
25
|
+
constructor(route) {
|
|
26
|
+
this.route = route;
|
|
27
|
+
this.recordId = -1;
|
|
28
|
+
this.entityName = '';
|
|
29
|
+
this.loadComplete = new EventEmitter();
|
|
30
|
+
this.appDescription = '';
|
|
31
|
+
this.useGenericForm = false;
|
|
32
|
+
this.loading = true;
|
|
33
|
+
}
|
|
34
|
+
ngOnInit() {
|
|
35
|
+
}
|
|
36
|
+
ngAfterViewInit() {
|
|
37
|
+
this.LoadForm(this.recordId, this.entityName);
|
|
38
|
+
}
|
|
39
|
+
LoadForm(recordId, entityName) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
// Perform any necessary actions with the ViewID, such as fetching data
|
|
42
|
+
if (recordId && entityName) {
|
|
43
|
+
this.entityName = entityName;
|
|
44
|
+
this.recordId = recordId;
|
|
45
|
+
const formReg = MJGlobal.Instance.ClassFactory.GetRegistration(BaseFormComponent, entityName);
|
|
46
|
+
const md = new Metadata();
|
|
47
|
+
const entity = md.Entities.find(e => {
|
|
48
|
+
return e.Name === entityName;
|
|
49
|
+
});
|
|
50
|
+
const permissions = entity === null || entity === void 0 ? void 0 : entity.GetUserPermisions(md.CurrentUser);
|
|
51
|
+
if (formReg) {
|
|
52
|
+
const record = yield md.GetEntityObject(entityName);
|
|
53
|
+
if (record) {
|
|
54
|
+
yield record.Load(recordId);
|
|
55
|
+
const viewContainerRef = this.formContainer.viewContainerRef;
|
|
56
|
+
viewContainerRef.clear();
|
|
57
|
+
const componentRef = viewContainerRef.createComponent(formReg.SubClass);
|
|
58
|
+
componentRef.instance.record = record;
|
|
59
|
+
componentRef.instance.userPermissions = permissions;
|
|
60
|
+
this.useGenericForm = false;
|
|
61
|
+
this.loadComplete.emit();
|
|
62
|
+
}
|
|
63
|
+
else
|
|
64
|
+
throw new Error(`Unable to load entity ${entityName} with ID ${recordId}`);
|
|
65
|
+
}
|
|
66
|
+
this.loading = false;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
SingleRecordComponent.ɵfac = function SingleRecordComponent_Factory(t) { return new (t || SingleRecordComponent)(i0.ɵɵdirectiveInject(i1.ActivatedRoute)); };
|
|
72
|
+
SingleRecordComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleRecordComponent, selectors: [["app-single-record"]], viewQuery: function SingleRecordComponent_Query(rf, ctx) { if (rf & 1) {
|
|
73
|
+
i0.ɵɵviewQuery(Container, 7);
|
|
74
|
+
} if (rf & 2) {
|
|
75
|
+
let _t;
|
|
76
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.formContainer = _t.first);
|
|
77
|
+
} }, inputs: { recordId: "recordId", entityName: "entityName" }, outputs: { loadComplete: "loadComplete" }, decls: 2, vars: 1, consts: [["type", "converging-spinner", 4, "ngIf"], ["mjContainer", ""], ["type", "converging-spinner"]], template: function SingleRecordComponent_Template(rf, ctx) { if (rf & 1) {
|
|
78
|
+
i0.ɵɵtemplate(0, SingleRecordComponent_kendo_loader_0_Template, 1, 0, "kendo-loader", 0);
|
|
79
|
+
i0.ɵɵtemplate(1, SingleRecordComponent_ng_template_1_Template, 0, 0, "ng-template", 1);
|
|
80
|
+
} if (rf & 2) {
|
|
81
|
+
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
82
|
+
} }, dependencies: [i2.NgIf, i3.LoaderComponent, i4.Container] });
|
|
83
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleRecordComponent, [{
|
|
84
|
+
type: Component,
|
|
85
|
+
args: [{ selector: 'app-single-record', template: "<kendo-loader *ngIf=\"loading\" type=\"converging-spinner\" ></kendo-loader>\r\n<ng-template mjContainer></ng-template>" }]
|
|
86
|
+
}], function () { return [{ type: i1.ActivatedRoute }]; }, { formContainer: [{
|
|
87
|
+
type: ViewChild,
|
|
88
|
+
args: [Container, { static: true }]
|
|
89
|
+
}], recordId: [{
|
|
90
|
+
type: Input
|
|
91
|
+
}], entityName: [{
|
|
92
|
+
type: Input
|
|
93
|
+
}], loadComplete: [{
|
|
94
|
+
type: Output
|
|
95
|
+
}] }); })();
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
+
import { ReportEntity } from '@memberjunction/core-entities';
|
|
3
|
+
import { SkipColumnInfo, SkipData } from '../ask-skip/ask-skip.component';
|
|
4
|
+
import { DynamicReportComponent } from '../generic/dynamic-report';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class SingleReportComponent implements OnInit {
|
|
7
|
+
reportId: number;
|
|
8
|
+
loadComplete: EventEmitter<any>;
|
|
9
|
+
loadStarted: EventEmitter<any>;
|
|
10
|
+
theReport: DynamicReportComponent;
|
|
11
|
+
ReportEntity: ReportEntity;
|
|
12
|
+
reportData: any[];
|
|
13
|
+
ReportConfiguration: SkipData | undefined;
|
|
14
|
+
get IsChart(): boolean;
|
|
15
|
+
get IsTable(): boolean;
|
|
16
|
+
get Columns(): SkipColumnInfo[];
|
|
17
|
+
get Report(): DynamicReportComponent;
|
|
18
|
+
ngOnInit(): void;
|
|
19
|
+
doLoad(): Promise<void>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SingleReportComponent, never>;
|
|
21
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SingleReportComponent, "app-single-report", never, { "reportId": "reportId"; }, { "loadComplete": "loadComplete"; "loadStarted": "loadStarted"; }, never, never, false, never>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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 { LogError, Metadata, RunReport } from '@memberjunction/core';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "@memberjunction/ng-container-directives";
|
|
14
|
+
import * as i2 from "../generic/dynamic-report";
|
|
15
|
+
const _c0 = ["theReport"];
|
|
16
|
+
export class SingleReportComponent {
|
|
17
|
+
constructor() {
|
|
18
|
+
this.loadComplete = new EventEmitter();
|
|
19
|
+
this.loadStarted = new EventEmitter();
|
|
20
|
+
}
|
|
21
|
+
get IsChart() {
|
|
22
|
+
return this.theReport.IsChart;
|
|
23
|
+
}
|
|
24
|
+
get IsTable() {
|
|
25
|
+
return this.theReport.IsTable;
|
|
26
|
+
}
|
|
27
|
+
get Columns() {
|
|
28
|
+
return this.theReport.Columns;
|
|
29
|
+
}
|
|
30
|
+
get Report() {
|
|
31
|
+
return this.theReport;
|
|
32
|
+
}
|
|
33
|
+
ngOnInit() {
|
|
34
|
+
this.doLoad();
|
|
35
|
+
}
|
|
36
|
+
doLoad() {
|
|
37
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
try {
|
|
39
|
+
// get info on the report we are loading
|
|
40
|
+
this.loadStarted.emit();
|
|
41
|
+
const md = new Metadata();
|
|
42
|
+
this.ReportEntity = (yield md.GetEntityObject('Reports'));
|
|
43
|
+
yield this.ReportEntity.Load(this.reportId);
|
|
44
|
+
this.ReportConfiguration = JSON.parse(this.ReportEntity.ReportConfiguration);
|
|
45
|
+
const runReport = new RunReport();
|
|
46
|
+
const result = yield runReport.RunReport({ ReportID: this.reportId });
|
|
47
|
+
if (result && result.Success && result.Results.length > 0) {
|
|
48
|
+
this.reportData = result.Results;
|
|
49
|
+
if (this.ReportConfiguration && this.ReportConfiguration.SQLResults)
|
|
50
|
+
this.ReportConfiguration.SQLResults.results = this.reportData; // put the report data into the right spot so the dynamic report knows where to get it
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
// report has an invalid configuration
|
|
54
|
+
throw new Error('Error running report: invalid value from ReportConfiguration field ');
|
|
55
|
+
}
|
|
56
|
+
this.loadComplete.emit();
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
LogError(err);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
SingleReportComponent.ɵfac = function SingleReportComponent_Factory(t) { return new (t || SingleReportComponent)(); };
|
|
65
|
+
SingleReportComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleReportComponent, selectors: [["app-single-report"]], viewQuery: function SingleReportComponent_Query(rf, ctx) { if (rf & 1) {
|
|
66
|
+
i0.ɵɵviewQuery(_c0, 7);
|
|
67
|
+
} if (rf & 2) {
|
|
68
|
+
let _t;
|
|
69
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.theReport = _t.first);
|
|
70
|
+
} }, inputs: { reportId: "reportId" }, outputs: { loadComplete: "loadComplete", loadStarted: "loadStarted" }, decls: 2, vars: 4, consts: [["mjFillContainer", "", 3, "ShowDetailsTab", "SkipData", "ConversationID", "ConversationDetailID"], ["theReport", ""]], template: function SingleReportComponent_Template(rf, ctx) { if (rf & 1) {
|
|
71
|
+
i0.ɵɵelement(0, "app-dynamic-report", 0, 1);
|
|
72
|
+
} if (rf & 2) {
|
|
73
|
+
i0.ɵɵproperty("ShowDetailsTab", true)("SkipData", ctx.ReportConfiguration)("ConversationID", ctx.ReportEntity.ConversationID)("ConversationDetailID", ctx.ReportEntity.ConversationDetailID);
|
|
74
|
+
} }, dependencies: [i1.FillContainer, i2.DynamicReportComponent] });
|
|
75
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleReportComponent, [{
|
|
76
|
+
type: Component,
|
|
77
|
+
args: [{ selector: 'app-single-report', template: "<app-dynamic-report mjFillContainer #theReport [ShowDetailsTab]=\"true\" [SkipData]=\"ReportConfiguration\"\r\n [ConversationID]=\"ReportEntity.ConversationID\"\r\n [ConversationDetailID]=\"ReportEntity.ConversationDetailID\"></app-dynamic-report>" }]
|
|
78
|
+
}], null, { reportId: [{
|
|
79
|
+
type: Input
|
|
80
|
+
}], loadComplete: [{
|
|
81
|
+
type: Output
|
|
82
|
+
}], loadStarted: [{
|
|
83
|
+
type: Output
|
|
84
|
+
}], theReport: [{
|
|
85
|
+
type: ViewChild,
|
|
86
|
+
args: ['theReport', { static: true }]
|
|
87
|
+
}] }); })();
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EventEmitter, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { RunViewParams } from '@memberjunction/core';
|
|
3
|
+
import { UserViewGridComponent } from '@memberjunction/ng-user-view-grid';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SingleSearchResultComponent implements AfterViewInit {
|
|
6
|
+
entity: string;
|
|
7
|
+
searchInput: string;
|
|
8
|
+
loadComplete: EventEmitter<any>;
|
|
9
|
+
loadStarted: EventEmitter<any>;
|
|
10
|
+
userViewGrid: UserViewGridComponent;
|
|
11
|
+
get params(): RunViewParams;
|
|
12
|
+
ngAfterViewInit(): Promise<void>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SingleSearchResultComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SingleSearchResultComponent, "app-single-search-result", never, { "entity": "entity"; "searchInput": "searchInput"; }, { "loadComplete": "loadComplete"; "loadStarted": "loadStarted"; }, never, never, false, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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 { UserViewGridComponent } from '@memberjunction/ng-user-view-grid';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "@memberjunction/ng-user-view-grid";
|
|
14
|
+
export class SingleSearchResultComponent {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.entity = '';
|
|
17
|
+
this.searchInput = '';
|
|
18
|
+
this.loadComplete = new EventEmitter();
|
|
19
|
+
this.loadStarted = new EventEmitter();
|
|
20
|
+
}
|
|
21
|
+
get params() {
|
|
22
|
+
const p = {
|
|
23
|
+
EntityName: this.entity,
|
|
24
|
+
ExtraFilter: "ID > 0",
|
|
25
|
+
UserSearchString: this.searchInput,
|
|
26
|
+
};
|
|
27
|
+
return p;
|
|
28
|
+
}
|
|
29
|
+
ngAfterViewInit() {
|
|
30
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
31
|
+
this.loadStarted.emit();
|
|
32
|
+
yield this.userViewGrid.Refresh(this.params);
|
|
33
|
+
this.loadComplete.emit();
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
SingleSearchResultComponent.ɵfac = function SingleSearchResultComponent_Factory(t) { return new (t || SingleSearchResultComponent)(); };
|
|
38
|
+
SingleSearchResultComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleSearchResultComponent, selectors: [["app-single-search-result"]], viewQuery: function SingleSearchResultComponent_Query(rf, ctx) { if (rf & 1) {
|
|
39
|
+
i0.ɵɵviewQuery(UserViewGridComponent, 5);
|
|
40
|
+
} if (rf & 2) {
|
|
41
|
+
let _t;
|
|
42
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.userViewGrid = _t.first);
|
|
43
|
+
} }, inputs: { entity: "entity", searchInput: "searchInput" }, outputs: { loadComplete: "loadComplete", loadStarted: "loadStarted" }, decls: 1, vars: 0, template: function SingleSearchResultComponent_Template(rf, ctx) { if (rf & 1) {
|
|
44
|
+
i0.ɵɵelement(0, "mj-user-view-grid");
|
|
45
|
+
} }, dependencies: [i1.UserViewGridComponent] });
|
|
46
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleSearchResultComponent, [{
|
|
47
|
+
type: Component,
|
|
48
|
+
args: [{ selector: 'app-single-search-result', template: "<mj-user-view-grid\n>\n</mj-user-view-grid>" }]
|
|
49
|
+
}], null, { entity: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], searchInput: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], loadComplete: [{
|
|
54
|
+
type: Output
|
|
55
|
+
}], loadStarted: [{
|
|
56
|
+
type: Output
|
|
57
|
+
}], userViewGrid: [{
|
|
58
|
+
type: ViewChild,
|
|
59
|
+
args: [UserViewGridComponent]
|
|
60
|
+
}] }); })();
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EventEmitter, AfterViewInit, OnInit } from '@angular/core';
|
|
2
|
+
import { GridRowClickedEvent, UserViewGridComponent } from '@memberjunction/ng-user-view-grid';
|
|
3
|
+
import { EntityInfo } from '@memberjunction/core';
|
|
4
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
5
|
+
import { UserViewEntity } from '@memberjunction/core-entities';
|
|
6
|
+
import { SharedService } from '../shared/shared.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare class SingleViewComponent implements AfterViewInit, OnInit {
|
|
9
|
+
private router;
|
|
10
|
+
private route;
|
|
11
|
+
private sharedService;
|
|
12
|
+
viewGrid: UserViewGridComponent;
|
|
13
|
+
viewId: number | null;
|
|
14
|
+
selectedView: UserViewEntity | null;
|
|
15
|
+
loadComplete: EventEmitter<any>;
|
|
16
|
+
selectedEntity: EntityInfo | null;
|
|
17
|
+
showSearch: boolean;
|
|
18
|
+
searchText: string;
|
|
19
|
+
private searchDebounce$;
|
|
20
|
+
private _deferLoadCount;
|
|
21
|
+
constructor(router: Router, route: ActivatedRoute, sharedService: SharedService);
|
|
22
|
+
ngAfterViewInit(): void;
|
|
23
|
+
ngOnInit(): void;
|
|
24
|
+
private initialLoad;
|
|
25
|
+
handleRowClick(args: GridRowClickedEvent): Promise<void>;
|
|
26
|
+
LoadView(viewInfo: UserViewEntity): Promise<void>;
|
|
27
|
+
Refresh(): Promise<void>;
|
|
28
|
+
onSearch(inputValue: string): void;
|
|
29
|
+
private setupSearchDebounce;
|
|
30
|
+
private search;
|
|
31
|
+
viewPropertiesDialogClosed(args: any): void;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SingleViewComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SingleViewComponent, "app-single-view", never, { "viewId": "viewId"; "selectedView": "selectedView"; }, { "loadComplete": "loadComplete"; }, never, never, false, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Component, ViewChild, Input, Output, EventEmitter } from '@angular/core';
|
|
11
|
+
import { UserViewGridComponent } from '@memberjunction/ng-user-view-grid';
|
|
12
|
+
import { Metadata } from '@memberjunction/core';
|
|
13
|
+
import { distinctUntilChanged, Subject } from "rxjs";
|
|
14
|
+
import { debounceTime } from "rxjs/operators";
|
|
15
|
+
import { ViewInfo } from '@memberjunction/core-entities';
|
|
16
|
+
import * as i0 from "@angular/core";
|
|
17
|
+
import * as i1 from "@angular/router";
|
|
18
|
+
import * as i2 from "../shared/shared.service";
|
|
19
|
+
import * as i3 from "@angular/common";
|
|
20
|
+
import * as i4 from "@angular/forms";
|
|
21
|
+
import * as i5 from "@progress/kendo-angular-inputs";
|
|
22
|
+
import * as i6 from "@memberjunction/ng-container-directives";
|
|
23
|
+
import * as i7 from "@memberjunction/ng-user-view-grid";
|
|
24
|
+
import * as i8 from "../user-view-properties/view-properties-dialog.component";
|
|
25
|
+
function SingleViewComponent_kendo_textbox_2_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
27
|
+
i0.ɵɵelementStart(0, "kendo-textbox", 5);
|
|
28
|
+
i0.ɵɵlistener("valueChange", function SingleViewComponent_kendo_textbox_2_Template_kendo_textbox_valueChange_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onSearch($event)); })("ngModelChange", function SingleViewComponent_kendo_textbox_2_Template_kendo_textbox_ngModelChange_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.searchText = $event); });
|
|
29
|
+
i0.ɵɵelementEnd();
|
|
30
|
+
} if (rf & 2) {
|
|
31
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
32
|
+
i0.ɵɵproperty("clearButton", true)("ngModel", ctx_r0.searchText);
|
|
33
|
+
} }
|
|
34
|
+
export class SingleViewComponent {
|
|
35
|
+
constructor(router, route, sharedService) {
|
|
36
|
+
this.router = router;
|
|
37
|
+
this.route = route;
|
|
38
|
+
this.sharedService = sharedService;
|
|
39
|
+
this.viewId = -1;
|
|
40
|
+
this.selectedView = null;
|
|
41
|
+
this.loadComplete = new EventEmitter();
|
|
42
|
+
this.selectedEntity = null;
|
|
43
|
+
this.showSearch = false;
|
|
44
|
+
this.searchText = '';
|
|
45
|
+
this.searchDebounce$ = new Subject();
|
|
46
|
+
this._deferLoadCount = 0;
|
|
47
|
+
}
|
|
48
|
+
ngAfterViewInit() {
|
|
49
|
+
this.initialLoad();
|
|
50
|
+
}
|
|
51
|
+
ngOnInit() {
|
|
52
|
+
this.setupSearchDebounce();
|
|
53
|
+
}
|
|
54
|
+
initialLoad() {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
if (this.viewId) {
|
|
57
|
+
const md = new Metadata();
|
|
58
|
+
const view = yield ViewInfo.GetViewEntity(this.viewId);
|
|
59
|
+
if (view) {
|
|
60
|
+
yield this.LoadView(view);
|
|
61
|
+
const e = md.Entities.find(e => e.ID === view.EntityID);
|
|
62
|
+
if (e) {
|
|
63
|
+
this.selectedEntity = e;
|
|
64
|
+
this.showSearch = e.AllowUserSearchAPI;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
handleRowClick(args) {
|
|
71
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
+
// tell the router to navigate instead of raising an event directly. router will in turn handle raising the event as required
|
|
73
|
+
this.router.navigate(['resource', 'record', args.recordId], { queryParams: { Entity: args.entityName } });
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
LoadView(viewInfo) {
|
|
77
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
+
// load up the view
|
|
79
|
+
if (viewInfo && viewInfo.ID && viewInfo.ID > 0)
|
|
80
|
+
this.selectedView = viewInfo;
|
|
81
|
+
yield this.viewGrid.Refresh({
|
|
82
|
+
ViewEntity: viewInfo,
|
|
83
|
+
ViewID: viewInfo.ID,
|
|
84
|
+
UserSearchString: this.searchText
|
|
85
|
+
});
|
|
86
|
+
this.loadComplete.emit();
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
Refresh() {
|
|
90
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
91
|
+
if (this.selectedView)
|
|
92
|
+
yield this.LoadView(this.selectedView);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
onSearch(inputValue) {
|
|
96
|
+
this.searchDebounce$.next(inputValue);
|
|
97
|
+
}
|
|
98
|
+
setupSearchDebounce() {
|
|
99
|
+
this.searchDebounce$.pipe(debounceTime(500), // updated to 500ms to reduce API calls and since most people don't type super fast
|
|
100
|
+
distinctUntilChanged()).subscribe((inputValue) => {
|
|
101
|
+
this.search(inputValue);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
search(inputValue) {
|
|
105
|
+
if (this.selectedView && this.selectedView.ID && this.selectedView.ID > 0) {
|
|
106
|
+
this.viewGrid.Refresh({
|
|
107
|
+
ViewID: this.selectedView.ID,
|
|
108
|
+
UserSearchString: inputValue
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
viewPropertiesDialogClosed(args) {
|
|
113
|
+
if (args && args.Saved && args.ViewEntity) {
|
|
114
|
+
this.selectedView = args.ViewEntity;
|
|
115
|
+
this.Refresh();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
SingleViewComponent.ɵfac = function SingleViewComponent_Factory(t) { return new (t || SingleViewComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.SharedService)); };
|
|
120
|
+
SingleViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SingleViewComponent, selectors: [["app-single-view"]], viewQuery: function SingleViewComponent_Query(rf, ctx) { if (rf & 1) {
|
|
121
|
+
i0.ɵɵviewQuery(UserViewGridComponent, 7);
|
|
122
|
+
} if (rf & 2) {
|
|
123
|
+
let _t;
|
|
124
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewGrid = _t.first);
|
|
125
|
+
} }, inputs: { viewId: "viewId", selectedView: "selectedView" }, outputs: { loadComplete: "loadComplete" }, decls: 5, vars: 3, consts: [["mjFillContainer", ""], [1, "searchBox"], ["id", "txtSearch", "placeholder", "Search here...", "kendoTextBox", "", 3, "clearButton", "ngModel", "valueChange", "ngModelChange", 4, "ngIf"], [3, "ViewID", "dialogClosed"], ["mjFillContainer", "", 3, "AutoNavigate", "rowClicked"], ["id", "txtSearch", "placeholder", "Search here...", "kendoTextBox", "", 3, "clearButton", "ngModel", "valueChange", "ngModelChange"]], template: function SingleViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
126
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
127
|
+
i0.ɵɵtemplate(2, SingleViewComponent_kendo_textbox_2_Template, 1, 2, "kendo-textbox", 2);
|
|
128
|
+
i0.ɵɵelementStart(3, "app-view-properties-dialog", 3);
|
|
129
|
+
i0.ɵɵlistener("dialogClosed", function SingleViewComponent_Template_app_view_properties_dialog_dialogClosed_3_listener($event) { return ctx.viewPropertiesDialogClosed($event); });
|
|
130
|
+
i0.ɵɵelementEnd()();
|
|
131
|
+
i0.ɵɵelementStart(4, "mj-user-view-grid", 4);
|
|
132
|
+
i0.ɵɵlistener("rowClicked", function SingleViewComponent_Template_mj_user_view_grid_rowClicked_4_listener($event) { return ctx.handleRowClick($event); });
|
|
133
|
+
i0.ɵɵelementEnd()();
|
|
134
|
+
} if (rf & 2) {
|
|
135
|
+
i0.ɵɵadvance(2);
|
|
136
|
+
i0.ɵɵproperty("ngIf", ctx.showSearch);
|
|
137
|
+
i0.ɵɵadvance(1);
|
|
138
|
+
i0.ɵɵproperty("ViewID", ctx.selectedView == null ? null : ctx.selectedView.ID);
|
|
139
|
+
i0.ɵɵadvance(1);
|
|
140
|
+
i0.ɵɵproperty("AutoNavigate", false);
|
|
141
|
+
} }, dependencies: [i3.NgIf, i4.NgControlStatus, i4.NgModel, i5.TextBoxComponent, i6.FillContainer, i7.UserViewGridComponent, i8.ViewPropertiesDialogComponent] });
|
|
142
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SingleViewComponent, [{
|
|
143
|
+
type: Component,
|
|
144
|
+
args: [{ selector: 'app-single-view', template: "<div mjFillContainer>\r\n <div class=\"card-container\" class=\"searchBox\">\r\n <kendo-textbox\r\n id=\"txtSearch\"\r\n *ngIf=\"showSearch\"\r\n placeholder=\"Search here...\"\r\n kendoTextBox\r\n (valueChange)=\"onSearch($event)\"\r\n [clearButton]=\"true\"\r\n [(ngModel)]=\"searchText\"\r\n ></kendo-textbox>\r\n\r\n <app-view-properties-dialog [ViewID]=\"selectedView?.ID\" (dialogClosed)=\"this.viewPropertiesDialogClosed($event)\" ></app-view-properties-dialog>\r\n </div>\r\n\r\n <mj-user-view-grid (rowClicked)=\"handleRowClick($event)\" [AutoNavigate]=\"false\" mjFillContainer></mj-user-view-grid>\r\n</div>\r\n" }]
|
|
145
|
+
}], function () { return [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.SharedService }]; }, { viewGrid: [{
|
|
146
|
+
type: ViewChild,
|
|
147
|
+
args: [UserViewGridComponent, { static: true }]
|
|
148
|
+
}], viewId: [{
|
|
149
|
+
type: Input
|
|
150
|
+
}], selectedView: [{
|
|
151
|
+
type: Input
|
|
152
|
+
}], loadComplete: [{
|
|
153
|
+
type: Output
|
|
154
|
+
}] }); })();
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ElementRef, AfterViewInit } from '@angular/core';
|
|
2
|
+
import { SharedService } from '../shared/shared.service';
|
|
3
|
+
import { UserNotificationEntity } from '@memberjunction/core-entities';
|
|
4
|
+
import { Router } from '@angular/router';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class UserNotificationsComponent implements AfterViewInit {
|
|
7
|
+
sharedService: SharedService;
|
|
8
|
+
private router;
|
|
9
|
+
allRadio: ElementRef;
|
|
10
|
+
unreadRadio: ElementRef;
|
|
11
|
+
readRadio: ElementRef;
|
|
12
|
+
radioSelected: string;
|
|
13
|
+
currentFilter: string;
|
|
14
|
+
constructor(sharedService: SharedService, router: Router);
|
|
15
|
+
ngAfterViewInit(): void;
|
|
16
|
+
get NotificationsToShow(): UserNotificationEntity[];
|
|
17
|
+
isNotificationClickable(notification: UserNotificationEntity): boolean;
|
|
18
|
+
notificationUrl(notification: UserNotificationEntity): {
|
|
19
|
+
urlParts: string[];
|
|
20
|
+
queryString: string;
|
|
21
|
+
};
|
|
22
|
+
get AllNotifications(): UserNotificationEntity[];
|
|
23
|
+
selectReadOption(option: string): void;
|
|
24
|
+
onReadRadioChanged(event: Event): void;
|
|
25
|
+
onFilterChanged(value: string): void;
|
|
26
|
+
getItemTitleClass(notification: UserNotificationEntity): "notification-title notification-title-unread" | "notification-title";
|
|
27
|
+
getItemWrapperClass(notification: UserNotificationEntity): string;
|
|
28
|
+
markAsRead(notification: UserNotificationEntity, bRead: boolean): Promise<void>;
|
|
29
|
+
notificationClicked(notification: UserNotificationEntity): void;
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<UserNotificationsComponent, never>;
|
|
31
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UserNotificationsComponent, "app-user-notifications", never, {}, {}, never, never, false, never>;
|
|
32
|
+
}
|