chore: adaptable -> swappable
Signed-off-by: benjdlambert <ben@blam.sh> Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
AdaptableComponentBlueprint,
|
||||
SwappableComponentBlueprint,
|
||||
createExtensionInput,
|
||||
ApiBlueprint,
|
||||
componentsApiRef,
|
||||
@@ -30,7 +30,7 @@ export const ComponentsApi = ApiBlueprint.makeWithOverrides({
|
||||
name: 'components',
|
||||
inputs: {
|
||||
components: createExtensionInput(
|
||||
[AdaptableComponentBlueprint.dataRefs.component],
|
||||
[SwappableComponentBlueprint.dataRefs.component],
|
||||
{ replaces: [{ id: 'app', input: 'components' }] },
|
||||
),
|
||||
},
|
||||
@@ -42,7 +42,7 @@ export const ComponentsApi = ApiBlueprint.makeWithOverrides({
|
||||
factory: () =>
|
||||
DefaultComponentsApi.fromComponents(
|
||||
inputs.components.map(i =>
|
||||
i.get(AdaptableComponentBlueprint.dataRefs.component),
|
||||
i.get(SwappableComponentBlueprint.dataRefs.component),
|
||||
),
|
||||
),
|
||||
}),
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import {
|
||||
NotFoundErrorPage as AdaptableNotFoundErrorPage,
|
||||
Progress as AdaptableProgress,
|
||||
ErrorBoundary as AdaptableErrorBoundary,
|
||||
AdaptableComponentBlueprint,
|
||||
NotFoundErrorPage as SwappableNotFoundErrorPage,
|
||||
Progress as SwappableProgress,
|
||||
ErrorBoundary as SwappableErrorBoundary,
|
||||
SwappableComponentBlueprint,
|
||||
} from '@backstage/frontend-plugin-api';
|
||||
|
||||
import {
|
||||
@@ -27,30 +27,30 @@ import {
|
||||
} from '@backstage/core-components';
|
||||
import Button from '@material-ui/core/Button';
|
||||
|
||||
export const Progress = AdaptableComponentBlueprint.make({
|
||||
export const Progress = SwappableComponentBlueprint.make({
|
||||
name: 'core.components.progress',
|
||||
params: define =>
|
||||
define({
|
||||
component: AdaptableProgress,
|
||||
component: SwappableProgress,
|
||||
loader: () => ProgressComponent,
|
||||
}),
|
||||
});
|
||||
|
||||
export const NotFoundErrorPage = AdaptableComponentBlueprint.make({
|
||||
export const NotFoundErrorPage = SwappableComponentBlueprint.make({
|
||||
name: 'core.components.notFoundErrorPage',
|
||||
params: define =>
|
||||
define({
|
||||
component: AdaptableNotFoundErrorPage,
|
||||
component: SwappableNotFoundErrorPage,
|
||||
loader: () => () =>
|
||||
<ErrorPage status="404" statusMessage="PAGE NOT FOUND" />,
|
||||
}),
|
||||
});
|
||||
|
||||
export const ErrorBoundary = AdaptableComponentBlueprint.make({
|
||||
export const ErrorBoundary = SwappableComponentBlueprint.make({
|
||||
name: 'core.components.errorBoundary',
|
||||
params: define =>
|
||||
define({
|
||||
component: AdaptableErrorBoundary,
|
||||
component: SwappableErrorBoundary,
|
||||
loader: () => props => {
|
||||
const { plugin, error, resetError } = props;
|
||||
const title = `Error in ${plugin?.id}`;
|
||||
|
||||
Reference in New Issue
Block a user