@osdk/react-components 0.1.0-beta.5 → 0.1.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/build/browser/action-form/ActionFormApi.js +2 -0
- package/build/browser/action-form/ActionFormApi.js.map +1 -0
- package/build/browser/action-form/FormFieldApi.js +2 -0
- package/build/browser/action-form/FormFieldApi.js.map +1 -0
- package/build/esm/action-form/ActionFormApi.js +2 -0
- package/build/esm/action-form/ActionFormApi.js.map +1 -0
- package/build/esm/action-form/FormFieldApi.js +2 -0
- package/build/esm/action-form/FormFieldApi.js.map +1 -0
- package/build/types/action-form/ActionFormApi.d.ts +76 -0
- package/build/types/action-form/ActionFormApi.d.ts.map +1 -0
- package/build/types/action-form/FormFieldApi.d.ts +241 -0
- package/build/types/action-form/FormFieldApi.d.ts.map +1 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionFormApi.js","names":[],"sources":["ActionFormApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionEditResponse,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n} from \"@osdk/api\";\nimport type { ActionValidationError, ApplyActionOptions } from \"@osdk/client\";\nimport type {\n ActionParameters,\n FieldKey,\n FieldValueType,\n FormFieldDefinition,\n} from \"./FormFieldApi.js\";\n\n/**\n * Props for the ActionForm component\n */\nexport interface ActionFormProps<Q extends ActionDefinition<unknown>> {\n actionDefinition: Q;\n\n /**\n * If not supplied, defaults to actionDef.displayName\n */\n formTitle?: string;\n\n /**\n * If not supplied, this will be constructed from ActionParameters\n */\n formFieldDefinition?: Array<FormFieldDefinition<Q>>;\n\n /**\n * Called when a field value changed.\n * Required when a field is in controlled mode, i.e. value is provided via formFieldDefinition.\n *\n * @param fieldKey The key of the changed field\n * @param value the updated value of the field\n */\n onFieldValueChanged?: <K extends FieldKey<Q>>(\n fieldKey: K,\n value: FieldValueType<Q, K>,\n ) => void;\n\n /**\n * Override to disable submit button\n * If not provided, button is disabled when form is submitting or has validation errors\n *\n * @default false\n */\n isSubmitDisabled?: boolean;\n\n /**\n * If supplied, this will override the default submit action\n * By default, the action's applyAction will be called with $validateOnly: false\n *\n * @param formState all field values when onSubmit is called\n * @param applyAction the function to execute the action. Call it with $validateOnly: true options to run validation mode onSubmit.\n * @returns a promise of the submission response\n */\n onSubmit?: <OP extends ApplyActionOptions>(\n formState: FormState<Q>,\n applyAction: (\n args: ActionParameters<Q>,\n options?: OP,\n ) => Promise<ActionReturnTypeForOptions<OP>>,\n ) => Promise<ActionReturnTypeForOptions<OP>> | void;\n\n /**\n * Called when the validation response is returned from a validateOnly submission\n *\n * @param results the validation response\n */\n onValidationResponse?: (results: ActionValidationResponse) => void;\n\n /**\n * Called when the action is successfully executed from a non-validateOnly submission\n *\n * @param results the submission response\n */\n onSuccess?: (results: ActionEditResponse) => void;\n\n /**\n * Called when there is an error in form submission\n *\n * @param error the error that occurred\n */\n onError?: (error: FormError) => void;\n}\n\n/**\n * Form values mapping parameter names to their values\n */\nexport type FormState<Q extends ActionDefinition<unknown>> = {\n [K in FieldKey<Q>]: FieldValueType<Q, K>;\n};\n\n/**\n * Form error discriminated union\n */\nexport type FormError =\n | { type: \"validation\"; error: ActionValidationError }\n | { type: \"submission\"; error: Error }\n | { type: \"unknown\"; error: unknown };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFieldApi.js","names":[],"sources":["FormFieldApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n CompileTimeMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n} from \"@osdk/api\";\nimport type React from \"react\";\n\n/**\n * A form field definition specifies configuration for a single field\n */\nexport interface FormFieldDefinition<\n Q extends ActionDefinition<unknown>,\n K extends FieldKey<Q> = FieldKey<Q>,\n V extends FieldValueType<Q, K> = FieldValueType<Q, K>,\n C extends ValidFormFieldForPropertyType<V> = ValidFormFieldForPropertyType<V>,\n> {\n /**\n * The field's unique key\n */\n fieldKey: K;\n\n /**\n * Display label for the field\n * If not provided, the form field will not show any label.\n */\n label?: string;\n\n /**\n * Current value of the field\n * If provided, the field operates in controlled mode\n */\n value?: V;\n\n /**\n * Default value of the field\n */\n defaultValue?: V;\n\n /**\n * The form field component type to render\n */\n fieldComponent: C;\n\n /**\n * Whether the field is required\n */\n isRequired?: boolean;\n\n /**\n * Placeholder text\n */\n placeholder?: string;\n\n /**\n * Additional information to display on this field\n * The placement of helper text depends on the value of helperTextPlacement prop\n */\n helperText?: string;\n\n /**\n * The placement of the helper text either below the field or in a tooltip\n *\n * @default \"tooltip\"\n */\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n\n /**\n * Whether the field is disabled\n */\n isDisabled?: boolean;\n\n /**\n * A callback to return a custom error message if validation failed\n *\n * @param validationRule the validation rule that failed with the error message\n * @returns the error message to display\n */\n onValidationError?: (error: ValidationError) => string;\n\n /**\n * Additional function to validate the field\n *\n * @param value the current field value\n * @returns a boolean promise indicating whether the value is valid\n */\n validate?: (value: V) => Promise<boolean>;\n\n /**\n * The component props for the form field\n * Excludes runtime props (key, onChange) which are managed by ActionForm\n */\n fieldComponentProps?: Omit<FormFieldPropsByType[C], \"key\" | \"onChange\">;\n}\n\ntype ValidationError = { type: ValidationRule; error: string };\n\ntype ValidationRule =\n | \"required\"\n | \"min\"\n | \"max\"\n | \"minLength\"\n | \"maxLength\"\n | \"pattern\"\n | \"validate\";\n\n/**\n * Maps field types to their corresponding props\n */\nexport interface FormFieldPropsByType {\n DATETIME_PICKER: DatetimePickerFieldProps;\n DROPDOWN: DropdownFieldProps<unknown>;\n FILE_PICKER: FilePickerProps;\n NUMBER_INPUT: NumberInputFieldProps;\n OBJECT_SET: ObjectSetFieldProps<ObjectTypeDefinition>;\n RADIO_BUTTONS: RadioButtonsFieldProps<unknown>;\n TEXT_AREA: TextAreaFieldProps;\n TEXT_INPUT: TextInputFieldProps;\n CUSTOM: CustomFieldProps<unknown>;\n}\n\n/**\n * Datetime picker field props\n */\nexport interface DatetimePickerFieldProps extends BaseFormFieldProps<Date> {\n fieldComponent: \"DATETIME_PICKER\";\n\n /**\n * The earliest date the user can select\n * If provided, this will be added to the field validation\n */\n min?: Date;\n\n /**\n * The latest date the user can select\n * If provided, this will be added to the field validation\n */\n max?: Date;\n\n /**\n * Whether to show time picker\n */\n showTime?: boolean;\n\n /**\n * Function to format the date string\n */\n formatDate?: (date: Date) => string;\n}\n\n/**\n * Dropdown field props with selectable options\n */\nexport interface DropdownFieldProps<V, IsMulti extends boolean = false>\n extends BaseFormFieldProps<IsMulti extends true ? V[] : V>\n{\n fieldComponent: \"DROPDOWN\";\n\n /**\n * Available options for the dropdown\n */\n options: Option<V>[];\n\n /**\n * Whether the dropdown allows searching/filtering\n */\n isSearchable?: boolean;\n\n /**\n * Whether multiple values can be selected\n */\n isMulti?: boolean;\n}\n\nexport interface FilePickerProps extends BaseFormFieldProps<File | File[]> {\n fieldComponent: \"FILE_PICKER\";\n\n /**\n * Whether multiple files can be selected\n */\n isMulti?: boolean;\n\n /**\n * Accepted file types (e.g., \"image/*\", \".pdf\")\n */\n accept?: string | string[];\n\n /**\n * Maximum file size in bytes\n */\n maxSize?: number;\n}\n\n/**\n * Text area field props\n */\nexport interface TextAreaFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n | \"rows\"\n | \"wrap\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n fieldComponent: \"TEXT_AREA\";\n}\n\nexport interface TextInputFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n fieldComponent: \"TEXT_INPUT\";\n}\n\n/**\n * Number input field props\n */\nexport interface NumberInputFieldProps extends\n BaseFormFieldProps<number>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"min\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"max\"\n | \"step\"\n >\n{\n fieldComponent: \"NUMBER_INPUT\";\n}\n\n/**\n * Radio buttons field props\n */\nexport interface RadioButtonsFieldProps<V> extends BaseFormFieldProps<V> {\n fieldComponent: \"RADIO_BUTTONS\";\n\n /**\n * Available options for radio buttons\n */\n options: Option<V>[];\n}\n\n/**\n * Option interface for dropdown and radio options\n */\nexport interface Option<V> {\n label: string;\n value: V;\n}\n\n/**\n * Object set field displays the summary of the count of the given object set\n */\nexport interface ObjectSetFieldProps<T extends ObjectTypeDefinition>\n extends BaseFormFieldProps<ObjectSet<T>>\n{\n fieldComponent: \"OBJECT_SET\";\n}\n\n/**\n * Custom field props for user-defined renderers\n */\nexport interface CustomFieldProps<V> extends BaseFormFieldProps<V> {\n fieldComponent: \"CUSTOM\";\n\n /**\n * Custom renderer function\n */\n customRenderer: (props: BaseFormFieldProps<V>) => React.ReactNode;\n}\n\nexport interface BaseFormFieldProps<V> {\n fieldComponent: FieldComponent;\n\n /**\n * Called when the field value changed.\n *\n * ActionForm internally wraps this to pass the key to onFieldValueChanged:\n * ```\n * <DropdownField\n * {...fieldDef}\n * onChange={(value) => onFieldValueChanged(fieldDef.key, value)}\n * />\n * ```\n *\n * @param value The new value of the form field\n */\n onChange?: (value?: V) => void;\n}\n\nexport type FieldKey<Q extends ActionDefinition<unknown>> =\n keyof ActionParameters<Q>;\n\n/**\n * Extracts parameters from an ActionDefinition\n */\nexport type ActionParameters<Q extends ActionDefinition<unknown>> =\n CompileTimeMetadata<Q>[\"parameters\"];\n\n/**\n * Extracts the value type for a specific parameter\n */\nexport type FieldValueType<\n Q extends ActionDefinition<unknown> = ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"];\n\n/**\n * Available form field component types\n */\nexport type FieldComponent =\n | \"DATETIME_PICKER\"\n | \"DROPDOWN\"\n | \"FILE_PICKER\"\n | \"NUMBER_INPUT\"\n | \"RADIO_BUTTONS\"\n | \"OBJECT_SET\"\n | \"TEXT_AREA\"\n | \"TEXT_INPUT\"\n | \"CUSTOM\";\n\n/**\n * Gets valid form field types for a given property type\n */\nexport type ValidFormFieldForPropertyType<P extends FieldValueType> = P extends\n \"objectSet\" ? \"OBJECT_SET\"\n : P extends \"object\" ? \"DROPDOWN\"\n : P extends \"mediaReference\" | \"attachment\" ? \"FILE_PICKER\"\n : P extends \"boolean\" ? \"RADIO_BUTTONS\" | \"DROPDOWN\"\n : P extends \"string\" ? \"TEXT_INPUT\" | \"TEXT_AREA\"\n : P extends \"datetime\" | \"timestamp\" ? \"DATETIME_PICKER\"\n : P extends\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"short\"\n | \"byte\"\n | \"decimal\" ? \"NUMBER_INPUT\"\n : never;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionFormApi.js","names":[],"sources":["ActionFormApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n ActionEditResponse,\n ActionReturnTypeForOptions,\n ActionValidationResponse,\n} from \"@osdk/api\";\nimport type { ActionValidationError, ApplyActionOptions } from \"@osdk/client\";\nimport type {\n ActionParameters,\n FieldKey,\n FieldValueType,\n FormFieldDefinition,\n} from \"./FormFieldApi.js\";\n\n/**\n * Props for the ActionForm component\n */\nexport interface ActionFormProps<Q extends ActionDefinition<unknown>> {\n actionDefinition: Q;\n\n /**\n * If not supplied, defaults to actionDef.displayName\n */\n formTitle?: string;\n\n /**\n * If not supplied, this will be constructed from ActionParameters\n */\n formFieldDefinition?: Array<FormFieldDefinition<Q>>;\n\n /**\n * Called when a field value changed.\n * Required when a field is in controlled mode, i.e. value is provided via formFieldDefinition.\n *\n * @param fieldKey The key of the changed field\n * @param value the updated value of the field\n */\n onFieldValueChanged?: <K extends FieldKey<Q>>(\n fieldKey: K,\n value: FieldValueType<Q, K>,\n ) => void;\n\n /**\n * Override to disable submit button\n * If not provided, button is disabled when form is submitting or has validation errors\n *\n * @default false\n */\n isSubmitDisabled?: boolean;\n\n /**\n * If supplied, this will override the default submit action\n * By default, the action's applyAction will be called with $validateOnly: false\n *\n * @param formState all field values when onSubmit is called\n * @param applyAction the function to execute the action. Call it with $validateOnly: true options to run validation mode onSubmit.\n * @returns a promise of the submission response\n */\n onSubmit?: <OP extends ApplyActionOptions>(\n formState: FormState<Q>,\n applyAction: (\n args: ActionParameters<Q>,\n options?: OP,\n ) => Promise<ActionReturnTypeForOptions<OP>>,\n ) => Promise<ActionReturnTypeForOptions<OP>> | void;\n\n /**\n * Called when the validation response is returned from a validateOnly submission\n *\n * @param results the validation response\n */\n onValidationResponse?: (results: ActionValidationResponse) => void;\n\n /**\n * Called when the action is successfully executed from a non-validateOnly submission\n *\n * @param results the submission response\n */\n onSuccess?: (results: ActionEditResponse) => void;\n\n /**\n * Called when there is an error in form submission\n *\n * @param error the error that occurred\n */\n onError?: (error: FormError) => void;\n}\n\n/**\n * Form values mapping parameter names to their values\n */\nexport type FormState<Q extends ActionDefinition<unknown>> = {\n [K in FieldKey<Q>]: FieldValueType<Q, K>;\n};\n\n/**\n * Form error discriminated union\n */\nexport type FormError =\n | { type: \"validation\"; error: ActionValidationError }\n | { type: \"submission\"; error: Error }\n | { type: \"unknown\"; error: unknown };\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormFieldApi.js","names":[],"sources":["FormFieldApi.ts"],"sourcesContent":["/*\n * Copyright 2025 Palantir Technologies, Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport type {\n ActionDefinition,\n CompileTimeMetadata,\n ObjectSet,\n ObjectTypeDefinition,\n} from \"@osdk/api\";\nimport type React from \"react\";\n\n/**\n * A form field definition specifies configuration for a single field\n */\nexport interface FormFieldDefinition<\n Q extends ActionDefinition<unknown>,\n K extends FieldKey<Q> = FieldKey<Q>,\n V extends FieldValueType<Q, K> = FieldValueType<Q, K>,\n C extends ValidFormFieldForPropertyType<V> = ValidFormFieldForPropertyType<V>,\n> {\n /**\n * The field's unique key\n */\n fieldKey: K;\n\n /**\n * Display label for the field\n * If not provided, the form field will not show any label.\n */\n label?: string;\n\n /**\n * Current value of the field\n * If provided, the field operates in controlled mode\n */\n value?: V;\n\n /**\n * Default value of the field\n */\n defaultValue?: V;\n\n /**\n * The form field component type to render\n */\n fieldComponent: C;\n\n /**\n * Whether the field is required\n */\n isRequired?: boolean;\n\n /**\n * Placeholder text\n */\n placeholder?: string;\n\n /**\n * Additional information to display on this field\n * The placement of helper text depends on the value of helperTextPlacement prop\n */\n helperText?: string;\n\n /**\n * The placement of the helper text either below the field or in a tooltip\n *\n * @default \"tooltip\"\n */\n helperTextPlacement?: \"bottom\" | \"tooltip\";\n\n /**\n * Whether the field is disabled\n */\n isDisabled?: boolean;\n\n /**\n * A callback to return a custom error message if validation failed\n *\n * @param validationRule the validation rule that failed with the error message\n * @returns the error message to display\n */\n onValidationError?: (error: ValidationError) => string;\n\n /**\n * Additional function to validate the field\n *\n * @param value the current field value\n * @returns a boolean promise indicating whether the value is valid\n */\n validate?: (value: V) => Promise<boolean>;\n\n /**\n * The component props for the form field\n * Excludes runtime props (key, onChange) which are managed by ActionForm\n */\n fieldComponentProps?: Omit<FormFieldPropsByType[C], \"key\" | \"onChange\">;\n}\n\ntype ValidationError = { type: ValidationRule; error: string };\n\ntype ValidationRule =\n | \"required\"\n | \"min\"\n | \"max\"\n | \"minLength\"\n | \"maxLength\"\n | \"pattern\"\n | \"validate\";\n\n/**\n * Maps field types to their corresponding props\n */\nexport interface FormFieldPropsByType {\n DATETIME_PICKER: DatetimePickerFieldProps;\n DROPDOWN: DropdownFieldProps<unknown>;\n FILE_PICKER: FilePickerProps;\n NUMBER_INPUT: NumberInputFieldProps;\n OBJECT_SET: ObjectSetFieldProps<ObjectTypeDefinition>;\n RADIO_BUTTONS: RadioButtonsFieldProps<unknown>;\n TEXT_AREA: TextAreaFieldProps;\n TEXT_INPUT: TextInputFieldProps;\n CUSTOM: CustomFieldProps<unknown>;\n}\n\n/**\n * Datetime picker field props\n */\nexport interface DatetimePickerFieldProps extends BaseFormFieldProps<Date> {\n fieldComponent: \"DATETIME_PICKER\";\n\n /**\n * The earliest date the user can select\n * If provided, this will be added to the field validation\n */\n min?: Date;\n\n /**\n * The latest date the user can select\n * If provided, this will be added to the field validation\n */\n max?: Date;\n\n /**\n * Whether to show time picker\n */\n showTime?: boolean;\n\n /**\n * Function to format the date string\n */\n formatDate?: (date: Date) => string;\n}\n\n/**\n * Dropdown field props with selectable options\n */\nexport interface DropdownFieldProps<V, IsMulti extends boolean = false>\n extends BaseFormFieldProps<IsMulti extends true ? V[] : V>\n{\n fieldComponent: \"DROPDOWN\";\n\n /**\n * Available options for the dropdown\n */\n options: Option<V>[];\n\n /**\n * Whether the dropdown allows searching/filtering\n */\n isSearchable?: boolean;\n\n /**\n * Whether multiple values can be selected\n */\n isMulti?: boolean;\n}\n\nexport interface FilePickerProps extends BaseFormFieldProps<File | File[]> {\n fieldComponent: \"FILE_PICKER\";\n\n /**\n * Whether multiple files can be selected\n */\n isMulti?: boolean;\n\n /**\n * Accepted file types (e.g., \"image/*\", \".pdf\")\n */\n accept?: string | string[];\n\n /**\n * Maximum file size in bytes\n */\n maxSize?: number;\n}\n\n/**\n * Text area field props\n */\nexport interface TextAreaFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n | \"rows\"\n | \"wrap\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n fieldComponent: \"TEXT_AREA\";\n}\n\nexport interface TextInputFieldProps extends\n BaseFormFieldProps<string>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"minLength\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"maxLength\"\n >\n{\n fieldComponent: \"TEXT_INPUT\";\n}\n\n/**\n * Number input field props\n */\nexport interface NumberInputFieldProps extends\n BaseFormFieldProps<number>,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n /**\n * If provided, this will be added to the field validation\n */\n | \"min\"\n /**\n * If provided, this will be added to the field validation\n */\n | \"max\"\n | \"step\"\n >\n{\n fieldComponent: \"NUMBER_INPUT\";\n}\n\n/**\n * Radio buttons field props\n */\nexport interface RadioButtonsFieldProps<V> extends BaseFormFieldProps<V> {\n fieldComponent: \"RADIO_BUTTONS\";\n\n /**\n * Available options for radio buttons\n */\n options: Option<V>[];\n}\n\n/**\n * Option interface for dropdown and radio options\n */\nexport interface Option<V> {\n label: string;\n value: V;\n}\n\n/**\n * Object set field displays the summary of the count of the given object set\n */\nexport interface ObjectSetFieldProps<T extends ObjectTypeDefinition>\n extends BaseFormFieldProps<ObjectSet<T>>\n{\n fieldComponent: \"OBJECT_SET\";\n}\n\n/**\n * Custom field props for user-defined renderers\n */\nexport interface CustomFieldProps<V> extends BaseFormFieldProps<V> {\n fieldComponent: \"CUSTOM\";\n\n /**\n * Custom renderer function\n */\n customRenderer: (props: BaseFormFieldProps<V>) => React.ReactNode;\n}\n\nexport interface BaseFormFieldProps<V> {\n fieldComponent: FieldComponent;\n\n /**\n * Called when the field value changed.\n *\n * ActionForm internally wraps this to pass the key to onFieldValueChanged:\n * ```\n * <DropdownField\n * {...fieldDef}\n * onChange={(value) => onFieldValueChanged(fieldDef.key, value)}\n * />\n * ```\n *\n * @param value The new value of the form field\n */\n onChange?: (value?: V) => void;\n}\n\nexport type FieldKey<Q extends ActionDefinition<unknown>> =\n keyof ActionParameters<Q>;\n\n/**\n * Extracts parameters from an ActionDefinition\n */\nexport type ActionParameters<Q extends ActionDefinition<unknown>> =\n CompileTimeMetadata<Q>[\"parameters\"];\n\n/**\n * Extracts the value type for a specific parameter\n */\nexport type FieldValueType<\n Q extends ActionDefinition<unknown> = ActionDefinition<unknown>,\n K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>,\n> = ActionParameters<Q>[K][\"type\"];\n\n/**\n * Available form field component types\n */\nexport type FieldComponent =\n | \"DATETIME_PICKER\"\n | \"DROPDOWN\"\n | \"FILE_PICKER\"\n | \"NUMBER_INPUT\"\n | \"RADIO_BUTTONS\"\n | \"OBJECT_SET\"\n | \"TEXT_AREA\"\n | \"TEXT_INPUT\"\n | \"CUSTOM\";\n\n/**\n * Gets valid form field types for a given property type\n */\nexport type ValidFormFieldForPropertyType<P extends FieldValueType> = P extends\n \"objectSet\" ? \"OBJECT_SET\"\n : P extends \"object\" ? \"DROPDOWN\"\n : P extends \"mediaReference\" | \"attachment\" ? \"FILE_PICKER\"\n : P extends \"boolean\" ? \"RADIO_BUTTONS\" | \"DROPDOWN\"\n : P extends \"string\" ? \"TEXT_INPUT\" | \"TEXT_AREA\"\n : P extends \"datetime\" | \"timestamp\" ? \"DATETIME_PICKER\"\n : P extends\n | \"double\"\n | \"integer\"\n | \"long\"\n | \"float\"\n | \"short\"\n | \"byte\"\n | \"decimal\" ? \"NUMBER_INPUT\"\n : never;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ActionDefinition, ActionEditResponse, ActionReturnTypeForOptions, ActionValidationResponse } from "@osdk/api";
|
|
2
|
+
import type { ActionValidationError, ApplyActionOptions } from "@osdk/client";
|
|
3
|
+
import type { ActionParameters, FieldKey, FieldValueType, FormFieldDefinition } from "./FormFieldApi.js";
|
|
4
|
+
/**
|
|
5
|
+
* Props for the ActionForm component
|
|
6
|
+
*/
|
|
7
|
+
export interface ActionFormProps<Q extends ActionDefinition<unknown>> {
|
|
8
|
+
actionDefinition: Q;
|
|
9
|
+
/**
|
|
10
|
+
* If not supplied, defaults to actionDef.displayName
|
|
11
|
+
*/
|
|
12
|
+
formTitle?: string;
|
|
13
|
+
/**
|
|
14
|
+
* If not supplied, this will be constructed from ActionParameters
|
|
15
|
+
*/
|
|
16
|
+
formFieldDefinition?: Array<FormFieldDefinition<Q>>;
|
|
17
|
+
/**
|
|
18
|
+
* Called when a field value changed.
|
|
19
|
+
* Required when a field is in controlled mode, i.e. value is provided via formFieldDefinition.
|
|
20
|
+
*
|
|
21
|
+
* @param fieldKey The key of the changed field
|
|
22
|
+
* @param value the updated value of the field
|
|
23
|
+
*/
|
|
24
|
+
onFieldValueChanged?: <K extends FieldKey<Q>>(fieldKey: K, value: FieldValueType<Q, K>) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Override to disable submit button
|
|
27
|
+
* If not provided, button is disabled when form is submitting or has validation errors
|
|
28
|
+
*
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
isSubmitDisabled?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* If supplied, this will override the default submit action
|
|
34
|
+
* By default, the action's applyAction will be called with $validateOnly: false
|
|
35
|
+
*
|
|
36
|
+
* @param formState all field values when onSubmit is called
|
|
37
|
+
* @param applyAction the function to execute the action. Call it with $validateOnly: true options to run validation mode onSubmit.
|
|
38
|
+
* @returns a promise of the submission response
|
|
39
|
+
*/
|
|
40
|
+
onSubmit?: <OP extends ApplyActionOptions>(formState: FormState<Q>, applyAction: (args: ActionParameters<Q>, options?: OP) => Promise<ActionReturnTypeForOptions<OP>>) => Promise<ActionReturnTypeForOptions<OP>> | void;
|
|
41
|
+
/**
|
|
42
|
+
* Called when the validation response is returned from a validateOnly submission
|
|
43
|
+
*
|
|
44
|
+
* @param results the validation response
|
|
45
|
+
*/
|
|
46
|
+
onValidationResponse?: (results: ActionValidationResponse) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Called when the action is successfully executed from a non-validateOnly submission
|
|
49
|
+
*
|
|
50
|
+
* @param results the submission response
|
|
51
|
+
*/
|
|
52
|
+
onSuccess?: (results: ActionEditResponse) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Called when there is an error in form submission
|
|
55
|
+
*
|
|
56
|
+
* @param error the error that occurred
|
|
57
|
+
*/
|
|
58
|
+
onError?: (error: FormError) => void;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Form values mapping parameter names to their values
|
|
62
|
+
*/
|
|
63
|
+
export type FormState<Q extends ActionDefinition<unknown>> = { [K in FieldKey<Q>] : FieldValueType<Q, K> };
|
|
64
|
+
/**
|
|
65
|
+
* Form error discriminated union
|
|
66
|
+
*/
|
|
67
|
+
export type FormError = {
|
|
68
|
+
type: "validation"
|
|
69
|
+
error: ActionValidationError
|
|
70
|
+
} | {
|
|
71
|
+
type: "submission"
|
|
72
|
+
error: Error
|
|
73
|
+
} | {
|
|
74
|
+
type: "unknown"
|
|
75
|
+
error: unknown
|
|
76
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,kBACA,oBACA,4BACA,gCACK,WAAY;AACnB,cAAc,uBAAuB,0BAA0B,cAAe;AAC9E,cACE,kBACA,UACA,gBACA,2BACK,mBAAoB;;;;AAK3B,iBAAiB,gBAAgB,UAAU,2BAA2B;CACpE,kBAAkB;;;;CAKlB;;;;CAKA,sBAAsB,MAAM,oBAAoB;;;;;;;;CAShD,uBAAuB,UAAU,SAAS,IACxCA,UAAU,GACVC,OAAO,eAAe,GAAG;;;;;;;CAS3B;;;;;;;;;CAUA,YAAY,WAAW,oBACrBC,WAAW,UAAU,IACrBC,cACEC,MAAM,iBAAiB,IACvBC,UAAU,OACP,QAAQ,2BAA2B,SACrC,QAAQ,2BAA2B;;;;;;CAOxC,wBAAwBC,SAAS;;;;;;CAOjC,aAAaC,SAAS;;;;;;CAOtB,WAAWC,OAAO;AACnB;;;;AAKD,YAAY,UAAU,UAAU,gCAC7B,KAAK,SAAS,MAAK,eAAe,GAAG;;;;AAMxC,YAAY,YACR;CAAE,MAAM;CAAc,OAAO;AAAuB,IACpD;CAAE,MAAM;CAAc,OAAO;AAAO,IACpC;CAAE,MAAM;CAAW;AAAgB","names":["fieldKey: K","value: FieldValueType<Q, K>","formState: FormState<Q>","applyAction: (\n args: ActionParameters<Q>,\n options?: OP,\n ) => Promise<ActionReturnTypeForOptions<OP>>","args: ActionParameters<Q>","options?: OP","results: ActionValidationResponse","results: ActionEditResponse","error: FormError"],"sources":["../../../src/action-form/ActionFormApi.ts"],"version":3,"file":"ActionFormApi.d.ts"}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import type { ActionDefinition, CompileTimeMetadata, ObjectSet, ObjectTypeDefinition } from "@osdk/api";
|
|
2
|
+
import type React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* A form field definition specifies configuration for a single field
|
|
5
|
+
*/
|
|
6
|
+
export interface FormFieldDefinition<
|
|
7
|
+
Q extends ActionDefinition<unknown>,
|
|
8
|
+
K extends FieldKey<Q> = FieldKey<Q>,
|
|
9
|
+
V extends FieldValueType<Q, K> = FieldValueType<Q, K>,
|
|
10
|
+
C extends ValidFormFieldForPropertyType<V> = ValidFormFieldForPropertyType<V>
|
|
11
|
+
> {
|
|
12
|
+
/**
|
|
13
|
+
* The field's unique key
|
|
14
|
+
*/
|
|
15
|
+
fieldKey: K;
|
|
16
|
+
/**
|
|
17
|
+
* Display label for the field
|
|
18
|
+
* If not provided, the form field will not show any label.
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Current value of the field
|
|
23
|
+
* If provided, the field operates in controlled mode
|
|
24
|
+
*/
|
|
25
|
+
value?: V;
|
|
26
|
+
/**
|
|
27
|
+
* Default value of the field
|
|
28
|
+
*/
|
|
29
|
+
defaultValue?: V;
|
|
30
|
+
/**
|
|
31
|
+
* The form field component type to render
|
|
32
|
+
*/
|
|
33
|
+
fieldComponent: C;
|
|
34
|
+
/**
|
|
35
|
+
* Whether the field is required
|
|
36
|
+
*/
|
|
37
|
+
isRequired?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Placeholder text
|
|
40
|
+
*/
|
|
41
|
+
placeholder?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Additional information to display on this field
|
|
44
|
+
* The placement of helper text depends on the value of helperTextPlacement prop
|
|
45
|
+
*/
|
|
46
|
+
helperText?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The placement of the helper text either below the field or in a tooltip
|
|
49
|
+
*
|
|
50
|
+
* @default "tooltip"
|
|
51
|
+
*/
|
|
52
|
+
helperTextPlacement?: "bottom" | "tooltip";
|
|
53
|
+
/**
|
|
54
|
+
* Whether the field is disabled
|
|
55
|
+
*/
|
|
56
|
+
isDisabled?: boolean;
|
|
57
|
+
/**
|
|
58
|
+
* A callback to return a custom error message if validation failed
|
|
59
|
+
*
|
|
60
|
+
* @param validationRule the validation rule that failed with the error message
|
|
61
|
+
* @returns the error message to display
|
|
62
|
+
*/
|
|
63
|
+
onValidationError?: (error: ValidationError) => string;
|
|
64
|
+
/**
|
|
65
|
+
* Additional function to validate the field
|
|
66
|
+
*
|
|
67
|
+
* @param value the current field value
|
|
68
|
+
* @returns a boolean promise indicating whether the value is valid
|
|
69
|
+
*/
|
|
70
|
+
validate?: (value: V) => Promise<boolean>;
|
|
71
|
+
/**
|
|
72
|
+
* The component props for the form field
|
|
73
|
+
* Excludes runtime props (key, onChange) which are managed by ActionForm
|
|
74
|
+
*/
|
|
75
|
+
fieldComponentProps?: Omit<FormFieldPropsByType[C], "key" | "onChange">;
|
|
76
|
+
}
|
|
77
|
+
type ValidationError = {
|
|
78
|
+
type: ValidationRule
|
|
79
|
+
error: string
|
|
80
|
+
};
|
|
81
|
+
type ValidationRule = "required" | "min" | "max" | "minLength" | "maxLength" | "pattern" | "validate";
|
|
82
|
+
/**
|
|
83
|
+
* Maps field types to their corresponding props
|
|
84
|
+
*/
|
|
85
|
+
export interface FormFieldPropsByType {
|
|
86
|
+
DATETIME_PICKER: DatetimePickerFieldProps;
|
|
87
|
+
DROPDOWN: DropdownFieldProps<unknown>;
|
|
88
|
+
FILE_PICKER: FilePickerProps;
|
|
89
|
+
NUMBER_INPUT: NumberInputFieldProps;
|
|
90
|
+
OBJECT_SET: ObjectSetFieldProps<ObjectTypeDefinition>;
|
|
91
|
+
RADIO_BUTTONS: RadioButtonsFieldProps<unknown>;
|
|
92
|
+
TEXT_AREA: TextAreaFieldProps;
|
|
93
|
+
TEXT_INPUT: TextInputFieldProps;
|
|
94
|
+
CUSTOM: CustomFieldProps<unknown>;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Datetime picker field props
|
|
98
|
+
*/
|
|
99
|
+
export interface DatetimePickerFieldProps extends BaseFormFieldProps<Date> {
|
|
100
|
+
fieldComponent: "DATETIME_PICKER";
|
|
101
|
+
/**
|
|
102
|
+
* The earliest date the user can select
|
|
103
|
+
* If provided, this will be added to the field validation
|
|
104
|
+
*/
|
|
105
|
+
min?: Date;
|
|
106
|
+
/**
|
|
107
|
+
* The latest date the user can select
|
|
108
|
+
* If provided, this will be added to the field validation
|
|
109
|
+
*/
|
|
110
|
+
max?: Date;
|
|
111
|
+
/**
|
|
112
|
+
* Whether to show time picker
|
|
113
|
+
*/
|
|
114
|
+
showTime?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Function to format the date string
|
|
117
|
+
*/
|
|
118
|
+
formatDate?: (date: Date) => string;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Dropdown field props with selectable options
|
|
122
|
+
*/
|
|
123
|
+
export interface DropdownFieldProps<
|
|
124
|
+
V,
|
|
125
|
+
IsMulti extends boolean = false
|
|
126
|
+
> extends BaseFormFieldProps<IsMulti extends true ? V[] : V> {
|
|
127
|
+
fieldComponent: "DROPDOWN";
|
|
128
|
+
/**
|
|
129
|
+
* Available options for the dropdown
|
|
130
|
+
*/
|
|
131
|
+
options: Option<V>[];
|
|
132
|
+
/**
|
|
133
|
+
* Whether the dropdown allows searching/filtering
|
|
134
|
+
*/
|
|
135
|
+
isSearchable?: boolean;
|
|
136
|
+
/**
|
|
137
|
+
* Whether multiple values can be selected
|
|
138
|
+
*/
|
|
139
|
+
isMulti?: boolean;
|
|
140
|
+
}
|
|
141
|
+
export interface FilePickerProps extends BaseFormFieldProps<File | File[]> {
|
|
142
|
+
fieldComponent: "FILE_PICKER";
|
|
143
|
+
/**
|
|
144
|
+
* Whether multiple files can be selected
|
|
145
|
+
*/
|
|
146
|
+
isMulti?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Accepted file types (e.g., "image/*", ".pdf")
|
|
149
|
+
*/
|
|
150
|
+
accept?: string | string[];
|
|
151
|
+
/**
|
|
152
|
+
* Maximum file size in bytes
|
|
153
|
+
*/
|
|
154
|
+
maxSize?: number;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Text area field props
|
|
158
|
+
*/
|
|
159
|
+
export interface TextAreaFieldProps extends BaseFormFieldProps<string>, Pick<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "rows" | "wrap" | "minLength" | "maxLength"> {
|
|
160
|
+
fieldComponent: "TEXT_AREA";
|
|
161
|
+
}
|
|
162
|
+
export interface TextInputFieldProps extends BaseFormFieldProps<string>, Pick<React.InputHTMLAttributes<HTMLInputElement>, "minLength" | "maxLength"> {
|
|
163
|
+
fieldComponent: "TEXT_INPUT";
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Number input field props
|
|
167
|
+
*/
|
|
168
|
+
export interface NumberInputFieldProps extends BaseFormFieldProps<number>, Pick<React.InputHTMLAttributes<HTMLInputElement>, "min" | "max" | "step"> {
|
|
169
|
+
fieldComponent: "NUMBER_INPUT";
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Radio buttons field props
|
|
173
|
+
*/
|
|
174
|
+
export interface RadioButtonsFieldProps<V> extends BaseFormFieldProps<V> {
|
|
175
|
+
fieldComponent: "RADIO_BUTTONS";
|
|
176
|
+
/**
|
|
177
|
+
* Available options for radio buttons
|
|
178
|
+
*/
|
|
179
|
+
options: Option<V>[];
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Option interface for dropdown and radio options
|
|
183
|
+
*/
|
|
184
|
+
export interface Option<V> {
|
|
185
|
+
label: string;
|
|
186
|
+
value: V;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Object set field displays the summary of the count of the given object set
|
|
190
|
+
*/
|
|
191
|
+
export interface ObjectSetFieldProps<T extends ObjectTypeDefinition> extends BaseFormFieldProps<ObjectSet<T>> {
|
|
192
|
+
fieldComponent: "OBJECT_SET";
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Custom field props for user-defined renderers
|
|
196
|
+
*/
|
|
197
|
+
export interface CustomFieldProps<V> extends BaseFormFieldProps<V> {
|
|
198
|
+
fieldComponent: "CUSTOM";
|
|
199
|
+
/**
|
|
200
|
+
* Custom renderer function
|
|
201
|
+
*/
|
|
202
|
+
customRenderer: (props: BaseFormFieldProps<V>) => React.ReactNode;
|
|
203
|
+
}
|
|
204
|
+
export interface BaseFormFieldProps<V> {
|
|
205
|
+
fieldComponent: FieldComponent;
|
|
206
|
+
/**
|
|
207
|
+
* Called when the field value changed.
|
|
208
|
+
*
|
|
209
|
+
* ActionForm internally wraps this to pass the key to onFieldValueChanged:
|
|
210
|
+
* ```
|
|
211
|
+
* <DropdownField
|
|
212
|
+
* {...fieldDef}
|
|
213
|
+
* onChange={(value) => onFieldValueChanged(fieldDef.key, value)}
|
|
214
|
+
* />
|
|
215
|
+
* ```
|
|
216
|
+
*
|
|
217
|
+
* @param value The new value of the form field
|
|
218
|
+
*/
|
|
219
|
+
onChange?: (value?: V) => void;
|
|
220
|
+
}
|
|
221
|
+
export type FieldKey<Q extends ActionDefinition<unknown>> = keyof ActionParameters<Q>;
|
|
222
|
+
/**
|
|
223
|
+
* Extracts parameters from an ActionDefinition
|
|
224
|
+
*/
|
|
225
|
+
export type ActionParameters<Q extends ActionDefinition<unknown>> = CompileTimeMetadata<Q>["parameters"];
|
|
226
|
+
/**
|
|
227
|
+
* Extracts the value type for a specific parameter
|
|
228
|
+
*/
|
|
229
|
+
export type FieldValueType<
|
|
230
|
+
Q extends ActionDefinition<unknown> = ActionDefinition<unknown>,
|
|
231
|
+
K extends keyof ActionParameters<Q> = keyof ActionParameters<Q>
|
|
232
|
+
> = ActionParameters<Q>[K]["type"];
|
|
233
|
+
/**
|
|
234
|
+
* Available form field component types
|
|
235
|
+
*/
|
|
236
|
+
export type FieldComponent = "DATETIME_PICKER" | "DROPDOWN" | "FILE_PICKER" | "NUMBER_INPUT" | "RADIO_BUTTONS" | "OBJECT_SET" | "TEXT_AREA" | "TEXT_INPUT" | "CUSTOM";
|
|
237
|
+
/**
|
|
238
|
+
* Gets valid form field types for a given property type
|
|
239
|
+
*/
|
|
240
|
+
export type ValidFormFieldForPropertyType<P extends FieldValueType> = P extends "objectSet" ? "OBJECT_SET" : P extends "object" ? "DROPDOWN" : P extends "mediaReference" | "attachment" ? "FILE_PICKER" : P extends "boolean" ? "RADIO_BUTTONS" | "DROPDOWN" : P extends "string" ? "TEXT_INPUT" | "TEXT_AREA" : P extends "datetime" | "timestamp" ? "DATETIME_PICKER" : P extends "double" | "integer" | "long" | "float" | "short" | "byte" | "decimal" ? "NUMBER_INPUT" : never;
|
|
241
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":"AAgBA,cACE,kBACA,qBACA,WACA,4BACK,WAAY;AACnB,YAAY,WAAW,OAAQ;;;;AAK/B,iBAAiB;CACf,UAAU;CACV,UAAU,SAAS,KAAK,SAAS;CACjC,UAAU,eAAe,GAAG,KAAK,eAAe,GAAG;CACnD,UAAU,8BAA8B,KAAK,8BAA8B;EAC3E;;;;CAIA,UAAU;;;;;CAMV;;;;;CAMA,QAAQ;;;;CAKR,eAAe;;;;CAKf,gBAAgB;;;;CAKhB;;;;CAKA;;;;;CAMA;;;;;;CAOA,sBAAsB,WAAW;;;;CAKjC;;;;;;;CAQA,qBAAqBA,OAAO;;;;;;;CAQ5B,YAAYC,OAAO,MAAM;;;;;CAMzB,sBAAsB,KAAK,qBAAqB,IAAI,QAAQ;AAC7D;KAEI,kBAAkB;CAAE,MAAM;CAAgB;AAAe;KAEzD,iBACD,aACA,QACA,QACA,cACA,cACA,YACA;;;;AAKJ,iBAAiB,qBAAqB;CACpC,iBAAiB;CACjB,UAAU;CACV,aAAa;CACb,cAAc;CACd,YAAY,oBAAoB;CAChC,eAAe;CACf,WAAW;CACX,YAAY;CACZ,QAAQ;AACT;;;;AAKD,iBAAiB,iCAAiC,mBAAmB,MAAM;CACzE,gBAAgB;;;;;CAMhB,MAAM;;;;;CAMN,MAAM;;;;CAKN;;;;CAKA,cAAcC,MAAM;AACrB;;;;AAKD,iBAAiB;CAAmB;CAAG,0BAA0B;UACvD,mBAAmB,gBAAgB,OAAO,MAAM,GAC1D;CACE,gBAAgB;;;;CAKhB,SAAS,OAAO;;;;CAKhB;;;;CAKA;AACD;AAED,iBAAiB,wBAAwB,mBAAmB,OAAO,QAAQ;CACzE,gBAAgB;;;;CAKhB;;;;CAKA;;;;CAKA;AACD;;;;AAKD,iBAAiB,2BACf,4BACA,KACE,MAAM,uBAAuB,sBAC3B,SACA,SAIA,cAIA,aAEN;CACE,gBAAgB;AACjB;AAED,iBAAiB,4BACf,4BACA,KACE,MAAM,oBAAoB,mBAIxB,cAIA,aAEN;CACE,gBAAgB;AACjB;;;;AAKD,iBAAiB,8BACf,4BACA,KACE,MAAM,oBAAoB,mBAIxB,QAIA,QACA,QAEN;CACE,gBAAgB;AACjB;;;;AAKD,iBAAiB,uBAAuB,WAAW,mBAAmB,GAAG;CACvE,gBAAgB;;;;CAKhB,SAAS,OAAO;AACjB;;;;AAKD,iBAAiB,OAAO,GAAG;CACzB;CACA,OAAO;AACR;;;;AAKD,iBAAiB,oBAAoB,UAAU,8BACrC,mBAAmB,UAAU,IACvC;CACE,gBAAgB;AACjB;;;;AAKD,iBAAiB,iBAAiB,WAAW,mBAAmB,GAAG;CACjE,gBAAgB;;;;CAKhB,iBAAiBC,OAAO,mBAAmB,OAAO,MAAM;AACzD;AAED,iBAAiB,mBAAmB,GAAG;CACrC,gBAAgB;;;;;;;;;;;;;;CAehB,YAAYC,QAAQ;AACrB;AAED,YAAY,SAAS,UAAU,mCACvB,iBAAiB;;;;AAKzB,YAAY,iBAAiB,UAAU,6BACrC,oBAAoB,GAAG;;;;AAKzB,YAAY;CACV,UAAU,4BAA4B;CACtC,gBAAgB,iBAAiB,WAAW,iBAAiB;IAC3D,iBAAiB,GAAG,GAAG;;;;AAK3B,YAAY,iBACR,oBACA,aACA,gBACA,iBACA,kBACA,eACA,cACA,eACA;;;;AAKJ,YAAY,8BAA8B,UAAU,kBAAkB,UACpE,cAAc,eACZ,UAAU,WAAW,aACrB,UAAU,mBAAmB,eAAe,gBAC5C,UAAU,YAAY,kBAAkB,aACxC,UAAU,WAAW,eAAe,cACpC,UAAU,aAAa,cAAc,oBACrC,UACE,WACA,YACA,SACA,UACA,UACA,SACA,YAAY","names":["error: ValidationError","value: V","date: Date","props: BaseFormFieldProps<V>","value?: V"],"sources":["../../../src/action-form/FormFieldApi.ts"],"version":3,"file":"FormFieldApi.d.ts"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osdk/react-components",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.6",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,11 +58,11 @@
|
|
|
58
58
|
"p-defer": "^4.0.1",
|
|
59
59
|
"react": "^18.3.1",
|
|
60
60
|
"typescript": "~5.5.4",
|
|
61
|
+
"@osdk/monorepo.api-extractor": "~0.6.0-beta.1",
|
|
61
62
|
"@osdk/client": "2.7.0-beta.14",
|
|
62
63
|
"@osdk/monorepo.tsconfig": "~0.6.0-beta.1",
|
|
63
64
|
"@osdk/api": "2.7.0-beta.14",
|
|
64
|
-
"@osdk/
|
|
65
|
-
"@osdk/react": "0.9.0-beta.9"
|
|
65
|
+
"@osdk/react": "0.9.0-beta.10"
|
|
66
66
|
},
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|