[plugin] Library updates (#10070)

* Expose lingui modules to plugins

* Add i18n object to plugin context

* Expose form types

* Update package.json requirements

* Externalize react and mantine when building @inventreedb/ui components

* Externalize lingui packages too

* Extern <AddItemButton />
This commit is contained in:
Oliver authored and GitHub committed 2025-07-25 01:23:34 +10:00
1 parent a301214ac9
commit 0e0abf2d75
55 files changed
+945 -868

No files matched your search

+11
View File
@@ -16,3 +16,14 @@ export function checkPluginVersion(context: InvenTreePluginContext) {
);
}
}
/**
* Helper function to initialize the plugin context.
*/
export function initPlugin(context: InvenTreePluginContext) {
// Check that the plugin version matches the expected version
checkPluginVersion(context);
// Activate the i18n context for the current locale
context.i18n?.activate?.(context.locale);
}