nxt-dropzone-wrapper 22.0.0 → 22.1.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.
@@ -1,333 +1,643 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, makeEnvironmentProviders, output, Directive, inject, NgZone, ElementRef, KeyValueDiffers, PLATFORM_ID, input, computed, effect, viewChild, ViewEncapsulation, Component } from '@angular/core';
3
- import { isPlatformBrowser } from '@angular/common';
4
- import Dropzone from 'dropzone';
5
-
6
- /* eslint-disable @angular-eslint/no-output-rename */
7
- const NXT_DROPZONE_CONFIG = new InjectionToken('NXT_DROPZONE_CONFIG');
1
+ import * as i0 from "@angular/core";
2
+ import { Component, Directive, ElementRef, InjectionToken, KeyValueDiffers, NgZone, PLATFORM_ID, ViewEncapsulation, computed, effect, inject, input, makeEnvironmentProviders, output, viewChild } from "@angular/core";
3
+ import { isPlatformBrowser } from "@angular/common";
4
+ import Dropzone from "dropzone";
5
+ const NXT_DROPZONE_CONFIG = new InjectionToken("NXT_DROPZONE_CONFIG");
8
6
  function provideDropzoneConfig(config) {
9
- return makeEnvironmentProviders([
10
- {
11
- provide: NXT_DROPZONE_CONFIG,
12
- useValue: config
13
- }
14
- ]);
7
+ return makeEnvironmentProviders([{
8
+ provide: NXT_DROPZONE_CONFIG,
9
+ useValue: config
10
+ }]);
15
11
  }
16
- /** @internal */
17
12
  const DropzoneEvents = [
18
- 'init',
19
- 'drop',
20
- 'dragStart',
21
- 'dragEnd',
22
- 'dragEnter',
23
- 'dragOver',
24
- 'dragLeave',
25
- 'paste',
26
- 'reset',
27
- 'addedFile',
28
- 'addedFiles',
29
- 'removedFile',
30
- 'thumbnail',
31
- 'error',
32
- 'errorMultiple',
33
- 'processing',
34
- 'processingMultiple',
35
- 'uploadProgress',
36
- 'totalUploadProgress',
37
- 'sending',
38
- 'sendingMultiple',
39
- 'success',
40
- 'successMultiple',
41
- 'canceled',
42
- 'canceledMultiple',
43
- 'complete',
44
- 'completeMultiple',
45
- 'maxFilesExceeded',
46
- 'maxFilesReached',
47
- 'queueComplete'
13
+ "init",
14
+ "drop",
15
+ "dragStart",
16
+ "dragEnd",
17
+ "dragEnter",
18
+ "dragOver",
19
+ "dragLeave",
20
+ "paste",
21
+ "reset",
22
+ "addedFile",
23
+ "addedFiles",
24
+ "removedFile",
25
+ "thumbnail",
26
+ "error",
27
+ "errorMultiple",
28
+ "processing",
29
+ "processingMultiple",
30
+ "uploadProgress",
31
+ "totalUploadProgress",
32
+ "sending",
33
+ "sendingMultiple",
34
+ "success",
35
+ "successMultiple",
36
+ "canceled",
37
+ "canceledMultiple",
38
+ "complete",
39
+ "completeMultiple",
40
+ "maxFilesExceeded",
41
+ "maxFilesReached",
42
+ "queueComplete"
48
43
  ];
