Skip to content

Commit 6c71ca1

Browse files
authored
Merge pull request #12 from workfloworchestrator/1663-code-cleanup
1663 code cleanup
2 parents 5467159 + 4b13be2 commit 6c71ca1

27 files changed

+59
-674
lines changed

frontend/apps/example/src/app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client';
22

3-
import PydanticForm from 'pydantic-forms';
3+
import { PydanticForm } from 'pydantic-forms';
44
import type { PydanticFormProvider } from 'pydantic-forms';
55

66
import styles from './page.module.css';

frontend/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/packages/pydantic-forms/src/PydanticForm.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Dynamic Forms
2+
* Pydantic Forms
33
*
44
* Main form wrap component
55
*
@@ -21,8 +21,12 @@ export interface PydanticFormProps
2121
metaData?: PydanticFormMetaData;
2222
}
2323

24-
const PydanticForm = ({ id, metaData, ...contextProps }: PydanticFormProps) => (
25-
<div e2e-id={`dynamicforms-${id}`}>
24+
export const PydanticForm = ({
25+
id,
26+
metaData,
27+
...contextProps
28+
}: PydanticFormProps) => (
29+
<div e2e-id={`pydanticforms-${id}`}>
2630
<PydanticFormContextProvider
2731
{...contextProps}
2832
formKey={id}

frontend/packages/pydantic-forms/src/components/config.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Dynamic Forms
2+
* Pydantic Forms
33
*
44
* We will search for the first field that returns a positive match
55
* The last field has no matcher, so it will match as the default
@@ -8,15 +8,6 @@ import TextField from '@/components/fields/TextField';
88
import { PydanticFormFieldConfig } from '@/types';
99

1010
const fieldsConfig: PydanticFormFieldConfig[] = [
11-
/*
12-
{
13-
id: 'textarea',
14-
Component: DFTextArea,
15-
matcher(field) {
16-
return field.format === DfFieldFormats.LONG;
17-
},
18-
},
19-
*/
2011
// no matcher, last in array,
2112
// so its the final fallback
2213
{

frontend/packages/pydantic-forms/src/components/fields/FieldWrap.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import ResetNullableFieldTrigger from '@/components/form/ResetNullableFieldTrigg
1313
import { usePydanticFormContext } from '@/core';
1414
import { PydanticFormField } from '@/types';
1515

16-
// import { FormField, IconButton, IconInfo } from "@lib/rijkshuisstijl"
1716
import { FormRow } from './FormRow';
1817

1918
interface FieldWrapProps {

frontend/packages/pydantic-forms/src/components/fields/TextField.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import {
1919
PydanticFormInputFieldProps,
2020
} from '@/types';
2121

22-
// import { TextField } from '@rijkshuisstijl-community/web-components-react'
23-
2422
interface TextFieldProps {
2523
value: string;
2624
onChangeValue: (val: string) => void;

frontend/packages/pydantic-forms/src/components/form/Footer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Dynamic Forms
2+
* Pydantic Forms
33
*
44
* Form footer component
55
*/
@@ -43,7 +43,7 @@ const Footer = () => {
4343
{resetButtonAlternative ?? (
4444
<button
4545
type="button"
46-
e2e-id="dynamicforms-reset-btn"
46+
e2e-id="pydanticforms-reset-btn"
4747
onClick={(e) => {
4848
resetForm(e);
4949
}}
@@ -75,14 +75,14 @@ const Footer = () => {
7575
<button
7676
type="button"
7777
onClick={onCancel}
78-
e2e-id="dynamicforms-cancel-btn"
78+
e2e-id="pydanticforms-cancel-btn"
7979
>
8080
Annuleren
8181
</button>
8282
))}
8383

8484
<button
85-
e2e-id="dynamicforms-send-btn"
85+
e2e-id="pydanticforms-send-btn"
8686
type="submit"
8787
disabled={
8888
!rhf.formState.isValid ||

frontend/packages/pydantic-forms/src/components/form/Form.module.scss

Lines changed: 0 additions & 24 deletions
This file was deleted.

frontend/packages/pydantic-forms/src/components/form/RenderForm.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Dynamic Forms
2+
* Pydantic Forms
33
*
44
* Main form component
55
*

frontend/packages/pydantic-forms/src/components/render/DfFieldController.tsx

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)