@commercetools-uikit/rich-text-input 17.0.1 → 18.0.0
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.
|
@@ -14,9 +14,9 @@ var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/obje
|
|
|
14
14
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
15
15
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
16
16
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
17
|
-
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
18
17
|
var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
19
18
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
19
|
+
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
20
20
|
var _pt = require('prop-types');
|
|
21
21
|
var react = require('react');
|
|
22
22
|
var utils = require('@commercetools-uikit/utils');
|
|
@@ -64,8 +64,8 @@ const EditorWrapper = /*#__PURE__*/_styled__default["default"]("div", process.en
|
|
|
64
64
|
label: "EditorWrapper"
|
|
65
65
|
})("align-self:stretch;cursor:", props => props.isDisabled || props.isReadOnly ? 'not-allowed' : 'inherit', ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVkaXRvci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS3FEIiwiZmlsZSI6ImVkaXRvci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgdHlwZSB7IFRFZGl0b3JQcm9wcyB9IGZyb20gJy4vZWRpdG9yJztcblxudHlwZSBURWRpdG9yV3JhcHBlclByb3BzID0gUGljazxURWRpdG9yUHJvcHMsICdpc0Rpc2FibGVkJyB8ICdpc1JlYWRPbmx5Jz47XG5cbmNvbnN0IEVkaXRvcldyYXBwZXIgPSBzdHlsZWQuZGl2PFRFZGl0b3JXcmFwcGVyUHJvcHM+YFxuICBhbGlnbi1zZWxmOiBzdHJldGNoO1xuICBjdXJzb3I6ICR7KHByb3BzKSA9PlxuICAgIHByb3BzLmlzRGlzYWJsZWQgfHwgcHJvcHMuaXNSZWFkT25seSA/ICdub3QtYWxsb3dlZCcgOiAnaW5oZXJpdCd9O1xuYDtcblxuZXhwb3J0IHsgRWRpdG9yV3JhcHBlciB9O1xuIl19 */"));
|
|
66
66
|
|
|
67
|
-
function ownKeys$1(
|
|
68
|
-
function _objectSpread$1(
|
|
67
|
+
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
68
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
69
69
|
const HOTKEYS = {
|
|
70
70
|
'mod+b': 'bold',
|
|
71
71
|
'mod+i': 'italic',
|
|
@@ -160,7 +160,7 @@ const Editor = /*#__PURE__*/react.forwardRef((props, forwardedRef) => {
|
|
|
160
160
|
onBlur: props.onBlur,
|
|
161
161
|
onFocus: event => {
|
|
162
162
|
var _props$onFocus;
|
|
163
|
-
(_props$onFocus = props.onFocus) === null || _props$onFocus === void 0
|
|
163
|
+
(_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event);
|
|
164
164
|
// opens the input if it regains focus and it's closed
|
|
165
165
|
if (!isOpen) {
|
|
166
166
|
toggle();
|
|
@@ -205,20 +205,19 @@ const Editor = /*#__PURE__*/react.forwardRef((props, forwardedRef) => {
|
|
|
205
205
|
Editor.displayName = 'Editor';
|
|
206
206
|
var Editor$1 = Editor;
|
|
207
207
|
|
|
208
|
-
function ownKeys(
|
|
209
|
-
function _objectSpread(
|
|
210
|
-
function
|
|
211
|
-
function _isNativeReflectConstruct() {
|
|
208
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
209
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
210
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
211
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
212
212
|
let RichTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
213
213
|
_inherits(RichTextInput, _PureComponent);
|
|
214
|
-
var _super = _createSuper(RichTextInput);
|
|
215
214
|
function RichTextInput() {
|
|
216
215
|
var _this;
|
|
217
216
|
_classCallCheck(this, RichTextInput);
|
|
218
217
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
219
218
|
args[_key] = arguments[_key];
|
|
220
219
|
}
|
|
221
|
-
_this =
|
|
220
|
+
_this = _callSuper(this, RichTextInput, [...args]);
|
|
222
221
|
_this.serializedValue = _this.props.value;
|
|
223
222
|
_this.internalSlateValue = richTextUtils.validSlateStateAdapter(richTextUtils.html.deserialize(_this.props.value || ''));
|
|
224
223
|
_this.onValueChange = state => {
|
|
@@ -236,7 +235,7 @@ let RichTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
236
235
|
// onChange unless this value changes.
|
|
237
236
|
if (hasSerializedValueChanged) {
|
|
238
237
|
var _this$props$onChange, _this$props;
|
|
239
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0
|
|
238
|
+
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 || _this$props$onChange.call(_this$props, {
|
|
240
239
|
target: {
|
|
241
240
|
value: richTextUtils.html.serialize(state)
|
|
242
241
|
}
|
|
@@ -334,7 +333,7 @@ RichTextInputWithRef.isTouched = isTouched;
|
|
|
334
333
|
var RichTextInputWithRef$1 = RichTextInputWithRef;
|
|
335
334
|
|
|
336
335
|
// NOTE: This string will be replaced on build time with the package version.
|
|
337
|
-
var version = "
|
|
336
|
+
var version = "18.0.0";
|
|
338
337
|
|
|
339
338
|
exports["default"] = RichTextInputWithRef$1;
|
|
340
339
|
exports.version = version;
|
|
@@ -14,9 +14,9 @@ var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/obje
|
|
|
14
14
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
15
15
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
16
16
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
17
|
-
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
18
17
|
var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
19
18
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
19
|
+
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
20
20
|
require('prop-types');
|
|
21
21
|
var react = require('react');
|
|
22
22
|
var utils = require('@commercetools-uikit/utils');
|
|
@@ -60,8 +60,8 @@ const EditorWrapper = /*#__PURE__*/_styled__default["default"]("div", {
|
|
|
60
60
|
target: "e1d53kc50"
|
|
61
61
|
} )("align-self:stretch;cursor:", props => props.isDisabled || props.isReadOnly ? 'not-allowed' : 'inherit', ";" + ("" ));
|
|
62
62
|
|
|
63
|
-
function ownKeys$1(
|
|
64
|
-
function _objectSpread$1(
|
|
63
|
+
function ownKeys$1(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
64
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
65
65
|
const HOTKEYS = {
|
|
66
66
|
'mod+b': 'bold',
|
|
67
67
|
'mod+i': 'italic',
|
|
@@ -156,7 +156,7 @@ const Editor = /*#__PURE__*/react.forwardRef((props, forwardedRef) => {
|
|
|
156
156
|
onBlur: props.onBlur,
|
|
157
157
|
onFocus: event => {
|
|
158
158
|
var _props$onFocus;
|
|
159
|
-
(_props$onFocus = props.onFocus) === null || _props$onFocus === void 0
|
|
159
|
+
(_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event);
|
|
160
160
|
// opens the input if it regains focus and it's closed
|
|
161
161
|
if (!isOpen) {
|
|
162
162
|
toggle();
|
|
@@ -201,20 +201,19 @@ const Editor = /*#__PURE__*/react.forwardRef((props, forwardedRef) => {
|
|
|
201
201
|
Editor.displayName = 'Editor';
|
|
202
202
|
var Editor$1 = Editor;
|
|
203
203
|
|
|
204
|
-
function ownKeys(
|
|
205
|
-
function _objectSpread(
|
|
206
|
-
function
|
|
207
|
-
function _isNativeReflectConstruct() {
|
|
204
|
+
function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
205
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
206
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
207
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
208
208
|
let RichTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
209
209
|
_inherits(RichTextInput, _PureComponent);
|
|
210
|
-
var _super = _createSuper(RichTextInput);
|
|
211
210
|
function RichTextInput() {
|
|
212
211
|
var _this;
|
|
213
212
|
_classCallCheck(this, RichTextInput);
|
|
214
213
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
215
214
|
args[_key] = arguments[_key];
|
|
216
215
|
}
|
|
217
|
-
_this =
|
|
216
|
+
_this = _callSuper(this, RichTextInput, [...args]);
|
|
218
217
|
_this.serializedValue = _this.props.value;
|
|
219
218
|
_this.internalSlateValue = richTextUtils.validSlateStateAdapter(richTextUtils.html.deserialize(_this.props.value || ''));
|
|
220
219
|
_this.onValueChange = state => {
|
|
@@ -232,7 +231,7 @@ let RichTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
232
231
|
// onChange unless this value changes.
|
|
233
232
|
if (hasSerializedValueChanged) {
|
|
234
233
|
var _this$props$onChange, _this$props;
|
|
235
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0
|
|
234
|
+
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 || _this$props$onChange.call(_this$props, {
|
|
236
235
|
target: {
|
|
237
236
|
value: richTextUtils.html.serialize(state)
|
|
238
237
|
}
|
|
@@ -309,7 +308,7 @@ RichTextInputWithRef.isTouched = isTouched;
|
|
|
309
308
|
var RichTextInputWithRef$1 = RichTextInputWithRef;
|
|
310
309
|
|
|
311
310
|
// NOTE: This string will be replaced on build time with the package version.
|
|
312
|
-
var version = "
|
|
311
|
+
var version = "18.0.0";
|
|
313
312
|
|
|
314
313
|
exports["default"] = RichTextInputWithRef$1;
|
|
315
314
|
exports.version = version;
|
|
@@ -10,9 +10,9 @@ import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object
|
|
|
10
10
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
11
11
|
import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
|
|
12
12
|
import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
13
|
-
import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
14
13
|
import _possibleConstructorReturn from '@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn';
|
|
15
14
|
import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
|
|
15
|
+
import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
16
16
|
import _pt from 'prop-types';
|
|
17
17
|
import { forwardRef, useRef, useMemo, useState, useCallback, useEffect, useImperativeHandle, PureComponent } from 'react';
|
|
18
18
|
import { filterDataAttributes, warning } from '@commercetools-uikit/utils';
|
|
@@ -40,8 +40,8 @@ const EditorWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV === "prod
|
|
|
40
40
|
label: "EditorWrapper"
|
|
41
41
|
})("align-self:stretch;cursor:", props => props.isDisabled || props.isReadOnly ? 'not-allowed' : 'inherit', ";" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVkaXRvci5zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS3FEIiwiZmlsZSI6ImVkaXRvci5zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgdHlwZSB7IFRFZGl0b3JQcm9wcyB9IGZyb20gJy4vZWRpdG9yJztcblxudHlwZSBURWRpdG9yV3JhcHBlclByb3BzID0gUGljazxURWRpdG9yUHJvcHMsICdpc0Rpc2FibGVkJyB8ICdpc1JlYWRPbmx5Jz47XG5cbmNvbnN0IEVkaXRvcldyYXBwZXIgPSBzdHlsZWQuZGl2PFRFZGl0b3JXcmFwcGVyUHJvcHM+YFxuICBhbGlnbi1zZWxmOiBzdHJldGNoO1xuICBjdXJzb3I6ICR7KHByb3BzKSA9PlxuICAgIHByb3BzLmlzRGlzYWJsZWQgfHwgcHJvcHMuaXNSZWFkT25seSA/ICdub3QtYWxsb3dlZCcgOiAnaW5oZXJpdCd9O1xuYDtcblxuZXhwb3J0IHsgRWRpdG9yV3JhcHBlciB9O1xuIl19 */"));
|
|
42
42
|
|
|
43
|
-
function ownKeys$1(
|
|
44
|
-
function _objectSpread$1(
|
|
43
|
+
function ownKeys$1(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
44
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
45
45
|
const HOTKEYS = {
|
|
46
46
|
'mod+b': 'bold',
|
|
47
47
|
'mod+i': 'italic',
|
|
@@ -136,7 +136,7 @@ const Editor = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
136
136
|
onBlur: props.onBlur,
|
|
137
137
|
onFocus: event => {
|
|
138
138
|
var _props$onFocus;
|
|
139
|
-
(_props$onFocus = props.onFocus) === null || _props$onFocus === void 0
|
|
139
|
+
(_props$onFocus = props.onFocus) === null || _props$onFocus === void 0 || _props$onFocus.call(props, event);
|
|
140
140
|
// opens the input if it regains focus and it's closed
|
|
141
141
|
if (!isOpen) {
|
|
142
142
|
toggle();
|
|
@@ -181,20 +181,19 @@ const Editor = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
181
181
|
Editor.displayName = 'Editor';
|
|
182
182
|
var Editor$1 = Editor;
|
|
183
183
|
|
|
184
|
-
function ownKeys(
|
|
185
|
-
function _objectSpread(
|
|
186
|
-
function
|
|
187
|
-
function _isNativeReflectConstruct() {
|
|
184
|
+
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
185
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
186
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
187
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
188
188
|
let RichTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
189
189
|
_inherits(RichTextInput, _PureComponent);
|
|
190
|
-
var _super = _createSuper(RichTextInput);
|
|
191
190
|
function RichTextInput() {
|
|
192
191
|
var _this;
|
|
193
192
|
_classCallCheck(this, RichTextInput);
|
|
194
193
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
195
194
|
args[_key] = arguments[_key];
|
|
196
195
|
}
|
|
197
|
-
_this =
|
|
196
|
+
_this = _callSuper(this, RichTextInput, [...args]);
|
|
198
197
|
_this.serializedValue = _this.props.value;
|
|
199
198
|
_this.internalSlateValue = validSlateStateAdapter(html.deserialize(_this.props.value || ''));
|
|
200
199
|
_this.onValueChange = state => {
|
|
@@ -212,7 +211,7 @@ let RichTextInput = /*#__PURE__*/function (_PureComponent) {
|
|
|
212
211
|
// onChange unless this value changes.
|
|
213
212
|
if (hasSerializedValueChanged) {
|
|
214
213
|
var _this$props$onChange, _this$props;
|
|
215
|
-
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0
|
|
214
|
+
(_this$props$onChange = (_this$props = _this.props).onChange) === null || _this$props$onChange === void 0 || _this$props$onChange.call(_this$props, {
|
|
216
215
|
target: {
|
|
217
216
|
value: html.serialize(state)
|
|
218
217
|
}
|
|
@@ -310,6 +309,6 @@ RichTextInputWithRef.isTouched = isTouched;
|
|
|
310
309
|
var RichTextInputWithRef$1 = RichTextInputWithRef;
|
|
311
310
|
|
|
312
311
|
// NOTE: This string will be replaced on build time with the package version.
|
|
313
|
-
var version = "
|
|
312
|
+
var version = "18.0.0";
|
|
314
313
|
|
|
315
314
|
export { RichTextInputWithRef$1 as default, version };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/rich-text-input",
|
|
3
3
|
"description": "A controlled rich text input component for rich text with validation states.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "18.0.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,18 +21,18 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/collapsible-motion": "
|
|
25
|
-
"@commercetools-uikit/constraints": "
|
|
26
|
-
"@commercetools-uikit/design-system": "
|
|
27
|
-
"@commercetools-uikit/flat-button": "
|
|
28
|
-
"@commercetools-uikit/hooks": "
|
|
29
|
-
"@commercetools-uikit/icons": "
|
|
30
|
-
"@commercetools-uikit/input-utils": "
|
|
31
|
-
"@commercetools-uikit/rich-text-utils": "
|
|
32
|
-
"@commercetools-uikit/spacings-inline": "
|
|
33
|
-
"@commercetools-uikit/spacings-stack": "
|
|
34
|
-
"@commercetools-uikit/tooltip": "
|
|
35
|
-
"@commercetools-uikit/utils": "
|
|
24
|
+
"@commercetools-uikit/collapsible-motion": "18.0.0",
|
|
25
|
+
"@commercetools-uikit/constraints": "18.0.0",
|
|
26
|
+
"@commercetools-uikit/design-system": "18.0.0",
|
|
27
|
+
"@commercetools-uikit/flat-button": "18.0.0",
|
|
28
|
+
"@commercetools-uikit/hooks": "18.0.0",
|
|
29
|
+
"@commercetools-uikit/icons": "18.0.0",
|
|
30
|
+
"@commercetools-uikit/input-utils": "18.0.0",
|
|
31
|
+
"@commercetools-uikit/rich-text-utils": "18.0.0",
|
|
32
|
+
"@commercetools-uikit/spacings-inline": "18.0.0",
|
|
33
|
+
"@commercetools-uikit/spacings-stack": "18.0.0",
|
|
34
|
+
"@commercetools-uikit/tooltip": "18.0.0",
|
|
35
|
+
"@commercetools-uikit/utils": "18.0.0",
|
|
36
36
|
"@emotion/react": "^11.10.5",
|
|
37
37
|
"@emotion/styled": "^11.10.5",
|
|
38
38
|
"downshift": "6.1.12",
|