Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Typescript generics support in all themes in the beta #3072

Closed
4 tasks done
heath-freenome opened this issue Aug 30, 2022 · 0 comments · Fixed by #3319, #3327, #3329, #3338 or #3355
Closed
4 tasks done

Fix Typescript generics support in all themes in the beta #3072

heath-freenome opened this issue Aug 30, 2022 · 0 comments · Fixed by #3319, #3327, #3329, #3338 or #3355
Assignees
Labels
bug p1 Important to fix soon

Comments

@heath-freenome
Copy link
Collaborator

Prerequisites

What theme are you using?

core

Version

5.0.0.beta.2

Current Behavior

None of the themes are properly supporting the passing through of generics, even core's getDefaultRegistry() does not do it properly

Expected Behavior

Users can add generics on their Form and they will be properly spread onto all of the components

Steps To Reproduce

No response

Environment

- OS:
- Node:
- npm:

Anything else?

No response

@heath-freenome heath-freenome added the p1 Important to fix soon label Sep 23, 2022
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Oct 31, 2022
- partial fix for rjsf-team#3072 by adding the new `FormContextType` and extending the `F` generic from it
- Updated `@rjsf/utils` to add the new `FormContextType` and update all types and functions to extend the `F` generic from it
- Updated `@rjsf/core` to update all uses of the `F` generic to extend `FormContextType`
- Updated the documentation around `F` accordingly
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Oct 31, 2022
- partial fix for rjsf-team#3072 by adding the new `FormContextType` and extending the `F` generic from it
- Updated `@rjsf/utils` to add the new `FormContextType` and update all types and functions to extend the `F` generic from it
- Updated `@rjsf/core` to update all uses of the `F` generic to extend `FormContextType`
- Updated the documentation around `F` accordingly
  - Also fixed an issue where the `<S` notation in Markdown caused strike-through formatting by changing it to `\<S`
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Oct 31, 2022
#3220)

- partial fix for #3072 by adding the new `FormContextType` and extending the `F` generic from it
- Updated `@rjsf/utils` to add the new `FormContextType` and update all types and functions to extend the `F` generic from it
- Updated `@rjsf/core` to update all uses of the `F` generic to extend `FormContextType`
- Updated the documentation around `F` accordingly
  - Also fixed an issue where the `<S` notation in Markdown caused strike-through formatting by changing it to `\<S`
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Dec 28, 2022
partially fix: rjsf-team#3072 by adding generic type support to the mui theme
- In `@rjsf/core` added a few missing generics to utility function calls in `SubmitButton` and `SelectWidget`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Fixed the number of new packages listes in the upgrade guide from 3 to 4
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Dec 28, 2022
partially fix: rjsf-team#3072 by adding generic type support to the mui theme
- In `@rjsf/core` added a few missing generics to utility function calls in `CheckboxWidget`, `ObjectFieldTemplate`, `SubmitButton` and `SelectWidget`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Fixed the number of new packages listes in the upgrade guide from 3 to 4
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Dec 28, 2022
partially fix: rjsf-team#3072 by adding generic type support to the mui theme
- In `@rjsf/core` added a few missing generics to utility function calls in `CheckboxWidget`, `ObjectFieldTemplate`, `SubmitButton` and `SelectWidget`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Fixed the number of new packages listes in the upgrade guide from 3 to 4
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Dec 29, 2022
partially fix: #3072 by adding generic type support to the mui theme
- In `@rjsf/core` added a few missing generics to utility function calls in `CheckboxWidget`, `ObjectFieldTemplate`, `SubmitButton` and `SelectWidget`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Fixed the number of new packages listes in the upgrade guide from 3 to 4
- Updated the `CHANGELOG.md` accordingly
nickgros added a commit to nickgros/react-jsonschema-form that referenced this issue Dec 29, 2022
- Partially fix rjsf-team#3072
- Extract ChakraIconButton to its own file to abstract away React.memo
- Refactor AltDateWidget to extract DateElement component
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Dec 30, 2022
partially fix: rjsf-team#3072 by adding generic type support to the `material-ui` theme as follows:

- In `@rjsf/material-ui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Jan 3, 2023
partially fix: rjsf-team#3072 by adding generic type support to the `antd` theme as follows:

- In `@rjsf/antd` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Converted the three components that used the `withConfigConsumer()` HOC to instead use the `<ConfigConsumer>` component to generate the prefixCls
  - Added a `generateForm<T, S, F>()` function to main `index.ts`, exporting it and exporting the default `Form` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the main `index.ts`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateTemplates()` and `generateWidgets()` functions
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Jan 3, 2023
partially fix: rjsf-team#3072 by adding generic type support to the `antd` theme as follows:

