Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

announcekit-react

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

announcekit-react - npm Package Compare versions

Comparing version 3.0.1 to 3.1.0

.github/workflows/npm-publish.yaml

1

dist/index.d.ts

@@ -8,2 +8,3 @@ import * as React from "react";

name?: string;
trackLocationChanges?: boolean;
onWidgetOpen?: Function;

@@ -10,0 +11,0 @@ onWidgetClose?: Function;

@@ -55,3 +55,3 @@ "use strict";

});
},
}
};

@@ -95,3 +95,3 @@ var scripttag = document.createElement("script");

return this.withWidget(function (widget) { return widget.state.ui.unreadCount; });
},
}
}); });

@@ -123,2 +123,14 @@ var onWidgetOpen = props.onWidgetOpen, onWidgetClose = props.onWidgetClose, onWidgetResize = props.onWidgetResize, onWidgetUnread = props.onWidgetUnread;

var customConfig = props.customConfig, widget = props.widget, floatWidget = props.floatWidget, embedWidget = props.embedWidget, _b = props.boosters, boosters = _b === void 0 ? true : _b, widgetStyle = props.widgetStyle, lang = props.lang, name = props.name, user = props.user, data = props.data;
var _c = React.useState(window.location.href), loc = _c[0], setLoc = _c[1];
(0, react_1.useEffect)(function () {
if (!props.trackLocationChanges) {
return;
}
var timer = setInterval(function () {
if (loc !== window.location.href) {
setLoc(window.location.href);
}
}, 250);
return function () { return clearInterval(timer); };
}, [props.trackLocationChanges, loc]);
// Push new widget config

@@ -136,3 +148,3 @@ (0, use_deep_compare_effect_1.default)(function () {

badge: floatWidget ? {} : __assign({}, widgetStyle),
float: __assign({}, widgetStyle),
float: __assign({}, widgetStyle)
}, onInit: function (w) {

@@ -161,2 +173,3 @@ var _a;

boosters,
loc
]);

@@ -163,0 +176,0 @@ return (React.createElement("div", { ref: elementRef, style: { display: "inline" }, className: (_a = props.className) !== null && _a !== void 0 ? _a : "" }, props.children));

2

package.json
{
"name": "announcekit-react",
"version": "3.0.1",
"version": "3.1.0",
"description": "Use AnnounceKit widgets in your React App",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -33,3 +33,3 @@ ![](https://announcekit.app/images/logo@2x.png)

<li>
<AnnounceKit widget="https://announcekit.app/widgets/v2/34MmKA">
<AnnounceKit widget="https://announcekit.co/widgets/v2/3xdhio">
<span>Whats new</span>

@@ -56,2 +56,4 @@ </AnnounceKit>

- `data` - [Segmentation data](https://announcekit.app/docs#segmentation)
- `labels` - In case you want to filter and display posts under a specific label or tag.
- `user_token` - JWT setup: https://announcekit.app/docs/jwt
- `onWidgetOpen` - Called when the widget is opened.

@@ -84,3 +86,3 @@ - `onWidgetClose` - Called when the widget is closed.

</button>
<AnnounceKit ref={ref} widget="https://announcekit.app/widgets/v2/3739N6">
<AnnounceKit ref={ref} widget="https://announcekit.co/widgets/v2/3xdhio">
<span>Whats new</span>

@@ -87,0 +89,0 @@ </AnnounceKit>

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc