assui 2.3.8 → 3.0.0-alpha.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.
- package/es/a-select/index.js +7 -22
- package/es/a-select/style/index.css +195 -743
- package/es/area-text/index.js +1 -3
- package/es/button-drawer/index.js +12 -30
- package/es/button-modal/index.js +12 -33
- package/es/color-select/index.js +10 -23
- package/es/color-select/style/index.css +195 -743
- package/es/condition-input/index.js +8 -26
- package/es/condition-input/parse2RegexOption.js +0 -11
- package/es/config-provider/index.js +1 -3
- package/es/copy-to-clipboard/index.js +11 -27
- package/es/copy-to-clipboard/style/index.css +0 -1
- package/es/highlight-textarea/HighlighedContents.js +1 -3
- package/es/highlight-textarea/extractSpansOfClasses.d.ts +1 -0
- package/es/highlight-textarea/extractSpansOfClasses.js +7 -29
- package/es/highlight-textarea/getRanges.js +3 -35
- package/es/highlight-textarea/getType.js +0 -6
- package/es/highlight-textarea/index.js +11 -30
- package/es/highlight-textarea/style/index.css +7 -21
- package/es/img-crop/EasyCrop.js +18 -34
- package/es/img-crop/getCroppedImg.js +15 -50
- package/es/img-crop/index.js +56 -145
- package/es/img-crop/style/index.css +195 -743
- package/es/json-editor/index.js +6 -20
- package/es/keep-tab/index.d.ts +7 -2
- package/es/keep-tab/index.js +34 -59
- package/es/keep-tab/style/index.css +39 -99
- package/es/label-auto-complete/index.js +14 -32
- package/es/label-auto-complete/style/index.css +195 -743
- package/es/label-condition-input/index.js +13 -29
- package/es/label-customize-range-picker/defaultRadioList.js +0 -3
- package/es/label-customize-range-picker/index.js +36 -78
- package/es/label-customize-range-picker/style/index.css +195 -743
- package/es/label-customize-range-picker/utils/index.js +5 -14
- package/es/label-date-picker/index.js +11 -28
- package/es/label-date-picker/style/index.css +195 -743
- package/es/label-input/index.js +23 -37
- package/es/label-number-input/index.js +13 -28
- package/es/label-range-picker/index.js +11 -28
- package/es/label-range-picker/style/index.css +195 -743
- package/es/label-select/index.js +11 -27
- package/es/label-select/style/index.css +195 -743
- package/es/label-text-area/index.js +13 -35
- package/es/label-tree-select/index.js +15 -32
- package/es/label-tree-select/style/index.css +195 -743
- package/es/number-format-input/index.js +1 -11
- package/es/number-input/index.js +18 -37
- package/es/number-input/utils.js +7 -15
- package/es/rc-echart/core.js +15 -27
- package/es/rc-echart/index.js +0 -6
- package/es/rc-qrcode/index.js +2 -12
- package/es/rc-qrcode/useQrcode.js +5 -12
- package/es/rich-text-editor/index.js +5 -16
- package/es/rich-text-editor/plugins/code/index.js +0 -8
- package/es/rich-text-editor/style/index.css +195 -743
- package/es/single-img-upload/index.js +36 -110
- package/es/single-img-upload/style/index.css +195 -743
- package/es/split-pane/index.js +0 -4
- package/es/step-number-input/index.js +14 -39
- package/es/step-number-input/style/index.css +195 -743
- package/es/table-col/index.js +2 -4
- package/es/text-area/index.js +8 -27
- package/es/text-input/index.js +4 -18
- package/es/text-input/style/index.css +7 -21
- package/lib/a-select/index.js +7 -27
- package/lib/a-select/style/index.css +195 -743
- package/lib/a-select/style/index.js +0 -2
- package/lib/area-text/index.js +1 -6
- package/lib/area-text/style/index.js +0 -1
- package/lib/beautiful-dnd/index.js +0 -9
- package/lib/button-drawer/index.js +12 -42
- package/lib/button-drawer/style/index.js +0 -1
- package/lib/button-modal/index.js +12 -44
- package/lib/button-modal/style/index.js +0 -1
- package/lib/color-select/index.js +10 -39
- package/lib/color-select/style/index.css +195 -743
- package/lib/color-select/style/index.js +0 -2
- package/lib/condition-input/index.js +8 -41
- package/lib/condition-input/parse2RegexOption.js +0 -16
- package/lib/condition-input/style/index.js +0 -1
- package/lib/config-provider/context.js +0 -4
- package/lib/config-provider/index.js +1 -28
- package/lib/copy-to-clipboard/index.js +11 -38
- package/lib/copy-to-clipboard/style/index.css +0 -1
- package/lib/copy-to-clipboard/style/index.js +0 -1
- package/lib/highlight-textarea/HighlighedContents.js +1 -7
- package/lib/highlight-textarea/extractSpansOfClasses.d.ts +1 -0
- package/lib/highlight-textarea/extractSpansOfClasses.js +7 -31
- package/lib/highlight-textarea/getRanges.js +3 -38
- package/lib/highlight-textarea/getType.js +0 -8
- package/lib/highlight-textarea/index.js +11 -44
- package/lib/highlight-textarea/style/index.css +7 -21
- package/lib/highlight-textarea/style/index.js +0 -1
- package/lib/highlight-words/index.js +0 -3
- package/lib/img-crop/EasyCrop.js +18 -44
- package/lib/img-crop/getCroppedImg.js +15 -51
- package/lib/img-crop/index.js +56 -159
- package/lib/img-crop/style/index.css +195 -743
- package/lib/img-crop/style/index.js +0 -3
- package/lib/index.js +0 -77
- package/lib/json-editor/index.js +6 -35
- package/lib/json-editor/style/index.js +0 -2
- package/lib/keep-tab/index.d.ts +7 -2
- package/lib/keep-tab/index.js +34 -76
- package/lib/keep-tab/style/index.css +39 -99
- package/lib/keep-tab/style/index.js +0 -2
- package/lib/label-auto-complete/index.js +14 -39
- package/lib/label-auto-complete/style/index.css +195 -743
- package/lib/label-auto-complete/style/index.js +0 -2
- package/lib/label-condition-input/index.js +13 -36
- package/lib/label-condition-input/style/index.js +0 -1
- package/lib/label-customize-range-picker/defaultRadioList.js +0 -7
- package/lib/label-customize-range-picker/index.js +36 -99
- package/lib/label-customize-range-picker/style/index.css +195 -743
- package/lib/label-customize-range-picker/style/index.js +0 -5
- package/lib/label-customize-range-picker/utils/index.js +5 -19
- package/lib/label-date-picker/index.js +11 -34
- package/lib/label-date-picker/style/index.css +195 -743
- package/lib/label-date-picker/style/index.js +0 -2
- package/lib/label-input/index.js +23 -46
- package/lib/label-input/style/index.js +0 -1
- package/lib/label-number-input/index.js +13 -36
- package/lib/label-number-input/style/index.js +0 -1
- package/lib/label-range-picker/index.js +11 -36
- package/lib/label-range-picker/style/index.css +195 -743
- package/lib/label-range-picker/style/index.js +0 -2
- package/lib/label-select/index.js +11 -36
- package/lib/label-select/style/index.css +195 -743
- package/lib/label-select/style/index.js +0 -2
- package/lib/label-text-area/index.js +13 -40
- package/lib/label-text-area/style/index.js +0 -1
- package/lib/label-tree-select/index.js +15 -38
- package/lib/label-tree-select/style/index.css +195 -743
- package/lib/label-tree-select/style/index.js +0 -2
- package/lib/messages/index.js +0 -2
- package/lib/number-format-input/index.js +1 -15
- package/lib/number-format-input/style/index.js +0 -1
- package/lib/number-input/index.js +18 -55
- package/lib/number-input/style/index.js +0 -1
- package/lib/number-input/utils.js +8 -20
- package/lib/rc-echart/core.js +15 -40
- package/lib/rc-echart/index.js +0 -17
- package/lib/rc-motion/index.js +0 -3
- package/lib/rc-qrcode/index.js +2 -25
- package/lib/rc-qrcode/useQrcode.js +5 -17
- package/lib/rc-transition-group/index.js +0 -9
- package/lib/resizable/index.js +0 -2
- package/lib/resizable/style/index.js +0 -1
- package/lib/rich-text-editor/index.js +5 -53
- package/lib/rich-text-editor/plugins/code/index.js +2 -12
- package/lib/rich-text-editor/style/index.css +195 -743
- package/lib/rich-text-editor/style/index.js +0 -1
- package/lib/single-img-upload/index.js +36 -125
- package/lib/single-img-upload/style/index.css +195 -743
- package/lib/single-img-upload/style/index.js +0 -3
- package/lib/sortable-hoc/index.js +0 -9
- package/lib/split-pane/index.js +0 -15
- package/lib/split-pane/style/index.js +0 -1
- package/lib/step-number-input/index.js +14 -55
- package/lib/step-number-input/style/index.css +195 -743
- package/lib/step-number-input/style/index.js +0 -2
- package/lib/table-col/index.js +2 -6
- package/lib/text-area/index.js +8 -38
- package/lib/text-area/style/index.js +0 -1
- package/lib/text-input/index.js +4 -23
- package/lib/text-input/style/index.css +7 -21
- package/lib/text-input/style/index.js +0 -1
- package/package.json +5 -5
package/lib/rc-qrcode/index.js
CHANGED
|
@@ -4,22 +4,17 @@ var __assign = this && this.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) {
|
|
9
8
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return t;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
return __assign.apply(this, arguments);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
20
16
|
if (k2 === undefined) k2 = k;
|
|
21
17
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
22
|
-
|
|
23
18
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
19
|
desc = {
|
|
25
20
|
enumerable: true,
|
|
@@ -28,13 +23,11 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
|
|
|
28
23
|
}
|
|
29
24
|
};
|
|
30
25
|
}
|
|
31
|
-
|
|
32
26
|
Object.defineProperty(o, k2, desc);
|
|
33
27
|
} : function (o, m, k, k2) {
|
|
34
28
|
if (k2 === undefined) k2 = k;
|
|
35
29
|
o[k2] = m[k];
|
|
36
30
|
});
|
|
37
|
-
|
|
38
31
|
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
39
32
|
Object.defineProperty(o, "default", {
|
|
40
33
|
enumerable: true,
|
|
@@ -43,61 +36,46 @@ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? fun
|
|
|
43
36
|
} : function (o, v) {
|
|
44
37
|
o["default"] = v;
|
|
45
38
|
});
|
|
46
|
-
|
|
47
39
|
var __importStar = this && this.__importStar || function (mod) {
|
|
48
40
|
if (mod && mod.__esModule) return mod;
|
|
49
41
|
var result = {};
|
|
50
42
|
if (mod != null) for (var k in mod) {
|
|
51
43
|
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
52
44
|
}
|
|
53
|
-
|
|
54
45
|
__setModuleDefault(result, mod);
|
|
55
|
-
|
|
56
46
|
return result;
|
|
57
47
|
};
|
|
58
|
-
|
|
59
48
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
60
49
|
return mod && mod.__esModule ? mod : {
|
|
61
50
|
"default": mod
|
|
62
51
|
};
|
|
63
52
|
};
|
|
64
|
-
|
|
65
53
|
Object.defineProperty(exports, "__esModule", {
|
|
66
54
|
value: true
|
|
67
55
|
});
|
|
68
56
|
exports.useQrcode = void 0;
|
|
69
|
-
|
|
70
57
|
var React = __importStar(require("react"));
|
|
71
|
-
|
|
72
58
|
var qrcode_1 = __importDefault(require("qrcode"));
|
|
73
|
-
|
|
74
59
|
var useMount_1 = __importDefault(require("ahooks/lib/useMount"));
|
|
75
|
-
|
|
76
60
|
var useQrcode_1 = __importDefault(require("./useQrcode"));
|
|
77
|
-
|
|
78
61
|
exports.useQrcode = useQrcode_1["default"];
|
|
79
|
-
|
|
80
62
|
var RcQrcode = function RcQrcode(props) {
|
|
81
63
|
var value = props.value,
|
|
82
|
-
|
|
83
|
-
|
|
64
|
+
options = props.options,
|
|
65
|
+
getCanvasInstance = props.getCanvasInstance;
|
|
84
66
|
var domElRef = React.useRef(null);
|
|
85
67
|
var defaultOptions = {
|
|
86
68
|
errorCorrectionLevel: 'H',
|
|
87
69
|
margin: 0,
|
|
88
70
|
width: 134
|
|
89
71
|
};
|
|
90
|
-
|
|
91
72
|
var finallyOptions = __assign(__assign({}, defaultOptions), options);
|
|
92
|
-
|
|
93
73
|
(0, useMount_1["default"])(function () {
|
|
94
74
|
qrcode_1["default"].toCanvas(value, finallyOptions, function (err, result) {
|
|
95
75
|
var _a;
|
|
96
|
-
|
|
97
76
|
if (err) {
|
|
98
77
|
throw err;
|
|
99
78
|
}
|
|
100
|
-
|
|
101
79
|
getCanvasInstance && getCanvasInstance(result);
|
|
102
80
|
(_a = domElRef.current) === null || _a === void 0 ? void 0 : _a.appendChild(result);
|
|
103
81
|
});
|
|
@@ -106,7 +84,6 @@ var RcQrcode = function RcQrcode(props) {
|
|
|
106
84
|
ref: domElRef
|
|
107
85
|
});
|
|
108
86
|
};
|
|
109
|
-
|
|
110
87
|
RcQrcode.defaultProps = {
|
|
111
88
|
value: '',
|
|
112
89
|
options: {}
|
|
@@ -4,10 +4,9 @@ var __read = this && this.__read || function (o, n) {
|
|
|
4
4
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
5
5
|
if (!m) return o;
|
|
6
6
|
var i = m.call(o),
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
r,
|
|
8
|
+
ar = [],
|
|
9
|
+
e;
|
|
11
10
|
try {
|
|
12
11
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
13
12
|
ar.push(r.value);
|
|
@@ -23,50 +22,39 @@ var __read = this && this.__read || function (o, n) {
|
|
|
23
22
|
if (e) throw e.error;
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
|
-
|
|
27
25
|
return ar;
|
|
28
26
|
};
|
|
29
|
-
|
|
30
27
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
31
28
|
return mod && mod.__esModule ? mod : {
|
|
32
29
|
"default": mod
|
|
33
30
|
};
|
|
34
31
|
};
|
|
35
|
-
|
|
36
32
|
Object.defineProperty(exports, "__esModule", {
|
|
37
33
|
value: true
|
|
38
34
|
});
|
|
39
35
|
exports.useQRCode = void 0;
|
|
40
|
-
|
|
41
36
|
var qrcode_1 = __importDefault(require("qrcode"));
|
|
42
|
-
|
|
43
37
|
var react_1 = require("react");
|
|
44
|
-
|
|
45
38
|
var useQRCode = function useQRCode(value, options) {
|
|
46
39
|
if (options === void 0) {
|
|
47
40
|
options = {};
|
|
48
41
|
}
|
|
49
|
-
|
|
50
42
|
var _a = __read((0, react_1.useState)(''), 2),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
43
|
+
dataURL = _a[0],
|
|
44
|
+
setDataURL = _a[1];
|
|
54
45
|
(0, react_1.useEffect)(function () {
|
|
55
46
|
if (!value) {
|
|
56
47
|
setDataURL('');
|
|
57
48
|
return;
|
|
58
49
|
}
|
|
59
|
-
|
|
60
50
|
qrcode_1["default"].toDataURL(value, options, function (err, url) {
|
|
61
51
|
if (err) {
|
|
62
52
|
throw err;
|
|
63
53
|
}
|
|
64
|
-
|
|
65
54
|
setDataURL(url);
|
|
66
55
|
});
|
|
67
56
|
}, [value, options]);
|
|
68
57
|
return dataURL;
|
|
69
58
|
};
|
|
70
|
-
|
|
71
59
|
exports.useQRCode = useQRCode;
|
|
72
60
|
exports["default"] = exports.useQRCode;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
var __createBinding = this && this.__createBinding || (Object.create ? function (o, m, k, k2) {
|
|
4
4
|
if (k2 === undefined) k2 = k;
|
|
5
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
|
|
7
6
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
7
|
desc = {
|
|
9
8
|
enumerable: true,
|
|
@@ -12,13 +11,11 @@ var __createBinding = this && this.__createBinding || (Object.create ? function
|
|
|
12
11
|
}
|
|
13
12
|
};
|
|
14
13
|
}
|
|
15
|
-
|
|
16
14
|
Object.defineProperty(o, k2, desc);
|
|
17
15
|
} : function (o, m, k, k2) {
|
|
18
16
|
if (k2 === undefined) k2 = k;
|
|
19
17
|
o[k2] = m[k];
|
|
20
18
|
});
|
|
21
|
-
|
|
22
19
|
var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? function (o, v) {
|
|
23
20
|
Object.defineProperty(o, "default", {
|
|
24
21
|
enumerable: true,
|
|
@@ -27,23 +24,17 @@ var __setModuleDefault = this && this.__setModuleDefault || (Object.create ? fun
|
|
|
27
24
|
} : function (o, v) {
|
|
28
25
|
o["default"] = v;
|
|
29
26
|
});
|
|
30
|
-
|
|
31
27
|
var __importStar = this && this.__importStar || function (mod) {
|
|
32
28
|
if (mod && mod.__esModule) return mod;
|
|
33
29
|
var result = {};
|
|
34
30
|
if (mod != null) for (var k in mod) {
|
|
35
31
|
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
36
32
|
}
|
|
37
|
-
|
|
38
33
|
__setModuleDefault(result, mod);
|
|
39
|
-
|
|
40
34
|
return result;
|
|
41
35
|
};
|
|
42
|
-
|
|
43
36
|
Object.defineProperty(exports, "__esModule", {
|
|
44
37
|
value: true
|
|
45
38
|
});
|
|
46
|
-
|
|
47
39
|
var RcTransitionGroup = __importStar(require("react-transition-group"));
|
|
48
|
-
|
|
49
40
|
exports["default"] = RcTransitionGroup;
|
package/lib/resizable/index.js
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.ResizableBox = exports.Resizable = void 0;
|
|
7
|
-
|
|
8
7
|
var react_resizable_1 = require("react-resizable");
|
|
9
|
-
|
|
10
8
|
Object.defineProperty(exports, "Resizable", {
|
|
11
9
|
enumerable: true,
|
|
12
10
|
get: function get() {
|
|
@@ -4,114 +4,70 @@ var __assign = this && this.__assign || function () {
|
|
|
4
4
|
__assign = Object.assign || function (t) {
|
|
5
5
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
6
|
s = arguments[i];
|
|
7
|
-
|
|
8
7
|
for (var p in s) {
|
|
9
8
|
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
10
9
|
}
|
|
11
10
|
}
|
|
12
|
-
|
|
13
11
|
return t;
|
|
14
12
|
};
|
|
15
|
-
|
|
16
13
|
return __assign.apply(this, arguments);
|
|
17
14
|
};
|
|
18
|
-
|
|
19
15
|
var __rest = this && this.__rest || function (s, e) {
|
|
20
16
|
var t = {};
|
|
21
|
-
|
|
22
17
|
for (var p in s) {
|
|
23
18
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
24
19
|
}
|
|
25
|
-
|
|
26
20
|
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
27
21
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
28
22
|
}
|
|
29
23
|
return t;
|
|
30
24
|
};
|
|
31
|
-
|
|
32
25
|
var __importDefault = this && this.__importDefault || function (mod) {
|
|
33
26
|
return mod && mod.__esModule ? mod : {
|
|
34
27
|
"default": mod
|
|
35
28
|
};
|
|
36
29
|
};
|
|
37
|
-
|
|
38
30
|
Object.defineProperty(exports, "__esModule", {
|
|
39
31
|
value: true
|
|
40
32
|
});
|
|
41
33
|
exports.defaultToolbar = exports.defaultPlugins = void 0;
|
|
42
|
-
|
|
43
34
|
var react_1 = __importDefault(require("react"));
|
|
44
|
-
|
|
45
35
|
var tinymce_react_1 = require("@tinymce/tinymce-react");
|
|
46
|
-
|
|
47
36
|
var tinymce_1 = __importDefault(require("tinymce/tinymce"));
|
|
48
|
-
|
|
49
37
|
require("tinymce/themes/silver");
|
|
50
|
-
|
|
51
38
|
require("tinymce/models/dom");
|
|
52
|
-
|
|
53
39
|
require("tinymce/icons/default");
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
40
|
+
require("tinymce/skins/ui/oxide/skin.min.css");
|
|
41
|
+
// importing the plugin js.
|
|
58
42
|
require("tinymce/plugins/advlist");
|
|
59
|
-
|
|
60
43
|
require("tinymce/plugins/autolink");
|
|
61
|
-
|
|
62
44
|
require("tinymce/plugins/link");
|
|
63
|
-
|
|
64
45
|
require("tinymce/plugins/image");
|
|
65
|
-
|
|
66
46
|
require("tinymce/plugins/lists");
|
|
67
|
-
|
|
68
47
|
require("tinymce/plugins/charmap");
|
|
69
|
-
|
|
70
48
|
require("tinymce/plugins/anchor");
|
|
71
|
-
|
|
72
49
|
require("tinymce/plugins/searchreplace");
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
50
|
+
require("tinymce/plugins/wordcount");
|
|
51
|
+
// import 'tinymce/plugins/code';
|
|
77
52
|
require("tinymce/plugins/fullscreen");
|
|
78
|
-
|
|
79
53
|
require("tinymce/plugins/insertdatetime");
|
|
80
|
-
|
|
81
54
|
require("tinymce/plugins/media");
|
|
82
|
-
|
|
83
55
|
require("tinymce/plugins/nonbreaking");
|
|
84
|
-
|
|
85
56
|
require("tinymce/plugins/table");
|
|
86
|
-
|
|
87
57
|
require("tinymce/plugins/template");
|
|
88
|
-
|
|
89
58
|
require("tinymce/plugins/help");
|
|
90
|
-
|
|
91
59
|
require("tinymce/plugins/quickbars");
|
|
92
|
-
|
|
93
60
|
require("tinymce/plugins/autosave");
|
|
94
|
-
|
|
95
61
|
require("tinymce/plugins/directionality");
|
|
96
|
-
|
|
97
62
|
require("tinymce/plugins/preview");
|
|
98
|
-
|
|
99
63
|
require("tinymce/plugins/save");
|
|
100
|
-
|
|
101
64
|
require("tinymce/plugins/visualblocks");
|
|
102
|
-
|
|
103
65
|
require("tinymce/plugins/autoresize");
|
|
104
|
-
|
|
105
66
|
require("tinymce/plugins/emoticons");
|
|
106
|
-
|
|
107
67
|
require("tinymce/plugins/importcss");
|
|
108
|
-
|
|
109
68
|
require("tinymce/plugins/pagebreak");
|
|
110
|
-
|
|
111
69
|
var code_1 = __importDefault(require("./plugins/code"));
|
|
112
|
-
|
|
113
70
|
var zh_CN_1 = __importDefault(require("./lang/zh_CN"));
|
|
114
|
-
|
|
115
71
|
tinymce_1["default"].addI18n('zh-Hans', zh_CN_1["default"]);
|
|
116
72
|
(0, code_1["default"])();
|
|
117
73
|
var defaultPlugins = ['advlist', 'autolink', 'lists', 'link', 'image', 'charmap', 'anchor', 'searchreplace', 'visualblocks', 'code', 'fullscreen', 'insertdatetime', 'media', 'table', 'preview', 'help', 'wordcount'];
|
|
@@ -127,16 +83,12 @@ var defaultInit = {
|
|
|
127
83
|
toolbar: defaultToolbar,
|
|
128
84
|
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:14px }'
|
|
129
85
|
};
|
|
130
|
-
|
|
131
86
|
var RichTextEditor = function RichTextEditor(props) {
|
|
132
87
|
var init = props.init,
|
|
133
|
-
|
|
134
|
-
|
|
88
|
+
restProps = __rest(props, ["init"]);
|
|
135
89
|
var resultInit = __assign(__assign({}, defaultInit), init);
|
|
136
|
-
|
|
137
90
|
return react_1["default"].createElement(tinymce_react_1.Editor, __assign({}, restProps, {
|
|
138
91
|
init: resultInit
|
|
139
92
|
}));
|
|
140
93
|
};
|
|
141
|
-
|
|
142
94
|
exports["default"] = RichTextEditor;
|
|
@@ -5,15 +5,12 @@ var __importDefault = this && this.__importDefault || function (mod) {
|
|
|
5
5
|
"default": mod
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
|
|
9
8
|
Object.defineProperty(exports, "__esModule", {
|
|
10
9
|
value: true
|
|
11
|
-
});
|
|
12
|
-
|
|
10
|
+
});
|
|
11
|
+
// @ts-nocheck
|
|
13
12
|
var tinymce_1 = __importDefault(require("tinymce/tinymce"));
|
|
14
|
-
|
|
15
13
|
var global = tinymce_1["default"].util.Tools.resolve('tinymce.PluginManager');
|
|
16
|
-
|
|
17
14
|
var setContent = function setContent(editor, html) {
|
|
18
15
|
editor.focus();
|
|
19
16
|
editor.undoManager.transact(function () {
|
|
@@ -22,13 +19,11 @@ var setContent = function setContent(editor, html) {
|
|
|
22
19
|
editor.selection.setCursorLocation();
|
|
23
20
|
editor.nodeChanged();
|
|
24
21
|
};
|
|
25
|
-
|
|
26
22
|
var getContent = function getContent(editor) {
|
|
27
23
|
return editor.getContent({
|
|
28
24
|
source_view: true
|
|
29
25
|
});
|
|
30
26
|
};
|
|
31
|
-
|
|
32
27
|
var open = function open(editor) {
|
|
33
28
|
var editorContent = getContent(editor);
|
|
34
29
|
editor.windowManager.open({
|
|
@@ -60,18 +55,15 @@ var open = function open(editor) {
|
|
|
60
55
|
}
|
|
61
56
|
});
|
|
62
57
|
};
|
|
63
|
-
|
|
64
58
|
var register$1 = function register$1(editor) {
|
|
65
59
|
editor.addCommand('mceCodeEditor', function () {
|
|
66
60
|
open(editor);
|
|
67
61
|
});
|
|
68
62
|
};
|
|
69
|
-
|
|
70
63
|
var register = function register(editor) {
|
|
71
64
|
var onAction = function onAction() {
|
|
72
65
|
return editor.execCommand('mceCodeEditor');
|
|
73
66
|
};
|
|
74
|
-
|
|
75
67
|
editor.ui.registry.addButton('code', {
|
|
76
68
|
text: 'Source code',
|
|
77
69
|
tooltip: 'Source code',
|
|
@@ -83,7 +75,6 @@ var register = function register(editor) {
|
|
|
83
75
|
onAction: onAction
|
|
84
76
|
});
|
|
85
77
|
};
|
|
86
|
-
|
|
87
78
|
function initCodePlugin() {
|
|
88
79
|
global.add('code', function (editor) {
|
|
89
80
|
register$1(editor);
|
|
@@ -91,5 +82,4 @@ function initCodePlugin() {
|
|
|
91
82
|
return {};
|
|
92
83
|
});
|
|
93
84
|
}
|
|
94
|
-
|
|
95
85
|
exports["default"] = initCodePlugin;
|