@zero-library/common 3.1.5 → 3.1.6
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/index.cjs.js +945 -252
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.mts +618 -34
- package/dist/index.d.ts +618 -34
- package/dist/index.esm.js +933 -252
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -1
package/dist/index.cjs.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var i18next = require('i18next');
|
|
4
|
+
var reactI18next = require('react-i18next');
|
|
5
5
|
var antd = require('antd');
|
|
6
|
-
var classNames2 = require('classnames');
|
|
7
|
-
var docxPreview = require('docx-preview');
|
|
8
|
-
var React3 = require('react');
|
|
9
6
|
var copyToClipboard = require('copy-to-clipboard');
|
|
10
7
|
var AES = require('crypto-js/aes');
|
|
11
8
|
var encUtf8 = require('crypto-js/enc-utf8');
|
|
@@ -21,6 +18,11 @@ var Decimal = require('decimal.js');
|
|
|
21
18
|
var dayjs = require('dayjs');
|
|
22
19
|
var relativeTime = require('dayjs/plugin/relativeTime');
|
|
23
20
|
var axios = require('axios');
|
|
21
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
22
|
+
var icons = require('@ant-design/icons');
|
|
23
|
+
var classNames2 = require('classnames');
|
|
24
|
+
var docxPreview = require('docx-preview');
|
|
25
|
+
var React3 = require('react');
|
|
24
26
|
var markdownItKatex = require('@traptitech/markdown-it-katex');
|
|
25
27
|
var parse = require('html-react-parser');
|
|
26
28
|
require('katex/dist/katex.min.css');
|
|
@@ -84,8 +86,6 @@ function _interopNamespace(e) {
|
|
|
84
86
|
return Object.freeze(n);
|
|
85
87
|
}
|
|
86
88
|
|
|
87
|
-
var classNames2__default = /*#__PURE__*/_interopDefault(classNames2);
|
|
88
|
-
var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
89
89
|
var copyToClipboard__default = /*#__PURE__*/_interopDefault(copyToClipboard);
|
|
90
90
|
var AES__default = /*#__PURE__*/_interopDefault(AES);
|
|
91
91
|
var encUtf8__default = /*#__PURE__*/_interopDefault(encUtf8);
|
|
@@ -98,6 +98,8 @@ var Decimal__default = /*#__PURE__*/_interopDefault(Decimal);
|
|
|
98
98
|
var dayjs__default = /*#__PURE__*/_interopDefault(dayjs);
|
|
99
99
|
var relativeTime__default = /*#__PURE__*/_interopDefault(relativeTime);
|
|
100
100
|
var axios__default = /*#__PURE__*/_interopDefault(axios);
|
|
101
|
+
var classNames2__default = /*#__PURE__*/_interopDefault(classNames2);
|
|
102
|
+
var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
101
103
|
var markdownItKatex__default = /*#__PURE__*/_interopDefault(markdownItKatex);
|
|
102
104
|
var parse__default = /*#__PURE__*/_interopDefault(parse);
|
|
103
105
|
var zh_CN__default = /*#__PURE__*/_interopDefault(zh_CN);
|
|
@@ -111,44 +113,7 @@ var PopoverPrimitive__namespace = /*#__PURE__*/_interopNamespace(PopoverPrimitiv
|
|
|
111
113
|
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
112
114
|
var throttle__default = /*#__PURE__*/_interopDefault(throttle);
|
|
113
115
|
|
|
114
|
-
// src/
|
|
115
|
-
var styles_module_default = {
|
|
116
|
-
nsPreviewImage: "styles_module_nsPreviewImage",
|
|
117
|
-
nsPreviewPdf: "styles_module_nsPreviewPdf",
|
|
118
|
-
pdfToolbar: "styles_module_pdfToolbar",
|
|
119
|
-
nsPreviewPdfImage: "styles_module_nsPreviewPdfImage",
|
|
120
|
-
pdfImageNav: "styles_module_pdfImageNav",
|
|
121
|
-
pdfImageNavItem: "styles_module_pdfImageNavItem",
|
|
122
|
-
pdfImageNavItemImgWrapper: "styles_module_pdfImageNavItemImgWrapper",
|
|
123
|
-
pdfImageNavItemActive: "styles_module_pdfImageNavItemActive",
|
|
124
|
-
pdfImageNavItemImg: "styles_module_pdfImageNavItemImg",
|
|
125
|
-
pdfImageNavItemTip: "styles_module_pdfImageNavItemTip",
|
|
126
|
-
pdfImageBody: "styles_module_pdfImageBody",
|
|
127
|
-
pdfImageBodyToolbar: "styles_module_pdfImageBodyToolbar",
|
|
128
|
-
pdfImageBodyItem: "styles_module_pdfImageBodyItem",
|
|
129
|
-
pdfImageBodyItemInnerWrapper: "styles_module_pdfImageBodyItemInnerWrapper",
|
|
130
|
-
pdfImageBodyItemInner: "styles_module_pdfImageBodyItemInner",
|
|
131
|
-
pdfImageBodyItemActive: "styles_module_pdfImageBodyItemActive",
|
|
132
|
-
pdfImageBodyItemImg: "styles_module_pdfImageBodyItemImg",
|
|
133
|
-
nsPreviewVideo: "styles_module_nsPreviewVideo",
|
|
134
|
-
nsPreviewAudio: "styles_module_nsPreviewAudio",
|
|
135
|
-
nsPreviewDocx: "styles_module_nsPreviewDocx",
|
|
136
|
-
docxToolbar: "styles_module_docxToolbar",
|
|
137
|
-
docxContent: "styles_module_docxContent",
|
|
138
|
-
stateBody: "styles_module_stateBody",
|
|
139
|
-
pdfContainer: "styles_module_pdfContainer",
|
|
140
|
-
floatingToolbar: "styles_module_floatingToolbar",
|
|
141
|
-
divider: "styles_module_divider",
|
|
142
|
-
pdfBody: "styles_module_pdfBody",
|
|
143
|
-
pdfDocument: "styles_module_pdfDocument",
|
|
144
|
-
pdfPage: "styles_module_pdfPage"
|
|
145
|
-
};
|
|
146
|
-
var AudioPlayer_default = ({ fileUrl }) => {
|
|
147
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("audio", { controls: true, className: styles_module_default.nsPreviewAudio, children: [
|
|
148
|
-
/* @__PURE__ */ jsxRuntime.jsx("source", { src: fileUrl, type: "audio/mpeg" }),
|
|
149
|
-
"\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 audio \u6807\u7B7E\u3002"
|
|
150
|
-
] }, fileUrl);
|
|
151
|
-
};
|
|
116
|
+
// src/i18n/index.ts
|
|
152
117
|
|
|
153
118
|
// src/utils/is.ts
|
|
154
119
|
var toString = Object.prototype.toString;
|
|
@@ -483,7 +448,7 @@ var arrToObj = (arr = [], key) => {
|
|
|
483
448
|
});
|
|
484
449
|
return obj;
|
|
485
450
|
};
|
|
486
|
-
var setInterval2 = (fn,
|
|
451
|
+
var setInterval2 = (fn, t2) => {
|
|
487
452
|
let timer = null;
|
|
488
453
|
let running = true;
|
|
489
454
|
const loop = () => {
|
|
@@ -491,7 +456,7 @@ var setInterval2 = (fn, t) => {
|
|
|
491
456
|
if (!running) return;
|
|
492
457
|
await fn();
|
|
493
458
|
if (running) loop();
|
|
494
|
-
},
|
|
459
|
+
}, t2);
|
|
495
460
|
};
|
|
496
461
|
loop();
|
|
497
462
|
return {
|
|
@@ -515,9 +480,9 @@ var genNonDuplicateID = () => {
|
|
|
515
480
|
return v.toString(16);
|
|
516
481
|
});
|
|
517
482
|
};
|
|
518
|
-
var copyText = async (text, prompt
|
|
483
|
+
var copyText = async (text, prompt) => {
|
|
519
484
|
await copyToClipboard__default.default(text);
|
|
520
|
-
if (prompt) antd.message.success(prompt);
|
|
485
|
+
if (prompt !== "") antd.message.success(prompt || t("common.copySuccess"));
|
|
521
486
|
};
|
|
522
487
|
function formatNumberWithCommas(number) {
|
|
523
488
|
const numericValue = parseFloat(number);
|
|
@@ -604,7 +569,7 @@ var buildUrlParams = (obj, url, format = "repeat") => {
|
|
|
604
569
|
};
|
|
605
570
|
var downloadFile = (url, name) => {
|
|
606
571
|
const a = document.createElement("a");
|
|
607
|
-
a.download = name || "
|
|
572
|
+
a.download = name || t("common.defaultFileName");
|
|
608
573
|
a.href = url;
|
|
609
574
|
document.body.appendChild(a);
|
|
610
575
|
a.click();
|
|
@@ -961,7 +926,7 @@ var isExpire = (date) => {
|
|
|
961
926
|
};
|
|
962
927
|
var createCachedMessage = () => {
|
|
963
928
|
const messageCache = {};
|
|
964
|
-
return ({ title = "
|
|
929
|
+
return ({ title = t("common.defaultTitle"), content, type = "warning", duration = 3, onClose, isCache = true, isOnly = false }) => {
|
|
965
930
|
if (!content) return;
|
|
966
931
|
const cacheKey = isOnly ? "unique-message-key" : content;
|
|
967
932
|
const handleClose = () => {
|
|
@@ -1005,50 +970,72 @@ var cachedMessage = createCachedMessage();
|
|
|
1005
970
|
// src/utils/pattern.ts
|
|
1006
971
|
var RegMobile = {
|
|
1007
972
|
pattern: /^1[3-9]\d{9}$/,
|
|
1008
|
-
message
|
|
973
|
+
get message() {
|
|
974
|
+
return t("pattern.mobileInvalid");
|
|
975
|
+
}
|
|
1009
976
|
};
|
|
1010
977
|
var RegFixedTelePhone = {
|
|
1011
978
|
pattern: /^0\d{2,3}-\d{7,8}$/,
|
|
1012
|
-
message
|
|
979
|
+
get message() {
|
|
980
|
+
return t("pattern.phoneInvalid");
|
|
981
|
+
}
|
|
1013
982
|
};
|
|
1014
983
|
var RegTelePhone = {
|
|
1015
984
|
pattern: /^[\\+\-\\(\\)\\(\\)\d]{1,20}$/,
|
|
1016
|
-
message
|
|
985
|
+
get message() {
|
|
986
|
+
return t("pattern.phoneInvalid");
|
|
987
|
+
}
|
|
1017
988
|
};
|
|
1018
989
|
var RegTaxNo = {
|
|
1019
990
|
pattern: /^[A-Z0-9]{15}$|^[A-Z0-9]{18}$|^[A-Z0-9]{20}$/,
|
|
1020
|
-
message
|
|
991
|
+
get message() {
|
|
992
|
+
return t("pattern.taxNoInvalid");
|
|
993
|
+
}
|
|
1021
994
|
};
|
|
1022
995
|
var RegBankCardNo = {
|
|
1023
996
|
pattern: /^[0-9]*$/,
|
|
1024
|
-
message
|
|
997
|
+
get message() {
|
|
998
|
+
return t("pattern.bankCardInvalid");
|
|
999
|
+
}
|
|
1025
1000
|
};
|
|
1026
1001
|
var RegIdentityCardNo = {
|
|
1027
1002
|
pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
|
|
1028
|
-
message
|
|
1003
|
+
get message() {
|
|
1004
|
+
return t("pattern.idCardInvalid");
|
|
1005
|
+
}
|
|
1029
1006
|
};
|
|
1030
1007
|
var RegNumNo = {
|
|
1031
1008
|
pattern: /^[0-9]*$/,
|
|
1032
|
-
message
|
|
1009
|
+
get message() {
|
|
1010
|
+
return t("pattern.numberInvalid");
|
|
1011
|
+
}
|
|
1033
1012
|
};
|
|
1034
1013
|
var RegSmsCode = {
|
|
1035
1014
|
pattern: /^[0-9]{6}$/,
|
|
1036
|
-
message
|
|
1015
|
+
get message() {
|
|
1016
|
+
return t("pattern.smsCodeInvalid");
|
|
1017
|
+
}
|
|
1037
1018
|
};
|
|
1038
1019
|
var RegEmail = {
|
|
1039
1020
|
pattern: /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/,
|
|
1040
|
-
message
|
|
1021
|
+
get message() {
|
|
1022
|
+
return t("pattern.emailInvalid");
|
|
1023
|
+
}
|
|
1041
1024
|
};
|
|
1042
1025
|
var RegDetailAddress = {
|
|
1043
1026
|
pattern: /.*(街|路|村|乡|镇|道|巷|号).*/,
|
|
1044
|
-
message
|
|
1027
|
+
get message() {
|
|
1028
|
+
return t("pattern.addressInvalid");
|
|
1029
|
+
}
|
|
1045
1030
|
};
|
|
1046
1031
|
var RegPassword = {
|
|
1047
1032
|
pattern: /^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,26}$/,
|
|
1048
|
-
message
|
|
1033
|
+
get message() {
|
|
1034
|
+
return t("pattern.passwordInvalid");
|
|
1035
|
+
}
|
|
1049
1036
|
};
|
|
1050
|
-
var PhoneOrMobileValidator = (errMessage
|
|
1051
|
-
validator: (_, value) => !value || RegFixedTelePhone.pattern.test(value) || RegMobile.pattern.test(value) ? Promise.resolve() : Promise.reject(new Error(errMessage))
|
|
1037
|
+
var PhoneOrMobileValidator = (errMessage) => ({
|
|
1038
|
+
validator: (_, value) => !value || RegFixedTelePhone.pattern.test(value) || RegMobile.pattern.test(value) ? Promise.resolve() : Promise.reject(new Error(errMessage || t("pattern.phoneOrMobileInvalid")))
|
|
1052
1039
|
});
|
|
1053
1040
|
var ThanNumValidator = ({
|
|
1054
1041
|
min,
|
|
@@ -1065,12 +1052,12 @@ var ThanNumValidator = ({
|
|
|
1065
1052
|
}
|
|
1066
1053
|
if (isNumberNoNaN(parseFloat(min))) {
|
|
1067
1054
|
if (!(Number(value) > Number(min) || equalMin && Number(value) === Number(min))) {
|
|
1068
|
-
return Promise.reject(new Error(minErrMessage || errMessage ||
|
|
1055
|
+
return Promise.reject(new Error(minErrMessage || errMessage || t(equalMin ? "lessThanOrEqual" : "lessThan", { value: min })));
|
|
1069
1056
|
}
|
|
1070
1057
|
}
|
|
1071
1058
|
if (isNumberNoNaN(parseFloat(max))) {
|
|
1072
1059
|
if (!(Number(value) < Number(max) || equalMax && Number(value) === Number(max))) {
|
|
1073
|
-
return Promise.reject(new Error(maxErrMessage || errMessage ||
|
|
1060
|
+
return Promise.reject(new Error(maxErrMessage || errMessage || t(equalMax ? "greaterThanOrEqual" : "greaterThan", { value: max })));
|
|
1074
1061
|
}
|
|
1075
1062
|
}
|
|
1076
1063
|
return Promise.resolve();
|
|
@@ -1090,17 +1077,17 @@ var ThanNumLengthValidator = ({
|
|
|
1090
1077
|
}
|
|
1091
1078
|
if (isNumber(length)) {
|
|
1092
1079
|
if (precision(value) > length) {
|
|
1093
|
-
return Promise.reject(new Error(lengthErrMessage ||
|
|
1080
|
+
return Promise.reject(new Error(lengthErrMessage || t("pattern.totalLengthExceed", { length })));
|
|
1094
1081
|
}
|
|
1095
1082
|
}
|
|
1096
1083
|
if (isNumber(integerLength)) {
|
|
1097
1084
|
if (precision(value) - decimalPlaces(value) > integerLength) {
|
|
1098
|
-
return Promise.reject(new Error(integerLengthErrMessage ||
|
|
1085
|
+
return Promise.reject(new Error(integerLengthErrMessage || t("pattern.integerLengthExceed", { length: integerLength })));
|
|
1099
1086
|
}
|
|
1100
1087
|
}
|
|
1101
1088
|
if (isNumber(decimalsLength)) {
|
|
1102
1089
|
if (decimalPlaces(value) > decimalsLength) {
|
|
1103
|
-
return Promise.reject(new Error(decimalsLengthErrMessage ||
|
|
1090
|
+
return Promise.reject(new Error(decimalsLengthErrMessage || t("pattern.decimalLengthExceed", { length: decimalsLength })));
|
|
1104
1091
|
}
|
|
1105
1092
|
}
|
|
1106
1093
|
return Promise.resolve();
|
|
@@ -1110,7 +1097,7 @@ var MultiEmailValidator = (max) => ({
|
|
|
1110
1097
|
validator: (_, value) => {
|
|
1111
1098
|
if (value) {
|
|
1112
1099
|
const emailArr = value.split(",").map((v) => v.trim()).filter((v) => v);
|
|
1113
|
-
if (emailArr.length > max) return Promise.reject(new Error(
|
|
1100
|
+
if (emailArr.length > max) return Promise.reject(new Error(t("pattern.maxEmailsExceed", { max })));
|
|
1114
1101
|
const noEmailArr = emailArr.filter((email) => !RegEmail.pattern.test(email));
|
|
1115
1102
|
if (noEmailArr.length) return Promise.reject(new Error(RegEmail.message));
|
|
1116
1103
|
}
|
|
@@ -1178,14 +1165,14 @@ function createRequest(config) {
|
|
|
1178
1165
|
return Promise.reject(err);
|
|
1179
1166
|
}
|
|
1180
1167
|
if (!err.response) {
|
|
1181
|
-
if (showError(err?.config?.showError)) cachedMessage({ content: "
|
|
1168
|
+
if (showError(err?.config?.showError)) cachedMessage({ content: t("request.networkError"), type: "error" });
|
|
1182
1169
|
} else {
|
|
1183
1170
|
switch (err.response?.status) {
|
|
1184
1171
|
case HttpStatus.UNAUTHORIZED:
|
|
1185
1172
|
if (showError(err?.config?.showError)) cachedMessage({ content: err.response?.data.message, type: "error" });
|
|
1186
1173
|
break;
|
|
1187
1174
|
default:
|
|
1188
|
-
if (showError(err?.config?.showError)) cachedMessage({ content: err.response?.data.message || "
|
|
1175
|
+
if (showError(err?.config?.showError)) cachedMessage({ content: err.response?.data.message || t("request.requestError"), type: "error" });
|
|
1189
1176
|
}
|
|
1190
1177
|
}
|
|
1191
1178
|
return Promise.reject(err);
|
|
@@ -1300,7 +1287,650 @@ function createTokenManager({ key, storage = localStorage }) {
|
|
|
1300
1287
|
clear: tokenManager.clear
|
|
1301
1288
|
};
|
|
1302
1289
|
}
|
|
1290
|
+
|
|
1291
|
+
// src/i18n/constants.ts
|
|
1292
|
+
var NS_COMMON = "common";
|
|
1293
|
+
|
|
1294
|
+
// src/i18n/zh-CN.ts
|
|
1295
|
+
var commonZhCN = {
|
|
1296
|
+
// 通用文案
|
|
1297
|
+
common: {
|
|
1298
|
+
copySuccess: "\u590D\u5236\u6210\u529F",
|
|
1299
|
+
confirm: "\u786E\u5B9A",
|
|
1300
|
+
cancel: "\u53D6\u6D88",
|
|
1301
|
+
download: "\u4E0B\u8F7D",
|
|
1302
|
+
save: "\u4FDD\u5B58",
|
|
1303
|
+
defaultFileName: "\u6587\u4EF6",
|
|
1304
|
+
defaultTitle: "\u63D0\u793A",
|
|
1305
|
+
loading: "\u52A0\u8F7D\u4E2D..."
|
|
1306
|
+
},
|
|
1307
|
+
// utils/request.ts
|
|
1308
|
+
request: {
|
|
1309
|
+
networkError: "\u7F51\u7EDC\u5F02\u5E38\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC",
|
|
1310
|
+
requestError: "\u8BF7\u6C42\u9519\u8BEF\uFF01"
|
|
1311
|
+
},
|
|
1312
|
+
// utils/pattern.ts — 验证消息
|
|
1313
|
+
pattern: {
|
|
1314
|
+
mobileInvalid: "\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E\uFF01",
|
|
1315
|
+
phoneInvalid: "\u7535\u8BDD\u53F7\u7801\u683C\u5F0F\u4E0D\u6B63\u786E\uFF01",
|
|
1316
|
+
taxNoInvalid: "\u7A0E\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01",
|
|
1317
|
+
bankCardInvalid: "\u94F6\u884C\u5361\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01",
|
|
1318
|
+
idCardInvalid: "\u8EAB\u4EFD\u8BC1\u53F7\u683C\u5F0F\u6709\u8BEF\uFF01",
|
|
1319
|
+
numberInvalid: "\u683C\u5F0F\u6709\u8BEF\uFF0C\u8BF7\u91CD\u65B0\u8F93\u5165\uFF01",
|
|
1320
|
+
smsCodeInvalid: "\u9A8C\u8BC1\u7801\u4E3A6\u4F4D\u6570\u5B57",
|
|
1321
|
+
emailInvalid: "\u90AE\u7BB1\u683C\u5F0F\u6709\u8BEF\uFF01",
|
|
1322
|
+
addressInvalid: '\u5FC5\u987B\u5305\u542B"\u8857\u3001\u8DEF\u3001\u6751\u3001\u4E61\u3001\u9547\u3001\u9053\u3001\u5DF7\u3001\u53F7"\u7B49\u5173\u952E\u8BCD\u4E4B\u4E00',
|
|
1323
|
+
passwordInvalid: "\u5BC6\u7801\u4E3A8\u523026\u4F4D\u4E4B\u95F4\u6570\u5B57\u4E0E\u5B57\u6BCD\u7EC4\u5408",
|
|
1324
|
+
phoneOrMobileInvalid: "\u8054\u7CFB\u7535\u8BDD\u683C\u5F0F\u4E0D\u6B63\u786E",
|
|
1325
|
+
// 插值示例:{{value}} 会被替换为实际值
|
|
1326
|
+
lessThan: "\u4E0D\u80FD\u5C0F\u4E8E{{value}}",
|
|
1327
|
+
lessThanOrEqual: "\u4E0D\u80FD\u5C0F\u4E8E\u7B49\u4E8E{{value}}",
|
|
1328
|
+
greaterThan: "\u4E0D\u80FD\u5927\u4E8E{{value}}",
|
|
1329
|
+
greaterThanOrEqual: "\u4E0D\u80FD\u5927\u4E8E\u7B49\u4E8E{{value}}",
|
|
1330
|
+
totalLengthExceed: "\u603B\u4F4D\u6570\u4E0D\u80FD\u8D85\u8FC7{{length}}\u4F4D",
|
|
1331
|
+
integerLengthExceed: "\u6574\u6570\u4F4D\u4E0D\u80FD\u8D85\u8FC7{{length}}\u4F4D",
|
|
1332
|
+
decimalLengthExceed: "\u5C0F\u6570\u4F4D\u4E0D\u80FD\u8D85\u8FC7{{length}}\u4F4D",
|
|
1333
|
+
maxEmailsExceed: "\u6700\u591A\u8F93\u5165{{max}}\u4E2A\u90AE\u7BB1"
|
|
1334
|
+
},
|
|
1335
|
+
// utils/date.ts
|
|
1336
|
+
date: {
|
|
1337
|
+
yearMonthFormat: "YYYY\u5E74MM\u6708",
|
|
1338
|
+
yearMonthDayFormat: "YYYY\u5E74MM\u6708DD\u65E5"
|
|
1339
|
+
},
|
|
1340
|
+
// SpeechButton 语音按钮
|
|
1341
|
+
speechButton: {
|
|
1342
|
+
notSupported: "\u5F53\u524D\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u8BED\u97F3\u8BC6\u522B",
|
|
1343
|
+
permissionDenied: "\u9EA6\u514B\u98CE\u6743\u9650\u5DF2\u62D2\u7EDD",
|
|
1344
|
+
stop: "\u505C\u6B62\u5F55\u97F3",
|
|
1345
|
+
start: "\u70B9\u51FB\u5F00\u59CB\u5F55\u97F3"
|
|
1346
|
+
},
|
|
1347
|
+
// MicroApp / Iframe
|
|
1348
|
+
microApp: {
|
|
1349
|
+
loading: "\u52A0\u8F7D\u4E2D..."
|
|
1350
|
+
},
|
|
1351
|
+
iframe: {
|
|
1352
|
+
loading: "\u52A0\u8F7D\u4E2D..."
|
|
1353
|
+
},
|
|
1354
|
+
// LazyComponent 延时加载组件
|
|
1355
|
+
lazyComponent: {
|
|
1356
|
+
unknownType: "\u672A\u77E5\u7C7B\u578B\uFF1A{{type}}",
|
|
1357
|
+
componentLoading: "\u7EC4\u4EF6\u52A0\u8F7D\u4E2D..."
|
|
1358
|
+
},
|
|
1359
|
+
// File 文件预览组件群
|
|
1360
|
+
filePreview: {
|
|
1361
|
+
title: "\u6587\u4EF6\u9884\u89C8",
|
|
1362
|
+
closePreview: "\u5173\u95ED\u9884\u89C8",
|
|
1363
|
+
previewImageAlt: "\u9884\u89C8\u56FE\u7247",
|
|
1364
|
+
previewNotSupported: "\u6682\u4E0D\u652F\u6301 {{suffix}} \u6587\u4EF6\u7684\u9884\u89C8",
|
|
1365
|
+
previewNotSupportedDownload: "{{suffix}} \u6587\u4EF6\u6682\u4E0D\u652F\u6301\u5728\u7EBF\u9884\u89C8\uFF0C\u8BF7\u4E0B\u8F7D\u6253\u5F00",
|
|
1366
|
+
previewGenerating: "\u9884\u89C8\u6587\u4EF6\u6B63\u5728\u751F\u6210\u4E2D...",
|
|
1367
|
+
audioNotSupported: "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 audio \u6807\u7B7E\u3002",
|
|
1368
|
+
videoNotSupported: "\u60A8\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301 video \u6807\u7B7E\u3002",
|
|
1369
|
+
requestFailedWithStatus: "\u8BF7\u6C42\u5931\u8D25\uFF0C\u72B6\u6001\u7801: {{status}}",
|
|
1370
|
+
emptyResponse: "\u8FD4\u56DE\u5185\u5BB9\u4E3A\u7A7A",
|
|
1371
|
+
loadFileFailed: "\u52A0\u8F7D\u6587\u4EF6\u5931\u8D25",
|
|
1372
|
+
fileParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790\u6587\u4EF6\u5931\u8D25",
|
|
1373
|
+
fileUrlInvalid: "\u6587\u4EF6\u5730\u5740\u9519\u8BEF",
|
|
1374
|
+
htmlParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790 HTML \u5931\u8D25",
|
|
1375
|
+
docLoadFailed: "\u6587\u6863\u52A0\u8F7D\u5931\u8D25",
|
|
1376
|
+
pdfLoadFailed: "PDF \u52A0\u8F7D\u5931\u8D25",
|
|
1377
|
+
pdfParseFailed: "\u52A0\u8F7D\u6216\u89E3\u6790 pdf \u5931\u8D25",
|
|
1378
|
+
pdfUrlInvalid: "pdf\u5730\u5740\u9519\u8BEF",
|
|
1379
|
+
pdfPasswordInvalid: "\u5BC6\u7801\u65E0\u6548\u3002\u8BF7\u518D\u8BD5\u4E00\u6B21\uFF01",
|
|
1380
|
+
pdfPasswordPlaceholder: "\u8BF7\u8F93\u5165\u5BC6\u7801",
|
|
1381
|
+
pdfSubmit: "\u63D0 \u4EA4",
|
|
1382
|
+
pdfInvalidOrDamaged: "\u6587\u4EF6\u65E0\u6548\u6216\u5DF2\u635F\u574F",
|
|
1383
|
+
pdfFileNotFound: "\u6587\u4EF6\u4E0D\u5B58\u5728",
|
|
1384
|
+
pdfUnexpectedResponse: "\u610F\u5916\u7684\u670D\u52A1\u5668\u54CD\u5E94",
|
|
1385
|
+
pdfLoadDocumentFailed: "\u65E0\u6CD5\u52A0\u8F7D\u6587\u6863",
|
|
1386
|
+
zoomOut: "\u7F29\u5C0F",
|
|
1387
|
+
zoomIn: "\u653E\u5927",
|
|
1388
|
+
zoomReset: "\u8FD8\u539F",
|
|
1389
|
+
fitWidth: "\u9002\u5E94\u5BBD\u5EA6"
|
|
1390
|
+
},
|
|
1391
|
+
// MarkdownEditor 富文本编辑器
|
|
1392
|
+
markdownEditor: {
|
|
1393
|
+
mainArea: "\u4E3B\u5185\u5BB9\u533A\u57DF\uFF0C\u5F00\u59CB\u8F93\u5165\u6587\u672C...",
|
|
1394
|
+
unknown: "\u672A\u77E5",
|
|
1395
|
+
// 工具栏
|
|
1396
|
+
toolbar: {
|
|
1397
|
+
quote: "\u5F15\u7528\u9009\u4E2D\u6587\u672C",
|
|
1398
|
+
annotation: "\u6279\u6CE8",
|
|
1399
|
+
excerpt: "\u6458\u5F55\u7B14\u8BB0",
|
|
1400
|
+
undo: "\u64A4\u9500",
|
|
1401
|
+
redo: "\u91CD\u505A",
|
|
1402
|
+
alignLeft: "\u5DE6\u5BF9\u9F50",
|
|
1403
|
+
alignCenter: "\u5C45\u4E2D\u5BF9\u9F50",
|
|
1404
|
+
alignRight: "\u53F3\u5BF9\u9F50",
|
|
1405
|
+
alignJustify: "\u4E24\u7AEF\u5BF9\u9F50",
|
|
1406
|
+
bold: "\u7C97\u4F53",
|
|
1407
|
+
italic: "\u659C\u4F53",
|
|
1408
|
+
underline: "\u4E0B\u5212\u7EBF",
|
|
1409
|
+
strike: "\u5220\u9664\u7EBF",
|
|
1410
|
+
code: "\u4EE3\u7801",
|
|
1411
|
+
superscript: "\u4E0A\u89D2\u6807",
|
|
1412
|
+
subscript: "\u4E0B\u89D2\u6807",
|
|
1413
|
+
bulletList: "\u65E0\u5E8F\u5217\u8868",
|
|
1414
|
+
orderedList: "\u6709\u5E8F\u5217\u8868",
|
|
1415
|
+
taskList: "\u4EFB\u52A1\u5217\u8868",
|
|
1416
|
+
listOptions: "\u5217\u8868\u9009\u9879",
|
|
1417
|
+
list: "\u5217\u8868",
|
|
1418
|
+
blockquote: "\u5F15\u7528\u5757",
|
|
1419
|
+
codeBlock: "\u4EE3\u7801\u5757",
|
|
1420
|
+
heading: "\u6807\u9898",
|
|
1421
|
+
headingLevel: "\u6807\u9898 {{level}}",
|
|
1422
|
+
addImage: "\u6DFB\u52A0\u56FE\u7247",
|
|
1423
|
+
link: "\u94FE\u63A5",
|
|
1424
|
+
linkPlaceholder: "\u7C98\u8D34\u94FE\u63A5...",
|
|
1425
|
+
applyLink: "\u5E94\u7528\u94FE\u63A5",
|
|
1426
|
+
openInNewWindow: "\u5728\u65B0\u7A97\u53E3\u4E2D\u6253\u5F00",
|
|
1427
|
+
removeLink: "\u79FB\u9664\u94FE\u63A5"
|
|
1428
|
+
},
|
|
1429
|
+
// 高亮 / 背景色
|
|
1430
|
+
highlight: {
|
|
1431
|
+
toggle: "\u5207\u6362\u9AD8\u4EAE\u663E\u793A ({{color}})",
|
|
1432
|
+
label: "\u80CC\u666F\u8272",
|
|
1433
|
+
textLabel: "\u6587\u672C\u80CC\u666F\u8272",
|
|
1434
|
+
removeBackground: "\u79FB\u9664\u80CC\u666F",
|
|
1435
|
+
removeHighlight: "\u79FB\u9664\u9AD8\u4EAE",
|
|
1436
|
+
default: "\u9ED8\u8BA4\u80CC\u666F",
|
|
1437
|
+
gray: "\u7070\u8272\u80CC\u666F",
|
|
1438
|
+
brown: "\u68D5\u8272\u80CC\u666F",
|
|
1439
|
+
orange: "\u6A59\u8272\u80CC\u666F",
|
|
1440
|
+
yellow: "\u9EC4\u8272\u80CC\u666F",
|
|
1441
|
+
green: "\u7EFF\u8272\u80CC\u666F",
|
|
1442
|
+
blue: "\u84DD\u8272\u80CC\u666F",
|
|
1443
|
+
purple: "\u7D2B\u8272\u80CC\u666F",
|
|
1444
|
+
pink: "\u7C89\u8272\u80CC\u666F",
|
|
1445
|
+
red: "\u7EA2\u8272\u80CC\u666F"
|
|
1446
|
+
},
|
|
1447
|
+
// 批注
|
|
1448
|
+
annotation: {
|
|
1449
|
+
title: "\u6279\u6CE8",
|
|
1450
|
+
list: "\u6279\u6CE8\u5217\u8868",
|
|
1451
|
+
add: "\u6DFB\u52A0\u6279\u6CE8",
|
|
1452
|
+
content: "\u6279\u6CE8\u5185\u5BB9",
|
|
1453
|
+
required: "\u8BF7\u8F93\u5165\u6279\u6CE8\u5185\u5BB9",
|
|
1454
|
+
maxLength: "\u6279\u6CE8\u5185\u5BB9\u4E0D\u80FD\u8D85\u8FC7500\u4E2A\u5B57\u7B26",
|
|
1455
|
+
placeholder: "\u8BF7\u8F93\u5165\u60A8\u7684\u6279\u6CE8\u5185\u5BB9...",
|
|
1456
|
+
edit: "\u7F16\u8F91\u6279\u6CE8",
|
|
1457
|
+
delete: "\u5220\u9664\u6279\u6CE8",
|
|
1458
|
+
confirmDelete: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6279\u6CE8\u5417?",
|
|
1459
|
+
empty: "\u6682\u65E0\u6279\u6CE8"
|
|
1460
|
+
},
|
|
1461
|
+
// 摘录
|
|
1462
|
+
collection: {
|
|
1463
|
+
title: "\u6458\u5F55",
|
|
1464
|
+
list: "\u6458\u5F55\u5217\u8868",
|
|
1465
|
+
delete: "\u5220\u9664\u6458\u5F55",
|
|
1466
|
+
confirmDelete: "\u786E\u8BA4\u5220\u9664\u5F53\u524D\u6458\u5F55\u5417?",
|
|
1467
|
+
empty: "\u6682\u65E0\u6458\u5F55"
|
|
1468
|
+
},
|
|
1469
|
+
// 文件 / 图片上传
|
|
1470
|
+
upload: {
|
|
1471
|
+
noFile: "\u672A\u63D0\u4F9B\u6587\u4EF6",
|
|
1472
|
+
canceled: "\u4E0A\u4F20\u5DF2\u53D6\u6D88",
|
|
1473
|
+
fileSizeExceeded: "\u6587\u4EF6\u5927\u5C0F\u8D85\u8FC7\u6700\u5927\u9650\u5236 ({{max}}MB)",
|
|
1474
|
+
undefined: "\u4E0A\u4F20\u529F\u80FD\u672A\u5B9A\u4E49",
|
|
1475
|
+
failedNoUrl: "\u4E0A\u4F20\u5931\u8D25\uFF1A\u672A\u8FD4\u56DEURL",
|
|
1476
|
+
failed: "\u4E0A\u4F20\u5931\u8D25",
|
|
1477
|
+
noFileToUpload: "\u6CA1\u6709\u6587\u4EF6\u53EF\u4E0A\u4F20",
|
|
1478
|
+
maxFileCount: "\u6700\u591A\u5141\u8BB8\u4E0A\u4F20 {{limit}} \u4E2A\u6587\u4EF6"
|
|
1479
|
+
}
|
|
1480
|
+
}
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
// src/i18n/en-US.ts
|
|
1484
|
+
var commonEnUS = {
|
|
1485
|
+
common: {
|
|
1486
|
+
copySuccess: "Copied successfully",
|
|
1487
|
+
confirm: "OK",
|
|
1488
|
+
cancel: "Cancel",
|
|
1489
|
+
download: "Download",
|
|
1490
|
+
save: "Save",
|
|
1491
|
+
defaultFileName: "file",
|
|
1492
|
+
defaultTitle: "Notice",
|
|
1493
|
+
loading: "Loading..."
|
|
1494
|
+
},
|
|
1495
|
+
request: {
|
|
1496
|
+
networkError: "Network error, please check your connection",
|
|
1497
|
+
requestError: "Request error!"
|
|
1498
|
+
},
|
|
1499
|
+
pattern: {
|
|
1500
|
+
mobileInvalid: "Invalid phone number!",
|
|
1501
|
+
phoneInvalid: "Invalid phone number!",
|
|
1502
|
+
taxNoInvalid: "Invalid tax number!",
|
|
1503
|
+
bankCardInvalid: "Invalid bank card number!",
|
|
1504
|
+
idCardInvalid: "Invalid ID card number!",
|
|
1505
|
+
numberInvalid: "Invalid format, please re-enter!",
|
|
1506
|
+
smsCodeInvalid: "SMS code must be 6 digits",
|
|
1507
|
+
emailInvalid: "Invalid email format!",
|
|
1508
|
+
addressInvalid: "Must contain one of: street, road, village, town, etc.",
|
|
1509
|
+
passwordInvalid: "Password must be 8-26 characters with letters and numbers",
|
|
1510
|
+
phoneOrMobileInvalid: "Invalid contact number",
|
|
1511
|
+
lessThan: "Cannot be less than {{value}}",
|
|
1512
|
+
lessThanOrEqual: "Cannot be less than or equal to {{value}}",
|
|
1513
|
+
greaterThan: "Cannot be greater than {{value}}",
|
|
1514
|
+
greaterThanOrEqual: "Cannot be greater than or equal to {{value}}",
|
|
1515
|
+
totalLengthExceed: "Total digits cannot exceed {{length}}",
|
|
1516
|
+
integerLengthExceed: "Integer digits cannot exceed {{length}}",
|
|
1517
|
+
decimalLengthExceed: "Decimal digits cannot exceed {{length}}",
|
|
1518
|
+
maxEmailsExceed: "Maximum {{max}} emails allowed"
|
|
1519
|
+
},
|
|
1520
|
+
date: {
|
|
1521
|
+
yearMonthFormat: "YYYY-MM",
|
|
1522
|
+
yearMonthDayFormat: "YYYY-MM-DD"
|
|
1523
|
+
},
|
|
1524
|
+
speechButton: {
|
|
1525
|
+
notSupported: "Speech recognition is not supported in this browser",
|
|
1526
|
+
permissionDenied: "Microphone permission denied",
|
|
1527
|
+
stop: "Stop Recording",
|
|
1528
|
+
start: "Click to Start Recording"
|
|
1529
|
+
},
|
|
1530
|
+
microApp: {
|
|
1531
|
+
loading: "Loading..."
|
|
1532
|
+
},
|
|
1533
|
+
iframe: {
|
|
1534
|
+
loading: "Loading..."
|
|
1535
|
+
},
|
|
1536
|
+
lazyComponent: {
|
|
1537
|
+
unknownType: "Unknown type: {{type}}",
|
|
1538
|
+
componentLoading: "Loading component..."
|
|
1539
|
+
},
|
|
1540
|
+
filePreview: {
|
|
1541
|
+
title: "File Preview",
|
|
1542
|
+
closePreview: "Close preview",
|
|
1543
|
+
previewImageAlt: "Preview image",
|
|
1544
|
+
previewNotSupported: "Preview of {{suffix}} files is not supported",
|
|
1545
|
+
previewNotSupportedDownload: "{{suffix}} files cannot be previewed online, please download and open",
|
|
1546
|
+
previewGenerating: "Preview file is being generated...",
|
|
1547
|
+
audioNotSupported: "Your browser does not support the audio tag.",
|
|
1548
|
+
videoNotSupported: "Your browser does not support the video tag.",
|
|
1549
|
+
requestFailedWithStatus: "Request failed, status code: {{status}}",
|
|
1550
|
+
emptyResponse: "Response content is empty",
|
|
1551
|
+
loadFileFailed: "Failed to load file",
|
|
1552
|
+
fileParseFailed: "Failed to load or parse file",
|
|
1553
|
+
fileUrlInvalid: "Invalid file URL",
|
|
1554
|
+
htmlParseFailed: "Failed to load or parse HTML",
|
|
1555
|
+
docLoadFailed: "Failed to load document",
|
|
1556
|
+
pdfLoadFailed: "Failed to load PDF",
|
|
1557
|
+
pdfParseFailed: "Failed to load or parse PDF",
|
|
1558
|
+
pdfUrlInvalid: "Invalid PDF URL",
|
|
1559
|
+
pdfPasswordInvalid: "Invalid password. Please try again!",
|
|
1560
|
+
pdfPasswordPlaceholder: "Please enter password",
|
|
1561
|
+
pdfSubmit: "Submit",
|
|
1562
|
+
pdfInvalidOrDamaged: "File is invalid or damaged",
|
|
1563
|
+
pdfFileNotFound: "File not found",
|
|
1564
|
+
pdfUnexpectedResponse: "Unexpected server response",
|
|
1565
|
+
pdfLoadDocumentFailed: "Unable to load document",
|
|
1566
|
+
zoomOut: "Zoom out",
|
|
1567
|
+
zoomIn: "Zoom in",
|
|
1568
|
+
zoomReset: "Reset",
|
|
1569
|
+
fitWidth: "Fit width"
|
|
1570
|
+
},
|
|
1571
|
+
markdownEditor: {
|
|
1572
|
+
mainArea: "Main content area, start typing...",
|
|
1573
|
+
unknown: "Unknown",
|
|
1574
|
+
toolbar: {
|
|
1575
|
+
quote: "Quote Selected Text",
|
|
1576
|
+
annotation: "Annotate",
|
|
1577
|
+
excerpt: "Excerpt Note",
|
|
1578
|
+
undo: "Undo",
|
|
1579
|
+
redo: "Redo",
|
|
1580
|
+
alignLeft: "Align Left",
|
|
1581
|
+
alignCenter: "Align Center",
|
|
1582
|
+
alignRight: "Align Right",
|
|
1583
|
+
alignJustify: "Justify",
|
|
1584
|
+
bold: "Bold",
|
|
1585
|
+
italic: "Italic",
|
|
1586
|
+
underline: "Underline",
|
|
1587
|
+
strike: "Strikethrough",
|
|
1588
|
+
code: "Code",
|
|
1589
|
+
superscript: "Superscript",
|
|
1590
|
+
subscript: "Subscript",
|
|
1591
|
+
bulletList: "Bullet List",
|
|
1592
|
+
orderedList: "Numbered List",
|
|
1593
|
+
taskList: "Task List",
|
|
1594
|
+
listOptions: "List Options",
|
|
1595
|
+
list: "List",
|
|
1596
|
+
blockquote: "Blockquote",
|
|
1597
|
+
codeBlock: "Code Block",
|
|
1598
|
+
heading: "Heading",
|
|
1599
|
+
headingLevel: "Heading {{level}}",
|
|
1600
|
+
addImage: "Add Image",
|
|
1601
|
+
link: "Link",
|
|
1602
|
+
linkPlaceholder: "Paste link...",
|
|
1603
|
+
applyLink: "Apply Link",
|
|
1604
|
+
openInNewWindow: "Open in New Window",
|
|
1605
|
+
removeLink: "Remove Link"
|
|
1606
|
+
},
|
|
1607
|
+
highlight: {
|
|
1608
|
+
toggle: "Toggle highlight ({{color}})",
|
|
1609
|
+
label: "Background color",
|
|
1610
|
+
textLabel: "Text background color",
|
|
1611
|
+
removeBackground: "Remove background",
|
|
1612
|
+
removeHighlight: "Remove highlight",
|
|
1613
|
+
default: "Default background",
|
|
1614
|
+
gray: "Gray background",
|
|
1615
|
+
brown: "Brown background",
|
|
1616
|
+
orange: "Orange background",
|
|
1617
|
+
yellow: "Yellow background",
|
|
1618
|
+
green: "Green background",
|
|
1619
|
+
blue: "Blue background",
|
|
1620
|
+
purple: "Purple background",
|
|
1621
|
+
pink: "Pink background",
|
|
1622
|
+
red: "Red background"
|
|
1623
|
+
},
|
|
1624
|
+
annotation: {
|
|
1625
|
+
title: "Annotations",
|
|
1626
|
+
list: "Annotations",
|
|
1627
|
+
add: "Add Annotation",
|
|
1628
|
+
content: "Annotation content",
|
|
1629
|
+
required: "Please enter annotation content",
|
|
1630
|
+
maxLength: "Annotation content cannot exceed 500 characters",
|
|
1631
|
+
placeholder: "Please enter your annotation...",
|
|
1632
|
+
edit: "Edit Annotation",
|
|
1633
|
+
delete: "Delete annotation",
|
|
1634
|
+
confirmDelete: "Delete this annotation?",
|
|
1635
|
+
empty: "No annotations"
|
|
1636
|
+
},
|
|
1637
|
+
collection: {
|
|
1638
|
+
title: "Excerpts",
|
|
1639
|
+
list: "Excerpts",
|
|
1640
|
+
delete: "Delete excerpt",
|
|
1641
|
+
confirmDelete: "Delete this excerpt?",
|
|
1642
|
+
empty: "No excerpts"
|
|
1643
|
+
},
|
|
1644
|
+
upload: {
|
|
1645
|
+
noFile: "No file provided",
|
|
1646
|
+
canceled: "Upload canceled",
|
|
1647
|
+
fileSizeExceeded: "File size exceeds the maximum limit ({{max}}MB)",
|
|
1648
|
+
undefined: "Upload function is not defined",
|
|
1649
|
+
failedNoUrl: "Upload failed: no URL returned",
|
|
1650
|
+
failed: "Upload failed",
|
|
1651
|
+
noFileToUpload: "No file to upload",
|
|
1652
|
+
maxFileCount: "A maximum of {{limit}} files can be uploaded"
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1656
|
+
|
|
1657
|
+
// src/i18n/ja-JP.ts
|
|
1658
|
+
var commonJaJP = {
|
|
1659
|
+
// 共通文案
|
|
1660
|
+
common: {
|
|
1661
|
+
copySuccess: "\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",
|
|
1662
|
+
confirm: "OK",
|
|
1663
|
+
cancel: "\u30AD\u30E3\u30F3\u30BB\u30EB",
|
|
1664
|
+
download: "\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",
|
|
1665
|
+
save: "\u4FDD\u5B58",
|
|
1666
|
+
defaultFileName: "\u30D5\u30A1\u30A4\u30EB",
|
|
1667
|
+
defaultTitle: "\u30D2\u30F3\u30C8",
|
|
1668
|
+
loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D..."
|
|
1669
|
+
},
|
|
1670
|
+
// utils/request.ts
|
|
1671
|
+
request: {
|
|
1672
|
+
networkError: "\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u30CD\u30C3\u30C8\u30EF\u30FC\u30AF\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
1673
|
+
requestError: "\u30EA\u30AF\u30A8\u30B9\u30C8\u30A8\u30E9\u30FC\uFF01"
|
|
1674
|
+
},
|
|
1675
|
+
// utils/pattern.ts — バリデーションメッセージ
|
|
1676
|
+
pattern: {
|
|
1677
|
+
mobileInvalid: "\u643A\u5E2F\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\uFF01",
|
|
1678
|
+
phoneInvalid: "\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\uFF01",
|
|
1679
|
+
taxNoInvalid: "\u7A0E\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
|
|
1680
|
+
bankCardInvalid: "\u9280\u884C\u30AB\u30FC\u30C9\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
|
|
1681
|
+
idCardInvalid: "\u8EAB\u5206\u8A3C\u660E\u66F8\u756A\u53F7\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
|
|
1682
|
+
numberInvalid: "\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\u3002\u518D\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044\uFF01",
|
|
1683
|
+
smsCodeInvalid: "\u8A8D\u8A3C\u30B3\u30FC\u30C9\u306F6\u6841\u306E\u6570\u5B57\u3067\u3059",
|
|
1684
|
+
emailInvalid: "\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u306E\u5F62\u5F0F\u306B\u8AA4\u308A\u304C\u3042\u308A\u307E\u3059\uFF01",
|
|
1685
|
+
addressInvalid: "\u300C\u8857\u300D\u300C\u9053\u8DEF\u300D\u300C\u6751\u300D\u300C\u753A\u300D\u300C\u9053\u300D\u300C\u8DEF\u5730\u300D\u300C\u756A\u53F7\u300D\u306A\u3069\u306E\u30AD\u30FC\u30EF\u30FC\u30C9\u3092\u542B\u3081\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059",
|
|
1686
|
+
passwordInvalid: "\u30D1\u30B9\u30EF\u30FC\u30C9\u306F8\u301C26\u6587\u5B57\u306E\u82F1\u6570\u5B57\u306E\u7D44\u307F\u5408\u308F\u305B\u3067\u3059",
|
|
1687
|
+
phoneOrMobileInvalid: "\u9023\u7D61\u5148\u96FB\u8A71\u756A\u53F7\u306E\u5F62\u5F0F\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093",
|
|
1688
|
+
// 補間例:{{value}} は実際の値に置換されます
|
|
1689
|
+
lessThan: "{{value}}\u672A\u6E80\u306B\u3067\u304D\u307E\u305B\u3093",
|
|
1690
|
+
lessThanOrEqual: "{{value}}\u4EE5\u4E0B\u306B\u3067\u304D\u307E\u305B\u3093",
|
|
1691
|
+
greaterThan: "{{value}}\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
|
|
1692
|
+
greaterThanOrEqual: "{{value}}\u4EE5\u4E0A\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059",
|
|
1693
|
+
totalLengthExceed: "\u7DCF\u6841\u6570\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
|
|
1694
|
+
integerLengthExceed: "\u6574\u6570\u90E8\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
|
|
1695
|
+
decimalLengthExceed: "\u5C0F\u6570\u90E8\u306F{{length}}\u6841\u3092\u8D85\u3048\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093",
|
|
1696
|
+
maxEmailsExceed: "\u6700\u5927{{max}}\u4EF6\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u307E\u3067\u5165\u529B\u3067\u304D\u307E\u3059"
|
|
1697
|
+
},
|
|
1698
|
+
// utils/date.ts
|
|
1699
|
+
date: {
|
|
1700
|
+
yearMonthFormat: "YYYY\u5E74MM\u6708",
|
|
1701
|
+
yearMonthDayFormat: "YYYY\u5E74MM\u6708DD\u65E5"
|
|
1702
|
+
},
|
|
1703
|
+
// SpeechButton 音声ボタン
|
|
1704
|
+
speechButton: {
|
|
1705
|
+
notSupported: "\u73FE\u5728\u306E\u30D6\u30E9\u30A6\u30B6\u306F\u97F3\u58F0\u8A8D\u8B58\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093",
|
|
1706
|
+
permissionDenied: "\u30DE\u30A4\u30AF\u306E\u6A29\u9650\u304C\u62D2\u5426\u3055\u308C\u307E\u3057\u305F",
|
|
1707
|
+
stop: "\u9332\u97F3\u3092\u505C\u6B62",
|
|
1708
|
+
start: "\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9332\u97F3\u3092\u958B\u59CB"
|
|
1709
|
+
},
|
|
1710
|
+
// MicroApp / Iframe
|
|
1711
|
+
microApp: {
|
|
1712
|
+
loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D..."
|
|
1713
|
+
},
|
|
1714
|
+
iframe: {
|
|
1715
|
+
loading: "\u8AAD\u307F\u8FBC\u307F\u4E2D..."
|
|
1716
|
+
},
|
|
1717
|
+
// LazyComponent 遅延読み込みコンポーネント
|
|
1718
|
+
lazyComponent: {
|
|
1719
|
+
unknownType: "\u4E0D\u660E\u306A\u30BF\u30A4\u30D7\uFF1A{{type}}",
|
|
1720
|
+
componentLoading: "\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D..."
|
|
1721
|
+
},
|
|
1722
|
+
// File ファイルプレビューコンポーネント群
|
|
1723
|
+
filePreview: {
|
|
1724
|
+
title: "\u30D5\u30A1\u30A4\u30EB\u30D7\u30EC\u30D3\u30E5\u30FC",
|
|
1725
|
+
closePreview: "\u30D7\u30EC\u30D3\u30E5\u30FC\u3092\u9589\u3058\u308B",
|
|
1726
|
+
previewImageAlt: "\u30D7\u30EC\u30D3\u30E5\u30FC\u753B\u50CF",
|
|
1727
|
+
previewNotSupported: "{{suffix}}\u30D5\u30A1\u30A4\u30EB\u306E\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u306F\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093",
|
|
1728
|
+
previewNotSupportedDownload: "{{suffix}}\u30D5\u30A1\u30A4\u30EB\u306F\u30AA\u30F3\u30E9\u30A4\u30F3\u30D7\u30EC\u30D3\u30E5\u30FC\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3057\u3066\u958B\u3044\u3066\u304F\u3060\u3055\u3044",
|
|
1729
|
+
previewGenerating: "\u30D7\u30EC\u30D3\u30E5\u30FC\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u4E2D...",
|
|
1730
|
+
audioNotSupported: "\u304A\u4F7F\u3044\u306E\u30D6\u30E9\u30A6\u30B6\u306F audio \u30BF\u30B0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
|
|
1731
|
+
videoNotSupported: "\u304A\u4F7F\u3044\u306E\u30D6\u30E9\u30A6\u30B6\u306F video \u30BF\u30B0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u307E\u305B\u3093\u3002",
|
|
1732
|
+
requestFailedWithStatus: "\u30EA\u30AF\u30A8\u30B9\u30C8\u5931\u6557\u3001\u30B9\u30C6\u30FC\u30BF\u30B9\u30B3\u30FC\u30C9: {{status}}",
|
|
1733
|
+
emptyResponse: "\u8FD4\u4FE1\u5185\u5BB9\u304C\u7A7A\u3067\u3059",
|
|
1734
|
+
loadFileFailed: "\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
1735
|
+
fileParseFailed: "\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
1736
|
+
fileUrlInvalid: "\u30D5\u30A1\u30A4\u30EBURL\u304C\u4E0D\u6B63\u3067\u3059",
|
|
1737
|
+
htmlParseFailed: "HTML\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
1738
|
+
docLoadFailed: "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
1739
|
+
pdfLoadFailed: "PDF\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
1740
|
+
pdfParseFailed: "PDF\u306E\u8AAD\u307F\u8FBC\u307F\u307E\u305F\u306F\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
1741
|
+
pdfUrlInvalid: "PDF\u306EURL\u304C\u4E0D\u6B63\u3067\u3059",
|
|
1742
|
+
pdfPasswordInvalid: "\u30D1\u30B9\u30EF\u30FC\u30C9\u304C\u7121\u52B9\u3067\u3059\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\uFF01",
|
|
1743
|
+
pdfPasswordPlaceholder: "\u30D1\u30B9\u30EF\u30FC\u30C9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
1744
|
+
pdfSubmit: "\u9001 \u4FE1",
|
|
1745
|
+
pdfInvalidOrDamaged: "\u30D5\u30A1\u30A4\u30EB\u304C\u7121\u52B9\u307E\u305F\u306F\u7834\u640D\u3057\u3066\u3044\u307E\u3059",
|
|
1746
|
+
pdfFileNotFound: "\u30D5\u30A1\u30A4\u30EB\u304C\u5B58\u5728\u3057\u307E\u305B\u3093",
|
|
1747
|
+
pdfUnexpectedResponse: "\u4E88\u671F\u3057\u306A\u3044\u30B5\u30FC\u30D0\u30FC\u30EC\u30B9\u30DD\u30F3\u30B9",
|
|
1748
|
+
pdfLoadDocumentFailed: "\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093",
|
|
1749
|
+
zoomOut: "\u7E2E\u5C0F",
|
|
1750
|
+
zoomIn: "\u62E1\u5927",
|
|
1751
|
+
zoomReset: "\u5143\u306B\u623B\u3059",
|
|
1752
|
+
fitWidth: "\u5E45\u306B\u5408\u308F\u305B\u308B"
|
|
1753
|
+
},
|
|
1754
|
+
// MarkdownEditor リッチテキストエディタ
|
|
1755
|
+
markdownEditor: {
|
|
1756
|
+
mainArea: "\u30E1\u30A4\u30F3\u30B3\u30F3\u30C6\u30F3\u30C4\u30A8\u30EA\u30A2\u3001\u30C6\u30AD\u30B9\u30C8\u3092\u5165\u529B...",
|
|
1757
|
+
unknown: "\u4E0D\u660E",
|
|
1758
|
+
// ツールバー
|
|
1759
|
+
toolbar: {
|
|
1760
|
+
quote: "\u9078\u629E\u30C6\u30AD\u30B9\u30C8\u3092\u5F15\u7528",
|
|
1761
|
+
annotation: "\u6CE8\u91C8",
|
|
1762
|
+
excerpt: "\u629C\u7C8B\u30E1\u30E2",
|
|
1763
|
+
undo: "\u5143\u306B\u623B\u3059",
|
|
1764
|
+
redo: "\u3084\u308A\u76F4\u3059",
|
|
1765
|
+
alignLeft: "\u5DE6\u63C3\u3048",
|
|
1766
|
+
alignCenter: "\u4E2D\u592E\u63C3\u3048",
|
|
1767
|
+
alignRight: "\u53F3\u63C3\u3048",
|
|
1768
|
+
alignJustify: "\u4E21\u7AEF\u63C3\u3048",
|
|
1769
|
+
bold: "\u592A\u5B57",
|
|
1770
|
+
italic: "\u659C\u4F53",
|
|
1771
|
+
underline: "\u4E0B\u7DDA",
|
|
1772
|
+
strike: "\u53D6\u308A\u6D88\u3057\u7DDA",
|
|
1773
|
+
code: "\u30B3\u30FC\u30C9",
|
|
1774
|
+
superscript: "\u4E0A\u4ED8\u304D\u6587\u5B57",
|
|
1775
|
+
subscript: "\u4E0B\u4ED8\u304D\u6587\u5B57",
|
|
1776
|
+
bulletList: "\u7B87\u6761\u66F8\u304D",
|
|
1777
|
+
orderedList: "\u756A\u53F7\u4ED8\u304D\u30EA\u30B9\u30C8",
|
|
1778
|
+
taskList: "\u30BF\u30B9\u30AF\u30EA\u30B9\u30C8",
|
|
1779
|
+
listOptions: "\u30EA\u30B9\u30C8\u30AA\u30D7\u30B7\u30E7\u30F3",
|
|
1780
|
+
list: "\u30EA\u30B9\u30C8",
|
|
1781
|
+
blockquote: "\u5F15\u7528\u30D6\u30ED\u30C3\u30AF",
|
|
1782
|
+
codeBlock: "\u30B3\u30FC\u30C9\u30D6\u30ED\u30C3\u30AF",
|
|
1783
|
+
heading: "\u898B\u51FA\u3057",
|
|
1784
|
+
headingLevel: "\u898B\u51FA\u3057 {{level}}",
|
|
1785
|
+
addImage: "\u753B\u50CF\u3092\u8FFD\u52A0",
|
|
1786
|
+
link: "\u30EA\u30F3\u30AF",
|
|
1787
|
+
linkPlaceholder: "\u30EA\u30F3\u30AF\u3092\u8CBC\u308A\u4ED8\u3051...",
|
|
1788
|
+
applyLink: "\u30EA\u30F3\u30AF\u3092\u9069\u7528",
|
|
1789
|
+
openInNewWindow: "\u65B0\u3057\u3044\u30A6\u30A3\u30F3\u30C9\u30A6\u3067\u958B\u304F",
|
|
1790
|
+
removeLink: "\u30EA\u30F3\u30AF\u3092\u524A\u9664"
|
|
1791
|
+
},
|
|
1792
|
+
// ハイライト / 背景色
|
|
1793
|
+
highlight: {
|
|
1794
|
+
toggle: "\u30CF\u30A4\u30E9\u30A4\u30C8\u8868\u793A\u3092\u5207\u308A\u66FF\u3048 ({{color}})",
|
|
1795
|
+
label: "\u80CC\u666F\u8272",
|
|
1796
|
+
textLabel: "\u30C6\u30AD\u30B9\u30C8\u80CC\u666F\u8272",
|
|
1797
|
+
removeBackground: "\u80CC\u666F\u3092\u524A\u9664",
|
|
1798
|
+
removeHighlight: "\u30CF\u30A4\u30E9\u30A4\u30C8\u3092\u524A\u9664",
|
|
1799
|
+
default: "\u30C7\u30D5\u30A9\u30EB\u30C8\u80CC\u666F",
|
|
1800
|
+
gray: "\u30B0\u30EC\u30FC\u80CC\u666F",
|
|
1801
|
+
brown: "\u30D6\u30E9\u30A6\u30F3\u80CC\u666F",
|
|
1802
|
+
orange: "\u30AA\u30EC\u30F3\u30B8\u80CC\u666F",
|
|
1803
|
+
yellow: "\u30A4\u30A8\u30ED\u30FC\u80CC\u666F",
|
|
1804
|
+
green: "\u30B0\u30EA\u30FC\u30F3\u80CC\u666F",
|
|
1805
|
+
blue: "\u30D6\u30EB\u30FC\u80CC\u666F",
|
|
1806
|
+
purple: "\u30D1\u30FC\u30D7\u30EB\u80CC\u666F",
|
|
1807
|
+
pink: "\u30D4\u30F3\u30AF\u80CC\u666F",
|
|
1808
|
+
red: "\u30EC\u30C3\u30C9\u80CC\u666F"
|
|
1809
|
+
},
|
|
1810
|
+
// 注釈
|
|
1811
|
+
annotation: {
|
|
1812
|
+
title: "\u6CE8\u91C8",
|
|
1813
|
+
list: "\u6CE8\u91C8\u30EA\u30B9\u30C8",
|
|
1814
|
+
add: "\u6CE8\u91C8\u3092\u8FFD\u52A0",
|
|
1815
|
+
content: "\u6CE8\u91C8\u5185\u5BB9",
|
|
1816
|
+
required: "\u6CE8\u91C8\u5185\u5BB9\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
1817
|
+
maxLength: "\u6CE8\u91C8\u5185\u5BB9\u306F500\u6587\u5B57\u4EE5\u5185\u3067\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",
|
|
1818
|
+
placeholder: "\u6CE8\u91C8\u5185\u5BB9\u3092\u5165\u529B...",
|
|
1819
|
+
edit: "\u6CE8\u91C8\u3092\u7DE8\u96C6",
|
|
1820
|
+
delete: "\u6CE8\u91C8\u3092\u524A\u9664",
|
|
1821
|
+
confirmDelete: "\u3053\u306E\u6CE8\u91C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
|
|
1822
|
+
empty: "\u6CE8\u91C8\u306F\u3042\u308A\u307E\u305B\u3093"
|
|
1823
|
+
},
|
|
1824
|
+
// 抜粋
|
|
1825
|
+
collection: {
|
|
1826
|
+
title: "\u629C\u7C8B",
|
|
1827
|
+
list: "\u629C\u7C8B\u30EA\u30B9\u30C8",
|
|
1828
|
+
delete: "\u629C\u7C8B\u3092\u524A\u9664",
|
|
1829
|
+
confirmDelete: "\u3053\u306E\u629C\u7C8B\u3092\u524A\u9664\u3057\u307E\u3059\u304B\uFF1F",
|
|
1830
|
+
empty: "\u629C\u7C8B\u306F\u3042\u308A\u307E\u305B\u3093"
|
|
1831
|
+
},
|
|
1832
|
+
// ファイル / 画像アップロード
|
|
1833
|
+
upload: {
|
|
1834
|
+
noFile: "\u30D5\u30A1\u30A4\u30EB\u304C\u63D0\u4F9B\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
|
|
1835
|
+
canceled: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306F\u30AD\u30E3\u30F3\u30BB\u30EB\u3055\u308C\u307E\u3057\u305F",
|
|
1836
|
+
fileSizeExceeded: "\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u304C\u6700\u5927\u5236\u9650\u3092\u8D85\u3048\u3066\u3044\u307E\u3059 ({{max}}MB)",
|
|
1837
|
+
undefined: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u6A5F\u80FD\u304C\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u305B\u3093",
|
|
1838
|
+
failedNoUrl: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u5931\u6557\uFF1AURL\u304C\u8FD4\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F",
|
|
1839
|
+
failed: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
|
|
1840
|
+
noFileToUpload: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
1841
|
+
maxFileCount: "\u6700\u5927{{limit}}\u4EF6\u307E\u3067\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3067\u304D\u307E\u3059"
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
};
|
|
1845
|
+
|
|
1846
|
+
// src/i18n/index.ts
|
|
1847
|
+
var DEFAULT_LNG = "zh-CN";
|
|
1848
|
+
var LANG_KEY = "ns-lang";
|
|
1849
|
+
var langManager = createTokenManager({ key: LANG_KEY });
|
|
1850
|
+
function getLang() {
|
|
1851
|
+
return langManager.get() || DEFAULT_LNG;
|
|
1852
|
+
}
|
|
1853
|
+
var i18n = i18next.createInstance({
|
|
1854
|
+
lng: DEFAULT_LNG,
|
|
1855
|
+
fallbackLng: DEFAULT_LNG,
|
|
1856
|
+
defaultNS: NS_COMMON,
|
|
1857
|
+
interpolation: { escapeValue: false },
|
|
1858
|
+
resources: { [DEFAULT_LNG]: { [NS_COMMON]: commonZhCN } }
|
|
1859
|
+
}).use(reactI18next.initReactI18next);
|
|
1860
|
+
void i18n.init();
|
|
1861
|
+
function addBundledResource(lng, ns, res) {
|
|
1862
|
+
if (lng === DEFAULT_LNG && ns === NS_COMMON) return;
|
|
1863
|
+
i18n.addResourceBundle(lng, ns, res, true, true);
|
|
1864
|
+
}
|
|
1865
|
+
function initI18n(options = {}) {
|
|
1866
|
+
const { lng = getLang(), resources } = options;
|
|
1867
|
+
for (const [l, namespaces] of Object.entries(resources ?? {})) {
|
|
1868
|
+
for (const [ns, messages] of Object.entries(namespaces)) {
|
|
1869
|
+
i18n.addResourceBundle(l, ns, messages, true, true);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
switchLang(lng);
|
|
1873
|
+
return i18n;
|
|
1874
|
+
}
|
|
1875
|
+
function switchLang(lng, reload = false) {
|
|
1876
|
+
langManager.set(lng);
|
|
1877
|
+
if (reload) {
|
|
1878
|
+
window?.top?.location.reload();
|
|
1879
|
+
} else {
|
|
1880
|
+
i18n.changeLanguage(lng);
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
function useTranslation(namespace) {
|
|
1884
|
+
return reactI18next.useTranslation(namespace, { useSuspense: false });
|
|
1885
|
+
}
|
|
1886
|
+
function getI18n() {
|
|
1887
|
+
return i18n;
|
|
1888
|
+
}
|
|
1889
|
+
function t(key, options) {
|
|
1890
|
+
return i18n.t(key, options);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
// src/components/File/styles.module.less
|
|
1894
|
+
var styles_module_default = {
|
|
1895
|
+
nsPreviewImage: "styles_module_nsPreviewImage",
|
|
1896
|
+
nsPreviewPdf: "styles_module_nsPreviewPdf",
|
|
1897
|
+
pdfToolbar: "styles_module_pdfToolbar",
|
|
1898
|
+
nsPreviewPdfImage: "styles_module_nsPreviewPdfImage",
|
|
1899
|
+
pdfImageNav: "styles_module_pdfImageNav",
|
|
1900
|
+
pdfImageNavItem: "styles_module_pdfImageNavItem",
|
|
1901
|
+
pdfImageNavItemImgWrapper: "styles_module_pdfImageNavItemImgWrapper",
|
|
1902
|
+
pdfImageNavItemActive: "styles_module_pdfImageNavItemActive",
|
|
1903
|
+
pdfImageNavItemImg: "styles_module_pdfImageNavItemImg",
|
|
1904
|
+
pdfImageNavItemTip: "styles_module_pdfImageNavItemTip",
|
|
1905
|
+
pdfImageBody: "styles_module_pdfImageBody",
|
|
1906
|
+
pdfImageBodyToolbar: "styles_module_pdfImageBodyToolbar",
|
|
1907
|
+
pdfImageBodyItem: "styles_module_pdfImageBodyItem",
|
|
1908
|
+
pdfImageBodyItemInnerWrapper: "styles_module_pdfImageBodyItemInnerWrapper",
|
|
1909
|
+
pdfImageBodyItemInner: "styles_module_pdfImageBodyItemInner",
|
|
1910
|
+
pdfImageBodyItemActive: "styles_module_pdfImageBodyItemActive",
|
|
1911
|
+
pdfImageBodyItemImg: "styles_module_pdfImageBodyItemImg",
|
|
1912
|
+
nsPreviewVideo: "styles_module_nsPreviewVideo",
|
|
1913
|
+
nsPreviewAudio: "styles_module_nsPreviewAudio",
|
|
1914
|
+
nsPreviewDocx: "styles_module_nsPreviewDocx",
|
|
1915
|
+
docxToolbar: "styles_module_docxToolbar",
|
|
1916
|
+
docxContent: "styles_module_docxContent",
|
|
1917
|
+
stateBody: "styles_module_stateBody",
|
|
1918
|
+
pdfContainer: "styles_module_pdfContainer",
|
|
1919
|
+
floatingToolbar: "styles_module_floatingToolbar",
|
|
1920
|
+
divider: "styles_module_divider",
|
|
1921
|
+
pdfBody: "styles_module_pdfBody",
|
|
1922
|
+
pdfDocument: "styles_module_pdfDocument",
|
|
1923
|
+
pdfPage: "styles_module_pdfPage"
|
|
1924
|
+
};
|
|
1925
|
+
var AudioPlayer_default = ({ fileUrl }) => {
|
|
1926
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
1927
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("audio", { controls: true, className: styles_module_default.nsPreviewAudio, children: [
|
|
1928
|
+
/* @__PURE__ */ jsxRuntime.jsx("source", { src: fileUrl, type: "audio/mpeg" }),
|
|
1929
|
+
t2("filePreview.audioNotSupported")
|
|
1930
|
+
] }, fileUrl);
|
|
1931
|
+
};
|
|
1303
1932
|
var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
|
|
1933
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
1304
1934
|
const containerRef = React3.useRef(null);
|
|
1305
1935
|
const [zoomRatio, setZoomRatio] = React3.useState(scale);
|
|
1306
1936
|
React3.useEffect(() => {
|
|
@@ -1323,7 +1953,7 @@ var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
|
|
|
1323
1953
|
});
|
|
1324
1954
|
}).catch((err) => {
|
|
1325
1955
|
console.error("docx-preview \u6E32\u67D3\u5931\u8D25:", err);
|
|
1326
|
-
if (containerRef.current) containerRef.current.innerHTML =
|
|
1956
|
+
if (containerRef.current) containerRef.current.innerHTML = `<p class="text-center">${t2("filePreview.docLoadFailed")}</p>`;
|
|
1327
1957
|
});
|
|
1328
1958
|
}, [fileUrl]);
|
|
1329
1959
|
const zoomIn = () => setZoomRatio((z) => Math.min(z + 0.1, 3));
|
|
@@ -1333,9 +1963,9 @@ var DocxPreview_default = ({ fileUrl, scale = 1 }) => {
|
|
|
1333
1963
|
};
|
|
1334
1964
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames2__default.default(styles_module_default.nsPreviewDocx, "height-full", "width-full"), children: [
|
|
1335
1965
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 6, align: "center", className: styles_module_default.docxToolbar, children: [
|
|
1336
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.MinusCircleOutlined, {}), title: "
|
|
1337
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusCircleOutlined, {}), title: "
|
|
1338
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: resetZoom, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.RedoOutlined, {}), title: "
|
|
1966
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.MinusCircleOutlined, {}), title: t2("filePreview.zoomOut") }),
|
|
1967
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusCircleOutlined, {}), title: t2("filePreview.zoomIn") }),
|
|
1968
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: resetZoom, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.RedoOutlined, {}), title: t2("filePreview.zoomReset") })
|
|
1339
1969
|
] }),
|
|
1340
1970
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames2__default.default(styles_module_default.docxContent, "height-full", "scroll-fade-in"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1341
1971
|
"div",
|
|
@@ -1413,9 +2043,10 @@ var FileIcon_default = ({ suffix, fontSize = 22 }) => {
|
|
|
1413
2043
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { style: styles, children: Icon });
|
|
1414
2044
|
};
|
|
1415
2045
|
var VideoPlayer_default = ({ fileUrl }) => {
|
|
2046
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
1416
2047
|
return /* @__PURE__ */ jsxRuntime.jsxs("video", { controls: true, className: styles_module_default.nsPreviewVideo, children: [
|
|
1417
2048
|
/* @__PURE__ */ jsxRuntime.jsx("source", { src: fileUrl, type: "video/mp4" }),
|
|
1418
|
-
"
|
|
2049
|
+
t2("filePreview.videoNotSupported")
|
|
1419
2050
|
] }, fileUrl);
|
|
1420
2051
|
};
|
|
1421
2052
|
|
|
@@ -1428,6 +2059,7 @@ var baseComponentMap = {
|
|
|
1428
2059
|
};
|
|
1429
2060
|
var lazyCache = /* @__PURE__ */ new Map();
|
|
1430
2061
|
var LazyComponent_default = ({ type, customComponents, unknownContent, ...rest }) => {
|
|
2062
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
1431
2063
|
const loader2 = customComponents?.[type] || baseComponentMap[type];
|
|
1432
2064
|
const LazyComponent = React3.useMemo(() => {
|
|
1433
2065
|
if (!loader2) return null;
|
|
@@ -1437,11 +2069,11 @@ var LazyComponent_default = ({ type, customComponents, unknownContent, ...rest }
|
|
|
1437
2069
|
lazyCache.set(type, component);
|
|
1438
2070
|
return component;
|
|
1439
2071
|
}, [loader2]);
|
|
1440
|
-
if (!LazyComponent) return unknownContent || /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { title:
|
|
2072
|
+
if (!LazyComponent) return unknownContent || /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { title: t2("lazyComponent.unknownType", { type }), type: "warning" });
|
|
1441
2073
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1442
2074
|
React3.Suspense,
|
|
1443
2075
|
{
|
|
1444
|
-
fallback: /* @__PURE__ */ jsxRuntime.jsx(antd.Skeleton.Node, { active: true, className: styles_module_default2.skeleton, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", children: "
|
|
2076
|
+
fallback: /* @__PURE__ */ jsxRuntime.jsx(antd.Skeleton.Node, { active: true, className: styles_module_default2.skeleton, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Typography.Text, { type: "secondary", children: t2("lazyComponent.componentLoading") }) }),
|
|
1445
2077
|
children: /* @__PURE__ */ jsxRuntime.jsx(LazyComponent, { ...rest })
|
|
1446
2078
|
}
|
|
1447
2079
|
);
|
|
@@ -1553,12 +2185,13 @@ var RenderMarkdown_default = ({ content = "", searchValue, customComponents, ...
|
|
|
1553
2185
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "ns-markdown", children: reactContent });
|
|
1554
2186
|
};
|
|
1555
2187
|
var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
|
|
2188
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
1556
2189
|
const [content, setContent] = React3.useState("");
|
|
1557
2190
|
const [error, setError] = React3.useState("");
|
|
1558
2191
|
const fetchMarkdown = async () => {
|
|
1559
2192
|
const res = await fetch(fileUrl);
|
|
1560
2193
|
if (res.status !== 200) {
|
|
1561
|
-
throw new Error(
|
|
2194
|
+
throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
|
|
1562
2195
|
}
|
|
1563
2196
|
const buffer = await res.arrayBuffer();
|
|
1564
2197
|
let markdownText = "";
|
|
@@ -1570,7 +2203,7 @@ var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
|
|
|
1570
2203
|
markdownText = gbkDecoder.decode(buffer);
|
|
1571
2204
|
}
|
|
1572
2205
|
if (!markdownText) {
|
|
1573
|
-
throw new Error("
|
|
2206
|
+
throw new Error(t2("filePreview.emptyResponse"));
|
|
1574
2207
|
}
|
|
1575
2208
|
return markdownText;
|
|
1576
2209
|
};
|
|
@@ -1582,10 +2215,10 @@ var MarkdownPreview_default = ({ fileUrl, searchValue, asPlainText }) => {
|
|
|
1582
2215
|
const content2 = await fetchMarkdown();
|
|
1583
2216
|
setContent(content2);
|
|
1584
2217
|
} catch {
|
|
1585
|
-
setError("
|
|
2218
|
+
setError(t2("filePreview.fileParseFailed"));
|
|
1586
2219
|
}
|
|
1587
2220
|
} else {
|
|
1588
|
-
setError("
|
|
2221
|
+
setError(t2("filePreview.fileUrlInvalid"));
|
|
1589
2222
|
}
|
|
1590
2223
|
};
|
|
1591
2224
|
React3.useEffect(() => {
|
|
@@ -2255,17 +2888,18 @@ var THUMB_IMG_HEIGHT = 514;
|
|
|
2255
2888
|
var MAIN_IMG_HEIGHT = 800;
|
|
2256
2889
|
var MAIN_IMG_WIDTH = 600;
|
|
2257
2890
|
var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = true, onSetPageNo }) => {
|
|
2891
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
2258
2892
|
const [images, setImages] = React3.useState([]);
|
|
2259
2893
|
const [currentIndex, setCurrentIndex, getCurrentIndex] = useRefState_default(0);
|
|
2260
2894
|
const [error, setError] = React3.useState("");
|
|
2261
2895
|
const fetchPdfImages = async () => {
|
|
2262
2896
|
const res = await fetch(fileUrl);
|
|
2263
2897
|
if (res.status !== 200) {
|
|
2264
|
-
throw new Error(
|
|
2898
|
+
throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
|
|
2265
2899
|
}
|
|
2266
2900
|
const { data } = await res.json();
|
|
2267
2901
|
if (!data?.items?.length) {
|
|
2268
|
-
throw new Error("
|
|
2902
|
+
throw new Error(t2("filePreview.emptyResponse"));
|
|
2269
2903
|
}
|
|
2270
2904
|
setImages(data.items);
|
|
2271
2905
|
};
|
|
@@ -2277,10 +2911,10 @@ var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = t
|
|
|
2277
2911
|
try {
|
|
2278
2912
|
await fetchPdfImages();
|
|
2279
2913
|
} catch (error2) {
|
|
2280
|
-
setError("
|
|
2914
|
+
setError(t2("filePreview.pdfParseFailed"));
|
|
2281
2915
|
}
|
|
2282
2916
|
} else {
|
|
2283
|
-
setError("
|
|
2917
|
+
setError(t2("filePreview.pdfUrlInvalid"));
|
|
2284
2918
|
}
|
|
2285
2919
|
};
|
|
2286
2920
|
React3.useEffect(() => {
|
|
@@ -2420,9 +3054,9 @@ var PdfImagePreview_default = ({ fileUrl, pageNo, scale = 1, isHasThumbnails = t
|
|
|
2420
3054
|
) }) }),
|
|
2421
3055
|
/* @__PURE__ */ jsxRuntime.jsx(antd.Splitter.Panel, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: classNames2__default.default("height-full", styles_module_default.pdfImageBody), children: [
|
|
2422
3056
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 6, align: "center", className: styles_module_default.pdfImageBodyToolbar, children: [
|
|
2423
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.MinusCircleOutlined, {}), title: "
|
|
2424
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusCircleOutlined, {}), title: "
|
|
2425
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomFitWidth, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ColumnWidthOutlined, {}), title: "
|
|
3057
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomOut, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.MinusCircleOutlined, {}), title: t2("filePreview.zoomOut") }),
|
|
3058
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomIn, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusCircleOutlined, {}), title: t2("filePreview.zoomIn") }),
|
|
3059
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { onClick: zoomFitWidth, icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ColumnWidthOutlined, {}), title: t2("filePreview.fitWidth") })
|
|
2426
3060
|
] }),
|
|
2427
3061
|
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, className: "height-full scroll-fade-in", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2428
3062
|
"div",
|
|
@@ -2470,6 +3104,7 @@ var ProtectedView = ({
|
|
|
2470
3104
|
verifyPassword,
|
|
2471
3105
|
onVerifyPasswordEnd
|
|
2472
3106
|
}) => {
|
|
3107
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
2473
3108
|
const [form] = antd.Form.useForm();
|
|
2474
3109
|
const onSubmit = () => {
|
|
2475
3110
|
form.validateFields().then((values) => {
|
|
@@ -2480,10 +3115,10 @@ var ProtectedView = ({
|
|
|
2480
3115
|
});
|
|
2481
3116
|
};
|
|
2482
3117
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: 300 }, children: [
|
|
2483
|
-
passwordStatus === core$1.PasswordStatus.WrongPassword && /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { title: "
|
|
3118
|
+
passwordStatus === core$1.PasswordStatus.WrongPassword && /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { title: t2("filePreview.pdfPasswordInvalid"), type: "error" }),
|
|
2484
3119
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Form, { form, size: "large", className: "m-t-24", children: [
|
|
2485
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "password", rules: [{ required: true, message: "
|
|
2486
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "center", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "primary", onClick: onSubmit, children: "
|
|
3120
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Form.Item, { name: "password", rules: [{ required: true, message: t2("filePreview.pdfPasswordPlaceholder") }], children: /* @__PURE__ */ jsxRuntime.jsx(antd.Input.Password, { autoComplete: "new-password", placeholder: t2("filePreview.pdfPasswordPlaceholder") }) }),
|
|
3121
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "center", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "primary", onClick: onSubmit, children: t2("filePreview.pdfSubmit") }) })
|
|
2487
3122
|
] })
|
|
2488
3123
|
] }) });
|
|
2489
3124
|
};
|
|
@@ -2502,6 +3137,7 @@ var openLinksNewTabPlugin = () => {
|
|
|
2502
3137
|
};
|
|
2503
3138
|
};
|
|
2504
3139
|
var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumbnails = true, onSetPassword, onSetPageNo }) => {
|
|
3140
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
2505
3141
|
const embedRef = React3.useRef(null);
|
|
2506
3142
|
const [sizes, setSizes] = React3.useState([0]);
|
|
2507
3143
|
const [docLoaded, setDocLoaded, getDocLoaded] = useRefState_default(false);
|
|
@@ -2575,19 +3211,19 @@ var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumb
|
|
|
2575
3211
|
let message3 = "";
|
|
2576
3212
|
switch (error.name) {
|
|
2577
3213
|
case "InvalidPDFException":
|
|
2578
|
-
message3 = "
|
|
3214
|
+
message3 = t2("filePreview.pdfInvalidOrDamaged");
|
|
2579
3215
|
break;
|
|
2580
3216
|
case "MissingPDFException":
|
|
2581
|
-
message3 = "
|
|
3217
|
+
message3 = t2("filePreview.pdfFileNotFound");
|
|
2582
3218
|
break;
|
|
2583
3219
|
case "UnexpectedResponseException":
|
|
2584
|
-
message3 = "
|
|
3220
|
+
message3 = t2("filePreview.pdfUnexpectedResponse");
|
|
2585
3221
|
break;
|
|
2586
3222
|
// case 'CMapReaderFactory not initialized':
|
|
2587
3223
|
// message = '字体映射文件加载失败,请刷新页面重试'
|
|
2588
3224
|
// break
|
|
2589
3225
|
default:
|
|
2590
|
-
message3 = "
|
|
3226
|
+
message3 = t2("filePreview.pdfLoadDocumentFailed");
|
|
2591
3227
|
break;
|
|
2592
3228
|
}
|
|
2593
3229
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: "height-full", justify: "center", align: "center", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Alert, { title: message3, type: "error", showIcon: true }) });
|
|
@@ -2658,6 +3294,7 @@ var PdfPreview_default = ({ password, fileUrl, pageNo = 1, scale = 1, isHasThumb
|
|
|
2658
3294
|
] }) }) });
|
|
2659
3295
|
};
|
|
2660
3296
|
var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue, emptyProps, onSetPassword }) => {
|
|
3297
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
2661
3298
|
const Preview = React3.useMemo(() => {
|
|
2662
3299
|
if (!fileUrl) {
|
|
2663
3300
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { ...emptyProps });
|
|
@@ -2667,7 +3304,7 @@ var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue,
|
|
|
2667
3304
|
case "JPG":
|
|
2668
3305
|
case "JPEG":
|
|
2669
3306
|
case "GIF":
|
|
2670
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Image, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: "
|
|
3307
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Image, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: t2("filePreview.previewImageAlt") });
|
|
2671
3308
|
case "PDF":
|
|
2672
3309
|
return /* @__PURE__ */ jsxRuntime.jsx(PdfPreview_default, { fileUrl, ...pdfParams, password, onSetPassword });
|
|
2673
3310
|
case "PDF_IMG":
|
|
@@ -2687,11 +3324,25 @@ var FilePreview_default = ({ suffix, fileUrl, pdfParams, password, searchValue,
|
|
|
2687
3324
|
case "DOCX":
|
|
2688
3325
|
return /* @__PURE__ */ jsxRuntime.jsx(DocxPreview_default, { fileUrl });
|
|
2689
3326
|
default:
|
|
2690
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Result, { subTitle:
|
|
3327
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Result, { subTitle: t2("filePreview.previewNotSupported", { suffix: suffix || "" }) });
|
|
2691
3328
|
}
|
|
2692
3329
|
}, [suffix, fileUrl, pdfParams]);
|
|
2693
3330
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "center", align: "center", className: "height-full", children: Preview });
|
|
2694
3331
|
};
|
|
3332
|
+
var FilePreviewDrawer_default = ({ open, title, onClose, ...props }) => {
|
|
3333
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
3334
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3335
|
+
antd.Drawer,
|
|
3336
|
+
{
|
|
3337
|
+
title: title || t2("filePreview.title"),
|
|
3338
|
+
push: false,
|
|
3339
|
+
size: "100%",
|
|
3340
|
+
open,
|
|
3341
|
+
onClose,
|
|
3342
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(FilePreview_default, { ...props })
|
|
3343
|
+
}
|
|
3344
|
+
);
|
|
3345
|
+
};
|
|
2695
3346
|
Editor.loader.config({ monaco: monaco__namespace });
|
|
2696
3347
|
var getLanguage = (suffix) => {
|
|
2697
3348
|
switch (suffix.toLowerCase()) {
|
|
@@ -2731,6 +3382,7 @@ var getLanguage = (suffix) => {
|
|
|
2731
3382
|
}
|
|
2732
3383
|
};
|
|
2733
3384
|
var CodePreview = ({ fileUrl, suffix }) => {
|
|
3385
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
2734
3386
|
const [content, setContent] = React3.useState("");
|
|
2735
3387
|
const [error, setError] = React3.useState("");
|
|
2736
3388
|
const [loading, setLoading] = React3.useState(false);
|
|
@@ -2740,7 +3392,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
|
|
|
2740
3392
|
};
|
|
2741
3393
|
const res = await fetch(fileUrl, { headers, signal });
|
|
2742
3394
|
if (res.status !== 200) {
|
|
2743
|
-
throw new Error(
|
|
3395
|
+
throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
|
|
2744
3396
|
}
|
|
2745
3397
|
const buffer = await res.arrayBuffer();
|
|
2746
3398
|
let text = "";
|
|
@@ -2764,7 +3416,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
|
|
|
2764
3416
|
await fetchContent(controller.signal);
|
|
2765
3417
|
} catch (error2) {
|
|
2766
3418
|
if (!controller.signal.aborted) {
|
|
2767
|
-
setError("
|
|
3419
|
+
setError(t2("filePreview.loadFileFailed"));
|
|
2768
3420
|
}
|
|
2769
3421
|
} finally {
|
|
2770
3422
|
if (!controller.signal.aborted) {
|
|
@@ -2804,7 +3456,7 @@ var CodePreview = ({ fileUrl, suffix }) => {
|
|
|
2804
3456
|
var CodePreview_default = CodePreview;
|
|
2805
3457
|
var { Text } = antd.Typography;
|
|
2806
3458
|
pdfjsLib__namespace.GlobalWorkerOptions.workerSrc = "https://unpkg.com/pdfjs-dist@5.4.296/legacy/build/pdf.worker.min.mjs";
|
|
2807
|
-
var MIN_SCALE = 0.
|
|
3459
|
+
var MIN_SCALE = 0.1;
|
|
2808
3460
|
var MAX_SCALE = 1.5;
|
|
2809
3461
|
var SCALE_STEP = 0.1;
|
|
2810
3462
|
var PdfPage = React3__namespace.default.memo(({ pdf, pageNumber, scale, scrollContainerRef, defaultSize }) => {
|
|
@@ -2914,6 +3566,7 @@ var PdfPage = React3__namespace.default.memo(({ pdf, pageNumber, scale, scrollCo
|
|
|
2914
3566
|
);
|
|
2915
3567
|
});
|
|
2916
3568
|
var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
|
|
3569
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
2917
3570
|
const [loading, setLoading] = React3.useState(false);
|
|
2918
3571
|
const [pdf, setPdf] = React3.useState(null);
|
|
2919
3572
|
const [numPages, setNumPages] = React3.useState(0);
|
|
@@ -2973,9 +3626,9 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
|
|
|
2973
3626
|
if (aborted) return;
|
|
2974
3627
|
const message3 = e?.message;
|
|
2975
3628
|
if (typeof message3 === "string" && message3.includes("cancelled")) ; else if (typeof message3 === "string" && message3.includes("(903)")) {
|
|
2976
|
-
setError("
|
|
3629
|
+
setError(t2("filePreview.previewGenerating"));
|
|
2977
3630
|
} else {
|
|
2978
|
-
setError(message3 || "
|
|
3631
|
+
setError(message3 || t2("filePreview.pdfLoadFailed"));
|
|
2979
3632
|
}
|
|
2980
3633
|
} finally {
|
|
2981
3634
|
if (!aborted) {
|
|
@@ -3080,7 +3733,7 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
|
|
|
3080
3733
|
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "text", icon: /* @__PURE__ */ jsxRuntime.jsx(icons.PlusOutlined, {}), size: "small", onClick: onZoomIn, disabled: scale >= MAX_SCALE })
|
|
3081
3734
|
] });
|
|
3082
3735
|
if (!previewEnabled) {
|
|
3083
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: styles_module_default.stateBody, children: "
|
|
3736
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { className: styles_module_default.stateBody, children: t2("filePreview.closePreview") });
|
|
3084
3737
|
}
|
|
3085
3738
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: styles_module_default.pdfContainer, children: [
|
|
3086
3739
|
toolbar,
|
|
@@ -3089,6 +3742,7 @@ var DocumentPreview = ({ fileUrl, previewEnabled = true }) => {
|
|
|
3089
3742
|
};
|
|
3090
3743
|
var DocumentPreview_default = DocumentPreview;
|
|
3091
3744
|
var HtmlPreview = ({ fileUrl }) => {
|
|
3745
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
3092
3746
|
const [content, setContent] = React3.useState("");
|
|
3093
3747
|
const [error, setError] = React3.useState("");
|
|
3094
3748
|
const [loading, setLoading] = React3.useState(false);
|
|
@@ -3101,7 +3755,7 @@ var HtmlPreview = ({ fileUrl }) => {
|
|
|
3101
3755
|
signal
|
|
3102
3756
|
});
|
|
3103
3757
|
if (res.status !== 200) {
|
|
3104
|
-
throw new Error(
|
|
3758
|
+
throw new Error(t2("filePreview.requestFailedWithStatus", { status: res.status }));
|
|
3105
3759
|
}
|
|
3106
3760
|
const buffer = await res.arrayBuffer();
|
|
3107
3761
|
let htmlText = "";
|
|
@@ -3113,7 +3767,7 @@ var HtmlPreview = ({ fileUrl }) => {
|
|
|
3113
3767
|
htmlText = gbkDecoder.decode(buffer);
|
|
3114
3768
|
}
|
|
3115
3769
|
if (!htmlText) {
|
|
3116
|
-
throw new Error("
|
|
3770
|
+
throw new Error(t2("filePreview.emptyResponse"));
|
|
3117
3771
|
}
|
|
3118
3772
|
setContent(htmlText);
|
|
3119
3773
|
};
|
|
@@ -3128,7 +3782,7 @@ var HtmlPreview = ({ fileUrl }) => {
|
|
|
3128
3782
|
await fetchHtml(controller.signal);
|
|
3129
3783
|
} catch (error2) {
|
|
3130
3784
|
if (!controller.signal.aborted) {
|
|
3131
|
-
setError("
|
|
3785
|
+
setError(t2("filePreview.htmlParseFailed"));
|
|
3132
3786
|
}
|
|
3133
3787
|
} finally {
|
|
3134
3788
|
if (!controller.signal.aborted) {
|
|
@@ -3154,6 +3808,7 @@ var HtmlPreview = ({ fileUrl }) => {
|
|
|
3154
3808
|
};
|
|
3155
3809
|
var HtmlPreview_default = HtmlPreview;
|
|
3156
3810
|
var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
|
|
3811
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
3157
3812
|
const extension = suffix ? suffix : getFileSuffixName(fileName || "");
|
|
3158
3813
|
const Preview = React3.useMemo(() => {
|
|
3159
3814
|
if (!fileUrl) {
|
|
@@ -3169,7 +3824,7 @@ var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
|
|
|
3169
3824
|
case "SVG":
|
|
3170
3825
|
case "ICO":
|
|
3171
3826
|
case "TIFF":
|
|
3172
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Image, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: "
|
|
3827
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Image, { classNames: { root: styles_module_default.nsPreviewImage }, src: fileUrl, alt: t2("filePreview.previewImageAlt") });
|
|
3173
3828
|
case "DOC":
|
|
3174
3829
|
case "DOCX":
|
|
3175
3830
|
case "PDF":
|
|
@@ -3214,30 +3869,18 @@ var luyaFilePreview_default = ({ suffix, fileUrl, emptyProps, fileName }) => {
|
|
|
3214
3869
|
case "TXT":
|
|
3215
3870
|
return /* @__PURE__ */ jsxRuntime.jsx(MarkdownPreview_default, { fileUrl, asPlainText: true });
|
|
3216
3871
|
default:
|
|
3217
|
-
return /* @__PURE__ */ jsxRuntime.jsx(antd.Result, { subTitle:
|
|
3872
|
+
return /* @__PURE__ */ jsxRuntime.jsx(antd.Result, { subTitle: t2("filePreview.previewNotSupportedDownload", { suffix: suffix || "" }) });
|
|
3218
3873
|
}
|
|
3219
3874
|
}, [suffix, fileUrl, fileName]);
|
|
3220
3875
|
return /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { justify: "center", align: "center", className: "height-full p-t-16 p-b-16 p-l-16", children: Preview });
|
|
3221
3876
|
};
|
|
3222
|
-
var FilePreviewDrawer_default = ({ open, title = "\u6587\u4EF6\u9884\u89C8", onClose, ...props }) => {
|
|
3223
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3224
|
-
antd.Drawer,
|
|
3225
|
-
{
|
|
3226
|
-
title,
|
|
3227
|
-
push: false,
|
|
3228
|
-
size: "100%",
|
|
3229
|
-
open,
|
|
3230
|
-
onClose,
|
|
3231
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(FilePreview_default, { ...props })
|
|
3232
|
-
}
|
|
3233
|
-
);
|
|
3234
|
-
};
|
|
3235
3877
|
|
|
3236
3878
|
// src/components/MicroApp/styles.module.less
|
|
3237
3879
|
var styles_module_default3 = {
|
|
3238
3880
|
microApp: "styles_module_microApp"
|
|
3239
3881
|
};
|
|
3240
3882
|
var MicroApp_default = ({ name, url, className, onMounted, onError, data, ...rest }) => {
|
|
3883
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
3241
3884
|
const [loading, setLoading] = React3.useState(false);
|
|
3242
3885
|
React3.useEffect(() => {
|
|
3243
3886
|
setLoading(true);
|
|
@@ -3252,10 +3895,10 @@ var MicroApp_default = ({ name, url, className, onMounted, onError, data, ...res
|
|
|
3252
3895
|
};
|
|
3253
3896
|
const microAppData = React3.useMemo(() => {
|
|
3254
3897
|
const parentMainSource = window?.microApp?.getData?.()?.mainSource || [];
|
|
3255
|
-
return { mainSource: [...parentMainSource, name], ...data };
|
|
3898
|
+
return { [LANG_KEY]: getLang(), mainSource: [...parentMainSource, name], ...data };
|
|
3256
3899
|
}, [data, name]);
|
|
3257
3900
|
const TagName = microApp__default.default.tagName || "micro-app";
|
|
3258
|
-
return /* @__PURE__ */ jsxCustomEvent__default.default(antd.Spin, { spinning: loading, classNames: { root: "full-spin" }, description: "
|
|
3901
|
+
return /* @__PURE__ */ jsxCustomEvent__default.default(antd.Spin, { spinning: loading, classNames: { root: "full-spin" }, description: t2("microApp.loading") }, /* @__PURE__ */ jsxCustomEvent__default.default(
|
|
3259
3902
|
TagName,
|
|
3260
3903
|
{
|
|
3261
3904
|
name,
|
|
@@ -3344,10 +3987,12 @@ var styles_module_default4 = {
|
|
|
3344
3987
|
iframe: "styles_module_iframe"
|
|
3345
3988
|
};
|
|
3346
3989
|
var Iframe_default = React3.forwardRef(({ defaultMainSource, id, src, className, onLoad }, ref) => {
|
|
3990
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
3347
3991
|
const [loading, setLoading] = React3.useState(false);
|
|
3348
3992
|
const finalSrc = React3.useMemo(() => {
|
|
3349
|
-
|
|
3350
|
-
|
|
3993
|
+
const baseUrl = addUrlLastSlash(setUrlMainSource(src, location.href, defaultMainSource));
|
|
3994
|
+
return buildUrlParams({ v: Date.now(), [LANG_KEY]: getLang() }, baseUrl);
|
|
3995
|
+
}, [src, defaultMainSource]);
|
|
3351
3996
|
const onHandleLoad = () => {
|
|
3352
3997
|
setLoading(false);
|
|
3353
3998
|
onLoad?.();
|
|
@@ -3355,7 +4000,7 @@ var Iframe_default = React3.forwardRef(({ defaultMainSource, id, src, className,
|
|
|
3355
4000
|
React3.useEffect(() => {
|
|
3356
4001
|
setLoading(true);
|
|
3357
4002
|
}, [src]);
|
|
3358
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { spinning: loading, classNames: { root: "full-spin" }, description: "
|
|
4003
|
+
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsx(antd.Spin, { spinning: loading, classNames: { root: "full-spin" }, description: t2("iframe.loading"), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3359
4004
|
"iframe",
|
|
3360
4005
|
{
|
|
3361
4006
|
id,
|
|
@@ -4035,24 +4680,37 @@ function useIsBreakpoint(mode = "max", breakpoint = 768) {
|
|
|
4035
4680
|
}
|
|
4036
4681
|
var { TextArea } = antd.Input;
|
|
4037
4682
|
var AnnotationModal_default = ({ visible, onCancel, onConfirm }) => {
|
|
4683
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
4038
4684
|
const [form] = antd.Form.useForm();
|
|
4039
4685
|
const handleOk = async () => {
|
|
4040
4686
|
const values = await form.validateFields();
|
|
4041
4687
|
onConfirm(values.content.trim());
|
|
4042
4688
|
onCancel();
|
|
4043
4689
|
};
|
|
4044
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4045
|
-
antd.
|
|
4690
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4691
|
+
antd.Modal,
|
|
4046
4692
|
{
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4693
|
+
title: t2("markdownEditor.annotation.add"),
|
|
4694
|
+
open: visible,
|
|
4695
|
+
onOk: handleOk,
|
|
4696
|
+
onCancel,
|
|
4697
|
+
destroyOnHidden: true,
|
|
4698
|
+
okText: t2("common.confirm"),
|
|
4699
|
+
cancelText: t2("common.cancel"),
|
|
4700
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(antd.Form, { form, layout: "vertical", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4701
|
+
antd.Form.Item,
|
|
4702
|
+
{
|
|
4703
|
+
name: "content",
|
|
4704
|
+
label: t2("markdownEditor.annotation.content"),
|
|
4705
|
+
rules: [
|
|
4706
|
+
{ whitespace: true, required: true, message: t2("markdownEditor.annotation.required") },
|
|
4707
|
+
{ max: 500, message: t2("markdownEditor.annotation.maxLength") }
|
|
4708
|
+
],
|
|
4709
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(TextArea, { rows: 4, placeholder: t2("markdownEditor.annotation.placeholder"), showCount: true, maxLength: 500 })
|
|
4710
|
+
}
|
|
4711
|
+
) })
|
|
4054
4712
|
}
|
|
4055
|
-
)
|
|
4713
|
+
);
|
|
4056
4714
|
};
|
|
4057
4715
|
|
|
4058
4716
|
// src/components/MarkdownEditor/annotation/constant.ts
|
|
@@ -4077,6 +4735,7 @@ var AnnotationSidebar_default = ({
|
|
|
4077
4735
|
annotationConfig,
|
|
4078
4736
|
onClose
|
|
4079
4737
|
}) => {
|
|
4738
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
4080
4739
|
const [form] = antd.Form.useForm();
|
|
4081
4740
|
const [editingId, setEditingId] = React3.useState();
|
|
4082
4741
|
const itemRefs = React3.useRef({});
|
|
@@ -4113,7 +4772,7 @@ var AnnotationSidebar_default = ({
|
|
|
4113
4772
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
|
|
4114
4773
|
/* @__PURE__ */ jsxRuntime.jsx(icons.MessageOutlined, {}),
|
|
4115
4774
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
4116
|
-
"
|
|
4775
|
+
t2("markdownEditor.annotation.title"),
|
|
4117
4776
|
annotations.length > 0 && `\uFF08${annotations.length}\uFF09`
|
|
4118
4777
|
] })
|
|
4119
4778
|
] }),
|
|
@@ -4148,15 +4807,15 @@ var AnnotationSidebar_default = ({
|
|
|
4148
4807
|
{
|
|
4149
4808
|
name: "content",
|
|
4150
4809
|
rules: [
|
|
4151
|
-
{ whitespace: true, required: true, message: "
|
|
4152
|
-
{ max: 500, message: "
|
|
4810
|
+
{ whitespace: true, required: true, message: t2("markdownEditor.annotation.required") },
|
|
4811
|
+
{ max: 500, message: t2("markdownEditor.annotation.maxLength") }
|
|
4153
4812
|
],
|
|
4154
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(TextArea2, { autoFocus: true, rows: 2, placeholder: "
|
|
4813
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(TextArea2, { autoFocus: true, rows: 2, placeholder: t2("markdownEditor.annotation.placeholder"), showCount: true, maxLength: 500 })
|
|
4155
4814
|
}
|
|
4156
4815
|
) }),
|
|
4157
4816
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
|
|
4158
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "primary", onClick: handleSaveEdit, children: "
|
|
4159
|
-
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: handleCancelEdit, children: "
|
|
4817
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", type: "primary", onClick: handleSaveEdit, children: t2("common.save") }),
|
|
4818
|
+
/* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", onClick: handleCancelEdit, children: t2("common.cancel") })
|
|
4160
4819
|
] })
|
|
4161
4820
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(antd.Flex, { gap: 8, vertical: true, children: [
|
|
4162
4821
|
/* @__PURE__ */ jsxRuntime.jsx(Text2, { children: annotation.content }),
|
|
@@ -4166,7 +4825,7 @@ var AnnotationSidebar_default = ({
|
|
|
4166
4825
|
{
|
|
4167
4826
|
type: "text",
|
|
4168
4827
|
size: "small",
|
|
4169
|
-
title: "
|
|
4828
|
+
title: t2("markdownEditor.annotation.edit"),
|
|
4170
4829
|
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.EditOutlined, {}),
|
|
4171
4830
|
onClick: (e) => {
|
|
4172
4831
|
handleEdit(annotation);
|
|
@@ -4176,12 +4835,12 @@ var AnnotationSidebar_default = ({
|
|
|
4176
4835
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4177
4836
|
antd.Popconfirm,
|
|
4178
4837
|
{
|
|
4179
|
-
title: "
|
|
4180
|
-
okText: "
|
|
4181
|
-
cancelText: "
|
|
4182
|
-
description: "
|
|
4838
|
+
title: t2("common.defaultTitle"),
|
|
4839
|
+
okText: t2("common.confirm"),
|
|
4840
|
+
cancelText: t2("common.cancel"),
|
|
4841
|
+
description: t2("markdownEditor.annotation.confirmDelete"),
|
|
4183
4842
|
onConfirm: () => onDeleteAnnotation(annotation[ANNOTATION_ATTRS[0]]),
|
|
4184
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "text", size: "small", title: "
|
|
4843
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "text", size: "small", title: t2("markdownEditor.annotation.delete"), icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DeleteOutlined, {}) })
|
|
4185
4844
|
}
|
|
4186
4845
|
)
|
|
4187
4846
|
] })
|
|
@@ -4190,7 +4849,7 @@ var AnnotationSidebar_default = ({
|
|
|
4190
4849
|
}
|
|
4191
4850
|
)
|
|
4192
4851
|
}
|
|
4193
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: "
|
|
4852
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: t2("markdownEditor.annotation.empty") }) })
|
|
4194
4853
|
}
|
|
4195
4854
|
);
|
|
4196
4855
|
const container = annotationConfig?.getContainer?.();
|
|
@@ -4475,7 +5134,7 @@ var useAnnotations = (annotationConfig) => {
|
|
|
4475
5134
|
const id = genNonDuplicateID();
|
|
4476
5135
|
editor.current.chain().focus().setMark(ANNOTATION_KEY, {
|
|
4477
5136
|
"annotation-id": id,
|
|
4478
|
-
"user-name": annotationConfig?.user?.name || "
|
|
5137
|
+
"user-name": annotationConfig?.user?.name || t("markdownEditor.unknown"),
|
|
4479
5138
|
"user-id": annotationConfig?.user.id || "0000",
|
|
4480
5139
|
"update-time": getTimestamp(),
|
|
4481
5140
|
content
|
|
@@ -4757,6 +5416,7 @@ var collectionSidebar_default = ({
|
|
|
4757
5416
|
collectionConfig,
|
|
4758
5417
|
onClose
|
|
4759
5418
|
}) => {
|
|
5419
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
4760
5420
|
const itemRefs = React3.useRef({});
|
|
4761
5421
|
React3.useEffect(() => {
|
|
4762
5422
|
if (selectedCollectionId) {
|
|
@@ -4778,7 +5438,7 @@ var collectionSidebar_default = ({
|
|
|
4778
5438
|
/* @__PURE__ */ jsxRuntime.jsxs(antd.Space, { children: [
|
|
4779
5439
|
/* @__PURE__ */ jsxRuntime.jsx(icons.BookOutlined, {}),
|
|
4780
5440
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
4781
|
-
"
|
|
5441
|
+
t2("markdownEditor.collection.title"),
|
|
4782
5442
|
collections.length > 0 && `\uFF08${collections.length}\uFF09`
|
|
4783
5443
|
] })
|
|
4784
5444
|
] }),
|
|
@@ -4821,12 +5481,12 @@ var collectionSidebar_default = ({
|
|
|
4821
5481
|
!disabled && selectedCollectionId === collection[COLLECTION_ATTRS[0]] && /* @__PURE__ */ jsxRuntime.jsx(antd.Space, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4822
5482
|
antd.Popconfirm,
|
|
4823
5483
|
{
|
|
4824
|
-
title: "
|
|
4825
|
-
okText: "
|
|
4826
|
-
cancelText: "
|
|
4827
|
-
description: "
|
|
5484
|
+
title: t2("common.defaultTitle"),
|
|
5485
|
+
okText: t2("common.confirm"),
|
|
5486
|
+
cancelText: t2("common.cancel"),
|
|
5487
|
+
description: t2("markdownEditor.collection.confirmDelete"),
|
|
4828
5488
|
onConfirm: () => onDeleteCollection(collection[COLLECTION_ATTRS[0]]),
|
|
4829
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "text", size: "small", title: "
|
|
5489
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { type: "text", size: "small", title: t2("markdownEditor.collection.delete"), icon: /* @__PURE__ */ jsxRuntime.jsx(icons.DeleteOutlined, {}) })
|
|
4830
5490
|
}
|
|
4831
5491
|
) })
|
|
4832
5492
|
] })
|
|
@@ -4835,7 +5495,7 @@ var collectionSidebar_default = ({
|
|
|
4835
5495
|
);
|
|
4836
5496
|
}
|
|
4837
5497
|
}
|
|
4838
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: "
|
|
5498
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(antd.Flex, { vertical: true, justify: "center", align: "center", className: "height-full", children: /* @__PURE__ */ jsxRuntime.jsx(antd.Empty, { description: t2("markdownEditor.collection.empty") }) })
|
|
4839
5499
|
}
|
|
4840
5500
|
);
|
|
4841
5501
|
const container = collectionConfig?.getContainer?.();
|
|
@@ -4876,7 +5536,7 @@ var useCollections = (collectionConfig) => {
|
|
|
4876
5536
|
}
|
|
4877
5537
|
editor.current.chain().focus().setMark(COLLECTION_KEY, {
|
|
4878
5538
|
"collection-id": remoteId,
|
|
4879
|
-
"user-name": collectionConfig?.user?.name || "
|
|
5539
|
+
"user-name": collectionConfig?.user?.name || t("markdownEditor.unknown"),
|
|
4880
5540
|
"user-id": collectionConfig?.user.id || "0000",
|
|
4881
5541
|
"update-time": getTimestamp(),
|
|
4882
5542
|
"page-no": pageIndex
|
|
@@ -5425,6 +6085,7 @@ var BlockquoteButton = React3.forwardRef(
|
|
|
5425
6085
|
hideWhenUnavailable,
|
|
5426
6086
|
onToggled
|
|
5427
6087
|
});
|
|
6088
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
5428
6089
|
const handleClick = React3.useCallback(
|
|
5429
6090
|
(event) => {
|
|
5430
6091
|
onClick?.(event);
|
|
@@ -5448,7 +6109,7 @@ var BlockquoteButton = React3.forwardRef(
|
|
|
5448
6109
|
"data-disabled": !canToggle3,
|
|
5449
6110
|
"aria-label": label,
|
|
5450
6111
|
"aria-pressed": isActive,
|
|
5451
|
-
tooltip: "
|
|
6112
|
+
tooltip: t2("markdownEditor.toolbar.blockquote"),
|
|
5452
6113
|
onClick: handleClick,
|
|
5453
6114
|
...buttonProps,
|
|
5454
6115
|
ref,
|
|
@@ -5616,7 +6277,7 @@ function useBlockquote(config) {
|
|
|
5616
6277
|
isActive,
|
|
5617
6278
|
handleToggle,
|
|
5618
6279
|
canToggle: canToggle3,
|
|
5619
|
-
label: "
|
|
6280
|
+
label: t("markdownEditor.toolbar.blockquote"),
|
|
5620
6281
|
shortcutKeys: BLOCKQUOTE_SHORTCUT_KEY,
|
|
5621
6282
|
Icon: BlockquoteIcon
|
|
5622
6283
|
};
|
|
@@ -5651,6 +6312,7 @@ var CodeBlockButton = React3.forwardRef(
|
|
|
5651
6312
|
hideWhenUnavailable,
|
|
5652
6313
|
onToggled
|
|
5653
6314
|
});
|
|
6315
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
5654
6316
|
const handleClick = React3.useCallback(
|
|
5655
6317
|
(event) => {
|
|
5656
6318
|
onClick?.(event);
|
|
@@ -5674,7 +6336,7 @@ var CodeBlockButton = React3.forwardRef(
|
|
|
5674
6336
|
tabIndex: -1,
|
|
5675
6337
|
"aria-label": label,
|
|
5676
6338
|
"aria-pressed": isActive,
|
|
5677
|
-
tooltip: "
|
|
6339
|
+
tooltip: t2("markdownEditor.toolbar.codeBlock"),
|
|
5678
6340
|
onClick: handleClick,
|
|
5679
6341
|
...buttonProps,
|
|
5680
6342
|
ref,
|
|
@@ -5833,7 +6495,7 @@ function useCodeBlock(config) {
|
|
|
5833
6495
|
isActive,
|
|
5834
6496
|
handleToggle,
|
|
5835
6497
|
canToggle: canToggleState,
|
|
5836
|
-
label: "
|
|
6498
|
+
label: t("markdownEditor.toolbar.codeBlock"),
|
|
5837
6499
|
shortcutKeys: CODE_BLOCK_SHORTCUT_KEY,
|
|
5838
6500
|
Icon: CodeBlockIcon
|
|
5839
6501
|
};
|
|
@@ -5994,6 +6656,7 @@ var ColorHighlightButton = React3.forwardRef(
|
|
|
5994
6656
|
style,
|
|
5995
6657
|
...buttonProps
|
|
5996
6658
|
}, ref) => {
|
|
6659
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
5997
6660
|
const { editor } = useTiptapEditor(providedEditor);
|
|
5998
6661
|
const {
|
|
5999
6662
|
isVisible,
|
|
@@ -6005,7 +6668,7 @@ var ColorHighlightButton = React3.forwardRef(
|
|
|
6005
6668
|
} = useColorHighlight({
|
|
6006
6669
|
editor,
|
|
6007
6670
|
highlightColor,
|
|
6008
|
-
label: text ||
|
|
6671
|
+
label: text || t2("markdownEditor.highlight.toggle", { color: highlightColor }),
|
|
6009
6672
|
hideWhenUnavailable,
|
|
6010
6673
|
mode,
|
|
6011
6674
|
onApplied
|
|
@@ -6064,52 +6727,52 @@ ColorHighlightButton.displayName = "ColorHighlightButton";
|
|
|
6064
6727
|
var COLOR_HIGHLIGHT_SHORTCUT_KEY = "mod+shift+h";
|
|
6065
6728
|
var HIGHLIGHT_COLORS = [
|
|
6066
6729
|
{
|
|
6067
|
-
|
|
6730
|
+
labelKey: "markdownEditor.highlight.default",
|
|
6068
6731
|
value: "var(--tt-bg-color)",
|
|
6069
6732
|
border: "var(--tt-bg-color-contrast)"
|
|
6070
6733
|
},
|
|
6071
6734
|
{
|
|
6072
|
-
|
|
6735
|
+
labelKey: "markdownEditor.highlight.gray",
|
|
6073
6736
|
value: "var(--tt-color-highlight-gray)",
|
|
6074
6737
|
border: "var(--tt-color-highlight-gray-contrast)"
|
|
6075
6738
|
},
|
|
6076
6739
|
{
|
|
6077
|
-
|
|
6740
|
+
labelKey: "markdownEditor.highlight.brown",
|
|
6078
6741
|
value: "var(--tt-color-highlight-brown)",
|
|
6079
6742
|
border: "var(--tt-color-highlight-brown-contrast)"
|
|
6080
6743
|
},
|
|
6081
6744
|
{
|
|
6082
|
-
|
|
6745
|
+
labelKey: "markdownEditor.highlight.orange",
|
|
6083
6746
|
value: "var(--tt-color-highlight-orange)",
|
|
6084
6747
|
border: "var(--tt-color-highlight-orange-contrast)"
|
|
6085
6748
|
},
|
|
6086
6749
|
{
|
|
6087
|
-
|
|
6750
|
+
labelKey: "markdownEditor.highlight.yellow",
|
|
6088
6751
|
value: "var(--tt-color-highlight-yellow)",
|
|
6089
6752
|
border: "var(--tt-color-highlight-yellow-contrast)"
|
|
6090
6753
|
},
|
|
6091
6754
|
{
|
|
6092
|
-
|
|
6755
|
+
labelKey: "markdownEditor.highlight.green",
|
|
6093
6756
|
value: "var(--tt-color-highlight-green)",
|
|
6094
6757
|
border: "var(--tt-color-highlight-green-contrast)"
|
|
6095
6758
|
},
|
|
6096
6759
|
{
|
|
6097
|
-
|
|
6760
|
+
labelKey: "markdownEditor.highlight.blue",
|
|
6098
6761
|
value: "var(--tt-color-highlight-blue)",
|
|
6099
6762
|
border: "var(--tt-color-highlight-blue-contrast)"
|
|
6100
6763
|
},
|
|
6101
6764
|
{
|
|
6102
|
-
|
|
6765
|
+
labelKey: "markdownEditor.highlight.purple",
|
|
6103
6766
|
value: "var(--tt-color-highlight-purple)",
|
|
6104
6767
|
border: "var(--tt-color-highlight-purple-contrast)"
|
|
6105
6768
|
},
|
|
6106
6769
|
{
|
|
6107
|
-
|
|
6770
|
+
labelKey: "markdownEditor.highlight.pink",
|
|
6108
6771
|
value: "var(--tt-color-highlight-pink)",
|
|
6109
6772
|
border: "var(--tt-color-highlight-pink-contrast)"
|
|
6110
6773
|
},
|
|
6111
6774
|
{
|
|
6112
|
-
|
|
6775
|
+
labelKey: "markdownEditor.highlight.red",
|
|
6113
6776
|
value: "var(--tt-color-highlight-red)",
|
|
6114
6777
|
border: "var(--tt-color-highlight-red-contrast)"
|
|
6115
6778
|
}
|
|
@@ -6235,7 +6898,7 @@ function useColorHighlight(config) {
|
|
|
6235
6898
|
const handleRemoveHighlight = React3.useCallback(() => {
|
|
6236
6899
|
const success = removeHighlight(editor, mode);
|
|
6237
6900
|
if (success) {
|
|
6238
|
-
onApplied?.({ color: "", label: "
|
|
6901
|
+
onApplied?.({ color: "", label: t("markdownEditor.highlight.removeBackground"), mode });
|
|
6239
6902
|
}
|
|
6240
6903
|
return success;
|
|
6241
6904
|
}, [editor, onApplied, mode]);
|
|
@@ -6257,28 +6920,31 @@ function useColorHighlight(config) {
|
|
|
6257
6920
|
handleColorHighlight,
|
|
6258
6921
|
handleRemoveHighlight,
|
|
6259
6922
|
canColorHighlight: canColorHighlightState,
|
|
6260
|
-
label: label ||
|
|
6923
|
+
label: label || t("markdownEditor.highlight.label"),
|
|
6261
6924
|
shortcutKeys: COLOR_HIGHLIGHT_SHORTCUT_KEY,
|
|
6262
6925
|
Icon: HighlighterIcon,
|
|
6263
6926
|
mode
|
|
6264
6927
|
};
|
|
6265
6928
|
}
|
|
6266
|
-
var ColorHighlightPopoverButton = React3.forwardRef(({ className, children, ...props }, ref) =>
|
|
6267
|
-
|
|
6268
|
-
|
|
6269
|
-
|
|
6270
|
-
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
)
|
|
6929
|
+
var ColorHighlightPopoverButton = React3.forwardRef(({ className, children, ...props }, ref) => {
|
|
6930
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
6931
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6932
|
+
Button7,
|
|
6933
|
+
{
|
|
6934
|
+
type: "button",
|
|
6935
|
+
className,
|
|
6936
|
+
"data-style": "ghost",
|
|
6937
|
+
"data-appearance": "default",
|
|
6938
|
+
role: "button",
|
|
6939
|
+
tabIndex: -1,
|
|
6940
|
+
"aria-label": t2("markdownEditor.highlight.textLabel"),
|
|
6941
|
+
tooltip: t2("markdownEditor.highlight.label"),
|
|
6942
|
+
ref,
|
|
6943
|
+
...props,
|
|
6944
|
+
children: children ?? /* @__PURE__ */ jsxRuntime.jsx(HighlighterIcon, { className: "tiptap-button-icon" })
|
|
6945
|
+
}
|
|
6946
|
+
);
|
|
6947
|
+
});
|
|
6282
6948
|
ColorHighlightPopoverButton.displayName = "ColorHighlightPopoverButton";
|
|
6283
6949
|
function ColorHighlightPopoverContent({
|
|
6284
6950
|
editor,
|
|
@@ -6293,9 +6959,10 @@ function ColorHighlightPopoverContent({
|
|
|
6293
6959
|
const { handleRemoveHighlight } = useColorHighlight({ editor });
|
|
6294
6960
|
const isMobile = useIsBreakpoint();
|
|
6295
6961
|
const containerRef = React3.useRef(null);
|
|
6962
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
6296
6963
|
const menuItems = React3.useMemo(
|
|
6297
|
-
() => [...colors, { label: "
|
|
6298
|
-
[colors]
|
|
6964
|
+
() => [...colors.map((c) => ({ ...c, label: t2(c.labelKey) })), { label: t2("markdownEditor.highlight.removeHighlight"), value: "none" }],
|
|
6965
|
+
[colors, t2]
|
|
6299
6966
|
);
|
|
6300
6967
|
const { selectedIndex } = useMenuNavigation({
|
|
6301
6968
|
containerRef,
|
|
@@ -6324,8 +6991,8 @@ function ColorHighlightPopoverContent({
|
|
|
6324
6991
|
{
|
|
6325
6992
|
editor,
|
|
6326
6993
|
highlightColor: color.value,
|
|
6327
|
-
tooltip: color.
|
|
6328
|
-
"aria-label": `${color.
|
|
6994
|
+
tooltip: t2(color.labelKey),
|
|
6995
|
+
"aria-label": `${t2(color.labelKey)} highlight color`,
|
|
6329
6996
|
tabIndex: index === selectedIndex ? 0 : -1,
|
|
6330
6997
|
"data-highlighted": selectedIndex === index
|
|
6331
6998
|
},
|
|
@@ -6336,8 +7003,8 @@ function ColorHighlightPopoverContent({
|
|
|
6336
7003
|
Button7,
|
|
6337
7004
|
{
|
|
6338
7005
|
onClick: handleRemoveHighlight,
|
|
6339
|
-
"aria-label": "
|
|
6340
|
-
tooltip: "
|
|
7006
|
+
"aria-label": t2("markdownEditor.highlight.removeBackground"),
|
|
7007
|
+
tooltip: t2("markdownEditor.highlight.removeBackground"),
|
|
6341
7008
|
tabIndex: selectedIndex === colors.length ? 0 : -1,
|
|
6342
7009
|
type: "button",
|
|
6343
7010
|
role: "menuitem",
|
|
@@ -6363,6 +7030,7 @@ function ColorHighlightPopover({
|
|
|
6363
7030
|
onApplied,
|
|
6364
7031
|
...props
|
|
6365
7032
|
}) {
|
|
7033
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
6366
7034
|
const { editor } = useTiptapEditor(providedEditor);
|
|
6367
7035
|
const [isOpen, setIsOpen] = React3.useState(false);
|
|
6368
7036
|
const { isVisible, canColorHighlight: canColorHighlight2, isActive, label, Icon } = useColorHighlight({
|
|
@@ -6385,7 +7053,7 @@ function ColorHighlightPopover({
|
|
|
6385
7053
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "tiptap-button-icon" })
|
|
6386
7054
|
}
|
|
6387
7055
|
) }),
|
|
6388
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { "aria-label": "
|
|
7056
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { "aria-label": t2("markdownEditor.highlight.label"), children: /* @__PURE__ */ jsxRuntime.jsx(ColorHighlightPopoverContent, { editor, colors }) })
|
|
6389
7057
|
] });
|
|
6390
7058
|
}
|
|
6391
7059
|
var ChevronDownIcon = React3.memo(({ className, ...props }) => {
|
|
@@ -6868,6 +7536,7 @@ var HeadingDropdownMenu = React3.forwardRef(
|
|
|
6868
7536
|
}, ref) => {
|
|
6869
7537
|
const { editor } = useTiptapEditor(providedEditor);
|
|
6870
7538
|
const [isOpen, setIsOpen] = React3.useState(false);
|
|
7539
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
6871
7540
|
const { isVisible, isActive, canToggle: canToggle3, Icon } = useHeadingDropdownMenu({
|
|
6872
7541
|
editor,
|
|
6873
7542
|
levels,
|
|
@@ -6897,7 +7566,7 @@ var HeadingDropdownMenu = React3.forwardRef(
|
|
|
6897
7566
|
"data-disabled": !canToggle3,
|
|
6898
7567
|
"aria-label": "Format text as heading",
|
|
6899
7568
|
"aria-pressed": isActive,
|
|
6900
|
-
tooltip: "
|
|
7569
|
+
tooltip: t2("markdownEditor.toolbar.heading"),
|
|
6901
7570
|
...buttonProps,
|
|
6902
7571
|
ref,
|
|
6903
7572
|
children: [
|
|
@@ -6911,10 +7580,10 @@ var HeadingDropdownMenu = React3.forwardRef(
|
|
|
6911
7580
|
{
|
|
6912
7581
|
editor,
|
|
6913
7582
|
level,
|
|
6914
|
-
text:
|
|
7583
|
+
text: t2("markdownEditor.toolbar.headingLevel", { level }),
|
|
6915
7584
|
showTooltip: false
|
|
6916
7585
|
}
|
|
6917
|
-
) },
|
|
7586
|
+
) }, level)) }) }) }) })
|
|
6918
7587
|
] });
|
|
6919
7588
|
}
|
|
6920
7589
|
);
|
|
@@ -6977,7 +7646,7 @@ function useHeadingDropdownMenu(config) {
|
|
|
6977
7646
|
isActive,
|
|
6978
7647
|
canToggle: canToggleState,
|
|
6979
7648
|
levels,
|
|
6980
|
-
label: "
|
|
7649
|
+
label: t("markdownEditor.toolbar.heading"),
|
|
6981
7650
|
Icon: activeLevel ? headingIcons[activeLevel] : HeadingIcon
|
|
6982
7651
|
};
|
|
6983
7652
|
}
|
|
@@ -7103,6 +7772,7 @@ function InputGroup({
|
|
|
7103
7772
|
}
|
|
7104
7773
|
var LinkButton = React3.forwardRef(
|
|
7105
7774
|
({ className, children, ...props }, ref) => {
|
|
7775
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
7106
7776
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7107
7777
|
Button7,
|
|
7108
7778
|
{
|
|
@@ -7111,8 +7781,8 @@ var LinkButton = React3.forwardRef(
|
|
|
7111
7781
|
"data-style": "ghost",
|
|
7112
7782
|
role: "button",
|
|
7113
7783
|
tabIndex: -1,
|
|
7114
|
-
"aria-label": "
|
|
7115
|
-
tooltip: "
|
|
7784
|
+
"aria-label": t2("markdownEditor.toolbar.link"),
|
|
7785
|
+
tooltip: t2("markdownEditor.toolbar.link"),
|
|
7116
7786
|
ref,
|
|
7117
7787
|
...props,
|
|
7118
7788
|
children: children || /* @__PURE__ */ jsxRuntime.jsx(LinkIcon, { className: "tiptap-button-icon" })
|
|
@@ -7130,6 +7800,7 @@ var LinkMain = ({
|
|
|
7130
7800
|
isActive
|
|
7131
7801
|
}) => {
|
|
7132
7802
|
const isMobile = useIsBreakpoint();
|
|
7803
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
7133
7804
|
const handleKeyDown = (event) => {
|
|
7134
7805
|
if (event.key === "Enter") {
|
|
7135
7806
|
event.preventDefault();
|
|
@@ -7153,7 +7824,7 @@ var LinkMain = ({
|
|
|
7153
7824
|
Input4,
|
|
7154
7825
|
{
|
|
7155
7826
|
type: "url",
|
|
7156
|
-
placeholder: "
|
|
7827
|
+
placeholder: t2("markdownEditor.toolbar.linkPlaceholder"),
|
|
7157
7828
|
value: url,
|
|
7158
7829
|
onChange: (e) => setUrl(e.target.value),
|
|
7159
7830
|
onKeyDown: handleKeyDown,
|
|
@@ -7168,7 +7839,7 @@ var LinkMain = ({
|
|
|
7168
7839
|
{
|
|
7169
7840
|
type: "button",
|
|
7170
7841
|
onClick: setLink,
|
|
7171
|
-
title: "
|
|
7842
|
+
title: t2("markdownEditor.toolbar.applyLink"),
|
|
7172
7843
|
disabled: !url && !isActive,
|
|
7173
7844
|
"data-style": "ghost",
|
|
7174
7845
|
children: /* @__PURE__ */ jsxRuntime.jsx(CornerDownLeftIcon, { className: "tiptap-button-icon" })
|
|
@@ -7181,7 +7852,7 @@ var LinkMain = ({
|
|
|
7181
7852
|
{
|
|
7182
7853
|
type: "button",
|
|
7183
7854
|
onClick: openLink,
|
|
7184
|
-
title: "
|
|
7855
|
+
title: t2("markdownEditor.toolbar.openInNewWindow"),
|
|
7185
7856
|
disabled: !url && !isActive,
|
|
7186
7857
|
"data-style": "ghost",
|
|
7187
7858
|
children: /* @__PURE__ */ jsxRuntime.jsx(ExternalLinkIcon, { className: "tiptap-button-icon" })
|
|
@@ -7192,7 +7863,7 @@ var LinkMain = ({
|
|
|
7192
7863
|
{
|
|
7193
7864
|
type: "button",
|
|
7194
7865
|
onClick: removeLink,
|
|
7195
|
-
title: "
|
|
7866
|
+
title: t2("markdownEditor.toolbar.removeLink"),
|
|
7196
7867
|
disabled: !url && !isActive,
|
|
7197
7868
|
"data-style": "ghost",
|
|
7198
7869
|
children: /* @__PURE__ */ jsxRuntime.jsx(TrashIcon, { className: "tiptap-button-icon" })
|
|
@@ -7706,10 +8377,10 @@ var listIcons = {
|
|
|
7706
8377
|
orderedList: ListOrderedIcon,
|
|
7707
8378
|
taskList: ListTodoIcon
|
|
7708
8379
|
};
|
|
7709
|
-
var
|
|
7710
|
-
bulletList: "
|
|
7711
|
-
orderedList: "
|
|
7712
|
-
taskList: "
|
|
8380
|
+
var listLabelKeys = {
|
|
8381
|
+
bulletList: "markdownEditor.toolbar.bulletList",
|
|
8382
|
+
orderedList: "markdownEditor.toolbar.orderedList",
|
|
8383
|
+
taskList: "markdownEditor.toolbar.taskList"
|
|
7713
8384
|
};
|
|
7714
8385
|
var LIST_SHORTCUT_KEYS = {
|
|
7715
8386
|
bulletList: "mod+shift+8",
|
|
@@ -7856,24 +8527,24 @@ function useList(config) {
|
|
|
7856
8527
|
isActive,
|
|
7857
8528
|
handleToggle,
|
|
7858
8529
|
canToggle: canToggle3,
|
|
7859
|
-
label:
|
|
8530
|
+
label: t(listLabelKeys[type]),
|
|
7860
8531
|
shortcutKeys: LIST_SHORTCUT_KEYS[type],
|
|
7861
8532
|
Icon: listIcons[type]
|
|
7862
8533
|
};
|
|
7863
8534
|
}
|
|
7864
8535
|
var listOptions = [
|
|
7865
8536
|
{
|
|
7866
|
-
|
|
8537
|
+
labelKey: "markdownEditor.toolbar.bulletList",
|
|
7867
8538
|
type: "bulletList",
|
|
7868
8539
|
icon: ListIcon
|
|
7869
8540
|
},
|
|
7870
8541
|
{
|
|
7871
|
-
|
|
8542
|
+
labelKey: "markdownEditor.toolbar.orderedList",
|
|
7872
8543
|
type: "orderedList",
|
|
7873
8544
|
icon: ListOrderedIcon
|
|
7874
8545
|
},
|
|
7875
8546
|
{
|
|
7876
|
-
|
|
8547
|
+
labelKey: "markdownEditor.toolbar.taskList",
|
|
7877
8548
|
type: "taskList",
|
|
7878
8549
|
icon: ListTodoIcon
|
|
7879
8550
|
}
|
|
@@ -7914,7 +8585,13 @@ function useListDropdownMenu(config) {
|
|
|
7914
8585
|
const { editor } = useTiptapEditor(providedEditor);
|
|
7915
8586
|
const [isVisible, setIsVisible] = React3.useState(true);
|
|
7916
8587
|
const listInSchema = types.some((type) => isNodeInSchema(type, editor));
|
|
7917
|
-
const filteredLists = React3.useMemo(
|
|
8588
|
+
const filteredLists = React3.useMemo(
|
|
8589
|
+
() => getFilteredListOptions(types).map((option) => ({
|
|
8590
|
+
...option,
|
|
8591
|
+
label: t(option.labelKey)
|
|
8592
|
+
})),
|
|
8593
|
+
[types]
|
|
8594
|
+
);
|
|
7918
8595
|
const canToggleAny = canToggleAnyList(editor, types);
|
|
7919
8596
|
const isAnyActive = isAnyListActive(editor, types);
|
|
7920
8597
|
const activeType = getActiveListType(editor, types);
|
|
@@ -7944,7 +8621,7 @@ function useListDropdownMenu(config) {
|
|
|
7944
8621
|
canToggle: canToggleAny,
|
|
7945
8622
|
types,
|
|
7946
8623
|
filteredLists,
|
|
7947
|
-
label: "
|
|
8624
|
+
label: t("markdownEditor.toolbar.list"),
|
|
7948
8625
|
Icon: activeList ? listIcons[activeList.type] : ListIcon
|
|
7949
8626
|
};
|
|
7950
8627
|
}
|
|
@@ -7958,6 +8635,7 @@ function ListDropdownMenu({
|
|
|
7958
8635
|
}) {
|
|
7959
8636
|
const { editor } = useTiptapEditor(providedEditor);
|
|
7960
8637
|
const [isOpen, setIsOpen] = React3.useState(false);
|
|
8638
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
7961
8639
|
const { filteredLists, canToggle: canToggle3, isActive, isVisible, Icon } = useListDropdownMenu({
|
|
7962
8640
|
editor,
|
|
7963
8641
|
types,
|
|
@@ -7984,8 +8662,8 @@ function ListDropdownMenu({
|
|
|
7984
8662
|
tabIndex: -1,
|
|
7985
8663
|
disabled: !canToggle3,
|
|
7986
8664
|
"data-disabled": !canToggle3,
|
|
7987
|
-
"aria-label": "
|
|
7988
|
-
tooltip: "
|
|
8665
|
+
"aria-label": t2("markdownEditor.toolbar.listOptions"),
|
|
8666
|
+
tooltip: t2("markdownEditor.toolbar.list"),
|
|
7989
8667
|
...props,
|
|
7990
8668
|
children: [
|
|
7991
8669
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "tiptap-button-icon" }),
|
|
@@ -8321,14 +8999,14 @@ var MARK_SHORTCUT_KEYS = {
|
|
|
8321
8999
|
superscript: "mod+.",
|
|
8322
9000
|
subscript: "mod+,"
|
|
8323
9001
|
};
|
|
8324
|
-
var
|
|
8325
|
-
bold: "
|
|
8326
|
-
italic: "
|
|
8327
|
-
underline: "
|
|
8328
|
-
strike: "
|
|
8329
|
-
code: "
|
|
8330
|
-
superscript: "
|
|
8331
|
-
subscript: "
|
|
9002
|
+
var MARK_ACTION_LABEL_KEYS = {
|
|
9003
|
+
bold: "markdownEditor.toolbar.bold",
|
|
9004
|
+
italic: "markdownEditor.toolbar.italic",
|
|
9005
|
+
underline: "markdownEditor.toolbar.underline",
|
|
9006
|
+
strike: "markdownEditor.toolbar.strike",
|
|
9007
|
+
code: "markdownEditor.toolbar.code",
|
|
9008
|
+
superscript: "markdownEditor.toolbar.superscript",
|
|
9009
|
+
subscript: "markdownEditor.toolbar.subscript"
|
|
8332
9010
|
};
|
|
8333
9011
|
function canToggleMark(editor, type) {
|
|
8334
9012
|
if (!editor || !editor.isEditable) return false;
|
|
@@ -8355,7 +9033,8 @@ function shouldShowButton6(props) {
|
|
|
8355
9033
|
return true;
|
|
8356
9034
|
}
|
|
8357
9035
|
function getFormattedMarkName(type) {
|
|
8358
|
-
|
|
9036
|
+
const labelKey = MARK_ACTION_LABEL_KEYS[type];
|
|
9037
|
+
return labelKey ? t(labelKey) : type.charAt(0).toUpperCase() + type.slice(1);
|
|
8359
9038
|
}
|
|
8360
9039
|
function useMark(config) {
|
|
8361
9040
|
const {
|
|
@@ -8665,11 +9344,11 @@ var textAlignIcons = {
|
|
|
8665
9344
|
right: AlignRightIcon,
|
|
8666
9345
|
justify: AlignJustifyIcon
|
|
8667
9346
|
};
|
|
8668
|
-
var
|
|
8669
|
-
left: "
|
|
8670
|
-
center: "
|
|
8671
|
-
right: "
|
|
8672
|
-
justify: "
|
|
9347
|
+
var textAlignLabelKeys = {
|
|
9348
|
+
left: "markdownEditor.toolbar.alignLeft",
|
|
9349
|
+
center: "markdownEditor.toolbar.alignCenter",
|
|
9350
|
+
right: "markdownEditor.toolbar.alignRight",
|
|
9351
|
+
justify: "markdownEditor.toolbar.alignJustify"
|
|
8673
9352
|
};
|
|
8674
9353
|
function canSetTextAlign(editor, align) {
|
|
8675
9354
|
if (!editor || !editor.isEditable) return false;
|
|
@@ -8737,7 +9416,7 @@ function useTextAlign(config) {
|
|
|
8737
9416
|
isActive,
|
|
8738
9417
|
handleTextAlign,
|
|
8739
9418
|
canAlign,
|
|
8740
|
-
label:
|
|
9419
|
+
label: t(textAlignLabelKeys[align]),
|
|
8741
9420
|
shortcutKeys: TEXT_ALIGN_SHORTCUT_KEYS[align],
|
|
8742
9421
|
Icon: textAlignIcons[align]
|
|
8743
9422
|
};
|
|
@@ -8862,9 +9541,9 @@ var UNDO_REDO_SHORTCUT_KEYS = {
|
|
|
8862
9541
|
undo: "mod+z",
|
|
8863
9542
|
redo: "mod+shift+z"
|
|
8864
9543
|
};
|
|
8865
|
-
var
|
|
8866
|
-
undo: "
|
|
8867
|
-
redo: "
|
|
9544
|
+
var historyActionLabelKeys = {
|
|
9545
|
+
undo: "markdownEditor.toolbar.undo",
|
|
9546
|
+
redo: "markdownEditor.toolbar.redo"
|
|
8868
9547
|
};
|
|
8869
9548
|
var historyIcons = {
|
|
8870
9549
|
undo: Undo2Icon,
|
|
@@ -8922,7 +9601,7 @@ function useUndoRedo(config) {
|
|
|
8922
9601
|
isVisible,
|
|
8923
9602
|
handleAction,
|
|
8924
9603
|
canExecute,
|
|
8925
|
-
label:
|
|
9604
|
+
label: t(historyActionLabelKeys[action]),
|
|
8926
9605
|
shortcutKeys: UNDO_REDO_SHORTCUT_KEYS[action],
|
|
8927
9606
|
Icon: historyIcons[action]
|
|
8928
9607
|
};
|
|
@@ -9185,6 +9864,7 @@ var MainToolbarContent = ({
|
|
|
9185
9864
|
isMobile,
|
|
9186
9865
|
isBubble
|
|
9187
9866
|
}) => {
|
|
9867
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
9188
9868
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9189
9869
|
/* @__PURE__ */ jsxRuntime.jsx(Spacer, {}),
|
|
9190
9870
|
!isBubble && tools.includes("undo-redo") && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
@@ -9194,9 +9874,9 @@ var MainToolbarContent = ({
|
|
|
9194
9874
|
] }),
|
|
9195
9875
|
/* @__PURE__ */ jsxRuntime.jsx(ToolbarSeparator, {})
|
|
9196
9876
|
] }),
|
|
9197
|
-
onQuote && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(QuoteIcon, {}), tooltip: "
|
|
9198
|
-
onCreateAnnotation && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(icons.MessageOutlined, {}), tooltip: "
|
|
9199
|
-
onCreateCollection && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BookOutlined, {}), tooltip: "
|
|
9877
|
+
onQuote && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(QuoteIcon, {}), tooltip: t2("markdownEditor.toolbar.quote"), onClick: onQuote, children: t2("markdownEditor.toolbar.quote") }) }),
|
|
9878
|
+
onCreateAnnotation && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(icons.MessageOutlined, {}), tooltip: t2("markdownEditor.toolbar.annotation"), onClick: onCreateAnnotation, children: t2("markdownEditor.toolbar.annotation") }) }),
|
|
9879
|
+
onCreateCollection && /* @__PURE__ */ jsxRuntime.jsx(ToolbarGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(SelectButton, { icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BookOutlined, {}), tooltip: t2("markdownEditor.toolbar.excerpt"), onClick: onCreateCollection, children: t2("markdownEditor.toolbar.excerpt") }) }),
|
|
9200
9880
|
(tools.includes("heading") || tools.includes("list") || tools.includes("block")) && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
9201
9881
|
/* @__PURE__ */ jsxRuntime.jsxs(ToolbarGroup, { children: [
|
|
9202
9882
|
tools.includes("heading") && /* @__PURE__ */ jsxRuntime.jsx(HeadingDropdownMenu, { levels: [1, 2, 3, 4], portal: isMobile }),
|
|
@@ -9437,9 +10117,9 @@ var SearchAndReplace = core.Extension.create({
|
|
|
9437
10117
|
addProseMirrorPlugins() {
|
|
9438
10118
|
const editor = this.editor;
|
|
9439
10119
|
const { searchResultClass, disableRegex } = this.options;
|
|
9440
|
-
const setLastSearchTerm = (
|
|
9441
|
-
const setLastCaseSensitive = (
|
|
9442
|
-
const setLastResultIndex = (
|
|
10120
|
+
const setLastSearchTerm = (t2) => editor.storage.searchAndReplace.lastSearchTerm = t2;
|
|
10121
|
+
const setLastCaseSensitive = (t2) => editor.storage.searchAndReplace.lastCaseSensitive = t2;
|
|
10122
|
+
const setLastResultIndex = (t2) => editor.storage.searchAndReplace.lastResultIndex = t2;
|
|
9443
10123
|
return [
|
|
9444
10124
|
new state.Plugin({
|
|
9445
10125
|
key: searchAndReplacePluginKey,
|
|
@@ -9540,6 +10220,7 @@ var MarkdownEditor_default = React3.forwardRef(
|
|
|
9540
10220
|
collectionConfig,
|
|
9541
10221
|
pageNoConfig
|
|
9542
10222
|
}, ref) => {
|
|
10223
|
+
const { t: t2 } = useTranslation(NS_COMMON);
|
|
9543
10224
|
const isMobile = useIsBreakpoint();
|
|
9544
10225
|
const lastContentRef = React3.useRef("");
|
|
9545
10226
|
const { setPageNoEditor, onPageChange } = usePageNo(pageNoConfig);
|
|
@@ -9576,7 +10257,7 @@ var MarkdownEditor_default = React3.forwardRef(
|
|
|
9576
10257
|
autocomplete: "off",
|
|
9577
10258
|
autocorrect: "off",
|
|
9578
10259
|
autocapitalize: "off",
|
|
9579
|
-
"aria-label": "
|
|
10260
|
+
"aria-label": t2("markdownEditor.mainArea")
|
|
9580
10261
|
}
|
|
9581
10262
|
},
|
|
9582
10263
|
extensions: [
|
|
@@ -9737,7 +10418,7 @@ var MarkdownEditor_default = React3.forwardRef(
|
|
|
9737
10418
|
antd.Button,
|
|
9738
10419
|
{
|
|
9739
10420
|
size: "small",
|
|
9740
|
-
title: "
|
|
10421
|
+
title: t2("markdownEditor.annotation.list"),
|
|
9741
10422
|
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.MessageOutlined, {}),
|
|
9742
10423
|
color: "primary",
|
|
9743
10424
|
variant: "text",
|
|
@@ -9749,15 +10430,15 @@ var MarkdownEditor_default = React3.forwardRef(
|
|
|
9749
10430
|
{
|
|
9750
10431
|
style: { gap: "2px" },
|
|
9751
10432
|
size: "small",
|
|
9752
|
-
title: "
|
|
10433
|
+
title: t2("markdownEditor.collection.list"),
|
|
9753
10434
|
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.BookOutlined, {}),
|
|
9754
10435
|
color: "primary",
|
|
9755
10436
|
variant: "text",
|
|
9756
10437
|
onClick: () => setShowCollection(!showCollection),
|
|
9757
|
-
children: "
|
|
10438
|
+
children: t2("markdownEditor.collection.title")
|
|
9758
10439
|
}
|
|
9759
10440
|
),
|
|
9760
|
-
onDownloadFile && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", color: "primary", variant: "text", onClick: downloadFile2, children: "
|
|
10441
|
+
onDownloadFile && /* @__PURE__ */ jsxRuntime.jsx(antd.Button, { size: "small", color: "primary", variant: "text", onClick: downloadFile2, children: t2("common.download") }),
|
|
9761
10442
|
extraNav
|
|
9762
10443
|
] })
|
|
9763
10444
|
] }),
|
|
@@ -9930,6 +10611,7 @@ exports.FilePreview = FilePreview_default;
|
|
|
9930
10611
|
exports.FilePreviewDrawer = FilePreviewDrawer_default;
|
|
9931
10612
|
exports.HttpStatus = HttpStatus;
|
|
9932
10613
|
exports.Iframe = Iframe_default;
|
|
10614
|
+
exports.LANG_KEY = LANG_KEY;
|
|
9933
10615
|
exports.LazyComponent = LazyComponent_default;
|
|
9934
10616
|
exports.LuyaFilePreview = luyaFilePreview_default;
|
|
9935
10617
|
exports.MarkDrawing = MarkDrawing_default;
|
|
@@ -9939,6 +10621,7 @@ exports.MicroApp = MicroApp_default;
|
|
|
9939
10621
|
exports.MicroAppDrawer = Drawer_default;
|
|
9940
10622
|
exports.MicroAppWindow = Window_default;
|
|
9941
10623
|
exports.MultiEmailValidator = MultiEmailValidator;
|
|
10624
|
+
exports.NS_COMMON = NS_COMMON;
|
|
9942
10625
|
exports.PdfImagePreview = PdfImagePreview_default;
|
|
9943
10626
|
exports.PdfPreview = PdfPreview_default;
|
|
9944
10627
|
exports.PhoneOrMobileValidator = PhoneOrMobileValidator;
|
|
@@ -9960,6 +10643,7 @@ exports.ThanNumValidator = ThanNumValidator;
|
|
|
9960
10643
|
exports.UserAvatar = UserAvatar_default;
|
|
9961
10644
|
exports.VideoPlayer = VideoPlayer_default;
|
|
9962
10645
|
exports.absVal = absVal;
|
|
10646
|
+
exports.addBundledResource = addBundledResource;
|
|
9963
10647
|
exports.addUrlLastSlash = addUrlLastSlash;
|
|
9964
10648
|
exports.aesDecrypt = aesDecrypt;
|
|
9965
10649
|
exports.aesEncrypt = aesEncrypt;
|
|
@@ -9967,6 +10651,9 @@ exports.arrToObj = arrToObj;
|
|
|
9967
10651
|
exports.buildUrlParams = buildUrlParams;
|
|
9968
10652
|
exports.cachedMessage = cachedMessage;
|
|
9969
10653
|
exports.calculate = calculate;
|
|
10654
|
+
exports.commonEnUS = commonEnUS;
|
|
10655
|
+
exports.commonJaJP = commonJaJP;
|
|
10656
|
+
exports.commonZhCN = commonZhCN;
|
|
9970
10657
|
exports.compareNum = compareNum;
|
|
9971
10658
|
exports.convertCurrency = convertCurrency;
|
|
9972
10659
|
exports.convertNewlineToBr = convertNewlineToBr;
|
|
@@ -9994,6 +10681,8 @@ exports.getDeviceId = getDeviceId;
|
|
|
9994
10681
|
exports.getEndOfTimestamp = getEndOfTimestamp;
|
|
9995
10682
|
exports.getFileName = getFileName;
|
|
9996
10683
|
exports.getFileSuffixName = getFileSuffixName;
|
|
10684
|
+
exports.getI18n = getI18n;
|
|
10685
|
+
exports.getLang = getLang;
|
|
9997
10686
|
exports.getRowSpanCount = getRowSpanCount;
|
|
9998
10687
|
exports.getStartOfTimestamp = getStartOfTimestamp;
|
|
9999
10688
|
exports.getTimestamp = getTimestamp;
|
|
@@ -10001,6 +10690,7 @@ exports.getWebSocketUrl = getWebSocketUrl;
|
|
|
10001
10690
|
exports.htmlToMarkdown = htmlToMarkdown;
|
|
10002
10691
|
exports.htmlToText = htmlToText;
|
|
10003
10692
|
exports.importThirdPartyFile = importThirdPartyFile;
|
|
10693
|
+
exports.initI18n = initI18n;
|
|
10004
10694
|
exports.is = is;
|
|
10005
10695
|
exports.isArray = isArray;
|
|
10006
10696
|
exports.isBlob = isBlob;
|
|
@@ -10042,6 +10732,8 @@ exports.safeParseJson = safeParseJson;
|
|
|
10042
10732
|
exports.setInterval = setInterval2;
|
|
10043
10733
|
exports.setUrlMainSource = setUrlMainSource;
|
|
10044
10734
|
exports.shouldRender = shouldRender;
|
|
10735
|
+
exports.switchLang = switchLang;
|
|
10736
|
+
exports.t = t;
|
|
10045
10737
|
exports.times = times;
|
|
10046
10738
|
exports.toFixed = toFixed;
|
|
10047
10739
|
exports.transform = transform;
|
|
@@ -10056,6 +10748,7 @@ exports.useIframeRelayBridge = useIframeRelayBridge_default;
|
|
|
10056
10748
|
exports.useRefState = useRefState_default;
|
|
10057
10749
|
exports.useSyncInput = useSyncInput_default;
|
|
10058
10750
|
exports.useThrottle = useThrottle_default;
|
|
10751
|
+
exports.useTranslation = useTranslation;
|
|
10059
10752
|
exports.useWebSocket = useWebSocket_default;
|
|
10060
10753
|
//# sourceMappingURL=index.cjs.js.map
|
|
10061
10754
|
//# sourceMappingURL=index.cjs.js.map
|