openpanel/packages/inferencer/CHANGELOG.md
Stefan Pejcic 09f9f9502d packages
2024-11-07 19:03:37 +01:00

82 KiB

@refinedev/mantine

4.7.1

Patch Changes

4.7.0

Minor Changes

Patch Changes

4.6.6

Patch Changes

4.6.4

Patch Changes

4.6.3

Patch Changes

4.6.2

Patch Changes

  • #5928 db9756e7908 Thanks @aliemir! - fix: type errors on typescript <5

    Due to the changes in #5881, typescript users below version 5 are facing type errors. This PR fixes the type errors by updating the file extensions required by the d.mts declaration files to provide a compatible declarations for both typescript 4 and 5 users.

  • Updated dependencies [db9756e7908]:

    • @refinedev/core@4.49.2

4.6.1

Patch Changes

4.6.0

Minor Changes

  • #5761 399911617b2 Thanks @aliemir! - Migrated from outdated @tabler/icons@1 to @tabler/icons-react@3 to make sure we're using the latest available version of the library without requiring users to pin to a deprecated version.

    If your project doesn't include @tabler/icons you won't be affected by this change. If you're using @tabler/icons@1 in your project, you may need to update your dependency to latest version of @tabler/icons-react to avoid conflicting dependencies. Practically, this should not introduce any breaking changes to your project and all the icons in @tabler/icons@1 should also be available in the latest version of @tabler/icons-react.

Patch Changes

  • #5765 0c197d82393 Thanks @aliemir! - fix: @tabler/icons-react imports in CJS builds

    imports from @tabler/icons-react end up requiring the ESM build in CJS environments, to prevent this we've added added an esbuild plugin to replace the imports with the correct path for CJS bundles.

  • #5765 0c197d82393 Thanks @aliemir! - refactor: package bundles and package.json configuration for exports

    Previously, Refine packages had exported ESM and CJS bundles with same .js extension and same types for both with .d.ts extensions. This was causing issues with bundlers and compilers to pick up the wrong files for the wrong environment. Now we're outputting ESM bundles with .mjs extension and CJS bundles with .cjs extension. Also types are now exported with both .d.mts and .d.cts extensions.

    In older versions ESM and CJS outputs of some packages were using wrong imports/requires to dependencies causing errors in some environments. This will be fixed since now we're also enforcing the module type with extensions.

    Above mentioned changes also supported with changes in package.json files of the packages to support the new extensions and types. All Refine packages now include exports fields in their configuration to make sure the correct bundle is picked up by the bundlers and compilers.

  • #5765 0c197d82393 Thanks @aliemir! - Fixed the lodash-es imports for ESM builds to access the exports properly.

  • #5754 56ed144a0f5 Thanks @alicanerdurmaz! - chore: TypeScript upgraded to v5.x.x. #5752

  • #5739 e9bbb1aa5af Thanks @aliemir! - Removed redundant usage of IResourceComponentsProps type in generated components. This type only works with legacy routers and <RefineRoutes /> component, its usage outside of these scopes are unnecessary.

  • #5765 0c197d82393 Thanks @aliemir! - fix: broken eslint plugin for removing test ids from components

    Eslint plugin to remove test ids from components was broken and might miss some test ids to be included in the bundles.

  • Updated dependencies [4e8188a6652, 10ba9c34490, 2b5ac6f5409, 0c197d82393, 0c197d82393, 404b2ef5e1b, 56ed144a0f5, 0c197d82393, 10ba9c34490, 38f129f40ee, f32512b9042]:

    • @refinedev/core@4.49.0

4.5.21

Patch Changes

4.5.20

Patch Changes

4.5.19

Patch Changes

  • #5592 b10a66b58d Thanks @BatuhanW! - fix: add graphql package as dependency.

    New projects created with create refine-app is failing to start due to missing graphql package.

4.5.18

Patch Changes

4.5.17

