@memberjunction/ng-explorer-core 0.9.210 → 0.9.214
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 +14 -1
- package/dist/generic/Item.types.d.ts.map +1 -1
- package/dist/generic/Item.types.js +17 -0
- package/dist/generic/app-nav-view.types.d.ts +1 -0
- package/dist/generic/app-nav-view.types.d.ts.map +1 -1
- package/dist/generic/app-nav-view.types.js +1 -0
- package/dist/lib/app-view/application-view.component.d.ts +17 -4
- package/dist/lib/app-view/application-view.component.d.ts.map +1 -1
- package/dist/lib/app-view/application-view.component.js +154 -66
- package/dist/lib/base-browser-component/base-browser-component.d.ts +8 -8
- package/dist/lib/base-browser-component/base-browser-component.d.ts.map +1 -1
- package/dist/lib/base-browser-component/base-browser-component.js +39 -43
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts +5 -5
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.d.ts.map +1 -1
- package/dist/lib/dashboard-browser-component/dashboard-browser.component.js +22 -37
- package/dist/lib/data-browser-component/data-browser.component.js +2 -2
- package/dist/lib/expansion-panel-component/expansion-panel-component.d.ts +9 -2
- package/dist/lib/expansion-panel-component/expansion-panel-component.d.ts.map +1 -1
- package/dist/lib/expansion-panel-component/expansion-panel-component.js +152 -38
- package/dist/lib/favorites/favorites.component.js +2 -2
- package/dist/lib/files/files.component.d.ts +2 -2
- package/dist/lib/files/files.component.d.ts.map +1 -1
- package/dist/lib/files/files.component.js +11 -9
- package/dist/lib/generic-browse-list/generic-browse-list.component.js +45 -76
- package/dist/lib/generic-browser-list/generic-browser-list.component.d.ts +36 -4
- 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 +414 -75
- package/dist/lib/header/header.component.js +2 -2
- package/dist/lib/home-component/home.component.js +2 -2
- package/dist/lib/navigation/navigation.component.d.ts +2 -2
- package/dist/lib/navigation/navigation.component.d.ts.map +1 -1
- package/dist/lib/navigation/navigation.component.js +21 -9
- package/dist/lib/query-browser-component/query-browser.component.d.ts +5 -5
- package/dist/lib/query-browser-component/query-browser.component.d.ts.map +1 -1
- package/dist/lib/query-browser-component/query-browser.component.js +22 -38
- package/dist/lib/report-browser-component/report-browser.component.d.ts +7 -6
- package/dist/lib/report-browser-component/report-browser.component.d.ts.map +1 -1
- package/dist/lib/report-browser-component/report-browser.component.js +24 -37
- package/dist/lib/single-application/single-application.component.js +2 -2
- package/dist/lib/single-dashboard/Components/add-item/add-item.component.js +3 -3
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts +4 -1
- package/dist/lib/single-dashboard/single-dashboard.component.d.ts.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +31 -20
- package/dist/lib/single-entity/single-entity.component.js +2 -2
- package/dist/lib/single-view/single-view.component.js +3 -3
- 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 +26 -24
- package/dist/module.d.ts +12 -11
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +4 -0
- package/package.json +10 -10
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
export declare enum ItemType {
|
|
2
2
|
Folder = "Folder",
|
|
3
|
-
Entity = "Entity"
|
|
3
|
+
Entity = "Entity",
|
|
4
|
+
Resource = "Resource",
|
|
5
|
+
UserView = "UserView",
|
|
6
|
+
Application = "Application",
|
|
7
|
+
StubData = "StubData"
|
|
4
8
|
}
|
|
5
9
|
export declare class Item {
|
|
6
10
|
Name: string;
|
|
7
11
|
Description: string;
|
|
8
12
|
Type: ItemType;
|
|
13
|
+
Favorite: boolean;
|
|
9
14
|
Data: any | Folder;
|
|
10
15
|
constructor(data: any | Folder, type: ItemType);
|
|
11
16
|
}
|
|
17
|
+
export declare class TreeItem extends Item {
|
|
18
|
+
ChildItems: TreeItem[];
|
|
19
|
+
constructor(data: any | Folder, type: ItemType);
|
|
20
|
+
}
|
|
12
21
|
/**
|
|
13
22
|
* A folder is a wrapper class for the various Category
|
|
14
23
|
* entities that we have, e.g. Dashboard Categories,
|
|
@@ -21,4 +30,8 @@ export declare class Folder {
|
|
|
21
30
|
Description: string | null;
|
|
22
31
|
constructor(id: number, folderName: string);
|
|
23
32
|
}
|
|
33
|
+
export declare class TreeFolder extends Folder {
|
|
34
|
+
EntityID: number;
|
|
35
|
+
constructor(entityID: number, id: number, folderName: string);
|
|
36
|
+
}
|
|
24
37
|
//# sourceMappingURL=Item.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACxB;AAED,qBAAa,IAAI;IACN,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,OAAO,CAAS;IAC1B,IAAI,EAAG,GAAG,GAAG,MAAM,CAAC;gBAEf,IAAI,EAAE,GAAG,GAAG,MAAM,EAAE,IAAI,EAAE,QAAQ;CAkBjD;AAED,qBAAa,QAAS,SAAQ,IAAI;IACvB,UAAU,EAAE,QAAQ,EAAE,CAAM;gBAEvB,IAAI,EAAE,GAAG,GAAG,MAAM,EAAE,IAAI,EAAE,QAAQ;CAGjD;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;AAED,qBAAa,UAAW,SAAQ,MAAM;IAC3B,QAAQ,EAAE,MAAM,CAAC;gBAEZ,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAI/D"}
|
|
@@ -2,10 +2,15 @@ export var ItemType;
|
|
|
2
2
|
(function (ItemType) {
|
|
3
3
|
ItemType["Folder"] = "Folder";
|
|
4
4
|
ItemType["Entity"] = "Entity";
|
|
5
|
+
ItemType["Resource"] = "Resource";
|
|
6
|
+
ItemType["UserView"] = "UserView";
|
|
7
|
+
ItemType["Application"] = "Application";
|
|
8
|
+
ItemType["StubData"] = "StubData";
|
|
5
9
|
})(ItemType || (ItemType = {}));
|
|
6
10
|
;
|
|
7
11
|
export class Item {
|
|
8
12
|
constructor(data, type) {
|
|
13
|
+
this.Favorite = false;
|
|
9
14
|
this.Type = type;
|
|
10
15
|
this.Data = data;
|
|
11
16
|
this.Name = "";
|
|
@@ -22,6 +27,12 @@ export class Item {
|
|
|
22
27
|
}
|
|
23
28
|
}
|
|
24
29
|
}
|
|
30
|
+
export class TreeItem extends Item {
|
|
31
|
+
constructor(data, type) {
|
|
32
|
+
super(data, type);
|
|
33
|
+
this.ChildItems = [];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
25
36
|
/**
|
|
26
37
|
* A folder is a wrapper class for the various Category
|
|
27
38
|
* entities that we have, e.g. Dashboard Categories,
|
|
@@ -34,3 +45,9 @@ export class Folder {
|
|
|
34
45
|
this.Description = "";
|
|
35
46
|
}
|
|
36
47
|
}
|
|
48
|
+
export class TreeFolder extends Folder {
|
|
49
|
+
constructor(entityID, id, folderName) {
|
|
50
|
+
super(id, folderName);
|
|
51
|
+
this.EntityID = entityID;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1 +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;
|
|
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;IACrB,QAAQ,EAAE,OAAO,CAAS;gBAErB,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE;CAIjD"}
|
|
@@ -5,24 +5,37 @@ import { UserFavoriteEntity } from '@memberjunction/core-entities';
|
|
|
5
5
|
import { SharedService } from '@memberjunction/ng-shared';
|
|
6
6
|
import { Item } from '../../generic/Item.types';
|
|
7
7
|
import { BaseBrowserComponent } from '../base-browser-component/base-browser-component';
|
|
8
|
+
import { Location } from '@angular/common';
|
|
9
|
+
import { ViewPropertiesDialogComponent } from '../user-view-properties/view-properties-dialog.component';
|
|
10
|
+
import { BeforeAddItemEvent, BeforeUpdateItemEvent } from '../../generic/Events.types';
|
|
8
11
|
import * as i0 from "@angular/core";
|
|
9
12
|
export declare class ApplicationViewComponent extends BaseBrowserComponent implements OnInit {
|
|
10
13
|
private router;
|
|
11
14
|
private route;
|
|
15
|
+
private location;
|
|
12
16
|
private sharedService;
|
|
17
|
+
entityRowRef: Element | undefined;
|
|
18
|
+
viewPropertiesDialog: ViewPropertiesDialogComponent;
|
|
19
|
+
private appNameFromURL;
|
|
13
20
|
appName: string;
|
|
14
21
|
appDescription: string;
|
|
15
22
|
appEntities: ApplicationEntityInfo[];
|
|
16
23
|
AppEntityButtons: ApplicationEntityButton[];
|
|
17
24
|
private selectedAppEntity;
|
|
18
25
|
categoryEntityID: number | null;
|
|
19
|
-
constructor(router: Router, route: ActivatedRoute, sharedService: SharedService);
|
|
26
|
+
constructor(router: Router, route: ActivatedRoute, location: Location, sharedService: SharedService);
|
|
20
27
|
ngOnInit(): Promise<void>;
|
|
21
|
-
onAppEntityButtonClicked(appEntityButton: ApplicationEntityButton):
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
onAppEntityButtonClicked(appEntityButton: ApplicationEntityButton): void;
|
|
29
|
+
loadEntitiesAndFolders(appEntityButton: ApplicationEntityButton): Promise<void>;
|
|
30
|
+
onItemClick(item: Item): void;
|
|
24
31
|
entityItemClick(info: ApplicationEntityInfo): void;
|
|
25
32
|
favoriteItemClick(fav: UserFavoriteEntity): void;
|
|
33
|
+
private navigateToCurrentPage;
|
|
34
|
+
private isOverflown;
|
|
35
|
+
onViewModeChange(viewMode: string): void;
|
|
36
|
+
createNewView(event: BeforeAddItemEvent): void;
|
|
37
|
+
editView(event: BeforeUpdateItemEvent): Promise<void>;
|
|
38
|
+
viewPropertiesClosed(args: any): Promise<void>;
|
|
26
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApplicationViewComponent, never>;
|
|
27
40
|
static ɵcmp: i0.ɵɵComponentDeclaration<ApplicationViewComponent, "application-view", never, {}, {}, never, never, false, never>;
|
|
28
41
|
}
|
|
@@ -1 +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,
|
|
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,EAAwB,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAuB,MAAM,sBAAsB,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAkB,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAY,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AACxF,OAAO,EAAC,QAAQ,EAAC,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,0DAA0D,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;;AAEvF,qBAKa,wBAAyB,SAAQ,oBAAqB,YAAW,MAAM;IAanE,OAAO,CAAC,MAAM;IAAU,OAAO,CAAC,KAAK;IAAkB,OAAO,CAAC,QAAQ;IAAY,OAAO,CAAC,aAAa;IAX7F,YAAY,EAAE,OAAO,GAAG,SAAS,CAAC;IACE,oBAAoB,EAAG,6BAA6B,CAAC;IAEjH,OAAO,CAAC,cAAc,CAAc;IAC7B,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,QAAQ,EAAE,QAAQ,EAAU,aAAa,EAAE,aAAa;IAM9H,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IA0CxB,wBAAwB,CAAC,eAAe,EAAE,uBAAuB,GAAG,IAAI;IAUlE,sBAAsB,CAAC,eAAe,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BrF,WAAW,CAAC,IAAI,EAAE,IAAI;IAc7B,eAAe,CAAC,IAAI,EAAE,qBAAqB;IAO3C,iBAAiB,CAAC,GAAG,EAAE,kBAAkB;IAYzC,OAAO,CAAC,qBAAqB;IAkB7B,OAAO,CAAC,WAAW;IAKZ,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI/C,aAAa,CAAC,KAAK,EAAE,kBAAkB;IAK1B,QAAQ,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrD,oBAAoB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;yCAzKlD,wBAAwB;2CAAxB,wBAAwB;CAoLpC;AAID,cAAM,uBAAuB;IAClB,IAAI,EAAE,qBAAqB,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,OAAO,CAAC;gBAEb,IAAI,EAAE,qBAAqB;CAK1C"}
|
|
@@ -7,36 +7,40 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { Component } from '@angular/core';
|
|
11
|
-
import { Metadata } from '@memberjunction/core';
|
|
12
|
-
import {
|
|
13
|
-
import { ViewInfo } from '@memberjunction/core-entities';
|
|
10
|
+
import { Component, ViewChild } from '@angular/core';
|
|
11
|
+
import { Metadata, LogStatus } from '@memberjunction/core';
|
|
12
|
+
import { ItemType } from '../../generic/Item.types';
|
|
14
13
|
import { BaseBrowserComponent } from '../base-browser-component/base-browser-component';
|
|
14
|
+
import { ViewPropertiesDialogComponent } from '../user-view-properties/view-properties-dialog.component';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
16
|
import * as i1 from "@angular/router";
|
|
17
|
-
import * as i2 from "@
|
|
18
|
-
import * as i3 from "@
|
|
17
|
+
import * as i2 from "@angular/common";
|
|
18
|
+
import * as i3 from "@memberjunction/ng-shared";
|
|
19
19
|
import * as i4 from "@progress/kendo-angular-buttons";
|
|
20
20
|
import * as i5 from "../generic-browser-list/generic-browser-list.component";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
import * as i6 from "../user-view-properties/view-properties-dialog.component";
|
|
22
|
+
const _c0 = ["entityRow"];
|
|
23
|
+
function ApplicationViewComponent_button_9_Template(rf, ctx) { if (rf & 1) {
|
|
24
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
25
|
+
i0.ɵɵelementStart(0, "button", 11);
|
|
26
|
+
i0.ɵɵlistener("click", function ApplicationViewComponent_button_9_Template_button_click_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const button_r2 = restoredCtx.$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.onAppEntityButtonClicked(button_r2)); });
|
|
25
27
|
i0.ɵɵelementStart(1, "span");
|
|
26
28
|
i0.ɵɵtext(2);
|
|
27
29
|
i0.ɵɵelementEnd()();
|
|
28
30
|
} if (rf & 2) {
|
|
29
|
-
const
|
|
30
|
-
i0.ɵɵproperty("toggleable", true)("selected",
|
|
31
|
+
const button_r2 = ctx.$implicit;
|
|
32
|
+
i0.ɵɵproperty("toggleable", true)("selected", button_r2.Selected);
|
|
31
33
|
i0.ɵɵadvance(2);
|
|
32
|
-
i0.ɵɵtextInterpolate1(" ",
|
|
34
|
+
i0.ɵɵtextInterpolate1(" ", button_r2.Name, " ");
|
|
33
35
|
} }
|
|
34
36
|
export class ApplicationViewComponent extends BaseBrowserComponent {
|
|
35
|
-
constructor(router, route, sharedService) {
|
|
37
|
+
constructor(router, route, location, sharedService) {
|
|
36
38
|
super();
|
|
37
39
|
this.router = router;
|
|
38
40
|
this.route = route;
|
|
41
|
+
this.location = location;
|
|
39
42
|
this.sharedService = sharedService;
|
|
43
|
+
this.appNameFromURL = '';
|
|
40
44
|
this.appName = '';
|
|
41
45
|
this.appDescription = '';
|
|
42
46
|
this.appEntities = [];
|
|
@@ -44,14 +48,19 @@ export class ApplicationViewComponent extends BaseBrowserComponent {
|
|
|
44
48
|
this.selectedAppEntity = null;
|
|
45
49
|
this.categoryEntityID = null;
|
|
46
50
|
this.categoryEntityName = "User View Categories";
|
|
51
|
+
this.itemEntityName = "User Views";
|
|
47
52
|
}
|
|
48
53
|
ngOnInit() {
|
|
49
54
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
55
|
this.route.paramMap.subscribe((params) => __awaiter(this, void 0, void 0, function* () {
|
|
51
56
|
const appName = params.get('appName');
|
|
52
|
-
|
|
57
|
+
const entityName = params.get('entityName');
|
|
58
|
+
const folderID = params.get('folderID');
|
|
59
|
+
if (folderID) {
|
|
60
|
+
this.selectedFolderID = parseInt(folderID) || null;
|
|
61
|
+
}
|
|
53
62
|
if (appName) {
|
|
54
|
-
this.appName = appName;
|
|
63
|
+
this.appName = this.appNameFromURL = appName;
|
|
55
64
|
const md = new Metadata();
|
|
56
65
|
const app = md.Applications.find(a => a.Name == appName);
|
|
57
66
|
if (app) {
|
|
@@ -59,19 +68,35 @@ export class ApplicationViewComponent extends BaseBrowserComponent {
|
|
|
59
68
|
this.appEntities = app.ApplicationEntities;
|
|
60
69
|
}
|
|
61
70
|
this.AppEntityButtons = this.appEntities.map(entity => new ApplicationEntityButton(entity));
|
|
62
|
-
if (this.AppEntityButtons.length
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
71
|
+
if (this.AppEntityButtons.length) {
|
|
72
|
+
if (entityName) {
|
|
73
|
+
const entityNameToLower = entityName.toLowerCase();
|
|
74
|
+
const selectedAppEntity = this.AppEntityButtons.find(e => e.Name.toLocaleLowerCase() == entityNameToLower);
|
|
75
|
+
if (selectedAppEntity) {
|
|
76
|
+
selectedAppEntity.Selected = true;
|
|
77
|
+
yield this.loadEntitiesAndFolders(selectedAppEntity);
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const defaultEntity = this.AppEntityButtons[0];
|
|
82
|
+
defaultEntity.Selected = true;
|
|
83
|
+
yield this.loadEntitiesAndFolders(defaultEntity);
|
|
66
84
|
}
|
|
67
85
|
}
|
|
68
86
|
}));
|
|
69
87
|
});
|
|
70
88
|
}
|
|
71
89
|
onAppEntityButtonClicked(appEntityButton) {
|
|
90
|
+
if (appEntityButton.Selected) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this.selectedFolderID = null;
|
|
94
|
+
this.selectedAppEntity = appEntityButton.Data;
|
|
95
|
+
this.navigateToCurrentPage();
|
|
96
|
+
}
|
|
97
|
+
loadEntitiesAndFolders(appEntityButton) {
|
|
72
98
|
const _super = Object.create(null, {
|
|
73
|
-
LoadData: { get: () => super.LoadData }
|
|
74
|
-
sortItems: { get: () => super.sortItems }
|
|
99
|
+
LoadData: { get: () => super.LoadData }
|
|
75
100
|
});
|
|
76
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
77
102
|
if (!appEntityButton) {
|
|
@@ -81,79 +106,142 @@ export class ApplicationViewComponent extends BaseBrowserComponent {
|
|
|
81
106
|
this.appName = appEntityButton.Name;
|
|
82
107
|
this.selectedAppEntity = appEntityButton.Data;
|
|
83
108
|
this.categoryEntityID = this.selectedAppEntity.EntityID;
|
|
84
|
-
const parentFolderIDFilter = this.selectedFolderID ? `
|
|
109
|
+
const parentFolderIDFilter = this.selectedFolderID ? `ParentID=${this.selectedFolderID}` : 'ParentID IS NULL';
|
|
85
110
|
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
111
|
const md = new Metadata();
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
112
|
+
const categoryIDFilter = this.selectedFolderID ? `CategoryID=${this.selectedFolderID}` : 'CategoryID IS NULL';
|
|
113
|
+
const userViewFilter = `UserID = ${md.CurrentUser.ID} AND EntityID = ${appEntityButton.Data.EntityID} AND ` + categoryIDFilter;
|
|
114
|
+
LogStatus("categoryFilter: " + categoryFilter + " userViewFilter: " + userViewFilter);
|
|
115
|
+
yield _super.LoadData.call(this, {
|
|
116
|
+
sortItemsAfterLoad: true,
|
|
117
|
+
categoryItemFilter: categoryFilter,
|
|
118
|
+
entityItemFilter: userViewFilter,
|
|
119
|
+
showLoader: true
|
|
120
|
+
});
|
|
121
|
+
this.showLoader = false;
|
|
107
122
|
});
|
|
108
123
|
}
|
|
109
|
-
|
|
110
|
-
|
|
124
|
+
onItemClick(item) {
|
|
125
|
+
if (!item) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
if (item.Type == ItemType.Entity) {
|
|
129
|
+
this.router.navigate(['resource', 'view', item.Data.ID], { queryParams: { viewMode: this.viewMode } });
|
|
130
|
+
}
|
|
131
|
+
else if (item.Type == ItemType.Folder) {
|
|
132
|
+
this.selectedFolderID = item.Data.ID;
|
|
133
|
+
this.navigateToCurrentPage();
|
|
134
|
+
}
|
|
111
135
|
}
|
|
112
136
|
entityItemClick(info) {
|
|
113
137
|
if (info) {
|
|
114
138
|
const paramsArray = ['entity', info.Entity];
|
|
115
|
-
this.router.navigate(paramsArray);
|
|
139
|
+
this.router.navigate(paramsArray, { queryParams: { viewMode: this.viewMode } });
|
|
116
140
|
}
|
|
117
141
|
}
|
|
118
142
|
favoriteItemClick(fav) {
|
|
119
143
|
if (fav) {
|
|
120
144
|
if (fav.Entity === 'User Views') {
|
|
121
145
|
// opening a view, different route
|
|
122
|
-
this.router.navigate(['resource', 'view', fav.RecordID]);
|
|
146
|
+
this.router.navigate(['resource', 'view', fav.RecordID], { queryParams: { viewMode: this.viewMode } });
|
|
123
147
|
}
|
|
124
148
|
else {
|
|
125
|
-
this.router.navigate(['resource', 'record', fav.RecordID], { queryParams: { Entity: fav.Entity } });
|
|
149
|
+
this.router.navigate(['resource', 'record', fav.RecordID], { queryParams: { Entity: fav.Entity, viewMode: this.viewMode } });
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
navigateToCurrentPage() {
|
|
154
|
+
//we're capable of loading the data associated with the selected ApplicationEntityInfo object
|
|
155
|
+
//without a page refresh, but we'd need additonal logic to handle routing, e.g. back
|
|
156
|
+
//button in the browser taking you to the last selected entity.
|
|
157
|
+
//so its easier if we instead navigate to this page with an updated url and leverage angular's router
|
|
158
|
+
let folderID = this.selectedFolderID ? this.selectedFolderID.toString() : null;
|
|
159
|
+
let url = ["/app", this.appNameFromURL];
|
|
160
|
+
let appEntityName = this.selectedAppEntity ? this.selectedAppEntity.Entity : null;
|
|
161
|
+
if (appEntityName) {
|
|
162
|
+
url.push(`${appEntityName}`);
|
|
163
|
+
if (folderID) {
|
|
164
|
+
url.push(`${folderID}`);
|
|
126
165
|
}
|
|
127
166
|
}
|
|
167
|
+
this.router.navigate(url, { queryParams: { viewMode: this.viewMode } });
|
|
168
|
+
}
|
|
169
|
+
isOverflown(element) {
|
|
170
|
+
let e = element.nativeElement;
|
|
171
|
+
return e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth;
|
|
172
|
+
}
|
|
173
|
+
onViewModeChange(viewMode) {
|
|
174
|
+
this.viewMode = viewMode;
|
|
175
|
+
}
|
|
176
|
+
createNewView(event) {
|
|
177
|
+
event.Cancel = true;
|
|
178
|
+
this.viewPropertiesDialog.CreateView(this.appName);
|
|
179
|
+
}
|
|
180
|
+
editView(event) {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
event.Cancel = true;
|
|
183
|
+
let data = event.Item.Data;
|
|
184
|
+
this.viewPropertiesDialog.Open(data.ID);
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
viewPropertiesClosed(args) {
|
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
+
if (args && args.Saved) {
|
|
190
|
+
const entityNameToLower = this.appName.toLowerCase();
|
|
191
|
+
const selectedAppEntity = this.AppEntityButtons.find(e => e.Name.toLocaleLowerCase() == entityNameToLower);
|
|
192
|
+
if (selectedAppEntity) {
|
|
193
|
+
selectedAppEntity.Selected = true;
|
|
194
|
+
yield this.loadEntitiesAndFolders(selectedAppEntity);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
});
|
|
128
199
|
}
|
|
129
200
|
}
|
|
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"]],
|
|
132
|
-
i0.ɵɵ
|
|
133
|
-
i0.ɵɵ
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
i0.ɵɵ
|
|
201
|
+
ApplicationViewComponent.ɵfac = function ApplicationViewComponent_Factory(t) { return new (t || ApplicationViewComponent)(i0.ɵɵdirectiveInject(i1.Router), i0.ɵɵdirectiveInject(i1.ActivatedRoute), i0.ɵɵdirectiveInject(i2.Location), i0.ɵɵdirectiveInject(i3.SharedService)); };
|
|
202
|
+
ApplicationViewComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ApplicationViewComponent, selectors: [["application-view"]], viewQuery: function ApplicationViewComponent_Query(rf, ctx) { if (rf & 1) {
|
|
203
|
+
i0.ɵɵviewQuery(_c0, 5);
|
|
204
|
+
i0.ɵɵviewQuery(ViewPropertiesDialogComponent, 7);
|
|
205
|
+
} if (rf & 2) {
|
|
206
|
+
let _t;
|
|
207
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.entityRowRef = _t.first);
|
|
208
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.viewPropertiesDialog = _t.first);
|
|
209
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 13, vars: 11, consts: [[1, "app-container"], [1, "card-header-entity", "cloumn"], [1, "title-wrap"], [1, "row", 2, "max-width", "100%"], ["entityRow", ""], [1, "col-xs-12", "col-sm-6", "example-col"], ["selection", "single"], ["kendoButton", "", "fillMode", "flat", 3, "toggleable", "selected", "click", 4, "ngFor", "ngForOf"], [3, "EntityName", "ShowPropertiesButton", "dialogClosed"], [1, "main-area"], ["iconName", "aggregateFields", "addText", "Create New View", "ItemEntityName", "User Views", 3, "items", "categoryEntityID", "CategoryEntityName", "selectedFolderID", "showLoader", "viewingResource", "displayAsGrid", "itemClickEvent", "AfterAddFolderEvent", "AfterAddItemEvent", "AfterDeleteItemEvent", "AfterDeleteFolderEvent", "viewModeChangeEvent", "BeforeAddItemEvent", "BeforeUpdateItemEvent"], ["kendoButton", "", "fillMode", "flat", 3, "toggleable", "selected", "click"]], template: function ApplicationViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
210
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h1");
|
|
211
|
+
i0.ɵɵtext(4);
|
|
137
212
|
i0.ɵɵelementEnd()();
|
|
138
|
-
i0.ɵɵelementStart(
|
|
139
|
-
i0.ɵɵtemplate(
|
|
213
|
+
i0.ɵɵelementStart(5, "div", 3, 4)(7, "div", 5)(8, "kendo-buttongroup", 6);
|
|
214
|
+
i0.ɵɵtemplate(9, ApplicationViewComponent_button_9_Template, 3, 3, "button", 7);
|
|
140
215
|
i0.ɵɵelementEnd()()()();
|
|
141
|
-
i0.ɵɵelementStart(
|
|
142
|
-
i0.ɵɵlistener("
|
|
216
|
+
i0.ɵɵelementStart(10, "app-view-properties-dialog", 8);
|
|
217
|
+
i0.ɵɵlistener("dialogClosed", function ApplicationViewComponent_Template_app_view_properties_dialog_dialogClosed_10_listener($event) { return ctx.viewPropertiesClosed($event); });
|
|
218
|
+
i0.ɵɵelementEnd();
|
|
219
|
+
i0.ɵɵelementStart(11, "div", 9)(12, "app-generic-browser-list", 10);
|
|
220
|
+
i0.ɵɵlistener("itemClickEvent", function ApplicationViewComponent_Template_app_generic_browser_list_itemClickEvent_12_listener($event) { return ctx.onItemClick($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); })("viewModeChangeEvent", function ApplicationViewComponent_Template_app_generic_browser_list_viewModeChangeEvent_12_listener($event) { return ctx.onViewModeChange($event); })("BeforeAddItemEvent", function ApplicationViewComponent_Template_app_generic_browser_list_BeforeAddItemEvent_12_listener($event) { return ctx.createNewView($event); })("BeforeUpdateItemEvent", function ApplicationViewComponent_Template_app_generic_browser_list_BeforeUpdateItemEvent_12_listener($event) { return ctx.editView($event); });
|
|
143
221
|
i0.ɵɵelementEnd()()();
|
|
144
222
|
} if (rf & 2) {
|
|
145
|
-
i0.ɵɵadvance(6);
|
|
146
|
-
i0.ɵɵtextInterpolate(ctx.appName);
|
|
147
223
|
i0.ɵɵadvance(4);
|
|
224
|
+
i0.ɵɵtextInterpolate(ctx.appName);
|
|
225
|
+
i0.ɵɵadvance(5);
|
|
148
226
|
i0.ɵɵproperty("ngForOf", ctx.AppEntityButtons);
|
|
227
|
+
i0.ɵɵadvance();
|
|
228
|
+
i0.ɵɵproperty("EntityName", ctx.appName)("ShowPropertiesButton", false);
|
|
149
229
|
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: [
|
|
230
|
+
i0.ɵɵproperty("items", ctx.items)("categoryEntityID", ctx.categoryEntityID)("CategoryEntityName", ctx.categoryEntityName)("selectedFolderID", ctx.selectedFolderID)("showLoader", ctx.showLoader)("viewingResource", false)("displayAsGrid", ctx.displayAsGrid);
|
|
231
|
+
} }, dependencies: [i2.NgForOf, i4.ButtonGroupComponent, i4.ButtonComponent, i5.GenericBrowserListComponent, i6.ViewPropertiesDialogComponent], 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 }\r\n .example-col[_ngcontent-%COMP%] {\r\n overflow-x: auto;\r\n }\r\n .example-col[_ngcontent-%COMP%] .k-selected[_ngcontent-%COMP%] {\r\n font-weight: 800;\r\n color: var(--tdata-color);\r\n border-bottom: 3px solid var(--border-blue) !important;\r\n background: var(--white-color);\r\n \r\n }", ".main-area[_ngcontent-%COMP%] {\r\n display: flex;\r\n flex-direction: column;\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: var(--sideNav);\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 width: 100% !important;\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: grid;\r\n grid-template-columns: repeat(4, 1fr);\r\n gap: 20px;\r\n}"] });
|
|
152
232
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ApplicationViewComponent, [{
|
|
153
233
|
type: Component,
|
|
154
|
-
args: [{ selector: 'application-view', template: "<div class=\"app-container\">\r\n <div class=\"card-header-entity cloumn\">\r\n <div
|
|
155
|
-
}], () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.SharedService }],
|
|
156
|
-
|
|
234
|
+
args: [{ selector: 'application-view', template: "<div class=\"app-container\">\r\n <div class=\"card-header-entity cloumn\">\r\n <div class=\"title-wrap\">\r\n <h1>{{appName}}</h1>\r\n </div>\r\n <div class=\"row\" #entityRow style=\"max-width: 100%;\">\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 fillMode=\"flat\"\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 </kendo-buttongroup>\r\n </div>\r\n </div>\r\n </div>\r\n <app-view-properties-dialog [EntityName]=\"this.appName\" [ShowPropertiesButton]=\"false\" (dialogClosed)=\"viewPropertiesClosed($event)\">\r\n </app-view-properties-dialog>\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)=\"onItemClick($event)\" \r\n [selectedFolderID]=\"selectedFolderID\"\r\n [showLoader]=\"showLoader\"\r\n [viewingResource]=false\r\n [displayAsGrid]=\"displayAsGrid\"\r\n (AfterAddFolderEvent)=\"onEvent($event)\"\r\n (AfterAddItemEvent)=\"onEvent($event)\"\r\n (AfterDeleteItemEvent)=\"onEvent($event)\"\r\n (AfterDeleteFolderEvent)=\"onEvent($event)\"\r\n (viewModeChangeEvent)=\"onViewModeChange($event)\"\r\n (BeforeAddItemEvent)=\"createNewView($event)\"\r\n (BeforeUpdateItemEvent)=\"editView($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 .example-col {\r\n overflow-x: auto;\r\n }\r\n .example-col .k-selected {\r\n font-weight: 800;\r\n color: var(--tdata-color);\r\n border-bottom: 3px solid var(--border-blue) !important;\r\n background: var(--white-color);\r\n \r\n }", "\r\n.main-area {\r\n display: flex;\r\n flex-direction: column;\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: var(--sideNav);\r\n}\r\n.card-wrapper {\r\n border: 1px solid rgba(0, 0, 0, 0.08);\r\n border-radius: 6px;\r\n width: 100% !important;\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: grid;\r\n grid-template-columns: repeat(4, 1fr);\r\n gap: 20px;\r\n}\r\n"] }]
|
|
235
|
+
}], () => [{ type: i1.Router }, { type: i1.ActivatedRoute }, { type: i2.Location }, { type: i3.SharedService }], { entityRowRef: [{
|
|
236
|
+
type: ViewChild,
|
|
237
|
+
args: ['entityRow']
|
|
238
|
+
}], viewPropertiesDialog: [{
|
|
239
|
+
type: ViewChild,
|
|
240
|
+
args: [ViewPropertiesDialogComponent, { static: true }]
|
|
241
|
+
}] }); })();
|
|
242
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ApplicationViewComponent, { className: "ApplicationViewComponent", filePath: "src\\lib\\app-view\\application-view.component.ts", lineNumber: 17 }); })();
|
|
243
|
+
//This is a simple wrapper for the ApplicationEntityInfo class
|
|
244
|
+
//that just adds a Selected property
|
|
157
245
|
class ApplicationEntityButton {
|
|
158
246
|
constructor(data) {
|
|
159
247
|
this.Data = data;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { Folder, Item } from "../../generic/Item.types";
|
|
2
|
-
import {
|
|
3
|
-
import { Router, Params } from '@angular/router';
|
|
2
|
+
import { Router, Params, ActivatedRoute } from '@angular/router';
|
|
4
3
|
import { BaseEvent } from "../../generic/Events.types";
|
|
5
4
|
export declare class BaseBrowserComponent {
|
|
6
5
|
showLoader: boolean;
|
|
7
6
|
items: Item[];
|
|
8
7
|
folders: Folder[];
|
|
9
8
|
entityData: any[];
|
|
10
|
-
PathData: PathData;
|
|
11
9
|
selectedFolderID: number | null;
|
|
10
|
+
protected viewMode: string;
|
|
12
11
|
protected parentFolderID: number | null;
|
|
13
|
-
private EntityItemFilter;
|
|
14
|
-
private CategoryItemFilter;
|
|
15
12
|
protected pageName: string;
|
|
16
13
|
protected routeName: string;
|
|
17
14
|
protected routeNameSingular: string;
|
|
18
15
|
protected itemEntityName: string;
|
|
19
16
|
protected categoryEntityName: string;
|
|
20
17
|
constructor();
|
|
21
|
-
|
|
18
|
+
get displayAsGrid(): boolean;
|
|
19
|
+
protected InitPathAndQueryData(queryParams: Params | undefined, route: ActivatedRoute): void;
|
|
20
|
+
buildFiltersAndLoadData(): Promise<void>;
|
|
21
|
+
protected InitForResource(router: ActivatedRoute): void;
|
|
22
22
|
protected LoadData(params?: LoadDataParams): Promise<void>;
|
|
23
23
|
protected sortItems(): void;
|
|
24
|
-
protected
|
|
25
|
-
protected GetCategories(): Promise<Folder[]>;
|
|
24
|
+
protected RunView(entityName: string, extraFilter: string | undefined): Promise<any[]>;
|
|
26
25
|
protected createItemsFromEntityData(entityData: any[]): Item[];
|
|
27
26
|
protected createItemsFromFolders(folders: Folder[]): Item[];
|
|
28
27
|
protected Navigate(item: Item, router: Router, dataID: string): void;
|
|
29
28
|
onEvent(event: BaseEvent): void;
|
|
29
|
+
onViewModeChange(viewMode: string): void;
|
|
30
30
|
}
|
|
31
31
|
export type LoadDataParams = {
|
|
32
32
|
entityItemFilter?: string;
|
|
@@ -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,
|
|
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,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjE,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,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9C,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAU;IACpC,SAAS,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAQ;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;;IAQ1C,IAAW,aAAa,IAAI,OAAO,CAAqC;IAExE,SAAS,CAAC,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI;IAM/E,uBAAuB,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBrD,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;cAOvC,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IA6BhE,SAAS,CAAC,SAAS,IAAI,IAAI;cAQX,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAe5F,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;IAe7D,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAa/B,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAGlD;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"}
|