Project files
This commit is contained in:
37
receipeServer/frontend_old/node_modules/hoist-non-react-statics/CHANGELOG.md
generated
vendored
Normal file
37
receipeServer/frontend_old/node_modules/hoist-non-react-statics/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
# 3.3.2 (January 22, 2020)
|
||||
- Fix `React.memo` for v16.12+ (#93)
|
||||
|
||||
# 3.3.1 (November 14, 2019)
|
||||
- Fix for UMD bundle (#85)
|
||||
- Tooling changes (#83, #84, #87)
|
||||
|
||||
# 3.3.0 (January 23, 2019)
|
||||
- Prevent hoisting of React.memo statics (#73)
|
||||
|
||||
# 3.2.1 (December 3, 2018)
|
||||
- Fixed `defaultProps`, `displayName` and `propTypes` being hoisted from `React.forwardRef` to `React.forwardRef`. ([#71])
|
||||
|
||||
# 3.2.0 (November 26, 2018)
|
||||
- Added support for `getDerivedStateFromError`. ([#68])
|
||||
- Added support for React versions less than 0.14. ([#69])
|
||||
|
||||
# 3.1.0 (October 30, 2018)
|
||||
- Added support for `contextType`. ([#62])
|
||||
- Reduced bundle size. ([e89c7a6])
|
||||
- Removed TypeScript definitions. ([#61])
|
||||
|
||||
# 3.0.1 (July 28, 2018)
|
||||
- Fixed prop-types warnings. ([e0846fe])
|
||||
|
||||
# 3.0.0 (July 27, 2018)
|
||||
- Dropped support for React versions less than 0.14. ([#55])
|
||||
- Added support for `React.forwardRef` components. ([#55])
|
||||
|
||||
[#55]: https://github.com/mridgway/hoist-non-react-statics/pull/55
|
||||
[#61]: https://github.com/mridgway/hoist-non-react-statics/pull/61
|
||||
[#62]: https://github.com/mridgway/hoist-non-react-statics/pull/62
|
||||
[#68]: https://github.com/mridgway/hoist-non-react-statics/pull/68
|
||||
[#69]: https://github.com/mridgway/hoist-non-react-statics/pull/69
|
||||
[#71]: https://github.com/mridgway/hoist-non-react-statics/pull/71
|
||||
[e0846fe]: https://github.com/mridgway/hoist-non-react-statics/commit/e0846feefbad8b34d300de9966ffd607aacb81a3
|
||||
[e89c7a6]: https://github.com/mridgway/hoist-non-react-statics/commit/e89c7a6168edc19eeadb2d149e600b888e8b0446
|
||||
29
receipeServer/frontend_old/node_modules/hoist-non-react-statics/LICENSE.md
generated
vendored
Normal file
29
receipeServer/frontend_old/node_modules/hoist-non-react-statics/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
Software License Agreement (BSD License)
|
||||
========================================
|
||||
|
||||
Copyright (c) 2015, Yahoo! Inc. All rights reserved.
|
||||
----------------------------------------------------
|
||||
|
||||
Redistribution and use of this software in source and binary forms, with or
|
||||
without modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
* Neither the name of Yahoo! Inc. nor the names of YUI's contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission of Yahoo! Inc.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
55
receipeServer/frontend_old/node_modules/hoist-non-react-statics/README.md
generated
vendored
Normal file
55
receipeServer/frontend_old/node_modules/hoist-non-react-statics/README.md
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# hoist-non-react-statics
|
||||
|
||||
[](http://badge.fury.io/js/hoist-non-react-statics)
|
||||
[](https://travis-ci.org/mridgway/hoist-non-react-statics)
|
||||
[](https://coveralls.io/r/mridgway/hoist-non-react-statics?branch=master)
|
||||
[](https://david-dm.org/mridgway/hoist-non-react-statics)
|
||||
[](https://david-dm.org/mridgway/hoist-non-react-statics#info=devDependencies)
|
||||
|
||||
Copies non-react specific statics from a child component to a parent component.
|
||||
Similar to `Object.assign`, but with React static keywords blacklisted from
|
||||
being overridden.
|
||||
|
||||
```bash
|
||||
$ npm install --save hoist-non-react-statics
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import hoistNonReactStatics from 'hoist-non-react-statics';
|
||||
|
||||
hoistNonReactStatics(targetComponent, sourceComponent);
|
||||
```
|
||||
|
||||
If you have specific statics that you don't want to be hoisted, you can also pass a third parameter to exclude them:
|
||||
|
||||
```js
|
||||
hoistNonReactStatics(targetComponent, sourceComponent, { myStatic: true, myOtherStatic: true });
|
||||
```
|
||||
|
||||
## What does this module do?
|
||||
|
||||
See this [explanation](https://facebook.github.io/react/docs/higher-order-components.html#static-methods-must-be-copied-over) from the React docs.
|
||||
|
||||
## Compatible React Versions
|
||||
|
||||
Please use latest 3.x. Versions prior to 3.x will not support ForwardRefs.
|
||||
|
||||
| hoist-non-react-statics Version | Compatible React Version |
|
||||
|--------------------------|-------------------------------|
|
||||
| 3.x | 0.13-16.x With ForwardRef Support |
|
||||
| 2.x | 0.13-16.x Without ForwardRef Support |
|
||||
| 1.x | 0.13-16.2 |
|
||||
|
||||
## Browser Support
|
||||
|
||||
This package uses `Object.defineProperty` which has a broken implementation in IE8. In order to use this package in IE8, you will need a polyfill that fixes this method.
|
||||
|
||||
## License
|
||||
This software is free to use under the Yahoo Inc. BSD license.
|
||||
See the [LICENSE file][] for license text and copyright information.
|
||||
|
||||
[LICENSE file]: https://github.com/mridgway/hoist-non-react-statics/blob/master/LICENSE.md
|
||||
|
||||
Third-party open source code used are listed in our [package.json file]( https://github.com/mridgway/hoist-non-react-statics/blob/master/package.json).
|
||||
55
receipeServer/frontend_old/node_modules/hoist-non-react-statics/package.json
generated
vendored
Normal file
55
receipeServer/frontend_old/node_modules/hoist-non-react-statics/package.json
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "hoist-non-react-statics",
|
||||
"version": "3.3.2",
|
||||
"description": "Copies non-react specific statics from a child component to a parent component",
|
||||
"main": "dist/hoist-non-react-statics.cjs.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mridgway/hoist-non-react-statics.git"
|
||||
},
|
||||
"files": [
|
||||
"src",
|
||||
"dist",
|
||||
"index.d.ts"
|
||||
],
|
||||
"scripts": {
|
||||
"lint": "eslint src",
|
||||
"build": "rimraf dist && rollup -c",
|
||||
"test": "nyc mocha tests/unit/ --recursive --reporter spec --require=@babel/register",
|
||||
"coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||
"prepublish": "npm test"
|
||||
},
|
||||
"author": "Michael Ridgway <mcridgway@gmail.com>",
|
||||
"license": "BSD-3-Clause",
|
||||
"dependencies": {
|
||||
"react-is": "^16.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.5.0",
|
||||
"@babel/plugin-proposal-class-properties": "^7.5.0",
|
||||
"@babel/preset-env": "^7.5.0",
|
||||
"@babel/preset-react": "^7.0.0",
|
||||
"@babel/register": "^7.4.4",
|
||||
"chai": "^4.2.0",
|
||||
"coveralls": "^2.11.1",
|
||||
"create-react-class": "^15.5.3",
|
||||
"eslint": "^4.13.1",
|
||||
"mocha": "^6.1.4",
|
||||
"nyc": "^14.1.1",
|
||||
"pre-commit": "^1.0.7",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "^16.7.0",
|
||||
"rimraf": "^2.6.2",
|
||||
"rollup": "^1.16.6",
|
||||
"rollup-plugin-babel": "^4.3.3",
|
||||
"rollup-plugin-commonjs": "^10.0.1",
|
||||
"rollup-plugin-node-resolve": "^5.2.0",
|
||||
"rollup-plugin-terser": "^5.1.1"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"keywords": [
|
||||
"react"
|
||||
]
|
||||
}
|
||||
104
receipeServer/frontend_old/node_modules/hoist-non-react-statics/src/index.js
generated
vendored
Normal file
104
receipeServer/frontend_old/node_modules/hoist-non-react-statics/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
/**
|
||||
* Copyright 2015, Yahoo! Inc.
|
||||
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
|
||||
*/
|
||||
import { ForwardRef, Memo, isMemo } from 'react-is';
|
||||
|
||||
const REACT_STATICS = {
|
||||
childContextTypes: true,
|
||||
contextType: true,
|
||||
contextTypes: true,
|
||||
defaultProps: true,
|
||||
displayName: true,
|
||||
getDefaultProps: true,
|
||||
getDerivedStateFromError: true,
|
||||
getDerivedStateFromProps: true,
|
||||
mixins: true,
|
||||
propTypes: true,
|
||||
type: true
|
||||
};
|
||||
|
||||
const KNOWN_STATICS = {
|
||||
name: true,
|
||||
length: true,
|
||||
prototype: true,
|
||||
caller: true,
|
||||
callee: true,
|
||||
arguments: true,
|
||||
arity: true
|
||||
};
|
||||
|
||||
const FORWARD_REF_STATICS = {
|
||||
'$$typeof': true,
|
||||
render: true,
|
||||
defaultProps: true,
|
||||
displayName: true,
|
||||
propTypes: true
|
||||
};
|
||||
|
||||
const MEMO_STATICS = {
|
||||
'$$typeof': true,
|
||||
compare: true,
|
||||
defaultProps: true,
|
||||
displayName: true,
|
||||
propTypes: true,
|
||||
type: true,
|
||||
}
|
||||
|
||||
const TYPE_STATICS = {};
|
||||
TYPE_STATICS[ForwardRef] = FORWARD_REF_STATICS;
|
||||
TYPE_STATICS[Memo] = MEMO_STATICS;
|
||||
|
||||
function getStatics(component) {
|
||||
// React v16.11 and below
|
||||
if (isMemo(component)) {
|
||||
return MEMO_STATICS;
|
||||
}
|
||||
|
||||
// React v16.12 and above
|
||||
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
|
||||
}
|
||||
|
||||
const defineProperty = Object.defineProperty;
|
||||
const getOwnPropertyNames = Object.getOwnPropertyNames;
|
||||
const getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
||||
const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||||
const getPrototypeOf = Object.getPrototypeOf;
|
||||
const objectPrototype = Object.prototype;
|
||||
|
||||
export default function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
||||
if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components
|
||||
|
||||
if (objectPrototype) {
|
||||
const inheritedComponent = getPrototypeOf(sourceComponent);
|
||||
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
||||
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
||||
}
|
||||
}
|
||||
|
||||
let keys = getOwnPropertyNames(sourceComponent);
|
||||
|
||||
if (getOwnPropertySymbols) {
|
||||
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
||||
}
|
||||
|
||||
const targetStatics = getStatics(targetComponent);
|
||||
const sourceStatics = getStatics(sourceComponent);
|
||||
|
||||
for (let i = 0; i < keys.length; ++i) {
|
||||
const key = keys[i];
|
||||
if (!KNOWN_STATICS[key] &&
|
||||
!(blacklist && blacklist[key]) &&
|
||||
!(sourceStatics && sourceStatics[key]) &&
|
||||
!(targetStatics && targetStatics[key])
|
||||
) {
|
||||
const descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
||||
try { // Avoid failures from read-only properties
|
||||
defineProperty(targetComponent, key, descriptor);
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return targetComponent;
|
||||
};
|
||||
Reference in New Issue
Block a user