ng-tailwind 2.26.347 → 2.27.348
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ng-tailwind.umd.js +19 -10
- package/bundles/ng-tailwind.umd.js.map +1 -1
- package/components/ngt-dropzone/ngt-dropzone-file-viewer/ngt-dropzone-file-viewer.component.d.ts +4 -0
- package/components/ngt-dropzone/ngt-dropzone.component.d.ts +1 -1
- package/components/ngt-select/ngt-select.component.d.ts +1 -0
- package/esm2015/components/ngt-dropzone/ngt-dropzone-file-viewer/ngt-dropzone-file-viewer.component.js +15 -7
- package/esm2015/components/ngt-dropzone/ngt-dropzone-view/ngt-dropzone-view.component.js +2 -2
- package/esm2015/components/ngt-dropzone/ngt-dropzone.component.js +4 -3
- package/esm2015/components/ngt-select/ngt-select.component.js +3 -2
- package/esm2015/services/http/ngt-translate.service.js +1 -1
- package/fesm2015/ng-tailwind.js +19 -10
- package/fesm2015/ng-tailwind.js.map +1 -1
- package/ng-tailwind.metadata.json +1 -1
- package/package.json +1 -1
- package/services/http/ngt-translate.service.d.ts +1 -0
|
@@ -3426,7 +3426,7 @@
|
|
|
3426
3426
|
return (items === null || items === void 0 ? void 0 : items.length) && typeof items[0].value['getAttribute'] === 'function';
|
|
3427
3427
|
};
|
|
3428
3428
|
NgtSelectComponent.prototype.canLoadItems = function () {
|
|
3429
|
-
return !this.isDisabled && this.wasClicked;
|
|
3429
|
+
return this.autoLoad || (!this.isDisabled && this.wasClicked);
|
|
3430
3430
|
};
|
|
3431
3431
|
NgtSelectComponent.prototype.destroySubscriptions = function () {
|
|
3432
3432
|
this.subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); });
|
|
@@ -3480,6 +3480,7 @@
|
|
|
3480
3480
|
labelForId: [{ type: core.Input }],
|
|
3481
3481
|
dropdownPanelMinHeight: [{ type: core.Input }],
|
|
3482
3482
|
name: [{ type: core.Input }],
|
|
3483
|
+
autoLoad: [{ type: core.Input }],
|
|
3483
3484
|
allowCreate: [{ type: core.Input }],
|
|
3484
3485
|
allowOriginalItemsUnselect: [{ type: core.Input }],
|
|
3485
3486
|
isDisabled: [{ type: core.Input }],
|
|
@@ -7011,7 +7012,8 @@
|
|
|
7011
7012
|
}());
|
|
7012
7013
|
|
|
7013
7014
|
var NgtDropzoneFileViewerComponent = /** @class */ (function () {
|
|
7014
|
-
function NgtDropzoneFileViewerComponent() {
|
|
7015
|
+
function NgtDropzoneFileViewerComponent(ngtTranslateService) {
|
|
7016
|
+
this.ngtTranslateService = ngtTranslateService;
|
|
7015
7017
|
this.onClose = new core.EventEmitter();
|
|
7016
7018
|
}
|
|
7017
7019
|
NgtDropzoneFileViewerComponent.prototype.keyEvent = function (event) {
|
|
@@ -7024,9 +7026,11 @@
|
|
|
7024
7026
|
}
|
|
7025
7027
|
};
|
|
7026
7028
|
NgtDropzoneFileViewerComponent.prototype.init = function () {
|
|
7027
|
-
this.
|
|
7028
|
-
|
|
7029
|
-
|
|
7029
|
+
if (this.fileSize < 5000000) {
|
|
7030
|
+
this.loading = true;
|
|
7031
|
+
this.canShowViewer = true;
|
|
7032
|
+
this.initReloadInterval();
|
|
7033
|
+
}
|
|
7030
7034
|
};
|
|
7031
7035
|
NgtDropzoneFileViewerComponent.prototype.close = function () {
|
|
7032
7036
|
this.canShowViewer = false;
|
|
@@ -7052,21 +7056,25 @@
|
|
|
7052
7056
|
_this.loading = false;
|
|
7053
7057
|
}
|
|
7054
7058
|
});
|
|
7055
|
-
},
|
|
7059
|
+
}, 3000);
|
|
7056
7060
|
};
|
|
7057
7061
|
return NgtDropzoneFileViewerComponent;
|
|
7058
7062
|
}());
|
|
7059
7063
|
NgtDropzoneFileViewerComponent.decorators = [
|
|
7060
7064
|
{ type: core.Component, args: [{
|
|
7061
7065
|
selector: 'ngt-dropzone-file-viewer',
|
|
7062
|
-
template: "<div style=\"width:100%; height: 100%;\">\n <div style=\"width:100%; height: 100%;\">\n <div class=\"w-full py-5 pr-10\">\n <div class=\"w-full flex justify-end text-2xl\">\n <div class=\"cursor-pointer\" (click)=\"downloadFile()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\" d=\"M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z\" />\n </svg>\n </div>\n \n <div class=\"cursor-pointer\" (click)=\"close()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"#fff\"\n d=\"M24 2.42l-2.42 -2.42 -9.58 9.58 -9.58 -9.58 -2.42 2.42 9.58 9.58 -9.58 9.58 2.42 2.42 9.58 -9.58 9.58 9.58 2.42 -2.42 -9.58 -9.58 9.58 -9.58z\" />\n </svg>\n </div>\n\n </div>\n <div class=\"w-full justify-center text-center text-2xl font-mono text-white\">\n {{ fileName }}\n </div>\n </div>\n <div class=\"px-10\" style=\"width:100%; height: 83%;\" *ngIf=\"canShowViewer\">\n <ngx-doc-viewer class=\"h-full w-full\" [url]=\"url\">\n </ngx-doc-viewer>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"loading\" class=\"flex fixed inset-0 justify-center items-center w-full h-full cursor-wait z-50\">\n <div class=\"div-loader\"></div>\n</div>",
|
|
7066
|
+
template: "<div style=\"width:100%; height: 100%;\">\n <div style=\"width:100%; height: 100%;\">\n <div class=\"w-full py-5 pr-10\">\n <div class=\"w-full flex justify-end text-2xl\">\n <div class=\"cursor-pointer\" (click)=\"downloadFile()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\" d=\"M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z\" />\n </svg>\n </div>\n\n \n\n <div class=\"cursor-pointer\" (click)=\"close()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path fill=\"#fff\"\n d=\"M24 2.42l-2.42 -2.42 -9.58 9.58 -9.58 -9.58 -2.42 2.42 9.58 9.58 -9.58 9.58 2.42 2.42 9.58 -9.58 9.58 9.58 2.42 -2.42 -9.58 -9.58 9.58 -9.58z\" />\n </svg>\n </div>\n\n </div>\n\n <div class=\"w-full justify-center text-center text-2xl font-mono text-white\">\n {{ fileName }}\n </div>\n </div>\n\n <div *ngIf=\"fileSize > 5000000\" class=\"flex w-full h-full justify-center items-center\">\n <div class=\"flex flex-col w-auto bg-gray-700 rounded-lg p-6\" style=\"max-width: 80%;\">\n <p class=\"text-white font-medium text-center w-full\">\n {{ ngtTranslateService.ngtFileTooLargeForPreview }}\n </p>\n\n <div class=\"cursor-pointer mt-5 text-2xl self-center border rounded p-2\" (click)=\"downloadFile()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\">\n <path fill=\"#fff\" d=\"M13 8V2H7v6H2l8 8 8-8h-5zM0 18h20v2H0v-2z\" />\n </svg>\n </div>\n </div>\n </div>\n\n <div class=\"px-10\" style=\"width:100%; height: 83%;\" *ngIf=\"canShowViewer\">\n <ngx-doc-viewer class=\"h-full w-full\" [url]=\"url\">\n </ngx-doc-viewer>\n </div>\n </div>\n</div>\n\n<div *ngIf=\"loading\" class=\"flex fixed inset-0 justify-center items-center w-full h-full cursor-wait z-50\">\n <div class=\"div-loader\"></div>\n</div>",
|
|
7063
7067
|
styles: [":host{background:rgba(0,0,0,.5);color:#fff;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:10000000}.div-loader{width:5rem;height:5rem;border:5px solid #89c43f38;border-top-color:#89c43f;border-radius:50%;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}"]
|
|
7064
7068
|
},] }
|
|
7065
7069
|
];
|
|
7070
|
+
NgtDropzoneFileViewerComponent.ctorParameters = function () { return [
|
|
7071
|
+
{ type: NgtTranslateService }
|
|
7072
|
+
]; };
|
|
7066
7073
|
NgtDropzoneFileViewerComponent.propDecorators = {
|
|
7067
7074
|
ngxDocViewer: [{ type: core.ViewChild, args: [ngxDocViewer.NgxDocViewerComponent,] }],
|
|
7068
7075
|
url: [{ type: core.Input }],
|
|
7069
7076
|
fileName: [{ type: core.Input }],
|
|
7077
|
+
fileSize: [{ type: core.Input }],
|
|
7070
7078
|
onClose: [{ type: core.Output }],
|
|
7071
7079
|
keyEvent: [{ type: core.HostListener, args: ['window:keydown', ['$event'],] }]
|
|
7072
7080
|
};
|
|
@@ -7189,12 +7197,13 @@
|
|
|
7189
7197
|
}));
|
|
7190
7198
|
viewer.show();
|
|
7191
7199
|
};
|
|
7192
|
-
NgtDropzoneComponent.prototype.onFileClick = function (url, name) {
|
|
7200
|
+
NgtDropzoneComponent.prototype.onFileClick = function (url, name, size) {
|
|
7193
7201
|
var _this = this;
|
|
7194
7202
|
this.forceDisableClick = true;
|
|
7195
7203
|
this.showNgtDropzoneFileViewer = true;
|
|
7196
7204
|
this.ngtDropzoneFileViewer.url = url;
|
|
7197
7205
|
this.ngtDropzoneFileViewer.fileName = name;
|
|
7206
|
+
this.ngtDropzoneFileViewer.fileSize = size;
|
|
7198
7207
|
this.ngtDropzoneFileViewer.init();
|
|
7199
7208
|
this.subscriptions.push(this.ngtDropzoneFileViewer.onClose.subscribe(function () {
|
|
7200
7209
|
_this.showNgtDropzoneFileViewer = false;
|
|
@@ -7456,7 +7465,7 @@
|
|
|
7456
7465
|
NgtDropzoneComponent.decorators = [
|
|
7457
7466
|
{ type: core.Component, args: [{
|
|
7458
7467
|
selector: 'ngt-dropzone',
|
|
7459
|
-
template: "<div class=\"flex flex-col h-full w-full\" #container>\n <label *ngIf=\"label\" class=\"flex mb-2 text-sm\">\n {{ label }}:\n\n <span class=\"text-red-500 font-bold text-md ml-1\" *ngIf=\"isRequired\">*</span>\n\n <ngt-helper *ngIf=\"helpText\" [helpTitle]=\"helpTitle\" [iconColor]=\"helpTextColor\" class=\"ml-1\">\n {{ helpText }}\n </ngt-helper>\n </label>\n\n <div *ngIf=\"!viewMode\" class=\"h-full w-full relative\">\n <div *ngIf=\"loading\" class=\"flex absolute justify-center items-center w-full h-full cursor-wait z-10\">\n <div class=\"div-loader\"></div>\n </div>\n\n <ngx-dropzone [id]=\"ngxElementId\" [multiple]='multipleSelection' [maxFileSize]='maxFileSize'\n (change)='onSelect($event)' [class.single-attachment]='itemsLimit == 1' [accept]='acceptedFiles'\n [disabled]='disabled || loading' [expandable]='verticalExpandable'\n [disableClick]='disableClick || forceDisableClick' [ngStyle]=\"{ 'height': dropzoneHeight }\" #ngxDropzone>\n <ng-container *ngIf=\"!loading\">\n <ngx-dropzone-label *ngIf=\"!uploadedResources?.length\" class=\"px-2\">\n {{ placeholder }}\n </ngx-dropzone-label>\n\n <ng-container *ngFor=\"let resource of uploadedResources\">\n <div class=\"flex flex-col w-48 mx-4\"\n title=\"{{ resource?.file?.name || '' }} ({{ getFormattedFileSize(resource) }})\">\n <custom-dropzone-preview *ngIf=\"previewType == 'DEFAULT' && isFile(resource)\"\n [file]='resource.file' [removable]=\"removable\" (removed)=\"onRemove(resource)\"\n (click)=\"onFileClick(resource.file.url, resource.file.name)\"\n ngProjectAs=\"ngx-dropzone-preview\">\n </custom-dropzone-preview>\n\n <div *ngIf=\"isImage(resource)\" class=\"cursor-pointer\" (click)=\"onImageClick(gallery)\" #gallery>\n <ngx-dropzone-image-preview class=\"image-preview-default-class\" [file]=\"resource.file\"\n [removable]=\"removable\" (removed)=\"onRemove(resource)\">\n </ngx-dropzone-image-preview>\n </div>\n\n <ngx-dropzone-video-preview *ngIf=\"isVideo(resource) || isAudio(resource)\"\n [file]=\"resource.file\" [removable]=\"removable\" (removed)=\"onRemove(resource)\">\n </ngx-dropzone-video-preview>\n\n <p *ngIf=\"showFileName\"\n class=\"w-full truncate text-gray-500 text-center text-sm font-mono mt-2\">\n {{ resource?.file?.name || '' }}\n </p>\n </div>\n </ng-container>\n </ng-container>\n </ngx-dropzone>\n </div>\n\n <ngt-dropzone-view *ngIf=\"viewMode\" [resources]=\"resources\" class=\"h-full w-full\"></ngt-dropzone-view>\n\n <ngt-dropzone-file-viewer [hidden]=\"!showNgtDropzoneFileViewer\" (onClose)=\"forceDisableClick = false\">\n </ngt-dropzone-file-viewer>\n\n <input *ngIf='componentReady' type=\"hidden\" [ngModel]=\"value\" [name]=\"name\" [value]=\"value\">\n <ngt-validation [control]=\"formControl\" [container]=\"formContainer\"></ngt-validation>\n</div>",
|
|
7468
|
+
template: "<div class=\"flex flex-col h-full w-full\" #container>\n <label *ngIf=\"label\" class=\"flex mb-2 text-sm\">\n {{ label }}:\n\n <span class=\"text-red-500 font-bold text-md ml-1\" *ngIf=\"isRequired\">*</span>\n\n <ngt-helper *ngIf=\"helpText\" [helpTitle]=\"helpTitle\" [iconColor]=\"helpTextColor\" class=\"ml-1\">\n {{ helpText }}\n </ngt-helper>\n </label>\n\n <div *ngIf=\"!viewMode\" class=\"h-full w-full relative\">\n <div *ngIf=\"loading\" class=\"flex absolute justify-center items-center w-full h-full cursor-wait z-10\">\n <div class=\"div-loader\"></div>\n </div>\n\n <ngx-dropzone [id]=\"ngxElementId\" [multiple]='multipleSelection' [maxFileSize]='maxFileSize'\n (change)='onSelect($event)' [class.single-attachment]='itemsLimit == 1' [accept]='acceptedFiles'\n [disabled]='disabled || loading' [expandable]='verticalExpandable'\n [disableClick]='disableClick || forceDisableClick' [ngStyle]=\"{ 'height': dropzoneHeight }\" #ngxDropzone>\n <ng-container *ngIf=\"!loading\">\n <ngx-dropzone-label *ngIf=\"!uploadedResources?.length\" class=\"px-2\">\n {{ placeholder }}\n </ngx-dropzone-label>\n\n <ng-container *ngFor=\"let resource of uploadedResources\">\n <div class=\"flex flex-col w-48 mx-4\"\n title=\"{{ resource?.file?.name || '' }} ({{ getFormattedFileSize(resource) }})\">\n <custom-dropzone-preview *ngIf=\"previewType == 'DEFAULT' && isFile(resource)\"\n [file]='resource.file' [removable]=\"removable\" (removed)=\"onRemove(resource)\"\n (click)=\"onFileClick(resource.file.url, resource.file.name, resource.file.size)\"\n ngProjectAs=\"ngx-dropzone-preview\">\n </custom-dropzone-preview>\n\n <div *ngIf=\"isImage(resource)\" class=\"cursor-pointer\" (click)=\"onImageClick(gallery)\" #gallery>\n <ngx-dropzone-image-preview class=\"image-preview-default-class\" [file]=\"resource.file\"\n [removable]=\"removable\" (removed)=\"onRemove(resource)\">\n </ngx-dropzone-image-preview>\n </div>\n\n <ngx-dropzone-video-preview *ngIf=\"isVideo(resource) || isAudio(resource)\"\n [file]=\"resource.file\" [removable]=\"removable\" (removed)=\"onRemove(resource)\">\n </ngx-dropzone-video-preview>\n\n <p *ngIf=\"showFileName\"\n class=\"w-full truncate text-gray-500 text-center text-sm font-mono mt-2\">\n {{ resource?.file?.name || '' }}\n </p>\n </div>\n </ng-container>\n </ng-container>\n </ngx-dropzone>\n </div>\n\n <ngt-dropzone-view *ngIf=\"viewMode\" [resources]=\"resources\" class=\"h-full w-full\"></ngt-dropzone-view>\n\n <ngt-dropzone-file-viewer [hidden]=\"!showNgtDropzoneFileViewer\" (onClose)=\"forceDisableClick = false\">\n </ngt-dropzone-file-viewer>\n\n <input *ngIf='componentReady' type=\"hidden\" [ngModel]=\"value\" [name]=\"name\" [value]=\"value\">\n <ngt-validation [control]=\"formControl\" [container]=\"formContainer\"></ngt-validation>\n</div>",
|
|
7460
7469
|
encapsulation: core.ViewEncapsulation.None,
|
|
7461
7470
|
providers: [
|
|
7462
7471
|
NgtMakeProvider(NgtDropzoneComponent),
|
|
@@ -7607,7 +7616,7 @@
|
|
|
7607
7616
|
NgtDropzoneViewComponent.decorators = [
|
|
7608
7617
|
{ type: core.Component, args: [{
|
|
7609
7618
|
selector: 'ngt-dropzone-view',
|
|
7610
|
-
template: "<div class=\"border-2 border-dotted border-gray-400 rounded p-2 flex items-center overflow-x-auto\"\n [ngStyle]=\"{ 'height': ngtDropzoneComponent.dropzoneHeight }\">\n <div *ngIf=\"ngtDropzoneComponent.loading\"\n class=\"flex absolute justify-center items-center w-full h-full cursor-wait z-10\">\n <div class=\"div-loader\"></div>\n </div>\n\n <div [class]=\"ngtDropzoneComponent.loading ? 'hidden' : 'flex items-center'\">\n <ng-container *ngIf=\"images?.length\">\n <div class=\"flex py-5\">\n <div *ngFor=\"let image of images; let index = index\" class=\"w-48 mr-8\">\n <div class=\"flex flex-col w-48 mx-4 cursor-pointer\"\n title=\"{{ image.name || '' }} ({{ ngtDropzoneComponent.getFormattedFileSize(image) }})\"\n (click)=\"onImageClick(index)\">\n <img [src]=\"image.thumbnailUrl\" [alt]=\"image.name\" class=\"w-full h-32\">\n\n <p class=\"w-full truncate text-gray-500 text-center text-sm font-mono\">\n {{ image.name || '' }}\n </p>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"audios?.length\">\n <ng-container *ngFor=\"let audio of audios\">\n <div class=\"flex flex-col w-48 mx-4 py-5\">\n <audio controls>\n <source [src]=\"audio.previewUrl\">\n </audio>\n\n <p class=\"w-full truncate text-gray-500 text-center text-sm font-mono\">\n {{ audio.name || '' }}\n </p>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"videos?.length\">\n <ng-container *ngFor=\"let video of videos\">\n <div class=\"flex flex-col w-48 mx-4 py-5\">\n <video width=\"240\" controls>\n <source [src]=\"video.previewUrl\">\n </video>\n\n <p class=\"w-full truncate text-gray-500 text-center text-sm font-mono\">\n {{ video.name || '' }}\n </p>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"files?.length\">\n <ng-container *ngFor=\"let file of files\">\n <div class=\"flex flex-col w-48 mr-6 cursor-pointer\"\n (click)=\"ngtDropzoneComponent.onFileClick(file.previewUrl, file.name)\">\n <div class=\"w-full flex justify-center border-2 rounded py-4 text-6xl\">\n <svg *ngIf=\"getFileType(file) == ngtDropzoneViewFileTypeEnum.OTHER\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path class=\"heroicon-ui\" fill=\"#4a5568\"\n d=\"M6 2h9a1 1 0 0 1 .7.3l4 4a1 1 0 0 1 .3.7v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.1.9-2 2-2zm9 2.41V7h2.59L15 4.41zM18 9h-3a2 2 0 0 1-2-2V4H6v16h12V9zm-2 7a1 1 0 0 1-1 1H9a1 1 0 0 1 0-2h6a1 1 0 0 1 1 1zm0-4a1 1 0 0 1-1 1H9a1 1 0 0 1 0-2h6a1 1 0 0 1 1 1zm-5-4a1 1 0 0 1-1 1H9a1 1 0 1 1 0-2h1a1 1 0 0 1 1 1z\" />\n </svg>\n\n <svg *ngIf=\"getFileType(file) == ngtDropzoneViewFileTypeEnum.DOC\" fill=\"#4a5568\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path\n d=\"M14.4 0l-9.6 0c-1.33,0 -2.4,1.08 -2.4,2.4l0 19.2c0,1.33 1.07,2.4 2.4,2.4l14.4 0c1.33,0 2.4,-1.07 2.4,-2.4l0 -14.4 -7.2 -7.2 0 0zm4.8 21.6l-14.4 0 0 -19.2 8.4 0 0 6 6 0 0 13.2 0 0zm-0.78 -12l-2.52 10.8 -1.68 0 -2.16 -8.15 -2.16 8.15 -1.68 0 -2.64 -10.8 1.8 0 1.68 8.17 2.16 -8.17 1.56 0 2.16 8.17 1.68 -8.17 1.8 0z\" />\n </svg>\n\n <svg *ngIf=\"getFileType(file) == ngtDropzoneViewFileTypeEnum.XLS\" fill=\"#4a5568\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path\n d=\"M14.4 0l-9.6 0c-1.33,0 -2.4,1.08 -2.4,2.4l0 19.2c0,1.33 1.07,2.4 2.4,2.4l14.4 0c1.33,0 2.4,-1.07 2.4,-2.4l0 -14.4 -7.2 -7.2 0 0zm4.8 21.6l-14.4 0 0 -19.2 8.4 0 0 6 6 0 0 13.2 0 0zm-6.12 -6.6l3.48 5.4 -2.16 0 -2.4 -4.08 -2.4 4.08 -2.16 0 3.48 -5.4 -3.48 -5.4 2.16 0 2.4 4.08 2.4 -4.08 2.16 0 -3.48 5.4z\" />\n </svg>\n\n <svg *ngIf=\"getFileType(file) == ngtDropzoneViewFileTypeEnum.PDF\" fill=\"#4a5568\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path\n d=\"M14.4 0l7.2 7.2 0 14.4c0,1.32 -1.08,2.4 -2.4,2.4l-14.4 0c-1.32,0 -2.4,-1.08 -2.4,-2.4l0 -19.2c0,-1.32 1.08,-2.4 2.4,-2.4l9.6 0 0 0zm4.8 21.6l0 -13.2 -6 0 0 -6 -8.4 0 0 19.2 14.4 0 0 0zm-8.5 -9.23c-0.28,-0.92 -0.92,-3.87 0.76,-3.92 1.68,-0.05 0.58,3.74 0.58,3.74 0.46,1.79 2.42,3.07 2.42,3.07 0.6,-0.18 4.02,-0.57 3.54,1.21 -0.52,1.77 -4.2,0.1 -4.2,0.1 -2.34,0.17 -4.09,0.8 -4.09,0.8 -1.36,2.53 -2.94,3.63 -3.59,2.56 -0.8,-1.33 2.56,-3.04 2.56,-3.04 1.74,-2.83 2,-4.47 2.02,-4.52l0 0zm0.78 1.01c-0.48,1.56 -1.44,3.23 -1.44,3.23 1.02,-0.41 3.26,-0.88 3.26,-0.88 -1.37,-1.2 -1.79,-2.34 -1.82,-2.35l0 0zm3.77 2.6c0,0 2.1,0.79 2.15,0.47 0.08,-0.32 -1.6,-0.61 -2.15,-0.47l0 0zm-6.79 1.79c-0.93,0.36 -1.81,1.9 -1.6,1.9 0.22,0.01 1.1,-0.72 1.6,-1.9l0 0zm3.02 -6.66c0,-0.06 0.52,-2.01 0,-2.07 -0.36,-0.04 -0.01,2.02 0,2.07z\" />\n </svg>\n </div>\n\n <p class=\"w-full truncate text-gray-500 text-center text-sm font-mono\">\n {{ file.name || '' }}\n </p>\n </div>\n </ng-container>\n </ng-container>\n </div>\n\n <div *ngIf=\"!ngtDropzoneComponent.loading && !ngtDropzoneComponent.resources?.length\"\n class=\"px-2 text-center w-full\">\n {{ ngtDropzoneComponent.placeholder }}\n </div>\n</div>",
|
|
7619
|
+
template: "<div class=\"border-2 border-dotted border-gray-400 rounded p-2 flex items-center overflow-x-auto\"\n [ngStyle]=\"{ 'height': ngtDropzoneComponent.dropzoneHeight }\">\n <div *ngIf=\"ngtDropzoneComponent.loading\"\n class=\"flex absolute justify-center items-center w-full h-full cursor-wait z-10\">\n <div class=\"div-loader\"></div>\n </div>\n\n <div [class]=\"ngtDropzoneComponent.loading ? 'hidden' : 'flex items-center'\">\n <ng-container *ngIf=\"images?.length\">\n <div class=\"flex py-5\">\n <div *ngFor=\"let image of images; let index = index\" class=\"w-48 mr-8\">\n <div class=\"flex flex-col w-48 mx-4 cursor-pointer\"\n title=\"{{ image.name || '' }} ({{ ngtDropzoneComponent.getFormattedFileSize(image) }})\"\n (click)=\"onImageClick(index)\">\n <img [src]=\"image.thumbnailUrl\" [alt]=\"image.name\" class=\"w-full h-32\">\n\n <p class=\"w-full truncate text-gray-500 text-center text-sm font-mono\">\n {{ image.name || '' }}\n </p>\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"audios?.length\">\n <ng-container *ngFor=\"let audio of audios\">\n <div class=\"flex flex-col w-48 mx-4 py-5\">\n <audio controls>\n <source [src]=\"audio.previewUrl\">\n </audio>\n\n <p class=\"w-full truncate text-gray-500 text-center text-sm font-mono\">\n {{ audio.name || '' }}\n </p>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"videos?.length\">\n <ng-container *ngFor=\"let video of videos\">\n <div class=\"flex flex-col w-48 mx-4 py-5\">\n <video width=\"240\" controls>\n <source [src]=\"video.previewUrl\">\n </video>\n\n <p class=\"w-full truncate text-gray-500 text-center text-sm font-mono\">\n {{ video.name || '' }}\n </p>\n </div>\n </ng-container>\n </ng-container>\n\n <ng-container *ngIf=\"files?.length\">\n <ng-container *ngFor=\"let file of files\">\n <div class=\"flex flex-col w-48 mr-6 cursor-pointer\"\n (click)=\"ngtDropzoneComponent.onFileClick(file.previewUrl, file.name, file.fileSize)\">\n <div class=\"w-full flex justify-center border-2 rounded py-4 text-6xl\">\n <svg *ngIf=\"getFileType(file) == ngtDropzoneViewFileTypeEnum.OTHER\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path class=\"heroicon-ui\" fill=\"#4a5568\"\n d=\"M6 2h9a1 1 0 0 1 .7.3l4 4a1 1 0 0 1 .3.7v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.1.9-2 2-2zm9 2.41V7h2.59L15 4.41zM18 9h-3a2 2 0 0 1-2-2V4H6v16h12V9zm-2 7a1 1 0 0 1-1 1H9a1 1 0 0 1 0-2h6a1 1 0 0 1 1 1zm0-4a1 1 0 0 1-1 1H9a1 1 0 0 1 0-2h6a1 1 0 0 1 1 1zm-5-4a1 1 0 0 1-1 1H9a1 1 0 1 1 0-2h1a1 1 0 0 1 1 1z\" />\n </svg>\n\n <svg *ngIf=\"getFileType(file) == ngtDropzoneViewFileTypeEnum.DOC\" fill=\"#4a5568\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path\n d=\"M14.4 0l-9.6 0c-1.33,0 -2.4,1.08 -2.4,2.4l0 19.2c0,1.33 1.07,2.4 2.4,2.4l14.4 0c1.33,0 2.4,-1.07 2.4,-2.4l0 -14.4 -7.2 -7.2 0 0zm4.8 21.6l-14.4 0 0 -19.2 8.4 0 0 6 6 0 0 13.2 0 0zm-0.78 -12l-2.52 10.8 -1.68 0 -2.16 -8.15 -2.16 8.15 -1.68 0 -2.64 -10.8 1.8 0 1.68 8.17 2.16 -8.17 1.56 0 2.16 8.17 1.68 -8.17 1.8 0z\" />\n </svg>\n\n <svg *ngIf=\"getFileType(file) == ngtDropzoneViewFileTypeEnum.XLS\" fill=\"#4a5568\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path\n d=\"M14.4 0l-9.6 0c-1.33,0 -2.4,1.08 -2.4,2.4l0 19.2c0,1.33 1.07,2.4 2.4,2.4l14.4 0c1.33,0 2.4,-1.07 2.4,-2.4l0 -14.4 -7.2 -7.2 0 0zm4.8 21.6l-14.4 0 0 -19.2 8.4 0 0 6 6 0 0 13.2 0 0zm-6.12 -6.6l3.48 5.4 -2.16 0 -2.4 -4.08 -2.4 4.08 -2.16 0 3.48 -5.4 -3.48 -5.4 2.16 0 2.4 4.08 2.4 -4.08 2.16 0 -3.48 5.4z\" />\n </svg>\n\n <svg *ngIf=\"getFileType(file) == ngtDropzoneViewFileTypeEnum.PDF\" fill=\"#4a5568\"\n xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path\n d=\"M14.4 0l7.2 7.2 0 14.4c0,1.32 -1.08,2.4 -2.4,2.4l-14.4 0c-1.32,0 -2.4,-1.08 -2.4,-2.4l0 -19.2c0,-1.32 1.08,-2.4 2.4,-2.4l9.6 0 0 0zm4.8 21.6l0 -13.2 -6 0 0 -6 -8.4 0 0 19.2 14.4 0 0 0zm-8.5 -9.23c-0.28,-0.92 -0.92,-3.87 0.76,-3.92 1.68,-0.05 0.58,3.74 0.58,3.74 0.46,1.79 2.42,3.07 2.42,3.07 0.6,-0.18 4.02,-0.57 3.54,1.21 -0.52,1.77 -4.2,0.1 -4.2,0.1 -2.34,0.17 -4.09,0.8 -4.09,0.8 -1.36,2.53 -2.94,3.63 -3.59,2.56 -0.8,-1.33 2.56,-3.04 2.56,-3.04 1.74,-2.83 2,-4.47 2.02,-4.52l0 0zm0.78 1.01c-0.48,1.56 -1.44,3.23 -1.44,3.23 1.02,-0.41 3.26,-0.88 3.26,-0.88 -1.37,-1.2 -1.79,-2.34 -1.82,-2.35l0 0zm3.77 2.6c0,0 2.1,0.79 2.15,0.47 0.08,-0.32 -1.6,-0.61 -2.15,-0.47l0 0zm-6.79 1.79c-0.93,0.36 -1.81,1.9 -1.6,1.9 0.22,0.01 1.1,-0.72 1.6,-1.9l0 0zm3.02 -6.66c0,-0.06 0.52,-2.01 0,-2.07 -0.36,-0.04 -0.01,2.02 0,2.07z\" />\n </svg>\n </div>\n\n <p class=\"w-full truncate text-gray-500 text-center text-sm font-mono\">\n {{ file.name || '' }}\n </p>\n </div>\n </ng-container>\n </ng-container>\n </div>\n\n <div *ngIf=\"!ngtDropzoneComponent.loading && !ngtDropzoneComponent.resources?.length\"\n class=\"px-2 text-center w-full\">\n {{ ngtDropzoneComponent.placeholder }}\n </div>\n</div>",
|
|
7611
7620
|
encapsulation: core.ViewEncapsulation.None
|
|
7612
7621
|
},] }
|
|
7613
7622
|
];
|