ngx-filesaver
Advanced tools
Comparing version 8.1.0 to 9.0.0-rc.1
@@ -5,5 +5,57 @@ (function (global, factory) { | ||
(global = global || self, factory(global.ngxFileSaver = {}, global.ng.core, global.saveAs, global.ng.common.http, global.rxjs)); | ||
}(this, function (exports, core, fileSaver, http, rxjs) { 'use strict'; | ||
}(this, (function (exports, core, fileSaver, http, rxjs) { 'use strict'; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
var extendStatics = function(d, b) { | ||
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 extendStatics(d, b); | ||
}; | ||
function __extends(d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
} | ||
var __assign = function() { | ||
__assign = Object.assign || function __assign(t) { | ||
for (var s, i = 1, n = arguments.length; i < n; i++) { | ||
s = arguments[i]; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; | ||
} | ||
return t; | ||
}; | ||
return __assign.apply(this, arguments); | ||
}; | ||
function __rest(s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
} | ||
function __decorate(decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
@@ -13,3 +65,159 @@ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
} | ||
function __param(paramIndex, decorator) { | ||
return function (target, key) { decorator(target, key, paramIndex); } | ||
} | ||
function __metadata(metadataKey, metadataValue) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); | ||
} | ||
function __awaiter(thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
} | ||
function __generator(thisArg, body) { | ||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; | ||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; | ||
function verb(n) { return function (v) { return step([n, v]); }; } | ||
function step(op) { | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
if (y = 0, t) op = [op[0] & 2, t.value]; | ||
switch (op[0]) { | ||
case 0: case 1: t = op; break; | ||
case 4: _.label++; return { value: op[1], done: false }; | ||
case 5: _.label++; y = op[1]; op = [0]; continue; | ||
case 7: op = _.ops.pop(); _.trys.pop(); continue; | ||
default: | ||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } | ||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } | ||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } | ||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } | ||
if (t[2]) _.ops.pop(); | ||
_.trys.pop(); continue; | ||
} | ||
op = body.call(thisArg, _); | ||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } | ||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; | ||
} | ||
} | ||
function __exportStar(m, exports) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
function __values(o) { | ||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; | ||
if (m) return m.call(o); | ||
if (o && typeof o.length === "number") return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); | ||
} | ||
function __read(o, n) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator]; | ||
if (!m) return o; | ||
var i = m.call(o), r, ar = [], e; | ||
try { | ||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); | ||
} | ||
catch (error) { e = { error: error }; } | ||
finally { | ||
try { | ||
if (r && !r.done && (m = i["return"])) m.call(i); | ||
} | ||
finally { if (e) throw e.error; } | ||
} | ||
return ar; | ||
} | ||
function __spread() { | ||
for (var ar = [], i = 0; i < arguments.length; i++) | ||
ar = ar.concat(__read(arguments[i])); | ||
return ar; | ||
} | ||
function __spreadArrays() { | ||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; | ||
for (var r = Array(s), k = 0, i = 0; i < il; i++) | ||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) | ||
r[k] = a[j]; | ||
return r; | ||
}; | ||
function __await(v) { | ||
return this instanceof __await ? (this.v = v, this) : new __await(v); | ||
} | ||
function __asyncGenerator(thisArg, _arguments, generator) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var g = generator.apply(thisArg, _arguments || []), i, q = []; | ||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; | ||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } | ||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } | ||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } | ||
function fulfill(value) { resume("next", value); } | ||
function reject(value) { resume("throw", value); } | ||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } | ||
} | ||
function __asyncDelegator(o) { | ||
var i, p; | ||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; | ||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } | ||
} | ||
function __asyncValues(o) { | ||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); | ||
var m = o[Symbol.asyncIterator], i; | ||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); | ||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } | ||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } | ||
} | ||
function __makeTemplateObject(cooked, raw) { | ||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } | ||
return cooked; | ||
}; | ||
function __importStar(mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result.default = mod; | ||
return result; | ||
} | ||
function __importDefault(mod) { | ||
return (mod && mod.__esModule) ? mod : { default: mod }; | ||
} | ||
function __classPrivateFieldGet(receiver, privateMap) { | ||
if (!privateMap.has(receiver)) { | ||
throw new TypeError("attempted to get private field on non-instance"); | ||
} | ||
return privateMap.get(receiver); | ||
} | ||
function __classPrivateFieldSet(receiver, privateMap, value) { | ||
if (!privateMap.has(receiver)) { | ||
throw new TypeError("attempted to set private field on non-instance"); | ||
} | ||
privateMap.set(receiver, value); | ||
return value; | ||
} | ||
var FileSaverService = /** @class */ (function () { | ||
@@ -58,3 +266,3 @@ function FileSaverService() { | ||
}; | ||
FileSaverService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService = __decorate([ | ||
@@ -66,11 +274,2 @@ core.Injectable({ providedIn: 'root' }) | ||
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var FileSaverDirective = /** @class */ (function () { | ||
@@ -131,39 +330,39 @@ function FileSaverDirective(el, fss, httpClient) { | ||
]; }; | ||
__decorate$1([ | ||
__decorate([ | ||
core.Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "method", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.Input(), | ||
__metadata("design:type", rxjs.Observable) | ||
], FileSaverDirective.prototype, "http", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "query", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "header", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.Input(), | ||
__metadata("design:type", String) | ||
], FileSaverDirective.prototype, "url", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.Input(), | ||
__metadata("design:type", String) | ||
], FileSaverDirective.prototype, "fileName", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "fsOptions", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.Output(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "success", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.Output(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "error", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
core.HostListener('click'), | ||
@@ -174,3 +373,3 @@ __metadata("design:type", Function), | ||
], FileSaverDirective.prototype, "_click", null); | ||
FileSaverDirective = __decorate$1([ | ||
FileSaverDirective = __decorate([ | ||
core.Directive({ | ||
@@ -185,12 +384,6 @@ selector: '[fileSaver]', | ||
var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var FileSaverModule = /** @class */ (function () { | ||
function FileSaverModule() { | ||
} | ||
FileSaverModule = __decorate$2([ | ||
FileSaverModule = __decorate([ | ||
core.NgModule({ | ||
@@ -210,3 +403,3 @@ declarations: [FileSaverDirective], | ||
})); | ||
}))); | ||
//# sourceMappingURL=ngx-filesaver.umd.js.map |
@@ -1,2 +0,16 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("file-saver"),require("@angular/common/http"),require("rxjs")):"function"==typeof define&&define.amd?define("ngxFileSaver",["exports","@angular/core","file-saver","@angular/common/http","rxjs"],t):t((e=e||self).ngxFileSaver={},e.ng.core,e.saveAs,e.ng.common.http,e.rxjs)}(this,(function(e,t,r,n,o){"use strict";var i=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},s=function(){function e(){}return Object.defineProperty(e.prototype,"isFileSaverSupported",{get:function(){try{return!!new Blob}catch(e){return!1}},enumerable:!0,configurable:!0}),e.prototype.genType=function(e){if(!e||-1===e.lastIndexOf("."))return"text/plain";var t=e.substr(e.lastIndexOf(".")+1);switch(t){case"txt":return"text/plain";case"xml":case"html":return"text/"+t;case"json":return"octet/stream";default:return"application/"+t}},e.prototype.save=function(e,t,n,o){if(!e)throw new Error("Data argument should be a blob instance");var i=new Blob([e],{type:n||e.type||this.genType(t)});r.saveAs(i,decodeURI(t||"download"),o)},e.prototype.saveText=function(e,t,r){var n=new Blob([e]);this.save(n,t,null,r)},e.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new e},token:e,providedIn:"root"}),e=i([t.Injectable({providedIn:"root"})],e)}(),a=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},p=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},c=function(){function e(e,r,n){this.el=e,this.fss=r,this.httpClient=n,this.method="GET",this.success=new t.EventEmitter,this.error=new t.EventEmitter,r.isFileSaverSupported||e.nativeElement.classList.add("filesaver__not-support")}return e.prototype.getName=function(e){return decodeURI(this.fileName||e.headers.get("filename")||e.headers.get("x-filename"))},e.prototype._click=function(){var e=this;if(this.fss.isFileSaverSupported){var t=this.http;if(!t){var r=new n.HttpParams,o=this.query||{};for(var i in o)r.set(i,o[i]);t=this.httpClient.request(this.method,this.url,{observe:"response",responseType:"blob",headers:this.header,params:r})}this.setDisabled(!0),t.subscribe((function(t){200!==t.status||t.body.size<=0?e.error.emit(t):(e.fss.save(t.body,e.getName(t),null,e.fsOptions),e.success.emit(t))}),(function(t){return e.error.emit(t)}),(function(){return e.setDisabled(!1)}))}},e.prototype.setDisabled=function(e){var t=this.el.nativeElement;t.disabled=e,t.classList[e?"add":"remove"]("filesaver__disabled")},e.ctorParameters=function(){return[{type:t.ElementRef},{type:s},{type:n.HttpClient}]},a([t.Input(),p("design:type",Object)],e.prototype,"method",void 0),a([t.Input(),p("design:type",o.Observable)],e.prototype,"http",void 0),a([t.Input(),p("design:type",Object)],e.prototype,"query",void 0),a([t.Input(),p("design:type",Object)],e.prototype,"header",void 0),a([t.Input(),p("design:type",String)],e.prototype,"url",void 0),a([t.Input(),p("design:type",String)],e.prototype,"fileName",void 0),a([t.Input(),p("design:type",Object)],e.prototype,"fsOptions",void 0),a([t.Output(),p("design:type",Object)],e.prototype,"success",void 0),a([t.Output(),p("design:type",Object)],e.prototype,"error",void 0),a([t.HostListener("click"),p("design:type",Function),p("design:paramtypes",[]),p("design:returntype",void 0)],e.prototype,"_click",null),e=a([t.Directive({selector:"[fileSaver]",exportAs:"fileSaver"}),p("design:paramtypes",[t.ElementRef,s,n.HttpClient])],e)}(),l=this&&this.__decorate||function(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s},u=function(){function e(){}return e=l([t.NgModule({declarations:[c],exports:[c]})],e)}();e.FileSaverDirective=c,e.FileSaverModule=u,e.FileSaverService=s,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("file-saver"),require("@angular/common/http"),require("rxjs")):"function"==typeof define&&define.amd?define("ngxFileSaver",["exports","@angular/core","file-saver","@angular/common/http","rxjs"],t):t((e=e||self).ngxFileSaver={},e.ng.core,e.saveAs,e.ng.common.http,e.rxjs)}(this,(function(e,t,r,n,o){"use strict"; | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */function i(e,t,r,n){var o,i=arguments.length,s=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var p=e.length-1;p>=0;p--)(o=e[p])&&(s=(i<3?o(s):i>3?o(t,r,s):o(t,r))||s);return i>3&&s&&Object.defineProperty(t,r,s),s}function s(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}var p=function(){function e(){}return Object.defineProperty(e.prototype,"isFileSaverSupported",{get:function(){try{return!!new Blob}catch(e){return!1}},enumerable:!0,configurable:!0}),e.prototype.genType=function(e){if(!e||-1===e.lastIndexOf("."))return"text/plain";var t=e.substr(e.lastIndexOf(".")+1);switch(t){case"txt":return"text/plain";case"xml":case"html":return"text/"+t;case"json":return"octet/stream";default:return"application/"+t}},e.prototype.save=function(e,t,n,o){if(!e)throw new Error("Data argument should be a blob instance");var i=new Blob([e],{type:n||e.type||this.genType(t)});r.saveAs(i,decodeURI(t||"download"),o)},e.prototype.saveText=function(e,t,r){var n=new Blob([e]);this.save(n,t,null,r)},e.ɵprov=t["ɵɵdefineInjectable"]({factory:function(){return new e},token:e,providedIn:"root"}),e=i([t.Injectable({providedIn:"root"})],e)}(),a=function(){function e(e,r,n){this.el=e,this.fss=r,this.httpClient=n,this.method="GET",this.success=new t.EventEmitter,this.error=new t.EventEmitter,r.isFileSaverSupported||e.nativeElement.classList.add("filesaver__not-support")}return e.prototype.getName=function(e){return decodeURI(this.fileName||e.headers.get("filename")||e.headers.get("x-filename"))},e.prototype._click=function(){var e=this;if(this.fss.isFileSaverSupported){var t=this.http;if(!t){var r=new n.HttpParams,o=this.query||{};for(var i in o)r.set(i,o[i]);t=this.httpClient.request(this.method,this.url,{observe:"response",responseType:"blob",headers:this.header,params:r})}this.setDisabled(!0),t.subscribe((function(t){200!==t.status||t.body.size<=0?e.error.emit(t):(e.fss.save(t.body,e.getName(t),null,e.fsOptions),e.success.emit(t))}),(function(t){return e.error.emit(t)}),(function(){return e.setDisabled(!1)}))}},e.prototype.setDisabled=function(e){var t=this.el.nativeElement;t.disabled=e,t.classList[e?"add":"remove"]("filesaver__disabled")},e.ctorParameters=function(){return[{type:t.ElementRef},{type:p},{type:n.HttpClient}]},i([t.Input(),s("design:type",Object)],e.prototype,"method",void 0),i([t.Input(),s("design:type",o.Observable)],e.prototype,"http",void 0),i([t.Input(),s("design:type",Object)],e.prototype,"query",void 0),i([t.Input(),s("design:type",Object)],e.prototype,"header",void 0),i([t.Input(),s("design:type",String)],e.prototype,"url",void 0),i([t.Input(),s("design:type",String)],e.prototype,"fileName",void 0),i([t.Input(),s("design:type",Object)],e.prototype,"fsOptions",void 0),i([t.Output(),s("design:type",Object)],e.prototype,"success",void 0),i([t.Output(),s("design:type",Object)],e.prototype,"error",void 0),i([t.HostListener("click"),s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],e.prototype,"_click",null),e=i([t.Directive({selector:"[fileSaver]",exportAs:"fileSaver"}),s("design:paramtypes",[t.ElementRef,p,n.HttpClient])],e)}(),u=function(){function e(){}return e=i([t.NgModule({declarations:[a],exports:[a]})],e)}();e.FileSaverDirective=a,e.FileSaverModule=u,e.FileSaverService=p,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ngx-filesaver.umd.min.js.map |
@@ -1,10 +0,2 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
import { __decorate, __metadata } from "tslib"; | ||
import { Directive, ElementRef, Input, HostListener, EventEmitter, Output } from '@angular/core'; | ||
@@ -119,2 +111,2 @@ import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http'; | ||
export { FileSaverDirective }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXNhdmVyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1maWxlc2F2ZXIvIiwic291cmNlcyI6WyJzcmMvZmlsZXNhdmVyLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUUsWUFBWSxFQUFFLFlBQVksRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDakcsT0F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aGlzLmZzT3B0aW9ucyk7XG4gICAgICAgIHRoaXMuc3VjY2Vzcy5lbWl0KHJlcyk7XG4gICAgICB9LFxuICAgICAgZXJyID0+IHRoaXMuZXJyb3IuZW1pdChlcnIpLFxuICAgICAgKCkgPT4gdGhpcy5zZXREaXNhYmxlZChmYWxzZSksXG4gICAgKTtcbiAgfVxuXG4gIHByaXZhdGUgc2V0RGlzYWJsZWQoc3RhdHVzOiBib29sZWFuKSB7XG4gICAgY29uc3QgZWwgPSB0aGlzLmVsLm5hdGl2ZUVsZW1lbnQ7XG4gICAgZWwuZGlzYWJsZWQgPSBzdGF0dXM7XG4gICAgZWwuY2xhc3NMaXN0W3N0YXR1cyA/ICdhZGQnIDogJ3JlbW92ZSddKGBmaWxlc2F2ZXJfX2Rpc2FibGVkYCk7XG4gIH1cbn1cbiJdfQ== |
@@ -1,7 +0,2 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
import { __decorate } from "tslib"; | ||
import { NgModule } from '@angular/core'; | ||
@@ -18,2 +13,2 @@ import { FileSaverDirective } from './filesaver.directive'; | ||
export { FileSaverModule }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXNhdmVyLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1maWxlc2F2ZXIvIiwic291cmNlcyI6WyJzcmMvZmlsZXNhdmVyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QU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UcsQ0FBQTtBQUFsQixlQUFlO0lBSjNCLFFBQVEsQ0FBQztRQUNSLFlBQVksRUFBRSxDQUFDLGtCQUFrQixDQUFDO1FBQ2xDLE9BQU8sRUFBRSxDQUFDLGtCQUFrQixDQUFDO0tBQzlCLENBQUM7R0FDVyxlQUFlLENBQUc7U0FBbEIsZUFBZSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE5nTW9kdWxlIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBGaWxlU2F2ZXJEaXJlY3RpdmUgfSBmcm9tICcuL2ZpbGVzYXZlci5kaXJlY3RpdmUnO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtGaWxlU2F2ZXJEaXJlY3RpdmVdLFxuICBleHBvcnRzOiBbRmlsZVNhdmVyRGlyZWN0aXZlXSxcbn0pXG5leHBvcnQgY2xhc3MgRmlsZVNhdmVyTW9kdWxlIHt9XG4iXX0= |
@@ -1,7 +0,2 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
import { __decorate } from "tslib"; | ||
import { Injectable } from '@angular/core'; | ||
@@ -48,3 +43,3 @@ import { saveAs } from 'file-saver'; | ||
}; | ||
FileSaverService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService = __decorate([ | ||
@@ -54,2 +49,2 @@ Injectable({ providedIn: 'root' }) | ||
export { FileSaverService }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXNhdmVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmlsZXNhdmVyLyIsInNvdXJjZXMiOlsic3JjL2ZpbGVzYXZlci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLE1BQU0sRUFBb0IsTUFBTSxZQUFZLENBQUM7O0FBR3RELElBQWEsZ0JBQWdCLEdBQTdCLE1BQWEsZ0JBQWdCO0lBQzNCLElBQUksb0JBQW9CO1FBQ3RCLElBQUk7WUFDRixPQUFPLENBQUMsQ0FBQyxJQUFJLElBQUksRUFBRSxDQUFDO1NBQ3JCO1FBQUMsT0FBTyxDQUFDLEVBQUU7WUFDVixPQUFPLEtBQUssQ0FBQztTQUNkO0lBQ0gsQ0FBQztJQUVELE9BQU8sQ0FBQyxRQUFpQjtRQUN2QixJQUFJLENBQUMsUUFBUSxJQUFJLFFBQVEsQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxDQUFDLEVBQUU7WUFDakQsT0FBTyxZQUFZLENBQUM7U0FDckI7UUFDRCxNQUFNLElBQUksR0FBRyxRQUFRLENBQUMsTUFBTSxDQUFDLFFBQVEsQ0FBQyxXQUFXLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7UUFDNUQsUUFBUSxJQUFJLEVBQUU7WUFDWixLQUFLLEtBQUs7Z0JBQ1IsT0FBTyxZQUFZLENBQUM7WUFDdEIsS0FBSyxLQUFLLENBQUM7WUFDWCxLQUFLLE1BQU07Z0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IEJsb2IoW3R4dF0pO1xuICAgIHRoaXMuc2F2ZShibG9iLCBmaWxlTmFtZSwgbnVsbCwgb3B0aW9uKTtcbiAgfVxufVxuIl19 |
@@ -1,10 +0,2 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
import { __decorate, __metadata } from "tslib"; | ||
import { Directive, ElementRef, Input, HostListener, EventEmitter, Output } from '@angular/core'; | ||
@@ -121,2 +113,2 @@ import { HttpClient, HttpParams, HttpResponse } from '@angular/common/http'; | ||
export { FileSaverDirective }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXNhdmVyLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1maWxlc2F2ZXIvIiwic291cmNlcyI6WyJzcmMvZmlsZXNhdmVyLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFVBQVUsRUFBRSxLQUFLLEVBQUUsWUFBWSxFQUFFLFlBQVksRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDakcsT0FBTyxFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDNUUs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wgdGhpcy5nZXROYW1lKHJlcyksIG51bGwsIHRoaXMuZnNPcHRpb25zKTtcbiAgICAgICAgdGhpcy5zdWNjZXNzLmVtaXQocmVzKTtcbiAgICAgIH0sXG4gICAgICBlcnIgPT4gdGhpcy5lcnJvci5lbWl0KGVyciksXG4gICAgICAoKSA9PiB0aGlzLnNldERpc2FibGVkKGZhbHNlKSxcbiAgICApO1xuICB9XG5cbiAgcHJpdmF0ZSBzZXREaXNhYmxlZChzdGF0dXM6IGJvb2xlYW4pIHtcbiAgICBjb25zdCBlbCA9IHRoaXMuZWwubmF0aXZlRWxlbWVudDtcbiAgICBlbC5kaXNhYmxlZCA9IHN0YXR1cztcbiAgICBlbC5jbGFzc0xpc3Rbc3RhdHVzID8gJ2FkZCcgOiAncmVtb3ZlJ10oYGZpbGVzYXZlcl9fZGlzYWJsZWRgKTtcbiAgfVxufVxuIl19 |
@@ -1,7 +0,2 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
import { __decorate } from "tslib"; | ||
import { NgModule } from '@angular/core'; | ||
@@ -21,2 +16,2 @@ import { FileSaverDirective } from './filesaver.directive'; | ||
export { FileSaverModule }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXNhdmVyLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL25neC1maWxlc2F2ZXIvIiwic291cmNlcyI6WyJzcmMvZmlsZXNhdmVyLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1h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lBQThCLENBQUM7SUFBbEIsZUFBZTtRQUozQixRQUFRLENBQUM7WUFDUixZQUFZLEVBQUUsQ0FBQyxrQkFBa0IsQ0FBQztZQUNsQyxPQUFPLEVBQUUsQ0FBQyxrQkFBa0IsQ0FBQztTQUM5QixDQUFDO09BQ1csZUFBZSxDQUFHO0lBQUQsc0JBQUM7Q0FBQSxBQUEvQixJQUErQjtTQUFsQixlQUFlIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgTmdNb2R1bGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IEZpbGVTYXZlckRpcmVjdGl2ZSB9IGZyb20gJy4vZmlsZXNhdmVyLmRpcmVjdGl2ZSc7XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW0ZpbGVTYXZlckRpcmVjdGl2ZV0sXG4gIGV4cG9ydHM6IFtGaWxlU2F2ZXJEaXJlY3RpdmVdLFxufSlcbmV4cG9ydCBjbGFzcyBGaWxlU2F2ZXJNb2R1bGUge31cbiJdfQ== |
@@ -1,7 +0,2 @@ | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
import { __decorate } from "tslib"; | ||
import { Injectable } from '@angular/core'; | ||
@@ -53,3 +48,3 @@ import { saveAs } from 'file-saver'; | ||
}; | ||
FileSaverService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService.ɵprov = i0.ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService = __decorate([ | ||
@@ -61,2 +56,2 @@ Injectable({ providedIn: 'root' }) | ||
export { FileSaverService }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZXNhdmVyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9uZ3gtZmlsZXNhdmVyLyIsInNvdXJjZXMiOlsic3JjL2ZpbGVzYXZlci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7OztBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLE1BQU0sRUFBb0IsTUFBTSxZQUFZLENBQUM7O0FBR3REO0lBQUE7S0F3Q0M7SUF2Q0Msc0JBQUksa0RBQW9CO2FBQXhCO1lBQ0UsSUFBSTtnQkFDRixPQUFPLENBQUMsQ0FBQyxJQUFJLElBQUksRUFBRSxDQUFDO2FBQ3JCO1lBQUMsT0FBTyxDQUFDLEVBQUU7Z0JBQ1YsT0FBTyxLQUFLLENBQUM7YUFDZDtRQUNILENBQUM7OztPQUFBO0lBRUQsa0NBQU8sR0FBUCxVQUFRLFFBQWlCO1FBQ3ZCLElBQUksQ0FBQyxRQUFRLElBQUksUUFBUSxDQUFDLFdBQVcsQ0FBQyxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUMsRUFBRTtZQUNqRCxPQUFPLFlBQVksQ0FBQztTQUNyQjtRQUNELElBQU0sSUFBSSxHQUFHLFFBQVEsQ0FBQyxNQUFNLENBQUMsUUFBUSxDQUFDLFdBQVcsQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztRQUM1RCxRQUFRLElBQUksRUFBRTtZQUNaLEtBQUssS0FBSztnQkFDUixPQUFPLFlBQVksQ0FBQztZQUN0QixLQU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tZT86IHN0cmluZywgb3B0aW9uPzogRmlsZVNhdmVyT3B0aW9ucyk6IHZvaWQge1xuICAgIGNvbnN0IGJsb2IgPSBuZXcgQmxvYihbdHh0XSk7XG4gICAgdGhpcy5zYXZlKGJsb2IsIGZpbGVOYW1lLCBudWxsLCBvcHRpb24pO1xuICB9XG59XG4iXX0= |
@@ -0,1 +1,2 @@ | ||
import { __decorate, __metadata } from 'tslib'; | ||
import { ɵɵdefineInjectable, Injectable, EventEmitter, ElementRef, Input, Output, HostListener, Directive, NgModule } from '@angular/core'; | ||
@@ -6,8 +7,2 @@ import { saveAs } from 'file-saver'; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
let FileSaverService = class FileSaverService { | ||
@@ -51,3 +46,3 @@ get isFileSaverSupported() { | ||
}; | ||
FileSaverService.ngInjectableDef = ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService.ɵprov = ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService = __decorate([ | ||
@@ -57,11 +52,2 @@ Injectable({ providedIn: 'root' }) | ||
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
let FileSaverDirective = class FileSaverDirective { | ||
@@ -122,39 +108,39 @@ constructor(el, fss, httpClient) { | ||
]; | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "method", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Observable) | ||
], FileSaverDirective.prototype, "http", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "query", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "header", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", String) | ||
], FileSaverDirective.prototype, "url", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", String) | ||
], FileSaverDirective.prototype, "fileName", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "fsOptions", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Output(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "success", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Output(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "error", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
HostListener('click'), | ||
@@ -165,3 +151,3 @@ __metadata("design:type", Function), | ||
], FileSaverDirective.prototype, "_click", null); | ||
FileSaverDirective = __decorate$1([ | ||
FileSaverDirective = __decorate([ | ||
Directive({ | ||
@@ -174,11 +160,5 @@ selector: '[fileSaver]', | ||
var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
let FileSaverModule = class FileSaverModule { | ||
}; | ||
FileSaverModule = __decorate$2([ | ||
FileSaverModule = __decorate([ | ||
NgModule({ | ||
@@ -185,0 +165,0 @@ declarations: [FileSaverDirective], |
@@ -0,1 +1,2 @@ | ||
import { __decorate, __metadata } from 'tslib'; | ||
import { ɵɵdefineInjectable, Injectable, EventEmitter, ElementRef, Input, Output, HostListener, Directive, NgModule } from '@angular/core'; | ||
@@ -6,8 +7,2 @@ import { saveAs } from 'file-saver'; | ||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var FileSaverService = /** @class */ (function () { | ||
@@ -56,3 +51,3 @@ function FileSaverService() { | ||
}; | ||
FileSaverService.ngInjectableDef = ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService.ɵprov = ɵɵdefineInjectable({ factory: function FileSaverService_Factory() { return new FileSaverService(); }, token: FileSaverService, providedIn: "root" }); | ||
FileSaverService = __decorate([ | ||
@@ -64,11 +59,2 @@ Injectable({ providedIn: 'root' }) | ||
var __decorate$1 = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var __metadata = (this && this.__metadata) || function (k, v) { | ||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); | ||
}; | ||
var FileSaverDirective = /** @class */ (function () { | ||
@@ -129,39 +115,39 @@ function FileSaverDirective(el, fss, httpClient) { | ||
]; }; | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "method", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Observable) | ||
], FileSaverDirective.prototype, "http", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "query", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "header", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", String) | ||
], FileSaverDirective.prototype, "url", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", String) | ||
], FileSaverDirective.prototype, "fileName", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Input(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "fsOptions", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Output(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "success", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
Output(), | ||
__metadata("design:type", Object) | ||
], FileSaverDirective.prototype, "error", void 0); | ||
__decorate$1([ | ||
__decorate([ | ||
HostListener('click'), | ||
@@ -172,3 +158,3 @@ __metadata("design:type", Function), | ||
], FileSaverDirective.prototype, "_click", null); | ||
FileSaverDirective = __decorate$1([ | ||
FileSaverDirective = __decorate([ | ||
Directive({ | ||
@@ -183,12 +169,6 @@ selector: '[fileSaver]', | ||
var __decorate$2 = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); | ||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; | ||
return c > 3 && r && Object.defineProperty(target, key, r), r; | ||
}; | ||
var FileSaverModule = /** @class */ (function () { | ||
function FileSaverModule() { | ||
} | ||
FileSaverModule = __decorate$2([ | ||
FileSaverModule = __decorate([ | ||
NgModule({ | ||
@@ -195,0 +175,0 @@ declarations: [FileSaverDirective], |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"FileSaverService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"genType":[{"__symbolic":"method"}],"save":[{"__symbolic":"method"}],"saveText":[{"__symbolic":"method"}]},"statics":{"ngInjectableDef":{}}},"FileSaverDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[fileSaver]","exportAs":"fileSaver"}]}],"members":{"method":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"http":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"query":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"header":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"url":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"fileName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"fsOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"success":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":18,"character":3}}]}],"error":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":21,"character":37,"context":{"typeName":"HTMLButtonElement"},"module":"./src/filesaver.directive"}]},{"__symbolic":"reference","name":"FileSaverService"},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":21,"character":108}]}],"getName":[{"__symbolic":"method"}],"_click":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":31,"character":3},"arguments":["click"]}]}],"setDisabled":[{"__symbolic":"method"}]}},"FileSaverModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"FileSaverDirective"}],"exports":[{"__symbolic":"reference","name":"FileSaverDirective"}]}]}],"members":{}}},"origins":{"FileSaverService":"./src/filesaver.service","FileSaverDirective":"./src/filesaver.directive","FileSaverModule":"./src/filesaver.module"},"importAs":"ngx-filesaver"} | ||
{"__symbolic":"module","version":4,"metadata":{"FileSaverService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":3,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"genType":[{"__symbolic":"method"}],"save":[{"__symbolic":"method"}],"saveText":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"FileSaverDirective":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Directive","line":6,"character":1},"arguments":[{"selector":"[fileSaver]","exportAs":"fileSaver"}]}],"members":{"method":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":11,"character":3}}]}],"http":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":12,"character":3}}]}],"query":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":13,"character":3}}]}],"header":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":14,"character":3}}]}],"url":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":15,"character":3}}]}],"fileName":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":16,"character":3}}]}],"fsOptions":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":17,"character":3}}]}],"success":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":18,"character":3}}]}],"error":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":19,"character":3}}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ElementRef","module":"@angular/core","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":21,"character":37,"context":{"typeName":"HTMLButtonElement"},"module":"./src/filesaver.directive"}]},{"__symbolic":"reference","name":"FileSaverService"},{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":21,"character":108}]}],"getName":[{"__symbolic":"method"}],"_click":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":31,"character":3},"arguments":["click"]}]}],"setDisabled":[{"__symbolic":"method"}]}},"FileSaverModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":3,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"FileSaverDirective"}],"exports":[{"__symbolic":"reference","name":"FileSaverDirective"}]}]}],"members":{}}},"origins":{"FileSaverService":"./src/filesaver.service","FileSaverDirective":"./src/filesaver.directive","FileSaverModule":"./src/filesaver.module"},"importAs":"ngx-filesaver"} |
{ | ||
"name": "ngx-filesaver", | ||
"version": "8.1.0", | ||
"version": "9.0.0-rc.1", | ||
"description": "Simple file save with FileSaver.js", | ||
@@ -25,40 +25,4 @@ "repository": { | ||
"@types/file-saver": "^2.0.0", | ||
"file-saver": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"@angular/animations": "~8.2.7", | ||
"@angular/common": "~8.2.7", | ||
"@angular/compiler": "~8.2.7", | ||
"@angular/core": "~8.2.7", | ||
"@angular/forms": "~8.2.7", | ||
"@angular/platform-browser": "~8.2.7", | ||
"@angular/platform-browser-dynamic": "~8.2.7", | ||
"@angular/router": "~8.2.7", | ||
"rxjs": "~6.4.0", | ||
"tslib": "^1.10.0", | ||
"zone.js": "~0.9.1", | ||
"@angular-devkit/build-angular": "~0.803.5", | ||
"@angular/cli": "~8.3.5", | ||
"@angular/compiler-cli": "~8.2.7", | ||
"@angular/language-service": "~8.2.7", | ||
"@types/node": "~8.9.4", | ||
"@types/jasmine": "~3.3.8", | ||
"@types/jasminewd2": "~2.0.3", | ||
"codelyzer": "^5.0.0", | ||
"jasmine-core": "~3.4.0", | ||
"jasmine-spec-reporter": "~4.2.1", | ||
"karma": "~4.1.0", | ||
"karma-chrome-launcher": "~2.2.0", | ||
"karma-coverage-istanbul-reporter": "~2.0.1", | ||
"karma-jasmine": "~2.0.1", | ||
"karma-jasmine-html-reporter": "^1.4.0", | ||
"protractor": "~5.4.0", | ||
"ts-node": "~7.0.0", | ||
"tslint": "~5.15.0", | ||
"typescript": "~3.5.3", | ||
"ng-packagr": "^5.7.0", | ||
"@types/file-saver": "^2.0.0", | ||
"file-saver": "^2.0.0", | ||
"gh-pages": "^2.1.1", | ||
"codecov": "^3.6.1" | ||
"tslib": "^1.10.0" | ||
}, | ||
@@ -74,6 +38,3 @@ "main": "bundles/ngx-filesaver.umd.js", | ||
"metadata": "ngx-filesaver.metadata.json", | ||
"sideEffects": false, | ||
"dependencies": { | ||
"tslib": "^1.9.0" | ||
} | ||
"sideEffects": false | ||
} |
import { FileSaverOptions } from 'file-saver'; | ||
export declare class FileSaverService { | ||
readonly isFileSaverSupported: boolean; | ||
get isFileSaverSupported(): boolean; | ||
genType(fileName?: string): string; | ||
@@ -5,0 +5,0 @@ save(blob: Blob, fileName?: string, filtType?: string, option?: FileSaverOptions): void; |
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
Mixed license
License(Experimental) Package contains multiple licenses.
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
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
160440
0
35
1149
1
2
- Removedtslib@^1.9.0