@libs-ui/components-preview-file 0.1.1-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/esm2022/index.mjs +2 -0
- package/esm2022/libs-ui-components-preview-file.mjs +5 -0
- package/esm2022/preview-file.component.mjs +55 -0
- package/fesm2022/libs-ui-components-preview-file.mjs +62 -0
- package/fesm2022/libs-ui-components-preview-file.mjs.map +1 -0
- package/index.d.ts +1 -0
- package/package.json +29 -0
- package/preview-file.component.d.ts +17 -0
package/README.md
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './preview-file.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvcHJldmlldy1maWxlL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDBCQUEwQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9wcmV2aWV3LWZpbGUuY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibGlicy11aS1jb21wb25lbnRzLXByZXZpZXctZmlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMtdWkvY29tcG9uZW50cy9wcmV2aWV3LWZpbGUvc3JjL2xpYnMtdWktY29tcG9uZW50cy1wcmV2aWV3LWZpbGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { AsyncPipe } from '@angular/common';
|
|
2
|
+
import { ChangeDetectionStrategy, Component, input, output, signal } from '@angular/core';
|
|
3
|
+
import { LibsUiComponentsModalComponent } from '@libs-ui/components-modal';
|
|
4
|
+
import { LibsUiComponentsSkeletonComponent } from '@libs-ui/components-skeleton';
|
|
5
|
+
import { LibsUiPipesSecurityTrustPipe } from '@libs-ui/pipes-security-trust';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export class LibsUiComponentsPreviewFileComponent {
|
|
8
|
+
loading = signal(true);
|
|
9
|
+
urlFile = signal('');
|
|
10
|
+
zIndex = input();
|
|
11
|
+
data = input();
|
|
12
|
+
outClose = output();
|
|
13
|
+
ngOnInit() {
|
|
14
|
+
if (!this.data() || (!this.data()?.url && !this.data()?.origin_url)) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const mimeType = this.data()?.mimetype || this.data()?.file?.type;
|
|
18
|
+
const url = this.data()?.url || this.data()?.origin_url;
|
|
19
|
+
if (mimeType && this.mineTypeMicroSoftSupport().includes(mimeType)) {
|
|
20
|
+
this.urlFile.set(`https://view.officeapps.live.com/op/embed.aspx?src=${url}`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
this.urlFile.set(`https://docs.google.com/a/umd.edu/viewer?url=${url}&embedded=true`);
|
|
24
|
+
}
|
|
25
|
+
async handlerOnLoad() {
|
|
26
|
+
this.loading.set(false);
|
|
27
|
+
}
|
|
28
|
+
async handlerClose(type) {
|
|
29
|
+
if (type === 'close') {
|
|
30
|
+
this.outClose.emit();
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
mineTypeMicroSoftSupport() {
|
|
34
|
+
return [
|
|
35
|
+
'application/msword',
|
|
36
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
37
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
|
38
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
39
|
+
'application/vnd.ms-excel.sheet.macroEnabled.12',
|
|
40
|
+
'application/vnd.ms-excel',
|
|
41
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
|
42
|
+
'application/vnd.ms-powerpoint',
|
|
43
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
44
|
+
'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
|
45
|
+
'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsPreviewFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsPreviewFileComponent, isStandalone: true, selector: "libs_ui-components-preview_file", inputs: { zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outClose: "outClose" }, ngImport: i0, template: "<libs_ui-components-modal\n [minWidth]=\"'1200px'\"\n [title]=\"data()?.name\"\n [headerConfig]=\"{ ignoreHeaderTheme: true }\"\n [bodyConfig]=\"{ classInclude: '!p-0', scrollOverlayOptions: { scrollX: 'hidden', scrollY: 'hidden' } }\"\n [footerConfig]=\"{ hidden: true }\"\n [zIndex]=\"zIndex()\"\n [buttonsFooter]=\"[]\"\n [mode]=\"'center'\"\n (outEvent)=\"handlerClose($event)\">\n <div class=\"libs-ui-modal-header-custom w-full flex items-center justify-between\">\n <div class=\"w-full relative mx-[24px] h-[16px]\">\n <div class=\"flex w-full libs-ui-font-h4s absolute\">\n <!-- <libs_ui-components-popover [type]=\"'text'\"\n [config]=\"{zIndex: zIndex()}\">\n {{ 'i18n_edit_file_name' | translate:{file_name: nameFile()} }}\n </libs_ui-components-popover> -->\n </div>\n </div>\n </div>\n <div class=\"libs-ui-modal-body-custom h-full w-full flex\">\n <iframe\n id=\"google\"\n [class.hidden]=\"loading()\"\n [src]=\"urlFile() | LibsUiPipesSecurityTrustPipe: 'resourceUrl' | async\"\n width=\"100%\"\n height=\"100%\"\n frameborder=\"0\"\n allowfullscreen=\"allowfullscreen\"\n (load)=\"handlerOnLoad()\"></iframe>\n\n @if (loading()) {\n <libs_ui-components-skeleton [class]=\"'w-full h-full'\"></libs_ui-components-skeleton>\n }\n </div>\n</libs_ui-components-modal>\n", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LibsUiComponentsModalComponent, selector: "libs_ui-components-modal", inputs: ["show", "mode", "isBackdropTransparent", "isBackgroundTransparentModal", "isSizeBackdropByWidthHeightInput", "hasShadowBoxWhenHiddenBackDropTransparent", "classIncludeModalWrapper", "zIndex", "width", "height", "maxWidth", "maxHeight", "minWidth", "isFullScreen", "disable", "ignoreCommunicateMicroEvent", "headerConfig", "bodyConfig", "footerConfig", "buttonsFooter", "title", "titleUseXssFilter", "titleUseTooltip", "titleUseInnerText"], outputs: ["showChange", "widthChange", "heightChange", "maxWidthChange", "maxHeightChange", "minWidthChange", "disableChange", "buttonsFooterChange", "outScrollContent", "outEvent", "outFunctionControl"] }, { kind: "pipe", type: LibsUiPipesSecurityTrustPipe, name: "LibsUiPipesSecurityTrustPipe" }, { kind: "component", type: LibsUiComponentsSkeletonComponent, selector: "libs_ui-components-skeleton", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
50
|
+
}
|
|
51
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsPreviewFileComponent, decorators: [{
|
|
52
|
+
type: Component,
|
|
53
|
+
args: [{ selector: 'libs_ui-components-preview_file', standalone: true, imports: [AsyncPipe, LibsUiComponentsModalComponent, LibsUiPipesSecurityTrustPipe, LibsUiComponentsSkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<libs_ui-components-modal\n [minWidth]=\"'1200px'\"\n [title]=\"data()?.name\"\n [headerConfig]=\"{ ignoreHeaderTheme: true }\"\n [bodyConfig]=\"{ classInclude: '!p-0', scrollOverlayOptions: { scrollX: 'hidden', scrollY: 'hidden' } }\"\n [footerConfig]=\"{ hidden: true }\"\n [zIndex]=\"zIndex()\"\n [buttonsFooter]=\"[]\"\n [mode]=\"'center'\"\n (outEvent)=\"handlerClose($event)\">\n <div class=\"libs-ui-modal-header-custom w-full flex items-center justify-between\">\n <div class=\"w-full relative mx-[24px] h-[16px]\">\n <div class=\"flex w-full libs-ui-font-h4s absolute\">\n <!-- <libs_ui-components-popover [type]=\"'text'\"\n [config]=\"{zIndex: zIndex()}\">\n {{ 'i18n_edit_file_name' | translate:{file_name: nameFile()} }}\n </libs_ui-components-popover> -->\n </div>\n </div>\n </div>\n <div class=\"libs-ui-modal-body-custom h-full w-full flex\">\n <iframe\n id=\"google\"\n [class.hidden]=\"loading()\"\n [src]=\"urlFile() | LibsUiPipesSecurityTrustPipe: 'resourceUrl' | async\"\n width=\"100%\"\n height=\"100%\"\n frameborder=\"0\"\n allowfullscreen=\"allowfullscreen\"\n (load)=\"handlerOnLoad()\"></iframe>\n\n @if (loading()) {\n <libs_ui-components-skeleton [class]=\"'w-full h-full'\"></libs_ui-components-skeleton>\n }\n </div>\n</libs_ui-components-modal>\n" }]
|
|
54
|
+
}] });
|
|
55
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjo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cGVzU2VjdXJpdHlUcnVzdFBpcGU6ICdyZXNvdXJjZVVybCcgfCBhc3luY1wiXG4gICAgICB3aWR0aD1cIjEwMCVcIlxuICAgICAgaGVpZ2h0PVwiMTAwJVwiXG4gICAgICBmcmFtZWJvcmRlcj1cIjBcIlxuICAgICAgYWxsb3dmdWxsc2NyZWVuPVwiYWxsb3dmdWxsc2NyZWVuXCJcbiAgICAgIChsb2FkKT1cImhhbmRsZXJPbkxvYWQoKVwiPjwvaWZyYW1lPlxuXG4gICAgQGlmIChsb2FkaW5nKCkpIHtcbiAgICAgIDxsaWJzX3VpLWNvbXBvbmVudHMtc2tlbGV0b24gW2NsYXNzXT1cIid3LWZ1bGwgaC1mdWxsJ1wiPjwvbGlic191aS1jb21wb25lbnRzLXNrZWxldG9uPlxuICAgIH1cbiAgPC9kaXY+XG48L2xpYnNfdWktY29tcG9uZW50cy1tb2RhbD5cbiJdfQ==
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { AsyncPipe } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { signal, input, output, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { LibsUiComponentsModalComponent } from '@libs-ui/components-modal';
|
|
5
|
+
import { LibsUiComponentsSkeletonComponent } from '@libs-ui/components-skeleton';
|
|
6
|
+
import { LibsUiPipesSecurityTrustPipe } from '@libs-ui/pipes-security-trust';
|
|
7
|
+
|
|
8
|
+
class LibsUiComponentsPreviewFileComponent {
|
|
9
|
+
loading = signal(true);
|
|
10
|
+
urlFile = signal('');
|
|
11
|
+
zIndex = input();
|
|
12
|
+
data = input();
|
|
13
|
+
outClose = output();
|
|
14
|
+
ngOnInit() {
|
|
15
|
+
if (!this.data() || (!this.data()?.url && !this.data()?.origin_url)) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const mimeType = this.data()?.mimetype || this.data()?.file?.type;
|
|
19
|
+
const url = this.data()?.url || this.data()?.origin_url;
|
|
20
|
+
if (mimeType && this.mineTypeMicroSoftSupport().includes(mimeType)) {
|
|
21
|
+
this.urlFile.set(`https://view.officeapps.live.com/op/embed.aspx?src=${url}`);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
this.urlFile.set(`https://docs.google.com/a/umd.edu/viewer?url=${url}&embedded=true`);
|
|
25
|
+
}
|
|
26
|
+
async handlerOnLoad() {
|
|
27
|
+
this.loading.set(false);
|
|
28
|
+
}
|
|
29
|
+
async handlerClose(type) {
|
|
30
|
+
if (type === 'close') {
|
|
31
|
+
this.outClose.emit();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
mineTypeMicroSoftSupport() {
|
|
35
|
+
return [
|
|
36
|
+
'application/msword',
|
|
37
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
|
38
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
|
39
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
|
40
|
+
'application/vnd.ms-excel.sheet.macroEnabled.12',
|
|
41
|
+
'application/vnd.ms-excel',
|
|
42
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
|
|
43
|
+
'application/vnd.ms-powerpoint',
|
|
44
|
+
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
|
45
|
+
'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
|
|
46
|
+
'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
|
|
47
|
+
];
|
|
48
|
+
}
|
|
49
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsPreviewFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: LibsUiComponentsPreviewFileComponent, isStandalone: true, selector: "libs_ui-components-preview_file", inputs: { zIndex: { classPropertyName: "zIndex", publicName: "zIndex", isSignal: true, isRequired: false, transformFunction: null }, data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { outClose: "outClose" }, ngImport: i0, template: "<libs_ui-components-modal\n [minWidth]=\"'1200px'\"\n [title]=\"data()?.name\"\n [headerConfig]=\"{ ignoreHeaderTheme: true }\"\n [bodyConfig]=\"{ classInclude: '!p-0', scrollOverlayOptions: { scrollX: 'hidden', scrollY: 'hidden' } }\"\n [footerConfig]=\"{ hidden: true }\"\n [zIndex]=\"zIndex()\"\n [buttonsFooter]=\"[]\"\n [mode]=\"'center'\"\n (outEvent)=\"handlerClose($event)\">\n <div class=\"libs-ui-modal-header-custom w-full flex items-center justify-between\">\n <div class=\"w-full relative mx-[24px] h-[16px]\">\n <div class=\"flex w-full libs-ui-font-h4s absolute\">\n <!-- <libs_ui-components-popover [type]=\"'text'\"\n [config]=\"{zIndex: zIndex()}\">\n {{ 'i18n_edit_file_name' | translate:{file_name: nameFile()} }}\n </libs_ui-components-popover> -->\n </div>\n </div>\n </div>\n <div class=\"libs-ui-modal-body-custom h-full w-full flex\">\n <iframe\n id=\"google\"\n [class.hidden]=\"loading()\"\n [src]=\"urlFile() | LibsUiPipesSecurityTrustPipe: 'resourceUrl' | async\"\n width=\"100%\"\n height=\"100%\"\n frameborder=\"0\"\n allowfullscreen=\"allowfullscreen\"\n (load)=\"handlerOnLoad()\"></iframe>\n\n @if (loading()) {\n <libs_ui-components-skeleton [class]=\"'w-full h-full'\"></libs_ui-components-skeleton>\n }\n </div>\n</libs_ui-components-modal>\n", styles: [""], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: LibsUiComponentsModalComponent, selector: "libs_ui-components-modal", inputs: ["show", "mode", "isBackdropTransparent", "isBackgroundTransparentModal", "isSizeBackdropByWidthHeightInput", "hasShadowBoxWhenHiddenBackDropTransparent", "classIncludeModalWrapper", "zIndex", "width", "height", "maxWidth", "maxHeight", "minWidth", "isFullScreen", "disable", "ignoreCommunicateMicroEvent", "headerConfig", "bodyConfig", "footerConfig", "buttonsFooter", "title", "titleUseXssFilter", "titleUseTooltip", "titleUseInnerText"], outputs: ["showChange", "widthChange", "heightChange", "maxWidthChange", "maxHeightChange", "minWidthChange", "disableChange", "buttonsFooterChange", "outScrollContent", "outEvent", "outFunctionControl"] }, { kind: "pipe", type: LibsUiPipesSecurityTrustPipe, name: "LibsUiPipesSecurityTrustPipe" }, { kind: "component", type: LibsUiComponentsSkeletonComponent, selector: "libs_ui-components-skeleton", inputs: ["config"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
51
|
+
}
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: LibsUiComponentsPreviewFileComponent, decorators: [{
|
|
53
|
+
type: Component,
|
|
54
|
+
args: [{ selector: 'libs_ui-components-preview_file', standalone: true, imports: [AsyncPipe, LibsUiComponentsModalComponent, LibsUiPipesSecurityTrustPipe, LibsUiComponentsSkeletonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<libs_ui-components-modal\n [minWidth]=\"'1200px'\"\n [title]=\"data()?.name\"\n [headerConfig]=\"{ ignoreHeaderTheme: true }\"\n [bodyConfig]=\"{ classInclude: '!p-0', scrollOverlayOptions: { scrollX: 'hidden', scrollY: 'hidden' } }\"\n [footerConfig]=\"{ hidden: true }\"\n [zIndex]=\"zIndex()\"\n [buttonsFooter]=\"[]\"\n [mode]=\"'center'\"\n (outEvent)=\"handlerClose($event)\">\n <div class=\"libs-ui-modal-header-custom w-full flex items-center justify-between\">\n <div class=\"w-full relative mx-[24px] h-[16px]\">\n <div class=\"flex w-full libs-ui-font-h4s absolute\">\n <!-- <libs_ui-components-popover [type]=\"'text'\"\n [config]=\"{zIndex: zIndex()}\">\n {{ 'i18n_edit_file_name' | translate:{file_name: nameFile()} }}\n </libs_ui-components-popover> -->\n </div>\n </div>\n </div>\n <div class=\"libs-ui-modal-body-custom h-full w-full flex\">\n <iframe\n id=\"google\"\n [class.hidden]=\"loading()\"\n [src]=\"urlFile() | LibsUiPipesSecurityTrustPipe: 'resourceUrl' | async\"\n width=\"100%\"\n height=\"100%\"\n frameborder=\"0\"\n allowfullscreen=\"allowfullscreen\"\n (load)=\"handlerOnLoad()\"></iframe>\n\n @if (loading()) {\n <libs_ui-components-skeleton [class]=\"'w-full h-full'\"></libs_ui-components-skeleton>\n }\n </div>\n</libs_ui-components-modal>\n" }]
|
|
55
|
+
}] });
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Generated bundle index. Do not edit.
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
export { LibsUiComponentsPreviewFileComponent };
|
|
62
|
+
//# sourceMappingURL=libs-ui-components-preview-file.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"libs-ui-components-preview-file.mjs","sources":["../../../../../libs-ui/components/preview-file/src/preview-file.component.ts","../../../../../libs-ui/components/preview-file/src/preview-file.component.html","../../../../../libs-ui/components/preview-file/src/libs-ui-components-preview-file.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input, OnInit, output, signal } from '@angular/core';\nimport { LibsUiComponentsModalComponent, TYPE_MODAL_EVENT } from '@libs-ui/components-modal';\nimport { LibsUiComponentsSkeletonComponent } from '@libs-ui/components-skeleton';\nimport { IFile } from '@libs-ui/interfaces-types';\nimport { LibsUiPipesSecurityTrustPipe } from '@libs-ui/pipes-security-trust';\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'libs_ui-components-preview_file',\n templateUrl: './preview-file.component.html',\n styleUrl: './preview-file.component.scss',\n standalone: true,\n imports: [AsyncPipe, LibsUiComponentsModalComponent, LibsUiPipesSecurityTrustPipe, LibsUiComponentsSkeletonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LibsUiComponentsPreviewFileComponent implements OnInit {\n protected loading = signal(true);\n protected urlFile = signal<string>('');\n\n readonly zIndex = input<number>();\n readonly data = input<IFile>();\n\n readonly outClose = output<void>();\n\n ngOnInit() {\n if (!this.data() || (!this.data()?.url && !this.data()?.origin_url)) {\n return;\n }\n const mimeType = this.data()?.mimetype || this.data()?.file?.type;\n const url = this.data()?.url || this.data()?.origin_url;\n if (mimeType && this.mineTypeMicroSoftSupport().includes(mimeType)) {\n this.urlFile.set(`https://view.officeapps.live.com/op/embed.aspx?src=${url}`);\n return;\n }\n this.urlFile.set(`https://docs.google.com/a/umd.edu/viewer?url=${url}&embedded=true`);\n }\n\n protected async handlerOnLoad() {\n this.loading.set(false);\n }\n\n protected async handlerClose(type: TYPE_MODAL_EVENT) {\n if (type === 'close') {\n this.outClose.emit();\n }\n }\n\n private mineTypeMicroSoftSupport() {\n return [\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n 'application/vnd.ms-excel.sheet.macroEnabled.12',\n 'application/vnd.ms-excel',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',\n 'application/vnd.ms-powerpoint',\n 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',\n 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n ];\n }\n}\n","<libs_ui-components-modal\n [minWidth]=\"'1200px'\"\n [title]=\"data()?.name\"\n [headerConfig]=\"{ ignoreHeaderTheme: true }\"\n [bodyConfig]=\"{ classInclude: '!p-0', scrollOverlayOptions: { scrollX: 'hidden', scrollY: 'hidden' } }\"\n [footerConfig]=\"{ hidden: true }\"\n [zIndex]=\"zIndex()\"\n [buttonsFooter]=\"[]\"\n [mode]=\"'center'\"\n (outEvent)=\"handlerClose($event)\">\n <div class=\"libs-ui-modal-header-custom w-full flex items-center justify-between\">\n <div class=\"w-full relative mx-[24px] h-[16px]\">\n <div class=\"flex w-full libs-ui-font-h4s absolute\">\n <!-- <libs_ui-components-popover [type]=\"'text'\"\n [config]=\"{zIndex: zIndex()}\">\n {{ 'i18n_edit_file_name' | translate:{file_name: nameFile()} }}\n </libs_ui-components-popover> -->\n </div>\n </div>\n </div>\n <div class=\"libs-ui-modal-body-custom h-full w-full flex\">\n <iframe\n id=\"google\"\n [class.hidden]=\"loading()\"\n [src]=\"urlFile() | LibsUiPipesSecurityTrustPipe: 'resourceUrl' | async\"\n width=\"100%\"\n height=\"100%\"\n frameborder=\"0\"\n allowfullscreen=\"allowfullscreen\"\n (load)=\"handlerOnLoad()\"></iframe>\n\n @if (loading()) {\n <libs_ui-components-skeleton [class]=\"'w-full h-full'\"></libs_ui-components-skeleton>\n }\n </div>\n</libs_ui-components-modal>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAea,oCAAoC,CAAA;AACrC,IAAA,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC;AACtB,IAAA,OAAO,GAAG,MAAM,CAAS,EAAE,CAAC;IAE7B,MAAM,GAAG,KAAK,EAAU;IACxB,IAAI,GAAG,KAAK,EAAS;IAErB,QAAQ,GAAG,MAAM,EAAQ;IAElC,QAAQ,GAAA;QACN,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,UAAU,CAAC,EAAE;YACnE;QACF;AACA,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI;AACjE,QAAA,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,GAAG,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,UAAU;AACvD,QAAA,IAAI,QAAQ,IAAI,IAAI,CAAC,wBAAwB,EAAE,CAAC,QAAQ,CAA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jD;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './preview-file.component';
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@libs-ui/components-preview-file",
|
|
3
|
+
"version": "0.1.1-1",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": ">=18.0.0",
|
|
6
|
+
"@angular/core": ">=18.0.0",
|
|
7
|
+
"@libs-ui/components-modal": "0.1.1-1",
|
|
8
|
+
"@libs-ui/components-skeleton": "0.1.1-1",
|
|
9
|
+
"@libs-ui/interfaces-types": "0.1.1-1",
|
|
10
|
+
"@libs-ui/pipes-security-trust": "0.1.1-1"
|
|
11
|
+
},
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"module": "fesm2022/libs-ui-components-preview-file.mjs",
|
|
14
|
+
"typings": "index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./index.d.ts",
|
|
21
|
+
"esm2022": "./esm2022/libs-ui-components-preview-file.mjs",
|
|
22
|
+
"esm": "./esm2022/libs-ui-components-preview-file.mjs",
|
|
23
|
+
"default": "./fesm2022/libs-ui-components-preview-file.mjs"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"tslib": "^2.3.0"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import { TYPE_MODAL_EVENT } from '@libs-ui/components-modal';
|
|
3
|
+
import { IFile } from '@libs-ui/interfaces-types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LibsUiComponentsPreviewFileComponent implements OnInit {
|
|
6
|
+
protected loading: import("@angular/core").WritableSignal<boolean>;
|
|
7
|
+
protected urlFile: import("@angular/core").WritableSignal<string>;
|
|
8
|
+
readonly zIndex: import("@angular/core").InputSignal<number | undefined>;
|
|
9
|
+
readonly data: import("@angular/core").InputSignal<IFile | undefined>;
|
|
10
|
+
readonly outClose: import("@angular/core").OutputEmitterRef<void>;
|
|
11
|
+
ngOnInit(): void;
|
|
12
|
+
protected handlerOnLoad(): Promise<void>;
|
|
13
|
+
protected handlerClose(type: TYPE_MODAL_EVENT): Promise<void>;
|
|
14
|
+
private mineTypeMicroSoftSupport;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LibsUiComponentsPreviewFileComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LibsUiComponentsPreviewFileComponent, "libs_ui-components-preview_file", never, { "zIndex": { "alias": "zIndex"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; }, { "outClose": "outClose"; }, never, never, true, never>;
|
|
17
|
+
}
|