@luscii-healthtech/web-ui 0.1.21 → 0.1.24

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,5 +1,5 @@
1
1
  {
2
- "version": "0.1.21",
2
+ "version": "0.1.24",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",
@@ -105,6 +105,7 @@
105
105
  "eslint-plugin-import": "^2.26.0",
106
106
  "eslint-plugin-react": "^7.30.0",
107
107
  "html-to-draftjs": "^1.5.0",
108
+ "lodash.debounce": "^4.0.8",
108
109
  "moment": "^2.29.3",
109
110
  "node-sass": "^7.0.1",
110
111
  "path": "^0.12.7",
@@ -1,5 +1,5 @@
1
1
  import { useState, useEffect } from "react";
2
- import debounce from "lodash/debounce";
2
+ import debounce from "lodash.debounce";
3
3
 
4
4
  export const useWindowDimensions = () => {
5
5
  const [height, setHeight] = useState(window.innerHeight);
@@ -6,7 +6,7 @@ import "react-quill/dist/quill.snow.css";
6
6
  import "./TextEditor.scss";
7
7
 
8
8
  export default function TextEditor({ defaultValue, onValueChange, placeholder }) {
9
- const formats = ["bold", "italic", "underline", "strike", "list", "bullet", "link", "video"];
9
+ const formats = ["bold", "italic", "underline", "strike", "list", "bullet", "link"];
10
10
  const toolbarLastGroup = ["link", "video"];
11
11
  const quillRef = useRef();
12
12
 
@@ -10,12 +10,6 @@ import "./TextEditorV2.scss";
10
10
  export const TextEditorV2 = ({ defaultValue, onValueChange, locale }) => {
11
11
  const [editorState, setEditorState] = useState(EditorState.createEmpty());
12
12
 
13
- const getOptions = () => {
14
- const options = ["inline", "list", "link", "textAlign", "history"];
15
- options.splice(options.length - 1, 0, "embedded");
16
- return options;
17
- };
18
-
19
13
  useEffect(() => {
20
14
  const { contentBlocks, entityMap } = htmlToDraft(defaultValue);
21
15
  setEditorState(EditorState.createWithContent(ContentState.createFromBlockArray(contentBlocks, entityMap)));
@@ -30,7 +24,7 @@ export const TextEditorV2 = ({ defaultValue, onValueChange, locale }) => {
30
24
  <div className="editor">
31
25
  <Editor
32
26
  toolbar={{
33
- options: getOptions(),
27
+ options: ["inline", "list", "link", "textAlign", "history"],
34
28
  inline: {
35
29
  options: ["bold", "italic", "underline"],
36
30
  },