@airplane/views
Version:
A React library for building Airplane views. Views components are optimized in style and functionality to produce internal apps that are easy to build and maintain.
744 lines (743 loc) • 27.8 kB
TypeScript
import { FormProps } from "./Form.types";
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, FormProps<unknown>>;
export default _default;
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FormProps>;
export declare const WithValidation: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FormProps>;
export declare const WithMultiValidation: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FormProps>;
export declare const DependentFieldValidation: () => import("react/jsx-runtime").JSX.Element;
export declare const NoResetOnSubmit: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FormProps>;
export declare const ManualResetButton: () => import("react/jsx-runtime").JSX.Element;
export declare const MultipleForms: () => import("react/jsx-runtime").JSX.Element;
export declare const RequestTask: {
(): import("react/jsx-runtime").JSX.Element;
parameters: {
mockData: ({
url: string;
method: string;
status: number;
response: {
resource: {
"tasks.execute": boolean;
"tasks.request_run": boolean;
};
task?: undefined;
reviewers?: undefined;
triggerRequestID?: undefined;
results?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
task: {
name: string;
requireExplicitPermissions: boolean;
triggers: {
kind: string;
triggerID: string;
}[];
parameters: {
parameters: {
slug: string;
name: string;
type: string;
component: string;
constraints: {
optional: boolean;
};
}[];
};
};
reviewers: never[];
resource?: undefined;
triggerRequestID?: undefined;
results?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
triggerRequestID: string;
resource?: undefined;
task?: undefined;
reviewers?: undefined;
results?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
results: ({
user: null;
group: {
id: string;
name: string;
};
} | {
user: {
userID: string;
name: string;
avatarURL: string;
};
group: null;
})[];
resource?: undefined;
task?: undefined;
reviewers?: undefined;
triggerRequestID?: undefined;
};
})[];
};
};
export declare const NoPermissions: {
(): import("react/jsx-runtime").JSX.Element;
parameters: {
mockData: ({
url: string;
method: string;
status: number;
response: {
resource: {
"tasks.execute": boolean;
"tasks.request_run": boolean;
};
task?: undefined;
reviewers?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
task: {
name: string;
requireExplicitPermissions: boolean;
triggers: {
kind: string;
triggerID: string;
}[];
parameters: {
parameters: {
slug: string;
name: string;
type: string;
component: string;
constraints: {
optional: boolean;
};
}[];
};
};
reviewers: never[];
resource?: undefined;
};
})[];
};
};
export declare const WithTask: {
(): import("react/jsx-runtime").JSX.Element;
parameters: {
mockData: ({
url: string;
method: string;
status: number;
response: {
runID: string;
id?: undefined;
status?: undefined;
taskID?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
id: string;
status: string;
taskID: string;
runID?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: () => string;
} | {
url: string;
method: string;
status: number;
response: {
resource: {
"tasks.execute": boolean;
"tasks.request_run": boolean;
};
task?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
task: {
parameters: {
parameters: ({
slug: string;
name: string;
type: string;
desc: string;
constraints: {
optional: boolean;
options: {
label: string;
value: string;
}[];
};
component?: undefined;
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
component: string;
desc: string;
constraints: {
optional: boolean;
options?: undefined;
};
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
desc: string;
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: string[];
constraints: {
optional?: undefined;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: number[];
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: ({
a: number;
b?: undefined;
} | {
b: number;
a?: undefined;
})[];
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: string[];
constraints: {
optional: boolean;
options: {
label: string;
value: string;
}[];
};
component?: undefined;
})[];
};
};
resource?: undefined;
};
})[];
};
};
export declare const ShownAndHiddenFields: {
(): import("react/jsx-runtime").JSX.Element;
parameters: {
mockData: ({
url: string;
method: string;
status: number;
response: {
runID: string;
id?: undefined;
status?: undefined;
taskID?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
id: string;
status: string;
taskID: string;
runID?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: () => string;
} | {
url: string;
method: string;
status: number;
response: {
resource: {
"tasks.execute": boolean;
"tasks.request_run": boolean;
};
task?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
task: {
parameters: {
parameters: ({
slug: string;
name: string;
type: string;
desc: string;
constraints: {
optional: boolean;
options: {
label: string;
value: string;
}[];
};
component?: undefined;
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
component: string;
desc: string;
constraints: {
optional: boolean;
options?: undefined;
};
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
desc: string;
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: string[];
constraints: {
optional?: undefined;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: number[];
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: ({
a: number;
b?: undefined;
} | {
b: number;
a?: undefined;
})[];
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: string[];
constraints: {
optional: boolean;
options: {
label: string;
value: string;
}[];
};
component?: undefined;
})[];
};
};
resource?: undefined;
};
})[];
};
};
export declare const FieldOptions: {
(): import("react/jsx-runtime").JSX.Element;
parameters: {
mockData: ({
url: string;
method: string;
status: number;
response: {
runID: string;
id?: undefined;
status?: undefined;
taskID?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
id: string;
status: string;
taskID: string;
runID?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: () => string;
} | {
url: string;
method: string;
status: number;
response: {
resource: {
"tasks.execute": boolean;
"tasks.request_run": boolean;
};
task?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
task: {
parameters: {
parameters: ({
slug: string;
name: string;
type: string;
desc: string;
constraints: {
optional: boolean;
options: {
label: string;
value: string;
}[];
};
component?: undefined;
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
component: string;
desc: string;
constraints: {
optional: boolean;
options?: undefined;
};
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
desc: string;
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: string[];
constraints: {
optional?: undefined;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: number[];
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: ({
a: number;
b?: undefined;
} | {
b: number;
a?: undefined;
})[];
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: string[];
constraints: {
optional: boolean;
options: {
label: string;
value: string;
}[];
};
component?: undefined;
})[];
};
};
resource?: undefined;
};
})[];
};
};
export declare const ValidationErrors: {
(): import("react/jsx-runtime").JSX.Element;
parameters: {
mockData: ({
url: string;
method: string;
status: number;
response: {
runID: string;
id?: undefined;
status?: undefined;
taskID?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
id: string;
status: string;
taskID: string;
runID?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: () => string;
} | {
url: string;
method: string;
status: number;
response: {
resource: {
"tasks.execute": boolean;
"tasks.request_run": boolean;
};
task?: undefined;
};
} | {
url: string;
method: string;
status: number;
response: {
task: {
parameters: {
parameters: ({
slug: string;
name: string;
type: string;
desc: string;
constraints: {
optional: boolean;
options: {
label: string;
value: string;
}[];
};
component?: undefined;
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
component: string;
desc: string;
constraints: {
optional: boolean;
options?: undefined;
};
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
desc: string;
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
multi?: undefined;
default?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: string[];
constraints: {
optional?: undefined;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: number[];
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: ({
a: number;
b?: undefined;
} | {
b: number;
a?: undefined;
})[];
constraints: {
optional: boolean;
options?: undefined;
};
component?: undefined;
} | {
slug: string;
name: string;
type: string;
multi: boolean;
desc: string;
default: string[];
constraints: {
optional: boolean;
options: {
label: string;
value: string;
}[];
};
component?: undefined;
})[];
};
};
resource?: undefined;
};
})[];
};
};
export declare const InputsWithoutIds: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FormProps>;
export declare const WrappedInCard: () => import("react/jsx-runtime").JSX.Element;
export declare const Disabled: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FormProps>;
export declare const Submitting: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, FormProps>;