Latest updates from IceHrmPro
This commit is contained in:
56
web/node_modules/mini-store/CHANGELOG.md
generated
vendored
Normal file
56
web/node_modules/mini-store/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
||||
|
||||
<a name="3.0.2"></a>
|
||||
## [3.0.2](https://github.com/yesmeck/mini-store/compare/v3.0.1...v3.0.2) (2020-04-13)
|
||||
|
||||
|
||||
|
||||
<a name="3.0.1"></a>
|
||||
## [3.0.1](https://github.com/yesmeck/mini-store/compare/v3.0.0...v3.0.1) (2020-03-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* type error ([f8399f0](https://github.com/yesmeck/mini-store/commit/f8399f0))
|
||||
|
||||
|
||||
|
||||
<a name="3.0.0"></a>
|
||||
# [3.0.0](https://github.com/yesmeck/mini-store/compare/v2.0.0...v3.0.0) (2020-03-27)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* new Context and TypeScript ([9fcb219](https://github.com/yesmeck/mini-store/commit/9fcb219))
|
||||
|
||||
|
||||
|
||||
<a name="2.0.0"></a>
|
||||
# [2.0.0](https://github.com/yesmeck/mini-store/compare/v1.1.2...v2.0.0) (2018-10-12)
|
||||
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* Connected component will behavior as a pure component. ([4a10d4a](https://github.com/yesmeck/mini-store/commit/4a10d4a))
|
||||
|
||||
|
||||
|
||||
<a name="1.1.2"></a>
|
||||
## [1.1.2](https://github.com/yesmeck/mini-store/compare/v1.1.1...v1.1.2) (2018-08-13)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* state comparition ([9d5251b](https://github.com/yesmeck/mini-store/commit/9d5251b))
|
||||
|
||||
|
||||
|
||||
<a name="1.1.1"></a>
|
||||
## [1.1.1](https://github.com/yesmeck/mini-store/compare/v1.1.0...v1.1.1) (2018-08-10)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* mapStateToProps is not invoked when props changeS ([2e511b6](https://github.com/yesmeck/mini-store/commit/2e511b6))
|
||||
95
web/node_modules/mini-store/README.md
generated
vendored
Normal file
95
web/node_modules/mini-store/README.md
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
# mini-store
|
||||
|
||||
[](https://travis-ci.org/yesmeck/mini-store)
|
||||
|
||||
A state store for React component.
|
||||
|
||||
## Motivation
|
||||
|
||||
When you want to share a component's state to another one, a commom pattern in React world is [lifting state up](https://reactjs.org/docs/lifting-state-up.html#lifting-state-up). But one problem of this pattern is performance, assume we have a component in following hierarchy:
|
||||
|
||||
```javascript
|
||||
<Parent>
|
||||
<ChildA />
|
||||
<ChildB />
|
||||
<ChildC />
|
||||
</Parent>
|
||||
```
|
||||
|
||||
`ChildA` want to share state with `ChildB`, so you lifting `ChildA`'s state up to `Parent`. Now, when `ChildA`'s state changes, the whole `Parent` will rerender, includes `ChildC` which should not happen.
|
||||
|
||||
Redux do a good job at this situation throgh keeping all state in store, then component can subscribe state's changes, and only connected components will rerender. But `redux` + `react-redux` is overkill when you are writing a component library. So I wrote this little library, It's like Redux's store without "reducer" and "dispatch".
|
||||
|
||||
## Example
|
||||
|
||||
[See this demo online.](https://codesandbox.io/s/mq6223x08p)
|
||||
|
||||
```javascript
|
||||
import { Provider, create, connect } from 'mini-store';
|
||||
|
||||
class Counter extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.store = create({
|
||||
count: 0,
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<Provider store={this.store}>
|
||||
<div>
|
||||
<Buttons />
|
||||
<Result />
|
||||
</div>
|
||||
</Provider>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@connect()
|
||||
class Buttons extends React.Component {
|
||||
handleClick = (step) => () => {
|
||||
const { store } = this.props;
|
||||
const { count } = store.getState();
|
||||
store.setState({ count: count + step });
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<button onClick={this.handleClick(1)}>+</button>
|
||||
<button onClick={this.handleClick(-1)}>-</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@connect((state) => ({ count: state.count }))
|
||||
class Result extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>{this.props.count}</div>
|
||||
);
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### `create(initialState)`
|
||||
|
||||
Creates a store that holds the state. `initialState` is plain object.
|
||||
|
||||
### `<Provider store>`
|
||||
|
||||
Makes the store available to the connect() calls in the component hierarchy below.
|
||||
|
||||
### `connect(mapStateToProps)`
|
||||
|
||||
Connects a React component to the store. It works like Redux's `connect`, but only accept `mapStateToProps`. The connected component also receive `store` as a prop, you can call `setState` directly on store.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
11
web/node_modules/mini-store/cjs/PropTypes.js
generated
vendored
Normal file
11
web/node_modules/mini-store/cjs/PropTypes.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var prop_types_1 = __importDefault(require("prop-types"));
|
||||
exports.storeShape = prop_types_1.default.shape({
|
||||
subscribe: prop_types_1.default.func.isRequired,
|
||||
setState: prop_types_1.default.func.isRequired,
|
||||
getState: prop_types_1.default.func.isRequired,
|
||||
});
|
||||
39
web/node_modules/mini-store/cjs/Provider.js
generated
vendored
Normal file
39
web/node_modules/mini-store/cjs/Provider.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var react_1 = __importStar(require("react"));
|
||||
var PropTypes_1 = require("./PropTypes");
|
||||
exports.MiniStoreContext = react_1.createContext(null);
|
||||
var Provider = /** @class */ (function (_super) {
|
||||
__extends(Provider, _super);
|
||||
function Provider() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Provider.prototype.render = function () {
|
||||
return react_1.default.createElement(exports.MiniStoreContext.Provider, { value: this.props.store }, this.props.children);
|
||||
};
|
||||
Provider.propTypes = {
|
||||
store: PropTypes_1.storeShape.isRequired,
|
||||
};
|
||||
return Provider;
|
||||
}(react_1.Component));
|
||||
exports.Provider = Provider;
|
||||
24
web/node_modules/mini-store/cjs/__tests__/Provider.test.js
generated
vendored
Normal file
24
web/node_modules/mini-store/cjs/__tests__/Provider.test.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
"use strict";
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var react_1 = __importStar(require("react"));
|
||||
var enzyme_1 = require("enzyme");
|
||||
var index_1 = require("../index");
|
||||
var Provider_1 = require("../Provider");
|
||||
test('store context', function (done) {
|
||||
var store = index_1.create({});
|
||||
var App = function () {
|
||||
var contextStore = react_1.useContext(Provider_1.MiniStoreContext);
|
||||
expect(contextStore).toBe(store);
|
||||
done();
|
||||
return react_1.default.createElement("div", null, "hello");
|
||||
};
|
||||
enzyme_1.mount(react_1.default.createElement(index_1.Provider, { store: store },
|
||||
react_1.default.createElement(App, null)));
|
||||
});
|
||||
166
web/node_modules/mini-store/cjs/__tests__/connect.test.js
generated
vendored
Normal file
166
web/node_modules/mini-store/cjs/__tests__/connect.test.js
generated
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var react_1 = __importDefault(require("react"));
|
||||
var enzyme_1 = require("enzyme");
|
||||
var index_1 = require("../index");
|
||||
var StatelessApp;
|
||||
var Connected;
|
||||
var store;
|
||||
var wrapper;
|
||||
var StatefulApp = /** @class */ (function (_super) {
|
||||
__extends(StatefulApp, _super);
|
||||
function StatefulApp() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
StatefulApp.prototype.render = function () {
|
||||
return (react_1.default.createElement("div", null, this.props.msg));
|
||||
};
|
||||
return StatefulApp;
|
||||
}(react_1.default.Component));
|
||||
describe('stateless', function () {
|
||||
beforeEach(function () {
|
||||
StatelessApp = function (_a) {
|
||||
var msg = _a.msg;
|
||||
return react_1.default.createElement("div", null, msg);
|
||||
};
|
||||
Connected = index_1.connect(function (state) { return state; })(StatelessApp);
|
||||
store = index_1.create({ msg: 'hello', count: 0 });
|
||||
wrapper = enzyme_1.mount(react_1.default.createElement(index_1.Provider, { store: store },
|
||||
react_1.default.createElement(Connected, null)));
|
||||
});
|
||||
test('map state to props', function () {
|
||||
expect(wrapper.text()).toBe('hello');
|
||||
});
|
||||
test('renrender as subscribed state changes', function () {
|
||||
store.setState({ msg: 'halo' });
|
||||
expect(wrapper.text()).toBe('halo');
|
||||
});
|
||||
test('on rerender when unsubscribed state changes', function () {
|
||||
store.setState({ count: 1 });
|
||||
expect(wrapper.text()).toBe('hello');
|
||||
});
|
||||
test('do not subscribe', function () {
|
||||
Connected = index_1.connect()(StatelessApp);
|
||||
wrapper = enzyme_1.mount(react_1.default.createElement(index_1.Provider, { store: store },
|
||||
react_1.default.createElement(Connected, { msg: "hello" })));
|
||||
expect(wrapper.instance().unsubscribe).toBeUndefined();
|
||||
});
|
||||
test('pass own props to mapStateToProps', function () {
|
||||
Connected = index_1.connect(function (state, props) { return ({
|
||||
msg: state.msg + " " + props.name
|
||||
}); })(StatelessApp);
|
||||
wrapper = enzyme_1.mount(react_1.default.createElement(index_1.Provider, { store: store },
|
||||
react_1.default.createElement(Connected, { name: "world" })));
|
||||
expect(wrapper.text()).toBe('hello world');
|
||||
});
|
||||
test('mapStateToProps is invoked when own props changes', function () {
|
||||
Connected = index_1.connect(function (state, props) { return ({
|
||||
msg: state.msg + " " + props.name
|
||||
}); })(StatelessApp);
|
||||
var App = /** @class */ (function (_super) {
|
||||
__extends(App, _super);
|
||||
function App() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.state = {
|
||||
name: 'world'
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
App.prototype.render = function () {
|
||||
var _this = this;
|
||||
return (react_1.default.createElement("div", null,
|
||||
react_1.default.createElement("button", { onClick: function () { return _this.setState({ name: 'there' }); } }, "Click"),
|
||||
react_1.default.createElement(Connected, { name: this.state.name })));
|
||||
};
|
||||
return App;
|
||||
}(react_1.default.Component));
|
||||
wrapper = enzyme_1.mount(react_1.default.createElement(index_1.Provider, { store: store },
|
||||
react_1.default.createElement(App, null)));
|
||||
wrapper.find('button').simulate('click');
|
||||
expect(wrapper.find(Connected).text()).toBe('hello there');
|
||||
});
|
||||
test('mapStateToProps is not invoked when own props is not used', function () {
|
||||
var mapStateToProps = jest.fn(function (state) { return ({ msg: state.msg }); });
|
||||
Connected = index_1.connect(mapStateToProps)(StatelessApp);
|
||||
var App = /** @class */ (function (_super) {
|
||||
__extends(App, _super);
|
||||
function App() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.state = {
|
||||
name: 'world'
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
App.prototype.render = function () {
|
||||
var _this = this;
|
||||
return (react_1.default.createElement("div", null,
|
||||
react_1.default.createElement("button", { onClick: function () { return _this.setState({ name: 'there' }); } }, "Click"),
|
||||
react_1.default.createElement(Connected, { name: this.state.name })));
|
||||
};
|
||||
return App;
|
||||
}(react_1.default.Component));
|
||||
wrapper = enzyme_1.mount(react_1.default.createElement(index_1.Provider, { store: store },
|
||||
react_1.default.createElement(App, null)));
|
||||
wrapper.find('button').simulate('click');
|
||||
expect(mapStateToProps).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
// https://github.com/ant-design/ant-design/issues/11723
|
||||
test('rerender component when props changes', function () {
|
||||
var Dummy = function (_a) {
|
||||
var visible = _a.visible;
|
||||
return react_1.default.createElement("div", null, visible && 'hello');
|
||||
};
|
||||
Connected = index_1.connect(function (state, props) { return ({
|
||||
visible: state.visible === false ? props.ownVisible : state.visible
|
||||
}); })(Dummy);
|
||||
var App = /** @class */ (function (_super) {
|
||||
__extends(App, _super);
|
||||
function App() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.state = {
|
||||
visible: true,
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
App.prototype.render = function () {
|
||||
var _this = this;
|
||||
return (react_1.default.createElement("div", null,
|
||||
react_1.default.createElement("button", { onClick: function () { return _this.setState({ visible: false }); } }, "Click"),
|
||||
react_1.default.createElement(Connected, { ownVisible: this.state.visible })));
|
||||
};
|
||||
return App;
|
||||
}(react_1.default.Component));
|
||||
store = index_1.create({ visible: false });
|
||||
wrapper = enzyme_1.mount(react_1.default.createElement(index_1.Provider, { store: store },
|
||||
react_1.default.createElement(App, null)));
|
||||
wrapper.find('button').simulate('click');
|
||||
expect(wrapper.find(Dummy).text()).toBe('');
|
||||
store.setState({ visible: true });
|
||||
wrapper.update();
|
||||
expect(wrapper.find(Dummy).text()).toBe('hello');
|
||||
});
|
||||
});
|
||||
describe('stateful', function () {
|
||||
beforeEach(function () {
|
||||
Connected = index_1.connect(function (state) { return state; })(StatefulApp);
|
||||
store = index_1.create({ msg: 'hello', count: 0 });
|
||||
wrapper = enzyme_1.mount(react_1.default.createElement(index_1.Provider, { store: store },
|
||||
react_1.default.createElement(Connected, null)));
|
||||
});
|
||||
});
|
||||
22
web/node_modules/mini-store/cjs/__tests__/create.test.js
generated
vendored
Normal file
22
web/node_modules/mini-store/cjs/__tests__/create.test.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var index_1 = require("../index");
|
||||
test('create', function () {
|
||||
var store = index_1.create({ foo: true });
|
||||
expect(store.getState()).toEqual({ foo: true });
|
||||
});
|
||||
test('setState', function () {
|
||||
var store = index_1.create({ foo: false, bar: 1 });
|
||||
store.setState({ foo: false });
|
||||
expect(store.getState()).toEqual({ foo: false, bar: 1 });
|
||||
});
|
||||
test('subscribe', function () {
|
||||
var store = index_1.create({ foo: false });
|
||||
var listener1 = jest.fn();
|
||||
var listener2 = jest.fn();
|
||||
store.subscribe(listener1);
|
||||
store.subscribe(listener2);
|
||||
store.setState({ foo: false });
|
||||
expect(listener1).toBeCalled();
|
||||
expect(listener2).toBeCalled();
|
||||
});
|
||||
120
web/node_modules/mini-store/cjs/connect.js
generated
vendored
Normal file
120
web/node_modules/mini-store/cjs/connect.js
generated
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
"use strict";
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
var __importStar = (this && this.__importStar) || function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var react_1 = __importStar(require("react"));
|
||||
var shallowequal_1 = __importDefault(require("shallowequal"));
|
||||
var hoist_non_react_statics_1 = __importDefault(require("hoist-non-react-statics"));
|
||||
var react_lifecycles_compat_1 = require("react-lifecycles-compat");
|
||||
var Provider_1 = require("./Provider");
|
||||
function getDisplayName(WrappedComponent) {
|
||||
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
||||
}
|
||||
var defaultMapStateToProps = function () { return ({}); };
|
||||
function connect(mapStateToProps, options) {
|
||||
if (options === void 0) { options = {}; }
|
||||
var shouldSubscribe = !!mapStateToProps;
|
||||
var finalMapStateToProps = mapStateToProps || defaultMapStateToProps;
|
||||
return function wrapWithConnect(WrappedComponent) {
|
||||
var Connect = /** @class */ (function (_super) {
|
||||
__extends(Connect, _super);
|
||||
function Connect(props, context) {
|
||||
var _this = _super.call(this, props, context) || this;
|
||||
_this.unsubscribe = null;
|
||||
_this.handleChange = function () {
|
||||
if (!_this.unsubscribe) {
|
||||
return;
|
||||
}
|
||||
var nextState = finalMapStateToProps(_this.store.getState(), _this.props);
|
||||
_this.setState({ subscribed: nextState });
|
||||
};
|
||||
_this.store = _this.context;
|
||||
_this.state = {
|
||||
subscribed: finalMapStateToProps(_this.store.getState(), props),
|
||||
store: _this.store,
|
||||
props: props,
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
Connect.getDerivedStateFromProps = function (props, prevState) {
|
||||
// using ownProps
|
||||
if (mapStateToProps && mapStateToProps.length === 2 && props !== prevState.props) {
|
||||
return {
|
||||
subscribed: finalMapStateToProps(prevState.store.getState(), props),
|
||||
props: props,
|
||||
};
|
||||
}
|
||||
return { props: props };
|
||||
};
|
||||
Connect.prototype.componentDidMount = function () {
|
||||
this.trySubscribe();
|
||||
};
|
||||
Connect.prototype.componentWillUnmount = function () {
|
||||
this.tryUnsubscribe();
|
||||
};
|
||||
Connect.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
||||
return !shallowequal_1.default(this.props, nextProps) || !shallowequal_1.default(this.state.subscribed, nextState.subscribed);
|
||||
};
|
||||
Connect.prototype.trySubscribe = function () {
|
||||
if (shouldSubscribe) {
|
||||
this.unsubscribe = this.store.subscribe(this.handleChange);
|
||||
this.handleChange();
|
||||
}
|
||||
};
|
||||
Connect.prototype.tryUnsubscribe = function () {
|
||||
if (this.unsubscribe) {
|
||||
this.unsubscribe();
|
||||
this.unsubscribe = null;
|
||||
}
|
||||
};
|
||||
Connect.prototype.render = function () {
|
||||
var props = __assign(__assign(__assign({}, this.props), this.state.subscribed), { store: this.store });
|
||||
return react_1.default.createElement(WrappedComponent, __assign({}, props, { ref: this.props.miniStoreForwardedRef }));
|
||||
};
|
||||
Connect.displayName = "Connect(" + getDisplayName(WrappedComponent) + ")";
|
||||
Connect.contextType = Provider_1.MiniStoreContext;
|
||||
return Connect;
|
||||
}(react_1.Component));
|
||||
react_lifecycles_compat_1.polyfill(Connect);
|
||||
if (options.forwardRef) {
|
||||
var forwarded = react_1.default.forwardRef(function (props, ref) {
|
||||
return react_1.default.createElement(Connect, __assign({}, props, { miniStoreForwardedRef: ref }));
|
||||
});
|
||||
return hoist_non_react_statics_1.default(forwarded, WrappedComponent);
|
||||
}
|
||||
return hoist_non_react_statics_1.default(Connect, WrappedComponent);
|
||||
};
|
||||
}
|
||||
exports.connect = connect;
|
||||
39
web/node_modules/mini-store/cjs/create.js
generated
vendored
Normal file
39
web/node_modules/mini-store/cjs/create.js
generated
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
"use strict";
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
function create(initialState) {
|
||||
var state = initialState;
|
||||
var listeners = [];
|
||||
function setState(partial) {
|
||||
state = __assign(__assign({}, state), partial);
|
||||
for (var i = 0; i < listeners.length; i++) {
|
||||
listeners[i]();
|
||||
}
|
||||
}
|
||||
function getState() {
|
||||
return state;
|
||||
}
|
||||
function subscribe(listener) {
|
||||
listeners.push(listener);
|
||||
return function unsubscribe() {
|
||||
var index = listeners.indexOf(listener);
|
||||
listeners.splice(index, 1);
|
||||
};
|
||||
}
|
||||
return {
|
||||
setState: setState,
|
||||
getState: getState,
|
||||
subscribe: subscribe,
|
||||
};
|
||||
}
|
||||
exports.create = create;
|
||||
8
web/node_modules/mini-store/cjs/index.js
generated
vendored
Normal file
8
web/node_modules/mini-store/cjs/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var Provider_1 = require("./Provider");
|
||||
exports.Provider = Provider_1.Provider;
|
||||
var connect_1 = require("./connect");
|
||||
exports.connect = connect_1.connect;
|
||||
var create_1 = require("./create");
|
||||
exports.create = create_1.create;
|
||||
23
web/node_modules/mini-store/cjs/types.js
generated
vendored
Normal file
23
web/node_modules/mini-store/cjs/types.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
// Type definitions for react-redux 7.1
|
||||
// Project: https://github.com/reduxjs/react-redux
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>,
|
||||
// Kenzie Togami <https://github.com/kenzierocks>,
|
||||
// Curits Layne <https://github.com/clayne11>
|
||||
// Frank Tan <https://github.com/tansongyang>
|
||||
// Nicholas Boll <https://github.com/nicholasboll>
|
||||
// Dibyo Majumdar <https://github.com/mdibyo>
|
||||
// Thomas Charlat <https://github.com/kallikrein>
|
||||
// Valentin Descamps <https://github.com/val1984>
|
||||
// Johann Rakotoharisoa <https://github.com/jrakotoharisoa>
|
||||
// Anatoli Papirovski <https://github.com/apapirovski>
|
||||
// Boris Sergeyev <https://github.com/surgeboris>
|
||||
// Søren Bruus Frank <https://github.com/soerenbf>
|
||||
// Jonathan Ziller <https://github.com/mrwolfz>
|
||||
// Dylan Vann <https://github.com/dylanvann>
|
||||
// Yuki Ito <https://github.com/Lazyuki>
|
||||
// Kazuma Ebina <https://github.com/kazuma1989>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
;
|
||||
6
web/node_modules/mini-store/esm/PropTypes.js
generated
vendored
Normal file
6
web/node_modules/mini-store/esm/PropTypes.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import PropTypes from 'prop-types';
|
||||
export var storeShape = PropTypes.shape({
|
||||
subscribe: PropTypes.func.isRequired,
|
||||
setState: PropTypes.func.isRequired,
|
||||
getState: PropTypes.func.isRequired,
|
||||
});
|
||||
30
web/node_modules/mini-store/esm/Provider.js
generated
vendored
Normal file
30
web/node_modules/mini-store/esm/Provider.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import React, { Component, createContext } from 'react';
|
||||
import { storeShape } from './PropTypes';
|
||||
export var MiniStoreContext = createContext(null);
|
||||
var Provider = /** @class */ (function (_super) {
|
||||
__extends(Provider, _super);
|
||||
function Provider() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
Provider.prototype.render = function () {
|
||||
return React.createElement(MiniStoreContext.Provider, { value: this.props.store }, this.props.children);
|
||||
};
|
||||
Provider.propTypes = {
|
||||
store: storeShape.isRequired,
|
||||
};
|
||||
return Provider;
|
||||
}(Component));
|
||||
export { Provider };
|
||||
15
web/node_modules/mini-store/esm/__tests__/Provider.test.js
generated
vendored
Normal file
15
web/node_modules/mini-store/esm/__tests__/Provider.test.js
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import React, { useContext } from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { create, Provider } from '../index';
|
||||
import { MiniStoreContext } from '../Provider';
|
||||
test('store context', function (done) {
|
||||
var store = create({});
|
||||
var App = function () {
|
||||
var contextStore = useContext(MiniStoreContext);
|
||||
expect(contextStore).toBe(store);
|
||||
done();
|
||||
return React.createElement("div", null, "hello");
|
||||
};
|
||||
mount(React.createElement(Provider, { store: store },
|
||||
React.createElement(App, null)));
|
||||
});
|
||||
161
web/node_modules/mini-store/esm/__tests__/connect.test.js
generated
vendored
Normal file
161
web/node_modules/mini-store/esm/__tests__/connect.test.js
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
import React from 'react';
|
||||
import { mount } from 'enzyme';
|
||||
import { create, Provider, connect } from '../index';
|
||||
var StatelessApp;
|
||||
var Connected;
|
||||
var store;
|
||||
var wrapper;
|
||||
var StatefulApp = /** @class */ (function (_super) {
|
||||
__extends(StatefulApp, _super);
|
||||
function StatefulApp() {
|
||||
return _super !== null && _super.apply(this, arguments) || this;
|
||||
}
|
||||
StatefulApp.prototype.render = function () {
|
||||
return (React.createElement("div", null, this.props.msg));
|
||||
};
|
||||
return StatefulApp;
|
||||
}(React.Component));
|
||||
describe('stateless', function () {
|
||||
beforeEach(function () {
|
||||
StatelessApp = function (_a) {
|
||||
var msg = _a.msg;
|
||||
return React.createElement("div", null, msg);
|
||||
};
|
||||
Connected = connect(function (state) { return state; })(StatelessApp);
|
||||
store = create({ msg: 'hello', count: 0 });
|
||||
wrapper = mount(React.createElement(Provider, { store: store },
|
||||
React.createElement(Connected, null)));
|
||||
});
|
||||
test('map state to props', function () {
|
||||
expect(wrapper.text()).toBe('hello');
|
||||
});
|
||||
test('renrender as subscribed state changes', function () {
|
||||
store.setState({ msg: 'halo' });
|
||||
expect(wrapper.text()).toBe('halo');
|
||||
});
|
||||
test('on rerender when unsubscribed state changes', function () {
|
||||
store.setState({ count: 1 });
|
||||
expect(wrapper.text()).toBe('hello');
|
||||
});
|
||||
test('do not subscribe', function () {
|
||||
Connected = connect()(StatelessApp);
|
||||
wrapper = mount(React.createElement(Provider, { store: store },
|
||||
React.createElement(Connected, { msg: "hello" })));
|
||||
expect(wrapper.instance().unsubscribe).toBeUndefined();
|
||||
});
|
||||
test('pass own props to mapStateToProps', function () {
|
||||
Connected = connect(function (state, props) { return ({
|
||||
msg: state.msg + " " + props.name
|
||||
}); })(StatelessApp);
|
||||
wrapper = mount(React.createElement(Provider, { store: store },
|
||||
React.createElement(Connected, { name: "world" })));
|
||||
expect(wrapper.text()).toBe('hello world');
|
||||
});
|
||||
test('mapStateToProps is invoked when own props changes', function () {
|
||||
Connected = connect(function (state, props) { return ({
|
||||
msg: state.msg + " " + props.name
|
||||
}); })(StatelessApp);
|
||||
var App = /** @class */ (function (_super) {
|
||||
__extends(App, _super);
|
||||
function App() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.state = {
|
||||
name: 'world'
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
App.prototype.render = function () {
|
||||
var _this = this;
|
||||
return (React.createElement("div", null,
|
||||
React.createElement("button", { onClick: function () { return _this.setState({ name: 'there' }); } }, "Click"),
|
||||
React.createElement(Connected, { name: this.state.name })));
|
||||
};
|
||||
return App;
|
||||
}(React.Component));
|
||||
wrapper = mount(React.createElement(Provider, { store: store },
|
||||
React.createElement(App, null)));
|
||||
wrapper.find('button').simulate('click');
|
||||
expect(wrapper.find(Connected).text()).toBe('hello there');
|
||||
});
|
||||
test('mapStateToProps is not invoked when own props is not used', function () {
|
||||
var mapStateToProps = jest.fn(function (state) { return ({ msg: state.msg }); });
|
||||
Connected = connect(mapStateToProps)(StatelessApp);
|
||||
var App = /** @class */ (function (_super) {
|
||||
__extends(App, _super);
|
||||
function App() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.state = {
|
||||
name: 'world'
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
App.prototype.render = function () {
|
||||
var _this = this;
|
||||
return (React.createElement("div", null,
|
||||
React.createElement("button", { onClick: function () { return _this.setState({ name: 'there' }); } }, "Click"),
|
||||
React.createElement(Connected, { name: this.state.name })));
|
||||
};
|
||||
return App;
|
||||
}(React.Component));
|
||||
wrapper = mount(React.createElement(Provider, { store: store },
|
||||
React.createElement(App, null)));
|
||||
wrapper.find('button').simulate('click');
|
||||
expect(mapStateToProps).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
// https://github.com/ant-design/ant-design/issues/11723
|
||||
test('rerender component when props changes', function () {
|
||||
var Dummy = function (_a) {
|
||||
var visible = _a.visible;
|
||||
return React.createElement("div", null, visible && 'hello');
|
||||
};
|
||||
Connected = connect(function (state, props) { return ({
|
||||
visible: state.visible === false ? props.ownVisible : state.visible
|
||||
}); })(Dummy);
|
||||
var App = /** @class */ (function (_super) {
|
||||
__extends(App, _super);
|
||||
function App() {
|
||||
var _this = _super !== null && _super.apply(this, arguments) || this;
|
||||
_this.state = {
|
||||
visible: true,
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
App.prototype.render = function () {
|
||||
var _this = this;
|
||||
return (React.createElement("div", null,
|
||||
React.createElement("button", { onClick: function () { return _this.setState({ visible: false }); } }, "Click"),
|
||||
React.createElement(Connected, { ownVisible: this.state.visible })));
|
||||
};
|
||||
return App;
|
||||
}(React.Component));
|
||||
store = create({ visible: false });
|
||||
wrapper = mount(React.createElement(Provider, { store: store },
|
||||
React.createElement(App, null)));
|
||||
wrapper.find('button').simulate('click');
|
||||
expect(wrapper.find(Dummy).text()).toBe('');
|
||||
store.setState({ visible: true });
|
||||
wrapper.update();
|
||||
expect(wrapper.find(Dummy).text()).toBe('hello');
|
||||
});
|
||||
});
|
||||
describe('stateful', function () {
|
||||
beforeEach(function () {
|
||||
Connected = connect(function (state) { return state; })(StatefulApp);
|
||||
store = create({ msg: 'hello', count: 0 });
|
||||
wrapper = mount(React.createElement(Provider, { store: store },
|
||||
React.createElement(Connected, null)));
|
||||
});
|
||||
});
|
||||
20
web/node_modules/mini-store/esm/__tests__/create.test.js
generated
vendored
Normal file
20
web/node_modules/mini-store/esm/__tests__/create.test.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
import { create } from '../index';
|
||||
test('create', function () {
|
||||
var store = create({ foo: true });
|
||||
expect(store.getState()).toEqual({ foo: true });
|
||||
});
|
||||
test('setState', function () {
|
||||
var store = create({ foo: false, bar: 1 });
|
||||
store.setState({ foo: false });
|
||||
expect(store.getState()).toEqual({ foo: false, bar: 1 });
|
||||
});
|
||||
test('subscribe', function () {
|
||||
var store = create({ foo: false });
|
||||
var listener1 = jest.fn();
|
||||
var listener2 = jest.fn();
|
||||
store.subscribe(listener1);
|
||||
store.subscribe(listener2);
|
||||
store.setState({ foo: false });
|
||||
expect(listener1).toBeCalled();
|
||||
expect(listener2).toBeCalled();
|
||||
});
|
||||
107
web/node_modules/mini-store/esm/connect.js
generated
vendored
Normal file
107
web/node_modules/mini-store/esm/connect.js
generated
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
var __extends = (this && this.__extends) || (function () {
|
||||
var extendStatics = function (d, b) {
|
||||
extendStatics = Object.setPrototypeOf ||
|
||||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
||||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
||||
return extendStatics(d, b);
|
||||
};
|
||||
return function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
})();
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
import { default as React, Component } from 'react';
|
||||
import shallowEqual from 'shallowequal';
|
||||
import hoistStatics from 'hoist-non-react-statics';
|
||||
import { polyfill } from 'react-lifecycles-compat';
|
||||
import { MiniStoreContext } from './Provider';
|
||||
function getDisplayName(WrappedComponent) {
|
||||
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
||||
}
|
||||
var defaultMapStateToProps = function () { return ({}); };
|
||||
export function connect(mapStateToProps, options) {
|
||||
if (options === void 0) { options = {}; }
|
||||
var shouldSubscribe = !!mapStateToProps;
|
||||
var finalMapStateToProps = mapStateToProps || defaultMapStateToProps;
|
||||
return function wrapWithConnect(WrappedComponent) {
|
||||
var Connect = /** @class */ (function (_super) {
|
||||
__extends(Connect, _super);
|
||||
function Connect(props, context) {
|
||||
var _this = _super.call(this, props, context) || this;
|
||||
_this.unsubscribe = null;
|
||||
_this.handleChange = function () {
|
||||
if (!_this.unsubscribe) {
|
||||
return;
|
||||
}
|
||||
var nextState = finalMapStateToProps(_this.store.getState(), _this.props);
|
||||
_this.setState({ subscribed: nextState });
|
||||
};
|
||||
_this.store = _this.context;
|
||||
_this.state = {
|
||||
subscribed: finalMapStateToProps(_this.store.getState(), props),
|
||||
store: _this.store,
|
||||
props: props,
|
||||
};
|
||||
return _this;
|
||||
}
|
||||
Connect.getDerivedStateFromProps = function (props, prevState) {
|
||||
// using ownProps
|
||||
if (mapStateToProps && mapStateToProps.length === 2 && props !== prevState.props) {
|
||||
return {
|
||||
subscribed: finalMapStateToProps(prevState.store.getState(), props),
|
||||
props: props,
|
||||
};
|
||||
}
|
||||
return { props: props };
|
||||
};
|
||||
Connect.prototype.componentDidMount = function () {
|
||||
this.trySubscribe();
|
||||
};
|
||||
Connect.prototype.componentWillUnmount = function () {
|
||||
this.tryUnsubscribe();
|
||||
};
|
||||
Connect.prototype.shouldComponentUpdate = function (nextProps, nextState) {
|
||||
return !shallowEqual(this.props, nextProps) || !shallowEqual(this.state.subscribed, nextState.subscribed);
|
||||
};
|
||||
Connect.prototype.trySubscribe = function () {
|
||||
if (shouldSubscribe) {
|
||||
this.unsubscribe = this.store.subscribe(this.handleChange);
|
||||
this.handleChange();
|
||||
}
|
||||
};
|
||||
Connect.prototype.tryUnsubscribe = function () {
|
||||
if (this.unsubscribe) {
|
||||
this.unsubscribe();
|
||||
this.unsubscribe = null;
|
||||
}
|
||||
};
|
||||
Connect.prototype.render = function () {
|
||||
var props = __assign(__assign(__assign({}, this.props), this.state.subscribed), { store: this.store });
|
||||
return React.createElement(WrappedComponent, __assign({}, props, { ref: this.props.miniStoreForwardedRef }));
|
||||
};
|
||||
Connect.displayName = "Connect(" + getDisplayName(WrappedComponent) + ")";
|
||||
Connect.contextType = MiniStoreContext;
|
||||
return Connect;
|
||||
}(Component));
|
||||
polyfill(Connect);
|
||||
if (options.forwardRef) {
|
||||
var forwarded = React.forwardRef(function (props, ref) {
|
||||
return React.createElement(Connect, __assign({}, props, { miniStoreForwardedRef: ref }));
|
||||
});
|
||||
return hoistStatics(forwarded, WrappedComponent);
|
||||
}
|
||||
return hoistStatics(Connect, WrappedComponent);
|
||||
};
|
||||
}
|
||||
36
web/node_modules/mini-store/esm/create.js
generated
vendored
Normal file
36
web/node_modules/mini-store/esm/create.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
var __assign = (this && this.__assign) || function () {
|
||||
__assign = Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
return __assign.apply(this, arguments);
|
||||
};
|
||||
export function create(initialState) {
|
||||
var state = initialState;
|
||||
var listeners = [];
|
||||
function setState(partial) {
|
||||
state = __assign(__assign({}, state), partial);
|
||||
for (var i = 0; i < listeners.length; i++) {
|
||||
listeners[i]();
|
||||
}
|
||||
}
|
||||
function getState() {
|
||||
return state;
|
||||
}
|
||||
function subscribe(listener) {
|
||||
listeners.push(listener);
|
||||
return function unsubscribe() {
|
||||
var index = listeners.indexOf(listener);
|
||||
listeners.splice(index, 1);
|
||||
};
|
||||
}
|
||||
return {
|
||||
setState: setState,
|
||||
getState: getState,
|
||||
subscribe: subscribe,
|
||||
};
|
||||
}
|
||||
3
web/node_modules/mini-store/esm/index.js
generated
vendored
Normal file
3
web/node_modules/mini-store/esm/index.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { Provider } from './Provider';
|
||||
export { connect } from './connect';
|
||||
export { create } from './create';
|
||||
21
web/node_modules/mini-store/esm/types.js
generated
vendored
Normal file
21
web/node_modules/mini-store/esm/types.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// Type definitions for react-redux 7.1
|
||||
// Project: https://github.com/reduxjs/react-redux
|
||||
// Definitions by: Qubo <https://github.com/tkqubo>,
|
||||
// Kenzie Togami <https://github.com/kenzierocks>,
|
||||
// Curits Layne <https://github.com/clayne11>
|
||||
// Frank Tan <https://github.com/tansongyang>
|
||||
// Nicholas Boll <https://github.com/nicholasboll>
|
||||
// Dibyo Majumdar <https://github.com/mdibyo>
|
||||
// Thomas Charlat <https://github.com/kallikrein>
|
||||
// Valentin Descamps <https://github.com/val1984>
|
||||
// Johann Rakotoharisoa <https://github.com/jrakotoharisoa>
|
||||
// Anatoli Papirovski <https://github.com/apapirovski>
|
||||
// Boris Sergeyev <https://github.com/surgeboris>
|
||||
// Søren Bruus Frank <https://github.com/soerenbf>
|
||||
// Jonathan Ziller <https://github.com/mrwolfz>
|
||||
// Dylan Vann <https://github.com/dylanvann>
|
||||
// Yuki Ito <https://github.com/Lazyuki>
|
||||
// Kazuma Ebina <https://github.com/kazuma1989>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
;
|
||||
75
web/node_modules/mini-store/package.json
generated
vendored
Normal file
75
web/node_modules/mini-store/package.json
generated
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"_from": "mini-store@^3.0.1",
|
||||
"_id": "mini-store@3.0.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-TM7IQBu+mVssLQReprx7JGftXk0EyaiIWw7yAx6E4SIZRHwgQ8XcG4dINFAaBCBihbYPJyhf7kbz7e5qk1FkuQ==",
|
||||
"_location": "/mini-store",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "mini-store@^3.0.1",
|
||||
"name": "mini-store",
|
||||
"escapedName": "mini-store",
|
||||
"rawSpec": "^3.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^3.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/rc-menu"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/mini-store/-/mini-store-3.0.2.tgz",
|
||||
"_shasum": "d63991fce1e3c96287d92fc812ee67d090e49098",
|
||||
"_spec": "mini-store@^3.0.1",
|
||||
"_where": "/Users/thilina/TestProjects/icehrm-pro/web/node_modules/rc-menu",
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@types/hoist-non-react-statics": "^3.3.1",
|
||||
"@types/react-lifecycles-compat": "^3.0.1",
|
||||
"@types/shallowequal": "^1.1.1",
|
||||
"hoist-non-react-statics": "^3.3.2",
|
||||
"prop-types": "^15.6.0",
|
||||
"react-lifecycles-compat": "^3.0.4",
|
||||
"shallowequal": "^1.0.2",
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "[](https://travis-ci.org/yesmeck/mini-store)",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^7.0.0",
|
||||
"@commitlint/config-conventional": "^7.0.1",
|
||||
"@types/enzyme": "^3.10.5",
|
||||
"@types/jest": "^25.1.4",
|
||||
"@types/react": "^16.9.26",
|
||||
"enzyme": "^3.1.0",
|
||||
"enzyme-adapter-react-16": "^1.0.2",
|
||||
"husky": "^0.14.3",
|
||||
"jest": "^25.2.2",
|
||||
"react": "^16.0.0",
|
||||
"react-dom": "^16.0.0",
|
||||
"standard-version": "^4.4.0",
|
||||
"ts-jest": "^25.2.1"
|
||||
},
|
||||
"files": [
|
||||
"cjs",
|
||||
"esm"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "cjs/index.js",
|
||||
"module": "esm/index.js",
|
||||
"name": "mini-store",
|
||||
"peerDependencies": {
|
||||
"react": ">=16.9.0",
|
||||
"react-dom": ">=16.9.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "npm run build:esm && npm run build:cjs",
|
||||
"build:cjs": "tsc --module commonjs --outDir cjs",
|
||||
"build:esm": "tsc",
|
||||
"commitmsg": "commitlint -E GIT_PARAMS",
|
||||
"prepack": "npm run build",
|
||||
"release": "standard-version",
|
||||
"test": "jest"
|
||||
},
|
||||
"version": "3.0.2"
|
||||
}
|
||||
Reference in New Issue
Block a user