redux-vue 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.babelrc CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "presets": [["@babel/preset-env", { "targets": { "node": "current" } }]],
2
+ "presets": [["@babel/preset-env", { "targets": { "node": "current" }, "modules": "commonjs" }]],
3
3
  "plugins": ["@babel/plugin-proposal-export-default-from"]
4
4
  }
package/lib/connect.js CHANGED
@@ -1,4 +1,11 @@
1
- import normalizeProps from './normalizeProps';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = connect;
7
+ var _normalizeProps = _interopRequireDefault(require("./normalizeProps"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
2
9
  function noop() {}
3
10
  function getStore(component) {
4
11
  return component.$store;
@@ -53,15 +60,15 @@ function getProps(component) {
53
60
  * @param mergeProps - optional; receives (stateProps, dispatchProps) -> props
54
61
  * @returns Function (children) => VueComponentDescriptor
55
62
  */
56
- export default function connect(mapStateToProps, mapActionsToProps, mergeProps) {
63
+ function connect(mapStateToProps, mapActionsToProps, mergeProps) {
57
64
  mapStateToProps = mapStateToProps || noop;
58
65
  mapActionsToProps = mapActionsToProps || noop;
59
66
  return children => {
60
67
  /** @namespace children.collect */
61
68
  if (children.collect) {
62
69
  children.props = {
63
- ...normalizeProps(children.props || {}),
64
- ...normalizeProps(children.collect || {})
70
+ ...(0, _normalizeProps.default)(children.props || {}),
71
+ ...(0, _normalizeProps.default)(children.collect || {})
65
72
  };
66
73
  const msg = `vua-redux: collect is deprecated, use props ` + `in ${children.name || 'anonymous'} component`;
67
74
  console.warn(msg);
package/lib/index.js CHANGED
@@ -1,2 +1,20 @@
1
- export { default as connect } from './connect';
2
- export { default as reduxStorePlugin } from './reduxStorePlugin';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "connect", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _connect.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "reduxStorePlugin", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _reduxStorePlugin.default;
16
+ }
17
+ });
18
+ var _connect = _interopRequireDefault(require("./connect"));
19
+ var _reduxStorePlugin = _interopRequireDefault(require("./reduxStorePlugin"));
20
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -1,8 +1,14 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = normalizeProps;
1
7
  const isArray = Array.isArray;
2
8
  const isPlainObject = v => v !== null && typeof v === 'object' && Object.getPrototypeOf(v) === Object.prototype;
3
9
 
4
10
  // https://github.com/vuejs/vue/blob/dev/src/util/options.js
5
- export default function normalizeProps(props) {
11
+ function normalizeProps(props) {
6
12
  var i,
7
13
  val,
8
14
  normalizedProps = {};
@@ -1,4 +1,10 @@
1
- export default function reduxStorePlugin(Vue, storeId = 'store') {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = reduxStorePlugin;
7
+ function reduxStorePlugin(Vue, storeId = 'store') {
2
8
  Vue.mixin({
3
9
  beforeCreate() {
4
10
  const options = this.$options;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redux-vue",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Vue Redux binding higher order component",
5
5
  "author": "Nadim Tuhin",
6
6
  "repository": {