@para-ui/core 3.0.91 → 3.0.92

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/README.md CHANGED
@@ -1,8 +1,14 @@
1
+ ## 版本: 3.0.92
2
+
3
+ para-ui/core@3.0.91 发布
4
+ 【富文本-TextEditor】富文本国际化
5
+
1
6
  ## 版本: 3.0.91
2
7
 
3
8
  para-ui/core@3.0.91 发布
4
9
  【超出省略-AutoTips】去除width限制,最大为500px
5
10
  【输入框-TextField】修复传入数字0,显示出placeholder
11
+ 【para-ui-doc】文档接入动态编辑
6
12
 
7
13
  ## 版本: 3.0.90
8
14
 
@@ -6,6 +6,7 @@ import { Toolbar, Editor } from '@wangeditor/editor-for-react';
6
6
  import { i18nChangeLanguage } from '@wangeditor/editor';
7
7
  import HelperText from '../HelperText/index.js';
8
8
  import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
9
+ import { u as useFormatMessage } from '../_verture/useFormatMessage-703f8b20.js';
9
10
  import { UUID } from '@paraview/lib';
10
11
  import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
11
12
  import '../_verture/unsupportedIterableToArray-cb478f24.js';
@@ -16,6 +17,7 @@ import 'rc-tooltip';
16
17
  import 'rc-tooltip/lib/placements';
17
18
  import 'clsx';
18
19
  import '@para-ui/icons/Help';
20
+ import '@para-ui/core/GlobalContext';
19
21
 
