@servicemind.tis/tis-image-and-file-upload-and-view 1.0.0 → 1.0.2

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,23 +1,27 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Component, Inject, EventEmitter, Output, Input, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/material/dialog';
2
+ import { Injectable, ViewChild, Input, ChangeDetectionStrategy, Component, Inject, EventEmitter, Output, NgModule } from '@angular/core';
3
+ import * as i1$2 from '@angular/material/dialog';
4
4
  import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
5
- import * as i2 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
7
- import * as i3 from '@angular/material/icon';
8
- import { MatIconModule } from '@angular/material/icon';
9
- import * as i4 from '@angular/material/progress-spinner';
5
+ import * as i1$1 from '@angular/platform-browser';
6
+ import * as i1 from 'ngx-extended-pdf-viewer';
7
+ import { NgxExtendedPdfViewerComponent, NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
8
+ import * as i2 from '@angular/material/progress-spinner';
10
9
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
10
+ import * as i3 from '@angular/material/tooltip';
11
+ import { MatTooltipModule } from '@angular/material/tooltip';
12
+ import * as i3$1 from '@angular/material/icon';
13
+ import { MatIconModule } from '@angular/material/icon';
14
+ import * as i4 from '@angular/material/button';
15
+ import { MatButtonModule } from '@angular/material/button';
16
+ import * as i2$1 from '@angular/common';
17
+ import { CommonModule } from '@angular/common';
11
18
  import { BehaviorSubject, map, shareReplay } from 'rxjs';
12
- import * as i5 from '@angular/cdk/layout';
19
+ import * as i3$3 from '@angular/cdk/layout';
13
20
  import { Breakpoints } from '@angular/cdk/layout';
14
- import * as i1$2 from '@angular/common/http';
21
+ import * as i3$2 from '@angular/common/http';
15
22
  import { HttpHeaders } from '@angular/common/http';
16
- import * as i1$1 from '@angular/material/snack-bar';
23
+ import * as i1$3 from '@angular/material/snack-bar';
17
24
  import { MatSnackBarModule } from '@angular/material/snack-bar';
18
- import * as i4$1 from '@angular/material/button';
19
- import { MatButtonModule } from '@angular/material/button';
20
- import { MatTooltipModule } from '@angular/material/tooltip';
21
25
 
22
26
  class TisImageAndFileUploadAndViewService {
23
27
  constructor() { }
@@ -31,14 +35,153 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
31
35
  }]
32
36
  }], ctorParameters: () => [] });
33
37
 
38
+ class TisPdfViewerComponent {
39
+ cdRef;
40
+ loading = true;
41
+ isError = false;
42
+ src;
43
+ pdfViewer;
44
+ constructor(cdRef) {
45
+ this.cdRef = cdRef;
46
+ }
47
+ ngOnChanges(changes) {
48
+ if (changes['src']) {
49
+ console.log('Pdf Viewer: src changed: ', changes['src']);
50
+ }
51
+ }
52
+ destroyPdfViewer() {
53
+ this.pdfViewer.ngOnDestroy();
54
+ }
55
+ loadingFinished(ev) {
56
+ console.log('PDF Loaded', ev);
57
+ this.loading = false;
58
+ this.cdRef.detectChanges();
59
+ this.pdfViewer.height = 'auto';
60
+ }
61
+ loadingError(ev) {
62
+ console.log('PDF Loading Error:', ev);
63
+ this.isError = true;
64
+ this.loading = false;
65
+ this.cdRef.detectChanges();
66
+ }
67
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisPdfViewerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
68
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TisPdfViewerComponent, isStandalone: false, selector: "tis-pdf-viewer", inputs: { src: "src" }, viewQueries: [{ propertyName: "pdfViewer", first: true, predicate: NgxExtendedPdfViewerComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (isError) {\n <div class=\"flex tis-justify-content-center py-4\">\n <h3> Some Error Occurred in Loading PDF File. Please Try again. </h3>\n </div>\n} \n\n@if (!isError) {\n <div class=\"tis-extended-pdf-viewer\">\n @if(loading) {\n <div class=\"loading\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"50\"></mat-progress-spinner>\n </div>\n }\n <ngx-extended-pdf-viewer [src]=\"src\"\n [showToolbar]=\"true\"\n [showSidebarButton]=\"true\"\n [showFindButton]=\"false\"\n [showPagingButtons]=\"true\"\n [showDrawEditor]=\"false\"\n [showStampEditor]=\"false\"\n [showTextEditor]=\"false\"\n [showZoomButtons]=\"true\"\n [showPresentationModeButton]=\"false\"\n [showOpenFileButton]=\"false\"\n [showPrintButton]=\"true\"\n [showDownloadButton]=\"true\"\n [showSecondaryToolbarButton]=\"false\"\n [showRotateButton]=\"true\"\n [showHandToolButton]=\"false\"\n [showScrollingButton]=\"true\"\n [showSpreadButton]=\"false\"\n [showPropertiesButton]=\"false\"\n [zoom]=\"'page-fit'\"\n (pdfDownloaded)=\"loadingFinished($event)\"\n (pdfLoaded)=\"loadingFinished($event)\"\n (pdfLoadingFailed)=\"loadingError($event)\"\n >\n </ngx-extended-pdf-viewer>\n </div>\n}\n \n ", styles: ["::ng-deep .tis-extended-pdf-viewer{position:relative}::ng-deep .tis-extended-pdf-viewer .loading{height:98vh;background-color:#9e9e9e3d;width:100%;position:absolute;top:0;z-index:1;display:flex;justify-content:center;align-items:center}::ng-deep .tis-extended-pdf-viewer .zoom{height:98vh!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer{background-color:var(--tis-primary)!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-toggle-sidebar pdf-shy-button .toolbarButton,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area pdf-shy-button .toolbarButton,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerMiddle pdf-shy-button .toolbarButton,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerRight pdf-shy-button .toolbarButton{display:flex;align-items:center!important;justify-content:center!important;color:#fff!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-toggle-sidebar pdf-shy-button .always-in-secondary-menu,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area pdf-shy-button .always-in-secondary-menu,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerMiddle pdf-shy-button .always-in-secondary-menu,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerRight pdf-shy-button .always-in-secondary-menu{display:none!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area .paging-left,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area .paging-right{display:inline-flex!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area pdf-page-number #pageNumber{margin:6px 0!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerRight #editorModeButtons{display:inline-flex!important}\n"], dependencies: [{ kind: "component", type: i1.NgxExtendedPdfViewerComponent, selector: "ngx-extended-pdf-viewer", inputs: ["customFindbarInputArea", "customToolbar", "customFindbar", "customFindbarButtons", "customPdfViewer", "customSecondaryToolbar", "customSidebar", "customThumbnail", "customFreeFloatingBar", "showFreeFloatingBar", "enableDragAndDrop", "formData", "disableForms", "pageViewMode", "scrollMode", "authorization", "httpHeaders", "contextMenuAllowed", "enablePrint", "delayFirstView", "showTextEditor", "showStampEditor", "showDrawEditor", "showHighlightEditor", "logLevel", "relativeCoordsOptions", "minifiedJSLibraries", "printResolution", "rotation", "src", "base64Src", "minHeight", "height", "forceUsingLegacyES5", "backgroundColor", "filenameForDownload", "ignoreKeyboard", "ignoreKeys", "acceptKeys", "imageResourcesPath", "localeFolderPath", "language", "listenToURL", "nameddest", "password", "replaceBrowserPrint", "showUnverifiedSignatures", "startTabindex", "showSidebarButton", "sidebarVisible", "activeSidebarView", "findbarVisible", "propertiesDialogVisible", "showFindButton", "showFindHighlightAll", "showFindMatchCase", "showFindCurrentPageOnly", "showFindPageRange", "showFindEntireWord", "showFindEntirePhrase", "showFindMatchDiacritics", "showFindFuzzySearch", "showFindResultsCount", "showFindMessages", "showPagingButtons", "showZoomButtons", "showPresentationModeButton", "showOpenFileButton", "showPrintButton", "showDownloadButton", "theme", "showToolbar", "showSecondaryToolbarButton", "showSinglePageModeButton", "showVerticalScrollButton", "showHorizontalScrollButton", "showWrappedScrollButton", "showInfiniteScrollButton", "showBookModeButton", "showRotateButton", "showRotateCwButton", "showRotateCcwButton", "handTool", "showHandToolButton", "showScrollingButton", "showSpreadButton", "showPropertiesButton", "showBorders", "spread", "page", "pageLabel", "textLayer", "zoom", "zoomLevels", "maxZoom", "minZoom", "mobileFriendlyZoom"], outputs: ["annotationEditorEvent", "formDataChange", "pageViewModeChange", "progress", "srcChange", "scrollModeChange", "afterPrint", "beforePrint", "currentZoomFactor", "rotationChange", "annotationLayerRendered", "annotationEditorLayerRendered", "xfaLayerRendered", "outlineLoaded", "attachmentsloaded", "layersloaded", "sidebarVisibleChange", "activeSidebarViewChange", "findbarVisibleChange", "propertiesDialogVisibleChange", "handToolChange", "spreadChange", "thumbnailDrawn", "pageChange", "pageLabelChange", "pagesLoaded", "pageRender", "pageRendered", "pdfDownloaded", "pdfLoaded", "pdfLoadingStarts", "pdfLoadingFailed", "textLayerRendered", "annotationEditorModeChanged", "updateFindMatchesCount", "updateFindState", "zoomChange"] }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
69
+ }
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisPdfViewerComponent, decorators: [{
71
+ type: Component,
72
+ args: [{ selector: 'tis-pdf-viewer', standalone: false, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (isError) {\n <div class=\"flex tis-justify-content-center py-4\">\n <h3> Some Error Occurred in Loading PDF File. Please Try again. </h3>\n </div>\n} \n\n@if (!isError) {\n <div class=\"tis-extended-pdf-viewer\">\n @if(loading) {\n <div class=\"loading\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"50\"></mat-progress-spinner>\n </div>\n }\n <ngx-extended-pdf-viewer [src]=\"src\"\n [showToolbar]=\"true\"\n [showSidebarButton]=\"true\"\n [showFindButton]=\"false\"\n [showPagingButtons]=\"true\"\n [showDrawEditor]=\"false\"\n [showStampEditor]=\"false\"\n [showTextEditor]=\"false\"\n [showZoomButtons]=\"true\"\n [showPresentationModeButton]=\"false\"\n [showOpenFileButton]=\"false\"\n [showPrintButton]=\"true\"\n [showDownloadButton]=\"true\"\n [showSecondaryToolbarButton]=\"false\"\n [showRotateButton]=\"true\"\n [showHandToolButton]=\"false\"\n [showScrollingButton]=\"true\"\n [showSpreadButton]=\"false\"\n [showPropertiesButton]=\"false\"\n [zoom]=\"'page-fit'\"\n (pdfDownloaded)=\"loadingFinished($event)\"\n (pdfLoaded)=\"loadingFinished($event)\"\n (pdfLoadingFailed)=\"loadingError($event)\"\n >\n </ngx-extended-pdf-viewer>\n </div>\n}\n \n ", styles: ["::ng-deep .tis-extended-pdf-viewer{position:relative}::ng-deep .tis-extended-pdf-viewer .loading{height:98vh;background-color:#9e9e9e3d;width:100%;position:absolute;top:0;z-index:1;display:flex;justify-content:center;align-items:center}::ng-deep .tis-extended-pdf-viewer .zoom{height:98vh!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer{background-color:var(--tis-primary)!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-toggle-sidebar pdf-shy-button .toolbarButton,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area pdf-shy-button .toolbarButton,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerMiddle pdf-shy-button .toolbarButton,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerRight pdf-shy-button .toolbarButton{display:flex;align-items:center!important;justify-content:center!important;color:#fff!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-toggle-sidebar pdf-shy-button .always-in-secondary-menu,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area pdf-shy-button .always-in-secondary-menu,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerMiddle pdf-shy-button .always-in-secondary-menu,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerRight pdf-shy-button .always-in-secondary-menu{display:none!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area .paging-left,::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area .paging-right{display:inline-flex!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerLeft pdf-paging-area pdf-page-number #pageNumber{margin:6px 0!important}::ng-deep .tis-extended-pdf-viewer .zoom pdf-toolbar .toolbar #toolbarContainer #toolbarViewer #toolbarViewerRight #editorModeButtons{display:inline-flex!important}\n"] }]
73
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { src: [{
74
+ type: Input,
75
+ args: [{ required: true }]
76
+ }], pdfViewer: [{
77
+ type: ViewChild,
78
+ args: [NgxExtendedPdfViewerComponent, { static: false }]
79
+ }] } });
80
+
81
+ class TisExcelFileViewerComponent {
82
+ sanitizer;
83
+ src;
84
+ baseUrl = `https://view.officeapps.live.com/op/embed.aspx?src=`;
85
+ iframeSrc = null;
86
+ constructor(sanitizer) {
87
+ this.sanitizer = sanitizer;
88
+ }
89
+ ngOnChanges(changes) {
90
+ if (changes['src']) {
91
+ console.log('Url Received', this.src);
92
+ const src = this.baseUrl + this.src;
93
+ this.iframeSrc = this.sanitizer.bypassSecurityTrustResourceUrl(src);
94
+ console.log('Iframe src:', this.iframeSrc);
95
+ }
96
+ }
97
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisExcelFileViewerComponent, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
98
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TisExcelFileViewerComponent, isStandalone: false, selector: "tis-excel-file-viewer", inputs: { src: "src" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"bg-slate-900 w-full h-5\">\n \n</div>\n<div class=\"aspect-w-16 aspect-h-9\">\n <iframe class=\"w-full h-full\" [src]=\"iframeSrc\" frameborder='0'>This is an embedded <a target='_blank'\n href='http://office.com'>Microsoft Office</a> document, powered by <a target='_blank'\n href='http://office.com/webapps'>Office Online</a>.</iframe>\n</div>", styles: ["iframe{height:95vh}\n"] });
99
+ }
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisExcelFileViewerComponent, decorators: [{
101
+ type: Component,
102
+ args: [{ selector: 'tis-excel-file-viewer', standalone: false, template: "<div class=\"bg-slate-900 w-full h-5\">\n \n</div>\n<div class=\"aspect-w-16 aspect-h-9\">\n <iframe class=\"w-full h-full\" [src]=\"iframeSrc\" frameborder='0'>This is an embedded <a target='_blank'\n href='http://office.com'>Microsoft Office</a> document, powered by <a target='_blank'\n href='http://office.com/webapps'>Office Online</a>.</iframe>\n</div>", styles: ["iframe{height:95vh}\n"] }]
103
+ }], ctorParameters: () => [{ type: i1$1.DomSanitizer }], propDecorators: { src: [{
104
+ type: Input,
105
+ args: [{ required: true }]
106
+ }] } });
107
+
108
+ class TisVideoComponent {
109
+ src;
110
+ type;
111
+ constructor() { }
112
+ ngOnInit() {
113
+ if (this.src) {
114
+ this.type = this.getFileType(String(this.src));
115
+ }
116
+ }
117
+ ngOnChanges(changes) {
118
+ if (changes['src']) {
119
+ console.log('Pdf Viewer: src changed: ', changes['src']);
120
+ this.type = this.getFileType(changes['src'].currentValue);
121
+ }
122
+ }
123
+ getFileType(text) {
124
+ let txtArr = text.split('.');
125
+ let fileType = txtArr[txtArr.length - 1];
126
+ return fileType.toLocaleLowerCase() == 'mov' ? 'mp4' : fileType.toLocaleLowerCase();
127
+ }
128
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisVideoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TisVideoComponent, isStandalone: false, selector: "tis-video", inputs: { src: "src" }, usesOnChanges: true, ngImport: i0, template: "<video controls autoplay style=\"min-width: 300px; max-width: 90vw; min-height: 300px; max-height: 90vh;\">\n <source [src]=\"src\" type=\"video/{{type}}\">\n Your browser does not support the video tag.\n</video>", styles: [""] });
130
+ }
131
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisVideoComponent, decorators: [{
132
+ type: Component,
133
+ args: [{ selector: 'tis-video', standalone: false, template: "<video controls autoplay style=\"min-width: 300px; max-width: 90vw; min-height: 300px; max-height: 90vh;\">\n <source [src]=\"src\" type=\"video/{{type}}\">\n Your browser does not support the video tag.\n</video>" }]
134
+ }], ctorParameters: () => [], propDecorators: { src: [{
135
+ type: Input,
136
+ args: [{ required: true }]
137
+ }] } });
138
+
34
139
  class TisFileViewerComponent {
35
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisFileViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
36
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TisFileViewerComponent, isStandalone: false, selector: "tis-file-viewer", ngImport: i0, template: "<p>tis-file-viewer works!</p>\n", styles: [""] });
140
+ dialogRef;
141
+ data;
142
+ sanitizer;
143
+ safeUrl;
144
+ pdfViewer;
145
+ constructor(dialogRef, data, sanitizer) {
146
+ this.dialogRef = dialogRef;
147
+ this.data = data;
148
+ this.sanitizer = sanitizer;
149
+ console.log('File Viewer Data:', data);
150
+ this.safeUrl = this.data.src;
151
+ console.log('FileViewer SafeUrl:', this.safeUrl);
152
+ dialogRef.beforeClosed().subscribe((result) => {
153
+ console.log('The dialog is about to be closed');
154
+ // Here's the interesting bit:
155
+ if (this.pdfViewer) {
156
+ this.pdfViewer.destroyPdfViewer();
157
+ console.log('PDF Viewer Destroyed.');
158
+ }
159
+ });
160
+ }
161
+ downloadFile() {
162
+ var el = document.createElement("a");
163
+ el.setAttribute("href", this.safeUrl);
164
+ el.setAttribute("download", 'Video-' + new Date().valueOf());
165
+ document.body.appendChild(el);
166
+ el.click();
167
+ el.remove();
168
+ }
169
+ onClose(status) {
170
+ this.dialogRef.close(status);
171
+ }
172
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisFileViewerComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
173
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TisFileViewerComponent, isStandalone: false, selector: "tis-file-viewer", viewQueries: [{ propertyName: "pdfViewer", first: true, predicate: TisPdfViewerComponent, descendants: true }], ngImport: i0, template: "@if(safeUrl) {\n <div class=\"tis-pdf-viewer\">\n @if(data.fileType == 'video') {\n <mat-icon class=\"download-btn\" (click)=\"downloadFile()\" matTooltip=\"Download\">download</mat-icon>\n <!-- <button mat-icon-button color=\"primary\" class=\"download-btn\" >\n <mat-icon>download</mat-icon>\n </button> -->\n }\n @else {\n <button mat-mini-fab color=\"primary\" class=\"close-btn\" (click)=\"onClose(null)\" matTooltip=\"Close\">\n <mat-icon>clear</mat-icon>\n </button>\n }\n @if(data.fileType == 'pdf') {\n <tis-pdf-viewer [src]=\"safeUrl\"></tis-pdf-viewer>\n }\n @else if(data.fileType == 'excel') {\n <tis-excel-file-viewer [src]=\"safeUrl\"></tis-excel-file-viewer>\n }\n @else if(data.fileType == 'video') {\n <tis-video [src]=\"safeUrl\"></tis-video>\n }\n </div>\n}\n", styles: [".tis-pdf-viewer{position:relative!important;height:100%}.tis-pdf-viewer .close-btn{position:absolute!important;bottom:10px!important;right:10px!important;z-index:1!important}.tis-pdf-viewer .download-btn{color:var(--tis-primary);cursor:pointer;position:absolute!important;top:10px!important;right:10px!important;z-index:1!important}\n"], dependencies: [{ kind: "directive", type: i3.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatMiniFabButton, selector: "button[mat-mini-fab]", exportAs: ["matButton"] }, { kind: "component", type: TisExcelFileViewerComponent, selector: "tis-excel-file-viewer", inputs: ["src"] }, { kind: "component", type: TisPdfViewerComponent, selector: "tis-pdf-viewer", inputs: ["src"] }, { kind: "component", type: TisVideoComponent, selector: "tis-video", inputs: ["src"] }] });
37
174
  }