- In `@rjsf/antd` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Converted the three components that used the `withConfigConsumer()` HOC to instead use the `<ConfigConsumer>` component to generate the prefixCls
  - Added a `generateForm<T, S, F>()` function to main `index.ts`, exporting it and exporting the default `Form` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the main `index.ts`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateTemplates()` and `generateWidgets()` functions
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Jan 4, 2023
partially fix: #3072 by adding generic type support to the `material-ui` theme as follows:

- In `@rjsf/material-ui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Jan 4, 2023
partially fix: #3072 by adding generic type support to the `antd` theme as follows:

- In `@rjsf/antd` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Converted the three components that used the `withConfigConsumer()` HOC to instead use the `<ConfigConsumer>` component to generate the prefixCls
  - Added a `generateForm<T, S, F>()` function to main `index.ts`, exporting it and exporting the default `Form` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the main `index.ts`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateTemplates()` and `generateWidgets()` functions
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Jan 6, 2023
* Generic support for Chakra UI
- Partially fix #3072
- Extract ChakraIconButton to its own file to abstract away React.memo
- Refactor AltDateWidget to extract DateElement component

* Changes from code review

* Update packages/chakra-ui/src/IconButton/index.ts

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Jan 7, 2023
partially fix: rjsf-team#3072

- Fixed a broken example in `custom-templates.md`
- Fixed broken links in the `form-props.md`
- Added a new `typescript.md` file to `advanced-customization` to document using custom generics
- Updated `mkdocs.yml` to replacing `Contributing` with the new `typescript.md` file under `Advanced Customization`, moving `Contributing` from the bottom to be after `Quickstart`
  - Also moved all of the `Migration Guides` into its own subsection
- Updated the `CHANGELOG.md` file accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Jan 7, 2023
partially fix: rjsf-team#3072

- Fixed a broken example in `custom-templates.md`
- Fixed broken links in the `form-props.md`
- Added a new `typescript.md` file to `advanced-customization` to document using custom generics
- Updated `mkdocs.yml` to replacing `Contributing` with the new `typescript.md` file under `Advanced Customization`, moving `Contributing` from the bottom to be after `Quickstart`
  - Also moved all of the `Migration Guides` into its own subsection
- Updated the `CHANGELOG.md` file accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Jan 7, 2023
partially fix: rjsf-team#3072 by adding generic type support to the semantic-ui theme as follows:

- In `@rjsf/utils` added a missing generic to the `EnumOptionsType` in the `WidgetProps`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `SemanticUIForm.tsx`, exporting it and exporting the default `SemanticUIForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
  - Updated the types and functions in the `utils.ts` file to add the generics
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Jan 7, 2023
partially fix: rjsf-team#3072 by adding generic type support to the semantic-ui theme as follows:

- In `@rjsf/utils` added a missing generic to the `EnumOptionsType` in the `WidgetProps`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `SemanticUIForm.tsx`, exporting it and exporting the default `SemanticUIForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
  - Updated the types and functions in the `utils.ts` file to add the generics
- Updated the `CHANGELOG.md` accordingly
nickgros added a commit to nickgros/react-jsonschema-form that referenced this issue Jan 7, 2023
heath-freenome added a commit that referenced this issue Jan 7, 2023
partially fix: #3072 by adding generic type support to the semantic-ui theme as follows:

- In `@rjsf/utils` added a missing generic to the `EnumOptionsType` in the `WidgetProps`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `SemanticUIForm.tsx`, exporting it and exporting the default `SemanticUIForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
  - Updated the types and functions in the `utils.ts` file to add the generics
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Jan 8, 2023
partially fix: #3072

- Fixed a broken example in `custom-templates.md`
- Fixed broken links in the `form-props.md`
- Added a new `typescript.md` file to `advanced-customization` to document using custom generics
- Updated `mkdocs.yml` to replacing `Contributing` with the new `typescript.md` file under `Advanced Customization`, moving `Contributing` from the bottom to be after `Quickstart`
  - Also moved all of the `Migration Guides` into its own subsection
- Updated the `CHANGELOG.md` file accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
partially fix: rjsf-team#3072 by adding generic type support to the mui theme
- In `@rjsf/core` added a few missing generics to utility function calls in `CheckboxWidget`, `ObjectFieldTemplate`, `SubmitButton` and `SelectWidget`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Fixed the number of new packages listes in the upgrade guide from 3 to 4
- Updated the `CHANGELOG.md` accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
partially fix: rjsf-team#3072 by adding generic type support to the `material-ui` theme as follows:

- In `@rjsf/material-ui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Updated the `CHANGELOG.md` accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
partially fix: rjsf-team#3072 by adding generic type support to the `antd` theme as follows:

- In `@rjsf/antd` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Converted the three components that used the `withConfigConsumer()` HOC to instead use the `<ConfigConsumer>` component to generate the prefixCls
  - Added a `generateForm<T, S, F>()` function to main `index.ts`, exporting it and exporting the default `Form` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the main `index.ts`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateTemplates()` and `generateWidgets()` functions
