@tachybase/plugin-action-import 1.3.20 → 1.3.22

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,24 +1,24 @@
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,L,_,E,C,g,O,X){"use strict";var be=Object.defineProperty,Ae=Object.defineProperties;var we=Object.getOwnPropertyDescriptors;var me=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable;var ue=(l,o,d)=>o in l?be(l,o,{enumerable:!0,configurable:!0,writable:!0,value:d}):l[o]=d,B=(l,o)=>{for(var d in o||(o={}))Ce.call(o,d)&&ue(l,d,o[d]);if(me)for(var d of me(o))Te.call(o,d)&&ue(l,d,o[d]);return l},H=(l,o)=>Ae(l,we(o));var R=(l,o,d)=>new Promise((w,L)=>{var _=g=>{try{C(d.next(g))}catch(O){L(O)}},E=g=>{try{C(d.throw(g))}catch(O){L(O)}},C=g=>g.done?w(g.value):Promise.resolve(g.value).then(_,E);C((d=d.apply(l,o)).next())});const V=w.createContext(null);V.displayName="ImportContext";const G=()=>w.useContext(V);var k=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},q={exports:{}},xe=q.exports,J;function he(){return J||(J=1,function(t,e){(function(c,n){n()})(xe,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 k=="object"&&k.global===k?k: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})}(q)),q.exports}var W=he();const b="action-import",$={IMPORTING:1,IMPORTED:2},fe=t=>{const{t:e}=C.useTranslation(b),{importModalVisible:c,importStatus:n,importResult:x,setImportModalVisible:s}=G(),{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"});W.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`
1
+ (function(d,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("@tego/client")):typeof define=="function"&&define.amd?define(["exports","@tachybase/client","react/jsx-runtime","react","react-dom","@ant-design/icons","antd","react-i18next","@tachybase/schema","lodash","@tego/client"],o):(d=typeof globalThis!="undefined"?globalThis:d||self,o(d["@tachybase/plugin-action-import"]={},d["@tachybase/client"],d.jsxRuntime,d.react,d["react-dom"],d["@ant-design/icons"],d.antd,d["react-i18next"],d["@tachybase/schema"],d.lodash,d["@tego/client"]))})(this,function(d,o,m,w,L,_,T,C,g,O,X){"use strict";var be=Object.defineProperty,Ae=Object.defineProperties;var we=Object.getOwnPropertyDescriptors;var me=Object.getOwnPropertySymbols;var Ce=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable;var ue=(d,o,m)=>o in d?be(d,o,{enumerable:!0,configurable:!0,writable:!0,value:m}):d[o]=m,B=(d,o)=>{for(var m in o||(o={}))Ce.call(o,m)&&ue(d,m,o[m]);if(me)for(var m of me(o))Te.call(o,m)&&ue(d,m,o[m]);return d},H=(d,o)=>Ae(d,we(o));var R=(d,o,m)=>new Promise((w,L)=>{var _=g=>{try{C(m.next(g))}catch(O){L(O)}},T=g=>{try{C(m.throw(g))}catch(O){L(O)}},C=g=>g.done?w(g.value):Promise.resolve(g.value).then(_,T);C((m=m.apply(d,o)).next())});const V=w.createContext(null);V.displayName="ImportContext";const G=()=>w.useContext(V);var k=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},q={exports:{}},xe=q.exports,J;function he(){return J||(J=1,function(t,e){(function(c,n){n()})(xe,function(){function c(s,p){return typeof p=="undefined"?p={autoBom:!1}:typeof p!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),p={autoBom:!p}),p.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function n(s,p,f){var a=new XMLHttpRequest;a.open("GET",s),a.responseType="blob",a.onload=function(){h(a.response,p,f)},a.onerror=function(){console.error("could not download file")},a.send()}function u(s){var p=new XMLHttpRequest;p.open("HEAD",s,!1);try{p.send()}catch(f){}return 200<=p.status&&299>=p.status}function i(s){try{s.dispatchEvent(new MouseEvent("click"))}catch(f){var p=document.createEvent("MouseEvents");p.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),s.dispatchEvent(p)}}var r=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof k=="object"&&k.global===k?k:void 0,l=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&&!l?function(s,p,f){var a=r.URL||r.webkitURL,x=document.createElement("a");p=p||s.name||"download",x.download=p,x.rel="noopener",typeof s=="string"?(x.href=s,x.origin===location.origin?i(x):u(x.href)?n(s,p,f):i(x,x.target="_blank")):(x.href=a.createObjectURL(s),setTimeout(function(){a.revokeObjectURL(x.href)},4e4),setTimeout(function(){i(x)},0))}:"msSaveOrOpenBlob"in navigator?function(s,p,f){if(p=p||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(c(s,f),p);else if(u(s))n(s,p,f);else{var a=document.createElement("a");a.href=s,a.target="_blank",setTimeout(function(){i(a)})}}:function(s,p,f,a){if(a=a||open("","_blank"),a&&(a.document.title=a.document.body.innerText="downloading..."),typeof s=="string")return n(s,p,f);var x=s.type==="application/octet-stream",v=/constructor/i.test(r.HTMLElement)||r.safari,S=/CriOS\/[\d]+/.test(navigator.userAgent);if((S||x&&v||l)&&typeof FileReader!="undefined"){var b=new FileReader;b.onloadend=function(){var y=b.result;y=S?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=y:location=y,a=null},b.readAsDataURL(s)}else{var F=r.URL||r.webkitURL,E=F.createObjectURL(s);a?a.location=E:location.href=E,a=null,setTimeout(function(){F.revokeObjectURL(E)},4e4)}});r.saveAs=h.saveAs=h,t.exports=h})}(q)),q.exports}var W=he();const I="action-import",$={IMPORTING:1,IMPORTED:2},fe=t=>{const{t:e}=C.useTranslation(I),{importModalVisible:c,importStatus:n,importResult:u,setImportModalVisible:i}=G(),{data:r,meta:l}=u!=null?u:{},h=()=>{i(!1)},s=()=>{const p=new Int8Array(r==null?void 0:r.data),f=new Blob([p],{type:"application/x-xls"});W.saveAs(f,"fail.xlsx")};return m.jsx(T.Modal,{title:e("Import Data"),width:"50%",styles:{body:{height:"calc(80vh - 200px)"}},open:c,footer:null,closable:n===$.IMPORTED,onCancel:h,children:m.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===$.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")})]})]})]})})},K=t=>{let e=t;for(;e&&e["x-action"]!=="importXlsx";)e=e.parent;return{schema:e}},Y=t=>!t||!Array.isArray(t)?[]:t,Q=()=>{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}=K(c);return{run(){return R(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=Y(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"});W.saveAs(I,`${n(p)}.xlsx`)})}}},Z=()=>{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}=K(n),u=g.useForm(),{setVisible:m}=o.useActionContext(),{setImportModalVisible:y,setImportStatus:v,setImportResult:I}=G();return{run(){return R(this,null,function*(){var P,ce,pe;const{importColumns:F,explain:S}=O.cloneDeep((ce=(P=f==null?void 0:f["x-action-settings"])==null?void 0:P.importSettings)!=null?ce:{}),M=Y(F).map(A=>{var le,de;const j=r(`${p}.${A.dataIndex[0]}`);if(j){if(A.defaultTitle=x((le=j==null?void 0:j.uiSchema)==null?void 0:le.title)||j.name,A.dataIndex.length>1){const U=s(`${p}.${A.dataIndex.join(".")}`);if(!U)return;A.defaultTitle=A.defaultTitle+"/"+x((de=U==null?void 0:U.uiSchema)==null?void 0:de.title)||U.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(pe=t==null?void 0:t.refresh)==null?void 0:pe.call(t),v($.IMPORTED)}catch(A){y(!1),m(!0)}})}}},ge=["id","createdAt","createdBy","updatedAt","updatedBy"],ee=t=>{const{getCollectionFields:e}=o.useCollectionManager_deprecated(),c=e(t),n=(s,r)=>{var h;if(!s.interface||ge.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)},ye=["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"],z=()=>{const{t}=C.useTranslation(b),{name:e}=o.useCollection_deprecated(),c=ee(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&&m.jsx(T.Spin,{indicator:m.jsx(_.LoadingOutlined,{style:{fontSize:24},spin:!0}),tip:e("Excel data importing")}),n===$.IMPORTED&&m.jsxs(T.Space,{direction:"vertical",align:"center",children:[m.jsx(_.ExclamationCircleFilled,{style:{fontSize:72,color:"#1890ff"}}),m.jsx("p",{children:e("Import done, total success have {{successCount}} , total failure have {{failureCount}}",B({},l!=null?l:{}))}),m.jsxs(T.Space,{children:[(l==null?void 0:l.failureCount)>0&&m.jsx(T.Button,{onClick:s,children:e("To download the failure data")}),m.jsx(T.Button,{type:"primary",onClick:h,children:e("Done")})]})]})]})})},K=t=>{let e=t;for(;e&&e["x-action"]!=="importXlsx";)e=e.parent;return{schema:e}},Y=t=>!t||!Array.isArray(t)?[]:t,Q=()=>{const{service:t,resource:e}=o.useBlockRequestContext();o.useAPIClient();const c=g.useFieldSchema(),n=o.useCompile(),{getCollectionJoinField:u,getCollectionField:i}=o.useCollectionManager_deprecated(),{name:r,title:l,getField:h}=o.useCollection_deprecated(),{t:s}=C.useTranslation(I),{schema:p}=K(c);return{run(){return R(this,null,function*(){var F,E;const{importColumns:a,explain:x}=O.cloneDeep((E=(F=p==null?void 0:p["x-action-settings"])==null?void 0:F.importSettings)!=null?E:{}),v=Y(a).map(y=>{var D,N;const M=i(`${r}.${y.dataIndex[0]}`);if(M){if(y.defaultTitle=n((D=M==null?void 0:M.uiSchema)==null?void 0:D.title)||M.name,y.dataIndex.length>1){const P=u(`${r}.${y.dataIndex.join(".")}`);if(!P)return;y.defaultTitle=y.defaultTitle+"/"+n((N=P==null?void 0:P.uiSchema)==null?void 0:N.title)||P.name}return M.interface==="chinaRegion"&&y.dataIndex.push("name"),y}}).filter(Boolean),{data:S}=yield e.downloadXlsxTemplate({values:{title:n(l),explain:x,columns:n(v)}},{method:"post",responseType:"blob"}),b=new Blob([S],{type:"application/x-xls"});W.saveAs(b,`${n(l)}.xlsx`)})}}},Z=()=>{const{service:t,resource:e}=o.useBlockRequestContext(),c=o.useAPIClient(),n=g.useFieldSchema(),u=o.useCompile(),{getCollectionJoinField:i,getCollectionField:r}=o.useCollectionManager_deprecated(),{name:l,title:h,getField:s}=o.useCollection_deprecated(),{t:p}=C.useTranslation(I),{schema:f}=K(n),a=g.useForm(),{setVisible:x}=o.useActionContext(),{setImportModalVisible:v,setImportStatus:S,setImportResult:b}=G();return{run(){return R(this,null,function*(){var P,ce,pe;const{importColumns:E,explain:y}=O.cloneDeep((ce=(P=f==null?void 0:f["x-action-settings"])==null?void 0:P.importSettings)!=null?ce:{}),M=Y(E).map(A=>{var le,de;const j=r(`${l}.${A.dataIndex[0]}`);if(j){if(A.defaultTitle=u((le=j==null?void 0:j.uiSchema)==null?void 0:le.title)||j.name,A.dataIndex.length>1){const U=i(`${l}.${A.dataIndex.join(".")}`);if(!U)return;A.defaultTitle=A.defaultTitle+"/"+u((de=U==null?void 0:U.uiSchema)==null?void 0:de.title)||U.name}return j.interface==="chinaRegion"&&A.dataIndex.push("name"),A}}).filter(Boolean),D=new FormData,N=a.values.upload.map(A=>A.originFileObj);D.append("file",N[0]),D.append("columns",JSON.stringify(M)),D.append("explain",y),x(!1),v(!0),S($.IMPORTING);try{const{data:A}=yield c.axios.post(`${l}:importXlsx`,D,{timeout:6e5});b(A),a.reset(),yield(pe=t==null?void 0:t.refresh)==null?void 0:pe.call(t),S($.IMPORTED)}catch(A){v(!1),x(!0)}})}}},ge=["id","createdAt","createdBy","updatedAt","updatedBy"],ee=t=>{const{getCollectionFields:e}=o.useCollectionManager_deprecated(),c=e(t),n=(i,r)=>{var h;if(!i.interface||ge.includes(i.interface))return;const l={name:i.name,title:((h=i==null?void 0:i.uiSchema)==null?void 0:h.title)||i.name,schema:i==null?void 0:i.uiSchema};if(!i.target||r>=2)return l;if(i.target){const s=e(i.target),p=u(s,r+1).filter(Boolean);l.children=l.children||[],l.children.push(...p)}return l},u=(i,r)=>{const l=[];return i.forEach(h=>{const s=n(h,r);s&&l.push(s)}),l};return u(c,1)},ve=["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.ms-excel"],z=()=>{const{t}=C.useTranslation(I),{name:e}=o.useCollection_deprecated(),c=ee(e);return{importSettingsSchema:{type:"void","x-component":"Grid",properties:{explain:{type:"string",title:`{{ t("Import explain", {ns: "${I}"}) }}`,"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;
10
10
  }
11
- `},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},dataIndex:{type:"array","x-decorator":"FormItem","x-component":o.Cascader,required:!0,enum:c,"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: "${b}"}) }}`,"x-component":"ArrayItems.Addition","x-component-props":{className:o.css`
11
+ `},properties:{sort:{type:"void","x-decorator":"FormItem","x-component":"ArrayItems.SortHandle"},dataIndex:{type:"array","x-decorator":"FormItem","x-component":o.Cascader,required:!0,enum:c,"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: "${I}"}) }}`,"x-component":"ArrayItems.Addition","x-component-props":{className:o.css`
12
12
  border-color: var(--colorSettings);
13
13
  color: var(--colorSettings);
14
14
  &.ant-btn-dashed:hover {
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")}:ye.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=H(B({},x.componentProps),{disabled:(r==null?void 0:r.length)===0||((p=n.errors)==null?void 0:p.length)>0})}}},te=t=>{const{uploadValidator:e,beforeUploadHandler:c,validateUpload:n}=z();return d.jsx(o.SchemaComponentOptions,{components:{ImportActionInitializer:ae,ImportDesigner:se},scope:{uploadValidator:e,validateUpload:n,beforeUploadHandler:c,useDownloadXlsxTemplateAction:Q,useImportStartAction:Z},children:d.jsx(oe,{children:t.children})})},oe=t=>{const[e,c]=w.useState(!1),[n,x]=w.useState($.IMPORTING),[s,r]=w.useState(null);return d.jsxs(V.Provider,{value:{importModalVisible:e,setImportModalVisible:c,importStatus:n,setImportStatus:x,importResult:s,setImportResult:r},children:[L.createPortal(d.jsx(fe,{}),document.body),t.children]})},ve=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}=z();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:X.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")}}}}]}),ne=(t,e,c)=>t.reduceProperties((n,x)=>{if(x[e]===c)return x;const s=ne(x,e,c);return s||n}),Se=(t,e)=>e(t),re=(t,e,c=ne,n=Se)=>{const x=g.useFieldSchema(),{remove:s}=o.useDesignable(),r=c(x,e,t);return{schema:r,exists:!!r,remove(){r&&n(r,s)}}},Ie=t=>({importColumns:t==null?void 0:t.filter(c=>!c.children).map(c=>({dataIndex:[c.name]})),explain:""}),ae=()=>{const t=o.useSchemaInitializerItem(),{insert:e}=o.useSchemaInitializer(),{exists:c,remove:n}=re("importXlsx","x-action",t.find,t.remove),{name:x}=o.useCollection_deprecated(),s=ee(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,u){var r;if(n.length>1)return{type:"error",message:t("Only one file is allowed to be uploaded")};const i=(r=n[0])!=null?r:{};return i.size>10*1024*1024?{type:"error",message:t("File size cannot exceed 10M")}:ve.includes(i.type)?"":{type:"error",message:t("Please upload the file of Excel")}},validateUpload(n,u,i){var l;const[r]=i;u.disabled=(r==null?void 0:r.length)===0,u.componentProps=H(B({},u.componentProps),{disabled:(r==null?void 0:r.length)===0||((l=n.errors)==null?void 0:l.length)>0})}}},te=t=>{const{uploadValidator:e,beforeUploadHandler:c,validateUpload:n}=z();return m.jsx(o.SchemaComponentOptions,{components:{ImportActionInitializer:ae,ImportDesigner:se},scope:{uploadValidator:e,validateUpload:n,beforeUploadHandler:c,useDownloadXlsxTemplateAction:Q,useImportStartAction:Z},children:m.jsx(oe,{children:t.children})})},oe=t=>{const[e,c]=w.useState(!1),[n,u]=w.useState($.IMPORTING),[i,r]=w.useState(null);return m.jsxs(V.Provider,{value:{importModalVisible:e,setImportModalVisible:c,importStatus:n,setImportStatus:u,importResult:i,setImportResult:r},children:[L.createPortal(m.jsx(fe,{}),document.body),t.children]})},ye=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 l,h;const t=g.useField(),e=g.useFieldSchema(),{t:c}=C.useTranslation(),{dn:n}=o.useDesignable(),[u,i]=w.useState(),{importSettingsSchema:r}=z();return w.useEffect(()=>{i(r)},[t.address,(l=e==null?void 0:e["x-action-settings"])==null?void 0:l.importSettings]),{title:c("Importable fields"),schema:u,initialValues:B({},(h=e==null?void 0:e["x-action-settings"])==null?void 0:h.importSettings),components:{ArrayItems:X.ArrayItems},onSubmit:({importColumns:s,explain:p})=>{const f=s==null?void 0:s.filter(a=>{var x;return(x=a==null?void 0:a.dataIndex)==null?void 0:x.length}).map(a=>({dataIndex:a.dataIndex.map(x=>{var v;return(v=x.name)!=null?v:x}),title:a.title}));e["x-action-settings"].importSettings={importColumns:f,explain:p},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")}}}}]}),ne=(t,e,c)=>t.reduceProperties((n,u)=>{if(u[e]===c)return u;const i=ne(u,e,c);return i||n}),Se=(t,e)=>e(t),re=(t,e,c=ne,n=Se)=>{const u=g.useFieldSchema(),{remove:i}=o.useDesignable(),r=c(u,e,t);return{schema:r,exists:!!r,remove(){r&&n(r,i)}}},Ie=t=>({importColumns:t==null?void 0:t.filter(c=>!c.children).map(c=>({dataIndex:[c.name]})),explain:""}),ae=()=>{const t=o.useSchemaInitializerItem(),{insert:e}=o.useSchemaInitializer(),{exists:c,remove:n}=re("importXlsx","x-action",t.find,t.remove),{name:u}=o.useCollection_deprecated(),i=ee(u),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: "${I}" }) }}`,"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
- `},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`
22
+ `},properties:{formLayout:{type:"void","x-component":"FormLayout",properties:{download:{type:"void",title:`{{ t("Step 1: Download template", {ns: "${I}" }) }}`,"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: "${I}" }) }}`}},downloadAction:{type:"void",title:`{{ t("Download template", {ns: "${I}" }) }}`,"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,H(B({},t),{checked:c,title:t.title,onClick:()=>{var h;if(c)return n();r["x-action-settings"].importSettings=Ie(s);const p=g.merge(r||{},t.schema||{});(h=t==null?void 0:t.schemaInitialize)==null||h.call(t,p),e(p)}}))},se=()=>{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}=z();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:X.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 ie extends o.Plugin{load(){return R(this,null,function*(){this.app.use(te);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(ve)})}}l.ImportActionInitializer=ae,l.ImportContextProvider=oe,l.ImportDesigner=se,l.ImportPlugin=ie,l.ImportPluginProvider=te,l.default=ie,l.useCurrentSchema=re,l.useDownloadXlsxTemplateAction=Q,l.useImportStartAction=Z,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
24
+ `,useAction:"{{ useDownloadXlsxTemplateAction }}"}}}},upload:{type:"array",title:`{{ t("Step 2: Upload Excel", {ns: "${I}" }) }}`,"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: "${I}" }) }}`,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: "${I}" }) }}`,"x-component":"Action","x-component-props":{type:"primary",htmlType:"submit",useAction:"{{ useImportStartAction }}"},"x-reactions":{dependencies:["upload"],fulfill:{run:"validateUpload($form, $self, $deps)"}}}}}}}}}}};return m.jsx(o.SchemaInitializerSwitch,H(B({},t),{checked:c,title:t.title,onClick:()=>{var h;if(c)return n();r["x-action-settings"].importSettings=Ie(i);const l=g.merge(r||{},t.schema||{});(h=t==null?void 0:t.schemaInitialize)==null||h.call(t,l),e(l)}}))},se=()=>{var l,h,s,p,f;const t=g.useField(),e=g.useFieldSchema(),{t:c}=C.useTranslation(),{dn:n}=o.useDesignable(),[u,i]=w.useState(),{importSettingsSchema:r}=z();return w.useEffect(()=>{i(r)},[t.address,(l=e==null?void 0:e["x-action-settings"])==null?void 0:l.importSettings]),m.jsxs(o.GeneralSchemaDesigner,{disableInitializer:!0,children:[m.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:(s=e==null?void 0:e["x-component-props"])!=null&&s.danger?"danger":((p=e==null?void 0:e["x-component-props"])==null?void 0:p.type)==="primary"?"primary":"default",enum:[{value:"default",label:'{{t("Default")}}'},{value:"primary",label:'{{t("Highlight")}}'},{value:"danger",label:'{{t("Danger red")}}'}]}}},onSubmit:({title:a,icon:x,type:v})=>{e.title=a,t.title=a,t.componentProps.icon=x,t.componentProps.danger=v==="danger",t.componentProps.type=v,e["x-component-props"]=e["x-component-props"]||{},e["x-component-props"].icon=x,e["x-component-props"].danger=v==="danger",e["x-component-props"].type=v,n.emit("patch",{schema:{"x-uid":e["x-uid"],title:a,"x-component-props":B({},e["x-component-props"])}}),n.refresh()}}),m.jsx(o.SchemaSettingsActionModalItem,{title:c("Importable fields"),schema:u,initialValues:B({},(f=e==null?void 0:e["x-action-settings"])==null?void 0:f.importSettings),components:{ArrayItems:X.ArrayItems},onSubmit:({importColumns:a,explain:x})=>{const v=a==null?void 0:a.filter(S=>{var b;return(b=S==null?void 0:S.dataIndex)==null?void 0:b.length}).map(S=>({dataIndex:S.dataIndex.map(b=>{var F;return(F=b.name)!=null?F:b}),title:S.title}));e["x-action-settings"].importSettings={importColumns:v,explain:x},n.emit("patch",{schema:{"x-uid":e["x-uid"],"x-action-settings":e["x-action-settings"]}}),n.refresh()}}),m.jsx(o.SchemaSettingsDivider,{}),m.jsx(o.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,breakRemoveOn:a=>a["x-component"]==="Space"||a["x-component"].endsWith("ActionBar"),confirm:{title:c("Delete action")}})]})};class ie extends o.Plugin{load(){return R(this,null,function*(){this.app.use(te);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(ye)})}}d.ImportActionInitializer=ae,d.ImportContextProvider=oe,d.ImportDesigner=se,d.ImportPlugin=ie,d.ImportPluginProvider=te,d.default=ie,d.useCurrentSchema=re,d.useDownloadXlsxTemplateAction=Q,d.useImportStartAction=Z,Object.defineProperties(d,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,15 +1,12 @@
1
1
  module.exports = {
2
2
  "react": "18.3.1",
3
- "@tachybase/client": "1.3.20",
4
- "@tachybase/schema": "1.3.20",
5
- "@tachybase/components": "1.3.20",
3
+ "@tachybase/client": "1.3.22",
4
+ "@tachybase/schema": "1.3.39",
5
+ "@tego/client": "1.3.39",
6
6
  "react-i18next": "15.2.0",
7
- "@ant-design/icons": "5.3.7",
7
+ "@ant-design/icons": "5.6.1",
8
8
  "antd": "5.22.5",
9
9
  "react-dom": "18.3.1",
10
10
  "lodash": "4.17.21",
11
- "@tachybase/server": "1.3.20",
12
- "@tachybase/actions": "1.3.20",
13
- "@tachybase/database": "1.3.20",
14
- "@tachybase/utils": "1.3.20"
11
+ "@tego/server": "1.3.39"
15
12
  };
@@ -1 +1 @@
1
- {"name":"mathjs","version":"10.6.4","description":"Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.","author":"Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)","homepage":"https://mathjs.org","repository":{"type":"git","url":"https://github.com/josdejong/mathjs.git"},"license":"Apache-2.0","keywords":["math","mathematics","functions","numeric","algebra","parser","expression","number","bignumber","complex","fraction","matrix","unit"],"dependencies":{"@babel/runtime":"^7.18.6","complex.js":"^2.1.1","decimal.js":"^10.3.1","escape-latex":"^1.2.0","fraction.js":"^4.2.0","javascript-natural-sort":"^0.7.1","seedrandom":"^3.0.5","tiny-emitter":"^2.1.0","typed-function":"^2.1.0"},"devDependencies":{"@babel/core":"7.18.6","@babel/plugin-transform-object-assign":"7.18.6","@babel/plugin-transform-runtime":"7.18.6","@babel/preset-env":"7.18.6","@babel/register":"7.18.6","@types/assert":"1.5.6","@types/mocha":"9.1.1","@typescript-eslint/eslint-plugin":"5.30.0","@typescript-eslint/parser":"5.30.0","assert":"2.0.0","babel-loader":"8.2.5","benchmark":"2.1.4","codecov":"3.8.3","core-js":"3.23.3","del":"6.1.1","dtslint":"4.2.1","eslint":"8.18.0","eslint-config-prettier":"8.5.0","eslint-config-standard":"17.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-mocha":"10.0.5","eslint-plugin-n":"15.2.3","eslint-plugin-prettier":"4.1.0","eslint-plugin-promise":"6.0.0","expect-type":"0.13.0","expr-eval":"2.0.2","fancy-log":"2.0.0","glob":"7.2.0","gulp":"4.0.2","gulp-babel":"8.0.0","handlebars":"4.7.7","istanbul":"0.4.5","jsep":"1.3.6","karma":"6.4.0","karma-browserstack-launcher":"1.6.0","karma-firefox-launcher":"2.1.2","karma-mocha":"2.0.1","karma-mocha-reporter":"2.2.5","karma-webpack":"4.0.2","math-expression-evaluator":"1.3.14","mkdirp":"1.0.4","mocha":"8.4.0","ndarray":"1.0.19","ndarray-determinant":"1.0.0","ndarray-gemm":"1.0.0","ndarray-ops":"1.2.2","ndarray-pack":"1.2.1","numericjs":"1.2.6","nyc":"15.1.0","pad-right":"0.2.2","prettier":"2.7.1","process":"0.11.10","sylvester":"0.0.21","ts-node":"10.8.1","typescript":"4.7.4","webpack":"4.46.0","zeros":"1.0.0"},"type":"module","main":"./lib/cjs","types":"./types/index.d.ts","module":"./lib/esm","unpkg":"./lib/browser/math.js","jsdelivr":"./lib/browser/math.js","exports":{".":{"types":"./types/index.d.ts","import":"./lib/esm/index.js","require":"./lib/cjs/index.js"},"./number":{"types":"./types/index.d.ts","import":"./lib/esm/number.js","require":"./lib/cjs/number.js"},"./lib/esm/number":{"types":"./types/index.d.ts","import":"./lib/esm/number.js","require":"./lib/cjs/number.js"},"./package.json":"./package.json","./lib/browser/math.js":"./lib/browser/math.js","./lib/browser/math.js.map":"./lib/browser/math.js.map","./dist/math.js":"./dist/math.js","./dist/math.min.js":"./dist/math.min.js","./main/es5/index.js":"./main/es5/index.js","./main/es5/number.js":"./main/es5/number.js","./main/esm/index.js":"./main/esm/index.js","./main/esm/number.js":"./main/esm/number.js","./number.js":"./number.cjs"},"files":["bin","dist","lib","main","types","number.cjs","LICENSE","NOTICE","README.md","HISTORY.md","CONTRIBUTING.md"],"directories":{"bin":"./bin","lib":"./lib"},"scripts":{"build":"gulp --gulpfile gulpfile.cjs && npm run update-authors","build-and-test":"npm run build && npm run test:all && npm run lint","build:clean":"gulp --gulpfile gulpfile.cjs clean","build:docs":"gulp --gulpfile gulpfile.cjs docs","compile":"gulp --gulpfile gulpfile.cjs compile","watch":"gulp --gulpfile gulpfile.cjs watch","lint":"eslint --cache --max-warnings 0 src/ test/ types/","format":"npm run lint -- --fix","validate:ascii":"gulp --gulpfile gulpfile.cjs validate:ascii","test":"npm run test:src && npm run lint","test:src":"mocha test/unit-tests","test:generated":"mocha test/generated-code-tests","test:node":"mocha test/node-tests/*.test.js test/node-tests/**/*.test.js","test:all":"npm run test:src && npm run test:generated && npm run test:node && npm run test:types","test:browser":"karma start test/browser-test-config/local-karma.js","test:browserstack":"karma start test/browser-test-config/browserstack-karma.js","test:types":"cd types && node --loader ts-node/esm ./index.ts","coverage":"nyc --reporter=lcov --reporter=text-summary mocha test/unit-tests && echo \"\nDetailed coverage report is available at ./coverage/lcov-report/index.html\"","prepublishOnly":"npm run test:all && npm run lint","prepare":"npm run build","update-authors":"node ./tools/update-authors.js"},"bin":{"mathjs":"./bin/cli.js"},"engines":{"node":">= 14"},"bugs":{"url":"https://github.com/josdejong/mathjs/issues"},"browserslist":["IE 11"],"sideEffects":false,"_lastModified":"2025-07-24T06:25:23.276Z"}
1
+ {"name":"mathjs","version":"10.6.4","description":"Math.js is an extensive math library for JavaScript and Node.js. It features a flexible expression parser with support for symbolic computation, comes with a large set of built-in functions and constants, and offers an integrated solution to work with different data types like numbers, big numbers, complex numbers, fractions, units, and matrices.","author":"Jos de Jong <wjosdejong@gmail.com> (https://github.com/josdejong)","homepage":"https://mathjs.org","repository":{"type":"git","url":"https://github.com/josdejong/mathjs.git"},"license":"Apache-2.0","keywords":["math","mathematics","functions","numeric","algebra","parser","expression","number","bignumber","complex","fraction","matrix","unit"],"dependencies":{"@babel/runtime":"^7.18.6","complex.js":"^2.1.1","decimal.js":"^10.3.1","escape-latex":"^1.2.0","fraction.js":"^4.2.0","javascript-natural-sort":"^0.7.1","seedrandom":"^3.0.5","tiny-emitter":"^2.1.0","typed-function":"^2.1.0"},"devDependencies":{"@babel/core":"7.18.6","@babel/plugin-transform-object-assign":"7.18.6","@babel/plugin-transform-runtime":"7.18.6","@babel/preset-env":"7.18.6","@babel/register":"7.18.6","@types/assert":"1.5.6","@types/mocha":"9.1.1","@typescript-eslint/eslint-plugin":"5.30.0","@typescript-eslint/parser":"5.30.0","assert":"2.0.0","babel-loader":"8.2.5","benchmark":"2.1.4","codecov":"3.8.3","core-js":"3.23.3","del":"6.1.1","dtslint":"4.2.1","eslint":"8.18.0","eslint-config-prettier":"8.5.0","eslint-config-standard":"17.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-mocha":"10.0.5","eslint-plugin-n":"15.2.3","eslint-plugin-prettier":"4.1.0","eslint-plugin-promise":"6.0.0","expect-type":"0.13.0","expr-eval":"2.0.2","fancy-log":"2.0.0","glob":"7.2.0","gulp":"4.0.2","gulp-babel":"8.0.0","handlebars":"4.7.7","istanbul":"0.4.5","jsep":"1.3.6","karma":"6.4.0","karma-browserstack-launcher":"1.6.0","karma-firefox-launcher":"2.1.2","karma-mocha":"2.0.1","karma-mocha-reporter":"2.2.5","karma-webpack":"4.0.2","math-expression-evaluator":"1.3.14","mkdirp":"1.0.4","mocha":"8.4.0","ndarray":"1.0.19","ndarray-determinant":"1.0.0","ndarray-gemm":"1.0.0","ndarray-ops":"1.2.2","ndarray-pack":"1.2.1","numericjs":"1.2.6","nyc":"15.1.0","pad-right":"0.2.2","prettier":"2.7.1","process":"0.11.10","sylvester":"0.0.21","ts-node":"10.8.1","typescript":"4.7.4","webpack":"4.46.0","zeros":"1.0.0"},"type":"module","main":"./lib/cjs","types":"./types/index.d.ts","module":"./lib/esm","unpkg":"./lib/browser/math.js","jsdelivr":"./lib/browser/math.js","exports":{".":{"types":"./types/index.d.ts","import":"./lib/esm/index.js","require":"./lib/cjs/index.js"},"./number":{"types":"./types/index.d.ts","import":"./lib/esm/number.js","require":"./lib/cjs/number.js"},"./lib/esm/number":{"types":"./types/index.d.ts","import":"./lib/esm/number.js","require":"./lib/cjs/number.js"},"./package.json":"./package.json","./lib/browser/math.js":"./lib/browser/math.js","./lib/browser/math.js.map":"./lib/browser/math.js.map","./dist/math.js":"./dist/math.js","./dist/math.min.js":"./dist/math.min.js","./main/es5/index.js":"./main/es5/index.js","./main/es5/number.js":"./main/es5/number.js","./main/esm/index.js":"./main/esm/index.js","./main/esm/number.js":"./main/esm/number.js","./number.js":"./number.cjs"},"files":["bin","dist","lib","main","types","number.cjs","LICENSE","NOTICE","README.md","HISTORY.md","CONTRIBUTING.md"],"directories":{"bin":"./bin","lib":"./lib"},"scripts":{"build":"gulp --gulpfile gulpfile.cjs && npm run update-authors","build-and-test":"npm run build && npm run test:all && npm run lint","build:clean":"gulp --gulpfile gulpfile.cjs clean","build:docs":"gulp --gulpfile gulpfile.cjs docs","compile":"gulp --gulpfile gulpfile.cjs compile","watch":"gulp --gulpfile gulpfile.cjs watch","lint":"eslint --cache --max-warnings 0 src/ test/ types/","format":"npm run lint -- --fix","validate:ascii":"gulp --gulpfile gulpfile.cjs validate:ascii","test":"npm run test:src && npm run lint","test:src":"mocha test/unit-tests","test:generated":"mocha test/generated-code-tests","test:node":"mocha test/node-tests/*.test.js test/node-tests/**/*.test.js","test:all":"npm run test:src && npm run test:generated && npm run test:node && npm run test:types","test:browser":"karma start test/browser-test-config/local-karma.js","test:browserstack":"karma start test/browser-test-config/browserstack-karma.js","test:types":"cd types && node --loader ts-node/esm ./index.ts","coverage":"nyc --reporter=lcov --reporter=text-summary mocha test/unit-tests && echo \"\nDetailed coverage report is available at ./coverage/lcov-report/index.html\"","prepublishOnly":"npm run test:all && npm run lint","prepare":"npm run build","update-authors":"node ./tools/update-authors.js"},"bin":{"mathjs":"./bin/cli.js"},"engines":{"node":">= 14"},"bugs":{"url":"https://github.com/josdejong/mathjs/issues"},"browserslist":["IE 11"],"sideEffects":false,"_lastModified":"2025-07-29T06:16:19.761Z"}
@@ -10,9 +10,9 @@ case `uname` in
10
10
  esac
11
11
 
12
12
  if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/tego/tego/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/bin/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/node_modules"
13
+ export NODE_PATH="/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/bin/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/node_modules"
14
14
  else
15
- export NODE_PATH="/home/runner/work/tego/tego/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/bin/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/node_modules:$NODE_PATH"
15
+ export NODE_PATH="/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/bin/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/node_modules:$NODE_PATH"
16
16
  fi
17
17
  if [ -x "$basedir/node" ]; then
18
18
  exec "$basedir/node" "$basedir/../../../../../xlsx@https+++cdn.sheetjs.com+xlsx-0.20.2+xlsx-0.20.2.tgz/node_modules/xlsx/bin/xlsx.njs" "$@"
@@ -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-07-24T06:25:18.043Z"}
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-07-29T06:16:11.180Z"}
@@ -10,9 +10,9 @@ case `uname` in
10
10
  esac
11
11
 
12
12
  if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/tego/tego/node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/bin/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/crc-32@1.2.2/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/node_modules"
13
+ export NODE_PATH="/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/bin/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/crc-32@1.2.2/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/node_modules"
14
14
  else
15
- export NODE_PATH="/home/runner/work/tego/tego/node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/bin/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/crc-32@1.2.2/node_modules:/home/runner/work/tego/tego/node_modules/.pnpm/node_modules:$NODE_PATH"
15
+ export NODE_PATH="/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/bin/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/crc-32@1.2.2/node_modules/crc-32/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/crc-32@1.2.2/node_modules:/home/runner/work/tego-standard/tego-standard/node_modules/.pnpm/node_modules:$NODE_PATH"
16
16
  fi
17
17
  if [ -x "$basedir/node" ]; then
18
18
  exec "$basedir/node" "$basedir/../../../../../crc-32@1.2.2/node_modules/crc-32/bin/crc32.njs" "$@"
@@ -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-07-24T06:25:20.205Z"}
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-07-29T06:16:13.740Z"}
@@ -1,2 +1,2 @@
1
- import { Context, Next } from '@tachybase/actions';
1
+ import { Context, Next } from '@tego/server';
2
2
  export declare function downloadXlsxTemplate(ctx: Context, next: Next): Promise<void>;
@@ -1,2 +1,2 @@
1
- import { Context, Next } from '@tachybase/actions';
1
+ import { Context, Next } from '@tego/server';
2
2
  export declare function importXlsx(ctx: Context, next: Next): Promise<void>;
@@ -30,7 +30,7 @@ __export(importXlsx_exports, {
30
30
  importXlsx: () => importXlsx
31
31
  });
32
32
  module.exports = __toCommonJS(importXlsx_exports);
33
- var import_utils = require("@tachybase/utils");
33
+ var import_server = require("@tego/server");
34
34
  var import_node_xlsx = __toESM(require("node-xlsx"));
35
35
  var import_xlsx = __toESM(require("xlsx"));
36
36
  var import__ = require("../../");
@@ -166,7 +166,7 @@ async function importXlsx(ctx, next) {
166
166
  ctx.body = {
167
167
  rows: import_node_xlsx.default.build([
168
168
  {
169
- name: `${(0, import_utils.uid)()}.xlsx`,
169
+ name: `${(0, import_server.uid)()}.xlsx`,
170
170
  data: [importer.headerRow].concat(failure),
171
171
  options: {}
172
172
  }
@@ -1,4 +1,4 @@
1
- import { InstallOptions, Plugin } from '@tachybase/server';
1
+ import { InstallOptions, Plugin } from '@tego/server';
2
2
  export declare class ImportPlugin extends Plugin {
3
3
  beforeLoad(): void;
4
4
  load(): Promise<void>;
@@ -21,7 +21,7 @@ __export(server_exports, {
21
21
  default: () => server_default
22
22
  });
23
23
  module.exports = __toCommonJS(server_exports);
24
- var import_server = require("@tachybase/server");
24
+ var import_server = require("@tego/server");
25
25
  var import__ = require("..");
26
26
  var import_actions = require("./actions");
27
27
  var import_locale = require("./locale");
@@ -1,2 +1,2 @@
1
- import { Context, Next } from '@tachybase/actions';
1
+ import { Context, Next } from '@tego/server';
2
2
  export declare function importMiddleware(ctx: Context, next: Next): Promise<any>;
@@ -20,12 +20,12 @@ __export(middleware_exports, {
20
20
  importMiddleware: () => importMiddleware
21
21
  });
22
22
  module.exports = __toCommonJS(middleware_exports);
23
- var import_utils = require("@tachybase/utils");
23
+ var import_server = require("@tego/server");
24
24
  async function importMiddleware(ctx, next) {
25
25
  if (ctx.action.actionName !== "importXlsx") {
26
26
  return next();
27
27
  }
28
- const upload = (0, import_utils.koaMulter)().single("file");
28
+ const upload = (0, import_server.koaMulter)().single("file");
29
29
  return upload(ctx, next);
30
30
  }
31
31
  // Annotate the CommonJS export names for ESM import in node:
@@ -50,7 +50,7 @@ __export(transform_exports, {
50
50
  time: () => time
51
51
  });
52
52
  module.exports = __toCommonJS(transform_exports);
53
- var import_utils = require("@tachybase/utils");
53
+ var import_server = require("@tego/server");
54
54
  var math = __toESM(require("mathjs"));
55
55
  var import__ = require("../../");
56
56
  async function _({ value, field }) {
@@ -142,7 +142,7 @@ async function datetime({ value, field, ctx }) {
142
142
  }
143
143
  const utcOffset = ctx.get("X-Timezone");
144
144
  const props = ((_b = (_a = field.options) == null ? void 0 : _a.uiSchema) == null ? void 0 : _b["x-component-props"]) ?? {};
145
- const m = (0, import_utils.str2moment)(value, { ...props, utcOffset });
145
+ const m = (0, import_server.str2moment)(value, { ...props, utcOffset });
146
146
  if (!m.isValid()) {
147
147
  throw new Error(ctx.t("Incorrect date format", { ns: import__.namespace }));
148
148
  }
@@ -152,7 +152,7 @@ async function time({ value, field, ctx }) {
152
152
  var _a, _b;
153
153
  const { format } = ((_b = (_a = field.options) == null ? void 0 : _a.uiSchema) == null ? void 0 : _b["x-component-props"]) ?? {};
154
154
  if (format) {
155
- const m = (0, import_utils.dayjs)(value, format);
155
+ const m = (0, import_server.dayjs)(value, format);
156
156
  if (!m.isValid()) {
157
157
  throw new Error(ctx.t("Incorrect time format", { ns: import__.namespace }));
158
158
  }
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.3.20",
4
+ "version": "1.3.22",
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"
@@ -10,31 +10,23 @@
10
10
  "main": "./dist/server/index.js",
11
11
  "dependencies": {},
12
12
  "devDependencies": {
13
- "@ant-design/icons": "~5.3.7",
14
- "@types/node-xlsx": "^0.21.0",
13
+ "@ant-design/icons": "^5.6.1",
14
+ "@tachybase/schema": "^1.3.39",
15
+ "@tachybase/test": "^1.3.39",
16
+ "@tego/client": "^1.3.39",
17
+ "@tego/server": "^1.3.39",
15
18
  "antd": "5.22.5",
16
19
  "file-saver": "^2.0.5",
17
20
  "lodash": "4.17.21",
18
21
  "mathjs": "^10.6.4",
19
22
  "node-xlsx": "^0.24.0",
20
- "react": "^18.3.1",
21
- "react-dom": "^18.3.1",
22
- "react-i18next": "^15.2.0",
23
- "xlsx": "^0.18.5",
24
- "@tachybase/components": "1.3.20",
25
- "@tachybase/schema": "1.3.20"
26
- },
27
- "peerDependencies": {
28
- "@tachybase/client": "1.3.20",
29
- "@tachybase/actions": "1.3.20",
30
- "@tachybase/database": "1.3.20",
31
- "@tachybase/server": "1.3.20",
32
- "@tachybase/test": "1.3.20",
33
- "@tachybase/utils": "1.3.20"
23
+ "react": "18.3.1",
24
+ "react-dom": "18.3.1",
25
+ "react-i18next": "15.2.0",
26
+ "xlsx": "0.18.5",
27
+ "@tachybase/client": "1.3.22"
34
28
  },
35
29
  "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。",
36
30
  "displayName.zh-CN": "操作:导入记录",
37
- "scripts": {
38
- "build": "tachybase-build --no-dts @tachybase/plugin-action-import"
39
- }
31
+ "scripts": {}
40
32
  }