@memberjunction/ng-data-context 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/module.d.ts +18 -0
- package/dist/lib/module.js +69 -0
- package/dist/lib/ng-data-context-dialog.component.d.ts +12 -0
- package/dist/lib/ng-data-context-dialog.component.js +38 -0
- package/dist/lib/ng-data-context.component.d.ts +11 -0
- package/dist/lib/ng-data-context.component.js +73 -0
- package/dist/public-api.d.ts +3 -0
- package/dist/public-api.js +3 -0
- package/package.json +36 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./ng-data-context.component";
|
|
3
|
+
import * as i2 from "./ng-data-context-dialog.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "@angular/forms";
|
|
6
|
+
import * as i5 from "@angular/router";
|
|
7
|
+
import * as i6 from "@progress/kendo-angular-grid";
|
|
8
|
+
import * as i7 from "@progress/kendo-angular-dialog";
|
|
9
|
+
import * as i8 from "@progress/kendo-angular-excel-export";
|
|
10
|
+
import * as i9 from "@progress/kendo-angular-buttons";
|
|
11
|
+
import * as i10 from "@memberjunction/ng-compare-records";
|
|
12
|
+
import * as i11 from "@memberjunction/ng-container-directives";
|
|
13
|
+
import * as i12 from "@progress/kendo-angular-indicators";
|
|
14
|
+
export declare class DataContextModule {
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataContextModule, never>;
|
|
16
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DataContextModule, [typeof i1.DataContextComponent, typeof i2.DataContextDialogComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.RouterModule, typeof i6.GridModule, typeof i7.DialogsModule, typeof i8.ExcelExportModule, typeof i9.ButtonsModule, typeof i10.CompareRecordsModule, typeof i11.ContainerDirectivesModule, typeof i12.IndicatorsModule], [typeof i1.DataContextComponent, typeof i2.DataContextDialogComponent]>;
|
|
17
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DataContextModule>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { NgModule } from '@angular/core';
|
|
2
|
+
import { DataContextDialogComponent } from './ng-data-context-dialog.component';
|
|
3
|
+
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { RouterModule } from '@angular/router';
|
|
6
|
+
// Kendo UI Angular imports
|
|
7
|
+
import { GridModule } from '@progress/kendo-angular-grid';
|
|
8
|
+
import { ExcelExportModule } from '@progress/kendo-angular-excel-export';
|
|
9
|
+
import { DialogsModule } from "@progress/kendo-angular-dialog";
|
|
10
|
+
import { ButtonsModule } from '@progress/kendo-angular-buttons';
|
|
11
|
+
import { IndicatorsModule } from '@progress/kendo-angular-indicators';
|
|
12
|
+
import { CompareRecordsModule } from '@memberjunction/ng-compare-records';
|
|
13
|
+
import { ContainerDirectivesModule } from '@memberjunction/ng-container-directives';
|
|
14
|
+
import { DataContextComponent } from './ng-data-context.component';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
export class DataContextModule {
|
|
17
|
+
}
|
|
18
|
+
DataContextModule.ɵfac = function DataContextModule_Factory(t) { return new (t || DataContextModule)(); };
|
|
19
|
+
DataContextModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: DataContextModule });
|
|
20
|
+
DataContextModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [CommonModule,
|
|
21
|
+
FormsModule,
|
|
22
|
+
ReactiveFormsModule,
|
|
23
|
+
RouterModule,
|
|
24
|
+
GridModule,
|
|
25
|
+
DialogsModule,
|
|
26
|
+
ExcelExportModule,
|
|
27
|
+
ButtonsModule,
|
|
28
|
+
CompareRecordsModule,
|
|
29
|
+
ContainerDirectivesModule,
|
|
30
|
+
IndicatorsModule] });
|
|
31
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DataContextModule, [{
|
|
32
|
+
type: NgModule,
|
|
33
|
+
args: [{
|
|
34
|
+
declarations: [
|
|
35
|
+
DataContextComponent,
|
|
36
|
+
DataContextDialogComponent
|
|
37
|
+
],
|
|
38
|
+
imports: [
|
|
39
|
+
CommonModule,
|
|
40
|
+
FormsModule,
|
|
41
|
+
ReactiveFormsModule,
|
|
42
|
+
RouterModule,
|
|
43
|
+
GridModule,
|
|
44
|
+
DialogsModule,
|
|
45
|
+
ExcelExportModule,
|
|
46
|
+
ButtonsModule,
|
|
47
|
+
CompareRecordsModule,
|
|
48
|
+
ContainerDirectivesModule,
|
|
49
|
+
IndicatorsModule
|
|
50
|
+
],
|
|
51
|
+
exports: [
|
|
52
|
+
DataContextComponent,
|
|
53
|
+
DataContextDialogComponent
|
|
54
|
+
]
|
|
55
|
+
}]
|
|
56
|
+
}], null, null); })();
|
|
57
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(DataContextModule, { declarations: [DataContextComponent,
|
|
58
|
+
DataContextDialogComponent], imports: [CommonModule,
|
|
59
|
+
FormsModule,
|
|
60
|
+
ReactiveFormsModule,
|
|
61
|
+
RouterModule,
|
|
62
|
+
GridModule,
|
|
63
|
+
DialogsModule,
|
|
64
|
+
ExcelExportModule,
|
|
65
|
+
ButtonsModule,
|
|
66
|
+
CompareRecordsModule,
|
|
67
|
+
ContainerDirectivesModule,
|
|
68
|
+
IndicatorsModule], exports: [DataContextComponent,
|
|
69
|
+
DataContextDialogComponent] }); })();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* Simple dialog wrapper component for the data context component
|
|
5
|
+
*/
|
|
6
|
+
export declare class DataContextDialogComponent {
|
|
7
|
+
dialogClosed: EventEmitter<any>;
|
|
8
|
+
dataContextId: number;
|
|
9
|
+
closePropertiesDialog(): void;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataContextDialogComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataContextDialogComponent, "mj-data-context-dialog", never, { "dataContextId": { "alias": "dataContextId"; "required": false; }; }, { "dialogClosed": "dialogClosed"; }, never, never, false, never>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@progress/kendo-angular-dialog";
|
|
4
|
+
import * as i2 from "./ng-data-context.component";
|
|
5
|
+
/**
|
|
6
|
+
* Simple dialog wrapper component for the data context component
|
|
7
|
+
*/
|
|
8
|
+
export class DataContextDialogComponent {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.dialogClosed = new EventEmitter();
|
|
11
|
+
}
|
|
12
|
+
closePropertiesDialog() {
|
|
13
|
+
this.dialogClosed.emit();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
DataContextDialogComponent.ɵfac = function DataContextDialogComponent_Factory(t) { return new (t || DataContextDialogComponent)(); };
|
|
17
|
+
DataContextDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DataContextDialogComponent, selectors: [["mj-data-context-dialog"]], inputs: { dataContextId: "dataContextId" }, outputs: { dialogClosed: "dialogClosed" }, decls: 5, vars: 6, consts: [["recordChangesWrapper", ""], [1, "k-overlay"], ["title", "Record Changes", 1, "kendo-window-custom", 3, "width", "height", "minHeight", "minWidth", "resizable", "close"], [3, "dataContextId"]], template: function DataContextDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵelementStart(0, "div", null, 0);
|
|
19
|
+
i0.ɵɵelement(2, "div", 1);
|
|
20
|
+
i0.ɵɵelementStart(3, "kendo-window", 2);
|
|
21
|
+
i0.ɵɵlistener("close", function DataContextDialogComponent_Template_kendo_window_close_3_listener() { return ctx.closePropertiesDialog(); });
|
|
22
|
+
i0.ɵɵelement(4, "mj-data-context", 3);
|
|
23
|
+
i0.ɵɵelementEnd()();
|
|
24
|
+
} if (rf & 2) {
|
|
25
|
+
i0.ɵɵadvance(3);
|
|
26
|
+
i0.ɵɵproperty("width", 700)("height", 525)("minHeight", 300)("minWidth", 400)("resizable", true);
|
|
27
|
+
i0.ɵɵadvance();
|
|
28
|
+
i0.ɵɵproperty("dataContextId", ctx.dataContextId);
|
|
29
|
+
} }, dependencies: [i1.WindowComponent, i2.DataContextComponent] });
|
|
30
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DataContextDialogComponent, [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{ selector: 'mj-data-context-dialog', template: "<div #recordChangesWrapper>\r\n <div class=\"k-overlay\"></div>\r\n <kendo-window \r\n class=\"kendo-window-custom\"\r\n [width]=\"700\"\r\n [height]=\"525\"\r\n [minHeight]=\"300\"\r\n [minWidth]=\"400\"\r\n [resizable]=\"true\"\r\n title=\"Record Changes\"\r\n (close)=\"closePropertiesDialog()\"\r\n >\r\n <mj-data-context [dataContextId]=\"dataContextId\" ></mj-data-context>\r\n </kendo-window>\r\n</div>" }]
|
|
33
|
+
}], null, { dialogClosed: [{
|
|
34
|
+
type: Output
|
|
35
|
+
}], dataContextId: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}] }); })();
|
|
38
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DataContextDialogComponent, { className: "DataContextDialogComponent", filePath: "src\\lib\\ng-data-context-dialog.component.ts", lineNumber: 11 }); })();
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class DataContextComponent implements OnInit {
|
|
4
|
+
showloader: boolean;
|
|
5
|
+
dataContextId: number;
|
|
6
|
+
dataContextItems: any;
|
|
7
|
+
ngOnInit(): void;
|
|
8
|
+
LoadDataContext(dataContextId: number): Promise<void>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataContextComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataContextComponent, "mj-data-context", never, { "dataContextId": { "alias": "dataContextId"; "required": false; }; }, {}, never, never, false, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 } from '@angular/core';
|
|
11
|
+
import { LogError, RunView } from '@memberjunction/core';
|
|
12
|
+
import * as i0 from "@angular/core";
|
|
13
|
+
import * as i1 from "@angular/common";
|
|
14
|
+
import * as i2 from "@progress/kendo-angular-grid";
|
|
15
|
+
import * as i3 from "@progress/kendo-angular-indicators";
|
|
16
|
+
function DataContextComponent_kendo_loader_2_Template(rf, ctx) { if (rf & 1) {
|
|
17
|
+
i0.ɵɵelement(0, "kendo-loader", 3);
|
|
18
|
+
} }
|
|
19
|
+
function DataContextComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
20
|
+
i0.ɵɵelementStart(0, "div", 4, 5)(2, "div", 6);
|
|
21
|
+
i0.ɵɵelement(3, "kendo-grid", 7);
|
|
22
|
+
i0.ɵɵelementEnd()();
|
|
23
|
+
} if (rf & 2) {
|
|
24
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
25
|
+
i0.ɵɵadvance(3);
|
|
26
|
+
i0.ɵɵproperty("kendoGridBinding", ctx_r2.dataContextItems)("pageSize", 100)("sortable", true)("loading", ctx_r2.showloader)("resizable", true)("navigable", true);
|
|
27
|
+
} }
|
|
28
|
+
export class DataContextComponent {
|
|
29
|
+
constructor() {
|
|
30
|
+
this.showloader = false;
|
|
31
|
+
this.dataContextItems = [];
|
|
32
|
+
}
|
|
33
|
+
ngOnInit() {
|
|
34
|
+
if (this.dataContextId) {
|
|
35
|
+
this.showloader = true;
|
|
36
|
+
this.LoadDataContext(this.dataContextId);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
LoadDataContext(dataContextId) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
+
if (dataContextId) {
|
|
42
|
+
const rv = new RunView();
|
|
43
|
+
const response = yield rv.RunView({ EntityName: "Data Context Items", ExtraFilter: `DataContextID=${dataContextId}` });
|
|
44
|
+
if (response.Success) {
|
|
45
|
+
this.dataContextItems = response.Results;
|
|
46
|
+
this.showloader = false;
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
LogError(response.ErrorMessage);
|
|
50
|
+
this.showloader = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
DataContextComponent.ɵfac = function DataContextComponent_Factory(t) { return new (t || DataContextComponent)(); };
|
|
57
|
+
DataContextComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DataContextComponent, selectors: [["mj-data-context"]], inputs: { dataContextId: "dataContextId" }, decls: 4, vars: 2, consts: [["wrapper", ""], ["type", "converging-spinner", 4, "ngIf"], ["class", "k-d-flex k-flex-col k-justify-content-between k-h-full", 4, "ngIf"], ["type", "converging-spinner"], [1, "k-d-flex", "k-flex-col", "k-justify-content-between", "k-h-full"], ["dialogContainer", ""], [1, "kendo-grid-container"], ["scrollable", "virtual", 3, "kendoGridBinding", "pageSize", "sortable", "loading", "resizable", "navigable"]], template: function DataContextComponent_Template(rf, ctx) { if (rf & 1) {
|
|
58
|
+
i0.ɵɵelementStart(0, "div", null, 0);
|
|
59
|
+
i0.ɵɵtemplate(2, DataContextComponent_kendo_loader_2_Template, 1, 0, "kendo-loader", 1)(3, DataContextComponent_div_3_Template, 4, 6, "div", 2);
|
|
60
|
+
i0.ɵɵelementEnd();
|
|
61
|
+
} if (rf & 2) {
|
|
62
|
+
i0.ɵɵadvance(2);
|
|
63
|
+
i0.ɵɵproperty("ngIf", ctx.showloader);
|
|
64
|
+
i0.ɵɵadvance();
|
|
65
|
+
i0.ɵɵproperty("ngIf", !ctx.showloader);
|
|
66
|
+
} }, dependencies: [i1.NgIf, i2.GridComponent, i2.DataBindingDirective, i3.LoaderComponent] });
|
|
67
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DataContextComponent, [{
|
|
68
|
+
type: Component,
|
|
69
|
+
args: [{ selector: 'mj-data-context', template: "<div #wrapper>\r\n <kendo-loader *ngIf=\"showloader\" type=\"converging-spinner\" ></kendo-loader>\r\n <div class=\"k-d-flex k-flex-col k-justify-content-between k-h-full\" #dialogContainer *ngIf=\"!showloader\">\r\n <div class=\"kendo-grid-container\">\r\n <kendo-grid \r\n [kendoGridBinding]=\"dataContextItems\" \r\n scrollable=\"virtual\" \r\n [pageSize]=\"100\" \r\n [sortable]=\"true\"\r\n [loading]=\"showloader\" \r\n [resizable]=\"true\" \r\n [navigable]=\"true\"\r\n >\r\n </kendo-grid>\r\n </div>\r\n </div>\r\n</div>" }]
|
|
70
|
+
}], null, { dataContextId: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}] }); })();
|
|
73
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DataContextComponent, { className: "DataContextComponent", filePath: "src\\lib\\ng-data-context.component.ts", lineNumber: 9 }); })();
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@memberjunction/ng-data-context",
|
|
3
|
+
"version": "0.9.2",
|
|
4
|
+
"description": "MemberJunction: Angular component and pop-up window to display and edit the contents of a data context.",
|
|
5
|
+
"main": "./dist/public-api.js",
|
|
6
|
+
"typings": "./dist/public-api.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"/dist"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
|
+
"build": "ngc"
|
|
13
|
+
},
|
|
14
|
+
"keywords": [],
|
|
15
|
+
"author": "",
|
|
16
|
+
"license": "ISC",
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@angular/compiler": "^17.1.2",
|
|
19
|
+
"@angular/compiler-cli": "^17.1.2"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"@angular/common": "^17.1.2",
|
|
23
|
+
"@angular/core": "^17.1.2",
|
|
24
|
+
"@angular/forms": "^17.1.2",
|
|
25
|
+
"@angular/router": "^17.1.2",
|
|
26
|
+
"@progress/kendo-angular-grid": "^15.0.1"
|
|
27
|
+
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@memberjunction/core": "^0.9.145",
|
|
30
|
+
"@memberjunction/global": "^0.9.135",
|
|
31
|
+
"@memberjunction/ng-compare-records": "^0.9.146",
|
|
32
|
+
"@memberjunction/ng-container-directives": "^0.9.112",
|
|
33
|
+
"tslib": "^2.3.0"
|
|
34
|
+
},
|
|
35
|
+
"sideEffects": false
|
|
36
|
+
}
|