38
175
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisFileViewerComponent, decorators: [{
39
176
  type: Component,
40
- args: [{ selector: 'tis-file-viewer', standalone: false, template: "<p>tis-file-viewer works!</p>\n" }]
41
- }] });
177
+ args: [{ selector: 'tis-file-viewer', standalone: false, template: "@if(safeUrl) {\n <div class=\"tis-pdf-viewer\">\n @if(data.fileType == 'video') {\n <mat-icon class=\"download-btn\" (click)=\"downloadFile()\" matTooltip=\"Download\">download</mat-icon>\n <!-- <button mat-icon-button color=\"primary\" class=\"download-btn\" >\n <mat-icon>download</mat-icon>\n </button> -->\n }\n @else {\n <button mat-mini-fab color=\"primary\" class=\"close-btn\" (click)=\"onClose(null)\" matTooltip=\"Close\">\n <mat-icon>clear</mat-icon>\n </button>\n }\n @if(data.fileType == 'pdf') {\n <tis-pdf-viewer [src]=\"safeUrl\"></tis-pdf-viewer>\n }\n @else if(data.fileType == 'excel') {\n <tis-excel-file-viewer [src]=\"safeUrl\"></tis-excel-file-viewer>\n }\n @else if(data.fileType == 'video') {\n <tis-video [src]=\"safeUrl\"></tis-video>\n }\n </div>\n}\n", styles: [".tis-pdf-viewer{position:relative!important;height:100%}.tis-pdf-viewer .close-btn{position:absolute!important;bottom:10px!important;right:10px!important;z-index:1!important}.tis-pdf-viewer .download-btn{color:var(--tis-primary);cursor:pointer;position:absolute!important;top:10px!important;right:10px!important;z-index:1!important}\n"] }]
178
+ }], ctorParameters: () => [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
179
+ type: Inject,
180
+ args: [MAT_DIALOG_DATA]
181
+ }] }, { type: i1$1.DomSanitizer }], propDecorators: { pdfViewer: [{
182
+ type: ViewChild,
183
+ args: [TisPdfViewerComponent, { static: false }]
184
+ }] } });
42
185
 
43
186
  class TisPreviewImageComponent {
44
187
  dialogRef;
@@ -80,13 +223,13 @@ class TisPreviewImageComponent {
80
223
  onClose() {
81
224
  this.dialogRef.close();
82
225
  }
83
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisPreviewImageComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
84
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TisPreviewImageComponent, isStandalone: false, selector: "tis-preview-image", ngImport: i0, template: "@if(isLoading){\n <div style=\"width: 350px; height: 350px; display: flex; justify-content: center; align-items: center\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"80\"></mat-progress-spinner>\n </div>\n}\n@else{\n <div class=\"w-100 dialog-container\" appScrolling style=\"--img-width: {{(imageWidth && imageWidth < 700) ? imageWidth : 650}}px; --img-height: {{(imageHeight && imageHeight < 600) ? imageHeight : 600}}px\">\n <mat-icon\n class=\"close-icon\"\n (click)=\"onClose()\">cancel</mat-icon>\n <img \n *ngIf=\"data.url\" \n [src]=\"data.url\" \n alt=\"preview-image\" \n class=\"preview-image {{orientation}}\">\n </div>\n}", styles: ["::ng-deep .mat-p-0 .mat-dialog-container{padding:0!important}.dialog-container{overflow:auto;max-height:calc(100vh - 15px);display:flex;justify-content:center;align-items:center}.landscape-image{width:var(--img-width);max-width:95vw;object-fit:contain}.portrait-image{height:var(--img-height);max-height:95vh;object-fit:contain}.close-icon{color:var(--tis-cancel, #bb333b);position:absolute;top:10px;right:10px;z-index:99;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
226
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisPreviewImageComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
227
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TisPreviewImageComponent, isStandalone: false, selector: "tis-preview-image", ngImport: i0, template: "@if(isLoading){\n <div style=\"width: 350px; height: 350px; display: flex; justify-content: center; align-items: center\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"80\"></mat-progress-spinner>\n </div>\n}\n@else{\n <div class=\"w-100 dialog-container\" appScrolling style=\"--img-width: {{(imageWidth && imageWidth < 700) ? imageWidth : 650}}px; --img-height: {{(imageHeight && imageHeight < 600) ? imageHeight : 600}}px\">\n <mat-icon\n class=\"close-icon\"\n (click)=\"onClose()\">cancel</mat-icon>\n <img \n *ngIf=\"data.url\" \n [src]=\"data.url\" \n alt=\"preview-image\" \n class=\"preview-image {{orientation}}\">\n </div>\n}", styles: ["::ng-deep .mat-p-0 .mat-dialog-container{padding:0!important}.dialog-container{overflow:auto;max-height:calc(100vh - 15px);display:flex;justify-content:center;align-items:center}.landscape-image{width:var(--img-width);max-width:95vw;object-fit:contain}.portrait-image{height:var(--img-height);max-height:95vh;object-fit:contain}.close-icon{color:var(--tis-cancel, #bb333b);position:absolute;top:10px;right:10px;z-index:99;cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
85
228
  }
86
229
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisPreviewImageComponent, decorators: [{
87
230
  type: Component,
88
231
  args: [{ selector: 'tis-preview-image', standalone: false, template: "@if(isLoading){\n <div style=\"width: 350px; height: 350px; display: flex; justify-content: center; align-items: center\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"80\"></mat-progress-spinner>\n </div>\n}\n@else{\n <div class=\"w-100 dialog-container\" appScrolling style=\"--img-width: {{(imageWidth && imageWidth < 700) ? imageWidth : 650}}px; --img-height: {{(imageHeight && imageHeight < 600) ? imageHeight : 600}}px\">\n <mat-icon\n class=\"close-icon\"\n (click)=\"onClose()\">cancel</mat-icon>\n <img \n *ngIf=\"data.url\" \n [src]=\"data.url\" \n alt=\"preview-image\" \n class=\"preview-image {{orientation}}\">\n </div>\n}", styles: ["::ng-deep .mat-p-0 .mat-dialog-container{padding:0!important}.dialog-container{overflow:auto;max-height:calc(100vh - 15px);display:flex;justify-content:center;align-items:center}.landscape-image{width:var(--img-width);max-width:95vw;object-fit:contain}.portrait-image{height:var(--img-height);max-height:95vh;object-fit:contain}.close-icon{color:var(--tis-cancel, #bb333b);position:absolute;top:10px;right:10px;z-index:99;cursor:pointer}\n"] }]
89
- }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
232
+ }], ctorParameters: () => [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
90
233
  type: Inject,
91
234
  args: [MAT_DIALOG_DATA]
92
235
  }] }] });
@@ -101,13 +244,13 @@ class TisErrorDialogComponent {
101
244
  onClose() {
102
245
  this.dialogRef.close();
103
246
  }
104
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisErrorDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
105
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TisErrorDialogComponent, isStandalone: false, selector: "lib-tis-error-dialog", ngImport: i0, template: "<h1 mat-dialog-title>\n <mat-icon class=\"{{data?.iconClass}}\">{{data?.icon}}</mat-icon>\n {{data?.title}}\n</h1>\n<div mat-dialog-content>\n {{data?.message}}\n</div>\n<div mat-dialog-actions>\n <button mat-button class=\"tis-text-upper {{data?.buttonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose()\" cdkFocusInitial *ngIf=\"data?.buttonText && data?.buttonText != ''\">{{data?.buttonText}}</button>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
247
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisErrorDialogComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
248
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: TisErrorDialogComponent, isStandalone: false, selector: "lib-tis-error-dialog", ngImport: i0, template: "<h1 mat-dialog-title>\n <mat-icon class=\"{{data?.iconClass}}\">{{data?.icon}}</mat-icon>\n {{data?.title}}\n</h1>\n<div mat-dialog-content>\n {{data?.message}}\n</div>\n<div mat-dialog-actions>\n <button mat-button class=\"tis-text-upper {{data?.buttonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose()\" cdkFocusInitial *ngIf=\"data?.buttonText && data?.buttonText != ''\">{{data?.buttonText}}</button>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
106
249
  }
107
250
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisErrorDialogComponent, decorators: [{
108
251
  type: Component,
109
252
  args: [{ selector: 'lib-tis-error-dialog', standalone: false, template: "<h1 mat-dialog-title>\n <mat-icon class=\"{{data?.iconClass}}\">{{data?.icon}}</mat-icon>\n {{data?.title}}\n</h1>\n<div mat-dialog-content>\n {{data?.message}}\n</div>\n<div mat-dialog-actions>\n <button mat-button class=\"tis-text-upper {{data?.buttonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose()\" cdkFocusInitial *ngIf=\"data?.buttonText && data?.buttonText != ''\">{{data?.buttonText}}</button>\n</div>" }]
110
- }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
253
+ }], ctorParameters: () => [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
111
254
  type: Inject,
112
255
  args: [MAT_DIALOG_DATA]
113
256
  }] }] });
