Socket
Socket
Sign inDemoInstall

victory-core

Package Overview
Dependencies
Maintainers
21
Versions
300
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

victory-core - npm Package Compare versions

Comparing version 36.9.2-next.3 to 36.9.2

32

CHANGELOG.md
# victory-core
## 36.9.2-next.3
## 36.9.2
### Patch Changes
- 7da790934: Replace lodash keys with native code
- 3f2da66e3: Refactor victory-accessible-group to a function component
- c13308624: Convert victory-animation to function component
- 65d02419f: Refactor containers and portal to function components
- 7efd582cc: Replace lodash array utils with native code
- 9cdaf2c08: Replace lodash values and mapValues with native code
- f6f7cc515: Replace lodash isNil and isNan with native code
- 6e34169a5: Replace lodash isFunction with native code
- victory-vendor@36.9.2-next.3
- Replace lodash keys with native code ([#2811](https://github.com/FormidableLabs/victory/pull/2811))
* Replace lodash identity with native code ([#2829](https://github.com/FormidableLabs/victory/pull/2829))
- Refactor victory-accessible-group to a function component ([#2777](https://github.com/FormidableLabs/victory/pull/2777))
* Convert victory-animation to function component ([#2788](https://github.com/FormidableLabs/victory/pull/2788))
- Replace lodash.invert with native code ([#2830](https://github.com/FormidableLabs/victory/pull/2830))
* Replace lodash difference with native code ([#2828](https://github.com/FormidableLabs/victory/pull/2828))
- Replace lodash array utils with native code ([#2810](https://github.com/FormidableLabs/victory/pull/2810))
* allow VictoryBoxPlot childStyles to override VictoryGroup parent styles ([#2824](https://github.com/FormidableLabs/victory/pull/2824))
- Replace lodash values and mapValues with native code ([#2808](https://github.com/FormidableLabs/victory/pull/2808))
* Replace lodash isNil and isNan with native code ([#2800](https://github.com/FormidableLabs/victory/pull/2800))
- Replace lodash isFunction with native code ([#2802](https://github.com/FormidableLabs/victory/pull/2802))
## 36.9.1

@@ -18,0 +30,0 @@

@@ -0,0 +0,0 @@ export * from "./types/callbacks";

@@ -0,0 +0,0 @@ import { D3Scale, Datum, ID, ScalePropType } from "./prop-types";

@@ -0,0 +0,0 @@ import * as React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ export declare const isInterpolatable: (obj: any) => boolean;

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ export * from "./arc";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ /// <reference types="react" />

@@ -0,0 +0,0 @@ import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";

@@ -0,0 +0,0 @@ import React from "react";

import { VictoryThemeDefinition } from "./types";
export declare const grayscale: VictoryThemeDefinition;
//# sourceMappingURL=grayscale.d.ts.map
import { VictoryThemeDefinition } from "./types";
export declare const material: VictoryThemeDefinition;
//# sourceMappingURL=material.d.ts.map

@@ -0,0 +0,0 @@ import * as React from "react";

@@ -0,0 +0,0 @@ export * from "./types";

@@ -0,0 +0,0 @@ import React from "react";

import React from "react";
import { VictoryLabelableProps } from "../types/prop-types";
import { VictoryCommonProps, VictoryDatableProps } from "./common-props";
import type { ComponentEvent } from "./events";
import * as Events from "./events";
import { VictoryCommonProps, VictoryDatableProps } from "./common-props";
import { VictoryLabelableProps } from "../types/prop-types";
export declare type MixinOptions = {

@@ -7,0 +7,0 @@ components?: Array<{

import _pick from "lodash/pick";
import _isEmpty from "lodash/isEmpty";
import _difference from "lodash/difference";
import _defaults from "lodash/defaults";

@@ -39,5 +38,6 @@

import React from "react";
import * as Events from "./events";
import isEqual from "react-fast-compare";
import { VictoryTransition } from "../victory-transition/victory-transition";
import { difference } from "./collection";
import * as Events from "./events";
import { isFunction, isNil } from "./helpers"; // DISCLAIMER:

@@ -143,11 +143,7 @@ // This file is not currently tested, and it is first on the list of files

var globalEventKeys = Object.keys(this.globalEvents);
var removedGlobalEventKeys = _difference(this.prevGlobalEventKeys, globalEventKeys);
var removedGlobalEventKeys = difference(this.prevGlobalEventKeys, globalEventKeys);
removedGlobalEventKeys.forEach(function (key) {
return _this3.removeGlobalListener(key);
});
var addedGlobalEventKeys = _difference(globalEventKeys, this.prevGlobalEventKeys);
var addedGlobalEventKeys = difference(globalEventKeys, this.prevGlobalEventKeys);
addedGlobalEventKeys.forEach(function (key) {

@@ -154,0 +150,0 @@ return _this3.addGlobalListener(key);

@@ -0,0 +0,0 @@ import { D3Scale } from "../types/prop-types";

import _orderBy from "lodash/orderBy";
import _uniq from "lodash/uniq";
import _invert from "lodash/invert";
import _isObject from "lodash/isObject";
import _identity from "lodash/identity";
import _defaults from "lodash/defaults";

@@ -26,2 +24,10 @@

/**
* Returns the first argument it receives
* @param value The value to return
* @returns The value given
*/
function identity(value) {
return value;
}
/**
* Returns the axis (x or y) of a particular axis component

@@ -32,2 +38,4 @@ * @param {Object} props: the props object.

*/
export function getAxis(props) {

@@ -45,3 +53,3 @@ var dependentAxis = props.dependentAxis;

export function findAxisComponents(childComponents, predicate) {
var predicateFunction = predicate || _identity;
var predicateFunction = predicate || identity;

@@ -162,3 +170,3 @@ var findAxes = function (children) {

var invertedStringMap = stringMap && _invert(stringMap);
var invertedStringMap = stringMap && Helpers.invert(stringMap);

@@ -281,4 +289,3 @@ var tickValueArray = _orderBy(Object.values(stringMap), function (n) {

var applyStringTicks = function (tick, index, ticks) {
var invertedStringMap = _invert(stringMap);
var invertedStringMap = Helpers.invert(stringMap);
var stringTickArray = ticks.map(function (t) {

@@ -285,0 +292,0 @@ return invertedStringMap[t];

@@ -5,2 +5,9 @@ export declare function containsStrings<T>(collection: Array<T>): boolean;

export declare function containsOnlyStrings(collection: Array<string> | unknown): collection is Array<string>;
/**
* Creates an array of array values not included in the other given arrays
* @param a The array to inspect
* @param b The values to exclude
* @returns The new array of filtered values
*/
export declare function difference<T>(a: Array<T>, b: Array<T>): Array<T>;
export declare function isArrayOfArrays<T>(collection: Array<T> | Array<Array<T>> | unknown): collection is Array<Array<T>>;

@@ -7,0 +14,0 @@ export declare function removeUndefined(arr: any): any;

@@ -37,2 +37,18 @@ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }

}
/**
* Creates an array of array values not included in the other given arrays
* @param a The array to inspect
* @param b The values to exclude
* @returns The new array of filtered values
*/
export function difference(a, b) {
if (a && b) {
return a.filter(function (value) {
return !b.includes(value);
});
}
return [];
}
export function isArrayOfArrays(collection) {

@@ -39,0 +55,0 @@ return isNonEmptyArray(collection) && collection.every(Array.isArray);

@@ -0,0 +0,0 @@ import * as React from "react";

@@ -0,0 +0,0 @@ export declare function formatDataFromDomain(dataset: any, domain: any, defaultBaseline?: any): any;

@@ -0,0 +0,0 @@ import { AnimatePropTypeInterface } from "../types/prop-types";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /// <reference types="react" />

@@ -5,2 +5,7 @@ import React from "react";

/**
* Creates an object composed of the inverted keys and values of object.
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
*/
export declare function invert(original: Record<string, string | number>): {};
/**
* creates an object with some keys excluded

@@ -7,0 +12,0 @@ * replacement for lodash.omit for performance. does not mimic the entire lodash.omit api

@@ -32,2 +32,14 @@ import _pick from "lodash/pick";

/**
* Creates an object composed of the inverted keys and values of object.
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
*/
export function invert(original) {
return Object.entries(original).reduce(function (acc, current) {
acc[current[1]] = current[0];
return acc;
}, {});
}
/**
* creates an object with some keys excluded

@@ -40,3 +52,2 @@ * replacement for lodash.omit for performance. does not mimic the entire lodash.omit api

export function omit(originalObject) {

@@ -43,0 +54,0 @@ var ks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];

export { usePreviousProps } from "./use-previous-props";
export { useAnimationState } from "./use-animation-state";
//# sourceMappingURL=index.d.ts.map

@@ -0,0 +0,0 @@ declare type AnyObject = Record<string, any>;

export declare function usePreviousProps<T>(props: T): T | undefined;
//# sourceMappingURL=use-previous-props.d.ts.map

@@ -0,0 +0,0 @@ import type { Iterable, List, Map } from "./immutable-types";

@@ -0,0 +0,0 @@ export * from "./add-events";

@@ -0,0 +0,0 @@ export declare function getText(props: any, datum: Record<string, any> | undefined, index: any): any;

@@ -0,0 +0,0 @@ import * as d3Shape from "victory-vendor/d3-shape";

export declare function warn(message: string): void;
//# sourceMappingURL=log.d.ts.map

@@ -0,0 +0,0 @@ export declare function circle(x: number, y: number, size: number): string;

@@ -0,0 +0,0 @@ import * as d3Scale from "victory-vendor/d3-scale";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ declare type TimerCallback = (elapsed: number, duration: number) => void;

@@ -0,0 +0,0 @@ import { AnimatePropTypeInterface } from "../types/prop-types";

@@ -0,0 +0,0 @@ import { ForAxes, AxisType, Tuple, Datum, DatumValue } from "../types/prop-types";

@@ -0,0 +0,0 @@ import * as React from "react";

@@ -19,7 +19,3 @@ export declare function addBinsToParentPropsIfHistogram({ children, props, childComponents, parentProps, }: {

export declare function getStyle(theme: any, style: any, role: any): any;
export declare function getChildStyle(child: any, index: any, calculatedProps: any): any[] | {
parent: any;
data: any;
labels: any;
};
export declare function getChildStyle(child: any, index: any, calculatedProps: any): any;
export declare function getStringsFromCategories(childComponents: any, axis: any): any[];

@@ -26,0 +22,0 @@ export declare function getStringsFromData(childComponents: any): {

@@ -351,7 +351,7 @@ import _isPlainObject from "lodash/isPlainObject";

return {
return _objectSpread(_objectSpread({}, childStyle), {}, {
parent: style.parent,
data: dataStyle,
labels: labelsStyle
};
});
}

@@ -358,0 +358,0 @@ export function getStringsFromCategories(childComponents, axis) {

@@ -0,0 +0,0 @@ export * from "./types/callbacks";

@@ -0,0 +0,0 @@ import { D3Scale, Datum, ID, ScalePropType } from "./prop-types";

@@ -0,0 +0,0 @@ import * as React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ export declare const isInterpolatable: (obj: any) => boolean;

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ export * from "./arc";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ /// <reference types="react" />

@@ -0,0 +0,0 @@ import { VictoryCommonPrimitiveProps } from "../victory-util/common-props";

@@ -0,0 +0,0 @@ import React from "react";

import { VictoryThemeDefinition } from "./types";
export declare const grayscale: VictoryThemeDefinition;
//# sourceMappingURL=grayscale.d.ts.map
import { VictoryThemeDefinition } from "./types";
export declare const material: VictoryThemeDefinition;
//# sourceMappingURL=material.d.ts.map

@@ -0,0 +0,0 @@ import * as React from "react";

@@ -0,0 +0,0 @@ export * from "./types";

@@ -0,0 +0,0 @@ import React from "react";

import React from "react";
import { VictoryLabelableProps } from "../types/prop-types";
import { VictoryCommonProps, VictoryDatableProps } from "./common-props";
import type { ComponentEvent } from "./events";
import * as Events from "./events";
import { VictoryCommonProps, VictoryDatableProps } from "./common-props";
import { VictoryLabelableProps } from "../types/prop-types";
export declare type MixinOptions = {

@@ -7,0 +7,0 @@ components?: Array<{

@@ -12,4 +12,2 @@ "use strict";

var _difference2 = _interopRequireDefault(require("lodash/difference"));
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));

@@ -19,4 +17,2 @@

var Events = _interopRequireWildcard(require("./events"));
var _reactFastCompare = _interopRequireDefault(require("react-fast-compare"));

@@ -26,2 +22,6 @@

var _collection = require("./collection");
var Events = _interopRequireWildcard(require("./events"));
var _helpers = require("./helpers");

@@ -167,7 +167,7 @@

var globalEventKeys = Object.keys(this.globalEvents);
var removedGlobalEventKeys = (0, _difference2.default)(this.prevGlobalEventKeys, globalEventKeys);
var removedGlobalEventKeys = (0, _collection.difference)(this.prevGlobalEventKeys, globalEventKeys);
removedGlobalEventKeys.forEach(function (key) {
return _this3.removeGlobalListener(key);
});
var addedGlobalEventKeys = (0, _difference2.default)(globalEventKeys, this.prevGlobalEventKeys);
var addedGlobalEventKeys = (0, _collection.difference)(globalEventKeys, this.prevGlobalEventKeys);
addedGlobalEventKeys.forEach(function (key) {

@@ -174,0 +174,0 @@ return _this3.addGlobalListener(key);

@@ -0,0 +0,0 @@ import { D3Scale } from "../types/prop-types";

@@ -24,8 +24,4 @@ "use strict";

var _invert2 = _interopRequireDefault(require("lodash/invert"));
var _isObject2 = _interopRequireDefault(require("lodash/isObject"));
var _identity2 = _interopRequireDefault(require("lodash/identity"));
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));

@@ -60,2 +56,10 @@

/**
* Returns the first argument it receives
* @param value The value to return
* @returns The value given
*/
function identity(value) {
return value;
}
/**
* Returns the axis (x or y) of a particular axis component

@@ -66,2 +70,4 @@ * @param {Object} props: the props object.

*/
function getAxis(props) {

@@ -80,3 +86,3 @@ var dependentAxis = props.dependentAxis;

function findAxisComponents(childComponents, predicate) {
var predicateFunction = predicate || _identity2.default;
var predicateFunction = predicate || identity;

@@ -203,3 +209,3 @@ var findAxes = function (children) {

var invertedStringMap = stringMap && (0, _invert2.default)(stringMap);
var invertedStringMap = stringMap && Helpers.invert(stringMap);
var tickValueArray = (0, _orderBy2.default)(Object.values(stringMap), function (n) {

@@ -320,3 +326,3 @@ return n;

var applyStringTicks = function (tick, index, ticks) {
var invertedStringMap = (0, _invert2.default)(stringMap);
var invertedStringMap = Helpers.invert(stringMap);
var stringTickArray = ticks.map(function (t) {

@@ -323,0 +329,0 @@ return invertedStringMap[t];

@@ -5,2 +5,9 @@ export declare function containsStrings<T>(collection: Array<T>): boolean;

export declare function containsOnlyStrings(collection: Array<string> | unknown): collection is Array<string>;
/**
* Creates an array of array values not included in the other given arrays
* @param a The array to inspect
* @param b The values to exclude
* @returns The new array of filtered values
*/
export declare function difference<T>(a: Array<T>, b: Array<T>): Array<T>;
export declare function isArrayOfArrays<T>(collection: Array<T> | Array<Array<T>> | unknown): collection is Array<Array<T>>;

@@ -7,0 +14,0 @@ export declare function removeUndefined(arr: any): any;

@@ -10,2 +10,3 @@ "use strict";

exports.containsStrings = containsStrings;
exports.difference = difference;
exports.getMaxValue = getMaxValue;

@@ -55,3 +56,20 @@ exports.getMinValue = getMinValue;

}
/**
* Creates an array of array values not included in the other given arrays
* @param a The array to inspect
* @param b The values to exclude
* @returns The new array of filtered values
*/
function difference(a, b) {
if (a && b) {
return a.filter(function (value) {
return !b.includes(value);
});
}
return [];
}
function isArrayOfArrays(collection) {

@@ -58,0 +76,0 @@ return isNonEmptyArray(collection) && collection.every(Array.isArray);

@@ -0,0 +0,0 @@ import * as React from "react";

@@ -0,0 +0,0 @@ export declare function formatDataFromDomain(dataset: any, domain: any, defaultBaseline?: any): any;

@@ -0,0 +0,0 @@ import { AnimatePropTypeInterface } from "../types/prop-types";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /// <reference types="react" />

@@ -5,2 +5,7 @@ import React from "react";

/**
* Creates an object composed of the inverted keys and values of object.
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
*/
export declare function invert(original: Record<string, string | number>): {};
/**
* creates an object with some keys excluded

@@ -7,0 +12,0 @@ * replacement for lodash.omit for performance. does not mimic the entire lodash.omit api

@@ -18,2 +18,3 @@ "use strict";

exports.getStyles = getStyles;
exports.invert = invert;
exports.isFunction = isFunction;

@@ -70,2 +71,14 @@ exports.isHorizontal = isHorizontal;

/**
* Creates an object composed of the inverted keys and values of object.
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
*/
function invert(original) {
return Object.entries(original).reduce(function (acc, current) {
acc[current[1]] = current[0];
return acc;
}, {});
}
/**
* creates an object with some keys excluded

@@ -72,0 +85,0 @@ * replacement for lodash.omit for performance. does not mimic the entire lodash.omit api

export { usePreviousProps } from "./use-previous-props";
export { useAnimationState } from "./use-animation-state";
//# sourceMappingURL=index.d.ts.map

@@ -0,0 +0,0 @@ declare type AnyObject = Record<string, any>;

export declare function usePreviousProps<T>(props: T): T | undefined;
//# sourceMappingURL=use-previous-props.d.ts.map

@@ -0,0 +0,0 @@ import type { Iterable, List, Map } from "./immutable-types";

@@ -0,0 +0,0 @@ export * from "./add-events";

@@ -0,0 +0,0 @@ export declare function getText(props: any, datum: Record<string, any> | undefined, index: any): any;

@@ -0,0 +0,0 @@ import * as d3Shape from "victory-vendor/d3-shape";

export declare function warn(message: string): void;
//# sourceMappingURL=log.d.ts.map

@@ -0,0 +0,0 @@ export declare function circle(x: number, y: number, size: number): string;

@@ -0,0 +0,0 @@ import * as d3Scale from "victory-vendor/d3-scale";

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ /**

@@ -0,0 +0,0 @@ import React from "react";

@@ -0,0 +0,0 @@ declare type TimerCallback = (elapsed: number, duration: number) => void;

@@ -0,0 +0,0 @@ import { AnimatePropTypeInterface } from "../types/prop-types";

@@ -0,0 +0,0 @@ import { ForAxes, AxisType, Tuple, Datum, DatumValue } from "../types/prop-types";

@@ -0,0 +0,0 @@ import * as React from "react";

@@ -19,7 +19,3 @@ export declare function addBinsToParentPropsIfHistogram({ children, props, childComponents, parentProps, }: {

export declare function getStyle(theme: any, style: any, role: any): any;
export declare function getChildStyle(child: any, index: any, calculatedProps: any): any[] | {
parent: any;
data: any;
labels: any;
};
export declare function getChildStyle(child: any, index: any, calculatedProps: any): any;
export declare function getStringsFromCategories(childComponents: any, axis: any): any[];

@@ -26,0 +22,0 @@ export declare function getStringsFromData(childComponents: any): {

@@ -402,7 +402,7 @@ "use strict";

var labelsStyle = (0, _defaults2.default)({}, childStyle.labels, style.labels);
return {
return _objectSpread(_objectSpread({}, childStyle), {}, {
parent: style.parent,
data: dataStyle,
labels: labelsStyle
};
});
}

@@ -409,0 +409,0 @@

{
"name": "victory-core",
"version": "36.9.2-next.3",
"version": "36.9.2",
"description": "Victory Core",

@@ -15,3 +15,3 @@ "keywords": [

},
"homepage": "https://formidable.com/open-source/victory",
"homepage": "https://commerce.nearform.com/open-source/victory",
"sideEffects": false,

@@ -26,3 +26,3 @@ "main": "lib/index.js",

"react-fast-compare": "^3.2.0",
"victory-vendor": "^36.9.2-next.3"
"victory-vendor": "^36.9.2"
},

@@ -32,2 +32,5 @@ "peerDependencies": {

},
"publishConfig": {
"provenance": true
},
"wireit": {

@@ -34,0 +37,0 @@ "### THESE WIREIT CONFIGS ARE GENERATED ####": {},

@@ -18,4 +18,4 @@ # VictoryCore

Please visit our documentation site to read more about these components
https://formidable.com/open-source/victory
https://commerce.nearform.com/open-source/victory
To suggest an addition or correction to this documentation please see https://github.com/FormidableLabs/victory/blob/main/docs/src/content/docs

@@ -197,8 +197,1 @@ import * as React from "react";

};
export type VictoryEventHandler = (
event?: any,
targetProps?: any,
eventKey?: any,
context?: any,
) => void;
import React from "react";
export interface PortalContextValue {
portalElement: SVGSVGElement | undefined;
portalRegister(): number;
portalUpdate(key: number, element: React.ReactElement): void;
portalDeregister(key: number): void;
}

@@ -11,6 +13,3 @@

*/
export const PortalContext = React.createContext<
PortalContextValue | undefined
>(undefined);
export const PortalContext = React.createContext({} as PortalContextValue);
PortalContext.displayName = "PortalContext";

@@ -31,2 +31,13 @@ /* eslint-disable no-use-before-define */

/**
* Creates an object composed of the inverted keys and values of object.
* If object contains duplicate values, subsequent values overwrite property assignments of previous values.
*/
export function invert(original: Record<string, string | number>) {
return Object.entries(original).reduce((acc, current) => {
acc[current[1]] = current[0];
return acc;
}, {});
}
/**
* creates an object with some keys excluded

@@ -33,0 +44,0 @@ * replacement for lodash.omit for performance. does not mimic the entire lodash.omit api

export * from "./add-events";
export * from "./merge-refs";
export * as Axis from "./axis";

@@ -4,0 +3,0 @@ export * as Collection from "./collection";

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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