flash-notifications 0.0.24 → 0.0.25

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.
@@ -33,22 +33,31 @@ export default memo(shapeComponent(class FlashNotificationsContainer extends Sha
33
33
  const { smDown, mdUp } = useBreakpoint();
34
34
  const { isNative } = useEnvSense();
35
35
  const viewStyle = useMemo(() => {
36
- const style = {
37
- position: isNative ? "absolute" : "fixed",
38
- top: 20 + insets.top,
39
- right: insets.right,
40
- left: insets.left,
41
- zIndex: 99999
42
- };
36
+ let top = 20;
37
+ let right = 0;
38
+ let left = undefined;
39
+ if (insets.top)
40
+ top += insets.top;
41
+ if (insets.right)
42
+ right += insets.right;
43
43
  if (smDown) {
44
- style.left += 20;
45
- style.right += 20;
44
+ left = 20;
45
+ if (insets.left)
46
+ left += insets.left;
47
+ right += 20;
46
48
  }
47
49
  else if (mdUp) {
48
- style.right += 20;
50
+ right += 20;
49
51
  }
52
+ const style = {
53
+ position: isNative ? "absolute" : "fixed",
54
+ top,
55
+ right,
56
+ left,
57
+ zIndex: 99999
58
+ };
50
59
  return style;
51
- }, [isNative, smDown, mdUp, insets.top, insets.right, insets.bottom, insets.left]);
60
+ }, [isNative, smDown, mdUp, insets.top, insets.right, insets.left]);
52
61
  return (React.createElement(View, { dataSet: this.rootViewDataSet ||= { component: "flash-notifications-container" }, style: viewStyle, testID: "flash-notificaitons/container" }, this.s.notifications.map((notification) => React.createElement(Notification, { count: notification.count, key: `notification-${notification.count}`, message: notification.message, notification: notification, onRemovedClicked: this.tt.onRemovedClicked, title: notification.title, type: notification.type }))));
53
62
  }
