Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

reactive-di

Package Overview
Dependencies
Maintainers
1
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reactive-di - npm Package Compare versions

Comparing version 4.0.17 to 4.0.18

5

CHANGELOG.md

@@ -5,2 +5,7 @@ # Change Log

<a name="4.0.18"></a>
## [4.0.18](https://github.com/zerkalica/reactive-di/compare/v4.0.17...v4.0.18) (2017-10-11)
<a name="4.0.17"></a>

@@ -7,0 +12,0 @@ ## [4.0.17](https://github.com/zerkalica/reactive-di/compare/v4.0.16...v4.0.17) (2017-10-10)

43

dist/reactive-di.es.js

@@ -55,3 +55,3 @@ import { detached, memkey } from 'lom_atom';

var _class2;
var _class3;

@@ -113,3 +113,18 @@ function _applyDecoratedDescriptor$1(target, property, decorators, descriptor, context) {

};
var SheetManager = (_class2 = function () {
var DisposableSheet = function () {
function DisposableSheet(sheet, sheetProcessor) {
this.classes = sheet.classes;
this._sheet = sheet;
this._sheetProcessor = sheetProcessor;
}
DisposableSheet.prototype.destructor = function destructor() {
this._sheetProcessor.removeStyleSheet(this._sheet);
};
return DisposableSheet;
}();
var SheetManager = (_class3 = function () {
function SheetManager(sheetProcessor, injector) {

@@ -120,23 +135,13 @@ this._sheetProcessor = sheetProcessor || defaultSheetProcessor;

SheetManager.prototype.sheet = function sheet(key, value, force, oldValue) {
SheetManager.prototype.sheet = function sheet(key, value, force) {
if (value !== undefined) return value;
if (oldValue !== undefined) {
this._sheetProcessor.removeStyleSheet(oldValue); // oldValue.detach()
}
var newValue = this._sheetProcessor.createStyleSheet(this._injector.invoke(key));
newValue.attach();
return newValue;
return new DisposableSheet(newValue, this._sheetProcessor);
};
SheetManager.prototype.destroy = function destroy(value) {
this._sheetProcessor.removeStyleSheet(value); // value.detach()
};
return SheetManager;
}(), (_applyDecoratedDescriptor$1(_class2.prototype, "sheet", [memkey], Object.getOwnPropertyDescriptor(_class2.prototype, "sheet"), _class2.prototype)), _class2);
}(), (_applyDecoratedDescriptor$1(_class3.prototype, "sheet", [memkey], Object.getOwnPropertyDescriptor(_class3.prototype, "sheet"), _class3.prototype)), _class3);
var depId = 0;

@@ -225,3 +230,3 @@

Injector.prototype.destroy = function destroy() {
Injector.prototype.destructor = function destructor() {
this._cache = undefined;

@@ -587,6 +592,6 @@ this._listeners = undefined;

AtomizedComponent.prototype.componentWillUnmount = function componentWillUnmount() {
this['r()'].destroyed(true);
this['AtomizedComponent.r()'].destructor();
};
AtomizedComponent.prototype.destroy = function destroy() {
AtomizedComponent.prototype.destructor = function destructor() {
this._el = undefined;

@@ -599,3 +604,3 @@ this._keys = undefined;

this._injector.destroy();
this._injector.destructor();

@@ -602,0 +607,0 @@ this._injector = undefined;

@@ -59,3 +59,3 @@ 'use strict';

var _class2;
var _class3;

@@ -117,3 +117,18 @@ function _applyDecoratedDescriptor$1(target, property, decorators, descriptor, context) {

};
var SheetManager = (_class2 = function () {
var DisposableSheet = function () {
function DisposableSheet(sheet, sheetProcessor) {
this.classes = sheet.classes;
this._sheet = sheet;
this._sheetProcessor = sheetProcessor;
}
DisposableSheet.prototype.destructor = function destructor() {
this._sheetProcessor.removeStyleSheet(this._sheet);
};
return DisposableSheet;
}();
var SheetManager = (_class3 = function () {
function SheetManager(sheetProcessor, injector) {

@@ -124,23 +139,13 @@ this._sheetProcessor = sheetProcessor || defaultSheetProcessor;

SheetManager.prototype.sheet = function sheet(key, value, force, oldValue) {
SheetManager.prototype.sheet = function sheet(key, value, force) {
if (value !== undefined) return value;
if (oldValue !== undefined) {
this._sheetProcessor.removeStyleSheet(oldValue); // oldValue.detach()
}
var newValue = this._sheetProcessor.createStyleSheet(this._injector.invoke(key));
newValue.attach();
return newValue;
return new DisposableSheet(newValue, this._sheetProcessor);
};
SheetManager.prototype.destroy = function destroy(value) {
this._sheetProcessor.removeStyleSheet(value); // value.detach()
};
return SheetManager;
}(), (_applyDecoratedDescriptor$1(_class2.prototype, "sheet", [lom_atom.memkey], Object.getOwnPropertyDescriptor(_class2.prototype, "sheet"), _class2.prototype)), _class2);
}(), (_applyDecoratedDescriptor$1(_class3.prototype, "sheet", [lom_atom.memkey], Object.getOwnPropertyDescriptor(_class3.prototype, "sheet"), _class3.prototype)), _class3);
var depId = 0;

@@ -229,3 +234,3 @@

Injector.prototype.destroy = function destroy() {
Injector.prototype.destructor = function destructor() {
this._cache = undefined;

@@ -591,6 +596,6 @@ this._listeners = undefined;

AtomizedComponent.prototype.componentWillUnmount = function componentWillUnmount() {
this['r()'].destroyed(true);
this['AtomizedComponent.r()'].destructor();
};
AtomizedComponent.prototype.destroy = function destroy() {
AtomizedComponent.prototype.destructor = function destructor() {
this._el = undefined;

@@ -603,3 +608,3 @@ this._keys = undefined;

this._injector.destroy();
this._injector.destructor();

@@ -606,0 +611,0 @@ this._injector = undefined;

@@ -59,3 +59,3 @@ (function (global, factory) {

var _class2;
var _class3;

@@ -117,3 +117,18 @@ function _applyDecoratedDescriptor$1(target, property, decorators, descriptor, context) {

};
var SheetManager = (_class2 = function () {
var DisposableSheet = function () {
function DisposableSheet(sheet, sheetProcessor) {
this.classes = sheet.classes;
this._sheet = sheet;
this._sheetProcessor = sheetProcessor;
}
DisposableSheet.prototype.destructor = function destructor() {
this._sheetProcessor.removeStyleSheet(this._sheet);
};
return DisposableSheet;
}();
var SheetManager = (_class3 = function () {
function SheetManager(sheetProcessor, injector) {

@@ -124,23 +139,13 @@ this._sheetProcessor = sheetProcessor || defaultSheetProcessor;

SheetManager.prototype.sheet = function sheet(key, value, force, oldValue) {
SheetManager.prototype.sheet = function sheet(key, value, force) {
if (value !== undefined) return value;
if (oldValue !== undefined) {
this._sheetProcessor.removeStyleSheet(oldValue); // oldValue.detach()
}
var newValue = this._sheetProcessor.createStyleSheet(this._injector.invoke(key));
newValue.attach();
return newValue;
return new DisposableSheet(newValue, this._sheetProcessor);
};
SheetManager.prototype.destroy = function destroy(value) {
this._sheetProcessor.removeStyleSheet(value); // value.detach()
};
return SheetManager;
}(), (_applyDecoratedDescriptor$1(_class2.prototype, "sheet", [lom_atom.memkey], Object.getOwnPropertyDescriptor(_class2.prototype, "sheet"), _class2.prototype)), _class2);
}(), (_applyDecoratedDescriptor$1(_class3.prototype, "sheet", [lom_atom.memkey], Object.getOwnPropertyDescriptor(_class3.prototype, "sheet"), _class3.prototype)), _class3);
var depId = 0;

@@ -229,3 +234,3 @@

Injector.prototype.destroy = function destroy() {
Injector.prototype.destructor = function destructor() {
this._cache = undefined;

@@ -591,6 +596,6 @@ this._listeners = undefined;

AtomizedComponent.prototype.componentWillUnmount = function componentWillUnmount() {
this['r()'].destroyed(true);
this['AtomizedComponent.r()'].destructor();
};
AtomizedComponent.prototype.destroy = function destroy() {
AtomizedComponent.prototype.destructor = function destructor() {
this._el = undefined;

@@ -603,3 +608,3 @@ this._keys = undefined;

this._injector.destroy();
this._injector.destructor();

@@ -606,0 +611,0 @@ this._injector = undefined;

{
"name": "reactive-di",
"version": "4.0.17",
"version": "4.0.18",
"description": "Reactive dependency injection",

@@ -76,4 +76,4 @@ "publishConfig": {

"dependencies": {
"lom_atom": "^2.0.0"
"lom_atom": "^2.0.1"
}
}

@@ -155,6 +155,6 @@ // @flow

componentWillUnmount() {
this['r()'].destroyed(true)
this['AtomizedComponent.r()'].destructor()
}
destroy() {
destructor() {
this._el = undefined

@@ -165,3 +165,3 @@ this._keys = undefined

this.constructor.instance--
this._injector.destroy()
this._injector.destructor()
this._injector = (undefined: any)

@@ -168,0 +168,0 @@ }

@@ -48,2 +48,18 @@ // @flow

class DisposableSheet<V: Object> {
classes: {+[id: $Keys<V>]: string}
_sheetProcessor: IProcessor
_sheet: ISheet<V>
constructor(sheet: ISheet<V>, sheetProcessor: IProcessor) {
this.classes = sheet.classes
this._sheet = sheet
this._sheetProcessor = sheetProcessor
}
destructor() {
this._sheetProcessor.removeStyleSheet(this._sheet)
}
}
class SheetManager {

@@ -59,19 +75,10 @@ _sheetProcessor: IProcessor

@memkey
sheet<V: Object>(key: Function, value?: ISheet<V>, force?: boolean, oldValue?: ISheet<V>): ISheet<V> {
sheet<V: Object>(key: Function, value?: DisposableSheet<V>, force?: boolean): DisposableSheet<V> {
if (value !== undefined) return value
if (oldValue !== undefined) {
this._sheetProcessor.removeStyleSheet(oldValue)
// oldValue.detach()
}
const newValue: ISheet<V> = this._sheetProcessor.createStyleSheet(this._injector.invoke(key))
newValue.attach()
return newValue
return new DisposableSheet(newValue, this._sheetProcessor)
}
destroy(value: ISheet<*>) {
this._sheetProcessor.removeStyleSheet(value)
// value.detach()
}
}

@@ -177,3 +184,3 @@

destroy() {
destructor() {
this._cache = (undefined: any)

@@ -180,0 +187,0 @@ this._listeners = undefined

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc