zmdms-webui 3.5.1 → 3.5.3
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/es/applayoutheader/setting/fullCom.js +5 -1
- package/dist/es/applayoutheader/setting/userInfo.js +9 -5
- package/dist/es/applayoutheader/setting/userInfoModal.js +18 -12
- package/dist/es/applayoutheader/setting/userPwdModal.js +19 -13
- package/dist/es/applayoutheader/tabs/index.js +10 -6
- package/dist/es/applayoutsider/menu/Logo.js +5 -1
- package/dist/es/applayoutsider/menu/SearchInput.js +6 -2
- package/dist/es/applayoutsider/menu/SubMenu.js +6 -2
- package/dist/es/asyncdynamicsetting/asyncDynamicDrawer.js +2 -0
- package/dist/es/asyncdynamicsetting/useAsyncDrawer.js +2 -0
- package/dist/es/button/button.js +4 -2
- package/dist/es/button/buttonDownload.js +6 -4
- package/dist/es/button/buttonExport.js +8 -4
- package/dist/es/button/buttonPreview.js +6 -3
- package/dist/es/canvastable/canvasTable.js +33 -29
- package/dist/es/canvastable/components/CanvasTableMenu.js +5 -1
- package/dist/es/canvastable/components/FilterPopover.js +15 -11
- package/dist/es/canvastable/hooks/useProcessedColumns.js +7 -2
- package/dist/es/canvastable/hooks/useSummaryRow.js +6 -2
- package/dist/es/canvastable/hooks/useTableRender.js +5 -1
- package/dist/es/chatroom/chat-room.js +8 -3
- package/dist/es/config/i18n/en/appLayoutHeader.js +70 -0
- package/dist/es/config/i18n/en/appLayoutSider.js +14 -0
- package/dist/es/config/i18n/en/asyncDynamicSetting.js +42 -0
- package/dist/es/config/i18n/en/authLoading.js +6 -0
- package/dist/es/config/i18n/en/button.js +14 -0
- package/dist/es/config/i18n/en/canvasTable.js +50 -0
- package/dist/es/config/i18n/en/chatRoom.js +14 -0
- package/dist/es/config/i18n/en/datePicker.js +22 -0
- package/dist/es/config/i18n/en/detailList.js +6 -0
- package/dist/es/config/i18n/en/differences.js +6 -0
- package/dist/es/config/i18n/en/dynamicSetting.js +72 -0
- package/dist/es/config/i18n/en/electronSignatures.js +173 -0
- package/dist/es/config/i18n/en/enhanceSelect.js +8 -0
- package/dist/es/config/i18n/en/footer.js +8 -0
- package/dist/es/config/i18n/en/form.js +26 -0
- package/dist/es/config/i18n/en/formItem.js +8 -0
- package/dist/es/config/i18n/en/inputNumber.js +7 -0
- package/dist/es/config/i18n/en/login.js +76 -0
- package/dist/es/config/i18n/en/modal.js +8 -0
- package/dist/es/config/i18n/en/notAuthPage.js +8 -0
- package/dist/es/config/i18n/en/notRoutePage.js +8 -0
- package/dist/es/config/i18n/en/operationBtn.js +10 -0
- package/dist/es/config/i18n/en/print.js +16 -0
- package/dist/es/config/i18n/en/select.js +6 -0
- package/dist/es/config/i18n/en/table.js +65 -0
- package/dist/es/config/i18n/en/tabs.js +10 -0
- package/dist/es/config/i18n/en/translationButton.js +26 -0
- package/dist/es/config/i18n/en/tree.js +6 -0
- package/dist/es/config/i18n/en/uploadList.js +82 -0
- package/dist/es/config/i18n/en/ztTransfer.js +14 -0
- package/dist/es/config/i18n/en.js +65 -1
- package/dist/es/config/i18n/i18nInstance.js +33 -0
- package/dist/es/config/i18n/zh_cn/appLayoutHeader.js +70 -0
- package/dist/es/config/i18n/zh_cn/appLayoutSider.js +14 -0
- package/dist/es/config/i18n/zh_cn/asyncDynamicSetting.js +42 -0
- package/dist/es/config/i18n/zh_cn/authLoading.js +6 -0
- package/dist/es/config/i18n/zh_cn/button.js +14 -0
- package/dist/es/config/i18n/zh_cn/canvasTable.js +50 -0
- package/dist/es/config/i18n/zh_cn/chatRoom.js +14 -0
- package/dist/es/config/i18n/zh_cn/datePicker.js +22 -0
- package/dist/es/config/i18n/zh_cn/detailList.js +6 -0
- package/dist/es/config/i18n/zh_cn/differences.js +6 -0
- package/dist/es/config/i18n/zh_cn/dynamicSetting.js +72 -0
- package/dist/es/config/i18n/zh_cn/electronSignatures.js +342 -0
- package/dist/es/config/i18n/zh_cn/enhanceSelect.js +8 -0
- package/dist/es/config/i18n/zh_cn/footer.js +8 -0
- package/dist/es/config/i18n/zh_cn/form.js +26 -0
- package/dist/es/config/i18n/zh_cn/formItem.js +8 -0
- package/dist/es/config/i18n/zh_cn/inputNumber.js +7 -0
- package/dist/es/config/i18n/zh_cn/login.js +76 -0
- package/dist/es/config/i18n/zh_cn/modal.js +8 -0
- package/dist/es/config/i18n/zh_cn/notAuthPage.js +8 -0
- package/dist/es/config/i18n/zh_cn/notRoutePage.js +8 -0
- package/dist/es/config/i18n/zh_cn/operationBtn.js +10 -0
- package/dist/es/config/i18n/zh_cn/print.js +16 -0
- package/dist/es/config/i18n/zh_cn/select.js +6 -0
- package/dist/es/config/i18n/zh_cn/table.js +65 -0
- package/dist/es/config/i18n/zh_cn/tabs.js +10 -0
- package/dist/es/config/i18n/zh_cn/translationButton.js +26 -0
- package/dist/es/config/i18n/zh_cn/tree.js +6 -0
- package/dist/es/config/i18n/zh_cn/uploadList.js +82 -0
- package/dist/es/config/i18n/zh_cn/ztTransfer.js +14 -0
- package/dist/es/config/i18n/zh_cn.d.ts +538 -0
- package/dist/es/config/i18n/zh_cn.js +65 -1
- package/dist/es/config/index.js +1 -1
- package/dist/es/config/useLocale.d.ts +554 -0
- package/dist/es/config/useLocale.js +41 -8
- package/dist/es/datepicker/index.js +9 -3
- package/dist/es/datepicker/utils.js +32 -26
- package/dist/es/detaillist/item.js +7 -2
- package/dist/es/detaillist/list.js +2 -0
- package/dist/es/differences/differences.js +8 -1
- package/dist/es/dynamicsetting/dynamicDrawer.js +41 -24
- package/dist/es/dynamicsetting/hooks.js +2 -0
- package/dist/es/dynamicsetting/moreConfig.js +6 -2
- package/dist/es/dynamicsetting/useSearch.js +5 -1
- package/dist/es/dynamicsetting/useTemplate.js +19 -15
- package/dist/es/electronsignatures/content.js +52 -31
- package/dist/es/electronsignatures/filecomponents/file-upload.js +2 -0
- package/dist/es/electronsignatures/filecomponents/useFetchFileTypeData.js +2 -0
- package/dist/es/enhanceselect/enhance-select.js +7 -3
- package/dist/es/enhanceselect/list-query.js +2 -0
- package/dist/es/enhanceselect/page-query.js +2 -0
- package/dist/es/form/common-search-list.js +7 -2
- package/dist/es/form/form.js +9 -5
- package/dist/es/form/resetButton.js +16 -11
- package/dist/es/form/useCommonSearch.js +12 -9
- package/dist/es/formitem/formItem.js +4 -2
- package/dist/es/inputnumber/inputNumber.js +11 -2
- package/dist/es/inputnumber/utils.js +41 -8
- package/dist/es/login/forget-password.js +9 -5
- package/dist/es/login/index.js +12 -8
- package/dist/es/modal/modal.js +6 -2
- package/dist/es/operationbtn/operationBtn.js +5 -3
- package/dist/es/select/hooks.js +5 -1
- package/dist/es/table/components/ColumnAddDel.js +11 -5
- package/dist/es/table/components/EnhanceBodyCell.js +7 -5
- package/dist/es/table/components/FilterDropdown.js +67 -17
- package/dist/es/table/components/SortTitle.js +8 -4
- package/dist/es/table/components/TableMenu.js +5 -1
- package/dist/es/table/components/TitleOperation.js +5 -1
- package/dist/es/table/components/table-header-operation/FillDown.js +7 -3
- package/dist/es/table/excel.js +8 -4
- package/dist/es/table/hooks/useSelectSubtotal.js +8 -1
- package/dist/es/table/table.js +6 -4
- package/dist/es/table/useColumns.js +8 -4
- package/dist/es/table/useSummary.js +6 -2
- package/dist/es/table/useTableValidate.js +39 -7
- package/dist/es/table/utils.js +10 -5
- package/dist/es/tabs/tab-type.js +10 -1
- package/dist/es/title/title.js +2 -0
- package/dist/es/translationbutton/DownFile.js +8 -4
- package/dist/es/translationbutton/PreviewFile.js +5 -3
- package/dist/es/translationbutton/hooks.js +5 -1
- package/dist/es/translationbutton/translationButton.js +15 -12
- package/dist/es/tree/tree.js +8 -2
- package/dist/es/uploadlist/hooks.js +17 -11
- package/dist/es/uploadlist/uploadList.js +39 -26
- package/dist/es/uploadlist/uploadListDetail.js +15 -11
- package/dist/es/uploadlist/uploadTable.js +23 -19
- package/dist/es/uploadlist/utils.js +8 -1
- package/dist/es/zttransfer/Container.js +5 -1
- package/dist/es/zttransfer/SelectContainer.js +5 -1
- package/dist/es/zttransfer/zt-transfer.js +5 -1
- package/dist/index.build.d.ts +1 -0
- package/dist/index.es.js +1 -0
- package/package.json +5 -2
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { formatUnit, previewFile } from 'zmdms-utils';
|
|
2
|
+
import { getLocale, formatLocaleText } from '../config/useLocale.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../config/ZtxkContext.js';
|
|
5
|
+
import '../config/MyStorage.js';
|
|
2
6
|
import myMessage from '../message/index.js';
|
|
3
7
|
|
|
4
8
|
/**
|
|
@@ -8,8 +12,11 @@ import myMessage from '../message/index.js';
|
|
|
8
12
|
*/
|
|
9
13
|
function toPreviewFile(fileInfo, info) {
|
|
10
14
|
var maxPreviewSize = info.maxPreviewSize, FILE_API_BASEURL = info.FILE_API_BASEURL, uploadTableData = info.uploadTableData;
|
|
15
|
+
var locale = getLocale().UploadList;
|
|
11
16
|
if (fileInfo.attachSize > maxPreviewSize) {
|
|
12
|
-
myMessage.info(
|
|
17
|
+
myMessage.info(formatLocaleText(locale.previewSizeExceeded, {
|
|
18
|
+
size: formatUnit(maxPreviewSize),
|
|
19
|
+
}));
|
|
13
20
|
}
|
|
14
21
|
else {
|
|
15
22
|
previewFile(fileInfo.attachId, fileInfo.attachName, {
|
|
@@ -4,10 +4,14 @@ import { memo, useContext, useCallback } from 'react';
|
|
|
4
4
|
import SelectContainer from './SelectContainer.js';
|
|
5
5
|
import CheckedResult from './CheckedResult.js';
|
|
6
6
|
import { ZtTransferContext } from './context.js';
|
|
7
|
+
import useLocale from '../config/useLocale.js';
|
|
8
|
+
import '../config/ZtxkContext.js';
|
|
9
|
+
import '../config/MyStorage.js';
|
|
7
10
|
|
|
8
11
|
var Container = function (props) {
|
|
9
12
|
var _a = props.mode, mode = _a === void 0 ? "multiple" : _a, value = props.value, completeValue = props.completeValue, onChange = props.onChange, onSearch = props.onSearch, parseCheckedItem = props.parseCheckedItem, parseSearchItem = props.parseSearchItem, children = props.children;
|
|
10
13
|
var _b = useContext(ZtTransferContext).fieldNames, key = _b.key, title = _b.title;
|
|
14
|
+
var locale = useLocale().ZtTransfer;
|
|
11
15
|
// 删除已选中
|
|
12
16
|
var onClearIndex = useCallback(function (index, item) {
|
|
13
17
|
var newValue = value.filter(function (i) { return (item === null || item === void 0 ? void 0 : item[key]) !== i; });
|
|
@@ -43,7 +47,7 @@ var Container = function (props) {
|
|
|
43
47
|
return ((_b = (_a = newItem === null || newItem === void 0 ? void 0 : newItem[title]) === null || _a === void 0 ? void 0 : _a.indexOf) === null || _b === void 0 ? void 0 : _b.call(_a, value)) !== -1;
|
|
44
48
|
})) || []);
|
|
45
49
|
}, [completeValue, parseCheckedItem, title]);
|
|
46
|
-
return (jsx("div", __assign({ className: "container" }, { children: mode === "multiple" ? (jsxs(Fragment, { children: [jsx(SelectContainer, __assign({ title:
|
|
50
|
+
return (jsx("div", __assign({ className: "container" }, { children: mode === "multiple" ? (jsxs(Fragment, { children: [jsx(SelectContainer, __assign({ title: locale.optional, onSearch: onSearch, parseSearchItem: parseSearchItem, value: value, onChange: onSearchChange, mode: mode }, { children: children ? (children({ value: value, completeValue: completeValue, onChange: onChange })) : (jsx("div", { children: "1" })) })), jsx(SelectContainer, __assign({ title: locale.selected, onSearch: onCheckedFilter, checkedLength: (value === null || value === void 0 ? void 0 : value.length) || 0, allowClear: true, onClear: function () {
|
|
47
51
|
onChange && onChange([], []);
|
|
48
52
|
}, isShow: true, parseCheckedItem: parseCheckedItem, onClearIndex: onClearIndex }, { children: jsx(CheckedResult, { dataList: completeValue, parseCheckedItem: parseCheckedItem, onClearIndex: onClearIndex }) }))] })) : (jsx(SelectContainer, __assign({ onSearch: onSearch, parseSearchItem: parseSearchItem, value: value, onChange: onSearchChange, mode: mode }, { children: children ? (children({ value: value, completeValue: completeValue, onChange: onChange })) : (jsx("div", { children: "1" })) }))) })));
|
|
49
53
|
};
|
|
@@ -4,6 +4,9 @@ import { memo, useState, useContext, useCallback } from 'react';
|
|
|
4
4
|
import SearchResult from './SearchResult.js';
|
|
5
5
|
import CheckedResult from './CheckedResult.js';
|
|
6
6
|
import { ZtTransferContext } from './context.js';
|
|
7
|
+
import useLocale from '../config/useLocale.js';
|
|
8
|
+
import '../config/ZtxkContext.js';
|
|
9
|
+
import '../config/MyStorage.js';
|
|
7
10
|
import ButtonCom from '../button/button.js';
|
|
8
11
|
import Input from '../input/input.js';
|
|
9
12
|
import { Spin } from 'antd';
|
|
@@ -14,6 +17,7 @@ var SelectContainer = function (props) {
|
|
|
14
17
|
var _b = useState(false), spinning = _b[0], setSpinning = _b[1];
|
|
15
18
|
var _c = useState(), searchResult = _c[0], setSearchResult = _c[1];
|
|
16
19
|
var key = useContext(ZtTransferContext).fieldNames.key;
|
|
20
|
+
var locale = useLocale().ZtTransfer;
|
|
17
21
|
var myOnClearIndex = useCallback(function (index, item) {
|
|
18
22
|
setSearchResult(function (searchResult) {
|
|
19
23
|
return searchResult.filter(function (sRItem) {
|
|
@@ -22,7 +26,7 @@ var SelectContainer = function (props) {
|
|
|
22
26
|
});
|
|
23
27
|
onClearIndex && onClearIndex(index, item);
|
|
24
28
|
}, [onClearIndex, key]);
|
|
25
|
-
return (jsx("div", __assign({ className: "zt-transfer--container" }, { children: jsxs(Spin, __assign({ spinning: spinning }, { children: [title && (jsxs("div", __assign({ className: "title" }, { children: [jsxs("span", { children: [title, checkedLength ? " (".concat(checkedLength, ")") : null] }), allowClear && (jsx(ButtonCom, __assign({ type: "link", onClick: onClear }, { children:
|
|
29
|
+
return (jsx("div", __assign({ className: "zt-transfer--container" }, { children: jsxs(Spin, __assign({ spinning: spinning }, { children: [title && (jsxs("div", __assign({ className: "title" }, { children: [jsxs("span", { children: [title, checkedLength ? " (".concat(checkedLength, ")") : null] }), allowClear && (jsx(ButtonCom, __assign({ type: "link", onClick: onClear }, { children: locale.clear })))] }))), jsxs("div", __assign({ className: "wrap" }, { children: [jsx(Input.Search, { className: "search", placeholder: locale.searchPlaceholder, onSearch: function (v) { return __awaiter(void 0, void 0, void 0, function () {
|
|
26
30
|
var data;
|
|
27
31
|
return __generator(this, function (_a) {
|
|
28
32
|
switch (_a.label) {
|
|
@@ -3,14 +3,18 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { memo, useMemo } from 'react';
|
|
4
4
|
import Container from './Container.js';
|
|
5
5
|
import { ZtTransferContext } from './context.js';
|
|
6
|
+
import useLocale from '../config/useLocale.js';
|
|
7
|
+
import '../config/ZtxkContext.js';
|
|
8
|
+
import '../config/MyStorage.js';
|
|
6
9
|
import MemoTabs from '../tabs/tabs.js';
|
|
7
10
|
|
|
8
11
|
// 入口组件
|
|
9
12
|
var ZtTransfer = function (_a) {
|
|
10
13
|
var style = _a.style, fieldNames = _a.fieldNames, resetProps = __rest(_a, ["style", "fieldNames"]);
|
|
14
|
+
var locale = useLocale().ZtTransfer;
|
|
11
15
|
var items = [
|
|
12
16
|
{
|
|
13
|
-
label:
|
|
17
|
+
label: locale.orgStructure,
|
|
14
18
|
key: "item-1",
|
|
15
19
|
children: jsx(Container, __assign({}, resetProps)),
|
|
16
20
|
},
|
package/dist/index.build.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as DatePicker } from './es/datepicker/index.js';
|
|
|
5
5
|
export { default as Calendar } from './es/calendar/index.js';
|
|
6
6
|
export { default as TimePicker } from './es/timepicker/index.js';
|
|
7
7
|
export { default as ZtxkContext } from './es/config/ZtxkContext.js';
|
|
8
|
+
export { formatLocaleText, getLocale, default as useLocale } from './es/config/useLocale.js';
|
|
8
9
|
export { default as SuspenseComponent } from './es/suspensecomponent/index.js';
|
|
9
10
|
export { default as ProtectedRoute } from './es/protectedroute/index.js';
|
|
10
11
|
export { ILoginChildrenProps, default as Login } from './es/login/index.js';
|
package/dist/index.es.js
CHANGED
|
@@ -54,6 +54,7 @@ export { default as PreviewFile } from './es/translationbutton/PreviewFile.js';
|
|
|
54
54
|
export { Affix, Anchor, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, Card, Carousel, Cascader, Checkbox, Col, Comment, ConfigProvider, Divider, Drawer, Dropdown, Grid, Image, Layout, List, Mentions, Menu, PageHeader, Popconfirm, Popover, Progress, Radio, Rate, Result, Row, Segmented, Skeleton, Slider, Space, Spin, Statistic, Steps, Switch, Timeline, Tooltip, Transfer, Typography, Upload, notification } from 'antd';
|
|
55
55
|
export { default as Button } from './es/button/button.js';
|
|
56
56
|
export { default as Input } from './es/input/input.js';
|
|
57
|
+
export { formatLocaleText, getLocale, default as useLocale } from './es/config/useLocale.js';
|
|
57
58
|
export { default as Form } from './es/form/form.js';
|
|
58
59
|
export { default as Modal } from './es/modal/modal.js';
|
|
59
60
|
export { default as NotAuthPage } from './es/notauthpage/notAuthPage.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zmdms-webui",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "dist/index.es.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -15,12 +15,14 @@
|
|
|
15
15
|
"antd": ">=4.24.8",
|
|
16
16
|
"dayjs": ">=1.11.7",
|
|
17
17
|
"html2canvas": ">=1.4.1",
|
|
18
|
+
"i18next": ">=22.4.12",
|
|
18
19
|
"jspdf": ">=2.5.1",
|
|
19
20
|
"lodash": ">=4.17.21",
|
|
20
21
|
"print-js": ">=1.6.0",
|
|
21
22
|
"react": ">=16.8.0",
|
|
22
23
|
"react-dom": ">=16.8.0",
|
|
23
24
|
"react-draggable": ">=4.4.5",
|
|
25
|
+
"react-i18next": ">=12.2.0",
|
|
24
26
|
"react-resizable": "^3.0.5",
|
|
25
27
|
"react-router-dom": ">=6",
|
|
26
28
|
"zmdms-utils": ">=0.0.1"
|
|
@@ -29,7 +31,8 @@
|
|
|
29
31
|
"dist/es/**/style/*",
|
|
30
32
|
"*.less",
|
|
31
33
|
"src/styles/*.less",
|
|
32
|
-
"src/common/init.ts"
|
|
34
|
+
"src/common/init.ts",
|
|
35
|
+
"src/components/config/i18n/i18nInstance.ts"
|
|
33
36
|
],
|
|
34
37
|
"scripts": {
|
|
35
38
|
"start": "craco start",
|