fix: replace old config schemas for extensions and blueprints
to overcome a lot of warnings given during for example testing where these extensions are used. Signed-off-by: Hellgren Heikki <heikki.hellgren@op.fi>
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
|
||||
import { Suspense } from 'react';
|
||||
import { z } from 'zod/v4';
|
||||
import { RiArticleLine } from '@remixicon/react';
|
||||
import {
|
||||
createFrontendPlugin,
|
||||
@@ -107,13 +108,11 @@ const techDocsClientApi = ApiBlueprint.make({
|
||||
/** @alpha */
|
||||
export const techDocsSearchResultListItemExtension =
|
||||
SearchResultListItemBlueprint.makeWithOverrides({
|
||||
config: {
|
||||
schema: {
|
||||
title: z => z.string().optional(),
|
||||
lineClamp: z => z.number().default(5),
|
||||
asLink: z => z.boolean().default(true),
|
||||
asListItem: z => z.boolean().default(true),
|
||||
},
|
||||
configSchema: {
|
||||
title: z.string().optional(),
|
||||
lineClamp: z.number().default(5),
|
||||
asLink: z.boolean().default(true),
|
||||
asListItem: z.boolean().default(true),
|
||||
},
|
||||
factory(originalFactory, { config }) {
|
||||
return originalFactory({
|
||||
@@ -157,11 +156,9 @@ const techDocsReaderPage = PageBlueprint.makeWithOverrides({
|
||||
inputs: {
|
||||
addons: createExtensionInput([AddonBlueprint.dataRefs.addon]),
|
||||
},
|
||||
config: {
|
||||
schema: {
|
||||
withoutSearch: z => z.boolean().default(false),
|
||||
withoutHeader: z => z.boolean().default(false),
|
||||
},
|
||||
configSchema: {
|
||||
withoutSearch: z.boolean().default(false),
|
||||
withoutHeader: z.boolean().default(false),
|
||||
},
|
||||
factory(originalFactory, { apis, inputs, config }) {
|
||||
const addonsApi = apis.get(techdocsAddonsApiRef);
|
||||
|
||||
Reference in New Issue
Block a user