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

victory-create-container

Package Overview
Dependencies
Maintainers
3
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-create-container - npm Package Compare versions

Comparing version 35.8.5 to 35.9.0

7

es/index.d.ts
import * as React from "react";
export type ContainerType = "brush" | "cursor" | "selection" | "voronoi" | "zoom";
export type ContainerType =
| "brush"
| "cursor"
| "selection"
| "voronoi"
| "zoom";
export function createContainer<V, W>(

@@ -5,0 +10,0 @@ c1: ContainerType,

import * as React from "react";
export type ContainerType = "brush" | "cursor" | "selection" | "voronoi" | "zoom";
export type ContainerType =
| "brush"
| "cursor"
| "selection"
| "voronoi"
| "zoom";
export function createContainer<V, W>(

@@ -5,0 +10,0 @@ c1: ContainerType,

14

package.json
{
"name": "victory-create-container",
"version": "35.8.5",
"version": "35.9.0",
"description": "Container Helper for Victory",

@@ -23,8 +23,8 @@ "keywords": [

"lodash": "^4.17.19",
"victory-brush-container": "^35.8.5",
"victory-core": "^35.8.1",
"victory-cursor-container": "^35.8.1",
"victory-selection-container": "^35.8.1",
"victory-voronoi-container": "^35.8.4",
"victory-zoom-container": "^35.8.1"
"victory-brush-container": "^35.9.0",
"victory-core": "^35.9.0",
"victory-cursor-container": "^35.9.0",
"victory-selection-container": "^35.9.0",
"victory-voronoi-container": "^35.9.0",
"victory-zoom-container": "^35.9.0"
},

@@ -31,0 +31,0 @@ "scripts": {

@@ -1,2 +0,11 @@

import { toPairs, groupBy, forOwn, includes, flow, isEmpty, isFunction, keys } from "lodash";
import {
toPairs,
groupBy,
forOwn,
includes,
flow,
isEmpty,
isFunction,
keys
} from "lodash";
import { VictoryContainer, Log } from "victory-core";

@@ -52,3 +61,5 @@ import { voronoiContainerMixin } from "victory-voronoi-container";

target,
eventHandlers: combineEventHandlers(eventsArray.map((event) => event.eventHandlers))
eventHandlers: combineEventHandlers(
eventsArray.map((event) => event.eventHandlers)
)
// note: does not currently handle eventKey or childName

@@ -110,26 +121,34 @@ };

if (behavior && !includes(behaviors, behavior)) {
Log.warn(`"${behavior}" is not a valid behavior. Choose from [${behaviors.join(", ")}].`);
Log.warn(
`"${behavior}" is not a valid behavior. Choose from [${behaviors.join(
", "
)}].`
);
}
};
const makeCreateContainerFunction = (mixinMap, Container) => (behaviorA, behaviorB, ...invalid) => {
// eslint-disable-line
const behaviors = keys(mixinMap);
const makeCreateContainerFunction =
(mixinMap, Container) =>
(behaviorA, behaviorB, ...invalid) => {
// eslint-disable-line
const behaviors = keys(mixinMap);
checkBehaviorName(behaviorA, behaviors);
checkBehaviorName(behaviorB, behaviors);
checkBehaviorName(behaviorA, behaviors);
checkBehaviorName(behaviorB, behaviors);
if (invalid.length) {
Log.warn("too many arguments given to createContainer (maximum accepted: 2).");
}
if (invalid.length) {
Log.warn(
"too many arguments given to createContainer (maximum accepted: 2)."
);
}
const firstMixins = mixinMap[behaviorA];
const secondMixins = mixinMap[behaviorB] || [];
const firstMixins = mixinMap[behaviorA];
const secondMixins = mixinMap[behaviorB] || [];
if (!firstMixins) {
return Container;
}
if (!firstMixins) {
return Container;
}
return combineContainerMixins([...firstMixins, ...secondMixins], Container);
};
return combineContainerMixins([...firstMixins, ...secondMixins], Container);
};

@@ -136,0 +155,0 @@ const createContainer = makeCreateContainerFunction(

import * as React from "react";
export type ContainerType = "brush" | "cursor" | "selection" | "voronoi" | "zoom";
export type ContainerType =
| "brush"
| "cursor"
| "selection"
| "voronoi"
| "zoom";
export function createContainer<V, W>(

@@ -5,0 +10,0 @@ c1: ContainerType,

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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