@genesislcap/pbc-notify-ui 1.0.45 → 1.0.46
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/dts/components/foundation-notification-dashboard/notification-dashboard.d.ts +1 -0
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.styles.d.ts.map +1 -1
- package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.template.d.ts.map +1 -1
- package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.js +6 -0
- package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.styles.js +9 -0
- package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.template.js +24 -17
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ import { GenesisElement } from '@genesislcap/web-core';
|
|
|
6
6
|
export declare class FoundationNotificationDashboard extends GenesisElement {
|
|
7
7
|
auth: Auth;
|
|
8
8
|
ready: boolean;
|
|
9
|
+
hasPermissions: boolean;
|
|
9
10
|
connectedCallback(): Promise<void>;
|
|
10
11
|
/**
|
|
11
12
|
* Load remote components
|
package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-dashboard.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-notification-dashboard/notification-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAiB,cAAc,EAAc,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"notification-dashboard.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-notification-dashboard/notification-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAiB,cAAc,EAAc,MAAM,uBAAuB,CAAC;AAMlF;;GAEG;AACH,qBAKa,+BAAgC,SAAQ,cAAc;IAC3D,IAAI,EAAE,IAAI,CAAC;IACL,KAAK,EAAE,OAAO,CAAS;IACvB,cAAc,EAAE,OAAO,CAAQ;IAErC,iBAAiB;IAUvB;;;;OAIG;IACG,WAAW;CAIlB"}
|
package/dist/dts/components/foundation-notification-dashboard/notification-dashboard.styles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-dashboard.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-notification-dashboard/notification-dashboard.styles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,qCAAqC,
|
|
1
|
+
{"version":3,"file":"notification-dashboard.styles.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-notification-dashboard/notification-dashboard.styles.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,qCAAqC,iDAejD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-dashboard.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-notification-dashboard/notification-dashboard.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAMhF,eAAO,MAAM,uCAAuC,
|
|
1
|
+
{"version":3,"file":"notification-dashboard.template.d.ts","sourceRoot":"","sources":["../../../../src/components/foundation-notification-dashboard/notification-dashboard.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAMhF,eAAO,MAAM,uCAAuC,sFAiDnD,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { Auth } from '@genesislcap/foundation-comms';
|
|
|
3
3
|
import { customElement, GenesisElement, observable } from '@genesislcap/web-core';
|
|
4
4
|
import { loadRemotes } from '../components';
|
|
5
5
|
import { FoundationNotificationDashboardStyles as styles } from './notification-dashboard.styles';
|
|
6
|
+
import { NOTIFICATION_DASHBOARD_TABS } from './notification-dashboard.tabs';
|
|
6
7
|
import { FoundationNotificationDashboardTemplate as template } from './notification-dashboard.template';
|
|
7
8
|
/**
|
|
8
9
|
* @public
|
|
@@ -11,6 +12,7 @@ let FoundationNotificationDashboard = class FoundationNotificationDashboard exte
|
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
13
14
|
this.ready = false;
|
|
15
|
+
this.hasPermissions = true;
|
|
14
16
|
}
|
|
15
17
|
connectedCallback() {
|
|
16
18
|
const _super = Object.create(null, {
|
|
@@ -18,6 +20,7 @@ let FoundationNotificationDashboard = class FoundationNotificationDashboard exte
|
|
|
18
20
|
});
|
|
19
21
|
return __awaiter(this, void 0, void 0, function* () {
|
|
20
22
|
_super.connectedCallback.call(this);
|
|
23
|
+
this.hasPermissions = NOTIFICATION_DASHBOARD_TABS.some((tabCfg) => this.auth.currentUser.hasPermission(tabCfg.right));
|
|
21
24
|
yield this.loadRemotes();
|
|
22
25
|
});
|
|
23
26
|
}
|
|
@@ -39,6 +42,9 @@ __decorate([
|
|
|
39
42
|
__decorate([
|
|
40
43
|
observable
|
|
41
44
|
], FoundationNotificationDashboard.prototype, "ready", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
observable
|
|
47
|
+
], FoundationNotificationDashboard.prototype, "hasPermissions", void 0);
|
|
42
48
|
FoundationNotificationDashboard = __decorate([
|
|
43
49
|
customElement({
|
|
44
50
|
name: 'foundation-notification-dashboard',
|
package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.styles.js
CHANGED
|
@@ -8,4 +8,13 @@ export const FoundationNotificationDashboardStyles = css `
|
|
|
8
8
|
rapid-tab-panel {
|
|
9
9
|
height: 100%;
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
.no-permissions {
|
|
13
|
+
font-family: var(--body-font);
|
|
14
|
+
color: var(--neutral-foreground-rest);
|
|
15
|
+
height: 100%;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
}
|
|
11
20
|
`;
|
package/dist/esm/components/foundation-notification-dashboard/notification-dashboard.template.js
CHANGED
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import { html, repeat, when } from '@genesislcap/web-core';
|
|
1
|
+
import { html, repeat, when, whenElse } from '@genesislcap/web-core';
|
|
2
2
|
import { NOTIFICATION_DASHBOARD_TABS, } from './notification-dashboard.tabs';
|
|
3
3
|
export const FoundationNotificationDashboardTemplate = html `
|
|
4
4
|
<div class="notification-dashboard">
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
${
|
|
9
|
-
|
|
5
|
+
${whenElse((x) => x.hasPermissions, html `
|
|
6
|
+
<rapid-tabs class="tabs">
|
|
7
|
+
<!-- Tabs -->
|
|
8
|
+
${repeat((_) => NOTIFICATION_DASHBOARD_TABS, html `
|
|
9
|
+
${when((x, c) => c.parent.auth.currentUser.hasPermission(x.right), html `
|
|
10
|
+
<rapid-tab slot="${(x) => x.id}-tab">${(x) => x.name}</rapid-tab>
|
|
11
|
+
`)}
|
|
10
12
|
`)}
|
|
11
|
-
`)}
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
<!-- Panels -->
|
|
15
|
+
${repeat((_) => NOTIFICATION_DASHBOARD_TABS, html `
|
|
16
|
+
${when((x, c) => c.parent.auth.currentUser.hasPermission(x.right), html `
|
|
17
|
+
${
|
|
17
18
|
/* HTML Render */
|
|
18
19
|
(x) => html `
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
<rapid-tab-panel slot="${x.id}-tab"
|
|
21
|
+
id="${x.id}-tab-panel">
|
|
22
|
+
<${x.component}></${x.component}>
|
|
23
|
+
</rapid-tab-panel>
|
|
24
|
+
`}
|
|
25
|
+
`)}
|
|
23
26
|
`)}
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
</rapid-tabs>
|
|
28
|
+
`, html `
|
|
29
|
+
<div class="no-permissions">
|
|
30
|
+
<label>User has no permissions to view Notification Screens</label>
|
|
31
|
+
</div>
|
|
32
|
+
`)}
|
|
26
33
|
</div>
|
|
27
34
|
`;
|