@nocobase/plugin-action-import 1.3.44-beta → 1.4.0-alpha.0
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 +6 -6
- package/dist/externalVersion.js +6 -6
- package/dist/node_modules/xlsx/package.json +1 -1
- package/dist/server/index.js +0 -4
- package/dist/server/locale/en-US.json +10 -0
- package/dist/server/locale/fr-FR.json +10 -0
- package/dist/server/locale/zh-CN.json +11 -0
- package/dist/server/services/xlsx-importer.js +1 -0
- package/package.json +2 -2
- package/dist/server/locale/en-US.d.ts +0 -19
- package/dist/server/locale/en-US.js +0 -41
- package/dist/server/locale/fr-FR.d.ts +0 -19
- package/dist/server/locale/fr-FR.js +0 -41
- package/dist/server/locale/index.d.ts +0 -10
- package/dist/server/locale/index.js +0 -49
- package/dist/server/locale/zh-CN.d.ts +0 -20
- package/dist/server/locale/zh-CN.js +0 -42
- /package/dist/locale/{ja_JP.json → ja-JP.json} +0 -0
- /package/dist/locale/{ko_KR.json → ko-KR.json} +0 -0
package/dist/client/index.js
CHANGED
|
@@ -7,27 +7,27 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
(function(c,a){typeof exports=="object"&&typeof module!="undefined"?a(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"],a):(c=typeof globalThis!="undefined"?globalThis:c||self,a(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,a,y,
|
|
10
|
+
(function(c,a){typeof exports=="object"&&typeof module!="undefined"?a(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"],a):(c=typeof globalThis!="undefined"?globalThis:c||self,a(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,a,y,i,E,F,N,M,g,j,R,$){"use strict";var Te=Object.defineProperty,Ce=Object.defineProperties;var Ee=Object.getOwnPropertyDescriptors;var ue=Object.getOwnPropertySymbols;var Me=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable;var xe=(c,a,y)=>a in c?Te(c,a,{enumerable:!0,configurable:!0,writable:!0,value:y}):c[a]=y,O=(c,a)=>{for(var y in a||(a={}))Me.call(a,y)&&xe(c,y,a[y]);if(ue)for(var y of ue(a))Fe.call(a,y)&&xe(c,y,a[y]);return c},he=(c,a)=>Ce(c,Ee(a));var q=(c,a,y)=>new Promise((i,E)=>{var F=g=>{try{M(y.next(g))}catch(j){E(j)}},N=g=>{try{M(y.throw(g))}catch(j){E(j)}},M=g=>g.done?i(g.value):Promise.resolve(g.value).then(F,N);M((y=y.apply(c,a)).next())});const C="action-import",fe="action-import";function V(){return F.useTranslation([fe,"client"],{nsMode:"fallback"})}const ge=["id","createdAt","createdBy","updatedAt","updatedBy"],X=t=>{const{getCollectionFields:e}=i.useCollectionManager_deprecated(),l=e(t),p=(s,n)=>{var f;if(!s.interface||ge.includes(s.interface))return;const m={name:s.name,title:((f=s==null?void 0:s.uiSchema)==null?void 0:f.title)||s.name,schema:s==null?void 0:s.uiSchema};if(!s.target||n>=2)return m;if(s.target&&["hasOne","hasMany","belongsTo","belongsToMany","belongsToArray"].includes(s.type)){const o=e(s.target),r=x(o,n+1).filter(Boolean);m.children=m.children||[],m.children.push(...r)}return m},x=(s,n)=>{const m=[];return s.forEach(f=>{const o=p(f,n);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:""}),G=()=>{const{t}=V();return a.jsx(E.Alert,{type:"warning",style:{marginBottom:"10px"},message:t("Import warnings",{limit:2e3})})},W=()=>{const{t}=V();return a.jsx(E.Alert,{type:"info",style:{marginBottom:"10px",whiteSpace:"pre-line"},message:t("Download tips")})},J=()=>{const t=i.useSchemaInitializerItem(),{insert:e}=i.useSchemaInitializer(),{name:l}=i.useCollection_deprecated(),p=X(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: "${C}" }) }}`,"x-component":"Action.Modal","x-decorator":"Form","x-component-props":{width:"100%",style:{maxWidth:"750px"},className:i.css`
|
|
11
11
|
.ant-formily-item-label {
|
|
12
12
|
height: var(--controlHeightLG);
|
|
13
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: "${
|
|
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: "${C}" }) }}`,"x-component":"FormItem","x-acl-ignore":!0,properties:{tip:{type:"void","x-component":"DownloadTips"},downloadAction:{type:"void",title:`{{ t("Download template", {ns: "${C}" }) }}`,"x-component":"Action","x-component-props":{className:i.css`
|
|
15
15
|
margin-top: 5px;
|
|
16
|
-
`,useAction:"{{ useDownloadXlsxTemplateAction }}"}}}},upload:{type:"array",title:`{{ t("Step 2: Upload Excel", {ns: "${
|
|
16
|
+
`,useAction:"{{ useDownloadXlsxTemplateAction }}"}}}},upload:{type:"array",title:`{{ t("Step 2: Upload Excel", {ns: "${C}" }) }}`,"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: "${C}" }) }}`,beforeUpload:"{{ beforeUploadHandler }}"}}}},footer:{"x-component":"Action.Modal.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: "${C}" }) }}`,"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useImportStartAction }}"},"x-reactions":{dependencies:["upload"],fulfill:{run:"validateUpload($form, $self, $deps)"}}}}}}}}}}};return a.jsx(i.SchemaInitializerItem,{title:t.title,onClick:()=>{var n;x["x-action-settings"].importSettings=ye(p);const s=y.merge(x||{},t.schema||{});(n=t==null?void 0:t.schemaInitialize)==null||n.call(t,s),e(s)}})},Ie=["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel","application/wps-office.xlsx"],z=()=>{const{t}=F.useTranslation(C),{name:e}=i.useCollection_deprecated(),l=X(e);return{importSettingsSchema:{type:"void","x-component":"Grid",properties:{explain:{type:"string",title:`{{ t("Import explain", {ns: "${C}"}) }}`,"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:i.css`
|
|
17
17
|
width: 100%;
|
|
18
18
|
& .ant-space-item:nth-child(2) {
|
|
19
19
|
flex: 1;
|
|
20
20
|
}
|
|
21
|
-
`},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},dataIndex:{type:"array","x-decorator":"FormItem","x-component":
|
|
21
|
+
`},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},dataIndex:{type:"array","x-decorator":"FormItem","x-component":i.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: "${C}"}) }}`,"x-component":"ArrayItems.Addition","x-component-props":{className:i.css`
|
|
22
22
|
border-color: var(--colorSettings);
|
|
23
23
|
color: var(--colorSettings);
|
|
24
24
|
&.ant-btn-dashed:hover {
|
|
25
25
|
border-color: var(--colorSettings);
|
|
26
26
|
color: var(--colorSettings);
|
|
27
27
|
}
|
|
28
|
-
`}}}}}},beforeUploadHandler(){return!1},uploadValidator(p,x){var n;if(p.length>1)return{type:"error",message:t("Only one file is allowed to be uploaded")};const
|
|
28
|
+
`}}}}}},beforeUploadHandler(){return!1},uploadValidator(p,x){var n;if(p.length>1)return{type:"error",message:t("Only one file is allowed to be uploaded")};const s=(n=p[0])!=null?n:{};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(p,x,s){var m;const[n]=s;x.disabled=(n==null?void 0:n.length)===0,x.componentProps=he(O({},x.componentProps),{disabled:(n==null?void 0:n.length)===0||((m=p.errors)==null?void 0:m.length)>0})}}},K=()=>{var m,f,o,r,h,d;const t=M.useField(),e=M.useFieldSchema(),{t:l}=F.useTranslation(),{dn:p}=i.useDesignable(),[x,s]=g.useState(),{importSettingsSchema:n}=z();return g.useEffect(()=>{s(n)},[t.address,(m=e==null?void 0:e["x-action-settings"])==null?void 0:m.importSettings]),a.jsxs(i.GeneralSchemaDesigner,{disableInitializer:!0,children:[a.jsx(i.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:(f=e==null?void 0:e["x-component-props"])==null?void 0:f.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":((r=e==null?void 0:e["x-component-props"])==null?void 0:r.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,p.emit("patch",{schema:{"x-uid":e["x-uid"],title:u,"x-component-props":O({},e["x-component-props"])}}),p.refresh()}}),a.jsx(i.SchemaSettingsActionModalItem,{title:l("Importable fields"),schema:x,initialValues:O({},(d=(h=e==null?void 0:e["x-action-settings"])==null?void 0:h.importSettings)!=null?d:{}),components:{ArrayItems:N.ArrayItems},onSubmit:({importColumns:u,explain:I})=>{const v=u==null?void 0:u.filter(A=>{var b;return(b=A==null?void 0:A.dataIndex)==null?void 0:b.length}).map(A=>({dataIndex:A.dataIndex.map(b=>{var S;return(S=b.name)!=null?S:b}),title:A.title}));e["x-action-settings"].importSettings={importColumns:v,explain:I},p.emit("patch",{schema:{"x-uid":e["x-uid"],"x-action-settings":e["x-action-settings"]}}),p.refresh()}}),a.jsx(i.SchemaSettingsDivider,{}),a.jsx(i.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:u=>u["x-component"]==="Space"||u["x-component"].endsWith("ActionBar"),confirm:{title:l("Delete action")}})]})},H=g.createContext(null);H.displayName="ImportContext";const Y=()=>g.useContext(H);var U=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Q={exports:{}};(function(t,e){(function(l,p){p()})(U,function(){function l(o,r){return typeof r=="undefined"?r={autoBom:!1}:typeof r!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),r={autoBom:!r}),r.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 p(o,r,h){var d=new XMLHttpRequest;d.open("GET",o),d.responseType="blob",d.onload=function(){f(d.response,r,h)},d.onerror=function(){console.error("could not download file")},d.send()}function x(o){var r=new XMLHttpRequest;r.open("HEAD",o,!1);try{r.send()}catch(h){}return 200<=r.status&&299>=r.status}function s(o){try{o.dispatchEvent(new MouseEvent("click"))}catch(h){var r=document.createEvent("MouseEvents");r.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),o.dispatchEvent(r)}}var n=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof U=="object"&&U.global===U?U:void 0,m=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=n.saveAs||(typeof window!="object"||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(o,r,h){var d=n.URL||n.webkitURL,u=document.createElement("a");r=r||o.name||"download",u.download=r,u.rel="noopener",typeof o=="string"?(u.href=o,u.origin===location.origin?s(u):x(u.href)?p(o,r,h):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,r,h){if(r=r||o.name||"download",typeof o!="string")navigator.msSaveOrOpenBlob(l(o,h),r);else if(x(o))p(o,r,h);else{var d=document.createElement("a");d.href=o,d.target="_blank",setTimeout(function(){s(d)})}}:function(o,r,h,d){if(d=d||open("","_blank"),d&&(d.document.title=d.document.body.innerText="downloading..."),typeof o=="string")return p(o,r,h);var u=o.type==="application/octet-stream",I=/constructor/i.test(n.HTMLElement)||n.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||u&&I||m)&&typeof FileReader!="undefined"){var A=new FileReader;A.onloadend=function(){var w=A.result;w=v?w:w.replace(/^data:[^;]*;/,"data:attachment/file;"),d?d.location.href=w:location=w,d=null},A.readAsDataURL(o)}else{var b=n.URL||n.webkitURL,S=b.createObjectURL(o);d?d.location=S:location.href=S,d=null,setTimeout(function(){b.revokeObjectURL(S)},4e4)}});n.saveAs=f.saveAs=f,t.exports=f})})(Q);var Z=Q.exports;const D={IMPORTING:1,IMPORTED:2},ve=t=>{const{t:e}=F.useTranslation(C),{importModalVisible:l,importStatus:p,importResult:x,setImportModalVisible:s}=Y(),{data:n,meta:m}=x!=null?x:{},f=()=>{s(!1)},o=()=>{const r=new Int8Array(n==null?void 0:n.data),h=new Blob([r],{type:"application/x-xls"});Z.saveAs(h,"fail.xlsx")};return a.jsx(E.Modal,{title:e("Import Data"),width:"50%",styles:{body:{height:"calc(80vh - 200px)"}},open:l,footer:null,closable:p===D.IMPORTED,onCancel:f,children:a.jsxs("div",{className:i.css`
|
|
29
29
|
display: flex;
|
|
30
30
|
justify-content: center;
|
|
31
31
|
align-items: center;
|
|
32
32
|
height: 100%;
|
|
33
|
-
`,children:[p===D.IMPORTING&&a.jsx(E.Spin,{indicator:a.jsx(R.LoadingOutlined,{style:{fontSize:24},spin:!0}),tip:e("Excel data importing")}),p===D.IMPORTED&&a.jsxs(E.Space,{direction:"vertical",align:"center",children:[a.jsx(R.ExclamationCircleFilled,{style:{fontSize:72,color:"#1890ff"}}),a.jsx("p",{children:e("{{successCount}} records have been successfully imported",O({},m!=null?m:{}))}),a.jsxs(E.Space,{children:[(m==null?void 0:m.failureCount)>0&&a.jsx(E.Button,{onClick:o,children:e("To download the failure data")}),a.jsx(E.Button,{type:"primary",onClick:f,children:e("Done")})]})]})]})})},ee=t=>{let e=t;for(;e&&e["x-action"]!=="importXlsx";)e=e.parent;return{schema:e}},te=t=>!t||!Array.isArray(t)?[]:t,oe=()=>{const{service:t,resource:e}=
|
|
33
|
+
`,children:[p===D.IMPORTING&&a.jsx(E.Spin,{indicator:a.jsx(R.LoadingOutlined,{style:{fontSize:24},spin:!0}),tip:e("Excel data importing")}),p===D.IMPORTED&&a.jsxs(E.Space,{direction:"vertical",align:"center",children:[a.jsx(R.ExclamationCircleFilled,{style:{fontSize:72,color:"#1890ff"}}),a.jsx("p",{children:e("{{successCount}} records have been successfully imported",O({},m!=null?m:{}))}),a.jsxs(E.Space,{children:[(m==null?void 0:m.failureCount)>0&&a.jsx(E.Button,{onClick:o,children:e("To download the failure data")}),a.jsx(E.Button,{type:"primary",onClick:f,children:e("Done")})]})]})]})})},ee=t=>{let e=t;for(;e&&e["x-action"]!=="importXlsx";)e=e.parent;return{schema:e}},te=t=>!t||!Array.isArray(t)?[]:t,oe=()=>{const{service:t,resource:e}=i.useBlockRequestContext();i.useAPIClient();const l=M.useFieldSchema(),p=i.useCompile(),{getCollectionJoinField:x,getCollectionField:s}=i.useCollectionManager_deprecated(),{name:n,title:m,getField:f}=i.useCollection_deprecated();F.useTranslation(C);const{schema:o}=ee(l);return{run(){return q(this,null,function*(){var A,b;const{importColumns:h,explain:d}=$.cloneDeep((b=(A=o==null?void 0:o["x-action-settings"])==null?void 0:A.importSettings)!=null?b:{}),u=te(h).map(S=>{var ie,k;const w=s(`${n}.${S.dataIndex[0]}`);if(w){if(S.defaultTitle=p((ie=w==null?void 0:w.uiSchema)==null?void 0:ie.title)||w.name,S.dataIndex.length>1){const P=x(`${n}.${S.dataIndex.join(".")}`);if(!P)return;S.defaultTitle=S.defaultTitle+"/"+p((k=P==null?void 0:P.uiSchema)==null?void 0:k.title)||P.name}return w.interface==="chinaRegion"&&S.dataIndex.push("name"),S}}).filter(Boolean),{data:I}=yield e.downloadXlsxTemplate({values:{title:p(m),explain:d,columns:p(u)}},{method:"post",responseType:"blob"}),v=new Blob([I],{type:"application/x-xls"});Z.saveAs(v,`${p(m)}.xlsx`)})}}},ne=()=>{var k;const{service:t,resource:e}=i.useBlockRequestContext(),l=i.useAPIClient(),p=M.useFieldSchema(),x=i.useCompile(),{getCollectionJoinField:s,getCollectionField:n}=i.useCollectionManager_deprecated(),{name:m,title:f,getField:o}=i.useCollection_deprecated();F.useTranslation(C);const{schema:r}=ee(p),h=M.useForm(),{setVisible:d,fieldSchema:u}=i.useActionContext(),{setImportModalVisible:I,setImportStatus:v,setImportResult:A}=Y(),{upload:b}=h.values,S=i.useDataBlockProps()||{},w=i.useDataSourceHeaders(S.dataSource);return g.useEffect(()=>{h.reset()},[]),{run(){return q(this,null,function*(){var ce,pe,le;const{importColumns:P,explain:Ae}=$.cloneDeep((pe=(ce=r==null?void 0:r["x-action-settings"])==null?void 0:ce.importSettings)!=null?pe:{}),be=te(P).map(T=>{var de,me;const B=n(`${m}.${T.dataIndex[0]}`);if(B){if(T.defaultTitle=x((de=B==null?void 0:B.uiSchema)==null?void 0:de.title)||B.name,T.dataIndex.length>1){const L=s(`${m}.${T.dataIndex.join(".")}`);if(!L)return;T.defaultTitle=T.defaultTitle+"/"+x((me=L==null?void 0:L.uiSchema)==null?void 0:me.title)||L.name}return B.interface==="chinaRegion"&&T.dataIndex.push("name"),T}}).filter(Boolean),_=new FormData,we=h.values.upload.map(T=>T.originFileObj);_.append("file",we[0]),_.append("columns",JSON.stringify(be)),_.append("explain",Ae),d(!1),I(!0),v(D.IMPORTING);try{const{data:T}=yield l.axios.post(`${m}:importXlsx`,_,{headers:w,timeout:6e5});A(T),h.reset(),yield(le=t==null?void 0:t.refresh)==null?void 0:le.call(t),v(D.IMPORTED)}catch(T){I(!1),d(!0)}})},disabled:(b==null?void 0:b.length)===0||((k=h.errors)==null?void 0:k.length)>0}},re=t=>{const{uploadValidator:e,beforeUploadHandler:l,validateUpload:p}=z();return a.jsx(i.SchemaComponentOptions,{components:{ImportActionInitializer:J,ImportDesigner:K,ImportWarning:G,DownloadTips:W},scope:{uploadValidator:e,validateUpload:p,beforeUploadHandler:l,useDownloadXlsxTemplateAction:oe,useImportStartAction:ne},children:a.jsx(ae,{children:t.children})})},ae=t=>{const[e,l]=g.useState(!1),[p,x]=g.useState(D.IMPORTING),[s,n]=g.useState(null);return a.jsxs(H.Provider,{value:{importModalVisible:e,setImportModalVisible:l,importStatus:p,setImportStatus:x,importResult:s,setImportResult:n},children:[j.createPortal(a.jsx(ve,{}),document.body),t.children]})},Se=new i.SchemaSettings({name:"actionSettings:import",items:[{name:"editButton",Component:i.ButtonEditor,useComponentProps(){const{buttonEditorProps:t}=i.useSchemaToolbar();return t}},{name:"importableFields",type:"actionModal",useComponentProps(){var m,f,o;const t=M.useField(),e=M.useFieldSchema(),{t:l}=F.useTranslation(),{dn:p}=i.useDesignable(),[x,s]=g.useState(),{importSettingsSchema:n}=z();return g.useEffect(()=>{s(n)},[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=(f=e==null?void 0:e["x-action-settings"])==null?void 0:f.importSettings)!=null?o:{}),components:{ArrayItems:N.ArrayItems},onSubmit:({importColumns:r,explain:h})=>{const d=r==null?void 0:r.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:h},p.emit("patch",{schema:{"x-uid":e["x-uid"],"x-action-settings":e["x-action-settings"]}}),p.refresh()}}}},{name:"divider",type:"divider"},{name:"delete",type:"remove",useComponentProps(){const{t}=F.useTranslation();return{removeParentsIfNoChildren:!0,breakRemoveOn:e=>e["x-component"]==="Space"||e["x-component"].endsWith("ActionBar"),confirm:{title:t("Delete action")}}}}]});class se extends i.Plugin{load(){return q(this,null,function*(){this.app.use(re);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:()=>i.useActionAvailable("import")},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=W,c.ImportActionInitializer=J,c.ImportContextProvider=ae,c.ImportDesigner=K,c.ImportPluginProvider=re,c.ImportWarning=G,c.PluginActionImportClient=se,c.default=se,c.useDownloadXlsxTemplateAction=oe,c.useImportStartAction=ne,Object.defineProperties(c,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"@formily/react": "2.3.0",
|
|
12
12
|
"@formily/shared": "2.3.2",
|
|
13
|
-
"@nocobase/client": "1.
|
|
13
|
+
"@nocobase/client": "1.4.0-alpha.0",
|
|
14
14
|
"antd": "5.12.8",
|
|
15
15
|
"react": "18.2.0",
|
|
16
16
|
"@formily/antd-v5": "1.1.9",
|
|
@@ -19,12 +19,12 @@ module.exports = {
|
|
|
19
19
|
"react-dom": "18.2.0",
|
|
20
20
|
"lodash": "4.17.21",
|
|
21
21
|
"@formily/core": "2.3.0",
|
|
22
|
-
"@nocobase/server": "1.
|
|
23
|
-
"@nocobase/actions": "1.
|
|
24
|
-
"@nocobase/database": "1.
|
|
22
|
+
"@nocobase/server": "1.4.0-alpha.0",
|
|
23
|
+
"@nocobase/actions": "1.4.0-alpha.0",
|
|
24
|
+
"@nocobase/database": "1.4.0-alpha.0",
|
|
25
25
|
"async-mutex": "0.3.2",
|
|
26
|
-
"@nocobase/data-source-manager": "1.
|
|
27
|
-
"@nocobase/utils": "1.
|
|
26
|
+
"@nocobase/data-source-manager": "1.4.0-alpha.0",
|
|
27
|
+
"@nocobase/utils": "1.4.0-alpha.0",
|
|
28
28
|
"sequelize": "6.35.2",
|
|
29
29
|
"mathjs": "10.6.4"
|
|
30
30
|
};
|
|
@@ -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":"2024-11-
|
|
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":"2024-11-06T06:24:45.136Z"}
|
package/dist/server/index.js
CHANGED
|
@@ -31,14 +31,10 @@ __export(server_exports, {
|
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(server_exports);
|
|
33
33
|
var import_server = require("@nocobase/server");
|
|
34
|
-
var import__ = require("..");
|
|
35
34
|
var import_actions = require("./actions");
|
|
36
|
-
var import_locale = require("./locale");
|
|
37
35
|
var import_middleware = require("./middleware");
|
|
38
36
|
class PluginActionImportServer extends import_server.Plugin {
|
|
39
37
|
beforeLoad() {
|
|
40
|
-
this.app.i18n.addResources("zh-CN", import__.namespace, import_locale.zhCN);
|
|
41
|
-
this.app.i18n.addResources("en-US", import__.namespace, import_locale.enUS);
|
|
42
38
|
this.app.on("afterInstall", async () => {
|
|
43
39
|
if (!this.app.db.getRepository("roles")) {
|
|
44
40
|
return;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Yes": "Yes",
|
|
3
|
+
"No": "No",
|
|
4
|
+
"can not find value": "can not find value",
|
|
5
|
+
"password is empty": "password is empty",
|
|
6
|
+
"Incorrect time format": "Incorrect time format",
|
|
7
|
+
"Incorrect date format": "Incorrect date format",
|
|
8
|
+
"Incorrect email format": "Incorrect email format",
|
|
9
|
+
"Illegal percentage format": "Illegal percentage format"
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Yes": "Oui",
|
|
3
|
+
"No": "Non",
|
|
4
|
+
"can not find value": "valeur introuvable",
|
|
5
|
+
"password is empty": "le mot de passe est vide",
|
|
6
|
+
"Incorrect time format": "Format de l'heure incorrect",
|
|
7
|
+
"Incorrect date format": "Format de la date incorrect",
|
|
8
|
+
"Incorrect email format": "Format d'email incorrect",
|
|
9
|
+
"Illegal percentage format": "Format de pourcentage illégal"
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"Yes": "是",
|
|
3
|
+
"No": "否",
|
|
4
|
+
"can not find value": "找不到对应值",
|
|
5
|
+
"password is empty": "密码为空",
|
|
6
|
+
"Incorrect time format": "时间格式不正确",
|
|
7
|
+
"Incorrect date format": "日期格式不正确",
|
|
8
|
+
"Incorrect email format": "邮箱格式不正确",
|
|
9
|
+
"Illegal percentage format": "百分比格式有误",
|
|
10
|
+
"Imported template does not match, please download again.": "导入模板不匹配,请检查导入文件标题行或重新下载导入模板"
|
|
11
|
+
}
|
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.
|
|
7
|
+
"version": "1.4.0-alpha.0",
|
|
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": "
|
|
37
|
+
"gitHead": "8ffa7b54bbaf720c0c9857da4b19a99110dffc4b",
|
|
38
38
|
"keywords": [
|
|
39
39
|
"Actions"
|
|
40
40
|
]
|
|
@@ -1,19 +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
|
-
declare const _default: {
|
|
10
|
-
Yes: string;
|
|
11
|
-
No: string;
|
|
12
|
-
'can not find value': string;
|
|
13
|
-
'password is empty': string;
|
|
14
|
-
'Incorrect time format': string;
|
|
15
|
-
'Incorrect date format': string;
|
|
16
|
-
'Incorrect email format': string;
|
|
17
|
-
'Illegal percentage format': string;
|
|
18
|
-
};
|
|
19
|
-
export default _default;
|
|
@@ -1,41 +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 __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var en_US_exports = {};
|
|
28
|
-
__export(en_US_exports, {
|
|
29
|
-
default: () => en_US_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(en_US_exports);
|
|
32
|
-
var en_US_default = {
|
|
33
|
-
Yes: "Yes",
|
|
34
|
-
No: "No",
|
|
35
|
-
"can not find value": "can not find value",
|
|
36
|
-
"password is empty": "password is empty",
|
|
37
|
-
"Incorrect time format": "Incorrect time format",
|
|
38
|
-
"Incorrect date format": "Incorrect date format",
|
|
39
|
-
"Incorrect email format": "Incorrect email format",
|
|
40
|
-
"Illegal percentage format": "Illegal percentage format"
|
|
41
|
-
};
|
|
@@ -1,19 +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
|
-
declare const _default: {
|
|
10
|
-
Yes: string;
|
|
11
|
-
No: string;
|
|
12
|
-
'can not find value': string;
|
|
13
|
-
'password is empty': string;
|
|
14
|
-
'Incorrect time format': string;
|
|
15
|
-
'Incorrect date format': string;
|
|
16
|
-
'Incorrect email format': string;
|
|
17
|
-
'Illegal percentage format': string;
|
|
18
|
-
};
|
|
19
|
-
export default _default;
|
|
@@ -1,41 +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 __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var fr_FR_exports = {};
|
|
28
|
-
__export(fr_FR_exports, {
|
|
29
|
-
default: () => fr_FR_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(fr_FR_exports);
|
|
32
|
-
var fr_FR_default = {
|
|
33
|
-
Yes: "Oui",
|
|
34
|
-
No: "Non",
|
|
35
|
-
"can not find value": "valeur introuvable",
|
|
36
|
-
"password is empty": "le mot de passe est vide",
|
|
37
|
-
"Incorrect time format": "Format de l'heure incorrect",
|
|
38
|
-
"Incorrect date format": "Format de la date incorrect",
|
|
39
|
-
"Incorrect email format": "Format d'email incorrect",
|
|
40
|
-
"Illegal percentage format": "Format de pourcentage ill\xE9gal"
|
|
41
|
-
};
|
|
@@ -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 { default as enUS } from './en-US';
|
|
10
|
-
export { default as zhCN } from './zh-CN';
|
|
@@ -1,49 +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 name in all)
|
|
18
|
-
__defProp(target, name, { get: all[name], 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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
-
mod
|
|
35
|
-
));
|
|
36
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
-
var locale_exports = {};
|
|
38
|
-
__export(locale_exports, {
|
|
39
|
-
enUS: () => import_en_US.default,
|
|
40
|
-
zhCN: () => import_zh_CN.default
|
|
41
|
-
});
|
|
42
|
-
module.exports = __toCommonJS(locale_exports);
|
|
43
|
-
var import_en_US = __toESM(require("./en-US"));
|
|
44
|
-
var import_zh_CN = __toESM(require("./zh-CN"));
|
|
45
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
-
0 && (module.exports = {
|
|
47
|
-
enUS,
|
|
48
|
-
zhCN
|
|
49
|
-
});
|
|
@@ -1,20 +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
|
-
declare const _default: {
|
|
10
|
-
Yes: string;
|
|
11
|
-
No: string;
|
|
12
|
-
'can not find value': string;
|
|
13
|
-
'password is empty': string;
|
|
14
|
-
'Incorrect time format': string;
|
|
15
|
-
'Incorrect date format': string;
|
|
16
|
-
'Incorrect email format': string;
|
|
17
|
-
'Illegal percentage format': string;
|
|
18
|
-
'Imported template does not match, please download again.': string;
|
|
19
|
-
};
|
|
20
|
-
export default _default;
|
|
@@ -1,42 +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 __defProp = Object.defineProperty;
|
|
11
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
-
var __export = (target, all) => {
|
|
15
|
-
for (var name in all)
|
|
16
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
-
for (let key of __getOwnPropNames(from))
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
-
}
|
|
24
|
-
return to;
|
|
25
|
-
};
|
|
26
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
-
var zh_CN_exports = {};
|
|
28
|
-
__export(zh_CN_exports, {
|
|
29
|
-
default: () => zh_CN_default
|
|
30
|
-
});
|
|
31
|
-
module.exports = __toCommonJS(zh_CN_exports);
|
|
32
|
-
var zh_CN_default = {
|
|
33
|
-
Yes: "\u662F",
|
|
34
|
-
No: "\u5426",
|
|
35
|
-
"can not find value": "\u627E\u4E0D\u5230\u5BF9\u5E94\u503C",
|
|
36
|
-
"password is empty": "\u5BC6\u7801\u4E3A\u7A7A",
|
|
37
|
-
"Incorrect time format": "\u65F6\u95F4\u683C\u5F0F\u4E0D\u6B63\u786E",
|
|
38
|
-
"Incorrect date format": "\u65E5\u671F\u683C\u5F0F\u4E0D\u6B63\u786E",
|
|
39
|
-
"Incorrect email format": "\u90AE\u7BB1\u683C\u5F0F\u4E0D\u6B63\u786E",
|
|
40
|
-
"Illegal percentage format": "\u767E\u5206\u6BD4\u683C\u5F0F\u6709\u8BEF",
|
|
41
|
-
"Imported template does not match, please download again.": "\u5BFC\u5165\u6A21\u677F\u4E0D\u5339\u914D\uFF0C\u8BF7\u68C0\u67E5\u5BFC\u5165\u6587\u4EF6\u6807\u9898\u884C\u6216\u91CD\u65B0\u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F"
|
|
42
|
-
};
|
|
File without changes
|
|
File without changes
|