54
63
  onPushNotification = (detail) => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/container/index.jsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,cAAc,MAAM,kBAAkB,CA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GACvB,CACH,CACI,CACR,CAAA;IACH,CAAC;IAED,kBAAkB,GAAG,CAAC,MAAM,EAAE,EAAE;QAC9B,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 {digg} from \"diggerize\"\nimport PropTypes from \"prop-types\"\nimport propTypesExact from \"prop-types-exact\"\nimport React, {memo, useEffect, useMemo} from \"react\"\nimport {shapeComponent, ShapeComponent} from \"set-state-compare/src/shape-component\"\nimport useBreakpoint from \"@kaspernj/api-maker/build/use-breakpoint\"\nimport useEventEmitter from \"@kaspernj/api-maker/build/use-event-emitter\"\nimport useEnvSense from \"env-sense/src/use-env-sense.js\"\nimport {View} from \"react-native\"\n\nimport events from \"../events\"\nimport Notification from \"./notification\"\n\nexport default memo(shapeComponent(class FlashNotificationsContainer extends ShapeComponent {\n static propTypes = propTypesExact({\n insets: PropTypes.object\n })\n\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 insets = this.props.insets || {}\n const {smDown, mdUp} = useBreakpoint()\n const {isNative} = useEnvSense()\n\n const viewStyle = useMemo(() => {\n const style = {\n position: isNative ? \"absolute\" : \"fixed\",\n top: 20 + insets.top,\n right: insets.right,\n left: insets.left,\n zIndex: 99999\n }\n\n if (smDown) {\n style.left += 20\n style.right += 20\n } else if (mdUp) {\n style.right += 20\n }\n\n return style\n }, [isNative, smDown, mdUp, insets.top, insets.right, insets.bottom, insets.left])\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"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/container/index.jsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAA;AAC9B,OAAO,SAAS,MAAM,YAAY,CAAA;AAClC,OAAO,cAAc,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,OAAO,EAAC,MAAM,OAAO,CAAA;AACrD,OAAO,EAAC,cAAc,EAAE,cAAc,EAAC,MAAM,uCAAuC,CAAA;AACpF,OAAO,aAAa,MAAM,0CAA0C,CAAA;AACpE,OAAO,eAAe,MAAM,6CAA6C,CAAA;AACzE,OAAO,WAAW,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAC,IAAI,EAAC,MAAM,cAAc,CAAA;AAEjC,OAAO,MAAM,MAAM,WAAW,CAAA;AAC9B,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,eAAe,IAAI,CAAC,cAAc,CAAC,MAAM,2BAA4B,SAAQ,cAAc;IACzF,MAAM,CAAC,SAAS,GAAG,cAAc,CAAC;QAChC,MAAM,EAAE,SAAS,CAAC,MAAM;KACzB,CAAC,CAAA;IAEF,QAAQ,GAAG,EAAE,CAAA;IAEb,KAAK;QACH,IAAI,CAAC,SAAS,CAAC;YACb,KAAK,EAAE,CAAC;YACR,aAAa,EAAE,EAAE;SAClB,CAAC,CAAA;QAEF,eAAe,CAAC,MAAM,EAAE,kBAAkB,EAAE,IAAI,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAA;QACvE,SAAS,CAAC,GAAG,EAAE;YACb,OAAO,GAAG,EAAE;gBACV,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC;oBACvC,YAAY,CA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gB,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 {digg} from \"diggerize\"\nimport PropTypes from \"prop-types\"\nimport propTypesExact from \"prop-types-exact\"\nimport React, {memo, useEffect, useMemo} from \"react\"\nimport {shapeComponent, ShapeComponent} from \"set-state-compare/src/shape-component\"\nimport useBreakpoint from \"@kaspernj/api-maker/build/use-breakpoint\"\nimport useEventEmitter from \"@kaspernj/api-maker/build/use-event-emitter\"\nimport useEnvSense from \"env-sense/src/use-env-sense.js\"\nimport {View} from \"react-native\"\n\nimport events from \"../events\"\nimport Notification from \"./notification\"\n\nexport default memo(shapeComponent(class FlashNotificationsContainer extends ShapeComponent {\n static propTypes = propTypesExact({\n insets: PropTypes.object\n })\n\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 insets = this.props.insets || {}\n const {smDown, mdUp} = useBreakpoint()\n const {isNative} = useEnvSense()\n\n const viewStyle = useMemo(() => {\n let top = 20\n let right = 0\n let left = undefined\n\n if (insets.top) top += insets.top\n if (insets.right) right += insets.right\n\n if (smDown) {\n left = 20\n\n if (insets.left) left += insets.left\n\n right += 20\n } else if (mdUp) {\n right += 20\n }\n\n const style = {\n position: isNative ? \"absolute\" : \"fixed\",\n top,\n right,\n left,\n zIndex: 99999\n }\n\n return style\n }, [isNative, smDown, mdUp, insets.top, insets.right, insets.left])\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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flash-notifications",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "My new module",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -40,23 +40,33 @@ export default memo(shapeComponent(class FlashNotificationsContainer extends Sha
40
40
  const {isNative} = useEnvSense()
41
41
 
42
42
  const viewStyle = useMemo(() => {
43
- const style = {
44
- position: isNative ? "absolute" : "fixed",
45
- top: 20 + insets.top,
46
- right: insets.right,
47
- left: insets.left,
48
- zIndex: 99999
49
- }
43
+ let top = 20
44
+ let right = 0
45
+ let left = undefined
46
+
47
+ if (insets.top) top += insets.top
48
+ if (insets.right) right += insets.right
50
49
 
51
50
  if (smDown) {
52
- style.left += 20
53
- style.right += 20
51
+ left = 20
52
+
53
+ if (insets.left) left += insets.left
54
+
55
+ right += 20
54
56
  } else if (mdUp) {
55
- style.right += 20
57
+ right += 20
58
+ }
59
+
60
+ const style = {
61
+ position: isNative ? "absolute" : "fixed",
62
+ top,
63
+ right,
64
+ left,
65
+ zIndex: 99999
56
66
  }
57
67
 
58
68
  return style
59
- }, [isNative, smDown, mdUp, insets.top, insets.right, insets.bottom, insets.left])
69
+ }, [isNative, smDown, mdUp, insets.top, insets.right, insets.left])
60
70
 
61
71
  return (
62
72
  <View