Patch Changes

  • #5373 dff476ca41 Thanks @aliemir! - Show and List type inferencers were failing to provide a preview when there's a relational property without a presentational key. Updated generated code blocks to handle fields with no accessor keys and display a placeholder message instead. Fixes #5184

  • #5373 dff476ca41 Thanks @aliemir! - Fixed the issue of wrongfully assuming id key of relational fields in Chakra UI and Headless edit inferencers. Fixes #5274

  • #5373 dff476ca41 Thanks @aliemir! - Even though id is required for Refine to work properly, in some list queries there may not be an id field. Material UI Datagrid requires an identifier for each row, if there's no id field, we're fallbacking to the first key of the row. Fixes the errors thrown for this case in Material UI List inferencers.

  • #5373 dff476ca41 Thanks @aliemir! - Updated the object field inferencer to check for fields end with name and label and use them as the display name for the field. Previously the check was done for a predefined set of properties, now it's done for any property that ends with name or label which results with more accurate code generation.

  • Updated dependencies [75bb61dd3b, 93e00fd770, e5888b6b9c, b621223bfb, 19ceffbe9f]:

    • @refinedev/core@4.46.2

4.5.16

Patch Changes

4.5.15

Patch Changes

4.5.14

Patch Changes

  • #5022 80513a4e42f Thanks @BatuhanW! - chore: update README.md

    • fix grammar errors.
    • make all README.md files consistent.
    • add code example code snippets.
  • Updated dependencies []:

    • @refinedev/core@4.42.4

4.5.13

Patch Changes

  • #5022 80513a4e42f Thanks @BatuhanW! - chore: update README.md

    • fix grammar errors.
    • make all README.md files consistent.
    • add code example code snippets.
  • Updated dependencies []:

    • @refinedev/core@4.42.3

4.5.12

Patch Changes

  • #4975 ff66a862e46 Thanks @aliemir! - Updated dependency of @tabler/icons to v1.119.0 to fix the issue of using misconfigured versions. (Fixes #4921)

  • Updated dependencies [d8e464fa2c4]:

    • @refinedev/core@4.42.0

4.5.11

Patch Changes

  • #4975 ff66a862e46 Thanks @aliemir! - Updated dependency of @tabler/icons to v1.119.0 to fix the issue of using misconfigured versions. (Fixes #4921)

4.5.10

Patch Changes

4.5.9

Patch Changes

4.5.8

Patch Changes

  • #4951 04837c62077 Thanks @aliemir! - - Update build configuration for esbuild to use the shared plugins.
    • Fix the lodash replacement plugin to skip redundant files.
  • Updated dependencies [04837c62077]:
    • @refinedev/core@4.38.4

4.5.7

Patch Changes

  • #4951 04837c62077 Thanks @aliemir! - - Update build configuration for esbuild to use the shared plugins.
    • Fix the lodash replacement plugin to skip redundant files.
  • Updated dependencies [04837c62077]:
    • @refinedev/core@4.38.3

4.5.6

Patch Changes

4.5.5

Patch Changes

4.5.4

Patch Changes

  • #4797 a680aea865b Thanks @yildirayunlu! - fix: relation fields are not correctly inferred for show views

    Shows title for category without using the useOne hook when showing the category key.

    {
        "title": "My title",
        "description": "My description",
        "category": {
            "id": 1,
            "name": "My category"
        }
    }
    

4.5.3

Patch Changes

  • #4797 a680aea865b Thanks @yildirayunlu! - fix: relation fields are not correctly inferred for show views

    Shows title for category without using the useOne hook when showing the category key.

    {
        "title": "My title",
        "description": "My description",
        "category": {
            "id": 1,
            "name": "My category"
        }
    }
    

4.5.2

Patch Changes

4.5.1

Patch Changes

4.5.0

Minor Changes

  • #4741 026ccf34356 Thanks @aliemir! - Added sideEffects: false to package.json to help bundlers tree-shake unused code.

Patch Changes

  • Updated dependencies [026ccf34356]:
    • @refinedev/core@4.32.0

4.4.0

Minor Changes

  • #4741 026ccf34356 Thanks @aliemir! - Added sideEffects: false to package.json to help bundlers tree-shake unused code.

Patch Changes

  • Updated dependencies [026ccf34356]:
    • @refinedev/core@4.31.0

4.3.4

Patch Changes

  • #4717 c1c10e5d7bd Thanks @aliemir! - Added a classname to the inferencer's code viewer component to determine a simple selector for the code viewer.

4.3.3

Patch Changes

  • #4717 c1c10e5d7bd Thanks @aliemir! - Added a classname to the inferencer's code viewer component to determine a simple selector for the code viewer.

4.3.2

Patch Changes

  • #4634 5de50a6af75 Thanks @aliemir! - Added an additional info log and a link to the documentation into the inferencer components after relation requests are made.

  • Updated dependencies [03597ed8a9a]:

    • @refinedev/core@4.26.4

4.3.1

