@databrainhq/plugin 0.7.1 → 0.7.2
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/components/GlobalFilters/index.d.ts +1 -0
- package/dist/components/InfoTooltip/index.d.ts +7 -1
- package/dist/components/InputField/index.d.ts +4 -14
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
- package/dist/components/MetricList/components/MetricCard.d.ts +1 -0
- package/dist/index.es.js +188 -151
- package/dist/index.umd.js +56 -56
- package/dist/style.css +1 -1
- package/dist/types/metricCreate.d.ts +5 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ declare type GlobalFiltersProps = {
|
|
|
5
5
|
filters: FilterType[];
|
|
6
6
|
companyId: string;
|
|
7
7
|
onApply: (filters: MetricCardProps['globalFilters']) => void;
|
|
8
|
+
renderAdditionalHeaderContent?: () => JSX.Element;
|
|
8
9
|
};
|
|
9
10
|
export declare const GlobalFilters: React.FC<GlobalFiltersProps>;
|
|
10
11
|
export {};
|
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
|
-
|
|
2
|
+
declare type TooltipProps = PropsWithChildren & {
|
|
3
|
+
content: JSX.Element;
|
|
4
|
+
className?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
7
|
+
export declare const InfoTooltip: React.FC<Omit<TooltipProps, 'content'>>;
|
|
8
|
+
export {};
|
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
interface Props {
|
|
4
|
-
id?: string;
|
|
5
|
-
value?: string;
|
|
6
|
-
name?: string;
|
|
7
|
-
placeholder?: string;
|
|
3
|
+
interface Props extends React.HTMLProps<HTMLInputElement> {
|
|
8
4
|
label?: string;
|
|
9
|
-
|
|
10
|
-
onBlur?: () => void;
|
|
11
|
-
onFocus?: () => void;
|
|
12
|
-
onKeyDown?: () => void;
|
|
13
|
-
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
labelVariant?: 'floating' | 'static';
|
|
14
6
|
register?: UseFormRegisterReturn;
|
|
15
|
-
defaultValue?: string | number | readonly string[] | undefined;
|
|
16
7
|
error?: any;
|
|
17
8
|
icon?: any;
|
|
18
|
-
checked?: boolean;
|
|
19
9
|
isDisabled?: boolean;
|
|
20
10
|
labelClass?: string;
|
|
21
11
|
inputClass?: string;
|
|
22
|
-
|
|
12
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
23
13
|
}
|
|
24
|
-
export declare const InputField: ({
|
|
14
|
+
export declare const InputField: ({ type, register, error, icon, label, isDisabled, labelClass, inputClass, className, labelVariant, ...rest }: Props) => JSX.Element;
|
|
25
15
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MetricOutputProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const MetricOutput: ({ data, error, isLoading, labels, funnelData, chartType, datasets, setChartType, setXAxis, setYAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, previewTableDataList, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, customSettings, setCustomSettings, updateGroup, isEnableGroupBy, backGroundColor, setBackGroundColor, }: MetricOutputProps) => JSX.Element;
|
|
3
|
+
export declare const MetricOutput: ({ data, error, isLoading, labels, funnelData, chartType, datasets, setChartType, setXAxis, setYAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, previewTableDataList, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, axisSettings, setAxisSettings, customSettings, setCustomSettings, updateGroup, isEnableGroupBy, backGroundColor, setBackGroundColor, moreTabs, }: MetricOutputProps) => JSX.Element;
|
package/dist/index.es.js
CHANGED
|
@@ -7841,22 +7841,23 @@ var styles$A = {
|
|
|
7841
7841
|
"noMetric-wrapper": "_noMetric-wrapper_1b506_25",
|
|
7842
7842
|
"alt-container": "_alt-container_1b506_33"
|
|
7843
7843
|
};
|
|
7844
|
-
const cardContainer = "
|
|
7845
|
-
const listHeader = "
|
|
7846
|
-
const metricName = "
|
|
7847
|
-
const metricDescription = "
|
|
7848
|
-
const popup$1 = "
|
|
7849
|
-
const popupIcon = "
|
|
7850
|
-
const popupMenu = "
|
|
7851
|
-
const popupItem = "
|
|
7852
|
-
const csvBtn = "
|
|
7853
|
-
const
|
|
7854
|
-
const
|
|
7855
|
-
const
|
|
7856
|
-
const
|
|
7857
|
-
const
|
|
7858
|
-
const
|
|
7859
|
-
const
|
|
7844
|
+
const cardContainer = "_cardContainer_18lqx_1";
|
|
7845
|
+
const listHeader = "_listHeader_18lqx_9";
|
|
7846
|
+
const metricName = "_metricName_18lqx_17";
|
|
7847
|
+
const metricDescription = "_metricDescription_18lqx_25";
|
|
7848
|
+
const popup$1 = "_popup_18lqx_33";
|
|
7849
|
+
const popupIcon = "_popupIcon_18lqx_41";
|
|
7850
|
+
const popupMenu = "_popupMenu_18lqx_49";
|
|
7851
|
+
const popupItem = "_popupItem_18lqx_57";
|
|
7852
|
+
const csvBtn = "_csvBtn_18lqx_65";
|
|
7853
|
+
const metricData = "_metricData_18lqx_73";
|
|
7854
|
+
const singleValueData = "_singleValueData_18lqx_81";
|
|
7855
|
+
const singleValue = "_singleValue_18lqx_81";
|
|
7856
|
+
const noData$2 = "_noData_18lqx_97";
|
|
7857
|
+
const noDataContent = "_noDataContent_18lqx_105";
|
|
7858
|
+
const noDataText = "_noDataText_18lqx_113";
|
|
7859
|
+
const loading = "_loading_18lqx_121";
|
|
7860
|
+
const features$1 = "_features_18lqx_129";
|
|
7860
7861
|
var styles$z = {
|
|
7861
7862
|
cardContainer,
|
|
7862
7863
|
listHeader,
|
|
@@ -7867,17 +7868,18 @@ var styles$z = {
|
|
|
7867
7868
|
popupMenu,
|
|
7868
7869
|
popupItem,
|
|
7869
7870
|
csvBtn,
|
|
7870
|
-
csvIcon,
|
|
7871
7871
|
metricData,
|
|
7872
7872
|
singleValueData,
|
|
7873
7873
|
singleValue,
|
|
7874
7874
|
noData: noData$2,
|
|
7875
|
+
noDataContent,
|
|
7876
|
+
noDataText,
|
|
7875
7877
|
loading,
|
|
7876
7878
|
features: features$1
|
|
7877
7879
|
};
|
|
7878
7880
|
const fetcher = (query, variables, options2) => {
|
|
7879
7881
|
return async () => {
|
|
7880
|
-
const res = await fetch("
|
|
7882
|
+
const res = await fetch("http://backend.usedatabrain.com/v1/graphql", {
|
|
7881
7883
|
method: "POST",
|
|
7882
7884
|
headers: {
|
|
7883
7885
|
"Content-Type": "application/json",
|
|
@@ -8122,54 +8124,6 @@ const useQueryExternalMetricQuery = (variables, options2) => useQuery(
|
|
|
8122
8124
|
fetcher(QueryExternalMetricDocument, variables),
|
|
8123
8125
|
options2
|
|
8124
8126
|
);
|
|
8125
|
-
var classnames = { exports: {} };
|
|
8126
|
-
/*!
|
|
8127
|
-
Copyright (c) 2018 Jed Watson.
|
|
8128
|
-
Licensed under the MIT License (MIT), see
|
|
8129
|
-
http://jedwatson.github.io/classnames
|
|
8130
|
-
*/
|
|
8131
|
-
(function(module) {
|
|
8132
|
-
(function() {
|
|
8133
|
-
var hasOwn2 = {}.hasOwnProperty;
|
|
8134
|
-
function classNames2() {
|
|
8135
|
-
var classes = [];
|
|
8136
|
-
for (var i2 = 0; i2 < arguments.length; i2++) {
|
|
8137
|
-
var arg = arguments[i2];
|
|
8138
|
-
if (!arg)
|
|
8139
|
-
continue;
|
|
8140
|
-
var argType = typeof arg;
|
|
8141
|
-
if (argType === "string" || argType === "number") {
|
|
8142
|
-
classes.push(arg);
|
|
8143
|
-
} else if (Array.isArray(arg)) {
|
|
8144
|
-
if (arg.length) {
|
|
8145
|
-
var inner2 = classNames2.apply(null, arg);
|
|
8146
|
-
if (inner2) {
|
|
8147
|
-
classes.push(inner2);
|
|
8148
|
-
}
|
|
8149
|
-
}
|
|
8150
|
-
} else if (argType === "object") {
|
|
8151
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
8152
|
-
classes.push(arg.toString());
|
|
8153
|
-
continue;
|
|
8154
|
-
}
|
|
8155
|
-
for (var key in arg) {
|
|
8156
|
-
if (hasOwn2.call(arg, key) && arg[key]) {
|
|
8157
|
-
classes.push(key);
|
|
8158
|
-
}
|
|
8159
|
-
}
|
|
8160
|
-
}
|
|
8161
|
-
}
|
|
8162
|
-
return classes.join(" ");
|
|
8163
|
-
}
|
|
8164
|
-
if (module.exports) {
|
|
8165
|
-
classNames2.default = classNames2;
|
|
8166
|
-
module.exports = classNames2;
|
|
8167
|
-
} else {
|
|
8168
|
-
window.classNames = classNames2;
|
|
8169
|
-
}
|
|
8170
|
-
})();
|
|
8171
|
-
})(classnames);
|
|
8172
|
-
var classNames = classnames.exports;
|
|
8173
8127
|
const csvlink = "_csvlink_azd6y_1";
|
|
8174
8128
|
const noChart = "_noChart_azd6y_7";
|
|
8175
8129
|
var styles$y = {
|
|
@@ -8390,14 +8344,18 @@ const objectArrayToCsvString = (array) => {
|
|
|
8390
8344
|
const columns = [];
|
|
8391
8345
|
const objSchema = array[0];
|
|
8392
8346
|
const headers = Object.keys(objSchema);
|
|
8393
|
-
columns.push(`S.
|
|
8347
|
+
columns.push(`S.NO,${headers.join(",").toUpperCase()}`);
|
|
8394
8348
|
array.forEach((rowObj, index2) => {
|
|
8395
8349
|
const row2 = Object.values(rowObj).map((value2) => {
|
|
8396
8350
|
if (typeof value2 === "number") {
|
|
8397
8351
|
return value2;
|
|
8398
8352
|
}
|
|
8399
|
-
|
|
8400
|
-
|
|
8353
|
+
try {
|
|
8354
|
+
if (value2 == null ? void 0 : value2.includes(",")) {
|
|
8355
|
+
return `"${value2}"`;
|
|
8356
|
+
}
|
|
8357
|
+
} catch {
|
|
8358
|
+
return value2;
|
|
8401
8359
|
}
|
|
8402
8360
|
return value2;
|
|
8403
8361
|
});
|
|
@@ -8468,7 +8426,7 @@ const CsvDownloadButton = ({
|
|
|
8468
8426
|
return /* @__PURE__ */ jsxs("a", {
|
|
8469
8427
|
href: objectArrayToCsvString(data2),
|
|
8470
8428
|
download: `${fileName}.csv`,
|
|
8471
|
-
className:
|
|
8429
|
+
className: className != null ? className : styles$y.csvlink,
|
|
8472
8430
|
target: "_self",
|
|
8473
8431
|
children: [/* @__PURE__ */ jsx(laFileDownload, {
|
|
8474
8432
|
className: iconClass
|
|
@@ -81708,6 +81666,54 @@ var styles$x = {
|
|
|
81708
81666
|
value,
|
|
81709
81667
|
sync
|
|
81710
81668
|
};
|
|
81669
|
+
var classnames = { exports: {} };
|
|
81670
|
+
/*!
|
|
81671
|
+
Copyright (c) 2018 Jed Watson.
|
|
81672
|
+
Licensed under the MIT License (MIT), see
|
|
81673
|
+
http://jedwatson.github.io/classnames
|
|
81674
|
+
*/
|
|
81675
|
+
(function(module) {
|
|
81676
|
+
(function() {
|
|
81677
|
+
var hasOwn2 = {}.hasOwnProperty;
|
|
81678
|
+
function classNames2() {
|
|
81679
|
+
var classes = [];
|
|
81680
|
+
for (var i2 = 0; i2 < arguments.length; i2++) {
|
|
81681
|
+
var arg = arguments[i2];
|
|
81682
|
+
if (!arg)
|
|
81683
|
+
continue;
|
|
81684
|
+
var argType = typeof arg;
|
|
81685
|
+
if (argType === "string" || argType === "number") {
|
|
81686
|
+
classes.push(arg);
|
|
81687
|
+
} else if (Array.isArray(arg)) {
|
|
81688
|
+
if (arg.length) {
|
|
81689
|
+
var inner2 = classNames2.apply(null, arg);
|
|
81690
|
+
if (inner2) {
|
|
81691
|
+
classes.push(inner2);
|
|
81692
|
+
}
|
|
81693
|
+
}
|
|
81694
|
+
} else if (argType === "object") {
|
|
81695
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
81696
|
+
classes.push(arg.toString());
|
|
81697
|
+
continue;
|
|
81698
|
+
}
|
|
81699
|
+
for (var key in arg) {
|
|
81700
|
+
if (hasOwn2.call(arg, key) && arg[key]) {
|
|
81701
|
+
classes.push(key);
|
|
81702
|
+
}
|
|
81703
|
+
}
|
|
81704
|
+
}
|
|
81705
|
+
}
|
|
81706
|
+
return classes.join(" ");
|
|
81707
|
+
}
|
|
81708
|
+
if (module.exports) {
|
|
81709
|
+
classNames2.default = classNames2;
|
|
81710
|
+
module.exports = classNames2;
|
|
81711
|
+
} else {
|
|
81712
|
+
window.classNames = classNames2;
|
|
81713
|
+
}
|
|
81714
|
+
})();
|
|
81715
|
+
})(classnames);
|
|
81716
|
+
var classNames = classnames.exports;
|
|
81711
81717
|
const primary = "_primary_18yak_1";
|
|
81712
81718
|
const secondary = "_secondary_18yak_5";
|
|
81713
81719
|
const tertiary = "_tertiary_18yak_10";
|
|
@@ -82429,16 +82435,20 @@ var styles$u = {
|
|
|
82429
82435
|
icon: icon$1,
|
|
82430
82436
|
container: container$f
|
|
82431
82437
|
};
|
|
82432
|
-
const label$4 = "
|
|
82433
|
-
const
|
|
82434
|
-
const
|
|
82435
|
-
const
|
|
82436
|
-
const
|
|
82438
|
+
const label$4 = "_label_9xvk4_1";
|
|
82439
|
+
const floatingLabel$1 = "_floatingLabel_9xvk4_7";
|
|
82440
|
+
const checkboxLabel = "_checkboxLabel_9xvk4_19";
|
|
82441
|
+
const input$1 = "_input_9xvk4_13";
|
|
82442
|
+
const floatingInput = "_floatingInput_9xvk4_31";
|
|
82443
|
+
const checkboxField = "_checkboxField_9xvk4_37";
|
|
82444
|
+
const inputWrapper$1 = "_inputWrapper_9xvk4_45";
|
|
82437
82445
|
var styles$t = {
|
|
82438
82446
|
label: label$4,
|
|
82439
|
-
|
|
82447
|
+
floatingLabel: floatingLabel$1,
|
|
82448
|
+
"inputField-container": "_inputField-container_9xvk4_13",
|
|
82440
82449
|
checkboxLabel,
|
|
82441
82450
|
input: input$1,
|
|
82451
|
+
floatingInput,
|
|
82442
82452
|
checkboxField,
|
|
82443
82453
|
inputWrapper: inputWrapper$1
|
|
82444
82454
|
};
|
|
@@ -82457,36 +82467,25 @@ const Error$1 = ({
|
|
|
82457
82467
|
});
|
|
82458
82468
|
};
|
|
82459
82469
|
const InputField = ({
|
|
82460
|
-
id: id2,
|
|
82461
|
-
name,
|
|
82462
|
-
value: value2,
|
|
82463
|
-
placeholder = "",
|
|
82464
|
-
label: label2,
|
|
82465
82470
|
type: type3,
|
|
82466
|
-
onBlur,
|
|
82467
|
-
onFocus,
|
|
82468
|
-
onChange,
|
|
82469
|
-
onKeyDown,
|
|
82470
|
-
defaultValue,
|
|
82471
82471
|
register: register2,
|
|
82472
82472
|
error: error2,
|
|
82473
82473
|
icon: icon2,
|
|
82474
|
-
|
|
82474
|
+
label: label2,
|
|
82475
82475
|
isDisabled,
|
|
82476
82476
|
labelClass,
|
|
82477
82477
|
inputClass,
|
|
82478
|
-
className
|
|
82478
|
+
className,
|
|
82479
|
+
labelVariant = "static",
|
|
82480
|
+
...rest
|
|
82479
82481
|
}) => {
|
|
82480
82482
|
return type3 === "checkbox" ? /* @__PURE__ */ jsxs("div", {
|
|
82481
82483
|
className: `${styles$t.checkboxField} ${className != null ? className : ""}`,
|
|
82482
82484
|
children: [/* @__PURE__ */ jsx("input", {
|
|
82485
|
+
...rest,
|
|
82483
82486
|
type: "checkbox",
|
|
82484
|
-
name,
|
|
82485
82487
|
className: inputClass,
|
|
82486
|
-
onChange,
|
|
82487
82488
|
...register2,
|
|
82488
|
-
defaultValue,
|
|
82489
|
-
checked,
|
|
82490
82489
|
disabled: isDisabled
|
|
82491
82490
|
}), label2 ? /* @__PURE__ */ jsxs("label", {
|
|
82492
82491
|
htmlFor: label2,
|
|
@@ -82497,22 +82496,14 @@ const InputField = ({
|
|
|
82497
82496
|
className: `${styles$t["inputField-container"]} ${className != null ? className : ""}`,
|
|
82498
82497
|
children: [label2 ? /* @__PURE__ */ jsx("label", {
|
|
82499
82498
|
htmlFor: label2,
|
|
82500
|
-
className: `${styles$t.label} ${labelClass}`,
|
|
82499
|
+
className: `${styles$t.label} ${labelVariant === "floating" ? styles$t.floatingLabel : ""} ${labelClass}`,
|
|
82501
82500
|
children: label2
|
|
82502
82501
|
}) : null, /* @__PURE__ */ jsxs("div", {
|
|
82503
82502
|
className: styles$t.inputWrapper,
|
|
82504
82503
|
children: [/* @__PURE__ */ jsx("input", {
|
|
82505
|
-
|
|
82506
|
-
value: value2,
|
|
82507
|
-
name,
|
|
82504
|
+
...rest,
|
|
82508
82505
|
type: type3,
|
|
82509
|
-
|
|
82510
|
-
onBlur,
|
|
82511
|
-
onChange,
|
|
82512
|
-
onKeyDown,
|
|
82513
|
-
className: `${styles$t.input} ${inputClass}`,
|
|
82514
|
-
placeholder,
|
|
82515
|
-
defaultValue,
|
|
82506
|
+
className: `${styles$t.input} ${labelVariant === "floating" ? styles$t.floatingInput : ""} ${inputClass}`,
|
|
82516
82507
|
...register2,
|
|
82517
82508
|
disabled: isDisabled
|
|
82518
82509
|
}), icon2]
|
|
@@ -86225,6 +86216,7 @@ const MetricFilters = ({
|
|
|
86225
86216
|
})
|
|
86226
86217
|
});
|
|
86227
86218
|
};
|
|
86219
|
+
var NoData = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e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TYtMTIuMzguMzktNC4xNi0xLjY4LTguNzktNS42Ny0xMC4zMSIvPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0ibTIyMy41MSwxMjAuMDhzLjQ5LDEuNjIuNTMsMS43My4zMiwyLjQ0LjMyLDIuNDRsLS4wNCwxLjkxLTEuMzgsNy4xMy0zLjM5LDE5LjMxLTIuODksMTUuOTItMi45NiwxNi43Ni0yLjQ0LDEzLjE2LS45MiwyLjY1LDQuOTgsNS4xNS44NS0yLjE1LjgxLTQuMDYsMS40OC04LjMzLDIuODItMTUuNzEsMi4xNS0xMi4xMSwxLjk0LTExLjM2LDIuNzUtMTQuNzUuODgtNC42OS4yOC0yLjU4LjA3LTIuMTItLjYtMi43NS0xLjI0LTIuMzYtMS4wOS0xLjU5LTIuMDEtMS4zMS0uOTItLjI4WiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSI4NS42OCAyMDMuOTMgMjA0LjU1IDIwMy44NCAyMDkuMzUgMjA4LjczIDE0OC40OCAyMDguODggOTAuOTUgMjA5LjAyIDg5LjUgMjA4LjY2IDg3Ljk4IDIwNy45MiA4Ni44MiAyMDYuNTggODYuMDEgMjA1LjAzIDg1LjY4IDIwMy45MyIvPjwvc3ZnPg==";
|
|
86228
86220
|
const MetricCard = ({
|
|
86229
86221
|
globalFilters = {
|
|
86230
86222
|
tableName: "",
|
|
@@ -86235,7 +86227,8 @@ const MetricCard = ({
|
|
|
86235
86227
|
client,
|
|
86236
86228
|
colors: colors2,
|
|
86237
86229
|
param,
|
|
86238
|
-
companyTenancyType
|
|
86230
|
+
companyTenancyType,
|
|
86231
|
+
renderHeaderName
|
|
86239
86232
|
}) => {
|
|
86240
86233
|
var _a2;
|
|
86241
86234
|
const filterValues2 = {};
|
|
@@ -86413,7 +86406,7 @@ const MetricCard = ({
|
|
|
86413
86406
|
variant: "h3",
|
|
86414
86407
|
styleClass: "primary",
|
|
86415
86408
|
className: styles$z.metricName,
|
|
86416
|
-
children: [metricItem.name, metricItem.description && /* @__PURE__ */ jsx("span", {
|
|
86409
|
+
children: [renderHeaderName ? renderHeaderName(metricItem.name) : metricItem.name, metricItem.description && /* @__PURE__ */ jsx("span", {
|
|
86417
86410
|
className: styles$z.metricDescription,
|
|
86418
86411
|
children: metricItem.description
|
|
86419
86412
|
})]
|
|
@@ -86435,7 +86428,7 @@ const MetricCard = ({
|
|
|
86435
86428
|
position: "bottom-right",
|
|
86436
86429
|
children: [/* @__PURE__ */ jsxs(Button, {
|
|
86437
86430
|
type: "button",
|
|
86438
|
-
variant: "
|
|
86431
|
+
variant: "custom",
|
|
86439
86432
|
className: styles$z.popupItem,
|
|
86440
86433
|
onClick: () => onMaximize({
|
|
86441
86434
|
labels: labels2,
|
|
@@ -86460,7 +86453,6 @@ const MetricCard = ({
|
|
|
86460
86453
|
data: dataDb,
|
|
86461
86454
|
fileName: metricItem.name,
|
|
86462
86455
|
className: `${styles$z.popupItem} ${styles$z.csvBtn}`,
|
|
86463
|
-
iconClass: styles$z.csvIcon,
|
|
86464
86456
|
text: "Save As CSV"
|
|
86465
86457
|
})]
|
|
86466
86458
|
})]
|
|
@@ -86469,7 +86461,18 @@ const MetricCard = ({
|
|
|
86469
86461
|
className: styles$z.metricData,
|
|
86470
86462
|
children: [!isQueryLoading && !dataDb.length ? /* @__PURE__ */ jsx("div", {
|
|
86471
86463
|
className: styles$z.noData,
|
|
86472
|
-
children:
|
|
86464
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
86465
|
+
className: styles$z.noDataContent,
|
|
86466
|
+
children: [/* @__PURE__ */ jsx("img", {
|
|
86467
|
+
src: NoData,
|
|
86468
|
+
alt: "",
|
|
86469
|
+
width: "300px",
|
|
86470
|
+
height: "300px"
|
|
86471
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
86472
|
+
className: styles$z.noDataText,
|
|
86473
|
+
children: "No Data Available"
|
|
86474
|
+
})]
|
|
86475
|
+
})
|
|
86473
86476
|
}) : null, isQueryLoading && /* @__PURE__ */ jsx("div", {
|
|
86474
86477
|
className: styles$z.loading,
|
|
86475
86478
|
children: /* @__PURE__ */ jsx(eosIconsLoading, {
|
|
@@ -86512,7 +86515,8 @@ const SingleValueCard = ({
|
|
|
86512
86515
|
metricItem,
|
|
86513
86516
|
client,
|
|
86514
86517
|
param,
|
|
86515
|
-
companyTenancyType
|
|
86518
|
+
companyTenancyType,
|
|
86519
|
+
renderHeaderName
|
|
86516
86520
|
}) => {
|
|
86517
86521
|
var _a2;
|
|
86518
86522
|
const filterValues2 = {};
|
|
@@ -86596,7 +86600,7 @@ const SingleValueCard = ({
|
|
|
86596
86600
|
variant: "h3",
|
|
86597
86601
|
styleClass: "primary",
|
|
86598
86602
|
className: styles$z.metricName,
|
|
86599
|
-
children: [metricItem.name, metricItem.description && /* @__PURE__ */ jsx("span", {
|
|
86603
|
+
children: [renderHeaderName ? renderHeaderName(metricItem.name) : metricItem.name, metricItem.description && /* @__PURE__ */ jsx("span", {
|
|
86600
86604
|
className: styles$z.metricDescription,
|
|
86601
86605
|
children: metricItem.description
|
|
86602
86606
|
})]
|
|
@@ -86625,7 +86629,21 @@ const SingleValueCard = ({
|
|
|
86625
86629
|
variant: "p",
|
|
86626
86630
|
className: styles$z.singleValue,
|
|
86627
86631
|
children: valueLength > 3 ? convertedValue : singleValueData2[0]
|
|
86628
|
-
}) :
|
|
86632
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
86633
|
+
className: styles$z.noData,
|
|
86634
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
86635
|
+
className: styles$z.noDataContent,
|
|
86636
|
+
children: [/* @__PURE__ */ jsx("img", {
|
|
86637
|
+
src: NoData,
|
|
86638
|
+
alt: "",
|
|
86639
|
+
width: "300px",
|
|
86640
|
+
height: "300px"
|
|
86641
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
86642
|
+
className: styles$z.noDataText,
|
|
86643
|
+
children: "No Data Available"
|
|
86644
|
+
})]
|
|
86645
|
+
})
|
|
86646
|
+
})
|
|
86629
86647
|
})
|
|
86630
86648
|
})]
|
|
86631
86649
|
})
|
|
@@ -87201,19 +87219,31 @@ const akarIconsInfo = (props) => /* @__PURE__ */ jsx("svg", {
|
|
|
87201
87219
|
})]
|
|
87202
87220
|
})
|
|
87203
87221
|
});
|
|
87204
|
-
const
|
|
87205
|
-
children: children2
|
|
87222
|
+
const Tooltip = ({
|
|
87223
|
+
children: children2,
|
|
87224
|
+
content: content2,
|
|
87225
|
+
className = ""
|
|
87206
87226
|
}) => {
|
|
87207
87227
|
return /* @__PURE__ */ jsxs("span", {
|
|
87208
|
-
className: styles$g.container
|
|
87209
|
-
children: [/* @__PURE__ */ jsx(
|
|
87210
|
-
color: "#182C60"
|
|
87211
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
87228
|
+
className: `${styles$g.container} ${className}`,
|
|
87229
|
+
children: [content2, /* @__PURE__ */ jsx("span", {
|
|
87212
87230
|
className: styles$g.tooltip,
|
|
87213
87231
|
children: children2
|
|
87214
87232
|
})]
|
|
87215
87233
|
});
|
|
87216
87234
|
};
|
|
87235
|
+
const InfoTooltip = ({
|
|
87236
|
+
children: children2,
|
|
87237
|
+
className
|
|
87238
|
+
}) => {
|
|
87239
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
87240
|
+
className,
|
|
87241
|
+
content: /* @__PURE__ */ jsx(akarIconsInfo, {
|
|
87242
|
+
color: "#182C60"
|
|
87243
|
+
}),
|
|
87244
|
+
children: children2
|
|
87245
|
+
});
|
|
87246
|
+
};
|
|
87217
87247
|
const ChartConfigure = ({
|
|
87218
87248
|
setMargins,
|
|
87219
87249
|
margins,
|
|
@@ -89028,8 +89058,10 @@ const MetricOutput = ({
|
|
|
89028
89058
|
updateGroup,
|
|
89029
89059
|
isEnableGroupBy,
|
|
89030
89060
|
backGroundColor,
|
|
89031
|
-
setBackGroundColor
|
|
89061
|
+
setBackGroundColor,
|
|
89062
|
+
moreTabs
|
|
89032
89063
|
}) => {
|
|
89064
|
+
var _a2;
|
|
89033
89065
|
const [selectedTab2, setSelectedTab] = useState(TABLE_TAB);
|
|
89034
89066
|
return /* @__PURE__ */ jsxs("div", {
|
|
89035
89067
|
className: styles$8["main-container"],
|
|
@@ -89047,7 +89079,13 @@ const MetricOutput = ({
|
|
|
89047
89079
|
className: `${styles$8.tabButton} ${selectedTab2 === CHART_TAB && styles$8.tabActive}`,
|
|
89048
89080
|
onClick: () => setSelectedTab(CHART_TAB),
|
|
89049
89081
|
children: [/* @__PURE__ */ jsx(phChartLineUpDuotone, {}), "Visualizations"]
|
|
89050
|
-
})
|
|
89082
|
+
}), moreTabs == null ? void 0 : moreTabs.map((tabObj) => /* @__PURE__ */ jsx(Button, {
|
|
89083
|
+
type: "button",
|
|
89084
|
+
variant: "custom",
|
|
89085
|
+
className: `${styles$8.tabButton} ${selectedTab2 === tabObj.name && styles$8.tabActive}`,
|
|
89086
|
+
onClick: () => setSelectedTab(tabObj.name),
|
|
89087
|
+
children: tabObj.tab
|
|
89088
|
+
}, tabObj.name))]
|
|
89051
89089
|
}), /* @__PURE__ */ jsxs("div", {
|
|
89052
89090
|
className: styles$8.wrapper,
|
|
89053
89091
|
children: [selectedTab2 === TABLE_TAB && /* @__PURE__ */ jsx(TableTab, {
|
|
@@ -89089,7 +89127,7 @@ const MetricOutput = ({
|
|
|
89089
89127
|
isLoading,
|
|
89090
89128
|
backGroundColor,
|
|
89091
89129
|
setBackGroundColor
|
|
89092
|
-
})]
|
|
89130
|
+
}), (_a2 = moreTabs == null ? void 0 : moreTabs.find((tabObj) => tabObj.name === selectedTab2)) == null ? void 0 : _a2.tabContent]
|
|
89093
89131
|
})]
|
|
89094
89132
|
});
|
|
89095
89133
|
};
|
|
@@ -89398,12 +89436,8 @@ const MetricForm = ({
|
|
|
89398
89436
|
variant: "h1",
|
|
89399
89437
|
styleClass: "custom",
|
|
89400
89438
|
className: styles$7["field-label"],
|
|
89401
|
-
children: ["Metric Creation", /* @__PURE__ */
|
|
89402
|
-
|
|
89403
|
-
children: [/* @__PURE__ */ jsx(akarIconsInfo, {}), /* @__PURE__ */ jsx("span", {
|
|
89404
|
-
className: styles$7.tooltip,
|
|
89405
|
-
children: "configure metric columns"
|
|
89406
|
-
})]
|
|
89439
|
+
children: ["Metric Creation", /* @__PURE__ */ jsx(InfoTooltip, {
|
|
89440
|
+
children: "configure metric columns"
|
|
89407
89441
|
})]
|
|
89408
89442
|
}), /* @__PURE__ */ jsx("div", {
|
|
89409
89443
|
className: styles$7["field-wrapper"],
|
|
@@ -89493,12 +89527,8 @@ const MetricForm = ({
|
|
|
89493
89527
|
variant: "h1",
|
|
89494
89528
|
styleClass: "custom",
|
|
89495
89529
|
className: styles$7["field-label"],
|
|
89496
|
-
children: ["Columns", /* @__PURE__ */
|
|
89497
|
-
|
|
89498
|
-
children: [/* @__PURE__ */ jsx(akarIconsInfo, {}), /* @__PURE__ */ jsx("span", {
|
|
89499
|
-
className: styles$7.tooltip,
|
|
89500
|
-
children: "select columns for raw records query"
|
|
89501
|
-
})]
|
|
89530
|
+
children: ["Columns", /* @__PURE__ */ jsx(InfoTooltip, {
|
|
89531
|
+
children: "select columns for raw records query"
|
|
89502
89532
|
})]
|
|
89503
89533
|
}), /* @__PURE__ */ jsx("div", {
|
|
89504
89534
|
className: styles$7["field-wrapper"],
|
|
@@ -90456,23 +90486,25 @@ const EmbeddedMetricCreation = ({
|
|
|
90456
90486
|
})]
|
|
90457
90487
|
});
|
|
90458
90488
|
};
|
|
90459
|
-
const container$1 = "
|
|
90460
|
-
const form = "
|
|
90461
|
-
const filterHeader = "
|
|
90462
|
-
const
|
|
90463
|
-
const
|
|
90464
|
-
const
|
|
90465
|
-
const
|
|
90466
|
-
const
|
|
90467
|
-
const
|
|
90468
|
-
const
|
|
90469
|
-
const
|
|
90470
|
-
const
|
|
90471
|
-
const
|
|
90489
|
+
const container$1 = "_container_i4dx9_1";
|
|
90490
|
+
const form = "_form_i4dx9_7";
|
|
90491
|
+
const filterHeader = "_filterHeader_i4dx9_13";
|
|
90492
|
+
const titleContent = "_titleContent_i4dx9_19";
|
|
90493
|
+
const title = "_title_i4dx9_19";
|
|
90494
|
+
const buttons = "_buttons_i4dx9_31";
|
|
90495
|
+
const apply = "_apply_i4dx9_37";
|
|
90496
|
+
const applyIcon = "_applyIcon_i4dx9_43";
|
|
90497
|
+
const reset = "_reset_i4dx9_49";
|
|
90498
|
+
const filterFields = "_filterFields_i4dx9_55";
|
|
90499
|
+
const filters = "_filters_i4dx9_61";
|
|
90500
|
+
const filterItem = "_filterItem_i4dx9_67";
|
|
90501
|
+
const filterItemOperator = "_filterItemOperator_i4dx9_73";
|
|
90502
|
+
const remove = "_remove_i4dx9_79";
|
|
90472
90503
|
var styles$2 = {
|
|
90473
90504
|
container: container$1,
|
|
90474
90505
|
form,
|
|
90475
90506
|
filterHeader,
|
|
90507
|
+
titleContent,
|
|
90476
90508
|
title,
|
|
90477
90509
|
buttons,
|
|
90478
90510
|
apply,
|
|
@@ -90764,7 +90796,8 @@ const getFormattedFilterValue = (obj) => {
|
|
|
90764
90796
|
const GlobalFilters = ({
|
|
90765
90797
|
filters: filters2,
|
|
90766
90798
|
onApply,
|
|
90767
|
-
companyId
|
|
90799
|
+
companyId,
|
|
90800
|
+
renderAdditionalHeaderContent
|
|
90768
90801
|
}) => {
|
|
90769
90802
|
const [appliedfilters, setAppliedFilters] = useState([]);
|
|
90770
90803
|
const resetFilters = () => {
|
|
@@ -90807,11 +90840,14 @@ const GlobalFilters = ({
|
|
|
90807
90840
|
onReset: resetFilters,
|
|
90808
90841
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
90809
90842
|
className: styles$2.filterHeader,
|
|
90810
|
-
children: [/* @__PURE__ */
|
|
90811
|
-
|
|
90812
|
-
|
|
90813
|
-
|
|
90814
|
-
|
|
90843
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
90844
|
+
className: styles$2.titleContent,
|
|
90845
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
90846
|
+
variant: "p",
|
|
90847
|
+
styleClass: "primary",
|
|
90848
|
+
className: styles$2.title,
|
|
90849
|
+
children: "Filters:"
|
|
90850
|
+
}), renderAdditionalHeaderContent ? renderAdditionalHeaderContent() : null]
|
|
90815
90851
|
}), /* @__PURE__ */ jsxs("div", {
|
|
90816
90852
|
className: styles$2.buttons,
|
|
90817
90853
|
children: [/* @__PURE__ */ jsxs(Button, {
|
|
@@ -91112,6 +91148,7 @@ var index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
91112
91148
|
isNullFilterOperator,
|
|
91113
91149
|
FilterField,
|
|
91114
91150
|
GlobalFilters,
|
|
91151
|
+
Tooltip,
|
|
91115
91152
|
InfoTooltip,
|
|
91116
91153
|
InputField,
|
|
91117
91154
|
CsvDownloadButton,
|