- Updated the `CHANGELOG.md` accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
* Generic support for Chakra UI
- Partially fix rjsf-team#3072
- Extract ChakraIconButton to its own file to abstract away React.memo
- Refactor AltDateWidget to extract DateElement component

* Changes from code review

* Update packages/chakra-ui/src/IconButton/index.ts

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
partially fix: rjsf-team#3072 by adding generic type support to the semantic-ui theme as follows:

- In `@rjsf/utils` added a missing generic to the `EnumOptionsType` in the `WidgetProps`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `SemanticUIForm.tsx`, exporting it and exporting the default `SemanticUIForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
  - Updated the types and functions in the `utils.ts` file to add the generics
- Updated the `CHANGELOG.md` accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
…m#3355)

partially fix: rjsf-team#3072

- Fixed a broken example in `custom-templates.md`
- Fixed broken links in the `form-props.md`
- Added a new `typescript.md` file to `advanced-customization` to document using custom generics
- Updated `mkdocs.yml` to replacing `Contributing` with the new `typescript.md` file under `Advanced Customization`, moving `Contributing` from the bottom to be after `Quickstart`
  - Also moved all of the `Migration Guides` into its own subsection
- Updated the `CHANGELOG.md` file accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
partially fix: rjsf-team#3072 by adding generic type support to the mui theme
- In `@rjsf/core` added a few missing generics to utility function calls in `CheckboxWidget`, `ObjectFieldTemplate`, `SubmitButton` and `SelectWidget`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Fixed the number of new packages listes in the upgrade guide from 3 to 4
- Updated the `CHANGELOG.md` accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
partially fix: rjsf-team#3072 by adding generic type support to the `material-ui` theme as follows:

- In `@rjsf/material-ui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `MuiForm.tsx`, exporting it and exporting the default `MuiForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
- Updated the `CHANGELOG.md` accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
partially fix: rjsf-team#3072 by adding generic type support to the `antd` theme as follows:

- In `@rjsf/antd` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Converted the three components that used the `withConfigConsumer()` HOC to instead use the `<ConfigConsumer>` component to generate the prefixCls
  - Added a `generateForm<T, S, F>()` function to main `index.ts`, exporting it and exporting the default `Form` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the main `index.ts`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateTemplates()` and `generateWidgets()` functions
- Updated the `CHANGELOG.md` accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
* Generic support for Chakra UI
- Partially fix rjsf-team#3072
- Extract ChakraIconButton to its own file to abstract away React.memo
- Refactor AltDateWidget to extract DateElement component

* Changes from code review

* Update packages/chakra-ui/src/IconButton/index.ts

Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
partially fix: rjsf-team#3072 by adding generic type support to the semantic-ui theme as follows:

- In `@rjsf/utils` added a missing generic to the `EnumOptionsType` in the `WidgetProps`
- In `@rjsf/mui` added generic type support as follows:
  - Updated all of the template and widget components to add the `T = any`, `S extends StrictRJSFSchema = RJSFSchema` and `F extends FormContextType = any` generics on the function definitions, types and utility function calls
  - Added a `generateForm<T, S, F>()` function to `SemanticUIForm.tsx`, exporting it and exporting the default `SemanticUIForm` as a call to `generateForm()`
  - Added a `generateTemplates<T, S, F>()` function to the `Templates.tsx`, exporting it and exporting the default `Templates` as a call to `generateTemplates()`
  - Added a `generateTheme<T, S, F>()` function to the `Theme.tsx`, exporting it and exporting the default `Theme` as a call to `generateTheme()`
  - Added a `generateWidgets<T, S, F>()` function to the `Widgets.tsx`, exporting it and exporting the default `Widgets` as a call to `generateWidgets()`
  - Updated the main `index.ts` for the theme to also export the `generateXXX()` functions
  - Updated the types and functions in the `utils.ts` file to add the generics
- Updated the `CHANGELOG.md` accordingly
shijistar pushed a commit to shijistar/react-jsonschema-form that referenced this issue Jun 8, 2023
…m#3355)

partially fix: rjsf-team#3072

- Fixed a broken example in `custom-templates.md`
- Fixed broken links in the `form-props.md`
- Added a new `typescript.md` file to `advanced-customization` to document using custom generics
- Updated `mkdocs.yml` to replacing `Contributing` with the new `typescript.md` file under `Advanced Customization`, moving `Contributing` from the bottom to be after `Quickstart`
  - Also moved all of the `Migration Guides` into its own subsection
- Updated the `CHANGELOG.md` file accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment