New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-dynamic-help

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-dynamic-help - npm Package Compare versions

Comparing version 2.1.5 to 2.1.6

1

lib/es5/components/HelpController.d.ts

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

systemState: SystemState;
prevUserState: string;
propagateSystemState: () => void;

@@ -30,0 +31,0 @@ constructor(props: HelpControllerProps);

8

lib/es5/components/HelpController.js

@@ -103,6 +103,11 @@ "use strict";

this.systemState = Object.assign({}, __resetState);
this.prevUserState = "";
this.propagateSystemState = () => {
(0, DynamicHelp_1.log)(this.props.debug, "HelpController state update:", this.systemState);
const stringified = JSON.stringify(this.systemState.userState);
this.props.storage.saveState(stringified);
// a simplistic check to reduce writes to system storage
if (stringified !== this.prevUserState) {
this.props.storage.saveState(stringified);
this.prevUserState = stringified;
}
this.setState({ systemState: this.systemState });

@@ -200,3 +205,2 @@ };

this.enableHelp = (enabled = true) => {
console.log("Enable help", enabled);
if (enabled) {

@@ -203,0 +207,0 @@ this.reloadUserState();

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

systemState: SystemState;
prevUserState: string;
propagateSystemState: () => void;

@@ -30,0 +31,0 @@ constructor(props: HelpControllerProps);

@@ -77,6 +77,11 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";

this.systemState = Object.assign({}, __resetState);
this.prevUserState = "";
this.propagateSystemState = () => {
log(this.props.debug, "HelpController state update:", this.systemState);
const stringified = JSON.stringify(this.systemState.userState);
this.props.storage.saveState(stringified);
// a simplistic check to reduce writes to system storage
if (stringified !== this.prevUserState) {
this.props.storage.saveState(stringified);
this.prevUserState = stringified;
}
this.setState({ systemState: this.systemState });

@@ -174,3 +179,2 @@ };

this.enableHelp = (enabled = true) => {
console.log("Enable help", enabled);
if (enabled) {

@@ -177,0 +181,0 @@ this.reloadUserState();

{
"name": "react-dynamic-help",
"description": "React Dynamic Help - Create flows of helpful popups in your React App",
"version": "2.1.5",
"version": "2.1.6",
"repository": {

@@ -6,0 +6,0 @@ "type": "git",

@@ -10,3 +10,3 @@ # react-dynamic-help

V 2.1.5 - As integrated with [online-go.com](https://online-go.com).
V 2.1.6 - As integrated with [online-go.com](https://online-go.com).

@@ -13,0 +13,0 @@ Demo at https://github.com/GreenAsJade/react-dynamic-help-demo

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