Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v0/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.14.0
22.13.1
2 changes: 1 addition & 1 deletion v0/.tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nodejs 18.14.0
nodejs 22.13.1

24 changes: 12 additions & 12 deletions v0/json-schema-form.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Shorthand to lookup for keys with `x-jsf-*` preffix.
*/
export function pickXKey(node: Object, key: 'presentation' | 'errorMessage'): Object | undefined;
type ValidationTypes =
export type ValidationTypes =
| 'type'
| 'minimum'
| 'maximum'
Expand All @@ -13,7 +13,7 @@ type ValidationTypes =
| 'accept'
| 'required';

type JSFConfig = {
export type JSFConfig = {
/**
* Initial json values to prefill the form fields.
* This influences the initial visibility of conditional fields.
Expand Down Expand Up @@ -46,9 +46,9 @@ type JSFConfig = {
errorMessage?: Partial<Record<ValidationTypes, string>>;
};
};
type Fields = Record<string, unknown>[]; //TODO: Type the field based on the given JSON Schema properties.
export type Fields = Record<string, unknown>[]; //TODO: Type the field based on the given JSON Schema properties.

type $TSFixMe = any;
export type $TSFixMe = any;

/**
* Returns the Yup schema structure of given fields.
Expand All @@ -57,7 +57,7 @@ type $TSFixMe = any;
*/
export function buildCompleteYupSchema(fields: Fields, config: JSFConfig): $TSFixMe; //TODO: We need to update Yup to 1.0 which supports TS.

type HeadlessFormOutput = {
export type HeadlessFormOutput = {
/**
* List of Fields. Each Field corresponds to a form input from the json schema.
* @example
Expand Down Expand Up @@ -102,11 +102,11 @@ type HeadlessFormOutput = {
error?: Error;
};

type JSONSchemaObjectType = Record<string, unknown>;
type FieldName = string;
type FieldAttrs = Record<string, unknown>;
export type JSONSchemaObjectType = Record<string, unknown>;
export type FieldName = string;
export type FieldAttrs = Record<string, unknown>;

type ModifyConfig = {
export type ModifyConfig = {
/**
* An object with the fields to be modified with the returned attributes.
*/
Expand All @@ -133,19 +133,19 @@ type ModifyConfig = {
muteLogging?: boolean;
};

type WarningType =
export type WarningType =
| 'FIELD_TO_CHANGE_NOT_FOUND'
| 'ORDER_MISSING_FIELDS'
| 'FIELD_TO_CREATE_EXISTS'
| 'PICK_MISSED_FIELD';

type Warning = {
export type Warning = {
message: string;
type: WarningType;
meta?: Record<string, unknown>;
};

type ModifyOutput = {
export type ModifyOutput = {
schema: JSONSchemaObjectType;
warnings: Warning[];
};
Expand Down
Loading