reactant-model 0.122.0 → 0.123.0

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/dist/index.cjs.js CHANGED
@@ -56,7 +56,12 @@ function __spreadArray(to, from, pack) {
56
56
  }
57
57
  }
58
58
  return to.concat(ar || Array.prototype.slice.call(from));
59
- }
59
+ }
60
+
61
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
62
+ var e = new Error(message);
63
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
64
+ };
60
65
 
61
66
  var model = function (scheme) {
62
67
  var _a;
package/dist/index.esm.js CHANGED
@@ -52,7 +52,12 @@ function __spreadArray(to, from, pack) {
52
52
  }
53
53
  }
54
54
  return to.concat(ar || Array.prototype.slice.call(from));
55
- }
55
+ }
56
+
57
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
58
+ var e = new Error(message);
59
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
60
+ };
56
61
 
57
62
  var model = function (scheme) {
58
63
  var _a;
package/dist/index.umd.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("mutative"),require("reactant-module")):"function"==typeof define&&define.amd?define(["exports","mutative","reactant-module"],t):t((e=e||self).reactantModel={},e.mutative,e.reactantModule)}(this,(function(e,t,r){"use strict";var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};function a(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function o(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}e.model=function(e){var i,c;return Object.keys(e.actions).forEach((function(i){var l,s=e.actions[i];Object.assign(e.actions,((l={})[i]=function(){for(var e,l,u,f,y,d,p=[],v=0;v<arguments.length;v++)p[v]=arguments[v];c[r.enablePatchesKey]?(f=(e=a(t.create(c[r.stateKey],(function(e){s.apply(void 0,o([],a(p),!1))(e)}),{enablePatches:!0,strict:c[r.strictKey],enableAutoFreeze:c[r.enableAutoFreezeKey]}),3))[0],y=e[1],d=e[2]):f=t.create(c[r.stateKey],(function(e){s.apply(void 0,o([],a(p),!1))(e)}),{strict:c[r.strictKey],enableAutoFreeze:c[r.enableAutoFreezeKey]});var h=null===(u=c[r.storeKey])||void 0===u?void 0:u.getState();c[r.storeKey].dispatch(n({type:c[r.identifierKey],method:i,state:n(n({},h),(l={},l[c[r.identifierKey]]=f,l)),_reactant:r.actionIdentifier},c[r.enablePatchesKey]?{_patches:y,_inversePatches:d}:{}))},l))})),c=n(((i={})[r.nameKey]=e.name,i[r.stateKey]=n({},e.state),i),e.actions)},Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("mutative"),require("reactant-module")):"function"==typeof define&&define.amd?define(["exports","mutative","reactant-module"],t):t((e=e||self).reactantModel={},e.mutative,e.reactantModule)}(this,(function(e,t,r){"use strict";var n=function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)};function a(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function o(e,t,r){if(r||2===arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError;e.model=function(e){var i,c;return Object.keys(e.actions).forEach((function(i){var l,s=e.actions[i];Object.assign(e.actions,((l={})[i]=function(){for(var e,l,u,f,y,p,d=[],v=0;v<arguments.length;v++)d[v]=arguments[v];c[r.enablePatchesKey]?(f=(e=a(t.create(c[r.stateKey],(function(e){s.apply(void 0,o([],a(d),!1))(e)}),{enablePatches:!0,strict:c[r.strictKey],enableAutoFreeze:c[r.enableAutoFreezeKey]}),3))[0],y=e[1],p=e[2]):f=t.create(c[r.stateKey],(function(e){s.apply(void 0,o([],a(d),!1))(e)}),{strict:c[r.strictKey],enableAutoFreeze:c[r.enableAutoFreezeKey]});var h=null===(u=c[r.storeKey])||void 0===u?void 0:u.getState();c[r.storeKey].dispatch(n({type:c[r.identifierKey],method:i,state:n(n({},h),(l={},l[c[r.identifierKey]]=f,l)),_reactant:r.actionIdentifier},c[r.enablePatchesKey]?{_patches:y,_inversePatches:p}:{}))},l))})),c=n(((i={})[r.nameKey]=e.name,i[r.stateKey]=n({},e.state),i),e.actions)},Object.defineProperty(e,"__esModule",{value:!0})}));
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EASR,MAAM,iBAAiB,CAAC;AAEzB,UAAU,MAAM,CAAC,CAAC,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,EAAE,CAAC,CAAC;CACZ;AAED,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,IAAI;KAC/D,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI;CAC1D,CAAC;AAEF,eAAO,MAAM,KAAK,qEAEmB,GAAG,EAAE,mBAAmB,IAAI,WAEvD,OAAO,CAAC,EAAE,CAAC,CAAC,KACnB,QAAQ,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CA4D5B,CAAC"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../src/model.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,OAAO,EASR,MAAM,iBAAiB,CAAC;AAEzB,UAAU,MAAM,CAAC,CAAC,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,CAAC,CAAC;IACT,OAAO,EAAE,CAAC,CAAC;CACZ;AAED,KAAK,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC,IAAI;KAC/D,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI;CAC1D,CAAC;AAEF,eAAO,MAAM,KAAK,GAChB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC,UAExD,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,KACnB,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CA4D5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reactant-model",
3
- "version": "0.122.0",
3
+ "version": "0.123.0",
4
4
  "description": "A model lib for Reactant",
5
5
  "main": "dist/index.cjs.js",
6
6
  "unpkg": "dist/index.umd.js",
@@ -27,11 +27,11 @@
27
27
  ],
28
28
  "license": "MIT",
29
29
  "peerDependencies": {
30
- "mutative": "^1.0.11",
30
+ "mutative": "^1.1.0",
31
31
  "reactant-module": "*"
32
32
  },
33
33
  "devDependencies": {
34
- "mutative": "^1.0.11",
35
- "reactant-module": "^0.122.0"
34
+ "mutative": "^1.1.0",
35
+ "reactant-module": "^0.123.0"
36
36
  }
37
37
  }