@nocobase/plugin-action-import 2.0.0-alpha.9 → 2.0.0-beta.2
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/client/index.js +1 -1
- package/dist/client/models/getOptionFields.d.ts +9 -0
- package/dist/externalVersion.js +10 -11
- package/dist/locale/de-DE.json +41 -39
- package/dist/locale/en-US.json +42 -31
- package/dist/locale/es-ES.json +43 -17
- package/dist/locale/fr-FR.json +53 -0
- package/dist/locale/hu-HU.json +53 -0
- package/dist/locale/id-ID.json +53 -0
- package/dist/locale/it-IT.json +40 -38
- package/dist/locale/ja-JP.json +42 -19
- package/dist/locale/ko-KR.json +47 -22
- package/dist/locale/nl-NL.json +51 -48
- package/dist/locale/pt-BR.json +44 -17
- package/dist/locale/ru-RU.json +54 -0
- package/dist/locale/tr-TR.json +53 -0
- package/dist/locale/uk-UA.json +53 -0
- package/dist/locale/vi-VN.json +53 -0
- package/dist/locale/zh-CN.json +41 -41
- package/dist/locale/zh-TW.json +53 -0
- package/dist/node_modules/exceljs/package.json +1 -1
- package/dist/node_modules/xlsx/package.json +1 -1
- package/dist/server/errors.d.ts +9 -1
- package/dist/server/errors.js +2 -3
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.js +15 -8
- package/dist/server/locale/zh-CN.json +3 -2
- package/dist/server/services/xlsx-importer.d.ts +2 -1
- package/dist/server/services/xlsx-importer.js +51 -18
- package/package.json +5 -2
- /package/dist/client/{ImportActionModel.d.ts → models/ImportActionModel.d.ts} +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add importable field": "Добавить импортируемое поле",
|
|
3
|
+
"Columns configuration is empty": "Конфигурация столбцов пуста",
|
|
4
|
+
"Custom column title": "Пользовательский заголовок столбца",
|
|
5
|
+
"Done": "Готово",
|
|
6
|
+
"Download template": "Скачать шаблон",
|
|
7
|
+
"Download tips": "- Скачайте шаблон и заполните данные в соответствии с форматом \\r\\n - Импортируется только первый лист \\r\\n - Не изменяйте заголовки шаблона, чтобы избежать ошибок импорта",
|
|
8
|
+
"Excel data importing": "Импорт данных Excel",
|
|
9
|
+
"Failed to import row {{row}} {{message}} row data: {{data}}": "Не удалось импортировать строку {{row}} {{message}} данные строки: {{data}}",
|
|
10
|
+
"Failed to import row {{row}}, {{message}}, row data: {{data}}": "Не удалось импортировать строку {{row}}, {{message}}, данные строки: {{data}}",
|
|
11
|
+
"Field description": "Описание поля",
|
|
12
|
+
"Field description placeholder": "Введите описание поля",
|
|
13
|
+
"Field not found: {{field}}": "Поле не найдено: {{field}}",
|
|
14
|
+
"Field {{fieldName}} does not exist": "Поле {{fieldName}} не существует",
|
|
15
|
+
"File size cannot exceed 10M": "Размер файла не должен превышать 10 МБ",
|
|
16
|
+
"Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"": "Несоответствие заголовка в столбце {{column}}: ожидалось \"{{expected}}\", получено \"{{actual}}\"",
|
|
17
|
+
"Headers not found. Expected headers: {{headers}}": "Заголовки не найдены. Ожидаемые заголовки: {{headers}}",
|
|
18
|
+
"Illegal percentage format": "Недопустимый формат процента",
|
|
19
|
+
"Import": "Импорт",
|
|
20
|
+
"Import Data": "Импортировать данные",
|
|
21
|
+
"Import action settings": "Import action settings",
|
|
22
|
+
"Import completed": "Импорт завершен",
|
|
23
|
+
"Import explain": "Руководство",
|
|
24
|
+
"Import warnings": "Вы можете импортировать до {{limit}} строк данных за раз, излишки будут проигнорированы.",
|
|
25
|
+
"ImportResult": "Результат импорта",
|
|
26
|
+
"Imported template does not match, please download again.": "Импортированный шаблон не соответствует, пожалуйста, скачайте снова.",
|
|
27
|
+
"Incorrect date format": "Неверный формат даты",
|
|
28
|
+
"Incorrect email format": "Неверный формат email",
|
|
29
|
+
"Incorrect time format": "Неверный формат времени",
|
|
30
|
+
"No": "Нет",
|
|
31
|
+
"No data to import": "Нет данных для импорта",
|
|
32
|
+
"Only one file is allowed to be uploaded": "Разрешена загрузка только одного файла",
|
|
33
|
+
"Please select": "Пожалуйста, выберите",
|
|
34
|
+
"Please upload the file of Excel": "Пожалуйста, загрузите файл Excel",
|
|
35
|
+
"Skipped records": "Пропущенные записи",
|
|
36
|
+
"Start import": "Начать импорт",
|
|
37
|
+
"Step 1: Download template": "Шаг 1: Скачать шаблон",
|
|
38
|
+
"Step 2: Upload Excel": "Шаг 2: Загрузить Excel",
|
|
39
|
+
"Step 3: Import options": "Шаг 3: Параметры импорта",
|
|
40
|
+
"Successfully imported": "Успешно импортировано",
|
|
41
|
+
"Task result": "Результат задачи",
|
|
42
|
+
"To download the failure data": "Скачать данные об ошибках",
|
|
43
|
+
"Total records": "Всего записей",
|
|
44
|
+
"Unique constraint error, fields:": "Unique constraint error, fields:",
|
|
45
|
+
"Updated records": "Обновленные записи",
|
|
46
|
+
"Upload placeholder": "Перетащите файл сюда или нажмите для загрузки.",
|
|
47
|
+
"View result": "Просмотреть результат",
|
|
48
|
+
"Yes": "Да",
|
|
49
|
+
"another import action is running, please try again later.": "Действие импорта уже выполняется, попробуйте позже.",
|
|
50
|
+
"can not find value": "Значение не найдено",
|
|
51
|
+
"import-error": "Не удалось импортировать строку {{rowIndex}} данные строки: {{rowData}} причина: {{causeMessage}}",
|
|
52
|
+
"password is empty": "Пароль пуст",
|
|
53
|
+
"{{successCount}} records have been successfully imported": "{{successCount}} записей успешно импортировано"
|
|
54
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add importable field": "Add importable field",
|
|
3
|
+
"Columns configuration is empty": "Columns configuration is empty",
|
|
4
|
+
"Custom column title": "Custom column title",
|
|
5
|
+
"Done": "Done",
|
|
6
|
+
"Download template": "Download template",
|
|
7
|
+
"Download tips": "- Download the template and fill in the data according to the format \r\n - Import only the first worksheet \r\n - Do not change the header of the template to prevent import failure",
|
|
8
|
+
"Excel data importing": "Excel data importing",
|
|
9
|
+
"Failed to import row {{row}}, {{message}}, row data: {{data}}": "Failed to import row {{row}}, {{message}}, row data: {{data}}",
|
|
10
|
+
"Field description": "Field description",
|
|
11
|
+
"Field description placeholder": "Enter field description",
|
|
12
|
+
"Field not found: {{field}}": "Field not found: {{field}}",
|
|
13
|
+
"Field {{fieldName}} does not exist": "Field {{fieldName}} does not exist",
|
|
14
|
+
"File size cannot exceed 10M": "File size cannot exceed 10M",
|
|
15
|
+
"Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"": "Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"",
|
|
16
|
+
"Headers not found. Expected headers: {{headers}}": "Headers not found. Expected headers: {{headers}}",
|
|
17
|
+
"Illegal percentage format": "Illegal percentage format",
|
|
18
|
+
"Import": "Import",
|
|
19
|
+
"Import Data": "Import Data",
|
|
20
|
+
"Import action settings": "Import action settings",
|
|
21
|
+
"Import completed": "Import completed",
|
|
22
|
+
"Import explain": "Guide",
|
|
23
|
+
"Import warnings": "You can import up to {{limit}} rows of data at a time, any excess will be ignored.",
|
|
24
|
+
"ImportResult": "ImportResult",
|
|
25
|
+
"Imported template does not match, please download again.": "Imported template does not match, please download again.",
|
|
26
|
+
"Incorrect date format": "Incorrect date format",
|
|
27
|
+
"Incorrect email format": "Incorrect email format",
|
|
28
|
+
"Incorrect time format": "Incorrect time format",
|
|
29
|
+
"No": "No",
|
|
30
|
+
"No data to import": "No data to import",
|
|
31
|
+
"Only one file is allowed to be uploaded": "Only one file is allowed to be uploaded",
|
|
32
|
+
"Please select": "Please select",
|
|
33
|
+
"Please upload the file of Excel": "Please upload the file of Excel",
|
|
34
|
+
"Skipped records": "Skipped records",
|
|
35
|
+
"Start import": "Start import",
|
|
36
|
+
"Step 1: Download template": "Step 1: Download template",
|
|
37
|
+
"Step 2: Upload Excel": "Step 2: Upload Excel",
|
|
38
|
+
"Step 3: Import options": "Step 3: Import options",
|
|
39
|
+
"Successfully imported": "Successfully imported",
|
|
40
|
+
"Task result": "Task result",
|
|
41
|
+
"To download the failure data": "To download the failure data",
|
|
42
|
+
"Total records": "Total records",
|
|
43
|
+
"Unique constraint error, fields:": "Unique constraint error, fields:",
|
|
44
|
+
"Updated records": "Updated records",
|
|
45
|
+
"Upload placeholder": "Drag and drop the file here or click to upload, file size should not exceed 80M",
|
|
46
|
+
"View result": "View result",
|
|
47
|
+
"Yes": "Yes",
|
|
48
|
+
"another import action is running, please try again later.": "another import action is running, please try again later.",
|
|
49
|
+
"can not find value": "can not find value",
|
|
50
|
+
"import-error": "Failed to import row {{rowIndex}}, row data: {{rowData}}, cause: {{causeMessage}}",
|
|
51
|
+
"password is empty": "password is empty",
|
|
52
|
+
"{{successCount}} records have been successfully imported": "{{successCount}} records have been successfully imported"
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add importable field": "Add importable field",
|
|
3
|
+
"Columns configuration is empty": "Columns configuration is empty",
|
|
4
|
+
"Custom column title": "Custom column title",
|
|
5
|
+
"Done": "Done",
|
|
6
|
+
"Download template": "Download template",
|
|
7
|
+
"Download tips": "- Download the template and fill in the data according to the format \r\n - Import only the first worksheet \r\n - Do not change the header of the template to prevent import failure",
|
|
8
|
+
"Excel data importing": "Excel data importing",
|
|
9
|
+
"Failed to import row {{row}}, {{message}}, row data: {{data}}": "Failed to import row {{row}}, {{message}}, row data: {{data}}",
|
|
10
|
+
"Field description": "Field description",
|
|
11
|
+
"Field description placeholder": "Enter field description",
|
|
12
|
+
"Field not found: {{field}}": "Field not found: {{field}}",
|
|
13
|
+
"Field {{fieldName}} does not exist": "Field {{fieldName}} does not exist",
|
|
14
|
+
"File size cannot exceed 10M": "File size cannot exceed 10M",
|
|
15
|
+
"Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"": "Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"",
|
|
16
|
+
"Headers not found. Expected headers: {{headers}}": "Headers not found. Expected headers: {{headers}}",
|
|
17
|
+
"Illegal percentage format": "Illegal percentage format",
|
|
18
|
+
"Import": "Import",
|
|
19
|
+
"Import Data": "Import Data",
|
|
20
|
+
"Import action settings": "Import action settings",
|
|
21
|
+
"Import completed": "Import completed",
|
|
22
|
+
"Import explain": "Guide",
|
|
23
|
+
"Import warnings": "You can import up to {{limit}} rows of data at a time, any excess will be ignored.",
|
|
24
|
+
"ImportResult": "ImportResult",
|
|
25
|
+
"Imported template does not match, please download again.": "Imported template does not match, please download again.",
|
|
26
|
+
"Incorrect date format": "Incorrect date format",
|
|
27
|
+
"Incorrect email format": "Incorrect email format",
|
|
28
|
+
"Incorrect time format": "Incorrect time format",
|
|
29
|
+
"No": "No",
|
|
30
|
+
"No data to import": "No data to import",
|
|
31
|
+
"Only one file is allowed to be uploaded": "Only one file is allowed to be uploaded",
|
|
32
|
+
"Please select": "Please select",
|
|
33
|
+
"Please upload the file of Excel": "Please upload the file of Excel",
|
|
34
|
+
"Skipped records": "Skipped records",
|
|
35
|
+
"Start import": "Start import",
|
|
36
|
+
"Step 1: Download template": "Step 1: Download template",
|
|
37
|
+
"Step 2: Upload Excel": "Step 2: Upload Excel",
|
|
38
|
+
"Step 3: Import options": "Step 3: Import options",
|
|
39
|
+
"Successfully imported": "Successfully imported",
|
|
40
|
+
"Task result": "Task result",
|
|
41
|
+
"To download the failure data": "To download the failure data",
|
|
42
|
+
"Total records": "Total records",
|
|
43
|
+
"Unique constraint error, fields:": "Unique constraint error, fields:",
|
|
44
|
+
"Updated records": "Updated records",
|
|
45
|
+
"Upload placeholder": "Drag and drop the file here or click to upload, file size should not exceed 80M",
|
|
46
|
+
"View result": "View result",
|
|
47
|
+
"Yes": "Yes",
|
|
48
|
+
"another import action is running, please try again later.": "another import action is running, please try again later.",
|
|
49
|
+
"can not find value": "can not find value",
|
|
50
|
+
"import-error": "Failed to import row {{rowIndex}}, row data: {{rowData}}, cause: {{causeMessage}}",
|
|
51
|
+
"password is empty": "password is empty",
|
|
52
|
+
"{{successCount}} records have been successfully imported": "{{successCount}} records have been successfully imported"
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add importable field": "Add importable field",
|
|
3
|
+
"Columns configuration is empty": "Columns configuration is empty",
|
|
4
|
+
"Custom column title": "Custom column title",
|
|
5
|
+
"Done": "Done",
|
|
6
|
+
"Download template": "Download template",
|
|
7
|
+
"Download tips": "- Download the template and fill in the data according to the format \r\n - Import only the first worksheet \r\n - Do not change the header of the template to prevent import failure",
|
|
8
|
+
"Excel data importing": "Excel data importing",
|
|
9
|
+
"Failed to import row {{row}}, {{message}}, row data: {{data}}": "Failed to import row {{row}}, {{message}}, row data: {{data}}",
|
|
10
|
+
"Field description": "Field description",
|
|
11
|
+
"Field description placeholder": "Enter field description",
|
|
12
|
+
"Field not found: {{field}}": "Field not found: {{field}}",
|
|
13
|
+
"Field {{fieldName}} does not exist": "Field {{fieldName}} does not exist",
|
|
14
|
+
"File size cannot exceed 10M": "File size cannot exceed 10M",
|
|
15
|
+
"Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"": "Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"",
|
|
16
|
+
"Headers not found. Expected headers: {{headers}}": "Headers not found. Expected headers: {{headers}}",
|
|
17
|
+
"Illegal percentage format": "Illegal percentage format",
|
|
18
|
+
"Import": "Nhập",
|
|
19
|
+
"Import Data": "Import Data",
|
|
20
|
+
"Import action settings": "Import action settings",
|
|
21
|
+
"Import completed": "Import completed",
|
|
22
|
+
"Import explain": "Guide",
|
|
23
|
+
"Import warnings": "You can import up to {{limit}} rows of data at a time, any excess will be ignored.",
|
|
24
|
+
"ImportResult": "ImportResult",
|
|
25
|
+
"Imported template does not match, please download again.": "Imported template does not match, please download again.",
|
|
26
|
+
"Incorrect date format": "Incorrect date format",
|
|
27
|
+
"Incorrect email format": "Incorrect email format",
|
|
28
|
+
"Incorrect time format": "Incorrect time format",
|
|
29
|
+
"No": "Không",
|
|
30
|
+
"No data to import": "No data to import",
|
|
31
|
+
"Only one file is allowed to be uploaded": "Only one file is allowed to be uploaded",
|
|
32
|
+
"Please select": "Please select",
|
|
33
|
+
"Please upload the file of Excel": "Please upload the file of Excel",
|
|
34
|
+
"Skipped records": "Skipped records",
|
|
35
|
+
"Start import": "Start import",
|
|
36
|
+
"Step 1: Download template": "Step 1: Download template",
|
|
37
|
+
"Step 2: Upload Excel": "Step 2: Upload Excel",
|
|
38
|
+
"Step 3: Import options": "Step 3: Import options",
|
|
39
|
+
"Successfully imported": "Successfully imported",
|
|
40
|
+
"Task result": "Task result",
|
|
41
|
+
"To download the failure data": "To download the failure data",
|
|
42
|
+
"Total records": "Total records",
|
|
43
|
+
"Unique constraint error, fields:": "Unique constraint error, fields:",
|
|
44
|
+
"Updated records": "Updated records",
|
|
45
|
+
"Upload placeholder": "Drag and drop the file here or click to upload, file size should not exceed 80M",
|
|
46
|
+
"View result": "View result",
|
|
47
|
+
"Yes": "Có",
|
|
48
|
+
"another import action is running, please try again later.": "another import action is running, please try again later.",
|
|
49
|
+
"can not find value": "can not find value",
|
|
50
|
+
"import-error": "Failed to import row {{rowIndex}}, row data: {{rowData}}, cause: {{causeMessage}}",
|
|
51
|
+
"password is empty": "password is empty",
|
|
52
|
+
"{{successCount}} records have been successfully imported": "{{successCount}} records have been successfully imported"
|
|
53
|
+
}
|
package/dist/locale/zh-CN.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"Import": "导入",
|
|
7
|
-
"Start import": "开始导入",
|
|
8
|
-
"Import explain": "说明",
|
|
2
|
+
"Add importable field": "添加可导入字段",
|
|
3
|
+
"Columns configuration is empty": "列配置为空",
|
|
4
|
+
"Custom column title": "自定义列标题",
|
|
5
|
+
"Done": "完成",
|
|
9
6
|
"Download template": "下载模板",
|
|
10
|
-
"Step 1: Download template": "1.下载模板",
|
|
11
|
-
"Step 2: Upload Excel": "2.上传完善后的表格",
|
|
12
|
-
"Step 3: Import options": "3.导入选项",
|
|
13
7
|
"Download tips": "- 下载模板后,按格式填写数据\r\n - 只导入第一张工作表\r\n - 请勿改模板表头,防止导入失败",
|
|
14
|
-
"Import warnings": "每次最多导入 {{limit}} 行数据,超出的将被忽略。",
|
|
15
|
-
"Upload placeholder": "将文件拖曳到此处或点击上传。",
|
|
16
8
|
"Excel data importing": "数据导入中,请勿关闭窗口",
|
|
17
|
-
"{{
|
|
18
|
-
"To download the failure data": "下载导入失败的数据",
|
|
19
|
-
"Add importable field": "添加可导入字段",
|
|
20
|
-
"Done": "完成",
|
|
21
|
-
"Yes": "是",
|
|
22
|
-
"No": "否",
|
|
23
|
-
"Please select": "请选择",
|
|
24
|
-
"Field {{fieldName}} does not exist": "字段 {{fieldName}} 不存在",
|
|
25
|
-
"can not find value": "找不到对应值",
|
|
26
|
-
"password is empty": "密码为空",
|
|
27
|
-
"Incorrect time format": "时间格式不正确",
|
|
28
|
-
"Incorrect date format": "日期格式不正确",
|
|
29
|
-
"Incorrect email format": "邮箱格式不正确",
|
|
30
|
-
"Illegal percentage format": "百分比格式有误",
|
|
31
|
-
"Imported template does not match, please download again.": "导入模板不匹配,请检查导入文件标题行或重新下载导入模板",
|
|
32
|
-
"another import action is running, please try again later.": "另一导入任务正在运行,请稍后重试。",
|
|
33
|
-
"Custom column title": "自定义列标题",
|
|
9
|
+
"Failed to import row {{row}}, {{message}}, row data: {{data}}": "导入第 {{row}} 行失败,{{message}},行数据:{{data}}",
|
|
34
10
|
"Field description": "字段说明",
|
|
35
11
|
"Field description placeholder": "请输入字段说明",
|
|
36
|
-
"Columns configuration is empty": "列配置为空",
|
|
37
12
|
"Field not found: {{field}}": "字段未找到:{{field}}",
|
|
38
|
-
"
|
|
13
|
+
"Field {{fieldName}} does not exist": "字段 {{fieldName}} 不存在",
|
|
14
|
+
"File size cannot exceed 10M": "文件大小不能超过10M",
|
|
39
15
|
"Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"": "第 {{column}} 列的表头不匹配:预期 \"{{expected}}\",实际是 \"{{actual}}\"",
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
16
|
+
"Headers not found. Expected headers: {{headers}}": "未找到表头。预期的表头:{{headers}}",
|
|
17
|
+
"Illegal percentage format": "百分比格式有误",
|
|
18
|
+
"Import": "导入",
|
|
19
|
+
"Import Data": "导入数据",
|
|
20
|
+
"Import action settings": "导入设置",
|
|
44
21
|
"Import completed": "导入完成:{{success}} 条记录已导入,{{updated}} 条记录已更新,{{skipped}} 条记录已跳过,共 {{total}} 条记录",
|
|
45
|
-
"
|
|
46
|
-
"
|
|
22
|
+
"Import explain": "说明",
|
|
23
|
+
"Import warnings": "每次最多导入 {{limit}} 行数据,超出的将被忽略。",
|
|
24
|
+
"ImportResult": "已导入 {{success}} 条,更新 {{updated}} 条,跳过 {{skipped}} 条,共 {{total}} 条",
|
|
25
|
+
"Imported template does not match, please download again.": "导入模板不匹配,请检查导入文件标题行或重新下载导入模板",
|
|
26
|
+
"Incorrect date format": "日期格式不正确",
|
|
27
|
+
"Incorrect email format": "邮箱格式不正确",
|
|
28
|
+
"Incorrect time format": "时间格式不正确",
|
|
29
|
+
"No": "否",
|
|
30
|
+
"No data to import": "没有数据可导入",
|
|
31
|
+
"Only one file is allowed to be uploaded": "只允许上传一个文件",
|
|
32
|
+
"Please select": "请选择",
|
|
33
|
+
"Please upload the file of Excel": "请上传Excel的文件",
|
|
47
34
|
"Skipped records": "已跳过记录",
|
|
35
|
+
"Start import": "开始导入",
|
|
36
|
+
"Step 1: Download template": "1.下载模板",
|
|
37
|
+
"Step 2: Upload Excel": "2.上传完善后的表格",
|
|
38
|
+
"Step 3: Import options": "3.导入选项",
|
|
39
|
+
"Successfully imported": "成功导入",
|
|
40
|
+
"Task result": "任务结果",
|
|
41
|
+
"To download the failure data": "下载导入失败的数据",
|
|
48
42
|
"Total records": "总记录数",
|
|
43
|
+
"Unique constraint error, fields:": "唯一性约束错误,字段:",
|
|
44
|
+
"Updated records": "已更新记录",
|
|
45
|
+
"Upload placeholder": "将文件拖曳到此处或点击上传,文件大小不超过 80M",
|
|
49
46
|
"View result": "查看结果",
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
}
|
|
47
|
+
"Yes": "是",
|
|
48
|
+
"another import action is running, please try again later.": "另一导入任务正在运行,请稍后重试。",
|
|
49
|
+
"can not find value": "找不到对应值",
|
|
50
|
+
"import-error": "导入第 {{rowIndex}} 行失败,行数据:{{rowData}}, 原因:{{causeMessage}}",
|
|
51
|
+
"password is empty": "密码为空",
|
|
52
|
+
"{{successCount}} records have been successfully imported": "已成功导入 {{successCount}} 条数据"
|
|
53
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Add importable field": "Add importable field",
|
|
3
|
+
"Columns configuration is empty": "Columns configuration is empty",
|
|
4
|
+
"Custom column title": "Custom column title",
|
|
5
|
+
"Done": "Done",
|
|
6
|
+
"Download template": "Download template",
|
|
7
|
+
"Download tips": "- Download the template and fill in the data according to the format \r\n - Import only the first worksheet \r\n - Do not change the header of the template to prevent import failure",
|
|
8
|
+
"Excel data importing": "Excel data importing",
|
|
9
|
+
"Failed to import row {{row}}, {{message}}, row data: {{data}}": "Failed to import row {{row}}, {{message}}, row data: {{data}}",
|
|
10
|
+
"Field description": "Field description",
|
|
11
|
+
"Field description placeholder": "Enter field description",
|
|
12
|
+
"Field not found: {{field}}": "Field not found: {{field}}",
|
|
13
|
+
"Field {{fieldName}} does not exist": "Field {{fieldName}} does not exist",
|
|
14
|
+
"File size cannot exceed 10M": "File size cannot exceed 10M",
|
|
15
|
+
"Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"": "Header mismatch at column {{column}}: expected \"{{expected}}\", but got \"{{actual}}\"",
|
|
16
|
+
"Headers not found. Expected headers: {{headers}}": "Headers not found. Expected headers: {{headers}}",
|
|
17
|
+
"Illegal percentage format": "Illegal percentage format",
|
|
18
|
+
"Import": "Import",
|
|
19
|
+
"Import Data": "Import Data",
|
|
20
|
+
"Import action settings": "Import action settings",
|
|
21
|
+
"Import completed": "Import completed",
|
|
22
|
+
"Import explain": "Guide",
|
|
23
|
+
"Import warnings": "You can import up to {{limit}} rows of data at a time, any excess will be ignored.",
|
|
24
|
+
"ImportResult": "ImportResult",
|
|
25
|
+
"Imported template does not match, please download again.": "Imported template does not match, please download again.",
|
|
26
|
+
"Incorrect date format": "Incorrect date format",
|
|
27
|
+
"Incorrect email format": "Incorrect email format",
|
|
28
|
+
"Incorrect time format": "Incorrect time format",
|
|
29
|
+
"No": "No",
|
|
30
|
+
"No data to import": "No data to import",
|
|
31
|
+
"Only one file is allowed to be uploaded": "Only one file is allowed to be uploaded",
|
|
32
|
+
"Please select": "Please select",
|
|
33
|
+
"Please upload the file of Excel": "Please upload the file of Excel",
|
|
34
|
+
"Skipped records": "Skipped records",
|
|
35
|
+
"Start import": "Start import",
|
|
36
|
+
"Step 1: Download template": "Step 1: Download template",
|
|
37
|
+
"Step 2: Upload Excel": "Step 2: Upload Excel",
|
|
38
|
+
"Step 3: Import options": "Step 3: Import options",
|
|
39
|
+
"Successfully imported": "Successfully imported",
|
|
40
|
+
"Task result": "Task result",
|
|
41
|
+
"To download the failure data": "To download the failure data",
|
|
42
|
+
"Total records": "Total records",
|
|
43
|
+
"Unique constraint error, fields:": "Unique constraint error, fields:",
|
|
44
|
+
"Updated records": "Updated records",
|
|
45
|
+
"Upload placeholder": "Drag and drop the file here or click to upload, file size should not exceed 80M",
|
|
46
|
+
"View result": "View result",
|
|
47
|
+
"Yes": "Yes",
|
|
48
|
+
"another import action is running, please try again later.": "another import action is running, please try again later.",
|
|
49
|
+
"can not find value": "can not find value",
|
|
50
|
+
"import-error": "Failed to import row {{rowIndex}}, row data: {{rowData}}, cause: {{causeMessage}}",
|
|
51
|
+
"password is empty": "password is empty",
|
|
52
|
+
"{{successCount}} records have been successfully imported": "{{successCount}} records have been successfully imported"
|
|
53
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"exceljs","version":"4.4.0","description":"Excel Workbook Manager - Read and Write xlsx and csv Files.","private":false,"license":"MIT","author":{"name":"Guyon Roche","email":"guyon@live.com"},"repository":{"type":"git","url":"https://github.com/exceljs/exceljs.git"},"engines":{"node":">=8.3.0"},"main":"./excel.js","browser":"./dist/exceljs.min.js","types":"./index.d.ts","files":["dist","lib","excel.js","LICENSE","README.md","README_zh.md","index.ts","index.d.ts"],"scripts":{"test":"npm run test:full","test:es5":"export EXCEL_BUILD=es5 && npm run test:full","test:full":"npm run build && npm run test:unit && npm run test:integration && npm run test:end-to-end && npm run test:jasmine","test:version":"npm run build && npm run test:unit && npm run test:integration && npm run test:end-to-end && npm run test:browser && npm run test:dist","test:all":"npm run test:native && npm run test:es5","test:native":"npm run test:full","test:unit":"mocha --require spec/config/setup --require spec/config/setup-unit spec/unit --recursive","test:integration":"mocha --require spec/config/setup spec/integration --recursive","test:end-to-end":"mocha --require spec/config/setup spec/end-to-end --recursive","test:browser":"if [ ! -f .disable-test-browser ]; then npm run build && npm run test:jasmine; fi","test:jasmine":"grunt jasmine","test:unit:es5":"export EXCEL_BUILD=es5 && npm run test:unit","test:integration:es5":"export EXCEL_BUILD=es5 && npm run test:integration","test:end-to-end:es5":"export EXCEL_BUILD=es5 && npm run test:end-to-end","test:dist":"mocha --require spec/config/setup spec/dist --recursive","test:manual":"node spec/manual/app.js","test:typescript":"mocha -r ts-node/register spec/typescript/**/*.spec.ts","clean-build":"npm run clean && npm run build","lint":"eslint --format node_modules/eslint-friendly-formatter .","lint:fix":"prettier-eslint --write $(pwd)'/**/*.js'","lint:staged":"lint-staged","clean":"rm -rf build/ && rm -rf dist","benchmark":"node --expose-gc benchmark","benchmark:debug":"node --expose-gc --inspect-brk --trace-deopt benchmark","build":"grunt build","install-build":"npm install && grunt build","preversion":"npm run clean && npm run build && npm run test:version","postversion":"git push --no-verify && git push --tags --no-verify"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["prettier-eslint --write","eslint --format node_modules/eslint-friendly-formatter","git add"]},"keywords":["xlsx","json","csv","excel","font","border","fill","number","format","number format","alignment","office","spreadsheet","workbook","defined names","data validations","rich text","in-cell format","outlineLevel","views","frozen","split","pageSetup"],"dependencies":{"archiver":"^5.0.0","dayjs":"^1.8.34","fast-csv":"^4.3.1","jszip":"^3.10.1","readable-stream":"^3.6.0","saxes":"^5.0.1","tmp":"^0.2.0","unzipper":"^0.10.11","uuid":"^8.3.0"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/preset-env":"^7.11.0","@types/chai":"^4.2.12","@types/mocha":"^8.0.3","@types/node":"^14.11.2","babelify":"^10.0.0","browserify":"^16.5.2","chai":"^4.2.0","chai-datetime":"^1.7.0","chai-xml":"^0.3.2","core-js":"^3.6.5","dirty-chai":"^2.0.1","eslint":"^6.5.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.12.0","eslint-friendly-formatter":"^4.0.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","express":"^4.16.4","got":"^9.0.0","grunt":"^1.3.0","grunt-babel":"^8.0.0","grunt-browserify":"^5.3.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-jasmine":"^2.2.0","grunt-contrib-watch":"^1.1.0","grunt-exorcise":"^2.1.1","grunt-terser":"^1.0.0","husky":"^4.3.0","lint-staged":"^10.2.13","mocha":"^7.2.0","prettier-eslint":"^11.0.0","prettier-eslint-cli":"^5.0.0","regenerator-runtime":"^0.13.7","sax":"^1.2.4","ts-node":"^8.10.2","typescript":"^3.9.7"},"_lastModified":"
|
|
1
|
+
{"name":"exceljs","version":"4.4.0","description":"Excel Workbook Manager - Read and Write xlsx and csv Files.","private":false,"license":"MIT","author":{"name":"Guyon Roche","email":"guyon@live.com"},"repository":{"type":"git","url":"https://github.com/exceljs/exceljs.git"},"engines":{"node":">=8.3.0"},"main":"./excel.js","browser":"./dist/exceljs.min.js","types":"./index.d.ts","files":["dist","lib","excel.js","LICENSE","README.md","README_zh.md","index.ts","index.d.ts"],"scripts":{"test":"npm run test:full","test:es5":"export EXCEL_BUILD=es5 && npm run test:full","test:full":"npm run build && npm run test:unit && npm run test:integration && npm run test:end-to-end && npm run test:jasmine","test:version":"npm run build && npm run test:unit && npm run test:integration && npm run test:end-to-end && npm run test:browser && npm run test:dist","test:all":"npm run test:native && npm run test:es5","test:native":"npm run test:full","test:unit":"mocha --require spec/config/setup --require spec/config/setup-unit spec/unit --recursive","test:integration":"mocha --require spec/config/setup spec/integration --recursive","test:end-to-end":"mocha --require spec/config/setup spec/end-to-end --recursive","test:browser":"if [ ! -f .disable-test-browser ]; then npm run build && npm run test:jasmine; fi","test:jasmine":"grunt jasmine","test:unit:es5":"export EXCEL_BUILD=es5 && npm run test:unit","test:integration:es5":"export EXCEL_BUILD=es5 && npm run test:integration","test:end-to-end:es5":"export EXCEL_BUILD=es5 && npm run test:end-to-end","test:dist":"mocha --require spec/config/setup spec/dist --recursive","test:manual":"node spec/manual/app.js","test:typescript":"mocha -r ts-node/register spec/typescript/**/*.spec.ts","clean-build":"npm run clean && npm run build","lint":"eslint --format node_modules/eslint-friendly-formatter .","lint:fix":"prettier-eslint --write $(pwd)'/**/*.js'","lint:staged":"lint-staged","clean":"rm -rf build/ && rm -rf dist","benchmark":"node --expose-gc benchmark","benchmark:debug":"node --expose-gc --inspect-brk --trace-deopt benchmark","build":"grunt build","install-build":"npm install && grunt build","preversion":"npm run clean && npm run build && npm run test:version","postversion":"git push --no-verify && git push --tags --no-verify"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["prettier-eslint --write","eslint --format node_modules/eslint-friendly-formatter","git add"]},"keywords":["xlsx","json","csv","excel","font","border","fill","number","format","number format","alignment","office","spreadsheet","workbook","defined names","data validations","rich text","in-cell format","outlineLevel","views","frozen","split","pageSetup"],"dependencies":{"archiver":"^5.0.0","dayjs":"^1.8.34","fast-csv":"^4.3.1","jszip":"^3.10.1","readable-stream":"^3.6.0","saxes":"^5.0.1","tmp":"^0.2.0","unzipper":"^0.10.11","uuid":"^8.3.0"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/preset-env":"^7.11.0","@types/chai":"^4.2.12","@types/mocha":"^8.0.3","@types/node":"^14.11.2","babelify":"^10.0.0","browserify":"^16.5.2","chai":"^4.2.0","chai-datetime":"^1.7.0","chai-xml":"^0.3.2","core-js":"^3.6.5","dirty-chai":"^2.0.1","eslint":"^6.5.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.12.0","eslint-friendly-formatter":"^4.0.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","express":"^4.16.4","got":"^9.0.0","grunt":"^1.3.0","grunt-babel":"^8.0.0","grunt-browserify":"^5.3.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-jasmine":"^2.2.0","grunt-contrib-watch":"^1.1.0","grunt-exorcise":"^2.1.1","grunt-terser":"^1.0.0","husky":"^4.3.0","lint-staged":"^10.2.13","mocha":"^7.2.0","prettier-eslint":"^11.0.0","prettier-eslint-cli":"^5.0.0","regenerator-runtime":"^0.13.7","sax":"^1.2.4","ts-node":"^8.10.2","typescript":"^3.9.7"},"_lastModified":"2026-01-04T03:41:01.622Z"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"xlsx","version":"0.20.2","author":"sheetjs","description":"SheetJS Spreadsheet data parser and writer","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"bin":{"xlsx":"./bin/xlsx.njs"},"main":"xlsx.js","module":"xlsx.mjs","unpkg":"dist/xlsx.full.min.js","jsdelivr":"dist/xlsx.full.min.js","types":"types/index.d.ts","exports":{".":{"import":"./xlsx.mjs","require":"./xlsx.js","types":"./types/index.d.ts"},"./xlsx.mjs":{"import":"./xlsx.mjs","types":"./types/index.d.ts"},"./xlsx.js":{"require":"./xlsx.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min.js":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min.js":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min.js":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.zahl":{"import":"./dist/xlsx.zahl.mjs","require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.mjs":{"import":"./dist/xlsx.zahl.mjs","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.js":{"require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/cpexcel":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.js":{"require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full.mjs":{"import":"./dist/cpexcel.full.mjs","types":"./dist/cpexcel.d.ts"}},"browser":{"buffer":false,"crypto":false,"stream":false,"process":false,"fs":false},"sideEffects":false,"dependencies":{},"devDependencies":{"@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","acorn":"7.4.1","adler-32":"~1.3.1","alex":"8.1.1","blanket":"~1.2.3","cfb":"~1.2.2","codepage":"~1.15.0","commander":"~2.17.1","crc-32":"~1.2.2","dtslint":"^0.1.2","eslint":"7.23.0","eslint-plugin-html":"^6.1.2","eslint-plugin-json":"^2.1.2","exit-on-epipe":"~1.0.1","fflate":"^0.7.1","jsdom":"~11.1.0","markdown-spellcheck":"^1.3.1","mocha":"~2.5.3","sinon":"^1.17.7","ssf":"~0.11.2","typescript":"2.2.0","wmf":"~1.0.1","word":"~0.3.0"},"repository":{"type":"git","url":"https://git.sheetjs.com/SheetJS/sheetjs"},"scripts":{"pretest":"npm run lint","test":"npm run tests-only","pretest-only":"git submodule init && git submodule update","tests-only":"make travis","build":"make","lint":"make fullint","dtslint":"dtslint types"},"config":{"blanket":{"pattern":"xlsx.js"}},"alex":{"allow":["chinese","special","simple","just","crash","wtf","holes"]},"homepage":"https://sheetjs.com/","files":["CHANGELOG.md","LICENSE","README.md","bower.json","package.json","xlsx.js","xlsx.mjs","xlsxworker.js","bin/xlsx.njs","dist/LICENSE","dist/*.mjs","dist/*.js","dist/*.map","dist/*.d.ts","types/index.d.ts","types/tsconfig.json"],"bugs":{"url":"https://git.sheetjs.com/SheetJS/sheetjs/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"_lastModified":"
|
|
1
|
+
{"name":"xlsx","version":"0.20.2","author":"sheetjs","description":"SheetJS Spreadsheet data parser and writer","keywords":["excel","xls","xlsx","xlsb","xlsm","ods","csv","dbf","dif","sylk","office","spreadsheet"],"bin":{"xlsx":"./bin/xlsx.njs"},"main":"xlsx.js","module":"xlsx.mjs","unpkg":"dist/xlsx.full.min.js","jsdelivr":"dist/xlsx.full.min.js","types":"types/index.d.ts","exports":{".":{"import":"./xlsx.mjs","require":"./xlsx.js","types":"./types/index.d.ts"},"./xlsx.mjs":{"import":"./xlsx.mjs","types":"./types/index.d.ts"},"./xlsx.js":{"require":"./xlsx.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.core.min.js":{"import":"./dist/xlsx.core.min.js","require":"./dist/xlsx.core.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.full.min.js":{"import":"./dist/xlsx.full.min.js","require":"./dist/xlsx.full.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.mini.min.js":{"import":"./dist/xlsx.mini.min.js","require":"./dist/xlsx.mini.min.js","types":"./types/index.d.ts"},"./dist/xlsx.zahl":{"import":"./dist/xlsx.zahl.mjs","require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.mjs":{"import":"./dist/xlsx.zahl.mjs","types":"./dist/zahl.d.ts"},"./dist/xlsx.zahl.js":{"require":"./dist/xlsx.zahl.js","types":"./dist/zahl.d.ts"},"./dist/cpexcel":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.js":{"require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full":{"import":"./dist/cpexcel.full.mjs","require":"./dist/cpexcel.js","types":"./dist/cpexcel.d.ts"},"./dist/cpexcel.full.mjs":{"import":"./dist/cpexcel.full.mjs","types":"./dist/cpexcel.d.ts"}},"browser":{"buffer":false,"crypto":false,"stream":false,"process":false,"fs":false},"sideEffects":false,"dependencies":{},"devDependencies":{"@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","acorn":"7.4.1","adler-32":"~1.3.1","alex":"8.1.1","blanket":"~1.2.3","cfb":"~1.2.2","codepage":"~1.15.0","commander":"~2.17.1","crc-32":"~1.2.2","dtslint":"^0.1.2","eslint":"7.23.0","eslint-plugin-html":"^6.1.2","eslint-plugin-json":"^2.1.2","exit-on-epipe":"~1.0.1","fflate":"^0.7.1","jsdom":"~11.1.0","markdown-spellcheck":"^1.3.1","mocha":"~2.5.3","sinon":"^1.17.7","ssf":"~0.11.2","typescript":"2.2.0","wmf":"~1.0.1","word":"~0.3.0"},"repository":{"type":"git","url":"https://git.sheetjs.com/SheetJS/sheetjs"},"scripts":{"pretest":"npm run lint","test":"npm run tests-only","pretest-only":"git submodule init && git submodule update","tests-only":"make travis","build":"make","lint":"make fullint","dtslint":"dtslint types"},"config":{"blanket":{"pattern":"xlsx.js"}},"alex":{"allow":["chinese","special","simple","just","crash","wtf","holes"]},"homepage":"https://sheetjs.com/","files":["CHANGELOG.md","LICENSE","README.md","bower.json","package.json","xlsx.js","xlsx.mjs","xlsxworker.js","bin/xlsx.njs","dist/LICENSE","dist/*.mjs","dist/*.js","dist/*.map","dist/*.d.ts","types/index.d.ts","types/tsconfig.json"],"bugs":{"url":"https://git.sheetjs.com/SheetJS/sheetjs/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"_lastModified":"2026-01-04T03:41:04.352Z"}
|
package/dist/server/errors.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
1
9
|
export declare class ImportValidationError extends Error {
|
|
2
10
|
code: string;
|
|
3
11
|
params?: Record<string, any>;
|
|
4
|
-
constructor(
|
|
12
|
+
constructor(message: string, params?: Record<string, any>);
|
|
5
13
|
}
|
|
6
14
|
export interface ImportErrorOptions {
|
|
7
15
|
rowIndex: number;
|
package/dist/server/errors.js
CHANGED
|
@@ -33,9 +33,8 @@ module.exports = __toCommonJS(errors_exports);
|
|
|
33
33
|
class ImportValidationError extends Error {
|
|
34
34
|
code;
|
|
35
35
|
params;
|
|
36
|
-
constructor(
|
|
37
|
-
super(
|
|
38
|
-
this.code = code;
|
|
36
|
+
constructor(message, params) {
|
|
37
|
+
super(message);
|
|
39
38
|
this.params = params;
|
|
40
39
|
this.name = "ImportValidationError";
|
|
41
40
|
}
|
package/dist/server/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { Plugin } from '@nocobase/server';
|
|
10
|
+
export { ImportError, ImportValidationError } from './errors';
|
|
10
11
|
export declare class PluginActionImportServer extends Plugin {
|
|
11
12
|
beforeLoad(): void;
|
|
12
13
|
load(): Promise<void>;
|
package/dist/server/index.js
CHANGED
|
@@ -27,6 +27,8 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
27
27
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
28
|
var server_exports = {};
|
|
29
29
|
__export(server_exports, {
|
|
30
|
+
ImportError: () => import_errors2.ImportError,
|
|
31
|
+
ImportValidationError: () => import_errors2.ImportValidationError,
|
|
30
32
|
PluginActionImportServer: () => PluginActionImportServer,
|
|
31
33
|
default: () => server_default
|
|
32
34
|
});
|
|
@@ -35,6 +37,7 @@ var import_server = require("@nocobase/server");
|
|
|
35
37
|
var import_actions = require("./actions");
|
|
36
38
|
var import_middleware = require("./middleware");
|
|
37
39
|
var import_errors = require("./errors");
|
|
40
|
+
var import_errors2 = require("./errors");
|
|
38
41
|
__reExport(server_exports, require("./services/xlsx-importer"), module.exports);
|
|
39
42
|
__reExport(server_exports, require("./services/template-creator"), module.exports);
|
|
40
43
|
class PluginActionImportServer extends import_server.Plugin {
|
|
@@ -43,7 +46,7 @@ class PluginActionImportServer extends import_server.Plugin {
|
|
|
43
46
|
if (!this.app.db.getRepository("roles")) {
|
|
44
47
|
return;
|
|
45
48
|
}
|
|
46
|
-
const roleNames = ["admin"
|
|
49
|
+
const roleNames = ["admin"];
|
|
47
50
|
const roles = await this.app.db.getRepository("roles").find({
|
|
48
51
|
filter: {
|
|
49
52
|
name: roleNames
|
|
@@ -85,7 +88,7 @@ class PluginActionImportServer extends import_server.Plugin {
|
|
|
85
88
|
ctx.body = {
|
|
86
89
|
errors: [
|
|
87
90
|
{
|
|
88
|
-
message: ctx.i18n.t(err.
|
|
91
|
+
message: ctx.i18n.t(err.message, {
|
|
89
92
|
...err.params,
|
|
90
93
|
ns: "action-import"
|
|
91
94
|
})
|
|
@@ -100,15 +103,17 @@ class PluginActionImportServer extends import_server.Plugin {
|
|
|
100
103
|
ctx.status = 400;
|
|
101
104
|
const causeError = err.cause;
|
|
102
105
|
errorHandlerPlugin.errorHandler.renderError(causeError, ctx);
|
|
106
|
+
const message = ctx.i18n.t("import-error", {
|
|
107
|
+
interpolation: { escapeValue: false },
|
|
108
|
+
ns: "action-import",
|
|
109
|
+
rowData: JSON.stringify(err.rowData),
|
|
110
|
+
rowIndex: err.rowIndex,
|
|
111
|
+
causeMessage: ctx.body.errors[0].message
|
|
112
|
+
});
|
|
103
113
|
ctx.body = {
|
|
104
114
|
errors: [
|
|
105
115
|
{
|
|
106
|
-
message
|
|
107
|
-
ns: "action-import",
|
|
108
|
-
rowData: err.rowData,
|
|
109
|
-
rowIndex: err.rowIndex,
|
|
110
|
-
causeMessage: ctx.body.errors[0].message
|
|
111
|
-
})
|
|
116
|
+
message
|
|
112
117
|
}
|
|
113
118
|
]
|
|
114
119
|
};
|
|
@@ -119,6 +124,8 @@ class PluginActionImportServer extends import_server.Plugin {
|
|
|
119
124
|
var server_default = PluginActionImportServer;
|
|
120
125
|
// Annotate the CommonJS export names for ESM import in node:
|
|
121
126
|
0 && (module.exports = {
|
|
127
|
+
ImportError,
|
|
128
|
+
ImportValidationError,
|
|
122
129
|
PluginActionImportServer,
|
|
123
130
|
...require("./services/xlsx-importer"),
|
|
124
131
|
...require("./services/template-creator")
|
|
@@ -7,5 +7,6 @@
|
|
|
7
7
|
"Incorrect date format": "日期格式不正确",
|
|
8
8
|
"Incorrect email format": "邮箱格式不正确",
|
|
9
9
|
"Illegal percentage format": "百分比格式有误",
|
|
10
|
-
"Imported template does not match, please download again.": "导入模板不匹配,请检查导入文件标题行或重新下载导入模板"
|
|
11
|
-
}
|
|
10
|
+
"Imported template does not match, please download again.": "导入模板不匹配,请检查导入文件标题行或重新下载导入模板",
|
|
11
|
+
"Failed to parse field {{field}} in row {{rowIndex}}": "第 {{rowIndex}} 行的字段 {{field}} 解析失败:{{message}}"
|
|
12
|
+
}
|
|
@@ -42,13 +42,14 @@ export declare class XlsxImporter extends EventEmitter {
|
|
|
42
42
|
protected logger: Logger;
|
|
43
43
|
constructor(options: ImporterOptions);
|
|
44
44
|
beforePerformImport(data: string[][], options: RunOptions): Promise<string[][]>;
|
|
45
|
+
validateBySpaces(data: string[][], ctx?: Context): Promise<void>;
|
|
45
46
|
validate(ctx?: Context): Promise<string[][]>;
|
|
46
47
|
run(options?: RunOptions): Promise<any>;
|
|
47
48
|
resetSeq(options?: RunOptions): Promise<void>;
|
|
48
49
|
private getColumnsByPermission;
|
|
49
50
|
performImport(data: string[][], options?: RunOptions): Promise<any>;
|
|
50
51
|
protected getModel(): typeof Model;
|
|
51
|
-
handleRowValuesWithColumns(row: any, rowValues: any, options: RunOptions): Promise<void>;
|
|
52
|
+
handleRowValuesWithColumns(row: any, rowValues: any, options: RunOptions, columns: ImportColumn[]): Promise<void>;
|
|
52
53
|
handleChuckRows(chunkRows: string[][], runOptions?: RunOptions, options?: {
|
|
53
54
|
handingRowIndex: number;
|
|
54
55
|
context: any;
|