@onehat/ui 0.2.28 → 0.2.30

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onehat/ui",
3
- "version": "0.2.28",
3
+ "version": "0.2.30",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -33,7 +33,6 @@
33
33
  "react-datetime": "^3.2.0",
34
34
  "react-draggable": "^4.4.5",
35
35
  "react-native-draggable": "^3.3.0",
36
- "react-native-ckeditor5": "^1.0.9",
37
36
  "react-dom": "*",
38
37
  "react-native": "*"
39
38
  },
@@ -4,21 +4,22 @@ import {
4
4
  } from 'native-base';
5
5
  import {
6
6
  AUTO_SUBMIT_DELAY,
7
- } from '../../../Constants/Input.js';
7
+ } from '../../../../Constants/Input.js';
8
+ import { CKEditor } from '@ckeditor/ckeditor5-react'; // https://ckeditor.com/docs/ckeditor5/latest/installation/frameworks/react.html
9
+ import './ckeditor.css';
8
10
  import Editor from 'ckeditor5-custom-build/build/ckeditor.js'; // built using https://ckeditor.com/ckeditor-5/online-builder/
9
- import getComponentFromType from '../../../Functions/getComponentFromType.js';
10
- import withValue from '../../Hoc/withValue.js';
11
- import withTooltip from '../../Hoc/withTooltip.js';
11
+ import withValue from '../../../Hoc/withValue.js';
12
+ import withTooltip from '../../../Hoc/withTooltip.js';
12
13
  import _ from 'lodash';
13
14
 
15
+
14
16
  const
15
- HtmlEditorElement = (props) => {
17
+ CKEditorElement = (props) => {
16
18
  const {
17
19
  value,
18
20
  setValue,
19
21
  h = 150,
20
22
  } = props,
21
- CKEditor = getComponentFromType('CKEditor'),
22
23
  debouncedSetValueRef = useRef(),
23
24
  [editor, setEditor] = useState(null), // in case you need to adjust things procedurally
24
25
  config = {
@@ -52,12 +53,12 @@ const
52
53
  />
53
54
  </Row>;
54
55
  },
55
- HtmlEditorField = withValue(HtmlEditorElement);
56
+ CKEditorField = withValue(CKEditorElement);
56
57
 
57
58
 
58
- export default HtmlEditorField;
59
+ export default CKEditorField;
59
60
 
60
61
  // // Tooltip needs us to forwardRef
61
62
  // export default withTooltip(React.forwardRef((props, ref) => {
62
- // return <HtmlEditorField {...props} outerRef={ref} />;
63
+ // return <CKEditorField {...props} outerRef={ref} />;
63
64
  // }));
@@ -9,6 +9,7 @@ import ArrayRadioGroup from './Form/Field/RadioGroup/ArrayRadioGroup.js';
9
9
  import Blank from './Blank.js';
10
10
  import BooleanCombo from './Form/Field/Combo/BooleanCombo.js';
11
11
  // import CartButtonWithBadge from '../Components/Buttons/CartButtonWithBadge.js';
12
+ // import CKEditor from './Form/Field/CKEditor/CKEditor.js'; // web only
12
13
  import CheckboxGroup from './Form/Field/CheckboxGroup/CheckboxGroup.js';
13
14
  import Color from './Form/Field/Color.js';
14
15
  import Combo from './Form/Field/Combo/Combo.js';
@@ -25,7 +26,6 @@ import FiltersForm from './Form/FiltersForm.js';
25
26
  import Form from './Form/Form.js';
26
27
  import Grid from './Grid/Grid.js';
27
28
  import GridPanel from './Panel/GridPanel.js';
28
- import HtmlEditor from './Form/Field/HtmlEditor.js';
29
29
  import IconButton from './Buttons/IconButton.js';
30
30
  import Input from './Form/Field/Input.js';
31
31
  import IntervalsCombo from './Form/Field/Combo/IntervalsCombo.js';
@@ -56,6 +56,7 @@ const components = {
56
56
  BooleanCombo,
57
57
  // CartButtonWithBadge,
58
58
  CheckboxGroup,
59
+ // CKEditor,
59
60
  Color,
60
61
  Column,
61
62
  Combo,
@@ -72,7 +73,6 @@ const components = {
72
73
  Form,
73
74
  Grid,
74
75
  GridPanel,
75
- HtmlEditor,
76
76
  IconButton,
77
77
  Input,
78
78
  IntervalsCombo,
@@ -1,5 +1,4 @@
1
1
  import UiGlobals from '../UiGlobals.js';
2
- import CKEditor from '../PlatformImports/ReactNative/CKEditor';
3
2
  import Datetime from '../PlatformImports/ReactNative/Datetime';
4
3
  import Draggable from '../PlatformImports/ReactNative/Draggable';
5
4
  import ScreenContainer from '../Components/Container/ScreenContainer';
@@ -7,7 +6,6 @@ import _ from 'lodash';
7
6
 
8
7
  export default function registerReactNativeComponents() {
9
8
  _.merge(UiGlobals.components, {
10
- CKEditor,
11
9
  Datetime,
12
10
  Draggable,
13
11
  ScreenContainer,
@@ -1,5 +1,5 @@
1
1
  import UiGlobals from '../UiGlobals.js';
2
- import CKEditor from '../PlatformImports/Web/CKEditor.js';
2
+ import CKEditor from '../Components/Form/Field/CKEditor/CKEditor.js';
3
3
  import Datetime from '../PlatformImports/Web/Datetime.js';
4
4
  import Draggable from '../PlatformImports/Web/Draggable.js';
5
5
  import File from '../Components/Form/Field/File.js';
@@ -1,12 +0,0 @@
1
- import {
2
- Box,
3
- } from 'native-base';
4
- import _ from 'lodash';
5
-
6
- export default function CKEditor(props) {
7
-
8
- // See ExtJS compatible OneBuild implementation for ideas.
9
- // Also see es6 folder in Venpal
10
-
11
- throw new Error('not yet implemented');
12
- }
@@ -1,3 +0,0 @@
1
- import CKEditor5 from '@ckeditor/ckeditor5-react'; // https://ckeditor.com/docs/ckeditor5/latest/installation/frameworks/react.html
2
-
3
- export default CKEditor5.default || CKEditor5;
@@ -1,4 +0,0 @@
1
- import { CKEditor } from '@ckeditor/ckeditor5-react'; // https://ckeditor.com/docs/ckeditor5/latest/installation/frameworks/react.html
2
- import './ckeditor.css';
3
-
4
- export default CKEditor.default || CKEditor;