{"id":16269583,"url":"https://github.com/av/sample-widget-bundle","last_synced_at":"2025-04-08T15:18:16.127Z","repository":{"id":98551331,"uuid":"394916113","full_name":"av/sample-widget-bundle","owner":"av","description":"This repo holds a sample widget bundle","archived":false,"fork":false,"pushed_at":"2021-08-11T09:16:36.000Z","size":90,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T11:33:52.887Z","etag":null,"topics":[],"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/av.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":"2021-08-11T08:19:06.000Z","updated_at":"2023-03-07T07:52:51.000Z","dependencies_parsed_at":"2023-03-13T23:48:20.092Z","dependency_job_id":null,"html_url":"https://github.com/av/sample-widget-bundle","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/av%2Fsample-widget-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/av%2Fsample-widget-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/av%2Fsample-widget-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/av%2Fsample-widget-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/av","download_url":"https://codeload.github.com/av/sample-widget-bundle/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247867365,"owners_count":21009240,"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":[],"created_at":"2024-10-10T18:08:39.209Z","updated_at":"2025-04-08T15:18:16.103Z","avatar_url":"https://github.com/av.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sample-widget-bundle\n\nThis repo holds a sample widget bundle. It's implemented with Parcel (v1). \n\n#### Widget Registration\n\nBundle root imports a `CustomWidget.js` component, which uses host application Browser API to register the widget instance:\n\n```javascript\nPremiumPortal.Dashboard.registerWidget(CustomWidget, { ... });\n```\n\n#### Dependency Sharing\n\nCustom Widgets have to use the same exact React/ReactDOM version as the host application. This is achieved by using `parcel-plugin-externals`:\n```javascript\n// package.json\n{\n  // ...\n  \"externals\": {\n    \"react\": \"window.PremiumPortal.React\",\n    \"react-dom\": \"window.PremiumPortal.ReactDOM\"\n  }\n  // ...\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fav%2Fsample-widget-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fav%2Fsample-widget-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fav%2Fsample-widget-bundle/lists"}