Skip to content

Commit

Permalink
Refactoring of file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Godlevskyi committed May 31, 2019
1 parent cd30281 commit 5b1821e
Show file tree
Hide file tree
Showing 33 changed files with 25 additions and 22 deletions.
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ export { default as ViewMetaData } from './lib/ViewMetaData';

export { default as DueDatePicker } from './lib/ChangeDueDateDialog/DueDatePicker';

export { default as NotesAccordion } from './lib/Notes/NotesAccordion';
export { default as NoteCreatePage } from './lib/Notes/NoteCreatePage';
export { default as NoteViewPage } from './lib/Notes/NoteViewPage';
export { default as NoteEditPage } from './lib/Notes/NoteEditPage';
export { default as NoteForm } from './lib/Notes/NoteForm';
export { default as NotesSmartAccordion } from './lib/Notes/NotesSmartAccordion';
4 changes: 2 additions & 2 deletions lib/Notes/NoteCreatePage/NoteCreatePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {

import { Icon } from '@folio/stripes-components';

import NoteForm from '../NoteForm';
import NoteForm from '../components/NoteForm';
import { noteTypesCollectionShape } from '../response-shapes';
import { referredEntityDataShape } from '../NoteForm/noteShapes';
import { referredEntityDataShape } from '../components/NoteForm/noteShapes';

@stripesConnect
class NoteCreatePage extends Component {
Expand Down
4 changes: 2 additions & 2 deletions lib/Notes/NoteEditPage/NoteEditPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {

import { Icon } from '@folio/stripes-components';

import NoteForm from '../NoteForm';
import NoteForm from '../components/NoteForm';
import { noteTypesCollectionShape } from '../response-shapes';
import { referredEntityDataShape } from '../NoteForm/noteShapes';
import { referredEntityDataShape } from '../components/NoteForm/noteShapes';
import { getMetadataPropsFromResponse } from '../utils';

@stripesConnect
Expand Down
2 changes: 0 additions & 2 deletions lib/Notes/NoteForm/index.js

This file was deleted.

6 changes: 3 additions & 3 deletions lib/Notes/NoteViewPage/NoteViewPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
ConfirmationModal,
} from '@folio/stripes-components';

import AssignmentsList from '../AssignmentsList';
import { NoteView } from '../NoteForm';
import AssignmentsList from '../components/AssignmentsList';
import NoteView from './components/NoteView';
import { noteShape } from '../response-shapes';
import { referredEntityDataShape } from '../NoteForm/noteShapes';
import { referredEntityDataShape } from '../components/NoteForm/noteShapes';

@stripesConnect
class NoteViewPage extends Component {
Expand Down
4 changes: 4 additions & 0 deletions lib/Notes/NoteViewPage/components/NoteView/NoteView.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.note-view-content {
margin: 0 auto;
max-width: 50rem;
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import {
KeyValue,
} from '@folio/stripes-components';

import { NOTE_LINKS_MIN_NUMBER } from '../constants';
import AssignmentsList from '../AssignmentsList';
import ReferredRecord from '../ReferredRecord';
import styles from './NoteForm.css';
import { NOTE_LINKS_MIN_NUMBER } from '../../../constants';
import AssignmentsList from '../../../components/AssignmentsList';
import ReferredRecord from '../../../components/ReferredRecord';
import styles from './NoteView.css';

import {
noteDataShape,
referredEntityDataShape,
} from './noteShapes';
} from '../../../components/NoteForm/noteShapes';

export default class NoteView extends Component {
static propTypes = {
Expand Down Expand Up @@ -214,7 +214,7 @@ export default class NoteView extends Component {
<Pane
lastMenu={this.renderExpandAllButton()}
defaultWidth="50%"
className={styles['note-form-content']}
className={styles['note-view-content']}
>
<Accordion
label={<FormattedMessage id="stripes-smart-components.notes.generalInformation" />}
Expand Down
1 change: 1 addition & 0 deletions lib/Notes/NoteViewPage/components/NoteView/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './NoteView';
2 changes: 1 addition & 1 deletion lib/Notes/NotesSmartAccordion/NotesSmartAccordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
sortOrders,
notesStatuses,
} from '../constants';
import NotesAccordion from '../NotesAccordion';
import NotesAccordion from '../components/NotesAccordion';

import { makeSearchQuery } from './utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { FormattedMessage } from 'react-intl';

import { List } from '@folio/stripes-components';
import getLinkedEntityTypesArr from '../utils/getLinkedEntityTypesArr';
import getLinkedEntityTypesArr from '../../utils/getLinkedEntityTypesArr';

import styles from './AssignmentsList.css';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
import {
MAX_TITLE_LENGTH,
MAX_DETAILS_LENGTH,
} from '../constants';
} from '../../constants';

import styles from './NoteForm.css';

Expand Down
2 changes: 2 additions & 0 deletions lib/Notes/components/NoteForm/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default } from './NoteForm';

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ import {
import {
SearchAndSortResetButton as ResetButton,
CheckboxFilter,
} from '../../../../..';
} from '../../../../../..';

import {
notesStatuses,
sortOrders,
NOTE_LINKS_MIN_NUMBER,
} from '../../../constants';
} from '../../../../constants';

import {
columnNames,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 5b1821e

Please sign in to comment.