{"id":13805083,"url":"https://github.com/avipunes/file-viewer","last_synced_at":"2025-04-14T16:22:04.005Z","repository":{"id":38011476,"uuid":"228257979","full_name":"avipunes/file-viewer","owner":"avipunes","description":"Web component file viewer","archived":false,"fork":false,"pushed_at":"2024-04-12T10:22:41.000Z","size":212,"stargazers_count":40,"open_issues_count":9,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T05:06:03.321Z","etag":null,"topics":["html","javascript","svelte","webcomponents"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avipunes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-15T21:49:20.000Z","updated_at":"2025-03-17T10:44:29.000Z","dependencies_parsed_at":"2024-05-03T10:00:26.874Z","dependency_job_id":"d1a91d4f-d7b1-4e12-b636-7871a1f67e39","html_url":"https://github.com/avipunes/file-viewer","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":"0.16666666666666663","last_synced_commit":"435cea3051c3c25cb02255f13be6448def547273"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avipunes%2Ffile-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avipunes%2Ffile-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avipunes%2Ffile-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avipunes%2Ffile-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avipunes","download_url":"https://codeload.github.com/avipunes/file-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248914200,"owners_count":21182377,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","javascript","svelte","webcomponents"],"created_at":"2024-08-04T01:00:57.329Z","updated_at":"2025-04-14T16:22:03.972Z","avatar_url":"https://github.com/avipunes.png","language":"JavaScript","funding_links":[],"categories":["Real World"],"sub_categories":["Components"],"readme":"# File Viewer\n\nThis is a custom element ([web component](https://developer.mozilla.org/en-US/docs/Web/Web_Components) - can be used every where regardless the framework) built with [Svelte](https://svelte.dev/) to view files. [Demo](https://avipunes.github.io/file-viewer/)\n\n## Usage\n\n`url` - File link.\n\n`filename` - the file name - should include the file extension.\n\n```html\n\u003cfile-viewer\n    filename=\"some-excel-file.xlsx\"\n    url=\"https://link.com\"\n\u003e\u003c/file-viewer\u003e\n```\n\n```html\n\u003cfile-viewer\n    filename=\"some-not-supported-file.not-supported\"\n    url=\"https://link.com\"\n\u003e\n    \u003cdiv slot=\"not-supported\"\u003e\n        😕\n    \u003c/div\u003e\n\u003c/file-viewer\u003e\n```\n\n### Available slot:\n\n-   `not-supported` - Given file extension is not supported.\n\n### Available events:\n\n-   `onload` - iframe onload event.\n\n### Supported File Extensions\n\n`.ppt`, `.pptx`, `.doc`, `.docx`, `.xls`, `.xlsx`, `.pdf`,\n`.png`, `.jpg`, `.jpeg`, `.gif`,\n\n### Examples:\n\n-   [React](https://codesandbox.io/s/tender-platform-rlxs1)\n-   [Vue](https://codesandbox.io/s/tender-platform-rlxs1)\n-   [Angular](https://codesandbox.io/s/dreamy-goldstine-e9pso)\n-   [Vanilla](https://codesandbox.io/s/vigorous-moon-ghy8w)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favipunes%2Ffile-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favipunes%2Ffile-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favipunes%2Ffile-viewer/lists"}