Comparing version 7.0.9 to 7.0.10
@@ -62,6 +62,6 @@ import { dasherizeToCamel, replaceObject } from 'belter/src'; | ||
scopeProps = replaceObject(scopeProps, { | ||
'function': function _function(value) { | ||
scopeProps = replaceObject(scopeProps, function (item) { | ||
if (typeof item === 'function') { | ||
return function angularWrapped() { | ||
var result = value.apply(this, arguments); | ||
var result = item.apply(this, arguments); | ||
safeApply(); | ||
@@ -71,2 +71,3 @@ return result; | ||
} | ||
return item; | ||
}); | ||
@@ -73,0 +74,0 @@ |
@@ -21,15 +21,14 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var getProps = function getProps(component) { | ||
return replaceObject(_extends({}, component.internalProps, component.props), { | ||
'function': function _function(value) { | ||
if (typeof value === 'function') { | ||
return function angular2Wrapped() { | ||
var _this = this, | ||
_arguments = arguments; | ||
return replaceObject(_extends({}, component.internalProps, component.props), function (item) { | ||
if (typeof item === 'function') { | ||
return function angular2Wrapped() { | ||
var _this = this, | ||
_arguments = arguments; | ||
return component.zone.run(function () { | ||
return value.apply(_this, _arguments); | ||
}); | ||
}; | ||
} | ||
return component.zone.run(function () { | ||
return item.apply(_this, _arguments); | ||
}); | ||
}; | ||
} | ||
return item; | ||
}); | ||
@@ -36,0 +35,0 @@ }; |
import { replaceObject } from 'belter/src'; | ||
export function serializeFunctions(obj) { | ||
return replaceObject(obj, { | ||
'function': function _function() { | ||
return replaceObject(obj, function (item) { | ||
if (typeof item === 'function') { | ||
return { | ||
@@ -10,2 +10,3 @@ __type__: '__function__' | ||
} | ||
return item; | ||
}); | ||
@@ -15,10 +16,9 @@ } | ||
export function deserializeFunctions(obj, handler) { | ||
return replaceObject(obj, { | ||
'object': function object(value, key, fullKey) { | ||
if (value && value.__type__ === '__function__') { | ||
return function deserializedFunctionWrapper() { | ||
return handler({ key: key, fullKey: fullKey, self: this, args: arguments }); | ||
}; | ||
} | ||
return replaceObject(obj, function (item, key, fullKey) { | ||
if (item && item.__type__ === '__function__') { | ||
return function deserializedFunctionWrapper() { | ||
return handler({ key: key, fullKey: fullKey, self: this, args: arguments }); | ||
}; | ||
} | ||
return item; | ||
}); | ||
@@ -25,0 +25,0 @@ } |
{ | ||
"name": "zoid", | ||
"version": "7.0.9", | ||
"version": "7.0.10", | ||
"description": "Cross domain components.", | ||
@@ -60,5 +60,5 @@ "main": "index.js", | ||
"hi-base32": "^0.5.0", | ||
"post-robot": "^8.0.14", | ||
"post-robot": "^9", | ||
"zalgo-promise": "^1.0.22" | ||
} | ||
} |
@@ -77,6 +77,6 @@ /* @flow */ | ||
scopeProps = replaceObject(scopeProps, { | ||
'function': (value) => { | ||
scopeProps = replaceObject(scopeProps, item => { | ||
if (typeof item === 'function') { | ||
return function angularWrapped() : mixed { | ||
let result = value.apply(this, arguments); | ||
let result = item.apply(this, arguments); | ||
safeApply(); | ||
@@ -86,2 +86,3 @@ return result; | ||
} | ||
return item; | ||
}); | ||
@@ -88,0 +89,0 @@ |
@@ -37,10 +37,9 @@ /* @flow */ | ||
let getProps = (component) => { | ||
return replaceObject({ ...component.internalProps, ...component.props }, { | ||
'function': (value) => { | ||
if (typeof value === 'function') { | ||
return function angular2Wrapped() : void { | ||
return component.zone.run(() => value.apply(this, arguments)); | ||
}; | ||
} | ||
return replaceObject({ ...component.internalProps, ...component.props }, item => { | ||
if (typeof item === 'function') { | ||
return function angular2Wrapped() : void { | ||
return component.zone.run(() => item.apply(this, arguments)); | ||
}; | ||
} | ||
return item; | ||
}); | ||
@@ -47,0 +46,0 @@ }; |
@@ -6,4 +6,4 @@ /* @flow */ | ||
export function serializeFunctions<T : Object | Array<mixed>>(obj : T) : T { | ||
return replaceObject(obj, { | ||
'function': () => { | ||
return replaceObject(obj, item => { | ||
if (typeof item === 'function') { | ||
return { | ||
@@ -13,2 +13,3 @@ __type__: '__function__' | ||
} | ||
return item; | ||
}); | ||
@@ -18,10 +19,9 @@ } | ||
export function deserializeFunctions<T : Object | Array<mixed>>(obj : T, handler : Function) : T { | ||
return replaceObject(obj, { | ||
'object': (value, key, fullKey) => { | ||
if (value && value.__type__ === '__function__') { | ||
return function deserializedFunctionWrapper() : mixed { | ||
return handler({ key, fullKey, self: this, args: arguments }); | ||
}; | ||
} | ||
return replaceObject(obj, (item, key, fullKey) => { | ||
if (item && item.__type__ === '__function__') { | ||
return function deserializedFunctionWrapper() : mixed { | ||
return handler({ key, fullKey, self: this, args: arguments }); | ||
}; | ||
} | ||
return item; | ||
}); | ||
@@ -28,0 +28,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
1357715
20769
+ Addedbelter@1.0.190(transitive)
+ Addedpost-robot@9.0.36(transitive)
+ Addeduniversal-serialize@1.0.10(transitive)
- Removedpost-robot@8.0.32(transitive)
Updatedpost-robot@^9