@politie/sherlock-proxy
Advanced tools
Comparing version 2.0.0-beta.1 to 2.0.0-beta.2
{ | ||
"name": "@politie/sherlock-proxy", | ||
"version": "2.0.0-beta.1", | ||
"version": "2.0.0-beta.2", | ||
"description": "A proxy extension to Sherlock.", | ||
@@ -41,4 +41,4 @@ "main": "sherlock-proxy.cjs.js", | ||
"peerDependencies": { | ||
"@politie/sherlock": "2.0.0-beta.1" | ||
"@politie/sherlock": "2.0.0-beta.2" | ||
} | ||
} |
@@ -50,3 +50,3 @@ import { Derivable, ReactorOptions } from '@politie/sherlock'; | ||
/** | ||
* The target derivable (the input to the proxy and the {@link #$create} method). The actual values that can be seed by methods | ||
* The target derivable (the input to the proxy and the {@link #$create} method). The actual values that can be seen by methods | ||
* on the Proxy can be influenced by providing a {@link #$lens}. | ||
@@ -53,0 +53,0 @@ */ |
@@ -234,3 +234,3 @@ 'use strict'; | ||
set: function (newValue, targetValue) { | ||
target.set(set(newValue, targetValue)); | ||
target.set(set.call(this, newValue, targetValue)); | ||
} | ||
@@ -237,0 +237,0 @@ }, target).autoCache(); |
@@ -1,2 +0,2 @@ | ||
Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),t=require("@politie/sherlock"),e=Symbol();function n(r){return!0===r[e]}var i=function(){function e(){this.$$derivable=void 0}return Object.defineProperty(e.prototype,"$derivable",{get:function(){var r=this.$proxyDescriptor;return r.$$derivable||(r.$$derivable=function(r,e){if(!e)return r;var n=e.get,i=e.set;return i&&t.isSettableDerivable(r)?t.lens({get:n,set:function(t,e){r.set(i(t,e))}},r).autoCache():r.derive(n).autoCache()}(r.$target,r.$lens&&r.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$value",{get:function(){var r=this.$proxyDescriptor;try{return r.$derivable.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$value")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$derivable,i=e.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$value")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$targetValue",{get:function(){var r=this.$proxyDescriptor;try{return r.$target.get()}catch(t){throw Object.assign(Error("error while getting "+(r.$expression||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},set:function(r){var e=this.$proxyDescriptor,n=e.$target,i=e.$expression;if(!t.isSettableDerivable(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(r)}catch(r){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(r&&r.message)),{jse_cause:r})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.$create=function(r,e,n){var i=t.utils.clone(this.$proxyDescriptor);return i.$target=r,Object.getOwnPropertyNames(i).filter(function(r){return r.startsWith("$$")}).forEach(function(r){return i[r]=void 0}),i.$expression=e,i.$path=n,new Proxy(i,o)},e.prototype.$pluck=function(r){var t=this.$proxyDescriptor;return t.$create(t.$derivable.pluck(r),a(t.$expression,r),s(t.$path,r))},e.prototype.$pluckableKeys=function(){var r=this.$proxyDescriptor.$value;return"object"==typeof r?Reflect.ownKeys(r):[]},e.prototype.$length=function(){var r=this.$proxyDescriptor.$targetValue;return Array.isArray(r)?r.length:void 0},e.prototype.$and=function(r){return this.$proxyDescriptor.$derivable.and(u(r))},e.prototype.$or=function(r){return this.$proxyDescriptor.$derivable.or(u(r))},e.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},e.prototype.$is=function(r){return this.$proxyDescriptor.$derivable.is(u(r))},e.prototype.$derive=function(){var r=this.$proxyDescriptor.$derivable;return r.derive.apply(r,arguments)},e.prototype.$react=function(r,t){return this.$proxyDescriptor.$derivable.react(r,t)},e.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),e.prototype[Symbol.iterator]=function(){var t,e,n,i;return r.__generator(this,function(r){switch(r.label){case 0:if(t=this.$proxyDescriptor,void 0===(e=t.$length()))throw n=t.$expression,Object.assign(Error((n||"object")+" is not iterable"),{value:t.$value,expression:n});i=0,r.label=1;case 1:return i<e?[4,t.$pluck(i)]:[3,4];case 2:r.sent(),r.label=3;case 3:return i++,[3,1];case 4:return[2]}})},Object.defineProperty(e.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),e}();function u(r){return n(r)?r.$derivable:r}i.prototype[e]=!0;var o={get:function(r,t,e){return"$proxyDescriptor"===t?r:c(r,t)?r.$pluck.call(e,t):Reflect.get(r,t,e)},set:function(r,e,i,u){if(c(r,e)){var o=r.$pluck.call(u,e);return i&&n(i)?o.$targetValue=i.$targetValue:o.$value=i&&t.isDerivable(i)?i.get():i,!0}return Reflect.set(r,e,i,u)},has:function(r,t){return t===Symbol.iterator?void 0!==r.$length():c(r,t)},getOwnPropertyDescriptor:function(r,t){if(c(r,t))return{get:function(){return this[t]},set:function(r){this[t]=r},configurable:!0,enumerable:!0}},ownKeys:function(r){return r.$pluckableKeys()}};function c(r,t){return"number"==typeof t||"string"==typeof t&&"$"!==t[0]&&!Reflect.has(r,t)}function a(r,t){return void 0===r&&(r=""),"string"==typeof t&&/^[a-z_][a-z_0-9]*$/i.test(t)?r+"."+t:"string"==typeof t?r+'["'+t.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':r+"["+t+"]"}function s(r,t){return void 0===r&&(r=[]),r.concat(t)}exports.extendExpression=a,exports.extendPath=s,exports.isDerivableProxy=n,exports.ProxyDescriptor=i,exports.unwrapProxy=u; | ||
Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("@politie/sherlock"),e=Symbol();function n(t){return!0===t[e]}var i=function(){function e(){this.$$derivable=void 0}return Object.defineProperty(e.prototype,"$derivable",{get:function(){var t=this.$proxyDescriptor;return t.$$derivable||(t.$$derivable=function(t,e){if(!e)return t;var n=e.get,i=e.set;return i&&r.isSettableDerivable(t)?r.lens({get:n,set:function(r,e){t.set(i.call(this,r,e))}},t).autoCache():t.derive(n).autoCache()}(t.$target,t.$lens&&t.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$value",{get:function(){var t=this.$proxyDescriptor;try{return t.$derivable.get()}catch(r){throw Object.assign(Error("error while getting "+(t.$expression||"$value")+": "+(r&&r.message)),{jse_cause:r})}},set:function(t){var e=this.$proxyDescriptor,n=e.$derivable,i=e.$expression;if(!r.isSettableDerivable(n))throw Error((i||"$value")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$targetValue",{get:function(){var t=this.$proxyDescriptor;try{return t.$target.get()}catch(r){throw Object.assign(Error("error while getting "+(t.$expression||"$targetValue")+": "+(r&&r.message)),{jse_cause:r})}},set:function(t){var e=this.$proxyDescriptor,n=e.$target,i=e.$expression;if(!r.isSettableDerivable(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.$create=function(t,e,n){var i=r.utils.clone(this.$proxyDescriptor);return i.$target=t,Object.getOwnPropertyNames(i).filter(function(t){return t.startsWith("$$")}).forEach(function(t){return i[t]=void 0}),i.$expression=e,i.$path=n,new Proxy(i,o)},e.prototype.$pluck=function(t){var r=this.$proxyDescriptor;return r.$create(r.$derivable.pluck(t),s(r.$expression,t),a(r.$path,t))},e.prototype.$pluckableKeys=function(){var t=this.$proxyDescriptor.$value;return"object"==typeof t?Reflect.ownKeys(t):[]},e.prototype.$length=function(){var t=this.$proxyDescriptor.$targetValue;return Array.isArray(t)?t.length:void 0},e.prototype.$and=function(t){return this.$proxyDescriptor.$derivable.and(u(t))},e.prototype.$or=function(t){return this.$proxyDescriptor.$derivable.or(u(t))},e.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},e.prototype.$is=function(t){return this.$proxyDescriptor.$derivable.is(u(t))},e.prototype.$derive=function(){var t=this.$proxyDescriptor.$derivable;return t.derive.apply(t,arguments)},e.prototype.$react=function(t,r){return this.$proxyDescriptor.$derivable.react(t,r)},e.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(e.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),e.prototype[Symbol.iterator]=function(){var r,e,n,i;return t.__generator(this,function(t){switch(t.label){case 0:if(r=this.$proxyDescriptor,void 0===(e=r.$length()))throw n=r.$expression,Object.assign(Error((n||"object")+" is not iterable"),{value:r.$value,expression:n});i=0,t.label=1;case 1:return i<e?[4,r.$pluck(i)]:[3,4];case 2:t.sent(),t.label=3;case 3:return i++,[3,1];case 4:return[2]}})},Object.defineProperty(e.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),e}();function u(t){return n(t)?t.$derivable:t}i.prototype[e]=!0;var o={get:function(t,r,e){return"$proxyDescriptor"===r?t:c(t,r)?t.$pluck.call(e,r):Reflect.get(t,r,e)},set:function(t,e,i,u){if(c(t,e)){var o=t.$pluck.call(u,e);return i&&n(i)?o.$targetValue=i.$targetValue:o.$value=i&&r.isDerivable(i)?i.get():i,!0}return Reflect.set(t,e,i,u)},has:function(t,r){return r===Symbol.iterator?void 0!==t.$length():c(t,r)},getOwnPropertyDescriptor:function(t,r){if(c(t,r))return{get:function(){return this[r]},set:function(t){this[r]=t},configurable:!0,enumerable:!0}},ownKeys:function(t){return t.$pluckableKeys()}};function c(t,r){return"number"==typeof r||"string"==typeof r&&"$"!==r[0]&&!Reflect.has(t,r)}function s(t,r){return void 0===t&&(t=""),"string"==typeof r&&/^[a-z_][a-z_0-9]*$/i.test(r)?t+"."+r:"string"==typeof r?t+'["'+r.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':t+"["+r+"]"}function a(t,r){return void 0===t&&(t=[]),t.concat(r)}exports.extendExpression=s,exports.extendPath=a,exports.isDerivableProxy=n,exports.ProxyDescriptor=i,exports.unwrapProxy=u; | ||
//# sourceMappingURL=sherlock-proxy.cjs.min.js.map |
@@ -230,3 +230,3 @@ import { __generator } from 'tslib'; | ||
set: function (newValue, targetValue) { | ||
target.set(set(newValue, targetValue)); | ||
target.set(set.call(this, newValue, targetValue)); | ||
} | ||
@@ -233,0 +233,0 @@ }, target).autoCache(); |
@@ -1,2 +0,2 @@ | ||
import{__generator as t}from"tslib";import{isDerivable as r,isSettableDerivable as e,lens as n,utils as i}from"@politie/sherlock";var u=Symbol();function o(t){return!0===t[u]}var c=function(){function r(){this.$$derivable=void 0}return Object.defineProperty(r.prototype,"$derivable",{get:function(){var t=this.$proxyDescriptor;return t.$$derivable||(t.$$derivable=function(t,r){if(!r)return t;var i=r.get,u=r.set;return u&&e(t)?n({get:i,set:function(r,e){t.set(u(r,e))}},t).autoCache():t.derive(i).autoCache()}(t.$target,t.$lens&&t.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"$value",{get:function(){var t=this.$proxyDescriptor;try{return t.$derivable.get()}catch(r){throw Object.assign(Error("error while getting "+(t.$expression||"$value")+": "+(r&&r.message)),{jse_cause:r})}},set:function(t){var r=this.$proxyDescriptor,n=r.$derivable,i=r.$expression;if(!e(n))throw Error((i||"$value")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"$targetValue",{get:function(){var t=this.$proxyDescriptor;try{return t.$target.get()}catch(r){throw Object.assign(Error("error while getting "+(t.$expression||"$targetValue")+": "+(r&&r.message)),{jse_cause:r})}},set:function(t){var r=this.$proxyDescriptor,n=r.$target,i=r.$expression;if(!e(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),r.prototype.$create=function(t,r,e){var n=i.clone(this.$proxyDescriptor);return n.$target=t,Object.getOwnPropertyNames(n).filter(function(t){return t.startsWith("$$")}).forEach(function(t){return n[t]=void 0}),n.$expression=r,n.$path=e,new Proxy(n,f)},r.prototype.$pluck=function(t){var r=this.$proxyDescriptor;return r.$create(r.$derivable.pluck(t),l(r.$expression,t),h(r.$path,t))},r.prototype.$pluckableKeys=function(){var t=this.$proxyDescriptor.$value;return"object"==typeof t?Reflect.ownKeys(t):[]},r.prototype.$length=function(){var t=this.$proxyDescriptor.$targetValue;return Array.isArray(t)?t.length:void 0},r.prototype.$and=function(t){return this.$proxyDescriptor.$derivable.and(a(t))},r.prototype.$or=function(t){return this.$proxyDescriptor.$derivable.or(a(t))},r.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},r.prototype.$is=function(t){return this.$proxyDescriptor.$derivable.is(a(t))},r.prototype.$derive=function(){var t=this.$proxyDescriptor.$derivable;return t.derive.apply(t,arguments)},r.prototype.$react=function(t,r){return this.$proxyDescriptor.$derivable.react(t,r)},r.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(r.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),r.prototype[Symbol.iterator]=function(){var r,e,n,i;return t(this,function(t){switch(t.label){case 0:if(r=this.$proxyDescriptor,void 0===(e=r.$length()))throw n=r.$expression,Object.assign(Error((n||"object")+" is not iterable"),{value:r.$value,expression:n});i=0,t.label=1;case 1:return i<e?[4,r.$pluck(i)]:[3,4];case 2:t.sent(),t.label=3;case 3:return i++,[3,1];case 4:return[2]}})},Object.defineProperty(r.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),r}();function a(t){return o(t)?t.$derivable:t}c.prototype[u]=!0;var f={get:function(t,r,e){return"$proxyDescriptor"===r?t:s(t,r)?t.$pluck.call(e,r):Reflect.get(t,r,e)},set:function(t,e,n,i){if(s(t,e)){var u=t.$pluck.call(i,e);return n&&o(n)?u.$targetValue=n.$targetValue:u.$value=n&&r(n)?n.get():n,!0}return Reflect.set(t,e,n,i)},has:function(t,r){return r===Symbol.iterator?void 0!==t.$length():s(t,r)},getOwnPropertyDescriptor:function(t,r){if(s(t,r))return{get:function(){return this[r]},set:function(t){this[r]=t},configurable:!0,enumerable:!0}},ownKeys:function(t){return t.$pluckableKeys()}};function s(t,r){return"number"==typeof r||"string"==typeof r&&"$"!==r[0]&&!Reflect.has(t,r)}function l(t,r){return void 0===t&&(t=""),"string"==typeof r&&/^[a-z_][a-z_0-9]*$/i.test(r)?t+"."+r:"string"==typeof r?t+'["'+r.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':t+"["+r+"]"}function h(t,r){return void 0===t&&(t=[]),t.concat(r)}export{l as extendExpression,h as extendPath,o as isDerivableProxy,c as ProxyDescriptor,a as unwrapProxy}; | ||
import{__generator as t}from"tslib";import{isDerivable as r,isSettableDerivable as e,lens as n,utils as i}from"@politie/sherlock";var u=Symbol();function o(t){return!0===t[u]}var c=function(){function r(){this.$$derivable=void 0}return Object.defineProperty(r.prototype,"$derivable",{get:function(){var t=this.$proxyDescriptor;return t.$$derivable||(t.$$derivable=function(t,r){if(!r)return t;var i=r.get,u=r.set;return u&&e(t)?n({get:i,set:function(r,e){t.set(u.call(this,r,e))}},t).autoCache():t.derive(i).autoCache()}(t.$target,t.$lens&&t.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"$value",{get:function(){var t=this.$proxyDescriptor;try{return t.$derivable.get()}catch(r){throw Object.assign(Error("error while getting "+(t.$expression||"$value")+": "+(r&&r.message)),{jse_cause:r})}},set:function(t){var r=this.$proxyDescriptor,n=r.$derivable,i=r.$expression;if(!e(n))throw Error((i||"$value")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"$targetValue",{get:function(){var t=this.$proxyDescriptor;try{return t.$target.get()}catch(r){throw Object.assign(Error("error while getting "+(t.$expression||"$targetValue")+": "+(r&&r.message)),{jse_cause:r})}},set:function(t){var r=this.$proxyDescriptor,n=r.$target,i=r.$expression;if(!e(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),r.prototype.$create=function(t,r,e){var n=i.clone(this.$proxyDescriptor);return n.$target=t,Object.getOwnPropertyNames(n).filter(function(t){return t.startsWith("$$")}).forEach(function(t){return n[t]=void 0}),n.$expression=r,n.$path=e,new Proxy(n,f)},r.prototype.$pluck=function(t){var r=this.$proxyDescriptor;return r.$create(r.$derivable.pluck(t),l(r.$expression,t),h(r.$path,t))},r.prototype.$pluckableKeys=function(){var t=this.$proxyDescriptor.$value;return"object"==typeof t?Reflect.ownKeys(t):[]},r.prototype.$length=function(){var t=this.$proxyDescriptor.$targetValue;return Array.isArray(t)?t.length:void 0},r.prototype.$and=function(t){return this.$proxyDescriptor.$derivable.and(a(t))},r.prototype.$or=function(t){return this.$proxyDescriptor.$derivable.or(a(t))},r.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},r.prototype.$is=function(t){return this.$proxyDescriptor.$derivable.is(a(t))},r.prototype.$derive=function(){var t=this.$proxyDescriptor.$derivable;return t.derive.apply(t,arguments)},r.prototype.$react=function(t,r){return this.$proxyDescriptor.$derivable.react(t,r)},r.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(r.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),r.prototype[Symbol.iterator]=function(){var r,e,n,i;return t(this,function(t){switch(t.label){case 0:if(r=this.$proxyDescriptor,void 0===(e=r.$length()))throw n=r.$expression,Object.assign(Error((n||"object")+" is not iterable"),{value:r.$value,expression:n});i=0,t.label=1;case 1:return i<e?[4,r.$pluck(i)]:[3,4];case 2:t.sent(),t.label=3;case 3:return i++,[3,1];case 4:return[2]}})},Object.defineProperty(r.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),r}();function a(t){return o(t)?t.$derivable:t}c.prototype[u]=!0;var f={get:function(t,r,e){return"$proxyDescriptor"===r?t:s(t,r)?t.$pluck.call(e,r):Reflect.get(t,r,e)},set:function(t,e,n,i){if(s(t,e)){var u=t.$pluck.call(i,e);return n&&o(n)?u.$targetValue=n.$targetValue:u.$value=n&&r(n)?n.get():n,!0}return Reflect.set(t,e,n,i)},has:function(t,r){return r===Symbol.iterator?void 0!==t.$length():s(t,r)},getOwnPropertyDescriptor:function(t,r){if(s(t,r))return{get:function(){return this[r]},set:function(t){this[r]=t},configurable:!0,enumerable:!0}},ownKeys:function(t){return t.$pluckableKeys()}};function s(t,r){return"number"==typeof r||"string"==typeof r&&"$"!==r[0]&&!Reflect.has(t,r)}function l(t,r){return void 0===t&&(t=""),"string"==typeof r&&/^[a-z_][a-z_0-9]*$/i.test(r)?t+"."+r:"string"==typeof r?t+'["'+r.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':t+"["+r+"]"}function h(t,r){return void 0===t&&(t=[]),t.concat(r)}export{l as extendExpression,h as extendPath,o as isDerivableProxy,c as ProxyDescriptor,a as unwrapProxy}; | ||
//# sourceMappingURL=sherlock-proxy.esm.min.js.map |
@@ -276,3 +276,3 @@ (function (global, factory) { | ||
set: function (newValue, targetValue) { | ||
target.set(set(newValue, targetValue)); | ||
target.set(set.call(this, newValue, targetValue)); | ||
} | ||
@@ -279,0 +279,0 @@ }, target).autoCache(); |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@politie/sherlock")):"function"==typeof define&&define.amd?define(["exports","@politie/sherlock"],e):e(t.SherlockProxy={},t.Sherlock)}(this,function(t,e){"use strict";var r=Symbol();function n(t){return!0===t[r]}var i=function(){function t(){this.$$derivable=void 0}return Object.defineProperty(t.prototype,"$derivable",{get:function(){var t=this.$proxyDescriptor;return t.$$derivable||(t.$$derivable=function(t,r){if(!r)return t;var n=r.get,i=r.set;return i&&e.isSettableDerivable(t)?e.lens({get:n,set:function(e,r){t.set(i(e,r))}},t).autoCache():t.derive(n).autoCache()}(t.$target,t.$lens&&t.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$value",{get:function(){var t=this.$proxyDescriptor;try{return t.$derivable.get()}catch(e){throw Object.assign(Error("error while getting "+(t.$expression||"$value")+": "+(e&&e.message)),{jse_cause:e})}},set:function(t){var r=this.$proxyDescriptor,n=r.$derivable,i=r.$expression;if(!e.isSettableDerivable(n))throw Error((i||"$value")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$targetValue",{get:function(){var t=this.$proxyDescriptor;try{return t.$target.get()}catch(e){throw Object.assign(Error("error while getting "+(t.$expression||"$targetValue")+": "+(e&&e.message)),{jse_cause:e})}},set:function(t){var r=this.$proxyDescriptor,n=r.$target,i=r.$expression;if(!e.isSettableDerivable(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.$create=function(t,r,n){var i=e.utils.clone(this.$proxyDescriptor);return i.$target=t,Object.getOwnPropertyNames(i).filter(function(t){return t.startsWith("$$")}).forEach(function(t){return i[t]=void 0}),i.$expression=r,i.$path=n,new Proxy(i,o)},t.prototype.$pluck=function(t){var e=this.$proxyDescriptor;return e.$create(e.$derivable.pluck(t),f(e.$expression,t),a(e.$path,t))},t.prototype.$pluckableKeys=function(){var t=this.$proxyDescriptor.$value;return"object"==typeof t?Reflect.ownKeys(t):[]},t.prototype.$length=function(){var t=this.$proxyDescriptor.$targetValue;return Array.isArray(t)?t.length:void 0},t.prototype.$and=function(t){return this.$proxyDescriptor.$derivable.and(u(t))},t.prototype.$or=function(t){return this.$proxyDescriptor.$derivable.or(u(t))},t.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},t.prototype.$is=function(t){return this.$proxyDescriptor.$derivable.is(u(t))},t.prototype.$derive=function(){var t=this.$proxyDescriptor.$derivable;return t.derive.apply(t,arguments)},t.prototype.$react=function(t,e){return this.$proxyDescriptor.$derivable.react(t,e)},t.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(t.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),t.prototype[Symbol.iterator]=function(){var t,e,r,n;return function(t,e){var r,n,i,u,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=n[2&u[0]?"return":u[0]?"throw":"next"])&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[0,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(t){u=[6,t],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,function(i){switch(i.label){case 0:if(t=this.$proxyDescriptor,void 0===(e=t.$length()))throw r=t.$expression,Object.assign(Error((r||"object")+" is not iterable"),{value:t.$value,expression:r});n=0,i.label=1;case 1:return n<e?[4,t.$pluck(n)]:[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}})},Object.defineProperty(t.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),t}();function u(t){return n(t)?t.$derivable:t}i.prototype[r]=!0;var o={get:function(t,e,r){return"$proxyDescriptor"===e?t:c(t,e)?t.$pluck.call(r,e):Reflect.get(t,e,r)},set:function(t,r,i,u){if(c(t,r)){var o=t.$pluck.call(u,r);return i&&n(i)?o.$targetValue=i.$targetValue:o.$value=i&&e.isDerivable(i)?i.get():i,!0}return Reflect.set(t,r,i,u)},has:function(t,e){return e===Symbol.iterator?void 0!==t.$length():c(t,e)},getOwnPropertyDescriptor:function(t,e){if(c(t,e))return{get:function(){return this[e]},set:function(t){this[e]=t},configurable:!0,enumerable:!0}},ownKeys:function(t){return t.$pluckableKeys()}};function c(t,e){return"number"==typeof e||"string"==typeof e&&"$"!==e[0]&&!Reflect.has(t,e)}function f(t,e){return void 0===t&&(t=""),"string"==typeof e&&/^[a-z_][a-z_0-9]*$/i.test(e)?t+"."+e:"string"==typeof e?t+'["'+e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':t+"["+e+"]"}function a(t,e){return void 0===t&&(t=[]),t.concat(e)}t.extendExpression=f,t.extendPath=a,t.isDerivableProxy=n,t.ProxyDescriptor=i,t.unwrapProxy=u,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@politie/sherlock")):"function"==typeof define&&define.amd?define(["exports","@politie/sherlock"],e):e(t.SherlockProxy={},t.Sherlock)}(this,function(t,e){"use strict";var r=Symbol();function n(t){return!0===t[r]}var i=function(){function t(){this.$$derivable=void 0}return Object.defineProperty(t.prototype,"$derivable",{get:function(){var t=this.$proxyDescriptor;return t.$$derivable||(t.$$derivable=function(t,r){if(!r)return t;var n=r.get,i=r.set;return i&&e.isSettableDerivable(t)?e.lens({get:n,set:function(e,r){t.set(i.call(this,e,r))}},t).autoCache():t.derive(n).autoCache()}(t.$target,t.$lens&&t.$lens()))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$value",{get:function(){var t=this.$proxyDescriptor;try{return t.$derivable.get()}catch(e){throw Object.assign(Error("error while getting "+(t.$expression||"$value")+": "+(e&&e.message)),{jse_cause:e})}},set:function(t){var r=this.$proxyDescriptor,n=r.$derivable,i=r.$expression;if(!e.isSettableDerivable(n))throw Error((i||"$value")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$value")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$targetValue",{get:function(){var t=this.$proxyDescriptor;try{return t.$target.get()}catch(e){throw Object.assign(Error("error while getting "+(t.$expression||"$targetValue")+": "+(e&&e.message)),{jse_cause:e})}},set:function(t){var r=this.$proxyDescriptor,n=r.$target,i=r.$expression;if(!e.isSettableDerivable(n))throw Error((i||"$targetValue")+" is readonly");try{n.set(t)}catch(t){throw Object.assign(Error("error while setting "+(i||"$targetValue")+": "+(t&&t.message)),{jse_cause:t})}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"$proxyDescriptor",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.$create=function(t,r,n){var i=e.utils.clone(this.$proxyDescriptor);return i.$target=t,Object.getOwnPropertyNames(i).filter(function(t){return t.startsWith("$$")}).forEach(function(t){return i[t]=void 0}),i.$expression=r,i.$path=n,new Proxy(i,o)},t.prototype.$pluck=function(t){var e=this.$proxyDescriptor;return e.$create(e.$derivable.pluck(t),f(e.$expression,t),a(e.$path,t))},t.prototype.$pluckableKeys=function(){var t=this.$proxyDescriptor.$value;return"object"==typeof t?Reflect.ownKeys(t):[]},t.prototype.$length=function(){var t=this.$proxyDescriptor.$targetValue;return Array.isArray(t)?t.length:void 0},t.prototype.$and=function(t){return this.$proxyDescriptor.$derivable.and(u(t))},t.prototype.$or=function(t){return this.$proxyDescriptor.$derivable.or(u(t))},t.prototype.$not=function(){return this.$proxyDescriptor.$derivable.not()},t.prototype.$is=function(t){return this.$proxyDescriptor.$derivable.is(u(t))},t.prototype.$derive=function(){var t=this.$proxyDescriptor.$derivable;return t.derive.apply(t,arguments)},t.prototype.$react=function(t,e){return this.$proxyDescriptor.$derivable.react(t,e)},t.prototype.toJSON=function(){return this.$proxyDescriptor.$value},Object.defineProperty(t.prototype,Symbol.toStringTag,{get:function(){return"DerivableProxy"},enumerable:!0,configurable:!0}),t.prototype[Symbol.iterator]=function(){var t,e,r,n;return function(t,e){var r,n,i,u,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return u={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function c(u){return function(c){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;o;)try{if(r=1,n&&(i=n[2&u[0]?"return":u[0]?"throw":"next"])&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[0,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=(i=o.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){o.label=u[1];break}if(6===u[0]&&o.label<i[1]){o.label=i[1],i=u;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(u);break}i[2]&&o.ops.pop(),o.trys.pop();continue}u=e.call(t,o)}catch(t){u=[6,t],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}}(this,function(i){switch(i.label){case 0:if(t=this.$proxyDescriptor,void 0===(e=t.$length()))throw r=t.$expression,Object.assign(Error((r||"object")+" is not iterable"),{value:t.$value,expression:r});n=0,i.label=1;case 1:return n<e?[4,t.$pluck(n)]:[3,4];case 2:i.sent(),i.label=3;case 3:return n++,[3,1];case 4:return[2]}})},Object.defineProperty(t.prototype,"length",{get:function(){return this.$proxyDescriptor.$length()},enumerable:!0,configurable:!0}),t}();function u(t){return n(t)?t.$derivable:t}i.prototype[r]=!0;var o={get:function(t,e,r){return"$proxyDescriptor"===e?t:c(t,e)?t.$pluck.call(r,e):Reflect.get(t,e,r)},set:function(t,r,i,u){if(c(t,r)){var o=t.$pluck.call(u,r);return i&&n(i)?o.$targetValue=i.$targetValue:o.$value=i&&e.isDerivable(i)?i.get():i,!0}return Reflect.set(t,r,i,u)},has:function(t,e){return e===Symbol.iterator?void 0!==t.$length():c(t,e)},getOwnPropertyDescriptor:function(t,e){if(c(t,e))return{get:function(){return this[e]},set:function(t){this[e]=t},configurable:!0,enumerable:!0}},ownKeys:function(t){return t.$pluckableKeys()}};function c(t,e){return"number"==typeof e||"string"==typeof e&&"$"!==e[0]&&!Reflect.has(t,e)}function f(t,e){return void 0===t&&(t=""),"string"==typeof e&&/^[a-z_][a-z_0-9]*$/i.test(e)?t+"."+e:"string"==typeof e?t+'["'+e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')+'"]':t+"["+e+"]"}function a(t,e){return void 0===t&&(t=[]),t.concat(e)}t.extendExpression=f,t.extendPath=a,t.isDerivableProxy=n,t.ProxyDescriptor=i,t.unwrapProxy=u,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=sherlock-proxy.umd.min.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
219041
1200