@smartface/contx
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -34,2 +34,20 @@ (function (global, factory) { | ||
var _createClass = function () { | ||
function defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
return function (Constructor, protoProps, staticProps) { | ||
if (protoProps) defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
}; | ||
}(); | ||
var Context = function () { | ||
@@ -52,3 +70,6 @@ function Context(actors, reducer) { | ||
Context.prototype.subcribe = function subcribe(fn) {}; | ||
_createClass(Context, [{ | ||
key: "subcribe", | ||
value: function subcribe(fn) {} | ||
}]); | ||
@@ -55,0 +76,0 @@ return Context; |
@@ -24,2 +24,6 @@ (function (global, factory) { | ||
function load(src) { | ||
return require(src); | ||
} | ||
var AndroidConfig = void 0; | ||
var isTablet = false; | ||
@@ -30,2 +34,6 @@ | ||
} else if (_system2.default.OS === "Android") { | ||
AndroidConfig = load('sf-core/util/Android/androidconfig'); | ||
var Activity = AndroidConfig.activity; | ||
var context = Activity; | ||
var SCREENLAYOUT_SIZE_MASK = 15, | ||
@@ -32,0 +40,0 @@ SCREENLAYOUT_SIZE_LARGE = 3; |
@@ -39,2 +39,20 @@ (function (global, factory) { | ||
var _createClass = function () { | ||
function defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
return function (Constructor, protoProps, staticProps) { | ||
if (protoProps) defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
}; | ||
}(); | ||
function _possibleConstructorReturn(self, call) { | ||
@@ -64,5 +82,17 @@ if (!self) { | ||
function _toConsumableArray(arr) { | ||
if (Array.isArray(arr)) { | ||
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { | ||
arr2[i] = arr[i]; | ||
} | ||
return arr2; | ||
} else { | ||
return Array.from(arr); | ||
} | ||
} | ||
var _findClassNames = function _findClassNames(classNames) { | ||
return (0, _findClassNames3.default)(classNames).reduce(function (acc, item) { | ||
return !item && [] || [].concat(acc, [item.join('')]); | ||
return !item && [] || [].concat(_toConsumableArray(acc), [item.join('')]); | ||
}, []); | ||
@@ -102,3 +132,3 @@ }; | ||
var _this = _possibleConstructorReturn(this, _Actor.call(this, component, name)); | ||
var _this = _possibleConstructorReturn(this, (Stylable.__proto__ || Object.getPrototypeOf(Stylable)).call(this, component, name)); | ||
@@ -243,3 +273,3 @@ _this.getUserStyle = function () { | ||
_this.classNames = []; | ||
[].concat(initialClassNames, classNames).forEach(_this.addClassName); | ||
[].concat(_toConsumableArray(initialClassNames), _toConsumableArray(classNames)).forEach(_this.addClassName); | ||
_this.isDirty = true; | ||
@@ -258,3 +288,3 @@ }; | ||
if (!classNamesArr.some(_this.hasClassName)) { | ||
_this.classNames = [].concat(_this.classNames, classNamesArr); | ||
_this.classNames = [].concat(_toConsumableArray(_this.classNames), _toConsumableArray(classNamesArr)); | ||
_this.isDirty = true; | ||
@@ -284,3 +314,3 @@ } | ||
_this.classNames = [].concat(initialClassNames); | ||
_this.classNames = [].concat(_toConsumableArray(initialClassNames)); | ||
_this.styles = {}; | ||
@@ -299,5 +329,8 @@ _this.inlinestyles = {}; | ||
Stylable.prototype.getInitialClassName = function getInitialClassName() { | ||
return initialClassNames; | ||
}; | ||
_createClass(Stylable, [{ | ||
key: "getInitialClassName", | ||
value: function getInitialClassName() { | ||
return initialClassNames; | ||
} | ||
}]); | ||
@@ -304,0 +337,0 @@ return Stylable; |
@@ -51,2 +51,20 @@ (function (global, factory) { | ||
var _createClass = function () { | ||
function defineProperties(target, props) { | ||
for (var i = 0; i < props.length; i++) { | ||
var descriptor = props[i]; | ||
descriptor.enumerable = descriptor.enumerable || false; | ||
descriptor.configurable = true; | ||
if ("value" in descriptor) descriptor.writable = true; | ||
Object.defineProperty(target, descriptor.key, descriptor); | ||
} | ||
} | ||
return function (Constructor, protoProps, staticProps) { | ||
if (protoProps) defineProperties(Constructor.prototype, protoProps); | ||
if (staticProps) defineProperties(Constructor, staticProps); | ||
return Constructor; | ||
}; | ||
}(); | ||
function _possibleConstructorReturn(self, call) { | ||
@@ -122,3 +140,3 @@ if (!self) { | ||
var _this2 = _possibleConstructorReturn(this, _Actor.call(this, pageContext, name)); | ||
var _this2 = _possibleConstructorReturn(this, (Themeable.__proto__ || Object.getPrototypeOf(Themeable)).call(this, pageContext, name)); | ||
@@ -129,6 +147,9 @@ _this2.pageContext = pageContext; | ||
Themeable.prototype.changeStyling = function changeStyling(styling) { | ||
this.pageContext(styling); | ||
this.isDirty = true; | ||
}; | ||
_createClass(Themeable, [{ | ||
key: "changeStyling", | ||
value: function changeStyling(styling) { | ||
this.pageContext(styling); | ||
this.isDirty = true; | ||
} | ||
}]); | ||
@@ -135,0 +156,0 @@ return Themeable; |
{ | ||
"name": "@smartface/contx", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "Context Manager", | ||
@@ -33,2 +33,3 @@ "scripts": { | ||
"devDependencies": { | ||
"@smartface/styler": "^1.3.14", | ||
"babel-cli": "^6.24.1", | ||
@@ -57,3 +58,2 @@ "babel-core": "^6.24.1", | ||
"mocha": "^3.3.0", | ||
"@smartface/styler": "^1.3.14", | ||
"semver": "^5.3.0" | ||
@@ -60,0 +60,0 @@ }, |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
92944
2127
1