49
- /** @internal */
50
- const internalChanges = new Set([
51
- 'autoReset',
52
- 'errorReset',
53
- 'cancelReset'
44
+ const internalChanges = /* @__PURE__ */ new Set([
45
+ "autoReset",
46
+ "errorReset",
47
+ "cancelReset"
54
48
  ]);
55
- /** @internal */
56
- class _DropzoneConfig {
57
- constructor(config = {}) {
58
- this.assign(config);
59
- }
60
- assign(config = {}, target) {
61
- target = target || this;
62
- for (const key in config) {
63
- if (config[key] != null
64
- && config[key] != undefined
65
- && !Array.isArray(config[key])
66
- && typeof config[key] === 'object'
67
- && !(config[key] instanceof HTMLElement)) {
68
- target[key] = {};
69
- this.assign(config[key], target[key]);
70
- }
71
- else {
72
- target[key] = config[key];
73
- }
74
- }
75
- }
76
- }
77
- class DropzoneListeners {
78
- constructor() {
79
- this.DZ_INIT = output({ alias: 'init' });
80
- this.DZ_DROP = output({ alias: 'drop' });
81
- this.DZ_DRAGSTART = output({ alias: 'dragStart' });
82
- this.DZ_DRAGEND = output({ alias: 'dragEnd' });
83
- this.DZ_DRAGENTER = output({ alias: 'dragEnter' });
84
- this.DZ_DRAGOVER = output({ alias: 'dragOver' });
85
- this.DZ_DRAGLEAVE = output({ alias: 'dragLeave' });
86
- this.DZ_PASTE = output({ alias: 'paste' });
87
- this.DZ_RESET = output({ alias: 'reset' });
88
- this.DZ_ADDEDFILE = output({ alias: 'addedFile' });
89
- this.DZ_ADDEDFILES = output({ alias: 'addedFiles' });
90
- this.DZ_REMOVEDFILE = output({ alias: 'removedFile' });
91
- this.DZ_THUMBNAIL = output({ alias: 'thumbnail' });
92
- this.DZ_ERROR = output({ alias: 'error' });
93
- this.DZ_ERRORMULTIPLE = output({ alias: 'errorMultiple' });
94
- this.DZ_PROCESSING = output({ alias: 'processing' });
95
- this.DZ_PROCESSINGMULTIPLE = output({ alias: 'processingMultiple' });
96
- this.DZ_UPLOADPROGRESS = output({ alias: 'uploadProgress' });
97
- this.DZ_TOTALUPLOADPROGRESS = output({ alias: 'totalUploadProgress' });
98
- this.DZ_SENDING = output({ alias: 'sending' });
99
- this.DZ_SENDINGMULTIPLE = output({ alias: 'sendingMultiple' });
100
- // eslint-disable-next-line @typescript-eslint/no-restricted-types
101
- this.DZ_SUCCESS = output({ alias: 'success' });
102
- this.DZ_SUCCESSMULTIPLE = output({ alias: 'successMultiple' });
103
- this.DZ_CANCELED = output({ alias: 'canceled' });
104
- this.DZ_CANCELEDMULTIPLE = output({ alias: 'canceledMultiple' });
105
- this.DZ_COMPLETE = output({ alias: 'complete' });
106
- this.DZ_COMPLETEMULTIPLE = output({ alias: 'completeMultiple' });
107
- this.DZ_MAXFILESEXCEEDED = output({ alias: 'maxFilesExceeded' });
108
- this.DZ_MAXFILESREACHED = output({ alias: 'maxFilesReached' });
109
- this.DZ_QUEUECOMPLETE = output({ alias: 'queueComplete' });
110
- }
111
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneListeners, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
112
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.6", type: DropzoneListeners, isStandalone: true, 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" }, ngImport: i0 }); }
113
- }
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneListeners, decorators: [{
115
- type: Directive
116
- }], propDecorators: { DZ_INIT: [{ type: i0.Output, args: ["init"] }], DZ_DROP: [{ type: i0.Output, args: ["drop"] }], DZ_DRAGSTART: [{ type: i0.Output, args: ["dragStart"] }], DZ_DRAGEND: [{ type: i0.Output, args: ["dragEnd"] }], DZ_DRAGENTER: [{ type: i0.Output, args: ["dragEnter"] }], DZ_DRAGOVER: [{ type: i0.Output, args: ["dragOver"] }], DZ_DRAGLEAVE: [{ type: i0.Output, args: ["dragLeave"] }], DZ_PASTE: [{ type: i0.Output, args: ["paste"] }], DZ_RESET: [{ type: i0.Output, args: ["reset"] }], DZ_ADDEDFILE: [{ type: i0.Output, args: ["addedFile"] }], DZ_ADDEDFILES: [{ type: i0.Output, args: ["addedFiles"] }], DZ_REMOVEDFILE: [{ type: i0.Output, args: ["removedFile"] }], DZ_THUMBNAIL: [{ type: i0.Output, args: ["thumbnail"] }], DZ_ERROR: [{ type: i0.Output, args: ["error"] }], DZ_ERRORMULTIPLE: [{ type: i0.Output, args: ["errorMultiple"] }], DZ_PROCESSING: [{ type: i0.Output, args: ["processing"] }], DZ_PROCESSINGMULTIPLE: [{ type: i0.Output, args: ["processingMultiple"] }], DZ_UPLOADPROGRESS: [{ type: i0.Output, args: ["uploadProgress"] }], DZ_TOTALUPLOADPROGRESS: [{ type: i0.Output, args: ["totalUploadProgress"] }], DZ_SENDING: [{ type: i0.Output, args: ["sending"] }], DZ_SENDINGMULTIPLE: [{ type: i0.Output, args: ["sendingMultiple"] }], DZ_SUCCESS: [{ type: i0.Output, args: ["success"] }], DZ_SUCCESSMULTIPLE: [{ type: i0.Output, args: ["successMultiple"] }], DZ_CANCELED: [{ type: i0.Output, args: ["canceled"] }], DZ_CANCELEDMULTIPLE: [{ type: i0.Output, args: ["canceledMultiple"] }], DZ_COMPLETE: [{ type: i0.Output, args: ["complete"] }], DZ_COMPLETEMULTIPLE: [{ type: i0.Output, args: ["completeMultiple"] }], DZ_MAXFILESEXCEEDED: [{ type: i0.Output, args: ["maxFilesExceeded"] }], DZ_MAXFILESREACHED: [{ type: i0.Output, args: ["maxFilesReached"] }], DZ_QUEUECOMPLETE: [{ type: i0.Output, args: ["queueComplete"] }] } });
117
- /** @internal */
118
- const NXT_DROPZONE_LISTENERS = new InjectionToken('NXT_DROPZONE_LISTENERS');
119
-
120
- class DropzoneDirective extends DropzoneListeners {
121
- get dropzone() {
122
- return this._instance;
123
- }
124
- constructor() {
125
- super();
126
- this.zone = inject(NgZone);
127
- this.elementRef = inject(ElementRef);
128
- this.differs = inject(KeyValueDiffers);
129
- this.platformId = inject(PLATFORM_ID);
130
- this.defaults = inject(NXT_DROPZONE_CONFIG, { optional: true });
131
- this.listeners = inject(NXT_DROPZONE_LISTENERS, { optional: true }) || this;
132
- this.disabled = input(false, /* @ts-ignore */
133
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
134
- /** Can be used to provide optional custom config */
135
- this._config = input(undefined, { ...(ngDevMode ? { debugName: "_config" } : /* istanbul ignore next */ {}), alias: 'nxtDropzone' });
136
- this.configDiff = this.differs.find(this._config() || {}).create();
137
- this.config = computed(() => ({ ...this._config() }), { ...(ngDevMode ? { debugName: "config" } : /* istanbul ignore next */ {}), equal: (_, n) => !this.configDiff.diff(n) });
138
- this._params = computed(() => {
139
- let newParams = this.defaults
140
- ? new _DropzoneConfig(this.defaults)
141
- : undefined;
142
- const config = this.config();
143
- if (newParams && config)
144
- newParams.assign(config);
145
- else if (config)
146
- newParams = new _DropzoneConfig(config);
147
- const params = { ...newParams };
148
- Object.entries(params).forEach(([k, v]) => {
149
- if (v === undefined)
150
- delete params[k];
151
- });
152
- return params;
153
- }, /* @ts-ignore */
154
- ...(ngDevMode ? [{ debugName: "_params" }] : /* istanbul ignore next */ []));
155
- this.paramDiff = this.differs.find({ ...this._params() }).create();
156
- this.params = computed(() => ({ ...this._params() }), { ...(ngDevMode ? { debugName: "params" } : /* istanbul ignore next */ {}), equal: (_, n) => {
157
- const d = this.paramDiff.diff(n);
158
- if (d) {
159
- let hasChanges = false;
160
- d.forEachRemovedItem((r) => {
161
- if (!internalChanges.has(r.key) && r.currentValue !== r.previousValue)
162
- hasChanges = true;
163
- });
164
- d.forEachItem(r => {
165
- if (!internalChanges.has(r.key) && r.currentValue !== r.previousValue)
166
- hasChanges = true;
167
- });
168
- return !hasChanges;
169
- }
170
- return !d;
171
- } });
172
- /** @internal */
173
- this._isSingle = computed(() => this.params()?.maxFiles === 1, /* @ts-ignore */
174
- ...(ngDevMode ? [{ debugName: "_isSingle" }] : /* istanbul ignore next */ []));
175
- /** @internal */
176
- this._isMultiple = computed(() => this.params()?.maxFiles !== 1, /* @ts-ignore */
177
- ...(ngDevMode ? [{ debugName: "_isMultiple" }] : /* istanbul ignore next */ []));
178
- let disabled = this.disabled();
179
- effect(() => {
180
- disabled = this.disabled();
181
- const instance = this._instance;
182
- if (instance) {
183
- if (disabled)
184
- this.zone.runOutsideAngular(() => {
185
- instance.disable();
186
- });
187
- else
188
- this.zone.runOutsideAngular(() => {
189
- instance.enable();
190
- });
191
- }
192
- });
193
- effect(() => {
194
- const params = this.params();
195
- this.destroyInstance();
196
- this.initInstance(params, disabled);
197
- });
198
- }
199
- /** @internal */
200
- ngOnDestroy() {
201
- this.destroyInstance();
202
- }
203
- /** @internal */
204
- reset(cancel) {
205
- const instance = this._instance;
206
- if (instance) {
207
- this.zone.runOutsideAngular(() => {
208
- instance.removeAllFiles(cancel);
209
- });
210
- }
211
- }
212
- initInstance(params, disabled = false) {
213
- if (!isPlatformBrowser(this.platformId) || !params) {
214
- return;
215
- }
216
- this.zone.runOutsideAngular(() => {
217
- const instance = new Dropzone(this.elementRef.nativeElement, params);
218
- if (disabled)
219
- this.zone.runOutsideAngular(() => {
220
- instance.disable();
221
- });
222
- this._instance = instance;
223
- this.zone.run(() => {
224
- this.listeners.DZ_INIT.emit(instance);
225
- });
226
- // Add auto reset handling for events
227
- instance.on('success', () => {
228
- const timeout = this.params()?.autoReset ?? -1;
229
- if (timeout >= 0) {
230
- setTimeout(() => this.reset(), timeout);
231
- }
232
- });
233
- instance.on('error', () => {
234
- const timeout = this.params()?.errorReset ?? -1;
235
- if (timeout >= 0) {
236
- setTimeout(() => this.reset(), timeout);
237
- }
238
- });
239
- instance.on('canceled', () => {
240
- const timeout = this.params()?.cancelReset ?? -1;
241
- if (timeout >= 0) {
242
- setTimeout(() => this.reset(), timeout);
243
- }
244
- });
245
- // Add native Dropzone event handling
246
- DropzoneEvents.forEach((eventName) => {
247
- instance.on(eventName.toLowerCase(), (...args) => {
248
- args = (args.length === 1) ? args[0] : args;
249
- const output = `DZ_${eventName.toUpperCase()}`;
250
- const emitter = this.listeners[output];
251
- this.zone.run(() => {
252
- emitter.emit(args);
253
- });
254
- });
255
- });
256
- });
257
- }
258
- destroyInstance() {
259
- const instance = this._instance;
260
- if (instance) {
261
- this.zone.runOutsideAngular(() => {
262
- instance.destroy();
263
- });
264
- this._instance = undefined;
265
- }
266
- }
267
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
268
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.6", type: DropzoneDirective, isStandalone: true, selector: "[nxtDropzone]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, _config: { classPropertyName: "_config", publicName: "nxtDropzone", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.dz-single": "_isSingle()", "class.dz-multiple": "_isMultiple()" } }, exportAs: ["nxtDropzone"], usesInheritance: true, ngImport: i0 }); }
269
- }
270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneDirective, decorators: [{
271
- type: Directive,
272
- args: [{
273
- selector: '[nxtDropzone]',
274
- exportAs: 'nxtDropzone',
275
- host: {
276
- '[class.dz-single]': '_isSingle()',
277
- '[class.dz-multiple]': '_isMultiple()'
278
- }
279
- }]
280
- }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], _config: [{ type: i0.Input, args: [{ isSignal: true, alias: "nxtDropzone", required: false }] }] } });
281
-
282
- class DropzoneComponent extends DropzoneListeners {
283
- constructor() {
284
- super(...arguments);
285
- /** Disables / detaches Dropzone from the element */
286
- this.disabled = input(false, /* @ts-ignore */
287
- ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
288
- /** Custom config to override the global defaults */
289
- this.config = input(/* @ts-ignore */
290
- ...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
291
- /** Message to show for the user on the upload area */
292
- this.message = input('Click or drag files to upload', /* @ts-ignore */
293
- ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
294
- /** Placeholder image to be shown as the upload area */
295
- this.placeholder = input('', /* @ts-ignore */
296
- ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
297
- /** Use 'dropzone' class (use provided default styles) */
298
- this.useDropzoneClass = input(true, /* @ts-ignore */
299
- ...(ngDevMode ? [{ debugName: "useDropzoneClass" }] : /* istanbul ignore next */ []));
300
- this.directiveRef = viewChild(DropzoneDirective, /* @ts-ignore */
301
- ...(ngDevMode ? [{ debugName: "directiveRef" }] : /* istanbul ignore next */ []));
302
- /** @internal */
303
- this.text = computed(() => this.config()?.dictDefaultMessage || this.message(), /* @ts-ignore */
304
- ...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
305
- }
306
- /** @internal */
307
- ngOnInit() { }
308
- /** @internal */
309
- getPlaceholder() {
310
- return 'url(' + encodeURI(this.placeholder()) + ')';
311
- }
312
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
313
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.6", type: DropzoneComponent, isStandalone: true, selector: "nxt-dropzone", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, useDropzoneClass: { classPropertyName: "useDropzoneClass", publicName: "useDropzoneClass", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{
314
- provide: NXT_DROPZONE_LISTENERS,
315
- useExisting: DropzoneComponent
316
- }], viewQueries: [{ propertyName: "directiveRef", first: true, predicate: DropzoneDirective, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"dz-wrapper\"\r\n [class.dropzone]=\"useDropzoneClass()\"\r\n [nxtDropzone]=\"config()\"\r\n [disabled]=\"disabled()\">\r\n <div class=\"dz-message\"\r\n [class.disabled]=\"disabled()\"\r\n [class.dz-placeholder]=\"placeholder()\">\r\n <div class=\"dz-text\"\r\n [innerHTML]=\"text()\"></div>\r\n\r\n @if (placeholder()) {\r\n <div class=\"dz-image\"\r\n [style.background-image]=\"getPlaceholder()\"></div>\r\n }\r\n </div>\r\n\r\n <ng-content />\r\n</div>\r\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;overflow-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-preview .dz-image img{max-width:120px;max-height:120px}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:#000c;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:#000c;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: DropzoneDirective, selector: "[nxtDropzone]", inputs: ["disabled", "nxtDropzone"], exportAs: ["nxtDropzone"] }], encapsulation: i0.ViewEncapsulation.None }); }
317
- }
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneComponent, decorators: [{
319
- type: Component,
320
- args: [{ selector: 'nxt-dropzone', encapsulation: ViewEncapsulation.None, providers: [{
321
- provide: NXT_DROPZONE_LISTENERS,
322
- useExisting: DropzoneComponent
323
- }], imports: [
324
- DropzoneDirective
325
- ], template: "<div class=\"dz-wrapper\"\r\n [class.dropzone]=\"useDropzoneClass()\"\r\n [nxtDropzone]=\"config()\"\r\n [disabled]=\"disabled()\">\r\n <div class=\"dz-message\"\r\n [class.disabled]=\"disabled()\"\r\n [class.dz-placeholder]=\"placeholder()\">\r\n <div class=\"dz-text\"\r\n [innerHTML]=\"text()\"></div>\r\n\r\n @if (placeholder()) {\r\n <div class=\"dz-image\"\r\n [style.background-image]=\"getPlaceholder()\"></div>\r\n }\r\n </div>\r\n\r\n <ng-content />\r\n</div>\r\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;overflow-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-preview .dz-image img{max-width:120px;max-height:120px}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:#000c;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:#000c;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"] }]
326
- }], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], useDropzoneClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "useDropzoneClass", required: false }] }], directiveRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => DropzoneDirective), { isSignal: true }] }] } });
327
-
328
- /**
329
- * Generated bundle index. Do not edit.
330
- */
331
-
49
+ var _DropzoneConfig = class {
50
+ constructor(config = {}) {
51
+ this.assign(config);
52
+ }
53
+ assign(config = {}, target) {
54
+ target = target || this;
55
+ for (const key in config) if (config[key] != null && config[key] != void 0 && !Array.isArray(config[key]) && typeof config[key] === "object" && !(config[key] instanceof HTMLElement)) {
56
+ target[key] = {};
57
+ this.assign(config[key], target[key]);
58
+ } else target[key] = config[key];
59
+ }
60
+ };
61
+ var DropzoneListeners = class DropzoneListeners {
62
+ constructor() {
63
+ this.DZ_INIT = output({ alias: "init" });
64
+ this.DZ_DROP = output({ alias: "drop" });
65
+ this.DZ_DRAGSTART = output({ alias: "dragStart" });
66
+ this.DZ_DRAGEND = output({ alias: "dragEnd" });
67
+ this.DZ_DRAGENTER = output({ alias: "dragEnter" });
68
+ this.DZ_DRAGOVER = output({ alias: "dragOver" });
69
+ this.DZ_DRAGLEAVE = output({ alias: "dragLeave" });
70
+ this.DZ_PASTE = output({ alias: "paste" });
71
+ this.DZ_RESET = output({ alias: "reset" });
72
+ this.DZ_ADDEDFILE = output({ alias: "addedFile" });
73
+ this.DZ_ADDEDFILES = output({ alias: "addedFiles" });
74
+ this.DZ_REMOVEDFILE = output({ alias: "removedFile" });
75
+ this.DZ_THUMBNAIL = output({ alias: "thumbnail" });
76
+ this.DZ_ERROR = output({ alias: "error" });
77
+ this.DZ_ERRORMULTIPLE = output({ alias: "errorMultiple" });
78
+ this.DZ_PROCESSING = output({ alias: "processing" });
79
+ this.DZ_PROCESSINGMULTIPLE = output({ alias: "processingMultiple" });
80
+ this.DZ_UPLOADPROGRESS = output({ alias: "uploadProgress" });
81
+ this.DZ_TOTALUPLOADPROGRESS = output({ alias: "totalUploadProgress" });
82
+ this.DZ_SENDING = output({ alias: "sending" });
83
+ this.DZ_SENDINGMULTIPLE = output({ alias: "sendingMultiple" });
84
+ this.DZ_SUCCESS = output({ alias: "success" });
85
+ this.DZ_SUCCESSMULTIPLE = output({ alias: "successMultiple" });
86
+ this.DZ_CANCELED = output({ alias: "canceled" });
87
+ this.DZ_CANCELEDMULTIPLE = output({ alias: "canceledMultiple" });
88
+ this.DZ_COMPLETE = output({ alias: "complete" });
89
+ this.DZ_COMPLETEMULTIPLE = output({ alias: "completeMultiple" });
90
+ this.DZ_MAXFILESEXCEEDED = output({ alias: "maxFilesExceeded" });
91
+ this.DZ_MAXFILESREACHED = output({ alias: "maxFilesReached" });
92
+ this.DZ_QUEUECOMPLETE = output({ alias: "queueComplete" });
93
+ }
94
+ static {
95
+ this.ɵfac = i0.ɵɵngDeclareFactory({
96
+ minVersion: "12.0.0",
97
+ version: "22.2.5",
98
+ ngImport: i0,
99
+ type: DropzoneListeners,
100
+ deps: [],
101
+ target: i0.ɵɵFactoryTarget.Directive
102
+ });
103
+ }
104
+ static {
105
+ this.ɵdir = i0.ɵɵngDeclareDirective({
106
+ minVersion: "14.0.0",
107
+ version: "22.2.5",
108
+ type: DropzoneListeners,
109
+ isStandalone: true,
110
+ outputs: {
111
+ DZ_INIT: "init",
112
+ DZ_DROP: "drop",
113
+ DZ_DRAGSTART: "dragStart",
114
+ DZ_DRAGEND: "dragEnd",
115
+ DZ_DRAGENTER: "dragEnter",
116
+ DZ_DRAGOVER: "dragOver",
117
+ DZ_DRAGLEAVE: "dragLeave",
118
+ DZ_PASTE: "paste",
119
+ DZ_RESET: "reset",
120
+ DZ_ADDEDFILE: "addedFile",
121
+ DZ_ADDEDFILES: "addedFiles",
122
+ DZ_REMOVEDFILE: "removedFile",
123
+ DZ_THUMBNAIL: "thumbnail",
124
+ DZ_ERROR: "error",
125
+ DZ_ERRORMULTIPLE: "errorMultiple",
126
+ DZ_PROCESSING: "processing",
127
+ DZ_PROCESSINGMULTIPLE: "processingMultiple",
128
+ DZ_UPLOADPROGRESS: "uploadProgress",
129
+ DZ_TOTALUPLOADPROGRESS: "totalUploadProgress",
130
+ DZ_SENDING: "sending",
131
+ DZ_SENDINGMULTIPLE: "sendingMultiple",
132
+ DZ_SUCCESS: "success",
133
+ DZ_SUCCESSMULTIPLE: "successMultiple",
134
+ DZ_CANCELED: "canceled",
135
+ DZ_CANCELEDMULTIPLE: "canceledMultiple",
136
+ DZ_COMPLETE: "complete",
137
+ DZ_COMPLETEMULTIPLE: "completeMultiple",
138
+ DZ_MAXFILESEXCEEDED: "maxFilesExceeded",
139
+ DZ_MAXFILESREACHED: "maxFilesReached",
140
+ DZ_QUEUECOMPLETE: "queueComplete"
141
+ },
142
+ ngImport: i0
143
+ });
144
+ }
145
+ };
146
+ i0.ɵɵngDeclareClassMetadata({
147
+ minVersion: "12.0.0",
148
+ version: "22.2.5",
149
+ ngImport: i0,
150
+ type: DropzoneListeners,
151
+ decorators: [{ type: Directive }],
152
+ propDecorators: {
153
+ DZ_INIT: [{
154
+ type: i0.Output,
155
+ args: ["init"]
156
+ }],
157
+ DZ_DROP: [{
158
+ type: i0.Output,
159
+ args: ["drop"]
160
+ }],
161
+ DZ_DRAGSTART: [{
162
+ type: i0.Output,
163
+ args: ["dragStart"]
164
+ }],
165
+ DZ_DRAGEND: [{
166
+ type: i0.Output,
167
+ args: ["dragEnd"]
168
+ }],
169
+ DZ_DRAGENTER: [{
170
+ type: i0.Output,
171
+ args: ["dragEnter"]
172
+ }],
173
+ DZ_DRAGOVER: [{
174
+ type: i0.Output,
175
+ args: ["dragOver"]
176
+ }],
177
+ DZ_DRAGLEAVE: [{
178
+ type: i0.Output,
179
+ args: ["dragLeave"]
180
+ }],
181
+ DZ_PASTE: [{
182
+ type: i0.Output,
183
+ args: ["paste"]
184
+ }],
185
+ DZ_RESET: [{
186
+ type: i0.Output,
187
+ args: ["reset"]
188
+ }],
189
+ DZ_ADDEDFILE: [{
190
+ type: i0.Output,
191
+ args: ["addedFile"]
192
+ }],
193
+ DZ_ADDEDFILES: [{
194
+ type: i0.Output,
195
+ args: ["addedFiles"]
196
+ }],
197
+ DZ_REMOVEDFILE: [{
198
+ type: i0.Output,
199
+ args: ["removedFile"]
200
+ }],
201
+ DZ_THUMBNAIL: [{
202
+ type: i0.Output,
203
+ args: ["thumbnail"]
204
+ }],
205
+ DZ_ERROR: [{
206
+ type: i0.Output,
207
+ args: ["error"]
208
+ }],
209
+ DZ_ERRORMULTIPLE: [{
210
+ type: i0.Output,
211
+ args: ["errorMultiple"]
212
+ }],
213
+ DZ_PROCESSING: [{
214
+ type: i0.Output,
215
+ args: ["processing"]
216
+ }],
217
+ DZ_PROCESSINGMULTIPLE: [{
218
+ type: i0.Output,
219
+ args: ["processingMultiple"]
220
+ }],
221
+ DZ_UPLOADPROGRESS: [{
222
+ type: i0.Output,
223
+ args: ["uploadProgress"]
224
+ }],
225
+ DZ_TOTALUPLOADPROGRESS: [{
226
+ type: i0.Output,
227
+ args: ["totalUploadProgress"]
228
+ }],
229
+ DZ_SENDING: [{
230
+ type: i0.Output,
231
+ args: ["sending"]
232
+ }],
233
+ DZ_SENDINGMULTIPLE: [{
234
+ type: i0.Output,
235
+ args: ["sendingMultiple"]
236
+ }],
237
+ DZ_SUCCESS: [{
238
+ type: i0.Output,
239
+ args: ["success"]
240
+ }],
241
+ DZ_SUCCESSMULTIPLE: [{
242
+ type: i0.Output,
243
+ args: ["successMultiple"]
244
+ }],
245
+ DZ_CANCELED: [{
246
+ type: i0.Output,
247
+ args: ["canceled"]
248
+ }],
249
+ DZ_CANCELEDMULTIPLE: [{
250
+ type: i0.Output,
251
+ args: ["canceledMultiple"]
252
+ }],
253
+ DZ_COMPLETE: [{
254
+ type: i0.Output,
255
+ args: ["complete"]
256
+ }],
257
+ DZ_COMPLETEMULTIPLE: [{
258
+ type: i0.Output,
259
+ args: ["completeMultiple"]
260
+ }],
261
+ DZ_MAXFILESEXCEEDED: [{
262
+ type: i0.Output,
263
+ args: ["maxFilesExceeded"]
264
+ }],
265
+ DZ_MAXFILESREACHED: [{
266
+ type: i0.Output,
267
+ args: ["maxFilesReached"]
268
+ }],
269
+ DZ_QUEUECOMPLETE: [{
270
+ type: i0.Output,
271
+ args: ["queueComplete"]
272
+ }]
273
+ }
274
+ });
275
+ const NXT_DROPZONE_LISTENERS = new InjectionToken("NXT_DROPZONE_LISTENERS");
276
+ var DropzoneDirective = class DropzoneDirective extends DropzoneListeners {
277
+ get dropzone() {
278
+ return this._instance;
279
+ }
280
+ constructor() {
281
+ super();
282
+ this.zone = inject(NgZone);
283
+ this.elementRef = inject(ElementRef);
284
+ this.differs = inject(KeyValueDiffers);
285
+ this.platformId = inject(PLATFORM_ID);
286
+ this.defaults = inject(NXT_DROPZONE_CONFIG, { optional: true });
287
+ this.listeners = inject(NXT_DROPZONE_LISTENERS, { optional: true }) || this;
288
+ this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
289
+ this._config = input(void 0, {
290
+ ...ngDevMode ? { debugName: "_config" } : /* istanbul ignore next */ {},
291
+ alias: "nxtDropzone"
292
+ });
293
+ this.configDiff = this.differs.find(this._config() || {}).create();
294
+ this.config = computed(() => ({ ...this._config() }), {
295
+ ...ngDevMode ? { debugName: "config" } : /* istanbul ignore next */ {},
296
+ equal: (_, n) => !this.configDiff.diff(n)
297
+ });
298
+ this._params = computed(() => {
299
+ let newParams = this.defaults ? new _DropzoneConfig(this.defaults) : void 0;
300
+ const config = this.config();
301
+ if (newParams && config) newParams.assign(config);
302
+ else if (config) newParams = new _DropzoneConfig(config);
303
+ const params = { ...newParams };
304
+ Object.entries(params).forEach(([k, v]) => {
305
+ if (v === void 0) delete params[k];
306
+ });
307
+ return params;
308
+ }, ...ngDevMode ? [{ debugName: "_params" }] : /* istanbul ignore next */ []);
309
+ this.paramDiff = this.differs.find({ ...this._params() }).create();
310
+ this.params = computed(() => ({ ...this._params() }), {
311
+ ...ngDevMode ? { debugName: "params" } : /* istanbul ignore next */ {},
312
+ equal: (_, n) => {
313
+ const d = this.paramDiff.diff(n);
314
+ if (d) {
315
+ let hasChanges = false;
316
+ d.forEachRemovedItem((r) => {
317
+ if (!internalChanges.has(r.key) && r.currentValue !== r.previousValue) hasChanges = true;
318
+ });
319
+ d.forEachItem((r) => {
320
+ if (!internalChanges.has(r.key) && r.currentValue !== r.previousValue) hasChanges = true;
321
+ });
322
+ return !hasChanges;
323
+ }
324
+ return !d;
325
+ }
326
+ });
327
+ this._isSingle = computed(() => this.params()?.maxFiles === 1, ...ngDevMode ? [{ debugName: "_isSingle" }] : /* istanbul ignore next */ []);
328
+ this._isMultiple = computed(() => this.params()?.maxFiles !== 1, ...ngDevMode ? [{ debugName: "_isMultiple" }] : /* istanbul ignore next */ []);
329
+ let disabled = this.disabled();
330
+ effect(() => {
331
+ disabled = this.disabled();
332
+ const instance = this._instance;
333
+ if (instance) {
334
+ if (disabled) this.zone.runOutsideAngular(() => {
335
+ instance.disable();
336
+ });
337
+ else this.zone.runOutsideAngular(() => {
338
+ instance.enable();
339
+ });
340
+ }
341
+ });
342
+ effect(() => {
343
+ const params = this.params();
344
+ this.destroyInstance();
345
+ this.initInstance(params, disabled);
346
+ });
347
+ }
348
+ ngOnDestroy() {
349
+ this.destroyInstance();
350
+ }
351
+ reset(cancel) {
352
+ const instance = this._instance;
353
+ if (instance) this.zone.runOutsideAngular(() => {
354
+ instance.removeAllFiles(!!cancel);
355
+ });
356
+ }
357
+ initInstance(params, disabled = false) {
358
+ if (!isPlatformBrowser(this.platformId) || !params) return;
359
+ this.zone.runOutsideAngular(() => {
360
+ const instance = new Dropzone(this.elementRef.nativeElement, params);
361
+ if (disabled) this.zone.runOutsideAngular(() => {
362
+ instance.disable();
363
+ });
364
+ this._instance = instance;
365
+ this.zone.run(() => {
366
+ this.listeners.DZ_INIT.emit(instance);
367
+ });
368
+ instance.on("success", () => {
369
+ const timeout = this.params()?.autoReset ?? -1;
370
+ if (timeout >= 0) setTimeout(() => this.reset(), timeout);
371
+ });
372
+ instance.on("error", () => {
373
+ const timeout = this.params()?.errorReset ?? -1;
374
+ if (timeout >= 0) setTimeout(() => this.reset(), timeout);
375
+ });
376
+ instance.on("canceled", () => {
377
+ const timeout = this.params()?.cancelReset ?? -1;
378
+ if (timeout >= 0) setTimeout(() => this.reset(), timeout);
379
+ });
380
+ DropzoneEvents.forEach((eventName) => {
381
+ instance.on(eventName.toLowerCase(), (...args) => {
382
+ args = args.length === 1 ? args[0] : args;
383
+ const output = `DZ_${eventName.toUpperCase()}`;
384
+ const emitter = this.listeners[output];
385
+ this.zone.run(() => {
386
+ emitter.emit(args);
387
+ });
388
+ });
389
+ });
390
+ });
391
+ }
392
+ destroyInstance() {
393
+ const instance = this._instance;
394
+ if (instance) {
395
+ this.zone.runOutsideAngular(() => {
396
+ instance.destroy();
397
+ });
398
+ this._instance = void 0;
399
+ }
400
+ }
401
+ static {
402
+ this.ɵfac = i0.ɵɵngDeclareFactory({
403
+ minVersion: "12.0.0",
404
+ version: "22.2.5",
405
+ ngImport: i0,
406
+ type: DropzoneDirective,
407
+ deps: [],
408
+ target: i0.ɵɵFactoryTarget.Directive
409
+ });
410
+ }
411
+ static {
412
+ this.ɵdir = i0.ɵɵngDeclareDirective({
413
+ minVersion: "17.1.0",
414
+ version: "22.2.5",
415
+ type: DropzoneDirective,
416
+ isStandalone: true,
417
+ selector: "[nxtDropzone]",
418
+ inputs: {
419
+ disabled: {
420
+ classPropertyName: "disabled",
421
+ publicName: "disabled",
422
+ isSignal: true,
423
+ isRequired: false,
424
+ transformFunction: null
425
+ },
426
+ _config: {
427
+ classPropertyName: "_config",
428
+ publicName: "nxtDropzone",
429
+ isSignal: true,
430
+ isRequired: false,
431
+ transformFunction: null
432
+ }
433
+ },
434
+ host: { properties: {
435
+ "class.dz-single": "_isSingle()",
436
+ "class.dz-multiple": "_isMultiple()"
437
+ } },
438
+ exportAs: ["nxtDropzone"],
439
+ usesInheritance: true,
440
+ ngImport: i0
441
+ });
442
+ }
443
+ };
444
+ i0.ɵɵngDeclareClassMetadata({
445
+ minVersion: "12.0.0",
446
+ version: "22.2.5",
447
+ ngImport: i0,
448
+ type: DropzoneDirective,
449
+ decorators: [{
450
+ type: Directive,
451
+ args: [{
452
+ selector: "[nxtDropzone]",
453
+ exportAs: "nxtDropzone",
454
+ host: {
455
+ "[class.dz-single]": "_isSingle()",
456
+ "[class.dz-multiple]": "_isMultiple()"
457
+ }
458
+ }]
459
+ }],
460
+ ctorParameters: () => [],
461
+ propDecorators: {
462
+ disabled: [{
463
+ type: i0.Input,
464
+ args: [{
465
+ isSignal: true,
466
+ alias: "disabled",
467
+ required: false
468
+ }]
469
+ }],
470
+ _config: [{
471
+ type: i0.Input,
472
+ args: [{
473
+ isSignal: true,
474
+ alias: "nxtDropzone",
475
+ required: false
476
+ }]
477
+ }]
478
+ }
479
+ });
480
+ var DropzoneComponent = class DropzoneComponent extends DropzoneListeners {
481
+ constructor() {
482
+ super(...arguments);
483
+ this.disabled = input(false, ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
484
+ this.config = input(...ngDevMode ? [void 0, { debugName: "config" }] : /* istanbul ignore next */ []);
485
+ this.message = input("Click or drag files to upload", ...ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []);
486
+ this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
487
+ this.useDropzoneClass = input(true, ...ngDevMode ? [{ debugName: "useDropzoneClass" }] : /* istanbul ignore next */ []);
488
+ this.directiveRef = viewChild(DropzoneDirective, ...ngDevMode ? [{ debugName: "directiveRef" }] : /* istanbul ignore next */ []);
489
+ this.text = computed(() => this.config()?.dictDefaultMessage || this.message(), ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
490
+ }
491
+ ngOnInit() {}
492
+ getPlaceholder() {
493
+ return "url(" + encodeURI(this.placeholder()) + ")";
494
+ }
495
+ static {
496
+ this.ɵfac = i0.ɵɵngDeclareFactory({
497
+ minVersion: "12.0.0",
498
+ version: "22.2.5",
499
+ ngImport: i0,
500
+ type: DropzoneComponent,
501
+ deps: null,
502
+ target: i0.ɵɵFactoryTarget.Component
503
+ });
504
+ }
505
+ static {
506
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
507
+ minVersion: "17.0.0",
508
+ version: "22.2.5",
509
+ type: DropzoneComponent,
510
+ isStandalone: true,
511
+ selector: "nxt-dropzone",
512
+ inputs: {
513
+ disabled: {
514
+ classPropertyName: "disabled",
515
+ publicName: "disabled",
516
+ isSignal: true,
517
+ isRequired: false,
518
+ transformFunction: null
519
+ },
520
+ config: {
521
+ classPropertyName: "config",
522
+ publicName: "config",
523
+ isSignal: true,
524
+ isRequired: false,
525
+ transformFunction: null
526
+ },
527
+ message: {
528
+ classPropertyName: "message",
529
+ publicName: "message",
530
+ isSignal: true,
531
+ isRequired: false,
532
+ transformFunction: null
533
+ },
534
+ placeholder: {
535
+ classPropertyName: "placeholder",
536
+ publicName: "placeholder",
537
+ isSignal: true,
538
+ isRequired: false,
539
+ transformFunction: null
540
+ },
541
+ useDropzoneClass: {
542
+ classPropertyName: "useDropzoneClass",
543
+ publicName: "useDropzoneClass",
544
+ isSignal: true,
545
+ isRequired: false,
546
+ transformFunction: null
547
+ }
548
+ },
549
+ providers: [{
550
+ provide: NXT_DROPZONE_LISTENERS,
551
+ useExisting: DropzoneComponent
552
+ }],
553
+ viewQueries: [{
554
+ propertyName: "directiveRef",
555
+ first: true,
556
+ predicate: DropzoneDirective,
557
+ descendants: true,
558
+ isSignal: true
559
+ }],
560
+ usesInheritance: true,
561
+ ngImport: i0,
562
+ template: "<div class=\"dz-wrapper\"\r\n [class.dropzone]=\"useDropzoneClass()\"\r\n [nxtDropzone]=\"config()\"\r\n [disabled]=\"disabled()\">\r\n <div class=\"dz-message\"\r\n [class.disabled]=\"disabled()\"\r\n [class.dz-placeholder]=\"placeholder()\">\r\n <div class=\"dz-text\"\r\n [innerHTML]=\"text()\"></div>\r\n\r\n @if (placeholder()) {\r\n <div class=\"dz-image\"\r\n [style.background-image]=\"getPlaceholder()\"></div>\r\n }\r\n </div>\r\n\r\n <ng-content />\r\n</div>\r\n",
563
+ 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;overflow-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-preview .dz-image img{max-width:120px;max-height:120px}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.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone{border:1px solid rgba(0,0,0,.8);border-radius:5px;min-height:150px;padding:20px}.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{color:inherit;font:inherit;cursor:pointer;outline:inherit;background:0 0;border:none;padding:0}.dropzone .dz-preview{vertical-align:top;min-height:100px;margin:16px;display:inline-block;position:relative}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview.dz-file-preview .dz-image{background:linear-gradient(#eee,#ddd);border-radius:20px}.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{text-align:center;cursor:pointer;border:none;font-size:14px;display:block}.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;opacity:0;text-align:center;color:#000000e6;min-width:100%;max-width:100%;padding:2em 1em;font-size:13px;line-height:150%;position:absolute;top:0;left:0}.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{background-color:#fffc;border:1px solid rgba(200,200,200,.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){text-overflow:ellipsis;overflow:hidden}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:#fff6;border-radius:3px;padding:0 .4em}.dropzone .dz-preview:hover .dz-image img{filter:blur(8px);transform:scale(1.05)}.dropzone .dz-preview .dz-image{z-index:10;border-radius:20px;width:120px;height:120px;display:block;position:relative;overflow:hidden}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{animation:3s cubic-bezier(.77,0,.175,1) passing-through}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;animation:3s cubic-bezier(.77,0,.175,1) slide-in}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;background:#000c;border-radius:50%;margin-top:-27px;margin-left:-27px;display:block;position:absolute;top:50%;left:50%}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{fill:#fff;width:54px;height:54px;display:block}.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:6s infinite pulse}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;background:#000c;border:3px solid rgba(0,0,0,.8);border-radius:10px;height:20px;margin-top:-10px;position:absolute;top:50%;left:15%;right:15%;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#fff;border-radius:17px;width:0;height:100%;transition:width .3s ease-in-out;display:block;position:relative}.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;opacity:0;color:#fff;background:#b10606;border-radius:8px;width:140px;padding:.5em 1em;font-size:13px;transition:opacity .3s;display:none;position:absolute;top:130px;left:-10px}.dropzone .dz-preview .dz-error-message:after{content:\"\";border-bottom:6px solid #b10606;border-left:6px solid transparent;border-right:6px solid transparent;width:0;height:0;position:absolute;top:-6px;left:64px}\n"],
564
+ dependencies: [{
565
+ kind: "directive",
566
+ type: DropzoneDirective,
567
+ selector: "[nxtDropzone]",
568
+ inputs: ["disabled", "nxtDropzone"],
569
+ exportAs: ["nxtDropzone"]
570
+ }],
571
+ encapsulation: i0.ViewEncapsulation.None
572
+ });
573
+ }
574
+ };
575
+ i0.ɵɵngDeclareClassMetadata({
576
+ minVersion: "12.0.0",
577
+ version: "22.2.5",
578
+ ngImport: i0,
579
+ type: DropzoneComponent,
580
+ decorators: [{
581
+ type: Component,
582
+ args: [{
583
+ selector: "nxt-dropzone",
584
+ encapsulation: ViewEncapsulation.None,
585
+ providers: [{
586
+ provide: NXT_DROPZONE_LISTENERS,
587
+ useExisting: DropzoneComponent
588
+ }],
589
+ imports: [DropzoneDirective],
590
+ template: "<div class=\"dz-wrapper\"\r\n [class.dropzone]=\"useDropzoneClass()\"\r\n [nxtDropzone]=\"config()\"\r\n [disabled]=\"disabled()\">\r\n <div class=\"dz-message\"\r\n [class.disabled]=\"disabled()\"\r\n [class.dz-placeholder]=\"placeholder()\">\r\n <div class=\"dz-text\"\r\n [innerHTML]=\"text()\"></div>\r\n\r\n @if (placeholder()) {\r\n <div class=\"dz-image\"\r\n [style.background-image]=\"getPlaceholder()\"></div>\r\n }\r\n </div>\r\n\r\n <ng-content />\r\n</div>\r\n",
591
+ 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;overflow-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-preview .dz-image img{max-width:120px;max-height:120px}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.dz-clickable{cursor:pointer}.dropzone.dz-clickable *{cursor:default}.dropzone.dz-clickable .dz-message,.dropzone.dz-clickable .dz-message *{cursor:pointer}.dropzone{border:1px solid rgba(0,0,0,.8);border-radius:5px;min-height:150px;padding:20px}.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{color:inherit;font:inherit;cursor:pointer;outline:inherit;background:0 0;border:none;padding:0}.dropzone .dz-preview{vertical-align:top;min-height:100px;margin:16px;display:inline-block;position:relative}.dropzone .dz-preview:hover{z-index:1000}.dropzone .dz-preview.dz-file-preview .dz-image{background:linear-gradient(#eee,#ddd);border-radius:20px}.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{text-align:center;cursor:pointer;border:none;font-size:14px;display:block}.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;opacity:0;text-align:center;color:#000000e6;min-width:100%;max-width:100%;padding:2em 1em;font-size:13px;line-height:150%;position:absolute;top:0;left:0}.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{background-color:#fffc;border:1px solid rgba(200,200,200,.8)}.dropzone .dz-preview .dz-details .dz-filename:not(:hover) span{border:1px solid transparent}.dropzone .dz-preview .dz-details .dz-filename:not(:hover){text-overflow:ellipsis;overflow:hidden}.dropzone .dz-preview .dz-details .dz-filename span,.dropzone .dz-preview .dz-details .dz-size span{background-color:#fff6;border-radius:3px;padding:0 .4em}.dropzone .dz-preview:hover .dz-image img{filter:blur(8px);transform:scale(1.05)}.dropzone .dz-preview .dz-image{z-index:10;border-radius:20px;width:120px;height:120px;display:block;position:relative;overflow:hidden}.dropzone .dz-preview .dz-image img{display:block}.dropzone .dz-preview.dz-success .dz-success-mark{animation:3s cubic-bezier(.77,0,.175,1) passing-through}.dropzone .dz-preview.dz-error .dz-error-mark{opacity:1;animation:3s cubic-bezier(.77,0,.175,1) slide-in}.dropzone .dz-preview .dz-success-mark,.dropzone .dz-preview .dz-error-mark{pointer-events:none;opacity:0;z-index:500;background:#000c;border-radius:50%;margin-top:-27px;margin-left:-27px;display:block;position:absolute;top:50%;left:50%}.dropzone .dz-preview .dz-success-mark svg,.dropzone .dz-preview .dz-error-mark svg{fill:#fff;width:54px;height:54px;display:block}.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:6s infinite pulse}.dropzone .dz-preview .dz-progress{opacity:1;z-index:1000;pointer-events:none;background:#000c;border:3px solid rgba(0,0,0,.8);border-radius:10px;height:20px;margin-top:-10px;position:absolute;top:50%;left:15%;right:15%;overflow:hidden}.dropzone .dz-preview .dz-progress .dz-upload{background:#fff;border-radius:17px;width:0;height:100%;transition:width .3s ease-in-out;display:block;position:relative}.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;opacity:0;color:#fff;background:#b10606;border-radius:8px;width:140px;padding:.5em 1em;font-size:13px;transition:opacity .3s;display:none;position:absolute;top:130px;left:-10px}.dropzone .dz-preview .dz-error-message:after{content:\"\";border-bottom:6px solid #b10606;border-left:6px solid transparent;border-right:6px solid transparent;width:0;height:0;position:absolute;top:-6px;left:64px}\n"]
592
+ }]
593
+ }],
594
+ propDecorators: {
595
+ disabled: [{
596
+ type: i0.Input,
597
+ args: [{
598
+ isSignal: true,
599
+ alias: "disabled",
600
+ required: false
601
+ }]
602
+ }],
603
+ config: [{
604
+ type: i0.Input,
605
+ args: [{
606
+ isSignal: true,
607
+ alias: "config",
608
+ required: false
609
+ }]
610
+ }],
611
+ message: [{
612
+ type: i0.Input,
613
+ args: [{
614
+ isSignal: true,
615
+ alias: "message",
616
+ required: false
617
+ }]
618
+ }],
619
+ placeholder: [{
620
+ type: i0.Input,
621
+ args: [{
622
+ isSignal: true,
623
+ alias: "placeholder",
624
+ required: false
625
+ }]
626
+ }],
627
+ useDropzoneClass: [{
628
+ type: i0.Input,
629
+ args: [{
630
+ isSignal: true,
631
+ alias: "useDropzoneClass",
632
+ required: false
633
+ }]
634
+ }],
635
+ directiveRef: [{
636
+ type: i0.ViewChild,
637
+ args: [i0.forwardRef(() => DropzoneDirective), { isSignal: true }]
638
+ }]
639
+ }
640
+ });
332
641
  export { DropzoneComponent, DropzoneDirective, DropzoneListeners, NXT_DROPZONE_CONFIG, provideDropzoneConfig };
333
- //# sourceMappingURL=nxt-dropzone-wrapper.mjs.map
642
+
643
+ //# sourceMappingURL=nxt-dropzone-wrapper.mjs.map