@@ -199,90 +342,25 @@ class TisHelperService {
199
342
  getUploadUrl(url, filename, mimeType, type) {
200
343
  return this.http.post(url, { filename, mimeType, type });
201
344
  }
202
- attachImagesToEntity(url, data) {
203
- return this.http.post(url, data);
204
- }
205
- uploadImageByEntity(url, data) {
206
- return this.http.post(url, data);
207
- }
208
- putImage(url, file, contentType) {
209
- // const headers = new HttpHeaders({ "content-type": contentType ? contentType : "binary/octet-stream"}).set(SkipAuthInterceptorHeader, "");
210
- const headers = new HttpHeaders({ "content-type": contentType ? contentType : "binary/octet-stream" });
211
- return this.http.put(url, file, { headers });
212
- }
213
- deleteUploadedImage(url, data) {
214
- return this.http.post(url, data);
215
- }
216
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisHelperService, deps: [{ token: i1$1.MatSnackBar }, { token: i1.MatDialog }, { token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
217
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisHelperService, providedIn: 'root' });
218
- }
219
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisHelperService, decorators: [{
220
- type: Injectable,
221
- args: [{
222
- providedIn: 'root'
223
- }]
224
- }], ctorParameters: () => [{ type: i1$1.MatSnackBar }, { type: i1.MatDialog }, { type: i1$2.HttpClient }] });
225
-
226
- class FileUploadService {
227
- http;
228
- constructor(http) {
229
- this.http = http;
230
- }
231
- getUploadUrl(url, filename, mimeType, type) {
232
- return this.http.post(url, { filename, mimeType, type });
233
- }
234
345
  attachFilesToEntity(url, data) {
235
346
  return this.http.post(url, data);
236
347
  }
237
- putFile(url, file) {
238
- // const headers = new HttpHeaders({ "content-type": "binary/octet-stream"}).set(SkipAuthInterceptorHeader, "");
239
- const headers = new HttpHeaders({ "content-type": "binary/octet-stream" });
348
+ putFile(url, file, contentType) {
349
+ const headers = new HttpHeaders({ "content-type": contentType ? contentType : "binary/octet-stream" }).set('X-Skip-Auth-Interceptor', "");
240
350
  return this.http.put(url, file, { headers });
241
351
  }
242
352
  deleteUploadedFile(url, data) {
243
353
  return this.http.post(url, data);
244
354
  }
245
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FileUploadService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
246
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FileUploadService, providedIn: 'root' });
247
- }
248
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FileUploadService, decorators: [{
249
- type: Injectable,
250
- args: [{
251
- providedIn: 'root'
252
- }]
253
- }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
254
-
255
- class ImageUploadService {
256
- http;
257
- constructor(http) {
258
- this.http = http;
259
- }
260
- getUploadUrl(url, filename, mimeType, type) {
261
- return this.http.post(url, { filename, mimeType, type });
262
- }
263
- attachImagesToEntity(url, data) {
264
- return this.http.post(url, data);
265
- }
266
- // uploadImageByEntity(url: string, data: any): Observable<any> {
267
- // return this.http.post(url, data);
268
- // }
269
- putImage(url, file, contentType) {
270
- // const headers = new HttpHeaders({ "content-type": contentType ? contentType : "binary/octet-stream"}).set(SkipAuthInterceptorHeader, "");
271
- const headers = new HttpHeaders({ "content-type": contentType ? contentType : "binary/octet-stream" });
272
- return this.http.put(url, file, { headers });
273
- }
274
- deleteUploadedImage(url, data) {
275
- return this.http.post(url, data);
276
- }
277
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ImageUploadService, deps: [{ token: i1$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
278
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ImageUploadService, providedIn: 'root' });
355
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisHelperService, deps: [{ token: i1$3.MatSnackBar }, { token: i1$2.MatDialog }, { token: i3$2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
356
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisHelperService, providedIn: 'root' });
279
357
  }
280
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ImageUploadService, decorators: [{
358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisHelperService, decorators: [{
281
359
  type: Injectable,
282
360
  args: [{
283
361
  providedIn: 'root'
284
362
  }]
285
- }], ctorParameters: () => [{ type: i1$2.HttpClient }] });
363
+ }], ctorParameters: () => [{ type: i1$3.MatSnackBar }, { type: i1$2.MatDialog }, { type: i3$2.HttpClient }] });
286
364
 
287
365
  class TisConfirmationDialogComponent {
288
366
  dialogRef;
@@ -295,21 +373,19 @@ class TisConfirmationDialogComponent {
295
373
  onClose(status) {
296
374
  this.dialogRef.close(status);
297
375
  }
298
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisConfirmationDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
299
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TisConfirmationDialogComponent, isStandalone: false, selector: "tis-confirmation-dialog", ngImport: i0, template: "<h1 mat-dialog-title style=\"align-items: center; display: flex;\">\n <mat-icon class=\"{{data?.iconClass}}\">{{data?.icon}}</mat-icon>\n <span>{{data?.title}}</span>\n</h1>\n<div mat-dialog-content>\n @if(data?.html){\n <h5 class=\"title\">{{data?.message}}</h5>\n <div [innerHTML]=\"data.html\">\n </div>\n }\n @else {\n <span>{{data?.message}}</span>\n }\n</div>\n<div mat-dialog-actions>\n <button mat-button class=\"tis-text-upper {{data?.cancelButtonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose(false)\" *ngIf=\"data?.cancelButtonText && data?.cancelButtonText != ''\">{{data?.cancelButtonText}}</button>\n <button mat-button class=\"tis-text-upper {{data?.approveButtonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose(true)\" cdkFocusInitial *ngIf=\"data?.approveButtonText && data?.approveButtonText != ''\">{{data?.approveButtonText}}</button>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
376
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisConfirmationDialogComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
377
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TisConfirmationDialogComponent, isStandalone: false, selector: "tis-confirmation-dialog", ngImport: i0, template: "<h1 mat-dialog-title style=\"align-items: center; display: flex;\">\n <mat-icon class=\"{{data?.iconClass}}\">{{data?.icon}}</mat-icon>\n <span>{{data?.title}}</span>\n</h1>\n<div mat-dialog-content>\n @if(data?.html){\n <h5 class=\"title\">{{data?.message}}</h5>\n <div [innerHTML]=\"data.html\">\n </div>\n }\n @else {\n <span>{{data?.message}}</span>\n }\n</div>\n<div mat-dialog-actions>\n <button mat-button class=\"tis-text-upper {{data?.cancelButtonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose(false)\" *ngIf=\"data?.cancelButtonText && data?.cancelButtonText != ''\">{{data?.cancelButtonText}}</button>\n <button mat-button class=\"tis-text-upper {{data?.approveButtonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose(true)\" cdkFocusInitial *ngIf=\"data?.approveButtonText && data?.approveButtonText != ''\">{{data?.approveButtonText}}</button>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }] });
300
378
  }
301
379
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisConfirmationDialogComponent, decorators: [{
302
380
  type: Component,
303
381
  args: [{ selector: 'tis-confirmation-dialog', standalone: false, template: "<h1 mat-dialog-title style=\"align-items: center; display: flex;\">\n <mat-icon class=\"{{data?.iconClass}}\">{{data?.icon}}</mat-icon>\n <span>{{data?.title}}</span>\n</h1>\n<div mat-dialog-content>\n @if(data?.html){\n <h5 class=\"title\">{{data?.message}}</h5>\n <div [innerHTML]=\"data.html\">\n </div>\n }\n @else {\n <span>{{data?.message}}</span>\n }\n</div>\n<div mat-dialog-actions>\n <button mat-button class=\"tis-text-upper {{data?.cancelButtonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose(false)\" *ngIf=\"data?.cancelButtonText && data?.cancelButtonText != ''\">{{data?.cancelButtonText}}</button>\n <button mat-button class=\"tis-text-upper {{data?.approveButtonClass ?? 'tis-btn-primary'}}\" (click)=\"onClose(true)\" cdkFocusInitial *ngIf=\"data?.approveButtonText && data?.approveButtonText != ''\">{{data?.approveButtonText}}</button>\n</div>" }]
304
- }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
382
+ }], ctorParameters: () => [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
305
383
  type: Inject,
306
384
  args: [MAT_DIALOG_DATA]
307
385
  }] }] });
308
386
 
