@databrainhq/plugin 0.7.3 → 0.7.4
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/index.es.js +4 -16
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -8256,22 +8256,10 @@ const operatorList = [
|
|
|
8256
8256
|
}
|
|
8257
8257
|
];
|
|
8258
8258
|
const RowLimitList = [
|
|
8259
|
-
{
|
|
8260
|
-
value: "10",
|
|
8261
|
-
label: "10"
|
|
8262
|
-
},
|
|
8263
|
-
{
|
|
8264
|
-
value: "50",
|
|
8265
|
-
label: "50"
|
|
8266
|
-
},
|
|
8267
8259
|
{
|
|
8268
8260
|
value: "100",
|
|
8269
8261
|
label: "100"
|
|
8270
8262
|
},
|
|
8271
|
-
{
|
|
8272
|
-
value: "250",
|
|
8273
|
-
label: "250"
|
|
8274
|
-
},
|
|
8275
8263
|
{
|
|
8276
8264
|
value: "500",
|
|
8277
8265
|
label: "500"
|
|
@@ -8281,12 +8269,12 @@ const RowLimitList = [
|
|
|
8281
8269
|
label: "1000"
|
|
8282
8270
|
},
|
|
8283
8271
|
{
|
|
8284
|
-
value: "
|
|
8285
|
-
label: "
|
|
8272
|
+
value: "2000",
|
|
8273
|
+
label: "2000"
|
|
8286
8274
|
},
|
|
8287
8275
|
{
|
|
8288
|
-
value: "
|
|
8289
|
-
label: "
|
|
8276
|
+
value: "5000",
|
|
8277
|
+
label: "5000"
|
|
8290
8278
|
}
|
|
8291
8279
|
];
|
|
8292
8280
|
const AggregateList = [
|
package/dist/index.umd.js
CHANGED
|
@@ -157,7 +157,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
157
157
|
timeTaken
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
`,TT=(r,e)=>pl(r===void 0?["QueryExternalMetric"]:["QueryExternalMetric",r],Ln(D$,r),e);var DT={csvlink:"_csvlink_azd6y_1",noChart:"_noChart_azd6y_7"};const MT=r=>{const e=document.documentElement;r.colors&&Object.entries(r.colors).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-color-${t}`,`${n}`)}),r.border&&Object.entries(r.border).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-border-${t}`,`${n}`)}),r.shadow&&Object.entries(r.shadow).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-shadow-${t}`,`${n}`)}),r.typography&&Object.entries(r.typography).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-typography-${t}`,`${n}`)}),r.breakpoint&&Object.entries(r.breakpoint).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-breakpoint-${t}`,`${n}`)})},AT=["rgb(56, 72, 211)","rgb(251, 208, 98)","rgb(234 88 12)","rgb(245 158 11)","rgb(234 179 8)","rgb(34 197 94)","rgb(4 120 87)","rgb(15 118 110)","rgb(8 145 178)","rgb(219 234 254)","rgb(30 58 138)","rgb(139 92 246)"],vm=({data:r,measure:e,sankeyValues:t,singleValue:n,step:a,xAxis:i,yAxisList:o})=>{const s=Array.isArray(r)?r.map(h=>i&&h[i]):[],l=o==null?void 0:o.map((h,v)=>({label:h,data:Array.isArray(r)?r.map(d=>d[o[v]]):[],borderColor:AT[v]})),u=Array.isArray(r)?r.map(h=>e&&a&&{value:h[e],name:h[a]}):[],c=t==null?void 0:t.map((h,v)=>Array.isArray(r)?r.map(d=>d[t[v]]):[]),f=Array.isArray(r)?r.map(h=>n&&{value:h[n],label:n}):[];return{labels:s,datasets:l,funnelData:u,sankeyData:c,singleValueData:f}},pv=[{value:"=",label:"Equal to (=)"},{value:"<>",label:"Not equal to (!=)"},{value:"<",label:"Less than (<)"},{value:"<=",label:"Less or equal (<=)"},{value:">",label:"Greater than (>)"},{value:">=",label:"Greater or equal (>=)"},{value:"IN",label:"In"},{value:"NOT IN",label:"Not in"},{value:"LIKE (case sensitive)",label:"Like (case sensitive)"},{value:"REGEX",label:"Regex"},{value:"IS NOT NULL",label:"Is not null"},{value:"IS NULL",label:"Is null"}],LT=[{value:"
|
|
160
|
+
`,TT=(r,e)=>pl(r===void 0?["QueryExternalMetric"]:["QueryExternalMetric",r],Ln(D$,r),e);var DT={csvlink:"_csvlink_azd6y_1",noChart:"_noChart_azd6y_7"};const MT=r=>{const e=document.documentElement;r.colors&&Object.entries(r.colors).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-color-${t}`,`${n}`)}),r.border&&Object.entries(r.border).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-border-${t}`,`${n}`)}),r.shadow&&Object.entries(r.shadow).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-shadow-${t}`,`${n}`)}),r.typography&&Object.entries(r.typography).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-typography-${t}`,`${n}`)}),r.breakpoint&&Object.entries(r.breakpoint).forEach(([t,n])=>{e.style.setProperty(`--databrainhq-plugin-breakpoint-${t}`,`${n}`)})},AT=["rgb(56, 72, 211)","rgb(251, 208, 98)","rgb(234 88 12)","rgb(245 158 11)","rgb(234 179 8)","rgb(34 197 94)","rgb(4 120 87)","rgb(15 118 110)","rgb(8 145 178)","rgb(219 234 254)","rgb(30 58 138)","rgb(139 92 246)"],vm=({data:r,measure:e,sankeyValues:t,singleValue:n,step:a,xAxis:i,yAxisList:o})=>{const s=Array.isArray(r)?r.map(h=>i&&h[i]):[],l=o==null?void 0:o.map((h,v)=>({label:h,data:Array.isArray(r)?r.map(d=>d[o[v]]):[],borderColor:AT[v]})),u=Array.isArray(r)?r.map(h=>e&&a&&{value:h[e],name:h[a]}):[],c=t==null?void 0:t.map((h,v)=>Array.isArray(r)?r.map(d=>d[t[v]]):[]),f=Array.isArray(r)?r.map(h=>n&&{value:h[n],label:n}):[];return{labels:s,datasets:l,funnelData:u,sankeyData:c,singleValueData:f}},pv=[{value:"=",label:"Equal to (=)"},{value:"<>",label:"Not equal to (!=)"},{value:"<",label:"Less than (<)"},{value:"<=",label:"Less or equal (<=)"},{value:">",label:"Greater than (>)"},{value:">=",label:"Greater or equal (>=)"},{value:"IN",label:"In"},{value:"NOT IN",label:"Not in"},{value:"LIKE (case sensitive)",label:"Like (case sensitive)"},{value:"REGEX",label:"Regex"},{value:"IS NOT NULL",label:"Is not null"},{value:"IS NULL",label:"Is null"}],LT=[{value:"100",label:"100"},{value:"500",label:"500"},{value:"1000",label:"1000"},{value:"2000",label:"2000"},{value:"5000",label:"5000"}],dm=[{value:"AVG",label:"AVG"},{value:"SUM",label:"SUM"},{value:"COUNT",label:"COUNT"},{value:"COUNT_DISTINCT",label:"COUNT_DISTINCT"},{value:"MAX",label:"MAX"},{value:"MIN",label:"MIN"}],pm=["fixed","real","int","bigint","float","number","integer","int64","float64","double precision","smallint"],gm=["varchar","text","char","text","character(36)","string"],ym=["timestamp_ltz","date","timestamp","timestamp without time zone","timestamp with time zone","datetime"],IT=["array","text[]"],mm=["boolean","bool"],PT=r=>pm.includes(r.toLowerCase())?"number":gm.includes(r.toLowerCase())||r.toLowerCase().includes("char")?"text":mm.includes(r.toLowerCase())?"boolean":"text",OT=r=>{const e="data:text/csv;charset=utf-8,";if(!r.length)return e;const t=[],n=r[0],a=Object.keys(n);t.push(`S.NO,${a.join(",").toUpperCase()}`),r.forEach((s,l)=>{const u=Object.values(s).map(c=>{if(typeof c=="number")return c;try{if(c!=null&&c.includes(","))return`"${c}"`}catch{return c}return c});t.push(`${l+1},${u.join(",")}`)});const i=t.join(`
|
|
161
161
|
`);return encodeURI(e+i)};var M$=Object.freeze(Object.defineProperty({__proto__:null,applyTheme:MT,getChartAttributes:vm,colors:AT,getFormattedDataType:PT,objectArrayToCsvString:OT},Symbol.toStringTag,{value:"Module"})),gv={exports:{}},yv={};/**
|
|
162
162
|
* @license React
|
|
163
163
|
* react-jsx-runtime.production.min.js
|