Patch Changes

  • #4634 5de50a6af75 Thanks @aliemir! - Added an additional info log and a link to the documentation into the inferencer components after relation requests are made.

  • Updated dependencies [03597ed8a9a]:

    • @refinedev/core@4.26.3

4.3.0

Minor Changes

Patch Changes

  • #4601 090653717d6 Thanks @aliemir! - Updated inferencer functions to check for relational fields with representable values. If the inferencer type is show or list, the inferencer will use the available properties to show the field instead of trying to fetch the relational data.

    // posts/1
    {
        id: 1,
        name: "Post 1",
        tags: [
            {
                id: 5,
                name: "Tag 5"
            },
            {
                id: 6,
                name: "Tag 6"
            }
        ],
        content: "...",
    }
    

    Above structure will show the tags field in list and show inferencers using the name property instead of trying to fetch the relational data. But edit and create inferencers will still work with the relational data.

  • Updated dependencies [c3c0deed564, 8c2b3be35b0, 5bb6f47a4d4]:

    • @refinedev/core@4.26.0

4.2.0

Minor Changes

Patch Changes

  • #4601 090653717d6 Thanks @aliemir! - Updated inferencer functions to check for relational fields with representable values. If the inferencer type is show or list, the inferencer will use the available properties to show the field instead of trying to fetch the relational data.

    // posts/1
    {
        id: 1,
        name: "Post 1",
        tags: [
            {
                id: 5,
                name: "Tag 5"
            },
            {
                id: 6,
                name: "Tag 6"
            }
        ],
        content: "...",
    }
    

    Above structure will show the tags field in list and show inferencers using the name property instead of trying to fetch the relational data. But edit and create inferencers will still work with the relational data.

  • Updated dependencies [5bb6f47a4d4]:

    • @refinedev/core@4.25.1

4.1.4

Patch Changes

4.1.3

Patch Changes

4.1.2

Patch Changes

4.1.1

Patch Changes

4.1.0

Minor Changes

  • #4454 4bae8add99f Thanks @aliemir! - According to the changes made in @refinedev/mui to support the latest version of the @mui/x-data-grid package, we've updated the @refinedev/inferencer package to support the changes in the generated codes. While the usage of the components did not change, the generated code in Material UI inferencer components have changed.

    Breaking Changes

    With this release, the peer dependency of @refinedev/mui is updated to ^5.0.0 and the peer dependency of @mui/x-data-grid is updated to ^6.6.0.

Patch Changes

  • #4454 4bae8add99f Thanks @aliemir! - Updated the ListInferencer logic to check for canDelete property in resource definitions to decide whether to include DeleteButton in the actions column of the List view or not.

  • Updated dependencies [c82006f712a]:

    • @refinedev/core@4.20.0

4.0.0

Major Changes

  • #4454 4bae8add99f Thanks @aliemir! - According to the changes made in @refinedev/mui to support the latest version of the @mui/x-data-grid package, we've updated the @refinedev/inferencer package to support the changes in the generated codes. While the usage of the components did not change, the generated code in Material UI inferencer components have changed.

    Breaking Changes

    With this release, the peer dependency of @refinedev/mui is updated to ^5.0.0 and the peer dependency of @mui/x-data-grid is updated to ^6.6.0.

Patch Changes

3.5.8

Patch Changes

3.5.7

Patch Changes

3.5.6

Patch Changes

3.5.5

Patch Changes

  • #4402 4c41be2a2ae Thanks @aliemir! - Added missing translate function dependency to the table hooks if i18n is enabled.

3.5.4

Patch Changes

  • #4398 8a424c227a8 Thanks @aliemir! - Updated the type imports in the files to get the tsc working for the type definitions in the dist folder. This will fix the issue with the components not being properly typed in user projects.

3.5.3

Patch Changes

  • #4398 8a424c227a8 Thanks @aliemir! - Updated the type imports in the files to get the tsc working for the type definitions in the dist folder. This will fix the issue with the components not being properly typed in user projects.

3.5.2

Patch Changes

3.5.1

Patch Changes

3.5.0

Minor Changes

  • #4382 83ff1076f5c Thanks @aliemir! - Updated the inference process for list and create actions to use all items in the list instead of just the first item. This is done to avoid breaking the output when a single record is corrupted or wrongfully inferred.

    Now, for the list and create actions, each item in the list response will be used to infer the fields then the most repeated fields will be accepted as the type for the field.

