Skip to content

Commit

Permalink
fix: import paths
Browse files Browse the repository at this point in the history
  • Loading branch information
nzambello committed Mar 17, 2021
1 parent e9ca9bb commit 9fde60d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/Field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import CheckboxWidget from '@plone/volto/components/manage/Widgets/CheckboxWidge
import FileWidget from '@plone/volto/components/manage/Widgets/FileWidget';
import { DatetimeWidget } from '@plone/volto/components';

import RadioWidget from 'volto-form-block/components/Widget/RadioWidget';
import RadioWidget from './Widget/RadioWidget';

import './Field.css';

Expand Down
4 changes: 2 additions & 2 deletions src/components/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useState, useEffect, useReducer } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import PropTypes from 'prop-types';
import { useIntl, defineMessages } from 'react-intl';
import { submitForm } from 'volto-form-block/actions';
import { getFieldName } from 'volto-form-block/components/utils';
import { submitForm } from '../actions';
import { getFieldName } from './utils';
import FormView from 'volto-form-block/components/FormView';

const messages = defineMessages({
Expand Down
2 changes: 1 addition & 1 deletion src/components/FormView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Progress,
Button,
} from 'semantic-ui-react';
import { getFieldName } from 'volto-form-block/components/utils';
import { getFieldName } from './utils';
import Field from 'volto-form-block/components/Field';

const messages = defineMessages({
Expand Down
6 changes: 1 addition & 5 deletions src/components/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ import downSVG from '@plone/volto/icons/down-key.svg';
import downloadSVG from '@plone/volto/icons/download.svg';
import deleteSVG from '@plone/volto/icons/delete.svg';

import {
getFormData,
exportCsvFormData,
clearFormData,
} from 'volto-form-block/actions';
import { getFormData, exportCsvFormData, clearFormData } from '../actions';

const messages = defineMessages({
default_to: {
Expand Down
24 changes: 20 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import formSVG from '@plone/volto/icons/form.svg';
import FormView from './components/View';
import FormEdit from './components/Edit';
import View from './components/View';
import Edit from './components/Edit';
import FormView from './components/FormView';
import Sidebar from './components/Sidebar';
import EditBlock from './components/EditBlock';
import Field from './components/Field';
import { downloadFile, getFieldName } from './components/utils';
import {
submitForm,
getFormData,
exportCsvFormData,
clearFormData,
} from './reducers';
export { submitForm, getFormData, exportCsvFormData } from './actions';

const applyConfig = (config) => {
config.blocks.blocksConfig = {
Expand All @@ -16,8 +22,8 @@ const applyConfig = (config) => {
title: 'Form',
icon: formSVG,
group: 'text',
view: FormView,
edit: FormEdit,
view: View,
edit: Edit,
restricted: false,
mostUsed: true,
security: {
Expand All @@ -40,3 +46,13 @@ const applyConfig = (config) => {
};

export default applyConfig;
export {
View,
Edit,
Sidebar,
FormView,
EditBlock,
Field,
downloadFile,
getFieldName,
};

0 comments on commit 9fde60d

Please sign in to comment.