frontend-plugin-api: re-export translation APIs
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/frontend-plugin-api': patch
|
||||
---
|
||||
|
||||
Added translation APIs as well as `createTranslationExtension`.
|
||||
@@ -31,6 +31,9 @@ import { ConfigApi } from '@backstage/core-plugin-api';
|
||||
import { configApiRef } from '@backstage/core-plugin-api';
|
||||
import { createApiFactory } from '@backstage/core-plugin-api';
|
||||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
import { createTranslationMessages } from '@backstage/core-plugin-api/alpha';
|
||||
import { createTranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { createTranslationResource } from '@backstage/core-plugin-api/alpha';
|
||||
import { DiscoveryApi } from '@backstage/core-plugin-api';
|
||||
import { discoveryApiRef } from '@backstage/core-plugin-api';
|
||||
import { ErrorApi } from '@backstage/core-plugin-api';
|
||||
@@ -75,10 +78,15 @@ import { StorageApi } from '@backstage/core-plugin-api';
|
||||
import { storageApiRef } from '@backstage/core-plugin-api';
|
||||
import { StorageValueSnapshot } from '@backstage/core-plugin-api';
|
||||
import { TranslationMessages } from '@backstage/core-plugin-api/alpha';
|
||||
import { TranslationMessagesOptions } from '@backstage/core-plugin-api/alpha';
|
||||
import { TranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { TranslationRefOptions } from '@backstage/core-plugin-api/alpha';
|
||||
import { TranslationResource } from '@backstage/core-plugin-api/alpha';
|
||||
import { TranslationResourceOptions } from '@backstage/core-plugin-api/alpha';
|
||||
import { TypesToApiRefs } from '@backstage/core-plugin-api';
|
||||
import { useApi } from '@backstage/core-plugin-api';
|
||||
import { useApiHolder } from '@backstage/core-plugin-api';
|
||||
import { useTranslationRef } from '@backstage/core-plugin-api/alpha';
|
||||
import { withApis } from '@backstage/core-plugin-api';
|
||||
import { z } from 'zod';
|
||||
import { ZodSchema } from 'zod';
|
||||
@@ -652,6 +660,12 @@ export namespace createTranslationExtension {
|
||||
>;
|
||||
}
|
||||
|
||||
export { createTranslationMessages };
|
||||
|
||||
export { createTranslationRef };
|
||||
|
||||
export { createTranslationResource };
|
||||
|
||||
export { DiscoveryApi };
|
||||
|
||||
export { discoveryApiRef };
|
||||
@@ -969,6 +983,18 @@ export interface SubRouteRef<
|
||||
readonly T: TParams;
|
||||
}
|
||||
|
||||
export { TranslationMessages };
|
||||
|
||||
export { TranslationMessagesOptions };
|
||||
|
||||
export { TranslationRef };
|
||||
|
||||
export { TranslationRefOptions };
|
||||
|
||||
export { TranslationResource };
|
||||
|
||||
export { TranslationResourceOptions };
|
||||
|
||||
export { TypesToApiRefs };
|
||||
|
||||
// @public
|
||||
@@ -996,5 +1022,7 @@ export function useRouteRefParams<Params extends AnyRouteRefParams>(
|
||||
_routeRef: RouteRef<Params> | SubRouteRef<Params>,
|
||||
): Params;
|
||||
|
||||
export { useTranslationRef };
|
||||
|
||||
export { withApis };
|
||||
```
|
||||
|
||||
@@ -14,11 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { TranslationMessages, TranslationResource } from '../translation';
|
||||
import { createExtension, createExtensionDataRef } from '../wiring';
|
||||
import {
|
||||
TranslationResource,
|
||||
TranslationMessages,
|
||||
} from '@backstage/core-plugin-api/alpha';
|
||||
|
||||
/** @public */
|
||||
export function createTranslationExtension(options: {
|
||||
|
||||
@@ -28,6 +28,7 @@ export * from './icons';
|
||||
export * from './routing';
|
||||
export * from './schema';
|
||||
export * from './apis/system';
|
||||
export * from './translation';
|
||||
export * from './wiring';
|
||||
|
||||
export type {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2023 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export {
|
||||
type TranslationMessages,
|
||||
type TranslationMessagesOptions,
|
||||
type TranslationResource,
|
||||
type TranslationResourceOptions,
|
||||
type TranslationRef,
|
||||
type TranslationRefOptions,
|
||||
createTranslationMessages,
|
||||
createTranslationResource,
|
||||
createTranslationRef,
|
||||
useTranslationRef,
|
||||
} from '@backstage/core-plugin-api/alpha';
|
||||
Reference in New Issue
Block a user