@libs-ui/components-preview-file 0.2.161

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 ADDED
@@ -0,0 +1,3 @@
1
+ # preview-file
2
+
3
+ This library was generated with [Nx](https://nx.dev).
@@ -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,60 @@
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.13", ngImport: i0, type: LibsUiComponentsPreviewFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
49
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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 [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\n <iframe 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.13", ngImport: i0, type: LibsUiComponentsPreviewFileComponent, decorators: [{
52
+ type: Component,
53
+ args: [{ selector: 'libs_ui-components-preview_file', standalone: true, imports: [
54
+ AsyncPipe,
55
+ LibsUiComponentsModalComponent,
56
+ LibsUiPipesSecurityTrustPipe,
57
+ LibsUiComponentsSkeletonComponent
58
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<libs_ui-components-modal [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\n <iframe 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" }]
59
+ }] });
60
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJldmlldy1maWxlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL2xpYnMtdWkvY29tcG9uZW50cy9wcmV2aWV3LWZpbGUvc3JjL3ByZXZpZXctZmlsZS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9saWJzLXVpL2NvbXBvbmVudHMvcHJldmlldy1maWxlL3NyYy9wcmV2aWV3LWZpbGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQzVDLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbEcsT0FBTyxFQUFFLDhCQUE4QixFQUFvQixNQUFN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==
@@ -0,0 +1,67 @@
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.13", ngImport: i0, type: LibsUiComponentsPreviewFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
50
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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 [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\n <iframe 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.13", ngImport: i0, type: LibsUiComponentsPreviewFileComponent, decorators: [{
53
+ type: Component,
54
+ args: [{ selector: 'libs_ui-components-preview_file', standalone: true, imports: [
55
+ AsyncPipe,
56
+ LibsUiComponentsModalComponent,
57
+ LibsUiPipesSecurityTrustPipe,
58
+ LibsUiComponentsSkeletonComponent
59
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<libs_ui-components-modal [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\n <iframe 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" }]
60
+ }] });
61
+
62
+ /**
63
+ * Generated bundle index. Do not edit.
64
+ */
65
+
66
+ export { LibsUiComponentsPreviewFileComponent };
67
+ //# 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":["\nimport { 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: [\n AsyncPipe,\n LibsUiComponentsModalComponent,\n LibsUiPipesSecurityTrustPipe,\n LibsUiComponentsSkeletonComponent\n ],\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}\n","<libs_ui-components-modal [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\n <iframe 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":";;;;;;;MAqBa,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;;AAEF,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,EAAE,QAA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AA,EAG/B,IAAI,EACP,OAAA,EAAA;wBACP,SAAS;wBACT,8BAA8B;wBAC9B,4BAA4B;wBAC5B;qBACD,EACgB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,q2CAAA,EAAA;;;AEnBjD;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './preview-file.component';
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@libs-ui/components-preview-file",
3
+ "version": "0.2.161",
4
+ "peerDependencies": {
5
+ "@angular/common": "^18.2.0",
6
+ "@angular/core": "^18.2.0"
7
+ },
8
+ "sideEffects": false,
9
+ "module": "fesm2022/libs-ui-components-preview-file.mjs",
10
+ "typings": "index.d.ts",
11
+ "exports": {
12
+ "./package.json": {
13
+ "default": "./package.json"
14
+ },
15
+ ".": {
16
+ "types": "./index.d.ts",
17
+ "esm2022": "./esm2022/libs-ui-components-preview-file.mjs",
18
+ "esm": "./esm2022/libs-ui-components-preview-file.mjs",
19
+ "default": "./fesm2022/libs-ui-components-preview-file.mjs"
20
+ }
21
+ },
22
+ "dependencies": {
23
+ "tslib": "^2.3.0"
24
+ }
25
+ }
@@ -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
+ }