@umbraco-cms/backoffice 14.0.0--preview005-eca8ee7e → 14.0.0--preview005-4682d2b5

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.
@@ -1,6 +1,7 @@
1
1
  import { CSSResultGroup } from '../../../../external/lit/index.js';
2
2
  import { UmbLitElement } from '../../../../shared/lit-element/index.js';
3
3
  export declare class UmbBackofficeNotificationContainerElement extends UmbLitElement {
4
+ private _notificationsElement?;
4
5
  private _notifications?;
5
6
  private _notificationContext?;
6
7
  constructor();
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { UmbTextStyles } from '../../../../shared/style/index.js';
8
- import { css, html, customElement, state, repeat } from '../../../../external/lit/index.js';
8
+ import { css, html, customElement, state, repeat, query } from '../../../../external/lit/index.js';
9
9
  import { UMB_NOTIFICATION_CONTEXT_TOKEN, } from '../../notification/index.js';
10
10
  import { UmbLitElement } from '../../../../shared/lit-element/index.js';
11
11
  let UmbBackofficeNotificationContainerElement = class UmbBackofficeNotificationContainerElement extends UmbLitElement {
@@ -21,11 +21,20 @@ let UmbBackofficeNotificationContainerElement = class UmbBackofficeNotificationC
21
21
  return;
22
22
  this.observe(this._notificationContext.notifications, (notifications) => {
23
23
  this._notifications = notifications;
24
+ // Close and instantly open the popover again to make sure it stays on top of all other content on the page
25
+ // TODO: This ignorer is just needed for JSON SCHEMA TO WORK, As its not updated with latest TS jet.
26
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
27
+ // @ts-ignore
28
+ this._notificationsElement?.hidePopover();
29
+ // TODO: This ignorer is just needed for JSON SCHEMA TO WORK, As its not updated with latest TS jet.
30
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
31
+ // @ts-ignore
32
+ this._notificationsElement?.showPopover();
24
33
  });
25
34
  }
26
35
  render() {
27
36
  return html `
28
- <uui-toast-notification-container bottom-up id="notifications">
37
+ <uui-toast-notification-container bottom-up id="notifications" popover="manual">
29
38
  ${this._notifications
30
39
  ? repeat(this._notifications, (notification) => notification.key, (notification) => html `${notification.element}`)
31
40
  : ''}
@@ -37,16 +46,25 @@ UmbBackofficeNotificationContainerElement.styles = [
37
46
  UmbTextStyles,
38
47
  css `
39
48
  #notifications {
40
- position: absolute;
41
49
  top: 0;
42
50
  left: 0;
43
51
  right: 0;
44
- bottom: 70px;
52
+ bottom: 45px;
45
53
  height: auto;
46
54
  padding: var(--uui-size-layout-1);
55
+
56
+ position: fixed;
57
+ width: 100vw;
58
+ background: 0;
59
+ outline: 0;
60
+ border: 0;
61
+ margin: 0;
47
62
  }
48
63
  `,
49
64
  ];
65
+ __decorate([
66
+ query('#notifications')
67
+ ], UmbBackofficeNotificationContainerElement.prototype, "_notificationsElement", void 0);
50
68
  __decorate([
51
69
  state()
52
70
  ], UmbBackofficeNotificationContainerElement.prototype, "_notifications", void 0);