@things-factory/notification 7.0.0-alpha.9 → 7.0.0

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.
Files changed (96) hide show
  1. package/client/actions/notification-fcm.ts +1 -1
  2. package/client/bootstrap.ts +2 -1
  3. package/client/pages/notification/notification-list-page.ts +6 -5
  4. package/client/pages/notification-rule/notification-rule-importer.ts +5 -12
  5. package/client/pages/notification-rule/notification-rule-list-page.ts +6 -5
  6. package/client/viewparts/notification-badge.ts +15 -19
  7. package/client/viewparts/notification-item.ts +20 -17
  8. package/client/viewparts/notification-list.ts +23 -23
  9. package/client/viewparts/notification-sender.ts +53 -37
  10. package/client/viewparts/notification-setting-let.ts +44 -27
  11. package/dist-client/actions/notification-fcm.js.map +1 -1
  12. package/dist-client/bootstrap.js +1 -1
  13. package/dist-client/bootstrap.js.map +1 -1
  14. package/dist-client/pages/notification/notification-list-page.js +6 -5
  15. package/dist-client/pages/notification/notification-list-page.js.map +1 -1
  16. package/dist-client/pages/notification-rule/notification-rule-importer.d.ts +1 -0
  17. package/dist-client/pages/notification-rule/notification-rule-importer.js +5 -12
  18. package/dist-client/pages/notification-rule/notification-rule-importer.js.map +1 -1
  19. package/dist-client/pages/notification-rule/notification-rule-list-page.js +6 -5
  20. package/dist-client/pages/notification-rule/notification-rule-list-page.js.map +1 -1
  21. package/dist-client/reducers/notification.js.map +1 -1
  22. package/dist-client/route.js.map +1 -1
  23. package/dist-client/tsconfig.tsbuildinfo +1 -1
  24. package/dist-client/viewparts/notification-badge.d.ts +1 -0
  25. package/dist-client/viewparts/notification-badge.js +14 -19
  26. package/dist-client/viewparts/notification-badge.js.map +1 -1
  27. package/dist-client/viewparts/notification-item.d.ts +1 -1
  28. package/dist-client/viewparts/notification-item.js +19 -17
  29. package/dist-client/viewparts/notification-item.js.map +1 -1
  30. package/dist-client/viewparts/notification-list.d.ts +3 -2
  31. package/dist-client/viewparts/notification-list.js +20 -22
  32. package/dist-client/viewparts/notification-list.js.map +1 -1
  33. package/dist-client/viewparts/notification-sender.d.ts +3 -3
  34. package/dist-client/viewparts/notification-sender.js +51 -36
  35. package/dist-client/viewparts/notification-sender.js.map +1 -1
  36. package/dist-client/viewparts/notification-setting-let.d.ts +3 -4
  37. package/dist-client/viewparts/notification-setting-let.js +44 -22
  38. package/dist-client/viewparts/notification-setting-let.js.map +1 -1
  39. package/dist-server/controllers/fcm.d.ts +34 -0
  40. package/dist-server/controllers/fcm.js +5 -6
  41. package/dist-server/controllers/fcm.js.map +1 -1
  42. package/dist-server/controllers/index.d.ts +1 -0
  43. package/dist-server/index.d.ts +4 -0
  44. package/dist-server/middlewares/index.d.ts +1 -0
  45. package/dist-server/middlewares/index.js +1 -2
  46. package/dist-server/middlewares/index.js.map +1 -1
  47. package/dist-server/middlewares/notification-middleware.d.ts +1 -0
  48. package/dist-server/middlewares/notification-middleware.js +1 -2
  49. package/dist-server/middlewares/notification-middleware.js.map +1 -1
  50. package/dist-server/routers/notification-router.d.ts +1 -0
  51. package/dist-server/routes.d.ts +1 -0
  52. package/dist-server/service/index.d.ts +13 -0
  53. package/dist-server/service/notification/directive-notification.d.ts +3 -0
  54. package/dist-server/service/notification/directive-notification.js.map +1 -1
  55. package/dist-server/service/notification/index.d.ts +12 -0
  56. package/dist-server/service/notification/notification-mutation.d.ts +9 -0
  57. package/dist-server/service/notification/notification-mutation.js +2 -2
  58. package/dist-server/service/notification/notification-mutation.js.map +1 -1
  59. package/dist-server/service/notification/notification-query.d.ts +13 -0
  60. package/dist-server/service/notification/notification-query.js +4 -4
  61. package/dist-server/service/notification/notification-query.js.map +1 -1
  62. package/dist-server/service/notification/notification-subscription.d.ts +6 -0
  63. package/dist-server/service/notification/notification-subscription.js +2 -2
  64. package/dist-server/service/notification/notification-subscription.js.map +1 -1
  65. package/dist-server/service/notification/notification-type.d.ts +21 -0
  66. package/dist-server/service/notification/notification-type.js +6 -6
  67. package/dist-server/service/notification/notification-type.js.map +1 -1
  68. package/dist-server/service/notification/notification.d.ts +28 -0
  69. package/dist-server/service/notification/notification.js +4 -4
  70. package/dist-server/service/notification/notification.js.map +1 -1
  71. package/dist-server/service/notification-rule/event-subscriber.d.ts +7 -0
  72. package/dist-server/service/notification-rule/event-subscriber.js +2 -2
  73. package/dist-server/service/notification-rule/event-subscriber.js.map +1 -1
  74. package/dist-server/service/notification-rule/index.d.ts +7 -0
  75. package/dist-server/service/notification-rule/notification-rule-history.d.ts +28 -0
  76. package/dist-server/service/notification-rule/notification-rule-history.js +5 -5
  77. package/dist-server/service/notification-rule/notification-rule-history.js.map +1 -1
  78. package/dist-server/service/notification-rule/notification-rule-mutation.d.ts +10 -0
  79. package/dist-server/service/notification-rule/notification-rule-mutation.js +2 -2
  80. package/dist-server/service/notification-rule/notification-rule-mutation.js.map +1 -1
  81. package/dist-server/service/notification-rule/notification-rule-query.d.ts +12 -0
  82. package/dist-server/service/notification-rule/notification-rule-query.js +3 -3
  83. package/dist-server/service/notification-rule/notification-rule-query.js.map +1 -1
  84. package/dist-server/service/notification-rule/notification-rule-type.d.ts +27 -0
  85. package/dist-server/service/notification-rule/notification-rule-type.js +6 -6
  86. package/dist-server/service/notification-rule/notification-rule-type.js.map +1 -1
  87. package/dist-server/service/notification-rule/notification-rule.d.ts +34 -0
  88. package/dist-server/service/notification-rule/notification-rule.js +8 -9
  89. package/dist-server/service/notification-rule/notification-rule.js.map +1 -1
  90. package/dist-server/tsconfig.tsbuildinfo +1 -1
  91. package/package.json +10 -12
  92. package/server/service/notification/notification-query.ts +8 -2
  93. package/server/service/notification/notification.ts +1 -1
  94. package/server/service/notification-rule/notification-rule-history.ts +5 -5
  95. package/server/service/notification-rule/notification-rule-query.ts +4 -1
  96. package/server/service/notification-rule/notification-rule.ts +1 -1
@@ -1,3 +1,4 @@
1
+ import '@material/web/icon/icon.js';
1
2
  import { LitElement } from 'lit';
