通用评论

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.RenderText = exports.Editor = undefined;
  6. var _message2 = require("antd/es/message");
  7. var _message3 = _interopRequireDefault(_message2);
  8. var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  9. var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  10. require("antd/es/message/style/css");
  11. var _react = require("react");
  12. var _react2 = _interopRequireDefault(_react);
  13. var _propTypes = require("prop-types");
  14. var _propTypes2 = _interopRequireDefault(_propTypes);
  15. var _axios = require("axios");
  16. var _axios2 = _interopRequireDefault(_axios);
  17. var _reactIntlUniversal = require("react-intl-universal");
  18. var _reactIntlUniversal2 = _interopRequireDefault(_reactIntlUniversal);
  19. var _constant = require("./constant");
  20. var _Comment = require("./Comment");
  21. var _helper = require("./helper");
  22. var _CommentInput = require("./components/CommentInput");
  23. var _CommentInput2 = _interopRequireDefault(_CommentInput);
  24. var _CommentList = require("./components/CommentList");
  25. var _CommentList2 = _interopRequireDefault(_CommentList);
  26. var _Editor = require("./components/Editor");
  27. var _Editor2 = _interopRequireDefault(_Editor);
  28. var _RenderText = require("./components/RenderText");
  29. var _RenderText2 = _interopRequireDefault(_RenderText);
  30. var _lang = require("./lang");
  31. require("./App.css");
  32. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  33. function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
  34. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  35. function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  36. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  37. var App = function (_Component) {
  38. _inherits(App, _Component);
  39. function App(props) {
  40. _classCallCheck(this, App);
  41. var _this = _possibleConstructorReturn(this, (App.__proto__ || Object.getPrototypeOf(App)).call(this, props));
  42. _this.state = {
  43. loading: {},
  44. // oss 配置
  45. oss: {},
  46. // 评论数据
  47. list: [],
  48. page: 1,
  49. total: 0,
  50. // 是否没有更多评论了
  51. isNoMoreComment: false,
  52. initDone: false,
  53. locale: "zh-CN"
  54. };
  55. _this.handleChangeLoading = _this.handleChangeLoading.bind(_this);
  56. _this.sCreateComment = _this.sCreateComment.bind(_this);
  57. _this.sDeleteComment = _this.sDeleteComment.bind(_this);
  58. _this.sCommentFavor = _this.sCommentFavor.bind(_this);
  59. _this.sCreateReply = _this.sCreateReply.bind(_this);
  60. _this.sDeleteReply = _this.sDeleteReply.bind(_this);
  61. _this.errorHandler = _this.errorHandler.bind(_this);
  62. _this.sGetComment = _this.sGetComment.bind(_this);
  63. _this.sReplyFavor = _this.sReplyFavor.bind(_this);
  64. _this.sGetReply = _this.sGetReply.bind(_this);
  65. _this.sOssSts = _this.sOssSts.bind(_this);
  66. return _this;
  67. }
  68. _createClass(App, [{
  69. key: "componentWillMount",
  70. value: function componentWillMount() {
  71. this.axios = _axios2.default;
  72. this.axios.defaults.withCredentials = true;
  73. if (this.props.token) {
  74. this.axios.defaults.headers.common["Authorization"] = "Bearer " + this.props.token;
  75. }
  76. }
  77. }, {
  78. key: "componentDidMount",
  79. value: function componentDidMount() {
  80. this.loadLocales();
  81. }
  82. /**
  83. * 加载语言包
  84. * 只能根据url或者传入的props来确定加载哪个语言包
  85. * 优先级:传入的props > url
  86. */
  87. }, {
  88. key: "loadLocales",
  89. value: function loadLocales() {
  90. var _this2 = this;
  91. var currentLocale = this.props.locales;
  92. if (!currentLocale) {
  93. currentLocale = _reactIntlUniversal2.default.determineLocale({
  94. urlLocaleKey: "lang"
  95. });
  96. }
  97. currentLocale = _lang.SUPPORT_LOCALES.find(function (item) {
  98. return item.value === currentLocale;
  99. }) ? currentLocale : "zh-CN";
  100. // 使用绝对路径
  101. var languageURL = _constant.LANGUAGE_LINK + "/" + currentLocale + ".json";
  102. return fetch(languageURL).then(function (response) {
  103. if (response.status >= 400) {
  104. throw new Error('Bad response from server');
  105. }
  106. return response.json();
  107. }).then(function (data) {
  108. // console.log('data: ', data);
  109. _reactIntlUniversal2.default.init({
  110. currentLocale: currentLocale,
  111. locales: _defineProperty({}, currentLocale, data)
  112. }).then(function () {
  113. _this2.setState({ initDone: true, locale: currentLocale });
  114. });
  115. });
  116. }
  117. }, {
  118. key: "error",
  119. value: function error(msg) {
  120. var info = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  121. if (this.props.showError) {
  122. _message3.default.error(msg);
  123. }
  124. if (this.props.onError) {
  125. this.props.onError(msg, info);
  126. }
  127. }
  128. }, {
  129. key: "errorHandler",
  130. value: function errorHandler(error) {
  131. var locale = this.state.locale;
  132. var localResponse = _lang.LOCALES_RESPONSE[locale];
  133. if (error.response && error.response.data && error.response.data.msg) {
  134. this.error(localResponse[error.response.data.msg] || _constant.ERROR_DEFAULT, {
  135. response: error.response
  136. });
  137. return;
  138. }
  139. this.error(localResponse[error.response.data.msg] || _constant.ERROR_DEFAULT, {
  140. response: error.response
  141. });
  142. }
  143. /**
  144. * 改变 loading 状态
  145. * @param {string} key key
  146. * @param {string} value value
  147. */
  148. }, {
  149. key: "handleChangeLoading",
  150. value: function handleChangeLoading(key, value) {
  151. var loading = this.state.loading;
  152. loading[key] = value;
  153. this.setState({ loading: loading });
  154. }
  155. /**
  156. * 获取评论列表
  157. */
  158. }, {
  159. key: "sGetComment",
  160. value: function sGetComment() {
  161. var _this3 = this;
  162. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  163. _ref$page = _ref.page,
  164. page = _ref$page === undefined ? 1 : _ref$page;
  165. var pageType = this.props.pageType;
  166. this.handleChangeLoading("sGetComment", true);
  167. var _props = this.props,
  168. API = _props.API,
  169. type = _props.type,
  170. businessId = _props.businessId,
  171. limit = _props.limit;
  172. this.axios.get(API + "/comments?type=" + type + "&business_id=" + businessId + "&page=" + page + "&limit=" + limit).then(function (response) {
  173. var _response$data = response.data,
  174. list = _response$data.list,
  175. page = _response$data.page,
  176. total = _response$data.total;
  177. if (list) {
  178. var newList = list;
  179. var oldList = _this3.state.list;
  180. if (pageType === "more") {
  181. if (page > 1) {
  182. // 删除临时数据
  183. oldList = oldList.filter(function (o) {
  184. return !o.isTemporary;
  185. });
  186. newList = oldList.concat(newList);
  187. }
  188. } else if (pageType === "pagination") {
  189. // TODO 滚动到顶部
  190. window.scrollTo(0, 0);
  191. }
  192. _this3.setState({
  193. list: newList,
  194. page: page,
  195. total: total
  196. });
  197. _this3.props.onCountChange(total);
  198. } else {
  199. _message3.default.info(_reactIntlUniversal2.default.get("message.noMoreComment"));
  200. _this3.setState({
  201. isNoMoreComment: true
  202. });
  203. }
  204. }).catch(this.errorHandler).finally(function () {
  205. _this3.handleChangeLoading("sGetComment", false);
  206. });
  207. }
  208. /**
  209. * 获取更多回复
  210. */
  211. }, {
  212. key: "sGetReply",
  213. value: function sGetReply() {
  214. var _this4 = this;
  215. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  216. commentId = _ref2.commentId,
  217. _ref2$page = _ref2.page,
  218. page = _ref2$page === undefined ? 1 : _ref2$page;
  219. this.handleChangeLoading("sGetReply", true);
  220. var _props2 = this.props,
  221. API = _props2.API,
  222. limit = _props2.limit;
  223. this.axios.get(API + "/replies?comment_id=" + commentId + "&page=" + page + "&limit=" + limit).then(function (response) {
  224. if (!response.data.list) {
  225. _message3.default.info(_reactIntlUniversal2.default.get("message.noMoreData"));
  226. }
  227. var list = _this4.state.list.map(function (item) {
  228. if (item.id === commentId) {
  229. if (!item.replies) item.replies = [];
  230. if (response.data.list) {
  231. if (page === 1) {
  232. // 如果当前页数为第一页,则清空当前所有的 replies
  233. // 并将获取到的 replies 存放在 state
  234. item.replies = response.data.list;
  235. } else {
  236. item.replies = item.replies.filter(function (o) {
  237. return !o.isTemporary;
  238. }).concat(response.data.list);
  239. // 如果当前页数非第一页,则合并 replies
  240. }
  241. item.reply_count = response.data.total;
  242. item.reply_page = response.data.page;
  243. } else {
  244. item.isNoMoreReply = true;
  245. }
  246. }
  247. return item;
  248. });
  249. _this4.setState({ list: list });
  250. }).catch(this.errorHandler).finally(function () {
  251. _this4.handleChangeLoading("sGetReply", false);
  252. });
  253. }
  254. /**
  255. * 添加评论
  256. * @param {object} {content} comment content
  257. */
  258. }, {
  259. key: "sCreateComment",
  260. value: function sCreateComment() {
  261. var _this5 = this;
  262. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  263. content = _ref3.content;
  264. var cb = arguments[1];
  265. if (!content) return this.error(_reactIntlUniversal2.default.get("message.notNull"));
  266. this.handleChangeLoading("sCreateComment", true);
  267. var _props3 = this.props,
  268. API = _props3.API,
  269. type = _props3.type,
  270. businessId = _props3.businessId,
  271. businessUserId = _props3.businessUserId;
  272. this.axios(API + "/comments", {
  273. method: "post",
  274. data: {
  275. type: type,
  276. business_id: businessId,
  277. business_user_id: businessUserId,
  278. content: content
  279. },
  280. withCredentials: true
  281. }).then(function (response) {
  282. if (_this5.props.showAlertComment) {
  283. _message3.default.success(_reactIntlUniversal2.default.get("message.success"));
  284. }
  285. if ((0, _helper.isFunction)(cb)) cb();
  286. // 将数据写入到 list 中
  287. // 临时插入
  288. // 等到获取数据之后,删除临时数据
  289. var _state = _this5.state,
  290. list = _state.list,
  291. total = _state.total;
  292. list.unshift(_extends({}, response.data, {
  293. isTemporary: true // 临时的数据
  294. }));
  295. _this5.setState({ list: list, total: total + 1 });
  296. _this5.props.onCountChange(total + 1);
  297. }).catch(this.errorHandler).finally(function () {
  298. _this5.handleChangeLoading("sCreateComment", false);
  299. });
  300. }
  301. /**
  302. * 删除评论
  303. */
  304. }, {
  305. key: "sDeleteComment",
  306. value: function sDeleteComment(commentId) {
  307. var _this6 = this;
  308. this.handleChangeLoading("sDeleteComment", true);
  309. var API = this.props.API;
  310. this.axios(API + "/comments/" + commentId, {
  311. method: "delete",
  312. withCredentials: true
  313. }).then(function () {
  314. var _state2 = _this6.state,
  315. list = _state2.list,
  316. total = _state2.total;
  317. var res = list.filter(function (item) {
  318. return item.id !== commentId;
  319. });
  320. _this6.setState({ list: res, total: total - 1 });
  321. _this6.props.onDelete(_constant.COMMENT_TYPE.COMMENT);
  322. _this6.props.onCountChange(total - 1);
  323. }).catch(this.errorHandler).finally(function () {
  324. _this6.handleChangeLoading("sDeleteComment", false);
  325. });
  326. }
  327. /**
  328. * 添加回复
  329. * 回复评论/回复回复
  330. * @param {object} data { comment_id, content, [reply_id] }
  331. */
  332. }, {
  333. key: "sCreateReply",
  334. value: function sCreateReply(data, cb) {
  335. var _this7 = this;
  336. if (!data.content) return this.error(_reactIntlUniversal2.default.get("message.replyNoNull"));
  337. this.handleChangeLoading("sCreateReply", true);
  338. var API = this.props.API;
  339. this.axios(API + "/replies", {
  340. method: "post",
  341. data: data,
  342. withCredentials: true
  343. }).then(function (response) {
  344. if (_this7.props.showAlertReply) {
  345. _message3.default.success(_reactIntlUniversal2.default.get("message.replySuccess"));
  346. }
  347. if ((0, _helper.isFunction)(cb)) cb();
  348. // 将数据写入到 list 中
  349. // 临时插入
  350. // 等到获取数据之后,删除临时数据
  351. var list = _this7.state.list.map(function (item) {
  352. if (item.id === data.comment_id) {
  353. if (!item.replies) item.replies = [];
  354. item.replies.push(_extends({}, response.data, {
  355. isTemporary: true // 临时的数据
  356. }));
  357. item.reply_count += 1;
  358. }
  359. return item;
  360. });
  361. _this7.setState({ list: list });
  362. }).catch(this.errorHandler).finally(function () {
  363. _this7.handleChangeLoading("sCreateReply", false);
  364. });
  365. }
  366. /**
  367. * 删除回复
  368. * @param {*} replyId
  369. * @param {*} commentId
  370. */
  371. }, {
  372. key: "sDeleteReply",
  373. value: function sDeleteReply(replyId, commentId) {
  374. var _this8 = this;
  375. this.handleChangeLoading("sDeleteReply", true);
  376. var API = this.props.API;
  377. this.axios(API + "/replies/" + replyId + "?CommentID=" + commentId, {
  378. method: "delete",
  379. withCredentials: true
  380. }).then(function () {
  381. var list = _this8.state.list.map(function (item) {
  382. if (item.id === commentId) {
  383. var replies = item.replies.filter(function (item) {
  384. return item.id !== replyId;
  385. });
  386. item.replies = replies;
  387. item.reply_count -= 1;
  388. }
  389. return item;
  390. });
  391. _this8.setState({ list: list });
  392. _this8.props.onDelete(_constant.COMMENT_TYPE.REPLY);
  393. }).catch(this.errorHandler).finally(function () {
  394. _this8.handleChangeLoading("sDeleteReply", false);
  395. });
  396. }
  397. /**
  398. * 评论 点赞/取消点赞
  399. * @param {string} commentId { commentId }
  400. * @param {boolean} favored 是否已经点过赞
  401. */
  402. }, {
  403. key: "sCommentFavor",
  404. value: function sCommentFavor(commentId, favored) {
  405. var _this9 = this;
  406. this.handleChangeLoading("sCommentFavor", true);
  407. var API = this.props.API;
  408. this.axios(API + "/comments/" + commentId + "/favor", {
  409. method: favored ? "delete" : "put",
  410. withCredentials: true
  411. }).then(function (response) {
  412. if (_this9.props.showAlertFavor) {
  413. _message3.default.success(favored ? _reactIntlUniversal2.default.get("message.cancelLickSuccess") : _reactIntlUniversal2.default.get("message.likeSuccess"));
  414. }
  415. // 更新 list 中的该项数据的 favored
  416. var list = _this9.state.list.map(function (item) {
  417. if (item.id === commentId) {
  418. item.favored = !favored;
  419. item.favor_count += favored ? -1 : 1;
  420. }
  421. return item;
  422. });
  423. _this9.setState({ list: list });
  424. }).catch(this.errorHandler).finally(function () {
  425. _this9.handleChangeLoading("sCommentFavor", false);
  426. });
  427. }
  428. /**
  429. * 回复 点赞/取消点赞
  430. * @param {string} replyId replyId
  431. * @param {string} commentId commentId
  432. * @param {boolean} favored 是否已经点过赞
  433. */
  434. }, {
  435. key: "sReplyFavor",
  436. value: function sReplyFavor(replyId, commentId, favored) {
  437. var _this10 = this;
  438. this.handleChangeLoading("sReplyFavor", true);
  439. var API = this.props.API;
  440. this.axios(API + "/replies/" + replyId + "/favor", {
  441. method: favored ? "delete" : "put",
  442. data: {
  443. comment_id: commentId
  444. },
  445. withCredentials: true
  446. }).then(function (response) {
  447. _message3.default.success(favored ? _reactIntlUniversal2.default.get("message.cancelLickSuccess") : _reactIntlUniversal2.default.get("message.likeSuccess"));
  448. // 更新 list 中的该项数据的 favored
  449. var list = _this10.state.list.map(function (item) {
  450. if (item.id === commentId) {
  451. item.replies = item.replies.map(function (r) {
  452. if (r.id === replyId) {
  453. r.favored = !favored;
  454. // r.favor_count = response.data.favor_count;
  455. // 点赞数 +1,而不是使用后端返回的点赞数
  456. // 不然如果返回的不是增加 1,用户可能以为程序错误
  457. r.favor_count += favored ? -1 : 1;
  458. }
  459. return r;
  460. });
  461. }
  462. return item;
  463. });
  464. _this10.setState({ list: list });
  465. }).catch(this.errorHandler).finally(function () {
  466. _this10.handleChangeLoading("sReplyFavor", false);
  467. });
  468. }
  469. /**
  470. * 获取 OSS 上传的参数
  471. */
  472. }, {
  473. key: "sOssSts",
  474. value: function sOssSts() {
  475. var _this11 = this;
  476. this.handleChangeLoading("sOssSts", true);
  477. var API = this.props.API;
  478. this.axios.get(API + "/oss/sts").then(function (response) {
  479. _this11.setState({ oss: _extends({}, response.data) });
  480. }).catch(this.errorHandler).finally(function () {
  481. _this11.handleChangeLoading("sOssSts", false);
  482. });
  483. }
  484. }, {
  485. key: "render",
  486. value: function render() {
  487. // 添加到 Context 的数据
  488. var value = _extends({}, this.state, this.props, {
  489. sCreateComment: this.sCreateComment,
  490. sGetComment: this.sGetComment,
  491. sCommentFavor: this.sCommentFavor,
  492. sReplyFavor: this.sReplyFavor,
  493. sCreateReply: this.sCreateReply,
  494. sGetReply: this.sGetReply,
  495. sOssSts: this.sOssSts,
  496. sDeleteComment: this.sDeleteComment,
  497. sDeleteReply: this.sDeleteReply
  498. });
  499. return this.state.initDone && _react2.default.createElement(
  500. _Comment.CommentContext.Provider,
  501. { value: value },
  502. _react2.default.createElement(
  503. "div",
  504. { className: "comment" },
  505. this.props.showEditor && _react2.default.createElement(_CommentInput2.default, { content: this.props.children }),
  506. this.props.showList && _react2.default.createElement(
  507. "div",
  508. { style: { marginTop: 20 } },
  509. _react2.default.createElement(_CommentList2.default, null)
  510. )
  511. )
  512. );
  513. }
  514. }]);
  515. return App;
  516. }(_react.Component);
  517. App.propTypes = {
  518. type: _propTypes2.default.number.isRequired, // 评论的 type
  519. businessId: _propTypes2.default.string.isRequired, // 评论的 business_id
  520. businessUserId: _propTypes2.default.number,
  521. API: _propTypes2.default.string, // 评论的 API 前缀
  522. showList: _propTypes2.default.bool, // 是否显示评论列表
  523. showEditor: _propTypes2.default.bool, // 是否显示评论输入框
  524. showAlertComment: _propTypes2.default.bool, // 评论成功之后,是否通过 Antd 的 Message 组件进行提示
  525. showAlertReply: _propTypes2.default.bool, // 回复成功之后,是否通过 Antd 的 Message 组件进行提示
  526. showAlertFavor: _propTypes2.default.bool, // 点赞/取消点赞成功之后,是否通过 Antd 的 Message 组件进行提示
  527. showError: _propTypes2.default.bool, // 是否使用Antd的Message组件提示错误信息
  528. onError: _propTypes2.default.func, // 错误回调, 出错了会被调用
  529. userId: _propTypes2.default.number, // 用户id, comment内部不维护用户id, 调用组件时传递过来, 目前用于判断是否显示删除按钮
  530. pageType: _propTypes2.default.string, // 分页类型
  531. page: _propTypes2.default.number, // 页码
  532. limit: _propTypes2.default.number, // 一次加载评论数量
  533. onPageChange: _propTypes2.default.func, // 页码变化回调
  534. onGetMoreBtnClick: _propTypes2.default.func, // 点击查看更多按钮回调
  535. onDelete: _propTypes2.default.func,
  536. locales: _propTypes2.default.string, // 传入的语言环境, en-US/zh-CN
  537. onCountChange: _propTypes2.default.func // 评论数量变更时的回调
  538. };
  539. App.defaultProps = {
  540. businessUserId: 0,
  541. API: "//api.links123.net/comment/v1",
  542. showList: true,
  543. showEditor: true,
  544. showAlertComment: false,
  545. showAlertReply: false,
  546. showAlertFavor: false,
  547. showError: true,
  548. pageType: "more",
  549. limit: _constant.LIMIT,
  550. onGetMoreBtnClick: function onGetMoreBtnClick() {},
  551. onPageChange: function onPageChange(page) {},
  552. onDelete: function onDelete() {},
  553. onCountChange: function onCountChange() {}
  554. };
  555. exports.Editor = _Editor2.default;
  556. exports.RenderText = _RenderText2.default;
  557. exports.default = App;
  558. //# sourceMappingURL=App.js.map