@pisell/materials 2.2.2 → 2.2.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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +13 -13
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +12 -12
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +143 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.less +29 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +87 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +8 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.js +41 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.less +5 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.d.ts +4 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +97 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +137 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.less +48 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +10 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +149 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.less +97 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +8 -0
- package/es/components/table/Actions/component/ExportImport/index.js +232 -0
- package/es/components/table/Actions/component/ExportImport/index.less +194 -0
- package/es/components/table/Actions/component/ExportImport/utils/date.d.ts +8 -0
- package/es/components/table/Actions/component/ExportImport/utils/date.js +19 -0
- package/es/components/table/Actions/component/ExportImport/utils/download.d.ts +3 -0
- package/es/components/table/Actions/component/ExportImport/utils/download.js +39 -0
- package/es/components/table/Actions/component/ExportImport/utils/file.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/utils/file.js +21 -0
- package/es/components/table/Actions/index.d.ts +3 -2
- package/es/components/table/Actions/index.js +12 -8
- package/es/components/table/BasicTable/index.js +11 -1
- package/es/components/table/Table/index.js +6 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useTableSetting.d.ts +2 -1
- package/es/components/table/hooks/useTableSetting.js +2 -1
- package/es/components/table/index.js +15 -13
- package/es/components/table/model.d.ts +2 -0
- package/es/components/table/model.js +15 -1
- package/es/components/table/serve.d.ts +11 -0
- package/es/components/table/serve.js +38 -0
- package/es/components/table/status.d.ts +19 -0
- package/es/components/table/status.js +26 -0
- package/es/components/table/types.d.ts +20 -0
- package/es/components/table/utils.d.ts +15 -0
- package/es/components/table/utils.js +26 -0
- package/es/locales/en-US.d.ts +46 -0
- package/es/locales/en-US.js +59 -1
- package/es/locales/zh-CN.d.ts +46 -0
- package/es/locales/zh-CN.js +59 -1
- package/es/locales/zh-TW.d.ts +46 -0
- package/es/locales/zh-TW.js +59 -1
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +150 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.less +29 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +78 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +8 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.js +60 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.less +5 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/Detail.d.ts +4 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/Detail.js +117 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +141 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.less +48 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +10 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +124 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.less +97 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +8 -0
- package/lib/components/table/Actions/component/ExportImport/index.js +210 -0
- package/lib/components/table/Actions/component/ExportImport/index.less +194 -0
- package/lib/components/table/Actions/component/ExportImport/utils/date.d.ts +8 -0
- package/lib/components/table/Actions/component/ExportImport/utils/date.js +49 -0
- package/lib/components/table/Actions/component/ExportImport/utils/download.d.ts +3 -0
- package/lib/components/table/Actions/component/ExportImport/utils/download.js +62 -0
- package/lib/components/table/Actions/component/ExportImport/utils/file.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/utils/file.js +55 -0
- package/lib/components/table/Actions/index.d.ts +3 -2
- package/lib/components/table/Actions/index.js +11 -7
- package/lib/components/table/BasicTable/index.js +9 -0
- package/lib/components/table/Table/index.js +6 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +2 -1
- package/lib/components/table/hooks/useTableSetting.js +2 -1
- package/lib/components/table/index.js +14 -12
- package/lib/components/table/model.d.ts +2 -0
- package/lib/components/table/model.js +11 -1
- package/lib/components/table/serve.d.ts +11 -0
- package/lib/components/table/serve.js +41 -0
- package/lib/components/table/status.d.ts +19 -0
- package/lib/components/table/status.js +55 -0
- package/lib/components/table/types.d.ts +20 -0
- package/lib/components/table/utils.d.ts +15 -0
- package/lib/components/table/utils.js +40 -0
- package/lib/locales/en-US.d.ts +46 -0
- package/lib/locales/en-US.js +51 -1
- package/lib/locales/zh-CN.d.ts +46 -0
- package/lib/locales/zh-CN.js +51 -1
- package/lib/locales/zh-TW.d.ts +46 -0
- package/lib/locales/zh-TW.js +51 -1
- package/lowcode/table/meta.ts +84 -1
- package/lowcode/table/snippets.ts +8 -0
- package/package.json +3 -3
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
.default-view {
|
|
2
|
+
margin: 16px 0;
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
text-align: center;
|
|
7
|
+
background: #f5f5f5;
|
|
8
|
+
border: 1px dashed #d9d9d9;
|
|
9
|
+
border-radius: 2px;
|
|
10
|
+
cursor: pointer;
|
|
11
|
+
-webkit-transition: border-color 0.3s;
|
|
12
|
+
transition: border-color 0.3s;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
padding: 0 16px;
|
|
15
|
+
|
|
16
|
+
.icon-wrap {
|
|
17
|
+
color: var(--theme-light-color);
|
|
18
|
+
font-size: 42px;
|
|
19
|
+
margin: 16px 0 0 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.text {
|
|
23
|
+
margin: 16px 0 0 0;
|
|
24
|
+
color: rgba(0, 0, 0, 0.85);
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.hint {
|
|
29
|
+
color: rgba(0, 0, 0, 0.45);
|
|
30
|
+
font-size: 14px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.upload-input {
|
|
35
|
+
position: absolute;
|
|
36
|
+
left: 0;
|
|
37
|
+
top: 0;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
opacity: 0;
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.error-hint {
|
|
45
|
+
display: flex;
|
|
46
|
+
width: 100%;
|
|
47
|
+
border-radius: 4px;
|
|
48
|
+
padding: 15px 20px;
|
|
49
|
+
border: 1px solid #ee827a;
|
|
50
|
+
background: #fff5e9;
|
|
51
|
+
margin-bottom: 20px;
|
|
52
|
+
|
|
53
|
+
.error-icon {
|
|
54
|
+
color: #ee827a;
|
|
55
|
+
font-size: 20px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.text {
|
|
59
|
+
margin-left: 10px;
|
|
60
|
+
flex: 1 1;
|
|
61
|
+
font-size: 14px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.file-list {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: space-between;
|
|
69
|
+
width: 100%;
|
|
70
|
+
height: 115px;
|
|
71
|
+
border: 1px dashed #d9d9d9;
|
|
72
|
+
border-radius: 2px;
|
|
73
|
+
margin: 16px 0;
|
|
74
|
+
padding: 0 30px;
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
|
|
77
|
+
.file-icon {
|
|
78
|
+
font-size: 50px;
|
|
79
|
+
color: var(--theme-color);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.file-name {
|
|
83
|
+
text-align: left;
|
|
84
|
+
flex: 1;
|
|
85
|
+
max-width: 300px;
|
|
86
|
+
margin-left: 20px;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.import-title{
|
|
94
|
+
a{
|
|
95
|
+
margin-left: 10px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ExportImportType } from "../../../types";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
declare type ExportImportProps = {
|
|
5
|
+
exportImport: ExportImportType;
|
|
6
|
+
};
|
|
7
|
+
declare const ExportImport: ({ exportImport }: ExportImportProps) => React.JSX.Element;
|
|
8
|
+
export default ExportImport;
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/table/Actions/component/ExportImport/index.tsx
|
|
30
|
+
var ExportImport_exports = {};
|
|
31
|
+
__export(ExportImport_exports, {
|
|
32
|
+
default: () => ExportImport_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ExportImport_exports);
|
|
35
|
+
var import_ImportExport = __toESM(require("@pisell/icon/es/ImportExport"));
|
|
36
|
+
var import_ahooks = require("ahooks");
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../../../../hooks/useEngineContext"));
|
|
40
|
+
var import_locales = require("../../../../../locales/index");
|
|
41
|
+
var import_serve = require("../../../serve");
|
|
42
|
+
var import_status = require("../../../status");
|
|
43
|
+
var import_utils = require("../../../utils");
|
|
44
|
+
var import_ButtonIcon = __toESM(require("../ButtonIcon"));
|
|
45
|
+
var import_ExportFile = __toESM(require("./components/ExportFile"));
|
|
46
|
+
var import_ExportTable = __toESM(require("./components/ExportTable"));
|
|
47
|
+
var import_function = require("./components/ExportTable/function");
|
|
48
|
+
var import_ImportLog = __toESM(require("./components/ImportLog"));
|
|
49
|
+
var import_ImportTable = __toESM(require("./components/ImportTable"));
|
|
50
|
+
var import_hooks = require("../../../../../hooks");
|
|
51
|
+
var import_model = require("../../../model");
|
|
52
|
+
var import_index = require("./index.less");
|
|
53
|
+
var Com = {
|
|
54
|
+
import: import_ImportTable.default,
|
|
55
|
+
export: import_ExportTable.default,
|
|
56
|
+
export_file: import_ExportFile.default,
|
|
57
|
+
import_log: import_ImportLog.default
|
|
58
|
+
};
|
|
59
|
+
var ExportImport = ({ exportImport }) => {
|
|
60
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
61
|
+
const [file, setFile] = (0, import_react.useState)(null);
|
|
62
|
+
const [type, setType] = (0, import_react.useState)(import_status.defaultOptions.exportType);
|
|
63
|
+
const [value, setValue] = (0, import_react.useState)("");
|
|
64
|
+
const [errorStatus, setErrorStatus] = (0, import_react.useState)();
|
|
65
|
+
const { state } = (0, import_hooks.useSharedState)(import_model.Context);
|
|
66
|
+
const { originResultDataSource, currentDataSource } = state;
|
|
67
|
+
const context = (0, import_useEngineContext.default)();
|
|
68
|
+
import_utils.request.setRequest(context.appHelper.utils.request);
|
|
69
|
+
const _items = (0, import_react.useMemo)(() => {
|
|
70
|
+
const result = Object.entries(import_status.exportImportOptions).map(([key, value2]) => {
|
|
71
|
+
return {
|
|
72
|
+
key,
|
|
73
|
+
label: value2
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
return result;
|
|
77
|
+
}, []);
|
|
78
|
+
const Content = (0, import_react.useMemo)(() => {
|
|
79
|
+
if (!value)
|
|
80
|
+
return null;
|
|
81
|
+
return Com[value];
|
|
82
|
+
}, [value]);
|
|
83
|
+
const _footer = (0, import_react.useMemo)(() => {
|
|
84
|
+
const types = import_status.defaultOptions.footerHintTypes;
|
|
85
|
+
if (types.includes(value)) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
}, [value]);
|
|
89
|
+
const _width = (0, import_react.useMemo)(() => {
|
|
90
|
+
const types = import_status.defaultOptions.footerHintTypes;
|
|
91
|
+
return types.includes(value) ? 900 : import_status.defaultOptions.importValue ? 600 : 400;
|
|
92
|
+
}, [value]);
|
|
93
|
+
const _title = (0, import_react.useMemo)(() => {
|
|
94
|
+
if (!value)
|
|
95
|
+
return null;
|
|
96
|
+
const types = import_status.defaultOptions.okShowButtonTypes;
|
|
97
|
+
if (types.includes(value) && (exportImport == null ? void 0 : exportImport.title)) {
|
|
98
|
+
return `${import_status.exportImportOptions[value]}${exportImport.title}`;
|
|
99
|
+
}
|
|
100
|
+
return import_status.exportImportOptions[value];
|
|
101
|
+
}, [value, exportImport == null ? void 0 : exportImport.title]);
|
|
102
|
+
const _okText = (0, import_react.useMemo)(() => {
|
|
103
|
+
const types = import_status.defaultOptions.okShowButtonTypes;
|
|
104
|
+
if (types.includes(value)) {
|
|
105
|
+
return value === import_status.defaultOptions.exportValue ? (0, import_locales.getText)("table-action-export-import-button") : (0, import_locales.getText)("table-action-export-import-button-import");
|
|
106
|
+
}
|
|
107
|
+
}, [value]);
|
|
108
|
+
const handleClick = (e) => {
|
|
109
|
+
const value2 = e.key;
|
|
110
|
+
setValue(value2);
|
|
111
|
+
setOpen(true);
|
|
112
|
+
};
|
|
113
|
+
const onCancel = () => {
|
|
114
|
+
setOpen(false);
|
|
115
|
+
setValue("");
|
|
116
|
+
setFile(null);
|
|
117
|
+
setErrorStatus(null);
|
|
118
|
+
setType(import_status.defaultOptions.exportType);
|
|
119
|
+
};
|
|
120
|
+
const _batchImport = (0, import_ahooks.useRequest)(import_serve.batchImport, {
|
|
121
|
+
manual: true,
|
|
122
|
+
debounceWait: 200,
|
|
123
|
+
onSuccess: () => {
|
|
124
|
+
setErrorStatus(null);
|
|
125
|
+
import_antd.message.destroy();
|
|
126
|
+
import_antd.message.success({
|
|
127
|
+
content: (0, import_locales.getText)("table-action-export-import-import-success"),
|
|
128
|
+
key: value
|
|
129
|
+
});
|
|
130
|
+
onCancel();
|
|
131
|
+
},
|
|
132
|
+
onError: (err) => {
|
|
133
|
+
import_antd.message.destroy();
|
|
134
|
+
setErrorStatus((err == null ? void 0 : err.message) || null);
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
const onOk = async () => {
|
|
138
|
+
const { formId, formCode } = exportImport;
|
|
139
|
+
if (value === import_status.defaultOptions.exportValue) {
|
|
140
|
+
const _params = {
|
|
141
|
+
type,
|
|
142
|
+
originDataSource: originResultDataSource,
|
|
143
|
+
currentDataSource
|
|
144
|
+
};
|
|
145
|
+
const result = await (0, import_function.batchExport)(_params, exportImport);
|
|
146
|
+
if (result) {
|
|
147
|
+
onCancel();
|
|
148
|
+
}
|
|
149
|
+
} else if (value === import_status.defaultOptions.importValue) {
|
|
150
|
+
const formData = new FormData();
|
|
151
|
+
formData.append("file", file);
|
|
152
|
+
if (formId) {
|
|
153
|
+
formData.append("form_id", formId);
|
|
154
|
+
}
|
|
155
|
+
if (formCode) {
|
|
156
|
+
formData.append("code", formCode);
|
|
157
|
+
}
|
|
158
|
+
if (formData) {
|
|
159
|
+
import_antd.message.loading({ content: "Loading...", key: value });
|
|
160
|
+
_batchImport.run(formData);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(
|
|
165
|
+
import_antd.Dropdown,
|
|
166
|
+
{
|
|
167
|
+
menu: {
|
|
168
|
+
items: _items,
|
|
169
|
+
selectable: true,
|
|
170
|
+
onClick: handleClick
|
|
171
|
+
},
|
|
172
|
+
placement: "bottomRight"
|
|
173
|
+
},
|
|
174
|
+
/* @__PURE__ */ import_react.default.createElement(import_ButtonIcon.default, { isActive: false }, /* @__PURE__ */ import_react.default.createElement(import_ImportExport.default, { style: { cursor: "pointer", fontSize: 20 } }))
|
|
175
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
176
|
+
import_antd.Modal,
|
|
177
|
+
{
|
|
178
|
+
title: _title,
|
|
179
|
+
footer: _footer,
|
|
180
|
+
width: _width,
|
|
181
|
+
okText: _okText,
|
|
182
|
+
open,
|
|
183
|
+
className: "export-import-modal",
|
|
184
|
+
onCancel,
|
|
185
|
+
bodyStyle: { padding: "0px" },
|
|
186
|
+
destroyOnClose: true,
|
|
187
|
+
onOk,
|
|
188
|
+
cancelText: (0, import_locales.getText)("table-action-export-import-cancel"),
|
|
189
|
+
okButtonProps: {
|
|
190
|
+
disabled: value === import_status.defaultOptions.importValue && (!file || !!errorStatus)
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
194
|
+
Content,
|
|
195
|
+
{
|
|
196
|
+
exportImport,
|
|
197
|
+
errorStatus,
|
|
198
|
+
onChange: (e) => {
|
|
199
|
+
if (value === import_status.defaultOptions.importValue) {
|
|
200
|
+
setFile(e);
|
|
201
|
+
setErrorStatus(null);
|
|
202
|
+
} else if (value === import_status.defaultOptions.exportValue) {
|
|
203
|
+
setType(e);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
)
|
|
208
|
+
));
|
|
209
|
+
};
|
|
210
|
+
var ExportImport_default = ExportImport;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
.export-import-modal{
|
|
2
|
+
.pisell-lowcode-modal-header{
|
|
3
|
+
padding: 0 0 6px 0!important;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.pisell-lowcode-table-content{
|
|
7
|
+
.pisell-lowcode-table-cell{
|
|
8
|
+
padding: 16px!important;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.goods-list-page {
|
|
14
|
+
padding: 0 30px;
|
|
15
|
+
|
|
16
|
+
.header {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: space-between;
|
|
20
|
+
padding: 22px 0;
|
|
21
|
+
font-size: 20px;
|
|
22
|
+
font-weight: 650;
|
|
23
|
+
line-height: 28px;
|
|
24
|
+
color: #252a2d;
|
|
25
|
+
|
|
26
|
+
.action-list {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
min-height: 40px;
|
|
30
|
+
|
|
31
|
+
.import-btn,
|
|
32
|
+
.export-btn {
|
|
33
|
+
height: 28px;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
font-weight: 650;
|
|
36
|
+
line-height: 28px;
|
|
37
|
+
color: #252a2d;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.content {
|
|
44
|
+
padding: 20px 0;
|
|
45
|
+
background: #ffffff;
|
|
46
|
+
border-radius: var(--small-border-radius);
|
|
47
|
+
|
|
48
|
+
.search-wrap {
|
|
49
|
+
width: 100%;
|
|
50
|
+
box-sizing: border-box;
|
|
51
|
+
padding: 10px 32px 0 32px;
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
|
|
55
|
+
.search-input {
|
|
56
|
+
flex: 1;
|
|
57
|
+
margin-right: 20px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.phone-wrap {
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
align-items: flex-end;
|
|
63
|
+
|
|
64
|
+
.search-input {
|
|
65
|
+
width: 100%;
|
|
66
|
+
margin-bottom: 16px;
|
|
67
|
+
margin-right: 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.cover-wrap {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
width: 64px;
|
|
78
|
+
height: 64px;
|
|
79
|
+
opacity: 1;
|
|
80
|
+
border-radius: 2px;
|
|
81
|
+
margin: 0 auto;
|
|
82
|
+
|
|
83
|
+
img {
|
|
84
|
+
width: 100%;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.goods-status {
|
|
89
|
+
display: inline-block;
|
|
90
|
+
min-width: 58px;
|
|
91
|
+
border-radius: 16px;
|
|
92
|
+
font-size: 13px;
|
|
93
|
+
|
|
94
|
+
text-align: center;
|
|
95
|
+
padding: 2px 8px;
|
|
96
|
+
|
|
97
|
+
&.release {
|
|
98
|
+
background: #6fa629;
|
|
99
|
+
color: #ffffff;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&.pending {
|
|
103
|
+
background: #ec808d;
|
|
104
|
+
color: #fff;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.archived {
|
|
108
|
+
background: #e4e5e7;
|
|
109
|
+
color: #252a2d;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&.draft {
|
|
113
|
+
background: #a4e8f2;
|
|
114
|
+
color: #202223;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.spin {
|
|
121
|
+
:global {
|
|
122
|
+
.ant-spin {
|
|
123
|
+
max-height: 10000px !important;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.empty-wrap {
|
|
129
|
+
min-height: 550px;
|
|
130
|
+
|
|
131
|
+
.empty-content {
|
|
132
|
+
display: flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
flex-direction: column;
|
|
135
|
+
height: 550px;
|
|
136
|
+
background: #ffffff;
|
|
137
|
+
border-radius: 4px;
|
|
138
|
+
|
|
139
|
+
.icon {
|
|
140
|
+
font-size: 170px;
|
|
141
|
+
margin-top: 70px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.title {
|
|
145
|
+
margin-top: 40px;
|
|
146
|
+
height: 22px;
|
|
147
|
+
font-size: 16px;
|
|
148
|
+
font-weight: 650;
|
|
149
|
+
line-height: 28px;
|
|
150
|
+
color: #252a2d;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.describe {
|
|
154
|
+
margin-top: 22px;
|
|
155
|
+
margin-bottom: 9px;
|
|
156
|
+
max-width: 390px;
|
|
157
|
+
height: 86px;
|
|
158
|
+
font-size: 14px;
|
|
159
|
+
|
|
160
|
+
font-weight: 400;
|
|
161
|
+
line-height: 22px;
|
|
162
|
+
color: #707070;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.footer {
|
|
168
|
+
margin-top: 30px;
|
|
169
|
+
height: 17px;
|
|
170
|
+
font-size: 12px;
|
|
171
|
+
|
|
172
|
+
font-weight: 400;
|
|
173
|
+
line-height: 17px;
|
|
174
|
+
color: #8c8c8c;
|
|
175
|
+
text-align: center;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.phone-wrap {
|
|
179
|
+
padding: 0 16px;
|
|
180
|
+
|
|
181
|
+
.content {
|
|
182
|
+
.search-wrap {
|
|
183
|
+
padding: 10px 16px 0 16px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.list-wrap {
|
|
187
|
+
padding: 16px;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.list-wrap {
|
|
193
|
+
padding: 20px 32px;
|
|
194
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/table/Actions/component/ExportImport/utils/date.ts
|
|
30
|
+
var date_exports = {};
|
|
31
|
+
__export(date_exports, {
|
|
32
|
+
formatDate: () => formatDate
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(date_exports);
|
|
35
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
36
|
+
var import_locale = require("../../../../../../utils/locale");
|
|
37
|
+
var formatDate = (date, format) => {
|
|
38
|
+
if (!date) {
|
|
39
|
+
return date;
|
|
40
|
+
}
|
|
41
|
+
const lang = (0, import_locale.getCurrentLocale)();
|
|
42
|
+
let _format = format || ["HH:mm:ss DD/MM/YYYY", "YYYY-MM-DD HH:mm:ss"];
|
|
43
|
+
let type = lang === "en-US" || lang === "en" ? _format[0] : _format[1];
|
|
44
|
+
return (0, import_dayjs.default)(date).format(type);
|
|
45
|
+
};
|
|
46
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
47
|
+
0 && (module.exports = {
|
|
48
|
+
formatDate
|
|
49
|
+
});
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/table/Actions/component/ExportImport/utils/download.ts
|
|
20
|
+
var download_exports = {};
|
|
21
|
+
__export(download_exports, {
|
|
22
|
+
default: () => download_default,
|
|
23
|
+
windowOpen: () => windowOpen
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(download_exports);
|
|
26
|
+
var windowOpen = (url, target) => {
|
|
27
|
+
let oWindow = window.open("", target || "_blank");
|
|
28
|
+
oWindow.location = url;
|
|
29
|
+
};
|
|
30
|
+
var download_default = (sUrl, fileName) => {
|
|
31
|
+
let isChrome = navigator.userAgent.toLowerCase().indexOf("chrome") > -1;
|
|
32
|
+
let isSafari = navigator.userAgent.toLowerCase().indexOf("safari") > -1;
|
|
33
|
+
if (/(iP)/g.test(navigator.userAgent)) {
|
|
34
|
+
alert(
|
|
35
|
+
"Your device does not support files downloading. Please try again in desktop browser."
|
|
36
|
+
);
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
if (isChrome || isSafari) {
|
|
40
|
+
let link = document.createElement("a");
|
|
41
|
+
link.href = sUrl;
|
|
42
|
+
if (link.download !== void 0) {
|
|
43
|
+
let _fileName = fileName || sUrl.substring(sUrl.lastIndexOf("/") + 1, sUrl.length);
|
|
44
|
+
link.download = _fileName;
|
|
45
|
+
}
|
|
46
|
+
if (document.createEvent) {
|
|
47
|
+
let e = document.createEvent("MouseEvents");
|
|
48
|
+
e.initEvent("click", true, true);
|
|
49
|
+
link.dispatchEvent(e);
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (sUrl.indexOf("?") === -1) {
|
|
54
|
+
sUrl += "?download";
|
|
55
|
+
}
|
|
56
|
+
windowOpen(sUrl, "_self");
|
|
57
|
+
return true;
|
|
58
|
+
};
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
windowOpen
|
|
62
|
+
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/table/Actions/component/ExportImport/utils/file.ts
|
|
30
|
+
var file_exports = {};
|
|
31
|
+
__export(file_exports, {
|
|
32
|
+
copyText: () => copyText,
|
|
33
|
+
getFileDateName: () => getFileDateName
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(file_exports);
|
|
36
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
37
|
+
var import_antd = require("antd");
|
|
38
|
+
var import_locales = require("../../../../../../locales/index");
|
|
39
|
+
var getFileDateName = () => {
|
|
40
|
+
return "-" + (0, import_dayjs.default)().format("YYYY-MM-DD-HH-mm-ss");
|
|
41
|
+
};
|
|
42
|
+
var copyText = (text) => {
|
|
43
|
+
let input = document.createElement("input");
|
|
44
|
+
input.setAttribute("value", text);
|
|
45
|
+
document.body.appendChild(input);
|
|
46
|
+
input.select();
|
|
47
|
+
document.execCommand("copy");
|
|
48
|
+
document.body.removeChild(input);
|
|
49
|
+
import_antd.message.success((0, import_locales.getText)("table-action-export-import-table-success-copy"));
|
|
50
|
+
};
|
|
51
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
52
|
+
0 && (module.exports = {
|
|
53
|
+
copyText,
|
|
54
|
+
getFileDateName
|
|
55
|
+
});
|