Skip to content

Commit

Permalink
chore(core): upgrade the version to formik 1.4.1 (#6705)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy Louie authored and jkschneider committed Mar 15, 2019
1 parent 4f826d1 commit 51eeba4
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export class LoadBalancerLocation extends React.Component<ILoadBalancerLocationP
<div className="col-md-7">
<AccountSelectInput
value={values.credentials}
onChange={evt => this.accountUpdated(evt.target.value)}
onChange={(evt: any) => this.accountUpdated(evt.target.value)}
accounts={accounts}
provider="aws"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class ServerGroupBasicSettings
<div className="col-md-7">
<AccountSelectInput
value={values.credentials}
onChange={evt => this.accountUpdated(evt.target.value)}
onChange={(evt: any) => this.accountUpdated(evt.target.value)}
readOnly={readOnlyFields.credentials}
accounts={accounts}
provider="aws"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export class CloudFoundryServerGroupConfigurationSettings
<CloudFoundryRadioButtonInput
value={direct ? 'direct' : 'artifact'}
options={[{ label: 'Artifact', value: 'artifact' }, { label: 'Form', value: 'direct' }]}
onChange={e => this.manifestSourceUpdated(e.target.value)}
onChange={(e: any) => this.manifestSourceUpdated(e.target.value)}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('<AccountSelectInput/>', () => {

it('unselects nonexistent account', function() {
let updatedVal: string = null;
const onChange = (evt: React.ChangeEvent<HTMLInputElement>) => (updatedVal = evt.target.value);
const onChange = (evt: React.ChangeEvent<any>) => (updatedVal = evt.target.value);
component = shallow(
<AccountSelectInput accounts={['prod', 'test']} provider={null} value="nonexistent" onChange={onChange} />,
);
Expand All @@ -131,7 +131,7 @@ describe('<AccountSelectInput/>', () => {
//
it('does not unselect account if account is an expression', () => {
let updatedVal: string = null;
const onChange = (evt: React.ChangeEvent<HTMLInputElement>) => (updatedVal = evt.target.value);
const onChange = (evt: React.ChangeEvent<any>) => (updatedVal = evt.target.value);
component = shallow(
<AccountSelectInput
accounts={['prod', 'test']}
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/modules/core/src/entityTag/EntityTagEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ export class EntityTagEditor extends React.Component<IEntityTagEditorProps, IEnt
label="Applies To"
required={true}
value={values.ownerOption.label}
onChange={evt => {
onChange={(evt: any) => {
const option = ownerOptions.find(opt => opt.label === evt.target.value);
setFieldValue('ownerOption', option);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class ApplyEntityTagsStageConfig extends React.Component<IApplyEntityTags
input={inputProps => (
<ReactSelectInput {...inputProps} options={this.entityOptions} clearable={false} className="full-width" />
)}
onChange={e => this.entityRefTypeChanged(e.target.value)}
onChange={(e: any) => this.entityRefTypeChanged(e.target.value)}
value={entityRef.entityType || ''}
/>
</StageConfigField>
Expand All @@ -70,7 +70,7 @@ export class ApplyEntityTagsStageConfig extends React.Component<IApplyEntityTags
<FormField
input={TextInput}
value={entityRef.entityId || ''}
onChange={e => this.entityRefFieldChanged('entityId', e.target.value)}
onChange={(e: any) => this.entityRefFieldChanged('entityId', e.target.value)}
/>
</StageConfigField>
{entityRef.entityType !== 'application' && (
Expand All @@ -86,29 +86,29 @@ export class ApplyEntityTagsStageConfig extends React.Component<IApplyEntityTags
/>
)}
value={entityRef.cloudProvider || ''}
onChange={e => this.entityRefFieldChanged('cloudProvider', e.target.value)}
onChange={(e: any) => this.entityRefFieldChanged('cloudProvider', e.target.value)}
/>
</StageConfigField>
<StageConfigField label="Account">
<FormField
input={TextInput}
value={entityRef.account || ''}
onChange={e => this.entityRefFieldChanged('account', e.target.value)}
onChange={(e: any) => this.entityRefFieldChanged('account', e.target.value)}
/>
</StageConfigField>
<StageConfigField label="Region" helpKey="pipeline.config.entitytags.region">
<FormField
input={TextInput}
value={entityRef.region || ''}
onChange={e => this.entityRefFieldChanged('region', e.target.value)}
onChange={(e: any) => this.entityRefFieldChanged('region', e.target.value)}
/>
</StageConfigField>
{entityRef.entityType === 'securitygroup' && (
<StageConfigField label="VPC Id">
<FormField
input={TextInput}
value={entityRef.vpcId || ''}
onChange={e => this.entityRefFieldChanged('vpcId', e.target.value)}
onChange={(e: any) => this.entityRefFieldChanged('vpcId', e.target.value)}
/>
</StageConfigField>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class TagEditor extends React.Component<ITagEditorProps, ITagEditorState>
<FormField
input={TextInput}
value={tag.namespace || ''}
onChange={event => this.tagValueChanged('namespace', event.target.value)}
onChange={(event: any) => this.tagValueChanged('namespace', event.target.value)}
/>
</div>
</div>
Expand All @@ -103,7 +103,7 @@ export class TagEditor extends React.Component<ITagEditorProps, ITagEditorState>
<FormField
input={TextInput}
value={tag.name || ''}
onChange={event => this.tagValueChanged('name', event.target.value)}
onChange={(event: any) => this.tagValueChanged('name', event.target.value)}
/>
</div>
</div>
Expand All @@ -119,7 +119,7 @@ export class TagEditor extends React.Component<ITagEditorProps, ITagEditorState>
<FormField
input={TextInput}
value={value || ''}
onChange={event => this.tagValueChanged('value', event.target.value)}
onChange={(event: any) => this.tagValueChanged('value', event.target.value)}
/>
</div>
</div>
Expand All @@ -130,7 +130,7 @@ export class TagEditor extends React.Component<ITagEditorProps, ITagEditorState>
<FormField
input={TextInput}
value={tag.value.message || ''}
onChange={event => this.tagValueChanged('value.message', event.target.value)}
onChange={(event: any) => this.tagValueChanged('value.message', event.target.value)}
/>
</div>
</div>
Expand All @@ -146,7 +146,7 @@ export class TagEditor extends React.Component<ITagEditorProps, ITagEditorState>
<ReactSelectInput {...inputProps} options={typeOptions} clearable={false} className="full-width" />
)}
required={true}
onChange={e => this.handleTypeChanged(e.target.value)}
onChange={(e: any) => this.handleTypeChanged(e.target.value)}
value={type}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class ProjectAttributes extends React.Component<IProjectAttributesProps,
<FormField
input={inputProps => <TextInput {...inputProps} id="projectNameForDeletion" placeholder="Project Name" />}
value={projectNameForDeletion || ''}
onChange={evt => this.setState({ projectNameForDeletion: evt.target.value })}
onChange={(evt: any) => this.setState({ projectNameForDeletion: evt.target.value })}
validate={() => matchError && 'Project name does not match'}
touched={projectNameForDeletion != null}
required={true}
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/modules/core/src/region/RegionSelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class RegionSelectField extends React.Component<IRegionSelectFieldProps>
regions={regions}
readOnly={readOnly}
value={component[field]}
onChange={evt => this.handleChange(evt)}
onChange={(evt: any) => this.handleChange(evt)}
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ export class ManifestSelector extends React.Component<IManifestSelectorProps, IM
<StageConfigField label="Account">
<AccountSelectInput
value={selector.account}
onChange={evt => this.handleAccountChange(evt.target.value)}
onChange={(evt: any) => this.handleAccountChange(evt.target.value)}
accounts={accounts}
provider="'kubernetes'"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class ManifestBasicSettings extends React.Component<IManifestBasicSetting
<div className="col-md-7">
<AccountSelectInput
value={formik.values.command.account}
onChange={evt => this.accountUpdated(evt.target.value)}
onChange={(evt: any) => this.accountUpdated(evt.target.value)}
readOnly={false}
accounts={accounts}
provider="kubernetes"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export class TitusRunJobStageConfig extends React.Component<IStageConfigProps, I
<div className="col-md-5">
<AccountSelectInput
value={stage.credentials}
onChange={evt => this.accountChanged(evt.target.value)}
onChange={(evt: any) => this.accountChanged(evt.target.value)}
accounts={credentials}
provider="titus"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class ServerGroupBasicSettings
<div className="col-md-7">
<AccountSelectInput
value={values.credentials}
onChange={evt => this.accountUpdated(evt.target.value)}
onChange={(evt: any) => this.accountUpdated(evt.target.value)}
readOnly={readOnlyFields.credentials}
accounts={accounts}
provider="titus"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"date-fns": "^1.30.1",
"diff-match-patch": "^1.0.0",
"dompurify": "^1.0.4",
"formik": "^1.3.1",
"formik": "^1.4.1",
"human-readable-ids": "^1.0.4",
"jquery": "3.3.1",
"jquery-textcomplete": "1.6.1",
Expand Down
41 changes: 18 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6143,20 +6143,20 @@ form-data@~2.3.2:
combined-stream "^1.0.6"
mime-types "^2.1.12"

formik@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/formik/-/formik-1.3.1.tgz#ff2bb4c0144585297cf9a371081326e8d816fe6f"
integrity sha512-cOTpwP4vy8bj7HhEGC2IWFFhsztBlZOJoTRgGa64NxcM30rV15ub5nTliQA3Vs8vqWSlGEc6k67SR8YZIV7pew==
formik@^1.4.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/formik/-/formik-1.5.1.tgz#ef5687e1ade5b1fe5f1d51435b422238aad107e9"
integrity sha512-FBWGBKQkcCE4d5b5l2fKccD9d1QxNxw/0bQTRvp3EjzA8Bnjmsm9H/Oy0375UA8P3FPmfJkF4cXLLdEqK7fP5A==
dependencies:
create-react-context "^0.2.2"
deepmerge "^2.1.1"
hoist-non-react-statics "^2.5.5"
lodash.clonedeep "^4.5.0"
lodash.topath "4.5.2"
lodash "^4.17.11"
lodash-es "^4.17.11"
prop-types "^15.6.1"
react-fast-compare "^1.0.0"
react-fast-compare "^2.0.1"
tiny-warning "^1.0.2"
tslib "^1.9.3"
warning "^3.0.0"

forwarded@~0.1.2:
version "0.1.2"
Expand Down Expand Up @@ -8891,16 +8891,11 @@ lodash-decorators@4.5.0, lodash-decorators@^4.4.1:
dependencies:
tslib "^1.7.1"

lodash-es@^4.17.4, lodash-es@^4.17.5, lodash-es@^4.2.1:
lodash-es@^4.17.11, lodash-es@^4.17.4, lodash-es@^4.17.5, lodash-es@^4.2.1:
version "4.17.11"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.11.tgz#145ab4a7ac5c5e52a3531fb4f310255a152b4be0"
integrity sha512-DHb1ub+rMjjrxqlB3H56/6MXtm1lSksDp2rA2cNWjG8mlDUYFhUj3Di2Zn5IwSU87xLv8tNIQ7sSwE/YOX/D/Q==

lodash.clonedeep@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=

lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
Expand Down Expand Up @@ -8941,11 +8936,6 @@ lodash.memoize@^4.1.2:
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=

lodash.topath@4.5.2:
version "4.5.2"
resolved "https://registry.yarnpkg.com/lodash.topath/-/lodash.topath-4.5.2.tgz#3616351f3bba61994a0931989660bd03254fd009"
integrity sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=

lodash.unescape@4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c"
Expand Down Expand Up @@ -11787,10 +11777,10 @@ react-dom@^0.14.8:
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-0.14.9.tgz#05064a3dcf0fb1880a3b2bfc9d58c55d8d9f6293"
integrity sha1-BQZKPc8PsYgKOyv8nVjFXY2fYpM=

react-fast-compare@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-1.0.0.tgz#813a039155e49b43ceffe99528fe5e9d97a6c938"
integrity sha512-dcQpdWr62flXQJuM8/bVEY5/10ad2SYBUafp8H4q4WHR3fTA/MMlp8mpzX12I0CCoEJc1P6QdiMg7U+7lFS6Rw==
react-fast-compare@^2.0.1:
version "2.0.4"
resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9"
integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw==

react-ga@^2.4.1:
version "2.4.1"
Expand Down Expand Up @@ -14143,6 +14133,11 @@ tiny-sdf@^1.0.2:
resolved "https://registry.yarnpkg.com/tiny-sdf/-/tiny-sdf-1.0.2.tgz#28e76985c44c4e584c4b67d8ecdd9b33a1cac28c"
integrity sha1-KOdphcRMTlhMS2fY7N2bM6HKwow=

tiny-warning@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.2.tgz#1dfae771ee1a04396bdfde27a3adcebc6b648b28"
integrity sha512-rru86D9CpQRLvsFG5XFdy0KdLAvjdQDyZCsRcuu60WtzFylDM3eAWSxEVz5kzL2Gp544XiUvPbVKtOA/txLi9Q==

tinycolor2@^1.3.0:
version "1.4.1"
resolved "https://registry.yarnpkg.com/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8"
Expand Down

0 comments on commit 51eeba4

Please sign in to comment.