chore: fallback to just exporting the components as before for now, and work out how to embed the types later

Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
blam
2022-02-24 11:10:15 +01:00
parent 8e6a835272
commit 209b13774c
9 changed files with 75 additions and 38 deletions
+53 -31
View File
@@ -37,7 +37,7 @@ export function createScaffolderFieldExtension<
TInputProps = unknown,
>(
options: FieldExtensionOptions<TReturnValue, TInputProps>,
): Extension<TInputProps & (() => null)>;
): Extension<() => null>;
// @public
export type CustomFieldValidator<TFieldReturnValue> = (
@@ -51,20 +51,19 @@ export type CustomFieldValidator<TFieldReturnValue> = (
// Warning: (ae-missing-release-tag) "EntityNamePickerFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityNamePickerFieldExtension: FieldExtensionComponentProps<
string,
{}
> &
(() => null);
export const EntityNamePickerFieldExtension: () => null;
// Warning: (ae-missing-release-tag) "EntityPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const EntityPicker: (
props: FieldExtensionComponentProps<string, EntityPickerUiOptions>,
) => JSX.Element;
// Warning: (ae-missing-release-tag) "EntityPickerFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const EntityPickerFieldExtension: FieldExtensionComponentProps<
string,
EntityPickerUiOptions
> &
(() => null);
export const EntityPickerFieldExtension: () => null;
// Warning: (ae-missing-release-tag) "EntityPickerUiOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -78,12 +77,15 @@ export interface EntityPickerUiOptions {
defaultKind?: string;
}
// Warning: (ae-missing-release-tag) "EntityTagsPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const EntityTagsPickerFieldExtension: FieldExtensionComponentProps<
string[],
EntityTagsPickerUiOptions
> &
(() => null);
export const EntityTagsPicker: (
props: FieldExtensionComponentProps<string[], EntityTagsPickerUiOptions>,
) => JSX.Element;
// @public
export const EntityTagsPickerFieldExtension: () => null;
// Warning: (ae-missing-release-tag) "EntityTagsPickerUiOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -120,14 +122,17 @@ export type FieldExtensionOptions<
validation?: CustomFieldValidator<TFieldReturnValue>;
};
// Warning: (ae-missing-release-tag) "OwnedEntityPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const OwnedEntityPicker: (
props: FieldExtensionComponentProps<string, OwnedEntityPickerUiOptions>,
) => JSX.Element;
// Warning: (ae-missing-release-tag) "OwnedEntityPickerFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const OwnedEntityPickerFieldExtension: FieldExtensionComponentProps<
string,
OwnedEntityPickerUiOptions
> &
(() => null);
export const OwnedEntityPickerFieldExtension: () => null;
// Warning: (ae-missing-release-tag) "OwnedEntityPickerUiOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -139,14 +144,17 @@ export interface OwnedEntityPickerUiOptions {
defaultKind?: string;
}
// Warning: (ae-missing-release-tag) "OwnerPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const OwnerPicker: (
props: FieldExtensionComponentProps<string, OwnerPickerUiOptions>,
) => JSX.Element;
// Warning: (ae-missing-release-tag) "OwnerPickerFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const OwnerPickerFieldExtension: FieldExtensionComponentProps<
string,
OwnerPickerUiOptions
> &
(() => null);
export const OwnerPickerFieldExtension: () => null;
// Warning: (ae-missing-release-tag) "OwnerPickerUiOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -156,14 +164,28 @@ export interface OwnerPickerUiOptions {
allowedKinds?: string[];
}
// Warning: (ae-missing-release-tag) "repoPickerValidation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const repoPickerValidation: (
value: string,
validation: FieldValidation,
context: {
apiHolder: ApiHolder;
},
) => void;
// Warning: (ae-missing-release-tag) "RepoUrlPicker" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public
export const RepoUrlPicker: (
props: FieldExtensionComponentProps<string, RepoUrlPickerUiOptions>,
) => JSX.Element;
// Warning: (ae-missing-release-tag) "RepoUrlPickerFieldExtension" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const RepoUrlPickerFieldExtension: FieldExtensionComponentProps<
string,
RepoUrlPickerUiOptions
> &
(() => null);
export const RepoUrlPickerFieldExtension: () => null;
// Warning: (ae-missing-release-tag) "RepoUrlPickerUiOptions" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
@@ -17,6 +17,9 @@ import React from 'react';
import { FieldExtensionComponentProps } from '../../../extensions';
import { TextField } from '@material-ui/core';
/**
* EntityName Picker
*/
export const EntityNamePicker = (
props: FieldExtensionComponentProps<string>,
) => {
@@ -31,6 +31,9 @@ export interface EntityPickerUiOptions {
allowArbitraryValues?: boolean;
}
/**
* Entity Picker
*/
export const EntityPicker = (
props: FieldExtensionComponentProps<string, EntityPickerUiOptions>,
) => {
@@ -29,7 +29,6 @@ export interface EntityTagsPickerUiOptions {
}
/**
* EntityTagsPicker
* @public
*/
export const EntityTagsPicker = (
props: FieldExtensionComponentProps<string[], EntityTagsPickerUiOptions>,
@@ -29,6 +29,9 @@ export interface OwnedEntityPickerUiOptions {
defaultKind?: string;
}
/**
* Owned Entity Picker
*/
export const OwnedEntityPicker = (
props: FieldExtensionComponentProps<string, OwnedEntityPickerUiOptions>,
) => {
@@ -21,6 +21,9 @@ export interface OwnerPickerUiOptions {
allowedKinds?: string[];
}
/**
* Owner Picker
*/
export const OwnerPicker = (
props: FieldExtensionComponentProps<string, OwnerPickerUiOptions>,
) => {
@@ -44,6 +44,9 @@ export interface RepoUrlPickerUiOptions {
};
}
/**
* Repo Url Picker
*/
export const RepoUrlPicker = (
props: FieldExtensionComponentProps<string, RepoUrlPickerUiOptions>,
) => {
@@ -13,8 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export type { EntityPickerUiOptions } from './EntityPicker';
export type { OwnerPickerUiOptions } from './OwnerPicker';
export type { RepoUrlPickerUiOptions } from './RepoUrlPicker';
export type { OwnedEntityPickerUiOptions } from './OwnedEntityPicker';
export type { EntityTagsPickerUiOptions } from './EntityTagsPicker';
export * from './EntityPicker';
export * from './OwnerPicker';
export * from './RepoUrlPicker';
export * from './OwnedEntityPicker';
export * from './EntityTagsPicker';
+2 -1
View File
@@ -31,7 +31,8 @@ export function createScaffolderFieldExtension<
>(
options: FieldExtensionOptions<TReturnValue, TInputProps>,
// TODO: need know how to embed these types nicely so the api report looks nice.
): Extension<TInputProps & (() => null)> {
// then we can remove the export of the components
): Extension<() => null> {
return {
expose() {
const FieldExtensionDataHolder: any = () => null;