@memberjunction/ng-explorer-core 0.9.66 → 0.9.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/ask-skip/ask-skip.component.js +1 -1
- package/dist/lib/favorites/favorites.component.d.ts +2 -1
- package/dist/lib/favorites/favorites.component.js +31 -17
- package/dist/lib/generic/base-form-component.js +2 -2
- package/dist/lib/generic-browse-list/generic-browse-list.component.d.ts +5 -1
- package/dist/lib/generic-browse-list/generic-browse-list.component.js +42 -21
- package/dist/lib/resource-wrappers/record-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/report-resource.component.js +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +1 -1
- package/dist/lib/single-application/single-application.component.d.ts +0 -1
- package/dist/lib/single-application/single-application.component.js +3 -22
- package/dist/lib/single-dashboard/single-dashboard.component.js +1 -1
- package/package.json +7 -7
|
@@ -254,7 +254,7 @@ export class AskSkipComponent {
|
|
|
254
254
|
}
|
|
255
255
|
else {
|
|
256
256
|
const md = new Metadata();
|
|
257
|
-
newConvoObject =
|
|
257
|
+
newConvoObject = yield md.GetEntityObject('Conversations');
|
|
258
258
|
yield newConvoObject.Load(conversation.ID);
|
|
259
259
|
// now replace conversation in the list with the new object
|
|
260
260
|
this.Conversations = this.Conversations.map(c => c.ID == conversation.ID ? newConvoObject : c);
|
|
@@ -6,8 +6,9 @@ export declare class FavoritesComponent {
|
|
|
6
6
|
favorites: UserFavoriteEntity[];
|
|
7
7
|
ExtraFilter: string;
|
|
8
8
|
constructor(router: Router);
|
|
9
|
-
ngOnInit(): void
|
|
9
|
+
ngOnInit(): Promise<void>;
|
|
10
10
|
favoriteItemClick(fav: UserFavoriteEntity): void;
|
|
11
|
+
favoriteItemDisplayName(fav: any): any;
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<FavoritesComponent, never>;
|
|
12
13
|
static ɵcmp: i0.ɵɵComponentDeclaration<FavoritesComponent, "app-favorites", never, {}, {}, never, never, false, never>;
|
|
13
14
|
}
|
|
@@ -36,10 +36,11 @@ function FavoritesComponent_ng_template_3_Template(rf, ctx) { if (rf & 1) {
|
|
|
36
36
|
i0.ɵɵelementEnd();
|
|
37
37
|
} if (rf & 2) {
|
|
38
38
|
const dataItem_r2 = ctx.dataItem;
|
|
39
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
39
40
|
i0.ɵɵadvance(2);
|
|
40
41
|
i0.ɵɵtextInterpolate(dataItem_r2.Entity);
|
|
41
42
|
i0.ɵɵadvance(1);
|
|
42
|
-
i0.ɵɵtextInterpolate1(": ",
|
|
43
|
+
i0.ɵɵtextInterpolate1(": ", ctx_r1.favoriteItemDisplayName(dataItem_r2), " ");
|
|
43
44
|
} }
|
|
44
45
|
export class FavoritesComponent {
|
|
45
46
|
constructor(router) {
|
|
@@ -48,28 +49,31 @@ export class FavoritesComponent {
|
|
|
48
49
|
this.ExtraFilter = '';
|
|
49
50
|
}
|
|
50
51
|
ngOnInit() {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
const md = new Metadata();
|
|
54
|
+
const rv = new RunView();
|
|
55
|
+
let sFilter = `UserID=${md.CurrentUser.ID}`;
|
|
56
|
+
if (this.ExtraFilter)
|
|
57
|
+
sFilter += `AND (${this.ExtraFilter})`;
|
|
58
|
+
const viewResults = yield rv.RunView({
|
|
59
|
+
EntityName: 'User Favorites',
|
|
60
|
+
ExtraFilter: sFilter
|
|
61
|
+
});
|
|
62
|
+
this.favorites = viewResults.Results; // set the result in the list and let the below happen after async and it will update via data binding when done
|
|
63
|
+
const input = this.favorites.map(fav => {
|
|
64
|
+
return { EntityName: fav.Entity, PrimaryKeyValues: [{ FieldName: 'ID', Value: fav.RecordID }] };
|
|
63
65
|
});
|
|
64
66
|
const results = yield md.GetEntityRecordNames(input);
|
|
65
|
-
if (results)
|
|
67
|
+
if (results) {
|
|
66
68
|
results.forEach((result) => {
|
|
67
|
-
const fav = favorites.
|
|
69
|
+
const fav = this.favorites.find(f => f.Entity == result.EntityName && f.RecordID == result.PrimaryKeyValues[0].Value);
|
|
68
70
|
if (fav) {
|
|
71
|
+
// typecast fav to any so we can add the recordname into the object below
|
|
69
72
|
fav.RecordName = result.Success ? result.RecordName : fav.Entity + ' ' + fav.RecordID;
|
|
70
73
|
}
|
|
71
74
|
});
|
|
72
|
-
|
|
75
|
+
}
|
|
76
|
+
});
|
|
73
77
|
}
|
|
74
78
|
favoriteItemClick(fav) {
|
|
75
79
|
if (fav) {
|
|
@@ -82,6 +86,16 @@ export class FavoritesComponent {
|
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
}
|
|
89
|
+
favoriteItemDisplayName(fav) {
|
|
90
|
+
if (fav) {
|
|
91
|
+
if (fav.RecordName) {
|
|
92
|
+
return fav.RecordName;
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
return fav.RecordID;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
85
99
|
}
|
|
86
100
|
FavoritesComponent.ɵfac = function FavoritesComponent_Factory(t) { return new (t || FavoritesComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
|
|
87
101
|
FavoritesComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FavoritesComponent, selectors: [["app-favorites"]], decls: 4, vars: 1, consts: [[1, "list-view", 3, "data"], [1, "entity-wrap"], ["kendoListViewHeaderTemplate", ""], ["kendoListViewItemTemplate", ""], [1, "header"], [1, "head-tag"], [1, "k-icon", "k-i-clock"], [1, "count"], [1, "list-item", 3, "click"]], template: function FavoritesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -96,5 +110,5 @@ FavoritesComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: Favorite
|
|
|
96
110
|
} }, dependencies: [i2.ItemTemplateDirective, i2.HeaderTemplateDirective, i2.ListViewComponent], styles: [".favorites-list[_ngcontent-%COMP%] {\r\n width: 400px;\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 }"] });
|
|
97
111
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FavoritesComponent, [{
|
|
98
112
|
type: Component,
|
|
99
|
-
args: [{ selector: 'app-favorites', template: "<kendo-listview\n [data]=\"favorites\"\n class=\"list-view\"\n>\n <ng-container class=\"entity-wrap\">\n <ng-template kendoListViewHeaderTemplate>\n <div class=\"header\"> \n <div class=\"head-tag\">\n <span class=\"k-icon k-i-clock\"></span>\n Favorites\n </div>\n <div class=\"count\">{{favorites.length}}</div>\n </div>\n </ng-template>\n <ng-template kendoListViewItemTemplate let-dataItem=\"dataItem\">\n <div class=\"list-item\" (click)=\"favoriteItemClick(dataItem)\">\n <b>{{dataItem.Entity}}</b>: {{dataItem
|
|
113
|
+
args: [{ selector: 'app-favorites', template: "<kendo-listview\n [data]=\"favorites\"\n class=\"list-view\"\n>\n <ng-container class=\"entity-wrap\">\n <ng-template kendoListViewHeaderTemplate>\n <div class=\"header\"> \n <div class=\"head-tag\">\n <span class=\"k-icon k-i-clock\"></span>\n Favorites\n </div>\n <div class=\"count\">{{favorites.length}}</div>\n </div>\n </ng-template>\n <ng-template kendoListViewItemTemplate let-dataItem=\"dataItem\">\n <div class=\"list-item\" (click)=\"favoriteItemClick(dataItem)\">\n <b>{{dataItem.Entity}}</b>: {{favoriteItemDisplayName(dataItem)}}\n </div>\n </ng-template>\n </ng-container>\n</kendo-listview>\n", styles: [".favorites-list {\r\n width: 400px;\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 "] }]
|
|
100
114
|
}], function () { return [{ type: i1.Router }]; }, null); })();
|
|
@@ -44,7 +44,7 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
45
|
if (this.record) {
|
|
46
46
|
const md = new Metadata();
|
|
47
|
-
this._isFavorite = yield md.GetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.
|
|
47
|
+
this._isFavorite = yield md.GetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKeys.map(pk => { return { FieldName: pk.Name, Value: pk.Value }; }));
|
|
48
48
|
this.FavoriteInitDone = true;
|
|
49
49
|
}
|
|
50
50
|
});
|
|
@@ -107,7 +107,7 @@ export class BaseFormComponent extends BaseRecordComponent {
|
|
|
107
107
|
SetFavoriteStatus(isFavorite) {
|
|
108
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
109
109
|
const md = new Metadata();
|
|
110
|
-
yield md.SetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.
|
|
110
|
+
yield md.SetRecordFavoriteStatus(md.CurrentUser.ID, this.record.EntityInfo.Name, this.record.PrimaryKeys.map(pk => { return { FieldName: pk.Name, Value: pk.Value }; }), isFavorite);
|
|
111
111
|
this._isFavorite = isFavorite;
|
|
112
112
|
});
|
|
113
113
|
}
|
|
@@ -8,9 +8,13 @@ export declare class GenericBrowseListComponent {
|
|
|
8
8
|
title: string;
|
|
9
9
|
items: any[];
|
|
10
10
|
iconName: string;
|
|
11
|
+
showAddButton: boolean;
|
|
12
|
+
addText: string;
|
|
13
|
+
addButtonClickEvent: EventEmitter<any>;
|
|
11
14
|
itemClickEvent: EventEmitter<any>;
|
|
12
15
|
constructor(router: Router);
|
|
13
16
|
itemClick(item: any): void;
|
|
17
|
+
addButtonClicked(): void;
|
|
14
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<GenericBrowseListComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GenericBrowseListComponent, "app-generic-browse-list", never, { "showLoader": "showLoader"; "itemType": "itemType"; "title": "title"; "items": "items"; "iconName": "iconName"; }, { "itemClickEvent": "itemClickEvent"; }, never, never, false, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GenericBrowseListComponent, "app-generic-browse-list", never, { "showLoader": "showLoader"; "itemType": "itemType"; "title": "title"; "items": "items"; "iconName": "iconName"; "showAddButton": "showAddButton"; "addText": "addText"; }, { "addButtonClickEvent": "addButtonClickEvent"; "itemClickEvent": "itemClickEvent"; }, never, never, false, never>;
|
|
16
20
|
}
|
|
@@ -2,23 +2,24 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
import * as i1 from "@angular/router";
|
|
4
4
|
import * as i2 from "@angular/common";
|
|
5
|
-
import * as i3 from "@progress/kendo-angular-
|
|
6
|
-
import * as i4 from "@progress/kendo-angular-
|
|
7
|
-
import * as i5 from "@progress/kendo-angular-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
import * as i3 from "@progress/kendo-angular-buttons";
|
|
6
|
+
import * as i4 from "@progress/kendo-angular-indicators";
|
|
7
|
+
import * as i5 from "@progress/kendo-angular-icons";
|
|
8
|
+
import * as i6 from "@progress/kendo-angular-layout";
|
|
9
|
+
function GenericBrowseListComponent_kendo_loader_9_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
+
i0.ɵɵelement(0, "kendo-loader", 8);
|
|
10
11
|
} }
|
|
11
|
-
function
|
|
12
|
+
function GenericBrowseListComponent_div_10_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
12
13
|
const _r5 = i0.ɵɵgetCurrentView();
|
|
13
|
-
i0.ɵɵelementStart(0, "div")(1, "kendo-card",
|
|
14
|
-
i0.ɵɵelement(3, "kendo-icon",
|
|
14
|
+
i0.ɵɵelementStart(0, "div")(1, "kendo-card", 11)(2, "kendo-card-header", 12);
|
|
15
|
+
i0.ɵɵelement(3, "kendo-icon", 13);
|
|
15
16
|
i0.ɵɵelementEnd();
|
|
16
|
-
i0.ɵɵelementStart(4, "kendo-card-body",
|
|
17
|
-
i0.ɵɵlistener("click", function
|
|
18
|
-
i0.ɵɵelementStart(5, "div",
|
|
17
|
+
i0.ɵɵelementStart(4, "kendo-card-body", 14);
|
|
18
|
+
i0.ɵɵlistener("click", function GenericBrowseListComponent_div_10_div_1_Template_kendo_card_body_click_4_listener() { const restoredCtx = i0.ɵɵrestoreView(_r5); const d_r3 = restoredCtx.$implicit; const ctx_r4 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r4.itemClick(d_r3)); });
|
|
19
|
+
i0.ɵɵelementStart(5, "div", 15)(6, "h5", 16);
|
|
19
20
|
i0.ɵɵtext(7);
|
|
20
21
|
i0.ɵɵelementEnd();
|
|
21
|
-
i0.ɵɵelementStart(8, "p",
|
|
22
|
+
i0.ɵɵelementStart(8, "p", 17);
|
|
22
23
|
i0.ɵɵtext(9);
|
|
23
24
|
i0.ɵɵelementEnd()()()()();
|
|
24
25
|
} if (rf & 2) {
|
|
@@ -31,9 +32,9 @@ function GenericBrowseListComponent_div_7_div_1_Template(rf, ctx) { if (rf & 1)
|
|
|
31
32
|
i0.ɵɵadvance(2);
|
|
32
33
|
i0.ɵɵtextInterpolate(d_r3.Description);
|
|
33
34
|
} }
|
|
34
|
-
function
|
|
35
|
-
i0.ɵɵelementStart(0, "div",
|
|
36
|
-
i0.ɵɵtemplate(1,
|
|
35
|
+
function GenericBrowseListComponent_div_10_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
i0.ɵɵelementStart(0, "div", 9);
|
|
37
|
+
i0.ɵɵtemplate(1, GenericBrowseListComponent_div_10_div_1_Template, 10, 4, "div", 10);
|
|
37
38
|
i0.ɵɵelementEnd();
|
|
38
39
|
} if (rf & 2) {
|
|
39
40
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -48,6 +49,9 @@ export class GenericBrowseListComponent {
|
|
|
48
49
|
this.title = '';
|
|
49
50
|
this.items = [];
|
|
50
51
|
this.iconName = 'view-icon';
|
|
52
|
+
this.showAddButton = false;
|
|
53
|
+
this.addText = 'Add';
|
|
54
|
+
this.addButtonClickEvent = new EventEmitter();
|
|
51
55
|
this.itemClickEvent = new EventEmitter();
|
|
52
56
|
}
|
|
53
57
|
itemClick(item) {
|
|
@@ -55,27 +59,38 @@ export class GenericBrowseListComponent {
|
|
|
55
59
|
this.itemClickEvent.emit(item);
|
|
56
60
|
}
|
|
57
61
|
}
|
|
62
|
+
addButtonClicked() {
|
|
63
|
+
this.addButtonClickEvent.emit();
|
|
64
|
+
}
|
|
58
65
|
}
|
|
59
66
|
GenericBrowseListComponent.ɵfac = function GenericBrowseListComponent_Factory(t) { return new (t || GenericBrowseListComponent)(i0.ɵɵdirectiveInject(i1.Router)); };
|
|
60
|
-
GenericBrowseListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GenericBrowseListComponent, selectors: [["app-generic-browse-list"]], inputs: { showLoader: "showLoader", itemType: "itemType", title: "title", items: "items", iconName: "iconName" }, outputs: { itemClickEvent: "itemClickEvent" }, decls:
|
|
67
|
+
GenericBrowseListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GenericBrowseListComponent, selectors: [["app-generic-browse-list"]], inputs: { showLoader: "showLoader", itemType: "itemType", title: "title", items: "items", iconName: "iconName", showAddButton: "showAddButton", addText: "addText" }, outputs: { addButtonClickEvent: "addButtonClickEvent", itemClickEvent: "itemClickEvent" }, decls: 11, vars: 5, consts: [[1, "card-container"], [1, "card-header-entity"], [1, "title-wrap"], [1, "add-item"], ["kendoButton", "", "icon", "addIcon", 3, "primary", "click"], [1, "main-area"], ["type", "converging-spinner", 4, "ngIf"], ["class", "card-list k-d-flex k-flex-row k-h-full k-flex-wrap", 4, "ngIf"], ["type", "converging-spinner"], [1, "card-list", "k-d-flex", "k-flex-row", "k-h-full", "k-flex-wrap"], [4, "ngFor", "ngForOf"], [1, "card-wrapper"], [1, "k-hstack", "view-card"], ["name", "table"], [3, "click"], [1, "view-card-content", "k-cursor-pointer"], ["kendoCardTitle", ""], ["kendoCardSubtitle", ""]], template: function GenericBrowseListComponent_Template(rf, ctx) { if (rf & 1) {
|
|
61
68
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "div", 2)(3, "h1");
|
|
62
69
|
i0.ɵɵtext(4);
|
|
70
|
+
i0.ɵɵelementEnd()();
|
|
71
|
+
i0.ɵɵelementStart(5, "div", 3)(6, "button", 4);
|
|
72
|
+
i0.ɵɵlistener("click", function GenericBrowseListComponent_Template_button_click_6_listener() { return ctx.addButtonClicked(); });
|
|
73
|
+
i0.ɵɵtext(7);
|
|
63
74
|
i0.ɵɵelementEnd()()();
|
|
64
|
-
i0.ɵɵelementStart(
|
|
65
|
-
i0.ɵɵtemplate(
|
|
66
|
-
i0.ɵɵtemplate(
|
|
75
|
+
i0.ɵɵelementStart(8, "div", 5);
|
|
76
|
+
i0.ɵɵtemplate(9, GenericBrowseListComponent_kendo_loader_9_Template, 1, 0, "kendo-loader", 6);
|
|
77
|
+
i0.ɵɵtemplate(10, GenericBrowseListComponent_div_10_Template, 2, 1, "div", 7);
|
|
67
78
|
i0.ɵɵelementEnd()();
|
|
68
79
|
} if (rf & 2) {
|
|
69
80
|
i0.ɵɵadvance(4);
|
|
70
81
|
i0.ɵɵtextInterpolate(ctx.title);
|
|
71
82
|
i0.ɵɵadvance(2);
|
|
83
|
+
i0.ɵɵproperty("primary", true);
|
|
84
|
+
i0.ɵɵadvance(1);
|
|
85
|
+
i0.ɵɵtextInterpolate(ctx.addText);
|
|
86
|
+
i0.ɵɵadvance(2);
|
|
72
87
|
i0.ɵɵproperty("ngIf", ctx.showLoader);
|
|
73
88
|
i0.ɵɵadvance(1);
|
|
74
89
|
i0.ɵɵproperty("ngIf", !ctx.showLoader);
|
|
75
|
-
} }, dependencies: [i2.NgForOf, i2.NgIf, i3.
|
|
90
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, i3.Button, i4.LoaderComponent, i5.IconComponent, i6.CardComponent, i6.CardHeaderComponent, i6.CardBodyComponent, i6.CardTitleDirective, i6.CardSubtitleDirective], styles: [".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 }"] });
|
|
76
91
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GenericBrowseListComponent, [{
|
|
77
92
|
type: Component,
|
|
78
|
-
args: [{ selector: 'app-generic-browse-list', template: "<div class=\"card-container\">\n <div class=\"card-header-entity\">\n <div class=\"title-wrap\">\n <h1>{{title}}</h1>\n </div>\n </div>\n <div class=\"main-area\"> \n <kendo-loader *ngIf=\"showLoader\" type=\"converging-spinner\" ></kendo-loader>\n <div class=\"card-list k-d-flex k-flex-row k-h-full k-flex-wrap\" *ngIf=\"!showLoader\">\n <div *ngFor=\"let d of items\">\n <kendo-card class=\"card-wrapper\">\n <kendo-card-header class=\"k-hstack view-card\">\n <kendo-icon name=\"table\" [class]=\"iconName\"></kendo-icon>\n </kendo-card-header>\n \n <kendo-card-body (click)=\"itemClick(d)\">\n <div class=\"view-card-content k-cursor-pointer\">\n <h5 kendoCardTitle>{{ d.Name }}</h5>\n <p kendoCardSubtitle>{{ d.Description }}</p>\n </div>\n </kendo-card-body>\n </kendo-card>\n </div>\n </div>\n </div>\n</div>", styles: ["\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 "] }]
|
|
93
|
+
args: [{ selector: 'app-generic-browse-list', template: "<div class=\"card-container\">\n <div class=\"card-header-entity\">\n <div class=\"title-wrap\">\n <h1>{{title}}</h1>\n </div>\n <div class=\"add-item\">\n <button kendoButton (click)=\"addButtonClicked()\" icon=\"addIcon\" [primary]=\"true\">{{addText}}</button>\n </div>\n </div>\n <div class=\"main-area\"> \n <kendo-loader *ngIf=\"showLoader\" type=\"converging-spinner\" ></kendo-loader>\n <div class=\"card-list k-d-flex k-flex-row k-h-full k-flex-wrap\" *ngIf=\"!showLoader\">\n <div *ngFor=\"let d of items\">\n <kendo-card class=\"card-wrapper\">\n <kendo-card-header class=\"k-hstack view-card\">\n <kendo-icon name=\"table\" [class]=\"iconName\"></kendo-icon>\n </kendo-card-header>\n \n <kendo-card-body (click)=\"itemClick(d)\">\n <div class=\"view-card-content k-cursor-pointer\">\n <h5 kendoCardTitle>{{ d.Name }}</h5>\n <p kendoCardSubtitle>{{ d.Description }}</p>\n </div>\n </kendo-card-body>\n </kendo-card>\n </div>\n </div>\n </div>\n</div>", styles: ["\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 "] }]
|
|
79
94
|
}], function () { return [{ type: i1.Router }]; }, { showLoader: [{
|
|
80
95
|
type: Input
|
|
81
96
|
}], itemType: [{
|
|
@@ -86,6 +101,12 @@ GenericBrowseListComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
86
101
|
type: Input
|
|
87
102
|
}], iconName: [{
|
|
88
103
|
type: Input
|
|
104
|
+
}], showAddButton: [{
|
|
105
|
+
type: Input
|
|
106
|
+
}], addText: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}], addButtonClickEvent: [{
|
|
109
|
+
type: Output
|
|
89
110
|
}], itemClickEvent: [{
|
|
90
111
|
type: Output
|
|
91
112
|
}] }); })();
|
|
@@ -38,7 +38,7 @@ let EntityRecordResource = class EntityRecordResource extends BaseResourceCompon
|
|
|
38
38
|
return '';
|
|
39
39
|
else {
|
|
40
40
|
const md = new Metadata();
|
|
41
|
-
const name = yield md.GetEntityRecordName(data.Configuration.Entity, data.ResourceRecordID);
|
|
41
|
+
const name = yield md.GetEntityRecordName(data.Configuration.Entity, [{ FieldName: "ID", Value: data.ResourceRecordID }]);
|
|
42
42
|
const e = md.Entities.find(e => e.Name === data.Configuration.Entity);
|
|
43
43
|
if (!e)
|
|
44
44
|
throw new Error(`Entity ${data.Configuration.Entity} not found in metadata`);
|
|
@@ -28,7 +28,7 @@ let ReportResource = class ReportResource extends BaseResourceComponent {
|
|
|
28
28
|
GetResourceDisplayName(data) {
|
|
29
29
|
return __awaiter(this, void 0, void 0, function* () {
|
|
30
30
|
const md = new Metadata();
|
|
31
|
-
const name = yield md.GetEntityRecordName('Reports', data.ResourceRecordID);
|
|
31
|
+
const name = yield md.GetEntityRecordName('Reports', [{ FieldName: "ID", Value: data.ResourceRecordID }]);
|
|
32
32
|
return `${name ? name : 'Report ID: ' + data.ResourceRecordID}`;
|
|
33
33
|
});
|
|
34
34
|
}
|
|
@@ -28,7 +28,7 @@ let UserViewResource = class UserViewResource extends BaseResourceComponent {
|
|
|
28
28
|
return __awaiter(this, void 0, void 0, function* () {
|
|
29
29
|
const md = new Metadata();
|
|
30
30
|
if (data.ResourceRecordID > 0) {
|
|
31
|
-
const name = yield md.GetEntityRecordName('User Views', data.ResourceRecordID);
|
|
31
|
+
const name = yield md.GetEntityRecordName('User Views', [{ FieldName: "ID", Value: data.ResourceRecordID }]);
|
|
32
32
|
return name ? name : 'View: ' + data.ResourceRecordID;
|
|
33
33
|
}
|
|
34
34
|
else if (((_a = data.Configuration) === null || _a === void 0 ? void 0 : _a.Entity) && ((_b = data.Configuration) === null || _b === void 0 ? void 0 : _b.Entity.length) > 0) {
|
|
@@ -12,7 +12,6 @@ export declare class SingleApplicationComponent implements OnInit {
|
|
|
12
12
|
appName: string;
|
|
13
13
|
appDescription: string;
|
|
14
14
|
appEntities: ApplicationEntityInfo[];
|
|
15
|
-
appFavorites: UserFavoriteEntity[];
|
|
16
15
|
ngOnInit(): void;
|
|
17
16
|
entityItemClick(info: ApplicationEntityInfo): void;
|
|
18
17
|
favoriteItemClick(fav: UserFavoriteEntity): void;
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { Component } from '@angular/core';
|
|
11
|
-
import { Metadata
|
|
11
|
+
import { Metadata } from '@memberjunction/core';
|
|
12
12
|
import * as i0 from "@angular/core";
|
|
13
13
|
import * as i1 from "@angular/router";
|
|
14
14
|
import * as i2 from "../../shared/shared.service";
|
|
@@ -48,10 +48,9 @@ export class SingleApplicationComponent {
|
|
|
48
48
|
this.appName = '';
|
|
49
49
|
this.appDescription = '';
|
|
50
50
|
this.appEntities = [];
|
|
51
|
-
this.appFavorites = [];
|
|
52
51
|
}
|
|
53
52
|
ngOnInit() {
|
|
54
|
-
this.route.paramMap.subscribe(params => {
|
|
53
|
+
this.route.paramMap.subscribe((params) => __awaiter(this, void 0, void 0, function* () {
|
|
55
54
|
const appName = params.get('appName');
|
|
56
55
|
// Perform any necessary actions with the ViewID, such as fetching data
|
|
57
56
|
if (appName) {
|
|
@@ -61,27 +60,9 @@ export class SingleApplicationComponent {
|
|
|
61
60
|
if (app) {
|
|
62
61
|
this.appDescription = app.Description;
|
|
63
62
|
this.appEntities = app.ApplicationEntities;
|
|
64
|
-
const rv = new RunView();
|
|
65
|
-
rv.RunView({
|
|
66
|
-
EntityName: 'User Favorites',
|
|
67
|
-
ExtraFilter: `UserID=${md.CurrentUser.ID} AND EntityID IN (${app.ApplicationEntities.map(ae => ae.EntityID).join(',')})`
|
|
68
|
-
}).then((favorites) => __awaiter(this, void 0, void 0, function* () {
|
|
69
|
-
this.appFavorites = favorites.Results; // set the result in the list and let the below happen after async and it will update via data binding when done
|
|
70
|
-
const input = favorites.Results.map((fav) => {
|
|
71
|
-
return { EntityName: fav.Entity, PrimaryKeyValue: fav.RecordID };
|
|
72
|
-
});
|
|
73
|
-
const results = yield md.GetEntityRecordNames(input);
|
|
74
|
-
if (results)
|
|
75
|
-
results.forEach((result) => {
|
|
76
|
-
const fav = favorites.Results.find((f) => f.Entity === result.EntityName && f.RecordID === result.PrimaryKeyValue);
|
|
77
|
-
if (fav) {
|
|
78
|
-
fav.RecordName = result.Success ? result.RecordName : fav.Entity + ' ' + fav.RecordID;
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}));
|
|
82
63
|
}
|
|
83
64
|
}
|
|
84
|
-
});
|
|
65
|
+
}));
|
|
85
66
|
}
|
|
86
67
|
entityItemClick(info) {
|
|
87
68
|
if (info) {
|
|
@@ -81,7 +81,7 @@ export class SingleDashboardComponent {
|
|
|
81
81
|
if (this.ResourceData) {
|
|
82
82
|
const md = new Metadata();
|
|
83
83
|
let uiConfig = { items: [] };
|
|
84
|
-
this.dashboardEntity =
|
|
84
|
+
this.dashboardEntity = yield md.GetEntityObject('Dashboards');
|
|
85
85
|
if (this.ResourceData.ResourceRecordID && this.ResourceData.ResourceRecordID > 0) {
|
|
86
86
|
yield this.dashboardEntity.Load(this.ResourceData.ResourceRecordID);
|
|
87
87
|
// now we have loaded and we need to get the UIConfigDetails
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/ng-explorer-core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.75",
|
|
4
4
|
"description": "MemberJunction Explorer: Core Angular Components",
|
|
5
5
|
"main": "./dist/public-api.js",
|
|
6
6
|
"typings": "./dist/public-api.d.ts",
|
|
@@ -27,12 +27,12 @@
|
|
|
27
27
|
"@progress/kendo-angular-listview": "^12.1.0"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@memberjunction/global": "^0.9.
|
|
31
|
-
"@memberjunction/core": "^0.9.
|
|
32
|
-
"@memberjunction/ng-compare-records": "^0.9.
|
|
33
|
-
"@memberjunction/ng-record-changes": "^0.9.
|
|
34
|
-
"@memberjunction/ng-container-directives": "^0.9.
|
|
35
|
-
"@memberjunction/ng-user-view-grid": "^0.9.
|
|
30
|
+
"@memberjunction/global": "^0.9.117",
|
|
31
|
+
"@memberjunction/core": "^0.9.128",
|
|
32
|
+
"@memberjunction/ng-compare-records": "^0.9.125",
|
|
33
|
+
"@memberjunction/ng-record-changes": "^0.9.58",
|
|
34
|
+
"@memberjunction/ng-container-directives": "^0.9.97",
|
|
35
|
+
"@memberjunction/ng-user-view-grid": "^0.9.108",
|
|
36
36
|
"tslib": "^2.3.0"
|
|
37
37
|
},
|
|
38
38
|
"sideEffects": false
|