nxt-dropzone-wrapper 14.0.0 → 16.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -135
- package/esm2020/lib/dropzone.component.mjs +78 -80
- package/esm2020/lib/dropzone.directive.mjs +206 -139
- package/esm2020/lib/dropzone.interfaces.mjs +35 -20
- package/esm2020/lib/dropzone.module.mjs +19 -9
- package/esm2020/nxt-dropzone-wrapper.mjs +1 -1
- package/esm2020/public-api.mjs +2 -2
- package/fesm2015/nxt-dropzone-wrapper.mjs +305 -241
- package/fesm2015/nxt-dropzone-wrapper.mjs.map +1 -1
- package/fesm2020/nxt-dropzone-wrapper.mjs +332 -239
- package/fesm2020/nxt-dropzone-wrapper.mjs.map +1 -1
- package/index.d.ts +0 -1
- package/lib/dropzone.component.d.ts +43 -37
- package/lib/dropzone.directive.d.ts +63 -47
- package/lib/dropzone.interfaces.d.ts +59 -139
- package/lib/dropzone.module.d.ts +1 -2
- package/package.json +9 -11
- package/public-api.d.ts +1 -2
- package/lib/dropzone.component.d.ts.map +0 -1
- package/lib/dropzone.directive.d.ts.map +0 -1
- package/lib/dropzone.interfaces.d.ts.map +0 -1
- package/lib/dropzone.module.d.ts.map +0 -1
- package/nxt-dropzone-wrapper.d.ts.map +0 -1
- package/public-api.d.ts.map +0 -1
|
@@ -1,49 +1,62 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, EventEmitter, PLATFORM_ID, Directive, Inject, Optional, Input, Output, Component, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, EventEmitter, PLATFORM_ID, Directive, Inject, Optional, Input, Output, HostBinding, forwardRef, Component, ViewEncapsulation, ViewChild, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { isPlatformBrowser, CommonModule } from '@angular/common';
|
|
5
|
-
import
|
|
5
|
+
import Dropzone from 'dropzone';
|
|
6
6
|
|
|
7
|
-
const
|
|
7
|
+
const NXT_DROPZONE_CONFIG = new InjectionToken('NXT_DROPZONE_CONFIG');
|
|
8
|
+
/** @internal */
|
|
8
9
|
const DropzoneEvents = [
|
|
9
|
-
'
|
|
10
|
-
'success',
|
|
11
|
-
'sending',
|
|
12
|
-
'canceled',
|
|
13
|
-
'complete',
|
|
14
|
-
'processing',
|
|
10
|
+
'init',
|
|
15
11
|
'drop',
|
|
16
12
|
'dragStart',
|
|
17
13
|
'dragEnd',
|
|
18
14
|
'dragEnter',
|
|
19
15
|
'dragOver',
|
|
20
16
|
'dragLeave',
|
|
21
|
-
'
|
|
17
|
+
'paste',
|
|
18
|
+
'reset',
|
|
22
19
|
'addedFile',
|
|
23
20
|
'addedFiles',
|
|
24
21
|
'removedFile',
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'maxFilesExceeded',
|
|
22
|
+
'thumbnail',
|
|
23
|
+
'error',
|
|
28
24
|
'errorMultiple',
|
|
29
|
-
'
|
|
25
|
+
'processing',
|
|
26
|
+
'processingMultiple',
|
|
27
|
+
'uploadProgress',
|
|
28
|
+
'totalUploadProgress',
|
|
29
|
+
'sending',
|
|
30
30
|
'sendingMultiple',
|
|
31
|
+
'success',
|
|
32
|
+
'successMultiple',
|
|
33
|
+
'canceled',
|
|
31
34
|
'canceledMultiple',
|
|
35
|
+
'complete',
|
|
32
36
|
'completeMultiple',
|
|
33
|
-
'
|
|
34
|
-
'
|
|
35
|
-
'queueComplete'
|
|
36
|
-
'totalUploadProgress'
|
|
37
|
+
'maxFilesExceeded',
|
|
38
|
+
'maxFilesReached',
|
|
39
|
+
'queueComplete'
|
|
37
40
|
];
|
|
38
|
-
|
|
41
|
+
/** @internal */
|
|
42
|
+
const internalChanges = new Set([
|
|
43
|
+
'autoReset',
|
|
44
|
+
'errorReset',
|
|
45
|
+
'cancelReset'
|
|
46
|
+
]);
|
|
47
|
+
/** @internal */
|
|
48
|
+
class _DropzoneConfig {
|
|
39
49
|
constructor(config = {}) {
|
|
40
50
|
this.assign(config);
|
|
41
51
|
}
|
|
42
52
|
assign(config = {}, target) {
|
|
43
53
|
target = target || this;
|
|
44
54
|
for (const key in config) {
|
|
45
|
-
if (config[key] != null
|
|
46
|
-
|
|
55
|
+
if (config[key] != null
|
|
56
|
+
&& config[key] != undefined
|
|
57
|
+
&& !Array.isArray(config[key])
|
|
58
|
+
&& typeof config[key] === 'object'
|
|
59
|
+
&& !(config[key] instanceof HTMLElement)) {
|
|
47
60
|
target[key] = {};
|
|
48
61
|
this.assign(config[key], target[key]);
|
|
49
62
|
}
|
|
@@ -52,85 +65,153 @@ class DropzoneConfig {
|
|
|
52
65
|
}
|
|
53
66
|
}
|
|
54
67
|
}
|
|
55
|
-
}
|
|
68
|
+
}
|
|
69
|
+
/** @internal */
|
|
70
|
+
const NXT_DROPZONE_LISTENERS = new InjectionToken('NXT_DROPZONE_LISTENERS');
|
|
56
71
|
|
|
57
|
-
|
|
58
|
-
const Dropzone = _dz.Dropzone;
|
|
72
|
+
/* eslint-disable @angular-eslint/no-output-rename */
|
|
59
73
|
class DropzoneDirective {
|
|
60
|
-
|
|
74
|
+
/** Disables / detaches Dropzone from the element */
|
|
75
|
+
set disabled(val) {
|
|
76
|
+
val = !!val;
|
|
77
|
+
if (val != this._disabled && this.instance) {
|
|
78
|
+
if (val)
|
|
79
|
+
this.zone.runOutsideAngular(() => {
|
|
80
|
+
this.instance.disable();
|
|
81
|
+
});
|
|
82
|
+
else
|
|
83
|
+
this.zone.runOutsideAngular(() => {
|
|
84
|
+
this.instance.enable();
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
this._disabled = val;
|
|
88
|
+
}
|
|
89
|
+
get disabled() {
|
|
90
|
+
return this._disabled;
|
|
91
|
+
}
|
|
92
|
+
get dropzone() {
|
|
93
|
+
return this.instance;
|
|
94
|
+
}
|
|
95
|
+
/** @internal */
|
|
96
|
+
get isSingle() {
|
|
97
|
+
return this._params.maxFiles === 1;
|
|
98
|
+
}
|
|
99
|
+
/** @internal */
|
|
100
|
+
get isMultiple() {
|
|
101
|
+
return this._params.maxFiles !== 1;
|
|
102
|
+
}
|
|
103
|
+
constructor(zone, elementRef, differs, platformId, defaults, component) {
|
|
104
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35;
|
|
61
105
|
this.zone = zone;
|
|
62
|
-
this.renderer = renderer;
|
|
63
106
|
this.elementRef = elementRef;
|
|
64
107
|
this.differs = differs;
|
|
65
108
|
this.platformId = platformId;
|
|
66
109
|
this.defaults = defaults;
|
|
67
|
-
this.
|
|
68
|
-
this.
|
|
69
|
-
this.
|
|
70
|
-
this.
|
|
71
|
-
this.
|
|
72
|
-
this.
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
77
|
-
this.
|
|
78
|
-
this.
|
|
79
|
-
this.
|
|
80
|
-
this.
|
|
81
|
-
this.
|
|
82
|
-
this.
|
|
83
|
-
this.
|
|
84
|
-
this.
|
|
85
|
-
this.
|
|
86
|
-
this.
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.
|
|
90
|
-
this.
|
|
91
|
-
this.
|
|
92
|
-
this.
|
|
93
|
-
this.
|
|
94
|
-
this.
|
|
95
|
-
this.
|
|
96
|
-
this.
|
|
97
|
-
this.
|
|
98
|
-
|
|
99
|
-
|
|
110
|
+
this.component = component;
|
|
111
|
+
this._disabled = false;
|
|
112
|
+
this._params = new _DropzoneConfig(this.defaults);
|
|
113
|
+
this.configDiff = this.differs.find(this.config || {}).create();
|
|
114
|
+
this.paramDiff = this.differs.find(this._params).create();
|
|
115
|
+
this.DZ_INIT = (_b = (_a = this.component) === null || _a === void 0 ? void 0 : _a.DZ_INIT) !== null && _b !== void 0 ? _b : new EventEmitter();
|
|
116
|
+
this.DZ_DROP = (_d = (_c = this.component) === null || _c === void 0 ? void 0 : _c.DZ_DROP) !== null && _d !== void 0 ? _d : new EventEmitter();
|
|
117
|
+
this.DZ_DRAGSTART = (_f = (_e = this.component) === null || _e === void 0 ? void 0 : _e.DZ_DRAGSTART) !== null && _f !== void 0 ? _f : new EventEmitter();
|
|
118
|
+
this.DZ_DRAGEND = (_h = (_g = this.component) === null || _g === void 0 ? void 0 : _g.DZ_DRAGEND) !== null && _h !== void 0 ? _h : new EventEmitter();
|
|
119
|
+
this.DZ_DRAGENTER = (_k = (_j = this.component) === null || _j === void 0 ? void 0 : _j.DZ_DRAGENTER) !== null && _k !== void 0 ? _k : new EventEmitter();
|
|
120
|
+
this.DZ_DRAGOVER = (_m = (_l = this.component) === null || _l === void 0 ? void 0 : _l.DZ_DRAGOVER) !== null && _m !== void 0 ? _m : new EventEmitter();
|
|
121
|
+
this.DZ_DRAGLEAVE = (_p = (_o = this.component) === null || _o === void 0 ? void 0 : _o.DZ_DRAGLEAVE) !== null && _p !== void 0 ? _p : new EventEmitter();
|
|
122
|
+
this.DZ_PASTE = (_r = (_q = this.component) === null || _q === void 0 ? void 0 : _q.DZ_PASTE) !== null && _r !== void 0 ? _r : new EventEmitter();
|
|
123
|
+
this.DZ_RESET = (_t = (_s = this.component) === null || _s === void 0 ? void 0 : _s.DZ_RESET) !== null && _t !== void 0 ? _t : new EventEmitter();
|
|
124
|
+
this.DZ_ADDEDFILE = (_v = (_u = this.component) === null || _u === void 0 ? void 0 : _u.DZ_ADDEDFILE) !== null && _v !== void 0 ? _v : new EventEmitter();
|
|
125
|
+
this.DZ_ADDEDFILES = (_x = (_w = this.component) === null || _w === void 0 ? void 0 : _w.DZ_ADDEDFILES) !== null && _x !== void 0 ? _x : new EventEmitter();
|
|
126
|
+
this.DZ_REMOVEDFILE = (_z = (_y = this.component) === null || _y === void 0 ? void 0 : _y.DZ_REMOVEDFILE) !== null && _z !== void 0 ? _z : new EventEmitter();
|
|
127
|
+
this.DZ_THUMBNAIL = (_1 = (_0 = this.component) === null || _0 === void 0 ? void 0 : _0.DZ_THUMBNAIL) !== null && _1 !== void 0 ? _1 : new EventEmitter();
|
|
128
|
+
this.DZ_ERROR = (_3 = (_2 = this.component) === null || _2 === void 0 ? void 0 : _2.DZ_ERROR) !== null && _3 !== void 0 ? _3 : new EventEmitter();
|
|
129
|
+
this.DZ_ERRORMULTIPLE = (_5 = (_4 = this.component) === null || _4 === void 0 ? void 0 : _4.DZ_ERRORMULTIPLE) !== null && _5 !== void 0 ? _5 : new EventEmitter();
|
|
130
|
+
this.DZ_PROCESSING = (_7 = (_6 = this.component) === null || _6 === void 0 ? void 0 : _6.DZ_PROCESSING) !== null && _7 !== void 0 ? _7 : new EventEmitter();
|
|
131
|
+
this.DZ_PROCESSINGMULTIPLE = (_9 = (_8 = this.component) === null || _8 === void 0 ? void 0 : _8.DZ_PROCESSINGMULTIPLE) !== null && _9 !== void 0 ? _9 : new EventEmitter();
|
|
132
|
+
this.DZ_UPLOADPROGRESS = (_11 = (_10 = this.component) === null || _10 === void 0 ? void 0 : _10.DZ_UPLOADPROGRESS) !== null && _11 !== void 0 ? _11 : new EventEmitter();
|
|
133
|
+
this.DZ_TOTALUPLOADPROGRESS = (_13 = (_12 = this.component) === null || _12 === void 0 ? void 0 : _12.DZ_TOTALUPLOADPROGRESS) !== null && _13 !== void 0 ? _13 : new EventEmitter();
|
|
134
|
+
this.DZ_SENDING = (_15 = (_14 = this.component) === null || _14 === void 0 ? void 0 : _14.DZ_SENDING) !== null && _15 !== void 0 ? _15 : new EventEmitter();
|
|
135
|
+
this.DZ_SENDINGMULTIPLE = (_17 = (_16 = this.component) === null || _16 === void 0 ? void 0 : _16.DZ_SENDINGMULTIPLE) !== null && _17 !== void 0 ? _17 : new EventEmitter();
|
|
136
|
+
this.DZ_SUCCESS = (_19 = (_18 = this.component) === null || _18 === void 0 ? void 0 : _18.DZ_SUCCESS) !== null && _19 !== void 0 ? _19 : new EventEmitter();
|
|
137
|
+
this.DZ_SUCCESSMULTIPLE = (_21 = (_20 = this.component) === null || _20 === void 0 ? void 0 : _20.DZ_SUCCESSMULTIPLE) !== null && _21 !== void 0 ? _21 : new EventEmitter();
|
|
138
|
+
this.DZ_CANCELED = (_23 = (_22 = this.component) === null || _22 === void 0 ? void 0 : _22.DZ_CANCELED) !== null && _23 !== void 0 ? _23 : new EventEmitter();
|
|
139
|
+
this.DZ_CANCELEDMULTIPLE = (_25 = (_24 = this.component) === null || _24 === void 0 ? void 0 : _24.DZ_CANCELEDMULTIPLE) !== null && _25 !== void 0 ? _25 : new EventEmitter();
|
|
140
|
+
this.DZ_COMPLETE = (_27 = (_26 = this.component) === null || _26 === void 0 ? void 0 : _26.DZ_COMPLETE) !== null && _27 !== void 0 ? _27 : new EventEmitter();
|
|
141
|
+
this.DZ_COMPLETEMULTIPLE = (_29 = (_28 = this.component) === null || _28 === void 0 ? void 0 : _28.DZ_COMPLETEMULTIPLE) !== null && _29 !== void 0 ? _29 : new EventEmitter();
|
|
142
|
+
this.DZ_MAXFILESEXCEEDED = (_31 = (_30 = this.component) === null || _30 === void 0 ? void 0 : _30.DZ_MAXFILESEXCEEDED) !== null && _31 !== void 0 ? _31 : new EventEmitter();
|
|
143
|
+
this.DZ_MAXFILESREACHED = (_33 = (_32 = this.component) === null || _32 === void 0 ? void 0 : _32.DZ_MAXFILESREACHED) !== null && _33 !== void 0 ? _33 : new EventEmitter();
|
|
144
|
+
this.DZ_QUEUECOMPLETE = (_35 = (_34 = this.component) === null || _34 === void 0 ? void 0 : _34.DZ_QUEUECOMPLETE) !== null && _35 !== void 0 ? _35 : new EventEmitter();
|
|
100
145
|
}
|
|
146
|
+
/** @internal */
|
|
101
147
|
ngOnInit() {
|
|
148
|
+
this.initInstance();
|
|
149
|
+
}
|
|
150
|
+
/** @internal */
|
|
151
|
+
ngOnDestroy() {
|
|
152
|
+
this.destroyInstance();
|
|
153
|
+
}
|
|
154
|
+
/** @internal */
|
|
155
|
+
ngDoCheck() {
|
|
156
|
+
const changes = this.configDiff.diff(this.config || {});
|
|
157
|
+
if (changes) {
|
|
158
|
+
const newParams = new _DropzoneConfig(this.defaults);
|
|
159
|
+
newParams.assign(this.config);
|
|
160
|
+
const d = this.paramDiff.diff(newParams);
|
|
161
|
+
if (d) {
|
|
162
|
+
this._params = newParams;
|
|
163
|
+
let hasChanges = false;
|
|
164
|
+
d.forEachItem(r => {
|
|
165
|
+
if (!internalChanges.has(r.key) && r.currentValue !== r.previousValue)
|
|
166
|
+
hasChanges = true;
|
|
167
|
+
});
|
|
168
|
+
if (hasChanges && this.instance) {
|
|
169
|
+
this.destroyInstance();
|
|
170
|
+
this.initInstance();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/** @internal */
|
|
176
|
+
reset(cancel) {
|
|
177
|
+
if (this.instance) {
|
|
178
|
+
this.zone.runOutsideAngular(() => {
|
|
179
|
+
this.instance.removeAllFiles(cancel);
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
initInstance() {
|
|
102
184
|
if (!isPlatformBrowser(this.platformId)) {
|
|
103
185
|
return;
|
|
104
186
|
}
|
|
105
|
-
const params = new DropzoneConfig(this.defaults);
|
|
106
|
-
params.assign(this.config); // Custom configuration
|
|
107
|
-
this.renderer.addClass(this.elementRef.nativeElement, (params.maxFiles === 1) ? 'dz-single' : 'dz-multiple');
|
|
108
|
-
this.renderer.removeClass(this.elementRef.nativeElement, (params.maxFiles === 1) ? 'dz-multiple' : 'dz-single');
|
|
109
187
|
this.zone.runOutsideAngular(() => {
|
|
110
|
-
this.instance = new Dropzone(this.elementRef.nativeElement,
|
|
188
|
+
this.instance = new Dropzone(this.elementRef.nativeElement, this._params);
|
|
111
189
|
});
|
|
112
190
|
if (this.disabled) {
|
|
113
191
|
this.instance.disable();
|
|
114
192
|
}
|
|
115
|
-
if (this.DZ_INIT.
|
|
193
|
+
if (this.DZ_INIT.observed) {
|
|
116
194
|
this.zone.run(() => {
|
|
117
195
|
this.DZ_INIT.emit(this.instance);
|
|
118
196
|
});
|
|
119
197
|
}
|
|
120
198
|
// Add auto reset handling for events
|
|
121
199
|
this.instance.on('success', () => {
|
|
122
|
-
|
|
123
|
-
|
|
200
|
+
var _a;
|
|
201
|
+
if (((_a = this._params.autoReset) !== null && _a !== void 0 ? _a : -1) >= 0) {
|
|
202
|
+
setTimeout(() => this.reset(), this._params.autoReset);
|
|
124
203
|
}
|
|
125
204
|
});
|
|
126
205
|
this.instance.on('error', () => {
|
|
127
|
-
|
|
128
|
-
|
|
206
|
+
var _a;
|
|
207
|
+
if (((_a = this._params.errorReset) !== null && _a !== void 0 ? _a : -1) >= 0) {
|
|
208
|
+
setTimeout(() => this.reset(), this._params.errorReset);
|
|
129
209
|
}
|
|
130
210
|
});
|
|
131
211
|
this.instance.on('canceled', () => {
|
|
132
|
-
|
|
133
|
-
|
|
212
|
+
var _a;
|
|
213
|
+
if (((_a = this._params.cancelReset) !== null && _a !== void 0 ? _a : -1) >= 0) {
|
|
214
|
+
setTimeout(() => this.reset(), this._params.cancelReset);
|
|
134
215
|
}
|
|
135
216
|
});
|
|
136
217
|
// Add native Dropzone event handling
|
|
@@ -139,106 +220,54 @@ class DropzoneDirective {
|
|
|
139
220
|
args = (args.length === 1) ? args[0] : args;
|
|
140
221
|
const output = `DZ_${eventName.toUpperCase()}`;
|
|
141
222
|
const emitter = this[output];
|
|
142
|
-
if (emitter.
|
|
223
|
+
if (emitter.observed) {
|
|
143
224
|
this.zone.run(() => {
|
|
144
225
|
emitter.emit(args);
|
|
145
226
|
});
|
|
146
227
|
}
|
|
147
228
|
});
|
|
148
229
|
});
|
|
149
|
-
if (!this.configDiff) {
|
|
150
|
-
this.configDiff = this.differs.find(this.config || {}).create();
|
|
151
|
-
this.configDiff.diff(this.config || {});
|
|
152
|
-
}
|
|
153
230
|
}
|
|
154
|
-
|
|
231
|
+
destroyInstance() {
|
|
155
232
|
if (this.instance) {
|
|
156
233
|
this.zone.runOutsideAngular(() => {
|
|
157
234
|
this.instance.destroy();
|
|
158
235
|
});
|
|
159
|
-
this.instance =
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
ngDoCheck() {
|
|
163
|
-
if (!this.disabled && this.configDiff) {
|
|
164
|
-
const changes = this.configDiff.diff(this.config || {});
|
|
165
|
-
if (changes && this.instance) {
|
|
166
|
-
this.ngOnDestroy();
|
|
167
|
-
this.ngOnInit();
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
ngOnChanges(changes) {
|
|
172
|
-
if (this.instance && changes['disabled']) {
|
|
173
|
-
if (changes['disabled'].currentValue !== changes['disabled'].previousValue) {
|
|
174
|
-
if (changes['disabled'].currentValue === false) {
|
|
175
|
-
this.zone.runOutsideAngular(() => {
|
|
176
|
-
this.instance.enable();
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
|
-
else if (changes['disabled'].currentValue === true) {
|
|
180
|
-
this.zone.runOutsideAngular(() => {
|
|
181
|
-
this.instance.disable();
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
dropzone() {
|
|
188
|
-
return this.instance;
|
|
189
|
-
}
|
|
190
|
-
reset(cancel) {
|
|
191
|
-
if (this.instance) {
|
|
192
|
-
this.zone.runOutsideAngular(() => {
|
|
193
|
-
this.instance.removeAllFiles(cancel);
|
|
194
|
-
});
|
|
236
|
+
this.instance = undefined;
|
|
195
237
|
}
|
|
196
238
|
}
|
|
197
239
|
}
|
|
198
|
-
DropzoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
199
|
-
DropzoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
240
|
+
DropzoneDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DropzoneDirective, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.KeyValueDiffers }, { token: PLATFORM_ID }, { token: NXT_DROPZONE_CONFIG, optional: true }, { token: NXT_DROPZONE_LISTENERS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
241
|
+
DropzoneDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.3", type: DropzoneDirective, selector: "[nxtDropzone]", inputs: { disabled: "disabled", config: ["nxtDropzone", "config"] }, outputs: { DZ_INIT: "init", DZ_DROP: "drop", DZ_DRAGSTART: "dragStart", DZ_DRAGEND: "dragEnd", DZ_DRAGENTER: "dragEnter", DZ_DRAGOVER: "dragOver", DZ_DRAGLEAVE: "dragLeave", DZ_PASTE: "paste", DZ_RESET: "reset", DZ_ADDEDFILE: "addedFile", DZ_ADDEDFILES: "addedFiles", DZ_REMOVEDFILE: "removedFile", DZ_THUMBNAIL: "thumbnail", DZ_ERROR: "error", DZ_ERRORMULTIPLE: "errorMultiple", DZ_PROCESSING: "processing", DZ_PROCESSINGMULTIPLE: "processingMultiple", DZ_UPLOADPROGRESS: "uploadProgress", DZ_TOTALUPLOADPROGRESS: "totalUploadProgress", DZ_SENDING: "sending", DZ_SENDINGMULTIPLE: "sendingMultiple", DZ_SUCCESS: "success", DZ_SUCCESSMULTIPLE: "successMultiple", DZ_CANCELED: "canceled", DZ_CANCELEDMULTIPLE: "canceledMultiple", DZ_COMPLETE: "complete", DZ_COMPLETEMULTIPLE: "completeMultiple", DZ_MAXFILESEXCEEDED: "maxFilesExceeded", DZ_MAXFILESREACHED: "maxFilesReached", DZ_QUEUECOMPLETE: "queueComplete" }, host: { properties: { "class.dz-single": "this.isSingle", "class.dz-multiple": "this.isMultiple" } }, exportAs: ["nxtDropzone"], ngImport: i0 });
|
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DropzoneDirective, decorators: [{
|
|
201
243
|
type: Directive,
|
|
202
244
|
args: [{
|
|
203
|
-
selector: '[
|
|
204
|
-
exportAs: '
|
|
245
|
+
selector: '[nxtDropzone]',
|
|
246
|
+
exportAs: 'nxtDropzone'
|
|
205
247
|
}]
|
|
206
248
|
}], ctorParameters: function () {
|
|
207
|
-
return [{ type: i0.NgZone }, { type: i0.
|
|
249
|
+
return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.KeyValueDiffers }, { type: Object, decorators: [{
|
|
208
250
|
type: Inject,
|
|
209
251
|
args: [PLATFORM_ID]
|
|
210
252
|
}] }, { type: undefined, decorators: [{
|
|
211
253
|
type: Optional
|
|
212
254
|
}, {
|
|
213
255
|
type: Inject,
|
|
214
|
-
args: [
|
|
256
|
+
args: [NXT_DROPZONE_CONFIG]
|
|
257
|
+
}] }, { type: undefined, decorators: [{
|
|
258
|
+
type: Optional
|
|
259
|
+
}, {
|
|
260
|
+
type: Inject,
|
|
261
|
+
args: [NXT_DROPZONE_LISTENERS]
|
|
215
262
|
}] }];
|
|
216
263
|
}, propDecorators: { disabled: [{
|
|
217
264
|
type: Input
|
|
218
265
|
}], config: [{
|
|
219
266
|
type: Input,
|
|
220
|
-
args: ['
|
|
267
|
+
args: ['nxtDropzone']
|
|
221
268
|
}], DZ_INIT: [{
|
|
222
269
|
type: Output,
|
|
223
270
|
args: ['init']
|
|
224
|
-
}], DZ_ERROR: [{
|
|
225
|
-
type: Output,
|
|
226
|
-
args: ['error']
|
|
227
|
-
}], DZ_SUCCESS: [{
|
|
228
|
-
type: Output,
|
|
229
|
-
args: ['success']
|
|
230
|
-
}], DZ_SENDING: [{
|
|
231
|
-
type: Output,
|
|
232
|
-
args: ['sending']
|
|
233
|
-
}], DZ_CANCELED: [{
|
|
234
|
-
type: Output,
|
|
235
|
-
args: ['canceled']
|
|
236
|
-
}], DZ_COMPLETE: [{
|
|
237
|
-
type: Output,
|
|
238
|
-
args: ['complete']
|
|
239
|
-
}], DZ_PROCESSING: [{
|
|
240
|
-
type: Output,
|
|
241
|
-
args: ['processing']
|
|
242
271
|
}], DZ_DROP: [{
|
|
243
272
|
type: Output,
|
|
244
273
|
args: ['drop']
|
|
@@ -257,9 +286,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
257
286
|
}], DZ_DRAGLEAVE: [{
|
|
258
287
|
type: Output,
|
|
259
288
|
args: ['dragLeave']
|
|
260
|
-
}],
|
|
289
|
+
}], DZ_PASTE: [{
|
|
261
290
|
type: Output,
|
|
262
|
-
args: ['
|
|
291
|
+
args: ['paste']
|
|
292
|
+
}], DZ_RESET: [{
|
|
293
|
+
type: Output,
|
|
294
|
+
args: ['reset']
|
|
263
295
|
}], DZ_ADDEDFILE: [{
|
|
264
296
|
type: Output,
|
|
265
297
|
args: ['addedFile']
|
|
@@ -269,111 +301,130 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
269
301
|
}], DZ_REMOVEDFILE: [{
|
|
270
302
|
type: Output,
|
|
271
303
|
args: ['removedFile']
|
|
304
|
+
}], DZ_THUMBNAIL: [{
|
|
305
|
+
type: Output,
|
|
306
|
+
args: ['thumbnail']
|
|
307
|
+
}], DZ_ERROR: [{
|
|
308
|
+
type: Output,
|
|
309
|
+
args: ['error']
|
|
310
|
+
}], DZ_ERRORMULTIPLE: [{
|
|
311
|
+
type: Output,
|
|
312
|
+
args: ['errorMultiple']
|
|
313
|
+
}], DZ_PROCESSING: [{
|
|
314
|
+
type: Output,
|
|
315
|
+
args: ['processing']
|
|
316
|
+
}], DZ_PROCESSINGMULTIPLE: [{
|
|
317
|
+
type: Output,
|
|
318
|
+
args: ['processingMultiple']
|
|
272
319
|
}], DZ_UPLOADPROGRESS: [{
|
|
273
320
|
type: Output,
|
|
274
321
|
args: ['uploadProgress']
|
|
275
|
-
}],
|
|
322
|
+
}], DZ_TOTALUPLOADPROGRESS: [{
|
|
276
323
|
type: Output,
|
|
277
|
-
args: ['
|
|
278
|
-
}],
|
|
324
|
+
args: ['totalUploadProgress']
|
|
325
|
+
}], DZ_SENDING: [{
|
|
279
326
|
type: Output,
|
|
280
|
-
args: ['
|
|
281
|
-
}],
|
|
327
|
+
args: ['sending']
|
|
328
|
+
}], DZ_SENDINGMULTIPLE: [{
|
|
282
329
|
type: Output,
|
|
283
|
-
args: ['
|
|
330
|
+
args: ['sendingMultiple']
|
|
331
|
+
}], DZ_SUCCESS: [{
|
|
332
|
+
type: Output,
|
|
333
|
+
args: ['success']
|
|
284
334
|
}], DZ_SUCCESSMULTIPLE: [{
|
|
285
335
|
type: Output,
|
|
286
336
|
args: ['successMultiple']
|
|
287
|
-
}],
|
|
337
|
+
}], DZ_CANCELED: [{
|
|
288
338
|
type: Output,
|
|
289
|
-
args: ['
|
|
339
|
+
args: ['canceled']
|
|
290
340
|
}], DZ_CANCELEDMULTIPLE: [{
|
|
291
341
|
type: Output,
|
|
292
342
|
args: ['canceledMultiple']
|
|
343
|
+
}], DZ_COMPLETE: [{
|
|
344
|
+
type: Output,
|
|
345
|
+
args: ['complete']
|
|
293
346
|
}], DZ_COMPLETEMULTIPLE: [{
|
|
294
347
|
type: Output,
|
|
295
348
|
args: ['completeMultiple']
|
|
296
|
-
}],
|
|
349
|
+
}], DZ_MAXFILESEXCEEDED: [{
|
|
297
350
|
type: Output,
|
|
298
|
-
args: ['
|
|
299
|
-
}],
|
|
351
|
+
args: ['maxFilesExceeded']
|
|
352
|
+
}], DZ_MAXFILESREACHED: [{
|
|
300
353
|
type: Output,
|
|
301
|
-
args: ['
|
|
354
|
+
args: ['maxFilesReached']
|
|
302
355
|
}], DZ_QUEUECOMPLETE: [{
|
|
303
356
|
type: Output,
|
|
304
357
|
args: ['queueComplete']
|
|
305
|
-
}],
|
|
306
|
-
type:
|
|
307
|
-
args: ['
|
|
358
|
+
}], isSingle: [{
|
|
359
|
+
type: HostBinding,
|
|
360
|
+
args: ['class.dz-single']
|
|
361
|
+
}], isMultiple: [{
|
|
362
|
+
type: HostBinding,
|
|
363
|
+
args: ['class.dz-multiple']
|
|
308
364
|
}] } });
|
|
309
365
|
|
|
366
|
+
/* eslint-disable @angular-eslint/no-output-rename */
|
|
310
367
|
class DropzoneComponent {
|
|
311
|
-
constructor(
|
|
312
|
-
|
|
368
|
+
constructor() {
|
|
369
|
+
/** Disables / detaches Dropzone from the element */
|
|
313
370
|
this.disabled = false;
|
|
371
|
+
/** Message to show for the user on the upload area */
|
|
314
372
|
this.message = 'Click or drag files to upload';
|
|
373
|
+
/** Placeholder image to be shown as the upload area */
|
|
315
374
|
this.placeholder = '';
|
|
375
|
+
/** Use 'dropzone' class (use provided default styles) */
|
|
316
376
|
this.useDropzoneClass = true;
|
|
317
377
|
this.DZ_INIT = new EventEmitter();
|
|
318
|
-
this.DZ_ERROR = new EventEmitter();
|
|
319
|
-
this.DZ_SUCCESS = new EventEmitter();
|
|
320
|
-
this.DZ_SENDING = new EventEmitter();
|
|
321
|
-
this.DZ_CANCELED = new EventEmitter();
|
|
322
|
-
this.DZ_COMPLETE = new EventEmitter();
|
|
323
|
-
this.DZ_PROCESSING = new EventEmitter();
|
|
324
378
|
this.DZ_DROP = new EventEmitter();
|
|
325
379
|
this.DZ_DRAGSTART = new EventEmitter();
|
|
326
380
|
this.DZ_DRAGEND = new EventEmitter();
|
|
327
381
|
this.DZ_DRAGENTER = new EventEmitter();
|
|
328
382
|
this.DZ_DRAGOVER = new EventEmitter();
|
|
329
383
|
this.DZ_DRAGLEAVE = new EventEmitter();
|
|
330
|
-
this.
|
|
384
|
+
this.DZ_PASTE = new EventEmitter();
|
|
385
|
+
this.DZ_RESET = new EventEmitter();
|
|
331
386
|
this.DZ_ADDEDFILE = new EventEmitter();
|
|
332
387
|
this.DZ_ADDEDFILES = new EventEmitter();
|
|
333
388
|
this.DZ_REMOVEDFILE = new EventEmitter();
|
|
334
|
-
this.
|
|
335
|
-
this.
|
|
336
|
-
this.DZ_MAXFILESEXCEEDED = new EventEmitter();
|
|
389
|
+
this.DZ_THUMBNAIL = new EventEmitter();
|
|
390
|
+
this.DZ_ERROR = new EventEmitter();
|
|
337
391
|
this.DZ_ERRORMULTIPLE = new EventEmitter();
|
|
338
|
-
this.
|
|
392
|
+
this.DZ_PROCESSING = new EventEmitter();
|
|
393
|
+
this.DZ_PROCESSINGMULTIPLE = new EventEmitter();
|
|
394
|
+
this.DZ_UPLOADPROGRESS = new EventEmitter();
|
|
395
|
+
this.DZ_TOTALUPLOADPROGRESS = new EventEmitter();
|
|
396
|
+
this.DZ_SENDING = new EventEmitter();
|
|
339
397
|
this.DZ_SENDINGMULTIPLE = new EventEmitter();
|
|
398
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
399
|
+
this.DZ_SUCCESS = new EventEmitter();
|
|
400
|
+
this.DZ_SUCCESSMULTIPLE = new EventEmitter();
|
|
401
|
+
this.DZ_CANCELED = new EventEmitter();
|
|
340
402
|
this.DZ_CANCELEDMULTIPLE = new EventEmitter();
|
|
403
|
+
this.DZ_COMPLETE = new EventEmitter();
|
|
341
404
|
this.DZ_COMPLETEMULTIPLE = new EventEmitter();
|
|
342
|
-
this.
|
|
343
|
-
this.
|
|
405
|
+
this.DZ_MAXFILESEXCEEDED = new EventEmitter();
|
|
406
|
+
this.DZ_MAXFILESREACHED = new EventEmitter();
|
|
344
407
|
this.DZ_QUEUECOMPLETE = new EventEmitter();
|
|
345
|
-
this.DZ_TOTALUPLOADPROGRESS = new EventEmitter();
|
|
346
|
-
}
|
|
347
|
-
ngOnInit() {
|
|
348
|
-
if (!isPlatformBrowser(this.platformId)) {
|
|
349
|
-
return;
|
|
350
|
-
}
|
|
351
|
-
window.setTimeout(() => {
|
|
352
|
-
DropzoneEvents.forEach((eventName) => {
|
|
353
|
-
if (this.directiveRef) {
|
|
354
|
-
const output = `DZ_${eventName.toUpperCase()}`;
|
|
355
|
-
const directiveOutput = output;
|
|
356
|
-
const componentOutput = output;
|
|
357
|
-
this.directiveRef[directiveOutput] = this[componentOutput];
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
}, 0);
|
|
361
408
|
}
|
|
409
|
+
/** @internal */
|
|
410
|
+
ngOnInit() { }
|
|
411
|
+
/** @internal */
|
|
362
412
|
getPlaceholder() {
|
|
363
413
|
return 'url(' + encodeURI(this.placeholder) + ')';
|
|
364
414
|
}
|
|
365
415
|
}
|
|
366
|
-
DropzoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
367
|
-
DropzoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DropzoneComponent, selector: "dropzone", 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_ADDEDFILES: "addedFiles", DZ_REMOVEDFILE: "removedFile", DZ_UPLOADPROGRESS: "uploadProgress", DZ_MAXFILESREACHED: "maxFilesReached", DZ_MAXFILESEXCEEDED: "maxFilesExceeded", DZ_ERRORMULTIPLE: "errorMultiple", DZ_SUCCESSMULTIPLE: "successMultiple", DZ_SENDINGMULTIPLE: "sendingMultiple", DZ_CANCELEDMULTIPLE: "canceledMultiple", DZ_COMPLETEMULTIPLE: "completeMultiple", DZ_PROCESSINGMULTIPLE: "processingMultiple", DZ_RESET: "reset", DZ_QUEUECOMPLETE: "queueComplete", DZ_TOTALUPLOADPROGRESS: "totalUploadProgress" }, viewQueries: [{ propertyName: "directiveRef", first: true, predicate: DropzoneDirective, descendants: true, static: true }], exportAs: ["ngxDropzone"], ngImport: i0, 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", styles: ["dropzone{display:block;width:100%;height:auto}dropzone[fxflex]{display:flex;flex-direction:inherit;min-width:0;min-height:0}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:flex;flex-direction:column;align-items:center;align-content:center;justify-content:center;-webkit-box-align:center;-webkit-box-pack:center}dropzone[fxlayout]>.dropzone.dz-wrapper.dz-multiple{display:flex;flex-flow:row wrap;align-items:flex-start;align-content:flex-start;justify-content:space-between;-webkit-box-align:flex-start;-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:transparent}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;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);transform:translateY(-50%);transition:filter .25s ease-in-out,opacity .25s ease-in-out,border-color .25s 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{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%;transform:translate(-50%) translateY(100%)}dropzone>.dropzone.dz-wrapper.dz-multiple.dz-started .dz-message{display:inline-block}\n", "@keyframes passing-through{0%{opacity:0;transform:translateY(40px)}30%,70%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-40px)}}@keyframes slide-in{0%{opacity:0;transform:translateY(40px)}30%{opacity:1;transform:translateY(0)}}@keyframes pulse{0%{transform:scale(1)}10%{transform:scale(1.1)}20%{transform:scale(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-message .dz-button{background:none;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit}.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: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{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:#000000e6;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:#fffc}.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:#fff6;padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{transform:scale(1.05);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{animation:passing-through 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;animation:slide-in 3s cubic-bezier(.77,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;transition:all .2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{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,.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;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:block;display:none;opacity:0;transition:opacity .3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#be2626;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"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: DropzoneDirective, selector: "[dropzone]", inputs: ["disabled", "dropzone"], outputs: ["init", "error", "success", "sending", "canceled", "complete", "processing", "drop", "dragStart", "dragEnd", "dragEnter", "dragOver", "dragLeave", "thumbnail", "addedFile", "addedFiles", "removedFile", "uploadProgress", "maxFilesReached", "maxFilesExceeded", "errorMultiple", "successMultiple", "sendingMultiple", "canceledMultiple", "completeMultiple", "processingMultiple", "reset", "queueComplete", "totalUploadProgress"], exportAs: ["ngxDropzone"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
368
|
-
|
|
416
|
+
DropzoneComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DropzoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
417
|
+
DropzoneComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.3", type: DropzoneComponent, selector: "nxt-dropzone", inputs: { disabled: "disabled", config: "config", message: "message", placeholder: "placeholder", useDropzoneClass: "useDropzoneClass" }, outputs: { DZ_INIT: "init", DZ_DROP: "drop", DZ_DRAGSTART: "dragStart", DZ_DRAGEND: "dragEnd", DZ_DRAGENTER: "dragEnter", DZ_DRAGOVER: "dragOver", DZ_DRAGLEAVE: "dragLeave", DZ_PASTE: "paste", DZ_RESET: "reset", DZ_ADDEDFILE: "addedFile", DZ_ADDEDFILES: "addedFiles", DZ_REMOVEDFILE: "removedFile", DZ_THUMBNAIL: "thumbnail", DZ_ERROR: "error", DZ_ERRORMULTIPLE: "errorMultiple", DZ_PROCESSING: "processing", DZ_PROCESSINGMULTIPLE: "processingMultiple", DZ_UPLOADPROGRESS: "uploadProgress", DZ_TOTALUPLOADPROGRESS: "totalUploadProgress", DZ_SENDING: "sending", DZ_SENDINGMULTIPLE: "sendingMultiple", DZ_SUCCESS: "success", DZ_SUCCESSMULTIPLE: "successMultiple", DZ_CANCELED: "canceled", DZ_CANCELEDMULTIPLE: "canceledMultiple", DZ_COMPLETE: "complete", DZ_COMPLETEMULTIPLE: "completeMultiple", DZ_MAXFILESEXCEEDED: "maxFilesExceeded", DZ_MAXFILESREACHED: "maxFilesReached", DZ_QUEUECOMPLETE: "queueComplete" }, providers: [{
|
|
418
|
+
provide: NXT_DROPZONE_LISTENERS,
|
|
419
|
+
useValue: forwardRef(() => DropzoneComponent)
|
|
420
|
+
}], viewQueries: [{ propertyName: "directiveRef", first: true, predicate: DropzoneDirective, descendants: true }], ngImport: i0, template: "<div class=\"dz-wrapper\"\n [class.dropzone]=\"useDropzoneClass\"\n [nxtDropzone]=\"config\"\n [disabled]=\"disabled\">\n <div class=\"dz-message\"\n [class.disabled]=\"disabled\"\n [class.dz-placeholder]=\"placeholder\">\n <div class=\"dz-text\"\n [innerHTML]=\"config?.dictDefaultMessage || message\"></div>\n\n <div *ngIf=\"placeholder\"\n class=\"dz-image\"\n [style.background-image]=\"getPlaceholder()\"></div>\n </div>\n\n <ng-content></ng-content>\n</div>\n", styles: ["nxt-dropzone{display:flex;width:100%;height:auto}nxt-dropzone>.dropzone.dz-wrapper{overflow:auto;width:100%;min-height:0;max-height:100%;padding:0;border:none;color:#666;background:transparent;border-radius:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:16px}nxt-dropzone>.dropzone.dz-wrapper .dz-message{overflow:auto;min-height:60px;max-height:100%;border:2px dashed #aaa;background-color:#eee;display:flex;align-items:center;justify-content:center;margin:0;border-radius:5px;grid-column:span 2;grid-row:span 2}nxt-dropzone>.dropzone.dz-wrapper .dz-message .dz-text{padding:8px 16px;text-align:center}nxt-dropzone>.dropzone.dz-wrapper .dz-message .dz-image{width:100%;height:100%;background-size:contain;background-repeat:no-repeat;background-position:50% 50%}nxt-dropzone>.dropzone.dz-wrapper .dz-message.disabled{cursor:not-allowed}nxt-dropzone>.dropzone.dz-wrapper .dz-message.disabled .dz-text{opacity:.5}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder{position:relative;border-color:#aaa0;transition:border-color .25s ease-in-out}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder .dz-text{position:absolute;z-index:1;opacity:0;font-weight:700;background-color:#ffffff80;transition:filter .25s ease-in-out,opacity .25s ease-in-out}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled){border-color:#aaa}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-text{opacity:1}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-image{filter:blur(8px)}nxt-dropzone>.dropzone.dz-wrapper .dz-preview{margin:0}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-details{padding:24px}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-progress{width:80%;border:1px solid #aaa;border-radius:5px;overflow:hidden}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-progress .dz-upload{background-color:#666}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-filename span{display:block;overflow:hidden;width:100%;max-width:100%;text-overflow:ellipsis}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-filename span:hover{overflow:visible;white-space:normal;word-wrap:break-word}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-image{border-radius:5px;overflow:hidden;min-width:120px;min-height:120px;width:auto;height:auto}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-message{width:100%;height:100%}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-preview{width:100%;height:100%;grid-column:span 2;grid-row:span 2}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-preview .dz-image{width:100%;height:100%}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-preview .dz-image img{display:block;width:100%;height:auto;margin:0}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-error-message{top:50%;left:50%;transform:translate(-50%) translateY(100%)}nxt-dropzone>.dropzone.dz-wrapper.dz-single.dz-started .dz-message{display:none}nxt-dropzone>.dropzone.dz-wrapper.dz-multiple.dz-started .dz-message{display:flex}\n", "@keyframes passing-through{0%{opacity:0;transform:translateY(40px)}30%,70%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-40px)}}@keyframes slide-in{0%{opacity:0;transform:translateY(40px)}30%{opacity:1;transform:translateY(0)}}@keyframes pulse{0%{transform:scale(1)}10%{transform:scale(1.1)}20%{transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:1px solid rgba(0,0,0,.8);border-radius:5px;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:3em 0}.dropzone .dz-message .dz-button{background:none;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit}.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: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{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:#000000e6;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:#fffc}.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:#fff6;padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{transform:scale(1.05);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{animation:passing-through 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;animation:slide-in 3s cubic-bezier(.77,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;background:rgba(0,0,0,.8);border-radius:50%}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{display:block;width:54px;height:54px;fill:#fff}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;transition:all .2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:20px;top:50%;margin-top:-10px;left:15%;right:15%;border:3px solid rgba(0,0,0,.8);background:rgba(0,0,0,.8);border-radius:10px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#fff;display:block;position:relative;height:100%;width:0;transition:width .3s ease-in-out;border-radius:17px}.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;transition:opacity .3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#b10606;padding:.5em 1em;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 #b10606}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: DropzoneDirective, selector: "[nxtDropzone]", inputs: ["disabled", "nxtDropzone"], outputs: ["init", "drop", "dragStart", "dragEnd", "dragEnter", "dragOver", "dragLeave", "paste", "reset", "addedFile", "addedFiles", "removedFile", "thumbnail", "error", "errorMultiple", "processing", "processingMultiple", "uploadProgress", "totalUploadProgress", "sending", "sendingMultiple", "success", "successMultiple", "canceled", "canceledMultiple", "complete", "completeMultiple", "maxFilesExceeded", "maxFilesReached", "queueComplete"], exportAs: ["nxtDropzone"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
421
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DropzoneComponent, decorators: [{
|
|
369
422
|
type: Component,
|
|
370
|
-
args: [{ selector: 'dropzone',
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
}] }];
|
|
376
|
-
}, propDecorators: { disabled: [{
|
|
423
|
+
args: [{ selector: 'nxt-dropzone', encapsulation: ViewEncapsulation.None, providers: [{
|
|
424
|
+
provide: NXT_DROPZONE_LISTENERS,
|
|
425
|
+
useValue: forwardRef(() => DropzoneComponent)
|
|
426
|
+
}], template: "<div class=\"dz-wrapper\"\n [class.dropzone]=\"useDropzoneClass\"\n [nxtDropzone]=\"config\"\n [disabled]=\"disabled\">\n <div class=\"dz-message\"\n [class.disabled]=\"disabled\"\n [class.dz-placeholder]=\"placeholder\">\n <div class=\"dz-text\"\n [innerHTML]=\"config?.dictDefaultMessage || message\"></div>\n\n <div *ngIf=\"placeholder\"\n class=\"dz-image\"\n [style.background-image]=\"getPlaceholder()\"></div>\n </div>\n\n <ng-content></ng-content>\n</div>\n", styles: ["nxt-dropzone{display:flex;width:100%;height:auto}nxt-dropzone>.dropzone.dz-wrapper{overflow:auto;width:100%;min-height:0;max-height:100%;padding:0;border:none;color:#666;background:transparent;border-radius:0;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;gap:16px}nxt-dropzone>.dropzone.dz-wrapper .dz-message{overflow:auto;min-height:60px;max-height:100%;border:2px dashed #aaa;background-color:#eee;display:flex;align-items:center;justify-content:center;margin:0;border-radius:5px;grid-column:span 2;grid-row:span 2}nxt-dropzone>.dropzone.dz-wrapper .dz-message .dz-text{padding:8px 16px;text-align:center}nxt-dropzone>.dropzone.dz-wrapper .dz-message .dz-image{width:100%;height:100%;background-size:contain;background-repeat:no-repeat;background-position:50% 50%}nxt-dropzone>.dropzone.dz-wrapper .dz-message.disabled{cursor:not-allowed}nxt-dropzone>.dropzone.dz-wrapper .dz-message.disabled .dz-text{opacity:.5}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder{position:relative;border-color:#aaa0;transition:border-color .25s ease-in-out}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder .dz-text{position:absolute;z-index:1;opacity:0;font-weight:700;background-color:#ffffff80;transition:filter .25s ease-in-out,opacity .25s ease-in-out}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled){border-color:#aaa}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-text{opacity:1}nxt-dropzone>.dropzone.dz-wrapper .dz-message.dz-placeholder:hover:not(.disabled) .dz-image{filter:blur(8px)}nxt-dropzone>.dropzone.dz-wrapper .dz-preview{margin:0}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-details{padding:24px}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-progress{width:80%;border:1px solid #aaa;border-radius:5px;overflow:hidden}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-progress .dz-upload{background-color:#666}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-filename span{display:block;overflow:hidden;width:100%;max-width:100%;text-overflow:ellipsis}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-filename span:hover{overflow:visible;white-space:normal;word-wrap:break-word}nxt-dropzone>.dropzone.dz-wrapper .dz-preview .dz-image{border-radius:5px;overflow:hidden;min-width:120px;min-height:120px;width:auto;height:auto}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-message{width:100%;height:100%}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-preview{width:100%;height:100%;grid-column:span 2;grid-row:span 2}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-preview .dz-image{width:100%;height:100%}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-preview .dz-image img{display:block;width:100%;height:auto;margin:0}nxt-dropzone>.dropzone.dz-wrapper.dz-single .dz-error-message{top:50%;left:50%;transform:translate(-50%) translateY(100%)}nxt-dropzone>.dropzone.dz-wrapper.dz-single.dz-started .dz-message{display:none}nxt-dropzone>.dropzone.dz-wrapper.dz-multiple.dz-started .dz-message{display:flex}\n", "@keyframes passing-through{0%{opacity:0;transform:translateY(40px)}30%,70%{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-40px)}}@keyframes slide-in{0%{opacity:0;transform:translateY(40px)}30%{opacity:1;transform:translateY(0)}}@keyframes pulse{0%{transform:scale(1)}10%{transform:scale(1.1)}20%{transform:scale(1)}}.dropzone,.dropzone *{box-sizing:border-box}.dropzone{min-height:150px;border:1px solid rgba(0,0,0,.8);border-radius:5px;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:3em 0}.dropzone .dz-message .dz-button{background:none;color:inherit;border:none;padding:0;font:inherit;cursor:pointer;outline:inherit}.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: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{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:#000000e6;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:#fffc}.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:#fff6;padding:0 .4em;border-radius:3px}.dropzone .dz-preview:hover .dz-image img{transform:scale(1.05);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{animation:passing-through 3s cubic-bezier(.77,0,.175,1)}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;animation:slide-in 3s cubic-bezier(.77,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;background:rgba(0,0,0,.8);border-radius:50%}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{display:block;width:54px;height:54px;fill:#fff}.dropzone .dz-preview.dz-processing .dz-progress{opacity:1;transition:all .2s linear}.dropzone .dz-preview.dz-complete .dz-progress{opacity:0;transition:opacity .4s ease-in}.dropzone .dz-preview:not(.dz-processing) .dz-progress{animation:pulse 6s ease infinite}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;position:absolute;height:20px;top:50%;margin-top:-10px;left:15%;right:15%;border:3px solid rgba(0,0,0,.8);background:rgba(0,0,0,.8);border-radius:10px;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#fff;display:block;position:relative;height:100%;width:0;transition:width .3s ease-in-out;border-radius:17px}.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;transition:opacity .3s ease;border-radius:8px;font-size:13px;top:130px;left:-10px;width:140px;background:#b10606;padding:.5em 1em;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 #b10606}\n"] }]
|
|
427
|
+
}], ctorParameters: function () { return []; }, propDecorators: { disabled: [{
|
|
377
428
|
type: Input
|
|
378
429
|
}], config: [{
|
|
379
430
|
type: Input
|
|
@@ -386,24 +437,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
386
437
|
}], DZ_INIT: [{
|
|
387
438
|
type: Output,
|
|
388
439
|
args: ['init']
|
|
389
|
-
}], DZ_ERROR: [{
|
|
390
|
-
type: Output,
|
|
391
|
-
args: ['error']
|
|
392
|
-
}], DZ_SUCCESS: [{
|
|
393
|
-
type: Output,
|
|
394
|
-
args: ['success']
|
|
395
|
-
}], DZ_SENDING: [{
|
|
396
|
-
type: Output,
|
|
397
|
-
args: ['sending']
|
|
398
|
-
}], DZ_CANCELED: [{
|
|
399
|
-
type: Output,
|
|
400
|
-
args: ['canceled']
|
|
401
|
-
}], DZ_COMPLETE: [{
|
|
402
|
-
type: Output,
|
|
403
|
-
args: ['complete']
|
|
404
|
-
}], DZ_PROCESSING: [{
|
|
405
|
-
type: Output,
|
|
406
|
-
args: ['processing']
|
|
407
440
|
}], DZ_DROP: [{
|
|
408
441
|
type: Output,
|
|
409
442
|
args: ['drop']
|
|
@@ -422,9 +455,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
422
455
|
}], DZ_DRAGLEAVE: [{
|
|
423
456
|
type: Output,
|
|
424
457
|
args: ['dragLeave']
|
|
425
|
-
}],
|
|
458
|
+
}], DZ_PASTE: [{
|
|
426
459
|
type: Output,
|
|
427
|
-
args: ['
|
|
460
|
+
args: ['paste']
|
|
461
|
+
}], DZ_RESET: [{
|
|
462
|
+
type: Output,
|
|
463
|
+
args: ['reset']
|
|
428
464
|
}], DZ_ADDEDFILE: [{
|
|
429
465
|
type: Output,
|
|
430
466
|
args: ['addedFile']
|
|
@@ -434,58 +470,86 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
434
470
|
}], DZ_REMOVEDFILE: [{
|
|
435
471
|
type: Output,
|
|
436
472
|
args: ['removedFile']
|
|
473
|
+
}], DZ_THUMBNAIL: [{
|
|
474
|
+
type: Output,
|
|
475
|
+
args: ['thumbnail']
|
|
476
|
+
}], DZ_ERROR: [{
|
|
477
|
+
type: Output,
|
|
478
|
+
args: ['error']
|
|
479
|
+
}], DZ_ERRORMULTIPLE: [{
|
|
480
|
+
type: Output,
|
|
481
|
+
args: ['errorMultiple']
|
|
482
|
+
}], DZ_PROCESSING: [{
|
|
483
|
+
type: Output,
|
|
484
|
+
args: ['processing']
|
|
485
|
+
}], DZ_PROCESSINGMULTIPLE: [{
|
|
486
|
+
type: Output,
|
|
487
|
+
args: ['processingMultiple']
|
|
437
488
|
}], DZ_UPLOADPROGRESS: [{
|
|
438
489
|
type: Output,
|
|
439
490
|
args: ['uploadProgress']
|
|
440
|
-
}],
|
|
491
|
+
}], DZ_TOTALUPLOADPROGRESS: [{
|
|
441
492
|
type: Output,
|
|
442
|
-
args: ['
|
|
443
|
-
}],
|
|
493
|
+
args: ['totalUploadProgress']
|
|
494
|
+
}], DZ_SENDING: [{
|
|
444
495
|
type: Output,
|
|
445
|
-
args: ['
|
|
446
|
-
}],
|
|
496
|
+
args: ['sending']
|
|
497
|
+
}], DZ_SENDINGMULTIPLE: [{
|
|
447
498
|
type: Output,
|
|
448
|
-
args: ['
|
|
499
|
+
args: ['sendingMultiple']
|
|
500
|
+
}], DZ_SUCCESS: [{
|
|
501
|
+
type: Output,
|
|
502
|
+
args: ['success']
|
|
449
503
|
}], DZ_SUCCESSMULTIPLE: [{
|
|
450
504
|
type: Output,
|
|
451
505
|
args: ['successMultiple']
|
|
452
|
-
}],
|
|
506
|
+
}], DZ_CANCELED: [{
|
|
453
507
|
type: Output,
|
|
454
|
-
args: ['
|
|
508
|
+
args: ['canceled']
|
|
455
509
|
}], DZ_CANCELEDMULTIPLE: [{
|
|
456
510
|
type: Output,
|
|
457
511
|
args: ['canceledMultiple']
|
|
512
|
+
}], DZ_COMPLETE: [{
|
|
513
|
+
type: Output,
|
|
514
|
+
args: ['complete']
|
|
458
515
|
}], DZ_COMPLETEMULTIPLE: [{
|
|
459
516
|
type: Output,
|
|
460
517
|
args: ['completeMultiple']
|
|
461
|
-
}],
|
|
518
|
+
}], DZ_MAXFILESEXCEEDED: [{
|
|
462
519
|
type: Output,
|
|
463
|
-
args: ['
|
|
464
|
-
}],
|
|
520
|
+
args: ['maxFilesExceeded']
|
|
521
|
+
}], DZ_MAXFILESREACHED: [{
|
|
465
522
|
type: Output,
|
|
466
|
-
args: ['
|
|
523
|
+
args: ['maxFilesReached']
|
|
467
524
|
}], DZ_QUEUECOMPLETE: [{
|
|
468
525
|
type: Output,
|
|
469
526
|
args: ['queueComplete']
|
|
470
|
-
}], DZ_TOTALUPLOADPROGRESS: [{
|
|
471
|
-
type: Output,
|
|
472
|
-
args: ['totalUploadProgress']
|
|
473
527
|
}], directiveRef: [{
|
|
474
528
|
type: ViewChild,
|
|
475
|
-
args: [DropzoneDirective
|
|
529
|
+
args: [DropzoneDirective]
|
|
476
530
|
}] } });
|
|
477
531
|
|
|
478
532
|
class DropzoneModule {
|
|
479
533
|
}
|
|
480
|
-
DropzoneModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
481
|
-
DropzoneModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
482
|
-
|
|
483
|
-
|
|
534
|
+
DropzoneModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DropzoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
535
|
+
DropzoneModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.3", ngImport: i0, type: DropzoneModule, declarations: [DropzoneComponent,
|
|
536
|
+
DropzoneDirective], imports: [CommonModule], exports: [DropzoneComponent,
|
|
537
|
+
DropzoneDirective] });
|
|
538
|
+
DropzoneModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DropzoneModule, imports: [CommonModule] });
|
|
539
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.3", ngImport: i0, type: DropzoneModule, decorators: [{
|
|
484
540
|
type: NgModule,
|
|
485
541
|
args: [{
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
542
|
+
declarations: [
|
|
543
|
+
DropzoneComponent,
|
|
544
|
+
DropzoneDirective
|
|
545
|
+
],
|
|
546
|
+
imports: [
|
|
547
|
+
CommonModule
|
|
548
|
+
],
|
|
549
|
+
exports: [
|
|
550
|
+
DropzoneComponent,
|
|
551
|
+
DropzoneDirective
|
|
552
|
+
]
|
|
489
553
|
}]
|
|
490
554
|
}] });
|
|
491
555
|
|
|
@@ -493,5 +557,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
493
557
|
* Generated bundle index. Do not edit.
|
|
494
558
|
*/
|
|
495
559
|
|
|
496
|
-
export {
|
|
560
|
+
export { DropzoneComponent, DropzoneDirective, DropzoneModule, NXT_DROPZONE_CONFIG };
|
|
497
561
|
//# sourceMappingURL=nxt-dropzone-wrapper.mjs.map
|