@nocobase/plugin-action-import 1.2.12-alpha → 1.3.0-alpha.20240710084543

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.
Files changed (67) hide show
  1. package/package.json +2 -2
  2. package/dist/client/ImportActionInitializer.d.ts +0 -12
  3. package/dist/client/ImportDesigner.d.ts +0 -10
  4. package/dist/client/ImportModal.d.ts +0 -14
  5. package/dist/client/ImportPluginProvider.d.ts +0 -11
  6. package/dist/client/constants.d.ts +0 -9
  7. package/dist/client/context.d.ts +0 -37
  8. package/dist/client/index.d.ts +0 -17
  9. package/dist/client/index.js +0 -33
  10. package/dist/client/locale/index.d.ts +0 -10
  11. package/dist/client/schemaSettings.d.ts +0 -10
  12. package/dist/client/useFields.d.ts +0 -9
  13. package/dist/client/useImportAction.d.ts +0 -15
  14. package/dist/client/useShared.d.ts +0 -84
  15. package/dist/externalVersion.js +0 -30
  16. package/dist/index.d.ts +0 -11
  17. package/dist/index.js +0 -52
  18. package/dist/locale/en-US.json +0 -28
  19. package/dist/locale/es-ES.json +0 -27
  20. package/dist/locale/ko_KR.json +0 -28
  21. package/dist/locale/pt-BR.json +0 -27
  22. package/dist/locale/zh-CN.json +0 -29
  23. package/dist/node_modules/xlsx/LICENSE +0 -201
  24. package/dist/node_modules/xlsx/bin/xlsx.njs +0 -310
  25. package/dist/node_modules/xlsx/bower.json +0 -22
  26. package/dist/node_modules/xlsx/dist/cpexcel.d.ts +0 -39
  27. package/dist/node_modules/xlsx/dist/cpexcel.js +0 -1506
  28. package/dist/node_modules/xlsx/dist/shim.min.js +0 -2
  29. package/dist/node_modules/xlsx/dist/xlsx.core.min.js +0 -17
  30. package/dist/node_modules/xlsx/dist/xlsx.extendscript.js +0 -27961
  31. package/dist/node_modules/xlsx/dist/xlsx.full.min.js +0 -24
  32. package/dist/node_modules/xlsx/dist/xlsx.mini.min.js +0 -10
  33. package/dist/node_modules/xlsx/dist/xlsx.zahl.js +0 -4
  34. package/dist/node_modules/xlsx/dist/zahl.d.ts +0 -4
  35. package/dist/node_modules/xlsx/package.json +0 -1
  36. package/dist/node_modules/xlsx/types/index.d.ts +0 -1033
  37. package/dist/node_modules/xlsx/xlsx.js +0 -7
  38. package/dist/node_modules/xlsx/xlsxworker.js +0 -14
  39. package/dist/server/actions/download-xlsx-template.d.ts +0 -10
  40. package/dist/server/actions/download-xlsx-template.js +0 -67
  41. package/dist/server/actions/import-xlsx.d.ts +0 -10
  42. package/dist/server/actions/import-xlsx.js +0 -90
  43. package/dist/server/actions/index.d.ts +0 -10
  44. package/dist/server/actions/index.js +0 -32
  45. package/dist/server/index.d.ts +0 -14
  46. package/dist/server/index.js +0 -86
  47. package/dist/server/locale/en-US.d.ts +0 -19
  48. package/dist/server/locale/en-US.js +0 -41
  49. package/dist/server/locale/fr-FR.d.ts +0 -19
  50. package/dist/server/locale/fr-FR.js +0 -41
  51. package/dist/server/locale/index.d.ts +0 -10
  52. package/dist/server/locale/index.js +0 -49
  53. package/dist/server/locale/zh-CN.d.ts +0 -20
  54. package/dist/server/locale/zh-CN.js +0 -42
  55. package/dist/server/middleware/index.d.ts +0 -10
  56. package/dist/server/middleware/index.js +0 -43
  57. package/dist/server/migrations/20240425223956-change-locale-module.d.ts +0 -14
  58. package/dist/server/migrations/20240425223956-change-locale-module.js +0 -51
  59. package/dist/server/services/template-creator.d.ts +0 -24
  60. package/dist/server/services/template-creator.js +0 -70
  61. package/dist/server/services/xlsx-importer.d.ts +0 -39
  62. package/dist/server/services/xlsx-importer.js +0 -197
  63. package/dist/server/utils/index.d.ts +0 -14
  64. package/dist/server/utils/index.js +0 -63
  65. package/dist/server/utils/transform.d.ts +0 -92
  66. package/dist/server/utils/transform.js +0 -235
  67. package/dist/swagger/index.json +0 -33
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "displayName.zh-CN": "操作:导入记录",
5
5
  "description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.",
6
6
  "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。",
7
- "version": "1.2.12-alpha",
7
+ "version": "1.3.0-alpha.20240710084543",
8
8
  "license": "AGPL-3.0",
9
9
  "main": "./dist/server/index.js",
10
10
  "homepage": "https://docs.nocobase.com/handbook/action-import",
@@ -34,7 +34,7 @@
34
34
  "@nocobase/test": "1.x",
35
35
  "@nocobase/utils": "1.x"
36
36
  },
37
- "gitHead": "553231d4882496cb7f1f17fa7541899ce82a27ab",
37
+ "gitHead": "07a8b596fc64a9779a194cb9b0dc2ca7570ed9d4",
38
38
  "keywords": [
39
39
  "Actions"
40
40
  ]
