@onehat/ui 0.3.388 → 0.3.389
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/OneHatUi.js +2 -2
- package/src/PlatformImports/Web/Attachments.js +10 -10
- package/src/PlatformImports/Web/File.js +6 -6
- package/src/UiGlobals.js +1 -1
- package/src/components/Accordion/Accordion.js +2 -2
- package/src/components/Buttons/CartButtonWithBadge.js +1 -1
- package/src/components/Buttons/ReloadButton.js +1 -1
- package/src/components/Container/Container.js +4 -4
- package/src/components/Container/Splitter.js +2 -2
- package/src/components/Editor/Editor.js +1 -1
- package/src/components/Editor/InlineEditor.js +3 -3
- package/src/components/Filter/DateRange.js +1 -1
- package/src/components/Filter/NumberRange.js +1 -1
- package/src/components/Form/Field/Checkbox/CheckboxGroup.js +1 -1
- package/src/components/Form/Field/Color.js +2 -2
- package/src/components/Form/Field/Combo/Combo.js +4 -4
- package/src/components/Form/Field/Date.js +5 -5
- package/src/components/Form/Field/File.js +2 -2
- package/src/components/Form/Field/Json.js +2 -2
- package/src/components/Form/Field/Number.js +1 -1
- package/src/components/Form/Field/RadioGroup/RadioGroup.js +1 -1
- package/src/components/Form/Field/Slider.js +1 -1
- package/src/components/Form/Field/Tag/Tag.js +1 -1
- package/src/components/Form/Field/Tag/ValueBox.js +1 -1
- package/src/components/Form/Field/Toggle.js +1 -1
- package/src/components/Form/FieldSet.js +2 -2
- package/src/components/Form/Form.js +7 -7
- package/src/components/Form/Label.js +1 -1
- package/src/components/Grid/ColumnSelectorWindow.js +2 -2
- package/src/components/Grid/Grid.js +12 -12
- package/src/components/Grid/GridHeaderRow.js +5 -5
- package/src/components/Grid/GridRow.js +3 -3
- package/src/components/Grid/HeaderReorderHandle.js +1 -1
- package/src/components/Grid/HeaderResizeHandle.js +1 -1
- package/src/components/Grid/RowDragHandle.js +1 -1
- package/src/components/Hoc/Secondary/withSecondaryEditor.js +2 -2
- package/src/components/Hoc/Secondary/withSecondarySelection.js +2 -2
- package/src/components/Hoc/Secondary/withSecondarySideEditor.js +1 -1
- package/src/components/Hoc/Secondary/withSecondaryValue.js +1 -1
- package/src/components/Hoc/Secondary/withSecondaryWindowedEditor.js +1 -1
- package/src/components/Hoc/withAlert.js +2 -2
- package/src/components/Hoc/withContextMenu.js +2 -2
- package/src/components/Hoc/withDraggable.js +4 -4
- package/src/components/Hoc/withEditor.js +2 -2
- package/src/components/Hoc/withFilters.js +7 -7
- package/src/components/Hoc/withInlineEditor.js +1 -1
- package/src/components/Hoc/withModal.js +2 -2
- package/src/components/Hoc/withMultiSelection.js +1 -1
- package/src/components/Hoc/withPdfButtons.js +3 -3
- package/src/components/Hoc/withPermissions.js +2 -2
- package/src/components/Hoc/withPresetButtons.js +2 -2
- package/src/components/Hoc/withSelection.js +3 -3
- package/src/components/Hoc/withSideEditor.js +1 -1
- package/src/components/Hoc/withValue.js +1 -1
- package/src/components/Hoc/withWindowedEditor.js +1 -1
- package/src/components/Messages/ConfirmationMessage.js +1 -1
- package/src/components/Messages/ErrorMessage.js +1 -1
- package/src/components/Messages/WaitMessage.js +1 -1
- package/src/components/Panel/AccordionGridPanel.js +1 -1
- package/src/components/Panel/GridPanel.js +1 -1
- package/src/components/Panel/Header.js +3 -3
- package/src/components/Panel/Mask.js +1 -1
- package/src/components/Panel/Panel.js +3 -3
- package/src/components/Panel/TreePanel.js +1 -1
- package/src/components/Picker/Picker.js +1 -1
- package/src/components/Report/Report.js +5 -5
- package/src/components/Screens/DataMgt.js +5 -5
- package/src/components/Screens/Manager.js +3 -3
- package/src/components/Tab/TabBar.js +5 -5
- package/src/components/Toolbar/Pagination.js +2 -2
- package/src/components/Tree/Tree.js +9 -9
- package/src/components/Tree/TreeNode.js +1 -1
- package/src/components/Viewer/Viewer.js +6 -6
- package/src/components/Window/Editor.js +1 -1
- package/src/components/Window/UploadsDownloadsWindow.js +2 -2
- package/src/constants/UiModes.js +1 -1
- package/src/functions/buildAdditionalButtons.js +1 -1
- package/src/functions/getIconButtonFromConfig.js +1 -1
- package/src/functions/getReport.js +1 -1
- package/src/functions/registerReactNativeComponents.js +1 -1
- package/src/functions/registerWebComponents.js +1 -1
- package/src/hooks/useAdjustedWindowSize.js +1 -1
- package/src/hooks/useNotifications.js +1 -1
package/package.json
CHANGED
package/src/OneHatUi.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @module OneHatUi */
|
|
2
2
|
|
|
3
3
|
import EventEmitter from '@onehat/events';
|
|
4
|
-
import Components from './
|
|
5
|
-
import Styles from './
|
|
4
|
+
import Components from './components/index.js';
|
|
5
|
+
import Styles from './constants/Styles.js';
|
|
6
6
|
import UiGlobals from './UiGlobals.js';
|
|
7
7
|
import _ from 'lodash';
|
|
8
8
|
|
|
@@ -12,21 +12,21 @@ import {
|
|
|
12
12
|
CURRENT_MODE,
|
|
13
13
|
UI_MODE_WEB,
|
|
14
14
|
UI_MODE_REACT_NATIVE,
|
|
15
|
-
} from '../../
|
|
15
|
+
} from '../../constants/UiModes.js';
|
|
16
16
|
import UiGlobals from '../../UiGlobals.js';
|
|
17
17
|
import {
|
|
18
18
|
FILE_MODE_IMAGE,
|
|
19
19
|
FILE_MODE_FILE,
|
|
20
|
-
} from '../../
|
|
20
|
+
} from '../../constants/File.js';
|
|
21
21
|
import { Avatar, Dropzone, FileMosaic, FileCard, FileInputButton, } from "@files-ui/react";
|
|
22
|
-
import inArray from '../../
|
|
23
|
-
import IconButton from '../../
|
|
24
|
-
import Xmark from '../../
|
|
25
|
-
import withAlert from '../../
|
|
26
|
-
import withComponent from '../../
|
|
27
|
-
import withData from '../../
|
|
28
|
-
import downloadInBackground from '../../
|
|
29
|
-
import downloadWithFetch from '../../
|
|
22
|
+
import inArray from '../../functions/inArray.js';
|
|
23
|
+
import IconButton from '../../components/Buttons/IconButton.js';
|
|
24
|
+
import Xmark from '../../components/Icons/Xmark.js'
|
|
25
|
+
import withAlert from '../../components/Hoc/withAlert.js';
|
|
26
|
+
import withComponent from '../../components/Hoc/withComponent.js';
|
|
27
|
+
import withData from '../../components/Hoc/withData.js';
|
|
28
|
+
import downloadInBackground from '../../functions/downloadInBackground.js';
|
|
29
|
+
import downloadWithFetch from '../../functions/downloadWithFetch.js';
|
|
30
30
|
import _ from 'lodash';
|
|
31
31
|
|
|
32
32
|
const
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
CURRENT_MODE,
|
|
10
10
|
UI_MODE_WEB,
|
|
11
11
|
UI_MODE_REACT_NATIVE,
|
|
12
|
-
} from '../../
|
|
12
|
+
} from '../../constants/UiModes.js';
|
|
13
13
|
import UiGlobals from '../../UiGlobals.js';
|
|
14
14
|
// import {
|
|
15
15
|
// FileAmountLimitValidator,
|
|
@@ -18,11 +18,11 @@ import UiGlobals from '../../UiGlobals.js';
|
|
|
18
18
|
// ImageDimensionsValidator,
|
|
19
19
|
// } from 'use-file-picker/validators';
|
|
20
20
|
import { useFilePicker, useImperativeFilePicker } from 'use-file-picker'; // https://www.npmjs.com/package/use-file-picker
|
|
21
|
-
import IconButton from '../../
|
|
22
|
-
import Xmark from '../../
|
|
23
|
-
import withAlert from '../../
|
|
24
|
-
import withValue from '../../
|
|
25
|
-
import Loading from '../../
|
|
21
|
+
import IconButton from '../../components/Buttons/IconButton.js';
|
|
22
|
+
import Xmark from '../../components/Icons/Xmark.js'
|
|
23
|
+
import withAlert from '../../components/Hoc/withAlert.js';
|
|
24
|
+
import withValue from '../../components/Hoc/withValue.js';
|
|
25
|
+
import Loading from '../../components/Messages/Loading.js';
|
|
26
26
|
import _ from 'lodash';
|
|
27
27
|
|
|
28
28
|
|
package/src/UiGlobals.js
CHANGED
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
ScrollView,
|
|
8
8
|
Text,
|
|
9
9
|
} from 'native-base';
|
|
10
|
-
import inArray from '../../
|
|
11
|
-
import emptyFn from '../../
|
|
10
|
+
import inArray from '../../functions/inArray.js';
|
|
11
|
+
import emptyFn from '../../functions/emptyFn.js';
|
|
12
12
|
import _ from 'lodash';
|
|
13
13
|
|
|
14
14
|
// The Accordion has two modes.
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
HORIZONTAL,
|
|
8
8
|
VERTICAL,
|
|
9
|
-
} from '../../
|
|
9
|
+
} from '../../constants/Directions.js';
|
|
10
10
|
import {
|
|
11
11
|
UI_MODE_WEB,
|
|
12
12
|
UI_MODE_REACT_NATIVE,
|
|
13
13
|
CURRENT_MODE,
|
|
14
|
-
} from '../../
|
|
14
|
+
} from '../../constants/UiModes.js';
|
|
15
15
|
import withComponent from '../Hoc/withComponent.js';
|
|
16
|
-
import getSaved from '../../
|
|
17
|
-
import setSaved from '../../
|
|
16
|
+
import getSaved from '../../functions/getSaved.js';
|
|
17
|
+
import setSaved from '../../functions/setSaved.js';
|
|
18
18
|
import Splitter from './Splitter.js';
|
|
19
19
|
import _ from 'lodash';
|
|
20
20
|
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
HORIZONTAL,
|
|
8
8
|
VERTICAL,
|
|
9
|
-
} from '../../
|
|
10
|
-
import styles from '../../
|
|
9
|
+
} from '../../constants/Directions.js';
|
|
10
|
+
import styles from '../../styles/StyleSheets.js';
|
|
11
11
|
import withDraggable from '../Hoc/withDraggable.js';
|
|
12
12
|
|
|
13
13
|
// Note on modes:
|
|
@@ -9,11 +9,11 @@ import withComponent from '../Hoc/withComponent.js';
|
|
|
9
9
|
import {
|
|
10
10
|
UI_MODE_WEB,
|
|
11
11
|
UI_MODE_REACT_NATIVE,
|
|
12
|
-
} from '../../
|
|
12
|
+
} from '../../constants/UiModes.js';
|
|
13
13
|
import {
|
|
14
14
|
EDITOR_TYPE__INLINE,
|
|
15
|
-
} from '../../
|
|
16
|
-
import testProps from '../../
|
|
15
|
+
} from '../../constants/Editor.js';
|
|
16
|
+
import testProps from '../../functions/testProps.js';
|
|
17
17
|
import UiGlobals from '../../UiGlobals.js';
|
|
18
18
|
import Form from '../Form/Form.js';
|
|
19
19
|
import _ from 'lodash';
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Text,
|
|
5
5
|
} from 'native-base';
|
|
6
6
|
import Date from '../Form/Field/Date.js';
|
|
7
|
-
import testProps from '../../
|
|
7
|
+
import testProps from '../../functions/testProps.js';
|
|
8
8
|
import withTooltip from '../Hoc/withTooltip.js';
|
|
9
9
|
import withValue from '../Hoc/withValue.js';
|
|
10
10
|
import _ from 'lodash';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import Number from '../Form/Field/Number.js';
|
|
7
7
|
import withTooltip from '../Hoc/withTooltip.js';
|
|
8
8
|
import withValue from '../Hoc/withValue.js';
|
|
9
|
-
import testProps from '../../
|
|
9
|
+
import testProps from '../../functions/testProps.js';
|
|
10
10
|
import _ from 'lodash';
|
|
11
11
|
|
|
12
12
|
const
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Checkbox,
|
|
5
5
|
Row,
|
|
6
6
|
} from 'native-base';
|
|
7
|
-
import testProps from '../../../../
|
|
7
|
+
import testProps from '../../../../functions/testProps.js';
|
|
8
8
|
import withData from '../../../Hoc/withData.js';
|
|
9
9
|
import withValue from '../../../Hoc/withValue.js';
|
|
10
10
|
import withTooltip from '../../../Hoc/withTooltip.js';
|
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
import { SketchPicker } from 'react-color';
|
|
10
10
|
import {
|
|
11
11
|
UI_MODE_WEB,
|
|
12
|
-
} from '../../../
|
|
12
|
+
} from '../../../constants/UiModes.js';
|
|
13
13
|
import UiGlobals from '../../../UiGlobals.js';
|
|
14
14
|
import Input from '../Field/Input.js';
|
|
15
15
|
import withComponent from '../../Hoc/withComponent.js';
|
|
16
16
|
import withValue from '../../Hoc/withValue.js';
|
|
17
|
-
import emptyFn from '../../../
|
|
17
|
+
import emptyFn from '../../../functions/emptyFn.js';
|
|
18
18
|
import _ from 'lodash';
|
|
19
19
|
|
|
20
20
|
export function ColorElement(props) {
|
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
UI_MODE_REACT_NATIVE,
|
|
13
13
|
UI_MODE_WEB,
|
|
14
|
-
} from '../../../../
|
|
14
|
+
} from '../../../../constants/UiModes.js';
|
|
15
15
|
import {
|
|
16
16
|
EDITOR_TYPE__WINDOWED,
|
|
17
|
-
} from '../../../../
|
|
17
|
+
} from '../../../../constants/Editor.js';
|
|
18
18
|
import UiGlobals from '../../../../UiGlobals.js';
|
|
19
19
|
import Input from '../Input.js';
|
|
20
20
|
import withAlert from '../../../Hoc/withAlert.js';
|
|
21
21
|
import withComponent from '../../../Hoc/withComponent.js';
|
|
22
22
|
import withData from '../../../Hoc/withData.js';
|
|
23
23
|
import withValue from '../../../Hoc/withValue.js';
|
|
24
|
-
import emptyFn from '../../../../
|
|
25
|
-
import testProps from '../../../../
|
|
24
|
+
import emptyFn from '../../../../functions/emptyFn.js';
|
|
25
|
+
import testProps from '../../../../functions/testProps.js';
|
|
26
26
|
import { Grid, WindowedGridEditor } from '../../../Grid/Grid.js';
|
|
27
27
|
import IconButton from '../../../Buttons/IconButton.js';
|
|
28
28
|
import CaretDown from '../../../Icons/CaretDown.js';
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
DATE,
|
|
14
14
|
TIME,
|
|
15
15
|
DATETIME,
|
|
16
|
-
} from '../../../
|
|
16
|
+
} from '../../../constants/Date.js';
|
|
17
17
|
import {
|
|
18
18
|
UI_MODE_REACT_NATIVE,
|
|
19
19
|
UI_MODE_WEB,
|
|
20
|
-
} from '../../../
|
|
20
|
+
} from '../../../constants/UiModes.js';
|
|
21
21
|
import UiGlobals from '../../../UiGlobals.js';
|
|
22
22
|
import Formatters from '@onehat/data/src/Util/Formatters.js';
|
|
23
23
|
import Parsers from '@onehat/data/src/Util/Parsers.js';
|
|
@@ -26,9 +26,9 @@ import IconButton from '../../Buttons/IconButton.js';
|
|
|
26
26
|
import Xmark from '../../Icons/Xmark.js';
|
|
27
27
|
import withComponent from '../../Hoc/withComponent.js';
|
|
28
28
|
import withValue from '../../Hoc/withValue.js';
|
|
29
|
-
import emptyFn from '../../../
|
|
30
|
-
import testProps from '../../../
|
|
31
|
-
import getComponentFromType from '../../../
|
|
29
|
+
import emptyFn from '../../../functions/emptyFn.js';
|
|
30
|
+
import testProps from '../../../functions/testProps.js';
|
|
31
|
+
import getComponentFromType from '../../../functions/getComponentFromType.js';
|
|
32
32
|
import Calendar from '../../Icons/Calendar.js';
|
|
33
33
|
import moment from 'moment';
|
|
34
34
|
import _ from 'lodash';
|
|
@@ -10,12 +10,12 @@ import {
|
|
|
10
10
|
CURRENT_MODE,
|
|
11
11
|
UI_MODE_WEB,
|
|
12
12
|
UI_MODE_REACT_NATIVE,
|
|
13
|
-
} from '../../../
|
|
13
|
+
} from '../../../constants/UiModes.js';
|
|
14
14
|
import UiGlobals from '../../../UiGlobals.js';
|
|
15
15
|
import {
|
|
16
16
|
FILE_MODE_IMAGE,
|
|
17
17
|
FILE_MODE_FILE,
|
|
18
|
-
} from '../../../
|
|
18
|
+
} from '../../../constants/File.js';
|
|
19
19
|
import IconButton from '../../Buttons/IconButton.js';
|
|
20
20
|
import withComponent from '../../Hoc/withComponent.js';
|
|
21
21
|
import withValue from '../../Hoc/withValue.js';
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
UI_MODE_REACT_NATIVE,
|
|
7
7
|
UI_MODE_WEB,
|
|
8
|
-
} from '../../../
|
|
8
|
+
} from '../../../constants/UiModes.js';
|
|
9
9
|
import UiGlobals from '../../../UiGlobals.js';
|
|
10
10
|
import withComponent from '../../Hoc/withComponent.js';
|
|
11
11
|
import withValue from '../../Hoc/withValue.js';
|
|
12
|
-
import getComponentFromType from '../../../
|
|
12
|
+
import getComponentFromType from '../../../functions/getComponentFromType.js';
|
|
13
13
|
import _ from 'lodash';
|
|
14
14
|
|
|
15
15
|
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from 'native-base';
|
|
8
8
|
import UiGlobals from '../../../UiGlobals.js';
|
|
9
9
|
import IconButton from '../../Buttons/IconButton.js';
|
|
10
|
-
import testProps from '../../../
|
|
10
|
+
import testProps from '../../../functions/testProps.js';
|
|
11
11
|
import withComponent from '../../Hoc/withComponent.js';
|
|
12
12
|
import withTooltip from '../../Hoc/withTooltip.js';
|
|
13
13
|
import withValue from '../../Hoc/withValue.js';
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Radio,
|
|
5
5
|
Row,
|
|
6
6
|
} from 'native-base';
|
|
7
|
-
import testProps from '../../../../
|
|
7
|
+
import testProps from '../../../../functions/testProps.js';
|
|
8
8
|
import withComponent from '../../../Hoc/withComponent.js';
|
|
9
9
|
import withData from '../../../Hoc/withData.js';
|
|
10
10
|
import withValue from '../../../Hoc/withValue.js';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import Input from './Input.js';
|
|
7
7
|
import Slider from '@react-native-community/slider'; // https://www.npmjs.com/package/@react-native-community/slider
|
|
8
8
|
import UiGlobals from '../../../UiGlobals.js';
|
|
9
|
-
import testProps from '../../../
|
|
9
|
+
import testProps from '../../../functions/testProps.js';
|
|
10
10
|
import withComponent from '../../Hoc/withComponent.js';
|
|
11
11
|
import withTooltip from '../../Hoc/withTooltip.js';
|
|
12
12
|
import withValue from '../../Hoc/withValue.js';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from 'native-base';
|
|
7
7
|
import {
|
|
8
8
|
EDITOR_TYPE__WINDOWED,
|
|
9
|
-
} from '../../../../
|
|
9
|
+
} from '../../../../constants/Editor.js';
|
|
10
10
|
import withAlert from '../../../Hoc/withAlert.js';
|
|
11
11
|
import withComponent from '../../../Hoc/withComponent.js';
|
|
12
12
|
import withData from '../../../Hoc/withData.js';
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
Row,
|
|
3
3
|
Text,
|
|
4
4
|
} from 'native-base';
|
|
5
|
-
import testProps from '../../../../
|
|
5
|
+
import testProps from '../../../../functions/testProps.js';
|
|
6
6
|
import IconButton from '../../../Buttons/IconButton.js';
|
|
7
7
|
import Eye from '../../../Icons/Eye.js';
|
|
8
8
|
import Xmark from '../../../Icons/Xmark.js';
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import UiGlobals from '../../../UiGlobals.js';
|
|
10
10
|
import IconButton from '../../Buttons/IconButton.js';
|
|
11
11
|
import Na from '../../Icons/Na.js';
|
|
12
|
-
import testProps from '../../../
|
|
12
|
+
import testProps from '../../../functions/testProps.js';
|
|
13
13
|
import withComponent from '../../Hoc/withComponent.js';
|
|
14
14
|
import withTooltip from '../../Hoc/withTooltip.js';
|
|
15
15
|
import withValue from '../../Hoc/withValue.js';
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
Text,
|
|
7
7
|
} from 'native-base';
|
|
8
8
|
import FieldSetContext from '../../Contexts/FieldSetContext.js';
|
|
9
|
-
import useForceUpdate from '../../
|
|
10
|
-
import testProps from '../../
|
|
9
|
+
import useForceUpdate from '../../hooks/useForceUpdate.js';
|
|
10
|
+
import testProps from '../../functions/testProps.js';
|
|
11
11
|
import UiGlobals from '../../UiGlobals.js';
|
|
12
12
|
import IconButton from '../Buttons/IconButton.js';
|
|
13
13
|
import CheckboxButton from '../Buttons/CheckboxButton.js';
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from 'native-base';
|
|
10
10
|
import {
|
|
11
11
|
VIEW,
|
|
12
|
-
} from '../../
|
|
12
|
+
} from '../../constants/Commands.js';
|
|
13
13
|
import {
|
|
14
14
|
EDITOR_TYPE__INLINE,
|
|
15
15
|
EDITOR_TYPE__WINDOWED,
|
|
@@ -19,20 +19,20 @@ import {
|
|
|
19
19
|
EDITOR_MODE__VIEW,
|
|
20
20
|
EDITOR_MODE__ADD,
|
|
21
21
|
EDITOR_MODE__EDIT,
|
|
22
|
-
} from '../../
|
|
22
|
+
} from '../../constants/Editor.js';
|
|
23
23
|
import { useForm, Controller } from 'react-hook-form'; // https://react-hook-form.com/api/
|
|
24
24
|
import * as yup from 'yup'; // https://github.com/jquense/yup#string
|
|
25
25
|
import { yupResolver } from '@hookform/resolvers/yup';
|
|
26
|
-
import useForceUpdate from '../../
|
|
26
|
+
import useForceUpdate from '../../hooks/useForceUpdate.js';
|
|
27
27
|
import UiGlobals from '../../UiGlobals.js';
|
|
28
28
|
import withAlert from '../Hoc/withAlert.js';
|
|
29
29
|
import withComponent from '../Hoc/withComponent.js';
|
|
30
30
|
import withEditor from '../Hoc/withEditor.js';
|
|
31
31
|
import withPdfButtons from '../Hoc/withPdfButtons.js';
|
|
32
|
-
import inArray from '../../
|
|
33
|
-
import getComponentFromType from '../../
|
|
34
|
-
import buildAdditionalButtons from '../../
|
|
35
|
-
import testProps from '../../
|
|
32
|
+
import inArray from '../../functions/inArray.js';
|
|
33
|
+
import getComponentFromType from '../../functions/getComponentFromType.js';
|
|
34
|
+
import buildAdditionalButtons from '../../functions/buildAdditionalButtons.js';
|
|
35
|
+
import testProps from '../../functions/testProps.js';
|
|
36
36
|
import Toolbar from '../Toolbar/Toolbar.js';
|
|
37
37
|
import Button from '../Buttons/Button.js';
|
|
38
38
|
import IconButton from '../Buttons/IconButton.js';
|
|
@@ -4,8 +4,8 @@ import CheckboxButton from '../Buttons/CheckboxButton.js';
|
|
|
4
4
|
import Grid from './Grid.js';
|
|
5
5
|
import Panel from '../Panel/Panel.js';
|
|
6
6
|
import Toolbar from '../Toolbar/Toolbar.js';
|
|
7
|
-
import useAdjustedWindowSize from '../../
|
|
8
|
-
import useForceUpdate from '../../
|
|
7
|
+
import useAdjustedWindowSize from '../../hooks/useAdjustedWindowSize.js';
|
|
8
|
+
import useForceUpdate from '../../hooks/useForceUpdate.js';
|
|
9
9
|
import _ from 'lodash';
|
|
10
10
|
|
|
11
11
|
// helper for Grid
|
|
@@ -13,23 +13,23 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
SELECTION_MODE_SINGLE,
|
|
15
15
|
SELECTION_MODE_MULTI,
|
|
16
|
-
} from '../../
|
|
16
|
+
} from '../../constants/Selection.js';
|
|
17
17
|
import {
|
|
18
18
|
EDIT,
|
|
19
19
|
VIEW,
|
|
20
|
-
} from '../../
|
|
20
|
+
} from '../../constants/Commands.js';
|
|
21
21
|
import {
|
|
22
22
|
DROP_POSITION_BEFORE,
|
|
23
23
|
DROP_POSITION_AFTER,
|
|
24
|
-
} from '../../
|
|
24
|
+
} from '../../constants/Grid.js';
|
|
25
25
|
import {
|
|
26
26
|
UI_MODE_WEB,
|
|
27
27
|
UI_MODE_REACT_NATIVE,
|
|
28
28
|
CURRENT_MODE,
|
|
29
|
-
} from '../../
|
|
29
|
+
} from '../../constants/UiModes.js';
|
|
30
30
|
import * as colourMixer from '@k-renwick/colour-mixer';
|
|
31
31
|
import UiGlobals from '../../UiGlobals.js';
|
|
32
|
-
import useForceUpdate from '../../
|
|
32
|
+
import useForceUpdate from '../../hooks/useForceUpdate.js';
|
|
33
33
|
import withContextMenu from '../Hoc/withContextMenu.js';
|
|
34
34
|
import withAlert from '../Hoc/withAlert.js';
|
|
35
35
|
import withComponent from '../Hoc/withComponent.js';
|
|
@@ -44,14 +44,14 @@ import withMultiSelection from '../Hoc/withMultiSelection.js';
|
|
|
44
44
|
import withSelection from '../Hoc/withSelection.js';
|
|
45
45
|
import withSideEditor from '../Hoc/withSideEditor.js';
|
|
46
46
|
import withWindowedEditor from '../Hoc/withWindowedEditor.js';
|
|
47
|
-
import getSaved from '../../
|
|
48
|
-
import setSaved from '../../
|
|
49
|
-
import getIconButtonFromConfig from '../../
|
|
50
|
-
import testProps from '../../
|
|
51
|
-
import nbToRgb from '../../
|
|
47
|
+
import getSaved from '../../functions/getSaved.js';
|
|
48
|
+
import setSaved from '../../functions/setSaved.js';
|
|
49
|
+
import getIconButtonFromConfig from '../../functions/getIconButtonFromConfig.js';
|
|
50
|
+
import testProps from '../../functions/testProps.js';
|
|
51
|
+
import nbToRgb from '../../functions/nbToRgb.js';
|
|
52
52
|
import Loading from '../Messages/Loading.js';
|
|
53
|
-
import isSerializable from '../../
|
|
54
|
-
import inArray from '../../
|
|
53
|
+
import isSerializable from '../../functions/isSerializable.js';
|
|
54
|
+
import inArray from '../../functions/inArray.js';
|
|
55
55
|
import ReloadPageButton from '../Buttons/ReloadPageButton.js';
|
|
56
56
|
import GridHeaderRow from './GridHeaderRow.js';
|
|
57
57
|
import GridRow, { DragSourceDropTargetGridRow, DragSourceGridRow, DropTargetGridRow } from './GridRow.js';
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
SORT_ASCENDING,
|
|
11
11
|
SORT_DESCENDING,
|
|
12
|
-
} from '../../
|
|
12
|
+
} from '../../constants/Grid.js';
|
|
13
13
|
import {
|
|
14
14
|
HORIZONTAL,
|
|
15
|
-
} from '../../
|
|
15
|
+
} from '../../constants/Directions.js';
|
|
16
16
|
import {
|
|
17
17
|
UI_MODE_WEB,
|
|
18
|
-
} from '../../
|
|
18
|
+
} from '../../constants/UiModes.js';
|
|
19
19
|
import UiGlobals from '../../UiGlobals.js';
|
|
20
|
-
import useBlocking from '../../
|
|
21
|
-
import testProps from '../../
|
|
20
|
+
import useBlocking from '../../hooks/useBlocking.js';
|
|
21
|
+
import testProps from '../../functions/testProps.js';
|
|
22
22
|
import AngleRight from '../Icons/AngleRight.js';
|
|
23
23
|
import HeaderReorderHandle from './HeaderReorderHandle.js';
|
|
24
24
|
import HeaderResizeHandle from './HeaderResizeHandle.js';
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
} from 'native-base';
|
|
7
7
|
import {
|
|
8
8
|
UI_MODE_WEB,
|
|
9
|
-
} from '../../
|
|
10
|
-
import getComponentFromType from '../../
|
|
9
|
+
} from '../../constants/UiModes.js';
|
|
10
|
+
import getComponentFromType from '../../functions/getComponentFromType.js';
|
|
11
11
|
import UiGlobals from '../../UiGlobals.js';
|
|
12
12
|
import { withDragSource, withDropTarget } from '../Hoc/withDnd.js';
|
|
13
|
-
import testProps from '../../
|
|
13
|
+
import testProps from '../../functions/testProps.js';
|
|
14
14
|
import AngleRight from '../Icons/AngleRight.js';
|
|
15
15
|
import RowDragHandle from './RowDragHandle.js';
|
|
16
16
|
import _ from 'lodash';
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
Row,
|
|
5
5
|
Text,
|
|
6
6
|
} from 'native-base';
|
|
7
|
-
import styles from '../../
|
|
7
|
+
import styles from '../../styles/StyleSheets.js';
|
|
8
8
|
import withDraggable from '../Hoc/withDraggable.js';
|
|
9
9
|
import GripLinesVertical from '../Icons/GripLinesVertical.js';
|
|
10
10
|
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
DELETE,
|
|
9
9
|
VIEW,
|
|
10
10
|
DUPLICATE,
|
|
11
|
-
} from '../../../
|
|
11
|
+
} from '../../../constants/Commands.js';
|
|
12
12
|
import {
|
|
13
13
|
EDITOR_MODE__VIEW,
|
|
14
14
|
EDITOR_MODE__ADD,
|
|
15
15
|
EDITOR_MODE__EDIT,
|
|
16
16
|
EDITOR_TYPE__SIDE,
|
|
17
|
-
} from '../../../
|
|
17
|
+
} from '../../../constants/Editor.js';
|
|
18
18
|
import _ from 'lodash';
|
|
19
19
|
|
|
20
20
|
// NOTE: This is a modified version of @onehat/ui/src/Hoc/withEditor
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
SELECTION_MODE_MULTI,
|
|
5
5
|
SELECT_UP,
|
|
6
6
|
SELECT_DOWN,
|
|
7
|
-
} from '../../../
|
|
8
|
-
import inArray from '../../../
|
|
7
|
+
} from '../../../constants/Selection.js';
|
|
8
|
+
import inArray from '../../../functions/inArray.js';
|
|
9
9
|
import _ from 'lodash';
|
|
10
10
|
|
|
11
11
|
// NOTE: This is a modified version of @onehat/ui/src/Hoc/withSelection
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect, useRef, useContext, useCallback, } from 'react';
|
|
2
2
|
import natsort from 'natsort';
|
|
3
|
-
import useForceUpdate from '../../../
|
|
3
|
+
import useForceUpdate from '../../../hooks/useForceUpdate.js';
|
|
4
4
|
import FieldSetContext from '../../../Contexts/FieldSetContext.js';
|
|
5
5
|
import _ from 'lodash';
|
|
6
6
|
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from 'native-base';
|
|
6
6
|
import {
|
|
7
7
|
EDITOR_TYPE__WINDOWED,
|
|
8
|
-
} from '../../../
|
|
8
|
+
} from '../../../constants/Editor.js';
|
|
9
9
|
import withSecondaryEditor from './withSecondaryEditor.js';
|
|
10
10
|
// import withDraggable from './withDraggable.js';
|
|
11
11
|
import _ from 'lodash';
|