authscape 1.0.257 → 1.0.258

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/index.js CHANGED
@@ -2538,8 +2538,8 @@ Object.defineProperty(exports, "__esModule", {
2538
2538
  value: true
2539
2539
  });
2540
2540
  exports.RichTextEditor = void 0;
2541
+ var _react = _interopRequireWildcard(require("react"));
2541
2542
  var _draftJs = require("draft-js");
2542
- var _react = require("react");
2543
2543
  var _draftjsToHtml = _interopRequireDefault(require("draftjs-to-html"));
2544
2544
  var _dynamic = _interopRequireDefault(require("next/dynamic"));
2545
2545
  var _material = require("@mui/material");
@@ -2572,10 +2572,6 @@ var RichTextEditor = function RichTextEditor(_ref) {
2572
2572
  _useState2 = _slicedToArray(_useState, 2),
2573
2573
  editorState = _useState2[0],
2574
2574
  setEditorState = _useState2[1];
2575
- var _useState3 = (0, _react.useState)(),
2576
- _useState4 = _slicedToArray(_useState3, 2),
2577
- text = _useState4[0],
2578
- setText = _useState4[1];
2579
2575
  var onEditorStateChange = function onEditorStateChange(editorState) {
2580
2576
  setEditorState(editorState);
2581
2577
  };
@@ -2589,7 +2585,7 @@ var RichTextEditor = function RichTextEditor(_ref) {
2589
2585
  }
2590
2586
  }
2591
2587
  }, [html]);
2592
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Editor, {
2588
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(Editor, {
2593
2589
  editorState: editorState,
2594
2590
  toolbarClassName: "toolbarClassName",
2595
2591
  wrapperClassName: "wrapperClassName",
@@ -2612,11 +2608,11 @@ var RichTextEditor = function RichTextEditor(_ref) {
2612
2608
  // { text: "HONEYDEW", value: "honeydew", url: "honeydew" }
2613
2609
  // ]
2614
2610
  // }}
2615
- }), /*#__PURE__*/React.createElement("hr", null), /*#__PURE__*/React.createElement(_material.Box, {
2611
+ }), /*#__PURE__*/_react["default"].createElement("hr", null), /*#__PURE__*/_react["default"].createElement(_material.Box, {
2616
2612
  sx: {
2617
2613
  textAlign: "right"
2618
2614
  }
2619
- }, /*#__PURE__*/React.createElement(_material.Button, {
2615
+ }, /*#__PURE__*/_react["default"].createElement(_material.Button, {
2620
2616
  variant: "contained",
2621
2617
  onClick: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
2622
2618
  return _regeneratorRuntime().wrap(function _callee$(_context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.257",
3
+ "version": "1.0.258",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -32,6 +32,8 @@
32
32
  "@stripe/react-stripe-js": "^1.9.0",
33
33
  "@stripe/stripe-js": "^1.32.0",
34
34
  "axios": "^0.27.2",
35
+ "draft-js": "^0.11.7",
36
+ "draftjs-to-html": "^0.9.1",
35
37
  "eslint-config-next": "^13.3.2",
36
38
  "ga-4-react": "^0.1.281",
37
39
  "html2canvas": "^1.4.1",
@@ -43,6 +45,7 @@
43
45
  "react-color": "^2.19.3",
44
46
  "react-cool-onclickoutside": "^1.7.0",
45
47
  "react-data-table-component": "^7.5.2",
48
+ "react-draft-wysiwyg": "^1.15.0",
46
49
  "react-hook-form": "^7.44.2",
47
50
  "react-toastify": "^9.1.3",
48
51
  "use-places-autocomplete": "^4.0.0"
@@ -1,9 +1,8 @@
1
- import { convertToRaw, EditorState, ContentState } from "draft-js";
2
- import { useState, useEffect } from "react";
1
+ import React, { useState, useEffect } from "react";
2
+ import { convertToRaw, EditorState, ContentState, convertFromHTML } from "draft-js";
3
3
  import draftToHtml from "draftjs-to-html";
4
4
  import dynamic from 'next/dynamic';
5
5
  import { Box, Button } from "@mui/material";
6
- import { convertFromHTML } from 'draft-js';
7
6
 
8
7
  const Editor = dynamic(
9
8
  () => import('react-draft-wysiwyg').then(mod => mod.Editor),
@@ -13,7 +12,6 @@ const Editor = dynamic(
13
12
  export const RichTextEditor = ({html, onSave}) => {
14
13
 
15
14
  const [editorState, setEditorState] = useState(EditorState.createEmpty());
16
- const [text, setText] = useState();
17
15
  const onEditorStateChange = function (editorState) {
18
16
  setEditorState(editorState);
19
17
  };