@databrainhq/plugin 0.9.4 → 0.9.5
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/README.md +26 -26
- package/dist/components/MetricList/components/DownloadRawCsvModal.d.ts +11 -0
- package/dist/components/MetricList/components/MetricCard.d.ts +2 -0
- package/dist/components/MetricList/components/TableViewModal.d.ts +9 -0
- package/dist/components/MetricList/index.d.ts +2 -0
- package/dist/consts/app.d.ts +1 -0
- package/dist/helpers/timesAgo.d.ts +2 -0
- package/dist/hooks/useDownloadRawCsv.d.ts +22 -4
- package/dist/index.es.js +766 -507
- package/dist/index.umd.js +146 -125
- package/dist/style.css +1 -1
- package/dist/typings.d.ts +17 -17
- package/dist/utils/generated/graphql.d.ts +383 -1
- package/package.json +96 -96
package/dist/index.es.js
CHANGED
|
@@ -2647,17 +2647,17 @@ var classnames$1 = { exports: {} };
|
|
|
2647
2647
|
})(classnames$1);
|
|
2648
2648
|
var classnames = classnames$1.exports;
|
|
2649
2649
|
var styles$K = {
|
|
2650
|
-
"btn-primary": "_btn-
|
|
2651
|
-
"btn-secondary": "_btn-
|
|
2652
|
-
"btn-reject": "_btn-
|
|
2653
|
-
"btn-outlined": "_btn-
|
|
2654
|
-
"btn-tertiary": "_btn-
|
|
2655
|
-
"btn-default": "_btn-
|
|
2656
|
-
"btn-large": "_btn-
|
|
2657
|
-
"btn-small": "_btn-
|
|
2658
|
-
"btn-xs": "_btn-
|
|
2659
|
-
"btn-medium": "_btn-
|
|
2660
|
-
"btn-11rem": "_btn-
|
|
2650
|
+
"btn-primary": "_btn-primary_u81u9_1",
|
|
2651
|
+
"btn-secondary": "_btn-secondary_u81u9_9",
|
|
2652
|
+
"btn-reject": "_btn-reject_u81u9_17",
|
|
2653
|
+
"btn-outlined": "_btn-outlined_u81u9_27",
|
|
2654
|
+
"btn-tertiary": "_btn-tertiary_u81u9_35",
|
|
2655
|
+
"btn-default": "_btn-default_u81u9_43",
|
|
2656
|
+
"btn-large": "_btn-large_u81u9_49",
|
|
2657
|
+
"btn-small": "_btn-small_u81u9_55",
|
|
2658
|
+
"btn-xs": "_btn-xs_u81u9_61",
|
|
2659
|
+
"btn-medium": "_btn-medium_u81u9_67",
|
|
2660
|
+
"btn-11rem": "_btn-11rem_u81u9_75"
|
|
2661
2661
|
};
|
|
2662
2662
|
var jsxRuntime$1 = { exports: {} };
|
|
2663
2663
|
var reactJsxRuntime_production_min = {};
|
|
@@ -4952,42 +4952,42 @@ let xe = "div", ne = S.RenderStrategy, re = C$2(function(e2, s2) {
|
|
|
4952
4952
|
let n2 = useContext(F) !== null, m2 = s() !== null;
|
|
4953
4953
|
return React__default.createElement(React__default.Fragment, null, !n2 && m2 ? React__default.createElement(q, { ref: s$12, ...e2 }) : React__default.createElement(re, { ref: s$12, ...e2 }));
|
|
4954
4954
|
}), We = Object.assign(q, { Child: Pe, Root: q });
|
|
4955
|
-
const listBoxButton = "
|
|
4956
|
-
const selectedOptionText = "
|
|
4957
|
-
const transitionDiv = "
|
|
4958
|
-
const listboxButtonWrapper = "
|
|
4959
|
-
const arrowicon = "
|
|
4960
|
-
const leave$2 = "
|
|
4961
|
-
const leaveFrom$2 = "
|
|
4962
|
-
const leaveTo$2 = "
|
|
4963
|
-
const notAvailable = "
|
|
4964
|
-
const option$1 = "
|
|
4965
|
-
const activeOption = "
|
|
4966
|
-
const optionSelected = "
|
|
4967
|
-
const inactiveOption = "
|
|
4968
|
-
const optionLabel = "
|
|
4969
|
-
const optionSubLabel = "
|
|
4970
|
-
const selectedLabel = "
|
|
4971
|
-
const nonselectedLabel = "
|
|
4972
|
-
const check = "
|
|
4973
|
-
const checkActive = "
|
|
4974
|
-
const checkInactive = "
|
|
4975
|
-
const checkIcon$1 = "
|
|
4976
|
-
const checkIconSelected = "
|
|
4977
|
-
const checkIconUnselected = "
|
|
4978
|
-
const loadMore$1 = "
|
|
4979
|
-
const loadMoreIcon$1 = "
|
|
4980
|
-
const selectedList = "
|
|
4981
|
-
const selectedListItem = "
|
|
4982
|
-
const label$7 = "
|
|
4983
|
-
const clientText$1 = "
|
|
4955
|
+
const listBoxButton = "_listBoxButton_ln4ru_17";
|
|
4956
|
+
const selectedOptionText = "_selectedOptionText_ln4ru_49";
|
|
4957
|
+
const transitionDiv = "_transitionDiv_ln4ru_57";
|
|
4958
|
+
const listboxButtonWrapper = "_listboxButtonWrapper_ln4ru_65";
|
|
4959
|
+
const arrowicon = "_arrowicon_ln4ru_71";
|
|
4960
|
+
const leave$2 = "_leave_ln4ru_77";
|
|
4961
|
+
const leaveFrom$2 = "_leaveFrom_ln4ru_83";
|
|
4962
|
+
const leaveTo$2 = "_leaveTo_ln4ru_89";
|
|
4963
|
+
const notAvailable = "_notAvailable_ln4ru_95";
|
|
4964
|
+
const option$1 = "_option_ln4ru_101";
|
|
4965
|
+
const activeOption = "_activeOption_ln4ru_107";
|
|
4966
|
+
const optionSelected = "_optionSelected_ln4ru_113";
|
|
4967
|
+
const inactiveOption = "_inactiveOption_ln4ru_119";
|
|
4968
|
+
const optionLabel = "_optionLabel_ln4ru_125";
|
|
4969
|
+
const optionSubLabel = "_optionSubLabel_ln4ru_131";
|
|
4970
|
+
const selectedLabel = "_selectedLabel_ln4ru_137";
|
|
4971
|
+
const nonselectedLabel = "_nonselectedLabel_ln4ru_143";
|
|
4972
|
+
const check = "_check_ln4ru_149";
|
|
4973
|
+
const checkActive = "_checkActive_ln4ru_155";
|
|
4974
|
+
const checkInactive = "_checkInactive_ln4ru_161";
|
|
4975
|
+
const checkIcon$1 = "_checkIcon_ln4ru_167";
|
|
4976
|
+
const checkIconSelected = "_checkIconSelected_ln4ru_173";
|
|
4977
|
+
const checkIconUnselected = "_checkIconUnselected_ln4ru_179";
|
|
4978
|
+
const loadMore$1 = "_loadMore_ln4ru_185";
|
|
4979
|
+
const loadMoreIcon$1 = "_loadMoreIcon_ln4ru_191";
|
|
4980
|
+
const selectedList = "_selectedList_ln4ru_197";
|
|
4981
|
+
const selectedListItem = "_selectedListItem_ln4ru_203";
|
|
4982
|
+
const label$7 = "_label_ln4ru_209";
|
|
4983
|
+
const clientText$1 = "_clientText_ln4ru_215";
|
|
4984
4984
|
var style = {
|
|
4985
|
-
"listBox-label": "_listBox-
|
|
4986
|
-
"listBox-labelFloating": "_listBox-
|
|
4987
|
-
"listBoxButton-container": "_listBoxButton-
|
|
4988
|
-
"listBoxButton-containerFloating": "_listBoxButton-
|
|
4985
|
+
"listBox-label": "_listBox-label_ln4ru_1",
|
|
4986
|
+
"listBox-labelFloating": "_listBox-labelFloating_ln4ru_9",
|
|
4987
|
+
"listBoxButton-container": "_listBoxButton-container_ln4ru_17",
|
|
4988
|
+
"listBoxButton-containerFloating": "_listBoxButton-containerFloating_ln4ru_25",
|
|
4989
4989
|
listBoxButton,
|
|
4990
|
-
"listBox-option": "_listBox-
|
|
4990
|
+
"listBox-option": "_listBox-option_ln4ru_41",
|
|
4991
4991
|
selectedOptionText,
|
|
4992
4992
|
transitionDiv,
|
|
4993
4993
|
listboxButtonWrapper,
|
|
@@ -5017,22 +5017,22 @@ var style = {
|
|
|
5017
5017
|
label: label$7,
|
|
5018
5018
|
clientText: clientText$1
|
|
5019
5019
|
};
|
|
5020
|
-
const primary$1 = "
|
|
5021
|
-
const secondary = "
|
|
5022
|
-
const tertiary = "
|
|
5020
|
+
const primary$1 = "_primary_1ipyg_1";
|
|
5021
|
+
const secondary = "_secondary_1ipyg_9";
|
|
5022
|
+
const tertiary = "_tertiary_1ipyg_19";
|
|
5023
5023
|
var styles$I = {
|
|
5024
5024
|
primary: primary$1,
|
|
5025
5025
|
secondary,
|
|
5026
5026
|
tertiary,
|
|
5027
|
-
"font-18": "_font-
|
|
5028
|
-
"font-20": "_font-
|
|
5029
|
-
"font-14": "_font-
|
|
5030
|
-
"font-14a": "_font-
|
|
5031
|
-
"font-14b": "_font-
|
|
5032
|
-
"font-14c": "_font-
|
|
5033
|
-
"font-14d": "_font-
|
|
5034
|
-
"font-15": "_font-
|
|
5035
|
-
"font-34": "_font-
|
|
5027
|
+
"font-18": "_font-18_1ipyg_27",
|
|
5028
|
+
"font-20": "_font-20_1ipyg_35",
|
|
5029
|
+
"font-14": "_font-14_1ipyg_43",
|
|
5030
|
+
"font-14a": "_font-14a_1ipyg_51",
|
|
5031
|
+
"font-14b": "_font-14b_1ipyg_59",
|
|
5032
|
+
"font-14c": "_font-14c_1ipyg_67",
|
|
5033
|
+
"font-14d": "_font-14d_1ipyg_75",
|
|
5034
|
+
"font-15": "_font-15_1ipyg_83",
|
|
5035
|
+
"font-34": "_font-34_1ipyg_89"
|
|
5036
5036
|
};
|
|
5037
5037
|
const variants = {
|
|
5038
5038
|
h1: "h1",
|
|
@@ -5060,10 +5060,10 @@ const Text = ({
|
|
|
5060
5060
|
children: children2
|
|
5061
5061
|
});
|
|
5062
5062
|
};
|
|
5063
|
-
const search$1 = "
|
|
5063
|
+
const search$1 = "_search_qirxg_1";
|
|
5064
5064
|
var styles$H = {
|
|
5065
|
-
"searchTab-container": "_searchTab-
|
|
5066
|
-
"searchTab-input": "_searchTab-
|
|
5065
|
+
"searchTab-container": "_searchTab-container_qirxg_1",
|
|
5066
|
+
"searchTab-input": "_searchTab-input_qirxg_9",
|
|
5067
5067
|
search: search$1
|
|
5068
5068
|
};
|
|
5069
5069
|
const iconoirSearch = (props) => /* @__PURE__ */ jsx("svg", {
|
|
@@ -5615,6 +5615,7 @@ const FREQUENCY = [
|
|
|
5615
5615
|
{ value: "Weekly", label: "Weekly" },
|
|
5616
5616
|
{ value: "Monthly", label: "Monthly" }
|
|
5617
5617
|
];
|
|
5618
|
+
const RAW_CSV_OPTIONS = ["download", "email"];
|
|
5618
5619
|
const ChartConfig = ({
|
|
5619
5620
|
data,
|
|
5620
5621
|
setXAxis,
|
|
@@ -6909,6 +6910,24 @@ const useExternalDashboardListQuery = (variables, options2) => useQuery(
|
|
|
6909
6910
|
fetcher(ExternalDashboardListDocument, variables),
|
|
6910
6911
|
options2
|
|
6911
6912
|
);
|
|
6913
|
+
const ExternalMetricRawCsvUrlsDocument = `
|
|
6914
|
+
query ExternalMetricRawCsvUrls($externalMetricId: uuid = "") {
|
|
6915
|
+
externalMetricRawCsvUrls(where: {externalMetricId: {_eq: $externalMetricId}}) {
|
|
6916
|
+
configurations
|
|
6917
|
+
error
|
|
6918
|
+
expireUrlIn
|
|
6919
|
+
externalMetricId
|
|
6920
|
+
id
|
|
6921
|
+
lastUpdatedAt
|
|
6922
|
+
urls
|
|
6923
|
+
}
|
|
6924
|
+
}
|
|
6925
|
+
`;
|
|
6926
|
+
const useExternalMetricRawCsvUrlsQuery = (variables, options2) => useQuery(
|
|
6927
|
+
variables === void 0 ? ["ExternalMetricRawCsvUrls"] : ["ExternalMetricRawCsvUrls", variables],
|
|
6928
|
+
fetcher(ExternalMetricRawCsvUrlsDocument, variables),
|
|
6929
|
+
options2
|
|
6930
|
+
);
|
|
6912
6931
|
const GuestTokenParamsDocument = `
|
|
6913
6932
|
query GuestTokenParams($id: uuid = "") {
|
|
6914
6933
|
guestTokens_by_pk(id: $id) {
|
|
@@ -7002,6 +7021,21 @@ const useUnderlyingDataMutation = (options2) => useMutation(
|
|
|
7002
7021
|
(variables) => fetcher(UnderlyingDataDocument, variables)(),
|
|
7003
7022
|
options2
|
|
7004
7023
|
);
|
|
7024
|
+
const InvokeSaveRawCsvDetailsDocument = `
|
|
7025
|
+
mutation InvokeSaveRawCsvDetails($configurations: json = "", $expireCsvFileAt: String = "", $externalMetricId: String = "", $integrationId: String = "", $integrationName: String = "", $query: String = "", $expireUrlIn: Int = 60) {
|
|
7026
|
+
invokeSaveRawCsvDetails(
|
|
7027
|
+
input: {configurations: $configurations, expireCsvFileAt: $expireCsvFileAt, externalMetricId: $externalMetricId, integrationId: $integrationId, integrationName: $integrationName, query: $query, expireUrlIn: $expireUrlIn}
|
|
7028
|
+
) {
|
|
7029
|
+
error
|
|
7030
|
+
statusCode
|
|
7031
|
+
}
|
|
7032
|
+
}
|
|
7033
|
+
`;
|
|
7034
|
+
const useInvokeSaveRawCsvDetailsMutation = (options2) => useMutation(
|
|
7035
|
+
["InvokeSaveRawCsvDetails"],
|
|
7036
|
+
(variables) => fetcher(InvokeSaveRawCsvDetailsDocument, variables)(),
|
|
7037
|
+
options2
|
|
7038
|
+
);
|
|
7005
7039
|
const MarkArchiveMetricDocument = `
|
|
7006
7040
|
mutation MarkArchiveMetric($id: uuid! = "", $clientId: String! = "") {
|
|
7007
7041
|
insert_clientDeletedMetrics_one(
|
|
@@ -7287,22 +7321,22 @@ const ExternalMetricForm = ({
|
|
|
7287
7321
|
})]
|
|
7288
7322
|
});
|
|
7289
7323
|
};
|
|
7290
|
-
const container$d = "
|
|
7291
|
-
const wrapper$3 = "
|
|
7292
|
-
const label$3 = "
|
|
7293
|
-
const floatingLabel = "
|
|
7294
|
-
const floatingText = "
|
|
7295
|
-
const clientText = "
|
|
7296
|
-
const normalText = "
|
|
7297
|
-
const dropdown$1 = "
|
|
7298
|
-
const options = "
|
|
7299
|
-
const checkedOption = "
|
|
7300
|
-
const option = "
|
|
7301
|
-
const icon$1 = "
|
|
7302
|
-
const text$2 = "
|
|
7303
|
-
const search = "
|
|
7304
|
-
const loadMore = "
|
|
7305
|
-
const loadMoreIcon = "
|
|
7324
|
+
const container$d = "_container_1brv3_1";
|
|
7325
|
+
const wrapper$3 = "_wrapper_1brv3_9";
|
|
7326
|
+
const label$3 = "_label_1brv3_17";
|
|
7327
|
+
const floatingLabel = "_floatingLabel_1brv3_25";
|
|
7328
|
+
const floatingText = "_floatingText_1brv3_31";
|
|
7329
|
+
const clientText = "_clientText_1brv3_39";
|
|
7330
|
+
const normalText = "_normalText_1brv3_47";
|
|
7331
|
+
const dropdown$1 = "_dropdown_1brv3_55";
|
|
7332
|
+
const options = "_options_1brv3_63";
|
|
7333
|
+
const checkedOption = "_checkedOption_1brv3_71";
|
|
7334
|
+
const option = "_option_1brv3_63";
|
|
7335
|
+
const icon$1 = "_icon_1brv3_87";
|
|
7336
|
+
const text$2 = "_text_1brv3_95";
|
|
7337
|
+
const search = "_search_1brv3_103";
|
|
7338
|
+
const loadMore = "_loadMore_1brv3_111";
|
|
7339
|
+
const loadMoreIcon = "_loadMoreIcon_1brv3_119";
|
|
7306
7340
|
var styles$y = {
|
|
7307
7341
|
container: container$d,
|
|
7308
7342
|
wrapper: wrapper$3,
|
|
@@ -7892,6 +7926,7 @@ var index$5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
7892
7926
|
TIME,
|
|
7893
7927
|
DATE_NUM,
|
|
7894
7928
|
FREQUENCY,
|
|
7929
|
+
RAW_CSV_OPTIONS,
|
|
7895
7930
|
operatorList,
|
|
7896
7931
|
RowLimitList,
|
|
7897
7932
|
AggregateList,
|
|
@@ -8289,9 +8324,9 @@ const MultiFilterDropdown = React__default.memo(({
|
|
|
8289
8324
|
...rest
|
|
8290
8325
|
});
|
|
8291
8326
|
});
|
|
8292
|
-
const fullscreen$
|
|
8327
|
+
const fullscreen$3 = "_fullscreen_1wo1t_1";
|
|
8293
8328
|
var styles$x = {
|
|
8294
|
-
fullscreen: fullscreen$
|
|
8329
|
+
fullscreen: fullscreen$3
|
|
8295
8330
|
};
|
|
8296
8331
|
const csvlink = "_csvlink_azd6y_1";
|
|
8297
8332
|
const noChart = "_noChart_azd6y_7";
|
|
@@ -81644,7 +81679,7 @@ const SingleValueChart = ({
|
|
|
81644
81679
|
chartClickConfig,
|
|
81645
81680
|
hideBorder
|
|
81646
81681
|
}) => {
|
|
81647
|
-
var _a2, _b2
|
|
81682
|
+
var _a2, _b2;
|
|
81648
81683
|
const subHeaderFont = {
|
|
81649
81684
|
fontSize: `${customSettings.subHeaderFontSize || 14}px`
|
|
81650
81685
|
};
|
|
@@ -81856,38 +81891,7 @@ const SingleValueChart = ({
|
|
|
81856
81891
|
return val;
|
|
81857
81892
|
}
|
|
81858
81893
|
};
|
|
81859
|
-
const
|
|
81860
|
-
const year = val.toString().slice(0, 4);
|
|
81861
|
-
const month = val.toString().slice(5, 7);
|
|
81862
|
-
const date = val.toString().slice(8, 10);
|
|
81863
|
-
const time2 = val.toString().slice(11, 19);
|
|
81864
|
-
switch (formatter) {
|
|
81865
|
-
case "dd-mm-yyyy": {
|
|
81866
|
-
return `${date}-${month}-${year}`;
|
|
81867
|
-
}
|
|
81868
|
-
case "mm-dd-yyyy": {
|
|
81869
|
-
return `${month}-${date}-${year}`;
|
|
81870
|
-
}
|
|
81871
|
-
case "yyyy-mm-dd": {
|
|
81872
|
-
return `${year}-${month}-${date}`;
|
|
81873
|
-
}
|
|
81874
|
-
case "dd/mm/yyyy": {
|
|
81875
|
-
return `${date}/${month}/${year}`;
|
|
81876
|
-
}
|
|
81877
|
-
case "mm/dd/yyyy": {
|
|
81878
|
-
return `${month}/${date}/${year}`;
|
|
81879
|
-
}
|
|
81880
|
-
case "yyyy/mm/dd": {
|
|
81881
|
-
return `${year}/${month}/${date}`;
|
|
81882
|
-
}
|
|
81883
|
-
case "hh:mm:ss": {
|
|
81884
|
-
return time2;
|
|
81885
|
-
}
|
|
81886
|
-
default:
|
|
81887
|
-
return val;
|
|
81888
|
-
}
|
|
81889
|
-
};
|
|
81890
|
-
const value = ((_a2 = data[0]) == null ? void 0 : _a2.value) && (Number((_b2 = data[0]) == null ? void 0 : _b2.value) || 0).toString().length > 16 ? dateFormatter(Number((_c2 = data[0]) == null ? void 0 : _c2.value) || 0, customSettings.dateFormatter) : formattedData(Number((_d = data[0]) == null ? void 0 : _d.value) || 0, customSettings.numberFormatter);
|
|
81894
|
+
const value = ((_a2 = data[0]) == null ? void 0 : _a2.value) && formattedData(Number((_b2 = data[0]) == null ? void 0 : _b2.value) || 0, customSettings.numberFormatter);
|
|
81891
81895
|
return /* @__PURE__ */ jsxs("div", {
|
|
81892
81896
|
className: hideBorder ? styles$v.borderLessContainer : styles$v.container,
|
|
81893
81897
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -86785,12 +86789,12 @@ const InfoTooltip = ({
|
|
|
86785
86789
|
});
|
|
86786
86790
|
};
|
|
86787
86791
|
var styles$p = {
|
|
86788
|
-
"header-container": "_header-
|
|
86789
|
-
"btn-container": "_btn-
|
|
86790
|
-
"back-btn": "_back-
|
|
86791
|
-
"sql-btn": "_sql-
|
|
86792
|
-
"save-btn": "_save-
|
|
86793
|
-
"save-btn-icon": "_save-btn-
|
|
86792
|
+
"header-container": "_header-container_1pbz4_1",
|
|
86793
|
+
"btn-container": "_btn-container_1pbz4_9",
|
|
86794
|
+
"back-btn": "_back-btn_1pbz4_17",
|
|
86795
|
+
"sql-btn": "_sql-btn_1pbz4_25",
|
|
86796
|
+
"save-btn": "_save-btn_1pbz4_33",
|
|
86797
|
+
"save-btn-icon": "_save-btn-icon_1pbz4_41"
|
|
86794
86798
|
};
|
|
86795
86799
|
const Header = ({
|
|
86796
86800
|
setShowMetricCreateModal,
|
|
@@ -86843,20 +86847,20 @@ const Header = ({
|
|
|
86843
86847
|
});
|
|
86844
86848
|
};
|
|
86845
86849
|
var styles$o = {
|
|
86846
|
-
"create-btn": "_create-
|
|
86847
|
-
"modal-container": "_modal-
|
|
86848
|
-
"query-modal": "_query-
|
|
86850
|
+
"create-btn": "_create-btn_zxqu9_1",
|
|
86851
|
+
"modal-container": "_modal-container_zxqu9_9",
|
|
86852
|
+
"query-modal": "_query-modal_zxqu9_17"
|
|
86849
86853
|
};
|
|
86850
|
-
const container$7 = "
|
|
86851
|
-
const header$3 = "
|
|
86852
|
-
const wrapper$2 = "
|
|
86853
|
-
const column = "
|
|
86854
|
-
const columnText$1 = "
|
|
86854
|
+
const container$7 = "_container_u2z1d_1";
|
|
86855
|
+
const header$3 = "_header_u2z1d_9";
|
|
86856
|
+
const wrapper$2 = "_wrapper_u2z1d_17";
|
|
86857
|
+
const column = "_column_u2z1d_33";
|
|
86858
|
+
const columnText$1 = "_columnText_u2z1d_41";
|
|
86855
86859
|
var styles$n = {
|
|
86856
86860
|
container: container$7,
|
|
86857
86861
|
header: header$3,
|
|
86858
86862
|
wrapper: wrapper$2,
|
|
86859
|
-
"col-container": "_col-
|
|
86863
|
+
"col-container": "_col-container_u2z1d_25",
|
|
86860
86864
|
column,
|
|
86861
86865
|
columnText: columnText$1
|
|
86862
86866
|
};
|
|
@@ -87668,47 +87672,6 @@ const ChartConfigure = ({
|
|
|
87668
87672
|
value: customSettings.subHeaderFontSize
|
|
87669
87673
|
})]
|
|
87670
87674
|
})]
|
|
87671
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
87672
|
-
className: styles$m.seriesWrapper,
|
|
87673
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
87674
|
-
variant: "h1",
|
|
87675
|
-
styleClass: "primary",
|
|
87676
|
-
children: "Date formatting"
|
|
87677
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
87678
|
-
className: styles$m.valueLabelWrapper,
|
|
87679
|
-
children: /* @__PURE__ */ jsx(Select, {
|
|
87680
|
-
value: customSettings.dateFormatter,
|
|
87681
|
-
options: [{
|
|
87682
|
-
label: "None",
|
|
87683
|
-
value: "none"
|
|
87684
|
-
}, {
|
|
87685
|
-
label: "dd-mm-yyyy",
|
|
87686
|
-
value: "dd-mm-yyyy"
|
|
87687
|
-
}, {
|
|
87688
|
-
label: "mm-dd-yyyy",
|
|
87689
|
-
value: "mm-dd-yyyy"
|
|
87690
|
-
}, {
|
|
87691
|
-
label: "yyyy-mm-dd",
|
|
87692
|
-
value: "yyyy-mm-dd"
|
|
87693
|
-
}, {
|
|
87694
|
-
label: "dd/mm/yyyy",
|
|
87695
|
-
value: "dd/mm/yyyy"
|
|
87696
|
-
}, {
|
|
87697
|
-
label: "mm/dd/yyyy",
|
|
87698
|
-
value: "mm/dd/yyyy"
|
|
87699
|
-
}, {
|
|
87700
|
-
label: "yyyy/mm/dd",
|
|
87701
|
-
value: "yyyy/mm/dd"
|
|
87702
|
-
}, {
|
|
87703
|
-
label: "hh:mm:ss",
|
|
87704
|
-
value: "hh:mm:ss"
|
|
87705
|
-
}],
|
|
87706
|
-
onChange: (value) => setCustomSettings((s2) => ({
|
|
87707
|
-
...s2,
|
|
87708
|
-
dateFormatter: value
|
|
87709
|
-
}))
|
|
87710
|
-
})
|
|
87711
|
-
})]
|
|
87712
87675
|
}), /* @__PURE__ */ jsxs("div", {
|
|
87713
87676
|
className: styles$m.seriesWrapper,
|
|
87714
87677
|
children: [/* @__PURE__ */ jsx(Text, {
|
|
@@ -88274,10 +88237,10 @@ const ChartTab = ({
|
|
|
88274
88237
|
})]
|
|
88275
88238
|
});
|
|
88276
88239
|
};
|
|
88277
|
-
const container$5 = "
|
|
88278
|
-
const wrapper$1 = "
|
|
88279
|
-
const text = "
|
|
88280
|
-
const table$2 = "
|
|
88240
|
+
const container$5 = "_container_wjdaz_1";
|
|
88241
|
+
const wrapper$1 = "_wrapper_wjdaz_9";
|
|
88242
|
+
const text = "_text_wjdaz_17";
|
|
88243
|
+
const table$2 = "_table_wjdaz_23";
|
|
88281
88244
|
var styles$i = {
|
|
88282
88245
|
container: container$5,
|
|
88283
88246
|
wrapper: wrapper$1,
|
|
@@ -88310,16 +88273,16 @@ const InputTables = ({
|
|
|
88310
88273
|
})
|
|
88311
88274
|
});
|
|
88312
88275
|
};
|
|
88313
|
-
const container$4 = "
|
|
88314
|
-
const header$1 = "
|
|
88315
|
-
const tabButton$1 = "
|
|
88316
|
-
const selectedTab = "
|
|
88317
|
-
const table$1 = "
|
|
88276
|
+
const container$4 = "_container_127xg_1";
|
|
88277
|
+
const header$1 = "_header_127xg_9";
|
|
88278
|
+
const tabButton$1 = "_tabButton_127xg_31";
|
|
88279
|
+
const selectedTab = "_selectedTab_127xg_37";
|
|
88280
|
+
const table$1 = "_table_127xg_43";
|
|
88318
88281
|
var styles$h = {
|
|
88319
88282
|
container: container$4,
|
|
88320
88283
|
header: header$1,
|
|
88321
|
-
"text-container": "_text-
|
|
88322
|
-
"btn-container": "_btn-
|
|
88284
|
+
"text-container": "_text-container_127xg_17",
|
|
88285
|
+
"btn-container": "_btn-container_127xg_25",
|
|
88323
88286
|
tabButton: tabButton$1,
|
|
88324
88287
|
selectedTab,
|
|
88325
88288
|
table: table$1
|
|
@@ -88400,18 +88363,18 @@ const TableTab = ({
|
|
|
88400
88363
|
})]
|
|
88401
88364
|
});
|
|
88402
88365
|
};
|
|
88403
|
-
const mainContainerUpdate = "
|
|
88404
|
-
const wrapper = "
|
|
88405
|
-
const updateWrapper = "
|
|
88406
|
-
const updateWrapperContent = "
|
|
88407
|
-
const createWrapperContent = "
|
|
88408
|
-
const searchCommand = "
|
|
88409
|
-
const tabButton = "
|
|
88410
|
-
const tabActive = "
|
|
88366
|
+
const mainContainerUpdate = "_mainContainerUpdate_z1gwh_7";
|
|
88367
|
+
const wrapper = "_wrapper_z1gwh_23";
|
|
88368
|
+
const updateWrapper = "_updateWrapper_z1gwh_29";
|
|
88369
|
+
const updateWrapperContent = "_updateWrapperContent_z1gwh_35";
|
|
88370
|
+
const createWrapperContent = "_createWrapperContent_z1gwh_41";
|
|
88371
|
+
const searchCommand = "_searchCommand_z1gwh_47";
|
|
88372
|
+
const tabButton = "_tabButton_z1gwh_53";
|
|
88373
|
+
const tabActive = "_tabActive_z1gwh_59";
|
|
88411
88374
|
var styles$g = {
|
|
88412
|
-
"main-container": "_main-
|
|
88375
|
+
"main-container": "_main-container_z1gwh_1",
|
|
88413
88376
|
mainContainerUpdate,
|
|
88414
|
-
"outputTab-header": "_outputTab-
|
|
88377
|
+
"outputTab-header": "_outputTab-header_z1gwh_15",
|
|
88415
88378
|
wrapper,
|
|
88416
88379
|
updateWrapper,
|
|
88417
88380
|
updateWrapperContent,
|
|
@@ -88549,30 +88512,30 @@ const MetricOutput = ({
|
|
|
88549
88512
|
})]
|
|
88550
88513
|
});
|
|
88551
88514
|
};
|
|
88552
|
-
const fieldValueIcon = "
|
|
88553
|
-
const fieldAddBtnIcon = "
|
|
88554
|
-
const group = "
|
|
88555
|
-
const tooltipWrapper = "
|
|
88556
|
-
const tooltip = "
|
|
88557
|
-
const dropdown = "
|
|
88558
|
-
const filterDropdown = "
|
|
88559
|
-
const filterValues = "
|
|
88560
|
-
const columnText = "
|
|
88561
|
-
const disabled = "
|
|
88562
|
-
const checkIcon = "
|
|
88563
|
-
const generateButton = "
|
|
88515
|
+
const fieldValueIcon = "_fieldValueIcon_107sf_49";
|
|
88516
|
+
const fieldAddBtnIcon = "_fieldAddBtnIcon_107sf_65";
|
|
88517
|
+
const group = "_group_107sf_1";
|
|
88518
|
+
const tooltipWrapper = "_tooltipWrapper_107sf_89";
|
|
88519
|
+
const tooltip = "_tooltip_107sf_89";
|
|
88520
|
+
const dropdown = "_dropdown_107sf_113";
|
|
88521
|
+
const filterDropdown = "_filterDropdown_107sf_121";
|
|
88522
|
+
const filterValues = "_filterValues_107sf_129";
|
|
88523
|
+
const columnText = "_columnText_107sf_137";
|
|
88524
|
+
const disabled = "_disabled_107sf_145";
|
|
88525
|
+
const checkIcon = "_checkIcon_107sf_153";
|
|
88526
|
+
const generateButton = "_generateButton_107sf_161";
|
|
88564
88527
|
var styles$f = {
|
|
88565
|
-
"form-container": "_form-
|
|
88566
|
-
"field-container": "_field-
|
|
88567
|
-
"field-label": "_field-
|
|
88568
|
-
"field-wrapper": "_field-
|
|
88569
|
-
"field-inner-container": "_field-inner-
|
|
88570
|
-
"field-value": "_field-
|
|
88528
|
+
"form-container": "_form-container_107sf_1",
|
|
88529
|
+
"field-container": "_field-container_107sf_9",
|
|
88530
|
+
"field-label": "_field-label_107sf_17",
|
|
88531
|
+
"field-wrapper": "_field-wrapper_107sf_25",
|
|
88532
|
+
"field-inner-container": "_field-inner-container_107sf_33",
|
|
88533
|
+
"field-value": "_field-value_107sf_41",
|
|
88571
88534
|
fieldValueIcon,
|
|
88572
|
-
"field-add-btn": "_field-add-
|
|
88535
|
+
"field-add-btn": "_field-add-btn_107sf_57",
|
|
88573
88536
|
fieldAddBtnIcon,
|
|
88574
|
-
"field-value-container": "_field-value-
|
|
88575
|
-
"field-prompt": "_field-
|
|
88537
|
+
"field-value-container": "_field-value-container_107sf_73",
|
|
88538
|
+
"field-prompt": "_field-prompt_107sf_81",
|
|
88576
88539
|
group,
|
|
88577
88540
|
tooltipWrapper,
|
|
88578
88541
|
tooltip,
|
|
@@ -88583,12 +88546,12 @@ var styles$f = {
|
|
|
88583
88546
|
disabled,
|
|
88584
88547
|
checkIcon,
|
|
88585
88548
|
generateButton,
|
|
88586
|
-
"saved-container": "_saved-
|
|
88587
|
-
"custom-container": "_custom-
|
|
88588
|
-
"simple-container": "_simple-
|
|
88589
|
-
"filter-dropdown": "_filter-
|
|
88590
|
-
"editor-field": "_editor-
|
|
88591
|
-
"tab-border": "_tab-
|
|
88549
|
+
"saved-container": "_saved-container_107sf_169",
|
|
88550
|
+
"custom-container": "_custom-container_107sf_177",
|
|
88551
|
+
"simple-container": "_simple-container_107sf_185",
|
|
88552
|
+
"filter-dropdown": "_filter-dropdown_107sf_193",
|
|
88553
|
+
"editor-field": "_editor-field_107sf_201",
|
|
88554
|
+
"tab-border": "_tab-border_107sf_209"
|
|
88592
88555
|
};
|
|
88593
88556
|
const button$1 = "_button_18a2n_1";
|
|
88594
88557
|
const menu$1 = "_menu_18a2n_7";
|
|
@@ -107939,8 +107902,8 @@ var ace$3 = { exports: {} };
|
|
|
107939
107902
|
} };
|
|
107940
107903
|
if (config.get("loadWorkerFromBlob")) {
|
|
107941
107904
|
var blob = $workerBlob(workerUrl);
|
|
107942
|
-
var
|
|
107943
|
-
var blobURL =
|
|
107905
|
+
var URL2 = window.URL || window.webkitURL;
|
|
107906
|
+
var blobURL = URL2.createObjectURL(blob);
|
|
107944
107907
|
return new Worker(blobURL);
|
|
107945
107908
|
}
|
|
107946
107909
|
return new Worker(workerUrl);
|
|
@@ -116693,10 +116656,10 @@ const MetricForm = ({
|
|
|
116693
116656
|
})]
|
|
116694
116657
|
});
|
|
116695
116658
|
};
|
|
116696
|
-
const container$2 = "
|
|
116697
|
-
const header = "
|
|
116698
|
-
const enableGroupBy = "
|
|
116699
|
-
const enableGroupButton = "
|
|
116659
|
+
const container$2 = "_container_1v000_1";
|
|
116660
|
+
const header = "_header_1v000_9";
|
|
116661
|
+
const enableGroupBy = "_enableGroupBy_1v000_15";
|
|
116662
|
+
const enableGroupButton = "_enableGroupButton_1v000_21";
|
|
116700
116663
|
var styles$d = {
|
|
116701
116664
|
container: container$2,
|
|
116702
116665
|
header,
|
|
@@ -121663,46 +121626,48 @@ function WidthProvideRGL(ComposedComponent) {
|
|
|
121663
121626
|
module.exports.WidthProvider = WidthProvider.default;
|
|
121664
121627
|
})(reactGridLayout);
|
|
121665
121628
|
var styles$c = "";
|
|
121629
|
+
const fullscreen$2 = "_fullscreen_1en1r_49";
|
|
121666
121630
|
var styles$b = {
|
|
121667
|
-
"MetricList-container": "_MetricList-
|
|
121668
|
-
"MetricList-wrapper": "_MetricList-
|
|
121669
|
-
"MetricList-wrapper-move": "_MetricList-wrapper-
|
|
121670
|
-
"noMetric-container": "_noMetric-
|
|
121671
|
-
"noMetric-wrapper": "_noMetric-
|
|
121672
|
-
"alt-container": "_alt-
|
|
121631
|
+
"MetricList-container": "_MetricList-container_1en1r_1",
|
|
121632
|
+
"MetricList-wrapper": "_MetricList-wrapper_1en1r_9",
|
|
121633
|
+
"MetricList-wrapper-move": "_MetricList-wrapper-move_1en1r_17",
|
|
121634
|
+
"noMetric-container": "_noMetric-container_1en1r_25",
|
|
121635
|
+
"noMetric-wrapper": "_noMetric-wrapper_1en1r_33",
|
|
121636
|
+
"alt-container": "_alt-container_1en1r_41",
|
|
121637
|
+
fullscreen: fullscreen$2
|
|
121673
121638
|
};
|
|
121674
|
-
const cardContainer = "
|
|
121675
|
-
const listHeader = "
|
|
121676
|
-
const metricName = "
|
|
121677
|
-
const metricTitle = "
|
|
121678
|
-
const metricDescription = "
|
|
121679
|
-
const popup = "
|
|
121680
|
-
const metricFilter$1 = "
|
|
121681
|
-
const popupIcon = "
|
|
121682
|
-
const popupMenu = "
|
|
121683
|
-
const popupItem = "
|
|
121684
|
-
const popupItemIcon = "
|
|
121685
|
-
const csvBtn = "
|
|
121686
|
-
const deleteBtn = "
|
|
121687
|
-
const metricData = "
|
|
121688
|
-
const singleValueData = "
|
|
121689
|
-
const singleValue = "
|
|
121690
|
-
const noData = "
|
|
121691
|
-
const noDataContent = "
|
|
121692
|
-
const noDataText = "
|
|
121693
|
-
const loading$1 = "
|
|
121694
|
-
const features = "
|
|
121695
|
-
const fullscreen$1 = "
|
|
121696
|
-
const deleteModal = "
|
|
121697
|
-
const cancelBtn = "
|
|
121698
|
-
const warningIcon = "
|
|
121699
|
-
const downloadCsv = "
|
|
121700
|
-
const downloadCsvWrapper = "
|
|
121701
|
-
const downloadCsvHeader = "
|
|
121702
|
-
const downloadCsvFooter = "
|
|
121703
|
-
const downloadCsvCancelBtn = "
|
|
121704
|
-
const downloadCsvNote = "
|
|
121705
|
-
const downloadCsvNoteText = "
|
|
121639
|
+
const cardContainer = "_cardContainer_1u57p_1";
|
|
121640
|
+
const listHeader = "_listHeader_1u57p_9";
|
|
121641
|
+
const metricName = "_metricName_1u57p_17";
|
|
121642
|
+
const metricTitle = "_metricTitle_1u57p_25";
|
|
121643
|
+
const metricDescription = "_metricDescription_1u57p_33";
|
|
121644
|
+
const popup = "_popup_1u57p_41";
|
|
121645
|
+
const metricFilter$1 = "_metricFilter_1u57p_49";
|
|
121646
|
+
const popupIcon = "_popupIcon_1u57p_57";
|
|
121647
|
+
const popupMenu = "_popupMenu_1u57p_65";
|
|
121648
|
+
const popupItem = "_popupItem_1u57p_73";
|
|
121649
|
+
const popupItemIcon = "_popupItemIcon_1u57p_81";
|
|
121650
|
+
const csvBtn = "_csvBtn_1u57p_89";
|
|
121651
|
+
const deleteBtn = "_deleteBtn_1u57p_97";
|
|
121652
|
+
const metricData = "_metricData_1u57p_105";
|
|
121653
|
+
const singleValueData = "_singleValueData_1u57p_113";
|
|
121654
|
+
const singleValue = "_singleValue_1u57p_113";
|
|
121655
|
+
const noData = "_noData_1u57p_129";
|
|
121656
|
+
const noDataContent = "_noDataContent_1u57p_137";
|
|
121657
|
+
const noDataText = "_noDataText_1u57p_145";
|
|
121658
|
+
const loading$1 = "_loading_1u57p_153";
|
|
121659
|
+
const features = "_features_1u57p_161";
|
|
121660
|
+
const fullscreen$1 = "_fullscreen_1u57p_169";
|
|
121661
|
+
const deleteModal = "_deleteModal_1u57p_177";
|
|
121662
|
+
const cancelBtn = "_cancelBtn_1u57p_185";
|
|
121663
|
+
const warningIcon = "_warningIcon_1u57p_193";
|
|
121664
|
+
const downloadCsv = "_downloadCsv_1u57p_201";
|
|
121665
|
+
const downloadCsvWrapper = "_downloadCsvWrapper_1u57p_209";
|
|
121666
|
+
const downloadCsvHeader = "_downloadCsvHeader_1u57p_215";
|
|
121667
|
+
const downloadCsvFooter = "_downloadCsvFooter_1u57p_221";
|
|
121668
|
+
const downloadCsvCancelBtn = "_downloadCsvCancelBtn_1u57p_229";
|
|
121669
|
+
const downloadCsvNote = "_downloadCsvNote_1u57p_237";
|
|
121670
|
+
const downloadCsvNoteText = "_downloadCsvNoteText_1u57p_245";
|
|
121706
121671
|
var styles$a = {
|
|
121707
121672
|
cardContainer,
|
|
121708
121673
|
listHeader,
|
|
@@ -121735,7 +121700,9 @@ var styles$a = {
|
|
|
121735
121700
|
downloadCsvFooter,
|
|
121736
121701
|
downloadCsvCancelBtn,
|
|
121737
121702
|
downloadCsvNote,
|
|
121738
|
-
downloadCsvNoteText
|
|
121703
|
+
downloadCsvNoteText,
|
|
121704
|
+
"tab-border-bottom": "_tab-border-bottom_1u57p_253",
|
|
121705
|
+
"download-info-text": "_download-info-text_1u57p_261"
|
|
121739
121706
|
};
|
|
121740
121707
|
var NoData = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJMYXllcl8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAzMDAgMzAwIj48ZGVmcz48c3R5bGU+LmNscy0xe3N0cm9rZTojMTgyYzYwO30uY2xzLTEsLmNscy0ye2ZpbGw6bm9uZTtzdHJva2UtbGluZWNhcDpyb3VuZDtzdHJva2UtbGluZWpvaW46cm91bmQ7fS5jbHMtM3tmaWxsOiM1ODY1ZjY7b3BhY2l0eTouMTt9LmNscy00e2ZpbGw6I2YyZjNmNDt9LmNscy01e2ZpbGw6I2MxYzdjOTt9LmNscy02e2ZpbGw6I2RhZGVkZjt9LmNscy03e2ZpbGw6IzE4MmM2MDt9LmNscy0ye3N0cm9rZTojNTg2NWY2O3N0cm9rZS13aWR0aDo0cHg7fTwvc3R5bGU+PC9kZWZzPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIxMC41LDIwMC44M2MuNC0uNjYuNjgtMS40LjgyLTIuMiwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguNDMtNC41Ni0yLjA5LTkuNjgtNi44Ni0xMC42Ni0uMDEsMC0uMDMsMC0uMDQsMC0yLjQtLjQ5LTUuMDItLjIyLTcuNDUtLjIyaC00NC4yMmMtLjUyLDAtMi4zMy0uMzEtMi43NywwbC0yNC4yOCwxNy4yMmgtNjEuNjFjLTMuOTcsMC02Ljk5LDMuNTYtNi4zNCw3LjQ3bDkuNzUsNTkuNDJjLjUxLDMuMTEsMy4yLDUuMzksNi4zNCw1LjM5aDExNy44NiIvPjxwYXRoIGNsYXNzPSJjbHMtMSIgZD0ibTIwNywxMTQuNDN2LTguNTRjMC0zLjU1LTIuODgtNi40My02LjQzLTYuNDNoLTE3LjE5Ii8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTAzLjQ3LDk5LjQ2aC0xNS4xMmMtMy41NSwwLTYuNDMsMi44OC02LjQzLDYuNDN2MjUuNDgiLz48Zz48bGluZSBjbGFzcz0iY2xzLTIiIHgxPSIxMTQuMTIiIHkxPSI5NC4wOCIgeDI9IjE0NC44NCIgeTI9Ijk0LjA4Ii8+PGc+PHJlY3QgY2xhc3M9ImNscy02IiB4PSIxMTIuNjEiIHk9IjEwMi40MyIgd2lkdGg9IjE4Ljk3IiBoZWlnaHQ9IjMuMiIvPjxyZWN0IGNsYXNzPSJjbHMtNCIgeD0iMTM3LjYxIiB5PSIxMDIuNDMiIHdpZHRoPSI4LjkiIGhlaWdodD0iMy4yIi8+PC9nPjwvZz48cGF0aCBjbGFzcz0iY2xzLTMiIGQ9Im0xNjQuOTgsODEuNDZsLS4wOCwxNi4yOHMuMTUsMy4yNC4zLDMuNjIuNiwxLjUxLDEuMTMsMS44OCwxLjAyLjc5LDEuNzcsMS4wNi45NC40OSwyLjExLjQ5LDE4LjE3LjA0LDE4LjE3LjA0bC0yMy40MS0yMy4zN1oiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xODguNTEsMTA0LjkxdjkuNTIiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xMDMuNTMsMTMxLjM3di00NC45NWMwLTIuODQsMi4zLTUuMTUsNS4xNS01LjE1LDE4Ljc3LDAsMzcuNTQsMCw1Ni4zMSwwIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMTY1LjAxLDgxLjI3djE4LjM1YzAsMi44NCwyLjMxLDUuMTUsNS4xNSw1LjE1aDE4LjM1cy0yMy41LTIzLjYyLTIzLjUtMjMuNVoiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMjQuOTYiLz48Y2lyY2xlIGNsYXNzPSJjbHMtMSIgY3g9IjE2OC4yMSIgY3k9IjE2My4yNyIgcj0iMzEuMjUiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0xOTIuNTcsMTgzLjMzYzkuNjIsOS42MiwzMC4yOCwzMC4yOCwzMC4yOCwzMC4yOCwxLjE3LDEuMTcsMS4xNywzLjA3LDAsNC4yNHMtMy4wNywxLjE3LTQuMjQsMGMwLDAtMjAuNTgtMjAuNTgtMzAuMjItMzAuMjIiLz48Zz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNjguNjYsMTcwLjkzYy0uNzQsMC0xLjM0LjI0LTEuODEuNzItLjQ3LjQ4LS43MSwxLjA5LS43MSwxLjgzcy4yNCwxLjMyLjcxLDEuODFjLjQ3LjQ5LDEuMDcuNzQsMS44MS43NHMxLjM0LS4yNSwxLjgxLS43NGMuNDctLjQ5LjcxLTEuMS43MS0xLjgxcy0uMjQtMS4zNC0uNzEtMS44M2MtLjQ3LS40OC0xLjA4LS43Mi0xLjgxLS43MloiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Im0xNzQuNjksMTUzLjc3Yy0uNjItMS4wMi0xLjQ5LTEuODItMi42LTIuNC0xLjEyLS41Ny0yLjQtLjg2LTMuODUtLjg2LTEuNjgsMC0zLjE3LjQtNC40NywxLjE5cy0yLjI5LDEuOTQtMi45OCwzLjQzbDIuNzYsMi4yOGMuNDYtMS4wNiwxLjA3LTEuODYsMS44NS0yLjQuNzctLjU0LDEuNjUtLjgxLDIuNjQtLjgxLjc2LDAsMS40MS4xNCwxLjk3LjQxLjU1LjI4Ljk4LjY3LDEuMjgsMS4xNy4zLjUxLjQ1LDEuMS40NSwxLjc5cy0uMTYsMS4yOS0uNDcsMS44MWMtLjMxLjUyLS43NS45Mi0xLjMxLDEuMjEtLjU2LjI5LTEuMjIuNDMtMS45OC40M2gtLjkzdjYuNjZoMy4yOGwuMjYtMy43M2MuNzEtLjI0LDEuMzctLjU1LDEuOTUtLjkzLjk5LS42NCwxLjc1LTEuNDUsMi4yOS0yLjQxLjU0LS45Ny44MS0yLjA3LjgxLTMuMzEsMC0xLjMzLS4zMS0yLjUxLS45My0zLjU0WiIvPjwvZz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im04NS41NSwyMDMuOTdjLjY4LDIuODksMy4yNiw0Ljk2LDYuMjYsNC45NmgxMTcuNzMiLz48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Im0yMTUuMzcsMjA2LjA0Yy40Ny0uNzEuOC0xLjUyLjk1LTIuNCwxLjU4LTguODcsMy4xNS0xNy43NSw0LjczLTI2LjYyLDIuMDMtMTEuNDQsNC4wNi0yMi44OCw2LjA5LTM0LjMyLjcyLTQuMDgsMS43Ny04LjI1LDIuMTYtMTIuMzguMzktNC4xNi0xLjY4LTguNzktNS42Ny0xMC4zMSIvPjxwYXRoIGNsYXNzPSJjbHMtNyIgZD0ibTIyMy41MSwxMjAuMDhzLjQ5LDEuNjIuNTMsMS43My4zMiwyLjQ0LjMyLDIuNDRsLS4wNCwxLjkxLTEuMzgsNy4xMy0zLjM5LDE5LjMxLTIuODksMTUuOTItMi45NiwxNi43Ni0yLjQ0LDEzLjE2LS45MiwyLjY1LDQuOTgsNS4xNS44NS0yLjE1LjgxLTQuMDYsMS40OC04LjMzLDIuODItMTUuNzEsMi4xNS0xMi4xMSwxLjk0LTExLjM2LDIuNzUtMTQuNzUuODgtNC42OS4yOC0yLjU4LjA3LTIuMTItLjYtMi43NS0xLjI0LTIuMzYtMS4wOS0xLjU5LTIuMDEtMS4zMS0uOTItLjI4WiIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtNyIgcG9pbnRzPSI4NS42OCAyMDMuOTMgMjA0LjU1IDIwMy44NCAyMDkuMzUgMjA4LjczIDE0OC40OCAyMDguODggOTAuOTUgMjA5LjAyIDg5LjUgMjA4LjY2IDg3Ljk4IDIwNy45MiA4Ni44MiAyMDYuNTggODYuMDEgMjA1LjAzIDg1LjY4IDIwMy45MyIvPjwvc3ZnPg==";
|
|
121741
121708
|
const materialSymbolsArchiveOutline = (props) => /* @__PURE__ */ jsx("svg", {
|
|
@@ -121804,8 +121771,8 @@ const ChartImageDownloadButton = ({
|
|
|
121804
121771
|
}), text2]
|
|
121805
121772
|
});
|
|
121806
121773
|
};
|
|
121807
|
-
const metricFilter = "
|
|
121808
|
-
const customContainer = "
|
|
121774
|
+
const metricFilter = "_metricFilter_1xge8_1";
|
|
121775
|
+
const customContainer = "_customContainer_1xge8_7";
|
|
121809
121776
|
var styles$9 = {
|
|
121810
121777
|
metricFilter,
|
|
121811
121778
|
customContainer
|
|
@@ -121908,24 +121875,24 @@ const MetricFilterDropDown = ({
|
|
|
121908
121875
|
}) : void 0
|
|
121909
121876
|
});
|
|
121910
121877
|
};
|
|
121911
|
-
const container$1 = "
|
|
121912
|
-
const popover = "
|
|
121913
|
-
const button = "
|
|
121914
|
-
const buttonOpen = "
|
|
121915
|
-
const menu = "
|
|
121916
|
-
const enter = "
|
|
121917
|
-
const enterFrom = "
|
|
121918
|
-
const enterTo = "
|
|
121919
|
-
const leave = "
|
|
121920
|
-
const leaveFrom = "
|
|
121921
|
-
const leaveTo = "
|
|
121922
|
-
const center = "
|
|
121923
|
-
const top = "
|
|
121924
|
-
const bottom = "
|
|
121925
|
-
const left = "
|
|
121926
|
-
const right = "
|
|
121927
|
-
const chartOptionBtn = "
|
|
121928
|
-
const chartpopup = "
|
|
121878
|
+
const container$1 = "_container_a6fvx_1";
|
|
121879
|
+
const popover = "_popover_a6fvx_9";
|
|
121880
|
+
const button = "_button_a6fvx_17";
|
|
121881
|
+
const buttonOpen = "_buttonOpen_a6fvx_25";
|
|
121882
|
+
const menu = "_menu_a6fvx_33";
|
|
121883
|
+
const enter = "_enter_a6fvx_41";
|
|
121884
|
+
const enterFrom = "_enterFrom_a6fvx_49";
|
|
121885
|
+
const enterTo = "_enterTo_a6fvx_57";
|
|
121886
|
+
const leave = "_leave_a6fvx_65";
|
|
121887
|
+
const leaveFrom = "_leaveFrom_a6fvx_73";
|
|
121888
|
+
const leaveTo = "_leaveTo_a6fvx_81";
|
|
121889
|
+
const center = "_center_a6fvx_89";
|
|
121890
|
+
const top = "_top_a6fvx_97";
|
|
121891
|
+
const bottom = "_bottom_a6fvx_105";
|
|
121892
|
+
const left = "_left_a6fvx_113";
|
|
121893
|
+
const right = "_right_a6fvx_121";
|
|
121894
|
+
const chartOptionBtn = "_chartOptionBtn_a6fvx_225";
|
|
121895
|
+
const chartpopup = "_chartpopup_a6fvx_233";
|
|
121929
121896
|
var styles$8 = {
|
|
121930
121897
|
container: container$1,
|
|
121931
121898
|
popover,
|
|
@@ -121943,23 +121910,23 @@ var styles$8 = {
|
|
|
121943
121910
|
bottom,
|
|
121944
121911
|
left,
|
|
121945
121912
|
right,
|
|
121946
|
-
"left-top-end": "_left-top-
|
|
121947
|
-
"right-top-end": "_right-top-
|
|
121948
|
-
"left-bottom-end": "_left-bottom-
|
|
121949
|
-
"right-bottom-end": "_right-bottom-
|
|
121950
|
-
"top-left": "_top-
|
|
121951
|
-
"top-right": "_top-
|
|
121952
|
-
"bottom-left": "_bottom-
|
|
121953
|
-
"bottom-right": "_bottom-
|
|
121954
|
-
"left-top": "_left-
|
|
121955
|
-
"left-bottom": "_left-
|
|
121956
|
-
"right-top": "_right-
|
|
121957
|
-
"right-bottom": "_right-
|
|
121913
|
+
"left-top-end": "_left-top-end_a6fvx_129",
|
|
121914
|
+
"right-top-end": "_right-top-end_a6fvx_137",
|
|
121915
|
+
"left-bottom-end": "_left-bottom-end_a6fvx_145",
|
|
121916
|
+
"right-bottom-end": "_right-bottom-end_a6fvx_153",
|
|
121917
|
+
"top-left": "_top-left_a6fvx_161",
|
|
121918
|
+
"top-right": "_top-right_a6fvx_169",
|
|
121919
|
+
"bottom-left": "_bottom-left_a6fvx_177",
|
|
121920
|
+
"bottom-right": "_bottom-right_a6fvx_185",
|
|
121921
|
+
"left-top": "_left-top_a6fvx_129",
|
|
121922
|
+
"left-bottom": "_left-bottom_a6fvx_145",
|
|
121923
|
+
"right-top": "_right-top_a6fvx_137",
|
|
121924
|
+
"right-bottom": "_right-bottom_a6fvx_153",
|
|
121958
121925
|
chartOptionBtn,
|
|
121959
121926
|
chartpopup
|
|
121960
121927
|
};
|
|
121961
|
-
const fullscreen = "
|
|
121962
|
-
const loading = "
|
|
121928
|
+
const fullscreen = "_fullscreen_19jec_1";
|
|
121929
|
+
const loading = "_loading_19jec_9";
|
|
121963
121930
|
var styles$7 = {
|
|
121964
121931
|
fullscreen,
|
|
121965
121932
|
loading
|
|
@@ -122141,108 +122108,9 @@ const ChartPopup = ({
|
|
|
122141
122108
|
});
|
|
122142
122109
|
};
|
|
122143
122110
|
var ChartPopup$1 = React__default.memo(ChartPopup);
|
|
122144
|
-
const getSqlStatement = ({
|
|
122145
|
-
query,
|
|
122146
|
-
clientName,
|
|
122147
|
-
tenancyType,
|
|
122148
|
-
values
|
|
122149
|
-
}) => {
|
|
122150
|
-
const str = clientName ? tenancyType === DATABASE ? query.replace(new RegExp(DATABASE_NAME, "g"), clientName) : Number(clientName) ? query.replace(new RegExp(CLIENT_NAME_VAR_NUM, "g"), clientName) : query.replace(new RegExp(CLIENT_NAME_VAR, "g"), clientName) : query;
|
|
122151
|
-
if (!values) {
|
|
122152
|
-
return str;
|
|
122153
|
-
}
|
|
122154
|
-
const replacedStr = str.replace(/[^']+_variable/g, (match) => {
|
|
122155
|
-
const value = values[match];
|
|
122156
|
-
return `${value}`;
|
|
122157
|
-
});
|
|
122158
|
-
return replacedStr;
|
|
122159
|
-
};
|
|
122160
|
-
const useDownloadRawCsv = () => {
|
|
122161
|
-
const [isShowRawCsvModal, setRawCsvModal] = useState(false);
|
|
122162
|
-
const [isLoading, setLoading] = useState(false);
|
|
122163
|
-
const [downloadCsvError, setError] = useState("");
|
|
122164
|
-
const { mutate } = useRawCsvMutation();
|
|
122165
|
-
const { handleSubmit, register: register2 } = useForm();
|
|
122166
|
-
const onSubmitDownloadCsv = ({
|
|
122167
|
-
companyId,
|
|
122168
|
-
sqlQuery,
|
|
122169
|
-
values,
|
|
122170
|
-
clientName,
|
|
122171
|
-
tenancyType,
|
|
122172
|
-
metricName: metricName2,
|
|
122173
|
-
workspaceId
|
|
122174
|
-
}) => {
|
|
122175
|
-
setLoading(true);
|
|
122176
|
-
setError("");
|
|
122177
|
-
const modifiedQuery = getSqlStatement({
|
|
122178
|
-
query: sqlQuery,
|
|
122179
|
-
clientName,
|
|
122180
|
-
tenancyType,
|
|
122181
|
-
values
|
|
122182
|
-
});
|
|
122183
|
-
mutate(
|
|
122184
|
-
{
|
|
122185
|
-
companyId,
|
|
122186
|
-
recipientAddress: values.email,
|
|
122187
|
-
sqlQuery: modifiedQuery,
|
|
122188
|
-
metricName: metricName2,
|
|
122189
|
-
workspaceId
|
|
122190
|
-
},
|
|
122191
|
-
{
|
|
122192
|
-
onSuccess(data) {
|
|
122193
|
-
var _a2, _b2;
|
|
122194
|
-
const success2 = (_a2 = data.sendRawCsv) == null ? void 0 : _a2.status;
|
|
122195
|
-
const error2 = (_b2 = data.sendRawCsv) == null ? void 0 : _b2.error;
|
|
122196
|
-
if (success2) {
|
|
122197
|
-
setError("");
|
|
122198
|
-
setLoading(false);
|
|
122199
|
-
setRawCsvModal(false);
|
|
122200
|
-
} else if (error2) {
|
|
122201
|
-
setError(error2.message);
|
|
122202
|
-
setLoading(false);
|
|
122203
|
-
} else {
|
|
122204
|
-
setError(SOMETHING_WENT_WRONG);
|
|
122205
|
-
setLoading(false);
|
|
122206
|
-
}
|
|
122207
|
-
}
|
|
122208
|
-
}
|
|
122209
|
-
);
|
|
122210
|
-
};
|
|
122211
|
-
return {
|
|
122212
|
-
isShowRawCsvModal,
|
|
122213
|
-
setRawCsvModal,
|
|
122214
|
-
isLoading,
|
|
122215
|
-
downloadCsvError,
|
|
122216
|
-
onSubmitDownloadCsv,
|
|
122217
|
-
handleSubmit,
|
|
122218
|
-
register: register2
|
|
122219
|
-
};
|
|
122220
|
-
};
|
|
122221
|
-
const required = { required: "Required" };
|
|
122222
|
-
const asEmail = {
|
|
122223
|
-
...required,
|
|
122224
|
-
pattern: {
|
|
122225
|
-
value: /^\S+@\S+$/i,
|
|
122226
|
-
message: "Entered value does not match email format"
|
|
122227
|
-
}
|
|
122228
|
-
};
|
|
122229
|
-
({
|
|
122230
|
-
...required,
|
|
122231
|
-
minLength: {
|
|
122232
|
-
value: 8,
|
|
122233
|
-
message: "Min length is 8"
|
|
122234
|
-
}
|
|
122235
|
-
});
|
|
122236
|
-
({
|
|
122237
|
-
...required,
|
|
122238
|
-
minLength: {
|
|
122239
|
-
value: 3,
|
|
122240
|
-
message: "Min length is 3"
|
|
122241
|
-
}
|
|
122242
|
-
});
|
|
122243
122111
|
var styles$6 = {
|
|
122244
|
-
"dbc-container": "_dbc-
|
|
122245
|
-
"active-dimension": "_active-
|
|
122112
|
+
"dbc-container": "_dbc-container_nmp4f_1",
|
|
122113
|
+
"active-dimension": "_active-dimension_nmp4f_9"
|
|
122246
122114
|
};
|
|
122247
122115
|
const DrillBreadCrumb = ({
|
|
122248
122116
|
dimensions,
|
|
@@ -122269,7 +122137,9 @@ const MetricCard = ({
|
|
|
122269
122137
|
companyTenancyType,
|
|
122270
122138
|
renderHeaderName,
|
|
122271
122139
|
onArchive,
|
|
122272
|
-
onEdit
|
|
122140
|
+
onEdit,
|
|
122141
|
+
onTableView,
|
|
122142
|
+
onDownloadRawCsv
|
|
122273
122143
|
}) => {
|
|
122274
122144
|
var _a2;
|
|
122275
122145
|
const chartRef = useRef(null);
|
|
@@ -122380,7 +122250,6 @@ const MetricCard = ({
|
|
|
122380
122250
|
const [backGroundColor, setBackGroundColor] = useState({
|
|
122381
122251
|
show: false
|
|
122382
122252
|
});
|
|
122383
|
-
const [isShowTablePreview, setTablePreview] = useState(false);
|
|
122384
122253
|
const [groupedData, setGroupedData] = useState([]);
|
|
122385
122254
|
const [drillDownSettings, setDrillDownSettings] = useState();
|
|
122386
122255
|
const [drilledLevel, setDrilledLevel] = useState(0);
|
|
@@ -122522,17 +122391,8 @@ const MetricCard = ({
|
|
|
122522
122391
|
const onDrillDown = () => {
|
|
122523
122392
|
drilldown(columnName, chartParams, drillDownSettings, dataDb, setDrilledLevel, drilledLevel, setShowChartPopup, setGroupedData);
|
|
122524
122393
|
};
|
|
122525
|
-
|
|
122526
|
-
|
|
122527
|
-
setRawCsvModal,
|
|
122528
|
-
downloadCsvError,
|
|
122529
|
-
handleSubmit,
|
|
122530
|
-
isLoading,
|
|
122531
|
-
onSubmitDownloadCsv,
|
|
122532
|
-
register: register2
|
|
122533
|
-
} = useDownloadRawCsv();
|
|
122534
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
122535
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
122394
|
+
return /* @__PURE__ */ jsx(Fragment, {
|
|
122395
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
122536
122396
|
className: styles$a.cardContainer,
|
|
122537
122397
|
onContextMenu: (e2) => {
|
|
122538
122398
|
e2.preventDefault();
|
|
@@ -122618,20 +122478,20 @@ const MetricCard = ({
|
|
|
122618
122478
|
text: "Save As CSV",
|
|
122619
122479
|
iconClass: styles$a.popupItemIcon
|
|
122620
122480
|
}), !!dataDb.length && /* @__PURE__ */ jsxs(Fragment, {
|
|
122621
|
-
children: [/* @__PURE__ */ jsxs(Button, {
|
|
122481
|
+
children: [onTableView && /* @__PURE__ */ jsxs(Button, {
|
|
122622
122482
|
variant: "custom",
|
|
122623
122483
|
type: "button",
|
|
122624
122484
|
className: `${styles$a.popupItem} ${styles$a.csvBtn}`,
|
|
122625
|
-
onClick: () =>
|
|
122485
|
+
onClick: () => onTableView(metricItem, dataDb),
|
|
122626
122486
|
children: [/* @__PURE__ */ jsx(Icons, {
|
|
122627
122487
|
name: "table-tab-icon",
|
|
122628
122488
|
className: styles$a.popupItemIcon
|
|
122629
122489
|
}), "View As Table"]
|
|
122630
|
-
}), /* @__PURE__ */ jsxs(Button, {
|
|
122490
|
+
}), onDownloadRawCsv && /* @__PURE__ */ jsxs(Button, {
|
|
122631
122491
|
variant: "custom",
|
|
122632
122492
|
type: "button",
|
|
122633
122493
|
className: `${styles$a.popupItem} ${styles$a.csvBtn}`,
|
|
122634
|
-
onClick: () =>
|
|
122494
|
+
onClick: () => onDownloadRawCsv(metricItem),
|
|
122635
122495
|
children: [/* @__PURE__ */ jsx(Icons, {
|
|
122636
122496
|
name: "csv-icon",
|
|
122637
122497
|
className: styles$a.popupItemIcon
|
|
@@ -122719,82 +122579,7 @@ const MetricCard = ({
|
|
|
122719
122579
|
handleChartRightClick
|
|
122720
122580
|
}) : null]
|
|
122721
122581
|
})]
|
|
122722
|
-
})
|
|
122723
|
-
isOpen: isShowTablePreview,
|
|
122724
|
-
onClose: () => setTablePreview(false),
|
|
122725
|
-
headerTitle: metricItem.name,
|
|
122726
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
122727
|
-
className: styles$a.fullscreen,
|
|
122728
|
-
children: /* @__PURE__ */ jsx(Table, {
|
|
122729
|
-
data: dataDb,
|
|
122730
|
-
isLoading: isQueryLoading,
|
|
122731
|
-
error: ""
|
|
122732
|
-
})
|
|
122733
|
-
})
|
|
122734
|
-
}), /* @__PURE__ */ jsx(Modal, {
|
|
122735
|
-
isOpen: isShowRawCsvModal,
|
|
122736
|
-
onClose: () => setRawCsvModal(false),
|
|
122737
|
-
headerTitle: "Download Raw csv",
|
|
122738
|
-
children: /* @__PURE__ */ jsxs("form", {
|
|
122739
|
-
className: styles$a.downloadCsv,
|
|
122740
|
-
onSubmit: handleSubmit((values) => {
|
|
122741
|
-
var _a3;
|
|
122742
|
-
return onSubmitDownloadCsv({
|
|
122743
|
-
values,
|
|
122744
|
-
sqlQuery: metricItem.query,
|
|
122745
|
-
companyId: metricItem.companyId,
|
|
122746
|
-
clientName: client,
|
|
122747
|
-
tenancyType: companyTenancyType,
|
|
122748
|
-
metricName: metricItem == null ? void 0 : metricItem.name,
|
|
122749
|
-
workspaceId: (_a3 = metricItem == null ? void 0 : metricItem.companyIntegration) == null ? void 0 : _a3.workspaceId
|
|
122750
|
-
});
|
|
122751
|
-
}),
|
|
122752
|
-
children: [/* @__PURE__ */ jsxs("div", {
|
|
122753
|
-
className: styles$a.downloadCsvWrapper,
|
|
122754
|
-
children: [/* @__PURE__ */ jsx(InputField, {
|
|
122755
|
-
type: "email",
|
|
122756
|
-
label: "email",
|
|
122757
|
-
placeholder: "enter a valid email",
|
|
122758
|
-
register: register2("email", asEmail)
|
|
122759
|
-
}), /* @__PURE__ */ jsx(Error$1, {
|
|
122760
|
-
message: downloadCsvError
|
|
122761
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
122762
|
-
className: styles$a.downloadCsvNote,
|
|
122763
|
-
children: [/* @__PURE__ */ jsx(Icons, {
|
|
122764
|
-
name: "info-icon",
|
|
122765
|
-
className: styles$a.popupItemIcon
|
|
122766
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
122767
|
-
className: styles$a.downloadCsvNoteText,
|
|
122768
|
-
children: [/* @__PURE__ */ jsx(Text, {
|
|
122769
|
-
styleClass: "primary",
|
|
122770
|
-
variant: "h1",
|
|
122771
|
-
children: "Note:"
|
|
122772
|
-
}), /* @__PURE__ */ jsx(Text, {
|
|
122773
|
-
styleClass: "font-14",
|
|
122774
|
-
variant: "p",
|
|
122775
|
-
children: "You will shortly receive a mail with CSV attached to the above email id, once you click on Submit"
|
|
122776
|
-
})]
|
|
122777
|
-
})]
|
|
122778
|
-
})]
|
|
122779
|
-
}), /* @__PURE__ */ jsxs(ModalFooter, {
|
|
122780
|
-
children: [/* @__PURE__ */ jsx(Button, {
|
|
122781
|
-
variant: "custom",
|
|
122782
|
-
type: "button",
|
|
122783
|
-
size: "small",
|
|
122784
|
-
className: styles$a.downloadCsvCancelBtn,
|
|
122785
|
-
onClick: () => setRawCsvModal(false),
|
|
122786
|
-
isDisabled: isLoading,
|
|
122787
|
-
children: "Cancel"
|
|
122788
|
-
}), /* @__PURE__ */ jsx(Button, {
|
|
122789
|
-
variant: "primary",
|
|
122790
|
-
type: "submit",
|
|
122791
|
-
size: "small",
|
|
122792
|
-
isDisabled: isLoading,
|
|
122793
|
-
children: "Submit"
|
|
122794
|
-
})]
|
|
122795
|
-
})]
|
|
122796
|
-
})
|
|
122797
|
-
})]
|
|
122582
|
+
})
|
|
122798
122583
|
});
|
|
122799
122584
|
};
|
|
122800
122585
|
const SingleValueCard = ({
|
|
@@ -123196,6 +122981,444 @@ const LayoutAlert = ({
|
|
|
123196
122981
|
})
|
|
123197
122982
|
});
|
|
123198
122983
|
};
|
|
122984
|
+
const timeAgo = (unixTimestamp) => {
|
|
122985
|
+
const now = Date.now();
|
|
122986
|
+
const diff2 = now - unixTimestamp;
|
|
122987
|
+
const units = [
|
|
122988
|
+
{ label: "year", duration: 1e3 * 60 * 60 * 24 * 365 },
|
|
122989
|
+
{ label: "month", duration: 1e3 * 60 * 60 * 24 * 30 },
|
|
122990
|
+
{ label: "week", duration: 1e3 * 60 * 60 * 24 * 7 },
|
|
122991
|
+
{ label: "day", duration: 1e3 * 60 * 60 * 24 },
|
|
122992
|
+
{ label: "hour", duration: 1e3 * 60 * 60 },
|
|
122993
|
+
{ label: "minute", duration: 1e3 * 60 },
|
|
122994
|
+
{ label: "second", duration: 1e3 },
|
|
122995
|
+
{ label: "millisecond", duration: 1 }
|
|
122996
|
+
];
|
|
122997
|
+
for (const unit of units) {
|
|
122998
|
+
const numUnitsAgo = Math.floor(diff2 / unit.duration);
|
|
122999
|
+
if (numUnitsAgo >= 1) {
|
|
123000
|
+
return `${numUnitsAgo} ${unit.label}${numUnitsAgo > 1 ? "s" : ""} ago`;
|
|
123001
|
+
}
|
|
123002
|
+
}
|
|
123003
|
+
return "just now";
|
|
123004
|
+
};
|
|
123005
|
+
const getSqlStatement = ({
|
|
123006
|
+
query,
|
|
123007
|
+
clientName,
|
|
123008
|
+
tenancyType,
|
|
123009
|
+
values
|
|
123010
|
+
}) => {
|
|
123011
|
+
const str = clientName ? tenancyType === DATABASE ? query.replace(new RegExp(DATABASE_NAME, "g"), clientName) : Number(clientName) ? query.replace(new RegExp(CLIENT_NAME_VAR_NUM, "g"), clientName) : query.replace(new RegExp(CLIENT_NAME_VAR, "g"), clientName) : query;
|
|
123012
|
+
if (!values) {
|
|
123013
|
+
return str;
|
|
123014
|
+
}
|
|
123015
|
+
const replacedStr = str.replace(/[^']+_variable/g, (match) => {
|
|
123016
|
+
const value = values[match];
|
|
123017
|
+
return `${value}`;
|
|
123018
|
+
});
|
|
123019
|
+
return replacedStr;
|
|
123020
|
+
};
|
|
123021
|
+
const useDownloadRawCsv = (onCloseModal, metricItem) => {
|
|
123022
|
+
const [csvDownloadUrlError, setCsvDownloadUrlError] = useState("");
|
|
123023
|
+
const [isLoading, setLoading] = useState(false);
|
|
123024
|
+
const [downloadCsvError, setError] = useState("");
|
|
123025
|
+
const { mutate } = useRawCsvMutation();
|
|
123026
|
+
const { mutate: invokeSaveRawCsvDetailsMutation } = useInvokeSaveRawCsvDetailsMutation();
|
|
123027
|
+
const { handleSubmit, register: register2 } = useForm();
|
|
123028
|
+
const { data: RawCsvUrlsData } = useExternalMetricRawCsvUrlsQuery(
|
|
123029
|
+
{ externalMetricId: metricItem == null ? void 0 : metricItem.id },
|
|
123030
|
+
{ enabled: !!(metricItem == null ? void 0 : metricItem.id) }
|
|
123031
|
+
);
|
|
123032
|
+
const isLinkExpired = (url) => {
|
|
123033
|
+
const queryString = url.split("?")[1];
|
|
123034
|
+
const params = new URLSearchParams(queryString);
|
|
123035
|
+
const expires = parseInt(params.get("Expires"), 10);
|
|
123036
|
+
const currentTime = Math.floor(Date.now() / 1e3);
|
|
123037
|
+
const secondsLeft = expires - currentTime;
|
|
123038
|
+
return { isExpired: currentTime > expires, secondsLeft };
|
|
123039
|
+
};
|
|
123040
|
+
const getUrls = (urls) => {
|
|
123041
|
+
try {
|
|
123042
|
+
return JSON.parse(urls);
|
|
123043
|
+
} catch {
|
|
123044
|
+
return [];
|
|
123045
|
+
}
|
|
123046
|
+
};
|
|
123047
|
+
const csvDownloadUrls = useMemo(() => {
|
|
123048
|
+
var _a2;
|
|
123049
|
+
if ((_a2 = RawCsvUrlsData == null ? void 0 : RawCsvUrlsData.externalMetricRawCsvUrls) == null ? void 0 : _a2.length) {
|
|
123050
|
+
const urls = getUrls(RawCsvUrlsData == null ? void 0 : RawCsvUrlsData.externalMetricRawCsvUrls[0].urls);
|
|
123051
|
+
return {
|
|
123052
|
+
urls,
|
|
123053
|
+
lastUpdatedAt: timeAgo(
|
|
123054
|
+
Date.parse(RawCsvUrlsData == null ? void 0 : RawCsvUrlsData.externalMetricRawCsvUrls[0].lastUpdatedAt)
|
|
123055
|
+
),
|
|
123056
|
+
isExpired: urls.length ? isLinkExpired(urls[0]).isExpired : true,
|
|
123057
|
+
error: RawCsvUrlsData == null ? void 0 : RawCsvUrlsData.externalMetricRawCsvUrls[0].error,
|
|
123058
|
+
expireUrlIn: urls.length ? isLinkExpired(urls[0]).secondsLeft : 0
|
|
123059
|
+
};
|
|
123060
|
+
}
|
|
123061
|
+
return {
|
|
123062
|
+
urls: [],
|
|
123063
|
+
lastUpdatedAt: 0,
|
|
123064
|
+
isExpired: true,
|
|
123065
|
+
error: null,
|
|
123066
|
+
expireUrlIn: 0
|
|
123067
|
+
};
|
|
123068
|
+
}, [RawCsvUrlsData == null ? void 0 : RawCsvUrlsData.externalMetricRawCsvUrls]);
|
|
123069
|
+
const handleDownload = (url) => {
|
|
123070
|
+
setCsvDownloadUrlError("");
|
|
123071
|
+
fetch(url).then((response) => {
|
|
123072
|
+
if (!response.ok) {
|
|
123073
|
+
if (response.status === 403) {
|
|
123074
|
+
setCsvDownloadUrlError("download link is expired");
|
|
123075
|
+
} else {
|
|
123076
|
+
setCsvDownloadUrlError("something went wrong");
|
|
123077
|
+
}
|
|
123078
|
+
}
|
|
123079
|
+
return response.blob();
|
|
123080
|
+
}).then((blob) => {
|
|
123081
|
+
const csvUrl = URL.createObjectURL(blob);
|
|
123082
|
+
const a2 = document.createElement("a");
|
|
123083
|
+
a2.download = `${metricItem == null ? void 0 : metricItem.name}.csv`;
|
|
123084
|
+
a2.href = csvUrl;
|
|
123085
|
+
document.body.appendChild(a2);
|
|
123086
|
+
a2.click();
|
|
123087
|
+
document.body.removeChild(a2);
|
|
123088
|
+
}).catch(() => {
|
|
123089
|
+
setCsvDownloadUrlError(
|
|
123090
|
+
"There was an error downloading the CSV file. Please try again later."
|
|
123091
|
+
);
|
|
123092
|
+
});
|
|
123093
|
+
};
|
|
123094
|
+
const onSubmitDownloadCsv = ({
|
|
123095
|
+
companyId,
|
|
123096
|
+
sqlQuery,
|
|
123097
|
+
values,
|
|
123098
|
+
clientName,
|
|
123099
|
+
tenancyType,
|
|
123100
|
+
metricName: metricName2,
|
|
123101
|
+
workspaceId
|
|
123102
|
+
}) => {
|
|
123103
|
+
setLoading(true);
|
|
123104
|
+
setError("");
|
|
123105
|
+
const modifiedQuery = getSqlStatement({
|
|
123106
|
+
query: sqlQuery,
|
|
123107
|
+
clientName,
|
|
123108
|
+
tenancyType,
|
|
123109
|
+
values
|
|
123110
|
+
});
|
|
123111
|
+
mutate(
|
|
123112
|
+
{
|
|
123113
|
+
companyId,
|
|
123114
|
+
recipientAddress: values.email,
|
|
123115
|
+
sqlQuery: modifiedQuery,
|
|
123116
|
+
metricName: metricName2,
|
|
123117
|
+
workspaceId
|
|
123118
|
+
},
|
|
123119
|
+
{
|
|
123120
|
+
onSuccess(data) {
|
|
123121
|
+
var _a2, _b2;
|
|
123122
|
+
const success2 = (_a2 = data.sendRawCsv) == null ? void 0 : _a2.status;
|
|
123123
|
+
const error2 = (_b2 = data.sendRawCsv) == null ? void 0 : _b2.error;
|
|
123124
|
+
if (success2) {
|
|
123125
|
+
setError("");
|
|
123126
|
+
setLoading(false);
|
|
123127
|
+
onCloseModal(false);
|
|
123128
|
+
} else if (error2) {
|
|
123129
|
+
setError(error2.message);
|
|
123130
|
+
setLoading(false);
|
|
123131
|
+
} else {
|
|
123132
|
+
setError(SOMETHING_WENT_WRONG);
|
|
123133
|
+
setLoading(false);
|
|
123134
|
+
}
|
|
123135
|
+
}
|
|
123136
|
+
}
|
|
123137
|
+
);
|
|
123138
|
+
};
|
|
123139
|
+
const saveRawCsvDetails = ({
|
|
123140
|
+
values,
|
|
123141
|
+
clientName,
|
|
123142
|
+
tenancyType
|
|
123143
|
+
}) => {
|
|
123144
|
+
setLoading(true);
|
|
123145
|
+
setError("");
|
|
123146
|
+
invokeSaveRawCsvDetailsMutation(
|
|
123147
|
+
{
|
|
123148
|
+
configurations: { metricItem, fieldValues: values },
|
|
123149
|
+
expireCsvFileAt: values.expireCsvFileAt,
|
|
123150
|
+
expireUrlIn: parseInt(values.expireUrlIn, 10),
|
|
123151
|
+
externalMetricId: metricItem == null ? void 0 : metricItem.id,
|
|
123152
|
+
integrationId: metricItem == null ? void 0 : metricItem.companyIntegrationId,
|
|
123153
|
+
integrationName: metricItem == null ? void 0 : metricItem.integrationName,
|
|
123154
|
+
query: getSqlStatement({
|
|
123155
|
+
query: metricItem == null ? void 0 : metricItem.query,
|
|
123156
|
+
clientName,
|
|
123157
|
+
tenancyType,
|
|
123158
|
+
values
|
|
123159
|
+
})
|
|
123160
|
+
},
|
|
123161
|
+
{
|
|
123162
|
+
onSuccess({ invokeSaveRawCsvDetails }) {
|
|
123163
|
+
if (invokeSaveRawCsvDetails == null ? void 0 : invokeSaveRawCsvDetails.statusCode) {
|
|
123164
|
+
setLoading(false);
|
|
123165
|
+
onCloseModal(false);
|
|
123166
|
+
} else if (invokeSaveRawCsvDetails == null ? void 0 : invokeSaveRawCsvDetails.error) {
|
|
123167
|
+
setLoading(false);
|
|
123168
|
+
setError(invokeSaveRawCsvDetails.error);
|
|
123169
|
+
} else {
|
|
123170
|
+
setLoading(false);
|
|
123171
|
+
setError(SOMETHING_WENT_WRONG);
|
|
123172
|
+
}
|
|
123173
|
+
},
|
|
123174
|
+
onError() {
|
|
123175
|
+
setLoading(false);
|
|
123176
|
+
setError(SOMETHING_WENT_WRONG);
|
|
123177
|
+
}
|
|
123178
|
+
}
|
|
123179
|
+
);
|
|
123180
|
+
};
|
|
123181
|
+
return {
|
|
123182
|
+
isLoading,
|
|
123183
|
+
downloadCsvError,
|
|
123184
|
+
onSubmitDownloadCsv,
|
|
123185
|
+
handleSubmit,
|
|
123186
|
+
register: register2,
|
|
123187
|
+
csvDownloadUrls,
|
|
123188
|
+
handleDownload,
|
|
123189
|
+
csvDownloadUrlError,
|
|
123190
|
+
saveRawCsvDetails
|
|
123191
|
+
};
|
|
123192
|
+
};
|
|
123193
|
+
const required = { required: "Required" };
|
|
123194
|
+
const asEmail = {
|
|
123195
|
+
...required,
|
|
123196
|
+
pattern: {
|
|
123197
|
+
value: /^\S+@\S+$/i,
|
|
123198
|
+
message: "Entered value does not match email format"
|
|
123199
|
+
}
|
|
123200
|
+
};
|
|
123201
|
+
({
|
|
123202
|
+
...required,
|
|
123203
|
+
minLength: {
|
|
123204
|
+
value: 8,
|
|
123205
|
+
message: "Min length is 8"
|
|
123206
|
+
}
|
|
123207
|
+
});
|
|
123208
|
+
({
|
|
123209
|
+
...required,
|
|
123210
|
+
minLength: {
|
|
123211
|
+
value: 3,
|
|
123212
|
+
message: "Min length is 3"
|
|
123213
|
+
}
|
|
123214
|
+
});
|
|
123215
|
+
const DownloadRawCsvModal = ({
|
|
123216
|
+
onCloseModal,
|
|
123217
|
+
isShowRawCsvModal,
|
|
123218
|
+
metricItem,
|
|
123219
|
+
client,
|
|
123220
|
+
companyTenancyType
|
|
123221
|
+
}) => {
|
|
123222
|
+
const [rawCsvType, setRawCsvType] = useState(RAW_CSV_OPTIONS[0]);
|
|
123223
|
+
const {
|
|
123224
|
+
downloadCsvError,
|
|
123225
|
+
handleSubmit,
|
|
123226
|
+
isLoading,
|
|
123227
|
+
onSubmitDownloadCsv,
|
|
123228
|
+
register: register2,
|
|
123229
|
+
csvDownloadUrls,
|
|
123230
|
+
handleDownload,
|
|
123231
|
+
csvDownloadUrlError,
|
|
123232
|
+
saveRawCsvDetails
|
|
123233
|
+
} = useDownloadRawCsv(onCloseModal, metricItem);
|
|
123234
|
+
return /* @__PURE__ */ jsx(Modal, {
|
|
123235
|
+
isOpen: isShowRawCsvModal,
|
|
123236
|
+
onClose: () => onCloseModal(false),
|
|
123237
|
+
headerTitle: "Raw CSV",
|
|
123238
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
123239
|
+
className: styles$a.downloadCsv,
|
|
123240
|
+
children: [/* @__PURE__ */ jsx(Tab, {
|
|
123241
|
+
activeTab: rawCsvType,
|
|
123242
|
+
options: RAW_CSV_OPTIONS,
|
|
123243
|
+
setActiveTab: setRawCsvType,
|
|
123244
|
+
className: styles$a["tab-border-bottom"]
|
|
123245
|
+
}), rawCsvType === RAW_CSV_OPTIONS[1] && /* @__PURE__ */ jsxs("form", {
|
|
123246
|
+
onSubmit: handleSubmit((values) => onSubmitDownloadCsv({
|
|
123247
|
+
values,
|
|
123248
|
+
sqlQuery: metricItem == null ? void 0 : metricItem.query,
|
|
123249
|
+
companyId: metricItem == null ? void 0 : metricItem.companyId,
|
|
123250
|
+
clientName: client,
|
|
123251
|
+
tenancyType: companyTenancyType,
|
|
123252
|
+
metricName: metricItem == null ? void 0 : metricItem.name,
|
|
123253
|
+
workspaceId: metricItem == null ? void 0 : metricItem.companyIntegration.workspaceId
|
|
123254
|
+
})),
|
|
123255
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
123256
|
+
className: styles$a.downloadCsvWrapper,
|
|
123257
|
+
children: [/* @__PURE__ */ jsx(InputField, {
|
|
123258
|
+
type: "email",
|
|
123259
|
+
label: "email",
|
|
123260
|
+
placeholder: "enter a valid email",
|
|
123261
|
+
register: register2("email", asEmail)
|
|
123262
|
+
}), downloadCsvError && /* @__PURE__ */ jsx(Error$1, {
|
|
123263
|
+
message: downloadCsvError
|
|
123264
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
123265
|
+
className: styles$a.downloadCsvNote,
|
|
123266
|
+
children: [/* @__PURE__ */ jsx(Icons, {
|
|
123267
|
+
name: "info-icon",
|
|
123268
|
+
className: styles$a.popupItemIcon
|
|
123269
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
123270
|
+
className: styles$a.downloadCsvNoteText,
|
|
123271
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
123272
|
+
styleClass: "primary",
|
|
123273
|
+
variant: "h1",
|
|
123274
|
+
children: "Note:"
|
|
123275
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
123276
|
+
styleClass: "font-14",
|
|
123277
|
+
variant: "p",
|
|
123278
|
+
children: "You will shortly receive a mail with CSV attached to the above email id, once you click on Submit"
|
|
123279
|
+
})]
|
|
123280
|
+
})]
|
|
123281
|
+
})]
|
|
123282
|
+
}), /* @__PURE__ */ jsxs(ModalFooter, {
|
|
123283
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
123284
|
+
variant: "custom",
|
|
123285
|
+
type: "button",
|
|
123286
|
+
size: "small",
|
|
123287
|
+
className: styles$a.downloadCsvCancelBtn,
|
|
123288
|
+
onClick: () => onCloseModal(false),
|
|
123289
|
+
isDisabled: isLoading,
|
|
123290
|
+
children: "Cancel"
|
|
123291
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
123292
|
+
variant: "primary",
|
|
123293
|
+
type: "submit",
|
|
123294
|
+
size: "small",
|
|
123295
|
+
isDisabled: isLoading,
|
|
123296
|
+
children: "Submit"
|
|
123297
|
+
})]
|
|
123298
|
+
})]
|
|
123299
|
+
}), rawCsvType === RAW_CSV_OPTIONS[0] && /* @__PURE__ */ jsx("div", {
|
|
123300
|
+
children: !csvDownloadUrls.isExpired ? /* @__PURE__ */ jsxs(Fragment, {
|
|
123301
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
123302
|
+
className: styles$a.downloadCsvWrapper,
|
|
123303
|
+
children: [/* @__PURE__ */ jsxs(Text, {
|
|
123304
|
+
variant: "p",
|
|
123305
|
+
styleClass: "primary",
|
|
123306
|
+
children: ["Last download request:", /* @__PURE__ */ jsx("span", {
|
|
123307
|
+
className: styles$a["download-info-text"],
|
|
123308
|
+
children: csvDownloadUrls.lastUpdatedAt
|
|
123309
|
+
})]
|
|
123310
|
+
}), /* @__PURE__ */ jsxs(Text, {
|
|
123311
|
+
variant: "p",
|
|
123312
|
+
styleClass: "primary",
|
|
123313
|
+
children: ["Url will expire in :", /* @__PURE__ */ jsxs("span", {
|
|
123314
|
+
className: styles$a["download-info-text"],
|
|
123315
|
+
children: [csvDownloadUrls.expireUrlIn, " sec"]
|
|
123316
|
+
})]
|
|
123317
|
+
}), csvDownloadUrlError && /* @__PURE__ */ jsx(Error$1, {
|
|
123318
|
+
message: csvDownloadUrlError
|
|
123319
|
+
})]
|
|
123320
|
+
}), /* @__PURE__ */ jsxs(ModalFooter, {
|
|
123321
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
123322
|
+
variant: "custom",
|
|
123323
|
+
type: "button",
|
|
123324
|
+
size: "small",
|
|
123325
|
+
className: styles$a.downloadCsvCancelBtn,
|
|
123326
|
+
onClick: () => onCloseModal(false),
|
|
123327
|
+
isDisabled: isLoading,
|
|
123328
|
+
children: "Cancel"
|
|
123329
|
+
}), csvDownloadUrls.urls.map((url) => /* @__PURE__ */ jsx(Button, {
|
|
123330
|
+
variant: "primary",
|
|
123331
|
+
type: "button",
|
|
123332
|
+
size: "medium",
|
|
123333
|
+
onClick: () => handleDownload(url),
|
|
123334
|
+
children: "Download"
|
|
123335
|
+
}))]
|
|
123336
|
+
})]
|
|
123337
|
+
}) : /* @__PURE__ */ jsxs("form", {
|
|
123338
|
+
onSubmit: handleSubmit((values) => saveRawCsvDetails({
|
|
123339
|
+
values,
|
|
123340
|
+
clientName: client,
|
|
123341
|
+
tenancyType: companyTenancyType
|
|
123342
|
+
})),
|
|
123343
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
123344
|
+
className: styles$a.downloadCsvWrapper,
|
|
123345
|
+
children: [/* @__PURE__ */ jsx(InputField, {
|
|
123346
|
+
type: "date",
|
|
123347
|
+
label: "File Expire",
|
|
123348
|
+
placeholder: "select expire date for file",
|
|
123349
|
+
register: register2("expireCsvFileAt"),
|
|
123350
|
+
pattern: "(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))"
|
|
123351
|
+
}), /* @__PURE__ */ jsx(InputField, {
|
|
123352
|
+
type: "number",
|
|
123353
|
+
label: "Download URL expire (sec)",
|
|
123354
|
+
placeholder: "120",
|
|
123355
|
+
register: register2("expireUrlIn"),
|
|
123356
|
+
defaultValue: 120,
|
|
123357
|
+
min: 60
|
|
123358
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
123359
|
+
className: styles$a.downloadCsvNote,
|
|
123360
|
+
children: [/* @__PURE__ */ jsx(Icons, {
|
|
123361
|
+
name: "info-icon",
|
|
123362
|
+
className: styles$a.popupItemIcon
|
|
123363
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
123364
|
+
className: styles$a.downloadCsvNoteText,
|
|
123365
|
+
children: [/* @__PURE__ */ jsx(Text, {
|
|
123366
|
+
styleClass: "primary",
|
|
123367
|
+
variant: "h1",
|
|
123368
|
+
children: "Note:"
|
|
123369
|
+
}), /* @__PURE__ */ jsx(Text, {
|
|
123370
|
+
styleClass: "font-14",
|
|
123371
|
+
variant: "p",
|
|
123372
|
+
children: "Please check again in some time, download link will be available."
|
|
123373
|
+
})]
|
|
123374
|
+
})]
|
|
123375
|
+
}), csvDownloadUrls.error && /* @__PURE__ */ jsx(Error$1, {
|
|
123376
|
+
message: csvDownloadUrls.error
|
|
123377
|
+
}), downloadCsvError && /* @__PURE__ */ jsx(Error$1, {
|
|
123378
|
+
message: downloadCsvError
|
|
123379
|
+
})]
|
|
123380
|
+
}), /* @__PURE__ */ jsxs(ModalFooter, {
|
|
123381
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
123382
|
+
variant: "custom",
|
|
123383
|
+
type: "button",
|
|
123384
|
+
size: "small",
|
|
123385
|
+
className: styles$a.downloadCsvCancelBtn,
|
|
123386
|
+
onClick: () => onCloseModal(false),
|
|
123387
|
+
isDisabled: isLoading,
|
|
123388
|
+
children: "Cancel"
|
|
123389
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
123390
|
+
variant: "primary",
|
|
123391
|
+
type: "submit",
|
|
123392
|
+
size: "small",
|
|
123393
|
+
isDisabled: isLoading,
|
|
123394
|
+
children: "Submit"
|
|
123395
|
+
})]
|
|
123396
|
+
})]
|
|
123397
|
+
})
|
|
123398
|
+
})]
|
|
123399
|
+
})
|
|
123400
|
+
});
|
|
123401
|
+
};
|
|
123402
|
+
const TableViewModal = ({
|
|
123403
|
+
metricData: metricData2,
|
|
123404
|
+
isOpen,
|
|
123405
|
+
onClose,
|
|
123406
|
+
title: title2
|
|
123407
|
+
}) => {
|
|
123408
|
+
return /* @__PURE__ */ jsx(Modal, {
|
|
123409
|
+
isOpen,
|
|
123410
|
+
onClose: () => onClose(),
|
|
123411
|
+
headerTitle: title2,
|
|
123412
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
123413
|
+
className: styles$a.fullscreen,
|
|
123414
|
+
children: /* @__PURE__ */ jsx(Table, {
|
|
123415
|
+
data: metricData2 || [],
|
|
123416
|
+
isLoading: false,
|
|
123417
|
+
error: ""
|
|
123418
|
+
})
|
|
123419
|
+
})
|
|
123420
|
+
});
|
|
123421
|
+
};
|
|
123199
123422
|
const GridLayout = reactGridLayout.exports.WidthProvider(reactGridLayout.exports.Responsive);
|
|
123200
123423
|
const ExternalMetricList = ({
|
|
123201
123424
|
chartColors,
|
|
@@ -123216,6 +123439,7 @@ const ExternalMetricList = ({
|
|
|
123216
123439
|
companyId,
|
|
123217
123440
|
workspaceId
|
|
123218
123441
|
}) => {
|
|
123442
|
+
var _a2;
|
|
123219
123443
|
const [isFullScreen, setFullScreen] = useState(false);
|
|
123220
123444
|
const [archiveModal, setArchiveModal] = useState({
|
|
123221
123445
|
id: "",
|
|
@@ -123228,6 +123452,12 @@ const ExternalMetricList = ({
|
|
|
123228
123452
|
const [editModal, setEditModal] = useState({
|
|
123229
123453
|
show: false
|
|
123230
123454
|
});
|
|
123455
|
+
const [tableViewModal, setTableViewModal] = useState({
|
|
123456
|
+
show: false
|
|
123457
|
+
});
|
|
123458
|
+
const [rawCsvModal, setRawCsvModal] = useState({
|
|
123459
|
+
show: false
|
|
123460
|
+
});
|
|
123231
123461
|
const [fullScreenChart, setFullScreenChart] = useState();
|
|
123232
123462
|
const {
|
|
123233
123463
|
saveLayout,
|
|
@@ -123346,10 +123576,37 @@ const ExternalMetricList = ({
|
|
|
123346
123576
|
show: true,
|
|
123347
123577
|
metric,
|
|
123348
123578
|
metricData: metricData2
|
|
123349
|
-
}) : void 0
|
|
123579
|
+
}) : void 0,
|
|
123580
|
+
onTableView: (metric, metricData2) => setTableViewModal({
|
|
123581
|
+
show: true,
|
|
123582
|
+
metricData: metricData2,
|
|
123583
|
+
metric
|
|
123584
|
+
}),
|
|
123585
|
+
onDownloadRawCsv: (metric) => setRawCsvModal({
|
|
123586
|
+
metric,
|
|
123587
|
+
show: true
|
|
123588
|
+
})
|
|
123350
123589
|
})
|
|
123351
123590
|
}, metricItem.id))
|
|
123352
123591
|
})]
|
|
123592
|
+
}), /* @__PURE__ */ jsx(TableViewModal, {
|
|
123593
|
+
onClose: () => setTableViewModal({
|
|
123594
|
+
show: false,
|
|
123595
|
+
metric: void 0,
|
|
123596
|
+
metricData: void 0
|
|
123597
|
+
}),
|
|
123598
|
+
isOpen: tableViewModal.show,
|
|
123599
|
+
title: ((_a2 = tableViewModal.metric) == null ? void 0 : _a2.name) || "Table view",
|
|
123600
|
+
metricData: tableViewModal.metricData
|
|
123601
|
+
}), /* @__PURE__ */ jsx(DownloadRawCsvModal, {
|
|
123602
|
+
client,
|
|
123603
|
+
companyTenancyType,
|
|
123604
|
+
isShowRawCsvModal: rawCsvModal.show,
|
|
123605
|
+
metricItem: rawCsvModal.metric,
|
|
123606
|
+
onCloseModal: (value) => setRawCsvModal({
|
|
123607
|
+
metric: void 0,
|
|
123608
|
+
show: value
|
|
123609
|
+
})
|
|
123353
123610
|
}), /* @__PURE__ */ jsx(FullScreenChart, {
|
|
123354
123611
|
onCancel: () => setFullScreen(false),
|
|
123355
123612
|
isShow: isFullScreen,
|
|
@@ -123515,6 +123772,8 @@ var index$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
|
|
|
123515
123772
|
SingleValueCard,
|
|
123516
123773
|
ArchiveMetricModal,
|
|
123517
123774
|
LayoutAlert,
|
|
123775
|
+
TableViewModal,
|
|
123776
|
+
DownloadRawCsvModal,
|
|
123518
123777
|
MetricTable,
|
|
123519
123778
|
Modal,
|
|
123520
123779
|
ModalFooter,
|
|
@@ -123548,33 +123807,33 @@ const mdiPlus = (props) => /* @__PURE__ */ jsx("svg", {
|
|
|
123548
123807
|
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"
|
|
123549
123808
|
})
|
|
123550
123809
|
});
|
|
123551
|
-
const scheduleEmailButton = "
|
|
123810
|
+
const scheduleEmailButton = "_scheduleEmailButton_101bq_1";
|
|
123552
123811
|
var styles$2 = {
|
|
123553
123812
|
scheduleEmailButton
|
|
123554
123813
|
};
|
|
123555
123814
|
var styles$1 = {
|
|
123556
|
-
"form-container": "_form-
|
|
123557
|
-
"form-wrapper": "_form-
|
|
123558
|
-
"form-primary-text": "_form-primary-
|
|
123559
|
-
"week-days-container": "_week-days-
|
|
123560
|
-
"main-label": "_main-
|
|
123561
|
-
"time-element": "_time-
|
|
123562
|
-
"cancel-btn": "_cancel-
|
|
123563
|
-
"delete-btn": "_delete-
|
|
123564
|
-
"field-width": "_field-
|
|
123565
|
-
"timezone-field": "_timezone-
|
|
123566
|
-
"success-text": "_success-
|
|
123815
|
+
"form-container": "_form-container_63pgj_1",
|
|
123816
|
+
"form-wrapper": "_form-wrapper_63pgj_7",
|
|
123817
|
+
"form-primary-text": "_form-primary-text_63pgj_15",
|
|
123818
|
+
"week-days-container": "_week-days-container_63pgj_23",
|
|
123819
|
+
"main-label": "_main-label_63pgj_29",
|
|
123820
|
+
"time-element": "_time-element_63pgj_37",
|
|
123821
|
+
"cancel-btn": "_cancel-btn_63pgj_45",
|
|
123822
|
+
"delete-btn": "_delete-btn_63pgj_51",
|
|
123823
|
+
"field-width": "_field-width_63pgj_57",
|
|
123824
|
+
"timezone-field": "_timezone-field_63pgj_65",
|
|
123825
|
+
"success-text": "_success-text_63pgj_73"
|
|
123567
123826
|
};
|
|
123568
|
-
const tag = "
|
|
123569
|
-
const tagBtn = "
|
|
123570
|
-
const inputFieldContainer = "
|
|
123827
|
+
const tag = "_tag_akdrv_1";
|
|
123828
|
+
const tagBtn = "_tagBtn_akdrv_13";
|
|
123829
|
+
const inputFieldContainer = "_inputFieldContainer_akdrv_21";
|
|
123571
123830
|
var styles = {
|
|
123572
123831
|
tag,
|
|
123573
|
-
"tag-text": "_tag-
|
|
123832
|
+
"tag-text": "_tag-text_akdrv_7",
|
|
123574
123833
|
tagBtn,
|
|
123575
123834
|
inputFieldContainer,
|
|
123576
|
-
"tag-container": "_tag-
|
|
123577
|
-
"cross-icon": "_cross-
|
|
123835
|
+
"tag-container": "_tag-container_akdrv_29",
|
|
123836
|
+
"cross-icon": "_cross-icon_akdrv_37"
|
|
123578
123837
|
};
|
|
123579
123838
|
const TagInputField = ({
|
|
123580
123839
|
control,
|