Skip to content

Commit

Permalink
Mitigated Babel transpilation issue (fixes #692).
Browse files Browse the repository at this point in the history
  • Loading branch information
radekmie committed Mar 18, 2020
1 parent 1b364e8 commit 485e315
Show file tree
Hide file tree
Showing 25 changed files with 148 additions and 72 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Next:

- **Fixed:** Mitigated [babel/babel\#10693](https://github.com/babel/babel/issues/10693) in all remaining cases. [\#692](https://github.com/vazco/uniforms/issues/692)

## [v2.6.6](https://github.com/vazco/uniforms/tree/v2.6.6) (2020-01-22)

- **Fixed:** Mitigated [babel/babel\#10693](https://github.com/babel/babel/issues/10693). [\#638](https://github.com/vazco/uniforms/issues/638)
Expand Down
9 changes: 6 additions & 3 deletions packages/uniforms-antd/src/AutoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { AutoForm } from 'uniforms';

import ValidatedQuickForm from './ValidatedQuickForm';

const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
const Auto = (parent: any): any => {
class _ extends AutoForm.Auto(parent) {
static Auto = Auto;
};
}

return _;
};

export default Auto(ValidatedQuickForm);
9 changes: 6 additions & 3 deletions packages/uniforms-antd/src/BaseForm.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { BaseForm } from 'uniforms';

const AntD = (parent: any): any =>
class extends parent {
const AntD = (parent: any): any => {
class _ extends parent {
static AntD = AntD;

static displayName = `AntD${parent.displayName}`;
};
}

return _;
};

export default AntD(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-antd/src/QuickForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import BaseForm from './BaseForm';
import ErrorsField from './ErrorsField';
import SubmitField from './SubmitField';

const Quick = (parent: any): any =>
class extends QuickForm.Quick(parent) {
const Quick = (parent: any): any => {
class _ extends QuickForm.Quick(parent) {
static Quick = Quick;

getAutoField() {
Expand All @@ -20,6 +20,9 @@ const Quick = (parent: any): any =>
getSubmitField() {
return SubmitField;
}
};
}

return _;
};

export default Quick(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-antd/src/ValidatedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { ValidatedForm } from 'uniforms';

import BaseForm from './BaseForm';

const Validated = (parent: any): any =>
class extends ValidatedForm.Validated(parent) {
const Validated = (parent: any): any => {
class _ extends ValidatedForm.Validated(parent) {
static Validated = Validated;
};
}

return _;
};

export default Validated(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-bootstrap3/src/AutoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { AutoForm } from 'uniforms';

import ValidatedQuickForm from './ValidatedQuickForm';

const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
const Auto = (parent: any): any => {
class _ extends AutoForm.Auto(parent) {
static Auto = Auto;
};
}

return _;
};

export default Auto(ValidatedQuickForm);
9 changes: 6 additions & 3 deletions packages/uniforms-bootstrap3/src/BaseForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import PropTypes from 'prop-types';
import classnames from 'classnames';
import { BaseForm } from 'uniforms';

const Bootstrap3 = (parent: any): any =>
class extends parent {
const Bootstrap3 = (parent: any): any => {
class _ extends parent {
static Bootstrap3 = Bootstrap3;

static displayName = `Bootstrap3${parent.displayName}`;
Expand Down Expand Up @@ -43,6 +43,9 @@ const Bootstrap3 = (parent: any): any =>
),
};
}
};
}

return _;
};

export default Bootstrap3(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-bootstrap3/src/QuickForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import BaseForm from './BaseForm';
import ErrorsField from './ErrorsField';
import SubmitField from './SubmitField';

const Quick = (parent: any): any =>
class extends QuickForm.Quick(parent) {
const Quick = (parent: any): any => {
class _ extends QuickForm.Quick(parent) {
static Quick = Quick;

getAutoField() {
Expand All @@ -20,6 +20,9 @@ const Quick = (parent: any): any =>
getSubmitField() {
return SubmitField;
}
};
}

return _;
};

export default Quick(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-bootstrap3/src/ValidatedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { ValidatedForm } from 'uniforms';

import BaseForm from './BaseForm';

const Validated = (parent: any): any =>
class extends ValidatedForm.Validated(parent) {
const Validated = (parent: any): any => {
class _ extends ValidatedForm.Validated(parent) {
static Validated = Validated;
};
}

return _;
};

export default Validated(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-bootstrap4/src/AutoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { AutoForm } from 'uniforms';

import ValidatedQuickForm from './ValidatedQuickForm';

const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
const Auto = (parent: any): any => {
class _ extends AutoForm.Auto(parent) {
static Auto = Auto;
};
}

return _;
};

export default Auto(ValidatedQuickForm);
9 changes: 6 additions & 3 deletions packages/uniforms-bootstrap4/src/BaseForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import PropTypes from 'prop-types';
import classnames from 'classnames';
import { BaseForm } from 'uniforms';

const Bootstrap4 = (parent: any): any =>
class extends parent {
const Bootstrap4 = (parent: any): any => {
class _ extends parent {
static Bootstrap4 = Bootstrap4;

static displayName = `Bootstrap4${parent.displayName}`;
Expand Down Expand Up @@ -39,6 +39,9 @@ const Bootstrap4 = (parent: any): any =>
className: classnames('form', { error }, className),
};
}
};
}

return _;
};

export default Bootstrap4(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-bootstrap4/src/QuickForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import BaseForm from './BaseForm';
import ErrorsField from './ErrorsField';
import SubmitField from './SubmitField';

const Quick = (parent: any): any =>
class extends QuickForm.Quick(parent) {
const Quick = (parent: any): any => {
class _ extends QuickForm.Quick(parent) {
static Quick = Quick;

getAutoField() {
Expand All @@ -20,6 +20,9 @@ const Quick = (parent: any): any =>
getSubmitField() {
return SubmitField;
}
};
}

return _;
};

export default Quick(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-bootstrap4/src/ValidatedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { ValidatedForm } from 'uniforms';

import BaseForm from './BaseForm';

const Validated = (parent: any): any =>
class extends ValidatedForm.Validated(parent) {
const Validated = (parent: any): any => {
class _ extends ValidatedForm.Validated(parent) {
static Validated = Validated;
};
}

return _;
};

export default Validated(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-material/src/AutoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { AutoForm } from 'uniforms';

import ValidatedQuickForm from './ValidatedQuickForm';

const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
const Auto = (parent: any): any => {
class _ extends AutoForm.Auto(parent) {
static Auto = Auto;
};
}

return _;
};

export default Auto(ValidatedQuickForm);
9 changes: 6 additions & 3 deletions packages/uniforms-material/src/BaseForm.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { BaseForm } from 'uniforms';

const Material = (parent: any): any =>
class extends parent {
const Material = (parent: any): any => {
class _ extends parent {
static Material = Material;

static displayName = `Material${parent.displayName}`;
};
}

return _;
};

export default Material(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-material/src/QuickForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import BaseForm from './BaseForm';
import ErrorsField from './ErrorsField';
import SubmitField from './SubmitField';

const Quick = (parent: any): any =>
class extends QuickForm.Quick(parent) {
const Quick = (parent: any): any => {
class _ extends QuickForm.Quick(parent) {
static Quick = Quick;

getAutoField() {
Expand All @@ -20,6 +20,9 @@ const Quick = (parent: any): any =>
getSubmitField() {
return SubmitField;
}
};
}

return _;
};

export default Quick(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-material/src/ValidatedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { ValidatedForm } from 'uniforms';

import BaseForm from './BaseForm';

const Validated = (parent: any): any =>
class extends ValidatedForm.Validated(parent) {
const Validated = (parent: any): any => {
class _ extends ValidatedForm.Validated(parent) {
static Validated = Validated;
};
}

return _;
};

export default Validated(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-semantic/src/AutoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { AutoForm } from 'uniforms';

import ValidatedQuickForm from './ValidatedQuickForm';

const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
const Auto = (parent: any): any => {
class _ extends AutoForm.Auto(parent) {
static Auto = Auto;
};
}

return _;
};

export default Auto(ValidatedQuickForm);
9 changes: 6 additions & 3 deletions packages/uniforms-semantic/src/BaseForm.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import classnames from 'classnames';
import { BaseForm } from 'uniforms';

const Semantic = (parent: any): any =>
class extends parent {
const Semantic = (parent: any): any => {
class _ extends parent {
static Semantic = Semantic;

static displayName = `Semantic${parent.displayName}`;
Expand All @@ -16,6 +16,9 @@ const Semantic = (parent: any): any =>
className: classnames('ui', props.className, { error }, 'form'),
};
}
};
}

return _;
};

export default Semantic(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-semantic/src/QuickForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import BaseForm from './BaseForm';
import ErrorsField from './ErrorsField';
import SubmitField from './SubmitField';

const Quick = (parent: any): any =>
class extends QuickForm.Quick(parent) {
const Quick = (parent: any): any => {
class _ extends QuickForm.Quick(parent) {
static Quick = Quick;

getAutoField() {
Expand All @@ -20,6 +20,9 @@ const Quick = (parent: any): any =>
getSubmitField() {
return SubmitField;
}
};
}

return _;
};

export default Quick(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-semantic/src/ValidatedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { ValidatedForm } from 'uniforms';

import BaseForm from './BaseForm';

const Validated = (parent: any): any =>
class extends ValidatedForm.Validated(parent) {
const Validated = (parent: any): any => {
class _ extends ValidatedForm.Validated(parent) {
static Validated = Validated;
};
}

return _;
};

export default Validated(BaseForm);
9 changes: 6 additions & 3 deletions packages/uniforms-unstyled/src/AutoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { AutoForm } from 'uniforms';

import ValidatedQuickForm from './ValidatedQuickForm';

const Auto = (parent: any): any =>
class extends AutoForm.Auto(parent) {
const Auto = (parent: any): any => {
class _ extends AutoForm.Auto(parent) {
static Auto = Auto;
};
}

return _;
};

export default Auto(ValidatedQuickForm);
Loading

0 comments on commit 485e315

Please sign in to comment.