Patch Changes

  • #4383 8b3137e9e9d Thanks @aliemir! - Fixed the code generation issue with Mantine's create and edit inferencers when used with meta values.

3.4.0

Minor Changes

  • #4382 83ff1076f5c Thanks @aliemir! - Updated the inference process for list and create actions to use all items in the list instead of just the first item. This is done to avoid breaking the output when a single record is corrupted or wrongfully inferred.

    Now, for the list and create actions, each item in the list response will be used to infer the fields then the most repeated fields will be accepted as the type for the field.

Patch Changes

  • #4383 8b3137e9e9d Thanks @aliemir! - Fixed the code generation issue with Mantine's create and edit inferencers when used with meta values.

3.3.6

Patch Changes

3.3.5

Patch Changes

3.3.4

Patch Changes

3.3.3

Patch Changes

3.3.2

Patch Changes

3.3.1

Patch Changes

3.3.0

Minor Changes

  • #4141 e7188abba8b Thanks @aliemir! - ## meta property for inferencer components

    Added meta property to the inferencer components. This allows you to pass meta to the data hooks included in the inferencer's generated code. This is useful when your data provider relies on the meta property which made @refinedev/inferencer unusable before. Now you will be able to pass meta properties and generate code that will work with your data provider.

    meta property of the inferencer components has a nested structure unlike the rest of the refine codebase. This is because the inferencer components are designed to infer the relational data as well which may require different meta values for each of their methods (such as getList and getOne).

    Type

    <AntdListInferencer
        meta={{
            [resourceNameOrIdentifier: string]: {
                [methodName: "default" | "getList" | "getMany" | "getOne" | "update"]: Record<string, unknown>,
            }
        }}
    />
    

    default is the default meta value for all the methods. In the absence of a specific meta value for a method for a resource, the default value will be used.

    Example Usage

    <AntdListInferencer
      meta={{
        posts: {
          getList: {
            fields: ["id", "title", "content", "category_id", "created_at"],
          },
        },
        categories: {
          default: {
            fields: ["id", "title"],
          },
        },
      }}
    />
    

    Using the appropriate method to infer the relational data

    The inferencer components were using the getOne method of the data providers to infer the relational field data in a record. This has a chance of breaking the generated code and the preview if the data provider implements a getMany and getOne in a different manner which may not be compatible with each other.

    In the generated code, fields with multiple values are handled via useMany hook but the inference was using the getOne method regardless of the field's cardinality. This has been fixed and the inferencer components will now use the getMany method for fields with multiple values and getOne method for fields with single values.

    Redesigned code viewer components

    Updated the code viewers components and the bottom buttons and unified the design. The code viewers now use the same components.

    Sortable actions in Material UI list inferencer

    Fixed the actions column in the Material UI list inferencer to be sortable.

    Repeated relational fields

    Added a check for repeated relational fields and excluded the duplicate fields from the generated code according to the context of the inferencer. In list and show actions fields with displayable values are preferred over the fields with relational values. In edit and create actions, fields with relational values are preferred over the fields with displayable values.

    For example, if a posts resource item has both category_id (number or string) and category (record with key title and id) fields. The list and show actions will use the category field and the edit and create actions will use the category_id field.

    Ability to hide code viewer in production

    Added an option hideCodeViewerInProduction to hide code viewer components in production environments. This is added for presentational purposes and keep in mind that the Inferencer components are not meant for production use and may generate broken code.

3.2.0

