@tachybase/plugin-action-import 1.0.6 → 1.0.25

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.
@@ -1,9 +1,9 @@
1
- (function(l,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("@tachybase/client"),require("react/jsx-runtime"),require("react"),require("react-dom"),require("@ant-design/icons"),require("antd"),require("react-i18next"),require("@tachybase/schema"),require("lodash"),require("@tachybase/components")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react/jsx-runtime","react","react-dom","@ant-design/icons","antd","react-i18next","@tachybase/schema","lodash","@tachybase/components"],o):(l=typeof globalThis!="undefined"?globalThis:l||self,o(l["@tachybase/plugin-action-import"]={},l["@tachybase/client"],l.jsxRuntime,l.react,l["react-dom"],l["@ant-design/icons"],l.antd,l["react-i18next"],l["@tachybase/schema"],l.lodash,l["@tachybase/components"]))})(this,function(l,o,d,T,L,k,E,F,g,B,z){"use strict";var ye=Object.defineProperty,ve=Object.defineProperties;var Se=Object.getOwnPropertyDescriptors;var le=Object.getOwnPropertySymbols;var Ie=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;var de=(l,o,d)=>o in l?ye(l,o,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[o]=d,D=(l,o)=>{for(var d in o||(o={}))Ie.call(o,d)&&de(l,d,o[d]);if(le)for(var d of le(o))be.call(o,d)&&de(l,d,o[d]);return l},V=(l,o)=>ve(l,Se(o));var N=(l,o,d)=>new Promise((T,L)=>{var k=g=>{try{F(d.next(g))}catch(B){L(B)}},E=g=>{try{F(d.throw(g))}catch(B){L(B)}},F=g=>g.done?T(g.value):Promise.resolve(g.value).then(k,E);F((d=d.apply(l,o)).next())});const q=T.createContext(null);q.displayName="ImportContext";const H=()=>T.useContext(q);var j=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},X={exports:{}};(function(t,e){(function(c,n){n()})(j,function(){function c(a,i){return typeof i=="undefined"?i={autoBom:!1}:typeof i!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function n(a,i,f){var u=new XMLHttpRequest;u.open("GET",a),u.responseType="blob",u.onload=function(){h(u.response,i,f)},u.onerror=function(){console.error("could not download file")},u.send()}function x(a){var i=new XMLHttpRequest;i.open("HEAD",a,!1);try{i.send()}catch(f){}return 200<=i.status&&299>=i.status}function s(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(f){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(i)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof j=="object"&&j.global===j?j:void 0,p=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&&!p?function(a,i,f){var u=r.URL||r.webkitURL,m=document.createElement("a");i=i||a.name||"download",m.download=i,m.rel="noopener",typeof a=="string"?(m.href=a,m.origin===location.origin?s(m):x(m.href)?n(a,i,f):s(m,m.target="_blank")):(m.href=u.createObjectURL(a),setTimeout(function(){u.revokeObjectURL(m.href)},4e4),setTimeout(function(){s(m)},0))}:"msSaveOrOpenBlob"in navigator?function(a,i,f){if(i=i||a.name||"download",typeof a!="string")navigator.msSaveOrOpenBlob(c(a,f),i);else if(x(a))n(a,i,f);else{var u=document.createElement("a");u.href=a,u.target="_blank",setTimeout(function(){s(u)})}}:function(a,i,f,u){if(u=u||open("","_blank"),u&&(u.document.title=u.document.body.innerText="downloading..."),typeof a=="string")return n(a,i,f);var m=a.type==="application/octet-stream",y=/constructor/i.test(r.HTMLElement)||r.safari,S=/CriOS\/[\d]+/.test(navigator.userAgent);if((S||m&&y||p)&&typeof FileReader!="undefined"){var A=new FileReader;A.onloadend=function(){var I=A.result;I=S?I:I.replace(/^data:[^;]*;/,"data:attachment/file;"),u?u.location.href=I:location=I,u=null},A.readAsDataURL(a)}else{var w=r.URL||r.webkitURL,v=w.createObjectURL(a);u?u.location=v:location.href=v,u=null,setTimeout(function(){w.revokeObjectURL(v)},4e4)}});r.saveAs=h.saveAs=h,t.exports=h})})(X);var G=X.exports;const b="action-import",O={IMPORTING:1,IMPORTED:2},me=t=>{const{t:e}=F.useTranslation(b),{importModalVisible:c,importStatus:n,importResult:x,setImportModalVisible:s}=H(),{data:r,meta:p}=x!=null?x:{},h=()=>{s(!1)},a=()=>{const i=new Int8Array(r==null?void 0:r.data),f=new Blob([i],{type:"application/x-xls"});G.saveAs(f,"fail.xlsx")};return d.jsx(E.Modal,{title:e("Import Data"),width:"50%",styles:{body:{height:"calc(80vh - 200px)"}},open:c,footer:null,closable:n===O.IMPORTED,onCancel:h,children:d.jsxs("div",{className:o.css`
1
+ (function(l,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("@tachybase/client"),require("react/jsx-runtime"),require("react"),require("react-dom"),require("@ant-design/icons"),require("antd"),require("react-i18next"),require("@tachybase/schema"),require("lodash"),require("@tachybase/components")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react/jsx-runtime","react","react-dom","@ant-design/icons","antd","react-i18next","@tachybase/schema","lodash","@tachybase/components"],o):(l=typeof globalThis!="undefined"?globalThis:l||self,o(l["@tachybase/plugin-action-import"]={},l["@tachybase/client"],l.jsxRuntime,l.react,l["react-dom"],l["@ant-design/icons"],l.antd,l["react-i18next"],l["@tachybase/schema"],l.lodash,l["@tachybase/components"]))})(this,function(l,o,d,w,k,_,E,C,g,O,H){"use strict";var ve=Object.defineProperty,Se=Object.defineProperties;var Ie=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var be=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var me=(l,o,d)=>o in l?ve(l,o,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[o]=d,B=(l,o)=>{for(var d in o||(o={}))be.call(o,d)&&me(l,d,o[d]);if(de)for(var d of de(o))Ae.call(o,d)&&me(l,d,o[d]);return l},z=(l,o)=>Se(l,Ie(o));var q=(l,o,d)=>new Promise((w,k)=>{var _=g=>{try{C(d.next(g))}catch(O){k(O)}},E=g=>{try{C(d.throw(g))}catch(O){k(O)}},C=g=>g.done?w(g.value):Promise.resolve(g.value).then(_,E);C((d=d.apply(l,o)).next())});const R=w.createContext(null);R.displayName="ImportContext";const X=()=>w.useContext(R);var U=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},G={exports:{}};(function(t,e){(function(c,n){n()})(U,function(){function c(a,i){return typeof i=="undefined"?i={autoBom:!1}:typeof i!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),i={autoBom:!i}),i.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function n(a,i,f){var u=new XMLHttpRequest;u.open("GET",a),u.responseType="blob",u.onload=function(){h(u.response,i,f)},u.onerror=function(){console.error("could not download file")},u.send()}function x(a){var i=new XMLHttpRequest;i.open("HEAD",a,!1);try{i.send()}catch(f){}return 200<=i.status&&299>=i.status}function s(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(f){var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(i)}}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,p=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&&!p?function(a,i,f){var u=r.URL||r.webkitURL,m=document.createElement("a");i=i||a.name||"download",m.download=i,m.rel="noopener",typeof a=="string"?(m.href=a,m.origin===location.origin?s(m):x(m.href)?n(a,i,f):s(m,m.target="_blank")):(m.href=u.createObjectURL(a),setTimeout(function(){u.revokeObjectURL(m.href)},4e4),setTimeout(function(){s(m)},0))}:"msSaveOrOpenBlob"in navigator?function(a,i,f){if(i=i||a.name||"download",typeof a!="string")navigator.msSaveOrOpenBlob(c(a,f),i);else if(x(a))n(a,i,f);else{var u=document.createElement("a");u.href=a,u.target="_blank",setTimeout(function(){s(u)})}}:function(a,i,f,u){if(u=u||open("","_blank"),u&&(u.document.title=u.document.body.innerText="downloading..."),typeof a=="string")return n(a,i,f);var m=a.type==="application/octet-stream",y=/constructor/i.test(r.HTMLElement)||r.safari,v=/CriOS\/[\d]+/.test(navigator.userAgent);if((v||m&&y||p)&&typeof FileReader!="undefined"){var I=new FileReader;I.onloadend=function(){var S=I.result;S=v?S:S.replace(/^data:[^;]*;/,"data:attachment/file;"),u?u.location.href=S:location=S,u=null},I.readAsDataURL(a)}else{var T=r.URL||r.webkitURL,F=T.createObjectURL(a);u?u.location=F:location.href=F,u=null,setTimeout(function(){T.revokeObjectURL(F)},4e4)}});r.saveAs=h.saveAs=h,t.exports=h})})(G);var J=G.exports;const b="action-import",$={IMPORTING:1,IMPORTED:2},ue=t=>{const{t:e}=C.useTranslation(b),{importModalVisible:c,importStatus:n,importResult:x,setImportModalVisible:s}=X(),{data:r,meta:p}=x!=null?x:{},h=()=>{s(!1)},a=()=>{const i=new Int8Array(r==null?void 0:r.data),f=new Blob([i],{type:"application/x-xls"});J.saveAs(f,"fail.xlsx")};return d.jsx(E.Modal,{title:e("Import Data"),width:"50%",styles:{body:{height:"calc(80vh - 200px)"}},open:c,footer:null,closable:n===$.IMPORTED,onCancel:h,children:d.jsxs("div",{className:o.css`
2
2
  display: flex;
3
3
  justify-content: center;
4
4
  align-items: center;
5
5
  height: 100%;
6
- `,children:[n===O.IMPORTING&&d.jsx(E.Spin,{indicator:d.jsx(k.LoadingOutlined,{style:{fontSize:24},spin:!0}),tip:e("Excel data importing")}),n===O.IMPORTED&&d.jsxs(E.Space,{direction:"vertical",align:"center",children:[d.jsx(k.ExclamationCircleFilled,{style:{fontSize:72,color:"#1890ff"}}),d.jsx("p",{children:e("Import done, total success have {{successCount}} , total failure have {{failureCount}}",D({},p!=null?p:{}))}),d.jsxs(E.Space,{children:[(p==null?void 0:p.failureCount)>0&&d.jsx(E.Button,{onClick:a,children:e("To download the failure data")}),d.jsx(E.Button,{type:"primary",onClick:h,children:e("Done")})]})]})]})})},J=t=>{let e=t;for(;e&&e["x-action"]!=="importXlsx";)e=e.parent;return{schema:e}},W=t=>!t||!Array.isArray(t)?[]:t,K=()=>{const{service:t,resource:e}=o.useBlockRequestContext();o.useAPIClient();const c=g.useFieldSchema(),n=o.useCompile(),{getCollectionJoinField:x,getCollectionField:s}=o.useCollectionManager_deprecated(),{name:r,title:p,getField:h}=o.useCollection_deprecated();F.useTranslation(b);const{schema:a}=J(c);return{run(){return N(this,null,function*(){var A,w;const{importColumns:f,explain:u}=B.cloneDeep((w=(A=a==null?void 0:a["x-action-settings"])==null?void 0:A.importSettings)!=null?w:{}),m=W(f).map(v=>{var P,_;const I=s(`${r}.${v.dataIndex[0]}`);if(I){if(v.defaultTitle=n((P=I==null?void 0:I.uiSchema)==null?void 0:P.title)||I.name,v.dataIndex.length>1){const M=x(`${r}.${v.dataIndex.join(".")}`);if(!M)return;v.defaultTitle=v.defaultTitle+"/"+n((_=M==null?void 0:M.uiSchema)==null?void 0:_.title)||M.name}return I.interface==="chinaRegion"&&v.dataIndex.push("name"),v}}).filter(Boolean),{data:y}=yield e.downloadXlsxTemplate({values:{title:n(p),explain:u,columns:n(m)}},{method:"post",responseType:"blob"}),S=new Blob([y],{type:"application/x-xls"});G.saveAs(S,`${n(p)}.xlsx`)})}}},Y=()=>{const{service:t,resource:e}=o.useBlockRequestContext(),c=o.useAPIClient(),n=g.useFieldSchema(),x=o.useCompile(),{getCollectionJoinField:s,getCollectionField:r}=o.useCollectionManager_deprecated(),{name:p,title:h,getField:a}=o.useCollection_deprecated();F.useTranslation(b);const{schema:i}=J(n),f=g.useForm(),{setVisible:u}=o.useActionContext(),{setImportModalVisible:m,setImportStatus:y,setImportResult:S}=H();return{run(){return N(this,null,function*(){var M,se,ie;const{importColumns:w,explain:v}=B.cloneDeep((se=(M=i==null?void 0:i["x-action-settings"])==null?void 0:M.importSettings)!=null?se:{}),I=W(w).map(C=>{var ce,pe;const $=r(`${p}.${C.dataIndex[0]}`);if($){if(C.defaultTitle=x((ce=$==null?void 0:$.uiSchema)==null?void 0:ce.title)||$.name,C.dataIndex.length>1){const U=s(`${p}.${C.dataIndex.join(".")}`);if(!U)return;C.defaultTitle=C.defaultTitle+"/"+x((pe=U==null?void 0:U.uiSchema)==null?void 0:pe.title)||U.name}return $.interface==="chinaRegion"&&C.dataIndex.push("name"),C}}).filter(Boolean),P=new FormData,_=f.values.upload.map(C=>C.originFileObj);P.append("file",_[0]),P.append("columns",JSON.stringify(I)),P.append("explain",v),u(!1),m(!0),y(O.IMPORTING);try{const{data:C}=yield c.axios.post(`${p}:importXlsx`,P,{timeout:6e5});S(C),f.reset(),yield(ie=t==null?void 0:t.refresh)==null?void 0:ie.call(t),y(O.IMPORTED)}catch(C){m(!1),u(!0)}})}}},ue=["id","createdAt","createdBy","updatedAt","updatedBy"],Q=t=>{const{getCollectionFields:e}=o.useCollectionManager_deprecated(),c=e(t),n=(s,r)=>{var h;if(!s.interface||ue.includes(s.interface))return;const p={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 p;if(s.target){const a=e(s.target),i=x(a,r+1).filter(Boolean);p.children=p.children||[],p.children.push(...i)}return p},x=(s,r)=>{const p=[];return s.forEach(h=>{const a=n(h,r);a&&p.push(a)}),p};return x(c,1)},xe=["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"],R=()=>{const{t}=F.useTranslation(b),{name:e}=o.useCollection_deprecated(),c=Q(e);return{importSettingsSchema:{type:"void","x-component":"Grid",properties:{explain:{type:"string",title:`{{ t("Import explain", {ns: "${b}"}) }}`,"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:o.css`
6
+ `,children:[n===$.IMPORTING&&d.jsx(E.Spin,{indicator:d.jsx(_.LoadingOutlined,{style:{fontSize:24},spin:!0}),tip:e("Excel data importing")}),n===$.IMPORTED&&d.jsxs(E.Space,{direction:"vertical",align:"center",children:[d.jsx(_.ExclamationCircleFilled,{style:{fontSize:72,color:"#1890ff"}}),d.jsx("p",{children:e("Import done, total success have {{successCount}} , total failure have {{failureCount}}",B({},p!=null?p:{}))}),d.jsxs(E.Space,{children:[(p==null?void 0:p.failureCount)>0&&d.jsx(E.Button,{onClick:a,children:e("To download the failure data")}),d.jsx(E.Button,{type:"primary",onClick:h,children:e("Done")})]})]})]})})},W=t=>{let e=t;for(;e&&e["x-action"]!=="importXlsx";)e=e.parent;return{schema:e}},K=t=>!t||!Array.isArray(t)?[]:t,Y=()=>{const{service:t,resource:e}=o.useBlockRequestContext();o.useAPIClient();const c=g.useFieldSchema(),n=o.useCompile(),{getCollectionJoinField:x,getCollectionField:s}=o.useCollectionManager_deprecated(),{name:r,title:p,getField:h}=o.useCollection_deprecated(),{t:a}=C.useTranslation(b),{schema:i}=W(c);return{run(){return q(this,null,function*(){var T,F;const{importColumns:u,explain:m}=O.cloneDeep((F=(T=i==null?void 0:i["x-action-settings"])==null?void 0:T.importSettings)!=null?F:{}),y=K(u).map(S=>{var D,N;const M=s(`${r}.${S.dataIndex[0]}`);if(M){if(S.defaultTitle=n((D=M==null?void 0:M.uiSchema)==null?void 0:D.title)||M.name,S.dataIndex.length>1){const P=x(`${r}.${S.dataIndex.join(".")}`);if(!P)return;S.defaultTitle=S.defaultTitle+"/"+n((N=P==null?void 0:P.uiSchema)==null?void 0:N.title)||P.name}return M.interface==="chinaRegion"&&S.dataIndex.push("name"),S}}).filter(Boolean),{data:v}=yield e.downloadXlsxTemplate({values:{title:n(p),explain:m,columns:n(y)}},{method:"post",responseType:"blob"}),I=new Blob([v],{type:"application/x-xls"});J.saveAs(I,`${n(p)}.xlsx`)})}}},Q=()=>{const{service:t,resource:e}=o.useBlockRequestContext(),c=o.useAPIClient(),n=g.useFieldSchema(),x=o.useCompile(),{getCollectionJoinField:s,getCollectionField:r}=o.useCollectionManager_deprecated(),{name:p,title:h,getField:a}=o.useCollection_deprecated(),{t:i}=C.useTranslation(b),{schema:f}=W(n),u=g.useForm(),{setVisible:m}=o.useActionContext(),{setImportModalVisible:y,setImportStatus:v,setImportResult:I}=X();return{run(){return q(this,null,function*(){var P,ie,ce;const{importColumns:F,explain:S}=O.cloneDeep((ie=(P=f==null?void 0:f["x-action-settings"])==null?void 0:P.importSettings)!=null?ie:{}),M=K(F).map(A=>{var pe,le;const j=r(`${p}.${A.dataIndex[0]}`);if(j){if(A.defaultTitle=x((pe=j==null?void 0:j.uiSchema)==null?void 0:pe.title)||j.name,A.dataIndex.length>1){const L=s(`${p}.${A.dataIndex.join(".")}`);if(!L)return;A.defaultTitle=A.defaultTitle+"/"+x((le=L==null?void 0:L.uiSchema)==null?void 0:le.title)||L.name}return j.interface==="chinaRegion"&&A.dataIndex.push("name"),A}}).filter(Boolean),D=new FormData,N=u.values.upload.map(A=>A.originFileObj);D.append("file",N[0]),D.append("columns",JSON.stringify(M)),D.append("explain",S),m(!1),y(!0),v($.IMPORTING);try{const{data:A}=yield c.axios.post(`${p}:importXlsx`,D,{timeout:6e5});I(A),u.reset(),yield(ce=t==null?void 0:t.refresh)==null?void 0:ce.call(t),v($.IMPORTED)}catch(A){y(!1),m(!0)}})}}},xe=["id","createdAt","createdBy","updatedAt","updatedBy"],Z=t=>{const{getCollectionFields:e}=o.useCollectionManager_deprecated(),c=e(t),n=(s,r)=>{var h;if(!s.interface||xe.includes(s.interface))return;const p={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 p;if(s.target){const a=e(s.target),i=x(a,r+1).filter(Boolean);p.children=p.children||[],p.children.push(...i)}return p},x=(s,r)=>{const p=[];return s.forEach(h=>{const a=n(h,r);a&&p.push(a)}),p};return x(c,1)},he=["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"],V=()=>{const{t}=C.useTranslation(b),{name:e}=o.useCollection_deprecated(),c=Z(e);return{importSettingsSchema:{type:"void","x-component":"Grid",properties:{explain:{type:"string",title:`{{ t("Import explain", {ns: "${b}"}) }}`,"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:o.css`
7
7
  width: 100%;
8
8
  & .ant-space-item:nth-child(2) {
9
9
  flex: 1;
@@ -15,10 +15,10 @@
15
15
  border-color: var(--colorSettings);
16
16
  color: var(--colorSettings);
17
17
  }
18
- `}}}}}},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")}:xe.includes(s.type)?"":{type:"error",message:t("Please upload the file of Excel")}},validateUpload(n,x,s){var p;const[r]=s;x.disabled=(r==null?void 0:r.length)===0,x.componentProps=V(D({},x.componentProps),{disabled:(r==null?void 0:r.length)===0||((p=n.errors)==null?void 0:p.length)>0})}}},Z=t=>{const{uploadValidator:e,beforeUploadHandler:c,validateUpload:n}=R();return d.jsx(o.SchemaComponentOptions,{components:{ImportActionInitializer:ne,ImportDesigner:re},scope:{uploadValidator:e,validateUpload:n,beforeUploadHandler:c,useDownloadXlsxTemplateAction:K,useImportStartAction:Y},children:d.jsx(ee,{children:t.children})})},ee=t=>{const[e,c]=T.useState(!1),[n,x]=T.useState(O.IMPORTING),[s,r]=T.useState(null);return d.jsxs(q.Provider,{value:{importModalVisible:e,setImportModalVisible:c,importStatus:n,setImportStatus:x,importResult:s,setImportResult:r},children:[L.createPortal(d.jsx(me,{}),document.body),t.children]})},he=new o.SchemaSettings({name:"actionSettings:import",items:[{name:"editButton",Component:o.ButtonEditor,useComponentProps(){const{buttonEditorProps:t}=o.useSchemaToolbar();return t}},{name:"importableFields",type:"actionModal",useComponentProps(){var p,h,a;const t=g.useField(),e=g.useFieldSchema(),{t:c}=F.useTranslation(),{dn:n}=o.useDesignable(),[x,s]=T.useState(),{importSettingsSchema:r}=R();return T.useEffect(()=>{s(r)},[t.address,(p=e==null?void 0:e["x-action-settings"])==null?void 0:p.importSettings]),{title:c("Importable fields"),schema:x,initialValues:D({},(a=(h=e==null?void 0:e["x-action-settings"])==null?void 0:h.importSettings)!=null?a:{}),components:{ArrayItems:z.ArrayItems},onSubmit:({importColumns:i,explain:f})=>{const u=i==null?void 0:i.filter(m=>{var y;return(y=m==null?void 0:m.dataIndex)==null?void 0:y.length}).map(m=>({dataIndex:m.dataIndex.map(y=>{var S;return(S=y.name)!=null?S:y}),title:m.title}));e["x-action-settings"].importSettings={importColumns:u,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}=F.useTranslation();return{removeParentsIfNoChildren:!0,breakRemoveOn:e=>e["x-component"]==="Space"||e["x-component"].endsWith("ActionBar"),confirm:{title:t("Delete action")}}}}]}),te=(t,e,c)=>t.reduceProperties((n,x)=>{if(x[e]===c)return x;const s=te(x,e,c);return s||n}),fe=(t,e)=>e(t),oe=(t,e,c=te,n=fe)=>{const x=g.useFieldSchema(),{remove:s}=o.useDesignable(),r=c(x,e,t);return{schema:r,exists:!!r,remove(){r&&n(r,s)}}},ge=t=>({importColumns:t==null?void 0:t.filter(c=>!c.children).map(c=>({dataIndex:[c.name]})),explain:""}),ne=()=>{const t=o.useSchemaInitializerItem(),{insert:e}=o.useSchemaInitializer(),{exists:c,remove:n}=oe("importXlsx","x-action",t.find,t.remove),{name:x}=o.useCollection_deprecated(),s=Q(x),r={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: "${b}" }) }}`,"x-component":"Action.Container","x-decorator":"Form","x-component-props":{width:"50%",className:o.css`
18
+ `}}}}}},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")}:he.includes(s.type)?"":{type:"error",message:t("Please upload the file of Excel")}},validateUpload(n,x,s){var p;const[r]=s;x.disabled=(r==null?void 0:r.length)===0,x.componentProps=z(B({},x.componentProps),{disabled:(r==null?void 0:r.length)===0||((p=n.errors)==null?void 0:p.length)>0})}}},ee=t=>{const{uploadValidator:e,beforeUploadHandler:c,validateUpload:n}=V();return d.jsx(o.SchemaComponentOptions,{components:{ImportActionInitializer:re,ImportDesigner:ae},scope:{uploadValidator:e,validateUpload:n,beforeUploadHandler:c,useDownloadXlsxTemplateAction:Y,useImportStartAction:Q},children:d.jsx(te,{children:t.children})})},te=t=>{const[e,c]=w.useState(!1),[n,x]=w.useState($.IMPORTING),[s,r]=w.useState(null);return d.jsxs(R.Provider,{value:{importModalVisible:e,setImportModalVisible:c,importStatus:n,setImportStatus:x,importResult:s,setImportResult:r},children:[k.createPortal(d.jsx(ue,{}),document.body),t.children]})},fe=new o.SchemaSettings({name:"actionSettings:import",items:[{name:"editButton",Component:o.ButtonEditor,useComponentProps(){const{buttonEditorProps:t}=o.useSchemaToolbar();return t}},{name:"importableFields",type:"actionModal",useComponentProps(){var p,h,a;const t=g.useField(),e=g.useFieldSchema(),{t:c}=C.useTranslation(),{dn:n}=o.useDesignable(),[x,s]=w.useState(),{importSettingsSchema:r}=V();return w.useEffect(()=>{s(r)},[t.address,(p=e==null?void 0:e["x-action-settings"])==null?void 0:p.importSettings]),{title:c("Importable fields"),schema:x,initialValues:B({},(a=(h=e==null?void 0:e["x-action-settings"])==null?void 0:h.importSettings)!=null?a:{}),components:{ArrayItems:H.ArrayItems},onSubmit:({importColumns:i,explain:f})=>{const u=i==null?void 0:i.filter(m=>{var y;return(y=m==null?void 0:m.dataIndex)==null?void 0:y.length}).map(m=>({dataIndex:m.dataIndex.map(y=>{var v;return(v=y.name)!=null?v:y}),title:m.title}));e["x-action-settings"].importSettings={importColumns:u,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}=C.useTranslation();return{removeParentsIfNoChildren:!0,breakRemoveOn:e=>e["x-component"]==="Space"||e["x-component"].endsWith("ActionBar"),confirm:{title:t("Delete action")}}}}]}),oe=(t,e,c)=>t.reduceProperties((n,x)=>{if(x[e]===c)return x;const s=oe(x,e,c);return s||n}),ge=(t,e)=>e(t),ne=(t,e,c=oe,n=ge)=>{const x=g.useFieldSchema(),{remove:s}=o.useDesignable(),r=c(x,e,t);return{schema:r,exists:!!r,remove(){r&&n(r,s)}}},ye=t=>({importColumns:t==null?void 0:t.filter(c=>!c.children).map(c=>({dataIndex:[c.name]})),explain:""}),re=()=>{const t=o.useSchemaInitializerItem(),{insert:e}=o.useSchemaInitializer(),{exists:c,remove:n}=ne("importXlsx","x-action",t.find,t.remove),{name:x}=o.useCollection_deprecated(),s=Z(x),r={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: "${b}" }) }}`,"x-component":"Action.Container","x-decorator":"Form","x-component-props":{width:"50%",className:o.css`
19
19
  .ant-formily-item-label {
20
20
  height: var(--controlHeightLG);
21
21
  }
22
22
  `},properties:{formLayout:{type:"void","x-component":"FormLayout",properties:{download:{type:"void",title:`{{ t("Step 1: Download template", {ns: "${b}" }) }}`,"x-component":"FormItem","x-acl-ignore":!0,properties:{tip:{type:"void","x-component":"Markdown.Void","x-editable":!1,"x-component-props":{style:{padding:"var(--paddingContentVerticalSM)",backgroundColor:"var(--colorInfoBg)",border:"1px solid var(--colorInfoBorder)",color:"var(--colorText)",marginBottom:"var(--marginSM)"},content:`{{ t("Download tip", {ns: "${b}" }) }}`}},downloadAction:{type:"void",title:`{{ t("Download template", {ns: "${b}" }) }}`,"x-component":"Action","x-component-props":{className:o.css`
23
23
  margin-top: 5px;
24
- `,useAction:"{{ useDownloadXlsxTemplateAction }}"}}}},upload:{type:"array",title:`{{ t("Step 2: Upload Excel", {ns: "${b}" }) }}`,"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: "${b}" }) }}`,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: "${b}" }) }}`,"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useImportStartAction }}"},"x-reactions":{dependencies:["upload"],fulfill:{run:"validateUpload($form, $self, $deps)"}}}}}}}}}}};return d.jsx(o.SchemaInitializerSwitch,V(D({},t),{checked:c,title:t.title,onClick:()=>{var h;if(c)return n();r["x-action-settings"].importSettings=ge(s);const p=g.merge(r||{},t.schema||{});(h=t==null?void 0:t.schemaInitialize)==null||h.call(t,p),e(p)}}))},re=()=>{var p,h,a,i,f,u;const t=g.useField(),e=g.useFieldSchema(),{t:c}=F.useTranslation(),{dn:n}=o.useDesignable(),[x,s]=T.useState(),{importSettingsSchema:r}=R();return T.useEffect(()=>{s(r)},[t.address,(p=e==null?void 0:e["x-action-settings"])==null?void 0:p.importSettings]),d.jsxs(o.GeneralSchemaDesigner,{disableInitializer:!0,children:[d.jsx(o.SchemaSettingsModalItem,{title:c("Edit button"),schema:{type:"object",title:c("Edit button"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:c("Button title"),default:e.title,"x-component-props":{}},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:c("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:c("Button background color"),default:(a=e==null?void 0:e["x-component-props"])!=null&&a.danger?"danger":((i=e==null?void 0:e["x-component-props"])==null?void 0:i.type)==="primary"?"primary":"default",enum:[{value:"default",label:'{{t("Default")}}'},{value:"primary",label:'{{t("Highlight")}}'},{value:"danger",label:'{{t("Danger red")}}'}]}}},onSubmit:({title:m,icon:y,type:S})=>{e.title=m,t.title=m,t.componentProps.icon=y,t.componentProps.danger=S==="danger",t.componentProps.type=S,e["x-component-props"]=e["x-component-props"]||{},e["x-component-props"].icon=y,e["x-component-props"].danger=S==="danger",e["x-component-props"].type=S,n.emit("patch",{schema:{"x-uid":e["x-uid"],title:m,"x-component-props":D({},e["x-component-props"])}}),n.refresh()}}),d.jsx(o.SchemaSettingsActionModalItem,{title:c("Importable fields"),schema:x,initialValues:D({},(u=(f=e==null?void 0:e["x-action-settings"])==null?void 0:f.importSettings)!=null?u:{}),components:{ArrayItems:z.ArrayItems},onSubmit:({importColumns:m,explain:y})=>{const S=m==null?void 0:m.filter(A=>{var w;return(w=A==null?void 0:A.dataIndex)==null?void 0:w.length}).map(A=>({dataIndex:A.dataIndex.map(w=>{var v;return(v=w.name)!=null?v:w}),title:A.title}));e["x-action-settings"].importSettings={importColumns:S,explain:y},n.emit("patch",{schema:{"x-uid":e["x-uid"],"x-action-settings":e["x-action-settings"]}}),n.refresh()}}),d.jsx(o.SchemaSettingsDivider,{}),d.jsx(o.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:m=>m["x-component"]==="Space"||m["x-component"].endsWith("ActionBar"),confirm:{title:c("Delete action")}})]})};class ae extends o.Plugin{load(){return N(this,null,function*(){this.app.use(Z);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=o.useCollection_deprecated();return(n.template!=="view"||(n==null?void 0:n.writableView))&&n.template!=="file"&&n.template!=="sql"}},c=this.app.schemaInitializerManager.get("table:configureActions");c==null||c.add("enableActions.import",e),this.app.schemaInitializerManager.addItem("gantt:configureActions","enableActions.import",e),this.app.schemaSettingsManager.add(he)})}}l.ImportActionInitializer=ne,l.ImportContextProvider=ee,l.ImportDesigner=re,l.ImportPlugin=ae,l.ImportPluginProvider=Z,l.default=ae,l.useCurrentSchema=oe,l.useDownloadXlsxTemplateAction=K,l.useImportStartAction=Y,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
24
+ `,useAction:"{{ useDownloadXlsxTemplateAction }}"}}}},upload:{type:"array",title:`{{ t("Step 2: Upload Excel", {ns: "${b}" }) }}`,"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: "${b}" }) }}`,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: "${b}" }) }}`,"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useImportStartAction }}"},"x-reactions":{dependencies:["upload"],fulfill:{run:"validateUpload($form, $self, $deps)"}}}}}}}}}}};return d.jsx(o.SchemaInitializerSwitch,z(B({},t),{checked:c,title:t.title,onClick:()=>{var h;if(c)return n();r["x-action-settings"].importSettings=ye(s);const p=g.merge(r||{},t.schema||{});(h=t==null?void 0:t.schemaInitialize)==null||h.call(t,p),e(p)}}))},ae=()=>{var p,h,a,i,f,u;const t=g.useField(),e=g.useFieldSchema(),{t:c}=C.useTranslation(),{dn:n}=o.useDesignable(),[x,s]=w.useState(),{importSettingsSchema:r}=V();return w.useEffect(()=>{s(r)},[t.address,(p=e==null?void 0:e["x-action-settings"])==null?void 0:p.importSettings]),d.jsxs(o.GeneralSchemaDesigner,{disableInitializer:!0,children:[d.jsx(o.SchemaSettingsModalItem,{title:c("Edit button"),schema:{type:"object",title:c("Edit button"),properties:{title:{"x-decorator":"FormItem","x-component":"Input",title:c("Button title"),default:e.title,"x-component-props":{}},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:c("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:c("Button background color"),default:(a=e==null?void 0:e["x-component-props"])!=null&&a.danger?"danger":((i=e==null?void 0:e["x-component-props"])==null?void 0:i.type)==="primary"?"primary":"default",enum:[{value:"default",label:'{{t("Default")}}'},{value:"primary",label:'{{t("Highlight")}}'},{value:"danger",label:'{{t("Danger red")}}'}]}}},onSubmit:({title:m,icon:y,type:v})=>{e.title=m,t.title=m,t.componentProps.icon=y,t.componentProps.danger=v==="danger",t.componentProps.type=v,e["x-component-props"]=e["x-component-props"]||{},e["x-component-props"].icon=y,e["x-component-props"].danger=v==="danger",e["x-component-props"].type=v,n.emit("patch",{schema:{"x-uid":e["x-uid"],title:m,"x-component-props":B({},e["x-component-props"])}}),n.refresh()}}),d.jsx(o.SchemaSettingsActionModalItem,{title:c("Importable fields"),schema:x,initialValues:B({},(u=(f=e==null?void 0:e["x-action-settings"])==null?void 0:f.importSettings)!=null?u:{}),components:{ArrayItems:H.ArrayItems},onSubmit:({importColumns:m,explain:y})=>{const v=m==null?void 0:m.filter(I=>{var T;return(T=I==null?void 0:I.dataIndex)==null?void 0:T.length}).map(I=>({dataIndex:I.dataIndex.map(T=>{var F;return(F=T.name)!=null?F:T}),title:I.title}));e["x-action-settings"].importSettings={importColumns:v,explain:y},n.emit("patch",{schema:{"x-uid":e["x-uid"],"x-action-settings":e["x-action-settings"]}}),n.refresh()}}),d.jsx(o.SchemaSettingsDivider,{}),d.jsx(o.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:m=>m["x-component"]==="Space"||m["x-component"].endsWith("ActionBar"),confirm:{title:c("Delete action")}})]})};class se extends o.Plugin{load(){return q(this,null,function*(){this.app.use(ee);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=o.useCollection_deprecated();return(n.template!=="view"||(n==null?void 0:n.writableView))&&n.template!=="file"&&n.template!=="sql"}},c=this.app.schemaInitializerManager.get("table:configureActions");c==null||c.add("enableActions.import",e),this.app.schemaInitializerManager.addItem("gantt:configureActions","enableActions.import",e),this.app.schemaSettingsManager.add(fe)})}}l.ImportActionInitializer=re,l.ImportContextProvider=te,l.ImportDesigner=ae,l.ImportPlugin=se,l.ImportPluginProvider=ee,l.default=se,l.useCurrentSchema=ne,l.useDownloadXlsxTemplateAction=Y,l.useImportStartAction=Q,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,16 +1,16 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "1.0.6",
4
- "@tachybase/schema": "1.0.6",
5
- "@tachybase/components": "1.0.6",
3
+ "@tachybase/client": "1.0.25",
4
+ "@tachybase/schema": "1.0.25",
5
+ "@tachybase/components": "1.0.25",
6
6
  "react-i18next": "15.2.0",
