@memberjunction/ng-data-context 0.9.3 → 0.9.5
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.
|
@@ -14,7 +14,7 @@ export class DataContextDialogComponent {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
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", "
|
|
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", "Data Context", 1, "kendo-window-custom", 3, "width", "height", "minHeight", "minWidth", "resizable", "close"], [3, "dataContextId"]], template: function DataContextDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
18
18
|
i0.ɵɵelementStart(0, "div", null, 0);
|
|
19
19
|
i0.ɵɵelement(2, "div", 1);
|
|
20
20
|
i0.ɵɵelementStart(3, "kendo-window", 2);
|
|
@@ -29,7 +29,7 @@ DataContextDialogComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
29
29
|
} }, dependencies: [i1.WindowComponent, i2.DataContextComponent] });
|
|
30
30
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DataContextDialogComponent, [{
|
|
31
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=\"
|
|
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=\"Data Context\"\r\n (close)=\"closePropertiesDialog()\"\r\n >\r\n <mj-data-context [dataContextId]=\"dataContextId\" ></mj-data-context>\r\n </kendo-window>\r\n</div>" }]
|
|
33
33
|
}], null, { dialogClosed: [{
|
|
34
34
|
type: Output
|
|
35
35
|
}], dataContextId: [{
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { DataContextEntity } from '@memberjunction/core-entities';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
export declare class DataContextComponent implements OnInit {
|
|
4
5
|
showloader: boolean;
|
|
5
6
|
dataContextId: number;
|
|
7
|
+
dataContextRecord?: DataContextEntity;
|
|
6
8
|
dataContextItems: any;
|
|
7
9
|
ngOnInit(): void;
|
|
8
10
|
LoadDataContext(dataContextId: number): Promise<void>;
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Component, Input } from '@angular/core';
|
|
11
|
-
import { LogError, RunView } from '@memberjunction/core';
|
|
11
|
+
import { LogError, Metadata, RunView } from '@memberjunction/core';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
import * as i1 from "@angular/common";
|
|
14
14
|
import * as i2 from "@progress/kendo-angular-grid";
|
|
@@ -16,13 +16,39 @@ import * as i3 from "@progress/kendo-angular-indicators";
|
|
|
16
16
|
function DataContextComponent_kendo_loader_2_Template(rf, ctx) { if (rf & 1) {
|
|
17
17
|
i0.ɵɵelement(0, "kendo-loader", 3);
|
|
18
18
|
} }
|
|
19
|
+
function DataContextComponent_div_3_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
20
|
+
i0.ɵɵelementStart(0, "div")(1, "div");
|
|
21
|
+
i0.ɵɵtext(2);
|
|
22
|
+
i0.ɵɵelementEnd();
|
|
23
|
+
i0.ɵɵelementStart(3, "div");
|
|
24
|
+
i0.ɵɵtext(4);
|
|
25
|
+
i0.ɵɵelementEnd();
|
|
26
|
+
i0.ɵɵelementStart(5, "div");
|
|
27
|
+
i0.ɵɵtext(6);
|
|
28
|
+
i0.ɵɵelementEnd()();
|
|
29
|
+
} if (rf & 2) {
|
|
30
|
+
const ctx_r4 = i0.ɵɵnextContext(2);
|
|
31
|
+
i0.ɵɵadvance(2);
|
|
32
|
+
i0.ɵɵtextInterpolate1(" ID: ", ctx_r4.dataContextRecord.ID, " ");
|
|
33
|
+
i0.ɵɵadvance(2);
|
|
34
|
+
i0.ɵɵtextInterpolate1(" Name: ", ctx_r4.dataContextRecord.Name, " ");
|
|
35
|
+
i0.ɵɵadvance(2);
|
|
36
|
+
i0.ɵɵtextInterpolate1(" Description: ", ctx_r4.dataContextRecord.Description, " ");
|
|
37
|
+
} }
|
|
19
38
|
function DataContextComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
20
|
-
i0.ɵɵelementStart(0, "div", 4, 5)
|
|
21
|
-
i0.ɵɵ
|
|
39
|
+
i0.ɵɵelementStart(0, "div", 4, 5);
|
|
40
|
+
i0.ɵɵtemplate(2, DataContextComponent_div_3_div_2_Template, 7, 3, "div", 6);
|
|
41
|
+
i0.ɵɵelementStart(3, "div", 7)(4, "b");
|
|
42
|
+
i0.ɵɵtext(5, "Items");
|
|
43
|
+
i0.ɵɵelementEnd()();
|
|
44
|
+
i0.ɵɵelementStart(6, "div", 8);
|
|
45
|
+
i0.ɵɵelement(7, "kendo-grid", 9);
|
|
22
46
|
i0.ɵɵelementEnd()();
|
|
23
47
|
} if (rf & 2) {
|
|
24
48
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
25
|
-
i0.ɵɵadvance(
|
|
49
|
+
i0.ɵɵadvance(2);
|
|
50
|
+
i0.ɵɵproperty("ngIf", ctx_r2.dataContextRecord);
|
|
51
|
+
i0.ɵɵadvance(5);
|
|
26
52
|
i0.ɵɵproperty("kendoGridBinding", ctx_r2.dataContextItems)("pageSize", 100)("sortable", true)("loading", ctx_r2.showloader)("resizable", true)("navigable", true);
|
|
27
53
|
} }
|
|
28
54
|
export class DataContextComponent {
|
|
@@ -39,8 +65,15 @@ export class DataContextComponent {
|
|
|
39
65
|
LoadDataContext(dataContextId) {
|
|
40
66
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
67
|
if (dataContextId) {
|
|
68
|
+
const md = new Metadata();
|
|
69
|
+
this.dataContextRecord = yield md.GetEntityObject("Data Contexts");
|
|
70
|
+
yield this.dataContextRecord.Load(dataContextId);
|
|
42
71
|
const rv = new RunView();
|
|
43
|
-
const response = yield rv.RunView({
|
|
72
|
+
const response = yield rv.RunView({
|
|
73
|
+
EntityName: "Data Context Items",
|
|
74
|
+
ExtraFilter: `DataContextID=${dataContextId}`,
|
|
75
|
+
Fields: ["Type", "ViewID", "QueryID", "EntityID", "RecordID", "SQL"]
|
|
76
|
+
});
|
|
44
77
|
if (response.Success) {
|
|
45
78
|
this.dataContextItems = response.Results;
|
|
46
79
|
this.showloader = false;
|
|
@@ -54,9 +87,9 @@ export class DataContextComponent {
|
|
|
54
87
|
}
|
|
55
88
|
}
|
|
56
89
|
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) {
|
|
90
|
+
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", ""], [4, "ngIf"], [2, "margin-top", "10px"], [1, "kendo-grid-container"], ["scrollable", "virtual", 3, "kendoGridBinding", "pageSize", "sortable", "loading", "resizable", "navigable"]], template: function DataContextComponent_Template(rf, ctx) { if (rf & 1) {
|
|
58
91
|
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,
|
|
92
|
+
i0.ɵɵtemplate(2, DataContextComponent_kendo_loader_2_Template, 1, 0, "kendo-loader", 1)(3, DataContextComponent_div_3_Template, 8, 7, "div", 2);
|
|
60
93
|
i0.ɵɵelementEnd();
|
|
61
94
|
} if (rf & 2) {
|
|
62
95
|
i0.ɵɵadvance(2);
|
|
@@ -66,8 +99,8 @@ DataContextComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DataCo
|
|
|
66
99
|
} }, dependencies: [i1.NgIf, i2.GridComponent, i2.DataBindingDirective, i3.LoaderComponent] });
|
|
67
100
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DataContextComponent, [{
|
|
68
101
|
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>" }]
|
|
102
|
+
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 *ngIf=\"dataContextRecord\">\r\n <div>\r\n ID: {{dataContextRecord.ID}}\r\n </div>\r\n <div>\r\n Name: {{dataContextRecord.Name}}\r\n </div>\r\n <div>\r\n Description: {{dataContextRecord.Description}}\r\n </div>\r\n </div>\r\n <div style=\"margin-top: 10px;\">\r\n <b>Items</b>\r\n </div>\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
103
|
}], null, { dataContextId: [{
|
|
71
104
|
type: Input
|
|
72
105
|
}] }); })();
|
|
73
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DataContextComponent, { className: "DataContextComponent", filePath: "src\\lib\\ng-data-context.component.ts", lineNumber:
|
|
106
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DataContextComponent, { className: "DataContextComponent", filePath: "src\\lib\\ng-data-context.component.ts", lineNumber: 10 }); })();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-data-context",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
4
4
|
"description": "MemberJunction: Angular component and pop-up window to display and edit the contents of a data context.",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@progress/kendo-angular-grid": "^15.0.1"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@memberjunction/core": "^0.9.
|
|
29
|
+
"@memberjunction/core": "^0.9.147",
|
|
30
30
|
"@memberjunction/global": "^0.9.135",
|
|
31
31
|
"tslib": "^2.3.0"
|
|
32
32
|
},
|