flash-notifications 0.0.18 → 0.0.20
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/build/container/index.js +2 -2
- package/build/container/index.js.map +1 -1
- package/build/listener.d.ts +8 -0
- package/build/listener.d.ts.map +1 -0
- package/build/listener.js +45 -0
- package/build/listener.js.map +1 -0
- package/package.json +4 -3
- package/src/container/index.jsx +2 -2
- package/src/listener.js +56 -0
package/build/container/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { digg } from "diggerize";
|
|
|
3
3
|
import React, { memo, useEffect, useMemo } from "react";
|
|
4
4
|
import { StyleSheet, View } from "react-native";
|
|
5
5
|
import { shapeComponent, ShapeComponent } from "set-state-compare/src/shape-component";
|
|
6
|
-
import
|
|
6
|
+
import useEnvSense from "env-sense/src/use-environment.js";
|
|
7
7
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
8
8
|
import useStyles from "@kaspernj/api-maker/build/use-styles.js";
|
|
9
9
|
import events from "../events";
|
|
@@ -37,7 +37,7 @@ export default memo(shapeComponent(class FlashNotificationsContainer extends Sha
|
|
|
37
37
|
}, []);
|
|
38
38
|
}
|
|
39
39
|
render() {
|
|
40
|
-
const { isNative } =
|
|
40
|
+
const { isNative } = useEnvSense();
|
|
41
41
|
const insets = useSafeAreaInsets();
|
|
42
42
|
const viewStyleFromStyles = useStyles(styles, "view");
|
|
43
43
|
const viewStyle = useMemo(() => [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/container/index.jsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,6CAA6C,CAAA;AACzE,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,KAAK,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAA;AACrD,OAAO,EAAC,UAAU,EAAE,IAAI,EAAC,MAAM,cAAc,CAA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B,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAA;QAC9B,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,CAAA;QAEtE,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAE9B,MAAM,YAAY,GAAG;YACnB,KAAK;YACL,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC;YAChC,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC;YAC5B,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;SAC3B,CAAA;QAED,IAAI,CAAC,QAAQ,CAAC,EAAC,KAAK,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC,EAAC,CAAC,CAAA;IACpF,CAAC,CAAA;IAED,gBAAgB,GAAG,CAAC,YAAY,EAAE,EAAE,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAA;IAEzF,kBAAkB,GAAG,CAAC,KAAK,EAAE,EAAE;QAC7B,IAAI,CAAC,QAAQ,CAAC;YACZ,aAAa,EAAE,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,IAAI,KAAK,CAAC;SAC1F,CAAC,CAAA;IACJ,CAAC,CAAA;CACF,CAAC,CAAC,CAAA","sourcesContent":["import useEventEmitter from \"@kaspernj/api-maker/build/use-event-emitter\"\nimport {digg} from \"diggerize\"\nimport React, {memo, useEffect, useMemo} from \"react\"\nimport {StyleSheet, View} from \"react-native\"\nimport {shapeComponent, ShapeComponent} from \"set-state-compare/src/shape-component\"\nimport useEnvSense from \"env-sense/src/use-environment.js\"\nimport {useSafeAreaInsets} from \"react-native-safe-area-context\"\nimport useStyles from \"@kaspernj/api-maker/build/use-styles.js\"\n\nimport events from \"../events\"\nimport Notification from \"./notification\"\n\nconst styles = StyleSheet.create({\n view: {\n zIndex: 99999\n },\n viewSmDown: {\n right: 20,\n left: 20\n },\n viewMdUp: {\n right: 20\n }\n})\n\nexport default memo(shapeComponent(class FlashNotificationsContainer extends ShapeComponent {\n timeouts = []\n\n setup() {\n this.useStates({\n count: 0,\n notifications: []\n })\n\n useEventEmitter(events, \"pushNotification\", this.tt.onPushNotification)\n useEffect(() => {\n return () => {\n for (const timeout of this.tt.timeouts) {\n clearTimeout(timeout)\n }\n }\n }, [])\n }\n\n render() {\n const {isNative} = useEnvSense()\n const insets = useSafeAreaInsets()\n const viewStyleFromStyles = useStyles(styles, \"view\")\n const viewStyle = useMemo(() => [\n viewStyleFromStyles,\n {\n position: isNative ? \"absolute\" : \"fixed\",\n top: insets.top + 20\n }\n ], [insets.top])\n\n return (\n <View\n dataSet={this.rootViewDataSet ||= {component: \"flash-notifications-container\"}}\n style={viewStyle}\n testID=\"flash-notificaitons/container\"\n >\n {this.s.notifications.map((notification) =>\n <Notification\n count={notification.count}\n key={`notification-${notification.count}`}\n message={notification.message}\n notification={notification}\n onRemovedClicked={this.tt.onRemovedClicked}\n title={notification.title}\n type={notification.type}\n />\n )}\n </View>\n )\n }\n\n onPushNotification = (detail) => {\n const count = this.s.count + 1\n const timeout = setTimeout(() => this.removeNotification(count), 4000)\n\n this.tt.timeouts.push(timeout)\n\n const notification = {\n count,\n message: digg(detail, \"message\"),\n title: digg(detail, \"title\"),\n type: digg(detail, \"type\")\n }\n\n this.setState({count, notifications: this.s.notifications.concat([notification])})\n }\n\n onRemovedClicked = (notification) => this.removeNotification(digg(notification, \"count\"))\n\n removeNotification = (count) => {\n this.setState({\n notifications: this.s.notifications.filter((notification) => notification.count != count)\n })\n }\n}))\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"listener.d.ts","sourceRoot":"","sources":["../src/listener.js"],"names":[],"mappings":"AAEA;IAGE,sBAQC;IAVD,qBAAkB;IAYlB,2BAEC;IAED,+BA+BC;IAED,gDAEC;CACF"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import events from "./events.js";
|
|
2
|
+
export default class FlashNotificationsListener {
|
|
3
|
+
notifications = [];
|
|
4
|
+
static current() {
|
|
5
|
+
if (!globalThis.flashNotificationsListener) {
|
|
6
|
+
globalThis.flashNotificationsListener = new FlashNotificationsListener();
|
|
7
|
+
globalThis.flashNotificationsListener.connect(events);
|
|
8
|
+
}
|
|
9
|
+
return globalThis.flashNotificationsListener;
|
|
10
|
+
}
|
|
11
|
+
connect(events) {
|
|
12
|
+
events.addListener("pushNotification", this.onPushNotification);
|
|
13
|
+
}
|
|
14
|
+
findAndPop(argument) {
|
|
15
|
+
for (const notificationIndex in this.notifications) {
|
|
16
|
+
const notification = this.notifications[notificationIndex];
|
|
17
|
+
let result;
|
|
18
|
+
if (typeof argument == "function") {
|
|
19
|
+
result = argument(notification);
|
|
20
|
+
}
|
|
21
|
+
else if (typeof argument == "object") {
|
|
22
|
+
let allEqual = true;
|
|
23
|
+
for (const key in argument) {
|
|
24
|
+
const value = argument[key];
|
|
25
|
+
if (value !== notification[key]) {
|
|
26
|
+
allEqual = false;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
result = allEqual;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
throw new Error(`Unknown type of argument: ${typeof argument}`);
|
|
33
|
+
}
|
|
34
|
+
if (result) {
|
|
35
|
+
delete this.notifications[notificationIndex];
|
|
36
|
+
return notification;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
throw new Error(`Couldn't find the expected notification in: ${JSON.stringify(this.notifications)}`);
|
|
40
|
+
}
|
|
41
|
+
onPushNotification = (notification) => {
|
|
42
|
+
this.notifications.push(notification);
|
|
43
|
+
};
|
|
44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,MAAM,GAAG,QAAQ,CAAA;YACnB,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,6BAA6B,OAAO,QAAQ,EAAE,CAAC,CAAA;YACjE,CAAC;YAED,IAAI,MAAM,EAAE,CAAC;gBACX,OAAO,IAAI,CAAC,aAAa,CAAC,iBAAiB,CAAC,CAAA;gBAE5C,OAAO,YAAY,CAAA;YACrB,CAAC;QACH,CAAC;QAED,MAAM,IAAI,KAAK,CAAC,+CAA+C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;IACtG,CAAC;IAED,kBAAkB,GAAG,CAAC,YAAY,EAAE,EAAE;QACpC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAA;IACvC,CAAC,CAAA;CACF","sourcesContent":["import events from \"./events.js\"\n\nexport default class FlashNotificationsListener {\n notifications = []\n\n static current() {\n if (!globalThis.flashNotificationsListener) {\n globalThis.flashNotificationsListener = new FlashNotificationsListener()\n\n globalThis.flashNotificationsListener.connect(events)\n }\n\n return globalThis.flashNotificationsListener\n }\n\n connect(events) {\n events.addListener(\"pushNotification\", this.onPushNotification)\n }\n\n findAndPop(argument) {\n for (const notificationIndex in this.notifications) {\n const notification = this.notifications[notificationIndex]\n let result\n\n if (typeof argument == \"function\") {\n result = argument(notification)\n } else if (typeof argument == \"object\") {\n let allEqual = true\n\n for (const key in argument) {\n const value = argument[key]\n\n if (value !== notification[key]) {\n allEqual = false\n }\n }\n\n result = allEqual\n } else {\n throw new Error(`Unknown type of argument: ${typeof argument}`)\n }\n\n if (result) {\n delete this.notifications[notificationIndex]\n\n return notification\n }\n }\n\n throw new Error(`Couldn't find the expected notification in: ${JSON.stringify(this.notifications)}`)\n }\n\n onPushNotification = (notification) => {\n this.notifications.push(notification)\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flash-notifications",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.20",
|
|
4
4
|
"description": "My new module",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -41,19 +41,20 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"classnames": "^2.5.1",
|
|
43
43
|
"diggerize": "^1.0.9",
|
|
44
|
+
"env-sense": "^1.0.0",
|
|
44
45
|
"fetching-object": "^1.0.3",
|
|
45
46
|
"prop-types-exact": "*",
|
|
46
47
|
"set-state-compare": "^1.0.57"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@testing-library/react-native": "~13.0
|
|
50
|
+
"@testing-library/react-native": "~13.2.0",
|
|
50
51
|
"@types/react": "~18.3.12",
|
|
51
52
|
"expo": "~53.0.9",
|
|
52
53
|
"expo-module-scripts": "^4.0.2",
|
|
53
54
|
"react-native": "~0.76.9"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
|
-
"@kaspernj/api-maker": ">= 1.0.
|
|
57
|
+
"@kaspernj/api-maker": ">= 1.0.2044",
|
|
57
58
|
"expo": "*",
|
|
58
59
|
"react": "*",
|
|
59
60
|
"react-native": "*",
|
package/src/container/index.jsx
CHANGED
|
@@ -3,7 +3,7 @@ import {digg} from "diggerize"
|
|
|
3
3
|
import React, {memo, useEffect, useMemo} from "react"
|
|
4
4
|
import {StyleSheet, View} from "react-native"
|
|
5
5
|
import {shapeComponent, ShapeComponent} from "set-state-compare/src/shape-component"
|
|
6
|
-
import
|
|
6
|
+
import useEnvSense from "env-sense/src/use-environment.js"
|
|
7
7
|
import {useSafeAreaInsets} from "react-native-safe-area-context"
|
|
8
8
|
import useStyles from "@kaspernj/api-maker/build/use-styles.js"
|
|
9
9
|
|
|
@@ -43,7 +43,7 @@ export default memo(shapeComponent(class FlashNotificationsContainer extends Sha
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
render() {
|
|
46
|
-
const {isNative} =
|
|
46
|
+
const {isNative} = useEnvSense()
|
|
47
47
|
const insets = useSafeAreaInsets()
|
|
48
48
|
const viewStyleFromStyles = useStyles(styles, "view")
|
|
49
49
|
const viewStyle = useMemo(() => [
|
package/src/listener.js
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import events from "./events.js"
|
|
2
|
+
|
|
3
|
+
export default class FlashNotificationsListener {
|
|
4
|
+
notifications = []
|
|
5
|
+
|
|
6
|
+
static current() {
|
|
7
|
+
if (!globalThis.flashNotificationsListener) {
|
|
8
|
+
globalThis.flashNotificationsListener = new FlashNotificationsListener()
|
|
9
|
+
|
|
10
|
+
globalThis.flashNotificationsListener.connect(events)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return globalThis.flashNotificationsListener
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
connect(events) {
|
|
17
|
+
events.addListener("pushNotification", this.onPushNotification)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
findAndPop(argument) {
|
|
21
|
+
for (const notificationIndex in this.notifications) {
|
|
22
|
+
const notification = this.notifications[notificationIndex]
|
|
23
|
+
let result
|
|
24
|
+
|
|
25
|
+
if (typeof argument == "function") {
|
|
26
|
+
result = argument(notification)
|
|
27
|
+
} else if (typeof argument == "object") {
|
|
28
|
+
let allEqual = true
|
|
29
|
+
|
|
30
|
+
for (const key in argument) {
|
|
31
|
+
const value = argument[key]
|
|
32
|
+
|
|
33
|
+
if (value !== notification[key]) {
|
|
34
|
+
allEqual = false
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
result = allEqual
|
|
39
|
+
} else {
|
|
40
|
+
throw new Error(`Unknown type of argument: ${typeof argument}`)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (result) {
|
|
44
|
+
delete this.notifications[notificationIndex]
|
|
45
|
+
|
|
46
|
+
return notification
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
throw new Error(`Couldn't find the expected notification in: ${JSON.stringify(this.notifications)}`)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
onPushNotification = (notification) => {
|
|
54
|
+
this.notifications.push(notification)
|
|
55
|
+
}
|
|
56
|
+
}
|