ng2-webstorage
Advanced tools
Comparing version 1.5.1 to 1.6.0
@@ -18,4 +18,3 @@ (function (global, factory) { | ||
_a[STORAGE.session] = 'session', | ||
_a | ||
); | ||
_a); | ||
var _a; | ||
@@ -25,2 +24,5 @@ | ||
var CUSTOM_LIB_KEY_SEPARATOR = LIB_KEY_SEPARATOR; | ||
function isManagedKey(sKey) { | ||
return sKey.indexOf(CUSTOM_LIB_KEY + CUSTOM_LIB_KEY_SEPARATOR) === 0; | ||
} | ||
var KeyStorageHelper = (function () { | ||
@@ -33,3 +35,3 @@ function KeyStorageHelper() { | ||
KeyStorageHelper.retrieveKeysFromStorage = function (storage) { | ||
return Object.keys(storage).filter(function (key) { return key.indexOf(CUSTOM_LIB_KEY) === 0; }); | ||
return Object.keys(storage).filter(isManagedKey); | ||
}; | ||
@@ -67,7 +69,7 @@ KeyStorageHelper.genKey = function (raw) { | ||
StorageObserverHelper.genObserverKey = function (sType, sKey) { | ||
return sType + "|" + sKey; | ||
return sType + '|' + sKey; | ||
}; | ||
StorageObserverHelper.observers = {}; | ||
return StorageObserverHelper; | ||
}()); | ||
StorageObserverHelper.observers = {}; | ||
@@ -124,7 +126,9 @@ var MockStorageHelper = (function () { | ||
}; | ||
MockStorageHelper.securedFields = ['setItem', 'getItem', 'removeItem', 'length']; | ||
MockStorageHelper.mockStorages = {}; | ||
return MockStorageHelper; | ||
}()); | ||
MockStorageHelper.securedFields = ['setItem', 'getItem', 'removeItem', 'length']; | ||
MockStorageHelper.mockStorages = {}; | ||
var CACHED = (_a$1 = {}, _a$1[STORAGE.local] = {}, _a$1[STORAGE.session] = {}, _a$1); | ||
var STORAGEAVAILABILITY = (_b = {}, _b[STORAGE.local] = null, _b[STORAGE.session] = null, _b); | ||
var WebStorageHelper = (function () { | ||
@@ -135,9 +139,9 @@ function WebStorageHelper() { | ||
this.getStorage(sType).setItem(sKey, JSON.stringify(value)); | ||
this.cached[sType][sKey] = value; | ||
CACHED[sType][sKey] = value; | ||
StorageObserverHelper.emit(sType, sKey, value); | ||
}; | ||
WebStorageHelper.retrieve = function (sType, sKey) { | ||
if (this.cached[sType][sKey]) | ||
return this.cached[sType][sKey]; | ||
return this.cached[sType][sKey] = WebStorageHelper.retrieveFromStorage(sType, sKey); | ||
if (CACHED[sType][sKey]) | ||
return CACHED[sType][sKey]; | ||
return CACHED[sType][sKey] = WebStorageHelper.retrieveFromStorage(sType, sKey); | ||
}; | ||
@@ -159,7 +163,7 @@ WebStorageHelper.retrieveFromStorage = function (sType, sKey) { | ||
if (value === null) { | ||
delete this.cached[sType][sKey]; | ||
delete CACHED[sType][sKey]; | ||
StorageObserverHelper.emit(sType, sKey, null); | ||
} | ||
else if (value !== this.cached[sType][sKey]) { | ||
this.cached[sType][sKey] = value; | ||
else if (value !== CACHED[sType][sKey]) { | ||
CACHED[sType][sKey] = value; | ||
StorageObserverHelper.emit(sType, sKey, value); | ||
@@ -169,3 +173,2 @@ } | ||
WebStorageHelper.clearAll = function (sType) { | ||
var _this = this; | ||
var storage = this.getStorage(sType); | ||
@@ -175,3 +178,3 @@ KeyStorageHelper.retrieveKeysFromStorage(storage) | ||
storage.removeItem(sKey); | ||
delete _this.cached[sType][sKey]; | ||
delete CACHED[sType][sKey]; | ||
StorageObserverHelper.emit(sType, sKey, null); | ||
@@ -182,7 +185,10 @@ }); | ||
this.getStorage(sType).removeItem(sKey); | ||
delete this.cached[sType][sKey]; | ||
delete CACHED[sType][sKey]; | ||
StorageObserverHelper.emit(sType, sKey, null); | ||
}; | ||
WebStorageHelper.getStorage = function (sType) { | ||
return this.isStorageAvailable(sType) ? this.getWStorage(sType) : MockStorageHelper.getStorage(sType); | ||
if (this.isStorageAvailable(sType)) | ||
return this.getWStorage(sType); | ||
else | ||
MockStorageHelper.getStorage(sType); | ||
}; | ||
@@ -204,4 +210,4 @@ WebStorageHelper.getWStorage = function (sType) { | ||
WebStorageHelper.isStorageAvailable = function (sType) { | ||
if (typeof this.storageAvailability[sType] === 'boolean') | ||
return this.storageAvailability[sType]; | ||
if (typeof STORAGEAVAILABILITY[sType] === 'boolean') | ||
return STORAGEAVAILABILITY[sType]; | ||
var isAvailable = true, storage = this.getWStorage(sType); | ||
@@ -221,9 +227,8 @@ if (typeof storage === 'object') { | ||
console.warn(STORAGE_NAMES[sType] + " storage unavailable, Ng2Webstorage will use a fallback strategy instead"); | ||
return this.storageAvailability[sType] = isAvailable; | ||
return STORAGEAVAILABILITY[sType] = isAvailable; | ||
}; | ||
WebStorageHelper.cached = (_a = {}, _a[STORAGE.local] = {}, _a[STORAGE.session] = {}, _a); | ||
WebStorageHelper.storageAvailability = (_b = {}, _b[STORAGE.local] = null, _b[STORAGE.session] = null, _b); | ||
return WebStorageHelper; | ||
var _a, _b; | ||
}()); | ||
var _a$1; | ||
var _b; | ||
@@ -257,37 +262,47 @@ var WebStorageService = (function () { | ||
var __extends = (undefined && undefined.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var __extends = (undefined && undefined.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
var LocalStorageService = (function (_super) { | ||
__extends(LocalStorageService, _super); | ||
function LocalStorageService() { | ||
_super.call(this, STORAGE.local); | ||
return _super.call(this, STORAGE.local) || this; | ||
} | ||
LocalStorageService.decorators = [ | ||
{ type: _angular_core.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
LocalStorageService.ctorParameters = function () { return []; }; | ||
return LocalStorageService; | ||
}(WebStorageService)); | ||
LocalStorageService.decorators = [ | ||
{ type: _angular_core.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
LocalStorageService.ctorParameters = function () { return []; }; | ||
var __extends$1 = (undefined && undefined.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var __extends$1 = (undefined && undefined.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
var SessionStorageService = (function (_super) { | ||
__extends$1(SessionStorageService, _super); | ||
function SessionStorageService() { | ||
_super.call(this, STORAGE.session); | ||
return _super.call(this, STORAGE.session) || this; | ||
} | ||
SessionStorageService.decorators = [ | ||
{ type: _angular_core.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
SessionStorageService.ctorParameters = function () { return []; }; | ||
return SessionStorageService; | ||
}(WebStorageService)); | ||
SessionStorageService.decorators = [ | ||
{ type: _angular_core.Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
SessionStorageService.ctorParameters = function () { return []; }; | ||
@@ -313,3 +328,2 @@ var WebstorageConfig = (function () { | ||
} | ||
function WebStorageDecorator(webSKey, sType, targetedClass, raw) { | ||
@@ -379,16 +393,16 @@ var key = webSKey || raw; | ||
}; | ||
Ng2Webstorage.decorators = [ | ||
{ type: _angular_core.NgModule, args: [{ | ||
declarations: [], | ||
providers: [SessionStorageService, LocalStorageService], | ||
imports: [] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
Ng2Webstorage.ctorParameters = function () { return [ | ||
{ type: _angular_core.NgZone, }, | ||
{ type: WebstorageConfig, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.Inject, args: [WebstorageConfig,] },] }, | ||
]; }; | ||
return Ng2Webstorage; | ||
}()); | ||
Ng2Webstorage.decorators = [ | ||
{ type: _angular_core.NgModule, args: [{ | ||
declarations: [], | ||
providers: [SessionStorageService, LocalStorageService], | ||
imports: [] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
Ng2Webstorage.ctorParameters = function () { return [ | ||
{ type: _angular_core.NgZone, }, | ||
{ type: WebstorageConfig, decorators: [{ type: _angular_core.Optional }, { type: _angular_core.Inject, args: [WebstorageConfig,] },] }, | ||
]; }; | ||
function provideConfig(config) { | ||
@@ -421,2 +435,2 @@ return new WebstorageConfig(config); | ||
}))); | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZS51bWQuanMiLCJzb3VyY2VzIjpbIi4uL2Rpc3QvZW51bXMvc3RvcmFnZS5qcyIsIi4uL2Rpc3QvY29uc3RhbnRzL2xpYi5qcyIsIi4uL2Rpc3QvaGVscGVycy9rZXlTdG9yYWdlLmpzIiwiLi4vZGlzdC9oZWxwZXJzL3N0b3JhZ2VPYnNlcnZlci5qcyIsIi4uL2Rpc3QvaGVscGVycy9tb2NrU3RvcmFnZS5qcyIsIi4uL2Rpc3QvaGVscGVycy93ZWJTdG9yYWdlLmpzIiwiLi4vZGlzdC9zZXJ2aWNlcy93ZWJTdG9yYWdlLmpzIiwiLi4vZGlzdC9zZXJ2aWNlcy9sb2NhbFN0b3JhZ2UuanMiLCIuLi9kaXN0L3NlcnZpY2VzL3Nlc3Npb25TdG9yYWdlLmpzIiwiLi4vZGlzdC9pbnRlcmZhY2VzL2NvbmZpZy5qcyIsIi4uL2Rpc3QvZGVjb3JhdG9ycy93ZWJTdG9yYWdlLmpzIiwiLi4vZGlzdC9kZWNvcmF0b3JzL2xvY2FsU3RvcmFnZS5qcyIsIi4uL2Rpc3QvZGVjb3JhdG9ycy9zZXNzaW9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G4gICAgfTtcclxuICAgIE1vY2tTdG9yYWdlSGVscGVyLmdlbmVyYXRlU3RvcmFnZSA9IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICB2YXIgc3RvcmFnZSA9IHt9O1xyXG4gICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0aWVzKHN0b3JhZ2UsIHtcclxuICAgICAgICAgICAgc2V0SXRlbToge1xyXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIChrZXksIHZhbHVlKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFNb2NrU3RvcmFnZUhlbHBlci5pc1NlY3VyZWRGaWVsZChrZXkpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW2tleV0gPSB2YWx1ZTtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldEl0ZW06IHtcclxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiAoa2V5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICFNb2NrU3RvcmFnZUhlbHBlci5pc1NlY3VyZWRGaWVsZChrZXkpID8gdGhpc1trZXldIHx8IG51bGwgOiBudWxsO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgcmVtb3ZlSXRlbToge1xyXG4gICAgICAgICAgICAgICAgd3JpdGFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgZW51bWVyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgdmFsdWU6IGZ1bmN0aW9uIChrZXkpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIU1vY2tTdG9yYWdlSGVscGVyLmlzU2VjdXJlZEZpZWxkKGtleSkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSB0aGlzW2tleV07XHJcbiAgICAgICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBsZW5ndGg6IHtcclxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBPYmplY3Qua2V5cyh0aGlzKS5sZW5ndGg7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9KTtcclxuICAgICAgICByZXR1cm4gc3RvcmFnZTtcclxuICAgIH07XHJcbiAgICBNb2NrU3RvcmFnZUhlbHBlci5zZWN1cmVkRmllbGRzID0gWydzZXRJdGVtJywgJ2dldEl0ZW0nLCAncmVtb3ZlSXRlbScsICdsZW5ndGgnXTtcclxuICAgIE1vY2tTdG9yYWdlSGVscGVyLm1vY2tTdG9yYWdlcyA9IHt9O1xyXG4gICAgcmV0dXJuIE1vY2tTdG9yYWdlSGVscGVyO1xyXG59KCkpO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1tb2NrU3RvcmFnZS5qcy5tYXAiLCJpbXBvcnQgeyBTVE9SQUdFIH0gZnJvbSAnLi4vZW51bXMvc3RvcmFnZSc7XHJcbmltcG9ydCB7IFN0b3JhZ2VPYnNlcnZlckhlbHBlciB9IG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XG5leHBvcnQgKiBmcm9tICcuL3NlcnZpY2VzL2luZGV4JztcclxuZXhwb3J0IHZhciBXRUJTVE9SQUdFX0NPTkZJRyA9IG5ldyBPcGFxdWVUb2tlbignV0VCU1RPUkFHRV9DT05GSUcnKTtcclxuZXhwb3J0IHZhciBOZzJXZWJzdG9yYWdlID0gKGZ1bmN0aW9uICgpIHtcclxuICAgIGZ1bmN0aW9uIE5nMldlYnN0b3JhZ2Uobmdab25lLCBjb25maWcpIHtcclxuICAgICAgICB0aGlzLm5nWm9uZSA9IG5nWm9uZTtcclxuICAgICAgICBpZiAoY29uZmlnKSB7XHJcbiAgICAgICAgICAgIEtleVN0b3JhZ2VIZWxwZXIuc2V0U3RvcmFnZUtleVByZWZpeChjb25maWcucHJlZml4KTtcclxuICAgICAgICAgICAgS2V5U3RvcmFnZUhlbHBlci5zZXRTdG9yYWdlS2V5U2VwYXJhdG9yKGNvbmZpZy5zZXBhcmF0b3IpO1xyXG4gICAgICAgIH1cclxuICAgICAgICB0aGlzLmluaXRTdG9yYWdlTGlzdGVuZXIoKTtcclxuICAgIH1cclxuICAgIE5nMldlYnN0b3JhZ2UuZm9yUm9vdCA9IGZ1bmN0aW9uIChjb25maWcpIHtcclxuICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICBuZ01vZHVsZTogTmcyV2Vic3RvcmFnZSxcclxuICAgICAgICAgICAgcHJvdmlkZXJzOiBbXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogV0VCU1RPUkFHRV9DT05GSUcsXHJcbiAgICAgICAgICAgICAgICAgICAgdXNlVmFsdWU6IGNvbmZpZ1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgICAgIHtcclxuICAgICAgICAgICAgICAgICAgICBwcm92aWRlOiBXZWJzdG9yYWdlQ29uZmlnLFxyXG4gICAgICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IHByb3ZpZGVDb25maWc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gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRJdGVtOiB7XHJcbiAgICAgICAgICAgICAgICB3cml0YWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICB2YWx1ZTogZnVuY3Rpb24gKGtleSkge1xyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAhTW9ja1N0b3JhZ2VIZWxwZXIuaXNTZWN1cmVkRmllbGQoa2V5KSA/IHRoaXNba2V5XSB8fCBudWxsIDogbnVsbDtcclxuICAgICAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHJlbW92ZUl0ZW06IHtcclxuICAgICAgICAgICAgICAgIHdyaXRhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgY29uZmlndXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIHZhbHVlOiBmdW5jdGlvbiAoa2V5KSB7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFNb2NrU3RvcmFnZUhlbHBlci5pc1NlY3VyZWRGaWVsZChrZXkpKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGUgdGhpc1trZXldO1xyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgbGVuZ3RoOiB7XHJcbiAgICAgICAgICAgICAgICBlbnVtZXJhYmxlOiBmYWxzZSxcclxuICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogZmFsc2UsXHJcbiAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gT2JqZWN0LmtleXModGhpcykubGVuZ3RoO1xyXG4gICAg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ICAgICAgIH0sXHJcbiAgICAgICAgICAgICAgICB7XHJcbiAgICAgICAgICAgICAgICAgICAgcHJvdmlkZTogV2Vic3RvcmFnZUNvbmZpZyxcclxuICAgICAgICAgICAgICAgICAgICB1c2VGYWN0b3J5OiBwcm92aWRlQ29uZmlnLFxyXG4gICAgICAgICAgICAgICAgICAgIGRlcHM6IFtcclxuICAgICAgICAgICAgICAgICAgICAgICAgV0VCU1RPUkFHRV9DT05GSUdcclxuICAgICAgICAgICAgICAgICAgICBdXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIF1cclxuICAgICAgICB9O1xyXG4gICAgfTtcclxuICAgIE5nMldlYnN0b3JhZ2UucHJvdG90eXBlLmluaXRTdG9yYWdlTGlzdGVuZXIgPSBmdW5jdGlvbiAoKSB7XHJcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcclxuICAgICAgICBpZiAod2luZG93KSB7XHJcbiAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdzdG9yYWdlJywgZnVuY3Rpb24gKGV2ZW50KSB7IHJldHVybiBfdGhpcy5uZ1pvbmUucnVuKGZ1bmN0aW9uICgpIHtcclxuICAgICAgICAgICAgICAgIHZhciBzdG9yYWdlID0gd2luZG93LnNlc3Npb25TdG9yYWdlID09PSBldmVudC5zdG9yYWdlQXJlYSA/IFNUT1JBR0Uuc2Vzc2lvbiA6IFNUT1JBR0UubG9jYWw7XHJcbiAgICAgICAgICAgICAgICBXZWJTdG9yYWdlSGVscGVyLnJlZnJlc2goc3RvcmFnZSwgZXZlbnQua2V5KTtcclxuICAgICAgICAgICAgfSk7IH0pO1xyXG4gICAgICAgIH1cclxuICAgIH07XHJcbiAgICByZXR1cm4gTmcyV2Vic3RvcmFnZTtcclxufSgpKTtcclxuZXhwb3J0IHsgTmcyV2Vic3RvcmFnZSB9O1xyXG5OZzJXZWJzdG9yYWdlLmRlY29yYXRvcnMgPSBbXHJcbiAgICB7IHR5cGU6IE5n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DQUFDLEVBQUUsRUFBRTtJQUMxQixJQUFJLEVBQUUsR0FBRyxFQUFFLEtBQUssS0FBSyxDQUFDLEdBQUcsRUFBRSxNQUFNLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxpQkFBaUIsRUFBRSxHQUFHLEVBQUUsRUFBRSxNQUFNLEdBQUcsRUFBRSxDQUFDLE1BQU0sRUFBRSxTQUFTLEdBQUcsRUFBRSxDQUFDLFNBQVMsQ0FBQzs7SUFFOUgsT0FBTyxDQUFDLElBQUksQ0FBQyxtSEFBbUgsQ0FBQyxDQUFDO0lBQ2xJLGdCQUFnQixDQUFDLG1CQUFtQixDQUFDLE1BQU0sQ0FBQyxDQUFDO0lBQzdDLGdCQUFnQixDQUFDLHNCQUFzQixDQUFDLFNBQVMsQ0FBQyxDQUFDO0NBQ3RELEFBQ0QsOzs7Ozs7Ozs7Ozs7Oyw7Oyw7OyJ9 |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],t):t(e.ng2Webstorage=e.ng2Webstorage||{},e.ng.core)}(this,function(e,t){"use strict";function r(e,t){return function(t,r){o(e,c.local,t,r)}}function o(e,t,r,o){var n=e||o;Object.defineProperty(r,o,{get:function(){var e=v.genKey(n);return S.retrieve(t,e)},set:function(e){var r=v.genKey(n);this[r]=e,S.store(t,r,e)}})}function n(e){return function(t,r){o(e,c.local,t,r)}}function i(e){return function(t,r){o(e,c.session,t,r)}}function s(e){return new I(e)}function a(e){var t=void 0===e?{prefix:l,separator:f}:e,r=t.prefix,o=t.separator;console.warn("[ng2-webstorage:deprecation] The configure method is deprecated since the v1.5.0, consider to use forRoot instead"),v.setStorageKeyPrefix(r),v.setStorageKeySeparator(o)}var c;!function(e){e[e.local=0]="local",e[e.session=1]="session"}(c||(c={}));var u,l="ng2-webstorage",f="|",g=(u={},u[c.local]="local",u[c.session]="session",u),p=l,h=f,v=function(){function e(){}return e.isManagedKey=function(e){return 0===e.indexOf(p+h)},e.retrieveKeysFromStorage=function(e){return Object.keys(e).filter(function(e){return 0===e.indexOf(p)})},e.genKey=function(e){if("string"!=typeof e)throw Error("attempt to generate a storage key with a non string value");return""+p+h+e.toString().toLowerCase()},e.setStorageKeyPrefix=function(e){void 0===e&&(e=l),p=e},e.setStorageKeySeparator=function(e){void 0===e&&(e=f),h=e},e}(),d=function(){function e(){}return e.observe=function(e,r){var o=this.genObserverKey(e,r);return o in this.observers?this.observers[o]:this.observers[o]=new t.EventEmitter},e.emit=function(e,t,r){var o=this.genObserverKey(e,t);o in this.observers&&this.observers[o].emit(r)},e.genObserverKey=function(e,t){return e+"|"+t},e.observers={},e}(),y=function(){function e(){}return e.isSecuredField=function(t){return!!~e.securedFields.indexOf(t)},e.getStorage=function(t){return this.mockStorages[t]||(this.mockStorages[t]=e.generateStorage()),this.mockStorages[t]},e.generateStorage=function(){var t={};return Object.defineProperties(t,{setItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t,r){e.isSecuredField(t)||(this[t]=r)}},getItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t){return e.isSecuredField(t)?null:this[t]||null}},removeItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t){e.isSecuredField(t)||delete this[t]}},length:{enumerable:!1,configurable:!1,get:function(){return Object.keys(this).length}}}),t},e.securedFields=["setItem","getItem","removeItem","length"],e.mockStorages={},e}(),S=function(){function e(){}return e.store=function(e,t,r){this.getStorage(e).setItem(t,JSON.stringify(r)),this.cached[e][t]=r,d.emit(e,t,r)},e.retrieve=function(t,r){return this.cached[t][r]?this.cached[t][r]:this.cached[t][r]=e.retrieveFromStorage(t,r)},e.retrieveFromStorage=function(e,t){var r=null;try{r=JSON.parse(this.getStorage(e).getItem(t))}catch(e){console.warn("invalid value for "+t)}return r},e.refresh=function(t,r){if(v.isManagedKey(r)){var o=e.retrieveFromStorage(t,r);null===o?(delete this.cached[t][r],d.emit(t,r,null)):o!==this.cached[t][r]&&(this.cached[t][r]=o,d.emit(t,r,o))}},e.clearAll=function(e){var t=this,r=this.getStorage(e);v.retrieveKeysFromStorage(r).forEach(function(o){r.removeItem(o),delete t.cached[e][o],d.emit(e,o,null)})},e.clear=function(e,t){this.getStorage(e).removeItem(t),delete this.cached[e][t],d.emit(e,t,null)},e.getStorage=function(e){return this.isStorageAvailable(e)?this.getWStorage(e):y.getStorage(e)},e.getWStorage=function(e){var t;switch(e){case c.local:t=localStorage;break;case c.session:t=sessionStorage;break;default:throw Error("invalid storage type")}return t},e.isStorageAvailable=function(e){if("boolean"==typeof this.storageAvailability[e])return this.storageAvailability[e];var t=!0,r=this.getWStorage(e);if("object"==typeof r)try{r.setItem("test-storage","foobar"),r.removeItem("test-storage")}catch(e){t=!1}else t=!1;return t||console.warn(g[e]+" storage unavailable, Ng2Webstorage will use a fallback strategy instead"),this.storageAvailability[e]=t},e.cached=(t={},t[c.local]={},t[c.session]={},t),e.storageAvailability=(r={},r[c.local]=null,r[c.session]=null,r),e;var t,r}(),b=function(){function e(e){void 0===e&&(e=null),this.sType=e,this.sType=e}return e.prototype.store=function(e,t){var r=v.genKey(e);S.store(this.sType,r,t)},e.prototype.retrieve=function(e){var t=v.genKey(e);return S.retrieve(this.sType,t)},e.prototype.clear=function(e){e?S.clear(this.sType,v.genKey(e)):S.clearAll(this.sType)},e.prototype.observe=function(e){var t=v.genKey(e);return d.observe(this.sType,t)},e}(),m=function(e,t){function r(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},w=function(e){function r(){e.call(this,c.local)}return m(r,e),r.decorators=[{type:t.Injectable}],r.ctorParameters=function(){return[]},r}(b),O=function(e,t){function r(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},K=function(e){function r(){e.call(this,c.session)}return O(r,e),r.decorators=[{type:t.Injectable}],r.ctorParameters=function(){return[]},r}(b),I=function(){function e(e){this.prefix=l,this.separator=f,e&&void 0!==e.prefix&&(this.prefix=e.prefix),e&&void 0!==e.separator&&(this.separator=e.separator)}return e}(),x=new t.OpaqueToken("WEBSTORAGE_CONFIG"),F=function(){function e(e,t){this.ngZone=e,t&&(v.setStorageKeyPrefix(t.prefix),v.setStorageKeySeparator(t.separator)),this.initStorageListener()}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:x,useValue:t},{provide:I,useFactory:s,deps:[x]}]}},e.prototype.initStorageListener=function(){var e=this;window&&window.addEventListener("storage",function(t){return e.ngZone.run(function(){var e=window.sessionStorage===t.storageArea?c.session:c.local;S.refresh(e,t.key)})})},e.decorators=[{type:t.NgModule,args:[{declarations:[],providers:[K,w],imports:[]}]}],e.ctorParameters=function(){return[{type:t.NgZone},{type:I,decorators:[{type:t.Optional},{type:t.Inject,args:[I]}]}]},e}();e.WEBSTORAGE_CONFIG=x,e.Ng2Webstorage=F,e.provideConfig=s,e.configure=a,e.WebstorageConfig=I,e.LocalStorage=n,e.SessionStorage=i,e.WebStorage=r,e.WebStorageDecorator=o,e.WebStorageService=b,e.LocalStorageService=w,e.SessionStorageService=K,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core")):"function"==typeof define&&define.amd?define(["exports","@angular/core"],t):t(e.ng2Webstorage=e.ng2Webstorage||{},e.ng.core)}(this,function(e,t){"use strict";function r(e){return 0===e.indexOf(v+y)}function o(e,t){return function(t,r){n(e,c.local,t,r)}}function n(e,t,r,o){var n=e||o;Object.defineProperty(r,o,{get:function(){var e=d.genKey(n);return K.retrieve(t,e)},set:function(e){var r=d.genKey(n);this[r]=e,K.store(t,r,e)}})}function i(e){return function(t,r){n(e,c.local,t,r)}}function s(e){return function(t,r){n(e,c.session,t,r)}}function a(e){return new P(e)}function u(e){var t=void 0===e?{prefix:l,separator:g}:e,r=t.prefix,o=t.separator;console.warn("[ng2-webstorage:deprecation] The configure method is deprecated since the v1.5.0, consider to use forRoot instead"),d.setStorageKeyPrefix(r),d.setStorageKeySeparator(o)}var c;!function(e){e[e.local=0]="local",e[e.session=1]="session"}(c||(c={}));var f,l="ng2-webstorage",g="|",p=(f={},f[c.local]="local",f[c.session]="session",f),v=l,y=g,d=function(){function e(){}return e.isManagedKey=function(e){return 0===e.indexOf(v+y)},e.retrieveKeysFromStorage=function(e){return Object.keys(e).filter(r)},e.genKey=function(e){if("string"!=typeof e)throw Error("attempt to generate a storage key with a non string value");return""+v+y+e.toString().toLowerCase()},e.setStorageKeyPrefix=function(e){void 0===e&&(e=l),v=e},e.setStorageKeySeparator=function(e){void 0===e&&(e=g),y=e},e}(),h=function(){function e(){}return e.observe=function(e,r){var o=this.genObserverKey(e,r);return o in this.observers?this.observers[o]:this.observers[o]=new t.EventEmitter},e.emit=function(e,t,r){var o=this.genObserverKey(e,t);o in this.observers&&this.observers[o].emit(r)},e.genObserverKey=function(e,t){return e+"|"+t},e}();h.observers={};var S=function(){function e(){}return e.isSecuredField=function(t){return!!~e.securedFields.indexOf(t)},e.getStorage=function(t){return this.mockStorages[t]||(this.mockStorages[t]=e.generateStorage()),this.mockStorages[t]},e.generateStorage=function(){var t={};return Object.defineProperties(t,{setItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t,r){e.isSecuredField(t)||(this[t]=r)}},getItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t){return e.isSecuredField(t)?null:this[t]||null}},removeItem:{writable:!1,enumerable:!1,configurable:!1,value:function(t){e.isSecuredField(t)||delete this[t]}},length:{enumerable:!1,configurable:!1,get:function(){return Object.keys(this).length}}}),t},e}();S.securedFields=["setItem","getItem","removeItem","length"],S.mockStorages={};var b,m,w=(b={},b[c.local]={},b[c.session]={},b),O=(m={},m[c.local]=null,m[c.session]=null,m),K=function(){function e(){}return e.store=function(e,t,r){this.getStorage(e).setItem(t,JSON.stringify(r)),w[e][t]=r,h.emit(e,t,r)},e.retrieve=function(t,r){return w[t][r]?w[t][r]:w[t][r]=e.retrieveFromStorage(t,r)},e.retrieveFromStorage=function(e,t){var r=null;try{r=JSON.parse(this.getStorage(e).getItem(t))}catch(e){console.warn("invalid value for "+t)}return r},e.refresh=function(t,r){if(d.isManagedKey(r)){var o=e.retrieveFromStorage(t,r);null===o?(delete w[t][r],h.emit(t,r,null)):o!==w[t][r]&&(w[t][r]=o,h.emit(t,r,o))}},e.clearAll=function(e){var t=this.getStorage(e);d.retrieveKeysFromStorage(t).forEach(function(r){t.removeItem(r),delete w[e][r],h.emit(e,r,null)})},e.clear=function(e,t){this.getStorage(e).removeItem(t),delete w[e][t],h.emit(e,t,null)},e.getStorage=function(e){return this.isStorageAvailable(e)?this.getWStorage(e):void S.getStorage(e)},e.getWStorage=function(e){var t;switch(e){case c.local:t=localStorage;break;case c.session:t=sessionStorage;break;default:throw Error("invalid storage type")}return t},e.isStorageAvailable=function(e){if("boolean"==typeof O[e])return O[e];var t=!0,r=this.getWStorage(e);if("object"==typeof r)try{r.setItem("test-storage","foobar"),r.removeItem("test-storage")}catch(e){t=!1}else t=!1;return t||console.warn(p[e]+" storage unavailable, Ng2Webstorage will use a fallback strategy instead"),O[e]=t},e}(),_=function(){function e(e){void 0===e&&(e=null),this.sType=e,this.sType=e}return e.prototype.store=function(e,t){var r=d.genKey(e);K.store(this.sType,r,t)},e.prototype.retrieve=function(e){var t=d.genKey(e);return K.retrieve(this.sType,t)},e.prototype.clear=function(e){e?K.clear(this.sType,d.genKey(e)):K.clearAll(this.sType)},e.prototype.observe=function(e){var t=d.genKey(e);return h.observe(this.sType,t)},e}(),I=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),x=function(e){function t(){return e.call(this,c.local)||this}return I(t,e),t}(_);x.decorators=[{type:t.Injectable}],x.ctorParameters=function(){return[]};var j=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}}(),F=function(e){function t(){return e.call(this,c.session)||this}return j(t,e),t}(_);F.decorators=[{type:t.Injectable}],F.ctorParameters=function(){return[]};var P=function(){function e(e){this.prefix=l,this.separator=g,e&&void 0!==e.prefix&&(this.prefix=e.prefix),e&&void 0!==e.separator&&(this.separator=e.separator)}return e}(),W=new t.OpaqueToken("WEBSTORAGE_CONFIG"),k=function(){function e(e,t){this.ngZone=e,t&&(d.setStorageKeyPrefix(t.prefix),d.setStorageKeySeparator(t.separator)),this.initStorageListener()}return e.forRoot=function(t){return{ngModule:e,providers:[{provide:W,useValue:t},{provide:P,useFactory:a,deps:[W]}]}},e.prototype.initStorageListener=function(){var e=this;window&&window.addEventListener("storage",function(t){return e.ngZone.run(function(){var e=window.sessionStorage===t.storageArea?c.session:c.local;K.refresh(e,t.key)})})},e}();k.decorators=[{type:t.NgModule,args:[{declarations:[],providers:[F,x],imports:[]}]}],k.ctorParameters=function(){return[{type:t.NgZone},{type:P,decorators:[{type:t.Optional},{type:t.Inject,args:[P]}]}]},e.WEBSTORAGE_CONFIG=W,e.Ng2Webstorage=k,e.provideConfig=a,e.configure=u,e.WebstorageConfig=P,e.LocalStorage=i,e.SessionStorage=s,e.WebStorage=o,e.WebStorageDecorator=n,e.WebStorageService=_,e.LocalStorageService=x,e.SessionStorageService=F,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -0,1 +1,11 @@ | ||
<a name="1.6.0">v1.6.0</a> | ||
### Features | ||
* **ANGULAR 4 Compliant:** The library is now compliant with the ng4 compiler [#23](https://github.com/PillowPillow/ng2-webstorage/issues/23) | ||
### PEER-DEPENDENCY UPDATES ### | ||
* **angular**: @angular/...4.0.1 | ||
<a name="1.5.0">v1.5.0</a> | ||
@@ -2,0 +12,0 @@ |
@@ -12,3 +12,3 @@ import { NgModule, NgZone, OpaqueToken, Inject, Optional } from '@angular/core'; | ||
export var WEBSTORAGE_CONFIG = new OpaqueToken('WEBSTORAGE_CONFIG'); | ||
export var Ng2Webstorage = (function () { | ||
var Ng2Webstorage = (function () { | ||
function Ng2Webstorage(ngZone, config) { | ||
@@ -49,16 +49,17 @@ this.ngZone = ngZone; | ||
}; | ||
Ng2Webstorage.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [], | ||
providers: [SessionStorageService, LocalStorageService], | ||
imports: [] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
Ng2Webstorage.ctorParameters = function () { return [ | ||
{ type: NgZone, }, | ||
{ type: WebstorageConfig, decorators: [{ type: Optional }, { type: Inject, args: [WebstorageConfig,] },] }, | ||
]; }; | ||
return Ng2Webstorage; | ||
}()); | ||
export { Ng2Webstorage }; | ||
Ng2Webstorage.decorators = [ | ||
{ type: NgModule, args: [{ | ||
declarations: [], | ||
providers: [SessionStorageService, LocalStorageService], | ||
imports: [] | ||
},] }, | ||
]; | ||
/** @nocollapse */ | ||
Ng2Webstorage.ctorParameters = function () { return [ | ||
{ type: NgZone, }, | ||
{ type: WebstorageConfig, decorators: [{ type: Optional }, { type: Inject, args: [WebstorageConfig,] },] }, | ||
]; }; | ||
export function provideConfig(config) { | ||
@@ -65,0 +66,0 @@ return new WebstorageConfig(config); |
@@ -1,5 +0,5 @@ | ||
export declare const LIB_KEY: string; | ||
export declare const LIB_KEY_SEPARATOR: string; | ||
export declare const LIB_KEY = "ng2-webstorage"; | ||
export declare const LIB_KEY_SEPARATOR = "|"; | ||
export declare const STORAGE_NAMES: { | ||
[x: number]: string; | ||
}; |
@@ -7,5 +7,4 @@ import { STORAGE } from '../enums/storage'; | ||
_a[STORAGE.session] = 'session', | ||
_a | ||
); | ||
_a); | ||
var _a; | ||
//# sourceMappingURL=lib.js.map |
@@ -8,3 +8,2 @@ import { KeyStorageHelper, WebStorageHelper } from '../helpers/index'; | ||
} | ||
; | ||
export function WebStorageDecorator(webSKey, sType, targetedClass, raw) { | ||
@@ -24,3 +23,2 @@ var key = webSKey || raw; | ||
} | ||
; | ||
//# sourceMappingURL=webStorage.js.map |
import { IWebStorage } from '../interfaces/webStorage'; | ||
export declare function isManagedKey(sKey: string): boolean; | ||
export declare class KeyStorageHelper { | ||
@@ -3,0 +4,0 @@ static isManagedKey(sKey: string): boolean; |
import { LIB_KEY, LIB_KEY_SEPARATOR } from '../constants/lib'; | ||
var CUSTOM_LIB_KEY = LIB_KEY; | ||
var CUSTOM_LIB_KEY_SEPARATOR = LIB_KEY_SEPARATOR; | ||
export var KeyStorageHelper = (function () { | ||
export function isManagedKey(sKey) { | ||
return sKey.indexOf(CUSTOM_LIB_KEY + CUSTOM_LIB_KEY_SEPARATOR) === 0; | ||
} | ||
var KeyStorageHelper = (function () { | ||
function KeyStorageHelper() { | ||
@@ -11,3 +14,3 @@ } | ||
KeyStorageHelper.retrieveKeysFromStorage = function (storage) { | ||
return Object.keys(storage).filter(function (key) { return key.indexOf(CUSTOM_LIB_KEY) === 0; }); | ||
return Object.keys(storage).filter(isManagedKey); | ||
}; | ||
@@ -29,2 +32,3 @@ KeyStorageHelper.genKey = function (raw) { | ||
}()); | ||
export { KeyStorageHelper }; | ||
//# sourceMappingURL=keyStorage.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"KeyStorageHelper":{"__symbolic":"class","statics":{"isManagedKey":{"__symbolic":"function","parameters":["sKey"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"sKey"},"member":"indexOf"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY"},"right":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY_SEPARATOR"}}]},"right":0}},"retrieveKeysFromStorage":{"__symbolic":"function","parameters":["storage"],"value":{"__symbolic":"error","message":"Function call not supported","line":13,"character":37}}}}}},{"__symbolic":"module","version":1,"metadata":{"KeyStorageHelper":{"__symbolic":"class","statics":{"isManagedKey":{"__symbolic":"function","parameters":["sKey"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"sKey"},"member":"indexOf"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY"},"right":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY_SEPARATOR"}}]},"right":0}},"retrieveKeysFromStorage":{"__symbolic":"function","parameters":["storage"],"value":{"__symbolic":"error","message":"Function call not supported","line":13,"character":37}}}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"isManagedKey":{"__symbolic":"function","parameters":["sKey"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"sKey"},"member":"indexOf"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY"},"right":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY_SEPARATOR"}}]},"right":0}},"KeyStorageHelper":{"__symbolic":"class","statics":{"isManagedKey":{"__symbolic":"function","parameters":["sKey"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"sKey"},"member":"indexOf"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY"},"right":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY_SEPARATOR"}}]},"right":0}},"retrieveKeysFromStorage":{"__symbolic":"function","parameters":["storage"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"keys"},"arguments":[{"__symbolic":"reference","name":"storage"}]},"member":"filter"},"arguments":[{"__symbolic":"reference","name":"isManagedKey"}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"isManagedKey":{"__symbolic":"function","parameters":["sKey"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"sKey"},"member":"indexOf"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY"},"right":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY_SEPARATOR"}}]},"right":0}},"KeyStorageHelper":{"__symbolic":"class","statics":{"isManagedKey":{"__symbolic":"function","parameters":["sKey"],"value":{"__symbolic":"binop","operator":"===","left":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"sKey"},"member":"indexOf"},"arguments":[{"__symbolic":"binop","operator":"+","left":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY"},"right":{"__symbolic":"reference","module":"../constants/lib","name":"LIB_KEY_SEPARATOR"}}]},"right":0}},"retrieveKeysFromStorage":{"__symbolic":"function","parameters":["storage"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"Object"},"member":"keys"},"arguments":[{"__symbolic":"reference","name":"storage"}]},"member":"filter"},"arguments":[{"__symbolic":"reference","name":"isManagedKey"}]}}}}}}] |
@@ -1,2 +0,2 @@ | ||
export var MockStorageHelper = (function () { | ||
var MockStorageHelper = (function () { | ||
function MockStorageHelper() { | ||
@@ -51,6 +51,7 @@ } | ||
}; | ||
MockStorageHelper.securedFields = ['setItem', 'getItem', 'removeItem', 'length']; | ||
MockStorageHelper.mockStorages = {}; | ||
return MockStorageHelper; | ||
}()); | ||
export { MockStorageHelper }; | ||
MockStorageHelper.securedFields = ['setItem', 'getItem', 'removeItem', 'length']; | ||
MockStorageHelper.mockStorages = {}; | ||
//# sourceMappingURL=mockStorage.js.map |
import { EventEmitter } from '@angular/core'; | ||
export var StorageObserverHelper = (function () { | ||
var StorageObserverHelper = (function () { | ||
function StorageObserverHelper() { | ||
@@ -17,7 +17,8 @@ } | ||
StorageObserverHelper.genObserverKey = function (sType, sKey) { | ||
return sType + "|" + sKey; | ||
return sType + '|' + sKey; | ||
}; | ||
StorageObserverHelper.observers = {}; | ||
return StorageObserverHelper; | ||
}()); | ||
export { StorageObserverHelper }; | ||
StorageObserverHelper.observers = {}; | ||
//# sourceMappingURL=storageObserver.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"StorageObserverHelper":{"__symbolic":"class","statics":{"observers":{},"genObserverKey":{"__symbolic":"function","parameters":["sType","sKey"],"value":{"__symbolic":"error","message":"Expression form not supported","line":20,"character":9}}}}}},{"__symbolic":"module","version":1,"metadata":{"StorageObserverHelper":{"__symbolic":"class","statics":{"observers":{},"genObserverKey":{"__symbolic":"function","parameters":["sType","sKey"],"value":{"__symbolic":"error","message":"Expression form not supported","line":20,"character":9}}}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"StorageObserverHelper":{"__symbolic":"class","statics":{"observers":{},"genObserverKey":{"__symbolic":"function","parameters":["sType","sKey"],"value":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"reference","name":"sType"},"right":"|"},"right":{"__symbolic":"reference","name":"sKey"}}}}}}},{"__symbolic":"module","version":1,"metadata":{"StorageObserverHelper":{"__symbolic":"class","statics":{"observers":{},"genObserverKey":{"__symbolic":"function","parameters":["sType","sKey"],"value":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"binop","operator":"+","left":{"__symbolic":"reference","name":"sType"},"right":"|"},"right":{"__symbolic":"reference","name":"sKey"}}}}}}}] |
import { IWebStorage } from '../interfaces/webStorage'; | ||
import { STORAGE } from '../enums/storage'; | ||
export declare class WebStorageHelper { | ||
static cached: { | ||
[x: number]: {}; | ||
}; | ||
static storageAvailability: { | ||
[x: number]: any; | ||
}; | ||
static store(sType: STORAGE, sKey: string, value: any): void; | ||
@@ -11,0 +5,0 @@ static retrieve(sType: STORAGE, sKey: string): string; |
@@ -6,3 +6,5 @@ import { STORAGE } from '../enums/storage'; | ||
import { STORAGE_NAMES } from '../constants/lib'; | ||
export var WebStorageHelper = (function () { | ||
var CACHED = (_a = {}, _a[STORAGE.local] = {}, _a[STORAGE.session] = {}, _a); | ||
var STORAGEAVAILABILITY = (_b = {}, _b[STORAGE.local] = null, _b[STORAGE.session] = null, _b); | ||
var WebStorageHelper = (function () { | ||
function WebStorageHelper() { | ||
@@ -12,9 +14,9 @@ } | ||
this.getStorage(sType).setItem(sKey, JSON.stringify(value)); | ||
this.cached[sType][sKey] = value; | ||
CACHED[sType][sKey] = value; | ||
StorageObserverHelper.emit(sType, sKey, value); | ||
}; | ||
WebStorageHelper.retrieve = function (sType, sKey) { | ||
if (this.cached[sType][sKey]) | ||
return this.cached[sType][sKey]; | ||
return this.cached[sType][sKey] = WebStorageHelper.retrieveFromStorage(sType, sKey); | ||
if (CACHED[sType][sKey]) | ||
return CACHED[sType][sKey]; | ||
return CACHED[sType][sKey] = WebStorageHelper.retrieveFromStorage(sType, sKey); | ||
}; | ||
@@ -36,7 +38,7 @@ WebStorageHelper.retrieveFromStorage = function (sType, sKey) { | ||
if (value === null) { | ||
delete this.cached[sType][sKey]; | ||
delete CACHED[sType][sKey]; | ||
StorageObserverHelper.emit(sType, sKey, null); | ||
} | ||
else if (value !== this.cached[sType][sKey]) { | ||
this.cached[sType][sKey] = value; | ||
else if (value !== CACHED[sType][sKey]) { | ||
CACHED[sType][sKey] = value; | ||
StorageObserverHelper.emit(sType, sKey, value); | ||
@@ -46,3 +48,2 @@ } | ||
WebStorageHelper.clearAll = function (sType) { | ||
var _this = this; | ||
var storage = this.getStorage(sType); | ||
@@ -52,3 +53,3 @@ KeyStorageHelper.retrieveKeysFromStorage(storage) | ||
storage.removeItem(sKey); | ||
delete _this.cached[sType][sKey]; | ||
delete CACHED[sType][sKey]; | ||
StorageObserverHelper.emit(sType, sKey, null); | ||
@@ -59,7 +60,10 @@ }); | ||
this.getStorage(sType).removeItem(sKey); | ||
delete this.cached[sType][sKey]; | ||
delete CACHED[sType][sKey]; | ||
StorageObserverHelper.emit(sType, sKey, null); | ||
}; | ||
WebStorageHelper.getStorage = function (sType) { | ||
return this.isStorageAvailable(sType) ? this.getWStorage(sType) : MockStorageHelper.getStorage(sType); | ||
if (this.isStorageAvailable(sType)) | ||
return this.getWStorage(sType); | ||
else | ||
MockStorageHelper.getStorage(sType); | ||
}; | ||
@@ -81,4 +85,4 @@ WebStorageHelper.getWStorage = function (sType) { | ||
WebStorageHelper.isStorageAvailable = function (sType) { | ||
if (typeof this.storageAvailability[sType] === 'boolean') | ||
return this.storageAvailability[sType]; | ||
if (typeof STORAGEAVAILABILITY[sType] === 'boolean') | ||
return STORAGEAVAILABILITY[sType]; | ||
var isAvailable = true, storage = this.getWStorage(sType); | ||
@@ -98,9 +102,8 @@ if (typeof storage === 'object') { | ||
console.warn(STORAGE_NAMES[sType] + " storage unavailable, Ng2Webstorage will use a fallback strategy instead"); | ||
return this.storageAvailability[sType] = isAvailable; | ||
return STORAGEAVAILABILITY[sType] = isAvailable; | ||
}; | ||
WebStorageHelper.cached = (_a = {}, _a[STORAGE.local] = {}, _a[STORAGE.session] = {}, _a); | ||
WebStorageHelper.storageAvailability = (_b = {}, _b[STORAGE.local] = null, _b[STORAGE.session] = null, _b); | ||
return WebStorageHelper; | ||
var _a, _b; | ||
}()); | ||
export { WebStorageHelper }; | ||
var _a, _b; | ||
//# sourceMappingURL=webStorage.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"WebStorageHelper":{"__symbolic":"class","statics":{"cached":{"__symbolic":"error","message":"Expression form not supported","line":9,"character":18},"storageAvailability":{"__symbolic":"error","message":"Expression form not supported","line":10,"character":31},"getStorage":{"__symbolic":"function","parameters":["sType"],"value":{"__symbolic":"if","condition":{"__symbolic":"error","message":"Expression form not supported","line":66,"character":9},"thenExpression":{"__symbolic":"error","message":"Expression form not supported","line":66,"character":42},"elseExpression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"./mockStorage","name":"MockStorageHelper"},"member":"getStorage"},"arguments":[{"__symbolic":"reference","name":"sType"}]}}}}}}},{"__symbolic":"module","version":1,"metadata":{"WebStorageHelper":{"__symbolic":"class","statics":{"cached":{"__symbolic":"error","message":"Expression form not supported","line":9,"character":18},"storageAvailability":{"__symbolic":"error","message":"Expression form not supported","line":10,"character":31},"getStorage":{"__symbolic":"function","parameters":["sType"],"value":{"__symbolic":"if","condition":{"__symbolic":"error","message":"Expression form not supported","line":66,"character":9},"thenExpression":{"__symbolic":"error","message":"Expression form not supported","line":66,"character":42},"elseExpression":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"./mockStorage","name":"MockStorageHelper"},"member":"getStorage"},"arguments":[{"__symbolic":"reference","name":"sType"}]}}}}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"WebStorageHelper":{"__symbolic":"class"}}},{"__symbolic":"module","version":1,"metadata":{"WebStorageHelper":{"__symbolic":"class"}}}] |
import { LIB_KEY, LIB_KEY_SEPARATOR } from '../constants/lib'; | ||
export var WebstorageConfig = (function () { | ||
var WebstorageConfig = (function () { | ||
function WebstorageConfig(config) { | ||
@@ -15,2 +15,3 @@ this.prefix = LIB_KEY; | ||
}()); | ||
export { WebstorageConfig }; | ||
//# sourceMappingURL=config.js.map |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"WebstorageConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":11,"character":22,"context":{"typeName":"IWebstorageConfig"}}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"WebstorageConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"error","message":"Could not resolve type","line":11,"character":22,"context":{"typeName":"IWebstorageConfig"}}]}]}}}}] | ||
[{"__symbolic":"module","version":3,"metadata":{"IWebstorageConfig":{"__symbolic":"interface"},"WebstorageConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}]}}}},{"__symbolic":"module","version":1,"metadata":{"IWebstorageConfig":{"__symbolic":"interface"},"WebstorageConfig":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"any"}]}]}}}}] |
@@ -1,4 +0,2 @@ | ||
export * from './webStorage'; | ||
export * from './storage'; | ||
export * from './config'; | ||
//# sourceMappingURL=index.js.map |
@@ -1,21 +0,27 @@ | ||
var __extends = (this && this.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
import { Injectable } from '@angular/core'; | ||
import { STORAGE } from '../enums/storage'; | ||
import { WebStorageService } from './webStorage'; | ||
export var LocalStorageService = (function (_super) { | ||
var LocalStorageService = (function (_super) { | ||
__extends(LocalStorageService, _super); | ||
function LocalStorageService() { | ||
_super.call(this, STORAGE.local); | ||
return _super.call(this, STORAGE.local) || this; | ||
} | ||
LocalStorageService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
LocalStorageService.ctorParameters = function () { return []; }; | ||
return LocalStorageService; | ||
}(WebStorageService)); | ||
export { LocalStorageService }; | ||
LocalStorageService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
LocalStorageService.ctorParameters = function () { return []; }; | ||
//# sourceMappingURL=localStorage.js.map |
@@ -1,21 +0,27 @@ | ||
var __extends = (this && this.__extends) || function (d, b) { | ||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
import { Injectable } from '@angular/core'; | ||
import { STORAGE } from '../enums/storage'; | ||
import { WebStorageService } from './webStorage'; | ||
export var SessionStorageService = (function (_super) { | ||
var SessionStorageService = (function (_super) { | ||
__extends(SessionStorageService, _super); | ||
function SessionStorageService() { | ||
_super.call(this, STORAGE.session); | ||
return _super.call(this, STORAGE.session) || this; | ||
} | ||
SessionStorageService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
SessionStorageService.ctorParameters = function () { return []; }; | ||
return SessionStorageService; | ||
}(WebStorageService)); | ||
export { SessionStorageService }; | ||
SessionStorageService.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** @nocollapse */ | ||
SessionStorageService.ctorParameters = function () { return []; }; | ||
//# sourceMappingURL=sessionStorage.js.map |
import { KeyStorageHelper, WebStorageHelper, StorageObserverHelper } from '../helpers/index'; | ||
export var WebStorageService = (function () { | ||
var WebStorageService = (function () { | ||
function WebStorageService(sType) { | ||
@@ -28,2 +28,3 @@ if (sType === void 0) { sType = null; } | ||
}()); | ||
export { WebStorageService }; | ||
//# sourceMappingURL=webStorage.js.map |
{ | ||
"name": "ng2-webstorage", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "angular2 webstorage manager", | ||
@@ -9,10 +9,10 @@ "main": "bundles/core.umd.js", | ||
"devDependencies": { | ||
"@angular/common": "^2.4.1", | ||
"@angular/compiler": "^2.4.1", | ||
"@angular/compiler-cli": "^2.4.1", | ||
"@angular/core": "^2.4.1", | ||
"@angular/forms": "^2.4.1", | ||
"@angular/platform-browser": "2.4.1", | ||
"@angular/platform-browser-dynamic": "^2.4.1", | ||
"@angular/platform-server": "^2.4.1", | ||
"@angular/common": "^4.0.1", | ||
"@angular/compiler": "^4.0.1", | ||
"@angular/compiler-cli": "^4.0.1", | ||
"@angular/core": "^4.0.1", | ||
"@angular/forms": "^4.0.1", | ||
"@angular/platform-browser": "4.0.1", | ||
"@angular/platform-browser-dynamic": "^4.0.1", | ||
"@angular/platform-server": "^4.0.1", | ||
"compression-webpack-plugin": "^0.3.1", | ||
@@ -40,7 +40,7 @@ "es6-shim": "^0.35.1", | ||
"tslint-loader": "^2.1.4", | ||
"typescript": "2.0.6", | ||
"typescript": "~2.2.0", | ||
"webpack": "^1.13.1", | ||
"webpack-dev-server": "^1.14.1", | ||
"webpack-merge": "^0.13.0", | ||
"zone.js": "^0.7.2" | ||
"zone.js": "^0.7.4" | ||
}, | ||
@@ -47,0 +47,0 @@ "scripts": { |
# ng2-webstorage | ||
###Local and session storage - angular2 service (*typescript*) | ||
###Local and session storage - angular4 service | ||
======================= | ||
@@ -4,0 +4,0 @@ |
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
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
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
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
258765
88
1129