@things-factory/notification 6.1.17 → 6.1.22
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/client/{bootstrap.js → bootstrap.ts} +13 -9
- package/client/pages/notification/notification-list-page.ts +267 -0
- package/client/pages/notification-rule/notification-rule-importer.ts +93 -0
- package/client/pages/notification-rule/notification-rule-list-page.ts +395 -0
- package/client/route.ts +10 -0
- package/client/tsconfig.json +13 -0
- package/client/viewparts/notification-badge.ts +58 -0
- package/client/viewparts/notification-item.ts +242 -0
- package/client/viewparts/notification-list.ts +171 -0
- package/client/viewparts/notification-sender.ts +126 -0
- package/client/viewparts/{notification-setting-let.js → notification-setting-let.ts} +48 -52
- package/dist-client/actions/notification-fcm.d.ts +7 -0
- package/dist-client/actions/notification-fcm.js +125 -0
- package/dist-client/actions/notification-fcm.js.map +1 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +112 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/index.d.ts +5 -0
- package/dist-client/index.js +6 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/notification/notification-list-page.d.ts +49 -0
- package/dist-client/pages/notification/notification-list-page.js +262 -0
- package/dist-client/pages/notification/notification-list-page.js.map +1 -0
- package/dist-client/pages/notification-rule/notification-rule-importer.d.ts +22 -0
- package/dist-client/pages/notification-rule/notification-rule-importer.js +100 -0
- package/dist-client/pages/notification-rule/notification-rule-importer.js.map +1 -0
- package/dist-client/pages/notification-rule/notification-rule-list-page.d.ts +62 -0
- package/dist-client/pages/notification-rule/notification-rule-list-page.js +380 -0
- package/dist-client/pages/notification-rule/notification-rule-list-page.js.map +1 -0
- package/dist-client/reducers/notification.d.ts +8 -0
- package/dist-client/reducers/notification.js +22 -0
- package/dist-client/reducers/notification.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +11 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/viewparts/notification-badge.d.ts +15 -0
- package/dist-client/viewparts/notification-badge.js +61 -0
- package/dist-client/viewparts/notification-badge.js.map +1 -0
- package/dist-client/viewparts/notification-item.d.ts +16 -0
- package/dist-client/viewparts/notification-item.js +249 -0
- package/dist-client/viewparts/notification-item.js.map +1 -0
- package/dist-client/viewparts/notification-list.d.ts +20 -0
- package/dist-client/viewparts/notification-list.js +160 -0
- package/dist-client/viewparts/notification-list.js.map +1 -0
- package/dist-client/viewparts/notification-sender.d.ts +13 -0
- package/dist-client/viewparts/notification-sender.js +122 -0
- package/dist-client/viewparts/notification-sender.js.map +1 -0
- package/dist-client/viewparts/notification-setting-let.d.ts +20 -0
- package/dist-client/viewparts/notification-setting-let.js +193 -0
- package/dist-client/viewparts/notification-setting-let.js.map +1 -0
- package/dist-server/service/index.js +10 -1
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/notification/index.js +6 -3
- package/dist-server/service/notification/index.js.map +1 -1
- package/dist-server/service/notification/notification-mutation.js +110 -0
- package/dist-server/service/notification/notification-mutation.js.map +1 -0
- package/dist-server/service/notification/notification-query.js +109 -0
- package/dist-server/service/notification/notification-query.js.map +1 -0
- package/dist-server/service/notification/notification-subscription.js +45 -0
- package/dist-server/service/notification/notification-subscription.js.map +1 -0
- package/dist-server/service/notification/notification-type.js +82 -0
- package/dist-server/service/notification/notification-type.js.map +1 -0
- package/dist-server/service/notification/notification.js +81 -8
- package/dist-server/service/notification/notification.js.map +1 -1
- package/dist-server/service/notification-rule/event-subscriber.js +21 -0
- package/dist-server/service/notification-rule/event-subscriber.js.map +1 -0
- package/dist-server/service/notification-rule/index.js +12 -0
- package/dist-server/service/notification-rule/index.js.map +1 -0
- package/dist-server/service/notification-rule/notification-rule-history.js +146 -0
- package/dist-server/service/notification-rule/notification-rule-history.js.map +1 -0
- package/dist-server/service/notification-rule/notification-rule-mutation.js +170 -0
- package/dist-server/service/notification-rule/notification-rule-mutation.js.map +1 -0
- package/dist-server/service/notification-rule/notification-rule-query.js +97 -0
- package/dist-server/service/notification-rule/notification-rule-query.js.map +1 -0
- package/dist-server/service/notification-rule/notification-rule-type.js +102 -0
- package/dist-server/service/notification-rule/notification-rule-type.js.map +1 -0
- package/dist-server/service/notification-rule/notification-rule.js +146 -0
- package/dist-server/service/notification-rule/notification-rule.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/notification/noti-box.md +160 -0
- package/helps/notification/noti-rule.md +160 -0
- package/helps/notification/notibox.md +160 -0
- package/package.json +15 -12
- package/server/service/index.ts +14 -0
- package/server/service/notification/index.ts +6 -3
- package/server/service/notification/notification-mutation.ts +119 -0
- package/server/service/notification/notification-query.ts +70 -0
- package/server/service/notification/{notification-resolver.ts → notification-subscription.ts} +4 -4
- package/server/service/notification/notification-type.ts +55 -0
- package/server/service/notification/notification.ts +87 -14
- package/server/service/notification-rule/event-subscriber.ts +20 -0
- package/server/service/notification-rule/index.ts +9 -0
- package/server/service/notification-rule/notification-rule-history.ts +130 -0
- package/server/service/notification-rule/notification-rule-mutation.ts +203 -0
- package/server/service/notification-rule/notification-rule-query.ts +62 -0
- package/server/service/notification-rule/notification-rule-type.ts +71 -0
- package/server/service/notification-rule/notification-rule.ts +125 -0
- package/server/tsconfig.json +9 -0
- package/things-factory.config.js +7 -1
- package/client/viewparts/notification-badge.js +0 -63
- package/client/viewparts/notification-item.js +0 -250
- package/client/viewparts/notification-list.js +0 -177
- package/client/viewparts/notification-sender.js +0 -128
- package/tsconfig.json +0 -9
- /package/client/actions/{notification-fcm.js → notification-fcm.ts} +0 -0
- /package/client/{index.js → index.ts} +0 -0
- /package/client/reducers/{notification.js → notification.ts} +0 -0
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import '@material/mwc-formfield'
|
|
2
|
-
import '@material/mwc-button'
|
|
3
|
-
import '@material/mwc-checkbox'
|
|
4
|
-
import '@operato/i18n/ox-i18n.js'
|
|
5
|
-
|
|
6
|
-
import { css, html, LitElement } from 'lit'
|
|
7
|
-
|
|
8
|
-
import { auth } from '@things-factory/auth-base'
|
|
9
|
-
import { i18next, localize } from '@things-factory/i18n-base'
|
|
10
|
-
import { ScrollbarStyles } from '@things-factory/styles'
|
|
11
|
-
|
|
12
|
-
import { notify as webpushNotify } from '../actions/notification-fcm'
|
|
13
|
-
|
|
14
|
-
export class NotificationSender extends localize(i18next)(LitElement) {
|
|
15
|
-
static get styles() {
|
|
16
|
-
return [
|
|
17
|
-
ScrollbarStyles,
|
|
18
|
-
css`
|
|
19
|
-
:host {
|
|
20
|
-
display: flex;
|
|
21
|
-
background-color: var(--main-section-background-color);
|
|
22
|
-
padding: var(--padding-wide);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
form {
|
|
26
|
-
flex: 1;
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
}
|
|
30
|
-
[content] > * {
|
|
31
|
-
margin: var(--margin-default);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
[content] {
|
|
35
|
-
flex: 1;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
display: flex;
|
|
38
|
-
overflow: auto;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
[buttons] {
|
|
42
|
-
margin-top: auto;
|
|
43
|
-
display: flex;
|
|
44
|
-
flex-direction: row-reverse;
|
|
45
|
-
}
|
|
46
|
-
mwc-button {
|
|
47
|
-
margin-left: var(--padding-default);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
@media screen and (max-width: 480px) {
|
|
51
|
-
:host {
|
|
52
|
-
padding: var(--padding-default);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
`
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
static get properties() {
|
|
60
|
-
return {}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
render() {
|
|
64
|
-
return html`
|
|
65
|
-
<form>
|
|
66
|
-
<div content>
|
|
67
|
-
<mwc-textfield
|
|
68
|
-
type="text"
|
|
69
|
-
name="receivers"
|
|
70
|
-
label=${i18next.t('field.receivers')}
|
|
71
|
-
placeholder=${auth.credential?.email}
|
|
72
|
-
required
|
|
73
|
-
icon="account_circle"
|
|
74
|
-
></mwc-textfield>
|
|
75
|
-
<mwc-textfield
|
|
76
|
-
type="text"
|
|
77
|
-
name="title"
|
|
78
|
-
label=${i18next.t('field.title')}
|
|
79
|
-
required
|
|
80
|
-
icon="notifications_none"
|
|
81
|
-
></mwc-textfield>
|
|
82
|
-
|
|
83
|
-
<mwc-textfield type="text" name="image" label=${i18next.t('field.image')} icon="insert_photo"></mwc-textfield>
|
|
84
|
-
<mwc-textfield type="text" name="url" label=${i18next.t('field.url')} icon="link"></mwc-textfield>
|
|
85
|
-
<mwc-textarea type="text" name="body" label=${i18next.t('field.body')} required rows="5"></mwc-textarea>
|
|
86
|
-
<mwc-formfield label="In-App Message">
|
|
87
|
-
<mwc-checkbox name="inappmsg"></mwc-checkbox>
|
|
88
|
-
</mwc-formfield>
|
|
89
|
-
</div>
|
|
90
|
-
|
|
91
|
-
<div buttons>
|
|
92
|
-
<mwc-button raised icon="send" @click=${e => this.ontest()}>
|
|
93
|
-
<ox-i18n msgid="button.notification-send"> </ox-i18n>
|
|
94
|
-
</mwc-button>
|
|
95
|
-
|
|
96
|
-
<mwc-button type="reset" outlined @click=${e => this.onreset()}>
|
|
97
|
-
<ox-i18n msgid="button.reset"> </ox-i18n>
|
|
98
|
-
</mwc-button>
|
|
99
|
-
</div>
|
|
100
|
-
</form>
|
|
101
|
-
`
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
ontest() {
|
|
105
|
-
const [receivers, title, body, image, url] = ['receivers', 'title', 'body', 'image', 'url'].map(
|
|
106
|
-
key => this.renderRoot.querySelector(`[name="${key}"]`).value
|
|
107
|
-
)
|
|
108
|
-
const mode = this.renderRoot.querySelector(`[name="inappmsg"]`).checked ? 'inapp' : 'background'
|
|
109
|
-
|
|
110
|
-
webpushNotify({
|
|
111
|
-
receivers,
|
|
112
|
-
title,
|
|
113
|
-
body,
|
|
114
|
-
image,
|
|
115
|
-
mode,
|
|
116
|
-
url
|
|
117
|
-
})
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
onreset() {
|
|
121
|
-
;['receivers', 'title', 'body', 'image', 'url'].map(
|
|
122
|
-
key => (this.renderRoot.querySelector(`[name="${key}"]`).value = '')
|
|
123
|
-
)
|
|
124
|
-
this.renderRoot.querySelector(`[name="inappmsg"]`).checked = false
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
customElements.define('notification-sender', NotificationSender)
|
package/tsconfig.json
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|