@devtable/dashboard 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dashboard.es.js +0 -1
- package/dist/dashboard.umd.js +1 -1
- package/package.json +1 -1
package/dist/dashboard.es.js
CHANGED
|
@@ -102,7 +102,6 @@ const queryBySQL = (sql, context, definitions, title) => async () => {
|
|
|
102
102
|
}
|
|
103
103
|
const needParams = sql.includes("$");
|
|
104
104
|
const params = getSQLParams(context, definitions);
|
|
105
|
-
console.log(needParams, params);
|
|
106
105
|
if (needParams && Object.keys(params).length === 0) {
|
|
107
106
|
console.error(`[queryBySQL] insufficient params for {${title}}'s SQL`);
|
|
108
107
|
return [];
|
package/dist/dashboard.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(p,S){typeof exports=="object"&&typeof module!="undefined"?S(exports,require("react"),require("lodash"),require("react-grid-layout"),require("@mantine/core"),require("ahooks"),require("axios"),require("tabler-icons-react"),require("@mantine/hooks"),require("echarts-for-react/lib/core"),require("echarts/core"),require("echarts/charts"),require("echarts/renderers"),require("echarts/components"),require("numbro"),require("echarts-gl"),require("@mantine/prism"),require("@mantine/form"),require("react-hook-form")):typeof define=="function"&&define.amd?define(["exports","react","lodash","react-grid-layout","@mantine/core","ahooks","axios","tabler-icons-react","@mantine/hooks","echarts-for-react/lib/core","echarts/core","echarts/charts","echarts/renderers","echarts/components","numbro","echarts-gl","@mantine/prism","@mantine/form","react-hook-form"],S):(p=typeof globalThis!="undefined"?globalThis:p||self,S(p.dashboard={},p.React,p._,p["react-grid-layout"],p["@mantine/core"],p.ahooks,p.axios,p["tabler-icons-react"],p["@mantine/hooks"],p["echarts-for-react/lib/core"],p["echarts/core"],p["echarts/charts"],p["echarts/renderers"],p["echarts/components"],p.numbro,p["echarts-gl"],p["@mantine/prism"],p["@mantine/form"],p["react-hook-form"]))})(this,function(p,S,C,w,t,ve,ye,y,P,Se,Ce,X,H,A,we,zt,M,L,B){"use strict";var wt=Object.defineProperty,Tt=Object.defineProperties;var _t=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;var xe=(p,S,C)=>S in p?wt(p,S,{enumerable:!0,configurable:!0,writable:!0,value:C}):p[S]=C,m=(p,S)=>{for(var C in S||(S={}))ge.call(S,C)&&xe(p,C,S[C]);if(K)for(var C of K(S))be.call(S,C)&&xe(p,C,S[C]);return p},k=(p,S)=>Tt(p,_t(S));var I=(p,S)=>{var C={};for(var w in p)ge.call(p,w)&&S.indexOf(w)<0&&(C[w]=p[w]);if(p!=null&&K)for(var w of K(p))S.indexOf(w)<0&&be.call(p,w)&&(C[w]=p[w]);return C};function j(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}function Te(n){if(n&&n.__esModule)return n;var i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return n&&Object.keys(n).forEach(function(r){if(r!=="default"){var a=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,a.get?a:{enumerable:!0,get:function(){return n[r]}})}}),i.default=n,Object.freeze(i)}var d=j(S),T=j(C),_e=j(ye),Z=j(Se),$=Te(Ce),re=j(we),q=(n=>(n.Use="use",n.Edit="edit",n))(q||{});const ze={layoutFrozen:!1,freezeLayout:()=>{},mode:q.Edit,inEditMode:!1},R=d.default.createContext(ze),Pe=(n=>(i,r,a={})=>{const o=m({"X-Requested-With":"XMLHttpRequest","Content-Type":a.string?"application/x-www-form-urlencoded":"application/json"},a.headers),s={baseURL:"http://localhost:31200",method:n,url:i,params:n==="GET"?r:a.params,headers:o};return n==="POST"&&(s.data=a.string?JSON.stringify(r):r),_e.default(s).then(l=>l.data).catch(l=>Promise.reject(l))})("POST");function ae(n,i){const r=Object.keys(i),a=Object.values(i);return new Function(...r,`return \`${n}\`;`)(...a)}function Ie(n,i){const r=i.sqlSnippets.reduce((a,o)=>(a[o.key]=ae(o.value,n),a),{});return T.default.merge({},r,n)}const Le=(n,i,r,a)=>async()=>{if(!n)return[];const o=n.includes("$"),s=Ie(i,r);if(
|
|
1
|
+
(function(p,S){typeof exports=="object"&&typeof module!="undefined"?S(exports,require("react"),require("lodash"),require("react-grid-layout"),require("@mantine/core"),require("ahooks"),require("axios"),require("tabler-icons-react"),require("@mantine/hooks"),require("echarts-for-react/lib/core"),require("echarts/core"),require("echarts/charts"),require("echarts/renderers"),require("echarts/components"),require("numbro"),require("echarts-gl"),require("@mantine/prism"),require("@mantine/form"),require("react-hook-form")):typeof define=="function"&&define.amd?define(["exports","react","lodash","react-grid-layout","@mantine/core","ahooks","axios","tabler-icons-react","@mantine/hooks","echarts-for-react/lib/core","echarts/core","echarts/charts","echarts/renderers","echarts/components","numbro","echarts-gl","@mantine/prism","@mantine/form","react-hook-form"],S):(p=typeof globalThis!="undefined"?globalThis:p||self,S(p.dashboard={},p.React,p._,p["react-grid-layout"],p["@mantine/core"],p.ahooks,p.axios,p["tabler-icons-react"],p["@mantine/hooks"],p["echarts-for-react/lib/core"],p["echarts/core"],p["echarts/charts"],p["echarts/renderers"],p["echarts/components"],p.numbro,p["echarts-gl"],p["@mantine/prism"],p["@mantine/form"],p["react-hook-form"]))})(this,function(p,S,C,w,t,ve,ye,y,P,Se,Ce,X,H,A,we,zt,M,L,B){"use strict";var wt=Object.defineProperty,Tt=Object.defineProperties;var _t=Object.getOwnPropertyDescriptors;var K=Object.getOwnPropertySymbols;var ge=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;var xe=(p,S,C)=>S in p?wt(p,S,{enumerable:!0,configurable:!0,writable:!0,value:C}):p[S]=C,m=(p,S)=>{for(var C in S||(S={}))ge.call(S,C)&&xe(p,C,S[C]);if(K)for(var C of K(S))be.call(S,C)&&xe(p,C,S[C]);return p},k=(p,S)=>Tt(p,_t(S));var I=(p,S)=>{var C={};for(var w in p)ge.call(p,w)&&S.indexOf(w)<0&&(C[w]=p[w]);if(p!=null&&K)for(var w of K(p))S.indexOf(w)<0&&be.call(p,w)&&(C[w]=p[w]);return C};function j(n){return n&&typeof n=="object"&&"default"in n?n:{default:n}}function Te(n){if(n&&n.__esModule)return n;var i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});return n&&Object.keys(n).forEach(function(r){if(r!=="default"){var a=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(i,r,a.get?a:{enumerable:!0,get:function(){return n[r]}})}}),i.default=n,Object.freeze(i)}var d=j(S),T=j(C),_e=j(ye),Z=j(Se),$=Te(Ce),re=j(we),q=(n=>(n.Use="use",n.Edit="edit",n))(q||{});const ze={layoutFrozen:!1,freezeLayout:()=>{},mode:q.Edit,inEditMode:!1},R=d.default.createContext(ze),Pe=(n=>(i,r,a={})=>{const o=m({"X-Requested-With":"XMLHttpRequest","Content-Type":a.string?"application/x-www-form-urlencoded":"application/json"},a.headers),s={baseURL:"http://localhost:31200",method:n,url:i,params:n==="GET"?r:a.params,headers:o};return n==="POST"&&(s.data=a.string?JSON.stringify(r):r),_e.default(s).then(l=>l.data).catch(l=>Promise.reject(l))})("POST");function ae(n,i){const r=Object.keys(i),a=Object.values(i);return new Function(...r,`return \`${n}\`;`)(...a)}function Ie(n,i){const r=i.sqlSnippets.reduce((a,o)=>(a[o.key]=ae(o.value,n),a),{});return T.default.merge({},r,n)}const Le=(n,i,r,a)=>async()=>{if(!n)return[];const o=n.includes("$"),s=Ie(i,r);if(o&&Object.keys(s).length===0)return console.error(`[queryBySQL] insufficient params for {${a}}'s SQL`),[];const l=ae(n,s);return o&&(console.groupCollapsed(`Final SQL for: ${a}`),console.log(l),console.groupEnd()),await Pe("/query",{sql:l})},oe={},De=oe,ee=d.default.createContext(oe),Ge={data:[],loading:!1,title:"",setTitle:()=>{},description:"",setDescription:()=>{},sql:"",setSQL:()=>{},viz:{type:"",conf:{}},setViz:()=>{},refreshData:()=>{}},D=d.default.createContext(Ge);var Q={exports:{}},W={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|