@things-factory/notification 5.0.0-zeta.8 → 5.0.1
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 +8 -5
- package/client/viewparts/notification-setting-let.js +8 -8
- package/dist-server/service/notification/directive-notification.js +5 -2
- package/dist-server/service/notification/directive-notification.js.map +1 -1
- package/package.json +12 -11
- package/server/service/notification/directive-notification.ts +3 -2
package/client/bootstrap.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import gql from 'graphql-tag'
|
|
2
|
+
|
|
3
|
+
import { notify } from '@operato/layout'
|
|
3
4
|
import { auth } from '@things-factory/auth-base'
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
5
|
+
import { i18next } from '@things-factory/i18n-base'
|
|
6
|
+
import { notificationStore, route, store, subscribe as graphqlSubscribe } from '@things-factory/shell'
|
|
7
|
+
|
|
8
|
+
import { subscribe, unsubscribe, UPDATE_NOTIFICATION } from './actions/notification-fcm'
|
|
6
9
|
import notification from './reducers/notification'
|
|
7
10
|
|
|
8
11
|
export default async function bootstrap() {
|
|
@@ -44,7 +47,7 @@ export default async function bootstrap() {
|
|
|
44
47
|
/*
|
|
45
48
|
* subscription graphql notifications
|
|
46
49
|
*/
|
|
47
|
-
var query = `
|
|
50
|
+
var query = gql`
|
|
48
51
|
subscription notification($subjects: [String!]) {
|
|
49
52
|
notification(subjects: $subjects) {
|
|
50
53
|
subject
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit'
|
|
2
|
-
import Clipboard from 'clipboard'
|
|
3
|
-
|
|
4
|
-
import { notify } from '@things-factory/layout-base'
|
|
5
|
-
import { i18next, localize } from '@things-factory/i18n-base'
|
|
6
1
|
import '@things-factory/setting-base'
|
|
7
|
-
import { openPopup } from '@things-factory/layout-base'
|
|
8
|
-
import { subscribe, unsubscribe, getToken, isSupportingMessaging } from '../actions/notification-fcm'
|
|
9
2
|
import './notification-sender'
|
|
10
|
-
|
|
11
3
|
import '@material/mwc-formfield'
|
|
12
4
|
import '@material/mwc-switch'
|
|
13
5
|
import '@material/mwc-button'
|
|
14
6
|
|
|
7
|
+
import Clipboard from 'clipboard'
|
|
8
|
+
import { css, html, LitElement } from 'lit'
|
|
9
|
+
|
|
10
|
+
import { notify, openPopup } from '@operato/layout'
|
|
11
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
12
|
+
|
|
13
|
+
import { getToken, isSupportingMessaging, subscribe, unsubscribe } from '../actions/notification-fcm'
|
|
14
|
+
|
|
15
15
|
export class NotificationSettingLet extends localize(i18next)(LitElement) {
|
|
16
16
|
static get styles() {
|
|
17
17
|
return [
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.directiveNotification = exports.notificationDirectiveTypeDefs = void 0;
|
|
4
|
-
const graphql_tag_1 = require("graphql-tag");
|
|
5
7
|
const graphql_1 = require("graphql");
|
|
8
|
+
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
6
9
|
const utils_1 = require("@graphql-tools/utils");
|
|
7
10
|
const debug = require('debug')('things-factory:notification:directive-notification');
|
|
8
11
|
const DIRECTIVE = 'notification';
|
|
9
|
-
exports.notificationDirectiveTypeDefs = (0, graphql_tag_1.
|
|
12
|
+
exports.notificationDirectiveTypeDefs = (0, graphql_tag_1.default) `
|
|
10
13
|
directive @notification(
|
|
11
14
|
receivers: String
|
|
12
15
|
topic: String
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"directive-notification.js","sourceRoot":"","sources":["../../../server/service/notification/directive-notification.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"directive-notification.js","sour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E,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;gBAE9C,IAAI,CAAC,MAAM,EAAE;oBACX,KAAK,CAAC,gBAAgB,CAAC,CAAA;iBACxB;qBAAM;oBACL,IAAI;wBACF,MAAM,MAAM,CAAC;4BACX,SAAS,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;4BACpB,qBAAqB;4BACrB,SAAS,EAAE,IAAI,IAAI,EAAE;yBACtB,CAAC,CAAA;qBACH;oBAAC,OAAO,GAAG,EAAE;wBACZ,KAAK,CAAC,GAAG,CAAC,CAAA;qBACX;iBACF;gBAED,OAAO,MAAM,CAAA;YACf,CAAC,CAAA;YAED,OAAO,WAAW,CAAA;SACnB;IACH,CAAC;CACF,CAAC,CAAA;AAhDS,QAAA,qBAAqB,yBAgD9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/notification",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,17 +24,18 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@material/mwc-button": "^0.
|
|
28
|
-
"@material/mwc-formfield": "^0.
|
|
29
|
-
"@material/mwc-switch": "^0.
|
|
30
|
-
"@
|
|
31
|
-
"@things-factory/
|
|
32
|
-
"@things-factory/
|
|
33
|
-
"@things-factory/setting-base": "^5.0.
|
|
34
|
-
"@things-factory/shell": "^5.0.
|
|
27
|
+
"@material/mwc-button": "^0.26.1",
|
|
28
|
+
"@material/mwc-formfield": "^0.26.1",
|
|
29
|
+
"@material/mwc-switch": "^0.26.1",
|
|
30
|
+
"@operato/layout": "^1.0.1",
|
|
31
|
+
"@things-factory/auth-base": "^5.0.1",
|
|
32
|
+
"@things-factory/i18n-base": "^5.0.1",
|
|
33
|
+
"@things-factory/setting-base": "^5.0.1",
|
|
34
|
+
"@things-factory/shell": "^5.0.1",
|
|
35
35
|
"clipboard": "^2.0.6",
|
|
36
36
|
"firebase": "^8.0.1",
|
|
37
|
-
"firebase-admin": "^9.4.1"
|
|
37
|
+
"firebase-admin": "^9.4.1",
|
|
38
|
+
"graphql-tag": "^2.12.6"
|
|
38
39
|
},
|
|
39
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "47225f76058999bb8bb075ac960cfb24f058093f"
|
|
40
41
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { gql } from 'graphql-tag'
|
|
2
1
|
import { defaultFieldResolver, GraphQLSchema } from 'graphql'
|
|
3
|
-
import
|
|
2
|
+
import gql from 'graphql-tag'
|
|
3
|
+
|
|
4
|
+
import { getDirective, MapperKind, mapSchema } from '@graphql-tools/utils'
|
|
4
5
|
|
|
5
6
|
const debug = require('debug')('things-factory:notification:directive-notification')
|
|
6
7
|
|