@sunbird-cb/resolver 1.0.0-ang-9-12 → 1.0.0-ang-13-16
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/esm2022/lib/invalid-permission/invalid-permission.component.mjs +29 -0
- package/esm2022/lib/invalid-registration/invalid-registration.component.mjs +23 -0
- package/esm2022/lib/restricted/restricted.component.mjs +23 -0
- package/esm2022/lib/unresolved/unresolved.component.mjs +30 -0
- package/{esm2015/lib/widget-base.component.js → esm2022/lib/widget-base.component.mjs} +4 -4
- package/{esm2015/lib/widget-resolver.directive.js → esm2022/lib/widget-resolver.directive.mjs} +4 -4
- package/esm2022/lib/widget-resolver.module.mjs +70 -0
- package/{esm2015/lib/widget-resolver.service.js → esm2022/lib/widget-resolver.service.mjs} +4 -4
- package/fesm2022/sunbird-cb-resolver.mjs +401 -0
- package/fesm2022/sunbird-cb-resolver.mjs.map +1 -0
- package/{sunbird-cb-resolver.d.ts → index.d.ts} +1 -0
- package/lib/invalid-permission/invalid-permission.component.d.ts +2 -1
- package/lib/invalid-permission/invalid-permission.component.d.ts.map +1 -0
- package/lib/invalid-registration/invalid-registration.component.d.ts +2 -1
- package/lib/invalid-registration/invalid-registration.component.d.ts.map +1 -0
- package/lib/restricted/restricted.component.d.ts +2 -1
- package/lib/restricted/restricted.component.d.ts.map +1 -0
- package/lib/unresolved/unresolved.component.d.ts +2 -1
- package/lib/unresolved/unresolved.component.d.ts.map +1 -0
- package/lib/widget-base.component.d.ts +3 -2
- package/lib/widget-base.component.d.ts.map +1 -0
- package/lib/widget-resolver.constant.d.ts +1 -0
- package/lib/widget-resolver.constant.d.ts.map +1 -0
- package/lib/widget-resolver.directive.d.ts +2 -1
- package/lib/widget-resolver.directive.d.ts.map +1 -0
- package/lib/widget-resolver.model.d.ts +2 -1
- package/lib/widget-resolver.model.d.ts.map +1 -0
- package/lib/widget-resolver.module.d.ts +4 -3
- package/lib/widget-resolver.module.d.ts.map +1 -0
- package/lib/widget-resolver.permissions.d.ts +1 -0
- package/lib/widget-resolver.permissions.d.ts.map +1 -0
- package/lib/widget-resolver.service.d.ts +1 -0
- package/lib/widget-resolver.service.d.ts.map +1 -0
- package/package.json +25 -17
- package/public-api.d.ts +1 -0
- package/public-api.d.ts.map +1 -0
- package/sunbird-cb-resolver-1.0.0-ang-13-16.tgz +0 -0
- package/sunbird-cb-resolver.d.ts.map +1 -0
- package/bundles/sunbird-cb-resolver.umd.js +0 -963
- package/bundles/sunbird-cb-resolver.umd.js.map +0 -1
- package/esm2015/lib/invalid-permission/invalid-permission.component.js +0 -33
- package/esm2015/lib/invalid-registration/invalid-registration.component.js +0 -27
- package/esm2015/lib/restricted/restricted.component.js +0 -27
- package/esm2015/lib/unresolved/unresolved.component.js +0 -34
- package/esm2015/lib/widget-resolver.module.js +0 -77
- package/fesm2015/sunbird-cb-resolver.js +0 -424
- package/fesm2015/sunbird-cb-resolver.js.map +0 -1
- /package/{esm2015/lib/widget-resolver.constant.js → esm2022/lib/widget-resolver.constant.mjs} +0 -0
- /package/{esm2015/lib/widget-resolver.model.js → esm2022/lib/widget-resolver.model.mjs} +0 -0
- /package/{esm2015/lib/widget-resolver.permissions.js → esm2022/lib/widget-resolver.permissions.mjs} +0 -0
- /package/{esm2015/public-api.js → esm2022/public-api.mjs} +0 -0
- /package/{esm2015/sunbird-cb-resolver.js → esm2022/sunbird-cb-resolver.mjs} +0 -0
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Component, Input, HostBinding, Injectable, Inject, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i2 from '@angular/material/legacy-button';
|
|
6
|
+
import { MatLegacyButtonModule } from '@angular/material/legacy-button';
|
|
7
|
+
import * as i3 from '@angular/material/icon';
|
|
8
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
9
|
+
import * as i4 from '@angular/material/legacy-card';
|
|
10
|
+
import { MatLegacyCardModule } from '@angular/material/legacy-card';
|
|
11
|
+
import * as i1$1 from '@angular/platform-browser';
|
|
12
|
+
import * as i2$1 from '@sunbird-cb/utils';
|
|
13
|
+
import { ConfigurationsService } from '@sunbird-cb/utils';
|
|
14
|
+
|
|
15
|
+
const WIDGET_RESOLVER_GLOBAL_CONFIG = new InjectionToken('Global Registration Configuration for Widget Resolvers');
|
|
16
|
+
const WIDGET_RESOLVER_SCOPED_CONFIG = new InjectionToken('Scoped Registration Configuration for Widget Resolvers');
|
|
17
|
+
|
|
18
|
+
function isStringArray(strArr) {
|
|
19
|
+
return Array.isArray(strArr) && strArr.every(u => typeof u === 'string');
|
|
20
|
+
}
|
|
21
|
+
function isCheckRequired(requiredPermission) {
|
|
22
|
+
if (requiredPermission === undefined ||
|
|
23
|
+
requiredPermission === null ||
|
|
24
|
+
requiredPermission === '' ||
|
|
25
|
+
(Array.isArray(requiredPermission) && requiredPermission.length === 0)) {
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
function flipBoolean(value, flip = false) {
|
|
31
|
+
return flip ? !value : value;
|
|
32
|
+
}
|
|
33
|
+
function permissionTest(testFor, requiredPermission, matchAgainst, isRestrictive = false) {
|
|
34
|
+
if (!isCheckRequired(requiredPermission)) {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
if (typeof requiredPermission === 'string') {
|
|
38
|
+
switch (testFor) {
|
|
39
|
+
case 'all':
|
|
40
|
+
case 'some':
|
|
41
|
+
return flipBoolean(matchAgainst.has(requiredPermission), isRestrictive);
|
|
42
|
+
case 'none':
|
|
43
|
+
return flipBoolean(!matchAgainst.has(requiredPermission), isRestrictive);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (Array.isArray(requiredPermission)) {
|
|
47
|
+
const matcher = (u) => typeof u === 'string' && flipBoolean(matchAgainst.has(u), isRestrictive);
|
|
48
|
+
switch (testFor) {
|
|
49
|
+
case 'all':
|
|
50
|
+
return requiredPermission.every(matcher);
|
|
51
|
+
case 'some':
|
|
52
|
+
return requiredPermission.some(matcher);
|
|
53
|
+
case 'none':
|
|
54
|
+
return !requiredPermission.every(matcher);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
function hasUnitPermission(requiredPermission, matchAgainst, isRestrictive = false) {
|
|
60
|
+
if (!isCheckRequired(requiredPermission)) {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
const accessValues = matchAgainst instanceof Set
|
|
64
|
+
? matchAgainst
|
|
65
|
+
: Array.isArray(matchAgainst) && isStringArray(matchAgainst)
|
|
66
|
+
? new Set(matchAgainst)
|
|
67
|
+
: typeof matchAgainst === 'string'
|
|
68
|
+
? new Set([matchAgainst])
|
|
69
|
+
: new Set();
|
|
70
|
+
if (typeof requiredPermission === 'object' && requiredPermission !== null) {
|
|
71
|
+
if (Array.isArray(requiredPermission)) {
|
|
72
|
+
return permissionTest('all', requiredPermission, accessValues, isRestrictive);
|
|
73
|
+
}
|
|
74
|
+
return (permissionTest('all', 'all' in requiredPermission ? requiredPermission.all : null, accessValues, isRestrictive) &&
|
|
75
|
+
permissionTest('some', 'some' in requiredPermission ? requiredPermission.some : null, accessValues, isRestrictive) &&
|
|
76
|
+
permissionTest('none', 'none' in requiredPermission ? requiredPermission.none : null, accessValues, isRestrictive));
|
|
77
|
+
}
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
function hasPermissions(requiredPermission, availableRoles, availableGroups, restrictedFeatures) {
|
|
81
|
+
if (!requiredPermission) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
if (!requiredPermission.available || !requiredPermission.enabled) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
return (hasUnitPermission(requiredPermission.groups, availableGroups) &&
|
|
88
|
+
hasUnitPermission(requiredPermission.roles, availableRoles) &&
|
|
89
|
+
hasUnitPermission(requiredPermission.features, restrictedFeatures, true));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
class WidgetBaseComponent {
|
|
93
|
+
constructor() {
|
|
94
|
+
this.widgetType = '';
|
|
95
|
+
this.widgetSubType = '';
|
|
96
|
+
}
|
|
97
|
+
updateBaseComponent(widgetType, widgetSubType, widgetInstanceId, widgetHostClass, widgetSafeStyle) {
|
|
98
|
+
this.widgetType = widgetType;
|
|
99
|
+
this.widgetSubType = widgetSubType;
|
|
100
|
+
this.widgetInstanceId = widgetInstanceId;
|
|
101
|
+
this.widgetHostClass = widgetHostClass;
|
|
102
|
+
this.widgetSafeStyle = widgetSafeStyle;
|
|
103
|
+
if (this.widgetHostClass) {
|
|
104
|
+
this.className = `${this.className} ${this.widgetHostClass}`;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
ngAfterViewInit() {
|
|
108
|
+
const hash = window.location.hash ? window.location.hash.split('#')[1] : '';
|
|
109
|
+
if (hash && !isNaN(hash) && hash === this.widgetInstanceId) {
|
|
110
|
+
setTimeout(() => {
|
|
111
|
+
const element = document.getElementById(this.widgetInstanceId || '');
|
|
112
|
+
if (element) {
|
|
113
|
+
element.scrollIntoView();
|
|
114
|
+
}
|
|
115
|
+
}, 200);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetBaseComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
119
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: WidgetBaseComponent, selector: "ws-resolver-base", inputs: { widgetType: "widgetType", widgetSubType: "widgetSubType", widgetHostClass: "widgetHostClass", widgetInstanceId: "widgetInstanceId", widgetSafeStyle: "widgetSafeStyle", className: "className" }, host: { properties: { "id": "this.widgetInstanceId", "style": "this.widgetSafeStyle", "class": "this.className" } }, ngImport: i0, template: 'Base Component', isInline: true }); }
|
|
120
|
+
}
|
|
121
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetBaseComponent, decorators: [{
|
|
122
|
+
type: Component,
|
|
123
|
+
args: [{
|
|
124
|
+
selector: 'ws-resolver-base',
|
|
125
|
+
template: 'Base Component',
|
|
126
|
+
}]
|
|
127
|
+
}], propDecorators: { widgetType: [{
|
|
128
|
+
type: Input
|
|
129
|
+
}], widgetSubType: [{
|
|
130
|
+
type: Input
|
|
131
|
+
}], widgetHostClass: [{
|
|
132
|
+
type: Input
|
|
133
|
+
}], widgetInstanceId: [{
|
|
134
|
+
type: Input
|
|
135
|
+
}, {
|
|
136
|
+
type: HostBinding,
|
|
137
|
+
args: ['id']
|
|
138
|
+
}], widgetSafeStyle: [{
|
|
139
|
+
type: Input
|
|
140
|
+
}, {
|
|
141
|
+
type: HostBinding,
|
|
142
|
+
args: ['style']
|
|
143
|
+
}], className: [{
|
|
144
|
+
type: Input
|
|
145
|
+
}, {
|
|
146
|
+
type: HostBinding,
|
|
147
|
+
args: ['class']
|
|
148
|
+
}] } });
|
|
149
|
+
|
|
150
|
+
class RestrictedComponent extends WidgetBaseComponent {
|
|
151
|
+
constructor() {
|
|
152
|
+
super(...arguments);
|
|
153
|
+
this.showData = true;
|
|
154
|
+
}
|
|
155
|
+
ngOnInit() { }
|
|
156
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RestrictedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: RestrictedComponent, selector: "ws-resolver-restricted", inputs: { widgetData: "widgetData" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Restricted Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>", styles: [".mat-card-avatar-override{height:24px!important;width:24px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i4.MatLegacyCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatLegacyCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.MatLegacyCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { kind: "pipe", type: i1.JsonPipe, name: "json" }] }); }
|
|
158
|
+
}
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RestrictedComponent, decorators: [{
|
|
160
|
+
type: Component,
|
|
161
|
+
args: [{ selector: 'ws-resolver-restricted', template: "<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Restricted Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>", styles: [".mat-card-avatar-override{height:24px!important;width:24px!important}\n"] }]
|
|
162
|
+
}], propDecorators: { widgetData: [{
|
|
163
|
+
type: Input
|
|
164
|
+
}] } });
|
|
165
|
+
|
|
166
|
+
class InvalidRegistrationComponent extends WidgetBaseComponent {
|
|
167
|
+
constructor() {
|
|
168
|
+
super(...arguments);
|
|
169
|
+
this.showData = true;
|
|
170
|
+
}
|
|
171
|
+
ngOnInit() { }
|
|
172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InvalidRegistrationComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
173
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InvalidRegistrationComponent, selector: "ws-resolver-invalid-registration", inputs: { widgetData: "widgetData" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Invalid Registration for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>", styles: [".mat-card-avatar-override{height:24px!important;width:24px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i4.MatLegacyCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatLegacyCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.MatLegacyCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { kind: "pipe", type: i1.JsonPipe, name: "json" }] }); }
|
|
174
|
+
}
|
|
175
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InvalidRegistrationComponent, decorators: [{
|
|
176
|
+
type: Component,
|
|
177
|
+
args: [{ selector: 'ws-resolver-invalid-registration', template: "<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Invalid Registration for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>", styles: [".mat-card-avatar-override{height:24px!important;width:24px!important}\n"] }]
|
|
178
|
+
}], propDecorators: { widgetData: [{
|
|
179
|
+
type: Input
|
|
180
|
+
}] } });
|
|
181
|
+
|
|
182
|
+
class InvalidPermissionComponent extends WidgetBaseComponent {
|
|
183
|
+
constructor() {
|
|
184
|
+
super(...arguments);
|
|
185
|
+
this.showData = true;
|
|
186
|
+
}
|
|
187
|
+
ngOnInit() { }
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InvalidPermissionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
189
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InvalidPermissionComponent, selector: "ws-resolver-invalid-permission", inputs: { widgetType: "widgetType", widgetSubType: "widgetSubType", widgetInstanceId: "widgetInstanceId", widgetData: "widgetData" }, usesInheritance: true, ngImport: i0, template: "<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Invalid Permission for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>", styles: [".mat-card-avatar-override{height:24px!important;width:24px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i4.MatLegacyCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatLegacyCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.MatLegacyCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { kind: "pipe", type: i1.JsonPipe, name: "json" }] }); }
|
|
190
|
+
}
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InvalidPermissionComponent, decorators: [{
|
|
192
|
+
type: Component,
|
|
193
|
+
args: [{ selector: 'ws-resolver-invalid-permission', template: "<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Invalid Permission for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>", styles: [".mat-card-avatar-override{height:24px!important;width:24px!important}\n"] }]
|
|
194
|
+
}], propDecorators: { widgetType: [{
|
|
195
|
+
type: Input
|
|
196
|
+
}], widgetSubType: [{
|
|
197
|
+
type: Input
|
|
198
|
+
}], widgetInstanceId: [{
|
|
199
|
+
type: Input
|
|
200
|
+
}], widgetData: [{
|
|
201
|
+
type: Input
|
|
202
|
+
}] } });
|
|
203
|
+
|
|
204
|
+
class UnresolvedComponent extends WidgetBaseComponent {
|
|
205
|
+
constructor() {
|
|
206
|
+
super(...arguments);
|
|
207
|
+
this.showData = true;
|
|
208
|
+
this.previewMode = false;
|
|
209
|
+
this.searchArray = ['preview', 'channel'];
|
|
210
|
+
}
|
|
211
|
+
ngOnInit() {
|
|
212
|
+
const url = window.location.href;
|
|
213
|
+
this.previewMode = this.searchArray.some((word) => {
|
|
214
|
+
return url.indexOf(word) > -1;
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UnresolvedComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
218
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: UnresolvedComponent, selector: "ws-resolver-unresolved", inputs: { widgetData: "widgetData" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"previewMode\" [ngTemplateOutlet]=\"previewCardTemplate\"></ng-container>\r\n<ng-container *ngIf=\"!previewMode\" [ngTemplateOutlet]=\"unresolvedTemplate\"></ng-container>\r\n\r\n<ng-template #unresolvedTemplate>\r\n <mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error in Resolving Json for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s\"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n </mat-card>\r\n</ng-template>\r\n<ng-template #previewCardTemplate>\r\n <mat-card>\r\n <div class=\"w-full\">\r\n <div class=\"p-4\">\r\n <div class=\"text-3xl font-semibold text-center leading-tight\" i18n>\r\n Content not available\r\n </div>\r\n <br />\r\n <div class=\"text-base font-medium text-center leading-normal\" i18n>\r\n Please add widget or provide data to widget template\r\n </div>\r\n </div>\r\n </div>\r\n </mat-card>\r\n</ng-template>", styles: [".mat-card-avatar-override{height:24px!important;width:24px!important}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatLegacyButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatLegacyCard, selector: "mat-card", exportAs: ["matCard"] }, { kind: "component", type: i4.MatLegacyCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatLegacyCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "directive", type: i4.MatLegacyCardAvatar, selector: "[mat-card-avatar], [matCardAvatar]" }, { kind: "pipe", type: i1.JsonPipe, name: "json" }] }); }
|
|
219
|
+
}
|
|
220
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: UnresolvedComponent, decorators: [{
|
|
221
|
+
type: Component,
|
|
222
|
+
args: [{ selector: 'ws-resolver-unresolved', template: "<ng-container *ngIf=\"previewMode\" [ngTemplateOutlet]=\"previewCardTemplate\"></ng-container>\r\n<ng-container *ngIf=\"!previewMode\" [ngTemplateOutlet]=\"unresolvedTemplate\"></ng-container>\r\n\r\n<ng-template #unresolvedTemplate>\r\n <mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error in Resolving Json for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s\"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n </mat-card>\r\n</ng-template>\r\n<ng-template #previewCardTemplate>\r\n <mat-card>\r\n <div class=\"w-full\">\r\n <div class=\"p-4\">\r\n <div class=\"text-3xl font-semibold text-center leading-tight\" i18n>\r\n Content not available\r\n </div>\r\n <br />\r\n <div class=\"text-base font-medium text-center leading-normal\" i18n>\r\n Please add widget or provide data to widget template\r\n </div>\r\n </div>\r\n </div>\r\n </mat-card>\r\n</ng-template>", styles: [".mat-card-avatar-override{height:24px!important;width:24px!important}\n"] }]
|
|
223
|
+
}], propDecorators: { widgetData: [{
|
|
224
|
+
type: Input
|
|
225
|
+
}] } });
|
|
226
|
+
|
|
227
|
+
class WidgetResolverService {
|
|
228
|
+
constructor(domSanitizer, componentFactoryResolver, globalConfig, scopedConfig) {
|
|
229
|
+
this.domSanitizer = domSanitizer;
|
|
230
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
231
|
+
this.globalConfig = globalConfig;
|
|
232
|
+
this.scopedConfig = scopedConfig;
|
|
233
|
+
this.roles = null;
|
|
234
|
+
this.groups = null;
|
|
235
|
+
this.restrictedFeatures = null;
|
|
236
|
+
this.isInitialized = false;
|
|
237
|
+
this.availableRegisteredWidgets = null;
|
|
238
|
+
this.restrictedWidgetKeys = null;
|
|
239
|
+
}
|
|
240
|
+
static getWidgetKey(config) {
|
|
241
|
+
return `widget:${config.widgetType}::${config.widgetSubType}`;
|
|
242
|
+
}
|
|
243
|
+
initialize(restrictedWidgetKeys, roles, groups, restrictedFeatures) {
|
|
244
|
+
this.roles = roles;
|
|
245
|
+
this.groups = groups;
|
|
246
|
+
this.restrictedFeatures = restrictedFeatures;
|
|
247
|
+
const restrictedWidgetKeysSet = restrictedWidgetKeys
|
|
248
|
+
? restrictedWidgetKeys
|
|
249
|
+
: new Set();
|
|
250
|
+
const registrationConfig = new Map();
|
|
251
|
+
const allWidgetsConfigurations = [];
|
|
252
|
+
if (this.globalConfig && Array.isArray(this.globalConfig)) {
|
|
253
|
+
allWidgetsConfigurations.push(...this.globalConfig);
|
|
254
|
+
}
|
|
255
|
+
if (this.scopedConfig && Array.isArray(this.scopedConfig)) {
|
|
256
|
+
allWidgetsConfigurations.push(...this.scopedConfig);
|
|
257
|
+
}
|
|
258
|
+
allWidgetsConfigurations.forEach(u => {
|
|
259
|
+
const key = WidgetResolverService.getWidgetKey(u);
|
|
260
|
+
if (!restrictedWidgetKeysSet.has(key)) {
|
|
261
|
+
registrationConfig.set(key, u);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
this.restrictedWidgetKeys = restrictedWidgetKeysSet;
|
|
265
|
+
this.availableRegisteredWidgets = registrationConfig;
|
|
266
|
+
this.isInitialized = true;
|
|
267
|
+
}
|
|
268
|
+
resolveWidget(receivedConfig, containerRef) {
|
|
269
|
+
const key = WidgetResolverService.getWidgetKey(receivedConfig);
|
|
270
|
+
if (this.restrictedWidgetKeys && this.restrictedWidgetKeys.has(key)) {
|
|
271
|
+
return this.widgetResolved(containerRef, receivedConfig, RestrictedComponent);
|
|
272
|
+
}
|
|
273
|
+
if (this.availableRegisteredWidgets && this.availableRegisteredWidgets.has(key)) {
|
|
274
|
+
if (hasPermissions(receivedConfig.widgetPermission, this.roles, this.groups, this.restrictedFeatures)) {
|
|
275
|
+
const config = this.availableRegisteredWidgets.get(key);
|
|
276
|
+
if (config && config.component) {
|
|
277
|
+
return this.widgetResolved(containerRef, receivedConfig, config.component);
|
|
278
|
+
}
|
|
279
|
+
return this.widgetResolved(containerRef, receivedConfig, InvalidRegistrationComponent);
|
|
280
|
+
}
|
|
281
|
+
return this.widgetResolved(containerRef, receivedConfig, InvalidPermissionComponent);
|
|
282
|
+
}
|
|
283
|
+
return this.widgetResolved(containerRef, receivedConfig, UnresolvedComponent);
|
|
284
|
+
}
|
|
285
|
+
widgetResolved(containerRef, compData, component) {
|
|
286
|
+
const factory = this.componentFactoryResolver.resolveComponentFactory(component);
|
|
287
|
+
containerRef.clear();
|
|
288
|
+
const compRef = containerRef.createComponent(factory);
|
|
289
|
+
compRef.instance.widgetData = compData.widgetData;
|
|
290
|
+
if (compRef.instance.updateBaseComponent) {
|
|
291
|
+
const widgetSafeStyle = compData.widgetHostStyle
|
|
292
|
+
? this.domSanitizer.bypassSecurityTrustStyle(Object.entries(compData.widgetHostStyle).reduce((s, [k, v]) => `${s}${k}:${v};`, ''))
|
|
293
|
+
: undefined;
|
|
294
|
+
compRef.instance.updateBaseComponent(compData.widgetType, compData.widgetSubType, compData.widgetInstanceId, compData.widgetHostClass, widgetSafeStyle);
|
|
295
|
+
}
|
|
296
|
+
return compRef;
|
|
297
|
+
}
|
|
298
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverService, deps: [{ token: i1$1.DomSanitizer }, { token: i0.ComponentFactoryResolver }, { token: WIDGET_RESOLVER_GLOBAL_CONFIG }, { token: WIDGET_RESOLVER_SCOPED_CONFIG }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
299
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverService, providedIn: 'root' }); }
|
|
300
|
+
}
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverService, decorators: [{
|
|
302
|
+
type: Injectable,
|
|
303
|
+
args: [{
|
|
304
|
+
providedIn: 'root',
|
|
305
|
+
}]
|
|
306
|
+
}], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }, { type: i0.ComponentFactoryResolver }, { type: undefined, decorators: [{
|
|
307
|
+
type: Inject,
|
|
308
|
+
args: [WIDGET_RESOLVER_GLOBAL_CONFIG]
|
|
309
|
+
}] }, { type: undefined, decorators: [{
|
|
310
|
+
type: Inject,
|
|
311
|
+
args: [WIDGET_RESOLVER_SCOPED_CONFIG]
|
|
312
|
+
}] }]; } });
|
|
313
|
+
|
|
314
|
+
class WidgetResolverDirective {
|
|
315
|
+
constructor(viewContainerRef, widgetResolverSvc, logger) {
|
|
316
|
+
this.viewContainerRef = viewContainerRef;
|
|
317
|
+
this.widgetResolverSvc = widgetResolverSvc;
|
|
318
|
+
this.logger = logger;
|
|
319
|
+
this.wsResolverWidget = null;
|
|
320
|
+
}
|
|
321
|
+
ngOnChanges() {
|
|
322
|
+
if (!this.widgetResolverSvc.isInitialized) {
|
|
323
|
+
this.logger.error('Widgets Registration Not Done. Used Before Initialization.', this.wsResolverWidget);
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
if (this.wsResolverWidget) {
|
|
327
|
+
const compRef = this.widgetResolverSvc.resolveWidget(this.wsResolverWidget, this.viewContainerRef);
|
|
328
|
+
if (compRef) {
|
|
329
|
+
compRef.changeDetectorRef.detectChanges();
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverDirective, deps: [{ token: i0.ViewContainerRef }, { token: WidgetResolverService }, { token: i2$1.LoggerService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
334
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: WidgetResolverDirective, selector: "[wsResolverWidget]", inputs: { wsResolverWidget: "wsResolverWidget" }, usesOnChanges: true, ngImport: i0 }); }
|
|
335
|
+
}
|
|
336
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverDirective, decorators: [{
|
|
337
|
+
type: Directive,
|
|
338
|
+
args: [{
|
|
339
|
+
selector: '[wsResolverWidget]',
|
|
340
|
+
}]
|
|
341
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: WidgetResolverService }, { type: i2$1.LoggerService }]; }, propDecorators: { wsResolverWidget: [{
|
|
342
|
+
type: Input
|
|
343
|
+
}] } });
|
|
344
|
+
|
|
345
|
+
class WidgetResolverModule {
|
|
346
|
+
static forRoot(config) {
|
|
347
|
+
return {
|
|
348
|
+
ngModule: WidgetResolverModule,
|
|
349
|
+
providers: [
|
|
350
|
+
WidgetResolverService,
|
|
351
|
+
{
|
|
352
|
+
provide: WIDGET_RESOLVER_GLOBAL_CONFIG,
|
|
353
|
+
useValue: config,
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
provide: WIDGET_RESOLVER_SCOPED_CONFIG,
|
|
357
|
+
useValue: [],
|
|
358
|
+
},
|
|
359
|
+
],
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
static forChild(config) {
|
|
363
|
+
return {
|
|
364
|
+
ngModule: WidgetResolverModule,
|
|
365
|
+
providers: [
|
|
366
|
+
WidgetResolverService,
|
|
367
|
+
{
|
|
368
|
+
provide: WIDGET_RESOLVER_SCOPED_CONFIG,
|
|
369
|
+
useValue: config,
|
|
370
|
+
},
|
|
371
|
+
],
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
375
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverModule, declarations: [WidgetBaseComponent,
|
|
376
|
+
WidgetResolverDirective,
|
|
377
|
+
RestrictedComponent,
|
|
378
|
+
InvalidRegistrationComponent,
|
|
379
|
+
InvalidPermissionComponent,
|
|
380
|
+
UnresolvedComponent], imports: [CommonModule, MatLegacyButtonModule, MatIconModule, MatLegacyCardModule], exports: [WidgetResolverDirective, WidgetBaseComponent] }); }
|
|
381
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverModule, providers: [ConfigurationsService], imports: [CommonModule, MatLegacyButtonModule, MatIconModule, MatLegacyCardModule] }); }
|
|
382
|
+
}
|
|
383
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: WidgetResolverModule, decorators: [{
|
|
384
|
+
type: NgModule,
|
|
385
|
+
args: [{
|
|
386
|
+
declarations: [
|
|
387
|
+
WidgetBaseComponent,
|
|
388
|
+
WidgetResolverDirective,
|
|
389
|
+
RestrictedComponent,
|
|
390
|
+
InvalidRegistrationComponent,
|
|
391
|
+
InvalidPermissionComponent,
|
|
392
|
+
UnresolvedComponent,
|
|
393
|
+
],
|
|
394
|
+
imports: [CommonModule, MatLegacyButtonModule, MatIconModule, MatLegacyCardModule],
|
|
395
|
+
exports: [WidgetResolverDirective, WidgetBaseComponent],
|
|
396
|
+
providers: [ConfigurationsService]
|
|
397
|
+
}]
|
|
398
|
+
}] });
|
|
399
|
+
|
|
400
|
+
export { WidgetBaseComponent, WidgetResolverDirective, WidgetResolverModule, WidgetResolverService, hasPermissions, hasUnitPermission };
|
|
401
|
+
//# sourceMappingURL=sunbird-cb-resolver.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sunbird-cb-resolver.mjs","sources":["../../../../library/sunbird-cb/resolver/src/lib/widget-resolver.constant.ts","../../../../library/sunbird-cb/resolver/src/lib/widget-resolver.permissions.ts","../../../../library/sunbird-cb/resolver/src/lib/widget-base.component.ts","../../../../library/sunbird-cb/resolver/src/lib/restricted/restricted.component.ts","../../../../library/sunbird-cb/resolver/src/lib/restricted/restricted.component.html","../../../../library/sunbird-cb/resolver/src/lib/invalid-registration/invalid-registration.component.ts","../../../../library/sunbird-cb/resolver/src/lib/invalid-registration/invalid-registration.component.html","../../../../library/sunbird-cb/resolver/src/lib/invalid-permission/invalid-permission.component.ts","../../../../library/sunbird-cb/resolver/src/lib/invalid-permission/invalid-permission.component.html","../../../../library/sunbird-cb/resolver/src/lib/unresolved/unresolved.component.ts","../../../../library/sunbird-cb/resolver/src/lib/unresolved/unresolved.component.html","../../../../library/sunbird-cb/resolver/src/lib/widget-resolver.service.ts","../../../../library/sunbird-cb/resolver/src/lib/widget-resolver.directive.ts","../../../../library/sunbird-cb/resolver/src/lib/widget-resolver.module.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core'\r\nimport { NsWidgetResolver as resolver } from './widget-resolver.model'\r\n\r\nexport const WIDGET_RESOLVER_GLOBAL_CONFIG = new InjectionToken<resolver.IRegistrationConfig[]>(\r\n 'Global Registration Configuration for Widget Resolvers',\r\n)\r\n\r\nexport const WIDGET_RESOLVER_SCOPED_CONFIG = new InjectionToken<resolver.IRegistrationConfig[]>(\r\n 'Scoped Registration Configuration for Widget Resolvers',\r\n)\r\n","import { NsWidgetResolver } from './widget-resolver.model'\r\n\r\nfunction isStringArray(strArr: string[] | any): boolean {\r\n return Array.isArray(strArr) && strArr.every(u => typeof u === 'string')\r\n}\r\n\r\nfunction isCheckRequired(requiredPermission: NsWidgetResolver.UnitPermission): boolean {\r\n if (\r\n requiredPermission === undefined ||\r\n requiredPermission === null ||\r\n requiredPermission === '' ||\r\n (Array.isArray(requiredPermission) && requiredPermission.length === 0)\r\n ) {\r\n return false\r\n }\r\n return true\r\n}\r\n\r\nfunction flipBoolean(value: boolean, flip = false) {\r\n return flip ? !value : value\r\n}\r\n\r\nfunction permissionTest(\r\n testFor: 'all' | 'some' | 'none',\r\n requiredPermission: NsWidgetResolver.UnitPermissionPrimitive | string[],\r\n matchAgainst: Set<string>,\r\n isRestrictive = false,\r\n) {\r\n if (!isCheckRequired(requiredPermission)) {\r\n return true\r\n }\r\n if (typeof requiredPermission === 'string') {\r\n switch (testFor) {\r\n case 'all':\r\n case 'some':\r\n return flipBoolean(matchAgainst.has(requiredPermission), isRestrictive)\r\n case 'none':\r\n return flipBoolean(!matchAgainst.has(requiredPermission), isRestrictive)\r\n }\r\n }\r\n if (Array.isArray(requiredPermission)) {\r\n const matcher = (u: string) =>\r\n typeof u === 'string' && flipBoolean(matchAgainst.has(u), isRestrictive)\r\n switch (testFor) {\r\n case 'all':\r\n return requiredPermission.every(matcher)\r\n case 'some':\r\n return requiredPermission.some(matcher)\r\n case 'none':\r\n return !requiredPermission.every(matcher)\r\n }\r\n }\r\n return false\r\n}\r\n\r\nexport function hasUnitPermission(\r\n requiredPermission: NsWidgetResolver.UnitPermission,\r\n matchAgainst?: Set<string> | string[] | string | null | undefined,\r\n isRestrictive = false,\r\n): boolean {\r\n if (!isCheckRequired(requiredPermission)) {\r\n return true\r\n }\r\n const accessValues: Set<string> =\r\n matchAgainst instanceof Set\r\n ? matchAgainst\r\n : Array.isArray(matchAgainst) && isStringArray(matchAgainst)\r\n ? new Set(matchAgainst)\r\n : typeof matchAgainst === 'string'\r\n ? new Set([matchAgainst])\r\n : new Set()\r\n\r\n if (typeof requiredPermission === 'object' && requiredPermission !== null) {\r\n if (Array.isArray(requiredPermission)) {\r\n return permissionTest('all', requiredPermission, accessValues, isRestrictive)\r\n }\r\n return (\r\n permissionTest(\r\n 'all',\r\n 'all' in requiredPermission ? requiredPermission.all : null,\r\n accessValues,\r\n isRestrictive,\r\n ) &&\r\n permissionTest(\r\n 'some',\r\n 'some' in requiredPermission ? requiredPermission.some : null,\r\n accessValues,\r\n isRestrictive,\r\n ) &&\r\n permissionTest(\r\n 'none',\r\n 'none' in requiredPermission ? requiredPermission.none : null,\r\n accessValues,\r\n isRestrictive,\r\n )\r\n )\r\n }\r\n return false\r\n}\r\n\r\nexport function hasPermissions(\r\n requiredPermission?: NsWidgetResolver.IPermissions,\r\n availableRoles?: Set<string> | string | string[] | null | undefined,\r\n availableGroups?: Set<string> | string | string[] | null | undefined,\r\n restrictedFeatures?: Set<string> | string | string[] | null | undefined,\r\n): boolean {\r\n if (!requiredPermission) {\r\n return true\r\n }\r\n if (!requiredPermission.available || !requiredPermission.enabled) {\r\n return false\r\n }\r\n return (\r\n hasUnitPermission(requiredPermission.groups, availableGroups) &&\r\n hasUnitPermission(requiredPermission.roles, availableRoles) &&\r\n hasUnitPermission(requiredPermission.features, restrictedFeatures, true)\r\n )\r\n}\r\n","import { AfterViewInit, Component, HostBinding, Input } from '@angular/core'\r\nimport { SafeStyle } from '@angular/platform-browser'\r\nimport { NsWidgetResolver } from './widget-resolver.model'\r\ntype TWidgetBase = Omit<NsWidgetResolver.IWidgetData<any>, 'widgetData'>\r\n\r\n@Component({\r\n selector: 'ws-resolver-base',\r\n template: 'Base Component',\r\n})\r\nexport class WidgetBaseComponent implements TWidgetBase, AfterViewInit {\r\n @Input() widgetType = ''\r\n @Input() widgetSubType = ''\r\n @Input() widgetHostClass?: string\r\n\r\n @Input()\r\n @HostBinding('id')\r\n public widgetInstanceId?: string\r\n\r\n @Input()\r\n @HostBinding('style')\r\n public widgetSafeStyle?: SafeStyle\r\n\r\n @Input()\r\n @HostBinding('class') className?: string\r\n\r\n updateBaseComponent(\r\n widgetType: string,\r\n widgetSubType: string,\r\n widgetInstanceId?: string,\r\n widgetHostClass?: string,\r\n widgetSafeStyle?: SafeStyle,\r\n ) {\r\n this.widgetType = widgetType\r\n this.widgetSubType = widgetSubType\r\n this.widgetInstanceId = widgetInstanceId\r\n this.widgetHostClass = widgetHostClass\r\n this.widgetSafeStyle = widgetSafeStyle\r\n if (this.widgetHostClass) {\r\n this.className = `${this.className} ${this.widgetHostClass}`\r\n }\r\n }\r\n\r\n ngAfterViewInit() {\r\n const hash: any = window.location.hash ? window.location.hash.split('#')[1] : ''\r\n if (hash && !isNaN(hash) && hash === this.widgetInstanceId) {\r\n setTimeout(\r\n () => {\r\n const element = document.getElementById(this.widgetInstanceId || '')\r\n if (element) {\r\n element.scrollIntoView()\r\n }\r\n },\r\n 200,\r\n )\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core'\r\nimport { NsWidgetResolver } from '../widget-resolver.model'\r\nimport { WidgetBaseComponent } from '../widget-base.component'\r\n@Component({\r\n selector: 'ws-resolver-restricted',\r\n templateUrl: './restricted.component.html',\r\n styleUrls: ['./restricted.component.scss'],\r\n})\r\nexport class RestrictedComponent extends WidgetBaseComponent\r\n implements OnInit, NsWidgetResolver.IWidgetData<any> {\r\n @Input() widgetData!: any\r\n showData = true\r\n\r\n ngOnInit() { }\r\n}\r\n","<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Restricted Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>","import { Component, OnInit, Input } from '@angular/core'\r\nimport { NsWidgetResolver } from '../widget-resolver.model'\r\nimport { WidgetBaseComponent } from '../widget-base.component'\r\n@Component({\r\n selector: 'ws-resolver-invalid-registration',\r\n templateUrl: './invalid-registration.component.html',\r\n styleUrls: ['./invalid-registration.component.scss'],\r\n})\r\nexport class InvalidRegistrationComponent extends WidgetBaseComponent\r\n implements OnInit, NsWidgetResolver.IWidgetData<any> {\r\n @Input() widgetData!: any\r\n showData = true\r\n ngOnInit() { }\r\n}\r\n","<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Invalid Registration for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>","import { Component, OnInit, Input } from '@angular/core'\r\nimport { WidgetBaseComponent } from '../widget-base.component'\r\nimport { NsWidgetResolver } from '../widget-resolver.model'\r\n\r\n@Component({\r\n selector: 'ws-resolver-invalid-permission',\r\n templateUrl: './invalid-permission.component.html',\r\n styleUrls: ['./invalid-permission.component.scss'],\r\n})\r\nexport class InvalidPermissionComponent extends WidgetBaseComponent\r\n implements OnInit, NsWidgetResolver.IWidgetData<any> {\r\n @Input() widgetType!: string\r\n @Input() widgetSubType!: string\r\n @Input() widgetInstanceId?: string\r\n @Input() widgetData!: any\r\n showData = true\r\n\r\n ngOnInit() { }\r\n}\r\n","<mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error as Invalid Permission for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s \"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n</mat-card>","import { Component, OnInit, Input } from '@angular/core'\r\nimport { NsWidgetResolver } from '../widget-resolver.model'\r\nimport { WidgetBaseComponent } from '../widget-base.component'\r\n@Component({\r\n selector: 'ws-resolver-unresolved',\r\n templateUrl: './unresolved.component.html',\r\n styleUrls: ['./unresolved.component.scss'],\r\n})\r\nexport class UnresolvedComponent extends WidgetBaseComponent\r\n implements OnInit, NsWidgetResolver.IWidgetData<any> {\r\n @Input() widgetData!: any\r\n showData = true\r\n previewMode = false\r\n searchArray = ['preview', 'channel']\r\n\r\n ngOnInit() {\r\n const url = window.location.href\r\n this.previewMode = this.searchArray.some((word: string) => {\r\n return url.indexOf(word) > -1\r\n })\r\n }\r\n}\r\n","<ng-container *ngIf=\"previewMode\" [ngTemplateOutlet]=\"previewCardTemplate\"></ng-container>\r\n<ng-container *ngIf=\"!previewMode\" [ngTemplateOutlet]=\"unresolvedTemplate\"></ng-container>\r\n\r\n<ng-template #unresolvedTemplate>\r\n <mat-card class=\"margin-m\">\r\n <mat-card-header>\r\n <div mat-card-avatar class=\"mat-card-avatar-override\">\r\n <mat-icon color=\"warn\">report_problem</mat-icon>\r\n </div>\r\n <mat-card-title>\r\n <ng-container i18n>\r\n Error in Resolving Json for Widget\r\n </ng-container>\r\n </mat-card-title>\r\n </mat-card-header>\r\n <div class=\"flex flex-wrap flex-between\">\r\n <div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Type :\r\n </span>\r\n {{ widgetType }}\r\n </div>\r\n <div class=\"margin-top-s\">\r\n <span class=\"mat-body-2 font-bold\" i18n>\r\n Widget Sub Type :\r\n </span>\r\n {{ widgetSubType }}\r\n </div>\r\n </div>\r\n <div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"!showData\" (click)=\"showData = true\">\r\n <ng-container i18n>See Details</ng-container>\r\n <mat-icon>arrow_drop_down</mat-icon>\r\n </button>\r\n <button mat-raised-button class=\"margin-top-m\" color=\"primary\" *ngIf=\"showData\" (click)=\"showData = false\">\r\n <ng-container i18n>Hide Details</ng-container>\r\n <mat-icon>arrow_drop_up</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <ng-container *ngIf=\"widgetData\">\r\n <pre *ngIf=\"showData\" class=\"margin-top-s\"><span i18n class=\"mat-body-2 font-bold\">Widget Data :</span>\r\n{{ widgetData | json }}\r\n </pre>\r\n </ng-container>\r\n </mat-card>\r\n</ng-template>\r\n<ng-template #previewCardTemplate>\r\n <mat-card>\r\n <div class=\"w-full\">\r\n <div class=\"p-4\">\r\n <div class=\"text-3xl font-semibold text-center leading-tight\" i18n>\r\n Content not available\r\n </div>\r\n <br />\r\n <div class=\"text-base font-medium text-center leading-normal\" i18n>\r\n Please add widget or provide data to widget template\r\n </div>\r\n </div>\r\n </div>\r\n </mat-card>\r\n</ng-template>","import {\r\n Injectable,\r\n Inject,\r\n ComponentFactoryResolver,\r\n ViewContainerRef,\r\n ComponentRef,\r\n Type,\r\n} from '@angular/core'\r\nimport {\r\n WIDGET_RESOLVER_GLOBAL_CONFIG,\r\n WIDGET_RESOLVER_SCOPED_CONFIG,\r\n} from './widget-resolver.constant'\r\n// import { LoggerService } from '@sunbird-cb/utils'\r\nimport { NsWidgetResolver } from './widget-resolver.model'\r\nimport { hasPermissions } from './widget-resolver.permissions'\r\nimport { RestrictedComponent } from './restricted/restricted.component'\r\nimport { InvalidRegistrationComponent } from './invalid-registration/invalid-registration.component'\r\nimport { InvalidPermissionComponent } from './invalid-permission/invalid-permission.component'\r\nimport { UnresolvedComponent } from './unresolved/unresolved.component'\r\nimport { DomSanitizer } from '@angular/platform-browser'\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class WidgetResolverService {\r\n private roles: Set<string> | null = null\r\n private groups: Set<string> | null = null\r\n private restrictedFeatures: Set<string> | null = null\r\n isInitialized = false\r\n constructor(\r\n private domSanitizer: DomSanitizer,\r\n private componentFactoryResolver: ComponentFactoryResolver,\r\n // private loggerSvc: LoggerService,\r\n @Inject(WIDGET_RESOLVER_GLOBAL_CONFIG)\r\n private globalConfig: null | NsWidgetResolver.IRegistrationConfig[],\r\n @Inject(WIDGET_RESOLVER_SCOPED_CONFIG)\r\n private scopedConfig: null | NsWidgetResolver.IRegistrationConfig[],\r\n ) { }\r\n private availableRegisteredWidgets: Map<\r\n string,\r\n NsWidgetResolver.IRegistrationConfig\r\n > | null = null\r\n private restrictedWidgetKeys: Set<string> | null = null\r\n static getWidgetKey(config: NsWidgetResolver.IBaseConfig) {\r\n return `widget:${config.widgetType}::${config.widgetSubType}`\r\n }\r\n\r\n initialize(\r\n restrictedWidgetKeys: Set<string> | null,\r\n roles: Set<string> | null,\r\n groups: Set<string> | null,\r\n restrictedFeatures: Set<string> | null,\r\n ) {\r\n this.roles = roles\r\n\r\n this.groups = groups\r\n this.restrictedFeatures = restrictedFeatures\r\n const restrictedWidgetKeysSet: Set<string> = restrictedWidgetKeys\r\n ? restrictedWidgetKeys\r\n : new Set<string>()\r\n const registrationConfig: Map<string, NsWidgetResolver.IRegistrationConfig> = new Map()\r\n const allWidgetsConfigurations: NsWidgetResolver.IRegistrationConfig[] = []\r\n if (this.globalConfig && Array.isArray(this.globalConfig)) {\r\n allWidgetsConfigurations.push(...this.globalConfig)\r\n }\r\n if (this.scopedConfig && Array.isArray(this.scopedConfig)) {\r\n allWidgetsConfigurations.push(...this.scopedConfig)\r\n }\r\n allWidgetsConfigurations.forEach(u => {\r\n const key = WidgetResolverService.getWidgetKey(u)\r\n if (!restrictedWidgetKeysSet.has(key)) {\r\n registrationConfig.set(key, u)\r\n }\r\n })\r\n this.restrictedWidgetKeys = restrictedWidgetKeysSet\r\n this.availableRegisteredWidgets = registrationConfig\r\n this.isInitialized = true\r\n // this.loggerSvc.log(\r\n // `Widget Configurations`,\r\n // this.globalConfig,\r\n // this.scopedConfig,\r\n // this.availableRegisteredWidgets,\r\n // )\r\n }\r\n\r\n resolveWidget(\r\n receivedConfig: NsWidgetResolver.IRenderConfigWithAnyData,\r\n containerRef: ViewContainerRef,\r\n ): ComponentRef<any> | null {\r\n const key = WidgetResolverService.getWidgetKey(receivedConfig)\r\n if (this.restrictedWidgetKeys && this.restrictedWidgetKeys.has(key)) {\r\n // Restricted\r\n return this.widgetResolved(containerRef, receivedConfig, RestrictedComponent)\r\n }\r\n if (this.availableRegisteredWidgets && this.availableRegisteredWidgets.has(key)) {\r\n if (\r\n hasPermissions(\r\n receivedConfig.widgetPermission,\r\n this.roles,\r\n this.groups,\r\n this.restrictedFeatures,\r\n )\r\n ) {\r\n const config = this.availableRegisteredWidgets.get(key)\r\n if (config && config.component) {\r\n return this.widgetResolved(containerRef, receivedConfig, config.component)\r\n }\r\n // Not properly registered\r\n return this.widgetResolved(containerRef, receivedConfig, InvalidRegistrationComponent)\r\n }\r\n // No Permission\r\n return this.widgetResolved(containerRef, receivedConfig, InvalidPermissionComponent)\r\n }\r\n // Not Resolved\r\n return this.widgetResolved(containerRef, receivedConfig, UnresolvedComponent)\r\n }\r\n\r\n private widgetResolved(\r\n containerRef: ViewContainerRef,\r\n compData: NsWidgetResolver.IRenderConfigWithAnyData,\r\n component: Type<NsWidgetResolver.IWidgetData<any>>,\r\n ): ComponentRef<NsWidgetResolver.IWidgetData<any>> {\r\n const factory = this.componentFactoryResolver.resolveComponentFactory(component)\r\n containerRef.clear()\r\n const compRef: ComponentRef<NsWidgetResolver.IWidgetData<any>> = containerRef.createComponent(\r\n factory,\r\n )\r\n compRef.instance.widgetData = compData.widgetData\r\n if (compRef.instance.updateBaseComponent) {\r\n const widgetSafeStyle = compData.widgetHostStyle\r\n ? this.domSanitizer.bypassSecurityTrustStyle(\r\n Object.entries(compData.widgetHostStyle).reduce((s, [k, v]) => `${s}${k}:${v};`, ''),\r\n )\r\n : undefined\r\n compRef.instance.updateBaseComponent(\r\n compData.widgetType,\r\n compData.widgetSubType,\r\n compData.widgetInstanceId,\r\n compData.widgetHostClass,\r\n widgetSafeStyle,\r\n )\r\n }\r\n return compRef\r\n }\r\n}\r\n","import { Directive, Input, ViewContainerRef, OnChanges } from '@angular/core'\r\nimport { LoggerService } from '@sunbird-cb/utils'\r\nimport { NsWidgetResolver } from './widget-resolver.model'\r\nimport { WidgetResolverService } from './widget-resolver.service'\r\n\r\n@Directive({\r\n selector: '[wsResolverWidget]',\r\n})\r\nexport class WidgetResolverDirective implements OnChanges {\r\n @Input() wsResolverWidget: NsWidgetResolver.IRenderConfigWithAnyData | null = null\r\n constructor(\r\n private viewContainerRef: ViewContainerRef,\r\n private widgetResolverSvc: WidgetResolverService,\r\n private logger: LoggerService,\r\n ) { }\r\n\r\n ngOnChanges() {\r\n if (!this.widgetResolverSvc.isInitialized) {\r\n this.logger.error(\r\n 'Widgets Registration Not Done. Used Before Initialization.',\r\n this.wsResolverWidget,\r\n )\r\n return\r\n }\r\n if (this.wsResolverWidget) {\r\n const compRef = this.widgetResolverSvc.resolveWidget(\r\n this.wsResolverWidget,\r\n this.viewContainerRef,\r\n )\r\n if (compRef) {\r\n compRef.changeDetectorRef.detectChanges()\r\n }\r\n }\r\n }\r\n}\r\n","import { NgModule, ModuleWithProviders } from '@angular/core'\r\nimport { CommonModule } from '@angular/common'\r\nimport { WidgetResolverDirective } from './widget-resolver.directive'\r\nimport { RestrictedComponent } from './restricted/restricted.component'\r\nimport { InvalidRegistrationComponent } from './invalid-registration/invalid-registration.component'\r\nimport { InvalidPermissionComponent } from './invalid-permission/invalid-permission.component'\r\nimport { UnresolvedComponent } from './unresolved/unresolved.component'\r\nimport { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button'\nimport { MatLegacyCardModule as MatCardModule } from '@angular/material/legacy-card'\nimport { MatIconModule } from '@angular/material/icon'\r\nimport { NsWidgetResolver } from './widget-resolver.model'\r\nimport { WidgetResolverService } from './widget-resolver.service'\r\nimport { ConfigurationsService } from '@sunbird-cb/utils'\r\nimport {\r\n WIDGET_RESOLVER_GLOBAL_CONFIG,\r\n WIDGET_RESOLVER_SCOPED_CONFIG,\r\n} from './widget-resolver.constant'\r\nimport { WidgetBaseComponent } from './widget-base.component'\r\n@NgModule({\n declarations: [\n WidgetBaseComponent,\n WidgetResolverDirective,\n RestrictedComponent,\n InvalidRegistrationComponent,\n InvalidPermissionComponent,\n UnresolvedComponent,\n ],\n imports: [CommonModule, MatButtonModule, MatIconModule, MatCardModule],\n exports: [WidgetResolverDirective, WidgetBaseComponent],\n providers: [ConfigurationsService]\n})\r\nexport class WidgetResolverModule {\r\n static forRoot(config: NsWidgetResolver.IRegistrationConfig[]): ModuleWithProviders<WidgetResolverModule> {\r\n return {\r\n ngModule: WidgetResolverModule,\r\n providers: [\r\n WidgetResolverService,\r\n {\r\n provide: WIDGET_RESOLVER_GLOBAL_CONFIG,\r\n useValue: config,\r\n },\r\n {\r\n provide: WIDGET_RESOLVER_SCOPED_CONFIG,\r\n useValue: [],\r\n },\r\n ],\r\n }\r\n }\r\n static forChild(config: NsWidgetResolver.IRegistrationConfig[]): ModuleWithProviders<WidgetResolverModule> {\r\n return {\r\n ngModule: WidgetResolverModule,\r\n providers: [\r\n WidgetResolverService,\r\n {\r\n provide: WIDGET_RESOLVER_SCOPED_CONFIG,\r\n useValue: config,\r\n },\r\n ],\r\n }\r\n }\r\n}\r\n"],"names":["i1","i1.WidgetResolverService","i2","MatButtonModule","MatCardModule"],"mappings":";;;;;;;;;;;;;;AAGO,MAAM,6BAA6B,GAAG,IAAI,cAAc,CAC7D,wDAAwD,CACzD,CAAA;AAEM,MAAM,6BAA6B,GAAG,IAAI,cAAc,CAC7D,wDAAwD,CACzD;;ACPD,SAAS,aAAa,CAAC,MAAsB,EAAA;IAC3C,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAA;AAC1E,CAAC;AAED,SAAS,eAAe,CAAC,kBAAmD,EAAA;IAC1E,IACE,kBAAkB,KAAK,SAAS;AAChC,QAAA,kBAAkB,KAAK,IAAI;AAC3B,QAAA,kBAAkB,KAAK,EAAE;AACzB,SAAC,KAAK,CAAC,OAAO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AA4B;YAC5B,0BAA0B;YAC1B,mBAAmB,CAAA,EAAA,OAAA,EAAA,CAEb,YAAY,EAAEC,qBAAe,EAAE,aAAa,EAAEC,mBAAa,CAAA,EAAA,OAAA,EAAA,CAC3D,uBAAuB,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAG7C,oBAAoB,EAAA,SAAA,EAFlB,CAAC,qBAAqB,CAAC,EAAA,OAAA,EAAA,CAFxB,YAAY,EAAED,qBAAe,EAAE,aAAa,EAAEC,mBAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAI5D,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,mBAAmB;wBACnB,uBAAuB;wBACvB,mBAAmB;wBACnB,4BAA4B;wBAC5B,0BAA0B;wBAC1B,mBAAmB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,EAAED,qBAAe,EAAE,aAAa,EAAEC,mBAAa,CAAC;AACtE,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,CAAC;oBACvD,SAAS,EAAE,CAAC,qBAAqB,CAAC;AACrC,iBAAA,CAAA;;;;;"}
|
|
@@ -10,5 +10,6 @@ export declare class InvalidPermissionComponent extends WidgetBaseComponent impl
|
|
|
10
10
|
showData: boolean;
|
|
11
11
|
ngOnInit(): void;
|
|
12
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<InvalidPermissionComponent, never>;
|
|
13
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InvalidPermissionComponent, "ws-resolver-invalid-permission", never, { "widgetType": "widgetType"; "widgetSubType": "widgetSubType"; "widgetInstanceId": "widgetInstanceId"; "widgetData": "widgetData"; }, {}, never, never>;
|
|
13
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InvalidPermissionComponent, "ws-resolver-invalid-permission", never, { "widgetType": { "alias": "widgetType"; "required": false; }; "widgetSubType": { "alias": "widgetSubType"; "required": false; }; "widgetInstanceId": { "alias": "widgetInstanceId"; "required": false; }; "widgetData": { "alias": "widgetData"; "required": false; }; }, {}, never, never, false, never>;
|
|
14
14
|
}
|
|
15
|
+
//# sourceMappingURL=invalid-permission.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invalid-permission.component.d.ts","sourceRoot":"","sources":["../../../../../library/sunbird-cb/resolver/src/lib/invalid-permission/invalid-permission.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAS,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;;AAE3D,qBAKa,0BAA2B,SAAQ,mBAC9C,YAAW,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,CAAC;IAC3C,UAAU,EAAG,MAAM,CAAA;IACnB,aAAa,EAAG,MAAM,CAAA;IACtB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,UAAU,EAAG,GAAG,CAAA;IACzB,QAAQ,UAAO;IAEf,QAAQ;yCARG,0BAA0B;2CAA1B,0BAA0B;CAStC"}
|
|
@@ -7,5 +7,6 @@ export declare class InvalidRegistrationComponent extends WidgetBaseComponent im
|
|
|
7
7
|
showData: boolean;
|
|
8
8
|
ngOnInit(): void;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<InvalidRegistrationComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<InvalidRegistrationComponent, "ws-resolver-invalid-registration", never, { "widgetData": "widgetData"; }, {}, never, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InvalidRegistrationComponent, "ws-resolver-invalid-registration", never, { "widgetData": { "alias": "widgetData"; "required": false; }; }, {}, never, never, false, never>;
|
|
11
11
|
}
|
|
12
|
+
//# sourceMappingURL=invalid-registration.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"invalid-registration.component.d.ts","sourceRoot":"","sources":["../../../../../library/sunbird-cb/resolver/src/lib/invalid-registration/invalid-registration.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAS,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;;AAC9D,qBAKa,4BAA6B,SAAQ,mBAChD,YAAW,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,CAAC;IAC3C,UAAU,EAAG,GAAG,CAAA;IACzB,QAAQ,UAAO;IACf,QAAQ;yCAJG,4BAA4B;2CAA5B,4BAA4B;CAKxC"}
|
|
@@ -7,5 +7,6 @@ export declare class RestrictedComponent extends WidgetBaseComponent implements
|
|
|
7
7
|
showData: boolean;
|
|
8
8
|
ngOnInit(): void;
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<RestrictedComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RestrictedComponent, "ws-resolver-restricted", never, { "widgetData": "widgetData"; }, {}, never, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RestrictedComponent, "ws-resolver-restricted", never, { "widgetData": { "alias": "widgetData"; "required": false; }; }, {}, never, never, false, never>;
|
|
11
11
|
}
|
|
12
|
+
//# sourceMappingURL=restricted.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restricted.component.d.ts","sourceRoot":"","sources":["../../../../../library/sunbird-cb/resolver/src/lib/restricted/restricted.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAS,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;;AAC9D,qBAKa,mBAAoB,SAAQ,mBACvC,YAAW,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,CAAC;IAC3C,UAAU,EAAG,GAAG,CAAA;IACzB,QAAQ,UAAO;IAEf,QAAQ;yCALG,mBAAmB;2CAAnB,mBAAmB;CAM/B"}
|
|
@@ -9,5 +9,6 @@ export declare class UnresolvedComponent extends WidgetBaseComponent implements
|
|
|
9
9
|
searchArray: string[];
|
|
10
10
|
ngOnInit(): void;
|
|
11
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<UnresolvedComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<UnresolvedComponent, "ws-resolver-unresolved", never, { "widgetData": "widgetData"; }, {}, never, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<UnresolvedComponent, "ws-resolver-unresolved", never, { "widgetData": { "alias": "widgetData"; "required": false; }; }, {}, never, never, false, never>;
|
|
13
13
|
}
|
|
14
|
+
//# sourceMappingURL=unresolved.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unresolved.component.d.ts","sourceRoot":"","sources":["../../../../../library/sunbird-cb/resolver/src/lib/unresolved/unresolved.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,MAAM,EAAS,MAAM,eAAe,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;;AAC9D,qBAKa,mBAAoB,SAAQ,mBACvC,YAAW,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,CAAC;IAC3C,UAAU,EAAG,GAAG,CAAA;IACzB,QAAQ,UAAO;IACf,WAAW,UAAQ;IACnB,WAAW,WAAyB;IAEpC,QAAQ;yCAPG,mBAAmB;2CAAnB,mBAAmB;CAa/B"}
|