Erik Sundell
b648ce3acf
Plugin extensions: Introduce new registry for added components ( #91877 )
...
* add added component registry
* fix broken test
* add tests for usePluginComponents hook
* readd expose components
* add type assertion exceptions to betterer results
* use new addedComponent registry in legacy endpoints
* remove unused code
* cleanup
* revert test code
* remove commented code
* wrap in try catch
* pr feedback
2024-08-27 11:14:04 +02:00
Erik Sundell
134467fc4a
Plugin Extensions: Introduce new registry for exposed components ( #91748 )
...
* refactor app plugin internals
* add base registry and exposed components registry
* refactor usePluginComponent hook
* change type name
* fix hook
* remove comments
* fix broken tests
* add more tests
* remove link and component related changes
* use right id format
* add title prop
* remove comments
* rename registry
* make exportedComponentsConfigs required
* fix broken test
* cleanup tests
* fix prop name
* remove capability related code
* rename exported to exposed
* refactor(extensions): make registry types generic
* Update public/app/features/plugins/extensions/registry/ExportedComponentsRegistry.test.ts
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* fix levitate error
---------
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2024-08-19 08:43:11 +02:00
Levente Balogh
ebe42e1ada
Plugins: Allow apps to expose components. Update the extensions API. ( #87236 )
...
* feat: introduce exposable components and update the public APIs
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* tests: fix the tests for `usePluginComponent()`
I broke them when I wrapped the component with the PluginContextProvider which fetches the plugin metadata.
* fix: typo
---------
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2024-06-07 18:05:00 +02:00