@libs-ui/components-preview-file 0.2.304 → 0.2.306-3

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 +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,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,CAAC,QAAQ,CAAC,EAAE;YAClE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAsD,mDAAA,EAAA,GAAG,CAAE,CAAA,CAAC;YAC7E;;QAEF,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAgD,6CAAA,EAAA,GAAG,CAAgB,cAAA,CAAA,CAAC;;AAG7E,IAAA,MAAM,aAAa,GAAA;AAC3B,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC;;IAGf,MAAM,YAAY,CAAC,IAAsB,EAAA;AACjD,QAAA,IAAI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cAAA,EAAA,YAAA,EAAA,cAAA,EAAA,eAAA,EAAA,OAAA,EAAA,mBAAA,EAAA,iBAAA,EAAA,mBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,aAAA,EAAA,cAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,eAAA,EAAA,qBAAA,EAAA,kBAAA,EAAA,UAAA,EAAA,oBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAC9B,4BAA4B,EAAA,IAAA,EAAA,8BAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAC5B,iCAAiC,EAAA,QAAA,EAAA,6BAAA,EAAA,MAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAIxB,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAdhD,SAAS;+BAEE,iCAAiC,EAAA,UAAA,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;;;;"}
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,UAA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BAAA,CAAA,MAAA,EAAA,CAAA;;4FAIxB,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAdhD,SAAS;+BAEE,iCAAiC,EAAA,UAAA,EAG/B,IAAI,EAAA,OAAA,EACP;wBACP,SAAS;wBACT,8BAA8B;wBAC9B,4BAA4B;wBAC5B;qBACD,EAAA,eAAA,EACgB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,q2CAAA,EAAA;;;AEnBjD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@libs-ui/components-preview-file",
3
- "version": "0.2.304",
3
+ "version": "0.2.306-3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
7
- "@libs-ui/components-modal": "0.2.304",
8
- "@libs-ui/components-skeleton": "0.2.304",
9
- "@libs-ui/interfaces-types": "0.2.304",
10
- "@libs-ui/pipes-security-trust": "0.2.304"
7
+ "@libs-ui/components-modal": "0.2.306-3",
8
+ "@libs-ui/components-skeleton": "0.2.306-3",
9
+ "@libs-ui/interfaces-types": "0.2.306-3",
10
+ "@libs-ui/pipes-security-trust": "0.2.306-3"
11
11
  },
12
12
  "sideEffects": false,
13
13
  "module": "fesm2022/libs-ui-components-preview-file.mjs",