20
22
  /**
21
23
  * @author xh
@@ -49,6 +51,19 @@ var TOOL_BAR_CONFIG = ["headerSelect", "blockquote", "|", "bold", "underline", "
49
51
  menuKeys: ["insertVideo", "uploadVideo"]
50
52
  }, "insertTable", "codeBlock", "divider", "|", "undo", "redo", "|", "fullScreen"];
51
53
 
54
+ var en = {
55
+ please: 'Please Enter Contet'
56
+ };
57
+
58
+ var zh = {
59
+ please: '请输入内容'
60
+ };
61
+
62
+ var localeJson = {
63
+ zh: zh,
64
+ en: en
65
+ };
66
+
52
67
  var css_248z$1 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-text-editor .w-e-full-screen-container {\n z-index: 1000;\n}\n.paraui-v3-text-editor .text-editor-content {\n border: 1px solid rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n padding: 1px 0;\n background-color: #fff;\n}\n.paraui-v3-text-editor .text-editor-content > div:nth-child(1) {\n border-bottom: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-text-editor .text-editor-content div[contenteditable=false] {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-text-editor .text-editor-content div[contenteditable=false]:hover {\n border-color: rgba(171, 176, 185, 0.4);\n cursor: not-allowed;\n}\n.paraui-v3-text-editor .preview-mode > div:nth-child(1) {\n border-bottom: none;\n}";
53
68
  styleInject(css_248z$1);
54
69
 
@@ -56,6 +71,7 @@ var css_248z = ":root,\n:host {\n --w-e-textarea-bg-color: #fff;\n --w-e-texta
56
71
  styleInject(css_248z);
57
72
 
58
73
  var TextEditor = /*#__PURE__*/forwardRef(function (props, ref) {
74
+ var intl = useFormatMessage('TextEditor', localeJson);
59
75
  var style = props.style,
60
76
  _props$toolbarStyle = props.toolbarStyle,
61
77
  toolbarStyle = _props$toolbarStyle === void 0 ? {} : _props$toolbarStyle,
@@ -74,7 +90,9 @@ var TextEditor = /*#__PURE__*/forwardRef(function (props, ref) {
74
90
  label = props.label,
75
91
  labelTooltip = props.labelTooltip,
76
92
  _props$placeholder = props.placeholder,
77
- placeholder = _props$placeholder === void 0 ? '请输入内容' : _props$placeholder,
93
+ placeholder = _props$placeholder === void 0 ? intl({
94
+ id: 'please'
95
+ }) : _props$placeholder,
78
96
  onChange = props.onChange,
79
97
  onFocus = props.onFocus,
80
98
  onBlur = props.onBlur,
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ please: string;
3
+ };
4
+ export default _default;
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ zh: {
3
+ please: string;
4
+ };
5
+ en: {
6
+ please: string;
7
+ };
8
+ };
9
+ export default _default;
@@ -0,0 +1,4 @@
1
+ declare const _default: {
2
+ please: string;
3
+ };
4
+ export default _default;
package/locale/en-US.d.ts CHANGED
@@ -131,6 +131,9 @@ declare const _default: {
131
131
  Tabs: {
132
132
  confirmDelete: string;
133
133
  };
134
+ TextEditor: {
135
+ please: string;
136
+ };
134
137
  Transfer: {
135
138
  left: string;
136
139
  right: string;
package/locale/index.d.ts CHANGED
@@ -132,6 +132,9 @@ declare const _default: {
132
132
  Tabs: {
133
133
  confirmDelete: string;
134
134
  };
135
+ TextEditor: {
136
+ please: string;
137
+ };
135
138
  Transfer: {
136
139
  left: string;
137
140
  right: string;
@@ -293,6 +296,9 @@ declare const _default: {
293
296
  Tabs: {
294
297
  confirmDelete: string;
295
298
  };
299
+ TextEditor: {
300
+ please: string;
301
+ };
296
302
  Transfer: {
297
303
  left: string;
298
304
  right: string;
package/locale/index.js CHANGED
@@ -131,6 +131,9 @@ var enUS = {
131
131
  "Tabs": {
132
132
  "confirmDelete": "Are you sure delete?"
133
133
  },
134
+ "TextEditor": {
135
+ "please": "Please Enter Contet"
136
+ },
134
137
  "Transfer": {
135
138
  "left": "Left",
136
139
  "right": "Right",
@@ -293,6 +296,9 @@ var zhCN = {
293
296
  "Tabs": {
294
297
  "confirmDelete": "确定删除吗?"
295
298
  },
299
+ "TextEditor": {
300
+ "please": "请输入内容"
301
+ },
296
302
  "Transfer": {
297
303
  "left": "左侧",
298
304
  "right": "右侧",
package/locale/zh-CN.d.ts CHANGED
@@ -131,6 +131,9 @@ declare const _default: {
131
131
  Tabs: {
132
132
  confirmDelete: string;
133
133
  };
134
+ TextEditor: {
135
+ please: string;
136
+ };
134
137
  Transfer: {
135
138
  left: string;
136
139
  right: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@para-ui/core",
3
3
  "private": false,
4
- "version": "3.0.91",
4
+ "version": "3.0.92",
5
5
  "main": "./index.js",
6
6
  "typings": "./index.d.ts",
7
7
  "description": "Powered by Para FED",
@@ -17,12 +17,14 @@
17
17
  "npm:publish": "./publish.sh"
18
18
  },
19
19
  "dependencies": {
20
+ "@monaco-editor/react": "^4.6.0",
20
21
  "@para-ui/core": "^3.0.59",
21
22
  "@paraview/lib": "^2.0.3",
22
23
  "@wangeditor/editor": "^5.1.15",
23
24
  "@wangeditor/editor-for-react": "^1.0.5",
24
25
  "clsx": "1.1.1",
25
26
  "dayjs": "^1.11.3",
27
+ "monaco-editor": "^0.44.0",
26
28
  "rc-cascader": "^3.8.0",
27
29
  "rc-collapse": "3.1.2",
28
30
  "rc-cropping": "1.0.1",
@@ -51,7 +53,8 @@
51
53
  "react-slick": "0.28.1",
52
54
  "react-sortablejs": "6.1.0",
53
55
  "react-transition-group": "4.4.2",
54
- "sortablejs": "^1.15.0"
56
+ "sortablejs": "^1.15.0",
57
+ "sucrase": "^3.34.0"
55
58
  },
56
59
  "devDependencies": {
57
60
  "@babel/core": "^7.18.6",
@@ -85,8 +88,10 @@
85
88
  "html-webpack-plugin": "^5.5.0",
86
89
  "mini-css-extract-plugin": "^2.6.1",
87
90
  "minimist": "^1.2.6",
91
+ "monaco-editor-webpack-plugin": "^7.1.0",
88
92
  "postcss": "^8.4.14",
89
93
  "postcss-import": "^14.1.0",
94
+ "prettier": "^2.6.0",
90
95
  "react-app-polyfill": "^3.0.0",
91
96
  "react-copy-to-clipboard": "^5.0.3",
92
97
  "react-refresh": "^0.11.0",