@zohodesk/dot 1.4.9 → 1.4.11

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.
Files changed (79) hide show
  1. package/.cli/UnValidatedFiles.html +101 -0
  2. package/.cli/propValidation_report.html +1 -1
  3. package/README.md +10 -1
  4. package/coverage/ExternalLink/ExternalLink.js.html +1 -1
  5. package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
  6. package/coverage/ExternalLink/index.html +1 -1
  7. package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
  8. package/coverage/ExternalLink/props/index.html +1 -1
  9. package/coverage/ExternalLink/props/propTypes.js.html +1 -1
  10. package/coverage/IconButton/IconButton.js.html +1 -1
  11. package/coverage/IconButton/IconButton.module.css.html +1 -1
  12. package/coverage/IconButton/index.html +1 -1
  13. package/coverage/IconButton/props/defaultProps.js.html +1 -1
  14. package/coverage/IconButton/props/index.html +1 -1
  15. package/coverage/IconButton/props/propTypes.js.html +1 -1
  16. package/coverage/Image/Image.js.html +1 -1
  17. package/coverage/Image/Image.module.css.html +1 -1
  18. package/coverage/Image/index.html +1 -1
  19. package/coverage/Image/props/defaultProps.js.html +1 -1
  20. package/coverage/Image/props/index.html +1 -1
  21. package/coverage/Image/props/propTypes.js.html +1 -1
  22. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
  23. package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
  24. package/coverage/avatar/AvatarWithTeam/index.html +1 -1
  25. package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
  26. package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
  27. package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
  28. package/coverage/index.html +1 -1
  29. package/es/NewStar/NewStar.module.css +128 -67
  30. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -4
  31. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +9 -0
  32. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +9 -2
  33. package/es/form/fields/TagsMultiSelectField/props/defaultProps.js +3 -1
  34. package/es/form/fields/TagsMultiSelectField/props/propTypes.js +5 -1
  35. package/es/form/fields/TextEditor/TextEditor.module.css +63 -47
  36. package/es/v1/form/fields/SelectField/SelectField.js +1 -9
  37. package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +42 -13
  38. package/es/v1/form/fields/TagsMultiSelect/props/defaultProps.js +4 -1
  39. package/es/v1/form/fields/TagsMultiSelect/props/propTypes.js +10 -1
  40. package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +9 -2
  41. package/es/v1/form/fields/TagsMultiSelectField/props/defaultProps.js +3 -1
  42. package/es/v1/form/fields/TagsMultiSelectField/props/propTypes.js +5 -1
  43. package/es/v1/form/fields/TextBoxField/TextBoxField.js +122 -142
  44. package/es/v1/form/fields/TextEditorField/TextEditorField.js +133 -153
  45. package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +137 -178
  46. package/es/v1/form/fields/TextareaField/TextareaField.js +113 -137
  47. package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +43 -43
  48. package/es/v1/form/layout/Field/Field.js +24 -28
  49. package/es/v1/form/layout/Section/Section.js +26 -33
  50. package/es/v1/list/Subject/Subject.js +39 -48
  51. package/es/v1/list/TagNew/TagNew.js +18 -27
  52. package/es/v1/list/Thread/Thread.js +26 -35
  53. package/lib/NewStar/NewStar.module.css +128 -67
  54. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -5
  55. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +9 -0
  56. package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +9 -2
  57. package/lib/form/fields/TagsMultiSelectField/props/defaultProps.js +3 -1
  58. package/lib/form/fields/TagsMultiSelectField/props/propTypes.js +5 -1
  59. package/lib/form/fields/TextEditor/TextEditor.module.css +63 -47
  60. package/lib/v1/form/fields/SelectField/SelectField.js +1 -7
  61. package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +45 -13
  62. package/lib/v1/form/fields/TagsMultiSelect/props/defaultProps.js +4 -1
  63. package/lib/v1/form/fields/TagsMultiSelect/props/propTypes.js +10 -1
  64. package/lib/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +9 -2
  65. package/lib/v1/form/fields/TagsMultiSelectField/props/defaultProps.js +3 -1
  66. package/lib/v1/form/fields/TagsMultiSelectField/props/propTypes.js +5 -1
  67. package/lib/v1/form/fields/TextBoxField/TextBoxField.js +125 -181
  68. package/lib/v1/form/fields/TextEditorField/TextEditorField.js +138 -193
  69. package/lib/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +160 -212
  70. package/lib/v1/form/fields/TextareaField/TextareaField.js +117 -177
  71. package/lib/v1/form/fields/ValidationMessage/ValidationMessage.js +41 -80
  72. package/lib/v1/form/layout/Field/Field.js +22 -69
  73. package/lib/v1/form/layout/Section/Section.js +26 -72
  74. package/lib/v1/list/Subject/Subject.js +39 -87
  75. package/lib/v1/list/TagNew/TagNew.js +18 -66
  76. package/lib/v1/list/Thread/Thread.js +25 -73
  77. package/package.json +10 -10
  78. package/propValidationArg.json +8 -4
  79. package/result.json +1 -1