Minor Changes

  • #4141 e7188abba8b Thanks @aliemir! - ## meta property for inferencer components

    Added meta property to the inferencer components. This allows you to pass meta to the data hooks included in the inferencer's generated code. This is useful when your data provider relies on the meta property which made @refinedev/inferencer unusable before. Now you will be able to pass meta properties and generate code that will work with your data provider.

    meta property of the inferencer components has a nested structure unlike the rest of the refine codebase. This is because the inferencer components are designed to infer the relational data as well which may require different meta values for each of their methods (such as getList and getOne).

    Type

    <AntdListInferencer
        meta={{
            [resourceNameOrIdentifier: string]: {
                [methodName: "default" | "getList" | "getMany" | "getOne" | "update"]: Record<string, unknown>,
            }
        }}
    />
    

    default is the default meta value for all the methods. In the absence of a specific meta value for a method for a resource, the default value will be used.

    Example Usage

    <AntdListInferencer
      meta={{
        posts: {
          getList: {
            fields: ["id", "title", "content", "category_id", "created_at"],
          },
        },
        categories: {
          default: {
            fields: ["id", "title"],
          },
        },
      }}
    />
    

    Using the appropriate method to infer the relational data

    The inferencer components were using the getOne method of the data providers to infer the relational field data in a record. This has a chance of breaking the generated code and the preview if the data provider implements a getMany and getOne in a different manner which may not be compatible with each other.

    In the generated code, fields with multiple values are handled via useMany hook but the inference was using the getOne method regardless of the field's cardinality. This has been fixed and the inferencer components will now use the getMany method for fields with multiple values and getOne method for fields with single values.

    Redesigned code viewer components

    Updated the code viewers components and the bottom buttons and unified the design. The code viewers now use the same components.

    Sortable actions in Material UI list inferencer

    Fixed the actions column in the Material UI list inferencer to be sortable.

    Repeated relational fields

    Added a check for repeated relational fields and excluded the duplicate fields from the generated code according to the context of the inferencer. In list and show actions fields with displayable values are preferred over the fields with relational values. In edit and create actions, fields with relational values are preferred over the fields with displayable values.

    For example, if a posts resource item has both category_id (number or string) and category (record with key title and id) fields. The list and show actions will use the category field and the edit and create actions will use the category_id field.

    Ability to hide code viewer in production

    Added an option hideCodeViewerInProduction to hide code viewer components in production environments. This is added for presentational purposes and keep in mind that the Inferencer components are not meant for production use and may generate broken code.

3.1.7

Patch Changes

3.1.6

Patch Changes

3.1.5

Patch Changes

3.1.4

Patch Changes

3.1.3

Patch Changes

3.1.2

Patch Changes

3.1.1

Patch Changes

3.1.0

Minor Changes

Patch Changes

2.10.0

Minor Changes

Patch Changes

  • Updated dependencies [0baa99ba787]:
    • @pankod/refine-core@3.103.0

2.9.0

Minor Changes

Patch Changes

  • Updated dependencies [0baa99ba787]:
    • @pankod/refine-core@3.102.0

2.8.2

Patch Changes

2.8.1

Patch Changes

2.8.0

Minor Changes

  • #3622 499e9ccc2f6 Thanks @aliemir! - Additional checks are added for number field types. Now, number check still works if the field value is a string.

2.7.0

Minor Changes

  • #3622 499e9ccc2f6 Thanks @aliemir! - Additional checks are added for number field types. Now, number check still works if the field value is a string.

2.6.0

Minor Changes

  • #3600 c733eeb7449 Thanks @aliemir! - Updated Error components of inferencer to reflect the errors in a more descriptive way. #3596

Patch Changes

2.5.0

Minor Changes

  • #3600 c733eeb7449 Thanks @aliemir! - Updated Error components of inferencer to reflect the errors in a more descriptive way. #3596

2.4.1

Patch Changes

2.4.0

Minor Changes

  • #3502 92c052a8d92 Thanks @aliemir! - Export utilities used in inferencer components to let users create their own inferencer components through createInferencer function and utilities.

2.3.0

Minor Changes

  • #3502 92c052a8d92 Thanks @aliemir! - Export utilities used in inferencer components to let users create their own inferencer components through createInferencer function and utilities.

2.2.4

Patch Changes

2.2.3

Patch Changes

2.2.2

Patch Changes

2.2.1

Patch Changes

2.2.0

Minor Changes

  • #3361 abcd9a7ed6b Thanks @aliemir! - - fix: updated date inference logic to have a minimum length limit
    • feat: added headless inferencer using @pankod/refine-react-table and @pankod/refine-react-hook-form packages. exported from /headless path.

Patch Changes

2.1.0

Minor Changes

  • #3361 abcd9a7ed6b Thanks @aliemir! - - fix: updated date inference logic to have a minimum length limit
    • feat: added headless inferencer using @pankod/refine-react-table and @pankod/refine-react-hook-form packages. exported from /headless path.

Patch Changes

2.0.2

Patch Changes

  • #3340 52489a0d8bc Thanks @aliemir! - Update useInferFetch hook logic to work without id in list and create type of inferencer.

  • #3339 8c764ecc566 Thanks @aliemir! - Fix type inconsistency in useInferFetch due to changes in @pankod/refine-core's useResource hook.

  • Updated dependencies [ce6acf2b3d4]:

    • @pankod/refine-core@3.94.0