309
387
  class TisImageAndFileUploadAndViewComponent {
310
388
  dialog;
311
- fileUploadService;
312
- imageUploadService;
313
389
  helper;
314
390
  breakpointObserver;
315
391
  changeSubject = new BehaviorSubject(false);
@@ -405,10 +481,8 @@ class TisImageAndFileUploadAndViewComponent {
405
481
  images = [];
406
482
  loading = false;
407
483
  status = false;
408
- constructor(dialog, fileUploadService, imageUploadService, helper, breakpointObserver) {
484
+ constructor(dialog, helper, breakpointObserver) {
409
485
  this.dialog = dialog;
410
- this.fileUploadService = fileUploadService;
411
- this.imageUploadService = imageUploadService;
412
486
  this.helper = helper;
413
487
  this.breakpointObserver = breakpointObserver;
414
488
  }
@@ -556,7 +630,7 @@ class TisImageAndFileUploadAndViewComponent {
556
630
  let mimeType = file.type;
557
631
  let compressedImage = this.config?.isCompressed ? await this.helper.compressFile(e.target?.result, mimeType) : e.target.result;
558
632
  try {
559
- let uploadResponse = await this.imageUploadService.getUploadUrl(this.urlConfig.getUploadUrl, file.name, mimeType, this.currentEntityType).toPromise();
633
+ let uploadResponse = await this.helper.getUploadUrl(this.urlConfig.getUploadUrl, file.name, mimeType, this.currentEntityType).toPromise();
560
634
  let uploadData = uploadResponse.data.uploadUrlData;
561
635
  let dataUrl = await this.helper.getDataUrlFromFile(file);
562
636
  let currentImageData = {
@@ -568,7 +642,7 @@ class TisImageAndFileUploadAndViewComponent {
568
642
  this.filesArray = [currentImageData, ...this.filesArray];
569
643
  this.setSliderLoading();
570
644
  uploadedImages.push(currentImageData);
571
- await this.imageUploadService.putImage(uploadData.uploadURL, compressedImage).toPromise();
645
+ await this.helper.putFile(uploadData.uploadURL, compressedImage).toPromise();
572
646
  // Final processing
573
647
  currentImageData.s3Url = currentImageData.tempS3Url;
574
648
  currentImageData.loading = !this.config?.isStoredDb;
@@ -595,7 +669,7 @@ class TisImageAndFileUploadAndViewComponent {
595
669
  }
596
670
  return r;
597
671
  });
598
- this.imageUploadService.attachImagesToEntity(this.urlConfig.attachToEntity, { images: images, entityId: this.currentEntityId, entityType: this.currentEntityType }).subscribe({
672
+ this.helper.attachFilesToEntity(this.urlConfig.attachToEntity, { images: images, entityId: this.currentEntityId, entityType: this.currentEntityType }).subscribe({
599
673
  next: (ir) => {
600
674
  resolve(ir);
601
675
  },
@@ -654,7 +728,7 @@ class TisImageAndFileUploadAndViewComponent {
654
728
  }
655
729
  removeUploadedImage(img, index, silently = false) {
656
730
  console.log("removeUploadedImage:", img);
657
- this.imageUploadService.deleteUploadedImage(this.urlConfig.removeImage, img).subscribe((r) => {
731
+ this.helper.deleteUploadedFile(this.urlConfig.removeImage, img).subscribe((r) => {
658
732
  console.log('Image Delete Res:', r);
659
733
  this.loading = false;
660
734
  this.filesArray.splice(index, 1);
@@ -705,7 +779,7 @@ class TisImageAndFileUploadAndViewComponent {
705
779
  let mimeType = file.type;
706
780
  let buffer = new Uint8Array(reader.result);
707
781
  try {
708
- let uploadResponse = await this.fileUploadService.getUploadUrl(this.urlConfig.getUploadUrl, file.name, mimeType, this.currentEntityType).toPromise();
782
+ let uploadResponse = await this.helper.getUploadUrl(this.urlConfig.getUploadUrl, file.name, mimeType, this.currentEntityType).toPromise();
709
783
  let uploadData = uploadResponse.data.uploadUrlData;
710
784
  let currentFileData = {
711
785
  title: file.name, name: file.name, s3Url: uploadData.resourceUrl,
@@ -715,7 +789,7 @@ class TisImageAndFileUploadAndViewComponent {
715
789
  this.filesArray = [currentFileData, ...this.filesArray];
716
790
  this.setSliderLoading();
717
791
  uploadedFiles.push(currentFileData);
718
- await this.fileUploadService.putFile(uploadData.uploadURL, e.target.result).toPromise();
792
+ await this.helper.putFile(uploadData.uploadURL, e.target.result).toPromise();
719
793
  // Final processing
720
794
  currentFileData.s3Url = currentFileData.uploadData?.resourceUrl;
721
795
  currentFileData.loading = !this.config?.isStoredDb;
@@ -742,7 +816,7 @@ class TisImageAndFileUploadAndViewComponent {
742
816
  }
743
817
  return r;
744
818
  });
745
- this.fileUploadService.attachFilesToEntity(this.urlConfig.attachToEntity, { files: files, entityId: this.currentEntityId, entityType: this.currentEntityType }).subscribe({
819
+ this.helper.attachFilesToEntity(this.urlConfig.attachToEntity, { files: files, entityId: this.currentEntityId, entityType: this.currentEntityType }).subscribe({
746
820
  next: (ir) => {
747
821
  // this.filesArray = fa;
748
822
  this.filesArray[0].loading = false;
@@ -804,7 +878,7 @@ class TisImageAndFileUploadAndViewComponent {
804
878
  }
805
879
  removeUploadedFile(file, index, silently = false) {
806
880
  console.log("removeUploadedFile:", file);
807
- this.fileUploadService.deleteUploadedFile(this.urlConfig.removeImage, file).subscribe((r) => {
881
+ this.helper.deleteUploadedFile(this.urlConfig.removeImage, file).subscribe((r) => {
808
882
  console.log('File Delete Res:', r);
809
883
  this.loading = false;
810
884
  this.filesArray.splice(index, 1);
@@ -920,13 +994,13 @@ class TisImageAndFileUploadAndViewComponent {
920
994
  let height = document.getElementById(id)?.offsetWidth;
921
995
  return `${height}px`;
922
996
  }
923
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisImageAndFileUploadAndViewComponent, deps: [{ token: i1.MatDialog }, { token: FileUploadService }, { token: ImageUploadService }, { token: TisHelperService }, { token: i5.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
924
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TisImageAndFileUploadAndViewComponent, isStandalone: false, selector: "tis-image-and-file-upload-and-view", inputs: { urlConfig: "urlConfig", entityType: "entityType", entityId: "entityId", viewType: "viewType", type: "type", label: "label", disabled: "disabled", data: "data", hint: "hint", accept: "accept", selectedId: "selectedId", options: "options", required: "required", previewOnly: "previewOnly", previewInFlex: "previewInFlex", imageItemClass: "imageItemClass", isEnableDeleteConfirmation: "isEnableDeleteConfirmation", deleteConfirmationMsg: "deleteConfirmationMsg", dialogConfig: "dialogConfig" }, outputs: { uploadInProgress: "uploadInProgress", onUploaded: "onUploaded", onFileSelect: "onFileSelect", onFileRemoved: "onFileRemoved" }, usesOnChanges: true, ngImport: i0, template: "<div>\n <input type=\"file\" size=\"60\" *ngIf=\"!config?.isMultiple\" id=\"{{config.selectorId}}\" (change)=\"type == 'file'? detectFiles($event): detectImages($event)\" accept=\"{{accept}}\" style=\"display: none;\" />\n <input type=\"file\" size=\"60\" *ngIf=\"config?.isMultiple\" id=\"{{config.selectorId}}\" (change)=\"type == 'file'? detectFiles($event): detectImages($event)\" accept=\"{{accept}}\" multiple style=\"display: none;\" />\n <!-- <input type=\"file\" name=\"file\" id=\"file-picker\" style=\"display: none;\" *ngIf=\"(filesArray?.length < config?.limit) && !disabled\" [style.height]=\"config?.labelHeight\"> -->\n @if(viewType == 'card'){\n <div [class.image-picker-label]=\"!previewOnly\" [class.error]=\"required && (filesArray?.length || 0) <= 0\" [style.height]=\"filesArray?.length ? null : config?.height\" style=\"--tis-image-picker-height: {{config?.height ?? 0}}\">\n @if(filesArray?.length){\n <div [ngClass]=\"{'grid-cols-1': config?.cols == 1, 'grid-cols-2': config?.cols == 2, 'grid-cols-3': config?.cols == 3, 'grid-cols-4': config?.cols == 4, 'grid-cols-5': config?.cols == 5, 'grid-cols-6': config?.cols == 6}\" class=\"{{previewInFlex ? 'flex' : 'grid'}} image-list\" style=\"gap: 25px;\">\n @for(file of filesArray; track file.s3Url; let i = $index; let l = $last;){\n <!-- style=\"height: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2); width: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2);\" -->\n <div class=\"image-item {{imageItemClass}}\" [class.selected]=\"config?.selectionMode ? selectedId == file.id : false\" [class.tis-curser-pointer]=\"!config?.hiddenPreview || config?.selectionMode\" id=\"image-item-{{config.selectorId}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i)\" [style.background-image]=\"type == 'file'? '' : 'url('+file.s3Url+')'\" *ngIf=\"file?.loading\">\n <div class=\"shedded\" style=\"width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; display: flex; justify-content: center; align-items: center;\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"30\"></mat-progress-spinner>\n </div>\n <mat-icon *ngIf=\"type == 'file'\" class=\"active tis-mat-icon-2x\">description</mat-icon>\n </div>\n <div class=\"image-item {{imageItemClass}}\" [class.selected]=\"config?.selectionMode ? selectedId == file.id : false\" [class.tis-curser-pointer]=\"!config?.hiddenPreview || config?.selectionMode\" id=\"image-item-{{config.selectorId}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i)\" [style.background-image]=\"type == 'file'? '' : 'url('+file.s3Url+')'\" (click)=\"onSelectFile(file)\" *ngIf=\"!file?.loading\">\n <mat-icon *ngIf=\"type == 'file'\" class=\"active tis-mat-icon-2x\">description</mat-icon>\n <span class=\"material-icons cancel\" (click)=\"type == 'file'? deleteFile($event, {}, i, file) : deleteImage($event, {}, i, file)\" *ngIf=\"!disabled && !config.hiddenDeleteBtn\">highlight_off</span>\n <span class=\"material-icons download\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!disabled && !config.hiddenDownloadBtn\">download_for_offline</span>\n </div>\n @if(l && (config?.limit || 0) > (filesArray?.length || 0) && !disabled){\n <!-- style=\"height: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2); width: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2);\" -->\n <div class=\"image-item uploader\" id=\"image-item-{{config.selectorId}}-{{i}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i+'-'+i)\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon class=\"active\">upload_file</mat-icon>\n </div>\n }\n }\n </div>\n }\n @else if(!disabled){\n <label style=\"display: flex; gap: 12px; flex-direction: column; justify-content: center; align-items: center; height: 100%; cursor: pointer;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon>upload_file</mat-icon>\n <p style=\"text-align: center; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <br>\n <small>{{hint}}</small>\n }\n </p>\n </label>\n }\n @else{\n <div style=\"display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; cursor: pointer;\">\n <img src=\"assets/icons/norecordfound.png\" alt=\"data not found\" style=\"margin: auto; height: calc(var(--tis-image-picker-height) - 30px); max-height: 150px;\">\n </div>\n }\n </div>\n }\n @else if(viewType == 'list'){\n <div [class.error-border]=\"required && (filesArray?.length || 0) <= 0\" [style.height]=\"filesArray?.length ? null : config?.height\" style=\"width: 100%; display: flex; gap: 12px; flex-direction: column; --tis-image-picker-height: {{config?.height ?? 0}}\">\n @if(filesArray?.length){\n @for(file of filesArray; track file.s3Url; let i = $index; let l = $last;){\n <div style=\"position: relative; display: flex; align-items: center; gap: 10px; border-radius: 5px; border: 1px solid black; padding: 5px; height: 56px;\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">description</mat-icon>\n <div style=\"white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;\">{{file?.title}}</div>\n <div style=\"display: flex; align-items: center; gap: 4px;\" *ngIf=\"!file?.loading\">\n <button type=\"button\" mat-icon-button aria-label=\"Download File\" class=\"tis-icon-btn-sm tis-text-download\" style=\"margin: 0px !important;\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!disabled && !config.hiddenDownloadBtn\">\n <mat-icon>download_for_offline</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button aria-label=\"View File\" class=\"tis-icon-btn-sm tis-text-view\" style=\"margin: 0px !important;\" (click)=\"openFile(file)\" *ngIf=\"!config.hiddenPreview\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button aria-label=\"Remove File\" class=\"tis-icon-btn-sm tis-text-cancel\" style=\"margin: 0px !important;\" (click)=\"type == 'file'? deleteFile($event, {}, i, file) : deleteImage($event, {}, i, file)\" *ngIf=\"!disabled && !config.hiddenDeleteBtn\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n <div style=\"display: flex; justify-content: center; align-items: center; gap: 4px;\" style=\"width: 50px;\" *ngIf=\"file?.loading\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"20\"></mat-progress-spinner>\n </div>\n <!-- <span class=\"material-icons download\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!disabled && !config.hiddenDownloadBtn\">download_for_offline</span> -->\n </div>\n @if(l && (config?.limit || 0) > (filesArray?.length || 0) && !disabled){\n <div style=\"cursor: pointer; display: flex; align-items: center; gap: 4px; border: 1px solid black; border-radius: 5px; padding: 5px; height: 56px;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">upload_file</mat-icon>\n <div style=\"width: 100%;\">\n <div style=\"display: flex; flex-direction: column; align-items: start; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <small>{{hint}}</small>\n }\n </div>\n </div>\n </div>\n }\n }\n }\n @else if(!disabled){\n <div style=\"cursor: pointer; display: flex; align-items: center; gap: 4px; border: 1px solid black; border-radius: 5px; padding: 5px; height: 56px;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">upload_file</mat-icon>\n <div style=\"width: 100%;\">\n <div style=\"display: flex; flex-direction: column; align-items: start; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <small>{{hint}}</small>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n</div>", styles: [".grid{display:grid}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.tis-mat-icon-5x{width:125px!important;height:125px!important;font-size:125px!important}.tis-mat-icon-4x{width:100px!important;height:100px!important;font-size:100px!important}.tis-mat-icon-3x{width:75px!important;height:75px!important;font-size:75px!important}.tis-mat-icon-2x{width:50px!important;height:50px!important;font-size:50px!important}.tis-icon-btn-sm{margin-top:7px!important;padding:5px!important;height:36px!important;width:36px!important}.tis-text-download{color:var(--tis-download, #3838a2)}.tis-text-view{color:var(--tis-primary, #3838a2)}.tis-text-cancel{color:var(--tis-cancel, #bb333b)}::ng-deep #upload-img-box{padding:0;border:2px dashed #717171;display:grid;color:#717171;justify-content:center;align-items:center;width:100%;height:160px;background:#eaeaea;cursor:pointer}::ng-deep #upload-img-box input[type=file]{display:none}.preview-img{display:flex;justify-content:center;position:absolute;align-items:center;top:0;width:100%;height:100%;background:#9e9e9e59;opacity:0}.preview-img:hover{opacity:1}.img-box{order:2px solid #b5b5b5!important;position:relative;padding:5px;display:flex;justify-content:center;align-content:center;align-items:center}.loading-img{display:flex;justify-content:center;position:absolute;align-items:center;top:0;width:100%;height:100%;background:#9e9e9e59}.image-picker-label{border:1px dashed rgba(0,0,0,.38);border-radius:4px;padding:24px}.image-picker-label.error{border:2px dashed var(--mat-form-field-error-text-color)}.image-list .image-item{height:100px;border-radius:5px;background-position:center;background-size:cover;position:relative;display:flex;justify-content:center;align-items:center;border:1px solid rgba(0,0,0,.38)}.image-list .image-item.uploader{border:1px dashed rgba(0,0,0,.38)!important;cursor:pointer}.image-list .image-item:hover .mat-icon{display:unset!important}.image-list .image-item.selected{border:3px solid var(--tis-item-selected, #3838a2)!important}.image-list .image-item .mat-icon{display:none}.image-list .image-item .mat-icon.active{display:unset!important}.image-list .image-item .cancel{color:var(--tis-cancel, #bb333b);background-color:#fff;border-radius:20px;position:absolute;top:-10px;right:-10px;cursor:pointer;box-shadow:0 0 5px #9e9e9e}.image-list .image-item .download{color:var(--tis-download, #3838a2);background-color:#fff;border-radius:20px;position:absolute;top:-10px;left:-10px;cursor:pointer;box-shadow:0 0 5px #9e9e9e}.image-list .image-item .shedded{background-color:#9e9e9ecc;border-radius:5px}.error-border{border:1px solid var(--mat-form-field-error-text-color)!important;border-radius:5px!important}.download{color:var(--tis-download, #3838a2);position:absolute;top:-10px;left:-10px;cursor:pointer}.tis-curser-pointer{cursor:pointer}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-title{padding:8px 16px;display:flex;gap:10px;justify-content:start;width:100%;align-items:center}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-title:before{content:unset}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-content{padding-top:15px;font-size:14px}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-actions{border-top:1px solid rgba(0,0,0,.12);justify-content:end}@media (max-width: 575.98px){.image-picker-label{padding:15px}}@media (min-width: 576px) and (max-width: 767.98px){.image-picker-label{padding:15px}}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i4$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] });
997
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisImageAndFileUploadAndViewComponent, deps: [{ token: i1$2.MatDialog }, { token: TisHelperService }, { token: i3$3.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
998
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: TisImageAndFileUploadAndViewComponent, isStandalone: false, selector: "tis-image-and-file-upload-and-view", inputs: { urlConfig: "urlConfig", entityType: "entityType", entityId: "entityId", viewType: "viewType", type: "type", label: "label", disabled: "disabled", data: "data", hint: "hint", accept: "accept", selectedId: "selectedId", options: "options", required: "required", previewOnly: "previewOnly", previewInFlex: "previewInFlex", imageItemClass: "imageItemClass", isEnableDeleteConfirmation: "isEnableDeleteConfirmation", deleteConfirmationMsg: "deleteConfirmationMsg", dialogConfig: "dialogConfig" }, outputs: { uploadInProgress: "uploadInProgress", onUploaded: "onUploaded", onFileSelect: "onFileSelect", onFileRemoved: "onFileRemoved" }, usesOnChanges: true, ngImport: i0, template: "<div>\n <input type=\"file\" size=\"60\" *ngIf=\"!config?.isMultiple\" id=\"{{config.selectorId}}\" (change)=\"type == 'file'? detectFiles($event): detectImages($event)\" accept=\"{{accept}}\" style=\"display: none;\" />\n <input type=\"file\" size=\"60\" *ngIf=\"config?.isMultiple\" id=\"{{config.selectorId}}\" (change)=\"type == 'file'? detectFiles($event): detectImages($event)\" accept=\"{{accept}}\" multiple style=\"display: none;\" />\n <!-- <input type=\"file\" name=\"file\" id=\"file-picker\" style=\"display: none;\" *ngIf=\"(filesArray?.length < config?.limit) && !disabled\" [style.height]=\"config?.labelHeight\"> -->\n @if(viewType == 'card'){\n <div [class.image-picker-label]=\"!previewOnly\" [class.error]=\"required && (filesArray?.length || 0) <= 0\" [style.height]=\"filesArray?.length ? null : config?.height\" style=\"--tis-image-picker-height: {{config?.height ?? 0}}\">\n @if(filesArray?.length){\n <div [ngClass]=\"{'grid-cols-1': config?.cols == 1, 'grid-cols-2': config?.cols == 2, 'grid-cols-3': config?.cols == 3, 'grid-cols-4': config?.cols == 4, 'grid-cols-5': config?.cols == 5, 'grid-cols-6': config?.cols == 6}\" class=\"{{previewInFlex ? 'flex' : 'grid'}} image-list\" style=\"gap: 25px;\">\n @for(file of filesArray; track file.s3Url; let i = $index; let l = $last;){\n <!-- style=\"height: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2); width: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2);\" -->\n <div class=\"image-item {{imageItemClass}}\" [class.selected]=\"config?.selectionMode ? selectedId == file.id : false\" [class.tis-curser-pointer]=\"!config?.hiddenPreview || config?.selectionMode\" id=\"image-item-{{config.selectorId}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i)\" [style.background-image]=\"type == 'file'? '' : 'url('+file.s3Url+')'\" *ngIf=\"file?.loading\">\n <div class=\"shedded\" style=\"width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; display: flex; justify-content: center; align-items: center;\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"30\"></mat-progress-spinner>\n </div>\n <mat-icon *ngIf=\"type == 'file'\" class=\"active tis-mat-icon-2x\">description</mat-icon>\n </div>\n <div class=\"image-item {{imageItemClass}}\" [class.selected]=\"config?.selectionMode ? selectedId == file.id : false\" [class.tis-curser-pointer]=\"!config?.hiddenPreview || config?.selectionMode\" id=\"image-item-{{config.selectorId}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i)\" [style.background-image]=\"type == 'file'? '' : 'url('+file.s3Url+')'\" (click)=\"onSelectFile(file)\" *ngIf=\"!file?.loading\">\n <mat-icon *ngIf=\"type == 'file'\" class=\"active tis-mat-icon-2x\">description</mat-icon>\n <span class=\"material-icons cancel\" (click)=\"type == 'file'? deleteFile($event, {}, i, file) : deleteImage($event, {}, i, file)\" *ngIf=\"!disabled && !config.hiddenDeleteBtn\">highlight_off</span>\n <span class=\"material-icons download\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!config.hiddenDownloadBtn\">download_for_offline</span>\n </div>\n @if(l && (config?.limit || 0) > (filesArray?.length || 0) && !disabled){\n <!-- style=\"height: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2); width: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2);\" -->\n <div class=\"image-item uploader\" id=\"image-item-{{config.selectorId}}-{{i}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i+'-'+i)\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon class=\"active\">upload_file</mat-icon>\n </div>\n }\n }\n </div>\n }\n @else if(!disabled){\n <label style=\"display: flex; gap: 12px; flex-direction: column; justify-content: center; align-items: center; height: 100%; cursor: pointer;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon>upload_file</mat-icon>\n <p style=\"text-align: center; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <br>\n <small>{{hint}}</small>\n }\n </p>\n </label>\n }\n @else{\n <div class=\"not-found-section\" style=\"display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; cursor: pointer;\">\n <!-- <img src=\"assets/tis-image-and-file-upload-and-view-assets/no-record-found.png\" alt=\"data not found\" style=\"margin: auto; height: calc(var(--tis-image-picker-height) - 30px); max-height: 150px;\"> -->\n \n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" id=\"Layer_1\" x=\"0px\" y=\"0px\" width=\"100%\" viewBox=\"0 0 512 512\" enable-background=\"new 0 0 512 512\" xml:space=\"preserve\">\n <path fill=\"none\" opacity=\"1.000000\" stroke=\"none\" d=\" M283.000000,513.000000 C188.689560,513.000000 94.879120,513.000000 1.034338,513.000000 C1.034338,342.397858 1.034338,171.795731 1.034338,1.096792 C171.560455,1.096792 342.121002,1.096792 512.840759,1.096792 C512.840759,171.666550 512.840759,342.333252 512.840759,513.000000 C436.462372,513.000000 359.981171,513.000000 283.000000,513.000000 M214.500000,497.000000 C271.998901,496.999969 329.497833,497.019897 386.996674,496.975769 C394.561920,496.969971 401.787231,494.626648 406.395233,488.770782 C412.026520,481.614502 416.644897,473.577057 421.072449,465.572754 C437.390259,436.072754 453.464813,406.438049 469.597321,376.835754 C478.327332,360.816742 487.426758,344.977722 495.530029,328.645905 C501.012421,317.596252 494.173737,304.613556 481.201294,304.861847 C456.377502,305.336975 431.538177,304.999878 406.705292,304.999847 C404.938568,304.999847 403.171844,304.999847 401.000031,304.999847 C401.000031,302.348328 401.003784,300.379181 400.999481,298.410065 C400.935120,269.085632 400.853577,239.761169 400.867645,210.436768 C400.868164,209.340317 401.642242,208.138214 402.315186,207.164581 C408.841400,197.722305 416.441071,188.858276 421.779449,178.792419 C433.290894,157.086823 435.985443,133.380402 431.740631,109.507538 C425.335449,73.484550 405.456726,46.387234 373.051300,29.163473 C356.219269,20.217096 338.040710,16.499708 318.773804,16.813351 C301.234619,17.098873 284.897461,21.133270 269.449402,28.965902 C256.098724,35.735111 244.580948,44.876842 234.887085,56.467457 C224.793365,68.536171 217.675415,82.055397 213.023590,96.957832 C209.186737,109.249481 208.654160,121.911049 208.964157,134.687836 C209.387650,152.143631 214.172058,168.302002 222.741714,183.427231 C224.412766,186.376572 225.987946,189.380234 227.939270,192.969376 C211.045273,192.969376 194.919281,193.199417 178.811310,192.763687 C175.805389,192.682358 172.083817,190.621887 170.038193,188.292847 C160.046188,176.916489 150.561493,165.096268 140.789429,153.524185 C136.493210,148.436600 131.117233,145.037399 124.221672,145.023544 C96.055626,144.966995 67.881424,145.387711 39.727192,144.808304 C28.532793,144.577896 16.775660,156.479080 16.809900,167.857864 C17.130381,274.354980 17.052288,380.853516 16.870073,487.351288 C16.859135,493.743988 19.582472,497.123566 26.503685,497.103851 C88.835381,496.926239 151.167801,497.000000 214.500000,497.000000 z\"/>\n <path fill=\"var(--tis-primary, #1F6AAD)\" opacity=\"1.000000\" stroke=\"none\" d=\" M214.000000,497.000000 C151.167801,497.000000 88.835381,496.926239 26.503685,497.103851 C19.582472,497.123566 16.859135,493.743988 16.870073,487.351288 C17.052288,380.853516 17.130381,274.354980 16.809900,167.857864 C16.775660,156.479080 28.532793,144.577896 39.727192,144.808304 C67.881424,145.387711 96.055626,144.966995 124.221672,145.023544 C131.117233,145.037399 136.493210,148.436600 140.789429,153.524185 C150.561493,165.096268 160.046188,176.916489 170.038193,188.292847 C172.083817,190.621887 175.805389,192.682358 178.811310,192.763687 C194.919281,193.199417 211.045273,192.969376 227.939270,192.969376 C225.987946,189.380234 224.412766,186.376572 222.741714,183.427231 C214.172058,168.302002 209.387650,152.143631 208.964157,134.687836 C208.654160,121.911049 209.186737,109.249481 213.023590,96.957832 C217.675415,82.055397 224.793365,68.536171 234.887085,56.467457 C244.580948,44.876842 256.098724,35.735111 269.449402,28.965902 C284.897461,21.133270 301.234619,17.098873 318.773804,16.813351 C338.040710,16.499708 356.219269,20.217096 373.051300,29.163473 C405.456726,46.387234 425.335449,73.484550 431.740631,109.507538 C435.985443,133.380402 433.290894,157.086823 421.779449,178.792419 C416.441071,188.858276 408.841400,197.722305 402.315186,207.164581 C401.642242,208.138214 400.868164,209.340317 400.867645,210.436768 C400.853577,239.761169 400.935120,269.085632 400.999481,298.410065 C401.003784,300.379181 401.000031,302.348328 401.000031,304.999847 C403.171844,304.999847 404.938568,304.999847 406.705292,304.999847 C431.538177,304.999878 456.377502,305.336975 481.201294,304.861847 C494.173737,304.613556 501.012421,317.596252 495.530029,328.645905 C487.426758,344.977722 478.327332,360.816742 469.597321,376.835754 C453.464813,406.438049 437.390259,436.072754 421.072449,465.572754 C416.644897,473.577057 412.026520,481.614502 406.395233,488.770782 C401.787231,494.626648 394.561920,496.969971 386.996674,496.975769 C329.497833,497.019897 271.998901,496.999969 214.000000,497.000000 M134.597260,321.000000 C127.620270,319.337616 123.942146,323.017517 121.500618,328.932983 C120.498009,331.362091 119.193306,333.673279 117.937233,335.989990 C103.522736,362.575897 89.117485,389.166901 74.653091,415.725647 C67.257729,429.304626 59.689438,442.789490 52.312668,456.378448 C47.974022,464.370728 43.857620,472.483643 39.401810,481.000000 C42.117859,481.000000 44.110912,481.000000 46.103966,481.000000 C144.765793,481.000000 243.427612,481.000031 342.089447,481.000000 C354.922150,481.000000 367.755981,481.100647 380.587189,480.961823 C388.353729,480.877808 394.963684,478.668121 399.028687,471.088623 C414.189636,442.819641 429.540070,414.652191 444.852783,386.464783 C452.465210,372.451935 460.203308,358.507233 467.780884,344.475739 C471.870789,336.902466 475.742279,329.211273 480.010315,321.000000 C364.545990,321.000000 250.059738,321.000000 134.597260,321.000000 M324.557129,242.085190 C327.301666,237.590393 329.664886,232.791306 332.924042,228.707169 C335.118561,225.957092 338.299622,222.950409 341.520416,222.240189 C357.159485,218.791580 371.110535,211.909912 382.881226,201.408112 C405.027954,181.648727 416.679504,157.025070 416.129883,126.765366 C415.719910,104.193253 408.285522,84.336838 393.808441,67.607040 C373.699219,44.368736 348.121246,32.686760 316.779572,33.851212 C294.904785,34.663937 275.751617,42.202290 259.624786,56.188839 C232.720886,79.522171 221.513794,109.436241 227.057266,144.851562 C232.965317,182.596176 262.283539,213.393021 299.806335,221.925400 C304.366974,222.962448 307.440796,225.236969 309.702332,229.227615 C313.147400,235.306534 316.865295,241.230835 320.988098,248.086838 C322.400177,245.685776 323.276184,244.196213 324.557129,242.085190 z\"/>\n <path fill=\"none\" opacity=\"1.000000\" stroke=\"none\" d=\" M135.085373,321.000000 C250.059738,321.000000 364.545990,321.000000 480.010315,321.000000 C475.742279,329.211273 471.870789,336.902466 467.780884,344.475739 C460.203308,358.507233 452.465210,372.451935 444.852783,386.464783 C429.540070,414.652191 414.189636,442.819641 399.028687,471.088623 C394.963684,478.668121 388.353729,480.877808 380.587189,480.961823 C367.755981,481.100647 354.922150,481.000000 342.089447,481.000000 C243.427612,481.000031 144.765793,481.000000 46.103966,481.000000 C44.110912,481.000000 42.117859,481.000000 39.401810,481.000000 C43.857620,472.483643 47.974022,464.370728 52.312668,456.378448 C59.689438,442.789490 67.257729,429.304626 74.653091,415.725647 C89.117485,389.166901 103.522736,362.575897 117.937233,335.989990 C119.193306,333.673279 120.498009,331.362091 121.500618,328.932983 C123.942146,323.017517 127.620270,319.337616 135.085373,321.000000 M140.500000,440.999939 C132.167938,440.999939 123.835869,440.999023 115.503807,441.000183 C106.978073,441.001343 104.965355,442.559265 105.000999,449.124817 C105.035042,455.395599 107.121445,456.999329 115.262733,456.999634 C146.424759,457.000732 177.586792,457.000153 208.748825,457.000000 C224.913086,456.999939 241.077591,456.952484 257.241425,457.035980 C260.763824,457.054169 263.472839,456.015015 264.705200,452.580017 C267.060974,446.013672 263.486053,441.009705 256.482880,441.007080 C218.155258,440.992767 179.827621,441.000061 140.500000,440.999939 M211.498047,417.000153 C216.330338,416.999176 221.164948,417.091248 225.994263,416.971069 C230.865005,416.849884 232.921509,414.514984 232.998932,409.368042 C233.083664,403.733337 231.121094,401.059509 226.230942,401.046417 C196.071045,400.965607 165.910004,400.915100 135.752502,401.195435 C133.579193,401.215637 130.361252,403.471161 129.469467,405.497375 C126.665665,411.867889 130.514359,416.987915 137.514694,416.993042 C161.842728,417.010773 186.170807,417.000061 211.498047,417.000153 z\"/>\n <path fill=\"none\" opacity=\"1.000000\" stroke=\"none\" d=\" M324.354675,242.395920 C323.276184,244.196213 322.400177,245.685776 320.988098,248.086838 C316.865295,241.230835 313.147400,235.306534 309.702332,229.227615 C307.440796,225.236969 304.366974,222.962448 299.806335,221.925400 C262.283539,213.393021 232.965317,182.596176 227.057266,144.851562 C221.513794,109.436241 232.720886,79.522171 259.624786,56.188839 C275.751617,42.202290 294.904785,34.663937 316.779572,33.851212 C348.121246,32.686760 373.699219,44.368736 393.808441,67.607040 C408.285522,84.336838 415.719910,104.193253 416.129883,126.765366 C416.679504,157.025070 405.027954,181.648727 382.881226,201.408112 C371.110535,211.909912 357.159485,218.791580 341.520416,222.240189 C338.299622,222.950409 335.118561,225.957092 332.924042,228.707169 C329.664886,232.791306 327.301666,237.590393 324.354675,242.395920 M365.048187,97.443359 C370.583435,91.700768 370.701630,85.175507 365.330109,81.880753 C361.672668,79.637360 356.630035,80.933273 352.129089,85.405678 C342.914734,94.561584 333.749512,103.766907 324.548431,112.936203 C323.412384,114.068321 322.181274,115.104980 320.457794,116.674324 C319.017365,114.966263 317.930176,113.478592 316.646271,112.186401 C307.370972,102.851303 298.080811,93.530586 288.741608,84.259491 C284.745544,80.292557 279.208740,79.658867 275.876648,82.619972 C271.622955,86.400055 271.606628,92.007065 276.075226,96.532738 C285.555145,106.133804 295.140411,115.630798 304.670227,125.182716 C305.910522,126.425888 307.078339,127.741364 308.699982,129.471832 C306.767456,131.142502 305.170319,132.365768 303.755219,133.772186 C294.658264,142.813187 285.530975,151.825531 276.561829,160.992294 C272.316803,165.330841 271.679443,172.193146 274.860229,175.243683 C278.125275,178.375015 284.989929,177.494553 289.133881,173.366959 C295.270966,167.254105 301.415710,161.148209 307.489624,154.972931 C311.886749,150.502441 316.174255,145.924133 320.608521,141.291687 C322.557465,143.156174 323.772125,144.275360 324.939575,145.441833 C334.366547,154.861099 343.762360,164.311676 353.216248,173.703827 C357.078430,177.540771 364.054932,178.250854 367.156860,175.284821 C369.494812,173.049301 370.182617,164.901749 365.897583,161.258850 C361.343750,157.387436 357.354156,152.853470 353.106140,148.620880 C346.649475,142.187607 340.182373,135.764771 333.450989,129.070267 C344.099365,118.419060 354.322937,108.192757 365.048187,97.443359 z\"/>\n <path fill=\"var(--tis-primary, #1F6AAD)\" opacity=\"1.000000\" stroke=\"none\" d=\" M141.000000,440.999939 C179.827621,441.000061 218.155258,440.992767 256.482880,441.007080 C263.486053,441.009705 267.060974,446.013672 264.705200,452.580017 C263.472839,456.015015 260.763824,457.054169 257.241425,457.035980 C241.077591,456.952484 224.913086,456.999939 208.748825,457.000000 C177.586792,457.000153 146.424759,457.000732 115.262733,456.999634 C107.121445,456.999329 105.035042,455.395599 105.000999,449.124817 C104.965355,442.559265 106.978073,441.001343 115.503807,441.000183 C123.835869,440.999023 132.167938,440.999939 141.000000,440.999939 z\"/>\n <path fill=\"var(--tis-primary, #1F6AAD)\" opacity=\"1.000000\" stroke=\"none\" d=\" M210.998444,417.000153 C186.170807,417.000061 161.842728,417.010773 137.514694,416.993042 C130.514359,416.987915 126.665665,411.867889 129.469467,405.497375 C130.361252,403.471161 133.579193,401.215637 135.752502,401.195435 C165.910004,400.915100 196.071045,400.965607 226.230942,401.046417 C231.121094,401.059509 233.083664,403.733337 232.998932,409.368042 C232.921509,414.514984 230.865005,416.849884 225.994263,416.971069 C221.164948,417.091248 216.330338,416.999176 210.998444,417.000153 z\"/>\n <path fill=\"var(--tis-primary, #1F6AAD)\" opacity=\"1.000000\" stroke=\"none\" d=\" M364.797363,97.704910 C354.322937,108.192757 344.099365,118.419060 333.450989,129.070267 C340.182373,135.764771 346.649475,142.187607 353.106140,148.620880 C357.354156,152.853470 361.343750,157.387436 365.897583,161.258850 C370.182617,164.901749 369.494812,173.049301 367.156860,175.284821 C364.054932,178.250854 357.078430,177.540771 353.216248,173.703827 C343.762360,164.311676 334.366547,154.861099 324.939575,145.441833 C323.772125,144.275360 322.557465,143.156174 320.608521,141.291687 C316.174255,145.924133 311.886749,150.502441 307.489624,154.972931 C301.415710,161.148209 295.270966,167.254105 289.133881,173.366959 C284.989929,177.494553 278.125275,178.375015 274.860229,175.243683 C271.679443,172.193146 272.316803,165.330841 276.561829,160.992294 C285.530975,151.825531 294.658264,142.813187 303.755219,133.772186 C305.170319,132.365768 306.767456,131.142502 308.699982,129.471832 C307.078339,127.741364 305.910522,126.425888 304.670227,125.182716 C295.140411,115.630798 285.555145,106.133804 276.075226,96.532738 C271.606628,92.007065 271.622955,86.400055 275.876648,82.619972 C279.208740,79.658867 284.745544,80.292557 288.741608,84.259491 C298.080811,93.530586 307.370972,102.851303 316.646271,112.186401 C317.930176,113.478592 319.017365,114.966263 320.457794,116.674324 C322.181274,115.104980 323.412384,114.068321 324.548431,112.936203 C333.749512,103.766907 342.914734,94.561584 352.129089,85.405678 C356.630035,80.933273 361.672668,79.637360 365.330109,81.880753 C370.701630,85.175507 370.583435,91.700768 364.797363,97.704910 z\"/>\n </svg>\n\n </div>\n }\n </div>\n }\n @else if(viewType == 'list'){\n <div [class.error-border]=\"required && (filesArray?.length || 0) <= 0\" [style.height]=\"filesArray?.length ? null : config?.height\" style=\"width: 100%; display: flex; gap: 12px; flex-direction: column; --tis-image-picker-height: {{config?.height ?? 0}}\">\n @if(filesArray?.length){\n @for(file of filesArray; track file.s3Url; let i = $index; let l = $last;){\n <div style=\"position: relative; display: flex; align-items: center; gap: 10px; border-radius: 5px; border: 1px solid black; padding: 5px; height: 56px;\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">description</mat-icon>\n <div style=\"white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;\">{{file?.title}}</div>\n <div style=\"display: flex; align-items: center; gap: 4px;\" *ngIf=\"!file?.loading\">\n <button type=\"button\" mat-icon-button aria-label=\"Download File\" class=\"tis-icon-btn-sm tis-text-download\" style=\"margin: 0px !important;\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!config.hiddenDownloadBtn\">\n <mat-icon>download_for_offline</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button aria-label=\"View File\" class=\"tis-icon-btn-sm tis-text-view\" style=\"margin: 0px !important;\" (click)=\"openFile(file)\" *ngIf=\"!config.hiddenPreview\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button aria-label=\"Remove File\" class=\"tis-icon-btn-sm tis-text-cancel\" style=\"margin: 0px !important;\" (click)=\"type == 'file'? deleteFile($event, {}, i, file) : deleteImage($event, {}, i, file)\" *ngIf=\"!disabled && !config.hiddenDeleteBtn\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n <div style=\"display: flex; justify-content: center; align-items: center; gap: 4px;\" style=\"width: 50px;\" *ngIf=\"file?.loading\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"20\"></mat-progress-spinner>\n </div>\n <!-- <span class=\"material-icons download\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!disabled && !config.hiddenDownloadBtn\">download_for_offline</span> -->\n </div>\n @if(l && (config?.limit || 0) > (filesArray?.length || 0) && !disabled){\n <div style=\"cursor: pointer; display: flex; align-items: center; gap: 4px; border: 1px solid black; border-radius: 5px; padding: 5px; height: 56px;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">upload_file</mat-icon>\n <div style=\"width: 100%;\">\n <div style=\"display: flex; flex-direction: column; align-items: start; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <small>{{hint}}</small>\n }\n </div>\n </div>\n </div>\n }\n }\n }\n @else if(!disabled){\n <div style=\"cursor: pointer; display: flex; align-items: center; gap: 4px; border: 1px solid black; border-radius: 5px; padding: 5px; height: 56px;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">upload_file</mat-icon>\n <div style=\"width: 100%;\">\n <div style=\"display: flex; flex-direction: column; align-items: start; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <small>{{hint}}</small>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n</div>", styles: [".grid{display:grid}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.tis-mat-icon-5x{width:125px!important;height:125px!important;font-size:125px!important}.tis-mat-icon-4x{width:100px!important;height:100px!important;font-size:100px!important}.tis-mat-icon-3x{width:75px!important;height:75px!important;font-size:75px!important}.tis-mat-icon-2x{width:50px!important;height:50px!important;font-size:50px!important}.tis-icon-btn-sm{margin-top:7px!important;padding:5px!important;height:36px!important;width:36px!important}.tis-text-download{color:var(--tis-download, #3838a2)}.tis-text-view{color:var(--tis-primary, #3838a2)}.tis-text-cancel{color:var(--tis-cancel, #bb333b)}::ng-deep #upload-img-box{padding:0;border:2px dashed #717171;display:grid;color:#717171;justify-content:center;align-items:center;width:100%;height:160px;background:#eaeaea;cursor:pointer}::ng-deep #upload-img-box input[type=file]{display:none}.preview-img{display:flex;justify-content:center;position:absolute;align-items:center;top:0;width:100%;height:100%;background:#9e9e9e59;opacity:0}.preview-img:hover{opacity:1}.img-box{order:2px solid #b5b5b5!important;position:relative;padding:5px;display:flex;justify-content:center;align-content:center;align-items:center}.loading-img{display:flex;justify-content:center;position:absolute;align-items:center;top:0;width:100%;height:100%;background:#9e9e9e59}.image-picker-label{border:1px dashed rgba(0,0,0,.38);border-radius:4px;padding:24px}.image-picker-label.error{border:2px dashed var(--mat-form-field-error-text-color)}.image-list .image-item{height:100px;border-radius:5px;background-position:center;background-size:cover;position:relative;display:flex;justify-content:center;align-items:center;border:1px solid rgba(0,0,0,.38)}.image-list .image-item.uploader{border:1px dashed rgba(0,0,0,.38)!important;cursor:pointer}.image-list .image-item:hover .mat-icon{display:unset!important}.image-list .image-item.selected{border:3px solid var(--tis-item-selected, #3838a2)!important}.image-list .image-item .mat-icon{display:none}.image-list .image-item .mat-icon.active{display:unset!important}.image-list .image-item .cancel{color:var(--tis-cancel, #bb333b);background-color:#fff;border-radius:20px;position:absolute;top:-10px;right:-10px;cursor:pointer;box-shadow:0 0 5px #9e9e9e}.image-list .image-item .download{color:var(--tis-download, #3838a2);background-color:#fff;border-radius:20px;position:absolute;top:-10px;left:-10px;cursor:pointer;box-shadow:0 0 5px #9e9e9e}.image-list .image-item .shedded{background-color:#9e9e9ecc;border-radius:5px}.error-border{border:1px solid var(--mat-form-field-error-text-color)!important;border-radius:5px!important}.download{color:var(--tis-download, #3838a2);position:absolute;top:-10px;left:-10px;cursor:pointer}.tis-curser-pointer{cursor:pointer}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-title{padding:8px 16px;display:flex;gap:10px;justify-content:start;width:100%;align-items:center}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-title:before{content:unset}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-content{padding-top:15px;font-size:14px}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-actions{border-top:1px solid rgba(0,0,0,.12);justify-content:end}.not-found-section svg{margin:auto;height:calc(var(--tis-image-picker-height) - 30px);max-height:150px}@media (max-width: 575.98px){.image-picker-label{padding:15px}}@media (min-width: 576px) and (max-width: 767.98px){.image-picker-label{padding:15px}}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i2.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }] });
925
999
  }
926
1000
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisImageAndFileUploadAndViewComponent, decorators: [{
927
1001
  type: Component,
928
- args: [{ selector: 'tis-image-and-file-upload-and-view', standalone: false, template: "<div>\n <input type=\"file\" size=\"60\" *ngIf=\"!config?.isMultiple\" id=\"{{config.selectorId}}\" (change)=\"type == 'file'? detectFiles($event): detectImages($event)\" accept=\"{{accept}}\" style=\"display: none;\" />\n <input type=\"file\" size=\"60\" *ngIf=\"config?.isMultiple\" id=\"{{config.selectorId}}\" (change)=\"type == 'file'? detectFiles($event): detectImages($event)\" accept=\"{{accept}}\" multiple style=\"display: none;\" />\n <!-- <input type=\"file\" name=\"file\" id=\"file-picker\" style=\"display: none;\" *ngIf=\"(filesArray?.length < config?.limit) && !disabled\" [style.height]=\"config?.labelHeight\"> -->\n @if(viewType == 'card'){\n <div [class.image-picker-label]=\"!previewOnly\" [class.error]=\"required && (filesArray?.length || 0) <= 0\" [style.height]=\"filesArray?.length ? null : config?.height\" style=\"--tis-image-picker-height: {{config?.height ?? 0}}\">\n @if(filesArray?.length){\n <div [ngClass]=\"{'grid-cols-1': config?.cols == 1, 'grid-cols-2': config?.cols == 2, 'grid-cols-3': config?.cols == 3, 'grid-cols-4': config?.cols == 4, 'grid-cols-5': config?.cols == 5, 'grid-cols-6': config?.cols == 6}\" class=\"{{previewInFlex ? 'flex' : 'grid'}} image-list\" style=\"gap: 25px;\">\n @for(file of filesArray; track file.s3Url; let i = $index; let l = $last;){\n <!-- style=\"height: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2); width: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2);\" -->\n <div class=\"image-item {{imageItemClass}}\" [class.selected]=\"config?.selectionMode ? selectedId == file.id : false\" [class.tis-curser-pointer]=\"!config?.hiddenPreview || config?.selectionMode\" id=\"image-item-{{config.selectorId}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i)\" [style.background-image]=\"type == 'file'? '' : 'url('+file.s3Url+')'\" *ngIf=\"file?.loading\">\n <div class=\"shedded\" style=\"width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; display: flex; justify-content: center; align-items: center;\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"30\"></mat-progress-spinner>\n </div>\n <mat-icon *ngIf=\"type == 'file'\" class=\"active tis-mat-icon-2x\">description</mat-icon>\n </div>\n <div class=\"image-item {{imageItemClass}}\" [class.selected]=\"config?.selectionMode ? selectedId == file.id : false\" [class.tis-curser-pointer]=\"!config?.hiddenPreview || config?.selectionMode\" id=\"image-item-{{config.selectorId}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i)\" [style.background-image]=\"type == 'file'? '' : 'url('+file.s3Url+')'\" (click)=\"onSelectFile(file)\" *ngIf=\"!file?.loading\">\n <mat-icon *ngIf=\"type == 'file'\" class=\"active tis-mat-icon-2x\">description</mat-icon>\n <span class=\"material-icons cancel\" (click)=\"type == 'file'? deleteFile($event, {}, i, file) : deleteImage($event, {}, i, file)\" *ngIf=\"!disabled && !config.hiddenDeleteBtn\">highlight_off</span>\n <span class=\"material-icons download\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!disabled && !config.hiddenDownloadBtn\">download_for_offline</span>\n </div>\n @if(l && (config?.limit || 0) > (filesArray?.length || 0) && !disabled){\n <!-- style=\"height: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2); width: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2);\" -->\n <div class=\"image-item uploader\" id=\"image-item-{{config.selectorId}}-{{i}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i+'-'+i)\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon class=\"active\">upload_file</mat-icon>\n </div>\n }\n }\n </div>\n }\n @else if(!disabled){\n <label style=\"display: flex; gap: 12px; flex-direction: column; justify-content: center; align-items: center; height: 100%; cursor: pointer;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon>upload_file</mat-icon>\n <p style=\"text-align: center; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <br>\n <small>{{hint}}</small>\n }\n </p>\n </label>\n }\n @else{\n <div style=\"display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; cursor: pointer;\">\n <img src=\"assets/icons/norecordfound.png\" alt=\"data not found\" style=\"margin: auto; height: calc(var(--tis-image-picker-height) - 30px); max-height: 150px;\">\n </div>\n }\n </div>\n }\n @else if(viewType == 'list'){\n <div [class.error-border]=\"required && (filesArray?.length || 0) <= 0\" [style.height]=\"filesArray?.length ? null : config?.height\" style=\"width: 100%; display: flex; gap: 12px; flex-direction: column; --tis-image-picker-height: {{config?.height ?? 0}}\">\n @if(filesArray?.length){\n @for(file of filesArray; track file.s3Url; let i = $index; let l = $last;){\n <div style=\"position: relative; display: flex; align-items: center; gap: 10px; border-radius: 5px; border: 1px solid black; padding: 5px; height: 56px;\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">description</mat-icon>\n <div style=\"white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;\">{{file?.title}}</div>\n <div style=\"display: flex; align-items: center; gap: 4px;\" *ngIf=\"!file?.loading\">\n <button type=\"button\" mat-icon-button aria-label=\"Download File\" class=\"tis-icon-btn-sm tis-text-download\" style=\"margin: 0px !important;\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!disabled && !config.hiddenDownloadBtn\">\n <mat-icon>download_for_offline</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button aria-label=\"View File\" class=\"tis-icon-btn-sm tis-text-view\" style=\"margin: 0px !important;\" (click)=\"openFile(file)\" *ngIf=\"!config.hiddenPreview\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button aria-label=\"Remove File\" class=\"tis-icon-btn-sm tis-text-cancel\" style=\"margin: 0px !important;\" (click)=\"type == 'file'? deleteFile($event, {}, i, file) : deleteImage($event, {}, i, file)\" *ngIf=\"!disabled && !config.hiddenDeleteBtn\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n <div style=\"display: flex; justify-content: center; align-items: center; gap: 4px;\" style=\"width: 50px;\" *ngIf=\"file?.loading\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"20\"></mat-progress-spinner>\n </div>\n <!-- <span class=\"material-icons download\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!disabled && !config.hiddenDownloadBtn\">download_for_offline</span> -->\n </div>\n @if(l && (config?.limit || 0) > (filesArray?.length || 0) && !disabled){\n <div style=\"cursor: pointer; display: flex; align-items: center; gap: 4px; border: 1px solid black; border-radius: 5px; padding: 5px; height: 56px;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">upload_file</mat-icon>\n <div style=\"width: 100%;\">\n <div style=\"display: flex; flex-direction: column; align-items: start; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <small>{{hint}}</small>\n }\n </div>\n </div>\n </div>\n }\n }\n }\n @else if(!disabled){\n <div style=\"cursor: pointer; display: flex; align-items: center; gap: 4px; border: 1px solid black; border-radius: 5px; padding: 5px; height: 56px;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">upload_file</mat-icon>\n <div style=\"width: 100%;\">\n <div style=\"display: flex; flex-direction: column; align-items: start; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <small>{{hint}}</small>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n</div>", styles: [".grid{display:grid}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.tis-mat-icon-5x{width:125px!important;height:125px!important;font-size:125px!important}.tis-mat-icon-4x{width:100px!important;height:100px!important;font-size:100px!important}.tis-mat-icon-3x{width:75px!important;height:75px!important;font-size:75px!important}.tis-mat-icon-2x{width:50px!important;height:50px!important;font-size:50px!important}.tis-icon-btn-sm{margin-top:7px!important;padding:5px!important;height:36px!important;width:36px!important}.tis-text-download{color:var(--tis-download, #3838a2)}.tis-text-view{color:var(--tis-primary, #3838a2)}.tis-text-cancel{color:var(--tis-cancel, #bb333b)}::ng-deep #upload-img-box{padding:0;border:2px dashed #717171;display:grid;color:#717171;justify-content:center;align-items:center;width:100%;height:160px;background:#eaeaea;cursor:pointer}::ng-deep #upload-img-box input[type=file]{display:none}.preview-img{display:flex;justify-content:center;position:absolute;align-items:center;top:0;width:100%;height:100%;background:#9e9e9e59;opacity:0}.preview-img:hover{opacity:1}.img-box{order:2px solid #b5b5b5!important;position:relative;padding:5px;display:flex;justify-content:center;align-content:center;align-items:center}.loading-img{display:flex;justify-content:center;position:absolute;align-items:center;top:0;width:100%;height:100%;background:#9e9e9e59}.image-picker-label{border:1px dashed rgba(0,0,0,.38);border-radius:4px;padding:24px}.image-picker-label.error{border:2px dashed var(--mat-form-field-error-text-color)}.image-list .image-item{height:100px;border-radius:5px;background-position:center;background-size:cover;position:relative;display:flex;justify-content:center;align-items:center;border:1px solid rgba(0,0,0,.38)}.image-list .image-item.uploader{border:1px dashed rgba(0,0,0,.38)!important;cursor:pointer}.image-list .image-item:hover .mat-icon{display:unset!important}.image-list .image-item.selected{border:3px solid var(--tis-item-selected, #3838a2)!important}.image-list .image-item .mat-icon{display:none}.image-list .image-item .mat-icon.active{display:unset!important}.image-list .image-item .cancel{color:var(--tis-cancel, #bb333b);background-color:#fff;border-radius:20px;position:absolute;top:-10px;right:-10px;cursor:pointer;box-shadow:0 0 5px #9e9e9e}.image-list .image-item .download{color:var(--tis-download, #3838a2);background-color:#fff;border-radius:20px;position:absolute;top:-10px;left:-10px;cursor:pointer;box-shadow:0 0 5px #9e9e9e}.image-list .image-item .shedded{background-color:#9e9e9ecc;border-radius:5px}.error-border{border:1px solid var(--mat-form-field-error-text-color)!important;border-radius:5px!important}.download{color:var(--tis-download, #3838a2);position:absolute;top:-10px;left:-10px;cursor:pointer}.tis-curser-pointer{cursor:pointer}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-title{padding:8px 16px;display:flex;gap:10px;justify-content:start;width:100%;align-items:center}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-title:before{content:unset}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-content{padding-top:15px;font-size:14px}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-actions{border-top:1px solid rgba(0,0,0,.12);justify-content:end}@media (max-width: 575.98px){.image-picker-label{padding:15px}}@media (min-width: 576px) and (max-width: 767.98px){.image-picker-label{padding:15px}}\n"] }]
929
- }], ctorParameters: () => [{ type: i1.MatDialog }, { type: FileUploadService }, { type: ImageUploadService }, { type: TisHelperService }, { type: i5.BreakpointObserver }], propDecorators: { urlConfig: [{
1002
+ args: [{ selector: 'tis-image-and-file-upload-and-view', standalone: false, template: "<div>\n <input type=\"file\" size=\"60\" *ngIf=\"!config?.isMultiple\" id=\"{{config.selectorId}}\" (change)=\"type == 'file'? detectFiles($event): detectImages($event)\" accept=\"{{accept}}\" style=\"display: none;\" />\n <input type=\"file\" size=\"60\" *ngIf=\"config?.isMultiple\" id=\"{{config.selectorId}}\" (change)=\"type == 'file'? detectFiles($event): detectImages($event)\" accept=\"{{accept}}\" multiple style=\"display: none;\" />\n <!-- <input type=\"file\" name=\"file\" id=\"file-picker\" style=\"display: none;\" *ngIf=\"(filesArray?.length < config?.limit) && !disabled\" [style.height]=\"config?.labelHeight\"> -->\n @if(viewType == 'card'){\n <div [class.image-picker-label]=\"!previewOnly\" [class.error]=\"required && (filesArray?.length || 0) <= 0\" [style.height]=\"filesArray?.length ? null : config?.height\" style=\"--tis-image-picker-height: {{config?.height ?? 0}}\">\n @if(filesArray?.length){\n <div [ngClass]=\"{'grid-cols-1': config?.cols == 1, 'grid-cols-2': config?.cols == 2, 'grid-cols-3': config?.cols == 3, 'grid-cols-4': config?.cols == 4, 'grid-cols-5': config?.cols == 5, 'grid-cols-6': config?.cols == 6}\" class=\"{{previewInFlex ? 'flex' : 'grid'}} image-list\" style=\"gap: 25px;\">\n @for(file of filesArray; track file.s3Url; let i = $index; let l = $last;){\n <!-- style=\"height: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2); width: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2);\" -->\n <div class=\"image-item {{imageItemClass}}\" [class.selected]=\"config?.selectionMode ? selectedId == file.id : false\" [class.tis-curser-pointer]=\"!config?.hiddenPreview || config?.selectionMode\" id=\"image-item-{{config.selectorId}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i)\" [style.background-image]=\"type == 'file'? '' : 'url('+file.s3Url+')'\" *ngIf=\"file?.loading\">\n <div class=\"shedded\" style=\"width: 100%; height: 100%; position: absolute; top: 0px; left: 0px; display: flex; justify-content: center; align-items: center;\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"30\"></mat-progress-spinner>\n </div>\n <mat-icon *ngIf=\"type == 'file'\" class=\"active tis-mat-icon-2x\">description</mat-icon>\n </div>\n <div class=\"image-item {{imageItemClass}}\" [class.selected]=\"config?.selectionMode ? selectedId == file.id : false\" [class.tis-curser-pointer]=\"!config?.hiddenPreview || config?.selectionMode\" id=\"image-item-{{config.selectorId}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i)\" [style.background-image]=\"type == 'file'? '' : 'url('+file.s3Url+')'\" (click)=\"onSelectFile(file)\" *ngIf=\"!file?.loading\">\n <mat-icon *ngIf=\"type == 'file'\" class=\"active tis-mat-icon-2x\">description</mat-icon>\n <span class=\"material-icons cancel\" (click)=\"type == 'file'? deleteFile($event, {}, i, file) : deleteImage($event, {}, i, file)\" *ngIf=\"!disabled && !config.hiddenDeleteBtn\">highlight_off</span>\n <span class=\"material-icons download\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!config.hiddenDownloadBtn\">download_for_offline</span>\n </div>\n @if(l && (config?.limit || 0) > (filesArray?.length || 0) && !disabled){\n <!-- style=\"height: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2); width: calc((var(--tis-image-picker-height) - 48px - 0.75rem) / 2);\" -->\n <div class=\"image-item uploader\" id=\"image-item-{{config.selectorId}}-{{i}}-{{i}}\" [style.height]=\"setHeight('image-item-'+config.selectorId+'-'+i+'-'+i)\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon class=\"active\">upload_file</mat-icon>\n </div>\n }\n }\n </div>\n }\n @else if(!disabled){\n <label style=\"display: flex; gap: 12px; flex-direction: column; justify-content: center; align-items: center; height: 100%; cursor: pointer;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon>upload_file</mat-icon>\n <p style=\"text-align: center; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <br>\n <small>{{hint}}</small>\n }\n </p>\n </label>\n }\n @else{\n <div class=\"not-found-section\" style=\"display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; cursor: pointer;\">\n <!-- <img src=\"assets/tis-image-and-file-upload-and-view-assets/no-record-found.png\" alt=\"data not found\" style=\"margin: auto; height: calc(var(--tis-image-picker-height) - 30px); max-height: 150px;\"> -->\n \n <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"1.1\" id=\"Layer_1\" x=\"0px\" y=\"0px\" width=\"100%\" viewBox=\"0 0 512 512\" enable-background=\"new 0 0 512 512\" xml:space=\"preserve\">\n <path fill=\"none\" opacity=\"1.000000\" stroke=\"none\" d=\" M283.000000,513.000000 C188.689560,513.000000 94.879120,513.000000 1.034338,513.000000 C1.034338,342.397858 1.034338,171.795731 1.034338,1.096792 C171.560455,1.096792 342.121002,1.096792 512.840759,1.096792 C512.840759,171.666550 512.840759,342.333252 512.840759,513.000000 C436.462372,513.000000 359.981171,513.000000 283.000000,513.000000 M214.500000,497.000000 C271.998901,496.999969 329.497833,497.019897 386.996674,496.975769 C394.561920,496.969971 401.787231,494.626648 406.395233,488.770782 C412.026520,481.614502 416.644897,473.577057 421.072449,465.572754 C437.390259,436.072754 453.464813,406.438049 469.597321,376.835754 C478.327332,360.816742 487.426758,344.977722 495.530029,328.645905 C501.012421,317.596252 494.173737,304.613556 481.201294,304.861847 C456.377502,305.336975 431.538177,304.999878 406.705292,304.999847 C404.938568,304.999847 403.171844,304.999847 401.000031,304.999847 C401.000031,302.348328 401.003784,300.379181 400.999481,298.410065 C400.935120,269.085632 400.853577,239.761169 400.867645,210.436768 C400.868164,209.340317 401.642242,208.138214 402.315186,207.164581 C408.841400,197.722305 416.441071,188.858276 421.779449,178.792419 C433.290894,157.086823 435.985443,133.380402 431.740631,109.507538 C425.335449,73.484550 405.456726,46.387234 373.051300,29.163473 C356.219269,20.217096 338.040710,16.499708 318.773804,16.813351 C301.234619,17.098873 284.897461,21.133270 269.449402,28.965902 C256.098724,35.735111 244.580948,44.876842 234.887085,56.467457 C224.793365,68.536171 217.675415,82.055397 213.023590,96.957832 C209.186737,109.249481 208.654160,121.911049 208.964157,134.687836 C209.387650,152.143631 214.172058,168.302002 222.741714,183.427231 C224.412766,186.376572 225.987946,189.380234 227.939270,192.969376 C211.045273,192.969376 194.919281,193.199417 178.811310,192.763687 C175.805389,192.682358 172.083817,190.621887 170.038193,188.292847 C160.046188,176.916489 150.561493,165.096268 140.789429,153.524185 C136.493210,148.436600 131.117233,145.037399 124.221672,145.023544 C96.055626,144.966995 67.881424,145.387711 39.727192,144.808304 C28.532793,144.577896 16.775660,156.479080 16.809900,167.857864 C17.130381,274.354980 17.052288,380.853516 16.870073,487.351288 C16.859135,493.743988 19.582472,497.123566 26.503685,497.103851 C88.835381,496.926239 151.167801,497.000000 214.500000,497.000000 z\"/>\n <path fill=\"var(--tis-primary, #1F6AAD)\" opacity=\"1.000000\" stroke=\"none\" d=\" M214.000000,497.000000 C151.167801,497.000000 88.835381,496.926239 26.503685,497.103851 C19.582472,497.123566 16.859135,493.743988 16.870073,487.351288 C17.052288,380.853516 17.130381,274.354980 16.809900,167.857864 C16.775660,156.479080 28.532793,144.577896 39.727192,144.808304 C67.881424,145.387711 96.055626,144.966995 124.221672,145.023544 C131.117233,145.037399 136.493210,148.436600 140.789429,153.524185 C150.561493,165.096268 160.046188,176.916489 170.038193,188.292847 C172.083817,190.621887 175.805389,192.682358 178.811310,192.763687 C194.919281,193.199417 211.045273,192.969376 227.939270,192.969376 C225.987946,189.380234 224.412766,186.376572 222.741714,183.427231 C214.172058,168.302002 209.387650,152.143631 208.964157,134.687836 C208.654160,121.911049 209.186737,109.249481 213.023590,96.957832 C217.675415,82.055397 224.793365,68.536171 234.887085,56.467457 C244.580948,44.876842 256.098724,35.735111 269.449402,28.965902 C284.897461,21.133270 301.234619,17.098873 318.773804,16.813351 C338.040710,16.499708 356.219269,20.217096 373.051300,29.163473 C405.456726,46.387234 425.335449,73.484550 431.740631,109.507538 C435.985443,133.380402 433.290894,157.086823 421.779449,178.792419 C416.441071,188.858276 408.841400,197.722305 402.315186,207.164581 C401.642242,208.138214 400.868164,209.340317 400.867645,210.436768 C400.853577,239.761169 400.935120,269.085632 400.999481,298.410065 C401.003784,300.379181 401.000031,302.348328 401.000031,304.999847 C403.171844,304.999847 404.938568,304.999847 406.705292,304.999847 C431.538177,304.999878 456.377502,305.336975 481.201294,304.861847 C494.173737,304.613556 501.012421,317.596252 495.530029,328.645905 C487.426758,344.977722 478.327332,360.816742 469.597321,376.835754 C453.464813,406.438049 437.390259,436.072754 421.072449,465.572754 C416.644897,473.577057 412.026520,481.614502 406.395233,488.770782 C401.787231,494.626648 394.561920,496.969971 386.996674,496.975769 C329.497833,497.019897 271.998901,496.999969 214.000000,497.000000 M134.597260,321.000000 C127.620270,319.337616 123.942146,323.017517 121.500618,328.932983 C120.498009,331.362091 119.193306,333.673279 117.937233,335.989990 C103.522736,362.575897 89.117485,389.166901 74.653091,415.725647 C67.257729,429.304626 59.689438,442.789490 52.312668,456.378448 C47.974022,464.370728 43.857620,472.483643 39.401810,481.000000 C42.117859,481.000000 44.110912,481.000000 46.103966,481.000000 C144.765793,481.000000 243.427612,481.000031 342.089447,481.000000 C354.922150,481.000000 367.755981,481.100647 380.587189,480.961823 C388.353729,480.877808 394.963684,478.668121 399.028687,471.088623 C414.189636,442.819641 429.540070,414.652191 444.852783,386.464783 C452.465210,372.451935 460.203308,358.507233 467.780884,344.475739 C471.870789,336.902466 475.742279,329.211273 480.010315,321.000000 C364.545990,321.000000 250.059738,321.000000 134.597260,321.000000 M324.557129,242.085190 C327.301666,237.590393 329.664886,232.791306 332.924042,228.707169 C335.118561,225.957092 338.299622,222.950409 341.520416,222.240189 C357.159485,218.791580 371.110535,211.909912 382.881226,201.408112 C405.027954,181.648727 416.679504,157.025070 416.129883,126.765366 C415.719910,104.193253 408.285522,84.336838 393.808441,67.607040 C373.699219,44.368736 348.121246,32.686760 316.779572,33.851212 C294.904785,34.663937 275.751617,42.202290 259.624786,56.188839 C232.720886,79.522171 221.513794,109.436241 227.057266,144.851562 C232.965317,182.596176 262.283539,213.393021 299.806335,221.925400 C304.366974,222.962448 307.440796,225.236969 309.702332,229.227615 C313.147400,235.306534 316.865295,241.230835 320.988098,248.086838 C322.400177,245.685776 323.276184,244.196213 324.557129,242.085190 z\"/>\n <path fill=\"none\" opacity=\"1.000000\" stroke=\"none\" d=\" M135.085373,321.000000 C250.059738,321.000000 364.545990,321.000000 480.010315,321.000000 C475.742279,329.211273 471.870789,336.902466 467.780884,344.475739 C460.203308,358.507233 452.465210,372.451935 444.852783,386.464783 C429.540070,414.652191 414.189636,442.819641 399.028687,471.088623 C394.963684,478.668121 388.353729,480.877808 380.587189,480.961823 C367.755981,481.100647 354.922150,481.000000 342.089447,481.000000 C243.427612,481.000031 144.765793,481.000000 46.103966,481.000000 C44.110912,481.000000 42.117859,481.000000 39.401810,481.000000 C43.857620,472.483643 47.974022,464.370728 52.312668,456.378448 C59.689438,442.789490 67.257729,429.304626 74.653091,415.725647 C89.117485,389.166901 103.522736,362.575897 117.937233,335.989990 C119.193306,333.673279 120.498009,331.362091 121.500618,328.932983 C123.942146,323.017517 127.620270,319.337616 135.085373,321.000000 M140.500000,440.999939 C132.167938,440.999939 123.835869,440.999023 115.503807,441.000183 C106.978073,441.001343 104.965355,442.559265 105.000999,449.124817 C105.035042,455.395599 107.121445,456.999329 115.262733,456.999634 C146.424759,457.000732 177.586792,457.000153 208.748825,457.000000 C224.913086,456.999939 241.077591,456.952484 257.241425,457.035980 C260.763824,457.054169 263.472839,456.015015 264.705200,452.580017 C267.060974,446.013672 263.486053,441.009705 256.482880,441.007080 C218.155258,440.992767 179.827621,441.000061 140.500000,440.999939 M211.498047,417.000153 C216.330338,416.999176 221.164948,417.091248 225.994263,416.971069 C230.865005,416.849884 232.921509,414.514984 232.998932,409.368042 C233.083664,403.733337 231.121094,401.059509 226.230942,401.046417 C196.071045,400.965607 165.910004,400.915100 135.752502,401.195435 C133.579193,401.215637 130.361252,403.471161 129.469467,405.497375 C126.665665,411.867889 130.514359,416.987915 137.514694,416.993042 C161.842728,417.010773 186.170807,417.000061 211.498047,417.000153 z\"/>\n <path fill=\"none\" opacity=\"1.000000\" stroke=\"none\" d=\" M324.354675,242.395920 C323.276184,244.196213 322.400177,245.685776 320.988098,248.086838 C316.865295,241.230835 313.147400,235.306534 309.702332,229.227615 C307.440796,225.236969 304.366974,222.962448 299.806335,221.925400 C262.283539,213.393021 232.965317,182.596176 227.057266,144.851562 C221.513794,109.436241 232.720886,79.522171 259.624786,56.188839 C275.751617,42.202290 294.904785,34.663937 316.779572,33.851212 C348.121246,32.686760 373.699219,44.368736 393.808441,67.607040 C408.285522,84.336838 415.719910,104.193253 416.129883,126.765366 C416.679504,157.025070 405.027954,181.648727 382.881226,201.408112 C371.110535,211.909912 357.159485,218.791580 341.520416,222.240189 C338.299622,222.950409 335.118561,225.957092 332.924042,228.707169 C329.664886,232.791306 327.301666,237.590393 324.354675,242.395920 M365.048187,97.443359 C370.583435,91.700768 370.701630,85.175507 365.330109,81.880753 C361.672668,79.637360 356.630035,80.933273 352.129089,85.405678 C342.914734,94.561584 333.749512,103.766907 324.548431,112.936203 C323.412384,114.068321 322.181274,115.104980 320.457794,116.674324 C319.017365,114.966263 317.930176,113.478592 316.646271,112.186401 C307.370972,102.851303 298.080811,93.530586 288.741608,84.259491 C284.745544,80.292557 279.208740,79.658867 275.876648,82.619972 C271.622955,86.400055 271.606628,92.007065 276.075226,96.532738 C285.555145,106.133804 295.140411,115.630798 304.670227,125.182716 C305.910522,126.425888 307.078339,127.741364 308.699982,129.471832 C306.767456,131.142502 305.170319,132.365768 303.755219,133.772186 C294.658264,142.813187 285.530975,151.825531 276.561829,160.992294 C272.316803,165.330841 271.679443,172.193146 274.860229,175.243683 C278.125275,178.375015 284.989929,177.494553 289.133881,173.366959 C295.270966,167.254105 301.415710,161.148209 307.489624,154.972931 C311.886749,150.502441 316.174255,145.924133 320.608521,141.291687 C322.557465,143.156174 323.772125,144.275360 324.939575,145.441833 C334.366547,154.861099 343.762360,164.311676 353.216248,173.703827 C357.078430,177.540771 364.054932,178.250854 367.156860,175.284821 C369.494812,173.049301 370.182617,164.901749 365.897583,161.258850 C361.343750,157.387436 357.354156,152.853470 353.106140,148.620880 C346.649475,142.187607 340.182373,135.764771 333.450989,129.070267 C344.099365,118.419060 354.322937,108.192757 365.048187,97.443359 z\"/>\n <path fill=\"var(--tis-primary, #1F6AAD)\" opacity=\"1.000000\" stroke=\"none\" d=\" M141.000000,440.999939 C179.827621,441.000061 218.155258,440.992767 256.482880,441.007080 C263.486053,441.009705 267.060974,446.013672 264.705200,452.580017 C263.472839,456.015015 260.763824,457.054169 257.241425,457.035980 C241.077591,456.952484 224.913086,456.999939 208.748825,457.000000 C177.586792,457.000153 146.424759,457.000732 115.262733,456.999634 C107.121445,456.999329 105.035042,455.395599 105.000999,449.124817 C104.965355,442.559265 106.978073,441.001343 115.503807,441.000183 C123.835869,440.999023 132.167938,440.999939 141.000000,440.999939 z\"/>\n <path fill=\"var(--tis-primary, #1F6AAD)\" opacity=\"1.000000\" stroke=\"none\" d=\" M210.998444,417.000153 C186.170807,417.000061 161.842728,417.010773 137.514694,416.993042 C130.514359,416.987915 126.665665,411.867889 129.469467,405.497375 C130.361252,403.471161 133.579193,401.215637 135.752502,401.195435 C165.910004,400.915100 196.071045,400.965607 226.230942,401.046417 C231.121094,401.059509 233.083664,403.733337 232.998932,409.368042 C232.921509,414.514984 230.865005,416.849884 225.994263,416.971069 C221.164948,417.091248 216.330338,416.999176 210.998444,417.000153 z\"/>\n <path fill=\"var(--tis-primary, #1F6AAD)\" opacity=\"1.000000\" stroke=\"none\" d=\" M364.797363,97.704910 C354.322937,108.192757 344.099365,118.419060 333.450989,129.070267 C340.182373,135.764771 346.649475,142.187607 353.106140,148.620880 C357.354156,152.853470 361.343750,157.387436 365.897583,161.258850 C370.182617,164.901749 369.494812,173.049301 367.156860,175.284821 C364.054932,178.250854 357.078430,177.540771 353.216248,173.703827 C343.762360,164.311676 334.366547,154.861099 324.939575,145.441833 C323.772125,144.275360 322.557465,143.156174 320.608521,141.291687 C316.174255,145.924133 311.886749,150.502441 307.489624,154.972931 C301.415710,161.148209 295.270966,167.254105 289.133881,173.366959 C284.989929,177.494553 278.125275,178.375015 274.860229,175.243683 C271.679443,172.193146 272.316803,165.330841 276.561829,160.992294 C285.530975,151.825531 294.658264,142.813187 303.755219,133.772186 C305.170319,132.365768 306.767456,131.142502 308.699982,129.471832 C307.078339,127.741364 305.910522,126.425888 304.670227,125.182716 C295.140411,115.630798 285.555145,106.133804 276.075226,96.532738 C271.606628,92.007065 271.622955,86.400055 275.876648,82.619972 C279.208740,79.658867 284.745544,80.292557 288.741608,84.259491 C298.080811,93.530586 307.370972,102.851303 316.646271,112.186401 C317.930176,113.478592 319.017365,114.966263 320.457794,116.674324 C322.181274,115.104980 323.412384,114.068321 324.548431,112.936203 C333.749512,103.766907 342.914734,94.561584 352.129089,85.405678 C356.630035,80.933273 361.672668,79.637360 365.330109,81.880753 C370.701630,85.175507 370.583435,91.700768 364.797363,97.704910 z\"/>\n </svg>\n\n </div>\n }\n </div>\n }\n @else if(viewType == 'list'){\n <div [class.error-border]=\"required && (filesArray?.length || 0) <= 0\" [style.height]=\"filesArray?.length ? null : config?.height\" style=\"width: 100%; display: flex; gap: 12px; flex-direction: column; --tis-image-picker-height: {{config?.height ?? 0}}\">\n @if(filesArray?.length){\n @for(file of filesArray; track file.s3Url; let i = $index; let l = $last;){\n <div style=\"position: relative; display: flex; align-items: center; gap: 10px; border-radius: 5px; border: 1px solid black; padding: 5px; height: 56px;\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">description</mat-icon>\n <div style=\"white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%;\">{{file?.title}}</div>\n <div style=\"display: flex; align-items: center; gap: 4px;\" *ngIf=\"!file?.loading\">\n <button type=\"button\" mat-icon-button aria-label=\"Download File\" class=\"tis-icon-btn-sm tis-text-download\" style=\"margin: 0px !important;\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!config.hiddenDownloadBtn\">\n <mat-icon>download_for_offline</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button aria-label=\"View File\" class=\"tis-icon-btn-sm tis-text-view\" style=\"margin: 0px !important;\" (click)=\"openFile(file)\" *ngIf=\"!config.hiddenPreview\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button aria-label=\"Remove File\" class=\"tis-icon-btn-sm tis-text-cancel\" style=\"margin: 0px !important;\" (click)=\"type == 'file'? deleteFile($event, {}, i, file) : deleteImage($event, {}, i, file)\" *ngIf=\"!disabled && !config.hiddenDeleteBtn\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n <div style=\"display: flex; justify-content: center; align-items: center; gap: 4px;\" style=\"width: 50px;\" *ngIf=\"file?.loading\">\n <mat-progress-spinner color=\"primary\" mode=\"indeterminate\" [diameter]=\"20\"></mat-progress-spinner>\n </div>\n <!-- <span class=\"material-icons download\" (click)=\"$event.stopPropagation(); downloadFile(file.s3Url, file.title)\" *ngIf=\"!disabled && !config.hiddenDownloadBtn\">download_for_offline</span> -->\n </div>\n @if(l && (config?.limit || 0) > (filesArray?.length || 0) && !disabled){\n <div style=\"cursor: pointer; display: flex; align-items: center; gap: 4px; border: 1px solid black; border-radius: 5px; padding: 5px; height: 56px;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">upload_file</mat-icon>\n <div style=\"width: 100%;\">\n <div style=\"display: flex; flex-direction: column; align-items: start; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <small>{{hint}}</small>\n }\n </div>\n </div>\n </div>\n }\n }\n }\n @else if(!disabled){\n <div style=\"cursor: pointer; display: flex; align-items: center; gap: 4px; border: 1px solid black; border-radius: 5px; padding: 5px; height: 56px;\" (click)=\"loading? null : openImageSelector()\">\n <mat-icon style=\"width: 40px; min-width: 22px;\">upload_file</mat-icon>\n <div style=\"width: 100%;\">\n <div style=\"display: flex; flex-direction: column; align-items: start; font-size: 14px;\">\n {{label}}\n @if(hint && hint != ''){\n <small>{{hint}}</small>\n }\n </div>\n </div>\n </div>\n }\n </div>\n }\n</div>", styles: [".grid{display:grid}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.tis-mat-icon-5x{width:125px!important;height:125px!important;font-size:125px!important}.tis-mat-icon-4x{width:100px!important;height:100px!important;font-size:100px!important}.tis-mat-icon-3x{width:75px!important;height:75px!important;font-size:75px!important}.tis-mat-icon-2x{width:50px!important;height:50px!important;font-size:50px!important}.tis-icon-btn-sm{margin-top:7px!important;padding:5px!important;height:36px!important;width:36px!important}.tis-text-download{color:var(--tis-download, #3838a2)}.tis-text-view{color:var(--tis-primary, #3838a2)}.tis-text-cancel{color:var(--tis-cancel, #bb333b)}::ng-deep #upload-img-box{padding:0;border:2px dashed #717171;display:grid;color:#717171;justify-content:center;align-items:center;width:100%;height:160px;background:#eaeaea;cursor:pointer}::ng-deep #upload-img-box input[type=file]{display:none}.preview-img{display:flex;justify-content:center;position:absolute;align-items:center;top:0;width:100%;height:100%;background:#9e9e9e59;opacity:0}.preview-img:hover{opacity:1}.img-box{order:2px solid #b5b5b5!important;position:relative;padding:5px;display:flex;justify-content:center;align-content:center;align-items:center}.loading-img{display:flex;justify-content:center;position:absolute;align-items:center;top:0;width:100%;height:100%;background:#9e9e9e59}.image-picker-label{border:1px dashed rgba(0,0,0,.38);border-radius:4px;padding:24px}.image-picker-label.error{border:2px dashed var(--mat-form-field-error-text-color)}.image-list .image-item{height:100px;border-radius:5px;background-position:center;background-size:cover;position:relative;display:flex;justify-content:center;align-items:center;border:1px solid rgba(0,0,0,.38)}.image-list .image-item.uploader{border:1px dashed rgba(0,0,0,.38)!important;cursor:pointer}.image-list .image-item:hover .mat-icon{display:unset!important}.image-list .image-item.selected{border:3px solid var(--tis-item-selected, #3838a2)!important}.image-list .image-item .mat-icon{display:none}.image-list .image-item .mat-icon.active{display:unset!important}.image-list .image-item .cancel{color:var(--tis-cancel, #bb333b);background-color:#fff;border-radius:20px;position:absolute;top:-10px;right:-10px;cursor:pointer;box-shadow:0 0 5px #9e9e9e}.image-list .image-item .download{color:var(--tis-download, #3838a2);background-color:#fff;border-radius:20px;position:absolute;top:-10px;left:-10px;cursor:pointer;box-shadow:0 0 5px #9e9e9e}.image-list .image-item .shedded{background-color:#9e9e9ecc;border-radius:5px}.error-border{border:1px solid var(--mat-form-field-error-text-color)!important;border-radius:5px!important}.download{color:var(--tis-download, #3838a2);position:absolute;top:-10px;left:-10px;cursor:pointer}.tis-curser-pointer{cursor:pointer}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-title{padding:8px 16px;display:flex;gap:10px;justify-content:start;width:100%;align-items:center}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-title:before{content:unset}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-content{padding-top:15px;font-size:14px}::ng-deep .tis-confirmation-dialog mat-dialog-container .mat-mdc-dialog-actions{border-top:1px solid rgba(0,0,0,.12);justify-content:end}.not-found-section svg{margin:auto;height:calc(var(--tis-image-picker-height) - 30px);max-height:150px}@media (max-width: 575.98px){.image-picker-label{padding:15px}}@media (min-width: 576px) and (max-width: 767.98px){.image-picker-label{padding:15px}}\n"] }]
1003
+ }], ctorParameters: () => [{ type: i1$2.MatDialog }, { type: TisHelperService }, { type: i3$3.BreakpointObserver }], propDecorators: { urlConfig: [{
930
1004
  type: Input,
931
1005
  args: [{ required: true }]
932
1006
  }], entityType: [{
@@ -988,14 +1062,19 @@ class TisImageAndFileUploadAndViewModule {
988
1062
  static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: TisImageAndFileUploadAndViewModule, declarations: [TisImageAndFileUploadAndViewComponent,
989
1063
  TisPreviewImageComponent,
990
1064
  TisFileViewerComponent,
1065
+ TisExcelFileViewerComponent,
1066
+ TisPdfViewerComponent,
1067
+ TisVideoComponent,
991
1068
  TisErrorDialogComponent,
992
- TisConfirmationDialogComponent], imports: [CommonModule, MatTooltipModule,
1069
+ TisConfirmationDialogComponent], imports: [CommonModule,
1070
+ NgxExtendedPdfViewerModule, MatTooltipModule,
993
1071
  MatIconModule,
994
1072
  MatSnackBarModule,
995
1073
  MatProgressSpinnerModule,
996
1074
  MatButtonModule,
997
1075
  MatDialogModule], exports: [TisImageAndFileUploadAndViewComponent] });
998
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisImageAndFileUploadAndViewModule, imports: [CommonModule, uiImports] });
1076
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisImageAndFileUploadAndViewModule, imports: [CommonModule,
1077
+ NgxExtendedPdfViewerModule, uiImports] });
999
1078
  }
1000
1079
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TisImageAndFileUploadAndViewModule, decorators: [{
1001
1080
  type: NgModule,
@@ -1004,11 +1083,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
1004
1083
  TisImageAndFileUploadAndViewComponent,
1005
1084
  TisPreviewImageComponent,
1006
1085
  TisFileViewerComponent,
1086
+ TisExcelFileViewerComponent,
1087
+ TisPdfViewerComponent,
1088
+ TisVideoComponent,
1007
1089
  TisErrorDialogComponent,
1008
1090
  TisConfirmationDialogComponent
1009
1091
  ],
1010
1092
  imports: [
1011
1093
  CommonModule,
1094
+ NgxExtendedPdfViewerModule,
1012
1095
  ...uiImports
1013
1096
  ],
1014
1097
  exports: [