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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/antd/src/templates/ArrayFieldItemTemplate/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, Col, Row } from 'antd';
import {
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
getUiOptions,
getTemplate,
Expand All @@ -24,7 +24,7 @@ export default function ArrayFieldItemTemplate<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any
>(props: ArrayFieldTemplateItemType<T, S, F>) {
>(props: ArrayFieldItemTemplateType<T, S, F>) {
const { children, buttonsProps, hasToolbar, index, registry, uiSchema } = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(
Expand Down
4 changes: 2 additions & 2 deletions packages/antd/src/templates/ArrayFieldTemplate/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
getTemplate,
getUiOptions,
ArrayFieldTemplateProps,
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
GenericObjectType,
RJSFSchema,
Expand Down Expand Up @@ -100,7 +100,7 @@ export default function ArrayFieldTemplate<
)}
<Col className='row array-item-list' span={24}>
{items &&
items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => (
items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType<T, S, F>) => (
<ArrayFieldItemTemplate key={key} {...itemProps} />
))}
</Col>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, ButtonGroup, HStack } from '@chakra-ui/react';
import {
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
getTemplate,
getUiOptions,
Expand All @@ -12,7 +12,7 @@ export default function ArrayFieldItemTemplate<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any
>(props: ArrayFieldTemplateItemType<T, S, F>) {
>(props: ArrayFieldItemTemplateType<T, S, F>) {
const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Box, Grid, GridItem } from '@chakra-ui/react';
import {
getTemplate,
getUiOptions,
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
ArrayFieldTemplateProps,
StrictRJSFSchema,
RJSFSchema,
Expand Down Expand Up @@ -57,7 +57,7 @@ export default function ArrayFieldTemplate<
<Grid key={`array-item-list-${idSchema.$id}`}>
<GridItem>
{items.length > 0 &&
items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => (
items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType<T, S, F>) => (
<ArrayFieldItemTemplate key={key} {...itemProps} />
))}
</GridItem>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CSSProperties } from 'react';
import {
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
getTemplate,
getUiOptions,
Expand All @@ -16,7 +16,7 @@ export default function ArrayFieldItemTemplate<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any
>(props: ArrayFieldTemplateItemType<T, S, F>) {
>(props: ArrayFieldItemTemplateType<T, S, F>) {
const { children, className, buttonsProps, hasToolbar, registry, uiSchema } = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/components/templates/ArrayFieldTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
getTemplate,
getUiOptions,
ArrayFieldTemplateProps,
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
RJSFSchema,
StrictRJSFSchema,
Expand Down Expand Up @@ -71,7 +71,7 @@ export default function ArrayFieldTemplate<
/>
<div className='row array-item-list'>
{items &&
items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => (
items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType<T, S, F>) => (
<ArrayFieldItemTemplate key={key} {...itemProps} />
))}
</div>
Expand Down
1 change: 0 additions & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@docusaurus/preset-classic": "^2.4.3",
"@mdx-js/react": "^1.6.22",
"ajv": "^8.12.0",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
3 changes: 1 addition & 2 deletions packages/docs/src/components/HomepageFeatures/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import clsx from 'clsx';
import styles from './styles.module.css';

type FeatureItem = {
Expand Down Expand Up @@ -43,7 +42,7 @@ const FeatureList: FeatureItem[] = [

function Feature({ title, Svg, description }: FeatureItem) {
return (
<div className={clsx('col col--4')}>
<div className='col col--4'>
<div className='text--center'>
<Svg className={styles.featureSvg} role='img' />
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
getTemplate,
getUiOptions,
Expand All @@ -25,7 +25,7 @@ export default function ArrayFieldItemTemplate<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any
>(props: ArrayFieldTemplateItemType<T, S, F>) {
>(props: ArrayFieldItemTemplateType<T, S, F>) {
const classes = useStyles();
const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
getTemplate,
getUiOptions,
ArrayFieldTemplateProps,
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
RJSFSchema,
StrictRJSFSchema,
Expand Down Expand Up @@ -68,7 +68,7 @@ export default function ArrayFieldTemplate<
/>
<Flex column key={`array-item-list-${idSchema.$id}`} className={classes.arrayItemList}>
{items &&
items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => (
items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType<T, S, F>) => (
<ArrayFieldItemTemplate key={key} {...itemProps} />
))}
{canAdd && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Box from '@mui/material/Box';
import Grid2 from '@mui/material/Grid2';
import Paper from '@mui/material/Paper';
import {
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
getUiOptions,
getTemplate,
Expand All @@ -19,7 +19,7 @@ export default function ArrayFieldItemTemplate<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any
>(props: ArrayFieldTemplateItemType<T, S, F>) {
>(props: ArrayFieldItemTemplateType<T, S, F>) {
const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(
Expand Down
4 changes: 2 additions & 2 deletions packages/mui/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getTemplate,
getUiOptions,
ArrayFieldTemplateProps,
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
RJSFSchema,
StrictRJSFSchema,
Expand Down Expand Up @@ -62,7 +62,7 @@ export default function ArrayFieldTemplate<
registry={registry}
/>
{items &&
items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => (
items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType<T, S, F>) => (
<ArrayFieldItemTemplate key={key} {...itemProps} />
))}
{canAdd && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CSSProperties } from 'react';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import {
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
getTemplate,
getUiOptions,
Expand All @@ -14,7 +14,7 @@ export default function ArrayFieldItemTemplate<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any
>(props: ArrayFieldTemplateItemType<T, S, F>) {
>(props: ArrayFieldItemTemplateType<T, S, F>) {
const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import Container from 'react-bootstrap/Container';
import {
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
ArrayFieldTemplateProps,
buttonId,
FormContextType,
Expand Down Expand Up @@ -60,7 +60,7 @@ export default function ArrayFieldTemplate<
/>
<Container fluid key={`array-item-list-${idSchema.$id}`} className='p-0 m-0'>
{items &&
items.map(({ key, ...itemProps }: ArrayFieldTemplateItemType<T, S, F>) => (
items.map(({ key, ...itemProps }: ArrayFieldItemTemplateType<T, S, F>) => (
<ArrayFieldItemTemplate key={key} {...itemProps} />
))}
{canAdd && (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
GenericObjectType,
RJSFSchema,
Expand All @@ -24,7 +24,7 @@ export default function ArrayFieldItemTemplate<
T = any,
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any
>(props: ArrayFieldTemplateItemType<T, S, F>) {
>(props: ArrayFieldItemTemplateType<T, S, F>) {
const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;
const uiOptions = getUiOptions<T, S, F>(uiSchema);
const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
getUiOptions,
isFixedItems,
ArrayFieldTemplateProps,
ArrayFieldTemplateItemType,
ArrayFieldItemTemplateType,
FormContextType,
RJSFSchema,
StrictRJSFSchema,
Expand Down Expand Up @@ -86,7 +86,7 @@ export default function ArrayFieldTemplate<
<div key={`array-item-list-${idSchema.$id}`}>
<div className='row array-item-list'>
{items &&
items.map(({ key, uiSchema: itemUiSchema = {}, ...props }: ArrayFieldTemplateItemType<T, S, F>) => {
items.map(({ key, uiSchema: itemUiSchema = {}, ...props }: ArrayFieldItemTemplateType<T, S, F>) => {
// Merge in the semantic props from the ArrayFieldTemplate into each of the items
const mergedUiSchema = {
...itemUiSchema,
Expand Down
1 change: 1 addition & 0 deletions packages/utils/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
browsers: ['chrome', 'firefox', 'safari'],
},
testMatch: ['**/test/**/*.test.ts?(x)'],
transformIgnorePatterns: [`/node_modules/(?!nanoid)`],
coverageDirectory: '<rootDir>/coverage/',
collectCoverage: true,
coveragePathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/test'],
Expand Down
1 change: 1 addition & 0 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"jsonpointer": "^5.0.1",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"nanoid": "^3.3.7",
"react-is": "^18.2.0"
},
"devDependencies": {
Expand Down
Loading