2.0.1

Patch Changes

  • #3340 52489a0d8bc Thanks @aliemir! - Update useInferFetch hook logic to work without id in list and create type of inferencer.

  • #3339 8c764ecc566 Thanks @aliemir! - Fix type inconsistency in useInferFetch due to changes in @pankod/refine-core's useResource hook.

  • Updated dependencies [ce6acf2b3d4]:

    • @pankod/refine-core@3.93.0

2.0.0

Patch Changes

1.6.1

Patch Changes

  • #3200 8c9efbd40db Thanks @aliemir! - Handle kebab-case relation suffixes for a wider case support. (e.g. category-id,category-ids)

1.6.0

Minor Changes

  • #3173 15402d3a70f Thanks @aliemir! - - Added fieldTransformer prop to inferencer components to let users transform or hide the field to be rendered.
    • Hide networks errors caused by the relation detection process.
    • Added the ability to detect relations from basic types like "text" and "number".

1.5.0

Minor Changes

  • #3173 15402d3a70f Thanks @aliemir! - - Added fieldTransformer prop to inferencer components to let users transform or hide the field to be rendered.
    • Hide networks errors caused by the relation detection process.
    • Added the ability to detect relations from basic types like "text" and "number".

1.4.0

Minor Changes

  • #3166 b41e89ea7eb Thanks @aliemir! - Replaced react-live package with a maintained fork @aliemir/react-live with TypeScript support.

1.3.0

Minor Changes

  • #3166 b41e89ea7eb Thanks @aliemir! - Replaced react-live package with a maintained fork @aliemir/react-live with TypeScript support.

1.2.2

Patch Changes

  • #3123 5e480338852 Thanks @salihozdemir! - - Removed the requirement to define resource for relations.
    • Component names and variable names are now generated primarily by label after the resource name.
    • Added a new base interface component
      - import {
      -    AntdShowInferencer,
      -    AntdEditInferencer,
      -    AntdListInferencer,
      -    AntdEditInferencer,
      - } from "@pankod/refine-inferencer/antd";
      + import { AntdInferencer } from "@pankod/refine-inferencer/antd";
      
      <Refine
          ...
          resources={[
              {
                  name: "samples",
      -           list: AntdListInferencer,
      +           list: AntdInferencer,
      -           edit: AntdEditInferencer,
      +           edit: AntdInferencer,
      -           show: AntdShowInferencer,
      +           show: AntdInferencer,
      -           create: AntdEditInferencer,
      +           create: AntdInferencer,
              },
      
          ]}
      />
      
      

1.2.1

Patch Changes

  • #3123 5e480338852 Thanks @salihozdemir! - - Removed the requirement to define resource for relations.
    • Component names and variable names are now generated primarily by label after the resource name.
    • Added a new base interface component
      - import {
      -    AntdShowInferencer,
      -    AntdEditInferencer,
      -    AntdListInferencer,
      -    AntdEditInferencer,
      - } from "@pankod/refine-inferencer/antd";
      + import { AntdInferencer } from "@pankod/refine-inferencer/antd";
      
      <Refine
          ...
          resources={[
              {
                  name: "samples",
      -           list: AntdListInferencer,
      +           list: AntdInferencer,
      -           edit: AntdEditInferencer,
      +           edit: AntdInferencer,
      -           show: AntdShowInferencer,
      +           show: AntdInferencer,
      -           create: AntdEditInferencer,
      +           create: AntdInferencer,
              },
      
          ]}
      />
      
      

1.2.0

Minor Changes

  • #3027 177d0a764fe Thanks @aliemir! - Initial release of the Inferencer package.

    This package provides series of components per each UI integration to generate list, show and edit pages for your resources. The fields and their representation are inferred from your resource's API response. Code is generated and presented with a preview and option to copy and edit in your project.

    Note: It's highly advised to only use this package in development environments. While generating the sample code, multiple requests are made to the API and the result might not be the best application for your data.

    Usage

    Components for UI integrations are exported in sub directories. For example, to use the components for Ant Design integration, you can import them like this:

    
    

    After importing the component, you can directly use it in <Refine/> component's resources prop.

    <Refine
      resources={[
        {
          name: "posts",
          list: AntdListInferencer,
          show: AntdShowInferencer,
          edit: AntdEditInferencer,
        },
      ]}
    />
    

    Tip: Relation data is only handled if the resource is present in the resources array. For example, if you have a posts resource with a users relation, you need to add users resource to the resources array as well. Otherwise, inferencer will try to show the relation data as a simple field like string or a number.

