Skip to content

Commit 5aba2e8

Browse files
committed
Fixing build with imports.
1 parent e9d61b0 commit 5aba2e8

File tree

13 files changed

+20
-22
lines changed

13 files changed

+20
-22
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.DS_Store
12
.bower.json
23
*.log
34
node_modules

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@formio/react",
3-
"version": "5.1.1",
3+
"version": "5.2.0-rc.1",
44
"description": "React renderer for form.io forms.",
55
"main": "lib/index.js",
66
"scripts": {

src/components/Form.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import React, {useEffect, useState} from 'react';
22
import PropTypes from 'prop-types';
33
import EventEmitter from 'eventemitter2';
4-
import AllComponents from 'formiojs/components';
5-
import Components from 'formiojs/components/Components';
6-
Components.setComponents(AllComponents);
7-
import FormioForm from 'formiojs/Form';
4+
import {Formio} from 'formiojs';
5+
const FormioForm = Formio.Form;
86

97
const Form = (props) => {
108
let instance;

src/components/FormBuilder.jsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
import React, {useEffect, useRef, useState, useCallback, useLayoutEffect} from 'react';
22
import PropTypes from 'prop-types';
3-
import AllComponents from 'formiojs/components';
4-
import Components from 'formiojs/components/Components';
5-
import FormioFormBuilder from 'formiojs/FormBuilder';
6-
7-
Components.setComponents(AllComponents);
3+
import {Formio} from 'formiojs';
4+
const FormioFormBuilder = Formio.Builder;
85

96
const FormBuilder = (props) => {
107
const builderRef = useRef();

src/components/ReactComponent.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import Field from 'formiojs/components/_classes/field/Field';
1+
import {Formio} from 'formiojs';
2+
const Field = Formio.Components.components.field;
23

34
export default class ReactComponent extends Field {
45
/**

src/components/SubmissionGrid.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import FormioUtils from 'formiojs/utils';
1+
import {Utils as FormioUtils} from 'formiojs';
22
import _get from 'lodash/get';
33
import _isFunction from 'lodash/isFunction';
44
import _isObject from 'lodash/isObject';

src/index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import Webform from 'formiojs/Webform';
2-
import WebformBuilder from 'formiojs/WebformBuilder';
3-
import Wizard from 'formiojs/Wizard';
4-
import WizardBuilder from 'formiojs/WizardBuilder';
1+
import {Formio} from 'formiojs';
2+
const Webform = Formio.Webform;
3+
const WebformBuilder = Formio.WebformBuilder;
4+
const Wizard = Formio.Wizard;
5+
const WizardBuilder = Formio.WizardBuilder;
56

67
export {
78
Webform,

src/modules/auth/actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import formiojs from 'formiojs/Formio';
1+
import {Formio as formiojs} from 'formiojs';
22
import * as type from './constants';
33

44
const requestUser = () => ({

src/modules/form/actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Formiojs from 'formiojs/Formio';
1+
import {Formio as Formiojs} from 'formiojs';
22
import * as types from './constants';
33
import {selectForm} from './selectors';
44

0 commit comments

Comments
 (0)