plugin updates
This commit is contained in:
@@ -5,6 +5,7 @@ export const CoreMessages = {
|
||||
RedirectParentFrame: 'INTEGRATED_APP_EMBEDDER_REDIRECT_PARENT_FRAME',
|
||||
SendLocale: 'INTEGRATED_APP_EMBEDDER_SEND_LOCALE',
|
||||
SendDeviceId: 'INTEGRATED_APP_EMBEDDER_SEND_DEVICE_ID',
|
||||
SendIntegratedAppConfig: 'INTEGRATED_APP_EMBEDDER_CONFIG',
|
||||
} as const;
|
||||
|
||||
export type CoreMessageType = typeof CoreMessages[keyof typeof CoreMessages];
|
||||
|
||||
@@ -58,6 +58,14 @@ type PartialLeadinConfig = Pick<
|
||||
| 'refreshTokenError'
|
||||
>;
|
||||
|
||||
type AppIntegrationConfig = Pick<LeadinConfig, 'adminUrl'>;
|
||||
|
||||
const getIntegrationConfig = (): AppIntegrationConfig => {
|
||||
return {
|
||||
adminUrl: leadinQueryParams.adminUrl,
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* A modified version of the original leadinConfig that is passed to some integrated apps.
|
||||
*
|
||||
@@ -143,7 +151,9 @@ const getAppOptions = (app: App, createRoute = false) => {
|
||||
.setPluginSettingsInit();
|
||||
break;
|
||||
case App.Forms:
|
||||
options = new FormsAppOptions();
|
||||
options = new FormsAppOptions().setIntegratedAppConfig(
|
||||
getIntegrationConfig()
|
||||
);
|
||||
if (createRoute) {
|
||||
options = options.setCreateFormAppInit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user