Patch Changes

  • #3064 27df262dd0a Thanks @aliemir! - Added undefined check for date field values in @pankod/refine-inferencer/antd's EditInferencer component to prevent setting it to current date when it's not provided.

1.1.0

Minor Changes

  • #3027 177d0a764fe Thanks @aliemir! - Initial release of the Inferencer package.

    This package provides series of components per each UI integration to generate list, show and edit pages for your resources. The fields and their representation are inferred from your resource's API response. Code is generated and presented with a preview and option to copy and edit in your project.

    Note: It's highly advised to only use this package in development environments. While generating the sample code, multiple requests are made to the API and the result might not be the best application for your data.

    Usage

    Components for UI integrations are exported in sub directories. For example, to use the components for Ant Design integration, you can import them like this:

    
    

    After importing the component, you can directly use it in <Refine/> component's resources prop.

    <Refine
      resources={[
        {
          name: "posts",
          list: AntdListInferencer,
          show: AntdShowInferencer,
          edit: AntdEditInferencer,
        },
      ]}
    />
    

    Tip: Relation data is only handled if the resource is present in the resources array. For example, if you have a posts resource with a users relation, you need to add users resource to the resources array as well. Otherwise, inferencer will try to show the relation data as a simple field like string or a number.

Patch Changes

  • #3064 27df262dd0a Thanks @aliemir! - Added undefined check for date field values in @pankod/refine-inferencer/antd's EditInferencer component to prevent setting it to current date when it's not provided.

1.6.11

Patch Changes

  • Add primary color to <SaveButton/>'s <ActionIcon/> component.

1.6.10

Patch Changes

1.6.9

Patch Changes

  • Fixed incorrectly used hooks in AuthPage component

1.6.8

Patch Changes

1.6.7

Patch Changes

  • Fixed responsive design for mobile devices

1.6.6

Patch Changes

1.6.5

Patch Changes

    • Added <LoadingOverlay /> component to basic view components.
    • Update goBack prop usage, now it can be passed to <ActionButton />'s children.
    • Fixed the issue that when title prop is passed to basic views, the back button is not shown.
    • Default title size decreased from h2 to h3.
  • Updated dependencies []:
    • @pankod/refine-ui-types@0.11.4

1.6.4

Patch Changes

  • #2718 d78d2a2a99 Thanks @salihozdemir! - - Added <LoadingOverlay /> component to basic view components.
    • Update goBack prop usage, now it can be passed to <ActionButton />'s children.
    • Fixed the issue that when title prop is passed to basic views, the back button is not shown.
    • Default title size decreased from h2 to h3.
  • Updated dependencies [d78d2a2a99]:
    • @pankod/refine-ui-types@0.11.3

1.6.3

Patch Changes

  • Fixed providers property empty array state in <AuthPage /> component

1.6.2

Patch Changes

  • Fixed providers property empty array state in <AuthPage /> component

1.6.1

Patch Changes

1.6.0

Minor Changes

  • Updated formProps property on <AuthPage /> component

Patch Changes

  • Added clearable prop to useSelect hook that is true by default.

1.5.0

Minor Changes

Patch Changes

1.4.0

Minor Changes

    • Added new component core and mantine support.
    • Move Auth types @pankod/refine-ui-types to @pankod/refine-core

1.3.0

Minor Changes

  • #2627 c5fb45d61f Thanks @yildirayunlu! - - Added new component core and mantine support.
    • Move Auth types @pankod/refine-ui-types to @pankod/refine-core

1.2.0

Minor Changes

  • First release of @pankod/refine-mantine 🎉

1.1.0

Minor Changes

1.0.6

Patch Changes

  • Updated dependencies []:
    • @pankod/refine-ui-types@0.11.0

1.0.5

Patch Changes

  • Updated dependencies [a65525de6f]:
    • @pankod/refine-ui-types@0.10.0

1.0.4

Patch Changes

  • Updated dependencies []:
    • @pankod/refine-ui-types@0.9.0

1.0.3

Patch Changes

  • Updated dependencies [ad99916d6d]:
    • @pankod/refine-ui-types@0.8.0

1.0.2

Patch Changes

  • Fixed version of react-router to 6.3.0

  • Updated dependencies []:

    • @pankod/refine-ui-types@0.7.0

1.0.1

Patch Changes