@ngx-pwa/local-storage
Advanced tools
Comparing version 7.1.0-beta.0 to 7.1.0
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("@ngx-pwa/local-storage",["exports","@angular/core","rxjs","rxjs/operators","@angular/common"],t):t((e["ngx-pwa"]=e["ngx-pwa"]||{},e["ngx-pwa"]["local-storage"]={}),e.ng.core,e.rxjs,e.rxjs.operators,e.ng.common)}(this,function(e,t,s,c,r){"use strict";var n=new t.InjectionToken("localStoragePrefix",{providedIn:"root",factory:function(){return""}});var o=function(){function e(e){void 0===e&&(e=null),this.userPrefix=e,this.prefix="",e&&(this.prefix=e+"_")}return Object.defineProperty(e.prototype,"size",{get:function(){return s.of(localStorage.length)},enumerable:!0,configurable:!0}),e.prototype.getItem=function(e){var t=localStorage.getItem(""+this.prefix+e),r=null;if(null!=t)try{r=JSON.parse(t)}catch(n){return s.throwError(new Error("Invalid data in localStorage."))}return s.of(r)},e.prototype.setItem=function(e,t){return localStorage.setItem(""+this.prefix+e,JSON.stringify(t)),s.of(!0)},e.prototype.removeItem=function(e){return localStorage.removeItem(""+this.prefix+e),s.of(!0)},e.prototype.clear=function(){return localStorage.clear(),s.of(!0)},e.prototype.keys=function(){for(var e=[],t=0;t<localStorage.length;t+=1){var r=localStorage.key(t);e.push(""===this.prefix?r:r.substr(this.prefix.length))}return 0<e.length?s.from(e):s.EMPTY},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[n]}]}]},e.ngInjectableDef=t.defineInjectable({factory:function(){return new e(t.inject(n,8))},token:e,providedIn:"root"}),e}(),a=function(){function e(e){void 0===e&&(e=null),this.prefix=e,this.dbName="ngStorage",this.objectStoreName="localStorage",this.keyPath="key",this.dataPath="value",this.fallback=null,e&&(this.dbName=e+"_"+this.dbName),this.database=new s.ReplaySubject,this.connect(e)}return Object.defineProperty(e.prototype,"size",{get:function(){var n=this;return this.fallback?this.fallback.size:this.transaction("readonly").pipe(c.mergeMap(function(e){var t=e.count(),r=s.fromEvent(t,"success").pipe(c.map(function(e){return e.target.result}));return s.race(r,n.toErrorObservable(t,"length"))}))},enumerable:!0,configurable:!0}),e.prototype.getItem=function(e){return this.fallback?this.fallback.getItem(e):this.getItemFromTransaction(e)},e.prototype.getItemFromTransaction=function(t,e){var r=this;return(e?s.of(e):this.transaction()).pipe(c.map(function(e){return e.get(t)}),c.mergeMap(function(e){var t=s.fromEvent(e,"success").pipe(c.map(function(e){return e.target.result}),c.map(function(e){return e&&r.dataPath in e?e[r.dataPath]:null}));return s.race(t,r.toErrorObservable(e,"getter"))}))},e.prototype.setItem=function(o,a){var i,u=this;return this.fallback?this.fallback.setItem(o,a):null==a?s.of(!0):this.transaction("readwrite").pipe(c.tap(function(e){i=e}),c.mergeMap(function(){return u.getItemFromTransaction(o,i)}),c.map(function(e){return null==e?"add":"put"}),c.mergeMap(function(e){var t,r,n;switch(e){case"add":n=i.add(((t={})[u.dataPath]=a,t),o);break;case"put":default:n=i.put(((r={})[u.dataPath]=a,r),o)}return s.race(u.toSuccessObservable(n),u.toErrorObservable(n,"setter"))}))},e.prototype.removeItem=function(r){var n=this;return this.fallback?this.fallback.removeItem(r):this.getItem(r).pipe(c.mergeMap(function(e){return null!=e?n.transaction("readwrite").pipe(c.mergeMap(function(e){var t=e["delete"](r);return s.race(n.toSuccessObservable(t),n.toErrorObservable(t,"remover"))})):s.of(!0)}))},e.prototype.clear=function(){var r=this;return this.fallback?this.fallback.clear():this.transaction("readwrite").pipe(c.mergeMap(function(e){var t=e.clear();return s.race(r.toSuccessObservable(t),r.toErrorObservable(t,"clearer"))}))},e.prototype.keys=function(){var n=this;if(this.fallback)return this.fallback.keys();return this.transaction("readonly").pipe(c.mergeMap(function(e){var t=e.getAllKeys(),r=s.fromEvent(t,"success").pipe(c.map(function(e){return e.target.result}),c.mergeMap(function(e){return 0<e.length?s.from(e):s.EMPTY}));return s.race(r,n.toErrorObservable(t,"keys"))}))},e.prototype.connect=function(e){var t,r=this;void 0===e&&(e=null);try{t=indexedDB.open(this.dbName)}catch(o){return void this.setFallback(e)}s.fromEvent(t,"upgradeneeded").pipe(c.first()).subscribe(function(e){var t=e.target.result;t.objectStoreNames.contains(r.objectStoreName)||t.createObjectStore(r.objectStoreName)});var n=s.fromEvent(t,"success");s.race(n,this.toErrorObservable(t,"connection")).pipe(c.first()).subscribe(function(e){r.database.next(e.target.result)},function(){r.setFallback(e)})},e.prototype.transaction=function(t){var r=this;return void 0===t&&(t="readonly"),this.database.pipe(c.map(function(e){return e.transaction([r.objectStoreName],t).objectStore(r.objectStoreName)}))},e.prototype.toSuccessObservable=function(e){return s.fromEvent(e,"success").pipe(c.map(function(){return!0}))},e.prototype.toErrorObservable=function(e,t){return void 0===t&&(t=""),s.fromEvent(e,"error").pipe(c.mergeMap(function(){return s.throwError(new Error("IndexedDB "+t+" issue : "+e.error.message+"."))}),c.take(0))},e.prototype.setFallback=function(e){this.fallback=new o(e)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[n]}]}]},e.ngInjectableDef=t.defineInjectable({factory:function(){return new e(t.inject(n,8))},token:e,providedIn:"root"}),e}(),i=function(){function e(){this.localStorage=new Map}return Object.defineProperty(e.prototype,"size",{get:function(){return s.of(this.localStorage.size)},enumerable:!0,configurable:!0}),e.prototype.getItem=function(e){var t=this.localStorage.get(e);return s.of(t!==undefined?t:null)},e.prototype.setItem=function(e,t){return this.localStorage.set(e,t),s.of(!0)},e.prototype.removeItem=function(e){return this.localStorage["delete"](e),s.of(!0)},e.prototype.clear=function(){return this.localStorage.clear(),s.of(!0)},e.prototype.keys=function(){return 0<this.localStorage.size?s.from(this.localStorage.keys()):s.EMPTY},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=t.defineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}();function u(e,t){return r.isPlatformBrowser(e)&&"indexedDB"in window&&indexedDB!==undefined&&null!==indexedDB?new a(t):r.isPlatformBrowser(e)&&"localStorage"in window&&localStorage!==undefined&&null!==localStorage?new o(t):new i}var l=function(){function e(){}return e.decorators=[{type:t.Injectable,args:[{providedIn:"root",useFactory:u,deps:[t.PLATFORM_ID,[new t.Optional,n]]}]}],e.ngInjectableDef=t.defineInjectable({factory:function(){return u(t.inject(t.PLATFORM_ID),t.inject(n,8))},token:e,providedIn:"root"}),e}();function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}var f=function(){function e(){}return e.prototype.validate=function(e,t){if(!((t.hasOwnProperty("const")&&t["const"]!==undefined||t.hasOwnProperty("enum")&&null!=t["enum"]||t.hasOwnProperty("type")&&null!=t.type)&&"array"!==t.type&&"object"!==t.type||t.hasOwnProperty("properties")&&null!=t.properties||t.hasOwnProperty("items")&&null!=t.items))throw new Error("Each value must have a 'type' or 'properties' or 'items' or 'const' or 'enum', to enforce strict types.");return(!t.hasOwnProperty("const")||t["const"]===undefined||e===t["const"])&&(!!this.validateEnum(e,t)&&(!!this.validateType(e,t)&&(!!this.validateItems(e,t)&&(!!this.validateProperties(e,t)&&!!this.validateRequired(e,t)))))},e.prototype.isObjectNotNull=function(e){return null!==e&&"object"==typeof e},e.prototype.validateProperties=function(e,t){if(!t.hasOwnProperty("properties")||null==t.properties)return!0;if(!this.isObjectNotNull(e))return!1;if(Object.keys(t.properties).length!==Object.keys(e).length)return!1;for(var r in t.properties)if(t.properties.hasOwnProperty(r)&&e.hasOwnProperty(r)&&!this.validate(e[r],t.properties[r]))return!1;return!0},e.prototype.validateRequired=function(e,t){var r,n;if(!t.hasOwnProperty("required")||null==t.required)return!0;if(!this.isObjectNotNull(e))return!1;try{for(var o=p(t.required),a=o.next();!a.done;a=o.next()){var i=a.value;if(!t.properties||!t.properties.hasOwnProperty(i))throw new Error("'required' properties must be described in 'properties' too.");if(!e.hasOwnProperty(i))return!1}}catch(u){r={error:u}}finally{try{a&&!a.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return!0},e.prototype.validateEnum=function(e,t){return!t.hasOwnProperty("enum")||null==t["enum"]||-1!==t["enum"].indexOf(e)},e.prototype.validateType=function(e,t){if(!t.hasOwnProperty("type")||null==t.type)return!0;switch(t.type){case"null":return null===e;case"string":return this.validateString(e,t);case"number":case"integer":return this.validateNumber(e,t);case"boolean":return"boolean"==typeof e;case"object":return"object"==typeof e;case"array":return Array.isArray(e)}return!0},e.prototype.validateItems=function(e,t){var r,n;if(!t.hasOwnProperty("items")||null==t.items)return!0;if(!Array.isArray(e))return!1;if(t.hasOwnProperty("maxItems")&&null!=t.maxItems){if(!Number.isInteger(t.maxItems)||t.maxItems<0)throw new Error("'maxItems' must be a non-negative integer.");if(e.length>t.maxItems)return!1}if(t.hasOwnProperty("minItems")&&null!=t.minItems){if(!Number.isInteger(t.minItems)||t.minItems<0)throw new Error("'minItems' must be a non-negative integer.");if(e.length<t.minItems)return!1}if(t.hasOwnProperty("uniqueItems")&&null!=t.uniqueItems&&t.uniqueItems){var o=new Set(e);if(e.length!==o.size)return!1}if(Array.isArray(t.items))return this.validateItemsList(e,t);try{for(var a=p(e),i=a.next();!i.done;i=a.next()){var u=i.value;if(!this.validate(u,t.items))return!1}}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=a["return"])&&n.call(a)}finally{if(r)throw r.error}}return!0},e.prototype.validateItemsList=function(e,t){var r=t.items;if(e.length!==r.length)return!1;for(var n=0;n<r.length;n+=1)if(!this.validate(e[n],r[n]))return!1;return!0},e.prototype.validateString=function(e,t){if("string"!=typeof e)return!1;if(t.hasOwnProperty("maxLength")&&null!=t.maxLength){if(!Number.isInteger(t.maxLength)||t.maxLength<0)throw new Error("'maxLength' must be a non-negative integer.");if(e.length>t.maxLength)return!1}if(t.hasOwnProperty("minLength")&&null!=t.minLength){if(!Number.isInteger(t.minLength)||t.minLength<0)throw new Error("'minLength' must be a non-negative integer.");if(e.length<t.minLength)return!1}if(t.hasOwnProperty("pattern")&&null!=t.pattern&&!new RegExp(t.pattern).test(e))return!1;return!0},e.prototype.validateNumber=function(e,t){if("number"!=typeof e)return!1;if("integer"===t.type&&!Number.isInteger(e))return!1;if(t.hasOwnProperty("multipleOf")&&null!=t.multipleOf){if(t.multipleOf<=0)throw new Error("'multipleOf' must be a number strictly greater than 0.");if(!Number.isInteger(e/t.multipleOf))return!1}return!(t.hasOwnProperty("maximum")&&null!=t.maximum&&e>t.maximum)&&(!(t.hasOwnProperty("exclusiveMaximum")&&null!=t.exclusiveMaximum&&e>=t.exclusiveMaximum)&&(!(t.hasOwnProperty("minimum")&&null!=t.minimum&&e<t.minimum)&&!(t.hasOwnProperty("exclusiveMinimum")&&null!=t.exclusiveMinimum&&e<=t.exclusiveMinimum)))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=t.defineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),m=function(){function e(e,t){this.database=e,this.jsonValidator=t,this.getItemOptionsDefault={schema:null}}return Object.defineProperty(e.prototype,"size",{get:function(){return this.database.size},enumerable:!0,configurable:!0}),e.prototype.getItem=function(e,n){var o=this;return void 0===n&&(n=this.getItemOptionsDefault),this.database.getItem(e).pipe(c.mergeMap(function(e){if(null===e)return s.of(null);if(n.schema){var t=!0;try{t=o.jsonValidator.validate(e,n.schema)}catch(r){return s.throwError(r)}if(!t)return s.throwError(new Error("JSON invalid"))}return s.of(e)}))},e.prototype.getUnsafeItem=function(e){return this.database.getItem(e)},e.prototype.setItem=function(e,t){return this.database.setItem(e,t)},e.prototype.removeItem=function(e){return this.database.removeItem(e)},e.prototype.clear=function(){return this.database.clear()},e.prototype.keys=function(){return this.database.keys()},e.prototype.setItemSubscribe=function(e,t){this.setItem(e,t).subscribe(function(){},function(){})},e.prototype.removeItemSubscribe=function(e){this.removeItem(e).subscribe(function(){},function(){})},e.prototype.clearSubscribe=function(){this.clear().subscribe(function(){},function(){})},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:l},{type:f}]},e.ngInjectableDef=t.defineInjectable({factory:function(){return new e(t.inject(l),t.inject(f))},token:e,providedIn:"root"}),e}();e.LocalDatabase=l,e.IndexedDBDatabase=a,e.LocalStorageDatabase=o,e.MockLocalDatabase=i,e.JSONValidator=f,e.LocalStorage=m,e.localStorageProviders=function h(e){return[e.prefix?{provide:n,useValue:e.prefix}:[]]},e.LOCAL_STORAGE_PREFIX=n,e.ɵa=u,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs"),require("rxjs/operators"),require("@angular/common")):"function"==typeof define&&define.amd?define("@ngx-pwa/local-storage",["exports","@angular/core","rxjs","rxjs/operators","@angular/common"],t):t((e["ngx-pwa"]=e["ngx-pwa"]||{},e["ngx-pwa"]["local-storage"]={}),e.ng.core,e.rxjs,e.rxjs.operators,e.ng.common)}(this,function(e,t,s,c,r){"use strict";var n=new t.InjectionToken("localStoragePrefix",{providedIn:"root",factory:function(){return""}});var o=function(){function e(e){void 0===e&&(e=null),this.userPrefix=e,this.prefix="",e&&(this.prefix=e+"_")}return Object.defineProperty(e.prototype,"size",{get:function(){return s.of(localStorage.length)},enumerable:!0,configurable:!0}),e.prototype.getItem=function(e){var t=localStorage.getItem(""+this.prefix+e),r=null;if(null!=t)try{r=JSON.parse(t)}catch(n){return s.throwError(new Error("Invalid data in localStorage."))}return s.of(r)},e.prototype.setItem=function(e,t){return localStorage.setItem(""+this.prefix+e,JSON.stringify(t)),s.of(!0)},e.prototype.removeItem=function(e){return localStorage.removeItem(""+this.prefix+e),s.of(!0)},e.prototype.clear=function(){return localStorage.clear(),s.of(!0)},e.prototype.keys=function(){for(var e=[],t=0;t<localStorage.length;t+=1)e.push(this.getKey(t));return 0<e.length?s.from(e):s.EMPTY},e.prototype.has=function(e){for(var t=0;t<localStorage.length;t+=1)if(e===this.getKey(t))return s.of(!0);return s.of(!1)},e.prototype.getKey=function(e){var t=localStorage.key(e);return null!==t?""===this.prefix?t:t.substr(this.prefix.length):null},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[n]}]}]},e.ngInjectableDef=t.defineInjectable({factory:function(){return new e(t.inject(n,8))},token:e,providedIn:"root"}),e}(),a=function(){function e(e){void 0===e&&(e=null),this.prefix=e,this.dbName="ngStorage",this.objectStoreName="localStorage",this.keyPath="key",this.dataPath="value",this.fallback=null,e&&(this.dbName=e+"_"+this.dbName),this.database=new s.ReplaySubject,this.connect(e)}return Object.defineProperty(e.prototype,"size",{get:function(){var n=this;return this.fallback?this.fallback.size:this.transaction("readonly").pipe(c.mergeMap(function(e){var t=e.count(),r=s.fromEvent(t,"success").pipe(c.map(function(e){return e.target.result}));return s.race(r,n.toErrorObservable(t,"length"))}))},enumerable:!0,configurable:!0}),e.prototype.getItem=function(e){return this.fallback?this.fallback.getItem(e):this.getItemFromTransaction(e)},e.prototype.getItemFromTransaction=function(t,e){var r=this;return(e?s.of(e):this.transaction()).pipe(c.map(function(e){return e.get(t)}),c.mergeMap(function(e){var t=s.fromEvent(e,"success").pipe(c.map(function(e){return e.target.result}),c.map(function(e){return e&&r.dataPath in e?e[r.dataPath]:null}));return s.race(t,r.toErrorObservable(e,"getter"))}))},e.prototype.setItem=function(o,a){var i,u=this;return this.fallback?this.fallback.setItem(o,a):null==a?s.of(!0):this.transaction("readwrite").pipe(c.tap(function(e){i=e}),c.mergeMap(function(){return u.getItemFromTransaction(o,i)}),c.map(function(e){return null==e?"add":"put"}),c.mergeMap(function(e){var t,r,n;switch(e){case"add":n=i.add(((t={})[u.dataPath]=a,t),o);break;case"put":default:n=i.put(((r={})[u.dataPath]=a,r),o)}return s.race(u.toSuccessObservable(n),u.toErrorObservable(n,"setter"))}))},e.prototype.removeItem=function(r){var n=this;return this.fallback?this.fallback.removeItem(r):this.getItem(r).pipe(c.mergeMap(function(e){return null!=e?n.transaction("readwrite").pipe(c.mergeMap(function(e){var t=e["delete"](r);return s.race(n.toSuccessObservable(t),n.toErrorObservable(t,"remover"))})):s.of(!0)}))},e.prototype.clear=function(){var r=this;return this.fallback?this.fallback.clear():this.transaction("readwrite").pipe(c.mergeMap(function(e){var t=e.clear();return s.race(r.toSuccessObservable(t),r.toErrorObservable(t,"clearer"))}))},e.prototype.keys=function(){var n=this;if(this.fallback)return this.fallback.keys();return this.transaction("readonly").pipe(c.mergeMap(function(e){var t=e.getAllKeys(),r=s.fromEvent(t,"success").pipe(c.map(function(e){return e.target.result}),c.mergeMap(function(e){return 0<e.length?s.from(e):s.EMPTY}));return s.race(r,n.toErrorObservable(t,"keys"))}))},e.prototype.has=function(t){var r=this;return this.fallback?this.fallback.has(t):this.transaction("readonly").pipe(c.map(function(e){return e.getKey(t)}),c.mergeMap(function(e){var t=s.fromEvent(e,"success").pipe(c.map(function(e){return e.target.result}),c.map(function(e){return e!==undefined}));return s.race(t,r.toErrorObservable(e,"has"))}))},e.prototype.connect=function(e){var t,r=this;void 0===e&&(e=null);try{t=indexedDB.open(this.dbName)}catch(o){return void this.setFallback(e)}s.fromEvent(t,"upgradeneeded").pipe(c.first()).subscribe(function(e){var t=e.target.result;t.objectStoreNames.contains(r.objectStoreName)||t.createObjectStore(r.objectStoreName)});var n=s.fromEvent(t,"success");s.race(n,this.toErrorObservable(t,"connection")).pipe(c.first()).subscribe(function(e){r.database.next(e.target.result)},function(){r.setFallback(e)})},e.prototype.transaction=function(t){var r=this;return void 0===t&&(t="readonly"),this.database.pipe(c.map(function(e){return e.transaction([r.objectStoreName],t).objectStore(r.objectStoreName)}))},e.prototype.toSuccessObservable=function(e){return s.fromEvent(e,"success").pipe(c.map(function(){return!0}))},e.prototype.toErrorObservable=function(e,t){return void 0===t&&(t=""),s.fromEvent(e,"error").pipe(c.mergeMap(function(){return s.throwError(new Error("IndexedDB "+t+" issue : "+e.error.message+"."))}),c.take(0))},e.prototype.setFallback=function(e){this.fallback=new o(e)},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:undefined,decorators:[{type:t.Optional},{type:t.Inject,args:[n]}]}]},e.ngInjectableDef=t.defineInjectable({factory:function(){return new e(t.inject(n,8))},token:e,providedIn:"root"}),e}(),i=function(){function e(){this.localStorage=new Map}return Object.defineProperty(e.prototype,"size",{get:function(){return s.of(this.localStorage.size)},enumerable:!0,configurable:!0}),e.prototype.getItem=function(e){var t=this.localStorage.get(e);return s.of(t!==undefined?t:null)},e.prototype.setItem=function(e,t){return this.localStorage.set(e,t),s.of(!0)},e.prototype.removeItem=function(e){return this.localStorage["delete"](e),s.of(!0)},e.prototype.clear=function(){return this.localStorage.clear(),s.of(!0)},e.prototype.keys=function(){return 0<this.localStorage.size?s.from(this.localStorage.keys()):s.EMPTY},e.prototype.has=function(e){return s.of(this.localStorage.has(e))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=t.defineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}();function u(e,t){return r.isPlatformBrowser(e)&&"indexedDB"in window&&indexedDB!==undefined&&null!==indexedDB?new a(t):r.isPlatformBrowser(e)&&"localStorage"in window&&localStorage!==undefined&&null!==localStorage?new o(t):new i}var l=function(){function e(){}return e.decorators=[{type:t.Injectable,args:[{providedIn:"root",useFactory:u,deps:[t.PLATFORM_ID,[new t.Optional,n]]}]}],e.ngInjectableDef=t.defineInjectable({factory:function(){return u(t.inject(t.PLATFORM_ID),t.inject(n,8))},token:e,providedIn:"root"}),e}();function p(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}var f=function(){function e(){}return e.prototype.validate=function(e,t){if(!((t.hasOwnProperty("const")&&t["const"]!==undefined||t.hasOwnProperty("enum")&&null!=t["enum"]||t.hasOwnProperty("type")&&null!=t.type)&&"array"!==t.type&&"object"!==t.type||t.hasOwnProperty("properties")&&null!=t.properties||t.hasOwnProperty("items")&&null!=t.items))throw new Error("Each value must have a 'type' or 'properties' or 'items' or 'const' or 'enum', to enforce strict types.");return(!t.hasOwnProperty("const")||t["const"]===undefined||e===t["const"])&&(!!this.validateEnum(e,t)&&(!!this.validateType(e,t)&&(!!this.validateItems(e,t)&&(!!this.validateProperties(e,t)&&!!this.validateRequired(e,t)))))},e.prototype.isObjectNotNull=function(e){return null!==e&&"object"==typeof e},e.prototype.validateProperties=function(e,t){if(!t.hasOwnProperty("properties")||null==t.properties)return!0;if(!this.isObjectNotNull(e))return!1;if(Object.keys(t.properties).length!==Object.keys(e).length)return!1;for(var r in t.properties)if(t.properties.hasOwnProperty(r)&&e.hasOwnProperty(r)&&!this.validate(e[r],t.properties[r]))return!1;return!0},e.prototype.validateRequired=function(e,t){var r,n;if(!t.hasOwnProperty("required")||null==t.required)return!0;if(!this.isObjectNotNull(e))return!1;try{for(var o=p(t.required),a=o.next();!a.done;a=o.next()){var i=a.value;if(!t.properties||!t.properties.hasOwnProperty(i))throw new Error("'required' properties must be described in 'properties' too.");if(!e.hasOwnProperty(i))return!1}}catch(u){r={error:u}}finally{try{a&&!a.done&&(n=o["return"])&&n.call(o)}finally{if(r)throw r.error}}return!0},e.prototype.validateEnum=function(e,t){return!t.hasOwnProperty("enum")||null==t["enum"]||-1!==t["enum"].indexOf(e)},e.prototype.validateType=function(e,t){if(!t.hasOwnProperty("type")||null==t.type)return!0;switch(t.type){case"null":return null===e;case"string":return this.validateString(e,t);case"number":case"integer":return this.validateNumber(e,t);case"boolean":return"boolean"==typeof e;case"object":return"object"==typeof e;case"array":return Array.isArray(e)}return!0},e.prototype.validateItems=function(e,t){var r,n;if(!t.hasOwnProperty("items")||null==t.items)return!0;if(!Array.isArray(e))return!1;if(t.hasOwnProperty("maxItems")&&null!=t.maxItems){if(!Number.isInteger(t.maxItems)||t.maxItems<0)throw new Error("'maxItems' must be a non-negative integer.");if(e.length>t.maxItems)return!1}if(t.hasOwnProperty("minItems")&&null!=t.minItems){if(!Number.isInteger(t.minItems)||t.minItems<0)throw new Error("'minItems' must be a non-negative integer.");if(e.length<t.minItems)return!1}if(t.hasOwnProperty("uniqueItems")&&null!=t.uniqueItems&&t.uniqueItems){var o=new Set(e);if(e.length!==o.size)return!1}if(Array.isArray(t.items))return this.validateItemsList(e,t);try{for(var a=p(e),i=a.next();!i.done;i=a.next()){var u=i.value;if(!this.validate(u,t.items))return!1}}catch(s){r={error:s}}finally{try{i&&!i.done&&(n=a["return"])&&n.call(a)}finally{if(r)throw r.error}}return!0},e.prototype.validateItemsList=function(e,t){var r=t.items;if(e.length!==r.length)return!1;for(var n=0;n<r.length;n+=1)if(!this.validate(e[n],r[n]))return!1;return!0},e.prototype.validateString=function(e,t){if("string"!=typeof e)return!1;if(t.hasOwnProperty("maxLength")&&null!=t.maxLength){if(!Number.isInteger(t.maxLength)||t.maxLength<0)throw new Error("'maxLength' must be a non-negative integer.");if(e.length>t.maxLength)return!1}if(t.hasOwnProperty("minLength")&&null!=t.minLength){if(!Number.isInteger(t.minLength)||t.minLength<0)throw new Error("'minLength' must be a non-negative integer.");if(e.length<t.minLength)return!1}if(t.hasOwnProperty("pattern")&&null!=t.pattern&&!new RegExp(t.pattern).test(e))return!1;return!0},e.prototype.validateNumber=function(e,t){if("number"!=typeof e)return!1;if("integer"===t.type&&!Number.isInteger(e))return!1;if(t.hasOwnProperty("multipleOf")&&null!=t.multipleOf){if(t.multipleOf<=0)throw new Error("'multipleOf' must be a number strictly greater than 0.");if(!Number.isInteger(e/t.multipleOf))return!1}return!(t.hasOwnProperty("maximum")&&null!=t.maximum&&e>t.maximum)&&(!(t.hasOwnProperty("exclusiveMaximum")&&null!=t.exclusiveMaximum&&e>=t.exclusiveMaximum)&&(!(t.hasOwnProperty("minimum")&&null!=t.minimum&&e<t.minimum)&&!(t.hasOwnProperty("exclusiveMinimum")&&null!=t.exclusiveMinimum&&e<=t.exclusiveMinimum)))},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ngInjectableDef=t.defineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e}(),m=function(){function e(e,t){this.database=e,this.jsonValidator=t,this.getItemOptionsDefault={schema:null}}return Object.defineProperty(e.prototype,"size",{get:function(){return this.database.size},enumerable:!0,configurable:!0}),e.prototype.getItem=function(e,n){var o=this;return void 0===n&&(n=this.getItemOptionsDefault),this.database.getItem(e).pipe(c.mergeMap(function(e){if(null===e)return s.of(null);if(n.schema){var t=!0;try{t=o.jsonValidator.validate(e,n.schema)}catch(r){return s.throwError(r)}if(!t)return s.throwError(new Error("JSON invalid"))}return s.of(e)}))},e.prototype.getUnsafeItem=function(e){return this.database.getItem(e)},e.prototype.setItem=function(e,t){return this.database.setItem(e,t)},e.prototype.removeItem=function(e){return this.database.removeItem(e)},e.prototype.clear=function(){return this.database.clear()},e.prototype.keys=function(){return this.database.keys()},e.prototype.has=function(e){return this.database.has(e)},e.prototype.setItemSubscribe=function(e,t){this.setItem(e,t).subscribe(function(){},function(){})},e.prototype.removeItemSubscribe=function(e){this.removeItem(e).subscribe(function(){},function(){})},e.prototype.clearSubscribe=function(){this.clear().subscribe(function(){},function(){})},e.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],e.ctorParameters=function(){return[{type:l},{type:f}]},e.ngInjectableDef=t.defineInjectable({factory:function(){return new e(t.inject(l),t.inject(f))},token:e,providedIn:"root"}),e}();e.LocalDatabase=l,e.IndexedDBDatabase=a,e.LocalStorageDatabase=o,e.MockLocalDatabase=i,e.JSONValidator=f,e.LocalStorage=m,e.localStorageProviders=function h(e){return[e.prefix?{provide:n,useValue:e.prefix}:[]]},e.LOCAL_STORAGE_PREFIX=n,e.ɵa=u,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ngx-pwa-local-storage.umd.min.js.map |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -83,2 +83,3 @@ import { Injectable, Optional, Inject } from '@angular/core'; | ||
* the last one needing to be from a preexisting transaction | ||
* @private | ||
* @template T | ||
@@ -211,3 +212,21 @@ * @param {?} key The item's key | ||
/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
has(key) { | ||
/* Fallback storage if set */ | ||
if (this.fallback) { | ||
return this.fallback.has(key); | ||
} | ||
return this.transaction('readonly').pipe(map((transaction) => transaction.getKey(key)), mergeMap((request) => { | ||
/* Listening to the success event, and passing the item value if found, null otherwise */ | ||
/** @type {?} */ | ||
const success = ((/** @type {?} */ (fromEvent(request, 'success')))).pipe(map((event) => ((/** @type {?} */ (event.target))).result), map((result) => (result !== undefined) ? true : false)); | ||
/* Merging success and errors events and autoclosing the observable */ | ||
return (race(success, this.toErrorObservable(request, `has`))); | ||
})); | ||
} | ||
/** | ||
* Connects to IndexedDB and creates the object store on first time | ||
* @protected | ||
* @param {?=} prefix | ||
@@ -257,2 +276,3 @@ * @return {?} | ||
* Opens an IndexedDB transaction and gets the local storage object store | ||
* @protected | ||
* @param {?=} mode Default to 'readonly' for read operations, or 'readwrite' for write operations | ||
@@ -268,2 +288,3 @@ * @return {?} An IndexedDB transaction object store, wrapped in an RxJS Observable | ||
* Transforms a IndexedDB success event in an RxJS Observable | ||
* @protected | ||
* @param {?} request The request to listen | ||
@@ -279,2 +300,3 @@ * @return {?} A RxJS Observable with true value | ||
* Transforms a IndexedDB error event in an RxJS ErrorObservable | ||
* @protected | ||
* @param {?} request The request to listen | ||
@@ -290,2 +312,3 @@ * @param {?=} error Optionnal details about the error's origin | ||
/** | ||
* @protected | ||
* @param {?} prefix | ||
@@ -312,2 +335,3 @@ * @return {?} | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -318,2 +342,3 @@ IndexedDBDatabase.prototype.dbName; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -324,2 +349,3 @@ IndexedDBDatabase.prototype.objectStoreName; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -330,2 +356,3 @@ IndexedDBDatabase.prototype.keyPath; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -337,2 +364,3 @@ IndexedDBDatabase.prototype.dataPath; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -344,7 +372,11 @@ IndexedDBDatabase.prototype.database; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
IndexedDBDatabase.prototype.fallback; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
IndexedDBDatabase.prototype.prefix; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXhlZGRiLWRhdGFiYXNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neC1wd2EvbG9jYWwtc3RvcmFnZS8iLCJzb3VyY2VzIjpbImxpYi9kYXRhYmFzZXMvaW5kZXhlZGRiLWRhdGFiYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDN0QsT0FBTyxFQUFjLGFBQWEsRUFBRSxTQUFTLEVBQUUsRUFBRSxFQUFFLFVBQVUsRUFBRSxJQUFJLEVBQUUsSUFBSSxFQUFFLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMvRixPQUFPLEVBQUUsR0FBRyxFQUFFLFFBQVEsRUFBRSxLQUFLLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxNQUFNLG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Rpb24pLm1lc3NhZ2V9LmApKSksXG4gICAgICAgIHRha2UoMClcbiAgICAgICk7XG5cbiAgfVxuXG4gIHByb3RlY3RlZCBzZXRGYWxsYmFjayhwcmVmaXg6IHN0cmluZyB8IG51bGwpOiB2b2lkIHtcbiAgICB0aGlzLmZhbGxiYWNrID0gbmV3IExvY2FsU3RvcmFnZURhdGFiYXNlKHByZWZpeCk7XG4gIH1cblxufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -81,3 +81,9 @@ import { Injectable, PLATFORM_ID, Optional } from '@angular/core'; | ||
LocalDatabase.prototype.keys = function () { }; | ||
/** | ||
* @abstract | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
LocalDatabase.prototype.has = function (key) { }; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWwtZGF0YWJhc2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LXB3YS9sb2NhbC1zdG9yYWdlLyIsInNvdXJjZXMiOlsibGliL2RhdGFiYXNlcy9sb2NhbC1kYXRhYmFzZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ2xFLE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBR3BELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3pELE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQy9ELE9BQU8sRUFBRSxpQkFBaUIsRUFBRSxNQUFNLHVCQUF1QixDQUFD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cblxufVxuXG5ASW5qZWN0YWJsZSh7XG4gIHByb3ZpZGVkSW46ICdyb290JyxcbiAgdXNlRmFjdG9yeTogbG9jYWxEYXRhYmFzZUZhY3RvcnksXG4gIGRlcHM6IFtcbiAgICBQTEFURk9STV9JRCxcbiAgICBbbmV3IE9wdGlvbmFsKCksIExPQ0FMX1NUT1JBR0VfUFJFRklYXVxuICBdXG59KVxuZXhwb3J0IGFic3RyYWN0IGNsYXNzIExvY2FsRGF0YWJhc2Uge1xuXG4gIGFic3RyYWN0IHJlYWRvbmx5IHNpemU6IE9ic2VydmFibGU8bnVtYmVyPjtcblxuICBhYnN0cmFjdCBnZXRJdGVtPFQgPSBhbnk+KGtleTogc3RyaW5nKTogT2JzZXJ2YWJsZTxUIHwgbnVsbD47XG4gIGFic3RyYWN0IHNldEl0ZW0oa2V5OiBzdHJpbmcsIGRhdGE6IGFueSk6IE9ic2VydmFibGU8Ym9vbGVhbj47XG4gIGFic3RyYWN0IHJlbW92ZUl0ZW0oa2V5OiBzdHJpbmcpOiBPYnNlcnZhYmxlPGJvb2xlYW4+O1xuICBhYnN0cmFjdCBjbGVhcigpOiBPYnNlcnZhYmxlPGJvb2xlYW4+O1xuICBhYnN0cmFjdCBrZXlzKCk6IE9ic2VydmFibGU8c3RyaW5nPjtcbiAgYWJzdHJhY3QgaGFzKGtleTogc3RyaW5nKTogT2JzZXJ2YWJsZTxib29sZWFuPjtcblxufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -83,8 +83,31 @@ import { Injectable, Optional, Inject } from '@angular/core'; | ||
for (let index = 0; index < localStorage.length; index += 1) { | ||
/** @type {?} */ | ||
const key = (/** @type {?} */ (localStorage.key(index))); | ||
keys.push((this.prefix === '') ? key : key.substr(this.prefix.length)); | ||
keys.push((/** @type {?} */ (this.getKey(index)))); | ||
} | ||
return (keys.length > 0) ? from(keys) : EMPTY; | ||
} | ||
/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
has(key) { | ||
for (let index = 0; index < localStorage.length; index += 1) { | ||
if (key === this.getKey(index)) { | ||
return of(true); | ||
} | ||
} | ||
return of(false); | ||
} | ||
/** | ||
* @protected | ||
* @param {?} index | ||
* @return {?} | ||
*/ | ||
getKey(index) { | ||
/** @type {?} */ | ||
const prefixedKey = localStorage.key(index); | ||
if (prefixedKey !== null) { | ||
return (this.prefix === '') ? prefixedKey : prefixedKey.substr(this.prefix.length); | ||
} | ||
return null; | ||
} | ||
} | ||
@@ -102,7 +125,13 @@ LocalStorageDatabase.decorators = [ | ||
if (false) { | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorageDatabase.prototype.prefix; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorageDatabase.prototype.userPrefix; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxzdG9yYWdlLWRhdGFiYXNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neC1wd2EvbG9jYWwtc3RvcmFnZS8iLCJzb3VyY2VzIjpbImxpYi9kYXRhYmFzZXMvbG9jYWxzdG9yYWdlLWRhdGFiYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDN0QsT0FBTyxFQUFjLEVBQUUsRUFBRSxJQUFJLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUcvRCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxXQUFXLENBQUM7OztBQUtqRCxNQUFNLE9BQU8sb0JBQW9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ICByZXR1cm4gb2YodHJ1ZSk7XG5cbiAgfVxuXG4gIGtleXMoKTogT2JzZXJ2YWJsZTxzdHJpbmc+IHtcblxuICAgIGNvbnN0IGtleXM6IHN0cmluZ1tdID0gW107XG5cbiAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgbG9jYWxTdG9yYWdlLmxlbmd0aDsgaW5kZXggKz0gMSkge1xuXG4gICAgICBrZXlzLnB1c2godGhpcy5nZXRLZXkoaW5kZXgpIGFzIHN0cmluZyk7XG5cbiAgICB9XG5cbiAgICByZXR1cm4gKGtleXMubGVuZ3RoID4gMCkgPyBmcm9tKGtleXMpIDogRU1QVFk7XG5cbiAgfVxuXG4gIGhhcyhrZXk6IHN0cmluZyk6IE9ic2VydmFibGU8Ym9vbGVhbj4ge1xuXG4gICAgZm9yIChsZXQgaW5kZXggPSAwOyBpbmRleCA8IGxvY2FsU3RvcmFnZS5sZW5ndGg7IGluZGV4ICs9IDEpIHtcblxuICAgICAgaWYgKGtleSA9PT0gdGhpcy5nZXRLZXkoaW5kZXgpKcKge1xuXG4gICAgICAgIHJldHVybiBvZih0cnVlKTtcblxuICAgICAgfVxuXG4gICAgfVxuXG4gICAgcmV0dXJuIG9mKGZhbHNlKTtcblxuICB9XG5cbiAgcHJvdGVjdGVkIGdldEtleShpbmRleDogbnVtYmVyKTogc3RyaW5nIHwgbnVsbCB7XG5cbiAgICBjb25zdCBwcmVmaXhlZEtleSA9IGxvY2FsU3RvcmFnZS5rZXkoaW5kZXgpO1xuXG4gICAgaWYgKHByZWZpeGVkS2V5ICE9PSBudWxsKSB7XG5cbiAgICAgIHJldHVybiAodGhpcy5wcmVmaXggPT09ICcnKSA/IHByZWZpeGVkS2V5IDogcHJlZml4ZWRLZXkuc3Vic3RyKHRoaXMucHJlZml4Lmxlbmd0aCk7XG5cbiAgICB9XG5cbiAgICByZXR1cm4gbnVsbDtcblxuICB9XG5cbn1cbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -62,2 +62,9 @@ import { Injectable } from '@angular/core'; | ||
} | ||
/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
has(key) { | ||
return of(this.localStorage.has(key)); | ||
} | ||
} | ||
@@ -71,5 +78,8 @@ MockLocalDatabase.decorators = [ | ||
if (false) { | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
MockLocalDatabase.prototype.localStorage; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9jay1sb2NhbC1kYXRhYmFzZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ3gtcHdhL2xvY2FsLXN0b3JhZ2UvIiwic291cmNlcyI6WyJsaWIvZGF0YWJhc2VzL21vY2stbG9jYWwtZGF0YWJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFjLEVBQUUsRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLE1BQU0sTUFBTSxDQUFDOztBQU9uRCxNQUFNLE9BQU8saUJBQWlCO0lBSDlCO1FBS1ksaUJBQVksR0FBRyxJQUFJLEdBQUcsRUFBZSxDQUFDO0tBZ0VqRDs7OztJQTlEQyxJQUFJLElBQUk7UUFDTixPQUFPLEVBQUUsQ0FBQyxJQUFJLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ3BDLENBQUM7Ozs7Ozs7SUFPQSxPQUFPLENBQVUsR0FBVzs7Y0FFckIsT0FBTyxHQUFhLElBQUksQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQztRQUVwRCxPQUFPLEVBQUUsQ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dG9yYWdlLmhhcyhrZXkpKTtcblxuICB9XG5cbn1cbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -115,2 +115,10 @@ import { Injectable } from '@angular/core'; | ||
/** | ||
* Tells if a key exists in storage | ||
* @param {?} key | ||
* @return {?} A RxJS Observable telling if the key exists | ||
*/ | ||
has(key) { | ||
return this.database.has(key); | ||
} | ||
/** | ||
* Sets an item in local storage, and auto-subscribes | ||
@@ -152,9 +160,18 @@ * @param {?} key The item's key | ||
if (false) { | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorage.prototype.getItemOptionsDefault; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorage.prototype.database; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorage.prototype.jsonValidator; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGliLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LXB3YS9sb2NhbC1zdG9yYWdlLyIsInNvdXJjZXMiOlsibGliL2xpYi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBYyxVQUFVLEVBQUUsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ2xELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUUxQyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFFM0QsT0FBTyxFQUFFLGF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hhcyhrZXk6IHN0cmluZyk6IE9ic2VydmFibGU8Ym9vbGVhbj4ge1xuXG4gICAgcmV0dXJuIHRoaXMuZGF0YWJhc2UuaGFzKGtleSk7XG5cbiAgfVxuXG4gIC8qKlxuICAgKiBTZXRzIGFuIGl0ZW0gaW4gbG9jYWwgc3RvcmFnZSwgYW5kIGF1dG8tc3Vic2NyaWJlc1xuICAgKiBAcGFyYW0ga2V5IFRoZSBpdGVtJ3Mga2V5XG4gICAqIEBwYXJhbSBkYXRhIFRoZSBpdGVtJ3MgdmFsdWUsIG11c3QgTk9UIGJlIG51bGwgb3IgdW5kZWZpbmVkXG4gICAqL1xuICBzZXRJdGVtU3Vic2NyaWJlKGtleTogc3RyaW5nLCBkYXRhOiBhbnkpOiB2b2lkIHtcblxuICAgIHRoaXMuc2V0SXRlbShrZXksIGRhdGEpLnN1YnNjcmliZSgoKSA9PiB7fSwgKCkgPT4ge30pO1xuXG4gIH1cblxuICAvKipcbiAgICogRGVsZXRlcyBhbiBpdGVtIGluIGxvY2FsIHN0b3JhZ2UsIGFuZCBhdXRvLXN1YnNjcmliZXNcbiAgICogQHBhcmFtIGtleSBUaGUgaXRlbSdzIGtleVxuICAgKi9cbiAgIHJlbW92ZUl0ZW1TdWJzY3JpYmUoa2V5OiBzdHJpbmcpOiB2b2lkIHtcblxuICAgIHRoaXMucmVtb3ZlSXRlbShrZXkpLnN1YnNjcmliZSgoKSA9PiB7fSwgKCkgPT4ge30pO1xuXG4gIH1cblxuICAvKiogRGVsZXRlcyBhbGwgaXRlbXMgZnJvbSBsb2NhbCBzdG9yYWdlLCBhbmQgYXV0by1zdWJzY3JpYmVzICovXG4gIGNsZWFyU3Vic2NyaWJlKCk6IHZvaWQge1xuXG4gICAgdGhpcy5jbGVhcigpLnN1YnNjcmliZSgoKSA9PiB7fSwgKCkgPT4ge30pO1xuXG4gIH1cblxufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ import { InjectionToken } from '@angular/core'; |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ /** |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -50,2 +50,3 @@ import { Injectable } from '@angular/core'; | ||
/** | ||
* @protected | ||
* @param {?} value | ||
@@ -58,2 +59,3 @@ * @return {?} | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -88,2 +90,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -113,2 +116,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -126,2 +130,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -153,2 +158,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -201,2 +207,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -220,2 +227,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -255,2 +263,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -304,2 +313,2 @@ * @param {?} schema | ||
/** @nocollapse */ JSONValidator.ngInjectableDef = i0.defineInjectable({ factory: function JSONValidator_Factory() { return new JSONValidator(); }, token: JSONValidator, providedIn: "root" }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi12YWxpZGF0b3IuanMiLCJzb3V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IH1cblxuICAgIGlmIChzY2hlbWEuaGFzT3duUHJvcGVydHkoJ2V4Y2x1c2l2ZU1heGltdW0nKSAmJiAoc2NoZW1hLmV4Y2x1c2l2ZU1heGltdW0gIT0gbnVsbCkpIHtcblxuICAgICAgaWYgKGRhdGEgPj0gc2NoZW1hLmV4Y2x1c2l2ZU1heGltdW0pIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgfVxuXG4gICAgaWYgKHNjaGVtYS5oYXNPd25Qcm9wZXJ0eSgnbWluaW11bScpICYmIChzY2hlbWEubWluaW11bSAhPSBudWxsKSkge1xuXG4gICAgICBpZiAoZGF0YSA8IHNjaGVtYS5taW5pbXVtKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgIH1cblxuICAgIH1cblxuICAgIGlmIChzY2hlbWEuaGFzT3duUHJvcGVydHkoJ2V4Y2x1c2l2ZU1pbmltdW0nKSAmJiAoc2NoZW1hLmV4Y2x1c2l2ZU1pbmltdW0gIT0gbnVsbCkpIHtcblxuICAgICAgaWYgKGRhdGEgPD0gc2NoZW1hLmV4Y2x1c2l2ZU1pbmltdW0pIHtcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgfVxuXG4gICAgfVxuXG4gICAgcmV0dXJuIHRydWU7XG5cbiAgfVxuXG59XG4iXX0= |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ /** |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ /* |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -106,2 +106,3 @@ import { Injectable, Optional, Inject } from '@angular/core'; | ||
* the last one needing to be from a preexisting transaction | ||
* @private | ||
* @template T | ||
@@ -115,2 +116,3 @@ * @param {?} key The item's key | ||
* the last one needing to be from a preexisting transaction | ||
* @private | ||
* @template T | ||
@@ -282,2 +284,24 @@ * @param {?} key The item's key | ||
/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
IndexedDBDatabase.prototype.has = /** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (key) { | ||
var _this = this; | ||
/* Fallback storage if set */ | ||
if (this.fallback) { | ||
return this.fallback.has(key); | ||
} | ||
return this.transaction('readonly').pipe(map(function (transaction) { return transaction.getKey(key); }), mergeMap(function (request) { | ||
/* Listening to the success event, and passing the item value if found, null otherwise */ | ||
/** @type {?} */ | ||
var success = ((/** @type {?} */ (fromEvent(request, 'success')))).pipe(map(function (event) { return ((/** @type {?} */ (event.target))).result; }), map(function (result) { return (result !== undefined) ? true : false; })); | ||
/* Merging success and errors events and autoclosing the observable */ | ||
return (race(success, _this.toErrorObservable(request, "has"))); | ||
})); | ||
}; | ||
/** | ||
* Connects to IndexedDB and creates the object store on first time | ||
@@ -287,2 +311,3 @@ */ | ||
* Connects to IndexedDB and creates the object store on first time | ||
* @protected | ||
* @param {?=} prefix | ||
@@ -293,2 +318,3 @@ * @return {?} | ||
* Connects to IndexedDB and creates the object store on first time | ||
* @protected | ||
* @param {?=} prefix | ||
@@ -345,2 +371,3 @@ * @return {?} | ||
* Opens an IndexedDB transaction and gets the local storage object store | ||
* @protected | ||
* @param {?=} mode Default to 'readonly' for read operations, or 'readwrite' for write operations | ||
@@ -351,2 +378,3 @@ * @return {?} An IndexedDB transaction object store, wrapped in an RxJS Observable | ||
* Opens an IndexedDB transaction and gets the local storage object store | ||
* @protected | ||
* @param {?=} mode Default to 'readonly' for read operations, or 'readwrite' for write operations | ||
@@ -369,2 +397,3 @@ * @return {?} An IndexedDB transaction object store, wrapped in an RxJS Observable | ||
* Transforms a IndexedDB success event in an RxJS Observable | ||
* @protected | ||
* @param {?} request The request to listen | ||
@@ -375,2 +404,3 @@ * @return {?} A RxJS Observable with true value | ||
* Transforms a IndexedDB success event in an RxJS Observable | ||
* @protected | ||
* @param {?} request The request to listen | ||
@@ -392,2 +422,3 @@ * @return {?} A RxJS Observable with true value | ||
* Transforms a IndexedDB error event in an RxJS ErrorObservable | ||
* @protected | ||
* @param {?} request The request to listen | ||
@@ -399,2 +430,3 @@ * @param {?=} error Optionnal details about the error's origin | ||
* Transforms a IndexedDB error event in an RxJS ErrorObservable | ||
* @protected | ||
* @param {?} request The request to listen | ||
@@ -411,2 +443,3 @@ * @param {?=} error Optionnal details about the error's origin | ||
/** | ||
* @protected | ||
* @param {?} prefix | ||
@@ -416,2 +449,3 @@ * @return {?} | ||
IndexedDBDatabase.prototype.setFallback = /** | ||
* @protected | ||
* @param {?} prefix | ||
@@ -440,2 +474,3 @@ * @return {?} | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -446,2 +481,3 @@ IndexedDBDatabase.prototype.dbName; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -452,2 +488,3 @@ IndexedDBDatabase.prototype.objectStoreName; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -458,2 +495,3 @@ IndexedDBDatabase.prototype.keyPath; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -465,2 +503,3 @@ IndexedDBDatabase.prototype.dataPath; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
@@ -472,7 +511,11 @@ IndexedDBDatabase.prototype.database; | ||
* @type {?} | ||
* @protected | ||
*/ | ||
IndexedDBDatabase.prototype.fallback; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
IndexedDBDatabase.prototype.prefix; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,e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RvRXJyb3JPYnNlcnZhYmxlKHJlcXVlc3Q6IElEQlJlcXVlc3QsIGVycm9yID0gYGApOiBPYnNlcnZhYmxlPG5ldmVyPiB7XG5cbiAgICAvKiBUcmFuc2Zvcm1pbmcgYSBJbmRleGVkREIgZXJyb3IgZXZlbnQgaW4gYW4gUnhKUyBFcnJvck9ic2VydmFibGUgKi9cbiAgICByZXR1cm4gKGZyb21FdmVudChyZXF1ZXN0LCAnZXJyb3InKSBhcyBPYnNlcnZhYmxlPEV2ZW50PilcbiAgICAgIC5waXBlKFxuICAgICAgICBtZXJnZU1hcCgoKSA9PiB0aHJvd0Vycm9yKG5ldyBFcnJvcihgSW5kZXhlZERCICR7ZXJyb3J9IGlzc3VlIDogJHsocmVxdWVzdC5lcnJvciBhcyBET01FeGNlcHRpb24pLm1lc3NhZ2V9LmApKSksXG4gICAgICAgIHRha2UoMClcbiAgICAgICk7XG5cbiAgfVxuXG4gIHByb3RlY3RlZCBzZXRGYWxsYmFjayhwcmVmaXg6IHN0cmluZyB8IG51bGwpOiB2b2lkIHtcbiAgICB0aGlzLmZhbGxiYWNrID0gbmV3IExvY2FsU3RvcmFnZURhdGFiYXNlKHByZWZpeCk7XG4gIH1cblxufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -85,3 +85,9 @@ import { Injectable, PLATFORM_ID, Optional } from '@angular/core'; | ||
LocalDatabase.prototype.keys = function () { }; | ||
/** | ||
* @abstract | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
LocalDatabase.prototype.has = function (key) { }; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWwtZGF0YWJhc2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LXB3YS9sb2NhbC1zdG9yYWdlL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pOiBPYnNlcnZhYmxlPGJvb2xlYW4+O1xuICBhYnN0cmFjdCBjbGVhcigpOiBPYnNlcnZhYmxlPGJvb2xlYW4+O1xuICBhYnN0cmFjdCBrZXlzKCk6IE9ic2VydmFibGU8c3RyaW5nPjtcbiAgYWJzdHJhY3QgaGFzKGtleTogc3RyaW5nKTogT2JzZXJ2YWJsZTxib29sZWFuPjtcblxufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -129,8 +129,40 @@ import { Injectable, Optional, Inject } from '@angular/core'; | ||
for (var index = 0; index < localStorage.length; index += 1) { | ||
/** @type {?} */ | ||
var key = (/** @type {?} */ (localStorage.key(index))); | ||
keys.push((this.prefix === '') ? key : key.substr(this.prefix.length)); | ||
keys.push((/** @type {?} */ (this.getKey(index)))); | ||
} | ||
return (keys.length > 0) ? from(keys) : EMPTY; | ||
}; | ||
/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
LocalStorageDatabase.prototype.has = /** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (key) { | ||
for (var index = 0; index < localStorage.length; index += 1) { | ||
if (key === this.getKey(index)) { | ||
return of(true); | ||
} | ||
} | ||
return of(false); | ||
}; | ||
/** | ||
* @protected | ||
* @param {?} index | ||
* @return {?} | ||
*/ | ||
LocalStorageDatabase.prototype.getKey = /** | ||
* @protected | ||
* @param {?} index | ||
* @return {?} | ||
*/ | ||
function (index) { | ||
/** @type {?} */ | ||
var prefixedKey = localStorage.key(index); | ||
if (prefixedKey !== null) { | ||
return (this.prefix === '') ? prefixedKey : prefixedKey.substr(this.prefix.length); | ||
} | ||
return null; | ||
}; | ||
LocalStorageDatabase.decorators = [ | ||
@@ -150,7 +182,13 @@ { type: Injectable, args: [{ | ||
if (false) { | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorageDatabase.prototype.prefix; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorageDatabase.prototype.userPrefix; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9jYWxzdG9yYWdlLWRhdGFiYXNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQG5neC1wd2EvbG9jYWwtc3RvcmFnZS8iLCJzb3VyY2VzIjpbImxpYi9kYXRhYmFzZXMvbG9jYWxzdG9yYWdlLWRhdGFiYXNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLFFBQVEsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDN0QsT0FBTyxFQUFjLEVBQUUsRUFBRSxJQUFJLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUcvRCxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsTUFBTSxXQUFXLENBQUM7OztBQUVqRDtJQVlFLDhCQUFnRSxVQUFnQztRQUFoQywyQkFBQSxFQUFBLGlCQUFnQztRQUFoQyxlQUFVLEdBQVYsVUFBVSxDQUFzQjs7UUFOdEYsV0FBTSxHQUFHLEVBQUUsQ0FBQztRQVFwQixJQUFJLFVBQVUsRUFBRTtZQUNkLElBQUksQ0FBQyxNQUFNLEdBQU0sVUFBVSxNQUFHLENBQUM7U0FDaEM7SUFFSCxDQUFDO0lBVkQsc0JBQUksc0NBQUk7Ozs7UUFBUjtZQUNFLE9BQU8sRUFBRSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUNqQyxDQUFDOzs7T0FBQTtJQVVEOzs7O09BSUc7Ozs7Ozs7SUFDSCxzQ0FBTzs7Ozs7O0lBQVAsVUFBaUIsR0FBVzs7WUFFcEIsWUFB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cbiAgfVxuXG4gIGtleXMoKTogT2JzZXJ2YWJsZTxzdHJpbmc+IHtcblxuICAgIGNvbnN0IGtleXM6IHN0cmluZ1tdID0gW107XG5cbiAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgbG9jYWxTdG9yYWdlLmxlbmd0aDsgaW5kZXggKz0gMSkge1xuXG4gICAgICBrZXlzLnB1c2godGhpcy5nZXRLZXkoaW5kZXgpIGFzIHN0cmluZyk7XG5cbiAgICB9XG5cbiAgICByZXR1cm4gKGtleXMubGVuZ3RoID4gMCkgPyBmcm9tKGtleXMpIDogRU1QVFk7XG5cbiAgfVxuXG4gIGhhcyhrZXk6IHN0cmluZyk6IE9ic2VydmFibGU8Ym9vbGVhbj4ge1xuXG4gICAgZm9yIChsZXQgaW5kZXggPSAwOyBpbmRleCA8IGxvY2FsU3RvcmFnZS5sZW5ndGg7IGluZGV4ICs9IDEpIHtcblxuICAgICAgaWYgKGtleSA9PT0gdGhpcy5nZXRLZXkoaW5kZXgpKcKge1xuXG4gICAgICAgIHJldHVybiBvZih0cnVlKTtcblxuICAgICAgfVxuXG4gICAgfVxuXG4gICAgcmV0dXJuIG9mKGZhbHNlKTtcblxuICB9XG5cbiAgcHJvdGVjdGVkIGdldEtleShpbmRleDogbnVtYmVyKTogc3RyaW5nIHwgbnVsbCB7XG5cbiAgICBjb25zdCBwcmVmaXhlZEtleSA9IGxvY2FsU3RvcmFnZS5rZXkoaW5kZXgpO1xuXG4gICAgaWYgKHByZWZpeGVkS2V5ICE9PSBudWxsKSB7XG5cbiAgICAgIHJldHVybiAodGhpcy5wcmVmaXggPT09ICcnKSA/IHByZWZpeGVkS2V5IDogcHJlZml4ZWRLZXkuc3Vic3RyKHRoaXMucHJlZml4Lmxlbmd0aCk7XG5cbiAgICB9XG5cbiAgICByZXR1cm4gbnVsbDtcblxuICB9XG5cbn1cbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -110,2 +110,13 @@ import { Injectable } from '@angular/core'; | ||
}; | ||
/** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
MockLocalDatabase.prototype.has = /** | ||
* @param {?} key | ||
* @return {?} | ||
*/ | ||
function (key) { | ||
return of(this.localStorage.has(key)); | ||
}; | ||
MockLocalDatabase.decorators = [ | ||
@@ -121,5 +132,8 @@ { type: Injectable, args: [{ | ||
if (false) { | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
MockLocalDatabase.prototype.localStorage; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9jay1sb2NhbC1kYXRhYmFzZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BuZ3gtcHdhL2xvY2FsLXN0b3JhZ2UvIiwic291cmNlcyI6WyJsaWIvZGF0YWJhc2VzL21vY2stbG9jYWwtZGF0YWJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFjLEVBQUUsRUFBRSxJQUFJLEVBQUUsS0FBSyxFQUFFLE1BQU0sTUFBTSxDQUFDOztBQUluRDtJQUFBO1FBS1ksaUJBQVksR0FBRyxJQUFJLEdBQUcsRUFBZSxDQUFDO0tBZ0VqRDtJQTlEQyxzQkFBSSxtQ0FBSTs7OztRQUFSO1lBQ0UsT0FBTyxFQUFFLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNwQyxDQUFDOzs7T0FBQTtJQUVEOzs7O09BSUc7Ozs7Ozs7SUFDRixtQ0FBTzs7Ozs7O0lBQVAsVUFBaUIsR0FBVzs7WUFFckIsT0FBTyxHQUFhLElBQUksQ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hbCBzdG9yYWdlXG4gICAqIEByZXR1cm5zIEFuIFJ4SlMgT2JzZXJ2YWJsZSB0byB3YWl0IHRoZSBlbmQgb2YgdGhlIG9wZXJhdGlvblxuICAgKi9cbiAgIGNsZWFyKCk6IE9ic2VydmFibGU8Ym9vbGVhbj4ge1xuXG4gICAgdGhpcy5sb2NhbFN0b3JhZ2UuY2xlYXIoKTtcblxuICAgIHJldHVybiBvZih0cnVlKTtcblxuICB9XG5cbiAga2V5cygpOiBPYnNlcnZhYmxlPHN0cmluZz4ge1xuXG4gICAgcmV0dXJuICh0aGlzLmxvY2FsU3RvcmFnZS5zaXplID4gMCkgPyBmcm9tKHRoaXMubG9jYWxTdG9yYWdlLmtleXMoKSkgOiBFTVBUWTtcblxuICB9XG5cbiAgaGFzKGtleTogc3RyaW5nKTogT2JzZXJ2YWJsZTxib29sZWFuPiB7XG5cbiAgICByZXR1cm4gb2YodGhpcy5sb2NhbFN0b3JhZ2UuaGFzKGtleSkpO1xuXG4gIH1cblxufVxuIl19 |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -185,2 +185,19 @@ import { Injectable } from '@angular/core'; | ||
/** | ||
* Tells if a key exists in storage | ||
* @returns A RxJS Observable telling if the key exists | ||
*/ | ||
/** | ||
* Tells if a key exists in storage | ||
* @param {?} key | ||
* @return {?} A RxJS Observable telling if the key exists | ||
*/ | ||
LocalStorage.prototype.has = /** | ||
* Tells if a key exists in storage | ||
* @param {?} key | ||
* @return {?} A RxJS Observable telling if the key exists | ||
*/ | ||
function (key) { | ||
return this.database.has(key); | ||
}; | ||
/** | ||
* Sets an item in local storage, and auto-subscribes | ||
@@ -249,9 +266,18 @@ * @param key The item's key | ||
if (false) { | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorage.prototype.getItemOptionsDefault; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorage.prototype.database; | ||
/** @type {?} */ | ||
/** | ||
* @type {?} | ||
* @protected | ||
*/ | ||
LocalStorage.prototype.jsonValidator; | ||
} | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGliLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LXB3YS9sb2NhbC1zdG9yYWdlLyIsInNvdXJjZXMiOlsibGliL2xpYi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBYyxVQUFVLEVBQUUsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ2xELE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUUxQyxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sNEJBQTRCLENBQUM7QUFFM0QsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLDZCQUE2QixDQUFDOzs7Ozs7O0FBRTVELHNDQUVDOzs7SUFEQyxrQ0FBMkI7O0FBRzdCO0lBa0JFLHNCQUFzQixRQUF1QixFQUFZLGFBQTRCO1FBQS9ELGFBQVEsR0FBUixRQUFRLENBQWU7UUFBWSxrQkFBYSxHQUFiLGFBQWEsQ0FBZTtRQUpsRSwwQkFBcUIsR0FBcUI7WUFDM0QsTUFBTSxFQUFFLElBQUk7U0FDYixDQUFDO0lBRXNGLENBQUM7SUFWekYsc0JBQUksOEJBQUk7UUFIUjs7V0FFRzs7Ozs7UUFDSDtZQUVFLE9BQU8sSUFBSSxDQUFDLFFBQVEsQ0FBQyxJQUFJLENBQUM7UUFFNUIsQ0FBQzs7O09BQUE7Ozs7Ozs7SUFlRCw4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mFnZSwgYW5kIGF1dG8tc3Vic2NyaWJlcyAqL1xuICBjbGVhclN1YnNjcmliZSgpOiB2b2lkIHtcblxuICAgIHRoaXMuY2xlYXIoKS5zdWJzY3JpYmUoKCkgPT4ge30sICgpID0+IHt9KTtcblxuICB9XG5cbn1cbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ import { InjectionToken } from '@angular/core'; |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ /** |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -73,2 +73,3 @@ import * as tslib_1 from "tslib"; | ||
/** | ||
* @protected | ||
* @param {?} value | ||
@@ -78,2 +79,3 @@ * @return {?} | ||
JSONValidator.prototype.isObjectNotNull = /** | ||
* @protected | ||
* @param {?} value | ||
@@ -86,2 +88,3 @@ * @return {?} | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -92,2 +95,3 @@ * @param {?} schema | ||
JSONValidator.prototype.validateProperties = /** | ||
* @protected | ||
* @param {?} data | ||
@@ -122,2 +126,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -128,2 +133,3 @@ * @param {?} schema | ||
JSONValidator.prototype.validateRequired = /** | ||
* @protected | ||
* @param {?} data | ||
@@ -164,2 +170,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -170,2 +177,3 @@ * @param {?} schema | ||
JSONValidator.prototype.validateEnum = /** | ||
* @protected | ||
* @param {?} data | ||
@@ -183,2 +191,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -189,2 +198,3 @@ * @param {?} schema | ||
JSONValidator.prototype.validateType = /** | ||
* @protected | ||
* @param {?} data | ||
@@ -216,2 +226,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -222,2 +233,3 @@ * @param {?} schema | ||
JSONValidator.prototype.validateItems = /** | ||
* @protected | ||
* @param {?} data | ||
@@ -281,2 +293,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -287,2 +300,3 @@ * @param {?} schema | ||
JSONValidator.prototype.validateItemsList = /** | ||
* @protected | ||
* @param {?} data | ||
@@ -306,2 +320,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -312,2 +327,3 @@ * @param {?} schema | ||
JSONValidator.prototype.validateString = /** | ||
* @protected | ||
* @param {?} data | ||
@@ -347,2 +363,3 @@ * @param {?} schema | ||
/** | ||
* @protected | ||
* @param {?} data | ||
@@ -353,2 +370,3 @@ * @param {?} schema | ||
JSONValidator.prototype.validateNumber = /** | ||
* @protected | ||
* @param {?} data | ||
@@ -404,2 +422,2 @@ * @param {?} schema | ||
export { JSONValidator }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoianNvbi12YWxpZGF0b3IuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Abmd4LXB3YS9sb2NhbC1zdG9yYWdlLyIsInNvdXJjZXMiOlsibGliL3ZhbGlkYXRpb24vanNvbi12YWxpZGF0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7OztBQU0zQztJQUFBO0tBeVhDO0lBcFhDOzs7Ozs7Ozs7T0FTRzs7Ozs7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ICAgICB9XG5cbiAgICB9XG5cbiAgICByZXR1cm4gdHJ1ZTtcblxuICB9XG5cbn1cbiJdfQ== |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ /** |
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc | ||
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
@@ -5,0 +5,0 @@ /* |
@@ -69,2 +69,3 @@ import { Observable, ReplaySubject } from 'rxjs'; | ||
keys(): Observable<string>; | ||
has(key: string): Observable<boolean>; | ||
/** | ||
@@ -71,0 +72,0 @@ * Connects to IndexedDB and creates the object store on first time |
@@ -13,2 +13,3 @@ import { Observable } from 'rxjs'; | ||
abstract keys(): Observable<string>; | ||
abstract has(key: string): Observable<boolean>; | ||
} |
@@ -33,2 +33,4 @@ import { Observable } from 'rxjs'; | ||
keys(): Observable<string>; | ||
has(key: string): Observable<boolean>; | ||
protected getKey(index: number): string | null; | ||
} |
@@ -31,2 +31,3 @@ import { Observable } from 'rxjs'; | ||
keys(): Observable<string>; | ||
has(key: string): Observable<boolean>; | ||
} |
@@ -61,2 +61,7 @@ import { Observable } from 'rxjs'; | ||
/** | ||
* Tells if a key exists in storage | ||
* @returns A RxJS Observable telling if the key exists | ||
*/ | ||
has(key: string): Observable<boolean>; | ||
/** | ||
* Sets an item in local storage, and auto-subscribes | ||
@@ -63,0 +68,0 @@ * @param key The item's key |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"JSONSchema":{"__symbolic":"interface"},"JSONSchemaConst":{"__symbolic":"interface"},"JSONSchemaEnum":{"__symbolic":"interface"},"JSONSchemaBoolean":{"__symbolic":"interface"},"JSONSchemaNumeric":{"__symbolic":"interface"},"JSONSchemaString":{"__symbolic":"interface"},"JSONSchemaArray":{"__symbolic":"interface"},"JSONSchemaObject":{"__symbolic":"interface"},"ɵa":{"__symbolic":"function"},"LocalDatabase":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":30,"character":1},"arguments":[{"providedIn":"root","useFactory":{"__symbolic":"reference","name":"ɵa"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":34,"character":4},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":35,"character":9}},{"__symbolic":"reference","name":"LOCAL_STORAGE_PREFIX"}]]}]}],"members":{"getItem":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"IndexedDBDatabase":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":68,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":68,"character":27},"arguments":[{"__symbolic":"reference","name":"LOCAL_STORAGE_PREFIX"}]}]],"parameters":[{"__symbolic":"reference","name":"string"}]}],"getItem":[{"__symbolic":"method"}],"getItemFromTransaction":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}],"connect":[{"__symbolic":"method"}],"transaction":[{"__symbolic":"method"}],"toSuccessObservable":[{"__symbolic":"method"}],"toErrorObservable":[{"__symbolic":"method"}],"setFallback":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"LocalStorageDatabase":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":27},"arguments":[{"__symbolic":"reference","name":"LOCAL_STORAGE_PREFIX"}]}]],"parameters":[{"__symbolic":"reference","name":"string"}]}],"getItem":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"MockLocalDatabase":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"getItem":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"JSONValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"validate":[{"__symbolic":"method"}],"isObjectNotNull":[{"__symbolic":"method"}],"validateProperties":[{"__symbolic":"method"}],"validateRequired":[{"__symbolic":"method"}],"validateEnum":[{"__symbolic":"method"}],"validateType":[{"__symbolic":"method"}],"validateItems":[{"__symbolic":"method"}],"validateItemsList":[{"__symbolic":"method"}],"validateString":[{"__symbolic":"method"}],"validateNumber":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"LSGetItemOptions":{"__symbolic":"interface"},"LocalStorage":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":12,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocalDatabase"},{"__symbolic":"reference","name":"JSONValidator"}]}],"getItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"getUnsafeItem":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}],"setItemSubscribe":[{"__symbolic":"method"}],"removeItemSubscribe":[{"__symbolic":"method"}],"clearSubscribe":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"localStorageProviders":{"__symbolic":"function","parameters":["config"],"value":[{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"prefix"},"thenExpression":{"provide":{"__symbolic":"reference","name":"LOCAL_STORAGE_PREFIX"},"useValue":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"prefix"}},"elseExpression":[]}]},"LocalStorageProvidersConfig":{"__symbolic":"interface"},"LOCAL_STORAGE_PREFIX":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":40},"arguments":["localStoragePrefix",{"__symbolic":"error","message":"Lambda not supported","line":2,"character":116,"module":"./lib/tokens"}]}},"origins":{"JSONSchema":"./lib/validation/json-schema","JSONSchemaConst":"./lib/validation/json-schema","JSONSchemaEnum":"./lib/validation/json-schema","JSONSchemaBoolean":"./lib/validation/json-schema","JSONSchemaNumeric":"./lib/validation/json-schema","JSONSchemaString":"./lib/validation/json-schema","JSONSchemaArray":"./lib/validation/json-schema","JSONSchemaObject":"./lib/validation/json-schema","ɵa":"./lib/databases/local-database","LocalDatabase":"./lib/databases/local-database","IndexedDBDatabase":"./lib/databases/indexeddb-database","LocalStorageDatabase":"./lib/databases/localstorage-database","MockLocalDatabase":"./lib/databases/mock-local-database","JSONValidator":"./lib/validation/json-validator","LSGetItemOptions":"./lib/lib.service","LocalStorage":"./lib/lib.service","localStorageProviders":"./lib/tokens","LocalStorageProvidersConfig":"./lib/tokens","LOCAL_STORAGE_PREFIX":"./lib/tokens"},"importAs":"@ngx-pwa/local-storage"} | ||
{"__symbolic":"module","version":4,"metadata":{"JSONSchema":{"__symbolic":"interface"},"JSONSchemaConst":{"__symbolic":"interface"},"JSONSchemaEnum":{"__symbolic":"interface"},"JSONSchemaBoolean":{"__symbolic":"interface"},"JSONSchemaNumeric":{"__symbolic":"interface"},"JSONSchemaString":{"__symbolic":"interface"},"JSONSchemaArray":{"__symbolic":"interface"},"JSONSchemaObject":{"__symbolic":"interface"},"ɵa":{"__symbolic":"function"},"LocalDatabase":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":30,"character":1},"arguments":[{"providedIn":"root","useFactory":{"__symbolic":"reference","name":"ɵa"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"PLATFORM_ID","line":34,"character":4},[{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":35,"character":9}},{"__symbolic":"reference","name":"LOCAL_STORAGE_PREFIX"}]]}]}],"members":{"getItem":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}],"has":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"IndexedDBDatabase":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":8,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":68,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":68,"character":27},"arguments":[{"__symbolic":"reference","name":"LOCAL_STORAGE_PREFIX"}]}]],"parameters":[{"__symbolic":"reference","name":"string"}]}],"getItem":[{"__symbolic":"method"}],"getItemFromTransaction":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}],"has":[{"__symbolic":"method"}],"connect":[{"__symbolic":"method"}],"transaction":[{"__symbolic":"method"}],"toSuccessObservable":[{"__symbolic":"method"}],"toErrorObservable":[{"__symbolic":"method"}],"setFallback":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"LocalStorageDatabase":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional","line":18,"character":15}},{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject","line":18,"character":27},"arguments":[{"__symbolic":"reference","name":"LOCAL_STORAGE_PREFIX"}]}]],"parameters":[{"__symbolic":"reference","name":"string"}]}],"getItem":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}],"has":[{"__symbolic":"method"}],"getKey":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"MockLocalDatabase":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":5,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"getItem":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}],"has":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"JSONValidator":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":6,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"validate":[{"__symbolic":"method"}],"isObjectNotNull":[{"__symbolic":"method"}],"validateProperties":[{"__symbolic":"method"}],"validateRequired":[{"__symbolic":"method"}],"validateEnum":[{"__symbolic":"method"}],"validateType":[{"__symbolic":"method"}],"validateItems":[{"__symbolic":"method"}],"validateItemsList":[{"__symbolic":"method"}],"validateString":[{"__symbolic":"method"}],"validateNumber":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"LSGetItemOptions":{"__symbolic":"interface"},"LocalStorage":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":12,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"LocalDatabase"},{"__symbolic":"reference","name":"JSONValidator"}]}],"getItem":[{"__symbolic":"method"},{"__symbolic":"method"},{"__symbolic":"method"}],"getUnsafeItem":[{"__symbolic":"method"}],"setItem":[{"__symbolic":"method"}],"removeItem":[{"__symbolic":"method"}],"clear":[{"__symbolic":"method"}],"keys":[{"__symbolic":"method"}],"has":[{"__symbolic":"method"}],"setItemSubscribe":[{"__symbolic":"method"}],"removeItemSubscribe":[{"__symbolic":"method"}],"clearSubscribe":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"localStorageProviders":{"__symbolic":"function","parameters":["config"],"value":[{"__symbolic":"if","condition":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"prefix"},"thenExpression":{"provide":{"__symbolic":"reference","name":"LOCAL_STORAGE_PREFIX"},"useValue":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"config"},"member":"prefix"}},"elseExpression":[]}]},"LocalStorageProvidersConfig":{"__symbolic":"interface"},"LOCAL_STORAGE_PREFIX":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken","line":2,"character":40},"arguments":["localStoragePrefix",{"__symbolic":"error","message":"Lambda not supported","line":2,"character":116,"module":"./lib/tokens"}]}},"origins":{"JSONSchema":"./lib/validation/json-schema","JSONSchemaConst":"./lib/validation/json-schema","JSONSchemaEnum":"./lib/validation/json-schema","JSONSchemaBoolean":"./lib/validation/json-schema","JSONSchemaNumeric":"./lib/validation/json-schema","JSONSchemaString":"./lib/validation/json-schema","JSONSchemaArray":"./lib/validation/json-schema","JSONSchemaObject":"./lib/validation/json-schema","ɵa":"./lib/databases/local-database","LocalDatabase":"./lib/databases/local-database","IndexedDBDatabase":"./lib/databases/indexeddb-database","LocalStorageDatabase":"./lib/databases/localstorage-database","MockLocalDatabase":"./lib/databases/mock-local-database","JSONValidator":"./lib/validation/json-validator","LSGetItemOptions":"./lib/lib.service","LocalStorage":"./lib/lib.service","localStorageProviders":"./lib/tokens","LocalStorageProvidersConfig":"./lib/tokens","LOCAL_STORAGE_PREFIX":"./lib/tokens"},"importAs":"@ngx-pwa/local-storage"} |
{ | ||
"name": "@ngx-pwa/local-storage", | ||
"version": "7.1.0-beta.0", | ||
"version": "7.1.0", | ||
"description": "Efficient local storage module for Angular apps and PWA: simple API based on native localStorage API, but internally stored via the asynchronous IndexedDB API for performance, and wrapped in RxJS observables to be homogeneous with other Angular modules.", | ||
@@ -5,0 +5,0 @@ "author": "Cyrille Tuzi", |
@@ -162,9 +162,11 @@ # Async local storage for Angular | ||
### Advanced operations | ||
### Map-like operations | ||
Starting *with version >= 7.1*, in addition to the classic `localStorage`-like API, | ||
this lib also provides `Map`-like methods for advanced operations: | ||
- `.keys()` | ||
this lib also provides some `Map`-like methods for advanced operations: | ||
- `.keys()` method | ||
- `.has(key)` method | ||
- `.size` property | ||
See the [documentation](./docs/ADVANCED_OPERATIONS.md) for some recipes. | ||
See the [documentation](./docs/MAP_OPERATIONS.md) for more info and some recipes. | ||
@@ -171,0 +173,0 @@ ### Prefix |
Sorry, the diff of this file is too big to display
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
941107
7671
1
222