@@ -1,12 +0,0 @@
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
- */
9
- import React from 'react';
10
- export declare const ImportWarning: () => React.JSX.Element;
11
- export declare const DownloadTips: () => React.JSX.Element;
12
- export declare const ImportActionInitializer: () => React.JSX.Element;
@@ -1,10 +0,0 @@
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
- */
9
- import React from 'react';
10
- export declare const ImportDesigner: () => React.JSX.Element;
@@ -1,14 +0,0 @@
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
- */
9
- import React from 'react';
10
- export declare const ImportStatus: {
11
- IMPORTING: number;
12
- IMPORTED: number;
13
- };
14
- export declare const ImportModal: (props: any) => React.JSX.Element;
@@ -1,11 +0,0 @@
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
- */
9
- import React from 'react';
10
- export declare const ImportPluginProvider: (props: any) => React.JSX.Element;
11
- export declare const ImportContextProvider: (props: any) => React.JSX.Element;
@@ -1,9 +0,0 @@
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
- */
9
- export declare const NAMESPACE = "action-import";
@@ -1,37 +0,0 @@
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
- */
9
- /// <reference types="react" />
10
- export interface ImportContextType {
11
- importModalVisible: boolean;
12
- setImportModalVisible: (visible: boolean) => void;
13
- importStatus: number;
14
- setImportStatus: (status: number) => void;
15
- importResult: {
16
- data: {
17
- type: string;
18
- data: any[];
19
- };
20
- meta: {
21
- successCount: number;
22
- failureCount: number;
23
- };
24
- };
25
- setImportResult: (result: {
26
- data: {
27
- type: string;
28
- data: any[];
29
- };
30
- meta: {
31
- successCount: number;
32
- failureCount: number;
33
- };
34
- }) => void;
35
- }
36
- export declare const ImportContext: import("react").Context<ImportContextType>;
37
- export declare const useImportContext: () => ImportContextType;
@@ -1,17 +0,0 @@
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
- */
9
- export * from './ImportActionInitializer';
10
- export * from './ImportDesigner';
11
- export * from './ImportPluginProvider';
12
- export * from './useImportAction';
13
- import { Plugin } from '@nocobase/client';
14
- export declare class PluginActionImportClient extends Plugin {
15
- load(): Promise<void>;
16
- }
17
- export default PluginActionImportClient;
@@ -1,33 +0,0 @@
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
- */
9
-
10
- (function(c,i){typeof exports=="object"&&typeof module!="undefined"?i(exports,require("react/jsx-runtime"),require("@formily/shared"),require("@nocobase/client"),require("antd"),require("react-i18next"),require("@formily/antd-v5"),require("@formily/react"),require("react"),require("react-dom"),require("@ant-design/icons"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@formily/shared","@nocobase/client","antd","react-i18next","@formily/antd-v5","@formily/react","react","react-dom","@ant-design/icons","lodash"],i):(c=typeof globalThis!="undefined"?globalThis:c||self,i(c["@nocobase/plugin-action-import"]={},c.jsxRuntime,c["@formily/shared"],c["@nocobase/client"],c.antd,c["react-i18next"],c["@formily/antd-v5"],c["@formily/react"],c.react,c["react-dom"],c["@ant-design/icons"],c.lodash))})(this,function(c,i,y,p,E,M,k,F,g,j,$,V){"use strict";var be=Object.defineProperty,we=Object.defineProperties;var Ce=Object.getOwnPropertyDescriptors;var ue=Object.getOwnPropertySymbols;var Te=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var xe=(c,i,y)=>i in c?be(c,i,{enumerable:!0,configurable:!0,writable:!0,value:y}):c[i]=y,O=(c,i)=>{for(var y in i||(i={}))Te.call(i,y)&&xe(c,y,i[y]);if(ue)for(var y of ue(i))Ee.call(i,y)&&xe(c,y,i[y]);return c},fe=(c,i)=>we(c,Ce(i));var z=(c,i,y)=>new Promise((p,E)=>{var M=g=>{try{F(y.next(g))}catch(j){E(j)}},k=g=>{try{F(y.throw(g))}catch(j){E(j)}},F=g=>g.done?p(g.value):Promise.resolve(g.value).then(M,k);F((y=y.apply(c,i)).next())});const T="action-import",he="action-import";function X(){return M.useTranslation([he,"client"],{nsMode:"fallback"})}const ge=["id","createdAt","createdBy","updatedAt","updatedBy"],G=t=>{const{getCollectionFields:e}=p.useCollectionManager_deprecated(),l=e(t),n=(s,r)=>{var h;if(!s.interface||ge.includes(s.interface))return;const m={name:s.name,title:((h=s==null?void 0:s.uiSchema)==null?void 0:h.title)||s.name,schema:s==null?void 0:s.uiSchema};if(!s.target||r>=2)return m;if(s.target){const o=e(s.target),a=x(o,r+1).filter(Boolean);m.children=m.children||[],m.children.push(...a)}return m},x=(s,r)=>{const m=[];return s.forEach(h=>{const o=n(h,r);o&&m.push(o)}),m};return x(l,1)},ye=t=>({importColumns:t==null?void 0:t.filter(l=>!l.children).map(l=>({dataIndex:[l.name]})),explain:""}),W=()=>{const{t}=X();return i.jsx(E.Alert,{type:"warning",style:{marginBottom:"10px"},message:t("Import warnings",{limit:2e3})})},J=()=>{const{t}=X();return i.jsx(E.Alert,{type:"info",style:{marginBottom:"10px",whiteSpace:"pre-line"},message:t("Download tips")})},K=()=>{const t=p.useSchemaInitializerItem(),{insert:e}=p.useSchemaInitializer(),{name:l}=p.useCollection_deprecated(),n=G(l),x={type:"void",title:'{{ t("Import") }}',"x-action":"importXlsx","x-action-settings":{importSettings:{importColumns:[],explain:""}},"x-toolbar":"ActionSchemaToolbar","x-settings":"actionSettings:import","x-component":"Action","x-component-props":{icon:"CloudUploadOutlined",openMode:"modal"},properties:{modal:{type:"void",title:`{{ t("Import Data", {ns: "${T}" }) }}`,"x-component":"Action.Container","x-decorator":"Form","x-component-props":{width:"50%",className:p.css`
11
- .ant-formily-item-label {
12
- height: var(--controlHeightLG);
13
- }
14
- `},properties:{formLayout:{type:"void","x-component":"FormLayout",properties:{warning:{type:"void","x-component":"ImportWarning"},download:{type:"void",title:`{{ t("Step 1: Download template", {ns: "${T}" }) }}`,"x-component":"FormItem","x-acl-ignore":!0,properties:{tip:{type:"void","x-component":"DownloadTips"},downloadAction:{type:"void",title:`{{ t("Download template", {ns: "${T}" }) }}`,"x-component":"Action","x-component-props":{className:p.css`
15
- margin-top: 5px;
16
- `,useAction:"{{ useDownloadXlsxTemplateAction }}"}}}},upload:{type:"array",title:`{{ t("Step 2: Upload Excel", {ns: "${T}" }) }}`,"x-decorator":"FormItem","x-acl-ignore":!0,"x-component":"Upload.Dragger","x-validator":"{{ uploadValidator }}","x-component-props":{action:"",height:"150px",tipContent:`{{ t("Upload placeholder", {ns: "${T}" }) }}`,beforeUpload:"{{ beforeUploadHandler }}"}}}},footer:{"x-component":"Action.Container.Footer","x-component-props":{},properties:{actions:{type:"void","x-component":"ActionBar","x-component-props":{},properties:{cancel:{type:"void",title:'{{ t("Cancel") }}',"x-component":"Action","x-component-props":{useAction:"{{ cm.useCancelAction }}"}},startImport:{type:"void",title:`{{ t("Start import", {ns: "${T}" }) }}`,"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useImportStartAction }}"},"x-reactions":{dependencies:["upload"],fulfill:{run:"validateUpload($form, $self, $deps)"}}}}}}}}}}};return i.jsx(p.SchemaInitializerItem,{title:t.title,onClick:()=>{var r;x["x-action-settings"].importSettings=ye(n);const s=y.merge(x||{},t.schema||{});(r=t==null?void 0:t.schemaInitialize)==null||r.call(t,s),e(s)}})},Ie=["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"],H=()=>{const{t}=M.useTranslation(T),{name:e}=p.useCollection_deprecated(),l=G(e);return{importSettingsSchema:{type:"void","x-component":"Grid",properties:{explain:{type:"string",title:`{{ t("Import explain", {ns: "${T}"}) }}`,"x-decorator":"FormItem","x-component":"Input.TextArea"},importColumns:{type:"array","x-component":"ArrayItems","x-decorator":"FormItem",items:{type:"object",properties:{space:{type:"void","x-component":"Space","x-component-props":{className:p.css`
17
- width: 100%;
18
- & .ant-space-item:nth-child(2) {
19
- flex: 1;
20
- }
21
- `},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},dataIndex:{type:"array","x-decorator":"FormItem","x-component":p.Cascader,required:!0,enum:l,"x-component-props":{fieldNames:{label:"title",value:"name",children:"children"},changeOnSelect:!1}},remove:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.Remove"}}}}},properties:{add:{type:"void",title:`{{ t("Add importable field", {ns: "${T}"}) }}`,"x-component":"ArrayItems.Addition","x-component-props":{className:p.css`
22
- border-color: var(--colorSettings);
23
- color: var(--colorSettings);
24
- &.ant-btn-dashed:hover {
25
- border-color: var(--colorSettings);
26
- color: var(--colorSettings);
27
- }
28
- `}}}}}},beforeUploadHandler(){return!1},uploadValidator(n,x){var r;if(n.length>1)return{type:"error",message:t("Only one file is allowed to be uploaded")};const s=(r=n[0])!=null?r:{};return s.size>10*1024*1024?{type:"error",message:t("File size cannot exceed 10M")}:Ie.includes(s.type)?"":{type:"error",message:t("Please upload the file of Excel")}},validateUpload(n,x,s){var m;const[r]=s;x.disabled=(r==null?void 0:r.length)===0,x.componentProps=fe(O({},x.componentProps),{disabled:(r==null?void 0:r.length)===0||((m=n.errors)==null?void 0:m.length)>0})}}},Y=()=>{var m,h,o,a,f,d;const t=F.useField(),e=F.useFieldSchema(),{t:l}=M.useTranslation(),{dn:n}=p.useDesignable(),[x,s]=g.useState(),{importSettingsSchema:r}=H();return g.useEffect(()=>{s(r)},[t.address,(m=e==null?void 0:e["x-action-settings"])==null?void 0:m.importSettings]),i.jsxs(p.GeneralSchemaDesigner,{disableInitializer:!0,children:[i.jsx(p.SchemaSettingsModalItem,{title:l("Edit button"),schema:{type:"object",title:l("Edit button"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:l("Button title"),default:e.title,"x-component-props":{}},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:l("Button icon"),default:(h=e==null?void 0:e["x-component-props"])==null?void 0:h.icon,"x-component-props":{}},type:{"x-decorator":"FormItem","x-component":"Radio.Group",title:l("Button background color"),default:(o=e==null?void 0:e["x-component-props"])!=null&&o.danger?"danger":((a=e==null?void 0:e["x-component-props"])==null?void 0:a.type)==="primary"?"primary":"default",enum:[{value:"default",label:'{{t("Default")}}'},{value:"primary",label:'{{t("Highlight")}}'},{value:"danger",label:'{{t("Danger red")}}'}]}}},onSubmit:({title:u,icon:I,type:v})=>{e.title=u,t.title=u,t.componentProps.icon=I,t.componentProps.danger=v==="danger",t.componentProps.type=v,e["x-component-props"]=e["x-component-props"]||{},e["x-component-props"].icon=I,e["x-component-props"].danger=v==="danger",e["x-component-props"].type=v,n.emit("patch",{schema:{"x-uid":e["x-uid"],title:u,"x-component-props":O({},e["x-component-props"])}}),n.refresh()}}),i.jsx(p.SchemaSettingsActionModalItem,{title:l("Importable fields"),schema:x,initialValues:O({},(d=(f=e==null?void 0:e["x-action-settings"])==null?void 0:f.importSettings)!=null?d:{}),components:{ArrayItems:k.ArrayItems},onSubmit:({importColumns:u,explain:I})=>{const v=u==null?void 0:u.filter(S=>{var A;return(A=S==null?void 0:S.dataIndex)==null?void 0:A.length}).map(S=>({dataIndex:S.dataIndex.map(A=>{var b;return(b=A.name)!=null?b:A}),title:S.title}));e["x-action-settings"].importSettings={importColumns:v,explain:I},n.emit("patch",{schema:{"x-uid":e["x-uid"],"x-action-settings":e["x-action-settings"]}}),n.refresh()}}),i.jsx(p.SchemaSettingsDivider,{}),i.jsx(p.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:u=>u["x-component"]==="Space"||u["x-component"].endsWith("ActionBar"),confirm:{title:l("Delete action")}})]})},R=g.createContext(null);R.displayName="ImportContext";const Q=()=>g.useContext(R);var U=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Z={exports:{}};(function(t,e){(function(l,n){n()})(U,function(){function l(o,a){return typeof a=="undefined"?a={autoBom:!1}:typeof a!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(o.type)?new Blob(["\uFEFF",o],{type:o.type}):o}function n(o,a,f){var d=new XMLHttpRequest;d.open("GET",o),d.responseType="blob",d.onload=function(){h(d.response,a,f)},d.onerror=function(){console.error("could not download file")},d.send()}function x(o){var a=new XMLHttpRequest;a.open("HEAD",o,!1);try{a.send()}catch(f){}return 200<=a.status&&299>=a.status}function s(o){try{o.dispatchEvent(new MouseEvent("click"))}catch(f){var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(a)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof U=="object"&&U.global===U?U:void 0,m=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),h=r.saveAs||(typeof window!="object"||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(o,a,f){var d=r.URL||r.webkitURL,u=document.createElement("a");a=a||o.name||"download",u.download=a,u.rel="noopener",typeof o=="string"?(u.href=o,u.origin===location.origin?s(u):x(u.href)?n(o,a,f):s(u,u.target="_blank")):(u.href=d.createObjectURL(o),setTimeout(function(){d.revokeObjectURL(u.href)},4e4),setTimeout(function(){s(u)},0))}:"msSaveOrOpenBlob"in navigator?function(o,a,f){if(a=a||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(l(o,f),a);else if(x(o))n(o,a,f);else{var d=document.createElement("a");d.href=o,d.target="_blank",setTimeout(function(){s(d)})}}:function(o,a,f,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof o=="string")return n(o,a,f);var u=o.type==="application/octet-stream",I=/constructor/i.test(r.HTMLElement)||r.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||u&&I||m)&&typeof FileReader!="undefined"){var S=new FileReader;S.onloadend=function(){var w=S.result;w=v?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=w:location=w,d=null},S.readAsDataURL(o)}else{var A=r.URL||r.webkitURL,b=A.createObjectURL(o);d?d.location=b:location.href=b,d=null,setTimeout(function(){A.revokeObjectURL(b)},4e4)}});r.saveAs=h.saveAs=h,t.exports=h})})(Z);var ee=Z.exports;const D={IMPORTING:1,IMPORTED:2},ve=t=>{const{t:e}=M.useTranslation(T),{importModalVisible:l,importStatus:n,importResult:x,setImportModalVisible:s}=Q(),{data:r,meta:m}=x!=null?x:{},h=()=>{s(!1)},o=()=>{const a=new Int8Array(r==null?void 0:r.data),f=new Blob([a],{type:"application/x-xls"});ee.saveAs(f,"fail.xlsx")};return i.jsx(E.Modal,{title:e("Import Data"),width:"50%",styles:{body:{height:"calc(80vh - 200px)"}},open:l,footer:null,closable:n===D.IMPORTED,onCancel:h,children:i.jsxs("div",{className:p.css`
29
- display: flex;
30
- justify-content: center;
31
- align-items: center;
32
- height: 100%;
33
- `,children:[n===D.IMPORTING&&i.jsx(E.Spin,{indicator:i.jsx($.LoadingOutlined,{style:{fontSize:24},spin:!0}),tip:e("Excel data importing")}),n===D.IMPORTED&&i.jsxs(E.Space,{direction:"vertical",align:"center",children:[i.jsx($.ExclamationCircleFilled,{style:{fontSize:72,color:"#1890ff"}}),i.jsx("p",{children:e("{{successCount}} records have been successfully imported",O({},m!=null?m:{}))}),i.jsxs(E.Space,{children:[(m==null?void 0:m.failureCount)>0&&i.jsx(E.Button,{onClick:o,children:e("To download the failure data")}),i.jsx(E.Button,{type:"primary",onClick:h,children:e("Done")})]})]})]})})},te=t=>{let e=t;for(;e&&e["x-action"]!=="importXlsx";)e=e.parent;return{schema:e}},oe=t=>!t||!Array.isArray(t)?[]:t,ne=()=>{const{service:t,resource:e}=p.useBlockRequestContext();p.useAPIClient();const l=F.useFieldSchema(),n=p.useCompile(),{getCollectionJoinField:x,getCollectionField:s}=p.useCollectionManager_deprecated(),{name:r,title:m,getField:h}=p.useCollection_deprecated();M.useTranslation(T);const{schema:o}=te(l);return{run(){return z(this,null,function*(){var S,A;const{importColumns:f,explain:d}=V.cloneDeep((A=(S=o==null?void 0:o["x-action-settings"])==null?void 0:S.importSettings)!=null?A:{}),u=oe(f).map(b=>{var N,_;const w=s(`${r}.${b.dataIndex[0]}`);if(w){if(b.defaultTitle=n((N=w==null?void 0:w.uiSchema)==null?void 0:N.title)||w.name,b.dataIndex.length>1){const P=x(`${r}.${b.dataIndex.join(".")}`);if(!P)return;b.defaultTitle=b.defaultTitle+"/"+n((_=P==null?void 0:P.uiSchema)==null?void 0:_.title)||P.name}return w.interface==="chinaRegion"&&b.dataIndex.push("name"),b}}).filter(Boolean),{data:I}=yield e.downloadXlsxTemplate({values:{title:n(m),explain:d,columns:n(u)}},{method:"post",responseType:"blob"}),v=new Blob([I],{type:"application/x-xls"});ee.saveAs(v,`${n(m)}.xlsx`)})}}},re=()=>{var w;const{service:t,resource:e}=p.useBlockRequestContext(),l=p.useAPIClient(),n=F.useFieldSchema(),x=p.useCompile(),{getCollectionJoinField:s,getCollectionField:r}=p.useCollectionManager_deprecated(),{name:m,title:h,getField:o}=p.useCollection_deprecated();M.useTranslation(T);const{schema:a}=te(n),f=F.useForm(),{setVisible:d,fieldSchema:u}=p.useActionContext(),{setImportModalVisible:I,setImportStatus:v,setImportResult:S}=Q(),{upload:A}=f.values;return g.useEffect(()=>{f.reset()},[]),{run(){return z(this,null,function*(){var ce,pe,le;const{importColumns:N,explain:_}=V.cloneDeep((pe=(ce=a==null?void 0:a["x-action-settings"])==null?void 0:ce.importSettings)!=null?pe:{}),P=oe(N).map(C=>{var de,me;const B=r(`${m}.${C.dataIndex[0]}`);if(B){if(C.defaultTitle=x((de=B==null?void 0:B.uiSchema)==null?void 0:de.title)||B.name,C.dataIndex.length>1){const L=s(`${m}.${C.dataIndex.join(".")}`);if(!L)return;C.defaultTitle=C.defaultTitle+"/"+x((me=L==null?void 0:L.uiSchema)==null?void 0:me.title)||L.name}return B.interface==="chinaRegion"&&C.dataIndex.push("name"),C}}).filter(Boolean),q=new FormData,Ae=f.values.upload.map(C=>C.originFileObj);q.append("file",Ae[0]),q.append("columns",JSON.stringify(P)),q.append("explain",_),d(!1),I(!0),v(D.IMPORTING);try{const{data:C}=yield l.axios.post(`${m}:importXlsx`,q,{timeout:6e5});S(C),f.reset(),yield(le=t==null?void 0:t.refresh)==null?void 0:le.call(t),v(D.IMPORTED)}catch(C){I(!1),d(!0)}})},disabled:(A==null?void 0:A.length)===0||((w=f.errors)==null?void 0:w.length)>0}},ae=t=>{const{uploadValidator:e,beforeUploadHandler:l,validateUpload:n}=H();return i.jsx(p.SchemaComponentOptions,{components:{ImportActionInitializer:K,ImportDesigner:Y,ImportWarning:W,DownloadTips:J},scope:{uploadValidator:e,validateUpload:n,beforeUploadHandler:l,useDownloadXlsxTemplateAction:ne,useImportStartAction:re},children:i.jsx(ie,{children:t.children})})},ie=t=>{const[e,l]=g.useState(!1),[n,x]=g.useState(D.IMPORTING),[s,r]=g.useState(null);return i.jsxs(R.Provider,{value:{importModalVisible:e,setImportModalVisible:l,importStatus:n,setImportStatus:x,importResult:s,setImportResult:r},children:[j.createPortal(i.jsx(ve,{}),document.body),t.children]})},Se=new p.SchemaSettings({name:"actionSettings:import",items:[{name:"editButton",Component:p.ButtonEditor,useComponentProps(){const{buttonEditorProps:t}=p.useSchemaToolbar();return t}},{name:"importableFields",type:"actionModal",useComponentProps(){var m,h,o;const t=F.useField(),e=F.useFieldSchema(),{t:l}=M.useTranslation(),{dn:n}=p.useDesignable(),[x,s]=g.useState(),{importSettingsSchema:r}=H();return g.useEffect(()=>{s(r)},[t.address,(m=e==null?void 0:e["x-action-settings"])==null?void 0:m.importSettings]),{title:l("Importable fields"),schema:x,initialValues:O({},(o=(h=e==null?void 0:e["x-action-settings"])==null?void 0:h.importSettings)!=null?o:{}),components:{ArrayItems:k.ArrayItems},onSubmit:({importColumns:a,explain:f})=>{const d=a==null?void 0:a.filter(u=>{var I;return(I=u==null?void 0:u.dataIndex)==null?void 0:I.length}).map(u=>({dataIndex:u.dataIndex.map(I=>{var v;return(v=I.name)!=null?v:I}),title:u.title}));e["x-action-settings"].importSettings={importColumns:d,explain:f},n.emit("patch",{schema:{"x-uid":e["x-uid"],"x-action-settings":e["x-action-settings"]}}),n.refresh()}}}},{name:"divider",type:"divider"},{name:"delete",type:"remove",useComponentProps(){const{t}=M.useTranslation();return{removeParentsIfNoChildren:!0,breakRemoveOn:e=>e["x-component"]==="Space"||e["x-component"].endsWith("ActionBar"),confirm:{title:t("Delete action")}}}}]});class se extends p.Plugin{load(){return z(this,null,function*(){this.app.use(ae);const e={title:"{{t('Import')}}",Component:"ImportActionInitializer",schema:{"x-align":"right","x-decorator":"ACLActionProvider","x-acl-action":"importXlsx","x-acl-action-props":{skipScopeCheck:!0}},useVisible(){const n=p.useCollection_deprecated();return(n.template!=="view"||(n==null?void 0:n.writableView))&&n.template!=="file"&&n.template!=="sql"}},l=this.app.schemaInitializerManager.get("table:configureActions");l==null||l.add("enableActions.import",e),this.app.schemaInitializerManager.addItem("gantt:configureActions","enableActions.import",e),this.app.schemaSettingsManager.add(Se)})}}c.DownloadTips=J,c.ImportActionInitializer=K,c.ImportContextProvider=ie,c.ImportDesigner=Y,c.ImportPluginProvider=ae,c.ImportWarning=W,c.PluginActionImportClient=se,c.default=se,c.useDownloadXlsxTemplateAction=ne,c.useImportStartAction=re,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,10 +0,0 @@
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
- */
9
- export declare const NAMESPACE = "action-import";
10
- export declare function useImportTranslation(): import("react-i18next").UseTranslationResponse<("action-import" | "client")[], undefined>;
@@ -1,10 +0,0 @@
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
- */
9
- import { SchemaSettings } from '@nocobase/client';
10
- export declare const importActionSchemaSettings: SchemaSettings<{}>;
@@ -1,9 +0,0 @@
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
- */
9
- export declare const useFields: (collectionName: string) => any[];
@@ -1,15 +0,0 @@
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
- */
9
- export declare const useDownloadXlsxTemplateAction: () => {
10
- run(): Promise<void>;
11
- };
12
- export declare const useImportStartAction: () => {
13
- run(): Promise<void>;
14
- disabled: boolean;
15
- };
@@ -1,84 +0,0 @@
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
- */
9
- /// <reference types="react" />
10
- import type { VoidField } from '@formily/core';
11
- export declare const useShared: () => {
12
- importSettingsSchema: {
13
- type: string;
14
- 'x-component': string;
15
- properties: {
16
- explain: {
17
- type: string;
18
- title: string;
19
- 'x-decorator': string;
20
- 'x-component': string;
21
- };
22
- importColumns: {
23
- type: string;
24
- 'x-component': string;
25
- 'x-decorator': string;
26
- items: {
27
- type: string;
28
- properties: {
29
- space: {
30
- type: string;
31
- 'x-component': string;
32
- 'x-component-props': {
33
- className: string;
34
- };
35
- properties: {
36
- sort: {
37
- type: string;
38
- 'x-decorator': string;
39
- 'x-component': string;
40
- };
41
- dataIndex: {
42
- type: string;
43
- 'x-decorator': string;
44
- 'x-component': import("react").FunctionComponent<Partial<import("@nocobase/client").CascaderProps<any>> & import("react").RefAttributes<unknown>>;
45
- required: boolean;
46
- enum: any[];
47
- 'x-component-props': {
48
- fieldNames: {
49
- label: string;
50
- value: string;
51
- children: string;
52
- };
53
- changeOnSelect: boolean;
54
- };
55
- };
56
- remove: {
57
- type: string;
58
- 'x-decorator': string;
59
- 'x-component': string;
60
- };
61
- };
62
- };
63
- };
64
- };
65
- properties: {
66
- add: {
67
- type: string;
68
- title: string;
69
- 'x-component': string;
70
- 'x-component-props': {
71
- className: string;
72
- };
73
- };
74
- };
75
- };
76
- };
77
- };
78
- beforeUploadHandler(): boolean;
79
- uploadValidator(value: any, rule: any): "" | {
80
- type: string;
81
- message: string;
82
- };
83
- validateUpload(form: any, submitField: VoidField, deps: any): void;
84
- };
@@ -1,30 +0,0 @@
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
- */
9
-
10
- module.exports = {
11
- "@formily/react": "2.3.0",
12
- "@formily/shared": "2.3.0",
13
- "@nocobase/client": "1.2.12-alpha",
14
- "antd": "5.12.8",
15
- "react": "18.2.0",
16
- "@formily/antd-v5": "1.1.9",
17
- "react-i18next": "11.18.6",
18
- "@ant-design/icons": "5.2.6",
19
- "react-dom": "18.2.0",
20
- "lodash": "4.17.21",
21
- "@formily/core": "2.3.0",
22
- "@nocobase/server": "1.2.12-alpha",
23
- "@nocobase/actions": "1.2.12-alpha",
24
- "@nocobase/database": "1.2.12-alpha",
25
- "async-mutex": "0.3.2",
26
- "@nocobase/data-source-manager": "1.2.12-alpha",
27
- "@nocobase/utils": "1.2.12-alpha",
28
- "sequelize": "6.35.2",
29
- "mathjs": "10.6.4"
30
- };
package/dist/index.d.ts DELETED
@@ -1,11 +0,0 @@
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
- */
9
- export * from './server';
10
- export { default } from './server';
11
- export declare const namespace: string;
package/dist/index.js DELETED
@@ -1,52 +0,0 @@
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
- */
9
-
10
- var __create = Object.create;
11
- var __defProp = Object.defineProperty;
12
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
- var __getOwnPropNames = Object.getOwnPropertyNames;
14
- var __getProtoOf = Object.getPrototypeOf;
15
- var __hasOwnProp = Object.prototype.hasOwnProperty;
16
- var __export = (target, all) => {
17
- for (var name2 in all)
18
- __defProp(target, name2, { get: all[name2], enumerable: true });
19
- };
20
- var __copyProps = (to, from, except, desc) => {
21
- if (from && typeof from === "object" || typeof from === "function") {
22
- for (let key of __getOwnPropNames(from))
23
- if (!__hasOwnProp.call(to, key) && key !== except)
24
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
- }
26
- return to;
27
- };
28
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
29
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30
- // If the importer is in node compatibility mode or this is not an ESM
31
- // file that has been converted to a CommonJS file using a Babel-
32
- // compatible transform (i.e. "__esModule" has not been set), then set
33
- // "default" to the CommonJS "module.exports" for node compatibility.
34
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
35
- mod
36
- ));
37
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
- var src_exports = {};
39
- __export(src_exports, {
40
- default: () => import_server.default,
41
- namespace: () => namespace
42
- });
43
- module.exports = __toCommonJS(src_exports);
44
- var import_package = require("../package.json");
45
- __reExport(src_exports, require("./server"), module.exports);
46
- var import_server = __toESM(require("./server"));
47
- const namespace = import_package.name;
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- namespace,
51
- ...require("./server")
52
- });
@@ -1,28 +0,0 @@
1
- {
2
- "Only one file is allowed to be uploaded": "Only one file is allowed to be uploaded",
3
- "File size cannot exceed 10M": "File size cannot exceed 10M",
4
- "Please upload the file of Excel": "Please upload the file of Excel",
5
- "Import Data": "Import Data",
6
- "Start import": "Start import",
7
- "Import explain": "Guide",
8
- "Download template": "Download template",
9
- "Step 1: Download template": "Step 1: Download template",
10
- "Step 2: Upload Excel": "Step 2: Upload Excel",
11
- "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",
12
- "Import warnings": "You can import up to {{limit}} rows of data at a time, any excess will be ignored.",
13
- "Upload placeholder": "Drag and drop the file here or click to upload, file size should not exceed 30M",
14
- "Excel data importing": "Excel data importing",
15
- "{{successCount}} records have been successfully imported": "{{successCount}} records have been successfully imported",
16
- "To download the failure data": "To download the failure data",
17
- "Add importable field": "Add importable field",
18
- "Done": "Done",
19
- "Yes": "Yes",
20
- "No": "No",
21
- "Field {{fieldName}} does not exist": "Field {{fieldName}} does not exist",
22
- "can not find value": "can not find value",
23
- "password is empty": "password is empty",
24
- "Incorrect time format": "Incorrect time format",
25
- "Incorrect date format": "Incorrect date format",
26
- "Incorrect email format": "Incorrect email format",
27
- "Illegal percentage format": "Illegal percentage format"
28
- }
@@ -1,27 +0,0 @@
1
- {
2
- "Only one file is allowed to be uploaded": "Sólo se permite cargar un archivo",
3
- "File size cannot exceed 10M": "El tamaño del archivo no puede superar los 10M",
4
- "Please upload the file of Excel": "Por favor, cargue el archivo de Excel",
5
- "Import Data": "Importar datos",
6
- "Start import": "Iniciar importación",
7
- "Import explain": "Guía",
8
- "Download template": "Descargar plantilla",
9
- "Step 1: Download template": "Paso 1: Descargar plantilla",
10
- "Step 2: Upload Excel": "Paso 2: Cargar Excel",
11
- "Download tips": "- Descargar la plantilla y rellenar los datos según el formato \r\n - Importar sólo la primera hoja de cálculo \r\n - No cambiar la cabecera de la plantilla para evitar fallos en la importación",
12
- "Upload placeholder": "Arrastra y suelta el archivo aquí o haga clic para cargarlo, el tamaño del archivo no debe superar los 10M",
13
- "Excel data importing": "Importación de datos Excel",
14
- "{{successCount}} records have been successfully imported": "{{successCount}} registros han sido importados exitosamente",
15
- "To download the failure data": "Para descargar los datos de fallo",
16
- "Add importable field": "Añadir campo importable",
17
- "Done": "Hecho",
18
- "Yes": "Sí",
19
- "No": "No",
20
- "Field {{fieldName}} does not exist": "El campo {{fieldName}} no existe",
21
- "can not find value": "no se puede encontrar el valor",
22
- "password is empty": "la contraseña está vacía",
23
- "Incorrect time format": "Formato de hora incorrecto",
24
- "Incorrect date format": "Formato de fecha incorrecto",
25
- "Incorrect email format": "Formato de correo electrónico incorrecto",
26
- "Illegal percentage format": "Formato de porcentaje ilegal"
27
- }
@@ -1,28 +0,0 @@
1
- {
2
- "Only one file is allowed to be uploaded": "하나의 파일만 업로드 할 수 있습니다",
3
- "File size cannot exceed 10M": "파일 크기는 10M을 초과할 수 없습니다",
4
- "Please upload the file of Excel": "Excel 파일을 업로드하십시오",
5
- "Import Data": "데이터 가져오기",
6
- "Start import": "가져오기 시작",
7
- "Import explain": "가져오기 설명",
8
- "Download template": "템플릿 다운로드",
9
- "Step 1: Download template": "단계 1: 템플릿 다운로드",
10
- "Step 2: Upload Excel": "단계 2: Excel 업로드",
11
- "Download tips": "- 템플릿을 다운로드하고 형식에 맞게 데이터를 작성합니다.\r\n - 첫 번째 시트만 가져옵니다.\r\n - 템플릿 헤더를 수정하지 마세요. 가져오기 실패를 방지합니다.",
12
- "Upload placeholder": "파일을 여기에 드래그하거나 클릭하여 업로드하십시오. 파일 크기는 10M을 초과할 수 없습니다.",
13
- "Excel data importing": "Excel 데이터 가져오기 중입니다. 창을 닫지 마십시오.",
14
- "{{successCount}} records have been successfully imported": "{{successCount}} 개의 데이터를 성공적으로 가져왔습니다.",
15
- "To download the failure data": "실패한 데이터를 다운로드하려면",
16
- "Add importable field": "가져올 수 있는 필드 추가",
17
- "Done": "완료",
18
- "Yes": "예",
19
- "No": "아니요",
20
- "Field {{fieldName}} does not exist": "필드 {{fieldName}}가 존재하지 않습니다",
21
- "can not find value": "값을 찾을 수 없습니다",
22
- "password is empty": "암호가 비어 있습니다",
23
- "Incorrect time format": "잘못된 시간 형식",
24
- "Incorrect date format": "잘못된 날짜 형식",
25
- "Incorrect email format": "잘못된 이메일 형식",
26
- "Illegal percentage format": "잘못된 백분율 형식",
27
- "Imported template does not match, please download again.": "가져온 템플릿이 일치하지 않습니다. 다시 다운로드하세요."
28
- }
@@ -1,27 +0,0 @@
1
- {
2
- "Only one file is allowed to be uploaded": "Somente um arquivo pode ser enviado de cada vez",
3
- "File size cannot exceed 10M": "O tamanho do arquivo não pode exceder 10 MB",
4
- "Please upload the file of Excel": "Por favor, envie um arquivo do Excel",
5
- "Import Data": "Importar dados",
6
- "Start import": "Iniciar importação",
7
- "Import explain": "Guia",
8
- "Download template": "Baixar modelo",
9
- "Step 1: Download template": "Passo 1: Baixar modelo",
10
- "Step 2: Upload Excel": "Passo 2: Enviar Excel",
11
- "Download tips": "- Baixe o modelo e preencha os dados de acordo com o formato \r\n - Importe apenas a primeira planilha \r\n - Não altere o cabeçalho do modelo para evitar falhas de importação",
12
- "Upload placeholder": "Arraste e solte o arquivo aqui ou clique para enviar, o tamanho do arquivo não deve exceder 10 MB",
13
- "Excel data importing": "Importando dados do Excel",
14
- "Import done, total success have {{successCount}} , total failure have {{failureCount}}": "{{successCount}} dados foram importados com sucesso",
15
- "To download the failure data": "Para baixar os dados que falharam",
16
- "Add importable field": "Adicionar campo importável",
17
- "Done": "Concluído",
18
- "Yes": "Sim",
19
- "No": "Não",
20
- "Field {{fieldName}} does not exist": "O campo {{fieldName}} não existe",
21
- "can not find value": "Não foi possível encontrar o valor",
22
- "password is empty": "A senha está vazia",
23
- "Incorrect time format": "Formato de hora incorreto",
24
- "Incorrect date format": "Formato de data incorreto",
25
- "Incorrect email format": "Formato de e-mail incorreto",
26
- "Illegal percentage format": "Formato de porcentagem ilegal"
27
- }
@@ -1,29 +0,0 @@
1
- {
2
- "Only one file is allowed to be uploaded": "只允许上传一个文件",
3
- "File size cannot exceed 10M": "文件大小不能超过10M",
4
- "Please upload the file of Excel": "请上传Excel的文件",
5
- "Import Data": "导入数据",
6
- "Start import": "开始导入",
7
- "Import explain": "说明",
8
- "Download template": "下载模板",
9
- "Step 1: Download template": "1.下载模板",
10
- "Step 2: Upload Excel": "2.上传完善后的表格",
11
- "Download tips": "- 下载模板后,按格式填写数据\r\n - 只导入第一张工作表\r\n - 请勿改模板表头,防止导入失败",
12
- "Import warnings": "每次最多导入 {{limit}} 行数据,超出的将被忽略。",
13
- "Upload placeholder": "将文件拖曳到此处或点击上传,文件大小不超过10M",
14
- "Excel data importing": "数据导入中,请勿关闭窗口",
15
- "{{successCount}} records have been successfully imported": "已成功导入 {{successCount}} 条数据",
16
- "To download the failure data": "下载导入失败的数据",
17
- "Add importable field": "添加可导入字段",
18
- "Done": "完成",
19
- "Yes": "是",
20
- "No": "否",
21
- "Field {{fieldName}} does not exist": "字段 {{fieldName}} 不存在",
22
- "can not find value": "找不到对应值",
23
- "password is empty": "密码为空",
24
- "Incorrect time format": "时间格式不正确",
25
- "Incorrect date format": "日期格式不正确",
26
- "Incorrect email format": "邮箱格式不正确",
27
- "Illegal percentage format": "百分比格式有误",
28
- "Imported template does not match, please download again.": "导入模板不匹配,请检查导入文件标题行或重新下载导入模板"
29
- }