nxt-dropzone-wrapper 21.0.0-alpha.0 → 22.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.
|
@@ -1,5 +1,5 @@
|
|
|
1
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
|
|
2
|
+
import { InjectionToken, makeEnvironmentProviders, output, Directive, inject, NgZone, ElementRef, KeyValueDiffers, PLATFORM_ID, input, computed, effect, viewChild, ViewEncapsulation, Component } from '@angular/core';
|
|
3
3
|
import { isPlatformBrowser } from '@angular/common';
|
|
4
4
|
import Dropzone from 'dropzone';
|
|
5
5
|
|
|
@@ -108,10 +108,10 @@ class DropzoneListeners {
|
|
|
108
108
|
this.DZ_MAXFILESREACHED = output({ alias: 'maxFilesReached' });
|
|
109
109
|
this.DZ_QUEUECOMPLETE = output({ alias: 'queueComplete' });
|
|
110
110
|
}
|
|
111
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
112
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
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
113
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneListeners, decorators: [{
|
|
115
115
|
type: Directive
|
|
116
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
117
|
/** @internal */
|
|
@@ -129,11 +129,12 @@ class DropzoneDirective extends DropzoneListeners {
|
|
|
129
129
|
this.platformId = inject(PLATFORM_ID);
|
|
130
130
|
this.defaults = inject(NXT_DROPZONE_CONFIG, { optional: true });
|
|
131
131
|
this.listeners = inject(NXT_DROPZONE_LISTENERS, { optional: true }) || this;
|
|
132
|
-
this.disabled = input(false,
|
|
132
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
133
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
133
134
|
/** Can be used to provide optional custom config */
|
|
134
|
-
this._config = input(undefined, { ...(ngDevMode ? { debugName: "_config" } : {}), alias: 'nxtDropzone' });
|
|
135
|
+
this._config = input(undefined, { ...(ngDevMode ? { debugName: "_config" } : /* istanbul ignore next */ {}), alias: 'nxtDropzone' });
|
|
135
136
|
this.configDiff = this.differs.find(this._config() || {}).create();
|
|
136
|
-
this.config = computed(() => ({ ...this._config() }), { ...(ngDevMode ? { debugName: "config" } : {}), equal: (_, n) => !this.configDiff.diff(n) });
|
|
137
|
+
this.config = computed(() => ({ ...this._config() }), { ...(ngDevMode ? { debugName: "config" } : /* istanbul ignore next */ {}), equal: (_, n) => !this.configDiff.diff(n) });
|
|
137
138
|
this._params = computed(() => {
|
|
138
139
|
let newParams = this.defaults
|
|
139
140
|
? new _DropzoneConfig(this.defaults)
|
|
@@ -149,12 +150,17 @@ class DropzoneDirective extends DropzoneListeners {
|
|
|
149
150
|
delete params[k];
|
|
150
151
|
});
|
|
151
152
|
return params;
|
|
152
|
-
},
|
|
153
|
+
}, /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "_params" }] : /* istanbul ignore next */ []));
|
|
153
155
|
this.paramDiff = this.differs.find({ ...this._params() }).create();
|
|
154
|
-
this.params = computed(() => ({ ...this._params() }), { ...(ngDevMode ? { debugName: "params" } : {}), equal: (_, n) => {
|
|
156
|
+
this.params = computed(() => ({ ...this._params() }), { ...(ngDevMode ? { debugName: "params" } : /* istanbul ignore next */ {}), equal: (_, n) => {
|
|
155
157
|
const d = this.paramDiff.diff(n);
|
|
156
158
|
if (d) {
|
|
157
159
|
let hasChanges = false;
|
|
160
|
+
d.forEachRemovedItem((r) => {
|
|
161
|
+
if (!internalChanges.has(r.key) && r.currentValue !== r.previousValue)
|
|
162
|
+
hasChanges = true;
|
|
163
|
+
});
|
|
158
164
|
d.forEachItem(r => {
|
|
159
165
|
if (!internalChanges.has(r.key) && r.currentValue !== r.previousValue)
|
|
160
166
|
hasChanges = true;
|
|
@@ -164,9 +170,11 @@ class DropzoneDirective extends DropzoneListeners {
|
|
|
164
170
|
return !d;
|
|
165
171
|
} });
|
|
166
172
|
/** @internal */
|
|
167
|
-
this._isSingle = computed(() => this.params()?.maxFiles === 1,
|
|
173
|
+
this._isSingle = computed(() => this.params()?.maxFiles === 1, /* @ts-ignore */
|
|
174
|
+
...(ngDevMode ? [{ debugName: "_isSingle" }] : /* istanbul ignore next */ []));
|
|
168
175
|
/** @internal */
|
|
169
|
-
this._isMultiple = computed(() => this.params()?.maxFiles !== 1,
|
|
176
|
+
this._isMultiple = computed(() => this.params()?.maxFiles !== 1, /* @ts-ignore */
|
|
177
|
+
...(ngDevMode ? [{ debugName: "_isMultiple" }] : /* istanbul ignore next */ []));
|
|
170
178
|
let disabled = this.disabled();
|
|
171
179
|
effect(() => {
|
|
172
180
|
disabled = this.disabled();
|
|
@@ -256,10 +264,10 @@ class DropzoneDirective extends DropzoneListeners {
|
|
|
256
264
|
this._instance = undefined;
|
|
257
265
|
}
|
|
258
266
|
}
|
|
259
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
260
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
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 }); }
|
|
261
269
|
}
|
|
262
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneDirective, decorators: [{
|
|
263
271
|
type: Directive,
|
|
264
272
|
args: [{
|
|
265
273
|
selector: '[nxtDropzone]',
|
|
@@ -275,18 +283,25 @@ class DropzoneComponent extends DropzoneListeners {
|
|
|
275
283
|
constructor() {
|
|
276
284
|
super(...arguments);
|
|
277
285
|
/** Disables / detaches Dropzone from the element */
|
|
278
|
-
this.disabled = input(false,
|
|
286
|
+
this.disabled = input(false, /* @ts-ignore */
|
|
287
|
+
...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
|
|
279
288
|
/** Custom config to override the global defaults */
|
|
280
|
-
this.config = input(
|
|
289
|
+
this.config = input(/* @ts-ignore */
|
|
290
|
+
...(ngDevMode ? [undefined, { debugName: "config" }] : /* istanbul ignore next */ []));
|
|
281
291
|
/** Message to show for the user on the upload area */
|
|
282
|
-
this.message = input('Click or drag files to upload',
|
|
292
|
+
this.message = input('Click or drag files to upload', /* @ts-ignore */
|
|
293
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
283
294
|
/** Placeholder image to be shown as the upload area */
|
|
284
|
-
this.placeholder = input('',
|
|
295
|
+
this.placeholder = input('', /* @ts-ignore */
|
|
296
|
+
...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
|
|
285
297
|
/** Use 'dropzone' class (use provided default styles) */
|
|
286
|
-
this.useDropzoneClass = input(true,
|
|
287
|
-
|
|
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 */ []));
|
|
288
302
|
/** @internal */
|
|
289
|
-
this.text = computed(() => this.config()?.dictDefaultMessage || this.message(),
|
|
303
|
+
this.text = computed(() => this.config()?.dictDefaultMessage || this.message(), /* @ts-ignore */
|
|
304
|
+
...(ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []));
|
|
290
305
|
}
|
|
291
306
|
/** @internal */
|
|
292
307
|
ngOnInit() { }
|
|
@@ -294,13 +309,13 @@ class DropzoneComponent extends DropzoneListeners {
|
|
|
294
309
|
getPlaceholder() {
|
|
295
310
|
return 'url(' + encodeURI(this.placeholder()) + ')';
|
|
296
311
|
}
|
|
297
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
298
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "
|
|
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: [{
|
|
299
314
|
provide: NXT_DROPZONE_LISTENERS,
|
|
300
315
|
useExisting: DropzoneComponent
|
|
301
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 }); }
|
|
302
317
|
}
|
|
303
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
318
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.6", ngImport: i0, type: DropzoneComponent, decorators: [{
|
|
304
319
|
type: Component,
|
|
305
320
|
args: [{ selector: 'nxt-dropzone', encapsulation: ViewEncapsulation.None, providers: [{
|
|
306
321
|
provide: NXT_DROPZONE_LISTENERS,
|
|
@@ -310,31 +325,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImpor
|
|
|
310
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"] }]
|
|
311
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 }] }] } });
|
|
312
327
|
|
|
313
|
-
/** @deprecated use standalone imports */
|
|
314
|
-
class DropzoneModule {
|
|
315
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DropzoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
316
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.8", ngImport: i0, type: DropzoneModule, imports: [DropzoneComponent,
|
|
317
|
-
DropzoneDirective], exports: [DropzoneComponent,
|
|
318
|
-
DropzoneDirective] }); }
|
|
319
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DropzoneModule }); }
|
|
320
|
-
}
|
|
321
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.8", ngImport: i0, type: DropzoneModule, decorators: [{
|
|
322
|
-
type: NgModule,
|
|
323
|
-
args: [{
|
|
324
|
-
imports: [
|
|
325
|
-
DropzoneComponent,
|
|
326
|
-
DropzoneDirective
|
|
327
|
-
],
|
|
328
|
-
exports: [
|
|
329
|
-
DropzoneComponent,
|
|
330
|
-
DropzoneDirective
|
|
331
|
-
]
|
|
332
|
-
}]
|
|
333
|
-
}] });
|
|
334
|
-
|
|
335
328
|
/**
|
|
336
329
|
* Generated bundle index. Do not edit.
|
|
337
330
|
*/
|
|
338
331
|
|
|
339
|
-
export { DropzoneComponent, DropzoneDirective, DropzoneListeners,
|
|
332
|
+
export { DropzoneComponent, DropzoneDirective, DropzoneListeners, NXT_DROPZONE_CONFIG, provideDropzoneConfig };
|
|
340
333
|
//# sourceMappingURL=nxt-dropzone-wrapper.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nxt-dropzone-wrapper.mjs","sources":["../../../packages/dropzone-wrapper/src/lib/dropzone.interfaces.ts","../../../packages/dropzone-wrapper/src/lib/dropzone.directive.ts","../../../packages/dropzone-wrapper/src/lib/dropzone.component.ts","../../../packages/dropzone-wrapper/src/lib/dropzone.component.html","../../../packages/dropzone-wrapper/src/lib/dropzone.module.ts","../../../packages/dropzone-wrapper/src/nxt-dropzone-wrapper.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-output-rename */\r\nimport { InjectionToken, makeEnvironmentProviders, output, Directive, OutputEmitterRef } from '@angular/core'\r\n\r\nexport const NXT_DROPZONE_CONFIG = new InjectionToken<DropzoneConfig>('NXT_DROPZONE_CONFIG')\r\n\r\nexport function provideDropzoneConfig(config: DropzoneConfig) {\r\n return makeEnvironmentProviders([\r\n {\r\n provide: NXT_DROPZONE_CONFIG,\r\n useValue: config\r\n }\r\n ])\r\n}\r\n\r\n/** @internal */\r\nexport const DropzoneEvents = [\r\n 'init',\r\n\r\n 'drop',\r\n 'dragStart',\r\n 'dragEnd',\r\n 'dragEnter',\r\n 'dragOver',\r\n 'dragLeave',\r\n 'paste',\r\n\r\n 'reset',\r\n\r\n 'addedFile',\r\n 'addedFiles',\r\n 'removedFile',\r\n 'thumbnail',\r\n\r\n 'error',\r\n 'errorMultiple',\r\n\r\n 'processing',\r\n 'processingMultiple',\r\n\r\n 'uploadProgress',\r\n 'totalUploadProgress',\r\n\r\n 'sending',\r\n 'sendingMultiple',\r\n\r\n 'success',\r\n 'successMultiple',\r\n\r\n 'canceled',\r\n 'canceledMultiple',\r\n\r\n 'complete',\r\n 'completeMultiple',\r\n\r\n 'maxFilesExceeded',\r\n 'maxFilesReached',\r\n\r\n 'queueComplete'\r\n] as const\r\n\r\n/** @internal */\r\nexport type DropzoneEvent = typeof DropzoneEvents[number]\r\n\r\n/** @internal */\r\nexport type DZ_EVENTS = { [P in `DZ_${Uppercase<DropzoneEvent>}`]: OutputEmitterRef<any> }\r\n\r\nexport interface DropzoneConfig extends Dropzone.DropzoneOptions {\r\n /**\r\n * Time in ms until input resets after a successful upload\r\n */\r\n autoReset?: number\r\n /**\r\n * Time in ms until input resets after upload error\r\n */\r\n errorReset?: number\r\n /**\r\n * Time in ms until input resets after cancelled upload\r\n */\r\n cancelReset?: number\r\n}\r\n\r\n/** @internal */\r\nexport const internalChanges = new Set([\r\n 'autoReset',\r\n 'errorReset',\r\n 'cancelReset'\r\n])\r\n\r\n/** @internal */\r\nexport class _DropzoneConfig implements DropzoneConfig {\r\n autoReset?: number\r\n errorReset?: number\r\n cancelReset?: number\r\n\r\n maxFiles?: number\r\n\r\n constructor(config: DropzoneConfig = {}) {\r\n this.assign(config)\r\n }\r\n\r\n assign(config: DropzoneConfig | any = {}, target?: any) {\r\n target = target || this\r\n\r\n for (const key in config) {\r\n if (config[key] != null\r\n && config[key] != undefined\r\n && !Array.isArray(config[key])\r\n && typeof config[key] === 'object'\r\n && !(config[key] instanceof HTMLElement)\r\n ) {\r\n target[key] = {}\r\n\r\n this.assign(config[key], target[key])\r\n } else {\r\n target[key] = config[key]\r\n }\r\n }\r\n }\r\n}\r\n\r\n@Directive()\r\nexport class DropzoneListeners implements DZ_EVENTS {\r\n readonly DZ_INIT = output<Dropzone>({ alias: 'init' })\r\n readonly DZ_DROP = output<DragEvent>({ alias: 'drop' })\r\n readonly DZ_DRAGSTART = output<DragEvent>({ alias: 'dragStart' })\r\n readonly DZ_DRAGEND = output<DragEvent>({ alias: 'dragEnd' })\r\n readonly DZ_DRAGENTER = output<DragEvent>({ alias: 'dragEnter' })\r\n readonly DZ_DRAGOVER = output<DragEvent>({ alias: 'dragOver' })\r\n readonly DZ_DRAGLEAVE = output<DragEvent>({ alias: 'dragLeave' })\r\n readonly DZ_PASTE = output<DragEvent>({ alias: 'paste' })\r\n readonly DZ_RESET = output<void>({ alias: 'reset' })\r\n readonly DZ_ADDEDFILE = output<Dropzone.DropzoneFile>({ alias: 'addedFile' })\r\n readonly DZ_ADDEDFILES = output<Dropzone.DropzoneFile>({ alias: 'addedFiles' })\r\n readonly DZ_REMOVEDFILE = output<Dropzone.DropzoneFile>({ alias: 'removedFile' })\r\n readonly DZ_THUMBNAIL = output<[Dropzone.DropzoneFile, string]>({ alias: 'thumbnail' })\r\n readonly DZ_ERROR = output<[Dropzone.DropzoneFile, string | Error]>({ alias: 'error' })\r\n readonly DZ_ERRORMULTIPLE = output<[Dropzone.DropzoneFile[], string | Error]>({ alias: 'errorMultiple' })\r\n readonly DZ_PROCESSING = output<Dropzone.DropzoneFile>({ alias: 'processing' })\r\n readonly DZ_PROCESSINGMULTIPLE = output<Dropzone.DropzoneFile[]>({ alias: 'processingMultiple' })\r\n readonly DZ_UPLOADPROGRESS = output<[Dropzone.DropzoneFile, number, number]>({ alias: 'uploadProgress' })\r\n readonly DZ_TOTALUPLOADPROGRESS = output<[number, number, number]>({ alias: 'totalUploadProgress' })\r\n readonly DZ_SENDING = output<[Dropzone.DropzoneFile, XMLHttpRequest, FormData]>({ alias: 'sending' })\r\n readonly DZ_SENDINGMULTIPLE = output<[Dropzone.DropzoneFile[], XMLHttpRequest, FormData]>({ alias: 'sendingMultiple' })\r\n // eslint-disable-next-line @typescript-eslint/no-restricted-types\r\n readonly DZ_SUCCESS = output<[Dropzone.DropzoneFile, Object | string]>({ alias: 'success' })\r\n readonly DZ_SUCCESSMULTIPLE = output<Dropzone.DropzoneFile[]>({ alias: 'successMultiple' })\r\n readonly DZ_CANCELED = output<Dropzone.DropzoneFile>({ alias: 'canceled' })\r\n readonly DZ_CANCELEDMULTIPLE = output<Dropzone.DropzoneFile[]>({ alias: 'canceledMultiple' })\r\n readonly DZ_COMPLETE = output<Dropzone.DropzoneFile>({ alias: 'complete' })\r\n readonly DZ_COMPLETEMULTIPLE = output<Dropzone.DropzoneFile[]>({ alias: 'completeMultiple' })\r\n readonly DZ_MAXFILESEXCEEDED = output<Dropzone.DropzoneFile>({ alias: 'maxFilesExceeded' })\r\n readonly DZ_MAXFILESREACHED = output<Dropzone.DropzoneFile[]>({ alias: 'maxFilesReached' })\r\n readonly DZ_QUEUECOMPLETE = output<void>({ alias: 'queueComplete' })\r\n}\r\n\r\n/** @internal */\r\nexport const NXT_DROPZONE_LISTENERS = new InjectionToken<DropzoneListeners>('NXT_DROPZONE_LISTENERS')\r\n","import { isPlatformBrowser } from '@angular/common'\r\nimport { Directive, ElementRef, KeyValueDiffers, NgZone, OnDestroy, PLATFORM_ID, computed, effect, inject, input } from '@angular/core'\r\nimport Dropzone from 'dropzone'\r\nimport { DropzoneConfig, DropzoneEvent, DropzoneEvents, DropzoneListeners, internalChanges, NXT_DROPZONE_CONFIG, _DropzoneConfig, NXT_DROPZONE_LISTENERS } from './dropzone.interfaces'\r\n\r\n@Directive({\r\n selector: '[nxtDropzone]',\r\n exportAs: 'nxtDropzone',\r\n host: {\r\n '[class.dz-single]': '_isSingle()',\r\n '[class.dz-multiple]': '_isMultiple()'\r\n }\r\n})\r\nexport class DropzoneDirective extends DropzoneListeners implements OnDestroy {\r\n\r\n private readonly zone = inject(NgZone)\r\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef)\r\n private readonly differs = inject(KeyValueDiffers)\r\n private readonly platformId = inject(PLATFORM_ID)\r\n private readonly defaults = inject(NXT_DROPZONE_CONFIG, { optional: true })\r\n private readonly listeners: DropzoneListeners = inject(NXT_DROPZONE_LISTENERS, { optional: true }) || this\r\n\r\n readonly disabled = input<boolean>(false)\r\n\r\n /** Can be used to provide optional custom config */\r\n readonly _config = input<DropzoneConfig>(undefined, { alias: 'nxtDropzone' })\r\n private readonly configDiff = this.differs.find(this._config() || {}).create()\r\n private readonly config = computed(() => ({ ...this._config() }), {\r\n equal: (_, n) => !this.configDiff.diff(n)\r\n })\r\n\r\n private readonly _params = computed(() => {\r\n let newParams = this.defaults\r\n ? new _DropzoneConfig(this.defaults)\r\n : undefined\r\n const config = this.config()\r\n if (newParams && config)\r\n newParams.assign(config)\r\n else if (config)\r\n newParams = new _DropzoneConfig(config)\r\n const params = { ...newParams }\r\n Object.entries(params).forEach(([k, v]) => {\r\n if (v === undefined)\r\n delete (params as any)[k]\r\n })\r\n return params as DropzoneConfig\r\n })\r\n private readonly paramDiff = this.differs.find({ ...this._params() }).create()\r\n private readonly params = computed(() => ({ ...this._params() }), {\r\n equal: (_, n) => {\r\n const d = this.paramDiff.diff(n)\r\n if (d) {\r\n let hasChanges = false\r\n d.forEachItem(r => {\r\n if (!internalChanges.has(r.key as any) && r.currentValue !== r.previousValue)\r\n hasChanges = true\r\n })\r\n return !hasChanges\r\n }\r\n return !d\r\n }\r\n })\r\n\r\n private _instance?: Dropzone | undefined\r\n\r\n get dropzone() {\r\n return this._instance\r\n }\r\n\r\n /** @internal */\r\n readonly _isSingle = computed(() => this.params()?.maxFiles === 1)\r\n\r\n /** @internal */\r\n readonly _isMultiple = computed(() => this.params()?.maxFiles !== 1)\r\n\r\n constructor() {\r\n super()\r\n let disabled = this.disabled()\r\n effect(() => {\r\n disabled = this.disabled()\r\n const instance = this._instance\r\n if (instance) {\r\n if (disabled)\r\n this.zone.runOutsideAngular(() => {\r\n instance.disable()\r\n })\r\n else\r\n this.zone.runOutsideAngular(() => {\r\n instance.enable()\r\n })\r\n }\r\n })\r\n effect(() => {\r\n const params = this.params()\r\n this.destroyInstance()\r\n this.initInstance(params, disabled)\r\n })\r\n }\r\n\r\n /** @internal */\r\n ngOnDestroy(): void {\r\n this.destroyInstance()\r\n }\r\n\r\n /** @internal */\r\n reset(cancel?: boolean) {\r\n const instance = this._instance\r\n if (instance) {\r\n this.zone.runOutsideAngular(() => {\r\n instance.removeAllFiles(cancel)\r\n })\r\n }\r\n }\r\n\r\n private initInstance(params?: DropzoneConfig, disabled = false) {\r\n if (!isPlatformBrowser(this.platformId) || !params) {\r\n return\r\n }\r\n\r\n this.zone.runOutsideAngular(() => {\r\n const instance = new Dropzone(this.elementRef.nativeElement, params)\r\n if (disabled)\r\n this.zone.runOutsideAngular(() => {\r\n instance.disable()\r\n })\r\n\r\n this._instance = instance\r\n\r\n this.zone.run(() => {\r\n this.listeners.DZ_INIT.emit(instance)\r\n })\r\n\r\n // Add auto reset handling for events\r\n instance.on('success', () => {\r\n const timeout = this.params()?.autoReset ?? -1\r\n if (timeout >= 0) {\r\n setTimeout(() => this.reset(), timeout)\r\n }\r\n })\r\n\r\n instance.on('error', () => {\r\n const timeout = this.params()?.errorReset ?? -1\r\n if (timeout >= 0) {\r\n setTimeout(() => this.reset(), timeout)\r\n }\r\n })\r\n\r\n instance.on('canceled', () => {\r\n const timeout = this.params()?.cancelReset ?? -1\r\n if (timeout >= 0) {\r\n setTimeout(() => this.reset(), timeout)\r\n }\r\n })\r\n\r\n // Add native Dropzone event handling\r\n DropzoneEvents.forEach((eventName: DropzoneEvent) => {\r\n instance.on(eventName.toLowerCase(), (...args: any[]) => {\r\n args = (args.length === 1) ? args[0] : args\r\n\r\n const output = `DZ_${eventName.toUpperCase()}`\r\n\r\n const emitter = this.listeners[output as keyof DropzoneListeners]\r\n\r\n this.zone.run(() => {\r\n emitter.emit(args as any)\r\n })\r\n })\r\n })\r\n })\r\n }\r\n\r\n private destroyInstance() {\r\n const instance = this._instance\r\n if (instance) {\r\n this.zone.runOutsideAngular(() => {\r\n instance.destroy()\r\n })\r\n\r\n this._instance = undefined\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, ViewEncapsulation, computed, input, viewChild } from '@angular/core'\r\nimport { DropzoneDirective } from './dropzone.directive'\r\nimport { DropzoneConfig, DropzoneListeners, NXT_DROPZONE_LISTENERS } from './dropzone.interfaces'\r\n\r\n@Component({\r\n selector: 'nxt-dropzone',\r\n templateUrl: './dropzone.component.html',\r\n styleUrls: [\r\n './dropzone.component.scss',\r\n '../../../../node_modules/dropzone/dist/dropzone.css'\r\n ],\r\n encapsulation: ViewEncapsulation.None,\r\n providers: [{\r\n provide: NXT_DROPZONE_LISTENERS,\r\n useExisting: DropzoneComponent\r\n }],\r\n imports: [\r\n DropzoneDirective\r\n ]\r\n})\r\nexport class DropzoneComponent extends DropzoneListeners implements OnInit {\r\n\r\n /** Disables / detaches Dropzone from the element */\r\n readonly disabled = input<boolean>(false)\r\n\r\n /** Custom config to override the global defaults */\r\n readonly config = input<DropzoneConfig>()\r\n\r\n /** Message to show for the user on the upload area */\r\n readonly message = input<string>('Click or drag files to upload')\r\n /** Placeholder image to be shown as the upload area */\r\n readonly placeholder = input<string>('')\r\n\r\n /** Use 'dropzone' class (use provided default styles) */\r\n readonly useDropzoneClass = input<boolean>(true)\r\n\r\n readonly directiveRef = viewChild(DropzoneDirective)\r\n\r\n /** @internal */\r\n readonly text = computed(() => this.config()?.dictDefaultMessage || this.message())\r\n\r\n /** @internal */\r\n ngOnInit(): void { }\r\n\r\n /** @internal */\r\n getPlaceholder(): string {\r\n return 'url(' + encodeURI(this.placeholder()) + ')'\r\n }\r\n}\r\n","<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","import { NgModule } from '@angular/core'\r\nimport { DropzoneComponent } from './dropzone.component'\r\nimport { DropzoneDirective } from './dropzone.directive'\r\n\r\n/** @deprecated use standalone imports */\r\n@NgModule({\r\n imports: [\r\n DropzoneComponent,\r\n DropzoneDirective\r\n ],\r\n exports: [\r\n DropzoneComponent,\r\n DropzoneDirective\r\n ]\r\n})\r\nexport class DropzoneModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;MAGa,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB;AAErF,SAAU,qBAAqB,CAAC,MAAsB,EAAA;AACxD,IAAA,OAAO,wBAAwB,CAAC;AAC5B,QAAA;AACI,YAAA,OAAO,EAAE,mBAAmB;AAC5B,YAAA,QAAQ,EAAE;AACb;AACJ,KAAA,CAAC;AACN;AAEA;AACO,MAAM,cAAc,GAAG;IAC1B,MAAM;IAEN,MAAM;IACN,WAAW;IACX,SAAS;IACT,WAAW;IACX,UAAU;IACV,WAAW;IACX,OAAO;IAEP,OAAO;IAEP,WAAW;IACX,YAAY;IACZ,aAAa;IACb,WAAW;IAEX,OAAO;IACP,eAAe;IAEf,YAAY;IACZ,oBAAoB;IAEpB,gBAAgB;IAChB,qBAAqB;IAErB,SAAS;IACT,iBAAiB;IAEjB,SAAS;IACT,iBAAiB;IAEjB,UAAU;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AAA,OAAA,EACO;wBACL;AACH,qBAAA,EAAA,QAAA,EAAA,6iBAAA,EAAA,MAAA,EAAA,CAAA,skGAAA,EAAA,2/IAAA,CAAA,EAAA;8kBAkBiC,iBAAiB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEhCvD;MAWa,cAAc,CAAA;8GAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAd,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YARnB,iBAAiB;AACjB,YAAA,iBAAiB,aAGjB,iBAAiB;YACjB,iBAAiB,CAAA,EAAA,CAAA,CAAA;+GAGZ,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAV1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,iBAAiB;wBACjB;AACH,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACL,iBAAiB;wBACjB;AACH;AACJ,iBAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"nxt-dropzone-wrapper.mjs","sources":["../../../packages/dropzone-wrapper/src/lib/dropzone.interfaces.ts","../../../packages/dropzone-wrapper/src/lib/dropzone.directive.ts","../../../packages/dropzone-wrapper/src/lib/dropzone.component.ts","../../../packages/dropzone-wrapper/src/lib/dropzone.component.html","../../../packages/dropzone-wrapper/src/nxt-dropzone-wrapper.ts"],"sourcesContent":["/* eslint-disable @angular-eslint/no-output-rename */\r\nimport { InjectionToken, makeEnvironmentProviders, output, Directive, OutputEmitterRef } from '@angular/core'\r\n\r\nexport const NXT_DROPZONE_CONFIG = new InjectionToken<DropzoneConfig>('NXT_DROPZONE_CONFIG')\r\n\r\nexport function provideDropzoneConfig(config: DropzoneConfig) {\r\n return makeEnvironmentProviders([\r\n {\r\n provide: NXT_DROPZONE_CONFIG,\r\n useValue: config\r\n }\r\n ])\r\n}\r\n\r\n/** @internal */\r\nexport const DropzoneEvents = [\r\n 'init',\r\n\r\n 'drop',\r\n 'dragStart',\r\n 'dragEnd',\r\n 'dragEnter',\r\n 'dragOver',\r\n 'dragLeave',\r\n 'paste',\r\n\r\n 'reset',\r\n\r\n 'addedFile',\r\n 'addedFiles',\r\n 'removedFile',\r\n 'thumbnail',\r\n\r\n 'error',\r\n 'errorMultiple',\r\n\r\n 'processing',\r\n 'processingMultiple',\r\n\r\n 'uploadProgress',\r\n 'totalUploadProgress',\r\n\r\n 'sending',\r\n 'sendingMultiple',\r\n\r\n 'success',\r\n 'successMultiple',\r\n\r\n 'canceled',\r\n 'canceledMultiple',\r\n\r\n 'complete',\r\n 'completeMultiple',\r\n\r\n 'maxFilesExceeded',\r\n 'maxFilesReached',\r\n\r\n 'queueComplete'\r\n] as const\r\n\r\n/** @internal */\r\nexport type DropzoneEvent = typeof DropzoneEvents[number]\r\n\r\n/** @internal */\r\nexport type DZ_EVENTS = { [P in `DZ_${Uppercase<DropzoneEvent>}`]: OutputEmitterRef<any> }\r\n\r\nexport interface DropzoneConfig extends Dropzone.DropzoneOptions {\r\n /**\r\n * Time in ms until input resets after a successful upload\r\n */\r\n autoReset?: number\r\n /**\r\n * Time in ms until input resets after upload error\r\n */\r\n errorReset?: number\r\n /**\r\n * Time in ms until input resets after cancelled upload\r\n */\r\n cancelReset?: number\r\n}\r\n\r\n/** @internal */\r\nexport const internalChanges = new Set([\r\n 'autoReset',\r\n 'errorReset',\r\n 'cancelReset'\r\n])\r\n\r\n/** @internal */\r\nexport class _DropzoneConfig implements DropzoneConfig {\r\n autoReset?: number\r\n errorReset?: number\r\n cancelReset?: number\r\n\r\n maxFiles?: number\r\n\r\n constructor(config: DropzoneConfig = {}) {\r\n this.assign(config)\r\n }\r\n\r\n assign(config: DropzoneConfig | any = {}, target?: any) {\r\n target = target || this\r\n\r\n for (const key in config) {\r\n if (config[key] != null\r\n && config[key] != undefined\r\n && !Array.isArray(config[key])\r\n && typeof config[key] === 'object'\r\n && !(config[key] instanceof HTMLElement)\r\n ) {\r\n target[key] = {}\r\n\r\n this.assign(config[key], target[key])\r\n } else {\r\n target[key] = config[key]\r\n }\r\n }\r\n }\r\n}\r\n\r\n@Directive()\r\nexport class DropzoneListeners implements DZ_EVENTS {\r\n readonly DZ_INIT = output<Dropzone>({ alias: 'init' })\r\n readonly DZ_DROP = output<DragEvent>({ alias: 'drop' })\r\n readonly DZ_DRAGSTART = output<DragEvent>({ alias: 'dragStart' })\r\n readonly DZ_DRAGEND = output<DragEvent>({ alias: 'dragEnd' })\r\n readonly DZ_DRAGENTER = output<DragEvent>({ alias: 'dragEnter' })\r\n readonly DZ_DRAGOVER = output<DragEvent>({ alias: 'dragOver' })\r\n readonly DZ_DRAGLEAVE = output<DragEvent>({ alias: 'dragLeave' })\r\n readonly DZ_PASTE = output<DragEvent>({ alias: 'paste' })\r\n readonly DZ_RESET = output<void>({ alias: 'reset' })\r\n readonly DZ_ADDEDFILE = output<Dropzone.DropzoneFile>({ alias: 'addedFile' })\r\n readonly DZ_ADDEDFILES = output<Dropzone.DropzoneFile>({ alias: 'addedFiles' })\r\n readonly DZ_REMOVEDFILE = output<Dropzone.DropzoneFile>({ alias: 'removedFile' })\r\n readonly DZ_THUMBNAIL = output<[Dropzone.DropzoneFile, string]>({ alias: 'thumbnail' })\r\n readonly DZ_ERROR = output<[Dropzone.DropzoneFile, string | Error]>({ alias: 'error' })\r\n readonly DZ_ERRORMULTIPLE = output<[Dropzone.DropzoneFile[], string | Error]>({ alias: 'errorMultiple' })\r\n readonly DZ_PROCESSING = output<Dropzone.DropzoneFile>({ alias: 'processing' })\r\n readonly DZ_PROCESSINGMULTIPLE = output<Dropzone.DropzoneFile[]>({ alias: 'processingMultiple' })\r\n readonly DZ_UPLOADPROGRESS = output<[Dropzone.DropzoneFile, number, number]>({ alias: 'uploadProgress' })\r\n readonly DZ_TOTALUPLOADPROGRESS = output<[number, number, number]>({ alias: 'totalUploadProgress' })\r\n readonly DZ_SENDING = output<[Dropzone.DropzoneFile, XMLHttpRequest, FormData]>({ alias: 'sending' })\r\n readonly DZ_SENDINGMULTIPLE = output<[Dropzone.DropzoneFile[], XMLHttpRequest, FormData]>({ alias: 'sendingMultiple' })\r\n // eslint-disable-next-line @typescript-eslint/no-restricted-types\r\n readonly DZ_SUCCESS = output<[Dropzone.DropzoneFile, Object | string]>({ alias: 'success' })\r\n readonly DZ_SUCCESSMULTIPLE = output<Dropzone.DropzoneFile[]>({ alias: 'successMultiple' })\r\n readonly DZ_CANCELED = output<Dropzone.DropzoneFile>({ alias: 'canceled' })\r\n readonly DZ_CANCELEDMULTIPLE = output<Dropzone.DropzoneFile[]>({ alias: 'canceledMultiple' })\r\n readonly DZ_COMPLETE = output<Dropzone.DropzoneFile>({ alias: 'complete' })\r\n readonly DZ_COMPLETEMULTIPLE = output<Dropzone.DropzoneFile[]>({ alias: 'completeMultiple' })\r\n readonly DZ_MAXFILESEXCEEDED = output<Dropzone.DropzoneFile>({ alias: 'maxFilesExceeded' })\r\n readonly DZ_MAXFILESREACHED = output<Dropzone.DropzoneFile[]>({ alias: 'maxFilesReached' })\r\n readonly DZ_QUEUECOMPLETE = output<void>({ alias: 'queueComplete' })\r\n}\r\n\r\n/** @internal */\r\nexport const NXT_DROPZONE_LISTENERS = new InjectionToken<DropzoneListeners>('NXT_DROPZONE_LISTENERS')\r\n","import { isPlatformBrowser } from '@angular/common'\nimport { Directive, ElementRef, KeyValueDiffers, NgZone, OnDestroy, PLATFORM_ID, computed, effect, inject, input } from '@angular/core'\nimport Dropzone from 'dropzone'\nimport { DropzoneConfig, DropzoneEvent, DropzoneEvents, DropzoneListeners, internalChanges, NXT_DROPZONE_CONFIG, _DropzoneConfig, NXT_DROPZONE_LISTENERS } from './dropzone.interfaces'\n\n@Directive({\n selector: '[nxtDropzone]',\n exportAs: 'nxtDropzone',\n host: {\n '[class.dz-single]': '_isSingle()',\n '[class.dz-multiple]': '_isMultiple()'\n }\n})\nexport class DropzoneDirective extends DropzoneListeners implements OnDestroy {\n\n private readonly zone = inject(NgZone)\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef)\n private readonly differs = inject(KeyValueDiffers)\n private readonly platformId = inject(PLATFORM_ID)\n private readonly defaults = inject(NXT_DROPZONE_CONFIG, { optional: true })\n private readonly listeners: DropzoneListeners = inject(NXT_DROPZONE_LISTENERS, { optional: true }) || this\n\n readonly disabled = input<boolean>(false)\n\n /** Can be used to provide optional custom config */\n readonly _config = input<DropzoneConfig>(undefined, { alias: 'nxtDropzone' })\n private readonly configDiff = this.differs.find(this._config() || {}).create()\n private readonly config = computed(() => ({ ...this._config() }), {\n equal: (_, n) => !this.configDiff.diff(n)\n })\n\n private readonly _params = computed(() => {\n let newParams = this.defaults\n ? new _DropzoneConfig(this.defaults)\n : undefined\n const config = this.config()\n if (newParams && config)\n newParams.assign(config)\n else if (config)\n newParams = new _DropzoneConfig(config)\n const params = { ...newParams }\n Object.entries(params).forEach(([k, v]) => {\n if (v === undefined)\n delete (params as any)[k]\n })\n return params as DropzoneConfig\n })\n private readonly paramDiff = this.differs.find({ ...this._params() }).create()\n private readonly params = computed(() => ({ ...this._params() }), {\n equal: (_, n) => {\n const d = this.paramDiff.diff(n)\n if (d) {\n let hasChanges = false\n d.forEachRemovedItem((r) => {\n if (!internalChanges.has(r.key as any) && r.currentValue !== r.previousValue)\n hasChanges = true\n })\n d.forEachItem(r => {\n if (!internalChanges.has(r.key as any) && r.currentValue !== r.previousValue)\n hasChanges = true\n })\n return !hasChanges\n }\n return !d\n }\n })\n\n private _instance?: Dropzone | undefined\n\n get dropzone() {\n return this._instance\n }\n\n /** @internal */\n readonly _isSingle = computed(() => this.params()?.maxFiles === 1)\n\n /** @internal */\n readonly _isMultiple = computed(() => this.params()?.maxFiles !== 1)\n\n constructor() {\n super()\n let disabled = this.disabled()\n effect(() => {\n disabled = this.disabled()\n const instance = this._instance\n if (instance) {\n if (disabled)\n this.zone.runOutsideAngular(() => {\n instance.disable()\n })\n else\n this.zone.runOutsideAngular(() => {\n instance.enable()\n })\n }\n })\n effect(() => {\n const params = this.params()\n this.destroyInstance()\n this.initInstance(params, disabled)\n })\n }\n\n /** @internal */\n ngOnDestroy(): void {\n this.destroyInstance()\n }\n\n /** @internal */\n reset(cancel?: boolean) {\n const instance = this._instance\n if (instance) {\n this.zone.runOutsideAngular(() => {\n instance.removeAllFiles(cancel)\n })\n }\n }\n\n private initInstance(params?: DropzoneConfig, disabled = false) {\n if (!isPlatformBrowser(this.platformId) || !params) {\n return\n }\n\n this.zone.runOutsideAngular(() => {\n const instance = new Dropzone(this.elementRef.nativeElement, params)\n if (disabled)\n this.zone.runOutsideAngular(() => {\n instance.disable()\n })\n\n this._instance = instance\n\n this.zone.run(() => {\n this.listeners.DZ_INIT.emit(instance)\n })\n\n // Add auto reset handling for events\n instance.on('success', () => {\n const timeout = this.params()?.autoReset ?? -1\n if (timeout >= 0) {\n setTimeout(() => this.reset(), timeout)\n }\n })\n\n instance.on('error', () => {\n const timeout = this.params()?.errorReset ?? -1\n if (timeout >= 0) {\n setTimeout(() => this.reset(), timeout)\n }\n })\n\n instance.on('canceled', () => {\n const timeout = this.params()?.cancelReset ?? -1\n if (timeout >= 0) {\n setTimeout(() => this.reset(), timeout)\n }\n })\n\n // Add native Dropzone event handling\n DropzoneEvents.forEach((eventName: DropzoneEvent) => {\n instance.on(eventName.toLowerCase(), (...args: any[]) => {\n args = (args.length === 1) ? args[0] : args\n\n const output = `DZ_${eventName.toUpperCase()}`\n\n const emitter = this.listeners[output as keyof DropzoneListeners]\n\n this.zone.run(() => {\n emitter.emit(args as any)\n })\n })\n })\n })\n }\n\n private destroyInstance() {\n const instance = this._instance\n if (instance) {\n this.zone.runOutsideAngular(() => {\n instance.destroy()\n })\n\n this._instance = undefined\n }\n }\n}\n","import { Component, OnInit, ViewEncapsulation, computed, input, viewChild } from '@angular/core'\nimport { DropzoneDirective } from './dropzone.directive'\nimport { DropzoneConfig, DropzoneListeners, NXT_DROPZONE_LISTENERS } from './dropzone.interfaces'\n\n@Component({\n selector: 'nxt-dropzone',\n templateUrl: './dropzone.component.html',\n styleUrls: [\n './dropzone.component.scss',\n '../../../../node_modules/dropzone/dist/dropzone.css'\n ],\n encapsulation: ViewEncapsulation.None,\n providers: [{\n provide: NXT_DROPZONE_LISTENERS,\n useExisting: DropzoneComponent\n }],\n imports: [\n DropzoneDirective\n ]\n})\nexport class DropzoneComponent extends DropzoneListeners implements OnInit {\n\n /** Disables / detaches Dropzone from the element */\n readonly disabled = input<boolean>(false)\n\n /** Custom config to override the global defaults */\n readonly config = input<DropzoneConfig>()\n\n /** Message to show for the user on the upload area */\n readonly message = input<string>('Click or drag files to upload')\n /** Placeholder image to be shown as the upload area */\n readonly placeholder = input<string>('')\n\n /** Use 'dropzone' class (use provided default styles) */\n readonly useDropzoneClass = input<boolean>(true)\n\n readonly directiveRef = viewChild(DropzoneDirective)\n\n /** @internal */\n readonly text = computed(() => this.config()?.dictDefaultMessage || this.message())\n\n /** @internal */\n ngOnInit(): void { }\n\n /** @internal */\n getPlaceholder(): string {\n return 'url(' + encodeURI(this.placeholder()) + ')'\n }\n}\n","<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","/**\n *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;AAChB,aAAA,CAAC,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,cAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAqBgC,iBAAiB,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECpCvD,6iBAkBA,2nPDDQ,iBAAiB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAGZ,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAhB7B,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,cAAc,EAAA,aAAA,EAMT,iBAAiB,CAAC,IAAI,aAC1B,CAAC;AACR,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,WAAW,EAAA;AACd,yBAAA,CAAC,EAAA,OAAA,EACO;wBACL;AACH,qBAAA,EAAA,QAAA,EAAA,6iBAAA,EAAA,MAAA,EAAA,CAAA,skGAAA,EAAA,2/IAAA,CAAA,EAAA;8kBAkBiC,iBAAiB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEpCvD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "nxt-dropzone-wrapper",
|
|
3
3
|
"description": "Angular wrapper library for Dropzone",
|
|
4
4
|
"bugs": "https://github.com/Liquid-JS/nxt-components/issues",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "22.0.0-alpha.0",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"repository": {
|
|
@@ -20,13 +20,10 @@
|
|
|
20
20
|
"wrapper"
|
|
21
21
|
],
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@angular/common": "^
|
|
24
|
-
"@angular/core": "^
|
|
23
|
+
"@angular/common": "^22.0.0",
|
|
24
|
+
"@angular/core": "^22.0.0",
|
|
25
25
|
"dropzone": "^6.0.0-beta.2"
|
|
26
26
|
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"tslib": "^2.8.1"
|
|
29
|
-
},
|
|
30
27
|
"module": "fesm2022/nxt-dropzone-wrapper.mjs",
|
|
31
28
|
"typings": "types/nxt-dropzone-wrapper.d.ts",
|
|
32
29
|
"exports": {
|
|
@@ -38,5 +35,8 @@
|
|
|
38
35
|
"default": "./fesm2022/nxt-dropzone-wrapper.mjs"
|
|
39
36
|
}
|
|
40
37
|
},
|
|
41
|
-
"sideEffects": false
|
|
38
|
+
"sideEffects": false,
|
|
39
|
+
"dependencies": {
|
|
40
|
+
"tslib": "^2.3.0"
|
|
41
|
+
}
|
|
42
42
|
}
|
|
@@ -116,12 +116,5 @@ declare class DropzoneComponent extends DropzoneListeners implements OnInit {
|
|
|
116
116
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DropzoneComponent, "nxt-dropzone", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "config": { "alias": "config"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "useDropzoneClass": { "alias": "useDropzoneClass"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
declare class DropzoneModule {
|
|
121
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DropzoneModule, never>;
|
|
122
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<DropzoneModule, never, [typeof DropzoneComponent, typeof DropzoneDirective], [typeof DropzoneComponent, typeof DropzoneDirective]>;
|
|
123
|
-
static ɵinj: _angular_core.ɵɵInjectorDeclaration<DropzoneModule>;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
export { DropzoneComponent, DropzoneDirective, DropzoneListeners, DropzoneModule, NXT_DROPZONE_CONFIG, provideDropzoneConfig };
|
|
119
|
+
export { DropzoneComponent, DropzoneDirective, DropzoneListeners, NXT_DROPZONE_CONFIG, provideDropzoneConfig };
|
|
127
120
|
export type { DropzoneConfig };
|