7
7
  "@ant-design/icons": "5.3.7",
8
8
  "antd": "5.22.5",
9
9
  "react-dom": "18.3.1",
10
10
  "lodash": "4.17.21",
11
- "@tachybase/server": "1.0.6",
12
- "@tachybase/actions": "1.0.6",
13
- "@tachybase/database": "1.0.6",
14
- "@tachybase/utils": "1.0.6",
11
+ "@tachybase/server": "1.0.25",
12
+ "@tachybase/actions": "1.0.25",
13
+ "@tachybase/database": "1.0.25",
14
+ "@tachybase/utils": "1.0.25",
15
15
  "mathjs": "10.6.4"
16
16
  };
@@ -1 +1 @@
1
- {"name":"node-xlsx","author":"Olivier Louvignes <olivier@mg-crea.com>","version":"0.24.0","description":"NodeJS Excel files parser & builder","type":"module","main":"./dist/index.cjs","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.js","types":"./dist/index.d.ts"}},"bin":{"node-xlsx":"./dist/bin/cli.js"},"files":["dist"],"scripts":{"start":"npm run spec -- --watch","build":"tsup --entry src/index.ts --format cjs,esm --sourcemap --dts --clean --entry src/bin/cli.ts","lint":"eslint src/ test/","prettycheck":"prettier --check src/ test/","prettify":"prettier --write src/ test/","typecheck":"tsc --noEmit","spec":"DEBUG=node-xlsx* vitest --run","watch":"DEBUG=node-xlsx* vitest --watch","test":"npm run lint && npm run prettycheck && npm run typecheck && npm run spec","prepublishOnly":"npm run build"},"repository":"github:mgcrea/node-xlsx","license":"Apache-2.0","dependencies":{"xlsx":"https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"},"devDependencies":{"@mgcrea/eslint-config-node":"^0.10.0","@tsconfig/node-lts":"^20.1.1","@types/node":"^20.12.7","eslint":"^8.57.0","prettier":"^3.2.5","prettier-plugin-organize-imports":"^3.2.4","tsup":"^8.0.2","typescript":"^5.4.5","vite-tsconfig-paths":"^4.3.2","vitest":"^1.5.0"},"engines":{"node":">=10.0.0"},"keywords":["excel","parser","builder","xlsx","xls"],"_lastModified":"2025-04-02T02:57:33.848Z"}
1
+ {"name":"node-xlsx","author":"Olivier Louvignes <olivier@mg-crea.com>","version":"0.24.0","description":"NodeJS Excel files parser & builder","type":"module","main":"./dist/index.cjs","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.js","types":"./dist/index.d.ts"}},"bin":{"node-xlsx":"./dist/bin/cli.js"},"files":["dist"],"scripts":{"start":"npm run spec -- --watch","build":"tsup --entry src/index.ts --format cjs,esm --sourcemap --dts --clean --entry src/bin/cli.ts","lint":"eslint src/ test/","prettycheck":"prettier --check src/ test/","prettify":"prettier --write src/ test/","typecheck":"tsc --noEmit","spec":"DEBUG=node-xlsx* vitest --run","watch":"DEBUG=node-xlsx* vitest --watch","test":"npm run lint && npm run prettycheck && npm run typecheck && npm run spec","prepublishOnly":"npm run build"},"repository":"github:mgcrea/node-xlsx","license":"Apache-2.0","dependencies":{"xlsx":"https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"},"devDependencies":{"@mgcrea/eslint-config-node":"^0.10.0","@tsconfig/node-lts":"^20.1.1","@types/node":"^20.12.7","eslint":"^8.57.0","prettier":"^3.2.5","prettier-plugin-organize-imports":"^3.2.4","tsup":"^8.0.2","typescript":"^5.4.5","vite-tsconfig-paths":"^4.3.2","vitest":"^1.5.0"},"engines":{"node":">=10.0.0"},"keywords":["excel","parser","builder","xlsx","xls"],"_lastModified":"2025-05-22T01:59:55.890Z"}
@@ -1 +1 @@
1
- {"name":"xlsx","version":"0.18.5","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","browser":{"buffer":false,"crypto":false,"stream":false,"process":false,"fs":false},"sideEffects":false,"dependencies":{"adler-32":"~1.3.0","cfb":"~1.2.1","codepage":"~1.15.0","crc-32":"~1.2.1","ssf":"~0.11.2","wmf":"~1.0.1","word":"~0.3.0"},"devDependencies":{"@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","acorn":"7.4.1","alex":"8.1.1","blanket":"~1.2.3","commander":"~2.17.1","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","typescript":"2.2.0"},"repository":{"type":"git","url":"git://github.com/SheetJS/sheetjs.git"},"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/","bugs":{"url":"https://github.com/SheetJS/sheetjs/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"_lastModified":"2025-04-02T02:57:36.096Z"}
1
+ {"name":"xlsx","version":"0.18.5","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","browser":{"buffer":false,"crypto":false,"stream":false,"process":false,"fs":false},"sideEffects":false,"dependencies":{"adler-32":"~1.3.0","cfb":"~1.2.1","codepage":"~1.15.0","crc-32":"~1.2.1","ssf":"~0.11.2","wmf":"~1.0.1","word":"~0.3.0"},"devDependencies":{"@sheetjs/uglify-js":"~2.7.3","@types/node":"^8.5.9","acorn":"7.4.1","alex":"8.1.1","blanket":"~1.2.3","commander":"~2.17.1","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","typescript":"2.2.0"},"repository":{"type":"git","url":"git://github.com/SheetJS/sheetjs.git"},"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/","bugs":{"url":"https://github.com/SheetJS/sheetjs/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"_lastModified":"2025-05-22T01:59:58.180Z"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tachybase/plugin-action-import",
3
3
  "displayName": "Action: Import records",
4
- "version": "1.0.6",
4
+ "version": "1.0.25",
5
5
  "description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.",
6
6
  "keywords": [
7
7
  "Actions"
@@ -21,16 +21,16 @@
21
21
  "react-dom": "^18.3.1",
22
22
  "react-i18next": "^15.2.0",
23
23
  "xlsx": "^0.18.5",
24
- "@tachybase/components": "1.0.6",
25
- "@tachybase/schema": "1.0.6"
24
+ "@tachybase/components": "1.0.25",
25
+ "@tachybase/schema": "1.0.25"
26
26
  },
27
27
  "peerDependencies": {
28
- "@tachybase/actions": "1.0.6",
29
- "@tachybase/client": "1.0.6",
30
- "@tachybase/database": "1.0.6",
31
- "@tachybase/server": "1.0.6",
32
- "@tachybase/utils": "1.0.6",
33
- "@tachybase/test": "1.0.6"
28
+ "@tachybase/actions": "1.0.25",
29
+ "@tachybase/client": "1.0.25",
30
+ "@tachybase/test": "1.0.25",
31
+ "@tachybase/server": "1.0.25",
32
+ "@tachybase/database": "1.0.25",
33
+ "@tachybase/utils": "1.0.25"
34
34
  },
35
35
  "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。",
36
36
  "displayName.zh-CN": "操作:导入记录",