hanbiro-react16-sdk 1.0.22 → 1.0.24
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 +222 -0
- package/dist/components/ChatAIDraft/List.js +55 -18
- package/dist/components/ChatAIDraft/SettingPopper/ChipGroup.d.ts +11 -0
- package/dist/components/ChatAIDraft/SettingPopper/ChipGroup.js +62 -0
- package/dist/components/ChatAIDraft/SettingPopper/LanguageSelect.d.ts +21 -0
- package/dist/components/ChatAIDraft/SettingPopper/LanguageSelect.js +137 -0
- package/dist/components/ChatAIDraft/SettingPopper/icons.d.ts +3 -0
- package/dist/components/ChatAIDraft/SettingPopper/icons.js +30 -0
- package/dist/components/ChatAIDraft/{SettingPopper.d.ts → SettingPopper/index.d.ts} +5 -5
- package/dist/components/ChatAIDraft/{SettingPopper.js → SettingPopper/index.js} +37 -77
- package/dist/components/ChatAIDraft/constants.d.ts +4 -0
- package/dist/components/ChatAIDraft/constants.js +18 -0
- package/dist/components/ChatAIDraft/index.d.ts +8 -8
- package/dist/components/ChatAIDraft/index.js +100 -52
- package/dist/components/index.d.ts +1 -1
- package/dist/hanbiro-react16-sdk.style.css +39 -2
- package/dist/hanbiro-react16-sdk.umd.js +2244 -1646
- 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
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React__default, { forwardRef } from "react";
|
|
2
|
+
import PropTypes from "../../../prop-types/index.js";
|
|
3
|
+
function _extends() {
|
|
4
|
+
_extends = Object.assign || function(target) {
|
|
5
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6
|
+
var source = arguments[i];
|
|
7
|
+
for (var key in source) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
+
target[key] = source[key];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
return _extends.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutProperties(source, excluded) {
|
|
18
|
+
if (source == null) return {};
|
|
19
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
20
|
+
var key, i;
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
23
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
24
|
+
key = sourceSymbolKeys[i];
|
|
25
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
26
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
27
|
+
target[key] = source[key];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
33
|
+
if (source == null) return {};
|
|
34
|
+
var target = {};
|
|
35
|
+
var sourceKeys = Object.keys(source);
|
|
36
|
+
var key, i;
|
|
37
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
38
|
+
key = sourceKeys[i];
|
|
39
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
40
|
+
target[key] = source[key];
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
}
|
|
44
|
+
var MessageCircle = forwardRef(function(_ref, ref) {
|
|
45
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties(_ref, ["color", "size"]);
|
|
46
|
+
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
47
|
+
ref,
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
width: size,
|
|
50
|
+
height: size,
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: color,
|
|
54
|
+
strokeWidth: "2",
|
|
55
|
+
strokeLinecap: "round",
|
|
56
|
+
strokeLinejoin: "round"
|
|
57
|
+
}, rest), /* @__PURE__ */ React__default.createElement("path", {
|
|
58
|
+
d: "M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
MessageCircle.propTypes = {
|
|
62
|
+
color: PropTypes.string,
|
|
63
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
64
|
+
};
|
|
65
|
+
MessageCircle.displayName = "MessageCircle";
|
|
66
|
+
export {
|
|
67
|
+
MessageCircle as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React__default, { forwardRef } from "react";
|
|
2
|
+
import PropTypes from "../../../prop-types/index.js";
|
|
3
|
+
function _extends() {
|
|
4
|
+
_extends = Object.assign || function(target) {
|
|
5
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6
|
+
var source = arguments[i];
|
|
7
|
+
for (var key in source) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
+
target[key] = source[key];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
return _extends.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutProperties(source, excluded) {
|
|
18
|
+
if (source == null) return {};
|
|
19
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
20
|
+
var key, i;
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
23
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
24
|
+
key = sourceSymbolKeys[i];
|
|
25
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
26
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
27
|
+
target[key] = source[key];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
33
|
+
if (source == null) return {};
|
|
34
|
+
var target = {};
|
|
35
|
+
var sourceKeys = Object.keys(source);
|
|
36
|
+
var key, i;
|
|
37
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
38
|
+
key = sourceKeys[i];
|
|
39
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
40
|
+
target[key] = source[key];
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
}
|
|
44
|
+
var MessageSquare = forwardRef(function(_ref, ref) {
|
|
45
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties(_ref, ["color", "size"]);
|
|
46
|
+
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
47
|
+
ref,
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
width: size,
|
|
50
|
+
height: size,
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: color,
|
|
54
|
+
strokeWidth: "2",
|
|
55
|
+
strokeLinecap: "round",
|
|
56
|
+
strokeLinejoin: "round"
|
|
57
|
+
}, rest), /* @__PURE__ */ React__default.createElement("path", {
|
|
58
|
+
d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
MessageSquare.propTypes = {
|
|
62
|
+
color: PropTypes.string,
|
|
63
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
64
|
+
};
|
|
65
|
+
MessageSquare.displayName = "MessageSquare";
|
|
66
|
+
export {
|
|
67
|
+
MessageSquare as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React__default, { forwardRef } from "react";
|
|
2
|
+
import PropTypes from "../../../prop-types/index.js";
|
|
3
|
+
function _extends() {
|
|
4
|
+
_extends = Object.assign || function(target) {
|
|
5
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6
|
+
var source = arguments[i];
|
|
7
|
+
for (var key in source) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
+
target[key] = source[key];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
return _extends.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutProperties(source, excluded) {
|
|
18
|
+
if (source == null) return {};
|
|
19
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
20
|
+
var key, i;
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
23
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
24
|
+
key = sourceSymbolKeys[i];
|
|
25
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
26
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
27
|
+
target[key] = source[key];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
33
|
+
if (source == null) return {};
|
|
34
|
+
var target = {};
|
|
35
|
+
var sourceKeys = Object.keys(source);
|
|
36
|
+
var key, i;
|
|
37
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
38
|
+
key = sourceKeys[i];
|
|
39
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
40
|
+
target[key] = source[key];
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
}
|
|
44
|
+
var Scissors = forwardRef(function(_ref, ref) {
|
|
45
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties(_ref, ["color", "size"]);
|
|
46
|
+
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
47
|
+
ref,
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
width: size,
|
|
50
|
+
height: size,
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: color,
|
|
54
|
+
strokeWidth: "2",
|
|
55
|
+
strokeLinecap: "round",
|
|
56
|
+
strokeLinejoin: "round"
|
|
57
|
+
}, rest), /* @__PURE__ */ React__default.createElement("circle", {
|
|
58
|
+
cx: "6",
|
|
59
|
+
cy: "6",
|
|
60
|
+
r: "3"
|
|
61
|
+
}), /* @__PURE__ */ React__default.createElement("circle", {
|
|
62
|
+
cx: "6",
|
|
63
|
+
cy: "18",
|
|
64
|
+
r: "3"
|
|
65
|
+
}), /* @__PURE__ */ React__default.createElement("line", {
|
|
66
|
+
x1: "20",
|
|
67
|
+
y1: "4",
|
|
68
|
+
x2: "8.12",
|
|
69
|
+
y2: "15.88"
|
|
70
|
+
}), /* @__PURE__ */ React__default.createElement("line", {
|
|
71
|
+
x1: "14.47",
|
|
72
|
+
y1: "14.48",
|
|
73
|
+
x2: "20",
|
|
74
|
+
y2: "20"
|
|
75
|
+
}), /* @__PURE__ */ React__default.createElement("line", {
|
|
76
|
+
x1: "8.12",
|
|
77
|
+
y1: "8.12",
|
|
78
|
+
x2: "12",
|
|
79
|
+
y2: "12"
|
|
80
|
+
}));
|
|
81
|
+
});
|
|
82
|
+
Scissors.propTypes = {
|
|
83
|
+
color: PropTypes.string,
|
|
84
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
85
|
+
};
|
|
86
|
+
Scissors.displayName = "Scissors";
|
|
87
|
+
export {
|
|
88
|
+
Scissors as default
|
|
89
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React__default, { forwardRef } from "react";
|
|
2
|
+
import PropTypes from "../../../prop-types/index.js";
|
|
3
|
+
function _extends() {
|
|
4
|
+
_extends = Object.assign || function(target) {
|
|
5
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6
|
+
var source = arguments[i];
|
|
7
|
+
for (var key in source) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
+
target[key] = source[key];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
return _extends.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutProperties(source, excluded) {
|
|
18
|
+
if (source == null) return {};
|
|
19
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
20
|
+
var key, i;
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
23
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
24
|
+
key = sourceSymbolKeys[i];
|
|
25
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
26
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
27
|
+
target[key] = source[key];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
33
|
+
if (source == null) return {};
|
|
34
|
+
var target = {};
|
|
35
|
+
var sourceKeys = Object.keys(source);
|
|
36
|
+
var key, i;
|
|
37
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
38
|
+
key = sourceKeys[i];
|
|
39
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
40
|
+
target[key] = source[key];
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
}
|
|
44
|
+
var Smile = forwardRef(function(_ref, ref) {
|
|
45
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties(_ref, ["color", "size"]);
|
|
46
|
+
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
47
|
+
ref,
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
width: size,
|
|
50
|
+
height: size,
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: color,
|
|
54
|
+
strokeWidth: "2",
|
|
55
|
+
strokeLinecap: "round",
|
|
56
|
+
strokeLinejoin: "round"
|
|
57
|
+
}, rest), /* @__PURE__ */ React__default.createElement("circle", {
|
|
58
|
+
cx: "12",
|
|
59
|
+
cy: "12",
|
|
60
|
+
r: "10"
|
|
61
|
+
}), /* @__PURE__ */ React__default.createElement("path", {
|
|
62
|
+
d: "M8 14s1.5 2 4 2 4-2 4-2"
|
|
63
|
+
}), /* @__PURE__ */ React__default.createElement("line", {
|
|
64
|
+
x1: "9",
|
|
65
|
+
y1: "9",
|
|
66
|
+
x2: "9.01",
|
|
67
|
+
y2: "9"
|
|
68
|
+
}), /* @__PURE__ */ React__default.createElement("line", {
|
|
69
|
+
x1: "15",
|
|
70
|
+
y1: "9",
|
|
71
|
+
x2: "15.01",
|
|
72
|
+
y2: "9"
|
|
73
|
+
}));
|
|
74
|
+
});
|
|
75
|
+
Smile.propTypes = {
|
|
76
|
+
color: PropTypes.string,
|
|
77
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
78
|
+
};
|
|
79
|
+
Smile.displayName = "Smile";
|
|
80
|
+
export {
|
|
81
|
+
Smile as default
|
|
82
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React__default, { forwardRef } from "react";
|
|
2
|
+
import PropTypes from "../../../prop-types/index.js";
|
|
3
|
+
function _extends() {
|
|
4
|
+
_extends = Object.assign || function(target) {
|
|
5
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6
|
+
var source = arguments[i];
|
|
7
|
+
for (var key in source) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
+
target[key] = source[key];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
return _extends.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutProperties(source, excluded) {
|
|
18
|
+
if (source == null) return {};
|
|
19
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
20
|
+
var key, i;
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
23
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
24
|
+
key = sourceSymbolKeys[i];
|
|
25
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
26
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
27
|
+
target[key] = source[key];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
33
|
+
if (source == null) return {};
|
|
34
|
+
var target = {};
|
|
35
|
+
var sourceKeys = Object.keys(source);
|
|
36
|
+
var key, i;
|
|
37
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
38
|
+
key = sourceKeys[i];
|
|
39
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
40
|
+
target[key] = source[key];
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
}
|
|
44
|
+
var ThumbsUp = forwardRef(function(_ref, ref) {
|
|
45
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties(_ref, ["color", "size"]);
|
|
46
|
+
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
47
|
+
ref,
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
width: size,
|
|
50
|
+
height: size,
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: color,
|
|
54
|
+
strokeWidth: "2",
|
|
55
|
+
strokeLinecap: "round",
|
|
56
|
+
strokeLinejoin: "round"
|
|
57
|
+
}, rest), /* @__PURE__ */ React__default.createElement("path", {
|
|
58
|
+
d: "M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
ThumbsUp.propTypes = {
|
|
62
|
+
color: PropTypes.string,
|
|
63
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
64
|
+
};
|
|
65
|
+
ThumbsUp.displayName = "ThumbsUp";
|
|
66
|
+
export {
|
|
67
|
+
ThumbsUp as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React__default, { forwardRef } from "react";
|
|
2
|
+
import PropTypes from "../../../prop-types/index.js";
|
|
3
|
+
function _extends() {
|
|
4
|
+
_extends = Object.assign || function(target) {
|
|
5
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6
|
+
var source = arguments[i];
|
|
7
|
+
for (var key in source) {
|
|
8
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
9
|
+
target[key] = source[key];
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
return target;
|
|
14
|
+
};
|
|
15
|
+
return _extends.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
function _objectWithoutProperties(source, excluded) {
|
|
18
|
+
if (source == null) return {};
|
|
19
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
20
|
+
var key, i;
|
|
21
|
+
if (Object.getOwnPropertySymbols) {
|
|
22
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
23
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
24
|
+
key = sourceSymbolKeys[i];
|
|
25
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
26
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
27
|
+
target[key] = source[key];
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
}
|
|
32
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
33
|
+
if (source == null) return {};
|
|
34
|
+
var target = {};
|
|
35
|
+
var sourceKeys = Object.keys(source);
|
|
36
|
+
var key, i;
|
|
37
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
38
|
+
key = sourceKeys[i];
|
|
39
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
40
|
+
target[key] = source[key];
|
|
41
|
+
}
|
|
42
|
+
return target;
|
|
43
|
+
}
|
|
44
|
+
var Zap = forwardRef(function(_ref, ref) {
|
|
45
|
+
var _ref$color = _ref.color, color = _ref$color === void 0 ? "currentColor" : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, rest = _objectWithoutProperties(_ref, ["color", "size"]);
|
|
46
|
+
return /* @__PURE__ */ React__default.createElement("svg", _extends({
|
|
47
|
+
ref,
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
width: size,
|
|
50
|
+
height: size,
|
|
51
|
+
viewBox: "0 0 24 24",
|
|
52
|
+
fill: "none",
|
|
53
|
+
stroke: color,
|
|
54
|
+
strokeWidth: "2",
|
|
55
|
+
strokeLinecap: "round",
|
|
56
|
+
strokeLinejoin: "round"
|
|
57
|
+
}, rest), /* @__PURE__ */ React__default.createElement("polygon", {
|
|
58
|
+
points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2"
|
|
59
|
+
}));
|
|
60
|
+
});
|
|
61
|
+
Zap.propTypes = {
|
|
62
|
+
color: PropTypes.string,
|
|
63
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
64
|
+
};
|
|
65
|
+
Zap.displayName = "Zap";
|
|
66
|
+
export {
|
|
67
|
+
Zap as default
|
|
68
|
+
};
|
package/package.json
CHANGED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __defProps = Object.defineProperties;
|
|
3
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
-
var __spreadValues = (a, b) => {
|
|
9
|
-
for (var prop in b || (b = {}))
|
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
|
12
|
-
if (__getOwnPropSymbols)
|
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
-
if (__propIsEnum.call(b, prop))
|
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
|
16
|
-
}
|
|
17
|
-
return a;
|
|
18
|
-
};
|
|
19
|
-
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
21
|
-
import React__default from "react";
|
|
22
|
-
import LoadingContainer from "../LoadingContainer/index.js";
|
|
23
|
-
import { scrollStyle } from "./scrollStyle.js";
|
|
24
|
-
import { Editor } from "../../node_modules/@tinymce/tinymce-react/lib/es2015/main/ts/components/Editor.js";
|
|
25
|
-
import useEditor from "./useEditor.js";
|
|
26
|
-
class TinyMceEditor extends React__default.Component {
|
|
27
|
-
constructor(props) {
|
|
28
|
-
super(props);
|
|
29
|
-
__publicField(this, "editorRef", null);
|
|
30
|
-
// Các hàm public được expose ra (tương tự như useImperativeHandle trước đó)
|
|
31
|
-
__publicField(this, "getContent", () => {
|
|
32
|
-
var _a;
|
|
33
|
-
const editorContent = ((_a = this.editorRef) == null ? void 0 : _a.getContent()) || "";
|
|
34
|
-
return {
|
|
35
|
-
content: editorContent
|
|
36
|
-
};
|
|
37
|
-
});
|
|
38
|
-
__publicField(this, "getRawContent", () => {
|
|
39
|
-
var _a;
|
|
40
|
-
const editorContent = ((_a = this.editorRef) == null ? void 0 : _a.getContent()) || "";
|
|
41
|
-
return editorContent;
|
|
42
|
-
});
|
|
43
|
-
__publicField(this, "handleEditorChange", (content) => {
|
|
44
|
-
if (this.props.onChange) {
|
|
45
|
-
this.props.onChange(content);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
this.state = {
|
|
49
|
-
showEditor: false
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
const {
|
|
54
|
-
value,
|
|
55
|
-
isSimple = false,
|
|
56
|
-
disabled = false,
|
|
57
|
-
height = 550,
|
|
58
|
-
skin = "tinymce-5",
|
|
59
|
-
onClick,
|
|
60
|
-
style,
|
|
61
|
-
lang = "en",
|
|
62
|
-
placeholder = "",
|
|
63
|
-
options,
|
|
64
|
-
noImage = false
|
|
65
|
-
} = this.props;
|
|
66
|
-
const { showEditor } = this.state;
|
|
67
|
-
const {
|
|
68
|
-
defaultPlugins,
|
|
69
|
-
defaultToolbar,
|
|
70
|
-
imageUploadBasePath,
|
|
71
|
-
imageUploadUrl,
|
|
72
|
-
supportImageTypes,
|
|
73
|
-
fontfamily,
|
|
74
|
-
setupFunction,
|
|
75
|
-
filePickerHandle,
|
|
76
|
-
defaultFontSize
|
|
77
|
-
} = useEditor({
|
|
78
|
-
isSimple,
|
|
79
|
-
noImage
|
|
80
|
-
});
|
|
81
|
-
return /* @__PURE__ */ React__default.createElement(
|
|
82
|
-
"div",
|
|
83
|
-
{
|
|
84
|
-
style: __spreadValues({
|
|
85
|
-
position: "relative",
|
|
86
|
-
borderRadius: 1,
|
|
87
|
-
height
|
|
88
|
-
}, style)
|
|
89
|
-
},
|
|
90
|
-
/* @__PURE__ */ React__default.createElement("style", null, `
|
|
91
|
-
.tox.tox-tinymce {
|
|
92
|
-
border-radius: 4px;
|
|
93
|
-
}
|
|
94
|
-
`),
|
|
95
|
-
!showEditor && /* @__PURE__ */ React__default.createElement(
|
|
96
|
-
LoadingContainer,
|
|
97
|
-
{
|
|
98
|
-
style: {
|
|
99
|
-
position: "absolute",
|
|
100
|
-
top: 0,
|
|
101
|
-
left: 0,
|
|
102
|
-
right: 0,
|
|
103
|
-
zIndex: 12,
|
|
104
|
-
background: "#ffffff",
|
|
105
|
-
border: "1px solid var(--border-main)",
|
|
106
|
-
borderRadius: 4,
|
|
107
|
-
height: (options == null ? void 0 : options.height) || height
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
),
|
|
111
|
-
/* @__PURE__ */ React__default.createElement(
|
|
112
|
-
Editor,
|
|
113
|
-
{
|
|
114
|
-
disabled,
|
|
115
|
-
onEditorChange: this.handleEditorChange,
|
|
116
|
-
value,
|
|
117
|
-
onInit: (evt, editor) => {
|
|
118
|
-
this.setState({ showEditor: true });
|
|
119
|
-
this.editorRef = editor;
|
|
120
|
-
},
|
|
121
|
-
onClick,
|
|
122
|
-
plugins: defaultPlugins,
|
|
123
|
-
init: __spreadProps(__spreadValues({
|
|
124
|
-
text_patterns: false,
|
|
125
|
-
placeholder,
|
|
126
|
-
indent: false,
|
|
127
|
-
skin,
|
|
128
|
-
visual: false,
|
|
129
|
-
promotion: false,
|
|
130
|
-
language: lang || "en",
|
|
131
|
-
// language_url: language
|
|
132
|
-
// ? `${process.env.PUBLIC_URL || ""}/js/tinymce/langs/${language}.js`
|
|
133
|
-
// : undefined,
|
|
134
|
-
branding: false,
|
|
135
|
-
elementpath: false,
|
|
136
|
-
height,
|
|
137
|
-
menubar: !isSimple,
|
|
138
|
-
verify_html: true,
|
|
139
|
-
toolbar: defaultToolbar,
|
|
140
|
-
toolbar_mode: "sliding",
|
|
141
|
-
images_upload_base_path: imageUploadBasePath,
|
|
142
|
-
images_upload_url: imageUploadUrl,
|
|
143
|
-
images_upload_credentials: true,
|
|
144
|
-
automatic_uploads: true,
|
|
145
|
-
images_file_types: supportImageTypes,
|
|
146
|
-
font_family_formats: fontfamily,
|
|
147
|
-
paste_data_images: true,
|
|
148
|
-
a11y_advanced_options: true,
|
|
149
|
-
image_advtab: true,
|
|
150
|
-
file_picker_types: "file image media",
|
|
151
|
-
file_picker_callback: filePickerHandle,
|
|
152
|
-
forced_root_block_attrs: { style: "margin: 0;" },
|
|
153
|
-
font_size_formats: "6pt 8pt 9pt 10pt 11pt 12pt 14pt 16pt 18pt 20pt 22pt 24pt 26pt 28pt 36pt 48pt 72pt"
|
|
154
|
-
}, noImage && {
|
|
155
|
-
invalid_elements: "img"
|
|
156
|
-
}), {
|
|
157
|
-
content_style: `
|
|
158
|
-
${scrollStyle}
|
|
159
|
-
[data-mce-placeholder]::before {
|
|
160
|
-
color: rgba(0, 23, 55, 0.42) !important;
|
|
161
|
-
}
|
|
162
|
-
body {
|
|
163
|
-
font-family: ${"Helvetica,Arial,sans-serif"};
|
|
164
|
-
font-size: ${defaultFontSize}pt;
|
|
165
|
-
line-height: unset;
|
|
166
|
-
background: var(--background-softGrey);
|
|
167
|
-
color: var(--text-primary);
|
|
168
|
-
}`,
|
|
169
|
-
setup: setupFunction,
|
|
170
|
-
relative_urls: false,
|
|
171
|
-
remove_script_host: false,
|
|
172
|
-
document_base_url: "/"
|
|
173
|
-
})
|
|
174
|
-
}
|
|
175
|
-
)
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
export {
|
|
180
|
-
TinyMceEditor as default
|
|
181
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
const scrollStyle = `
|
|
2
|
-
::-webkit-scrollbar,
|
|
3
|
-
*::-webkit-scrollbar {
|
|
4
|
-
width: 8px;
|
|
5
|
-
height: 8px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
*::-webkit-scrollbar-track {
|
|
9
|
-
background: transparent;
|
|
10
|
-
backdrop-filter: blur(6px);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
::-webkit-scrollbar-thumb,
|
|
14
|
-
*::-webkit-scrollbar-thumb {
|
|
15
|
-
background: #e0e0e0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
::-webkit-scrollbar-thumb:focus,
|
|
19
|
-
*::-webkit-scrollbar-thumb:focus {
|
|
20
|
-
background: #bdbdbd;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
::-webkit-scrollbar-thumb:active,
|
|
24
|
-
*::-webkit-scrollbar-thumb:active {
|
|
25
|
-
background: #bdbdbd;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
::-webkit-scrollbar-thumb:hover,
|
|
29
|
-
*::-webkit-scrollbar-thumb:hover {
|
|
30
|
-
background: #bdbdbd;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
::-webkit-scrollbar-corner,
|
|
34
|
-
*::-webkit-scrollbar-corner {
|
|
35
|
-
background-color: transparent;
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
export {
|
|
39
|
-
scrollStyle
|
|
40
|
-
};
|