Skip to content

Commit

Permalink
Update to formik 2.4.2
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Ohlsen <[email protected]>
  • Loading branch information
ohltyler committed Oct 17, 2023
1 parent 31358bd commit eeb35a5
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 71 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
]
},
"dependencies": {
"formik": "^2.4.5",
"formik": "2.4.2",
"reactflow": "^11.8.3",
"yup": "^1.3.2"
},
Expand Down
71 changes: 38 additions & 33 deletions public/pages/workflow_detail/workspace/component_details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
EuiEmptyPrompt,
EuiText,
} from '@elastic/eui';
import { Formik, Field, Form, FormikHelpers } from 'formik';
import { ReactFlowComponent } from '../../../../common';
import { rfContext } from '../../../store';
import { InputFieldList } from '../workspace_component/input_field_list';
Expand Down Expand Up @@ -60,40 +61,44 @@ export function ComponentDetails(props: ComponentDetailsProps) {
});

return (
<EuiFlexGroup
direction="column"
gutterSize="none"
className="workspace-panel"
>
<EuiFlexItem className="resizable-panel-border">
<EuiPanel paddingSize="m">
{selectedComponent ? (
<>
<EuiTitle size="m">
<h2>{selectedComponent?.data.label || ''}</h2>
</EuiTitle>
<EuiSpacer size="s" />
<InputFieldList
inputFields={selectedComponent?.data.fields || []}
/>
</>
) : (
<EuiEmptyPrompt
iconType={'cross'}
title={<h2>No component selected</h2>}
titleSize="s"
body={
<Formik initialValues={{}} onSubmit={() => {}}>
<Form>
<EuiFlexGroup
direction="column"
gutterSize="none"
className="workspace-panel"
>
<EuiFlexItem className="resizable-panel-border">
<EuiPanel paddingSize="m">
{selectedComponent ? (
<>
<EuiText>
Add a component, or select a component to view or edit its
configuration.
</EuiText>
<EuiTitle size="m">
<h2>{selectedComponent?.data.label || ''}</h2>
</EuiTitle>
<EuiSpacer size="s" />
<InputFieldList
inputFields={selectedComponent?.data.fields || []}
/>
</>
}
/>
)}
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
) : (
<EuiEmptyPrompt
iconType={'cross'}
title={<h2>No component selected</h2>}
titleSize="s"
body={
<>
<EuiText>
Add a component, or select a component to view or edit
its configuration.
</EuiText>
</>
}
/>
)}
</EuiPanel>
</EuiFlexItem>
</EuiFlexGroup>
</Form>
</Formik>
);
}
41 changes: 4 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -283,33 +283,6 @@
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.11.tgz#012c17cb2256ad8de78560da851ab914a7b9b40e"
integrity sha512-L7A0AINMXQpVwxHJ4jxD6/XjZ4NDufaRlUJHjNIFKYUFBH1SvOW+neaqb0VTRSLW5suSrSu19ObFEFnfNcr+qg==

"@types/hoist-non-react-statics@^3.3.1":
version "3.3.3"
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.3.tgz#8bb41d9a88164f82dd2745ff05e637e655f34d19"
integrity sha512-Wny3a2UXn5FEA1l7gc6BbpoV5mD1XijZqgkp4TRgDCDL5r3B5ieOFGUX5h3n78Tr1MEG7BfvoM8qeztdvNU0fw==
dependencies:
"@types/react" "*"
hoist-non-react-statics "^3.3.0"

"@types/prop-types@*":
version "15.7.8"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.8.tgz#805eae6e8f41bd19e88917d2ea200dc992f405d3"
integrity sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==

"@types/react@*":
version "18.2.28"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.28.tgz#86877465c0fcf751659a36c769ecedfcfacee332"
integrity sha512-ad4aa/RaaJS3hyGz0BGegdnSRXQBkd1CCYDCdNjBPg90UUpLgo+WlJqb9fMYUxtehmzF3PJaTWqRZjko6BRzBg==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/scheduler@*":
version "0.16.4"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.4.tgz#fedc3e5b15c26dc18faae96bf1317487cb3658cf"
integrity sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==

buffer-from@^1.0.0:
version "1.1.2"
resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz"
Expand Down Expand Up @@ -344,11 +317,6 @@ cross-spawn@^5.0.1:
shebang-command "^1.2.0"
which "^1.2.9"

csstype@^3.0.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.2.tgz#1d4bf9d572f11c14031f0436e1c10bc1f571f50b"
integrity sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==

"d3-color@1 - 3":
version "3.1.0"
resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2"
Expand Down Expand Up @@ -416,12 +384,11 @@ deepmerge@^2.1.1:
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170"
integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA==

formik@^2.4.5:
version "2.4.5"
resolved "https://registry.yarnpkg.com/formik/-/formik-2.4.5.tgz#f899b5b7a6f103a8fabb679823e8fafc7e0ee1b4"
integrity sha512-Gxlht0TD3vVdzMDHwkiNZqJ7Mvg77xQNfmBRrNtvzcHZs72TJppSTDKHpImCMJZwcWPBJ8jSQQ95GJzXFf1nAQ==
[email protected].2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/formik/-/formik-2.4.2.tgz#a1115457cfb012a5c782cea3ad4b40b2fe36fa18"
integrity sha512-C6nx0hifW2uENP3M6HpPmnAE6HFWCcd8/sqBZEOHZY6lpHJ5qehsfAy43ktpFLEmkBmhiZDei726utcUB9leqg==
dependencies:
"@types/hoist-non-react-statics" "^3.3.1"
deepmerge "^2.1.1"
hoist-non-react-statics "^3.3.0"
lodash "^4.17.21"
Expand Down

0 comments on commit eeb35a5

Please sign in to comment.