hanbiro-react16-sdk 1.0.21 → 1.0.23
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/dist/components/ChatAIDraft/EmptyState.d.ts +6 -0
- package/dist/components/ChatAIDraft/EmptyState.js +220 -0
- package/dist/components/ChatAIDraft/List.js +55 -18
- package/dist/components/ChatAIDraft/SettingPopper.d.ts +5 -4
- package/dist/components/ChatAIDraft/SettingPopper.js +235 -79
- package/dist/components/ChatAIDraft/constants.d.ts +4 -0
- package/dist/components/ChatAIDraft/constants.js +18 -0
- package/dist/components/ChatAIDraft/index.d.ts +5 -8
- package/dist/components/ChatAIDraft/index.js +80 -48
- package/dist/components/index.d.ts +1 -1
- package/dist/hanbiro-react16-sdk.style.css +39 -2
- package/dist/hanbiro-react16-sdk.umd.js +7213 -3
- package/dist/index.js +2 -2
- package/dist/node_modules/prop-types/index.js +1 -2
- package/dist/node_modules/react-feather/dist/icons/align-justify.js +86 -0
- package/dist/node_modules/react-feather/dist/icons/{send.js → arrow-up.js} +10 -10
- package/dist/node_modules/react-feather/dist/icons/award.js +72 -0
- package/dist/node_modules/react-feather/dist/icons/check.js +68 -0
- package/dist/node_modules/react-feather/dist/icons/chevron-down.js +68 -0
- package/dist/node_modules/react-feather/dist/icons/compass.js +72 -0
- package/dist/node_modules/react-feather/dist/icons/file-text.js +82 -0
- package/dist/node_modules/react-feather/dist/icons/frown.js +82 -0
- package/dist/node_modules/react-feather/dist/icons/heart.js +68 -0
- package/dist/node_modules/react-feather/dist/icons/message-circle.js +68 -0
- package/dist/node_modules/react-feather/dist/icons/message-square.js +68 -0
- package/dist/node_modules/react-feather/dist/icons/scissors.js +89 -0
- package/dist/node_modules/react-feather/dist/icons/smile.js +82 -0
- package/dist/node_modules/react-feather/dist/icons/thumbs-up.js +68 -0
- package/dist/node_modules/react-feather/dist/icons/zap.js +68 -0
- package/package.json +1 -1
- package/dist/components/TinyMceEditor/index.js +0 -181
- package/dist/components/TinyMceEditor/scrollStyle.js +0 -40
- package/dist/components/TinyMceEditor/useEditor.js +0 -120
- package/dist/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/ScriptLoader2.js +0 -148
- package/dist/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/TinyMCE.js +0 -7
- package/dist/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/Utils.js +0 -103
- package/dist/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.js +0 -353
- package/dist/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.js +0 -102
|
@@ -1,353 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ScriptLoader } from "../ScriptLoader2.js";
|
|
3
|
-
import { getTinymce } from "../TinyMCE.js";
|
|
4
|
-
import { isFunction, isInDoc, setMode, isTextareaOrInput, mergePlugins, uuid, isBeforeInputEventAvailable, configHandlers } from "../Utils.js";
|
|
5
|
-
import { EditorPropTypes } from "./EditorPropTypes.js";
|
|
6
|
-
var __extends = /* @__PURE__ */ function() {
|
|
7
|
-
var extendStatics = function(d, b) {
|
|
8
|
-
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
9
|
-
d2.__proto__ = b2;
|
|
10
|
-
} || function(d2, b2) {
|
|
11
|
-
for (var p in b2) if (Object.prototype.hasOwnProperty.call(b2, p)) d2[p] = b2[p];
|
|
12
|
-
};
|
|
13
|
-
return extendStatics(d, b);
|
|
14
|
-
};
|
|
15
|
-
return function(d, b) {
|
|
16
|
-
if (typeof b !== "function" && b !== null)
|
|
17
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
18
|
-
extendStatics(d, b);
|
|
19
|
-
function __() {
|
|
20
|
-
this.constructor = d;
|
|
21
|
-
}
|
|
22
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
23
|
-
};
|
|
24
|
-
}();
|
|
25
|
-
var __assign = function() {
|
|
26
|
-
__assign = Object.assign || function(t) {
|
|
27
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
28
|
-
s = arguments[i];
|
|
29
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
30
|
-
t[p] = s[p];
|
|
31
|
-
}
|
|
32
|
-
return t;
|
|
33
|
-
};
|
|
34
|
-
return __assign.apply(this, arguments);
|
|
35
|
-
};
|
|
36
|
-
var Editor = (
|
|
37
|
-
/** @class */
|
|
38
|
-
function(_super) {
|
|
39
|
-
__extends(Editor2, _super);
|
|
40
|
-
function Editor2(props) {
|
|
41
|
-
var _a, _b, _c;
|
|
42
|
-
var _this = _super.call(this, props) || this;
|
|
43
|
-
_this.rollbackTimer = void 0;
|
|
44
|
-
_this.valueCursor = void 0;
|
|
45
|
-
_this.rollbackChange = function() {
|
|
46
|
-
var editor = _this.editor;
|
|
47
|
-
var value = _this.props.value;
|
|
48
|
-
if (editor && value && value !== _this.currentContent) {
|
|
49
|
-
editor.undoManager.ignore(function() {
|
|
50
|
-
editor.setContent(value);
|
|
51
|
-
if (_this.valueCursor && (!_this.inline || editor.hasFocus())) {
|
|
52
|
-
try {
|
|
53
|
-
editor.selection.moveToBookmark(_this.valueCursor);
|
|
54
|
-
} catch (e) {
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
_this.rollbackTimer = void 0;
|
|
60
|
-
};
|
|
61
|
-
_this.handleBeforeInput = function(_evt) {
|
|
62
|
-
if (_this.props.value !== void 0 && _this.props.value === _this.currentContent && _this.editor) {
|
|
63
|
-
if (!_this.inline || _this.editor.hasFocus()) {
|
|
64
|
-
try {
|
|
65
|
-
_this.valueCursor = _this.editor.selection.getBookmark(3);
|
|
66
|
-
} catch (e) {
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
_this.handleBeforeInputSpecial = function(evt) {
|
|
72
|
-
if (evt.key === "Enter" || evt.key === "Backspace" || evt.key === "Delete") {
|
|
73
|
-
_this.handleBeforeInput(evt);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
_this.handleEditorChange = function(_evt) {
|
|
77
|
-
var editor = _this.editor;
|
|
78
|
-
if (editor && editor.initialized) {
|
|
79
|
-
var newContent = editor.getContent();
|
|
80
|
-
if (_this.props.value !== void 0 && _this.props.value !== newContent && _this.props.rollback !== false) {
|
|
81
|
-
if (!_this.rollbackTimer) {
|
|
82
|
-
_this.rollbackTimer = window.setTimeout(_this.rollbackChange, typeof _this.props.rollback === "number" ? _this.props.rollback : 200);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (newContent !== _this.currentContent) {
|
|
86
|
-
_this.currentContent = newContent;
|
|
87
|
-
if (isFunction(_this.props.onEditorChange)) {
|
|
88
|
-
_this.props.onEditorChange(newContent, editor);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
_this.handleEditorChangeSpecial = function(evt) {
|
|
94
|
-
if (evt.key === "Backspace" || evt.key === "Delete") {
|
|
95
|
-
_this.handleEditorChange(evt);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
_this.initialise = function(attempts) {
|
|
99
|
-
var _a2, _b2, _c2;
|
|
100
|
-
if (attempts === void 0) {
|
|
101
|
-
attempts = 0;
|
|
102
|
-
}
|
|
103
|
-
var target = _this.elementRef.current;
|
|
104
|
-
if (!target) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
if (!isInDoc(target)) {
|
|
108
|
-
if (attempts === 0) {
|
|
109
|
-
setTimeout(function() {
|
|
110
|
-
return _this.initialise(1);
|
|
111
|
-
}, 1);
|
|
112
|
-
} else if (attempts < 100) {
|
|
113
|
-
setTimeout(function() {
|
|
114
|
-
return _this.initialise(attempts + 1);
|
|
115
|
-
}, 100);
|
|
116
|
-
} else {
|
|
117
|
-
throw new Error("tinymce can only be initialised when in a document");
|
|
118
|
-
}
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
var tinymce = getTinymce(_this.view);
|
|
122
|
-
if (!tinymce) {
|
|
123
|
-
throw new Error("tinymce should have been loaded into global scope");
|
|
124
|
-
}
|
|
125
|
-
var finalInit = __assign(__assign({}, _this.props.init), { selector: void 0, target, readonly: _this.props.disabled, inline: _this.inline, plugins: mergePlugins((_a2 = _this.props.init) === null || _a2 === void 0 ? void 0 : _a2.plugins, _this.props.plugins), toolbar: (_b2 = _this.props.toolbar) !== null && _b2 !== void 0 ? _b2 : (_c2 = _this.props.init) === null || _c2 === void 0 ? void 0 : _c2.toolbar, setup: function(editor) {
|
|
126
|
-
_this.editor = editor;
|
|
127
|
-
_this.bindHandlers({});
|
|
128
|
-
if (_this.inline && !isTextareaOrInput(target)) {
|
|
129
|
-
editor.once("PostRender", function(_evt) {
|
|
130
|
-
editor.setContent(_this.getInitialValue(), { no_events: true });
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
if (_this.props.init && isFunction(_this.props.init.setup)) {
|
|
134
|
-
_this.props.init.setup(editor);
|
|
135
|
-
}
|
|
136
|
-
}, init_instance_callback: function(editor) {
|
|
137
|
-
var _a3, _b3;
|
|
138
|
-
var initialValue = _this.getInitialValue();
|
|
139
|
-
_this.currentContent = (_a3 = _this.currentContent) !== null && _a3 !== void 0 ? _a3 : editor.getContent();
|
|
140
|
-
if (_this.currentContent !== initialValue) {
|
|
141
|
-
_this.currentContent = initialValue;
|
|
142
|
-
editor.setContent(initialValue);
|
|
143
|
-
editor.undoManager.clear();
|
|
144
|
-
editor.undoManager.add();
|
|
145
|
-
editor.setDirty(false);
|
|
146
|
-
}
|
|
147
|
-
var disabled = (_b3 = _this.props.disabled) !== null && _b3 !== void 0 ? _b3 : false;
|
|
148
|
-
setMode(_this.editor, disabled ? "readonly" : "design");
|
|
149
|
-
if (_this.props.init && isFunction(_this.props.init.init_instance_callback)) {
|
|
150
|
-
_this.props.init.init_instance_callback(editor);
|
|
151
|
-
}
|
|
152
|
-
} });
|
|
153
|
-
if (!_this.inline) {
|
|
154
|
-
target.style.visibility = "";
|
|
155
|
-
}
|
|
156
|
-
if (isTextareaOrInput(target)) {
|
|
157
|
-
target.value = _this.getInitialValue();
|
|
158
|
-
}
|
|
159
|
-
tinymce.init(finalInit);
|
|
160
|
-
};
|
|
161
|
-
_this.id = _this.props.id || uuid("tiny-react");
|
|
162
|
-
_this.elementRef = React.createRef();
|
|
163
|
-
_this.inline = (_c = (_a = _this.props.inline) !== null && _a !== void 0 ? _a : (_b = _this.props.init) === null || _b === void 0 ? void 0 : _b.inline) !== null && _c !== void 0 ? _c : false;
|
|
164
|
-
_this.boundHandlers = {};
|
|
165
|
-
return _this;
|
|
166
|
-
}
|
|
167
|
-
Object.defineProperty(Editor2.prototype, "view", {
|
|
168
|
-
get: function() {
|
|
169
|
-
var _a, _b;
|
|
170
|
-
return (_b = (_a = this.elementRef.current) === null || _a === void 0 ? void 0 : _a.ownerDocument.defaultView) !== null && _b !== void 0 ? _b : window;
|
|
171
|
-
},
|
|
172
|
-
enumerable: false,
|
|
173
|
-
configurable: true
|
|
174
|
-
});
|
|
175
|
-
Editor2.prototype.componentDidUpdate = function(prevProps) {
|
|
176
|
-
var _this = this;
|
|
177
|
-
var _a, _b;
|
|
178
|
-
if (this.rollbackTimer) {
|
|
179
|
-
clearTimeout(this.rollbackTimer);
|
|
180
|
-
this.rollbackTimer = void 0;
|
|
181
|
-
}
|
|
182
|
-
if (this.editor) {
|
|
183
|
-
this.bindHandlers(prevProps);
|
|
184
|
-
if (this.editor.initialized) {
|
|
185
|
-
this.currentContent = (_a = this.currentContent) !== null && _a !== void 0 ? _a : this.editor.getContent();
|
|
186
|
-
if (typeof this.props.initialValue === "string" && this.props.initialValue !== prevProps.initialValue) {
|
|
187
|
-
this.editor.setContent(this.props.initialValue);
|
|
188
|
-
this.editor.undoManager.clear();
|
|
189
|
-
this.editor.undoManager.add();
|
|
190
|
-
this.editor.setDirty(false);
|
|
191
|
-
} else if (typeof this.props.value === "string" && this.props.value !== this.currentContent) {
|
|
192
|
-
var localEditor_1 = this.editor;
|
|
193
|
-
localEditor_1.undoManager.transact(function() {
|
|
194
|
-
var cursor;
|
|
195
|
-
if (!_this.inline || localEditor_1.hasFocus()) {
|
|
196
|
-
try {
|
|
197
|
-
cursor = localEditor_1.selection.getBookmark(3);
|
|
198
|
-
} catch (e) {
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
var valueCursor = _this.valueCursor;
|
|
202
|
-
localEditor_1.setContent(_this.props.value);
|
|
203
|
-
if (!_this.inline || localEditor_1.hasFocus()) {
|
|
204
|
-
for (var _i = 0, _a2 = [cursor, valueCursor]; _i < _a2.length; _i++) {
|
|
205
|
-
var bookmark = _a2[_i];
|
|
206
|
-
if (bookmark) {
|
|
207
|
-
try {
|
|
208
|
-
localEditor_1.selection.moveToBookmark(bookmark);
|
|
209
|
-
_this.valueCursor = bookmark;
|
|
210
|
-
break;
|
|
211
|
-
} catch (e) {
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
if (this.props.disabled !== prevProps.disabled) {
|
|
219
|
-
var disabled = (_b = this.props.disabled) !== null && _b !== void 0 ? _b : false;
|
|
220
|
-
setMode(this.editor, disabled ? "readonly" : "design");
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
};
|
|
225
|
-
Editor2.prototype.componentDidMount = function() {
|
|
226
|
-
var _this = this;
|
|
227
|
-
var _a, _b, _c, _d, _e;
|
|
228
|
-
if (getTinymce(this.view) !== null) {
|
|
229
|
-
this.initialise();
|
|
230
|
-
} else if (Array.isArray(this.props.tinymceScriptSrc) && this.props.tinymceScriptSrc.length === 0) {
|
|
231
|
-
(_b = (_a = this.props).onScriptsLoadError) === null || _b === void 0 ? void 0 : _b.call(_a, new Error("No `tinymce` global is present but the `tinymceScriptSrc` prop was an empty array."));
|
|
232
|
-
} else if ((_c = this.elementRef.current) === null || _c === void 0 ? void 0 : _c.ownerDocument) {
|
|
233
|
-
var successHandler = function() {
|
|
234
|
-
var _a2, _b2;
|
|
235
|
-
(_b2 = (_a2 = _this.props).onScriptsLoad) === null || _b2 === void 0 ? void 0 : _b2.call(_a2);
|
|
236
|
-
_this.initialise();
|
|
237
|
-
};
|
|
238
|
-
var errorHandler = function(err) {
|
|
239
|
-
var _a2, _b2;
|
|
240
|
-
(_b2 = (_a2 = _this.props).onScriptsLoadError) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, err);
|
|
241
|
-
};
|
|
242
|
-
ScriptLoader.loadList(this.elementRef.current.ownerDocument, this.getScriptSources(), (_e = (_d = this.props.scriptLoading) === null || _d === void 0 ? void 0 : _d.delay) !== null && _e !== void 0 ? _e : 0, successHandler, errorHandler);
|
|
243
|
-
}
|
|
244
|
-
};
|
|
245
|
-
Editor2.prototype.componentWillUnmount = function() {
|
|
246
|
-
var _this = this;
|
|
247
|
-
var editor = this.editor;
|
|
248
|
-
if (editor) {
|
|
249
|
-
editor.off(this.changeEvents(), this.handleEditorChange);
|
|
250
|
-
editor.off(this.beforeInputEvent(), this.handleBeforeInput);
|
|
251
|
-
editor.off("keypress", this.handleEditorChangeSpecial);
|
|
252
|
-
editor.off("keydown", this.handleBeforeInputSpecial);
|
|
253
|
-
editor.off("NewBlock", this.handleEditorChange);
|
|
254
|
-
Object.keys(this.boundHandlers).forEach(function(eventName) {
|
|
255
|
-
editor.off(eventName, _this.boundHandlers[eventName]);
|
|
256
|
-
});
|
|
257
|
-
this.boundHandlers = {};
|
|
258
|
-
editor.remove();
|
|
259
|
-
this.editor = void 0;
|
|
260
|
-
}
|
|
261
|
-
};
|
|
262
|
-
Editor2.prototype.render = function() {
|
|
263
|
-
return this.inline ? this.renderInline() : this.renderIframe();
|
|
264
|
-
};
|
|
265
|
-
Editor2.prototype.changeEvents = function() {
|
|
266
|
-
var _a, _b, _c;
|
|
267
|
-
var isIE = (_c = (_b = (_a = getTinymce(this.view)) === null || _a === void 0 ? void 0 : _a.Env) === null || _b === void 0 ? void 0 : _b.browser) === null || _c === void 0 ? void 0 : _c.isIE();
|
|
268
|
-
return isIE ? "change keyup compositionend setcontent CommentChange" : "change input compositionend setcontent CommentChange";
|
|
269
|
-
};
|
|
270
|
-
Editor2.prototype.beforeInputEvent = function() {
|
|
271
|
-
return isBeforeInputEventAvailable() ? "beforeinput SelectionChange" : "SelectionChange";
|
|
272
|
-
};
|
|
273
|
-
Editor2.prototype.renderInline = function() {
|
|
274
|
-
var _a = this.props.tagName, tagName = _a === void 0 ? "div" : _a;
|
|
275
|
-
return React.createElement(tagName, {
|
|
276
|
-
ref: this.elementRef,
|
|
277
|
-
id: this.id
|
|
278
|
-
});
|
|
279
|
-
};
|
|
280
|
-
Editor2.prototype.renderIframe = function() {
|
|
281
|
-
return React.createElement("textarea", {
|
|
282
|
-
ref: this.elementRef,
|
|
283
|
-
style: { visibility: "hidden" },
|
|
284
|
-
name: this.props.textareaName,
|
|
285
|
-
id: this.id
|
|
286
|
-
});
|
|
287
|
-
};
|
|
288
|
-
Editor2.prototype.getScriptSources = function() {
|
|
289
|
-
var _a, _b;
|
|
290
|
-
var async = (_a = this.props.scriptLoading) === null || _a === void 0 ? void 0 : _a.async;
|
|
291
|
-
var defer = (_b = this.props.scriptLoading) === null || _b === void 0 ? void 0 : _b.defer;
|
|
292
|
-
if (this.props.tinymceScriptSrc !== void 0) {
|
|
293
|
-
if (typeof this.props.tinymceScriptSrc === "string") {
|
|
294
|
-
return [{ src: this.props.tinymceScriptSrc, async, defer }];
|
|
295
|
-
}
|
|
296
|
-
return this.props.tinymceScriptSrc.map(function(item) {
|
|
297
|
-
if (typeof item === "string") {
|
|
298
|
-
return { src: item, async, defer };
|
|
299
|
-
} else {
|
|
300
|
-
return item;
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
var channel = this.props.cloudChannel;
|
|
305
|
-
var apiKey = this.props.apiKey ? this.props.apiKey : "no-api-key";
|
|
306
|
-
var cloudTinyJs = "https://cdn.tiny.cloud/1/".concat(apiKey, "/tinymce/").concat(channel, "/tinymce.min.js");
|
|
307
|
-
return [{ src: cloudTinyJs, async, defer }];
|
|
308
|
-
};
|
|
309
|
-
Editor2.prototype.getInitialValue = function() {
|
|
310
|
-
if (typeof this.props.initialValue === "string") {
|
|
311
|
-
return this.props.initialValue;
|
|
312
|
-
} else if (typeof this.props.value === "string") {
|
|
313
|
-
return this.props.value;
|
|
314
|
-
} else {
|
|
315
|
-
return "";
|
|
316
|
-
}
|
|
317
|
-
};
|
|
318
|
-
Editor2.prototype.bindHandlers = function(prevProps) {
|
|
319
|
-
var _this = this;
|
|
320
|
-
if (this.editor !== void 0) {
|
|
321
|
-
configHandlers(this.editor, prevProps, this.props, this.boundHandlers, function(key) {
|
|
322
|
-
return _this.props[key];
|
|
323
|
-
});
|
|
324
|
-
var isValueControlled = function(p) {
|
|
325
|
-
return p.onEditorChange !== void 0 || p.value !== void 0;
|
|
326
|
-
};
|
|
327
|
-
var wasControlled = isValueControlled(prevProps);
|
|
328
|
-
var nowControlled = isValueControlled(this.props);
|
|
329
|
-
if (!wasControlled && nowControlled) {
|
|
330
|
-
this.editor.on(this.changeEvents(), this.handleEditorChange);
|
|
331
|
-
this.editor.on(this.beforeInputEvent(), this.handleBeforeInput);
|
|
332
|
-
this.editor.on("keydown", this.handleBeforeInputSpecial);
|
|
333
|
-
this.editor.on("keyup", this.handleEditorChangeSpecial);
|
|
334
|
-
this.editor.on("NewBlock", this.handleEditorChange);
|
|
335
|
-
} else if (wasControlled && !nowControlled) {
|
|
336
|
-
this.editor.off(this.changeEvents(), this.handleEditorChange);
|
|
337
|
-
this.editor.off(this.beforeInputEvent(), this.handleBeforeInput);
|
|
338
|
-
this.editor.off("keydown", this.handleBeforeInputSpecial);
|
|
339
|
-
this.editor.off("keyup", this.handleEditorChangeSpecial);
|
|
340
|
-
this.editor.off("NewBlock", this.handleEditorChange);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
Editor2.propTypes = EditorPropTypes;
|
|
345
|
-
Editor2.defaultProps = {
|
|
346
|
-
cloudChannel: "6"
|
|
347
|
-
};
|
|
348
|
-
return Editor2;
|
|
349
|
-
}(React.Component)
|
|
350
|
-
);
|
|
351
|
-
export {
|
|
352
|
-
Editor
|
|
353
|
-
};
|
package/dist/node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/EditorPropTypes.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { p as propTypesExports } from "../../../../../../../prop-types/index.js";
|
|
2
|
-
var __assign = function() {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var eventPropTypes = {
|
|
14
|
-
onActivate: propTypesExports.func,
|
|
15
|
-
onAddUndo: propTypesExports.func,
|
|
16
|
-
onBeforeAddUndo: propTypesExports.func,
|
|
17
|
-
onBeforeExecCommand: propTypesExports.func,
|
|
18
|
-
onBeforeGetContent: propTypesExports.func,
|
|
19
|
-
onBeforeRenderUI: propTypesExports.func,
|
|
20
|
-
onBeforeSetContent: propTypesExports.func,
|
|
21
|
-
onBeforePaste: propTypesExports.func,
|
|
22
|
-
onBlur: propTypesExports.func,
|
|
23
|
-
onChange: propTypesExports.func,
|
|
24
|
-
onClearUndos: propTypesExports.func,
|
|
25
|
-
onClick: propTypesExports.func,
|
|
26
|
-
onContextMenu: propTypesExports.func,
|
|
27
|
-
onCommentChange: propTypesExports.func,
|
|
28
|
-
onCopy: propTypesExports.func,
|
|
29
|
-
onCut: propTypesExports.func,
|
|
30
|
-
onDblclick: propTypesExports.func,
|
|
31
|
-
onDeactivate: propTypesExports.func,
|
|
32
|
-
onDirty: propTypesExports.func,
|
|
33
|
-
onDrag: propTypesExports.func,
|
|
34
|
-
onDragDrop: propTypesExports.func,
|
|
35
|
-
onDragEnd: propTypesExports.func,
|
|
36
|
-
onDragGesture: propTypesExports.func,
|
|
37
|
-
onDragOver: propTypesExports.func,
|
|
38
|
-
onDrop: propTypesExports.func,
|
|
39
|
-
onExecCommand: propTypesExports.func,
|
|
40
|
-
onFocus: propTypesExports.func,
|
|
41
|
-
onFocusIn: propTypesExports.func,
|
|
42
|
-
onFocusOut: propTypesExports.func,
|
|
43
|
-
onGetContent: propTypesExports.func,
|
|
44
|
-
onHide: propTypesExports.func,
|
|
45
|
-
onInit: propTypesExports.func,
|
|
46
|
-
onKeyDown: propTypesExports.func,
|
|
47
|
-
onKeyPress: propTypesExports.func,
|
|
48
|
-
onKeyUp: propTypesExports.func,
|
|
49
|
-
onLoadContent: propTypesExports.func,
|
|
50
|
-
onMouseDown: propTypesExports.func,
|
|
51
|
-
onMouseEnter: propTypesExports.func,
|
|
52
|
-
onMouseLeave: propTypesExports.func,
|
|
53
|
-
onMouseMove: propTypesExports.func,
|
|
54
|
-
onMouseOut: propTypesExports.func,
|
|
55
|
-
onMouseOver: propTypesExports.func,
|
|
56
|
-
onMouseUp: propTypesExports.func,
|
|
57
|
-
onNodeChange: propTypesExports.func,
|
|
58
|
-
onObjectResizeStart: propTypesExports.func,
|
|
59
|
-
onObjectResized: propTypesExports.func,
|
|
60
|
-
onObjectSelected: propTypesExports.func,
|
|
61
|
-
onPaste: propTypesExports.func,
|
|
62
|
-
onPostProcess: propTypesExports.func,
|
|
63
|
-
onPostRender: propTypesExports.func,
|
|
64
|
-
onPreProcess: propTypesExports.func,
|
|
65
|
-
onProgressState: propTypesExports.func,
|
|
66
|
-
onRedo: propTypesExports.func,
|
|
67
|
-
onRemove: propTypesExports.func,
|
|
68
|
-
onReset: propTypesExports.func,
|
|
69
|
-
onSaveContent: propTypesExports.func,
|
|
70
|
-
onSelectionChange: propTypesExports.func,
|
|
71
|
-
onSetAttrib: propTypesExports.func,
|
|
72
|
-
onSetContent: propTypesExports.func,
|
|
73
|
-
onShow: propTypesExports.func,
|
|
74
|
-
onSubmit: propTypesExports.func,
|
|
75
|
-
onUndo: propTypesExports.func,
|
|
76
|
-
onVisualAid: propTypesExports.func,
|
|
77
|
-
onSkinLoadError: propTypesExports.func,
|
|
78
|
-
onThemeLoadError: propTypesExports.func,
|
|
79
|
-
onModelLoadError: propTypesExports.func,
|
|
80
|
-
onPluginLoadError: propTypesExports.func,
|
|
81
|
-
onIconsLoadError: propTypesExports.func,
|
|
82
|
-
onLanguageLoadError: propTypesExports.func,
|
|
83
|
-
onScriptsLoad: propTypesExports.func,
|
|
84
|
-
onScriptsLoadError: propTypesExports.func
|
|
85
|
-
};
|
|
86
|
-
var EditorPropTypes = __assign({ apiKey: propTypesExports.string, id: propTypesExports.string, inline: propTypesExports.bool, init: propTypesExports.object, initialValue: propTypesExports.string, onEditorChange: propTypesExports.func, value: propTypesExports.string, tagName: propTypesExports.string, cloudChannel: propTypesExports.string, plugins: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.array]), toolbar: propTypesExports.oneOfType([propTypesExports.string, propTypesExports.array]), disabled: propTypesExports.bool, textareaName: propTypesExports.string, tinymceScriptSrc: propTypesExports.oneOfType([
|
|
87
|
-
propTypesExports.string,
|
|
88
|
-
propTypesExports.arrayOf(propTypesExports.string),
|
|
89
|
-
propTypesExports.arrayOf(propTypesExports.shape({
|
|
90
|
-
src: propTypesExports.string,
|
|
91
|
-
async: propTypesExports.bool,
|
|
92
|
-
defer: propTypesExports.bool
|
|
93
|
-
}))
|
|
94
|
-
]), rollback: propTypesExports.oneOfType([propTypesExports.number, propTypesExports.oneOf([false])]), scriptLoading: propTypesExports.shape({
|
|
95
|
-
async: propTypesExports.bool,
|
|
96
|
-
defer: propTypesExports.bool,
|
|
97
|
-
delay: propTypesExports.number
|
|
98
|
-
}) }, eventPropTypes);
|
|
99
|
-
export {
|
|
100
|
-
EditorPropTypes,
|
|
101
|
-
eventPropTypes
|
|
102
|
-
};
|