@@ -13,6 +13,8 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
+ var _useEffectCallOnlyAfterState = _interopRequireDefault(require("@zohodesk/hooks/es/utils/useEffectCallOnlyAfterState"));
17
+
16
18
  var _TextEditor = _interopRequireDefault(require("../TextEditor/TextEditor"));
17
19
 
18
20
  var _Textarea = _interopRequireDefault(require("@zohodesk/components/es/v1/Textarea/Textarea"));
@@ -31,226 +33,172 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
31
33
 
32
34
  function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
33
35
 
34
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
-
36
- 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); } }
37
-
38
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
36
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
39
37
 
40
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
38
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
41
39
 
42
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
40
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
43
41
 
44
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
42
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
45
43
 
46
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
44
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
47
45
 
48
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
49
-
50
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
51
-
52
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
46
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
53
47
 
54
48
  /* eslint-disable react/no-deprecated */
55
- var TextEditorWrapper = /*#__PURE__*/function (_Component) {
56
- _inherits(TextEditorWrapper, _Component);
57
-
58
- var _super = _createSuper(TextEditorWrapper);
59
-
60
- function TextEditorWrapper(props) {
61
- var _this;
62
-
63
- _classCallCheck(this, TextEditorWrapper);
64
-
65
- _this = _super.call(this, props);
66
- var value = props.value,
67
- isEditorDefaultOpen = props.isEditorDefaultOpen;
68
- _this.state = {
69
- isEditorShow: isEditorDefaultOpen ? true : !!value
70
- };
71
- _this.handleTextareaFocus = _this.handleTextareaFocus.bind(_assertThisInitialized(_this));
72
- _this.toggleEdit = _this.toggleEdit.bind(_assertThisInitialized(_this));
73
- _this.focusCallback = _this.focusCallback.bind(_assertThisInitialized(_this));
74
- return _this;
75
- }
76
-
77
- _createClass(TextEditorWrapper, [{
78
- key: "handleTextareaFocus",
79
- value: function handleTextareaFocus() {
80
- var _this2 = this;
81
-
82
- var _this$props = this.props,
83
- isReadOnly = _this$props.isReadOnly,
84
- isDisabled = _this$props.isDisabled;
85
-
86
- if (!isReadOnly && !isDisabled) {
87
- this.setState({
88
- isEditorShow: true
89
- }, function () {
90
- setTimeout(function () {
91
- editor[_this2.props.id].squireInstance.focus();
92
- }, 300);
93
- });
94
- }
95
- }
96
- }, {
97
- key: "toggleEdit",
98
- value: function toggleEdit(value) {
99
- this.setState({
100
- isEditorShow: value
101
- });
102
- }
103
- }, {
104
- key: "focusCallback",
105
- value: function focusCallback() {
106
- var onFocus = this.props.onFocus;
107
- this.setState({
108
- isEditorFocus: true
109
- });
110
- onFocus && onFocus();
111
- }
112
- }, {
113
- key: "componentWillReceiveProps",
114
- value: function componentWillReceiveProps(np) {
115
- var _this$props2 = this.props,
116
- id = _this$props2.id,
117
- value = _this$props2.value;
118
-
119
- if (np.value || typeof editor != 'undefined' && (0, _editorUtils.editorContentValidate)(editor[id])) {
120
- this.setState({
121
- isEditorShow: true
122
- });
123
- } else {
124
- if (!this.state.isEditorFocus && !this.props.isEditorDefaultOpen) {
125
- this.setState({
126
- isEditorShow: false
127
- });
128
- }
129
- } // if (np.value !== value && np.value == '') {
130
- // editor[id].setContent('');
131
- // }
132
-
49
+ var TextEditorWrapper = function TextEditorWrapper(props) {
50
+ var id = props.id,
51
+ onChange = props.onChange,
52
+ value = props.value,
53
+ onAttachmentUpload = props.onAttachmentUpload,
54
+ needEditor = props.needEditor,
55
+ dataId = props.dataId,
56
+ isReadOnly = props.isReadOnly,
57
+ isDisabled = props.isDisabled,
58
+ getRef = props.getRef,
59
+ textBoxSize = props.textBoxSize,
60
+ textBoxVariant = props.textBoxVariant,
61
+ editorMode = props.editorMode,
62
+ editorSize = props.editorSize,
63
+ editorBorder = props.editorBorder,
64
+ EDITORURL = props.EDITORURL,
65
+ isCustomScroll = props.isCustomScroll,
66
+ initCallback = props.initCallback,
67
+ loadingComponent = props.loadingComponent,
68
+ handleAlertMessage = props.handleAlertMessage,
69
+ editorCallback = props.editorCallback,
70
+ editorBlurCallback = props.editorBlurCallback,
71
+ editorOptions = props.editorOptions,
72
+ changeEditorContent = props.changeEditorContent,
73
+ shouldEditorUpdateContent = props.shouldEditorUpdateContent,
74
+ setInlineAttachmentInProgress = props.setInlineAttachmentInProgress,
75
+ handleEditorDropUpload = props.handleEditorDropUpload,
76
+ ImgLazyLoad = props.ImgLazyLoad,
77
+ i18nKeys = props.i18nKeys,
78
+ isEditorDefaultOpen = props.isEditorDefaultOpen,
79
+ needInlineAttachment = props.needInlineAttachment,
80
+ customProps = props.customProps,
81
+ dataSelectorId = props.dataSelectorId,
82
+ onFocus = props.onFocus;
83
+ var _customProps$Textarea = customProps.Textarea1Props,
84
+ Textarea1Props = _customProps$Textarea === void 0 ? {} : _customProps$Textarea,
85
+ _customProps$Textarea2 = customProps.Textarea2Props,
86
+ Textarea2Props = _customProps$Textarea2 === void 0 ? {} : _customProps$Textarea2,
87
+ _customProps$TextEdit = customProps.TextEditorProps,
88
+ TextEditorProps = _customProps$TextEdit === void 0 ? {} : _customProps$TextEdit;
89
+
90
+ var _useState = (0, _react.useState)(isEditorDefaultOpen ? true : !!value),
91
+ _useState2 = _slicedToArray(_useState, 2),
92
+ isEditorShow = _useState2[0],
93
+ setIsEditorShow = _useState2[1];
94
+
95
+ var _useState3 = (0, _react.useState)(false),
96
+ _useState4 = _slicedToArray(_useState3, 2),
97
+ isEditorFocus = _useState4[0],
98
+ setIsEditorFocus = _useState4[1];
99
+
100
+ var defaultObj = {
101
+ needEditorFocus: !value
102
+ };
103
+ var editorOptionsObject = Object.assign(defaultObj, editorOptions);
104
+
105
+ var handleTextareaFocus = function handleTextareaFocus() {
106
+ if (!isReadOnly && !isDisabled) {
107
+ setIsEditorShow(true);
108
+ setTimeout(function () {
109
+ editor[id].squireInstance.focus();
110
+ }, 300);
133
111
  }
134
- }, {
135
- key: "render",
136
- value: function render() {
137
- var isEditorShow = this.state.isEditorShow;
138
- var _this$props3 = this.props,
139
- id = _this$props3.id,
140
- onChange = _this$props3.onChange,
141
- value = _this$props3.value,
142
- onAttachmentUpload = _this$props3.onAttachmentUpload,
143
- needEditor = _this$props3.needEditor,
144
- dataId = _this$props3.dataId,
145
- isReadOnly = _this$props3.isReadOnly,
146
- isDisabled = _this$props3.isDisabled,
147
- getRef = _this$props3.getRef,
148
- textBoxSize = _this$props3.textBoxSize,
149
- textBoxVariant = _this$props3.textBoxVariant,
150
- editorMode = _this$props3.editorMode,
151
- editorSize = _this$props3.editorSize,
152
- editorBorder = _this$props3.editorBorder,
153
- EDITORURL = _this$props3.EDITORURL,
154
- isCustomScroll = _this$props3.isCustomScroll,
155
- initCallback = _this$props3.initCallback,
156
- loadingComponent = _this$props3.loadingComponent,
157
- handleAlertMessage = _this$props3.handleAlertMessage,
158
- editorCallback = _this$props3.editorCallback,
159
- editorBlurCallback = _this$props3.editorBlurCallback,
160
- editorOptions = _this$props3.editorOptions,
161
- changeEditorContent = _this$props3.changeEditorContent,
162
- shouldEditorUpdateContent = _this$props3.shouldEditorUpdateContent,
163
- setInlineAttachmentInProgress = _this$props3.setInlineAttachmentInProgress,
164
- handleEditorDropUpload = _this$props3.handleEditorDropUpload,
165
- ImgLazyLoad = _this$props3.ImgLazyLoad,
166
- i18nKeys = _this$props3.i18nKeys,
167
- isEditorDefaultOpen = _this$props3.isEditorDefaultOpen,
168
- needInlineAttachment = _this$props3.needInlineAttachment,
169
- customProps = _this$props3.customProps,
170
- dataSelectorId = _this$props3.dataSelectorId;
171
- var _customProps$Textarea = customProps.Textarea1Props,
172
- Textarea1Props = _customProps$Textarea === void 0 ? {} : _customProps$Textarea,
173
- _customProps$Textarea2 = customProps.Textarea2Props,
174
- Textarea2Props = _customProps$Textarea2 === void 0 ? {} : _customProps$Textarea2,
175
- _customProps$TextEdit = customProps.TextEditorProps,
176
- TextEditorProps = _customProps$TextEdit === void 0 ? {} : _customProps$TextEdit;
177
- var defaultObj = {
178
- needEditorFocus: !value
179
- };
180
- var editorOptionsObject = Object.assign(defaultObj, editorOptions);
181
- return /*#__PURE__*/_react["default"].createElement("div", {
182
- className: _TextEditorWrapperModule["default"].container,
183
- "data-selector-id": dataSelectorId
184
- }, !isEditorShow ? /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
185
- onFocus: this.handleTextareaFocus,
186
- text: value,
187
- animated: !needEditor,
188
- onChange: onChange,
189
- dataId: dataId,
190
- isReadOnly: isReadOnly,
191
- isDisabled: isDisabled,
192
- needEffect: !(isReadOnly || isDisabled),
193
- getRef: getRef,
194
- size: textBoxSize,
195
- variant: textBoxVariant,
196
- customClass: _TextEditorWrapperModule["default"].textBox
197
- }, Textarea1Props)) : null, /*#__PURE__*/_react["default"].createElement(_VelocityAnimationGroup["default"], {
198
- name: "slideDown",
199
- runOnMount: true,
200
- enterDuration: '300',
201
- exitDuration: '400',
202
- isActive: isEditorShow,
203
- component: "div"
204
- }, /*#__PURE__*/_react["default"].createElement("div", {
205
- className: _TextEditorWrapperModule["default"].textEditor
206
- }, isEditorShow && needEditor ? /*#__PURE__*/_react["default"].createElement(_TextEditor["default"], _extends({
207
- id: id,
208
- value: value,
209
- onChange: !isReadOnly && !isDisabled ? onChange : null,
210
- editorOptions: editorOptionsObject,
211
- onUpload: onAttachmentUpload,
212
- editorMode: editorMode,
213
- type: editorSize,
214
- border: editorBorder,
215
- dataId: dataId,
216
- getRef: getRef,
217
- plainTextSwitchCallback: !isReadOnly && !isDisabled ? onChange : null,
218
- EDITORURL: EDITORURL,
219
- isCustomScroll: isCustomScroll,
220
- initCallback: initCallback,
221
- loadingComponent: loadingComponent,
222
- handleAlertMessage: handleAlertMessage,
223
- toggleEdit: this.toggleEdit,
224
- isEditorDefaultOpen: isEditorDefaultOpen,
225
- editorCallback: editorCallback,
226
- i18nKeys: i18nKeys,
227
- ImgLazyLoad: ImgLazyLoad,
228
- blurCallback: editorBlurCallback,
229
- changeEditorContent: changeEditorContent,
230
- shouldUpdateContent: shouldEditorUpdateContent,
231
- setInlineAttachmentInProgress: setInlineAttachmentInProgress,
232
- handleDropUpload: handleEditorDropUpload,
233
- onFocus: this.focusCallback,
234
- needInlineAttachment: needInlineAttachment
235
- }, TextEditorProps)) : /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
236
- onFocus: this.handleTextareaFocus,
237
- text: value,
238
- animated: !needEditor,
239
- onChange: onChange,
240
- dataId: dataId,
241
- isReadOnly: isReadOnly,
242
- isDisabled: isDisabled,
243
- needEffect: !(isReadOnly || isDisabled),
244
- getRef: getRef,
245
- size: textBoxSize,
246
- variant: textBoxVariant
247
- }, Textarea2Props)))));
112
+ };
113
+
114
+ var toggleEdit = function toggleEdit(value) {
115
+ setIsEditorShow(value);
116
+ };
117
+
118
+ var focusCallback = function focusCallback() {
119
+ setIsEditorFocus(true);
120
+ onFocus && onFocus();
121
+ };
122
+
123
+ (0, _useEffectCallOnlyAfterState["default"])(function () {
124
+ if (value || typeof editor !== 'undefined' && (0, _editorUtils.editorContentValidate)(editor[id])) {
125
+ setIsEditorShow(true);
126
+ } else {
127
+ if (!isEditorFocus && !isEditorDefaultOpen) {
128
+ setIsEditorShow(false);
129
+ }
248
130
  }
249
- }]);
250
-
251
- return TextEditorWrapper;
252
- }(_react.Component);
253
-
254
- exports["default"] = TextEditorWrapper;
131
+ }, [value, id, isEditorDefaultOpen]);
132
+ return /*#__PURE__*/_react["default"].createElement("div", {
133
+ className: _TextEditorWrapperModule["default"].container,
134
+ "data-selector-id": dataSelectorId
135
+ }, !isEditorShow ? /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
136
+ onFocus: handleTextareaFocus,
137
+ text: value,
138
+ animated: !needEditor,
139
+ onChange: onChange,
140
+ dataId: dataId,
141
+ isReadOnly: isReadOnly,
142
+ isDisabled: isDisabled,
143
+ needEffect: !(isReadOnly || isDisabled),
144
+ getRef: getRef,
145
+ size: textBoxSize,
146
+ variant: textBoxVariant,
147
+ customClass: _TextEditorWrapperModule["default"].textBox
148
+ }, Textarea1Props)) : null, /*#__PURE__*/_react["default"].createElement(_VelocityAnimationGroup["default"], {
149
+ name: "slideDown",
150
+ runOnMount: true,
151
+ enterDuration: '300',
152
+ exitDuration: '400',
153
+ isActive: isEditorShow,
154
+ component: "div"
155
+ }, /*#__PURE__*/_react["default"].createElement("div", {
156
+ className: _TextEditorWrapperModule["default"].textEditor
157
+ }, isEditorShow && needEditor ? /*#__PURE__*/_react["default"].createElement(_TextEditor["default"], _extends({
158
+ id: id,
159
+ value: value,
160
+ onChange: !isReadOnly && !isDisabled ? onChange : null,
161
+ editorOptions: editorOptionsObject,
162
+ onUpload: onAttachmentUpload,
163
+ editorMode: editorMode,
164
+ type: editorSize,
165
+ border: editorBorder,
166
+ dataId: dataId,
167
+ getRef: getRef,
168
+ plainTextSwitchCallback: !isReadOnly && !isDisabled ? onChange : null,
169
+ EDITORURL: EDITORURL,
170
+ isCustomScroll: isCustomScroll,
171
+ initCallback: initCallback,
172
+ loadingComponent: loadingComponent,
173
+ handleAlertMessage: handleAlertMessage,
174
+ toggleEdit: toggleEdit,
175
+ isEditorDefaultOpen: isEditorDefaultOpen,
176
+ editorCallback: editorCallback,
177
+ i18nKeys: i18nKeys,
178
+ ImgLazyLoad: ImgLazyLoad,
179
+ blurCallback: editorBlurCallback,
180
+ changeEditorContent: changeEditorContent,
181
+ shouldUpdateContent: shouldEditorUpdateContent,
182
+ setInlineAttachmentInProgress: setInlineAttachmentInProgress,
183
+ handleDropUpload: handleEditorDropUpload,
184
+ onFocus: focusCallback,
185
+ needInlineAttachment: needInlineAttachment
186
+ }, TextEditorProps)) : /*#__PURE__*/_react["default"].createElement(_Textarea["default"], _extends({
187
+ onFocus: handleTextareaFocus,
188
+ text: value,
189
+ animated: !needEditor,
190
+ onChange: onChange,
191
+ dataId: dataId,
192
+ isReadOnly: isReadOnly,
193
+ isDisabled: isDisabled,
194
+ needEffect: !(isReadOnly || isDisabled),
195
+ getRef: getRef,
196
+ size: textBoxSize,
197
+ variant: textBoxVariant
198
+ }, Textarea2Props)))));
199
+ };
200
+
201
+ var _default = TextEditorWrapper;
202
+ exports["default"] = _default;
255
203
  TextEditorWrapper.propTypes = _propTypes.propTypes;
256
204
  TextEditorWrapper.defaultProps = _defaultProps.defaultProps;