2
3
  declare const NotificationBadge_base: (new (...args: any[]) => {
3
4
  _storeUnsubscribe: import("redux").Unsubscribe;
@@ -1,57 +1,52 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
2
3
  import { LitElement, html, css } from 'lit';
3
4
  import { customElement, property } from 'lit/decorators.js';
4
5
  import { connect } from 'pwa-helpers/connect-mixin.js';
5
6
  import { store } from '@operato/shell';
6
7
  let NotificationBadge = class NotificationBadge extends connect(store)(LitElement) {
7
8
  render() {
8
- var badge = this.badge || 0;
9
- return html ` <mwc-icon data-badge=${badge} class="badge">notifications_none</mwc-icon> `;
9
+ return html ` <md-icon>notifications_none</md-icon> `;
10
10
  }
11
11
  stateChanged(state) {
12
- this.badge = state.notification.badge;
12
+ this.badge = state.notification.badge || 0;
13
13
  }
14
14
  };
15
15
  NotificationBadge.styles = [
16
16
  css `
17
17
  :host {
18
18
  font-size: 2em;
19
- margin: 0 5px 0 0;
20
- --badge-size: 14px;
19
+ position: relative;
21
20
  }
22
21
 
23
- mwc-icon {
22
+ md-icon {
24
23
  display: block;
25
24
  }
26
25
 
27
- [data-badge] {
28
- position: relative;
29
- }
30
-
31
- [data-badge]::after {
26
+ :host::after {
32
27
  content: attr(data-badge);
33
28
  position: absolute;
34
29
  top: 0px;
35
30
  right: -6px;
36
31
  font-family: var(--theme-font);
37
- font-size: 0.4em;
38
- background: var(--paper-deep-orange-a400);
39
- color: var(--theme-white-color);
40
- width: var(--badge-size);
41
- height: var(--badge-size);
32
+ font-size: 0.3em;
33
+ background: var(--md-sys-color-error, rgb(186 26 26));
34
+ color: var(--md-sys-color-on-primary);
35
+ width: 14px;
36
+ height: 14px;
42
37
  text-align: center;
43
- line-height: var(--badge-size);
38
+ line-height: 14px;
44
39
  border-radius: 50%;
45
40
  box-shadow: var(--box-shadow);
46
41
  }
47
42
 
48
- [data-badge='0']::after {
43
+ :host([data-badge='0'])::after {
49
44
  display: none;
50
45
  }
51
46
  `
52
47
  ];
53
48
  __decorate([
54
- property({ type: Number }),
49
+ property({ type: Number, attribute: 'data-badge', reflect: true }),
55
50
  __metadata("design:type", Number)
56
51
  ], NotificationBadge.prototype, "badge", void 0);
57
52
  NotificationBadge = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"notification-badge.js","sourceRoot":"","sources":["../../client/viewparts/notification-badge.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAG/B,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IA0C/D,MAAM;QACJ,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,CAAC,CAAA;QAC3B,OAAO,IAAI,CAAA,yBAAyB,KAAK,+CAA+C,CAAA;IAC1F,CAAC;IAED,YAAY,CAAC,KAAK;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,CAAA;IACvC,CAAC;;AAhDM,wBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmCF;CACF,CAAA;AAED;IAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAe;AAxC/B,iBAAiB;IAD7B,aAAa,CAAC,oBAAoB,CAAC;GACvB,iBAAiB,CAkD7B;SAlDY,iBAAiB","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { connect } from 'pwa-helpers/connect-mixin.js'\nimport { store } from '@operato/shell'\n\n@customElement('notification-badge')\nexport class NotificationBadge extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n font-size: 2em;\n margin: 0 5px 0 0;\n --badge-size: 14px;\n }\n\n mwc-icon {\n display: block;\n }\n\n [data-badge] {\n position: relative;\n }\n\n [data-badge]::after {\n content: attr(data-badge);\n position: absolute;\n top: 0px;\n right: -6px;\n font-family: var(--theme-font);\n font-size: 0.4em;\n background: var(--paper-deep-orange-a400);\n color: var(--theme-white-color);\n width: var(--badge-size);\n height: var(--badge-size);\n text-align: center;\n line-height: var(--badge-size);\n border-radius: 50%;\n box-shadow: var(--box-shadow);\n }\n\n [data-badge='0']::after {\n display: none;\n }\n `\n ]\n\n @property({ type: Number }) badge?: number\n\n render() {\n var badge = this.badge || 0\n return html` <mwc-icon data-badge=${badge} class=\"badge\">notifications_none</mwc-icon> `\n }\n\n stateChanged(state) {\n this.badge = state.notification.badge\n }\n}\n"]}
1
+ {"version":3,"file":"notification-badge.js","sourceRoot":"","sources":["../../client/viewparts/notification-badge.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAG/B,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,CAAC;IAqC/D,MAAM;QACJ,OAAO,IAAI,CAAA,yCAAyC,CAAA;IACtD,CAAC;IAED,YAAY,CAAC,KAAK;QAChB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC,CAAA;IAC5C,CAAC;;AA1CM,wBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8BF;CACF,AAhCY,CAgCZ;AAEmE;IAAnE,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;gDAAe;AAnCvE,iBAAiB;IAD7B,aAAa,CAAC,oBAAoB,CAAC;GACvB,iBAAiB,CA4C7B","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { connect } from 'pwa-helpers/connect-mixin.js'\nimport { store } from '@operato/shell'\n\n@customElement('notification-badge')\nexport class NotificationBadge extends connect(store)(LitElement) {\n static styles = [\n css`\n :host {\n font-size: 2em;\n position: relative;\n }\n\n md-icon {\n display: block;\n }\n\n :host::after {\n content: attr(data-badge);\n position: absolute;\n top: 0px;\n right: -6px;\n font-family: var(--theme-font);\n font-size: 0.3em;\n background: var(--md-sys-color-error, rgb(186 26 26));\n color: var(--md-sys-color-on-primary);\n width: 14px;\n height: 14px;\n text-align: center;\n line-height: 14px;\n border-radius: 50%;\n box-shadow: var(--box-shadow);\n }\n\n :host([data-badge='0'])::after {\n display: none;\n }\n `\n ]\n\n @property({ type: Number, attribute: 'data-badge', reflect: true }) badge?: number\n\n render() {\n return html` <md-icon>notifications_none</md-icon> `\n }\n\n stateChanged(state) {\n this.badge = state.notification.badge || 0\n }\n}\n"]}
@@ -1,5 +1,5 @@
1
+ import '@material/web/icon/icon.js';
1
2
  import { LitElement } from 'lit';
2
- import '@material/mwc-icon';
3
3
  export declare class NotificationItem extends LitElement {
4
4
  static styles: import("lit").CSSResult[];
5
5
  type?: string;
@@ -1,8 +1,8 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
2
3
  import gql from 'graphql-tag';
3
4
  import { LitElement, html, css } from 'lit';
4
5
  import { customElement, property } from 'lit/decorators.js';
5
- import '@material/mwc-icon';
6
6
  import { client } from '@operato/graphql';
7
7
  function isOriginSameAsLocation(url) {
8
8
  function defaultPort(protocol) {
@@ -40,7 +40,7 @@ let NotificationItem = class NotificationItem extends LitElement {
40
40
  : html `<a href=${url}>${title}</a>`
41
41
  : title}
42
42
  </div>
43
- <mwc-icon close @click=${e => this.dispatchEvent(new CustomEvent('close'))}>close</mwc-icon>
43
+ <md-icon close @click=${e => this.dispatchEvent(new CustomEvent('close'))}>close</md-icon>
44
44
 
45
45
  ${image
46
46
  ? url
@@ -56,7 +56,7 @@ let NotificationItem = class NotificationItem extends LitElement {
56
56
  this.decipherErrorCode();
57
57
  }}
58
58
  >
59
- <span class="more"><mwc-icon>expand_circle_down</mwc-icon> more</span>
59
+ <span class="more"><md-icon>expand_circle_down</md-icon> more</span>
60
60
  </div>`
61
61
  : html ``}
62
62
  ${detail ? html `<div detail>${detail.message}</div>` : html ``}
@@ -106,18 +106,20 @@ NotificationItem.styles = [
106
106
  css `
107
107
  :host {
108
108
  position: relative;
109
- background-color: var(--theme-white-color);
110
- padding: var(--padding-default);
109
+ background-color: var(--md-sys-color-surface);
110
+ padding: var(--spacing-medium);
111
111
  border-left: 0 solid transparent;
112
- border-bottom: var(--border-dark-color) !important;
113
- transition: border-left 300ms ease-in-out, padding-left 300ms ease-in-out;
114
- color: var(--scondary-color);
112
+ border-bottom: 1px solid var(--md-sys-color-outline-variant) !important;
113
+ transition:
114
+ border-left 300ms ease-in-out,
115
+ padding-left 300ms ease-in-out;
116
+ color: var(--md-sys-color-on-surface);
115
117
 
116
118
  --type-dot-size: 9px;
117
119
  }
118
120
 
119
121
  :host([newbie]) {
120
- background-color: var(--paper-light-green-50);
122
+ background-color: var(--md-sys-color-surface-variant);
121
123
  }
122
124
 
123
125
  :host(:hover) {
@@ -131,7 +133,7 @@ NotificationItem.styles = [
131
133
  text-overflow: ellipsis;
132
134
  font-size: var(--fontsize-large);
133
135
  font-weight: bold;
134
- color: var(--secondary-color);
136
+ color: var(--md-sys-color-secondary);
135
137
  }
136
138
 
137
139
  [titler] span {
@@ -139,7 +141,7 @@ NotificationItem.styles = [
139
141
  width: var(--type-dot-size);
140
142
  height: var(--type-dot-size);
141
143
  border-radius: 50%;
142
- margin-right: var(--margin-narrow);
144
+ margin-right: var(--spacing-small);
143
145
  }
144
146
  [titler] * {
145
147
  vertical-align: middle;
@@ -157,18 +159,18 @@ NotificationItem.styles = [
157
159
  opacity: 1;
158
160
  }
159
161
  [detail] {
160
- padding: var(--padding-narrow) var(--padding-default);
162
+ padding: var(--spacing-small) var(--spacing-medium);
161
163
  border-radius: var(--border-radius);
162
164
  font-size: 0.85em;
163
165
  }
164
166
  span.more {
165
167
  margin-left: 16px;
166
168
  float: right;
167
- padding: 0px var(--padding-narrow) 2px var(--padding-narrow);
169
+ padding: 0px var(--spacing-small) 2px var(--spacing-small);
168
170
  border-radius: var(--border-radius);
169
171
  font-size: 0.8em;
170
- color: var(--theme-white-color);
171
- --mdc-icon-size: 14px;
172
+ color: var(--md-sys-color-on-primary);
173
+ --md-icon-size: 14px;
172
174
  }
173
175
  span.more * {
174
176
  vertical-align: middle;
@@ -212,13 +214,13 @@ NotificationItem.styles = [
212
214
 
213
215
  [message] {
214
216
  font-size: var(--fontsize-default);
215
- color: var(--secondary-color);
217
+ color: var(--md-sys-color-secondary);
216
218
  }
217
219
 
218
220
  [timestamp] {
219
221
  white-space: nowrap;
220
222
  font-size: var(--fontsize-small);
221
- color: var(--secondary-text-color);
223
+ color: var(--md-sys-color-on-surface-variant);
222
224
  }
223
225
  `
224
226
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"notification-item.js","sourceRoot":"","sources":["../../client/viewparts/notification-item.ts"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,oBAAoB,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,SAAS,sBAAsB,CAAC,GAAG;IACjC,SAAS,WAAW,CAAC,QAAQ;QAC3B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GACtB,gBAAgB,CAgN5B;SAhNY,gBAAgB","sourcesContent":["import gql from 'graphql-tag'\nimport { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport '@material/mwc-icon'\nimport { client } from '@operato/graphql'\n\nfunction isOriginSameAsLocation(url) {\n function defaultPort(protocol) {\n return { 'http:': 80, 'https:': 443 }[protocol]\n }\n\n function portOf(location) {\n return location.port || defaultPort(location.protocol || pageLocation.protocol)\n }\n\n try {\n var pageLocation = window.location\n var urlparts = new URL(url, pageLocation.href)\n\n return !!(\n urlparts.protocol &&\n urlparts.protocol == pageLocation.protocol &&\n urlparts.host &&\n urlparts.host == pageLocation.host &&\n urlparts.host &&\n portOf(urlparts) == portOf(pageLocation)\n )\n } catch (err) {\n console.warn(err, url)\n }\n}\n\n@customElement('notification-item')\nexport class NotificationItem extends LitElement {\n static styles = [\n css`\n :host {\n position: relative;\n background-color: var(--theme-white-color);\n padding: var(--padding-default);\n border-left: 0 solid transparent;\n border-bottom: var(--border-dark-color) !important;\n transition: border-left 300ms ease-in-out, padding-left 300ms ease-in-out;\n color: var(--scondary-color);\n\n --type-dot-size: 9px;\n }\n\n :host([newbie]) {\n background-color: var(--paper-light-green-50);\n }\n\n :host(:hover) {\n padding-left: 0.5rem;\n border-left: 0.5rem solid var(--status-info-color);\n }\n\n [titler] {\n white-space: normal;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--fontsize-large);\n font-weight: bold;\n color: var(--secondary-color);\n }\n\n [titler] span {\n display: inline-block;\n width: var(--type-dot-size);\n height: var(--type-dot-size);\n border-radius: 50%;\n margin-right: var(--margin-narrow);\n }\n [titler] * {\n vertical-align: middle;\n }\n\n [close] {\n position: absolute;\n top: 13px;\n right: 0;\n font-size: var(--fontsize-large);\n opacity: 0.5;\n cursor: pointer;\n }\n [close]:hover {\n opacity: 1;\n }\n [detail] {\n padding: var(--padding-narrow) var(--padding-default);\n border-radius: var(--border-radius);\n font-size: 0.85em;\n }\n span.more {\n margin-left: 16px;\n float: right;\n padding: 0px var(--padding-narrow) 2px var(--padding-narrow);\n border-radius: var(--border-radius);\n font-size: 0.8em;\n color: var(--theme-white-color);\n --mdc-icon-size: 14px;\n }\n span.more * {\n vertical-align: middle;\n }\n\n :host([type='ERROR']) span {\n background-color: var(--status-danger-color);\n }\n :host([type='ERROR']) {\n border-color: var(--status-danger-color);\n }\n :host([type='ERROR']) [detail] {\n border: 1px solid rgba(241, 53, 63, 0.5);\n background-color: rgba(241, 53, 63, 0.1);\n }\n :host([type='WARN']) span {\n background-color: var(--status-warning-color);\n }\n :host([type='WARN']) {\n border-color: var(--status-warning-color);\n }\n :host([type='SUCCESS']) span {\n background-color: var(--status-success-color);\n }\n :host([type='SUCCESS']) {\n border-color: var(--status-success-color);\n }\n :host([type='INFO']) span,\n :host span {\n background-color: var(--status-info-color);\n }\n :host([type='INFO']) {\n border-color: var(--status-info-color);\n }\n\n img {\n display: block;\n max-width: 100%;\n margin: auto;\n }\n\n [message] {\n font-size: var(--fontsize-default);\n color: var(--secondary-color);\n }\n\n [timestamp] {\n white-space: nowrap;\n font-size: var(--fontsize-small);\n color: var(--secondary-text-color);\n }\n `\n ]\n\n @property({ type: String, reflect: true }) type?: string\n @property({ type: Object }) notification: any\n @property({ type: String }) target?: string\n @property({ type: Object }) detail?: { message: string; [key: string]: any }\n @property({ type: Boolean }) newbie?: boolean\n\n render() {\n const { title, url, image, timestamp, body } = this.notification\n const target = this.target\n const detail = this.detail\n const type = this.type\n\n return html`\n <div titler>\n <span></span>\n ${url\n ? target\n ? html`<a href=${url} target=${target}>${title}</a>`\n : html`<a href=${url}>${title}</a>`\n : title}\n </div>\n <mwc-icon close @click=${e => this.dispatchEvent(new CustomEvent('close'))}>close</mwc-icon>\n\n ${image\n ? url\n ? target\n ? html`<a href=${url} target=${target}><img src=${image} /></a>`\n : html`<a href=${url}><img src=${image} /></a>`\n : html`<img src=${image} />`\n : html``}\n <div message>${body}</div>\n ${type == 'ERROR'\n ? html`<div\n @click=${() => {\n this.decipherErrorCode()\n }}\n >\n <span class=\"more\"><mwc-icon>expand_circle_down</mwc-icon> more</span>\n </div>`\n : html``}\n ${detail ? html`<div detail>${detail.message}</div>` : html``}\n\n <div timestamp>${new Date(Number(timestamp)).toLocaleString()}</div>\n `\n }\n\n updated(changed) {\n if (!this.notification?.confirmed) {\n this.setAttribute('newbie', '')\n } else {\n this.removeAttribute('newbie')\n }\n\n const url = this.notification?.url\n this.target = url && !isOriginSameAsLocation(url) && '_blank'\n }\n\n async decipherErrorCode() {\n if (this.type != 'ERROR' || !this.notification) {\n return\n }\n\n const { title, body } = this.notification\n var code = `${title}`\n if (body) {\n code += `: ${body}`\n }\n\n const response = await client.query({\n query: gql`\n query ($input: CodeDecipherInput!) {\n decipherErrorCode(input: $input) {\n message\n }\n }\n `,\n variables: {\n input: {\n code,\n system: ''\n }\n }\n })\n\n this.detail = response.data.decipherErrorCode\n }\n}\n"]}
1
+ {"version":3,"file":"notification-item.js","sourceRoot":"","sources":["../../client/viewparts/notification-item.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAEnC,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAEzC,SAAS,sBAAsB,CAAC,GAAG;IACjC,SAAS,WAAW,CAAC,QAAQ;QAC3B,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAA;IACjD,CAAC;IAED,SAAS,MAAM,CAAC,QAAQ;QACtB,OAAO,QAAQ,CAAC,IAAI,IAAI,WAAW,CAAC,QAAQ,CAAC,QAAQ,IAAI,YAAY,CAAC,QAAQ,CAAC,CAAA;IACjF,CAAC;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AAC,YAAY,CAAA;QACzC,IAAI,IAAI,GAAG,GAAG,KAAK,EAAE,CAAA;QACrB,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,IAAI,KAAK,IAAI,EAAE,CAAA;QACrB,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;OAMT;YACD,SAAS,EAAE;gBACT,KAAK,EAAE;oBACL,IAAI;oBACJ,MAAM,EAAE,EAAE;iBACX;aACF;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAA;IAC/C,CAAC;;AAhNM,uBAAM,GAAG;IACd,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAuHF;CACF,AAzHY,CAyHZ;AAE0C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;8CAAc;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAkB;AACjB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAgB;AACf;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;gDAAiD;AAC/C;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;gDAAiB;AAhIlC,gBAAgB;IAD5B,aAAa,CAAC,mBAAmB,CAAC;GACtB,gBAAgB,CAkN5B","sourcesContent":["import '@material/web/icon/icon.js'\n\nimport gql from 'graphql-tag'\nimport { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { client } from '@operato/graphql'\n\nfunction isOriginSameAsLocation(url) {\n function defaultPort(protocol) {\n return { 'http:': 80, 'https:': 443 }[protocol]\n }\n\n function portOf(location) {\n return location.port || defaultPort(location.protocol || pageLocation.protocol)\n }\n\n try {\n var pageLocation = window.location\n var urlparts = new URL(url, pageLocation.href)\n\n return !!(\n urlparts.protocol &&\n urlparts.protocol == pageLocation.protocol &&\n urlparts.host &&\n urlparts.host == pageLocation.host &&\n urlparts.host &&\n portOf(urlparts) == portOf(pageLocation)\n )\n } catch (err) {\n console.warn(err, url)\n }\n}\n\n@customElement('notification-item')\nexport class NotificationItem extends LitElement {\n static styles = [\n css`\n :host {\n position: relative;\n background-color: var(--md-sys-color-surface);\n padding: var(--spacing-medium);\n border-left: 0 solid transparent;\n border-bottom: 1px solid var(--md-sys-color-outline-variant) !important;\n transition:\n border-left 300ms ease-in-out,\n padding-left 300ms ease-in-out;\n color: var(--md-sys-color-on-surface);\n\n --type-dot-size: 9px;\n }\n\n :host([newbie]) {\n background-color: var(--md-sys-color-surface-variant);\n }\n\n :host(:hover) {\n padding-left: 0.5rem;\n border-left: 0.5rem solid var(--status-info-color);\n }\n\n [titler] {\n white-space: normal;\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--fontsize-large);\n font-weight: bold;\n color: var(--md-sys-color-secondary);\n }\n\n [titler] span {\n display: inline-block;\n width: var(--type-dot-size);\n height: var(--type-dot-size);\n border-radius: 50%;\n margin-right: var(--spacing-small);\n }\n [titler] * {\n vertical-align: middle;\n }\n\n [close] {\n position: absolute;\n top: 13px;\n right: 0;\n font-size: var(--fontsize-large);\n opacity: 0.5;\n cursor: pointer;\n }\n [close]:hover {\n opacity: 1;\n }\n [detail] {\n padding: var(--spacing-small) var(--spacing-medium);\n border-radius: var(--border-radius);\n font-size: 0.85em;\n }\n span.more {\n margin-left: 16px;\n float: right;\n padding: 0px var(--spacing-small) 2px var(--spacing-small);\n border-radius: var(--border-radius);\n font-size: 0.8em;\n color: var(--md-sys-color-on-primary);\n --md-icon-size: 14px;\n }\n span.more * {\n vertical-align: middle;\n }\n\n :host([type='ERROR']) span {\n background-color: var(--status-danger-color);\n }\n :host([type='ERROR']) {\n border-color: var(--status-danger-color);\n }\n :host([type='ERROR']) [detail] {\n border: 1px solid rgba(241, 53, 63, 0.5);\n background-color: rgba(241, 53, 63, 0.1);\n }\n :host([type='WARN']) span {\n background-color: var(--status-warning-color);\n }\n :host([type='WARN']) {\n border-color: var(--status-warning-color);\n }\n :host([type='SUCCESS']) span {\n background-color: var(--status-success-color);\n }\n :host([type='SUCCESS']) {\n border-color: var(--status-success-color);\n }\n :host([type='INFO']) span,\n :host span {\n background-color: var(--status-info-color);\n }\n :host([type='INFO']) {\n border-color: var(--status-info-color);\n }\n\n img {\n display: block;\n max-width: 100%;\n margin: auto;\n }\n\n [message] {\n font-size: var(--fontsize-default);\n color: var(--md-sys-color-secondary);\n }\n\n [timestamp] {\n white-space: nowrap;\n font-size: var(--fontsize-small);\n color: var(--md-sys-color-on-surface-variant);\n }\n `\n ]\n\n @property({ type: String, reflect: true }) type?: string\n @property({ type: Object }) notification: any\n @property({ type: String }) target?: string\n @property({ type: Object }) detail?: { message: string; [key: string]: any }\n @property({ type: Boolean }) newbie?: boolean\n\n render() {\n const { title, url, image, timestamp, body } = this.notification\n const target = this.target\n const detail = this.detail\n const type = this.type\n\n return html`\n <div titler>\n <span></span>\n ${url\n ? target\n ? html`<a href=${url} target=${target}>${title}</a>`\n : html`<a href=${url}>${title}</a>`\n : title}\n </div>\n <md-icon close @click=${e => this.dispatchEvent(new CustomEvent('close'))}>close</md-icon>\n\n ${image\n ? url\n ? target\n ? html`<a href=${url} target=${target}><img src=${image} /></a>`\n : html`<a href=${url}><img src=${image} /></a>`\n : html`<img src=${image} />`\n : html``}\n <div message>${body}</div>\n ${type == 'ERROR'\n ? html`<div\n @click=${() => {\n this.decipherErrorCode()\n }}\n >\n <span class=\"more\"><md-icon>expand_circle_down</md-icon> more</span>\n </div>`\n : html``}\n ${detail ? html`<div detail>${detail.message}</div>` : html``}\n\n <div timestamp>${new Date(Number(timestamp)).toLocaleString()}</div>\n `\n }\n\n updated(changed) {\n if (!this.notification?.confirmed) {\n this.setAttribute('newbie', '')\n } else {\n this.removeAttribute('newbie')\n }\n\n const url = this.notification?.url\n this.target = url && !isOriginSameAsLocation(url) && '_blank'\n }\n\n async decipherErrorCode() {\n if (this.type != 'ERROR' || !this.notification) {\n return\n }\n\n const { title, body } = this.notification\n var code = `${title}`\n if (body) {\n code += `: ${body}`\n }\n\n const response = await client.query({\n query: gql`\n query ($input: CodeDecipherInput!) {\n decipherErrorCode(input: $input) {\n message\n }\n }\n `,\n variables: {\n input: {\n code,\n system: ''\n }\n }\n })\n\n this.detail = response.data.decipherErrorCode\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
- import { LitElement } from 'lit';
2
- import '@material/mwc-icon';
1
+ import '@material/web/icon/icon.js';
2
+ import '@material/web/button/elevated-button.js';
3
3
  import './notification-item';
4
+ import { LitElement } from 'lit';
4
5
  declare const NotificationList_base: (new (...args: any[]) => {
5
6
  _storeUnsubscribe: import("redux").Unsubscribe;
6
7
  connectedCallback(): void;
@@ -1,12 +1,13 @@
1
1
  import { __decorate, __metadata } from "tslib";
2
+ import '@material/web/icon/icon.js';
3
+ import '@material/web/button/elevated-button.js';
4
+ import './notification-item';
2
5
  import { LitElement, html, css } from 'lit';
3
6
  import { customElement, property } from 'lit/decorators.js';
4
7
  import { connect } from 'pwa-helpers';
5
8
  import { store, notificationStore } from '@operato/shell';
6
9
  import { i18next, localize } from '@operato/i18n';
7
10
  import { UPDATE_NOTIFICATION } from '../actions/notification-fcm';
8
- import '@material/mwc-icon';
9
- import './notification-item';
10
11
  let NotificationList = class NotificationList extends connect(store)(localize(i18next)(LitElement)) {
11
12
  constructor() {
12
13
  super(...arguments);
@@ -19,13 +20,9 @@ let NotificationList = class NotificationList extends connect(store)(localize(i1
19
20
  <div notifications-wrap>
20
21
  <div>
21
22
  <strong>${i18next.t('label.notification list')}</strong>
22
- <mwc-button
23
- outlined
24
- dense
25
- label=${String(i18next.t('label.clear all'))}
26
- icon="delete_outline"
27
- @click=${e => this.onclearall()}
28
- ></mwc-button>
23
+ <md-elevated-button outlined dense @click=${e => this.onclearall()}
24
+ ><md-icon slot="icon">delete_outline</md-icon>${String(i18next.t('label.clear all'))}</md-elevated-button
25
+ >
29
26
  </div>
30
27
  ${history.map(notification => html `
31
28
  <notification-item
@@ -40,7 +37,7 @@ let NotificationList = class NotificationList extends connect(store)(localize(i1
40
37
  `
41
38
  : html `
42
39
  <div no-notifications @click=${e => window.history.back()}>
43
- <mwc-icon>notifications_off</mwc-icon>${i18next.t('text.no notification available')}
40
+ <md-icon>notifications_off</md-icon>${i18next.t('text.no notification available')}
44
41
  </div>
45
42
  `;
46
43
  }
@@ -90,10 +87,10 @@ NotificationList.styles = [
90
87
  css `
91
88
  :host {
92
89
  display: block;
93
- background-color: var(--theme-white-color);
90
+ background-color: var(--md-sys-color-surface);
94
91
  box-shadow: var(--box-shadow);
95
- margin-right: var(--margin-wide);
96
- padding: var(--padding-default);
92
+ margin-right: var(--spacing-large);
93
+ padding: var(--spacing-medium);
97
94
  max-height: 100%;
98
95
  overflow-x: hidden;
99
96
  overflow-y: auto;
@@ -104,7 +101,7 @@ NotificationList.styles = [
104
101
  height: 0px;
105
102
  border-left: 7px solid transparent;
106
103
  border-right: 7px solid transparent;
107
- border-bottom: 7px solid var(--theme-white-color);
104
+ border-bottom: 7px solid var(--md-sys-color-on-primary);
108
105
  position: absolute;
109
106
  margin-top: -7px;
110
107
  right: 50px;
@@ -117,27 +114,28 @@ NotificationList.styles = [
117
114
  }
118
115
  [notifications-wrap] div {
119
116
  align-items: stretch;
120
- border-bottom: 1px solid var(--primary-color);
117
+ border-bottom: 1px solid var(--md-sys-color-primary);
121
118
  }
122
119
  [notifications-wrap] strong {
123
- color: var(--primary-color);
120
+ color: var(--md-sys-color-primary);
124
121
  text-transform: capitalize;
125
122
  line-height: 2;
126
123
  }
127
- [notifications-wrap] mwc-button {
124
+ [notifications-wrap] md-elevated-button {
125
+ --md-elevated-button-container-height: 24px;
128
126
  float: right;
129
- --mdc-button-horizontal-padding: var(--padding-narrow);
130
- --mdc-typography-button-font-size: 0.75em;
127
+ padding-inline-start: 6px;
128
+ padding-inline-end: 12px;
131
129
  }
132
130
  [no-notifications] {
133
131
  margin: 0;
134
- padding: var(--padding-wide);
132
+ padding: var(--spacing-large);
135
133
  text-align: center;
136
134
  font-size: var(--fontsize-default);
137
135
  font-weight: bold;
138
- color: var(--secondary-color);
136
+ color: var(--md-sys-color-secondary);
139
137
  }
140
- div mwc-icon {
138
+ div md-icon {
141
139
  display: block;
142
140
  opacity: 0.3;
143
141
  }
@@ -1 +1 @@
1
- {"version":3,"file":"notification-list.js","sourceRoot":"","sources":["../../client/viewparts/notification-list.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAEjE,OAAO,oBAAoB,CAAA;AAC3B,OAAO,qBAAqB,CAAA;AAGrB,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,CAAC;IAA5E;;QAiEsB,YAAO,GAAU,EAAE,CAAA;IA8FhD,CAAC;IA5FC,MAAM;QACJ,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAA;QAEpC,OAAO,OAAO,CAAC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orators.js'\nimport { connect } from 'pwa-helpers'\nimport { store, notificationStore } from '@operato/shell'\nimport { i18next, localize } from '@operato/i18n'\nimport { UPDATE_NOTIFICATION } from '../actions/notification-fcm'\n\nimport '@material/mwc-icon'\nimport './notification-item'\n\n@customElement('notification-list')\nexport class NotificationList extends connect(store)(localize(i18next)(LitElement)) {\n static styles = [\n css`\n :host {\n display: block;\n background-color: var(--theme-white-color);\n box-shadow: var(--box-shadow);\n margin-right: var(--margin-wide);\n padding: var(--padding-default);\n max-height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n }\n :host::before {\n content: '';\n width: 0px;\n height: 0px;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid var(--theme-white-color);\n position: absolute;\n margin-top: -7px;\n right: 50px;\n }\n\n [notifications-wrap] {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n }\n [notifications-wrap] div {\n align-items: stretch;\n border-bottom: 1px solid var(--primary-color);\n }\n [notifications-wrap] strong {\n color: var(--primary-color);\n text-transform: capitalize;\n line-height: 2;\n }\n [notifications-wrap] mwc-button {\n float: right;\n --mdc-button-horizontal-padding: var(--padding-narrow);\n --mdc-typography-button-font-size: 0.75em;\n }\n [no-notifications] {\n margin: 0;\n padding: var(--padding-wide);\n text-align: center;\n font-size: var(--fontsize-default);\n font-weight: bold;\n color: var(--secondary-color);\n }\n div mwc-icon {\n display: block;\n opacity: 0.3;\n }\n @media screen and (max-width: 480px) {\n :host {\n height: 100%;\n width: 100vw;\n }\n }\n `\n ]\n\n @property({ type: Array }) history: any[] = []\n\n render() {\n var history = this.history.reverse()\n\n return history.length > 0\n ? html`\n <div notifications-wrap>\n <div>\n <strong>${i18next.t('label.notification list')}</strong>\n <mwc-button\n outlined\n dense\n label=${String(i18next.t('label.clear all'))}\n icon=\"delete_outline\"\n @click=${e => this.onclearall()}\n ></mwc-button>\n </div>\n ${history.map(\n notification => html`\n <notification-item\n @close=${e => {\n this.onClose(notification)\n }}\n .type=${notification.type}\n .notification=${notification}\n ></notification-item>\n `\n )}\n </div>\n `\n : html`\n <div no-notifications @click=${e => window.history.back()}>\n <mwc-icon>notifications_off</mwc-icon>${i18next.t('text.no notification available')}\n </div>\n `\n }\n\n onClose(notification) {\n const { id } = notification\n\n store.dispatch((async dispatch => {\n if (notification) {\n await notificationStore.delete(id)\n }\n\n const history = await notificationStore.getAll()\n\n dispatch({\n type: UPDATE_NOTIFICATION,\n history: [...history]\n })\n }) as any)\n }\n\n onclearall() {\n store.dispatch((async dispatch => {\n await notificationStore.clear()\n const history = await notificationStore.getAll()\n\n dispatch({\n type: UPDATE_NOTIFICATION,\n history: [...history]\n })\n }) as any)\n }\n\n stateChanged(state) {\n this.history = state.notification.history\n }\n\n async disconnectedCallback() {\n super.disconnectedCallback()\n\n await Promise.all(\n this.history\n .filter(notification => !notification.confirmed)\n .map(async notification => {\n return await notificationStore.put({\n ...notification,\n confirmed: true\n })\n })\n )\n\n store.dispatch((async dispatch => {\n const history = await notificationStore.getAll()\n\n dispatch({\n type: UPDATE_NOTIFICATION,\n history: [...history]\n })\n }) as any)\n }\n}\n"]}
1
+ {"version":3,"file":"notification-list.js","sourceRoot":"","sources":["../../client/viewparts/notification-list.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAChD,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAG1D,IAAM,gB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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6DF;CACF,AA/DY,CA+DZ;AAE0B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;;iDAAoB;AAlEnC,gBAAgB;IAD5B,aAAa,CAAC,mBAAmB,CAAC;GACtB,gBAAgB,CA8J5B","sourcesContent":["import '@material/web/icon/icon.js'\nimport '@material/web/button/elevated-button.js'\nimport './notification-item'\n\nimport { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { connect } from 'pwa-helpers'\nimport { store, notificationStore } from '@operato/shell'\nimport { i18next, localize } from '@operato/i18n'\nimport { UPDATE_NOTIFICATION } from '../actions/notification-fcm'\n\n@customElement('notification-list')\nexport class NotificationList extends connect(store)(localize(i18next)(LitElement)) {\n static styles = [\n css`\n :host {\n display: block;\n background-color: var(--md-sys-color-surface);\n box-shadow: var(--box-shadow);\n margin-right: var(--spacing-large);\n padding: var(--spacing-medium);\n max-height: 100%;\n overflow-x: hidden;\n overflow-y: auto;\n }\n :host::before {\n content: '';\n width: 0px;\n height: 0px;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 7px solid var(--md-sys-color-on-primary);\n position: absolute;\n margin-top: -7px;\n right: 50px;\n }\n\n [notifications-wrap] {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n }\n [notifications-wrap] div {\n align-items: stretch;\n border-bottom: 1px solid var(--md-sys-color-primary);\n }\n [notifications-wrap] strong {\n color: var(--md-sys-color-primary);\n text-transform: capitalize;\n line-height: 2;\n }\n [notifications-wrap] md-elevated-button {\n --md-elevated-button-container-height: 24px;\n float: right;\n padding-inline-start: 6px;\n padding-inline-end: 12px;\n }\n [no-notifications] {\n margin: 0;\n padding: var(--spacing-large);\n text-align: center;\n font-size: var(--fontsize-default);\n font-weight: bold;\n color: var(--md-sys-color-secondary);\n }\n div md-icon {\n display: block;\n opacity: 0.3;\n }\n @media screen and (max-width: 480px) {\n :host {\n height: 100%;\n width: 100vw;\n }\n }\n `\n ]\n\n @property({ type: Array }) history: any[] = []\n\n render() {\n var history = this.history.reverse()\n\n return history.length > 0\n ? html`\n <div notifications-wrap>\n <div>\n <strong>${i18next.t('label.notification list')}</strong>\n <md-elevated-button outlined dense @click=${e => this.onclearall()}\n ><md-icon slot=\"icon\">delete_outline</md-icon>${String(\n i18next.t('label.clear all')\n )}</md-elevated-button\n >\n </div>\n ${history.map(\n notification => html`\n <notification-item\n @close=${e => {\n this.onClose(notification)\n }}\n .type=${notification.type}\n .notification=${notification}\n ></notification-item>\n `\n )}\n </div>\n `\n : html`\n <div no-notifications @click=${e => window.history.back()}>\n <md-icon>notifications_off</md-icon>${i18next.t('text.no notification available')}\n </div>\n `\n }\n\n onClose(notification) {\n const { id } = notification\n\n store.dispatch((async dispatch => {\n if (notification) {\n await notificationStore.delete(id)\n }\n\n const history = await notificationStore.getAll()\n\n dispatch({\n type: UPDATE_NOTIFICATION,\n history: [...history]\n })\n }) as any)\n }\n\n onclearall() {\n store.dispatch((async dispatch => {\n await notificationStore.clear()\n const history = await notificationStore.getAll()\n\n dispatch({\n type: UPDATE_NOTIFICATION,\n history: [...history]\n })\n }) as any)\n }\n\n stateChanged(state) {\n this.history = state.notification.history\n }\n\n async disconnectedCallback() {\n super.disconnectedCallback()\n\n await Promise.all(\n this.history\n .filter(notification => !notification.confirmed)\n .map(async notification => {\n return await notificationStore.put({\n ...notification,\n confirmed: true\n })\n })\n )\n\n store.dispatch((async dispatch => {\n const history = await notificationStore.getAll()\n\n dispatch({\n type: UPDATE_NOTIFICATION,\n history: [...history]\n })\n }) as any)\n }\n}\n"]}
@@ -1,6 +1,6 @@
1
- import '@material/mwc-formfield';
2
- import '@material/mwc-button';
3
- import '@material/mwc-checkbox';
1
+ import '@material/web/button/elevated-button.js';
2
+ import '@material/web/checkbox/checkbox.js';
3
+ import '@material/web/textfield/filled-text-field.js';
4
4
  import '@operato/i18n/ox-i18n.js';
5
5
  import { LitElement } from 'lit';
6
6
  declare const NotificationSender_base: (new (...args: any[]) => LitElement) & typeof LitElement;
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
- import '@material/mwc-formfield';
3
- import '@material/mwc-button';
4
- import '@material/mwc-checkbox';
2
+ import '@material/web/button/elevated-button.js';
3
+ import '@material/web/checkbox/checkbox.js';
4
+ import '@material/web/textfield/filled-text-field.js';
5
5
  import '@operato/i18n/ox-i18n.js';
6
6
  import { css, html, LitElement } from 'lit';
7
7
  import { customElement } from 'lit/decorators.js';
8
- import { auth } from '@things-factory/auth-base/dist-client';
8
+ import { auth } from '@things-factory/auth-base/dist-client/auth.js';
9
9
  import { i18next, localize } from '@operato/i18n';
10
10
  import { ScrollbarStyles } from '@operato/styles';
11
11
  import { notify as webpushNotify } from '../actions/notification-fcm';
@@ -15,43 +15,45 @@ let NotificationSender = class NotificationSender extends localize(i18next)(LitE
15
15
  return html `
16
16
  <form>
17
17
  <div content>
18
- <mwc-textfield
18
+ <md-filled-text-field
19
19
  type="text"
20
20
  name="receivers"
21
- .label=${i18next.t('field.receivers')}
21
+ label=${String(i18next.t('field.receivers'))}
22
22
  placeholder=${(_a = auth.credential) === null || _a === void 0 ? void 0 : _a.email}
23
23
  required
24
- icon="account_circle"
25
- ></mwc-textfield>
26
- <mwc-textfield
27
- type="text"
28
- name="title"
29
- .label=${i18next.t('field.title')}
30
- required
31
- icon="notifications_none"
32
- ></mwc-textfield>
24
+ ><md-icon slot="leading-icon">account_circle</md-icon></md-filled-text-field
25
+ >
26
+ <md-filled-text-field type="text" name="title" label=${String(i18next.t('field.title'))} required
27
+ ><md-icon slot="leading-icon">notifications_none</md-icon></md-filled-text-field
28
+ >
33
29
 
34
- <mwc-textfield
35
- type="text"
36
- name="image"
37
- .label=${i18next.t('field.image')}
38
- icon="insert_photo"
39
- ></mwc-textfield>
40
- <mwc-textfield type="text" name="url" .label=${i18next.t('field.url')} icon="link"></mwc-textfield>
41
- <mwc-textarea type="text" name="body" .label=${i18next.t('field.body')} required rows="5"></mwc-textarea>
42
- <mwc-formfield label="In-App Message">
43
- <mwc-checkbox name="inappmsg"></mwc-checkbox>
44
- </mwc-formfield>
30
+ <md-filled-text-field type="text" name="image" label=${String(i18next.t('field.image'))}
31
+ ><md-icon slot="leading-icon">insert_photo</md-icon></md-filled-text-field
32
+ >
33
+ <md-filled-text-field type="text" name="url" label=${String(i18next.t('field.url'))}
34
+ ><md-icon slot="leading-icon">link</md-icon></md-filled-text-field
35
+ >
36
+ <md-filled-text-field
37
+ type="textarea"
38
+ name="body"
39
+ label=${String(i18next.t('field.body'))}
40
+ required
41
+ rows="5"
42
+ ></md-filled-text-field>
43
+ <label>
44
+ <md-checkbox name="inappmsg"></md-checkbox>
45
+ In-App Message
46
+ </label>
45
47
  </div>
46
48
 
47
49
  <div buttons>
48
- <mwc-button raised icon="send" @click=${e => this.ontest()}>
50
+ <md-elevated-button raised icon="send" @click=${e => this.ontest()}>
49
51
  <ox-i18n msgid="button.notification-send"> </ox-i18n>
50
- </mwc-button>
52
+ </md-elevated-button>
51
53
 
52
- <mwc-button type="reset" outlined @click=${e => this.onReset()}>
54
+ <md-elevated-button type="reset" outlined @click=${e => this.onReset()}>
53
55
  <ox-i18n msgid="button.reset"> </ox-i18n>
54
- </mwc-button>
56
+ </md-elevated-button>
55
57
  </div>
56
58
  </form>
57
59
  `;
@@ -79,8 +81,9 @@ NotificationSender.styles = [
79
81
  css `
80
82
  :host {
81
83
  display: flex;
82
- background-color: var(--main-section-background-color);
83
- padding: var(--padding-wide);
84
+ padding: var(--spacing-large);
85
+ background-color: var(--md-sys-color-background);
86
+ color: var(--md-sys-color-on-background);
84
87
  }
85
88
 
86
89
  form {
@@ -88,8 +91,9 @@ NotificationSender.styles = [
88
91
  display: flex;
89
92
  flex-direction: column;
90
93
  }
94
+
91
95
  [content] > * {
92
- margin: var(--margin-default);
96
+ margin: var(--spacing-medium);
93
97
  }
94
98
 
95
99
  [content] {
@@ -104,13 +108,24 @@ NotificationSender.styles = [
104
108
  display: flex;
105
109
  flex-direction: row-reverse;
106
110
  }
107
- mwc-button {
108
- margin-left: var(--padding-default);
111
+
112
+ [name='body'] {
113
+ resize: vertical;
114
+ }
115
+
116
+ md-elevated-button {
117
+ margin-left: var(--spacing-medium);
118
+ }
119
+
120
+ label {
121
+ display: flex;
122
+ gap: var(--spacing-medium);
123
+ align-items: center;
109
124
  }
110
125
 
111
126
  @media screen and (max-width: 480px) {
112
127
  :host {
113
- padding: var(--padding-default);
128
+ padding: var(--spacing-medium);
114
129
  }
115
130
  }
116
131
  `
@@ -1 +1 @@
1
- {"version":3,"file":"notification-sender.js","sourceRoot":"","sources":["../../client/viewparts/notification-sender.ts"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAChC,OAAO,sBAAsB,CAAA;AAC7B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAY,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAA;AAC5D,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAG9D,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IA2CnE,MAAM;;QACJ,OAAO,IAAI,CAAA;;;;;;qBAMM,OAAO,CAAC,CAAC,CAAC,iBAAiB,CAAC;0BACvB,MAAA,IAAI,CAAC,UAAU,0CAAE,KAAK;;;;;;;qBAO3B,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;;;;;;;qBAQxB,OAAO,CAAC,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;;;;;;;;;;;;;KAqCF;CACF,CAAA;AAzCU,kBAAkB;IAD9B,aAAa,CAAC,qBAAqB,CAAC;GACxB,kBAAkB,CA+G9B;SA/GY,kBAAkB","sourcesContent":["import '@material/mwc-formfield'\nimport '@material/mwc-button'\nimport '@material/mwc-checkbox'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { auth } from '@things-factory/auth-base/dist-client'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { notify as webpushNotify } from '../actions/notification-fcm'\n\n@customElement('notification-sender')\nexport class NotificationSender extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n background-color: var(--main-section-background-color);\n padding: var(--padding-wide);\n }\n\n form {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n [content] > * {\n margin: var(--margin-default);\n }\n\n [content] {\n flex: 1;\n flex-direction: column;\n display: flex;\n overflow: auto;\n }\n\n [buttons] {\n margin-top: auto;\n display: flex;\n flex-direction: row-reverse;\n }\n mwc-button {\n margin-left: var(--padding-default);\n }\n\n @media screen and (max-width: 480px) {\n :host {\n padding: var(--padding-default);\n }\n }\n `\n ]\n\n render() {\n return html`\n <form>\n <div content>\n <mwc-textfield\n type=\"text\"\n name=\"receivers\"\n .label=${i18next.t('field.receivers')}\n placeholder=${auth.credential?.email}\n required\n icon=\"account_circle\"\n ></mwc-textfield>\n <mwc-textfield\n type=\"text\"\n name=\"title\"\n .label=${i18next.t('field.title')}\n required\n icon=\"notifications_none\"\n ></mwc-textfield>\n\n <mwc-textfield\n type=\"text\"\n name=\"image\"\n .label=${i18next.t('field.image')}\n icon=\"insert_photo\"\n ></mwc-textfield>\n <mwc-textfield type=\"text\" name=\"url\" .label=${i18next.t('field.url')} icon=\"link\"></mwc-textfield>\n <mwc-textarea type=\"text\" name=\"body\" .label=${i18next.t('field.body')} required rows=\"5\"></mwc-textarea>\n <mwc-formfield label=\"In-App Message\">\n <mwc-checkbox name=\"inappmsg\"></mwc-checkbox>\n </mwc-formfield>\n </div>\n\n <div buttons>\n <mwc-button raised icon=\"send\" @click=${e => this.ontest()}>\n <ox-i18n msgid=\"button.notification-send\"> </ox-i18n>\n </mwc-button>\n\n <mwc-button type=\"reset\" outlined @click=${e => this.onReset()}>\n <ox-i18n msgid=\"button.reset\"> </ox-i18n>\n </mwc-button>\n </div>\n </form>\n `\n }\n\n ontest() {\n const [receivers, title, body, image, url] = ['receivers', 'title', 'body', 'image', 'url'].map(\n key => (this.renderRoot.querySelector(`[name=\"${key}\"]`)! as any).value\n )\n const mode = (this.renderRoot.querySelector(`[name=\"inappmsg\"]`)! as any).checked ? 'inapp' : 'background'\n\n webpushNotify({\n receivers,\n title,\n body,\n image,\n mode,\n url\n })\n }\n\n onReset() {\n ;['receivers', 'title', 'body', 'image', 'url'].map(\n key => ((this.renderRoot.querySelector(`[name=\"${key}\"]`)! as any).value = '')\n )\n ;(this.renderRoot.querySelector(`[name=\"inappmsg\"]`)! as any).checked = false\n }\n}\n"]}
1
+ {"version":3,"file":"notification-sender.js","sourceRoot":"","sources":["../../client/viewparts/notification-sender.ts"],"names":[],"mappings":";AAAA,OAAO,yCAAyC,CAAA;AAChD,OAAO,oCAAoC,CAAA;AAC3C,OAAO,8CAA8C,CAAA;AACrD,OAAO,0BAA0B,CAAA;AAEjC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,+CAA+C,CAAA;AAEpE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,6BAA6B,CAAA;AA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AC;QAAA,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,GAAG,CACjD,GAAG,CAAC,EAAE,CAAC,CAAE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,UAAU,GAAG,IAAI,CAAU,CAAC,KAAK,GAAG,EAAE,CAAC,CAC/E,CACA;QAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAU,CAAC,OAAO,GAAG,KAAK,CAAA;IAC/E,CAAC;;AA5HM,yBAAM,GAAG;IACd,eAAe;IACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkDF;CACF,AArDY,CAqDZ;AAtDU,kBAAkB;IAD9B,aAAa,CAAC,qBAAqB,CAAC;GACxB,kBAAkB,CA8H9B","sourcesContent":["import '@material/web/button/elevated-button.js'\nimport '@material/web/checkbox/checkbox.js'\nimport '@material/web/textfield/filled-text-field.js'\nimport '@operato/i18n/ox-i18n.js'\n\nimport { css, html, LitElement } from 'lit'\nimport { customElement } from 'lit/decorators.js'\nimport { auth } from '@things-factory/auth-base/dist-client/auth.js'\n\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\nimport { notify as webpushNotify } from '../actions/notification-fcm'\n\n@customElement('notification-sender')\nexport class NotificationSender extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n padding: var(--spacing-large);\n background-color: var(--md-sys-color-background);\n color: var(--md-sys-color-on-background);\n }\n\n form {\n flex: 1;\n display: flex;\n flex-direction: column;\n }\n\n [content] > * {\n margin: var(--spacing-medium);\n }\n\n [content] {\n flex: 1;\n flex-direction: column;\n display: flex;\n overflow: auto;\n }\n\n [buttons] {\n margin-top: auto;\n display: flex;\n flex-direction: row-reverse;\n }\n\n [name='body'] {\n resize: vertical;\n }\n\n md-elevated-button {\n margin-left: var(--spacing-medium);\n }\n\n label {\n display: flex;\n gap: var(--spacing-medium);\n align-items: center;\n }\n\n @media screen and (max-width: 480px) {\n :host {\n padding: var(--spacing-medium);\n }\n }\n `\n ]\n\n render() {\n return html`\n <form>\n <div content>\n <md-filled-text-field\n type=\"text\"\n name=\"receivers\"\n label=${String(i18next.t('field.receivers'))}\n placeholder=${auth.credential?.email}\n required\n ><md-icon slot=\"leading-icon\">account_circle</md-icon></md-filled-text-field\n >\n <md-filled-text-field type=\"text\" name=\"title\" label=${String(i18next.t('field.title'))} required\n ><md-icon slot=\"leading-icon\">notifications_none</md-icon></md-filled-text-field\n >\n\n <md-filled-text-field type=\"text\" name=\"image\" label=${String(i18next.t('field.image'))}\n ><md-icon slot=\"leading-icon\">insert_photo</md-icon></md-filled-text-field\n >\n <md-filled-text-field type=\"text\" name=\"url\" label=${String(i18next.t('field.url'))}\n ><md-icon slot=\"leading-icon\">link</md-icon></md-filled-text-field\n >\n <md-filled-text-field\n type=\"textarea\"\n name=\"body\"\n label=${String(i18next.t('field.body'))}\n required\n rows=\"5\"\n ></md-filled-text-field>\n <label>\n <md-checkbox name=\"inappmsg\"></md-checkbox>\n In-App Message\n </label>\n </div>\n\n <div buttons>\n <md-elevated-button raised icon=\"send\" @click=${e => this.ontest()}>\n <ox-i18n msgid=\"button.notification-send\"> </ox-i18n>\n </md-elevated-button>\n\n <md-elevated-button type=\"reset\" outlined @click=${e => this.onReset()}>\n <ox-i18n msgid=\"button.reset\"> </ox-i18n>\n </md-elevated-button>\n </div>\n </form>\n `\n }\n\n ontest() {\n const [receivers, title, body, image, url] = ['receivers', 'title', 'body', 'image', 'url'].map(\n key => (this.renderRoot.querySelector(`[name=\"${key}\"]`)! as any).value\n )\n const mode = (this.renderRoot.querySelector(`[name=\"inappmsg\"]`)! as any).checked ? 'inapp' : 'background'\n\n webpushNotify({\n receivers,\n title,\n body,\n image,\n mode,\n url\n })\n }\n\n onReset() {\n ;['receivers', 'title', 'body', 'image', 'url'].map(\n key => ((this.renderRoot.querySelector(`[name=\"${key}\"]`)! as any).value = '')\n )\n ;(this.renderRoot.querySelector(`[name=\"inappmsg\"]`)! as any).checked = false\n }\n}\n"]}
@@ -1,9 +1,8 @@
1
+ import '@material/web/icon/icon.js';
2
+ import '@material/web/switch/switch.js';
3
+ import '@operato/i18n/ox-i18n.js';
1
4
  import '@things-factory/setting-base';
2
5
  import './notification-sender';
3
- import '@material/mwc-formfield';
4
- import '@material/mwc-switch';
5
- import '@material/mwc-button';
6
- import '@operato/i18n/ox-i18n.js';
7
6
  import { LitElement } from 'lit';
8
7
  declare const NotificationSettingLet_base: (new (...args: any[]) => LitElement) & typeof LitElement;
9
8
  export declare class NotificationSettingLet extends NotificationSettingLet_base {