react-gauge-ultimate
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -341,2 +341,4 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var has = Function.call.bind(Object.prototype.hasOwnProperty); | ||
var printWarning = function() {}; | ||
@@ -347,3 +349,3 @@ | ||
var loggedTypeFailures = {}; | ||
var has = Function.call.bind(Object.prototype.hasOwnProperty); | ||
var has$1 = has; | ||
@@ -360,3 +362,3 @@ printWarning = function(text) { | ||
throw new Error(message); | ||
} catch (x) {} | ||
} catch (x) { /**/ } | ||
}; | ||
@@ -379,3 +381,3 @@ } | ||
for (var typeSpecName in typeSpecs) { | ||
if (has(typeSpecs, typeSpecName)) { | ||
if (has$1(typeSpecs, typeSpecName)) { | ||
var error; | ||
@@ -391,3 +393,4 @@ // Prop type validation may throw. In case they do, we don't want to | ||
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + | ||
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' | ||
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + | ||
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' | ||
); | ||
@@ -440,3 +443,2 @@ err.name = 'Invariant Violation'; | ||
var has$1 = Function.call.bind(Object.prototype.hasOwnProperty); | ||
var printWarning$1 = function() {}; | ||
@@ -542,2 +544,3 @@ | ||
array: createPrimitiveTypeChecker('array'), | ||
bigint: createPrimitiveTypeChecker('bigint'), | ||
bool: createPrimitiveTypeChecker('boolean'), | ||
@@ -588,4 +591,5 @@ func: createPrimitiveTypeChecker('function'), | ||
*/ | ||
function PropTypeError(message) { | ||
function PropTypeError(message, data) { | ||
this.message = message; | ||
this.data = data && typeof data === 'object' ? data: {}; | ||
this.stack = ''; | ||
@@ -625,3 +629,3 @@ } | ||
'You are manually calling a React.PropTypes validation ' + | ||
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + | ||
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + | ||
'and will throw in the standalone `prop-types` package. ' + | ||
@@ -665,3 +669,6 @@ 'You may be seeing this warning due to a third-party PropTypes ' + | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); | ||
return new PropTypeError( | ||
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), | ||
{expectedType: expectedType} | ||
); | ||
} | ||
@@ -780,3 +787,3 @@ return null; | ||
for (var key in propValue) { | ||
if (has$1(propValue, key)) { | ||
if (has(propValue, key)) { | ||
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); | ||
@@ -811,10 +818,15 @@ if (error instanceof Error) { | ||
function validate(props, propName, componentName, location, propFullName) { | ||
var expectedTypes = []; | ||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | ||
var checker = arrayOfTypeCheckers[i]; | ||
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) { | ||
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1); | ||
if (checkerResult == null) { | ||
return null; | ||
} | ||
if (checkerResult.data && has(checkerResult.data, 'expectedType')) { | ||
expectedTypes.push(checkerResult.data.expectedType); | ||
} | ||
} | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); | ||
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); | ||
} | ||
@@ -834,2 +846,9 @@ return createChainableTypeChecker(validate); | ||
function invalidValidatorError(componentName, location, propFullName, key, type) { | ||
return new PropTypeError( | ||
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + | ||
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' | ||
); | ||
} | ||
function createShapeTypeChecker(shapeTypes) { | ||
@@ -844,4 +863,4 @@ function validate(props, propName, componentName, location, propFullName) { | ||
var checker = shapeTypes[key]; | ||
if (!checker) { | ||
continue; | ||
if (typeof checker !== 'function') { | ||
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | ||
} | ||
@@ -865,7 +884,9 @@ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); | ||
} | ||
// We need to check all keys in case some are required but missing from | ||
// props. | ||
// We need to check all keys in case some are required but missing from props. | ||
var allKeys = objectAssign({}, props[propName], shapeTypes); | ||
for (var key in allKeys) { | ||
var checker = shapeTypes[key]; | ||
if (has(shapeTypes, key) && typeof checker !== 'function') { | ||
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | ||
} | ||
if (!checker) { | ||
@@ -875,3 +896,3 @@ return new PropTypeError( | ||
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') + | ||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') | ||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') | ||
); | ||
@@ -1052,2 +1073,3 @@ } | ||
array: shim, | ||
bigint: shim, | ||
bool: shim, | ||
@@ -1054,0 +1076,0 @@ func: shim, |
@@ -338,2 +338,4 @@ import React, { useEffect, useRef } from 'react'; | ||
var has = Function.call.bind(Object.prototype.hasOwnProperty); | ||
var printWarning = function() {}; | ||
@@ -344,3 +346,3 @@ | ||
var loggedTypeFailures = {}; | ||
var has = Function.call.bind(Object.prototype.hasOwnProperty); | ||
var has$1 = has; | ||
@@ -357,3 +359,3 @@ printWarning = function(text) { | ||
throw new Error(message); | ||
} catch (x) {} | ||
} catch (x) { /**/ } | ||
}; | ||
@@ -376,3 +378,3 @@ } | ||
for (var typeSpecName in typeSpecs) { | ||
if (has(typeSpecs, typeSpecName)) { | ||
if (has$1(typeSpecs, typeSpecName)) { | ||
var error; | ||
@@ -388,3 +390,4 @@ // Prop type validation may throw. In case they do, we don't want to | ||
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + | ||
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' | ||
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + | ||
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.' | ||
); | ||
@@ -437,3 +440,2 @@ err.name = 'Invariant Violation'; | ||
var has$1 = Function.call.bind(Object.prototype.hasOwnProperty); | ||
var printWarning$1 = function() {}; | ||
@@ -539,2 +541,3 @@ | ||
array: createPrimitiveTypeChecker('array'), | ||
bigint: createPrimitiveTypeChecker('bigint'), | ||
bool: createPrimitiveTypeChecker('boolean'), | ||
@@ -585,4 +588,5 @@ func: createPrimitiveTypeChecker('function'), | ||
*/ | ||
function PropTypeError(message) { | ||
function PropTypeError(message, data) { | ||
this.message = message; | ||
this.data = data && typeof data === 'object' ? data: {}; | ||
this.stack = ''; | ||
@@ -622,3 +626,3 @@ } | ||
'You are manually calling a React.PropTypes validation ' + | ||
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + | ||
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + | ||
'and will throw in the standalone `prop-types` package. ' + | ||
@@ -662,3 +666,6 @@ 'You may be seeing this warning due to a third-party PropTypes ' + | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); | ||
return new PropTypeError( | ||
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), | ||
{expectedType: expectedType} | ||
); | ||
} | ||
@@ -777,3 +784,3 @@ return null; | ||
for (var key in propValue) { | ||
if (has$1(propValue, key)) { | ||
if (has(propValue, key)) { | ||
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); | ||
@@ -808,10 +815,15 @@ if (error instanceof Error) { | ||
function validate(props, propName, componentName, location, propFullName) { | ||
var expectedTypes = []; | ||
for (var i = 0; i < arrayOfTypeCheckers.length; i++) { | ||
var checker = arrayOfTypeCheckers[i]; | ||
if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1) == null) { | ||
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1); | ||
if (checkerResult == null) { | ||
return null; | ||
} | ||
if (checkerResult.data && has(checkerResult.data, 'expectedType')) { | ||
expectedTypes.push(checkerResult.data.expectedType); | ||
} | ||
} | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); | ||
var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': ''; | ||
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.')); | ||
} | ||
@@ -831,2 +843,9 @@ return createChainableTypeChecker(validate); | ||
function invalidValidatorError(componentName, location, propFullName, key, type) { | ||
return new PropTypeError( | ||
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + | ||
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.' | ||
); | ||
} | ||
function createShapeTypeChecker(shapeTypes) { | ||
@@ -841,4 +860,4 @@ function validate(props, propName, componentName, location, propFullName) { | ||
var checker = shapeTypes[key]; | ||
if (!checker) { | ||
continue; | ||
if (typeof checker !== 'function') { | ||
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | ||
} | ||
@@ -862,7 +881,9 @@ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1); | ||
} | ||
// We need to check all keys in case some are required but missing from | ||
// props. | ||
// We need to check all keys in case some are required but missing from props. | ||
var allKeys = objectAssign({}, props[propName], shapeTypes); | ||
for (var key in allKeys) { | ||
var checker = shapeTypes[key]; | ||
if (has(shapeTypes, key) && typeof checker !== 'function') { | ||
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker)); | ||
} | ||
if (!checker) { | ||
@@ -872,3 +893,3 @@ return new PropTypeError( | ||
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') + | ||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') | ||
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') | ||
); | ||
@@ -1049,2 +1070,3 @@ } | ||
array: shim, | ||
bigint: shim, | ||
bool: shim, | ||
@@ -1051,0 +1073,0 @@ func: shim, |
{ | ||
"name": "react-gauge-ultimate", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Powerful gauge chart for React", | ||
@@ -32,19 +32,20 @@ "author": "boof-tech", | ||
"cross-env": "^7.0.2", | ||
"eslint": "^6.8.0", | ||
"eslint-config-prettier": "^6.7.0", | ||
"eslint-config-standard": "^14.1.0", | ||
"eslint-config-standard-react": "^9.2.0", | ||
"eslint": "^8.19.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-config-standard": "^17.0.0", | ||
"eslint-config-standard-react": "^11.0.1", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-node": "^11.0.0", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"eslint-plugin-promise": "^4.2.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-promise": "^6.0.0", | ||
"eslint-plugin-react": "^7.17.0", | ||
"eslint-plugin-standard": "^4.0.1", | ||
"gh-pages": "^2.2.0", | ||
"eslint-plugin-standard": "^5.0.0", | ||
"gh-pages": "^4.0.0", | ||
"microbundle-crl": "^0.13.10", | ||
"node-sass": "^7.0.1", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.0.4", | ||
"react": "^16.13.1", | ||
"react-dom": "^16.13.1", | ||
"react-scripts": "^3.2.0" | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"react-scripts": "^5.0.1" | ||
}, | ||
@@ -56,6 +57,6 @@ "files": [ | ||
"classnames": "^2.3.1", | ||
"d3": "^6.2.0", | ||
"lodash": "^4.17.21", | ||
"node-sass": "^4.14.1" | ||
"node-sass": "^4.14.1", | ||
"d3": "^7.6.1" | ||
} | ||
} |
@@ -0,1 +1,2 @@ | ||
<<<<<<< HEAD | ||
# react-gauge-ultimate | ||
@@ -8,6 +9,14 @@ | ||
======= | ||
# test | ||
> Made with create-react-library | ||
[![NPM](https://img.shields.io/npm/v/test.svg)](https://www.npmjs.com/package/test) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) | ||
>>>>>>> 4bff4843c937b1f95c6ade461e778766958a23b3 | ||
## Install | ||
```bash | ||
<<<<<<< HEAD | ||
npm i react-gauge-ultimate | ||
@@ -18,2 +27,5 @@ ``` | ||
yarn add react-gauge-ultimate | ||
======= | ||
npm install --save test | ||
>>>>>>> 4bff4843c937b1f95c6ade461e778766958a23b3 | ||
``` | ||
@@ -24,2 +36,3 @@ | ||
```jsx | ||
<<<<<<< HEAD | ||
import React from 'react' | ||
@@ -76,1 +89,18 @@ | ||
MIT © [boof-tech](https://github.com/boof-tech) | ||
======= | ||
import React, { Component } from 'react' | ||
import MyComponent from 'test' | ||
import 'test/dist/index.css' | ||
class Example extends Component { | ||
render() { | ||
return <MyComponent /> | ||
} | ||
} | ||
``` | ||
## License | ||
MIT © [test](https://github.com/test) | ||
>>>>>>> 4bff4843c937b1f95c6ade461e778766958a23b3 |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
342393
2568
103
20
+ Addedcommander@7.2.0(transitive)
+ Addedd3@7.9.0(transitive)
+ Addedd3-array@3.2.4(transitive)
+ Addedd3-axis@3.0.0(transitive)
+ Addedd3-brush@3.0.0(transitive)
+ Addedd3-chord@3.0.1(transitive)
+ Addedd3-color@3.1.0(transitive)
+ Addedd3-contour@4.0.2(transitive)
+ Addedd3-delaunay@6.0.4(transitive)
+ Addedd3-dispatch@3.0.1(transitive)
+ Addedd3-drag@3.0.0(transitive)
+ Addedd3-dsv@3.0.1(transitive)
+ Addedd3-ease@3.0.1(transitive)
+ Addedd3-fetch@3.0.1(transitive)
+ Addedd3-force@3.0.0(transitive)
+ Addedd3-format@3.1.0(transitive)
+ Addedd3-geo@3.1.1(transitive)
+ Addedd3-hierarchy@3.1.2(transitive)
+ Addedd3-interpolate@3.0.1(transitive)
+ Addedd3-path@3.1.0(transitive)
+ Addedd3-polygon@3.0.1(transitive)
+ Addedd3-quadtree@3.0.1(transitive)
+ Addedd3-random@3.0.1(transitive)
+ Addedd3-scale@4.0.2(transitive)
+ Addedd3-scale-chromatic@3.1.0(transitive)
+ Addedd3-selection@3.0.0(transitive)
+ Addedd3-shape@3.2.0(transitive)
+ Addedd3-time@3.1.0(transitive)
+ Addedd3-time-format@4.1.0(transitive)
+ Addedd3-timer@3.0.1(transitive)
+ Addedd3-transition@3.0.1(transitive)
+ Addedd3-zoom@3.0.0(transitive)
+ Addeddelaunator@5.0.1(transitive)
+ Addediconv-lite@0.6.3(transitive)
+ Addedinternmap@2.0.3(transitive)
+ Addedrobust-predicates@3.0.2(transitive)
- Removedcommander@2.20.3(transitive)
- Removedd3@6.7.0(transitive)
- Removedd3-array@2.12.1(transitive)
- Removedd3-axis@2.1.0(transitive)
- Removedd3-brush@2.1.0(transitive)
- Removedd3-chord@2.0.0(transitive)
- Removedd3-color@2.0.0(transitive)
- Removedd3-contour@2.0.0(transitive)
- Removedd3-delaunay@5.3.0(transitive)
- Removedd3-dispatch@2.0.0(transitive)
- Removedd3-drag@2.0.0(transitive)
- Removedd3-dsv@2.0.0(transitive)
- Removedd3-ease@2.0.0(transitive)
- Removedd3-fetch@2.0.0(transitive)
- Removedd3-force@2.1.1(transitive)
- Removedd3-format@2.0.0(transitive)
- Removedd3-geo@2.0.2(transitive)
- Removedd3-hierarchy@2.0.0(transitive)
- Removedd3-interpolate@2.0.1(transitive)
- Removedd3-path@2.0.0(transitive)
- Removedd3-polygon@2.0.0(transitive)
- Removedd3-quadtree@2.0.0(transitive)
- Removedd3-random@2.2.2(transitive)
- Removedd3-scale@3.3.0(transitive)
- Removedd3-scale-chromatic@2.0.0(transitive)
- Removedd3-selection@2.0.0(transitive)
- Removedd3-shape@2.1.0(transitive)
- Removedd3-time@2.1.1(transitive)
- Removedd3-time-format@3.0.0(transitive)
- Removedd3-timer@2.0.0(transitive)
- Removedd3-transition@2.0.0(transitive)
- Removedd3-zoom@2.0.0(transitive)
- Removeddelaunator@4.0.1(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinternmap@1.0.1(transitive)
Updatedd3@^7.6.1