ngx-dropzone-wrapper
Advanced tools
Comparing version 9.0.0-0 to 9.0.0-1
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('dropzone')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', 'dropzone'], factory) : | ||
(global = global || self, factory((global.zef = global.zef || {}, global.zef.ngxDropzoneWrapper = {}), global.ng.core, global.ng.common, global.Dropzone)); | ||
typeof define === 'function' && define.amd ? define('ngx-dropzone-wrapper', ['exports', '@angular/core', '@angular/common', 'dropzone'], factory) : | ||
(global = global || self, factory(global['ngx-dropzone-wrapper'] = {}, global.ng.core, global.ng.common, global.dropzone)); | ||
}(this, (function (exports, core, common, Dropzone) { 'use strict'; | ||
@@ -9,10 +9,200 @@ | ||
/** | ||
* @fileoverview added by tsickle | ||
* Generated from: lib/dropzone.interfaces.ts | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
/** @type {?} */ | ||
/*! ***************************************************************************** | ||
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; | ||
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; | ||
} | ||
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) { | ||
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) : new P(function (resolve) { resolve(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 m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
} | ||
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 }; | ||
} | ||
var DROPZONE_CONFIG = new core.InjectionToken('DROPZONE_CONFIG'); | ||
/** @type {?} */ | ||
var DropzoneEvents = [ | ||
@@ -51,13 +241,3 @@ 'error', | ||
} | ||
/** | ||
* @param {?=} config | ||
* @param {?=} target | ||
* @return {?} | ||
*/ | ||
DropzoneConfig.prototype.assign = /** | ||
* @param {?=} config | ||
* @param {?=} target | ||
* @return {?} | ||
*/ | ||
function (config, target) { | ||
DropzoneConfig.prototype.assign = function (config, target) { | ||
if (config === void 0) { config = {}; } | ||
@@ -79,7 +259,2 @@ target = target || this; | ||
/** | ||
* @fileoverview added by tsickle | ||
* Generated from: lib/dropzone.directive.ts | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var DropzoneDirective = /** @class */ (function () { | ||
@@ -122,13 +297,6 @@ function DropzoneDirective(zone, renderer, elementRef, differs, platformId, defaults) { | ||
this.DZ_TOTALUPLOADPROGRESS = new core.EventEmitter(); | ||
/** @type {?} */ | ||
var dz = Dropzone; | ||
dz.autoDiscover = false; | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
DropzoneDirective.prototype.ngOnInit = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
DropzoneDirective.prototype.ngOnInit = function () { | ||
var _this = this; | ||
@@ -138,3 +306,2 @@ if (!common.isPlatformBrowser(this.platformId)) { | ||
} | ||
/** @type {?} */ | ||
var params = new DropzoneConfig(this.defaults); | ||
@@ -144,8 +311,5 @@ params.assign(this.config); // Custom configuration | ||
this.renderer.removeClass(this.elementRef.nativeElement, (params.maxFiles === 1) ? 'dz-multiple' : 'dz-single'); | ||
this.zone.runOutsideAngular((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
this.zone.runOutsideAngular(function () { | ||
_this.instance = new Dropzone(_this.elementRef.nativeElement, params); | ||
})); | ||
}); | ||
if (this.disabled) { | ||
@@ -155,54 +319,25 @@ this.instance.disable(); | ||
if (this.DZ_INIT.observers.length) { | ||
this.zone.run((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
this.zone.run(function () { | ||
_this.DZ_INIT.emit(_this.instance); | ||
})); | ||
}); | ||
} | ||
// Add auto reset handling for events | ||
this.instance.on('success', (/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
this.instance.on('success', function () { | ||
if (params.autoReset != null) { | ||
setTimeout((/** | ||
* @return {?} | ||
*/ | ||
function () { return _this.reset(); }), params.autoReset); | ||
setTimeout(function () { return _this.reset(); }, params.autoReset); | ||
} | ||
})); | ||
this.instance.on('error', (/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
}); | ||
this.instance.on('error', function () { | ||
if (params.errorReset != null) { | ||
setTimeout((/** | ||
* @return {?} | ||
*/ | ||
function () { return _this.reset(); }), params.errorReset); | ||
setTimeout(function () { return _this.reset(); }, params.errorReset); | ||
} | ||
})); | ||
this.instance.on('canceled', (/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
}); | ||
this.instance.on('canceled', function () { | ||
if (params.cancelReset != null) { | ||
setTimeout((/** | ||
* @return {?} | ||
*/ | ||
function () { return _this.reset(); }), params.cancelReset); | ||
setTimeout(function () { return _this.reset(); }, params.cancelReset); | ||
} | ||
})); | ||
}); | ||
// Add native Dropzone event handling | ||
DropzoneEvents.forEach((/** | ||
* @param {?} eventName | ||
* @return {?} | ||
*/ | ||
function (eventName) { | ||
_this.instance.on(eventName.toLowerCase(), (/** | ||
* @param {...?} args | ||
* @return {?} | ||
*/ | ||
function () { | ||
DropzoneEvents.forEach(function (eventName) { | ||
_this.instance.on(eventName.toLowerCase(), function () { | ||
var args = []; | ||
@@ -213,16 +348,11 @@ for (var _i = 0; _i < arguments.length; _i++) { | ||
args = (args.length === 1) ? args[0] : args; | ||
/** @type {?} */ | ||
var output = "DZ_" + eventName.toUpperCase(); | ||
/** @type {?} */ | ||
var emitter = (/** @type {?} */ (_this[(/** @type {?} */ (output))])); | ||
var emitter = _this[output]; | ||
if (emitter.observers.length > 0) { | ||
_this.zone.run((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
_this.zone.run(function () { | ||
emitter.emit(args); | ||
})); | ||
}); | ||
} | ||
})); | ||
})); | ||
}); | ||
}); | ||
if (!this.configDiff) { | ||
@@ -233,29 +363,13 @@ this.configDiff = this.differs.find(this.config || {}).create(); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
DropzoneDirective.prototype.ngOnDestroy = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
DropzoneDirective.prototype.ngOnDestroy = function () { | ||
var _this = this; | ||
if (this.instance) { | ||
this.zone.runOutsideAngular((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
this.zone.runOutsideAngular(function () { | ||
_this.instance.destroy(); | ||
})); | ||
}); | ||
this.instance = null; | ||
} | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
DropzoneDirective.prototype.ngDoCheck = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
DropzoneDirective.prototype.ngDoCheck = function () { | ||
if (!this.disabled && this.configDiff) { | ||
/** @type {?} */ | ||
var changes = this.configDiff.diff(this.config || {}); | ||
@@ -268,11 +382,3 @@ if (changes && this.instance) { | ||
}; | ||
/** | ||
* @param {?} changes | ||
* @return {?} | ||
*/ | ||
DropzoneDirective.prototype.ngOnChanges = /** | ||
* @param {?} changes | ||
* @return {?} | ||
*/ | ||
function (changes) { | ||
DropzoneDirective.prototype.ngOnChanges = function (changes) { | ||
var _this = this; | ||
@@ -282,16 +388,10 @@ if (this.instance && changes['disabled']) { | ||
if (changes['disabled'].currentValue === false) { | ||
this.zone.runOutsideAngular((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
this.zone.runOutsideAngular(function () { | ||
_this.instance.enable(); | ||
})); | ||
}); | ||
} | ||
else if (changes['disabled'].currentValue === true) { | ||
this.zone.runOutsideAngular((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
this.zone.runOutsideAngular(function () { | ||
_this.instance.disable(); | ||
})); | ||
}); | ||
} | ||
@@ -301,48 +401,119 @@ } | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
DropzoneDirective.prototype.dropzone = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
DropzoneDirective.prototype.dropzone = function () { | ||
return this.instance; | ||
}; | ||
/** | ||
* @param {?=} cancel | ||
* @return {?} | ||
*/ | ||
DropzoneDirective.prototype.reset = /** | ||
* @param {?=} cancel | ||
* @return {?} | ||
*/ | ||
function (cancel) { | ||
DropzoneDirective.prototype.reset = function (cancel) { | ||
var _this = this; | ||
if (this.instance) { | ||
this.zone.runOutsideAngular((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
this.zone.runOutsideAngular(function () { | ||
_this.instance.removeAllFiles(cancel); | ||
})); | ||
}); | ||
} | ||
}; | ||
/** @nocollapse */ DropzoneDirective.ɵfac = function DropzoneDirective_Factory(t) { return new (t || DropzoneDirective)(core.ɵɵdirectiveInject(core.NgZone), core.ɵɵdirectiveInject(core.Renderer2), core.ɵɵdirectiveInject(core.ElementRef), core.ɵɵdirectiveInject(core.KeyValueDiffers), core.ɵɵdirectiveInject(core.PLATFORM_ID), core.ɵɵdirectiveInject(DROPZONE_CONFIG, 8)); }; | ||
/** @nocollapse */ DropzoneDirective.ɵdir = core.ɵɵdefineDirective({ type: DropzoneDirective, selectors: [["", "dropzone", ""]], inputs: { disabled: "disabled", config: ["dropzone", "config"] }, outputs: { DZ_INIT: "init", DZ_ERROR: "error", DZ_SUCCESS: "success", DZ_SENDING: "sending", DZ_CANCELED: "canceled", DZ_COMPLETE: "complete", DZ_PROCESSING: "processing", DZ_DROP: "drop", DZ_DRAGSTART: "dragStart", DZ_DRAGEND: "dragEnd", DZ_DRAGENTER: "dragEnter", DZ_DRAGOVER: "dragOver", DZ_DRAGLEAVE: "dragLeave", DZ_THUMBNAIL: "thumbnail", DZ_ADDEDFILE: "addedFile", DZ_REMOVEDFILE: "removedFile", DZ_UPLOADPROGRESS: "uploadProgress", DZ_MAXFILESREACHED: "maxFilesReached", DZ_MAXFILESEXCEEDED: "maxFilesExceeded", DZ_SUCCESSMULTIPLE: "successMultiple", DZ_SENDINGMULTIPLE: "sendingMultiple", DZ_CANCELEDMULTIPLE: "canceledMultiple", DZ_COMPLETEMULTIPLE: "completeMultiple", DZ_PROCESSINGMULTIPLE: "processingMultiple", DZ_RESET: "reset", DZ_QUEUECOMPLETE: "queueComplete", DZ_TOTALUPLOADPROGRESS: "totalUploadProgress" }, exportAs: ["ngxDropzone"], features: [core.ɵɵNgOnChangesFeature()] }); | ||
DropzoneDirective.ctorParameters = function () { return [ | ||
{ type: core.NgZone }, | ||
{ type: core.Renderer2 }, | ||
{ type: core.ElementRef }, | ||
{ type: core.KeyValueDiffers }, | ||
{ type: Object, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] }] }, | ||
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [DROPZONE_CONFIG,] }] } | ||
]; }; | ||
__decorate([ | ||
core.Input() | ||
], DropzoneDirective.prototype, "disabled", void 0); | ||
__decorate([ | ||
core.Input('dropzone') | ||
], DropzoneDirective.prototype, "config", void 0); | ||
__decorate([ | ||
core.Output('init') | ||
], DropzoneDirective.prototype, "DZ_INIT", void 0); | ||
__decorate([ | ||
core.Output('error') | ||
], DropzoneDirective.prototype, "DZ_ERROR", void 0); | ||
__decorate([ | ||
core.Output('success') | ||
], DropzoneDirective.prototype, "DZ_SUCCESS", void 0); | ||
__decorate([ | ||
core.Output('sending') | ||
], DropzoneDirective.prototype, "DZ_SENDING", void 0); | ||
__decorate([ | ||
core.Output('canceled') | ||
], DropzoneDirective.prototype, "DZ_CANCELED", void 0); | ||
__decorate([ | ||
core.Output('complete') | ||
], DropzoneDirective.prototype, "DZ_COMPLETE", void 0); | ||
__decorate([ | ||
core.Output('processing') | ||
], DropzoneDirective.prototype, "DZ_PROCESSING", void 0); | ||
__decorate([ | ||
core.Output('drop') | ||
], DropzoneDirective.prototype, "DZ_DROP", void 0); | ||
__decorate([ | ||
core.Output('dragStart') | ||
], DropzoneDirective.prototype, "DZ_DRAGSTART", void 0); | ||
__decorate([ | ||
core.Output('dragEnd') | ||
], DropzoneDirective.prototype, "DZ_DRAGEND", void 0); | ||
__decorate([ | ||
core.Output('dragEnter') | ||
], DropzoneDirective.prototype, "DZ_DRAGENTER", void 0); | ||
__decorate([ | ||
core.Output('dragOver') | ||
], DropzoneDirective.prototype, "DZ_DRAGOVER", void 0); | ||
__decorate([ | ||
core.Output('dragLeave') | ||
], DropzoneDirective.prototype, "DZ_DRAGLEAVE", void 0); | ||
__decorate([ | ||
core.Output('thumbnail') | ||
], DropzoneDirective.prototype, "DZ_THUMBNAIL", void 0); | ||
__decorate([ | ||
core.Output('addedFile') | ||
], DropzoneDirective.prototype, "DZ_ADDEDFILE", void 0); | ||
__decorate([ | ||
core.Output('removedFile') | ||
], DropzoneDirective.prototype, "DZ_REMOVEDFILE", void 0); | ||
__decorate([ | ||
core.Output('uploadProgress') | ||
], DropzoneDirective.prototype, "DZ_UPLOADPROGRESS", void 0); | ||
__decorate([ | ||
core.Output('maxFilesReached') | ||
], DropzoneDirective.prototype, "DZ_MAXFILESREACHED", void 0); | ||
__decorate([ | ||
core.Output('maxFilesExceeded') | ||
], DropzoneDirective.prototype, "DZ_MAXFILESEXCEEDED", void 0); | ||
__decorate([ | ||
core.Output('successMultiple') | ||
], DropzoneDirective.prototype, "DZ_SUCCESSMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('sendingMultiple') | ||
], DropzoneDirective.prototype, "DZ_SENDINGMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('canceledMultiple') | ||
], DropzoneDirective.prototype, "DZ_CANCELEDMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('completeMultiple') | ||
], DropzoneDirective.prototype, "DZ_COMPLETEMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('processingMultiple') | ||
], DropzoneDirective.prototype, "DZ_PROCESSINGMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('reset') | ||
], DropzoneDirective.prototype, "DZ_RESET", void 0); | ||
__decorate([ | ||
core.Output('queueComplete') | ||
], DropzoneDirective.prototype, "DZ_QUEUECOMPLETE", void 0); | ||
__decorate([ | ||
core.Output('totalUploadProgress') | ||
], DropzoneDirective.prototype, "DZ_TOTALUPLOADPROGRESS", void 0); | ||
DropzoneDirective = __decorate([ | ||
core.Directive({ | ||
selector: '[dropzone]', | ||
exportAs: 'ngxDropzone' | ||
}), | ||
__param(4, core.Inject(core.PLATFORM_ID)), | ||
__param(5, core.Optional()), __param(5, core.Inject(DROPZONE_CONFIG)) | ||
], DropzoneDirective); | ||
return DropzoneDirective; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* Generated from: lib/dropzone.component.ts | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
function DropzoneComponent_div_3_Template(rf, ctx) { if (rf & 1) { | ||
core.ɵɵelement(0, "div", 4); | ||
} if (rf & 2) { | ||
var ctx_r0 = core.ɵɵnextContext(); | ||
core.ɵɵstyleSanitizer(core.ɵɵdefaultStyleSanitizer); | ||
core.ɵɵstyleProp("background-image", ctx_r0.getPlaceholder()); | ||
} } | ||
var _c0 = ["*"]; | ||
var DropzoneComponent = /** @class */ (function () { | ||
@@ -383,9 +554,3 @@ function DropzoneComponent(platformId) { | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
DropzoneComponent.prototype.ngOnInit = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
DropzoneComponent.prototype.ngOnInit = function () { | ||
var _this = this; | ||
@@ -395,75 +560,143 @@ if (!common.isPlatformBrowser(this.platformId)) { | ||
} | ||
window.setTimeout((/** | ||
* @return {?} | ||
*/ | ||
function () { | ||
DropzoneEvents.forEach((/** | ||
* @param {?} eventName | ||
* @return {?} | ||
*/ | ||
function (eventName) { | ||
window.setTimeout(function () { | ||
DropzoneEvents.forEach(function (eventName) { | ||
if (_this.directiveRef) { | ||
/** @type {?} */ | ||
var output = "DZ_" + eventName.toUpperCase(); | ||
/** @type {?} */ | ||
var directiveOutput = (/** @type {?} */ (output)); | ||
/** @type {?} */ | ||
var componentOutput = (/** @type {?} */ (output)); | ||
_this.directiveRef[directiveOutput] = (/** @type {?} */ (_this[componentOutput])); | ||
var directiveOutput = output; | ||
var componentOutput = output; | ||
_this.directiveRef[directiveOutput] = _this[componentOutput]; | ||
} | ||
})); | ||
}), 0); | ||
}); | ||
}, 0); | ||
}; | ||
/** | ||
* @return {?} | ||
*/ | ||
DropzoneComponent.prototype.getPlaceholder = /** | ||
* @return {?} | ||
*/ | ||
function () { | ||
DropzoneComponent.prototype.getPlaceholder = function () { | ||
return 'url(' + encodeURI(this.placeholder) + ')'; | ||
}; | ||
/** @nocollapse */ DropzoneComponent.ɵfac = function DropzoneComponent_Factory(t) { return new (t || DropzoneComponent)(core.ɵɵdirectiveInject(core.PLATFORM_ID)); }; | ||
/** @nocollapse */ DropzoneComponent.ɵcmp = core.ɵɵdefineComponent({ type: DropzoneComponent, selectors: [["dropzone"]], viewQuery: function DropzoneComponent_Query(rf, ctx) { if (rf & 1) { | ||
core.ɵɵstaticViewQuery(DropzoneDirective, true); | ||
} if (rf & 2) { | ||
var _t; | ||
core.ɵɵqueryRefresh(_t = core.ɵɵloadQuery()) && (ctx.directiveRef = _t.first); | ||
} }, inputs: { disabled: "disabled", config: "config", message: "message", placeholder: "placeholder", useDropzoneClass: "useDropzoneClass" }, outputs: { DZ_INIT: "init", DZ_ERROR: "error", DZ_SUCCESS: "success", DZ_SENDING: "sending", DZ_CANCELED: "canceled", DZ_COMPLETE: "complete", DZ_PROCESSING: "processing", DZ_DROP: "drop", DZ_DRAGSTART: "dragStart", DZ_DRAGEND: "dragEnd", DZ_DRAGENTER: "dragEnter", DZ_DRAGOVER: "dragOver", DZ_DRAGLEAVE: "dragLeave", DZ_THUMBNAIL: "thumbnail", DZ_ADDEDFILE: "addedFile", DZ_REMOVEDFILE: "removedFile", DZ_UPLOADPROGRESS: "uploadProgress", DZ_MAXFILESREACHED: "maxFilesReached", DZ_MAXFILESEXCEEDED: "maxFilesExceeded", DZ_SUCCESSMULTIPLE: "successMultiple", DZ_SENDINGMULTIPLE: "sendingMultiple", DZ_CANCELEDMULTIPLE: "canceledMultiple", DZ_COMPLETEMULTIPLE: "completeMultiple", DZ_PROCESSINGMULTIPLE: "processingMultiple", DZ_RESET: "reset", DZ_QUEUECOMPLETE: "queueComplete", DZ_TOTALUPLOADPROGRESS: "totalUploadProgress" }, exportAs: ["ngxDropzone"], ngContentSelectors: _c0, decls: 5, vars: 7, consts: [[1, "dz-wrapper", 3, "dropzone", "disabled", "init"], [1, "dz-message"], [1, "dz-text", 3, "innerHTML"], ["class", "dz-image", 3, "background-image", 4, "ngIf"], [1, "dz-image"]], template: function DropzoneComponent_Template(rf, ctx) { if (rf & 1) { | ||
core.ɵɵprojectionDef(); | ||
core.ɵɵelementStart(0, "div", 0); | ||
core.ɵɵlistener("init", function DropzoneComponent_Template_div_init_0_listener($event) { return ctx.DZ_INIT.emit($event); }); | ||
core.ɵɵelementStart(1, "div", 1); | ||
core.ɵɵelement(2, "div", 2); | ||
core.ɵɵtemplate(3, DropzoneComponent_div_3_Template, 1, 1, "div", 3); | ||
core.ɵɵelementEnd(); | ||
core.ɵɵprojection(4); | ||
core.ɵɵelementEnd(); | ||
} if (rf & 2) { | ||
core.ɵɵclassProp("dropzone", ctx.useDropzoneClass); | ||
core.ɵɵproperty("dropzone", ctx.config)("disabled", ctx.disabled); | ||
core.ɵɵadvance(1); | ||
core.ɵɵclassProp("disabled", ctx.disabled)("dz-placeholder", ctx.placeholder); | ||
core.ɵɵadvance(1); | ||
core.ɵɵproperty("innerHTML", (ctx.config == null ? null : ctx.config.dictDefaultMessage) || ctx.message, core.ɵɵsanitizeHtml); | ||
core.ɵɵadvance(1); | ||
core.ɵɵproperty("ngIf", ctx.placeholder); | ||
} }, directives: [DropzoneDirective, common.NgIf], styles: ["dropzone {\n display: block;\n width: 100%;\n height: auto;\n}\n\ndropzone[fxflex] {\n display: flex;\n flex-direction: inherit;\n min-width: 0;\n min-height: 0;\n\n -webkit-box-direction: inherit;\n -webkit-box-orient: inherit;\n}\n\ndropzone[fxflex] > .dropzone.dz-wrapper {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n\n -webkit-box-flex: 1;\n}\n\ndropzone[fxlayout] {\n align-items: inherit;\n align-content: inherit;\n justify-content: inherit;\n\n -webkit-box-align: inherit;\n -webkit-box-pack: inherit;\n}\n\ndropzone[fxlayout] > .dropzone.dz-wrapper.dz-single {\n display: flex;\n flex-direction: column;\n align-items: center;\n align-content: center;\n justify-content: center;\n\n -webkit-box-align: center;\n -webkit-box-direction: column;\n -webkit-box-orient: column;\n -webkit-box-pack: center;\n}\n\ndropzone[fxlayout] > .dropzone.dz-wrapper.dz-multiple {\n display: flex;\n flex-flow: row wrap;\n align-items: start;\n align-content: start;\n justify-content: space-between;\n\n -webkit-box-align: start;\n -webkit-box-direction: row;\n -webkit-box-orient: row;\n -webkit-box-pack: start;\n}\n\ndropzone > .dropzone.dz-wrapper {\n position: relative;\n\n overflow: auto;\n width: 100%;\n min-height: 0;\n max-height: 100%;\n padding: 0;\n border: none;\n\n color: #666;\n background: transparent;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message {\n position: relative;\n\n display: inline-block;\n overflow: auto;\n width: calc(100% - 16px);\n min-width: calc(100% - 16px);\n min-height: 40px;\n max-width: calc(100% - 16px);\n max-height: 100%;\n margin: 8px;\n border: 2px dashed #aaa;\n\n background-color: #eee;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message .dz-text {\n position: absolute;\n top: 50%;\n\n width: 100%;\n padding: 8px 16px;\n\n text-align: center;\n\n transform: translateY(-50%);\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message .dz-image {\n width: 100%;\n height: 100%;\n\n background-size: contain;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.disabled {\n cursor: not-allowed;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.disabled .dz-text {\n opacity: 0.5;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder {\n border-color: rgba(#aaa, 0);\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder .dz-text {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 10%;\n left: 10%;\n\n opacity: 0;\n\n font-weight: bold;\n background-color: rgba(#fff, 0.5);\n\n transform: translateY(-50%);\n transition:\n filter 250ms ease-in-out,\n opacity 250ms ease-in-out,\n border-color 250ms ease-in-out;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) {\n border-color: #aaa;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-text {\n opacity: 1;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-image {\n -webkit-filter: blur(8px);\n\n filter: blur(8px);\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview {\n margin: 8px;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-details {\n padding: 24px;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-progress {\n width: 80%;\n margin-left: -40%;\n border: 1px solid #aaa;\n border-radius: 4px;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-progress .dz-upload {\n background-color: #666;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-filename span {\n display: block;\n overflow: hidden;\n width: 100%;\n max-width: 100%;\n\n text-overflow: ellipsis;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-filename span:hover {\n overflow: visible;\n\n white-space: normal;\n word-wrap: break-word;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-message {\n width: 100%;\n height: 100%;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single.dz-started .dz-message {\n display: none;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-preview {\n width: calc(100% - 16px);\n height: 100%;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-preview .dz-image {\n width: 100%;\n height: 100%;\n border-radius: 0;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-preview .dz-image img {\n display: block;\n width: 100%;\n height: auto;\n margin: 0;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-error-message {\n top: 50%;\n left: 50%;\n\n transform: translateX(-50%) translateY(100%);\n}\n\ndropzone > .dropzone.dz-wrapper.dz-multiple.dz-started .dz-message {\n display: inline-block;\n}\n", "@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-moz-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-moz-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,0.3);background:white;padding:20px 20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:0.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(to bottom, #eee, #ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:white}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;-ms-transition:opacity 0.2s linear;-o-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,0.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,0.8);background-color:rgba(255,255,255,0.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,0.4);padding:0 0.4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05, 1.05);-moz-transform:scale(1.05, 1.05);-ms-transform:scale(1.05, 1.05);-o-transform:scale(1.05, 1.05);transform:scale(1.05, 1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity 0.4s ease-in;-moz-transition:opacity 0.4s ease-in;-ms-transition:opacity 0.4s ease-in;-o-transition:opacity 0.4s ease-in;transition:opacity 0.4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;-moz-animation:pulse 6s ease infinite;-ms-animation:pulse 6s ease infinite;-o-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:rgba(255,255,255,0.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:linear-gradient(to bottom, #666, #444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width 300ms ease-in-out;-moz-transition:width 300ms ease-in-out;-ms-transition:width 300ms ease-in-out;-o-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity 0.3s ease;-moz-transition:opacity 0.3s ease;-ms-transition:opacity 0.3s ease;-o-transition:opacity 0.3s ease;transition:opacity 0.3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:linear-gradient(to bottom, #be2626, #a92222);padding:0.5em 1.2em;color:white}.dropzone .dz-preview .dz-error-message:after{content:'';position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626}\n"], encapsulation: 2 }); | ||
DropzoneComponent.ctorParameters = function () { return [ | ||
{ type: Object, decorators: [{ type: core.Inject, args: [core.PLATFORM_ID,] }] } | ||
]; }; | ||
__decorate([ | ||
core.Input() | ||
], DropzoneComponent.prototype, "disabled", void 0); | ||
__decorate([ | ||
core.Input() | ||
], DropzoneComponent.prototype, "config", void 0); | ||
__decorate([ | ||
core.Input() | ||
], DropzoneComponent.prototype, "message", void 0); | ||
__decorate([ | ||
core.Input() | ||
], DropzoneComponent.prototype, "placeholder", void 0); | ||
__decorate([ | ||
core.Input() | ||
], DropzoneComponent.prototype, "useDropzoneClass", void 0); | ||
__decorate([ | ||
core.Output('init') | ||
], DropzoneComponent.prototype, "DZ_INIT", void 0); | ||
__decorate([ | ||
core.Output('error') | ||
], DropzoneComponent.prototype, "DZ_ERROR", void 0); | ||
__decorate([ | ||
core.Output('success') | ||
], DropzoneComponent.prototype, "DZ_SUCCESS", void 0); | ||
__decorate([ | ||
core.Output('sending') | ||
], DropzoneComponent.prototype, "DZ_SENDING", void 0); | ||
__decorate([ | ||
core.Output('canceled') | ||
], DropzoneComponent.prototype, "DZ_CANCELED", void 0); | ||
__decorate([ | ||
core.Output('complete') | ||
], DropzoneComponent.prototype, "DZ_COMPLETE", void 0); | ||
__decorate([ | ||
core.Output('processing') | ||
], DropzoneComponent.prototype, "DZ_PROCESSING", void 0); | ||
__decorate([ | ||
core.Output('drop') | ||
], DropzoneComponent.prototype, "DZ_DROP", void 0); | ||
__decorate([ | ||
core.Output('dragStart') | ||
], DropzoneComponent.prototype, "DZ_DRAGSTART", void 0); | ||
__decorate([ | ||
core.Output('dragEnd') | ||
], DropzoneComponent.prototype, "DZ_DRAGEND", void 0); | ||
__decorate([ | ||
core.Output('dragEnter') | ||
], DropzoneComponent.prototype, "DZ_DRAGENTER", void 0); | ||
__decorate([ | ||
core.Output('dragOver') | ||
], DropzoneComponent.prototype, "DZ_DRAGOVER", void 0); | ||
__decorate([ | ||
core.Output('dragLeave') | ||
], DropzoneComponent.prototype, "DZ_DRAGLEAVE", void 0); | ||
__decorate([ | ||
core.Output('thumbnail') | ||
], DropzoneComponent.prototype, "DZ_THUMBNAIL", void 0); | ||
__decorate([ | ||
core.Output('addedFile') | ||
], DropzoneComponent.prototype, "DZ_ADDEDFILE", void 0); | ||
__decorate([ | ||
core.Output('removedFile') | ||
], DropzoneComponent.prototype, "DZ_REMOVEDFILE", void 0); | ||
__decorate([ | ||
core.Output('uploadProgress') | ||
], DropzoneComponent.prototype, "DZ_UPLOADPROGRESS", void 0); | ||
__decorate([ | ||
core.Output('maxFilesReached') | ||
], DropzoneComponent.prototype, "DZ_MAXFILESREACHED", void 0); | ||
__decorate([ | ||
core.Output('maxFilesExceeded') | ||
], DropzoneComponent.prototype, "DZ_MAXFILESEXCEEDED", void 0); | ||
__decorate([ | ||
core.Output('successMultiple') | ||
], DropzoneComponent.prototype, "DZ_SUCCESSMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('sendingMultiple') | ||
], DropzoneComponent.prototype, "DZ_SENDINGMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('canceledMultiple') | ||
], DropzoneComponent.prototype, "DZ_CANCELEDMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('completeMultiple') | ||
], DropzoneComponent.prototype, "DZ_COMPLETEMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('processingMultiple') | ||
], DropzoneComponent.prototype, "DZ_PROCESSINGMULTIPLE", void 0); | ||
__decorate([ | ||
core.Output('reset') | ||
], DropzoneComponent.prototype, "DZ_RESET", void 0); | ||
__decorate([ | ||
core.Output('queueComplete') | ||
], DropzoneComponent.prototype, "DZ_QUEUECOMPLETE", void 0); | ||
__decorate([ | ||
core.Output('totalUploadProgress') | ||
], DropzoneComponent.prototype, "DZ_TOTALUPLOADPROGRESS", void 0); | ||
__decorate([ | ||
core.ViewChild(DropzoneDirective, { static: true }) | ||
], DropzoneComponent.prototype, "directiveRef", void 0); | ||
DropzoneComponent = __decorate([ | ||
core.Component({ | ||
selector: 'dropzone', | ||
exportAs: 'ngxDropzone', | ||
template: "<div class=\"dz-wrapper\" [class.dropzone]=\"useDropzoneClass\" [dropzone]=\"config\" [disabled]=\"disabled\" (init)=\"DZ_INIT.emit($event)\">\n <div class=\"dz-message\" [class.disabled]=\"disabled\" [class.dz-placeholder]=\"placeholder\">\n <div class=\"dz-text\" [innerHTML]=\"config?.dictDefaultMessage || message\"></div>\n\n <div *ngIf=\"placeholder\" class=\"dz-image\" [style.background-image]=\"getPlaceholder()\"></div>\n </div>\n\n <ng-content></ng-content>\n</div>\n", | ||
encapsulation: core.ViewEncapsulation.None, | ||
styles: ["dropzone{display:block;width:100%;height:auto}dropzone[fxflex]{display:-webkit-box;display:flex;flex-direction:inherit;min-width:0;min-height:0;-webkit-box-direction:inherit;-webkit-box-orient:inherit}dropzone[fxflex]>.dropzone.dz-wrapper{flex:1 1 auto;min-width:0;min-height:0;-webkit-box-flex:1}dropzone[fxlayout]{align-items:inherit;align-content:inherit;justify-content:inherit;-webkit-box-align:inherit;-webkit-box-pack:inherit}dropzone[fxlayout]>.dropzone.dz-wrapper.dz-single{display:-webkit-box;display:flex;flex-direction:column;align-items:center;align-content:center;justify-content:center;-webkit-box-align:center;-webkit-box-direction:column;-webkit-box-orient:column;-webkit-box-pack:center}dropzone[fxlayout]>.dropzone.dz-wrapper.dz-multiple{display:-webkit-box;display:flex;flex-flow:row wrap;-webkit-box-align:start;align-items:flex-start;align-content:flex-start;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:flex-start;-webkit-box-direction:row;-webkit-box-orient:row;-webkit-box-pack:flex-start}dropzone>.dropzone.dz-wrapper{position:relative;overflow:auto;width:100%;min-height:0;max-height:100%;padding:0;border:none;color:#666;background:0 0}dropzone>.dropzone.dz-wrapper .dz-message{position:relative;display:inline-block;overflow:auto;width:calc(100% - 16px);min-width:calc(100% - 16px);min-height:40px;max-width:calc(100% - 16px);max-height:100%;margin:8px;border:2px dashed #aaa;background-color:#eee}dropzone>.dropzone.dz-wrapper .dz-message .dz-text{position:absolute;top:50%;width:100%;padding:8px 16px;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%)}dropzone>.dropzone.dz-wrapper .dz-message .dz-image{width:100%;height:100%;background-size:contain;background-repeat:no-repeat;background-position:50% 50%}dropzone>.dropzone.dz-wrapper .dz-message.disabled{cursor:not-allowed}dropzone>.dropzone.dz-wrapper .dz-message.disabled .dz-text{opacity:.5}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder{border-color:rgba(#aaa,0)}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder .dz-text{position:absolute;z-index:1;top:0;right:10%;left:10%;opacity:0;font-weight:700;background-color:rgba(#fff,.5);-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:opacity 250ms ease-in-out,border-color 250ms ease-in-out,-webkit-filter 250ms ease-in-out;transition:filter 250ms ease-in-out,opacity 250ms ease-in-out,border-color 250ms ease-in-out,-webkit-filter 250ms ease-in-out}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled){border-color:#aaa}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-text{opacity:1}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-image{-webkit-filter:blur(8px);filter:blur(8px)}dropzone>.dropzone.dz-wrapper .dz-preview{margin:8px}dropzone>.dropzone.dz-wrapper .dz-preview .dz-details{padding:24px}dropzone>.dropzone.dz-wrapper .dz-preview .dz-progress{width:80%;margin-left:-40%;border:1px solid #aaa;border-radius:4px}dropzone>.dropzone.dz-wrapper .dz-preview .dz-progress .dz-upload{background-color:#666}dropzone>.dropzone.dz-wrapper .dz-preview .dz-filename span{display:block;overflow:hidden;width:100%;max-width:100%;text-overflow:ellipsis}dropzone>.dropzone.dz-wrapper .dz-preview .dz-filename span:hover{overflow:visible;white-space:normal;word-wrap:break-word}dropzone>.dropzone.dz-wrapper.dz-single .dz-message{width:100%;height:100%}dropzone>.dropzone.dz-wrapper.dz-single.dz-started .dz-message{display:none}dropzone>.dropzone.dz-wrapper.dz-single .dz-preview{width:calc(100% - 16px);height:100%}dropzone>.dropzone.dz-wrapper.dz-single .dz-preview .dz-image{width:100%;height:100%;border-radius:0}dropzone>.dropzone.dz-wrapper.dz-single .dz-preview .dz-image img{display:block;width:100%;height:auto;margin:0}dropzone>.dropzone.dz-wrapper.dz-single .dz-error-message{top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(100%);transform:translateX(-50%) translateY(100%)}dropzone>.dropzone.dz-wrapper.dz-multiple.dz-started .dz-message{display:inline-block}", "@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pulse{0%,20%{-webkit-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);transform:scale(1.1)}}@keyframes pulse{0%,20%{-webkit-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);transform:scale(1.1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,.3);background:#fff;padding:20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));background:linear-gradient(to bottom,#eee,#ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:#fff}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,.8);background-color:rgba(255,255,255,.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,.4);padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05,1.05);transform:scale(1.05,1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:3s cubic-bezier(.77,0,.175,1) passing-through;animation:3s cubic-bezier(.77,0,.175,1) passing-through}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:3s cubic-bezier(.77,0,.175,1) slide-in;animation:3s cubic-bezier(.77,0,.175,1) slide-in}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-error-mark svg,.dropzone .dz-preview .dz-success-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:.2s linear;transition:.2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:6s infinite pulse;animation:6s infinite pulse}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:rgba(255,255,255,.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:-webkit-gradient(linear,left top,left bottom,from(#666),to(#444));background:linear-gradient(to bottom,#666,#444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width .3s ease-in-out;transition:width .3s ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:none;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:-webkit-gradient(linear,left top,left bottom,from(#be2626),to(#a92222));background:linear-gradient(to bottom,#be2626,#a92222);padding:.5em 1.2em;color:#fff}.dropzone .dz-preview .dz-error-message:after{content:'';position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626}"] | ||
}), | ||
__param(0, core.Inject(core.PLATFORM_ID)) | ||
], DropzoneComponent); | ||
return DropzoneComponent; | ||
}()); | ||
/** | ||
* @fileoverview added by tsickle | ||
* Generated from: lib/dropzone.module.ts | ||
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc | ||
*/ | ||
var DropzoneModule = /** @class */ (function () { | ||
function DropzoneModule() { | ||
} | ||
/** @nocollapse */ DropzoneModule.ɵmod = core.ɵɵdefineNgModule({ type: DropzoneModule }); | ||
/** @nocollapse */ DropzoneModule.ɵinj = core.ɵɵdefineInjector({ factory: function DropzoneModule_Factory(t) { return new (t || DropzoneModule)(); }, imports: [[common.CommonModule], | ||
common.CommonModule] }); | ||
DropzoneModule = __decorate([ | ||
core.NgModule({ | ||
imports: [common.CommonModule], | ||
declarations: [DropzoneComponent, DropzoneDirective], | ||
exports: [common.CommonModule, DropzoneComponent, DropzoneDirective] | ||
}) | ||
], DropzoneModule); | ||
return DropzoneModule; | ||
}()); | ||
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && core.ɵɵsetNgModuleScope(DropzoneModule, { declarations: [DropzoneComponent, DropzoneDirective], imports: [common.CommonModule], exports: [common.CommonModule, DropzoneComponent, DropzoneDirective] }); })(); | ||
@@ -470,0 +703,0 @@ exports.DROPZONE_CONFIG = DROPZONE_CONFIG; |
@@ -1,1 +0,2 @@ | ||
(function(global,factory){typeof exports==="object"&&typeof module!=="undefined"?factory(exports,require("@angular/core"),require("@angular/common"),require("dropzone")):typeof define==="function"&&define.amd?define(["exports","@angular/core","@angular/common","dropzone"],factory):(global=global||self,factory((global.zef=global.zef||{},global.zef.ngxDropzoneWrapper={}),global.ng.core,global.ng.common,global.Dropzone))})(this,(function(exports,core,common,Dropzone){"use strict";Dropzone=Dropzone&&Dropzone.hasOwnProperty("default")?Dropzone["default"]:Dropzone;var DROPZONE_CONFIG=new core.InjectionToken("DROPZONE_CONFIG");var DropzoneEvents=["error","success","sending","canceled","complete","processing","drop","dragStart","dragEnd","dragEnter","dragOver","dragLeave","thumbnail","addedFile","removedFile","uploadProgress","maxFilesReached","maxFilesExceeded","successMultiple","sendingMultiple","canceledMultiple","completeMultiple","processingMultiple","reset","queueComplete","totalUploadProgress"];var DropzoneConfig=function(){function DropzoneConfig(config){if(config===void 0){config={}}this.assign(config)}DropzoneConfig.prototype.assign=function(config,target){if(config===void 0){config={}}target=target||this;for(var key in config){if(config[key]!=null&&!Array.isArray(config[key])&&typeof config[key]==="object"&&!(config[key]instanceof HTMLElement)){target[key]={};this.assign(config[key],target[key])}else{target[key]=config[key]}}};return DropzoneConfig}();var DropzoneDirective=function(){function DropzoneDirective(zone,renderer,elementRef,differs,platformId,defaults){this.zone=zone;this.renderer=renderer;this.elementRef=elementRef;this.differs=differs;this.platformId=platformId;this.defaults=defaults;this.configDiff=null;this.disabled=false;this.DZ_INIT=new core.EventEmitter;this.DZ_ERROR=new core.EventEmitter;this.DZ_SUCCESS=new core.EventEmitter;this.DZ_SENDING=new core.EventEmitter;this.DZ_CANCELED=new core.EventEmitter;this.DZ_COMPLETE=new core.EventEmitter;this.DZ_PROCESSING=new core.EventEmitter;this.DZ_DROP=new core.EventEmitter;this.DZ_DRAGSTART=new core.EventEmitter;this.DZ_DRAGEND=new core.EventEmitter;this.DZ_DRAGENTER=new core.EventEmitter;this.DZ_DRAGOVER=new core.EventEmitter;this.DZ_DRAGLEAVE=new core.EventEmitter;this.DZ_THUMBNAIL=new core.EventEmitter;this.DZ_ADDEDFILE=new core.EventEmitter;this.DZ_REMOVEDFILE=new core.EventEmitter;this.DZ_UPLOADPROGRESS=new core.EventEmitter;this.DZ_MAXFILESREACHED=new core.EventEmitter;this.DZ_MAXFILESEXCEEDED=new core.EventEmitter;this.DZ_SUCCESSMULTIPLE=new core.EventEmitter;this.DZ_SENDINGMULTIPLE=new core.EventEmitter;this.DZ_CANCELEDMULTIPLE=new core.EventEmitter;this.DZ_COMPLETEMULTIPLE=new core.EventEmitter;this.DZ_PROCESSINGMULTIPLE=new core.EventEmitter;this.DZ_RESET=new core.EventEmitter;this.DZ_QUEUECOMPLETE=new core.EventEmitter;this.DZ_TOTALUPLOADPROGRESS=new core.EventEmitter;var dz=Dropzone;dz.autoDiscover=false}DropzoneDirective.prototype.ngOnInit=function(){var _this=this;if(!common.isPlatformBrowser(this.platformId)){return}var params=new DropzoneConfig(this.defaults);params.assign(this.config);this.renderer.addClass(this.elementRef.nativeElement,params.maxFiles===1?"dz-single":"dz-multiple");this.renderer.removeClass(this.elementRef.nativeElement,params.maxFiles===1?"dz-multiple":"dz-single");this.zone.runOutsideAngular((function(){_this.instance=new Dropzone(_this.elementRef.nativeElement,params)}));if(this.disabled){this.instance.disable()}if(this.DZ_INIT.observers.length){this.zone.run((function(){_this.DZ_INIT.emit(_this.instance)}))}this.instance.on("success",(function(){if(params.autoReset!=null){setTimeout((function(){return _this.reset()}),params.autoReset)}}));this.instance.on("error",(function(){if(params.errorReset!=null){setTimeout((function(){return _this.reset()}),params.errorReset)}}));this.instance.on("canceled",(function(){if(params.cancelReset!=null){setTimeout((function(){return _this.reset()}),params.cancelReset)}}));DropzoneEvents.forEach((function(eventName){_this.instance.on(eventName.toLowerCase(),(function(){var args=[];for(var _i=0;_i<arguments.length;_i++){args[_i]=arguments[_i]}args=args.length===1?args[0]:args;var output="DZ_"+eventName.toUpperCase();var emitter=_this[output];if(emitter.observers.length>0){_this.zone.run((function(){emitter.emit(args)}))}}))}));if(!this.configDiff){this.configDiff=this.differs.find(this.config||{}).create();this.configDiff.diff(this.config||{})}};DropzoneDirective.prototype.ngOnDestroy=function(){var _this=this;if(this.instance){this.zone.runOutsideAngular((function(){_this.instance.destroy()}));this.instance=null}};DropzoneDirective.prototype.ngDoCheck=function(){if(!this.disabled&&this.configDiff){var changes=this.configDiff.diff(this.config||{});if(changes&&this.instance){this.ngOnDestroy();this.ngOnInit()}}};DropzoneDirective.prototype.ngOnChanges=function(changes){var _this=this;if(this.instance&&changes["disabled"]){if(changes["disabled"].currentValue!==changes["disabled"].previousValue){if(changes["disabled"].currentValue===false){this.zone.runOutsideAngular((function(){_this.instance.enable()}))}else if(changes["disabled"].currentValue===true){this.zone.runOutsideAngular((function(){_this.instance.disable()}))}}}};DropzoneDirective.prototype.dropzone=function(){return this.instance};DropzoneDirective.prototype.reset=function(cancel){var _this=this;if(this.instance){this.zone.runOutsideAngular((function(){_this.instance.removeAllFiles(cancel)}))}};DropzoneDirective.ɵfac=function DropzoneDirective_Factory(t){return new(t||DropzoneDirective)(core.ɵɵdirectiveInject(core.NgZone),core.ɵɵdirectiveInject(core.Renderer2),core.ɵɵdirectiveInject(core.ElementRef),core.ɵɵdirectiveInject(core.KeyValueDiffers),core.ɵɵdirectiveInject(core.PLATFORM_ID),core.ɵɵdirectiveInject(DROPZONE_CONFIG,8))};DropzoneDirective.ɵdir=core.ɵɵdefineDirective({type:DropzoneDirective,selectors:[["","dropzone",""]],inputs:{disabled:"disabled",config:["dropzone","config"]},outputs:{DZ_INIT:"init",DZ_ERROR:"error",DZ_SUCCESS:"success",DZ_SENDING:"sending",DZ_CANCELED:"canceled",DZ_COMPLETE:"complete",DZ_PROCESSING:"processing",DZ_DROP:"drop",DZ_DRAGSTART:"dragStart",DZ_DRAGEND:"dragEnd",DZ_DRAGENTER:"dragEnter",DZ_DRAGOVER:"dragOver",DZ_DRAGLEAVE:"dragLeave",DZ_THUMBNAIL:"thumbnail",DZ_ADDEDFILE:"addedFile",DZ_REMOVEDFILE:"removedFile",DZ_UPLOADPROGRESS:"uploadProgress",DZ_MAXFILESREACHED:"maxFilesReached",DZ_MAXFILESEXCEEDED:"maxFilesExceeded",DZ_SUCCESSMULTIPLE:"successMultiple",DZ_SENDINGMULTIPLE:"sendingMultiple",DZ_CANCELEDMULTIPLE:"canceledMultiple",DZ_COMPLETEMULTIPLE:"completeMultiple",DZ_PROCESSINGMULTIPLE:"processingMultiple",DZ_RESET:"reset",DZ_QUEUECOMPLETE:"queueComplete",DZ_TOTALUPLOADPROGRESS:"totalUploadProgress"},exportAs:["ngxDropzone"],features:[core.ɵɵNgOnChangesFeature()]});return DropzoneDirective}();function DropzoneComponent_div_3_Template(rf,ctx){if(rf&1){core.ɵɵelement(0,"div",4)}if(rf&2){var ctx_r0=core.ɵɵnextContext();core.ɵɵstyleSanitizer(core.ɵɵdefaultStyleSanitizer);core.ɵɵstyleProp("background-image",ctx_r0.getPlaceholder())}}var _c0=["*"];var DropzoneComponent=function(){function DropzoneComponent(platformId){this.platformId=platformId;this.disabled=false;this.message="Click or drag files to upload";this.placeholder="";this.useDropzoneClass=true;this.DZ_INIT=new core.EventEmitter;this.DZ_ERROR=new core.EventEmitter;this.DZ_SUCCESS=new core.EventEmitter;this.DZ_SENDING=new core.EventEmitter;this.DZ_CANCELED=new core.EventEmitter;this.DZ_COMPLETE=new core.EventEmitter;this.DZ_PROCESSING=new core.EventEmitter;this.DZ_DROP=new core.EventEmitter;this.DZ_DRAGSTART=new core.EventEmitter;this.DZ_DRAGEND=new core.EventEmitter;this.DZ_DRAGENTER=new core.EventEmitter;this.DZ_DRAGOVER=new core.EventEmitter;this.DZ_DRAGLEAVE=new core.EventEmitter;this.DZ_THUMBNAIL=new core.EventEmitter;this.DZ_ADDEDFILE=new core.EventEmitter;this.DZ_REMOVEDFILE=new core.EventEmitter;this.DZ_UPLOADPROGRESS=new core.EventEmitter;this.DZ_MAXFILESREACHED=new core.EventEmitter;this.DZ_MAXFILESEXCEEDED=new core.EventEmitter;this.DZ_SUCCESSMULTIPLE=new core.EventEmitter;this.DZ_SENDINGMULTIPLE=new core.EventEmitter;this.DZ_CANCELEDMULTIPLE=new core.EventEmitter;this.DZ_COMPLETEMULTIPLE=new core.EventEmitter;this.DZ_PROCESSINGMULTIPLE=new core.EventEmitter;this.DZ_RESET=new core.EventEmitter;this.DZ_QUEUECOMPLETE=new core.EventEmitter;this.DZ_TOTALUPLOADPROGRESS=new core.EventEmitter}DropzoneComponent.prototype.ngOnInit=function(){var _this=this;if(!common.isPlatformBrowser(this.platformId)){return}window.setTimeout((function(){DropzoneEvents.forEach((function(eventName){if(_this.directiveRef){var output="DZ_"+eventName.toUpperCase();var directiveOutput=output;var componentOutput=output;_this.directiveRef[directiveOutput]=_this[componentOutput]}}))}),0)};DropzoneComponent.prototype.getPlaceholder=function(){return"url("+encodeURI(this.placeholder)+")"};DropzoneComponent.ɵfac=function DropzoneComponent_Factory(t){return new(t||DropzoneComponent)(core.ɵɵdirectiveInject(core.PLATFORM_ID))};DropzoneComponent.ɵcmp=core.ɵɵdefineComponent({type:DropzoneComponent,selectors:[["dropzone"]],viewQuery:function DropzoneComponent_Query(rf,ctx){if(rf&1){core.ɵɵstaticViewQuery(DropzoneDirective,true)}if(rf&2){var _t;core.ɵɵqueryRefresh(_t=core.ɵɵloadQuery())&&(ctx.directiveRef=_t.first)}},inputs:{disabled:"disabled",config:"config",message:"message",placeholder:"placeholder",useDropzoneClass:"useDropzoneClass"},outputs:{DZ_INIT:"init",DZ_ERROR:"error",DZ_SUCCESS:"success",DZ_SENDING:"sending",DZ_CANCELED:"canceled",DZ_COMPLETE:"complete",DZ_PROCESSING:"processing",DZ_DROP:"drop",DZ_DRAGSTART:"dragStart",DZ_DRAGEND:"dragEnd",DZ_DRAGENTER:"dragEnter",DZ_DRAGOVER:"dragOver",DZ_DRAGLEAVE:"dragLeave",DZ_THUMBNAIL:"thumbnail",DZ_ADDEDFILE:"addedFile",DZ_REMOVEDFILE:"removedFile",DZ_UPLOADPROGRESS:"uploadProgress",DZ_MAXFILESREACHED:"maxFilesReached",DZ_MAXFILESEXCEEDED:"maxFilesExceeded",DZ_SUCCESSMULTIPLE:"successMultiple",DZ_SENDINGMULTIPLE:"sendingMultiple",DZ_CANCELEDMULTIPLE:"canceledMultiple",DZ_COMPLETEMULTIPLE:"completeMultiple",DZ_PROCESSINGMULTIPLE:"processingMultiple",DZ_RESET:"reset",DZ_QUEUECOMPLETE:"queueComplete",DZ_TOTALUPLOADPROGRESS:"totalUploadProgress"},exportAs:["ngxDropzone"],ngContentSelectors:_c0,decls:5,vars:7,consts:[[1,"dz-wrapper",3,"dropzone","disabled","init"],[1,"dz-message"],[1,"dz-text",3,"innerHTML"],["class","dz-image",3,"background-image",4,"ngIf"],[1,"dz-image"]],template:function DropzoneComponent_Template(rf,ctx){if(rf&1){core.ɵɵprojectionDef();core.ɵɵelementStart(0,"div",0);core.ɵɵlistener("init",(function DropzoneComponent_Template_div_init_0_listener($event){return ctx.DZ_INIT.emit($event)}));core.ɵɵelementStart(1,"div",1);core.ɵɵelement(2,"div",2);core.ɵɵtemplate(3,DropzoneComponent_div_3_Template,1,1,"div",3);core.ɵɵelementEnd();core.ɵɵprojection(4);core.ɵɵelementEnd()}if(rf&2){core.ɵɵclassProp("dropzone",ctx.useDropzoneClass);core.ɵɵproperty("dropzone",ctx.config)("disabled",ctx.disabled);core.ɵɵadvance(1);core.ɵɵclassProp("disabled",ctx.disabled)("dz-placeholder",ctx.placeholder);core.ɵɵadvance(1);core.ɵɵproperty("innerHTML",(ctx.config==null?null:ctx.config.dictDefaultMessage)||ctx.message,core.ɵɵsanitizeHtml);core.ɵɵadvance(1);core.ɵɵproperty("ngIf",ctx.placeholder)}},directives:[DropzoneDirective,common.NgIf],styles:["dropzone {\n display: block;\n width: 100%;\n height: auto;\n}\n\ndropzone[fxflex] {\n display: flex;\n flex-direction: inherit;\n min-width: 0;\n min-height: 0;\n\n -webkit-box-direction: inherit;\n -webkit-box-orient: inherit;\n}\n\ndropzone[fxflex] > .dropzone.dz-wrapper {\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n\n -webkit-box-flex: 1;\n}\n\ndropzone[fxlayout] {\n align-items: inherit;\n align-content: inherit;\n justify-content: inherit;\n\n -webkit-box-align: inherit;\n -webkit-box-pack: inherit;\n}\n\ndropzone[fxlayout] > .dropzone.dz-wrapper.dz-single {\n display: flex;\n flex-direction: column;\n align-items: center;\n align-content: center;\n justify-content: center;\n\n -webkit-box-align: center;\n -webkit-box-direction: column;\n -webkit-box-orient: column;\n -webkit-box-pack: center;\n}\n\ndropzone[fxlayout] > .dropzone.dz-wrapper.dz-multiple {\n display: flex;\n flex-flow: row wrap;\n align-items: start;\n align-content: start;\n justify-content: space-between;\n\n -webkit-box-align: start;\n -webkit-box-direction: row;\n -webkit-box-orient: row;\n -webkit-box-pack: start;\n}\n\ndropzone > .dropzone.dz-wrapper {\n position: relative;\n\n overflow: auto;\n width: 100%;\n min-height: 0;\n max-height: 100%;\n padding: 0;\n border: none;\n\n color: #666;\n background: transparent;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message {\n position: relative;\n\n display: inline-block;\n overflow: auto;\n width: calc(100% - 16px);\n min-width: calc(100% - 16px);\n min-height: 40px;\n max-width: calc(100% - 16px);\n max-height: 100%;\n margin: 8px;\n border: 2px dashed #aaa;\n\n background-color: #eee;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message .dz-text {\n position: absolute;\n top: 50%;\n\n width: 100%;\n padding: 8px 16px;\n\n text-align: center;\n\n transform: translateY(-50%);\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message .dz-image {\n width: 100%;\n height: 100%;\n\n background-size: contain;\n background-repeat: no-repeat;\n background-position: 50% 50%;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.disabled {\n cursor: not-allowed;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.disabled .dz-text {\n opacity: 0.5;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder {\n border-color: rgba(#aaa, 0);\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder .dz-text {\n position: absolute;\n z-index: 1;\n top: 0;\n right: 10%;\n left: 10%;\n\n opacity: 0;\n\n font-weight: bold;\n background-color: rgba(#fff, 0.5);\n\n transform: translateY(-50%);\n transition:\n filter 250ms ease-in-out,\n opacity 250ms ease-in-out,\n border-color 250ms ease-in-out;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) {\n border-color: #aaa;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-text {\n opacity: 1;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-image {\n -webkit-filter: blur(8px);\n\n filter: blur(8px);\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview {\n margin: 8px;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-details {\n padding: 24px;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-progress {\n width: 80%;\n margin-left: -40%;\n border: 1px solid #aaa;\n border-radius: 4px;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-progress .dz-upload {\n background-color: #666;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-filename span {\n display: block;\n overflow: hidden;\n width: 100%;\n max-width: 100%;\n\n text-overflow: ellipsis;\n}\n\ndropzone > .dropzone.dz-wrapper .dz-preview .dz-filename span:hover {\n overflow: visible;\n\n white-space: normal;\n word-wrap: break-word;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-message {\n width: 100%;\n height: 100%;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single.dz-started .dz-message {\n display: none;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-preview {\n width: calc(100% - 16px);\n height: 100%;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-preview .dz-image {\n width: 100%;\n height: 100%;\n border-radius: 0;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-preview .dz-image img {\n display: block;\n width: 100%;\n height: auto;\n margin: 0;\n}\n\ndropzone > .dropzone.dz-wrapper.dz-single .dz-error-message {\n top: 50%;\n left: 50%;\n\n transform: translateX(-50%) translateY(100%);\n}\n\ndropzone > .dropzone.dz-wrapper.dz-multiple.dz-started .dz-message {\n display: inline-block;\n}\n","@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-moz-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%, 70%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}100%{opacity:0;-webkit-transform:translateY(-40px);-moz-transform:translateY(-40px);-ms-transform:translateY(-40px);-o-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-moz-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);-moz-transform:translateY(40px);-ms-transform:translateY(40px);-o-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0px);-moz-transform:translateY(0px);-ms-transform:translateY(0px);-o-transform:translateY(0px);transform:translateY(0px)}}@-webkit-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@-moz-keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}@keyframes pulse{0%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);-moz-transform:scale(1.1);-ms-transform:scale(1.1);-o-transform:scale(1.1);transform:scale(1.1)}20%{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,0.3);background:white;padding:20px 20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:0.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:linear-gradient(to bottom, #eee, #ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:white}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity 0.2s linear;-moz-transition:opacity 0.2s linear;-ms-transition:opacity 0.2s linear;-o-transition:opacity 0.2s linear;transition:opacity 0.2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,0.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,0.8);background-color:rgba(255,255,255,0.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,0.4);padding:0 0.4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05, 1.05);-moz-transform:scale(1.05, 1.05);-ms-transform:scale(1.05, 1.05);-o-transform:scale(1.05, 1.05);transform:scale(1.05, 1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1);animation:passing-through 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-moz-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-ms-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);-o-animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1);animation:slide-in 3s cubic-bezier(0.77, 0, 0.175, 1)}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:all 0.2s linear;-moz-transition:all 0.2s linear;-ms-transition:all 0.2s linear;-o-transition:all 0.2s linear;transition:all 0.2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity 0.4s ease-in;-moz-transition:opacity 0.4s ease-in;-ms-transition:opacity 0.4s ease-in;-o-transition:opacity 0.4s ease-in;transition:opacity 0.4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:pulse 6s ease infinite;-moz-animation:pulse 6s ease infinite;-ms-animation:pulse 6s ease infinite;-o-animation:pulse 6s ease infinite;animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:rgba(255,255,255,0.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:linear-gradient(to bottom, #666, #444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width 300ms ease-in-out;-moz-transition:width 300ms ease-in-out;-ms-transition:width 300ms ease-in-out;-o-transition:width 300ms ease-in-out;transition:width 300ms ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:block;display:none;opacity:0;-webkit-transition:opacity 0.3s ease;-moz-transition:opacity 0.3s ease;-ms-transition:opacity 0.3s ease;-o-transition:opacity 0.3s ease;transition:opacity 0.3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:linear-gradient(to bottom, #be2626, #a92222);padding:0.5em 1.2em;color:white}.dropzone .dz-preview .dz-error-message:after{content:'';position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626}\n"],encapsulation:2});return DropzoneComponent}();var DropzoneModule=function(){function DropzoneModule(){}DropzoneModule.ɵmod=core.ɵɵdefineNgModule({type:DropzoneModule});DropzoneModule.ɵinj=core.ɵɵdefineInjector({factory:function DropzoneModule_Factory(t){return new(t||DropzoneModule)},imports:[[common.CommonModule],common.CommonModule]});return DropzoneModule}();(function(){(typeof ngJitMode==="undefined"||ngJitMode)&&core.ɵɵsetNgModuleScope(DropzoneModule,{declarations:[DropzoneComponent,DropzoneDirective],imports:[common.CommonModule],exports:[common.CommonModule,DropzoneComponent,DropzoneDirective]})})();exports.DROPZONE_CONFIG=DROPZONE_CONFIG;exports.DropzoneComponent=DropzoneComponent;exports.DropzoneConfig=DropzoneConfig;exports.DropzoneDirective=DropzoneDirective;exports.DropzoneModule=DropzoneModule;Object.defineProperty(exports,"__esModule",{value:true})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("dropzone")):"function"==typeof define&&define.amd?define("ngx-dropzone-wrapper",["exports","@angular/core","@angular/common","dropzone"],t):t((e=e||self)["ngx-dropzone-wrapper"]={},e.ng.core,e.ng.common,e.dropzone)}(this,(function(e,t,o,r){"use strict";r=r&&r.hasOwnProperty("default")?r.default:r;function i(e,t,o,r){var i,n=arguments.length,p=n<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,o):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,o,r);else for(var d=e.length-1;d>=0;d--)(i=e[d])&&(p=(n<3?i(p):n>3?i(t,o,p):i(t,o))||p);return n>3&&p&&Object.defineProperty(t,o,p),p}function n(e,t){return function(o,r){t(o,r,e)}}var p=new t.InjectionToken("DROPZONE_CONFIG"),d=["error","success","sending","canceled","complete","processing","drop","dragStart","dragEnd","dragEnter","dragOver","dragLeave","thumbnail","addedFile","removedFile","uploadProgress","maxFilesReached","maxFilesExceeded","successMultiple","sendingMultiple","canceledMultiple","completeMultiple","processingMultiple","reset","queueComplete","totalUploadProgress"],s=function(){function e(e){void 0===e&&(e={}),this.assign(e)}return e.prototype.assign=function(e,t){for(var o in void 0===e&&(e={}),t=t||this,e)null==e[o]||Array.isArray(e[o])||"object"!=typeof e[o]||e[o]instanceof HTMLElement?t[o]=e[o]:(t[o]={},this.assign(e[o],t[o]))},e}(),a=function(){function e(e,o,i,n,p,d){this.zone=e,this.renderer=o,this.elementRef=i,this.differs=n,this.platformId=p,this.defaults=d,this.configDiff=null,this.disabled=!1,this.DZ_INIT=new t.EventEmitter,this.DZ_ERROR=new t.EventEmitter,this.DZ_SUCCESS=new t.EventEmitter,this.DZ_SENDING=new t.EventEmitter,this.DZ_CANCELED=new t.EventEmitter,this.DZ_COMPLETE=new t.EventEmitter,this.DZ_PROCESSING=new t.EventEmitter,this.DZ_DROP=new t.EventEmitter,this.DZ_DRAGSTART=new t.EventEmitter,this.DZ_DRAGEND=new t.EventEmitter,this.DZ_DRAGENTER=new t.EventEmitter,this.DZ_DRAGOVER=new t.EventEmitter,this.DZ_DRAGLEAVE=new t.EventEmitter,this.DZ_THUMBNAIL=new t.EventEmitter,this.DZ_ADDEDFILE=new t.EventEmitter,this.DZ_REMOVEDFILE=new t.EventEmitter,this.DZ_UPLOADPROGRESS=new t.EventEmitter,this.DZ_MAXFILESREACHED=new t.EventEmitter,this.DZ_MAXFILESEXCEEDED=new t.EventEmitter,this.DZ_SUCCESSMULTIPLE=new t.EventEmitter,this.DZ_SENDINGMULTIPLE=new t.EventEmitter,this.DZ_CANCELEDMULTIPLE=new t.EventEmitter,this.DZ_COMPLETEMULTIPLE=new t.EventEmitter,this.DZ_PROCESSINGMULTIPLE=new t.EventEmitter,this.DZ_RESET=new t.EventEmitter,this.DZ_QUEUECOMPLETE=new t.EventEmitter,this.DZ_TOTALUPLOADPROGRESS=new t.EventEmitter,r.autoDiscover=!1}return e.prototype.ngOnInit=function(){var e=this;if(o.isPlatformBrowser(this.platformId)){var t=new s(this.defaults);t.assign(this.config),this.renderer.addClass(this.elementRef.nativeElement,1===t.maxFiles?"dz-single":"dz-multiple"),this.renderer.removeClass(this.elementRef.nativeElement,1===t.maxFiles?"dz-multiple":"dz-single"),this.zone.runOutsideAngular((function(){e.instance=new r(e.elementRef.nativeElement,t)})),this.disabled&&this.instance.disable(),this.DZ_INIT.observers.length&&this.zone.run((function(){e.DZ_INIT.emit(e.instance)})),this.instance.on("success",(function(){null!=t.autoReset&&setTimeout((function(){return e.reset()}),t.autoReset)})),this.instance.on("error",(function(){null!=t.errorReset&&setTimeout((function(){return e.reset()}),t.errorReset)})),this.instance.on("canceled",(function(){null!=t.cancelReset&&setTimeout((function(){return e.reset()}),t.cancelReset)})),d.forEach((function(t){e.instance.on(t.toLowerCase(),(function(){for(var o=[],r=0;r<arguments.length;r++)o[r]=arguments[r];o=1===o.length?o[0]:o;var i="DZ_"+t.toUpperCase(),n=e[i];n.observers.length>0&&e.zone.run((function(){n.emit(o)}))}))})),this.configDiff||(this.configDiff=this.differs.find(this.config||{}).create(),this.configDiff.diff(this.config||{}))}},e.prototype.ngOnDestroy=function(){var e=this;this.instance&&(this.zone.runOutsideAngular((function(){e.instance.destroy()})),this.instance=null)},e.prototype.ngDoCheck=function(){!this.disabled&&this.configDiff&&(this.configDiff.diff(this.config||{})&&this.instance&&(this.ngOnDestroy(),this.ngOnInit()))},e.prototype.ngOnChanges=function(e){var t=this;this.instance&&e.disabled&&e.disabled.currentValue!==e.disabled.previousValue&&(!1===e.disabled.currentValue?this.zone.runOutsideAngular((function(){t.instance.enable()})):!0===e.disabled.currentValue&&this.zone.runOutsideAngular((function(){t.instance.disable()})))},e.prototype.dropzone=function(){return this.instance},e.prototype.reset=function(e){var t=this;this.instance&&this.zone.runOutsideAngular((function(){t.instance.removeAllFiles(e)}))},e.ctorParameters=function(){return[{type:t.NgZone},{type:t.Renderer2},{type:t.ElementRef},{type:t.KeyValueDiffers},{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]},{type:void 0,decorators:[{type:t.Optional},{type:t.Inject,args:[p]}]}]},i([t.Input()],e.prototype,"disabled",void 0),i([t.Input("dropzone")],e.prototype,"config",void 0),i([t.Output("init")],e.prototype,"DZ_INIT",void 0),i([t.Output("error")],e.prototype,"DZ_ERROR",void 0),i([t.Output("success")],e.prototype,"DZ_SUCCESS",void 0),i([t.Output("sending")],e.prototype,"DZ_SENDING",void 0),i([t.Output("canceled")],e.prototype,"DZ_CANCELED",void 0),i([t.Output("complete")],e.prototype,"DZ_COMPLETE",void 0),i([t.Output("processing")],e.prototype,"DZ_PROCESSING",void 0),i([t.Output("drop")],e.prototype,"DZ_DROP",void 0),i([t.Output("dragStart")],e.prototype,"DZ_DRAGSTART",void 0),i([t.Output("dragEnd")],e.prototype,"DZ_DRAGEND",void 0),i([t.Output("dragEnter")],e.prototype,"DZ_DRAGENTER",void 0),i([t.Output("dragOver")],e.prototype,"DZ_DRAGOVER",void 0),i([t.Output("dragLeave")],e.prototype,"DZ_DRAGLEAVE",void 0),i([t.Output("thumbnail")],e.prototype,"DZ_THUMBNAIL",void 0),i([t.Output("addedFile")],e.prototype,"DZ_ADDEDFILE",void 0),i([t.Output("removedFile")],e.prototype,"DZ_REMOVEDFILE",void 0),i([t.Output("uploadProgress")],e.prototype,"DZ_UPLOADPROGRESS",void 0),i([t.Output("maxFilesReached")],e.prototype,"DZ_MAXFILESREACHED",void 0),i([t.Output("maxFilesExceeded")],e.prototype,"DZ_MAXFILESEXCEEDED",void 0),i([t.Output("successMultiple")],e.prototype,"DZ_SUCCESSMULTIPLE",void 0),i([t.Output("sendingMultiple")],e.prototype,"DZ_SENDINGMULTIPLE",void 0),i([t.Output("canceledMultiple")],e.prototype,"DZ_CANCELEDMULTIPLE",void 0),i([t.Output("completeMultiple")],e.prototype,"DZ_COMPLETEMULTIPLE",void 0),i([t.Output("processingMultiple")],e.prototype,"DZ_PROCESSINGMULTIPLE",void 0),i([t.Output("reset")],e.prototype,"DZ_RESET",void 0),i([t.Output("queueComplete")],e.prototype,"DZ_QUEUECOMPLETE",void 0),i([t.Output("totalUploadProgress")],e.prototype,"DZ_TOTALUPLOADPROGRESS",void 0),e=i([t.Directive({selector:"[dropzone]",exportAs:"ngxDropzone"}),n(4,t.Inject(t.PLATFORM_ID)),n(5,t.Optional()),n(5,t.Inject(p))],e)}(),l=function(){function e(e){this.platformId=e,this.disabled=!1,this.message="Click or drag files to upload",this.placeholder="",this.useDropzoneClass=!0,this.DZ_INIT=new t.EventEmitter,this.DZ_ERROR=new t.EventEmitter,this.DZ_SUCCESS=new t.EventEmitter,this.DZ_SENDING=new t.EventEmitter,this.DZ_CANCELED=new t.EventEmitter,this.DZ_COMPLETE=new t.EventEmitter,this.DZ_PROCESSING=new t.EventEmitter,this.DZ_DROP=new t.EventEmitter,this.DZ_DRAGSTART=new t.EventEmitter,this.DZ_DRAGEND=new t.EventEmitter,this.DZ_DRAGENTER=new t.EventEmitter,this.DZ_DRAGOVER=new t.EventEmitter,this.DZ_DRAGLEAVE=new t.EventEmitter,this.DZ_THUMBNAIL=new t.EventEmitter,this.DZ_ADDEDFILE=new t.EventEmitter,this.DZ_REMOVEDFILE=new t.EventEmitter,this.DZ_UPLOADPROGRESS=new t.EventEmitter,this.DZ_MAXFILESREACHED=new t.EventEmitter,this.DZ_MAXFILESEXCEEDED=new t.EventEmitter,this.DZ_SUCCESSMULTIPLE=new t.EventEmitter,this.DZ_SENDINGMULTIPLE=new t.EventEmitter,this.DZ_CANCELEDMULTIPLE=new t.EventEmitter,this.DZ_COMPLETEMULTIPLE=new t.EventEmitter,this.DZ_PROCESSINGMULTIPLE=new t.EventEmitter,this.DZ_RESET=new t.EventEmitter,this.DZ_QUEUECOMPLETE=new t.EventEmitter,this.DZ_TOTALUPLOADPROGRESS=new t.EventEmitter}return e.prototype.ngOnInit=function(){var e=this;o.isPlatformBrowser(this.platformId)&&window.setTimeout((function(){d.forEach((function(t){if(e.directiveRef){var o="DZ_"+t.toUpperCase(),r=o,i=o;e.directiveRef[r]=e[i]}}))}),0)},e.prototype.getPlaceholder=function(){return"url("+encodeURI(this.placeholder)+")"},e.ctorParameters=function(){return[{type:Object,decorators:[{type:t.Inject,args:[t.PLATFORM_ID]}]}]},i([t.Input()],e.prototype,"disabled",void 0),i([t.Input()],e.prototype,"config",void 0),i([t.Input()],e.prototype,"message",void 0),i([t.Input()],e.prototype,"placeholder",void 0),i([t.Input()],e.prototype,"useDropzoneClass",void 0),i([t.Output("init")],e.prototype,"DZ_INIT",void 0),i([t.Output("error")],e.prototype,"DZ_ERROR",void 0),i([t.Output("success")],e.prototype,"DZ_SUCCESS",void 0),i([t.Output("sending")],e.prototype,"DZ_SENDING",void 0),i([t.Output("canceled")],e.prototype,"DZ_CANCELED",void 0),i([t.Output("complete")],e.prototype,"DZ_COMPLETE",void 0),i([t.Output("processing")],e.prototype,"DZ_PROCESSING",void 0),i([t.Output("drop")],e.prototype,"DZ_DROP",void 0),i([t.Output("dragStart")],e.prototype,"DZ_DRAGSTART",void 0),i([t.Output("dragEnd")],e.prototype,"DZ_DRAGEND",void 0),i([t.Output("dragEnter")],e.prototype,"DZ_DRAGENTER",void 0),i([t.Output("dragOver")],e.prototype,"DZ_DRAGOVER",void 0),i([t.Output("dragLeave")],e.prototype,"DZ_DRAGLEAVE",void 0),i([t.Output("thumbnail")],e.prototype,"DZ_THUMBNAIL",void 0),i([t.Output("addedFile")],e.prototype,"DZ_ADDEDFILE",void 0),i([t.Output("removedFile")],e.prototype,"DZ_REMOVEDFILE",void 0),i([t.Output("uploadProgress")],e.prototype,"DZ_UPLOADPROGRESS",void 0),i([t.Output("maxFilesReached")],e.prototype,"DZ_MAXFILESREACHED",void 0),i([t.Output("maxFilesExceeded")],e.prototype,"DZ_MAXFILESEXCEEDED",void 0),i([t.Output("successMultiple")],e.prototype,"DZ_SUCCESSMULTIPLE",void 0),i([t.Output("sendingMultiple")],e.prototype,"DZ_SENDINGMULTIPLE",void 0),i([t.Output("canceledMultiple")],e.prototype,"DZ_CANCELEDMULTIPLE",void 0),i([t.Output("completeMultiple")],e.prototype,"DZ_COMPLETEMULTIPLE",void 0),i([t.Output("processingMultiple")],e.prototype,"DZ_PROCESSINGMULTIPLE",void 0),i([t.Output("reset")],e.prototype,"DZ_RESET",void 0),i([t.Output("queueComplete")],e.prototype,"DZ_QUEUECOMPLETE",void 0),i([t.Output("totalUploadProgress")],e.prototype,"DZ_TOTALUPLOADPROGRESS",void 0),i([t.ViewChild(a,{static:!0})],e.prototype,"directiveRef",void 0),e=i([t.Component({selector:"dropzone",exportAs:"ngxDropzone",template:'<div class="dz-wrapper" [class.dropzone]="useDropzoneClass" [dropzone]="config" [disabled]="disabled" (init)="DZ_INIT.emit($event)">\n <div class="dz-message" [class.disabled]="disabled" [class.dz-placeholder]="placeholder">\n <div class="dz-text" [innerHTML]="config?.dictDefaultMessage || message"></div>\n\n <div *ngIf="placeholder" class="dz-image" [style.background-image]="getPlaceholder()"></div>\n </div>\n\n <ng-content></ng-content>\n</div>\n',encapsulation:t.ViewEncapsulation.None,styles:["dropzone{display:block;width:100%;height:auto}dropzone[fxflex]{display:-webkit-box;display:flex;flex-direction:inherit;min-width:0;min-height:0;-webkit-box-direction:inherit;-webkit-box-orient:inherit}dropzone[fxflex]>.dropzone.dz-wrapper{flex:1 1 auto;min-width:0;min-height:0;-webkit-box-flex:1}dropzone[fxlayout]{align-items:inherit;align-content:inherit;justify-content:inherit;-webkit-box-align:inherit;-webkit-box-pack:inherit}dropzone[fxlayout]>.dropzone.dz-wrapper.dz-single{display:-webkit-box;display:flex;flex-direction:column;align-items:center;align-content:center;justify-content:center;-webkit-box-align:center;-webkit-box-direction:column;-webkit-box-orient:column;-webkit-box-pack:center}dropzone[fxlayout]>.dropzone.dz-wrapper.dz-multiple{display:-webkit-box;display:flex;flex-flow:row wrap;-webkit-box-align:start;align-items:flex-start;align-content:flex-start;-webkit-box-pack:justify;justify-content:space-between;-webkit-box-align:flex-start;-webkit-box-direction:row;-webkit-box-orient:row;-webkit-box-pack:flex-start}dropzone>.dropzone.dz-wrapper{position:relative;overflow:auto;width:100%;min-height:0;max-height:100%;padding:0;border:none;color:#666;background:0 0}dropzone>.dropzone.dz-wrapper .dz-message{position:relative;display:inline-block;overflow:auto;width:calc(100% - 16px);min-width:calc(100% - 16px);min-height:40px;max-width:calc(100% - 16px);max-height:100%;margin:8px;border:2px dashed #aaa;background-color:#eee}dropzone>.dropzone.dz-wrapper .dz-message .dz-text{position:absolute;top:50%;width:100%;padding:8px 16px;text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%)}dropzone>.dropzone.dz-wrapper .dz-message .dz-image{width:100%;height:100%;background-size:contain;background-repeat:no-repeat;background-position:50% 50%}dropzone>.dropzone.dz-wrapper .dz-message.disabled{cursor:not-allowed}dropzone>.dropzone.dz-wrapper .dz-message.disabled .dz-text{opacity:.5}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder{border-color:rgba(#aaa,0)}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder .dz-text{position:absolute;z-index:1;top:0;right:10%;left:10%;opacity:0;font-weight:700;background-color:rgba(#fff,.5);-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:opacity 250ms ease-in-out,border-color 250ms ease-in-out,-webkit-filter 250ms ease-in-out;transition:filter 250ms ease-in-out,opacity 250ms ease-in-out,border-color 250ms ease-in-out,-webkit-filter 250ms ease-in-out}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled){border-color:#aaa}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-text{opacity:1}dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-image{-webkit-filter:blur(8px);filter:blur(8px)}dropzone>.dropzone.dz-wrapper .dz-preview{margin:8px}dropzone>.dropzone.dz-wrapper .dz-preview .dz-details{padding:24px}dropzone>.dropzone.dz-wrapper .dz-preview .dz-progress{width:80%;margin-left:-40%;border:1px solid #aaa;border-radius:4px}dropzone>.dropzone.dz-wrapper .dz-preview .dz-progress .dz-upload{background-color:#666}dropzone>.dropzone.dz-wrapper .dz-preview .dz-filename span{display:block;overflow:hidden;width:100%;max-width:100%;text-overflow:ellipsis}dropzone>.dropzone.dz-wrapper .dz-preview .dz-filename span:hover{overflow:visible;white-space:normal;word-wrap:break-word}dropzone>.dropzone.dz-wrapper.dz-single .dz-message{width:100%;height:100%}dropzone>.dropzone.dz-wrapper.dz-single.dz-started .dz-message{display:none}dropzone>.dropzone.dz-wrapper.dz-single .dz-preview{width:calc(100% - 16px);height:100%}dropzone>.dropzone.dz-wrapper.dz-single .dz-preview .dz-image{width:100%;height:100%;border-radius:0}dropzone>.dropzone.dz-wrapper.dz-single .dz-preview .dz-image img{display:block;width:100%;height:auto;margin:0}dropzone>.dropzone.dz-wrapper.dz-single .dz-error-message{top:50%;left:50%;-webkit-transform:translateX(-50%) translateY(100%);transform:translateX(-50%) translateY(100%)}dropzone>.dropzone.dz-wrapper.dz-multiple.dz-started .dz-message{display:inline-block}","@-webkit-keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes passing-through{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%,70%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@-webkit-keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes slide-in{0%{opacity:0;-webkit-transform:translateY(40px);transform:translateY(40px)}30%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes pulse{0%,20%{-webkit-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);transform:scale(1.1)}}@keyframes pulse{0%,20%{-webkit-transform:scale(1);transform:scale(1)}10%{-webkit-transform:scale(1.1);transform:scale(1.1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:2px solid rgba(0,0,0,.3);background:#fff;padding:20px}.dropzone.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone.dz-started .dz-message{display:none}.dropzone.dz-drag-hover{border-style:solid}.dropzone.dz-drag-hover .dz-message{opacity:.5}.dropzone .dz-message{text-align:center;margin:2em 0}.dropzone .dz-preview{position:relative;display:inline-block;vertical-align:top;margin:16px;min-height:100px}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview.dz-file-preview .dz-image{border-radius:20px;background:#999;background:-webkit-gradient(linear,left top,left bottom,from(#eee),to(#ddd));background:linear-gradient(to bottom,#eee,#ddd)}.dropzone .dz-preview.dz-file-preview .dz-details{opacity:1}.dropzone .dz-preview.dz-image-preview{background:#fff}.dropzone .dz-preview.dz-image-preview .dz-details{-webkit-transition:opacity .2s linear;transition:opacity .2s linear}.dropzone .dz-preview .dz-remove{font-size:14px;text-align:center;display:block;cursor:pointer;border:none}.dropzone .dz-preview .dz-remove:hover{text-decoration:underline}.dropzone .dz-preview:hover .dz-details{opacity:1}.dropzone .dz-preview .dz-details{z-index:20;position:absolute;top:0;left:0;opacity:0;font-size:13px;min-width:100%;max-width:100%;padding:2em 1em;text-align:center;color:rgba(0,0,0,.9);line-height:150%}.dropzone .dz-preview .dz-details .dz-size{margin-bottom:1em;font-size:16px}.dropzone .dz-preview .dz-details .dz-filename{white-space:nowrap}.dropzone .dz-preview .dz-details .dz-filename:hover span{border:1px solid rgba(200,200,200,.8);background-color:rgba(255,255,255,.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){overflow:hidden;text-overflow:ellipsis}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:rgba(255,255,255,.4);padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{-webkit-transform:scale(1.05,1.05);transform:scale(1.05,1.05);-webkit-filter:blur(8px);filter:blur(8px)}.dropzone .dz-preview .dz-image{border-radius:20px;overflow:hidden;width:120px;height:120px;position:relative;display:block;z-index:10}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{-webkit-animation:3s cubic-bezier(.77,0,.175,1) passing-through;animation:3s cubic-bezier(.77,0,.175,1) passing-through}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;-webkit-animation:3s cubic-bezier(.77,0,.175,1) slide-in;animation:3s cubic-bezier(.77,0,.175,1) slide-in}.dropzone .dz-preview .dz-error-mark,.dropzone .dz-preview .dz-success-mark{pointer-events:none;opacity:0;z-index:500;position:absolute;display:block;top:50%;left:50%;margin-left:-27px;margin-top:-27px}.dropzone .dz-preview .dz-error-mark svg,.dropzone .dz-preview .dz-success-mark svg{display:block;width:54px;height:54px}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;-webkit-transition:.2s linear;transition:.2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;-webkit-transition:opacity .4s ease-in;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{-webkit-animation:6s infinite pulse;animation:6s infinite pulse}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:16px;left:50%;top:50%;margin-top:-8px;width:80px;margin-left:-40px;background:rgba(255,255,255,.9);-webkit-transform:scale(1);border-radius:8px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#333;background:-webkit-gradient(linear,left top,left bottom,from(#666),to(#444));background:linear-gradient(to bottom,#666,#444);position:absolute;top:0;left:0;bottom:0;width:0;-webkit-transition:width .3s ease-in-out;transition:width .3s ease-in-out}.dropzone .dz-preview.dz-error .dz-error-message{display:block}.dropzone .dz-preview.dz-error:hover .dz-error-message{opacity:1;pointer-events:auto}.dropzone .dz-preview .dz-error-message{pointer-events:none;z-index:1000;position:absolute;display:none;opacity:0;-webkit-transition:opacity .3s;transition:opacity .3s;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;background:-webkit-gradient(linear,left top,left bottom,from(#be2626),to(#a92222));background:linear-gradient(to bottom,#be2626,#a92222);padding:.5em 1.2em;color:#fff}.dropzone .dz-preview .dz-error-message:after{content:'';position:absolute;top:-6px;left:64px;width:0;height:0;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #be2626}"]}),n(0,t.Inject(t.PLATFORM_ID))],e)}(),u=function(){function e(){}return e=i([t.NgModule({imports:[o.CommonModule],declarations:[l,a],exports:[o.CommonModule,l,a]})],e)}();e.DROPZONE_CONFIG=p,e.DropzoneComponent=l,e.DropzoneConfig=s,e.DropzoneDirective=a,e.DropzoneModule=u,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=ngx-dropzone-wrapper.umd.min.js.map |
@@ -5,69 +5,19 @@ { | ||
"bugs": "https://github.com/zefoy/ngx-dropzone-wrapper/issues", | ||
"version": "9.0.0-1", | ||
"license": "MIT", | ||
"version": "9.0.0-0", | ||
"main": "./bundles/ngx-dropzone-wrapper.umd.js", | ||
"module": "./dist/ngx-dropzone-wrapper.es5.js", | ||
"typings": "./dist/ngx-dropzone-wrapper.d.ts", | ||
"tslint": { | ||
"extends": "./tslint.json" | ||
"peerDependencies": { | ||
"@angular/common": "^9.0.0", | ||
"@angular/core": "^9.0.0", | ||
"tslib": "^1.10.0" | ||
}, | ||
"stylelint": { | ||
"extends": "./stylelint.json" | ||
}, | ||
"scripts": { | ||
"clean": "rm -rf dist bundles", | ||
"start": "npm run build && npm run bundle", | ||
"watch": "watch --wait=5 'npm run start' src/", | ||
"lint": "npm run lint:ts && npm run lint:css", | ||
"build": "npm run build:html && npm run build:css && npm run build:js", | ||
"bundle": "npm run bundle:es5 ; npm run bundle:umd ; npm run minify:umd", | ||
"prepare": "npm run clean && npm run build && npm run bundle", | ||
"postinstall": "ngcc --properties es2015 browser module main --first-only", | ||
"lint:ts": "tslint \"src/**/*.ts\"", | ||
"lint:css": "stylelint \"src/**/*.css\"", | ||
"build:js": "ngc -p src/tsconfig.json", | ||
"build:css": "cpx src/lib/dropzone.component.css dist/lib/", | ||
"build:html": "cpx src/lib/dropzone.component.html dist/lib/", | ||
"bundle:es5": "rollup -c config/rollup-es5.config.js --silent", | ||
"bundle:umd": "rollup -c config/rollup-umd.config.js --silent", | ||
"minify:umd": "terser bundles/$npm_package_name.umd.js -o bundles/$npm_package_name.umd.min.js --source-map=\"filename=bundles/$npm_package_name.umd.min.js.map\"" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/zefoy/ngx-dropzone-wrapper.git" | ||
}, | ||
"dependencies": { | ||
"dropzone": "^5.5.0" | ||
}, | ||
"devDependencies": { | ||
"@angular/cli": "^9.0.0-rc.7", | ||
"@angular/common": "^9.0.0-rc.7", | ||
"@angular/compiler": "^9.0.0-rc.7", | ||
"@angular/compiler-cli": "^9.0.0-rc.7", | ||
"@angular/core": "^9.0.0-rc.7", | ||
"@angular/platform-browser": "^9.0.0-rc.7", | ||
"@angular-devkit/build-angular": "^0.900.0-rc.7", | ||
"@types/dropzone": "^5.0.0", | ||
"@types/node": "^12.0.0", | ||
"codelyzer": "^5.2.0", | ||
"core-js": "^3.6.0", | ||
"cpx": "^1.5.0", | ||
"rollup": "^1.27.0", | ||
"rollup-plugin-node-resolve": "^5.2.0", | ||
"rollup-plugin-sourcemaps": "^0.4.0", | ||
"rxjs": "^6.5.0", | ||
"stylelint": "^12.0.0", | ||
"stylelint-config-standard": "^19.0.0", | ||
"stylelint-order": "^3.1.0", | ||
"terser": "^4.4.0", | ||
"tsickle": "^0.37.0", | ||
"tslint": "^5.20.0", | ||
"typescript": "~3.6.0", | ||
"watch": "^1.0.0", | ||
"zone.js": "^0.10.0" | ||
}, | ||
"peerDependencies": { | ||
"@angular/common": ">=5.0.0", | ||
"@angular/core": ">=5.0.0" | ||
} | ||
"main": "bundles/ngx-dropzone-wrapper.umd.js", | ||
"module": "fesm5/ngx-dropzone-wrapper.js", | ||
"es2015": "fesm2015/ngx-dropzone-wrapper.js", | ||
"esm5": "esm5/ngx-dropzone-wrapper.js", | ||
"esm2015": "esm2015/ngx-dropzone-wrapper.js", | ||
"fesm5": "fesm5/ngx-dropzone-wrapper.js", | ||
"fesm2015": "fesm2015/ngx-dropzone-wrapper.js", | ||
"typings": "ngx-dropzone-wrapper.d.ts", | ||
"metadata": "ngx-dropzone-wrapper.metadata.json", | ||
"sideEffects": false | ||
} |
141
README.md
@@ -1,16 +0,14 @@ | ||
# Angular Dropzone Wrapper | ||
# Angular Ace Wrapper | ||
<a href="https://badge.fury.io/js/ngx-dropzone-wrapper"><img src="https://badge.fury.io/js/ngx-dropzone-wrapper.svg" align="right" alt="npm version" height="18"></a> | ||
<a href="https://badge.fury.io/js/ngx-ace-wrapper"><img src="https://badge.fury.io/js/ngx-ace-wrapper.svg" align="right" alt="npm version" height="18"></a> | ||
This is an Angular wrapper library for the [Dropzone](http://www.dropzonejs.com/). To use this library you should get familiar with the Dropzone documentation as well since this documentation only explains details specific to this wrapper. | ||
This is an Angular wrapper library for the [Ace](http://ace.c9.io/). To use this library you should get familiar with the Ace documentation as well since this documentation only explains details specific to this wrapper. | ||
This documentation is for the latest 6.x.x version which requires Angular 5 or newer. For Angular 4 you need to use the latest 4.x.x version. Documentation for the 4.x.x can be found from <a href="https://github.com/zefoy/ngx-dropzone-wrapper/tree/4.x.x/">here</a>. | ||
### Quick Links | ||
### Quick links | ||
[Example application](https://zefoy.github.io/ngx-dropzone-wrapper/) | ||
[Example application](https://zefoy.github.io/ngx-ace-wrapper/) | ||
| | ||
[StackBlitz example](https://stackblitz.com/github/zefoy/ngx-dropzone-wrapper/tree/master/example) | ||
[StackBlitz example](https://stackblitz.com/github/zefoy/ngx-ace-wrapper/tree/master) | ||
| | ||
[Dropzone documentation](http://www.dropzonejs.com/#configuration-options) | ||
[Ace documentation](http://ace.c9.io/#nav-api) | ||
@@ -21,3 +19,3 @@ ### Building the library | ||
npm install | ||
npm start | ||
npm run build | ||
``` | ||
@@ -28,20 +26,10 @@ | ||
```bash | ||
cd example | ||
npm install | ||
npm start | ||
npm run start | ||
``` | ||
### Library development | ||
```bash | ||
npm link | ||
cd example | ||
npm link ngx-dropzone-wrapper | ||
``` | ||
### Installing and usage | ||
```bash | ||
npm install ngx-dropzone-wrapper --save | ||
npm install ngx-ace-wrapper --save | ||
``` | ||
@@ -54,11 +42,7 @@ | ||
```javascript | ||
import { DropzoneModule } from 'ngx-dropzone-wrapper'; | ||
import { DROPZONE_CONFIG } from 'ngx-dropzone-wrapper'; | ||
import { DropzoneConfigInterface } from 'ngx-dropzone-wrapper'; | ||
import { AceModule } from 'ngx-ace-wrapper'; | ||
import { ACE_CONFIG } from 'ngx-ace-wrapper'; | ||
import { AceConfigInterface } from 'ngx-ace-wrapper'; | ||
const DEFAULT_DROPZONE_CONFIG: DropzoneConfigInterface = { | ||
// Change this to your upload POST address: | ||
url: 'https://httpbin.org/post', | ||
maxFilesize: 50, | ||
acceptedFiles: 'image/*' | ||
const DEFAULT_ACE_CONFIG: AceConfigInterface = { | ||
}; | ||
@@ -70,8 +54,8 @@ | ||
... | ||
DropzoneModule | ||
AceModule | ||
], | ||
providers: [ | ||
{ | ||
provide: DROPZONE_CONFIG, | ||
useValue: DEFAULT_DROPZONE_CONFIG | ||
provide: ACE_CONFIG, | ||
useValue: DEFAULT_ACE_CONFIG | ||
} | ||
@@ -84,31 +68,31 @@ ] | ||
This library provides two ways to create a Dropzone element, component for simple use cases and directive for more custom use cases. | ||
This library provides two ways to create a Ace element, component for simple use cases and directive for more custom use cases. | ||
**COMPONENT USAGE** | ||
Simply replace the element that would ordinarily be passed to `Dropzone` with the dropzone component. | ||
Simply replace the element that would ordinarily be passed to `Ace` with the ace component. | ||
**NOTE:** Component provides couple additional features from directive such as the placeholder image. If you don't need them or want to create custom component then you might want to use the directive instead. | ||
You also need to import brace and the used mode(s) and theme(s): | ||
```javascript | ||
import 'brace'; | ||
import 'brace/mode/text'; | ||
import 'brace/theme/github'; | ||
``` | ||
```html | ||
<dropzone [config]="config" [message]="'Click or drag images here to upload'" (error)="onUploadError($event)" (success)="onUploadSuccess($event)"></dropzone> | ||
<ace [config]="config" [mode]="'text'" [theme]="'github'" [(value)]="value"></ace> | ||
``` | ||
```javascript | ||
[config] // Custom config to override the global defaults. | ||
[config] // Custom config to override the global defaults. | ||
[disabled] // Disables / detaches Dropzone from the element. | ||
[mode] // Mode for the editor (import mode manually!). | ||
[theme] // Theme for the editor (import theme manually!). | ||
[value] // Input value of the ace editor content (text). | ||
[disabled] // Disables all functionality (focus & editing). | ||
[message] // Message to show for the user on the upload area. | ||
[placeholder] // Placeholder image to be shown as the upload area. | ||
[useAceClass] // Use ace class (use provided default styles). | ||
[useDropzoneClass] // Use 'dropzone' class (use provided default styles). | ||
(error) // Event handler for the Dropzone upload error event. | ||
(success) // Event handler for the Dropzone upload success event. | ||
(canceled) // Event handler for the Dropzone upload canceled event. | ||
(<dropzoneEvent>) // All Dropzone events / callbacks work as bindings. | ||
// Event names are in camel case (not lower case). | ||
// Example: maxfilesreached -> maxFilesReached | ||
(valueChange) // Event handler for the input value change event. | ||
``` | ||
@@ -118,26 +102,20 @@ | ||
When using only the directive you need to provide your own theming or import the default theme: | ||
You need to always import brace and the used mode(s) and theme(s): | ||
```css | ||
@import '~dropzone/dist/min/dropzone.min.css'; | ||
```javascript | ||
import 'brace'; | ||
import 'brace/mode/text'; | ||
import 'brace/theme/github'; | ||
``` | ||
Dropzone directive can be used in form or div element with optional custom configuration: | ||
Ace directive can be used in correctly structured div element with optional custom configuration: | ||
```html | ||
<div class="dropzone" [dropzone]="config" (error)="onUploadError($event)" (success)="onUploadSuccess($event)"></div> | ||
<div class="ace" [ace]="config">text</div> | ||
``` | ||
```javascript | ||
[dropzone] // Can be used to provide optional custom config. | ||
[ace] // Custom config to override the global defaults. | ||
[disabled] // Disables / detaches Dropzone from the element. | ||
(error) // Event handler for the Dropzone upload error event. | ||
(success) // Event handler for the Dropzone upload success event. | ||
(canceled) // Event handler for the Dropzone upload canceled event. | ||
(<dropzoneEvent>) // All Dropzone events / callbacks work as bindings. | ||
// Event names are in camel case (not lower case). | ||
// Example: maxfilesreached -> maxFilesReached | ||
[disabled] // Disables all functionality (focus & editing). | ||
``` | ||
@@ -147,24 +125,14 @@ | ||
This library supports all Dropzone configuration options and few extra options for easier usage. | ||
**LIBRARY OPTIONS** | ||
```javascript | ||
autoReset // Time for resetting component after upload (Default: null). | ||
errorReset // Time for resetting component after an error (Default: null). | ||
cancelReset // Time for resetting component after canceling (Default: null). | ||
``` | ||
mode // Mode for the editor (import mode manually!). | ||
theme // Theme for the editor (import theme manually!). | ||
**DROPZONE OPTIONS** | ||
wrap // Sets text wrapping to be enabled or disabled. | ||
tabSize // Size in spaces of the soft tabs (Default: 4). | ||
```javascript | ||
url // Upload url where to send the upload request (Default: ''). | ||
method // HTTP method to use communicating with the server (Default: 'post'). | ||
headers // Object of additional headers to send to the server (Default: null). | ||
paramName // Name of the file parameter that gets transferred (Default: 'file'). | ||
maxFilesize // Maximum file size for the upload files in megabytes (Default: null). | ||
acceptedFiles // Comma separated list of mime types or file extensions (Default: null). | ||
showPrintMargin // Sets showing of the print margin (Default: false). | ||
printMarginColumn // Sets the column where the print margin should be. | ||
``` | ||
For more detailed documentation with all the supported Dropzone events / options see the Dropzone documentation. | ||
For more detailed documentation with all the supported config options see the Ace documentation. | ||
@@ -174,7 +142,12 @@ ##### Available control / helper functions (provided by the directive): | ||
```javascript | ||
dropzone() // Returns reference to the Dropzone instance for full API access. | ||
ace() // Returns the Ace instance reference for full API access. | ||
reset(cancel?) // Removes all processed files (optionally cancels uploads as well). | ||
clear() // Clears the editor document and resets text selection. | ||
getValue() // Returns the current text value of the editor document. | ||
setValue(value, cursorPos?) // Text value for the editor document. Cursor position: | ||
// 0 = select all, -1 = document start, 1 = document end. | ||
``` | ||
Above functions can be accessed through the directive reference (available as directiveRef in the component). |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
457928
0
3150
0
29
1
146
13
1
+ Added@angular/common@9.1.13(transitive)
+ Added@angular/core@9.1.13(transitive)
+ Addedrxjs@6.6.7(transitive)
+ Addedtslib@1.14.1(transitive)
+ Addedzone.js@0.10.3(transitive)
- Removeddropzone@^5.5.0
- Removed@angular/common@19.1.3(transitive)
- Removed@angular/core@19.1.3(transitive)
- Removeddropzone@5.9.3(transitive)
- Removedrxjs@7.8.1(transitive)
- Removedtslib@2.8.1(transitive)
- Removedzone.js@0.15.0(transitive)