Skip to content

Commit a345e23

Browse files
committed
feat(antd): migrate to new build process.
1 parent ccf469e commit a345e23

File tree

105 files changed

+260
-238
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+260
-238
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../common/.gitignore
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../common/.npmignore

packages/ant-component-mapper/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ For using Data Driven Forms in your component you need the renderer and a compon
5656

5757
```jsx
5858
import React from 'react';
59-
import FormRenderer, { componentTypes } from '@data-driven-forms/react-form-renderer';
59+
import { FormRenderer, componentTypes } from '@data-driven-forms/react-form-renderer';
6060
import { componentMapper, layoutMapper } from '@data-driven-forms/ant-component-mapper';
6161

6262
const schema = {

packages/ant-component-mapper/demo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
import React, { useState } from 'react';
33
import ReactDOM from 'react-dom';
4-
import FormRenderer from '@data-driven-forms/react-form-renderer';
4+
import { FormRenderer } from '@data-driven-forms/react-form-renderer';
55
import 'antd/dist/antd.css';
66
import './style.css';
77
import demoSchema from '@data-driven-forms/common/src/demoschema';

packages/ant-component-mapper/package.json

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,20 @@
22
"name": "@data-driven-forms/ant-component-mapper",
33
"version": "2.17.0",
44
"description": "Component mapper for Ant Design component mapper form data-driven-forms.",
5-
"main": "dist/cjs/index.js",
6-
"module": "dist/esm/index.js",
7-
"typings": "dist/cjs/index.d.ts",
5+
"main": "index.js",
6+
"module": "esm/index.js",
7+
"typings": "index.d.ts",
88
"license": "Apache-2.0",
99
"scripts": {
1010
"start": "webpack-dev-server --env dev --config ./config/webpack.config.js --open --hot",
11-
"build": "yarn build:cjs && yarn build:esm && yarn build:umd && yarn build:typings",
12-
"build:cjs": "BABEL_ENV=cjs rollup -c ./rollup.config.js --format=cjs --environment FORMAT:cjs",
13-
"build:esm": "BABEL_ENV=esm rollup -c ./rollup.config.js --format=esm --environment FORMAT:esm",
14-
"build:umd": "rollup -c ./rollup.config.js --format=umd --environment FORMAT:umd",
11+
"build": "yarn build:cjs && yarn build:esm && yarn build:typings && yarn build:packages",
12+
"build:cjs": "BABEL_ENV=cjs babel src --out-dir ./ --ignore \"src/tests/*\"",
13+
"build:esm": "BABEL_ENV=esm babel src --out-dir ./esm --ignore \"src/tests/*\"",
14+
"build:typings": "node ../../scripts/generate-typings.js",
15+
"build:packages": "node ../../scripts/generate-packages.js",
1516
"vendor": "webpack --env vendor --config ./config/webpack.config.js",
16-
"release": "semantic-release",
17-
"build:typings": "node ../../scripts/copy-files.js"
17+
"release": "semantic-release"
1818
},
19-
"files": [
20-
"dist/"
21-
],
2219
"repository": "[email protected]:data-driven-forms/react-forms.git",
2320
"devDependencies": {
2421
"@babel/core": "^7.1.6",
@@ -48,8 +45,6 @@
4845
"react-dom": "^16.13.0",
4946
"regenerator-runtime": "^0.12.1",
5047
"resolve-url-loader": "^3.0.0",
51-
"rollup-plugin-sourcemaps": "^0.5.0",
52-
"rollup-pluginutils": "^2.8.2",
5348
"sass-loader": "^7.1.0",
5449
"semantic-release": "17.2.3",
5550
"style-loader": "^0.23.1",

packages/ant-component-mapper/rollup.config.js

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

packages/ant-component-mapper/src/files/checkbox.d.ts renamed to packages/ant-component-mapper/src/checkbox/checkbox.d.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { AnyObject } from "@data-driven-forms/react-form-renderer";
22
import { ReactNode } from "react";
3-
import { FormGroupProps } from "./form-group";
4-
53
import { CheckboxProps as AndCheckboxProps } from 'antd/es/checkbox/Checkbox';
4+
import { FormGroupProps } from "../form-group";
65

76
export interface CheckboxOption extends AnyObject {
87
value?: any;

packages/ant-component-mapper/src/files/checkbox.js renamed to packages/ant-component-mapper/src/checkbox/checkbox.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React from 'react';
22
import PropTypes from 'prop-types';
33
import { Checkbox as AntCheckbox } from 'antd';
4-
import MultipleChoiceList from '../common/multiple-choice-list';
4+
import MultipleChoiceList from '../multiple-choice-list/multiple-choice-list';
55
import { useFieldApi } from '@data-driven-forms/react-form-renderer';
6-
import IsRequired from '../common/is-required';
7-
import AntForm from '../common/form-wrapper';
6+
import IsRequired from '../is-required';
7+
import FormGroup from '../form-group';
88

99
export const SingleCheckbox = (props) => {
1010
const { input, isReadOnly, isDisabled, isRequired, label, helperText, description, validateOnMount, meta, FormItemProps, ...rest } = useFieldApi({
@@ -13,7 +13,7 @@ export const SingleCheckbox = (props) => {
1313
});
1414

1515
return (
16-
<AntForm
16+
<FormGroup
1717
label={label}
1818
meta={meta}
1919
validateOnMount={validateOnMount}
@@ -33,7 +33,7 @@ export const SingleCheckbox = (props) => {
3333
>
3434
{isRequired ? <IsRequired>{label}</IsRequired> : label}
3535
</AntCheckbox>
36-
</AntForm>
36+
</FormGroup>
3737
);
3838
};
3939

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default } from './checkbox';
2+
export * from './checkbox';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { default } from './checkbox';
2+
export * from './checkbox';

0 commit comments

Comments
 (0)