@memberjunction/ng-explorer-core 0.9.207 → 0.9.209
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/generic/Item.types.d.ts +2 -3
- package/dist/generic/Item.types.d.ts.map +1 -1
- package/dist/generic/app-nav-view.types.d.ts +6 -0
- package/dist/generic/app-nav-view.types.d.ts.map +1 -0
- package/dist/generic/app-nav-view.types.js +6 -0
- package/dist/lib/app-view/application-view.component.d.ts +36 -0
- package/dist/lib/app-view/application-view.component.d.ts.map +1 -0
- package/dist/lib/app-view/application-view.component.js +163 -0
- package/dist/lib/base-browser-component/base-browser-component.d.ts +15 -5
- package/dist/lib/base-browser-component/base-browser-component.d.ts.map +1 -1
- package/dist/lib/base-browser-component/base-browser-component.js +62 -38
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts.map +1 -1
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +2 -1
- package/dist/lib/expansion-panel-component/components/expansion-panel-item-component.d.ts +14 -0
- package/dist/lib/expansion-panel-component/components/expansion-panel-item-component.d.ts.map +1 -0
- package/dist/lib/expansion-panel-component/components/expansion-panel-item-component.js +33 -0
- package/dist/lib/expansion-panel-component/expansion-panel-component.d.ts +14 -0
- package/dist/lib/expansion-panel-component/expansion-panel-component.d.ts.map +1 -0
- package/dist/lib/expansion-panel-component/expansion-panel-component.js +60 -0
- package/dist/lib/generic/form-toolbar.d.ts +1 -1
- package/dist/lib/generic/form-toolbar.d.ts.map +1 -1
- package/dist/lib/generic/section-loader-component.js +1 -1
- package/dist/lib/generic-browser-list/generic-browser-list.component.d.ts +13 -1
- package/dist/lib/generic-browser-list/generic-browser-list.component.d.ts.map +1 -1
- package/dist/lib/generic-browser-list/generic-browser-list.component.js +72 -41
- package/dist/lib/navigation/navigation.component.d.ts +3 -0
- package/dist/lib/navigation/navigation.component.d.ts.map +1 -1
- package/dist/lib/navigation/navigation.component.js +85 -63
- package/dist/lib/query-browser-component/query-browser.component.d.ts +1 -1
- package/dist/lib/query-browser-component/query-browser.component.d.ts.map +1 -1
- package/dist/lib/query-browser-component/query-browser.component.js +17 -2
- package/dist/lib/report-browser-component/report-browser.component.d.ts +0 -1
- package/dist/lib/report-browser-component/report-browser.component.d.ts.map +1 -1
- package/dist/lib/report-browser-component/report-browser.component.js +2 -6
- package/dist/lib/single-application/single-application.component.js +5 -52
- package/dist/lib/single-record/single-record.component.js +1 -1
- package/dist/lib/user-view-properties/view-properties-dialog.component.d.ts +1 -1
- package/dist/lib/user-view-properties/view-properties-dialog.component.d.ts.map +1 -1
- package/dist/lib/user-view-properties/view-properties-dialog.component.js +2 -2
- package/dist/module.d.ts +31 -28
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +16 -2
- package/dist/public-api.d.ts +0 -3
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +0 -3
- package/package.json +10 -9
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BaseEntity } from "@memberjunction/core";
|
|
2
1
|
export declare enum ItemType {
|
|
3
2
|
Folder = "Folder",
|
|
4
3
|
Entity = "Entity"
|
|
@@ -7,8 +6,8 @@ export declare class Item {
|
|
|
7
6
|
Name: string;
|
|
8
7
|
Description: string;
|
|
9
8
|
Type: ItemType;
|
|
10
|
-
Data:
|
|
11
|
-
constructor(data:
|
|
9
|
+
Data: any | Folder;
|
|
10
|
+
constructor(data: any | Folder, type: ItemType);
|
|
12
11
|
}
|
|
13
12
|
/**
|
|
14
13
|
* A folder is a wrapper class for the various Category
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Item.types.d.ts","sourceRoot":"","sources":["../../src/generic/Item.types.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"Item.types.d.ts","sourceRoot":"","sources":["../../src/generic/Item.types.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAChB,MAAM,WAAW;IACjB,MAAM,WAAW;CACpB;AAED,qBAAa,IAAI;IACN,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAG,GAAG,GAAG,MAAM,CAAC;gBAEf,IAAI,EAAE,GAAG,GAAG,MAAM,EAAE,IAAI,EAAE,QAAQ;CAkBjD;AAED;;;;GAIG;AACH,qBAAa,MAAM;IACR,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;gBAEtB,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAK7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-nav-view.types.d.ts","sourceRoot":"","sources":["../../src/generic/app-nav-view.types.ts"],"names":[],"mappings":"AAAA,qBAAa,QAAQ;IACV,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,EAAE,CAAC;gBAEhB,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE;CAIjD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
|
+
import { ApplicationEntityInfo } from '@memberjunction/core';
|
|
4
|
+
import { UserFavoriteEntity } from '@memberjunction/core-entities';
|
|
5
|
+
import { SharedService } from '@memberjunction/ng-shared';
|
|
6
|
+
import { Item } from '../../generic/Item.types';
|
|
7
|
+
import { BaseBrowserComponent } from '../base-browser-component/base-browser-component';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
export declare class ApplicationViewComponent extends BaseBrowserComponent implements OnInit {
|
|
10
|
+
private router;
|
|
11
|
+
private route;
|
|
12
|
+
private sharedService;
|
|
13
|
+
appName: string;
|
|
14
|
+
appDescription: string;
|
|
15
|
+
appEntities: ApplicationEntityInfo[];
|
|
16
|
+
AppEntityButtons: ApplicationEntityButton[];
|
|
17
|
+
private selectedAppEntity;
|
|
18
|
+
categoryEntityID: number | null;
|
|
19
|
+
constructor(router: Router, route: ActivatedRoute, sharedService: SharedService);
|
|
20
|
+
ngOnInit(): Promise<void>;
|
|
21
|
+
onAppEntityButtonClicked(appEntityButton: ApplicationEntityButton): Promise<void>;
|
|
22
|
+
private GetViewsForUser;
|
|
23
|
+
itemClick(item: Item): void;
|
|
24
|
+
entityItemClick(info: ApplicationEntityInfo): void;
|
|
25
|
+
favoriteItemClick(fav: UserFavoriteEntity): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationViewComponent, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ApplicationViewComponent, "application-view", never, {}, {}, never, never, false, never>;
|
|
28
|
+
}
|
|
29
|
+
declare class ApplicationEntityButton {
|
|
30
|
+
Data: ApplicationEntityInfo;
|
|
31
|
+
Name: string;
|
|
32
|
+
Selected: boolean;
|
|
33
|
+
constructor(data: ApplicationEntityInfo);
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=application-view.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application-view.component.d.ts","sourceRoot":"","sources":["../../../src/lib/app-view/application-view.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAY,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAU,IAAI,EAAY,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;;AAGxF,qBAKa,wBAAyB,SAAQ,oBAAqB,YAAW,MAAM;IASnE,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,KAAK;IAAkB,OAAO,CAAC,aAAa;IAPlF,OAAO,EAAE,MAAM,CAAK;IACpB,cAAc,EAAE,MAAM,CAAK;IAC3B,WAAW,EAAE,qBAAqB,EAAE,CAAM;IAC1C,gBAAgB,EAAE,uBAAuB,EAAE,CAAK;IACvD,OAAO,CAAC,iBAAiB,CAAsC;IACxD,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;gBAEzB,MAAM,EAAE,MAAM,EAAU,KAAK,EAAE,cAAc,EAAU,aAAa,EAAE,aAAa;IAKlG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAwBlB,wBAAwB,CAAC,eAAe,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;YAqBhF,eAAe;IAetB,SAAS,CAAC,IAAI,EAAE,IAAI;IAI3B,eAAe,CAAC,IAAI,EAAE,qBAAqB;IAO3C,iBAAiB,CAAC,GAAG,EAAE,kBAAkB;yCArFhC,wBAAwB;2CAAxB,wBAAwB;CAgGpC;AAED,cAAM,uBAAuB;IAClB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;gBAEb,IAAI,EAAE,qBAAqB;CAK1C"}
|
|
@@ -0,0 +1,163 @@
|
|
|
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 } from '@angular/core';
|
|
11
|
+
import { Metadata } from '@memberjunction/core';
|
|
12
|
+
import { Item, ItemType } from '../../generic/Item.types';
|
|
13
|
+
import { ViewInfo } from '@memberjunction/core-entities';
|
|
14
|
+
import { BaseBrowserComponent } from '../base-browser-component/base-browser-component';
|
|
15
|
+
import * as i0 from "@angular/core";
|
|
16
|
+
import * as i1 from "@angular/router";
|
|
17
|
+
import * as i2 from "@memberjunction/ng-shared";
|
|
18
|
+
import * as i3 from "@angular/common";
|
|
19
|
+
import * as i4 from "@progress/kendo-angular-buttons";
|
|
20
|
+
import * as i5 from "../generic-browser-list/generic-browser-list.component";
|
|
21
|
+
function ApplicationViewComponent_button_10_Template(rf, ctx) { if (rf & 1) {
|
|
22
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
23
|
+
i0.ɵɵelementStart(0, "button", 9);
|
|
24
|
+
i0.ɵɵlistener("click", function ApplicationViewComponent_button_10_Template_button_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r3); const button_r1 = restoredCtx.$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onAppEntityButtonClicked(button_r1)); });
|
|
25
|
+
i0.ɵɵelementStart(1, "span");
|
|
26
|
+
i0.ɵɵtext(2);
|
|
27
|
+
i0.ɵɵelementEnd()();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const button_r1 = ctx.$implicit;
|
|
30
|
+
i0.ɵɵproperty("toggleable", true)("selected", button_r1.Selected);
|
|
31
|
+
i0.ɵɵadvance(2);
|
|
32
|
+
i0.ɵɵtextInterpolate1(" ", button_r1.Name, " ");
|
|
33
|
+
} }
|
|
34
|
+
export class ApplicationViewComponent extends BaseBrowserComponent {
|
|
35
|
+
constructor(router, route, sharedService) {
|
|
36
|
+
super();
|
|
37
|
+
this.router = router;
|
|
38
|
+
this.route = route;
|
|
39
|
+
this.sharedService = sharedService;
|
|
40
|
+
this.appName = '';
|
|
41
|
+
this.appDescription = '';
|
|
42
|
+
this.appEntities = [];
|
|
43
|
+
this.AppEntityButtons = [];
|
|
44
|
+
this.selectedAppEntity = null;
|
|
45
|
+
this.categoryEntityID = null;
|
|
46
|
+
this.categoryEntityName = "User View Categories";
|
|
47
|
+
}
|
|
48
|
+
ngOnInit() {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
this.route.paramMap.subscribe((params) => __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const appName = params.get('appName');
|
|
52
|
+
// Perform any necessary actions with the ViewID, such as fetching data
|
|
53
|
+
if (appName) {
|
|
54
|
+
this.appName = appName;
|
|
55
|
+
const md = new Metadata();
|
|
56
|
+
const app = md.Applications.find(a => a.Name == appName);
|
|
57
|
+
if (app) {
|
|
58
|
+
this.appDescription = app.Description;
|
|
59
|
+
this.appEntities = app.ApplicationEntities;
|
|
60
|
+
}
|
|
61
|
+
this.AppEntityButtons = this.appEntities.map(entity => new ApplicationEntityButton(entity));
|
|
62
|
+
if (this.AppEntityButtons.length > 0) {
|
|
63
|
+
const selectedAppEntity = this.AppEntityButtons[0];
|
|
64
|
+
selectedAppEntity.Selected = true;
|
|
65
|
+
yield this.onAppEntityButtonClicked(selectedAppEntity);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}));
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
onAppEntityButtonClicked(appEntityButton) {
|
|
72
|
+
const _super = Object.create(null, {
|
|
73
|
+
LoadData: { get: () => super.LoadData },
|
|
74
|
+
sortItems: { get: () => super.sortItems }
|
|
75
|
+
});
|
|
76
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
77
|
+
if (!appEntityButton) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this.showLoader = true;
|
|
81
|
+
this.appName = appEntityButton.Name;
|
|
82
|
+
this.selectedAppEntity = appEntityButton.Data;
|
|
83
|
+
this.categoryEntityID = this.selectedAppEntity.EntityID;
|
|
84
|
+
const parentFolderIDFilter = this.selectedFolderID ? `ParentFolderID=${this.selectedFolderID}` : 'ParentID IS NULL';
|
|
85
|
+
const categoryFilter = `EntityID=${this.selectedAppEntity.EntityID} AND ` + parentFolderIDFilter;
|
|
86
|
+
yield _super.LoadData.call(this, { skiploadEntityData: true, sortItemsAfterLoad: false, categoryItemFilter: categoryFilter, showLoader: true });
|
|
87
|
+
yield this.GetViewsForUser(appEntityButton.Data);
|
|
88
|
+
_super.sortItems.call(this);
|
|
89
|
+
setTimeout(() => {
|
|
90
|
+
this.showLoader = false;
|
|
91
|
+
}, 250);
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
GetViewsForUser(entityInfo) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
if (!entityInfo) {
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const md = new Metadata();
|
|
100
|
+
const entity = md.Entities.find(e => e.Name == entityInfo.Entity);
|
|
101
|
+
if (entity) {
|
|
102
|
+
const entityViews = yield ViewInfo.GetViewsForUser(entity.ID);
|
|
103
|
+
for (const view of entityViews) {
|
|
104
|
+
this.items.push(new Item(view, ItemType.Entity));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
itemClick(item) {
|
|
110
|
+
console.log("item click");
|
|
111
|
+
}
|
|
112
|
+
entityItemClick(info) {
|
|
113
|
+
if (info) {
|
|
114
|
+
const paramsArray = ['entity', info.Entity];
|
|
115
|
+
this.router.navigate(paramsArray);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
favoriteItemClick(fav) {
|
|
119
|
+
if (fav) {
|
|
120
|
+
if (fav.Entity === 'User Views') {
|
|
121
|
+
// opening a view, different route
|
|
122
|
+
this.router.navigate(['resource', 'view', fav.RecordID]);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
this.router.navigate(['resource', 'record', fav.RecordID], { queryParams: { Entity: fav.Entity } });
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
ApplicationViewComponent.ɵfac = function ApplicationViewComponent_Factory(t) { return new (t || ApplicationViewComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.SharedService)); };
|
|
131
|
+
ApplicationViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ApplicationViewComponent, selectors: [["application-view"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 13, vars: 8, consts: [[1, "app-container"], [1, "card-header-entity", "cloumn"], [1, "title-wrap"], [1, "row"], [1, "col-xs-12", "col-sm-6", "example-col"], ["selection", "single"], ["kendoButton", "", 3, "toggleable", "selected", "click", 4, "ngFor", "ngForOf"], [1, "main-area"], ["iconName", "aggregateFields", "addText", "Create New View", "ItemEntityName", "User Views", 3, "items", "categoryEntityID", "CategoryEntityName", "selectedFolderID", "showLoader", "viewingResource", "itemClickEvent", "AfterAddFolderEvent", "AfterAddItemEvent", "AfterDeleteItemEvent", "AfterDeleteFolderEvent"], ["kendoButton", "", 3, "toggleable", "selected", "click"]], template: function ApplicationViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
132
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div");
|
|
133
|
+
i0.ɵɵtext(3, " Breadcrumb goes here ");
|
|
134
|
+
i0.ɵɵelementEnd();
|
|
135
|
+
i0.ɵɵelementStart(4, "div", 2)(5, "h1");
|
|
136
|
+
i0.ɵɵtext(6);
|
|
137
|
+
i0.ɵɵelementEnd()();
|
|
138
|
+
i0.ɵɵelementStart(7, "div", 3)(8, "div", 4)(9, "kendo-buttongroup", 5);
|
|
139
|
+
i0.ɵɵtemplate(10, ApplicationViewComponent_button_10_Template, 3, 3, "button", 6);
|
|
140
|
+
i0.ɵɵelementEnd()()()();
|
|
141
|
+
i0.ɵɵelementStart(11, "div", 7)(12, "app-generic-browser-list", 8);
|
|
142
|
+
i0.ɵɵlistener("itemClickEvent", function ApplicationViewComponent_Template_app_generic_browser_list_itemClickEvent_12_listener($event) { return ctx.itemClick($event); })("AfterAddFolderEvent", function ApplicationViewComponent_Template_app_generic_browser_list_AfterAddFolderEvent_12_listener($event) { return ctx.onEvent($event); })("AfterAddItemEvent", function ApplicationViewComponent_Template_app_generic_browser_list_AfterAddItemEvent_12_listener($event) { return ctx.onEvent($event); })("AfterDeleteItemEvent", function ApplicationViewComponent_Template_app_generic_browser_list_AfterDeleteItemEvent_12_listener($event) { return ctx.onEvent($event); })("AfterDeleteFolderEvent", function ApplicationViewComponent_Template_app_generic_browser_list_AfterDeleteFolderEvent_12_listener($event) { return ctx.onEvent($event); });
|
|
143
|
+
i0.ɵɵelementEnd()()();
|
|
144
|
+
} if (rf & 2) {
|
|
145
|
+
i0.ɵɵadvance(6);
|
|
146
|
+
i0.ɵɵtextInterpolate(ctx.appName);
|
|
147
|
+
i0.ɵɵadvance(4);
|
|
148
|
+
i0.ɵɵproperty("ngForOf", ctx.AppEntityButtons);
|
|
149
|
+
i0.ɵɵadvance(2);
|
|
150
|
+
i0.ɵɵproperty("items", ctx.items)("categoryEntityID", ctx.categoryEntityID)("CategoryEntityName", ctx.categoryEntityName)("selectedFolderID", ctx.selectedFolderID)("showLoader", ctx.showLoader)("viewingResource", false);
|
|
151
|
+
} }, dependencies: [i3.NgForOf, i4.ButtonGroupComponent, i4.ButtonComponent, i5.GenericBrowserListComponent], styles: [".app-container[_ngcontent-%COMP%] {\r\n margin: 10px;\r\n }\r\n \r\n.entity-list[_ngcontent-%COMP%] {\r\n width: 500px;\r\n}\r\n.favorites-list[_ngcontent-%COMP%] {\r\n width: 400px;\r\n}\r\n\r\n.cloumn[_ngcontent-%COMP%] {\r\n flex-direction: column;\r\n}", ".main-area[_ngcontent-%COMP%] {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view[_ngcontent-%COMP%] {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n .list-view .k-listview-header, .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header[_ngcontent-%COMP%], .footer[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header[_ngcontent-%COMP%] {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header[_ngcontent-%COMP%] .head-tag[_ngcontent-%COMP%] {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header[_ngcontent-%COMP%] .count[_ngcontent-%COMP%] {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer[_ngcontent-%COMP%] {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container[_ngcontent-%COMP%] {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity[_ngcontent-%COMP%] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card[_ngcontent-%COMP%] .view-icon[_ngcontent-%COMP%] {\r\n color: #ff6358;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] .k-card-body[_ngcontent-%COMP%] {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper[_ngcontent-%COMP%] .view-card[_ngcontent-%COMP%] {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card[_ngcontent-%COMP%] .btn-wrapper[_ngcontent-%COMP%] {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body[_ngcontent-%COMP%] .view-card-content[_ngcontent-%COMP%] h5[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body[_ngcontent-%COMP%] .view-card-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container[_ngcontent-%COMP%] {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] h1[_ngcontent-%COMP%] {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity[_ngcontent-%COMP%] .title-wrap[_ngcontent-%COMP%] p[_ngcontent-%COMP%] {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area[_ngcontent-%COMP%] .card-list[_ngcontent-%COMP%] {\r\n display: flex;\r\n gap: 20px;\r\n }"] });
|
|
152
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ApplicationViewComponent, [{
|
|
153
|
+
type: Component,
|
|
154
|
+
args: [{ selector: 'application-view', template: "<div class=\"app-container\">\r\n <div class=\"card-header-entity cloumn\">\r\n <div>\r\n Breadcrumb goes here\r\n </div>\r\n <div class=\"title-wrap\">\r\n <h1>{{appName}}</h1>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-xs-12 col-sm-6 example-col\">\r\n <kendo-buttongroup selection=\"single\">\r\n <button\r\n *ngFor=\"let button of AppEntityButtons\"\r\n kendoButton\r\n [toggleable]=\"true\"\r\n [selected]=\"button.Selected\"\r\n (click)=\"onAppEntityButtonClicked(button)\"\r\n >\r\n <span>\r\n {{button.Name}}\r\n </span>\r\n </button>\r\n\r\n </kendo-buttongroup>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"main-area\">\r\n <app-generic-browser-list \r\n iconName=\"aggregateFields\" \r\n [items]=\"items\"\r\n [categoryEntityID]=\"categoryEntityID\"\r\n addText=\"Create New View\"\r\n ItemEntityName=\"User Views\"\r\n [CategoryEntityName]=\"categoryEntityName\"\r\n (itemClickEvent)=\"itemClick($event)\" \r\n [selectedFolderID]=\"selectedFolderID\"\r\n [showLoader]=\"showLoader\"\r\n [viewingResource]=false\r\n (AfterAddFolderEvent)=\"onEvent($event)\"\r\n (AfterAddItemEvent)=\"onEvent($event)\"\r\n (AfterDeleteItemEvent)=\"onEvent($event)\"\r\n (AfterDeleteFolderEvent)=\"onEvent($event)\"\r\n />\r\n </div>\r\n</div>\r\n", styles: [".app-container {\r\n margin: 10px;\r\n }\r\n \r\n.entity-list {\r\n width: 500px;\r\n}\r\n.favorites-list {\r\n width: 400px;\r\n}\r\n\r\n.cloumn {\r\n flex-direction: column;\r\n}", "\r\n.main-area {\r\n display: flex;\r\n height: 100%;\r\n width: 100%;\r\n gap: 24px;\r\n padding: 24px 0;\r\n}\r\n.list-view {\r\n padding: 16px;\r\n min-width: 300px;\r\n border-radius: 4px;\r\n background: #FAFAFA;\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-header, \r\n::ng-deep .list-view .k-listview-footer {\r\n border: none;\r\n}\r\n::ng-deep .list-view .k-listview-content {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 4px;\r\n background: #fff;\r\n padding: 16px;\r\n}\r\n\r\n.header,\r\n.footer {\r\n color: #424242;\r\n font-size: 16px;\r\n height: auto;\r\n margin:0;\r\n}\r\n\r\n.header {\r\n color: #424242;\r\n margin-bottom: 16px;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n}\r\n.header .head-tag {\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\nfont-size: 16px;\r\nfont-style: normal;\r\nfont-weight: 400;\r\nline-height: 20px;\r\n}\r\n\r\n.header .count {\r\n width: 24px;\r\n height: 24px;\r\n min-width: 24px;\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n font-size: 10px;\r\n background: rgba(0, 0, 0, 0.08);\r\n border-radius: 50%;\r\n}\r\n.footer {\r\n font-size: 14px;\r\n margin-top: 16px;\r\n}\r\n\r\n.list-item {\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 30px;\r\n cursor: pointer;\r\n margin: 4px;\r\n}\r\n.card-container {\r\n margin: 0;\r\n padding: 0;\r\n box-shadow: none;\r\n}\r\n.card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n}\r\n.card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n\r\n \r\n\r\n\r\n \r\n .view-card .view-icon {\r\n color: #ff6358;\r\n }\r\n .card-wrapper {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n }\r\n .card-wrapper .k-card-body {\r\n background: #fff;\r\n padding: 12px 20px;\r\n }\r\n .card-wrapper .view-card {\r\n overflow: auto;\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n background: #fafafa;\r\n padding: 4px 15px;\r\n }\r\n .view-card .btn-wrapper {\r\n display: flex;\r\n align-items: center;\r\n }\r\n \r\n .k-card-body .view-card-content h5 {\r\n color: #424242;\r\n font-size: 16px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n margin-bottom: 0;\r\n letter-spacing: 0.18px;\r\n }\r\n .k-card-body .view-card-content p {\r\n color: #666;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n height: 48px;\r\n margin-bottom: 0;\r\n }\r\n .card-container {\r\n padding: 0;\r\n margin: 0;\r\n box-shadow: none;\r\n }\r\n .card-header-entity {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: flex-start;\r\n padding-bottom: 20px;\r\n border-bottom: 1px solid rgba(0, 0, 0, 0.08);\r\n }\r\n \r\n .card-header-entity .title-wrap h1 {\r\n color: #424242;\r\n font-size: 28px;\r\n font-style: normal;\r\n font-weight: 300;\r\n line-height: 28px;\r\n margin-bottom: 15px;\r\n }\r\n .card-header-entity .title-wrap {\r\n display: flex;\r\n flex-direction: column;\r\n }\r\n .card-header-entity .title-wrap p {\r\n margin: 0;\r\n display: flex;\r\n align-items: center;\r\n gap: 8px;\r\n color: #424242;\r\n font-size: 14px;\r\n font-style: normal;\r\n font-weight: 400;\r\n line-height: 20px;\r\n }\r\n .main-area .card-list {\r\n display: flex;\r\n gap: 20px;\r\n }\r\n "] }]
|
|
155
|
+
}], () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.SharedService }], null); })();
|
|
156
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ApplicationViewComponent, { className: "ApplicationViewComponent", filePath: "src\\lib\\app-view\\application-view.component.ts", lineNumber: 16 }); })();
|
|
157
|
+
class ApplicationEntityButton {
|
|
158
|
+
constructor(data) {
|
|
159
|
+
this.Data = data;
|
|
160
|
+
this.Name = data.Entity;
|
|
161
|
+
this.Selected = false;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -19,11 +19,21 @@ export declare class BaseBrowserComponent {
|
|
|
19
19
|
protected categoryEntityName: string;
|
|
20
20
|
constructor();
|
|
21
21
|
protected InitPathData(queryParams: Params | undefined): void;
|
|
22
|
-
protected LoadData(
|
|
23
|
-
protected
|
|
24
|
-
protected GetEntityData(
|
|
25
|
-
protected
|
|
22
|
+
protected LoadData(params?: LoadDataParams): Promise<void>;
|
|
23
|
+
protected sortItems(): void;
|
|
24
|
+
protected GetEntityData(): Promise<any[]>;
|
|
25
|
+
protected GetCategories(): Promise<Folder[]>;
|
|
26
|
+
protected createItemsFromEntityData(entityData: any[]): Item[];
|
|
27
|
+
protected createItemsFromFolders(folders: Folder[]): Item[];
|
|
26
28
|
protected Navigate(item: Item, router: Router, dataID: string): void;
|
|
27
|
-
|
|
29
|
+
onEvent(event: BaseEvent): void;
|
|
28
30
|
}
|
|
31
|
+
export type LoadDataParams = {
|
|
32
|
+
entityItemFilter?: string;
|
|
33
|
+
categoryItemFilter?: string;
|
|
34
|
+
skiploadEntityData?: boolean;
|
|
35
|
+
skipLoadCategoryData?: boolean;
|
|
36
|
+
sortItemsAfterLoad?: boolean;
|
|
37
|
+
showLoader?: boolean;
|
|
38
|
+
};
|
|
29
39
|
//# sourceMappingURL=base-browser-component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-browser-component.d.ts","sourceRoot":"","sources":["../../../src/lib/base-browser-component/base-browser-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAY,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAyD,MAAM,4BAA4B,CAAC;AAE9G,qBAAa,oBAAoB;IACtB,UAAU,EAAE,OAAO,CAAS;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9C,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/C,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,kBAAkB,CAAqB;IAE/C,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAM;IAChC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAM;IACjC,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAM;IACzC,SAAS,CAAC,cAAc,EAAE,MAAM,CAAM;IACtC,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAM;;IAS1C,SAAS,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;cAU7C,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"base-browser-component.d.ts","sourceRoot":"","sources":["../../../src/lib/base-browser-component/base-browser-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAY,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAyD,MAAM,4BAA4B,CAAC;AAE9G,qBAAa,oBAAoB;IACtB,UAAU,EAAE,OAAO,CAAS;IAC5B,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,GAAG,EAAE,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9C,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/C,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,kBAAkB,CAAqB;IAE/C,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAM;IAChC,SAAS,CAAC,SAAS,EAAE,MAAM,CAAM;IACjC,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAM;IACzC,SAAS,CAAC,cAAc,EAAE,MAAM,CAAM;IACtC,SAAS,CAAC,kBAAkB,EAAE,MAAM,CAAM;;IAS1C,SAAS,CAAC,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;cAU7C,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAiChE,SAAS,CAAC,SAAS,IAAI,IAAI;cAQX,aAAa,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;cAe/B,aAAa,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAgBlD,SAAS,CAAC,yBAAyB,CAAC,UAAU,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE;IAU9D,SAAS,CAAC,sBAAsB,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE;IAa3D,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAyB7D,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;CAYzC;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA"}
|
|
@@ -34,70 +34,92 @@ export class BaseBrowserComponent {
|
|
|
34
34
|
this.selectedFolderID = folderID;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
LoadData(
|
|
37
|
+
LoadData(params) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
39
|
//cache these values so that we can reused them
|
|
40
40
|
//in the Navigate function
|
|
41
|
-
this.EntityItemFilter = entityItemFilter;
|
|
42
|
-
this.CategoryItemFilter = categoryItemFilter;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
this.
|
|
41
|
+
this.EntityItemFilter = (params === null || params === void 0 ? void 0 : params.entityItemFilter) || this.EntityItemFilter;
|
|
42
|
+
this.CategoryItemFilter = (params === null || params === void 0 ? void 0 : params.categoryItemFilter) || this.CategoryItemFilter;
|
|
43
|
+
if (params === null || params === void 0 ? void 0 : params.showLoader) {
|
|
44
|
+
this.showLoader = true;
|
|
45
|
+
}
|
|
46
|
+
this.items = [];
|
|
47
|
+
if (!(params === null || params === void 0 ? void 0 : params.skiploadEntityData)) {
|
|
48
|
+
const entityData = yield this.GetEntityData();
|
|
49
|
+
this.items.push(...this.createItemsFromEntityData(entityData));
|
|
50
|
+
this.entityData = entityData;
|
|
51
|
+
}
|
|
52
|
+
if (!(params === null || params === void 0 ? void 0 : params.skipLoadCategoryData)) {
|
|
53
|
+
const categories = yield this.GetCategories();
|
|
54
|
+
this.items.push(...this.createItemsFromFolders(categories));
|
|
55
|
+
this.folders = categories;
|
|
56
|
+
}
|
|
57
|
+
if (params === null || params === void 0 ? void 0 : params.sortItemsAfterLoad) {
|
|
58
|
+
this.sortItems();
|
|
59
|
+
}
|
|
47
60
|
this.showLoader = false;
|
|
48
61
|
});
|
|
49
62
|
}
|
|
50
|
-
|
|
63
|
+
//maybe pass in a sort function for custom sorting?
|
|
64
|
+
sortItems() {
|
|
65
|
+
this.items.sort(function (a, b) {
|
|
66
|
+
if (a.Name < b.Name) {
|
|
67
|
+
return -1;
|
|
68
|
+
}
|
|
69
|
+
if (a.Name > b.Name) {
|
|
70
|
+
return 1;
|
|
71
|
+
}
|
|
72
|
+
return 0;
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
GetEntityData() {
|
|
51
76
|
return __awaiter(this, void 0, void 0, function* () {
|
|
52
77
|
const rv = new RunView();
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
EntityName: this.categoryEntityName,
|
|
57
|
-
ExtraFilter: extraFilter || filterString
|
|
78
|
+
const result = yield rv.RunView({
|
|
79
|
+
EntityName: this.itemEntityName,
|
|
80
|
+
ExtraFilter: this.EntityItemFilter
|
|
58
81
|
});
|
|
59
|
-
if (
|
|
60
|
-
|
|
82
|
+
if (result && result.Success) {
|
|
83
|
+
return result.Results;
|
|
61
84
|
}
|
|
62
85
|
else {
|
|
63
|
-
|
|
86
|
+
return [];
|
|
64
87
|
}
|
|
65
88
|
});
|
|
66
89
|
}
|
|
67
|
-
|
|
90
|
+
GetCategories() {
|
|
68
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
69
92
|
const rv = new RunView();
|
|
70
|
-
const
|
|
71
|
-
EntityName: this.
|
|
72
|
-
ExtraFilter:
|
|
93
|
+
const folderResult = yield rv.RunView({
|
|
94
|
+
EntityName: this.categoryEntityName,
|
|
95
|
+
ExtraFilter: this.CategoryItemFilter
|
|
73
96
|
});
|
|
74
|
-
if (
|
|
75
|
-
|
|
97
|
+
if (folderResult && folderResult.Success) {
|
|
98
|
+
return folderResult.Results;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
return [];
|
|
76
102
|
}
|
|
77
103
|
});
|
|
78
104
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
for (const data of
|
|
105
|
+
createItemsFromEntityData(entityData) {
|
|
106
|
+
let items = [];
|
|
107
|
+
for (const data of entityData) {
|
|
82
108
|
let item = new Item(data, ItemType.Entity);
|
|
83
|
-
|
|
109
|
+
items.push(item);
|
|
84
110
|
}
|
|
85
|
-
|
|
111
|
+
return items;
|
|
112
|
+
}
|
|
113
|
+
createItemsFromFolders(folders) {
|
|
114
|
+
let items = [];
|
|
115
|
+
for (const folder of folders) {
|
|
86
116
|
const dashboardFolder = new Folder(folder.ID, folder.Name);
|
|
87
117
|
dashboardFolder.ParentFolderID = folder.ParentFolderID;
|
|
88
118
|
dashboardFolder.Description = folder.Description;
|
|
89
119
|
let item = new Item(dashboardFolder, ItemType.Folder);
|
|
90
|
-
|
|
120
|
+
items.push(item);
|
|
91
121
|
}
|
|
92
|
-
|
|
93
|
-
if (a.Name < b.Name) {
|
|
94
|
-
return -1;
|
|
95
|
-
}
|
|
96
|
-
if (a.Name > b.Name) {
|
|
97
|
-
return 1;
|
|
98
|
-
}
|
|
99
|
-
return 0;
|
|
100
|
-
});
|
|
122
|
+
return items;
|
|
101
123
|
}
|
|
102
124
|
Navigate(item, router, dataID) {
|
|
103
125
|
if (!item) {
|
|
@@ -117,15 +139,17 @@ export class BaseBrowserComponent {
|
|
|
117
139
|
//so just reload all of the data
|
|
118
140
|
router.navigate([this.routeName], { queryParams: { folderID: folder.ID } });
|
|
119
141
|
this.selectedFolderID = folder.ID;
|
|
120
|
-
this.LoadData(
|
|
142
|
+
this.LoadData({});
|
|
121
143
|
}
|
|
122
144
|
}
|
|
123
145
|
onEvent(event) {
|
|
124
146
|
if (event.EventType === EventTypes.AfterAddFolder || event.EventType === EventTypes.AfterAddItem) {
|
|
147
|
+
//specific type does not matter, we just need a type that has the Item property
|
|
125
148
|
let addEvent = event;
|
|
126
149
|
this.items.push(addEvent.Item);
|
|
127
150
|
}
|
|
128
151
|
else if (event.EventType === EventTypes.AfterDeleteItem || event.EventType === EventTypes.AfterDeleteFolder) {
|
|
152
|
+
//specific type does not matter, we just need a type that has the Item property
|
|
129
153
|
let deleteEvent = event;
|
|
130
154
|
this.items = this.items.filter((item) => item !== deleteEvent.Item);
|
|
131
155
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard-browser.component.d.ts","sourceRoot":"","sources":["../../../src/lib/dashboard-browser-component/dashboard-browser.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAExF,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;;AAEvD,qBAMa,yBAA0B,SAAQ,oBAAoB;IAErD,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,aAAa;gBAArC,MAAM,EAAE,MAAM,EAAU,aAAa,EAAE,aAAa;IAalE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboard-browser.component.d.ts","sourceRoot":"","sources":["../../../src/lib/dashboard-browser-component/dashboard-browser.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAEhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAExF,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;;AAEvD,qBAMa,yBAA0B,SAAQ,oBAAoB;IAErD,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,aAAa;gBAArC,MAAM,EAAE,MAAM,EAAU,aAAa,EAAE,aAAa;IAalE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAKxB,SAAS,CAAC,IAAI,EAAE,IAAI;IAWpB,iBAAiB,IAAI,IAAI;IAwBzB,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;yCAvD3B,yBAAyB;2CAAzB,yBAAyB;CA0DrC"}
|
|
@@ -32,7 +32,8 @@ export class DashboardBrowserComponent extends BaseBrowserComponent {
|
|
|
32
32
|
LoadData: { get: () => super.LoadData }
|
|
33
33
|
});
|
|
34
34
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
|
|
35
|
+
const categoryEntityFilter = "ParentID IS NULL";
|
|
36
|
+
yield _super.LoadData.call(this, { categoryItemFilter: categoryEntityFilter });
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
itemClick(item) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Router } from "@angular/router";
|
|
2
|
+
import { SharedService } from "@memberjunction/ng-shared";
|
|
3
|
+
import { StubData } from '../../../generic/app-nav-view.types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ExpansionPanelItemComponent {
|
|
6
|
+
sharedService: SharedService;
|
|
7
|
+
private router;
|
|
8
|
+
items: StubData[];
|
|
9
|
+
constructor(sharedService: SharedService, router: Router);
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExpansionPanelItemComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExpansionPanelItemComponent, "expansion-panel-item-component", never, { "items": { "alias": "items"; "required": false; }; }, {}, never, never, false, never>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=expansion-panel-item-component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expansion-panel-item-component.d.ts","sourceRoot":"","sources":["../../../../src/lib/expansion-panel-component/components/expansion-panel-item-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;;AAE/D,qBAKa,2BAA2B;IAIjB,aAAa,EAAE,aAAa;IAAE,OAAO,CAAC,MAAM;IAF/C,KAAK,EAAE,QAAQ,EAAE,CAAM;gBAEpB,aAAa,EAAE,aAAa,EAAU,MAAM,EAAE,MAAM;IAEvE,QAAQ,IAAI,IAAI;yCANP,2BAA2B;2CAA3B,2BAA2B;CAiBvC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@memberjunction/ng-shared";
|
|
4
|
+
import * as i2 from "@angular/router";
|
|
5
|
+
export class ExpansionPanelItemComponent {
|
|
6
|
+
constructor(sharedService, router) {
|
|
7
|
+
this.sharedService = sharedService;
|
|
8
|
+
this.router = router;
|
|
9
|
+
this.items = [];
|
|
10
|
+
}
|
|
11
|
+
ngOnInit() {
|
|
12
|
+
/*
|
|
13
|
+
const md = new Metadata();
|
|
14
|
+
this.items = md.Applications.map(app =>
|
|
15
|
+
new StubData(app.Name, app.ApplicationEntities.map(entity => new StubData(entity.ApplicationName, []))));
|
|
16
|
+
|
|
17
|
+
for(const application of md.Applications){
|
|
18
|
+
this.items.push(new StubData(application.Name, []));
|
|
19
|
+
}
|
|
20
|
+
*/
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
ExpansionPanelItemComponent.ɵfac = function ExpansionPanelItemComponent_Factory(t) { return new (t || ExpansionPanelItemComponent)(i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router)); };
|
|
24
|
+
ExpansionPanelItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExpansionPanelItemComponent, selectors: [["expansion-panel-item-component"]], inputs: { items: "items" }, decls: 1, vars: 0, consts: [[1, "wrapper"]], template: function ExpansionPanelItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
25
|
+
i0.ɵɵelement(0, "div", 0);
|
|
26
|
+
} }, styles: [".wrapper[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n}"] });
|
|
27
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExpansionPanelItemComponent, [{
|
|
28
|
+
type: Component,
|
|
29
|
+
args: [{ selector: 'expansion-panel-item-component', template: "<div class=\"wrapper\">\r\n</div>", styles: [".wrapper {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n}"] }]
|
|
30
|
+
}], () => [{ type: i1.SharedService }, { type: i2.Router }], { items: [{
|
|
31
|
+
type: Input
|
|
32
|
+
}] }); })();
|
|
33
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExpansionPanelItemComponent, { className: "ExpansionPanelItemComponent", filePath: "src\\lib\\expansion-panel-component\\components\\expansion-panel-item-component.ts", lineNumber: 11 }); })();
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Router } from "@angular/router";
|
|
2
|
+
import { SharedService } from "@memberjunction/ng-shared";
|
|
3
|
+
import { StubData } from '../../generic/app-nav-view.types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ExpansionPanelComponent {
|
|
6
|
+
sharedService: SharedService;
|
|
7
|
+
private router;
|
|
8
|
+
items: StubData[];
|
|
9
|
+
constructor(sharedService: SharedService, router: Router);
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExpansionPanelComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ExpansionPanelComponent, "expansion-panel-component", never, { "items": { "alias": "items"; "required": false; }; }, {}, never, never, false, never>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=expansion-panel-component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expansion-panel-component.d.ts","sourceRoot":"","sources":["../../../src/lib/expansion-panel-component/expansion-panel-component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;;AAE5D,qBAKa,uBAAuB;IAIb,aAAa,EAAE,aAAa;IAAE,OAAO,CAAC,MAAM;IAF/C,KAAK,EAAE,QAAQ,EAAE,CAAM;gBAEpB,aAAa,EAAE,aAAa,EAAU,MAAM,EAAE,MAAM;IAEvE,QAAQ,IAAI,IAAI;yCANP,uBAAuB;2CAAvB,uBAAuB;CAiBnC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "@memberjunction/ng-shared";
|
|
4
|
+
import * as i2 from "@angular/router";
|
|
5
|
+
import * as i3 from "@angular/common";
|
|
6
|
+
import * as i4 from "@progress/kendo-angular-listview";
|
|
7
|
+
import * as i5 from "@progress/kendo-angular-layout";
|
|
8
|
+
function ExpansionPanelComponent_kendo_expansionpanel_1_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
9
|
+
i0.ɵɵelementStart(0, "h3");
|
|
10
|
+
i0.ɵɵtext(1);
|
|
11
|
+
i0.ɵɵelementEnd();
|
|
12
|
+
} if (rf & 2) {
|
|
13
|
+
const dataItem_r4 = ctx.dataItem;
|
|
14
|
+
i0.ɵɵadvance();
|
|
15
|
+
i0.ɵɵtextInterpolate(dataItem_r4.Name);
|
|
16
|
+
} }
|
|
17
|
+
function ExpansionPanelComponent_kendo_expansionpanel_1_Template(rf, ctx) { if (rf & 1) {
|
|
18
|
+
i0.ɵɵelementStart(0, "kendo-expansionpanel", 2)(1, "div", 3)(2, "kendo-listview", 4);
|
|
19
|
+
i0.ɵɵtemplate(3, ExpansionPanelComponent_kendo_expansionpanel_1_ng_template_3_Template, 2, 1, "ng-template", 5);
|
|
20
|
+
i0.ɵɵelementEnd()()();
|
|
21
|
+
} if (rf & 2) {
|
|
22
|
+
const item_r1 = ctx.$implicit;
|
|
23
|
+
i0.ɵɵproperty("title", item_r1.Name);
|
|
24
|
+
i0.ɵɵadvance(2);
|
|
25
|
+
i0.ɵɵproperty("height", 400)("data", item_r1.Children);
|
|
26
|
+
} }
|
|
27
|
+
export class ExpansionPanelComponent {
|
|
28
|
+
constructor(sharedService, router) {
|
|
29
|
+
this.sharedService = sharedService;
|
|
30
|
+
this.router = router;
|
|
31
|
+
this.items = [];
|
|
32
|
+
}
|
|
33
|
+
ngOnInit() {
|
|
34
|
+
/*
|
|
35
|
+
const md = new Metadata();
|
|
36
|
+
this.items = md.Applications.map(app =>
|
|
37
|
+
new StubData(app.Name, app.ApplicationEntities.map(entity => new StubData(entity.ApplicationName, []))));
|
|
38
|
+
|
|
39
|
+
for(const application of md.Applications){
|
|
40
|
+
this.items.push(new StubData(application.Name, []));
|
|
41
|
+
}
|
|
42
|
+
*/
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
ExpansionPanelComponent.ɵfac = function ExpansionPanelComponent_Factory(t) { return new (t || ExpansionPanelComponent)(i0.ɵɵdirectiveInject(i1.SharedService), i0.ɵɵdirectiveInject(i2.Router)); };
|
|
46
|
+
ExpansionPanelComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExpansionPanelComponent, selectors: [["expansion-panel-component"]], inputs: { items: "items" }, decls: 2, vars: 1, consts: [[1, "wrapper"], [3, "title", 4, "ngFor", "ngForOf"], [3, "title"], [1, "content"], ["containerClass", "k-d-flex k-flex-col k-flex-nowrap", 3, "height", "data"], ["kendoListViewItemTemplate", ""]], template: function ExpansionPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
47
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
48
|
+
i0.ɵɵtemplate(1, ExpansionPanelComponent_kendo_expansionpanel_1_Template, 4, 3, "kendo-expansionpanel", 1);
|
|
49
|
+
i0.ɵɵelementEnd();
|
|
50
|
+
} if (rf & 2) {
|
|
51
|
+
i0.ɵɵadvance();
|
|
52
|
+
i0.ɵɵproperty("ngForOf", ctx.items);
|
|
53
|
+
} }, dependencies: [i3.NgForOf, i4.ItemTemplateDirective, i4.ListViewComponent, i5.ExpansionPanelComponent], styles: [".wrapper[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n}\r\n \r\nkendo-expansionpanel[_ngcontent-%COMP%] {\r\n width: 300px;\r\n}\r\n \r\n.content[_ngcontent-%COMP%] {\r\n display: flex;\r\n}"] });
|
|
54
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExpansionPanelComponent, [{
|
|
55
|
+
type: Component,
|
|
56
|
+
args: [{ selector: 'expansion-panel-component', template: "<div class=\"wrapper\">\r\n <kendo-expansionpanel\r\n *ngFor=\"let item of items; index as i\"\r\n [title]=\"item.Name\"\r\n >\r\n <div class=\"content\">\r\n <kendo-listview\r\n [height]=\"400\"\r\n [data]=\"item.Children\"\r\n containerClass=\"k-d-flex k-flex-col k-flex-nowrap\"\r\n >\r\n <ng-template\r\n kendoListViewItemTemplate\r\n let-dataItem=\"dataItem\"\r\n >\r\n <h3>{{dataItem.Name}}</h3>\r\n </ng-template>\r\n </kendo-listview>\r\n </div>\r\n </kendo-expansionpanel>\r\n</div>", styles: [".wrapper {\r\n display: flex;\r\n flex-direction: column;\r\n align-items: center;\r\n}\r\n \r\nkendo-expansionpanel {\r\n width: 300px;\r\n}\r\n \r\n.content {\r\n display: flex;\r\n}"] }]
|
|
57
|
+
}], () => [{ type: i1.SharedService }, { type: i2.Router }], { items: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}] }); })();
|
|
60
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExpansionPanelComponent, { className: "ExpansionPanelComponent", filePath: "src\\lib\\expansion-panel-component\\expansion-panel-component.ts", lineNumber: 12 }); })();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-toolbar.d.ts","sourceRoot":"","sources":["../../../src/lib/generic/form-toolbar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"form-toolbar.d.ts","sourceRoot":"","sources":["../../../src/lib/generic/form-toolbar.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;;AAGlE,qBAca,oBAAoB;IACpB,IAAI,EAAG,iBAAiB,CAAC;yCADzB,oBAAoB;2CAApB,oBAAoB;CAEhC"}
|