@databrainhq/plugin 0.4.7 → 0.5.0
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/MetricCreation/index.d.ts +1 -1
- package/dist/components/MetricList/index.d.ts +4 -1
- package/dist/containers/Dashboard/index.d.ts +7 -0
- package/dist/index.es.js +807 -684
- package/dist/index.umd.js +124 -135
- package/dist/style.css +1 -1
- package/dist/types/metricCreate.d.ts +2 -0
- package/dist/utils/theme.d.ts +87 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$6 from "react";
|
|
2
|
-
import React__default, { PureComponent, forwardRef, useRef, useEffect, useState,
|
|
2
|
+
import React__default, { PureComponent, forwardRef, useRef, useEffect, useState, useLayoutEffect, Fragment as Fragment$1, isValidElement, cloneElement as cloneElement$1, createElement as createElement$1, createContext as createContext$1, useContext, useMemo, useReducer, createRef, useCallback, memo } from "react";
|
|
3
3
|
import require$$2$1 from "react-dom";
|
|
4
4
|
function _setPrototypeOf$7(o2, p2) {
|
|
5
5
|
_setPrototypeOf$7 = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf2(o3, p3) {
|
|
@@ -2512,73 +2512,75 @@ function useQuery(arg1, arg2, arg3) {
|
|
|
2512
2512
|
var parsedOptions = parseQueryArgs(arg1, arg2, arg3);
|
|
2513
2513
|
return useBaseQuery(parsedOptions, QueryObserver);
|
|
2514
2514
|
}
|
|
2515
|
-
const container$e = "
|
|
2516
|
-
const fixed = "
|
|
2517
|
-
const absolute = "
|
|
2518
|
-
const
|
|
2519
|
-
const
|
|
2520
|
-
const
|
|
2521
|
-
const
|
|
2522
|
-
const
|
|
2523
|
-
const
|
|
2524
|
-
const
|
|
2525
|
-
const
|
|
2526
|
-
const
|
|
2527
|
-
|
|
2515
|
+
const container$e = "_container_gr5gv_1";
|
|
2516
|
+
const fixed = "_fixed_gr5gv_1";
|
|
2517
|
+
const absolute = "_absolute_gr5gv_1";
|
|
2518
|
+
const flex = "_flex_gr5gv_1";
|
|
2519
|
+
const table$4 = "_table_gr5gv_1";
|
|
2520
|
+
const grid = "_grid_gr5gv_1";
|
|
2521
|
+
const hidden = "_hidden_gr5gv_1";
|
|
2522
|
+
const transform = "_transform_gr5gv_1";
|
|
2523
|
+
const border = "_border_gr5gv_1";
|
|
2524
|
+
const shadow = "_shadow_gr5gv_1";
|
|
2525
|
+
const filter$1 = "_filter_gr5gv_347";
|
|
2526
|
+
const floatingFilterButton = "_floatingFilterButton_gr5gv_355";
|
|
2527
|
+
const floatingFilterButtonIcon = "_floatingFilterButtonIcon_gr5gv_363";
|
|
2528
|
+
const floatingButton = "_floatingButton_gr5gv_371";
|
|
2529
|
+
const floatingButtonIcon = "_floatingButtonIcon_gr5gv_379";
|
|
2530
|
+
const staticContainer = "_staticContainer_gr5gv_387";
|
|
2531
|
+
const floatingContainer = "_floatingContainer_gr5gv_395";
|
|
2532
|
+
var styles$A = {
|
|
2528
2533
|
container: container$e,
|
|
2529
|
-
"static": "
|
|
2534
|
+
"static": "_static_gr5gv_387",
|
|
2530
2535
|
fixed,
|
|
2531
2536
|
absolute,
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
"
|
|
2535
|
-
"
|
|
2536
|
-
"
|
|
2537
|
-
"mb-
|
|
2538
|
-
"mt-2": "_mt-2_11uys_1",
|
|
2539
|
-
"mt-2.5": "_mt-2.5_11uys_1",
|
|
2540
|
-
"mb-3": "_mb-3_11uys_1",
|
|
2537
|
+
"left-2": "_left-2_gr5gv_1",
|
|
2538
|
+
"top-1": "_top-1_gr5gv_1",
|
|
2539
|
+
"mb-2": "_mb-2_gr5gv_1",
|
|
2540
|
+
"mt-2": "_mt-2_gr5gv_1",
|
|
2541
|
+
"mt-2.5": "_mt-2.5_gr5gv_1",
|
|
2542
|
+
"mb-3": "_mb-3_gr5gv_1",
|
|
2541
2543
|
flex,
|
|
2542
2544
|
table: table$4,
|
|
2543
2545
|
grid,
|
|
2544
2546
|
hidden,
|
|
2545
|
-
"h-screen": "_h-
|
|
2546
|
-
"h-full": "_h-
|
|
2547
|
-
"h-
|
|
2548
|
-
"
|
|
2549
|
-
"
|
|
2550
|
-
"h-80": "_h-80_11uys_1",
|
|
2551
|
-
"w-screen": "_w-screen_11uys_1",
|
|
2552
|
-
"w-full": "_w-full_11uys_1",
|
|
2553
|
-
"w-64": "_w-64_11uys_1",
|
|
2547
|
+
"h-screen": "_h-screen_gr5gv_1",
|
|
2548
|
+
"h-full": "_h-full_gr5gv_1",
|
|
2549
|
+
"h-80": "_h-80_gr5gv_1",
|
|
2550
|
+
"w-screen": "_w-screen_gr5gv_1",
|
|
2551
|
+
"w-full": "_w-full_gr5gv_1",
|
|
2554
2552
|
transform,
|
|
2555
|
-
"flex-col": "_flex-
|
|
2556
|
-
"items-center": "_items-
|
|
2557
|
-
"justify-center": "_justify-
|
|
2558
|
-
"gap-5": "_gap-
|
|
2559
|
-
"divide-solid": "_divide-
|
|
2560
|
-
"overflow-y-auto": "_overflow-y-
|
|
2561
|
-
"overflow-x-hidden": "_overflow-x-
|
|
2562
|
-
|
|
2563
|
-
"border-
|
|
2564
|
-
"
|
|
2565
|
-
"p-
|
|
2566
|
-
"
|
|
2567
|
-
"
|
|
2568
|
-
"
|
|
2569
|
-
"text-
|
|
2570
|
-
"text-
|
|
2571
|
-
"text-
|
|
2572
|
-
"text-sm": "_text-sm_11uys_1",
|
|
2573
|
-
"text-xs": "_text-xs_11uys_1",
|
|
2574
|
-
"text-blue-700": "_text-blue-700_11uys_1",
|
|
2553
|
+
"flex-col": "_flex-col_gr5gv_1",
|
|
2554
|
+
"items-center": "_items-center_gr5gv_1",
|
|
2555
|
+
"justify-center": "_justify-center_gr5gv_1",
|
|
2556
|
+
"gap-5": "_gap-5_gr5gv_1",
|
|
2557
|
+
"divide-solid": "_divide-solid_gr5gv_1",
|
|
2558
|
+
"overflow-y-auto": "_overflow-y-auto_gr5gv_1",
|
|
2559
|
+
"overflow-x-hidden": "_overflow-x-hidden_gr5gv_1",
|
|
2560
|
+
border,
|
|
2561
|
+
"border-2": "_border-2_gr5gv_1",
|
|
2562
|
+
"p-4": "_p-4_gr5gv_1",
|
|
2563
|
+
"p-2": "_p-2_gr5gv_1",
|
|
2564
|
+
"text-center": "_text-center_gr5gv_1",
|
|
2565
|
+
"text-lg": "_text-lg_gr5gv_1",
|
|
2566
|
+
"text-6xl": "_text-6xl_gr5gv_1",
|
|
2567
|
+
"text-sm": "_text-sm_gr5gv_1",
|
|
2568
|
+
"text-xs": "_text-xs_gr5gv_1",
|
|
2569
|
+
"text-blue-700": "_text-blue-700_gr5gv_1",
|
|
2575
2570
|
shadow,
|
|
2576
2571
|
filter: filter$1,
|
|
2577
|
-
"!filter": "_!
|
|
2578
|
-
"embedDashboard-container": "_embedDashboard-
|
|
2579
|
-
"embedDashboard-header": "_embedDashboard-
|
|
2580
|
-
"embedDashboard-
|
|
2581
|
-
"
|
|
2572
|
+
"!filter": "_!filter_gr5gv_1",
|
|
2573
|
+
"embedDashboard-container": "_embedDashboard-container_gr5gv_307",
|
|
2574
|
+
"embedDashboard-header-static": "_embedDashboard-header-static_gr5gv_315",
|
|
2575
|
+
"embedDashboard-header-floating": "_embedDashboard-header-floating_gr5gv_323",
|
|
2576
|
+
"embedDashboard-wrapper": "_embedDashboard-wrapper_gr5gv_331",
|
|
2577
|
+
"alt-container": "_alt-container_gr5gv_339",
|
|
2578
|
+
floatingFilterButton,
|
|
2579
|
+
floatingFilterButtonIcon,
|
|
2580
|
+
floatingButton,
|
|
2581
|
+
floatingButtonIcon,
|
|
2582
|
+
staticContainer,
|
|
2583
|
+
floatingContainer
|
|
2582
2584
|
};
|
|
2583
2585
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2584
2586
|
function getAugmentedNamespace(n2) {
|
|
@@ -7841,271 +7843,14 @@ function WidthProvideRGL(ComposedComponent) {
|
|
|
7841
7843
|
module.exports.Responsive.utils = responsiveUtils;
|
|
7842
7844
|
module.exports.WidthProvider = WidthProvider.default;
|
|
7843
7845
|
})(reactGridLayout);
|
|
7844
|
-
var styles$
|
|
7845
|
-
var styles$
|
|
7846
|
-
"MetricList-container": "_MetricList-
|
|
7847
|
-
"MetricList-wrapper": "_MetricList-
|
|
7848
|
-
"noMetric-container": "_noMetric-
|
|
7849
|
-
"noMetric-wrapper": "_noMetric-
|
|
7850
|
-
"alt-container": "_alt-
|
|
7851
|
-
};
|
|
7852
|
-
const fetcher = (query, variables, options2) => {
|
|
7853
|
-
return async () => {
|
|
7854
|
-
const res = await fetch("https://backend.usedatabrain.com/v1/graphql", {
|
|
7855
|
-
method: "POST",
|
|
7856
|
-
headers: {
|
|
7857
|
-
"Content-Type": "application/json",
|
|
7858
|
-
"X-Hasura-Role": "anonymous",
|
|
7859
|
-
...options2
|
|
7860
|
-
},
|
|
7861
|
-
body: JSON.stringify({
|
|
7862
|
-
query,
|
|
7863
|
-
variables
|
|
7864
|
-
})
|
|
7865
|
-
});
|
|
7866
|
-
const json = await res.json();
|
|
7867
|
-
if (json.errors) {
|
|
7868
|
-
const { message } = json.errors[0];
|
|
7869
|
-
throw new Error(message);
|
|
7870
|
-
}
|
|
7871
|
-
return json.data;
|
|
7872
|
-
};
|
|
7846
|
+
var styles$z = "";
|
|
7847
|
+
var styles$y = {
|
|
7848
|
+
"MetricList-container": "_MetricList-container_1b506_1",
|
|
7849
|
+
"MetricList-wrapper": "_MetricList-wrapper_1b506_9",
|
|
7850
|
+
"noMetric-container": "_noMetric-container_1b506_17",
|
|
7851
|
+
"noMetric-wrapper": "_noMetric-wrapper_1b506_25",
|
|
7852
|
+
"alt-container": "_alt-container_1b506_33"
|
|
7873
7853
|
};
|
|
7874
|
-
const CreateExternalMetricDocument = `
|
|
7875
|
-
mutation CreateExternalMetric($chartOptions: jsonb = "", $companyId: uuid = "", $companyIntegrationId: uuid = "", $description: String = "", $inputFields: jsonb = "", $integrationName: String = "", $metricId: String = "", $metricQuery: String = "", $name: String = "", $outputColumns: String = "", $query: String = "", $isLive: Boolean, $clientId: String = "", $isCreatedByClient: Boolean = false, $createdBy: String = "", $timeGrain: String = "", $externalDashboardIds: [externalDashboardMetrics_insert_input!] = {}, $selectedGroupBy: jsonb = [], $isEnableGroupBy: Boolean = false, $groupBy: jsonb = {}) {
|
|
7876
|
-
insert_externalMetrics_one(
|
|
7877
|
-
object: {chartOptions: $chartOptions, companyId: $companyId, companyIntegrationId: $companyIntegrationId, description: $description, inputFields: $inputFields, integrationName: $integrationName, metricId: $metricId, metricQuery: $metricQuery, name: $name, outputColumns: $outputColumns, query: $query, isLive: $isLive, clientId: $clientId, isCreatedByClient: $isCreatedByClient, createdBy: $createdBy, timeGrain: $timeGrain, externalDashboardMetrics: {data: $externalDashboardIds}, selectedGroupBy: $selectedGroupBy, isEnableGroupBy: $isEnableGroupBy, groupBy: $groupBy}
|
|
7878
|
-
) {
|
|
7879
|
-
id
|
|
7880
|
-
externalDashboardMetrics {
|
|
7881
|
-
externalDashboardId
|
|
7882
|
-
}
|
|
7883
|
-
}
|
|
7884
|
-
}
|
|
7885
|
-
`;
|
|
7886
|
-
const useCreateExternalMetricMutation = (options2) => useMutation(
|
|
7887
|
-
["CreateExternalMetric"],
|
|
7888
|
-
(variables) => fetcher(CreateExternalMetricDocument, variables)(),
|
|
7889
|
-
options2
|
|
7890
|
-
);
|
|
7891
|
-
const FetchColumnDataDocument = `
|
|
7892
|
-
mutation FetchColumnData($companyId: String = "", $tableName: String = "", $columnName: String = "") {
|
|
7893
|
-
fetchColumnData(
|
|
7894
|
-
input: {columnName: $columnName, companyId: $companyId, tableName: $tableName}
|
|
7895
|
-
) {
|
|
7896
|
-
data {
|
|
7897
|
-
label
|
|
7898
|
-
value
|
|
7899
|
-
}
|
|
7900
|
-
error {
|
|
7901
|
-
message
|
|
7902
|
-
}
|
|
7903
|
-
}
|
|
7904
|
-
}
|
|
7905
|
-
`;
|
|
7906
|
-
const useFetchColumnDataMutation = (options2) => useMutation(
|
|
7907
|
-
["FetchColumnData"],
|
|
7908
|
-
(variables) => fetcher(
|
|
7909
|
-
FetchColumnDataDocument,
|
|
7910
|
-
variables
|
|
7911
|
-
)(),
|
|
7912
|
-
options2
|
|
7913
|
-
);
|
|
7914
|
-
const GenerateDatasetMetricsDocument = `
|
|
7915
|
-
mutation GenerateDatasetMetrics($companyId: String = "", $userInputs: json = "") {
|
|
7916
|
-
generateDatasetMetrics(input: {companyId: $companyId, userInputs: $userInputs}) {
|
|
7917
|
-
error
|
|
7918
|
-
query
|
|
7919
|
-
result
|
|
7920
|
-
}
|
|
7921
|
-
}
|
|
7922
|
-
`;
|
|
7923
|
-
const useGenerateDatasetMetricsMutation = (options2) => useMutation(
|
|
7924
|
-
["GenerateDatasetMetrics"],
|
|
7925
|
-
(variables) => fetcher(GenerateDatasetMetricsDocument, variables)(),
|
|
7926
|
-
options2
|
|
7927
|
-
);
|
|
7928
|
-
const CompanyIntegrationDocument = `
|
|
7929
|
-
query CompanyIntegration($companyId: uuid = "") {
|
|
7930
|
-
companyIntegrations(where: {companyId: {_eq: $companyId}}) {
|
|
7931
|
-
companyId
|
|
7932
|
-
id
|
|
7933
|
-
integrationId
|
|
7934
|
-
name
|
|
7935
|
-
}
|
|
7936
|
-
}
|
|
7937
|
-
`;
|
|
7938
|
-
const useCompanyIntegrationQuery = (variables, options2) => useQuery(
|
|
7939
|
-
variables === void 0 ? ["CompanyIntegration"] : ["CompanyIntegration", variables],
|
|
7940
|
-
fetcher(
|
|
7941
|
-
CompanyIntegrationDocument,
|
|
7942
|
-
variables
|
|
7943
|
-
),
|
|
7944
|
-
options2
|
|
7945
|
-
);
|
|
7946
|
-
const CompanySubsetTableListDocument = `
|
|
7947
|
-
query CompanySubsetTableList($companyId: uuid = "") {
|
|
7948
|
-
companySubsetTables(where: {companyId: {_eq: $companyId}}) {
|
|
7949
|
-
tableList
|
|
7950
|
-
}
|
|
7951
|
-
}
|
|
7952
|
-
`;
|
|
7953
|
-
const useCompanySubsetTableListQuery = (variables, options2) => useQuery(
|
|
7954
|
-
variables === void 0 ? ["CompanySubsetTableList"] : ["CompanySubsetTableList", variables],
|
|
7955
|
-
fetcher(
|
|
7956
|
-
CompanySubsetTableListDocument,
|
|
7957
|
-
variables
|
|
7958
|
-
),
|
|
7959
|
-
options2
|
|
7960
|
-
);
|
|
7961
|
-
const EmbeddedDashboardMetricsDocument = `
|
|
7962
|
-
query EmbeddedDashboardMetrics($where: externalDashboardMetrics_bool_exp) {
|
|
7963
|
-
externalDashboardMetrics(where: $where) {
|
|
7964
|
-
externalMetricId
|
|
7965
|
-
externalDashboardId
|
|
7966
|
-
externalMetric {
|
|
7967
|
-
chartOptions
|
|
7968
|
-
clientId
|
|
7969
|
-
companyId
|
|
7970
|
-
companyIntegrationId
|
|
7971
|
-
createdAt
|
|
7972
|
-
createdBy
|
|
7973
|
-
description
|
|
7974
|
-
id
|
|
7975
|
-
inputFields
|
|
7976
|
-
integrationName
|
|
7977
|
-
isCreatedByClient
|
|
7978
|
-
isLive
|
|
7979
|
-
metricId
|
|
7980
|
-
metricQuery
|
|
7981
|
-
name
|
|
7982
|
-
outputColumns
|
|
7983
|
-
query
|
|
7984
|
-
resizeAttributes
|
|
7985
|
-
timeGrain
|
|
7986
|
-
updatedAt
|
|
7987
|
-
selectedGroupBy
|
|
7988
|
-
isEnableGroupBy
|
|
7989
|
-
groupBy
|
|
7990
|
-
}
|
|
7991
|
-
}
|
|
7992
|
-
}
|
|
7993
|
-
`;
|
|
7994
|
-
const useEmbeddedDashboardMetricsQuery = (variables, options2) => useQuery(
|
|
7995
|
-
variables === void 0 ? ["EmbeddedDashboardMetrics"] : ["EmbeddedDashboardMetrics", variables],
|
|
7996
|
-
fetcher(EmbeddedDashboardMetricsDocument, variables),
|
|
7997
|
-
options2
|
|
7998
|
-
);
|
|
7999
|
-
const GetExternalDashboardClientThemeDocument = `
|
|
8000
|
-
query GetExternalDashboardClientTheme($companyId: uuid!, $clientId: String!) {
|
|
8001
|
-
externalDashboardThemes(
|
|
8002
|
-
where: {companyId: {_eq: $companyId}, externalDashboardThemeClients: {clientId: {_eq: $clientId}}}
|
|
8003
|
-
limit: 1
|
|
8004
|
-
) {
|
|
8005
|
-
colors
|
|
8006
|
-
createdAt
|
|
8007
|
-
id
|
|
8008
|
-
name
|
|
8009
|
-
}
|
|
8010
|
-
}
|
|
8011
|
-
`;
|
|
8012
|
-
const useGetExternalDashboardClientThemeQuery = (variables, options2) => useQuery(
|
|
8013
|
-
["GetExternalDashboardClientTheme", variables],
|
|
8014
|
-
fetcher(GetExternalDashboardClientThemeDocument, variables),
|
|
8015
|
-
options2
|
|
8016
|
-
);
|
|
8017
|
-
const GetExternalDashboardIdDocument = `
|
|
8018
|
-
query GetExternalDashboardId($externalDashboardId: String = "") {
|
|
8019
|
-
externalDashboards(where: {externalDashboardId: {_eq: $externalDashboardId}}) {
|
|
8020
|
-
id
|
|
8021
|
-
filters
|
|
8022
|
-
}
|
|
8023
|
-
}
|
|
8024
|
-
`;
|
|
8025
|
-
const useGetExternalDashboardIdQuery = (variables, options2) => useQuery(
|
|
8026
|
-
variables === void 0 ? ["GetExternalDashboardId"] : ["GetExternalDashboardId", variables],
|
|
8027
|
-
fetcher(
|
|
8028
|
-
GetExternalDashboardIdDocument,
|
|
8029
|
-
variables
|
|
8030
|
-
),
|
|
8031
|
-
options2
|
|
8032
|
-
);
|
|
8033
|
-
const ExternalDashboardListDocument = `
|
|
8034
|
-
query ExternalDashboardList($companyId: uuid = "") {
|
|
8035
|
-
externalDashboards(where: {companyId: {_eq: $companyId}}) {
|
|
8036
|
-
externalDashboardId
|
|
8037
|
-
name
|
|
8038
|
-
id
|
|
8039
|
-
}
|
|
8040
|
-
}
|
|
8041
|
-
`;
|
|
8042
|
-
const useExternalDashboardListQuery = (variables, options2) => useQuery(
|
|
8043
|
-
variables === void 0 ? ["ExternalDashboardList"] : ["ExternalDashboardList", variables],
|
|
8044
|
-
fetcher(
|
|
8045
|
-
ExternalDashboardListDocument,
|
|
8046
|
-
variables
|
|
8047
|
-
),
|
|
8048
|
-
options2
|
|
8049
|
-
);
|
|
8050
|
-
const GuestTokenParamsDocument = `
|
|
8051
|
-
query GuestTokenParams($id: uuid = "") {
|
|
8052
|
-
guestTokens_by_pk(id: $id) {
|
|
8053
|
-
clientId
|
|
8054
|
-
companyId
|
|
8055
|
-
id
|
|
8056
|
-
params
|
|
8057
|
-
}
|
|
8058
|
-
}
|
|
8059
|
-
`;
|
|
8060
|
-
const useGuestTokenParamsQuery = (variables, options2) => useQuery(
|
|
8061
|
-
variables === void 0 ? ["GuestTokenParams"] : ["GuestTokenParams", variables],
|
|
8062
|
-
fetcher(
|
|
8063
|
-
GuestTokenParamsDocument,
|
|
8064
|
-
variables
|
|
8065
|
-
),
|
|
8066
|
-
options2
|
|
8067
|
-
);
|
|
8068
|
-
const PreviewTableDocument = `
|
|
8069
|
-
mutation PreviewTable($companyId: String = "", $tableName: String = "", $limit: Int = 10) {
|
|
8070
|
-
previewTable(
|
|
8071
|
-
input: {companyId: $companyId, tableName: $tableName, limit: $limit}
|
|
8072
|
-
) {
|
|
8073
|
-
data {
|
|
8074
|
-
data
|
|
8075
|
-
isError
|
|
8076
|
-
name
|
|
8077
|
-
}
|
|
8078
|
-
error {
|
|
8079
|
-
message
|
|
8080
|
-
}
|
|
8081
|
-
}
|
|
8082
|
-
}
|
|
8083
|
-
`;
|
|
8084
|
-
const usePreviewTableMutation = (options2) => useMutation(
|
|
8085
|
-
["PreviewTable"],
|
|
8086
|
-
(variables) => fetcher(
|
|
8087
|
-
PreviewTableDocument,
|
|
8088
|
-
variables
|
|
8089
|
-
)(),
|
|
8090
|
-
options2
|
|
8091
|
-
);
|
|
8092
|
-
const QueryExternalMetricDocument = `
|
|
8093
|
-
query QueryExternalMetric($id: String = "", $clientId: String = "", $filterValues: json = "", $globalFilters: json = []) {
|
|
8094
|
-
externalMetricQuery(
|
|
8095
|
-
input: {externalMetricId: $id, clientId: $clientId, filterValues: $filterValues, globalFilters: $globalFilters}
|
|
8096
|
-
) {
|
|
8097
|
-
data
|
|
8098
|
-
}
|
|
8099
|
-
}
|
|
8100
|
-
`;
|
|
8101
|
-
const useQueryExternalMetricQuery = (variables, options2) => useQuery(
|
|
8102
|
-
variables === void 0 ? ["QueryExternalMetric"] : ["QueryExternalMetric", variables],
|
|
8103
|
-
fetcher(
|
|
8104
|
-
QueryExternalMetricDocument,
|
|
8105
|
-
variables
|
|
8106
|
-
),
|
|
8107
|
-
options2
|
|
8108
|
-
);
|
|
8109
7854
|
var classnames = { exports: {} };
|
|
8110
7855
|
/*!
|
|
8111
7856
|
Copyright (c) 2018 Jed Watson.
|
|
@@ -8154,21 +7899,21 @@ var classnames = { exports: {} };
|
|
|
8154
7899
|
})();
|
|
8155
7900
|
})(classnames);
|
|
8156
7901
|
var classNames = classnames.exports;
|
|
8157
|
-
const primary = "
|
|
8158
|
-
const secondary = "
|
|
8159
|
-
const tertiary = "
|
|
8160
|
-
var styles$
|
|
7902
|
+
const primary = "_primary_xtxvk_1";
|
|
7903
|
+
const secondary = "_secondary_xtxvk_5";
|
|
7904
|
+
const tertiary = "_tertiary_xtxvk_10";
|
|
7905
|
+
var styles$x = {
|
|
8161
7906
|
primary,
|
|
8162
7907
|
secondary,
|
|
8163
7908
|
tertiary,
|
|
8164
|
-
"font-18": "_font-
|
|
8165
|
-
"font-20": "_font-
|
|
8166
|
-
"font-14": "_font-
|
|
8167
|
-
"font-14a": "_font-
|
|
8168
|
-
"font-14b": "_font-
|
|
8169
|
-
"font-14c": "_font-
|
|
8170
|
-
"font-15": "_font-
|
|
8171
|
-
"font-34": "_font-
|
|
7909
|
+
"font-18": "_font-18_xtxvk_14",
|
|
7910
|
+
"font-20": "_font-20_xtxvk_18",
|
|
7911
|
+
"font-14": "_font-14_xtxvk_22",
|
|
7912
|
+
"font-14a": "_font-14a_xtxvk_26",
|
|
7913
|
+
"font-14b": "_font-14b_xtxvk_30",
|
|
7914
|
+
"font-14c": "_font-14c_xtxvk_34",
|
|
7915
|
+
"font-15": "_font-15_xtxvk_38",
|
|
7916
|
+
"font-34": "_font-34_xtxvk_41"
|
|
8172
7917
|
};
|
|
8173
7918
|
var jsxRuntime = { exports: {} };
|
|
8174
7919
|
var reactJsxRuntime_production_min = {};
|
|
@@ -8222,13 +7967,13 @@ const Text = ({
|
|
|
8222
7967
|
}) => {
|
|
8223
7968
|
const Tag = variants[variant];
|
|
8224
7969
|
return /* @__PURE__ */ jsx(Tag, {
|
|
8225
|
-
className: classNames(styleClass === "custom" ? null : `${styles$
|
|
7970
|
+
className: classNames(styleClass === "custom" ? null : `${styles$x[styleClass]}`, className),
|
|
8226
7971
|
onClick,
|
|
8227
7972
|
children: children2
|
|
8228
7973
|
});
|
|
8229
7974
|
};
|
|
8230
7975
|
const fullscreen = "_fullscreen_1wo1t_1";
|
|
8231
|
-
var styles$
|
|
7976
|
+
var styles$w = {
|
|
8232
7977
|
fullscreen
|
|
8233
7978
|
};
|
|
8234
7979
|
const SOMETHING_WENT_WRONG = "something went wrong, please try again";
|
|
@@ -84049,14 +83794,14 @@ class LineController extends DatasetController {
|
|
|
84049
83794
|
getMaxOverflow() {
|
|
84050
83795
|
const meta = this._cachedMeta;
|
|
84051
83796
|
const dataset = meta.dataset;
|
|
84052
|
-
const
|
|
83797
|
+
const border2 = dataset.options && dataset.options.borderWidth || 0;
|
|
84053
83798
|
const data = meta.data || [];
|
|
84054
83799
|
if (!data.length) {
|
|
84055
|
-
return
|
|
83800
|
+
return border2;
|
|
84056
83801
|
}
|
|
84057
83802
|
const firstPoint = data[0].size(this.resolveDataElementOptions(0));
|
|
84058
83803
|
const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));
|
|
84059
|
-
return Math.max(
|
|
83804
|
+
return Math.max(border2, firstPoint, lastPoint) / 2;
|
|
84060
83805
|
}
|
|
84061
83806
|
draw() {
|
|
84062
83807
|
const meta = this._cachedMeta;
|
|
@@ -86025,13 +85770,13 @@ class ScatterController extends DatasetController {
|
|
|
86025
85770
|
return max3 > 0 && max3;
|
|
86026
85771
|
}
|
|
86027
85772
|
const dataset = meta.dataset;
|
|
86028
|
-
const
|
|
85773
|
+
const border2 = dataset.options && dataset.options.borderWidth || 0;
|
|
86029
85774
|
if (!data.length) {
|
|
86030
|
-
return
|
|
85775
|
+
return border2;
|
|
86031
85776
|
}
|
|
86032
85777
|
const firstPoint = data[0].size(this.resolveDataElementOptions(0));
|
|
86033
85778
|
const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));
|
|
86034
|
-
return Math.max(
|
|
85779
|
+
return Math.max(border2, firstPoint, lastPoint) / 2;
|
|
86035
85780
|
}
|
|
86036
85781
|
}
|
|
86037
85782
|
ScatterController.id = "scatter";
|
|
@@ -88771,7 +88516,7 @@ function boundingRects(bar) {
|
|
|
88771
88516
|
const bounds = getBarBounds(bar);
|
|
88772
88517
|
const width = bounds.right - bounds.left;
|
|
88773
88518
|
const height = bounds.bottom - bounds.top;
|
|
88774
|
-
const
|
|
88519
|
+
const border2 = parseBorderWidth(bar, width / 2, height / 2);
|
|
88775
88520
|
const radius = parseBorderRadius(bar, width / 2, height / 2);
|
|
88776
88521
|
return {
|
|
88777
88522
|
outer: {
|
|
@@ -88782,15 +88527,15 @@ function boundingRects(bar) {
|
|
|
88782
88527
|
radius
|
|
88783
88528
|
},
|
|
88784
88529
|
inner: {
|
|
88785
|
-
x: bounds.left +
|
|
88786
|
-
y: bounds.top +
|
|
88787
|
-
w: width -
|
|
88788
|
-
h: height -
|
|
88530
|
+
x: bounds.left + border2.l,
|
|
88531
|
+
y: bounds.top + border2.t,
|
|
88532
|
+
w: width - border2.l - border2.r,
|
|
88533
|
+
h: height - border2.t - border2.b,
|
|
88789
88534
|
radius: {
|
|
88790
|
-
topLeft: Math.max(0, radius.topLeft - Math.max(
|
|
88791
|
-
topRight: Math.max(0, radius.topRight - Math.max(
|
|
88792
|
-
bottomLeft: Math.max(0, radius.bottomLeft - Math.max(
|
|
88793
|
-
bottomRight: Math.max(0, radius.bottomRight - Math.max(
|
|
88535
|
+
topLeft: Math.max(0, radius.topLeft - Math.max(border2.t, border2.l)),
|
|
88536
|
+
topRight: Math.max(0, radius.topRight - Math.max(border2.t, border2.r)),
|
|
88537
|
+
bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border2.b, border2.l)),
|
|
88538
|
+
bottomRight: Math.max(0, radius.bottomRight - Math.max(border2.b, border2.r))
|
|
88794
88539
|
}
|
|
88795
88540
|
}
|
|
88796
88541
|
};
|
|
@@ -93664,6 +93409,7 @@ const BoxPlot = ({
|
|
|
93664
93409
|
option: option2
|
|
93665
93410
|
});
|
|
93666
93411
|
};
|
|
93412
|
+
var styles$v = ".tableContainer{position:relative;max-height:24rem;max-width:56rem;overflow:scroll;border-radius:var(--databrainhq-plugin-border-radiusMd);border-width:1px;border-style:solid;border-color:var(--databrainhq-plugin-color-gray300)}.heatMap{position:relative;border-collapse:separate;--tw-border-spacing-x: 0px;--tw-border-spacing-y: 0px;border-spacing:var(--tw-border-spacing-x) var(--tw-border-spacing-y)}.label{white-space:nowrap}.heatMap td,.heatMap th{border-right-width:1px;border-bottom-width:1px;border-style:solid;border-color:var(--databrainhq-plugin-color-gray300);padding:.25rem;text-align:center}.heatMap thead th{position:sticky;top:0px}.heatMap thead th:first-child{left:0px;z-index:10;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.heatMap tbody th{position:sticky;left:0px;z-index:10;--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.tablechart{position:relative;display:flex;height:100%;padding:1rem}.tablechartWrapper{display:flex;height:100%;width:100%;flex-direction:column}.tablechartContainer{position:sticky;height:4%;width:100%;padding-left:.25rem}.tablechartTable{width:100%}.tablechartHeaderRow{position:sticky;top:0px;height:2.5rem;background-color:var(--databrainhq-plugin-color-primaryLight)}.tablechartHeaderCol{width:16rem}.tablechartHeaderCol>:not([hidden])~:not([hidden]){border-style:solid}.tablechartHeaderCol{border-left-width:1px;padding-left:1rem;padding-right:1rem}.tablechartBodyRow{height:3.5rem}.tablechartBodyCol>:not([hidden])~:not([hidden]){border-style:solid}.tablechartBodyCol{border-left-width:1px;padding-left:1rem;padding-right:1rem;text-align:center}\n";
|
|
93667
93413
|
const TableChart = ({
|
|
93668
93414
|
data
|
|
93669
93415
|
}) => {
|
|
@@ -93683,18 +93429,18 @@ const TableChart = ({
|
|
|
93683
93429
|
}
|
|
93684
93430
|
}
|
|
93685
93431
|
return /* @__PURE__ */ jsx("div", {
|
|
93686
|
-
className:
|
|
93432
|
+
className: styles$v.tablechart,
|
|
93687
93433
|
children: /* @__PURE__ */ jsx("div", {
|
|
93688
|
-
className:
|
|
93434
|
+
className: styles$v.tablechartWrapper,
|
|
93689
93435
|
children: /* @__PURE__ */ jsx("div", {
|
|
93690
|
-
className:
|
|
93436
|
+
className: styles$v.tablechartContainer,
|
|
93691
93437
|
children: /* @__PURE__ */ jsxs("table", {
|
|
93692
|
-
className:
|
|
93438
|
+
className: styles$v.tablechartTable,
|
|
93693
93439
|
children: [/* @__PURE__ */ jsx("thead", {
|
|
93694
93440
|
children: /* @__PURE__ */ jsxs("tr", {
|
|
93695
|
-
className:
|
|
93441
|
+
className: styles$v.tablechartHeaderRow,
|
|
93696
93442
|
children: [/* @__PURE__ */ jsx("th", {
|
|
93697
|
-
className:
|
|
93443
|
+
className: styles$v.tableChartHeaderCol,
|
|
93698
93444
|
scope: "col",
|
|
93699
93445
|
children: /* @__PURE__ */ jsx(Text, {
|
|
93700
93446
|
styleClass: "font-14c",
|
|
@@ -93703,7 +93449,7 @@ const TableChart = ({
|
|
|
93703
93449
|
})
|
|
93704
93450
|
}, "num"), data == null ? void 0 : data.datasets.map((item) => {
|
|
93705
93451
|
return /* @__PURE__ */ jsx("th", {
|
|
93706
|
-
className:
|
|
93452
|
+
className: styles$v.tablechartHeaderCol,
|
|
93707
93453
|
scope: "col",
|
|
93708
93454
|
children: /* @__PURE__ */ jsx(Text, {
|
|
93709
93455
|
styleClass: "font-14c",
|
|
@@ -93715,9 +93461,9 @@ const TableChart = ({
|
|
|
93715
93461
|
})
|
|
93716
93462
|
}), /* @__PURE__ */ jsx("tbody", {
|
|
93717
93463
|
children: modifiedData.map((item, i2) => /* @__PURE__ */ jsx("tr", {
|
|
93718
|
-
className:
|
|
93464
|
+
className: styles$v.tablechartBodyRow,
|
|
93719
93465
|
children: item.map((d2, index) => /* @__PURE__ */ jsx("td", {
|
|
93720
|
-
className:
|
|
93466
|
+
className: styles$v.tablechartBodyCol,
|
|
93721
93467
|
children: /* @__PURE__ */ jsx(Text, {
|
|
93722
93468
|
styleClass: "font-14",
|
|
93723
93469
|
variant: "p",
|
|
@@ -93991,12 +93737,12 @@ const MetricChart = ({
|
|
|
93991
93737
|
children: "No chart selected"
|
|
93992
93738
|
});
|
|
93993
93739
|
};
|
|
93994
|
-
const modal = "
|
|
93995
|
-
const popup = "
|
|
93996
|
-
const header$4 = "
|
|
93997
|
-
const headerTitle = "
|
|
93998
|
-
const content = "
|
|
93999
|
-
const footer = "
|
|
93740
|
+
const modal = "_modal_ul4ir_1";
|
|
93741
|
+
const popup = "_popup_ul4ir_9";
|
|
93742
|
+
const header$4 = "_header_ul4ir_17";
|
|
93743
|
+
const headerTitle = "_headerTitle_ul4ir_25";
|
|
93744
|
+
const content = "_content_ul4ir_33";
|
|
93745
|
+
const footer = "_footer_ul4ir_41";
|
|
94000
93746
|
var styles$u = {
|
|
94001
93747
|
modal,
|
|
94002
93748
|
popup,
|
|
@@ -94006,17 +93752,17 @@ var styles$u = {
|
|
|
94006
93752
|
footer
|
|
94007
93753
|
};
|
|
94008
93754
|
var styles$t = {
|
|
94009
|
-
"btn-primary": "_btn-
|
|
94010
|
-
"btn-secondary": "_btn-
|
|
94011
|
-
"btn-reject": "_btn-
|
|
94012
|
-
"btn-outlined": "_btn-
|
|
94013
|
-
"btn-tertiary": "_btn-
|
|
94014
|
-
"btn-default": "_btn-
|
|
94015
|
-
"btn-large": "_btn-
|
|
94016
|
-
"btn-small": "_btn-
|
|
94017
|
-
"btn-xs": "_btn-
|
|
94018
|
-
"btn-medium": "_btn-
|
|
94019
|
-
"btn-11rem": "_btn-
|
|
93755
|
+
"btn-primary": "_btn-primary_1h5ze_1",
|
|
93756
|
+
"btn-secondary": "_btn-secondary_1h5ze_5",
|
|
93757
|
+
"btn-reject": "_btn-reject_1h5ze_9",
|
|
93758
|
+
"btn-outlined": "_btn-outlined_1h5ze_14",
|
|
93759
|
+
"btn-tertiary": "_btn-tertiary_1h5ze_18",
|
|
93760
|
+
"btn-default": "_btn-default_1h5ze_22",
|
|
93761
|
+
"btn-large": "_btn-large_1h5ze_25",
|
|
93762
|
+
"btn-small": "_btn-small_1h5ze_28",
|
|
93763
|
+
"btn-xs": "_btn-xs_1h5ze_31",
|
|
93764
|
+
"btn-medium": "_btn-medium_1h5ze_34",
|
|
93765
|
+
"btn-11rem": "_btn-11rem_1h5ze_38"
|
|
94020
93766
|
};
|
|
94021
93767
|
const Button = ({
|
|
94022
93768
|
isDisabled = false,
|
|
@@ -94104,7 +93850,7 @@ const FullScreenChart = ({
|
|
|
94104
93850
|
onClose: onCancel,
|
|
94105
93851
|
headerTitle: "Chart Preview",
|
|
94106
93852
|
children: /* @__PURE__ */ jsx("div", {
|
|
94107
|
-
className: styles$
|
|
93853
|
+
className: styles$w.fullscreen,
|
|
94108
93854
|
children: chart && /* @__PURE__ */ jsx(MetricChart, {
|
|
94109
93855
|
labels: chart.labels,
|
|
94110
93856
|
data: chart.data,
|
|
@@ -94143,18 +93889,18 @@ const eosIconsLoading = (props) => /* @__PURE__ */ jsxs("svg", {
|
|
|
94143
93889
|
})
|
|
94144
93890
|
})]
|
|
94145
93891
|
});
|
|
94146
|
-
const cardContainer = "
|
|
94147
|
-
const listHeader = "
|
|
94148
|
-
const metricName = "
|
|
94149
|
-
const info = "
|
|
94150
|
-
const csvBtn = "
|
|
94151
|
-
const infoTooltip = "
|
|
94152
|
-
const metricData = "
|
|
94153
|
-
const singleValueData = "
|
|
94154
|
-
const singleValue = "
|
|
94155
|
-
const noData$1 = "
|
|
94156
|
-
const loading = "
|
|
94157
|
-
const fullScreen = "
|
|
93892
|
+
const cardContainer = "_cardContainer_33mfg_1";
|
|
93893
|
+
const listHeader = "_listHeader_33mfg_9";
|
|
93894
|
+
const metricName = "_metricName_33mfg_17";
|
|
93895
|
+
const info = "_info_33mfg_25";
|
|
93896
|
+
const csvBtn = "_csvBtn_33mfg_33";
|
|
93897
|
+
const infoTooltip = "_infoTooltip_33mfg_41";
|
|
93898
|
+
const metricData = "_metricData_33mfg_57";
|
|
93899
|
+
const singleValueData = "_singleValueData_33mfg_65";
|
|
93900
|
+
const singleValue = "_singleValue_33mfg_65";
|
|
93901
|
+
const noData$1 = "_noData_33mfg_81";
|
|
93902
|
+
const loading = "_loading_33mfg_89";
|
|
93903
|
+
const fullScreen = "_fullScreen_33mfg_97";
|
|
94158
93904
|
var styles$s = {
|
|
94159
93905
|
cardContainer,
|
|
94160
93906
|
listHeader,
|
|
@@ -94169,7 +93915,246 @@ var styles$s = {
|
|
|
94169
93915
|
loading,
|
|
94170
93916
|
fullScreen
|
|
94171
93917
|
};
|
|
94172
|
-
const
|
|
93918
|
+
const fetcher = (query, variables, options2) => {
|
|
93919
|
+
return async () => {
|
|
93920
|
+
const res = await fetch("https://backend.usedatabrain.com/v1/graphql", {
|
|
93921
|
+
method: "POST",
|
|
93922
|
+
headers: {
|
|
93923
|
+
"Content-Type": "application/json",
|
|
93924
|
+
"X-Hasura-Role": "anonymous",
|
|
93925
|
+
...options2
|
|
93926
|
+
},
|
|
93927
|
+
body: JSON.stringify({
|
|
93928
|
+
query,
|
|
93929
|
+
variables
|
|
93930
|
+
})
|
|
93931
|
+
});
|
|
93932
|
+
const json = await res.json();
|
|
93933
|
+
if (json.errors) {
|
|
93934
|
+
const { message } = json.errors[0];
|
|
93935
|
+
throw new Error(message);
|
|
93936
|
+
}
|
|
93937
|
+
return json.data;
|
|
93938
|
+
};
|
|
93939
|
+
};
|
|
93940
|
+
const CreateExternalMetricDocument = `
|
|
93941
|
+
mutation CreateExternalMetric($chartOptions: jsonb = "", $companyId: uuid = "", $companyIntegrationId: uuid = "", $description: String = "", $inputFields: jsonb = "", $integrationName: String = "", $metricId: String = "", $metricQuery: String = "", $name: String = "", $outputColumns: String = "", $query: String = "", $isLive: Boolean, $clientId: String = "", $isCreatedByClient: Boolean = false, $createdBy: String = "", $timeGrain: String = "", $externalDashboardIds: [externalDashboardMetrics_insert_input!] = {}, $selectedGroupBy: jsonb = [], $isEnableGroupBy: Boolean = false, $groupBy: jsonb = {}) {
|
|
93942
|
+
insert_externalMetrics_one(
|
|
93943
|
+
object: {chartOptions: $chartOptions, companyId: $companyId, companyIntegrationId: $companyIntegrationId, description: $description, inputFields: $inputFields, integrationName: $integrationName, metricId: $metricId, metricQuery: $metricQuery, name: $name, outputColumns: $outputColumns, query: $query, isLive: $isLive, clientId: $clientId, isCreatedByClient: $isCreatedByClient, createdBy: $createdBy, timeGrain: $timeGrain, externalDashboardMetrics: {data: $externalDashboardIds}, selectedGroupBy: $selectedGroupBy, isEnableGroupBy: $isEnableGroupBy, groupBy: $groupBy}
|
|
93944
|
+
) {
|
|
93945
|
+
id
|
|
93946
|
+
externalDashboardMetrics {
|
|
93947
|
+
externalDashboardId
|
|
93948
|
+
}
|
|
93949
|
+
}
|
|
93950
|
+
}
|
|
93951
|
+
`;
|
|
93952
|
+
const useCreateExternalMetricMutation = (options2) => useMutation(
|
|
93953
|
+
["CreateExternalMetric"],
|
|
93954
|
+
(variables) => fetcher(CreateExternalMetricDocument, variables)(),
|
|
93955
|
+
options2
|
|
93956
|
+
);
|
|
93957
|
+
const FetchColumnDataDocument = `
|
|
93958
|
+
mutation FetchColumnData($companyId: String = "", $tableName: String = "", $columnName: String = "") {
|
|
93959
|
+
fetchColumnData(
|
|
93960
|
+
input: {columnName: $columnName, companyId: $companyId, tableName: $tableName}
|
|
93961
|
+
) {
|
|
93962
|
+
data {
|
|
93963
|
+
label
|
|
93964
|
+
value
|
|
93965
|
+
}
|
|
93966
|
+
error {
|
|
93967
|
+
message
|
|
93968
|
+
}
|
|
93969
|
+
}
|
|
93970
|
+
}
|
|
93971
|
+
`;
|
|
93972
|
+
const useFetchColumnDataMutation = (options2) => useMutation(
|
|
93973
|
+
["FetchColumnData"],
|
|
93974
|
+
(variables) => fetcher(
|
|
93975
|
+
FetchColumnDataDocument,
|
|
93976
|
+
variables
|
|
93977
|
+
)(),
|
|
93978
|
+
options2
|
|
93979
|
+
);
|
|
93980
|
+
const GenerateDatasetMetricsDocument = `
|
|
93981
|
+
mutation GenerateDatasetMetrics($companyId: String = "", $userInputs: json = "") {
|
|
93982
|
+
generateDatasetMetrics(input: {companyId: $companyId, userInputs: $userInputs}) {
|
|
93983
|
+
error
|
|
93984
|
+
query
|
|
93985
|
+
result
|
|
93986
|
+
}
|
|
93987
|
+
}
|
|
93988
|
+
`;
|
|
93989
|
+
const useGenerateDatasetMetricsMutation = (options2) => useMutation(
|
|
93990
|
+
["GenerateDatasetMetrics"],
|
|
93991
|
+
(variables) => fetcher(GenerateDatasetMetricsDocument, variables)(),
|
|
93992
|
+
options2
|
|
93993
|
+
);
|
|
93994
|
+
const CompanyIntegrationDocument = `
|
|
93995
|
+
query CompanyIntegration($companyId: uuid = "") {
|
|
93996
|
+
companyIntegrations(where: {companyId: {_eq: $companyId}}) {
|
|
93997
|
+
companyId
|
|
93998
|
+
id
|
|
93999
|
+
integrationId
|
|
94000
|
+
name
|
|
94001
|
+
}
|
|
94002
|
+
}
|
|
94003
|
+
`;
|
|
94004
|
+
const useCompanyIntegrationQuery = (variables, options2) => useQuery(
|
|
94005
|
+
variables === void 0 ? ["CompanyIntegration"] : ["CompanyIntegration", variables],
|
|
94006
|
+
fetcher(
|
|
94007
|
+
CompanyIntegrationDocument,
|
|
94008
|
+
variables
|
|
94009
|
+
),
|
|
94010
|
+
options2
|
|
94011
|
+
);
|
|
94012
|
+
const CompanySubsetTableListDocument = `
|
|
94013
|
+
query CompanySubsetTableList($companyId: uuid = "") {
|
|
94014
|
+
companySubsetTables(where: {companyId: {_eq: $companyId}}) {
|
|
94015
|
+
tableList
|
|
94016
|
+
}
|
|
94017
|
+
}
|
|
94018
|
+
`;
|
|
94019
|
+
const useCompanySubsetTableListQuery = (variables, options2) => useQuery(
|
|
94020
|
+
variables === void 0 ? ["CompanySubsetTableList"] : ["CompanySubsetTableList", variables],
|
|
94021
|
+
fetcher(
|
|
94022
|
+
CompanySubsetTableListDocument,
|
|
94023
|
+
variables
|
|
94024
|
+
),
|
|
94025
|
+
options2
|
|
94026
|
+
);
|
|
94027
|
+
const EmbeddedDashboardMetricsDocument = `
|
|
94028
|
+
query EmbeddedDashboardMetrics($where: externalDashboardMetrics_bool_exp) {
|
|
94029
|
+
externalDashboardMetrics(where: $where) {
|
|
94030
|
+
externalMetricId
|
|
94031
|
+
externalDashboardId
|
|
94032
|
+
externalMetric {
|
|
94033
|
+
chartOptions
|
|
94034
|
+
clientId
|
|
94035
|
+
companyId
|
|
94036
|
+
companyIntegrationId
|
|
94037
|
+
createdAt
|
|
94038
|
+
createdBy
|
|
94039
|
+
description
|
|
94040
|
+
id
|
|
94041
|
+
inputFields
|
|
94042
|
+
integrationName
|
|
94043
|
+
isCreatedByClient
|
|
94044
|
+
isLive
|
|
94045
|
+
metricId
|
|
94046
|
+
metricQuery
|
|
94047
|
+
name
|
|
94048
|
+
outputColumns
|
|
94049
|
+
query
|
|
94050
|
+
resizeAttributes
|
|
94051
|
+
timeGrain
|
|
94052
|
+
updatedAt
|
|
94053
|
+
selectedGroupBy
|
|
94054
|
+
isEnableGroupBy
|
|
94055
|
+
groupBy
|
|
94056
|
+
}
|
|
94057
|
+
}
|
|
94058
|
+
}
|
|
94059
|
+
`;
|
|
94060
|
+
const useEmbeddedDashboardMetricsQuery = (variables, options2) => useQuery(
|
|
94061
|
+
variables === void 0 ? ["EmbeddedDashboardMetrics"] : ["EmbeddedDashboardMetrics", variables],
|
|
94062
|
+
fetcher(EmbeddedDashboardMetricsDocument, variables),
|
|
94063
|
+
options2
|
|
94064
|
+
);
|
|
94065
|
+
const GetExternalDashboardIdDocument = `
|
|
94066
|
+
query GetExternalDashboardId($externalDashboardId: String = "") {
|
|
94067
|
+
externalDashboards(where: {externalDashboardId: {_eq: $externalDashboardId}}) {
|
|
94068
|
+
id
|
|
94069
|
+
filters
|
|
94070
|
+
}
|
|
94071
|
+
}
|
|
94072
|
+
`;
|
|
94073
|
+
const useGetExternalDashboardIdQuery = (variables, options2) => useQuery(
|
|
94074
|
+
variables === void 0 ? ["GetExternalDashboardId"] : ["GetExternalDashboardId", variables],
|
|
94075
|
+
fetcher(
|
|
94076
|
+
GetExternalDashboardIdDocument,
|
|
94077
|
+
variables
|
|
94078
|
+
),
|
|
94079
|
+
options2
|
|
94080
|
+
);
|
|
94081
|
+
const ExternalDashboardListDocument = `
|
|
94082
|
+
query ExternalDashboardList($companyId: uuid = "") {
|
|
94083
|
+
externalDashboards(where: {companyId: {_eq: $companyId}}) {
|
|
94084
|
+
externalDashboardId
|
|
94085
|
+
name
|
|
94086
|
+
id
|
|
94087
|
+
}
|
|
94088
|
+
}
|
|
94089
|
+
`;
|
|
94090
|
+
const useExternalDashboardListQuery = (variables, options2) => useQuery(
|
|
94091
|
+
variables === void 0 ? ["ExternalDashboardList"] : ["ExternalDashboardList", variables],
|
|
94092
|
+
fetcher(
|
|
94093
|
+
ExternalDashboardListDocument,
|
|
94094
|
+
variables
|
|
94095
|
+
),
|
|
94096
|
+
options2
|
|
94097
|
+
);
|
|
94098
|
+
const GuestTokenParamsDocument = `
|
|
94099
|
+
query GuestTokenParams($id: uuid = "") {
|
|
94100
|
+
guestTokens_by_pk(id: $id) {
|
|
94101
|
+
clientId
|
|
94102
|
+
companyId
|
|
94103
|
+
id
|
|
94104
|
+
params
|
|
94105
|
+
}
|
|
94106
|
+
}
|
|
94107
|
+
`;
|
|
94108
|
+
const useGuestTokenParamsQuery = (variables, options2) => useQuery(
|
|
94109
|
+
variables === void 0 ? ["GuestTokenParams"] : ["GuestTokenParams", variables],
|
|
94110
|
+
fetcher(
|
|
94111
|
+
GuestTokenParamsDocument,
|
|
94112
|
+
variables
|
|
94113
|
+
),
|
|
94114
|
+
options2
|
|
94115
|
+
);
|
|
94116
|
+
const PreviewTableDocument = `
|
|
94117
|
+
mutation PreviewTable($companyId: String = "", $tableName: String = "", $limit: Int = 10) {
|
|
94118
|
+
previewTable(
|
|
94119
|
+
input: {companyId: $companyId, tableName: $tableName, limit: $limit}
|
|
94120
|
+
) {
|
|
94121
|
+
data {
|
|
94122
|
+
data
|
|
94123
|
+
isError
|
|
94124
|
+
name
|
|
94125
|
+
}
|
|
94126
|
+
error {
|
|
94127
|
+
message
|
|
94128
|
+
}
|
|
94129
|
+
}
|
|
94130
|
+
}
|
|
94131
|
+
`;
|
|
94132
|
+
const usePreviewTableMutation = (options2) => useMutation(
|
|
94133
|
+
["PreviewTable"],
|
|
94134
|
+
(variables) => fetcher(
|
|
94135
|
+
PreviewTableDocument,
|
|
94136
|
+
variables
|
|
94137
|
+
)(),
|
|
94138
|
+
options2
|
|
94139
|
+
);
|
|
94140
|
+
const QueryExternalMetricDocument = `
|
|
94141
|
+
query QueryExternalMetric($id: String = "", $clientId: String = "", $filterValues: json = "", $globalFilters: json = []) {
|
|
94142
|
+
externalMetricQuery(
|
|
94143
|
+
input: {externalMetricId: $id, clientId: $clientId, filterValues: $filterValues, globalFilters: $globalFilters}
|
|
94144
|
+
) {
|
|
94145
|
+
data
|
|
94146
|
+
}
|
|
94147
|
+
}
|
|
94148
|
+
`;
|
|
94149
|
+
const useQueryExternalMetricQuery = (variables, options2) => useQuery(
|
|
94150
|
+
variables === void 0 ? ["QueryExternalMetric"] : ["QueryExternalMetric", variables],
|
|
94151
|
+
fetcher(
|
|
94152
|
+
QueryExternalMetricDocument,
|
|
94153
|
+
variables
|
|
94154
|
+
),
|
|
94155
|
+
options2
|
|
94156
|
+
);
|
|
94157
|
+
const csvlink = "_csvlink_kxdgj_1";
|
|
94173
94158
|
var styles$r = {
|
|
94174
94159
|
csvlink
|
|
94175
94160
|
};
|
|
@@ -94651,23 +94636,18 @@ const SingleValueCard = ({
|
|
|
94651
94636
|
};
|
|
94652
94637
|
const GridLayout = reactGridLayout.exports.WidthProvider(reactGridLayout.exports.Responsive);
|
|
94653
94638
|
const ExternalMetricList = ({
|
|
94639
|
+
chartColors,
|
|
94654
94640
|
globalFilters,
|
|
94655
94641
|
client,
|
|
94656
|
-
company,
|
|
94657
94642
|
isLiveMode,
|
|
94658
94643
|
params,
|
|
94659
94644
|
externalDashboardMetrics,
|
|
94660
|
-
isMetricListLoading
|
|
94645
|
+
isMetricListLoading,
|
|
94646
|
+
breakpoint,
|
|
94647
|
+
layoutCols
|
|
94661
94648
|
}) => {
|
|
94662
94649
|
const [isFullScreen, setFullScreen] = useState(false);
|
|
94663
94650
|
const [fullScreenChart, setFullScreenChart] = useState();
|
|
94664
|
-
const {
|
|
94665
|
-
data: themeData
|
|
94666
|
-
} = useGetExternalDashboardClientThemeQuery({
|
|
94667
|
-
companyId: company,
|
|
94668
|
-
clientId: client
|
|
94669
|
-
});
|
|
94670
|
-
const theme2 = useMemo(() => themeData == null ? void 0 : themeData.externalDashboardThemes[0], [themeData == null ? void 0 : themeData.externalDashboardThemes[0]]);
|
|
94671
94651
|
const metricListData = externalDashboardMetrics == null ? void 0 : externalDashboardMetrics.map((data) => data.externalMetric);
|
|
94672
94652
|
const adminMetrics = metricListData == null ? void 0 : metricListData.filter((data) => !data.isCreatedByClient);
|
|
94673
94653
|
const clientMetrics = metricListData == null ? void 0 : metricListData.filter((data) => data.isCreatedByClient && data.clientId === client);
|
|
@@ -94679,7 +94659,7 @@ const ExternalMetricList = ({
|
|
|
94679
94659
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
94680
94660
|
children: metricsList.length ? /* @__PURE__ */ jsxs(Fragment, {
|
|
94681
94661
|
children: [/* @__PURE__ */ jsx("div", {
|
|
94682
|
-
className: styles$
|
|
94662
|
+
className: styles$y["MetricList-container"],
|
|
94683
94663
|
children: /* @__PURE__ */ jsx(GridLayout, {
|
|
94684
94664
|
layouts: {
|
|
94685
94665
|
lg: metricsList.map(({
|
|
@@ -94701,14 +94681,14 @@ const ExternalMetricList = ({
|
|
|
94701
94681
|
isDroppable: false,
|
|
94702
94682
|
rowHeight: 30,
|
|
94703
94683
|
width: 1200,
|
|
94704
|
-
breakpoints: {
|
|
94684
|
+
breakpoints: breakpoint != null ? breakpoint : {
|
|
94705
94685
|
lg: 1200,
|
|
94706
94686
|
md: 996,
|
|
94707
94687
|
sm: 768,
|
|
94708
94688
|
xs: 480,
|
|
94709
94689
|
xxs: 0
|
|
94710
94690
|
},
|
|
94711
|
-
cols: {
|
|
94691
|
+
cols: layoutCols != null ? layoutCols : {
|
|
94712
94692
|
lg: 12,
|
|
94713
94693
|
md: 10,
|
|
94714
94694
|
sm: 6,
|
|
@@ -94716,7 +94696,7 @@ const ExternalMetricList = ({
|
|
|
94716
94696
|
xxs: 2
|
|
94717
94697
|
},
|
|
94718
94698
|
children: metricsList.map((metricItem) => /* @__PURE__ */ jsx("div", {
|
|
94719
|
-
className: styles$
|
|
94699
|
+
className: styles$y["MetricList-wrapper"],
|
|
94720
94700
|
children: metricItem.chartOptions.chartType === "single value" ? /* @__PURE__ */ jsx(SingleValueCard, {
|
|
94721
94701
|
metricItem,
|
|
94722
94702
|
client,
|
|
@@ -94730,7 +94710,7 @@ const ExternalMetricList = ({
|
|
|
94730
94710
|
},
|
|
94731
94711
|
client,
|
|
94732
94712
|
param: params == null ? void 0 : params.find((obj) => obj.metricId === metricItem.metricId),
|
|
94733
|
-
colors:
|
|
94713
|
+
colors: chartColors,
|
|
94734
94714
|
globalFilters
|
|
94735
94715
|
})
|
|
94736
94716
|
}, metricItem.id))
|
|
@@ -94742,9 +94722,9 @@ const ExternalMetricList = ({
|
|
|
94742
94722
|
})]
|
|
94743
94723
|
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
94744
94724
|
children: !isMetricListLoading ? /* @__PURE__ */ jsx("div", {
|
|
94745
|
-
className: styles$
|
|
94725
|
+
className: styles$y["noMetric-container"],
|
|
94746
94726
|
children: /* @__PURE__ */ jsx("div", {
|
|
94747
|
-
className: styles$
|
|
94727
|
+
className: styles$y["noMetric-wrapper"],
|
|
94748
94728
|
children: /* @__PURE__ */ jsx(Text, {
|
|
94749
94729
|
variant: "h2",
|
|
94750
94730
|
styleClass: "primary",
|
|
@@ -94752,7 +94732,7 @@ const ExternalMetricList = ({
|
|
|
94752
94732
|
})
|
|
94753
94733
|
})
|
|
94754
94734
|
}) : /* @__PURE__ */ jsx("div", {
|
|
94755
|
-
className: styles$
|
|
94735
|
+
className: styles$y["alt-container"],
|
|
94756
94736
|
children: /* @__PURE__ */ jsx(eosIconsLoading, {
|
|
94757
94737
|
style: {
|
|
94758
94738
|
width: "50px",
|
|
@@ -94766,11 +94746,11 @@ const ExternalMetricList = ({
|
|
|
94766
94746
|
};
|
|
94767
94747
|
var ExternalMetricList$1 = React__default.memo(ExternalMetricList);
|
|
94768
94748
|
var styles$q = {
|
|
94769
|
-
"header-container": "_header-
|
|
94770
|
-
"btn-container": "_btn-
|
|
94771
|
-
"back-btn": "_back-
|
|
94772
|
-
"sql-btn": "_sql-
|
|
94773
|
-
"save-btn": "_save-
|
|
94749
|
+
"header-container": "_header-container_pimqu_1",
|
|
94750
|
+
"btn-container": "_btn-container_pimqu_5",
|
|
94751
|
+
"back-btn": "_back-btn_pimqu_9",
|
|
94752
|
+
"sql-btn": "_sql-btn_pimqu_13",
|
|
94753
|
+
"save-btn": "_save-btn_pimqu_17"
|
|
94774
94754
|
};
|
|
94775
94755
|
const akarIconsArrowLeft = (props) => /* @__PURE__ */ jsx("svg", {
|
|
94776
94756
|
viewBox: "0 0 24 24",
|
|
@@ -94858,10 +94838,14 @@ const Header = ({
|
|
|
94858
94838
|
})]
|
|
94859
94839
|
});
|
|
94860
94840
|
};
|
|
94841
|
+
const floatingCreateButton = "_floatingCreateButton_6ovk2_13";
|
|
94842
|
+
const floatingCreateButtonIcon = "_floatingCreateButtonIcon_6ovk2_17";
|
|
94861
94843
|
var styles$p = {
|
|
94862
|
-
"create-btn": "_create-
|
|
94863
|
-
"modal-container": "_modal-
|
|
94864
|
-
"query-modal": "_query-
|
|
94844
|
+
"create-btn": "_create-btn_6ovk2_1",
|
|
94845
|
+
"modal-container": "_modal-container_6ovk2_5",
|
|
94846
|
+
"query-modal": "_query-modal_6ovk2_9",
|
|
94847
|
+
floatingCreateButton,
|
|
94848
|
+
floatingCreateButtonIcon
|
|
94865
94849
|
};
|
|
94866
94850
|
const container$d = "_container_hveoi_1";
|
|
94867
94851
|
const header$3 = "_header_hveoi_5";
|
|
@@ -94874,19 +94858,19 @@ var styles$o = {
|
|
|
94874
94858
|
"col-container": "_col-container_hveoi_13",
|
|
94875
94859
|
column
|
|
94876
94860
|
};
|
|
94877
|
-
const container$c = "
|
|
94878
|
-
const wrapper$2 = "
|
|
94879
|
-
const label$3 = "
|
|
94880
|
-
const floatingLabel = "
|
|
94881
|
-
const dropdown$1 = "
|
|
94882
|
-
const options = "
|
|
94883
|
-
const checkedOption = "
|
|
94884
|
-
const option$1 = "
|
|
94885
|
-
const icon$1 = "
|
|
94886
|
-
const text$1 = "
|
|
94887
|
-
const floatingText = "
|
|
94888
|
-
const search = "
|
|
94889
|
-
const loadMore$1 = "
|
|
94861
|
+
const container$c = "_container_np4zl_1";
|
|
94862
|
+
const wrapper$2 = "_wrapper_np4zl_5";
|
|
94863
|
+
const label$3 = "_label_np4zl_9";
|
|
94864
|
+
const floatingLabel = "_floatingLabel_np4zl_13";
|
|
94865
|
+
const dropdown$1 = "_dropdown_np4zl_17";
|
|
94866
|
+
const options = "_options_np4zl_21";
|
|
94867
|
+
const checkedOption = "_checkedOption_np4zl_25";
|
|
94868
|
+
const option$1 = "_option_np4zl_21";
|
|
94869
|
+
const icon$1 = "_icon_np4zl_33";
|
|
94870
|
+
const text$1 = "_text_np4zl_37";
|
|
94871
|
+
const floatingText = "_floatingText_np4zl_41";
|
|
94872
|
+
const search = "_search_np4zl_45";
|
|
94873
|
+
const loadMore$1 = "_loadMore_np4zl_49";
|
|
94890
94874
|
var styles$n = {
|
|
94891
94875
|
container: container$c,
|
|
94892
94876
|
wrapper: wrapper$2,
|
|
@@ -96368,8 +96352,8 @@ function useForm(props = {}) {
|
|
|
96368
96352
|
return _formControl.current;
|
|
96369
96353
|
}
|
|
96370
96354
|
var styles$m = {
|
|
96371
|
-
"searchTab-container": "_searchTab-
|
|
96372
|
-
"searchTab-input": "_searchTab-
|
|
96355
|
+
"searchTab-container": "_searchTab-container_1peao_1",
|
|
96356
|
+
"searchTab-input": "_searchTab-input_1peao_5"
|
|
96373
96357
|
};
|
|
96374
96358
|
const SearchTab = ({
|
|
96375
96359
|
setSearchKeyword,
|
|
@@ -96834,7 +96818,7 @@ const Dataset = ({
|
|
|
96834
96818
|
}), /* @__PURE__ */ jsx("div", {
|
|
96835
96819
|
className: styles$o["col-container"],
|
|
96836
96820
|
children: columnList.map(({
|
|
96837
|
-
|
|
96821
|
+
as,
|
|
96838
96822
|
datatype
|
|
96839
96823
|
}) => /* @__PURE__ */ jsxs("div", {
|
|
96840
96824
|
className: styles$o.column,
|
|
@@ -96843,26 +96827,26 @@ const Dataset = ({
|
|
|
96843
96827
|
}), /* @__PURE__ */ jsx(Text, {
|
|
96844
96828
|
variant: "p",
|
|
96845
96829
|
styleClass: "font-14",
|
|
96846
|
-
children:
|
|
96830
|
+
children: as
|
|
96847
96831
|
})]
|
|
96848
|
-
},
|
|
96832
|
+
}, as))
|
|
96849
96833
|
})]
|
|
96850
96834
|
})]
|
|
96851
96835
|
});
|
|
96852
96836
|
};
|
|
96853
96837
|
var Dataset$1 = React__default.memo(Dataset);
|
|
96854
|
-
const container$b = "
|
|
96855
|
-
const header$2 = "
|
|
96856
|
-
const headerText = "
|
|
96857
|
-
const crossIcon$1 = "
|
|
96858
|
-
const form$3 = "
|
|
96859
|
-
const inputWrapper = "
|
|
96860
|
-
const input$2 = "
|
|
96861
|
-
const selectWrapper = "
|
|
96862
|
-
const select = "
|
|
96863
|
-
const series = "
|
|
96864
|
-
const seriesWrapper = "
|
|
96865
|
-
const valueLabelWrapper = "
|
|
96838
|
+
const container$b = "_container_13mal_1";
|
|
96839
|
+
const header$2 = "_header_13mal_7";
|
|
96840
|
+
const headerText = "_headerText_13mal_13";
|
|
96841
|
+
const crossIcon$1 = "_crossIcon_13mal_19";
|
|
96842
|
+
const form$3 = "_form_13mal_25";
|
|
96843
|
+
const inputWrapper = "_inputWrapper_13mal_31";
|
|
96844
|
+
const input$2 = "_input_13mal_31";
|
|
96845
|
+
const selectWrapper = "_selectWrapper_13mal_43";
|
|
96846
|
+
const select = "_select_13mal_43";
|
|
96847
|
+
const series = "_series_13mal_55";
|
|
96848
|
+
const seriesWrapper = "_seriesWrapper_13mal_61";
|
|
96849
|
+
const valueLabelWrapper = "_valueLabelWrapper_13mal_67";
|
|
96866
96850
|
var styles$l = {
|
|
96867
96851
|
container: container$b,
|
|
96868
96852
|
header: header$2,
|
|
@@ -96877,9 +96861,9 @@ var styles$l = {
|
|
|
96877
96861
|
seriesWrapper,
|
|
96878
96862
|
valueLabelWrapper
|
|
96879
96863
|
};
|
|
96880
|
-
const tab = "
|
|
96881
|
-
const button$5 = "
|
|
96882
|
-
const activeTab = "
|
|
96864
|
+
const tab = "_tab_ksqsk_1";
|
|
96865
|
+
const button$5 = "_button_ksqsk_7";
|
|
96866
|
+
const activeTab = "_activeTab_ksqsk_15";
|
|
96883
96867
|
var styles$k = {
|
|
96884
96868
|
tab,
|
|
96885
96869
|
button: button$5,
|
|
@@ -96901,18 +96885,18 @@ const Tab = ({
|
|
|
96901
96885
|
}))
|
|
96902
96886
|
});
|
|
96903
96887
|
};
|
|
96904
|
-
const label$2 = "
|
|
96905
|
-
const checkboxLabel = "
|
|
96906
|
-
const input$1 = "
|
|
96907
|
-
const checkboxField = "
|
|
96888
|
+
const label$2 = "_label_1xzvi_1";
|
|
96889
|
+
const checkboxLabel = "_checkboxLabel_1xzvi_13";
|
|
96890
|
+
const input$1 = "_input_1xzvi_7";
|
|
96891
|
+
const checkboxField = "_checkboxField_1xzvi_25";
|
|
96908
96892
|
var styles$j = {
|
|
96909
96893
|
label: label$2,
|
|
96910
|
-
"inputField-container": "_inputField-
|
|
96894
|
+
"inputField-container": "_inputField-container_1xzvi_7",
|
|
96911
96895
|
checkboxLabel,
|
|
96912
96896
|
input: input$1,
|
|
96913
96897
|
checkboxField
|
|
96914
96898
|
};
|
|
96915
|
-
const error$3 = "
|
|
96899
|
+
const error$3 = "_error_1csa7_1";
|
|
96916
96900
|
var styles$i = {
|
|
96917
96901
|
error: error$3
|
|
96918
96902
|
};
|
|
@@ -97855,37 +97839,37 @@ let Pe = "div", ie = S$1.RenderStrategy, oe = C$1(function(e$12, s2) {
|
|
|
97855
97839
|
let n2 = useContext(A) !== null, m2 = s() !== null;
|
|
97856
97840
|
return React__default.createElement(React__default.Fragment, null, !n2 && m2 ? React__default.createElement(J, { ref: s$12, ...e2 }) : React__default.createElement(oe, { ref: s$12, ...e2 }));
|
|
97857
97841
|
}), Je = Object.assign(J, { Child: ye, Root: J });
|
|
97858
|
-
const listBoxButton = "
|
|
97859
|
-
const selectedOptionText = "
|
|
97860
|
-
const transitionDiv = "
|
|
97861
|
-
const listboxButtonWrapper = "
|
|
97862
|
-
const arrowicon = "
|
|
97863
|
-
const leave$1 = "
|
|
97864
|
-
const leaveFrom$1 = "
|
|
97865
|
-
const leaveTo$1 = "
|
|
97866
|
-
const notAvailable = "
|
|
97867
|
-
const option = "
|
|
97868
|
-
const activeOption = "
|
|
97869
|
-
const optionSelected = "
|
|
97870
|
-
const inactiveOption = "
|
|
97871
|
-
const optionLabel = "
|
|
97872
|
-
const optionSubLabel = "
|
|
97873
|
-
const selectedLabel = "
|
|
97874
|
-
const nonselectedLabel = "
|
|
97875
|
-
const check = "
|
|
97876
|
-
const checkActive = "
|
|
97877
|
-
const checkInactive = "
|
|
97878
|
-
const checkIcon$1 = "
|
|
97879
|
-
const checkIconSelected = "
|
|
97880
|
-
const checkIconUnselected = "
|
|
97881
|
-
const loadMore = "
|
|
97882
|
-
const selectedList = "
|
|
97883
|
-
const selectedListItem = "
|
|
97842
|
+
const listBoxButton = "_listBoxButton_syk7m_5";
|
|
97843
|
+
const selectedOptionText = "_selectedOptionText_syk7m_17";
|
|
97844
|
+
const transitionDiv = "_transitionDiv_syk7m_21";
|
|
97845
|
+
const listboxButtonWrapper = "_listboxButtonWrapper_syk7m_25";
|
|
97846
|
+
const arrowicon = "_arrowicon_syk7m_28";
|
|
97847
|
+
const leave$1 = "_leave_syk7m_31";
|
|
97848
|
+
const leaveFrom$1 = "_leaveFrom_syk7m_34";
|
|
97849
|
+
const leaveTo$1 = "_leaveTo_syk7m_37";
|
|
97850
|
+
const notAvailable = "_notAvailable_syk7m_40";
|
|
97851
|
+
const option = "_option_syk7m_43";
|
|
97852
|
+
const activeOption = "_activeOption_syk7m_46";
|
|
97853
|
+
const optionSelected = "_optionSelected_syk7m_49";
|
|
97854
|
+
const inactiveOption = "_inactiveOption_syk7m_52";
|
|
97855
|
+
const optionLabel = "_optionLabel_syk7m_55";
|
|
97856
|
+
const optionSubLabel = "_optionSubLabel_syk7m_58";
|
|
97857
|
+
const selectedLabel = "_selectedLabel_syk7m_61";
|
|
97858
|
+
const nonselectedLabel = "_nonselectedLabel_syk7m_64";
|
|
97859
|
+
const check = "_check_syk7m_67";
|
|
97860
|
+
const checkActive = "_checkActive_syk7m_70";
|
|
97861
|
+
const checkInactive = "_checkInactive_syk7m_73";
|
|
97862
|
+
const checkIcon$1 = "_checkIcon_syk7m_76";
|
|
97863
|
+
const checkIconSelected = "_checkIconSelected_syk7m_79";
|
|
97864
|
+
const checkIconUnselected = "_checkIconUnselected_syk7m_82";
|
|
97865
|
+
const loadMore = "_loadMore_syk7m_85";
|
|
97866
|
+
const selectedList = "_selectedList_syk7m_88";
|
|
97867
|
+
const selectedListItem = "_selectedListItem_syk7m_91";
|
|
97884
97868
|
var style = {
|
|
97885
|
-
"listBox-label": "_listBox-
|
|
97886
|
-
"listBoxButton-container": "_listBoxButton-
|
|
97869
|
+
"listBox-label": "_listBox-label_syk7m_1",
|
|
97870
|
+
"listBoxButton-container": "_listBoxButton-container_syk7m_5",
|
|
97887
97871
|
listBoxButton,
|
|
97888
|
-
"listBox-option": "_listBox-
|
|
97872
|
+
"listBox-option": "_listBox-option_syk7m_13",
|
|
97889
97873
|
selectedOptionText,
|
|
97890
97874
|
transitionDiv,
|
|
97891
97875
|
listboxButtonWrapper,
|
|
@@ -98442,15 +98426,15 @@ const ChartConfigure = ({
|
|
|
98442
98426
|
})]
|
|
98443
98427
|
});
|
|
98444
98428
|
};
|
|
98445
|
-
const chartButtonContainer$1 = "
|
|
98446
|
-
const chartButtons$1 = "
|
|
98447
|
-
const chartTypesButton = "
|
|
98448
|
-
const button$4 = "
|
|
98449
|
-
const propertyButton = "
|
|
98450
|
-
const settings = "
|
|
98451
|
-
const crossIcon = "
|
|
98429
|
+
const chartButtonContainer$1 = "_chartButtonContainer_1lfk7_9";
|
|
98430
|
+
const chartButtons$1 = "_chartButtons_1lfk7_17";
|
|
98431
|
+
const chartTypesButton = "_chartTypesButton_1lfk7_25";
|
|
98432
|
+
const button$4 = "_button_1lfk7_33";
|
|
98433
|
+
const propertyButton = "_propertyButton_1lfk7_41";
|
|
98434
|
+
const settings = "_settings_1lfk7_49";
|
|
98435
|
+
const crossIcon = "_crossIcon_1lfk7_57";
|
|
98452
98436
|
var styles$h = {
|
|
98453
|
-
"chartButton-header": "_chartButton-
|
|
98437
|
+
"chartButton-header": "_chartButton-header_1lfk7_1",
|
|
98454
98438
|
chartButtonContainer: chartButtonContainer$1,
|
|
98455
98439
|
chartButtons: chartButtons$1,
|
|
98456
98440
|
chartTypesButton,
|
|
@@ -99184,35 +99168,35 @@ const ChartSettings = ({
|
|
|
99184
99168
|
})]
|
|
99185
99169
|
});
|
|
99186
99170
|
};
|
|
99187
|
-
const searchCommand$1 = "
|
|
99188
|
-
const chartText = "
|
|
99189
|
-
const charts = "
|
|
99190
|
-
const metricChart = "
|
|
99191
|
-
const metricChartEmpty = "
|
|
99192
|
-
const fullQuery = "
|
|
99193
|
-
const noQuery = "
|
|
99194
|
-
const chartButtonContainer = "
|
|
99195
|
-
const searchWrapper = "
|
|
99196
|
-
const searchIcon = "
|
|
99197
|
-
const chartConfigure = "
|
|
99198
|
-
const chartSettings = "
|
|
99199
|
-
const labels = "
|
|
99200
|
-
const chartButtons = "
|
|
99201
|
-
const chartButton = "
|
|
99171
|
+
const searchCommand$1 = "_searchCommand_jk2ki_9";
|
|
99172
|
+
const chartText = "_chartText_jk2ki_25";
|
|
99173
|
+
const charts = "_charts_jk2ki_33";
|
|
99174
|
+
const metricChart = "_metricChart_jk2ki_41";
|
|
99175
|
+
const metricChartEmpty = "_metricChartEmpty_jk2ki_49";
|
|
99176
|
+
const fullQuery = "_fullQuery_jk2ki_73";
|
|
99177
|
+
const noQuery = "_noQuery_jk2ki_81";
|
|
99178
|
+
const chartButtonContainer = "_chartButtonContainer_jk2ki_105";
|
|
99179
|
+
const searchWrapper = "_searchWrapper_jk2ki_113";
|
|
99180
|
+
const searchIcon = "_searchIcon_jk2ki_121";
|
|
99181
|
+
const chartConfigure = "_chartConfigure_jk2ki_129";
|
|
99182
|
+
const chartSettings = "_chartSettings_jk2ki_137";
|
|
99183
|
+
const labels = "_labels_jk2ki_145";
|
|
99184
|
+
const chartButtons = "_chartButtons_jk2ki_153";
|
|
99185
|
+
const chartButton = "_chartButton_jk2ki_97";
|
|
99202
99186
|
var styles$f = {
|
|
99203
|
-
"outputTab-header": "_outputTab-
|
|
99187
|
+
"outputTab-header": "_outputTab-header_jk2ki_1",
|
|
99204
99188
|
searchCommand: searchCommand$1,
|
|
99205
|
-
"chartTab-container": "_chartTab-
|
|
99189
|
+
"chartTab-container": "_chartTab-container_jk2ki_17",
|
|
99206
99190
|
chartText,
|
|
99207
99191
|
charts,
|
|
99208
99192
|
metricChart,
|
|
99209
99193
|
metricChartEmpty,
|
|
99210
|
-
"chartTab-wrapper": "_chartTab-
|
|
99211
|
-
"chartTab-wrapper-head": "_chartTab-wrapper-
|
|
99194
|
+
"chartTab-wrapper": "_chartTab-wrapper_jk2ki_57",
|
|
99195
|
+
"chartTab-wrapper-head": "_chartTab-wrapper-head_jk2ki_65",
|
|
99212
99196
|
fullQuery,
|
|
99213
99197
|
noQuery,
|
|
99214
|
-
"tableTab-header": "_tableTab-
|
|
99215
|
-
"chartButton-header": "_chartButton-
|
|
99198
|
+
"tableTab-header": "_tableTab-header_jk2ki_89",
|
|
99199
|
+
"chartButton-header": "_chartButton-header_jk2ki_97",
|
|
99216
99200
|
chartButtonContainer,
|
|
99217
99201
|
searchWrapper,
|
|
99218
99202
|
searchIcon,
|
|
@@ -99465,17 +99449,19 @@ var styles$e = {
|
|
|
99465
99449
|
text,
|
|
99466
99450
|
table: table$3
|
|
99467
99451
|
};
|
|
99468
|
-
const container$8 = "
|
|
99469
|
-
const table$2 = "
|
|
99470
|
-
const tableHead = "
|
|
99471
|
-
const
|
|
99472
|
-
const
|
|
99473
|
-
const
|
|
99474
|
-
const
|
|
99452
|
+
const container$8 = "_container_1uho5_1";
|
|
99453
|
+
const table$2 = "_table_1uho5_9";
|
|
99454
|
+
const tableHead = "_tableHead_1uho5_17";
|
|
99455
|
+
const tableRow$1 = "_tableRow_1uho5_25";
|
|
99456
|
+
const tableHeadCol$1 = "_tableHeadCol_1uho5_33";
|
|
99457
|
+
const tableRowCol$1 = "_tableRowCol_1uho5_41";
|
|
99458
|
+
const empty = "_empty_1uho5_49";
|
|
99459
|
+
const error$2 = "_error_1uho5_57";
|
|
99475
99460
|
var styles$d = {
|
|
99476
99461
|
container: container$8,
|
|
99477
99462
|
table: table$2,
|
|
99478
99463
|
tableHead,
|
|
99464
|
+
tableRow: tableRow$1,
|
|
99479
99465
|
tableHeadCol: tableHeadCol$1,
|
|
99480
99466
|
tableRowCol: tableRowCol$1,
|
|
99481
99467
|
empty,
|
|
@@ -99492,6 +99478,7 @@ const MetricTable = ({
|
|
|
99492
99478
|
children: [/* @__PURE__ */ jsx("thead", {
|
|
99493
99479
|
className: styles$d.tableHead,
|
|
99494
99480
|
children: /* @__PURE__ */ jsx("tr", {
|
|
99481
|
+
className: styles$d.tableRow,
|
|
99495
99482
|
children: Object.keys(data[0]).map((item) => {
|
|
99496
99483
|
return /* @__PURE__ */ jsx("th", {
|
|
99497
99484
|
className: styles$d.tableHeadCol,
|
|
@@ -99550,36 +99537,36 @@ const InputTables = ({
|
|
|
99550
99537
|
})
|
|
99551
99538
|
});
|
|
99552
99539
|
};
|
|
99553
|
-
const container$7 = "
|
|
99554
|
-
const header$1 = "
|
|
99555
|
-
const tabButton$1 = "
|
|
99556
|
-
const selectedTab = "
|
|
99557
|
-
const table$1 = "
|
|
99540
|
+
const container$7 = "_container_12jmm_1";
|
|
99541
|
+
const header$1 = "_header_12jmm_5";
|
|
99542
|
+
const tabButton$1 = "_tabButton_12jmm_16";
|
|
99543
|
+
const selectedTab = "_selectedTab_12jmm_19";
|
|
99544
|
+
const table$1 = "_table_12jmm_22";
|
|
99558
99545
|
var styles$c = {
|
|
99559
99546
|
container: container$7,
|
|
99560
99547
|
header: header$1,
|
|
99561
|
-
"text-container": "_text-
|
|
99562
|
-
"btn-container": "_btn-
|
|
99548
|
+
"text-container": "_text-container_12jmm_9",
|
|
99549
|
+
"btn-container": "_btn-container_12jmm_13",
|
|
99563
99550
|
tabButton: tabButton$1,
|
|
99564
99551
|
selectedTab,
|
|
99565
99552
|
table: table$1
|
|
99566
99553
|
};
|
|
99567
|
-
const tableData = "
|
|
99568
|
-
const tableHeadCol = "
|
|
99569
|
-
const tableRow = "
|
|
99570
|
-
const tableRowCol = "
|
|
99571
|
-
const row = "
|
|
99572
|
-
const container$6 = "
|
|
99573
|
-
const table = "
|
|
99574
|
-
const previewTable = "
|
|
99575
|
-
const preview = "
|
|
99576
|
-
const previewText = "
|
|
99577
|
-
const noData = "
|
|
99578
|
-
const error$1 = "
|
|
99579
|
-
const errorMsg = "
|
|
99580
|
-
const tableIcon = "
|
|
99554
|
+
const tableData = "_tableData_1j4gc_7";
|
|
99555
|
+
const tableHeadCol = "_tableHeadCol_1j4gc_13";
|
|
99556
|
+
const tableRow = "_tableRow_1j4gc_19";
|
|
99557
|
+
const tableRowCol = "_tableRowCol_1j4gc_25";
|
|
99558
|
+
const row = "_row_1j4gc_31";
|
|
99559
|
+
const container$6 = "_container_1j4gc_37";
|
|
99560
|
+
const table = "_table_1j4gc_1";
|
|
99561
|
+
const previewTable = "_previewTable_1j4gc_49";
|
|
99562
|
+
const preview = "_preview_1j4gc_49";
|
|
99563
|
+
const previewText = "_previewText_1j4gc_61";
|
|
99564
|
+
const noData = "_noData_1j4gc_67";
|
|
99565
|
+
const error$1 = "_error_1j4gc_73";
|
|
99566
|
+
const errorMsg = "_errorMsg_1j4gc_79";
|
|
99567
|
+
const tableIcon = "_tableIcon_1j4gc_85";
|
|
99581
99568
|
var styles$b = {
|
|
99582
|
-
"table-loader-container": "_table-loader-
|
|
99569
|
+
"table-loader-container": "_table-loader-container_1j4gc_1",
|
|
99583
99570
|
tableData,
|
|
99584
99571
|
tableHeadCol,
|
|
99585
99572
|
tableRow,
|
|
@@ -99725,7 +99712,7 @@ const TableTab = ({
|
|
|
99725
99712
|
}), /* @__PURE__ */ jsx(Button, {
|
|
99726
99713
|
type: "button",
|
|
99727
99714
|
variant: "custom",
|
|
99728
|
-
className: `${styles$c.tabButton} ${selectedTab2 ===
|
|
99715
|
+
className: `${styles$c.tabButton} ${selectedTab2 === OUTPUT_TABLE && styles$c.selectedTab}`,
|
|
99729
99716
|
onClick: () => setSelectedTab(OUTPUT_TABLE),
|
|
99730
99717
|
children: "Output Table"
|
|
99731
99718
|
})]
|
|
@@ -99742,13 +99729,13 @@ const TableTab = ({
|
|
|
99742
99729
|
})]
|
|
99743
99730
|
});
|
|
99744
99731
|
};
|
|
99745
|
-
const wrapper = "
|
|
99746
|
-
const searchCommand = "
|
|
99747
|
-
const tabButton = "
|
|
99748
|
-
const tabActive = "
|
|
99732
|
+
const wrapper = "_wrapper_8x5tf_9";
|
|
99733
|
+
const searchCommand = "_searchCommand_8x5tf_12";
|
|
99734
|
+
const tabButton = "_tabButton_8x5tf_15";
|
|
99735
|
+
const tabActive = "_tabActive_8x5tf_18";
|
|
99749
99736
|
var styles$a = {
|
|
99750
|
-
"main-container": "_main-
|
|
99751
|
-
"outputTab-header": "_outputTab-
|
|
99737
|
+
"main-container": "_main-container_8x5tf_1",
|
|
99738
|
+
"outputTab-header": "_outputTab-header_8x5tf_5",
|
|
99752
99739
|
wrapper,
|
|
99753
99740
|
searchCommand,
|
|
99754
99741
|
tabButton,
|
|
@@ -99866,26 +99853,26 @@ const MetricOutput = ({
|
|
|
99866
99853
|
})]
|
|
99867
99854
|
});
|
|
99868
99855
|
};
|
|
99869
|
-
const group$1 = "
|
|
99870
|
-
const tooltipWrapper = "
|
|
99871
|
-
const tooltip = "
|
|
99872
|
-
const dropdown = "
|
|
99873
|
-
const filterDropdown$1 = "
|
|
99874
|
-
const filterValues = "
|
|
99875
|
-
const columnText = "
|
|
99876
|
-
const disabled = "
|
|
99877
|
-
const checkIcon = "
|
|
99878
|
-
const generateButton = "
|
|
99856
|
+
const group$1 = "_group_vmreb_1";
|
|
99857
|
+
const tooltipWrapper = "_tooltipWrapper_vmreb_37";
|
|
99858
|
+
const tooltip = "_tooltip_vmreb_37";
|
|
99859
|
+
const dropdown = "_dropdown_vmreb_49";
|
|
99860
|
+
const filterDropdown$1 = "_filterDropdown_vmreb_53";
|
|
99861
|
+
const filterValues = "_filterValues_vmreb_57";
|
|
99862
|
+
const columnText = "_columnText_vmreb_61";
|
|
99863
|
+
const disabled = "_disabled_vmreb_65";
|
|
99864
|
+
const checkIcon = "_checkIcon_vmreb_69";
|
|
99865
|
+
const generateButton = "_generateButton_vmreb_73";
|
|
99879
99866
|
var styles$9 = {
|
|
99880
|
-
"form-container": "_form-
|
|
99881
|
-
"field-container": "_field-
|
|
99882
|
-
"field-label": "_field-
|
|
99883
|
-
"field-wrapper": "_field-
|
|
99884
|
-
"field-inner-container": "_field-inner-
|
|
99885
|
-
"field-value": "_field-
|
|
99886
|
-
"field-add-btn": "_field-add-
|
|
99887
|
-
"field-value-container": "_field-value-
|
|
99888
|
-
"field-prompt": "_field-
|
|
99867
|
+
"form-container": "_form-container_vmreb_1",
|
|
99868
|
+
"field-container": "_field-container_vmreb_5",
|
|
99869
|
+
"field-label": "_field-label_vmreb_9",
|
|
99870
|
+
"field-wrapper": "_field-wrapper_vmreb_13",
|
|
99871
|
+
"field-inner-container": "_field-inner-container_vmreb_17",
|
|
99872
|
+
"field-value": "_field-value_vmreb_21",
|
|
99873
|
+
"field-add-btn": "_field-add-btn_vmreb_25",
|
|
99874
|
+
"field-value-container": "_field-value-container_vmreb_29",
|
|
99875
|
+
"field-prompt": "_field-prompt_vmreb_33",
|
|
99889
99876
|
group: group$1,
|
|
99890
99877
|
tooltipWrapper,
|
|
99891
99878
|
tooltip,
|
|
@@ -99897,13 +99884,13 @@ var styles$9 = {
|
|
|
99897
99884
|
checkIcon,
|
|
99898
99885
|
generateButton
|
|
99899
99886
|
};
|
|
99900
|
-
const button$3 = "
|
|
99901
|
-
const menu$2 = "
|
|
99902
|
-
const inputLabel = "
|
|
99903
|
-
const input = "
|
|
99904
|
-
const menuContainer$1 = "
|
|
99905
|
-
const icon = "
|
|
99906
|
-
const container$5 = "
|
|
99887
|
+
const button$3 = "_button_1qzqi_1";
|
|
99888
|
+
const menu$2 = "_menu_1qzqi_7";
|
|
99889
|
+
const inputLabel = "_inputLabel_1qzqi_13";
|
|
99890
|
+
const input = "_input_1qzqi_13";
|
|
99891
|
+
const menuContainer$1 = "_menuContainer_1qzqi_25";
|
|
99892
|
+
const icon = "_icon_1qzqi_31";
|
|
99893
|
+
const container$5 = "_container_1qzqi_37";
|
|
99907
99894
|
var styles$8 = {
|
|
99908
99895
|
button: button$3,
|
|
99909
99896
|
menu: menu$2,
|
|
@@ -99913,22 +99900,22 @@ var styles$8 = {
|
|
|
99913
99900
|
icon,
|
|
99914
99901
|
container: container$5
|
|
99915
99902
|
};
|
|
99916
|
-
const container$4 = "
|
|
99917
|
-
const popover = "
|
|
99918
|
-
const button$2 = "
|
|
99919
|
-
const buttonOpen = "
|
|
99920
|
-
const menu$1 = "
|
|
99921
|
-
const enter = "
|
|
99922
|
-
const enterFrom = "
|
|
99923
|
-
const enterTo = "
|
|
99924
|
-
const leave = "
|
|
99925
|
-
const leaveFrom = "
|
|
99926
|
-
const leaveTo = "
|
|
99927
|
-
const center = "
|
|
99928
|
-
const top = "
|
|
99929
|
-
const bottom = "
|
|
99930
|
-
const left = "
|
|
99931
|
-
const right = "
|
|
99903
|
+
const container$4 = "_container_1qflp_1";
|
|
99904
|
+
const popover = "_popover_1qflp_9";
|
|
99905
|
+
const button$2 = "_button_1qflp_17";
|
|
99906
|
+
const buttonOpen = "_buttonOpen_1qflp_25";
|
|
99907
|
+
const menu$1 = "_menu_1qflp_33";
|
|
99908
|
+
const enter = "_enter_1qflp_41";
|
|
99909
|
+
const enterFrom = "_enterFrom_1qflp_49";
|
|
99910
|
+
const enterTo = "_enterTo_1qflp_57";
|
|
99911
|
+
const leave = "_leave_1qflp_65";
|
|
99912
|
+
const leaveFrom = "_leaveFrom_1qflp_73";
|
|
99913
|
+
const leaveTo = "_leaveTo_1qflp_81";
|
|
99914
|
+
const center = "_center_1qflp_89";
|
|
99915
|
+
const top = "_top_1qflp_97";
|
|
99916
|
+
const bottom = "_bottom_1qflp_105";
|
|
99917
|
+
const left = "_left_1qflp_113";
|
|
99918
|
+
const right = "_right_1qflp_121";
|
|
99932
99919
|
var styles$7 = {
|
|
99933
99920
|
container: container$4,
|
|
99934
99921
|
popover,
|
|
@@ -99946,18 +99933,18 @@ var styles$7 = {
|
|
|
99946
99933
|
bottom,
|
|
99947
99934
|
left,
|
|
99948
99935
|
right,
|
|
99949
|
-
"left-top-end": "_left-top-
|
|
99950
|
-
"right-top-end": "_right-top-
|
|
99951
|
-
"left-bottom-end": "_left-bottom-
|
|
99952
|
-
"right-bottom-end": "_right-bottom-
|
|
99953
|
-
"top-left": "_top-
|
|
99954
|
-
"top-right": "_top-
|
|
99955
|
-
"bottom-left": "_bottom-
|
|
99956
|
-
"bottom-right": "_bottom-
|
|
99957
|
-
"left-top": "_left-
|
|
99958
|
-
"left-bottom": "_left-
|
|
99959
|
-
"right-top": "_right-
|
|
99960
|
-
"right-bottom": "_right-
|
|
99936
|
+
"left-top-end": "_left-top-end_1qflp_129",
|
|
99937
|
+
"right-top-end": "_right-top-end_1qflp_137",
|
|
99938
|
+
"left-bottom-end": "_left-bottom-end_1qflp_145",
|
|
99939
|
+
"right-bottom-end": "_right-bottom-end_1qflp_153",
|
|
99940
|
+
"top-left": "_top-left_1qflp_161",
|
|
99941
|
+
"top-right": "_top-right_1qflp_169",
|
|
99942
|
+
"bottom-left": "_bottom-left_1qflp_177",
|
|
99943
|
+
"bottom-right": "_bottom-right_1qflp_185",
|
|
99944
|
+
"left-top": "_left-top_1qflp_129",
|
|
99945
|
+
"left-bottom": "_left-bottom_1qflp_145",
|
|
99946
|
+
"right-top": "_right-top_1qflp_137",
|
|
99947
|
+
"right-bottom": "_right-bottom_1qflp_153"
|
|
99961
99948
|
};
|
|
99962
99949
|
const PopoverMenu = ({
|
|
99963
99950
|
className = "",
|
|
@@ -100441,7 +100428,7 @@ const MetricForm = ({
|
|
|
100441
100428
|
if (dateTimeColumnList.length) {
|
|
100442
100429
|
setTimeColumn({
|
|
100443
100430
|
value: dateTimeColumnList[0].name,
|
|
100444
|
-
label: dateTimeColumnList[0].
|
|
100431
|
+
label: dateTimeColumnList[0].as
|
|
100445
100432
|
});
|
|
100446
100433
|
} else {
|
|
100447
100434
|
setTimeColumn({
|
|
@@ -100544,10 +100531,11 @@ const MetricForm = ({
|
|
|
100544
100531
|
onChange: setTimeColumn,
|
|
100545
100532
|
selectedOption: timeColumn,
|
|
100546
100533
|
options: dateTimeColumnList.map(({
|
|
100547
|
-
name
|
|
100534
|
+
name,
|
|
100535
|
+
as
|
|
100548
100536
|
}) => ({
|
|
100549
100537
|
value: name,
|
|
100550
|
-
label:
|
|
100538
|
+
label: as
|
|
100551
100539
|
})),
|
|
100552
100540
|
isDisabled: isDisableTimeColumn,
|
|
100553
100541
|
labelVariant: "static",
|
|
@@ -100640,8 +100628,8 @@ const MetricForm = ({
|
|
|
100640
100628
|
isDisabled: !metricAggregate.value || !metricColumn.value,
|
|
100641
100629
|
onClick: () => {
|
|
100642
100630
|
setMetrics((prev) => [...prev, {
|
|
100643
|
-
value: `${metricAggregate.value}(${isBigQuery ? `${metricColumn.value}` : isMongoDb ? `\`${metricColumn.value}\`` : `"${metricColumn.value}"`})`,
|
|
100644
|
-
as: isBigQuery ? aliasValue || `_result` : aliasValue || `${metricAggregate.value}(${metricColumn.
|
|
100631
|
+
value: `${metricAggregate.value}(${isBigQuery || isMySql ? `${metricColumn.value}` : isMongoDb ? `\`${metricColumn.value}\`` : `"${metricColumn.value}"`})`,
|
|
100632
|
+
as: isBigQuery ? aliasValue || `_result` : aliasValue || `${metricAggregate.value}(${metricColumn.label})`
|
|
100645
100633
|
}]);
|
|
100646
100634
|
setOpenMetric(false);
|
|
100647
100635
|
},
|
|
@@ -100731,7 +100719,7 @@ const MetricForm = ({
|
|
|
100731
100719
|
if (!columns.find((c2) => c2.as === aliasValue))
|
|
100732
100720
|
setColumns((prev) => [...prev, {
|
|
100733
100721
|
value: `${column2.value}`,
|
|
100734
|
-
as: aliasValue || `${column2.
|
|
100722
|
+
as: aliasValue || `${column2.label}`
|
|
100735
100723
|
}]);
|
|
100736
100724
|
setOpenColumn(false);
|
|
100737
100725
|
},
|
|
@@ -100917,6 +100905,7 @@ const MetricForm = ({
|
|
|
100917
100905
|
className: styles$9.generateButton,
|
|
100918
100906
|
isDisabled: isGeneratingDataset || isDisableGenerate,
|
|
100919
100907
|
onClick: () => {
|
|
100908
|
+
var _a2, _b2, _c2;
|
|
100920
100909
|
setError("");
|
|
100921
100910
|
setLoading(true);
|
|
100922
100911
|
setData([]);
|
|
@@ -100928,8 +100917,26 @@ const MetricForm = ({
|
|
|
100928
100917
|
companyId,
|
|
100929
100918
|
userInputs: {
|
|
100930
100919
|
columns: columns.map((c2) => isBigQuery || isMySql ? `${c2.value} AS ${c2.as} ` : isMongoDb ? `\`${c2.value}\` AS "${c2.as}"` : `"${c2.value}" AS "${c2.as}"`),
|
|
100931
|
-
dimensions: isBigQuery || isMySql ? selectedDimensions
|
|
100932
|
-
|
|
100920
|
+
dimensions: isBigQuery || isMySql ? selectedDimensions.map((d2) => {
|
|
100921
|
+
var _a3, _b3;
|
|
100922
|
+
return {
|
|
100923
|
+
name: (_a3 = columnList.find((c2) => c2.value === d2)) == null ? void 0 : _a3.value,
|
|
100924
|
+
as: (_b3 = columnList.find((c2) => c2.value === d2)) == null ? void 0 : _b3.label
|
|
100925
|
+
};
|
|
100926
|
+
}) : isMongoDb ? selectedDimensions.map((d2) => {
|
|
100927
|
+
var _a3, _b3;
|
|
100928
|
+
return {
|
|
100929
|
+
name: `\`${(_a3 = columnList.find((c2) => c2.value === d2)) == null ? void 0 : _a3.value}\``,
|
|
100930
|
+
as: (_b3 = columnList.find((c2) => c2.value === d2)) == null ? void 0 : _b3.label
|
|
100931
|
+
};
|
|
100932
|
+
}) : selectedDimensions.map((d2) => {
|
|
100933
|
+
var _a3, _b3;
|
|
100934
|
+
return {
|
|
100935
|
+
name: `"${(_a3 = columnList.find((c2) => c2.value === d2)) == null ? void 0 : _a3.value}"`,
|
|
100936
|
+
as: (_b3 = columnList.find((c2) => c2.value === d2)) == null ? void 0 : _b3.label
|
|
100937
|
+
};
|
|
100938
|
+
}),
|
|
100939
|
+
metrics: metrics.map((m2) => isBigQuery ? `${m2.value} AS ${m2.as}` : `${m2.value} AS "${m2.as}"`),
|
|
100933
100940
|
sort: sort2,
|
|
100934
100941
|
isSortDescending,
|
|
100935
100942
|
filters: filters2,
|
|
@@ -100937,16 +100944,25 @@ const MetricForm = ({
|
|
|
100937
100944
|
rowLimit: rowLimit.value,
|
|
100938
100945
|
timeFilter: {
|
|
100939
100946
|
filter: timeGrain,
|
|
100940
|
-
column: isBigQuery || isMySql ?
|
|
100947
|
+
column: isBigQuery || isMySql ? {
|
|
100948
|
+
name: timeColumn.value,
|
|
100949
|
+
as: (_a2 = columnList.find((c2) => c2.value === timeColumn.value)) == null ? void 0 : _a2.label
|
|
100950
|
+
} : isMongoDb ? {
|
|
100951
|
+
name: `\`${timeColumn.value}\``,
|
|
100952
|
+
as: (_b2 = columnList.find((c2) => c2.value === timeColumn.value)) == null ? void 0 : _b2.label
|
|
100953
|
+
} : {
|
|
100954
|
+
name: `"${timeColumn.value}"`,
|
|
100955
|
+
as: (_c2 = columnList.find((c2) => c2.value === timeColumn.value)) == null ? void 0 : _c2.label
|
|
100956
|
+
},
|
|
100941
100957
|
isInclude: isIncludeTime
|
|
100942
100958
|
}
|
|
100943
100959
|
}
|
|
100944
100960
|
}, {
|
|
100945
100961
|
onSuccess(data) {
|
|
100946
|
-
var
|
|
100947
|
-
const error2 = (
|
|
100948
|
-
const result = (
|
|
100949
|
-
const outputQuery = (
|
|
100962
|
+
var _a3, _b3, _c3;
|
|
100963
|
+
const error2 = (_a3 = data.generateDatasetMetrics) == null ? void 0 : _a3.error;
|
|
100964
|
+
const result = (_b3 = data.generateDatasetMetrics) == null ? void 0 : _b3.result;
|
|
100965
|
+
const outputQuery = (_c3 = data.generateDatasetMetrics) == null ? void 0 : _c3.query;
|
|
100950
100966
|
if (error2 || generateError) {
|
|
100951
100967
|
setError(error2.message || SOMETHING_WENT_WRONG);
|
|
100952
100968
|
setLoading(false);
|
|
@@ -100967,10 +100983,10 @@ const MetricForm = ({
|
|
|
100967
100983
|
});
|
|
100968
100984
|
};
|
|
100969
100985
|
var MetricForm$1 = React__default.memo(MetricForm);
|
|
100970
|
-
const container$3 = "
|
|
100971
|
-
const header = "
|
|
100972
|
-
const enableGroupBy = "
|
|
100973
|
-
const enableGroupButton = "
|
|
100986
|
+
const container$3 = "_container_7zhjn_1";
|
|
100987
|
+
const header = "_header_7zhjn_5";
|
|
100988
|
+
const enableGroupBy = "_enableGroupBy_7zhjn_8";
|
|
100989
|
+
const enableGroupButton = "_enableGroupButton_7zhjn_11";
|
|
100974
100990
|
var styles$6 = {
|
|
100975
100991
|
container: container$3,
|
|
100976
100992
|
header,
|
|
@@ -101018,13 +101034,13 @@ const ConstructMetric = ({
|
|
|
101018
101034
|
});
|
|
101019
101035
|
};
|
|
101020
101036
|
var ConstructMetric$1 = React__default.memo(ConstructMetric);
|
|
101021
|
-
const form$1 = "
|
|
101022
|
-
const container$2 = "
|
|
101023
|
-
const field = "
|
|
101024
|
-
const fieldLabel = "
|
|
101025
|
-
const save = "
|
|
101026
|
-
const cancel = "
|
|
101027
|
-
const error = "
|
|
101037
|
+
const form$1 = "_form_qtwuf_1";
|
|
101038
|
+
const container$2 = "_container_qtwuf_7";
|
|
101039
|
+
const field = "_field_qtwuf_13";
|
|
101040
|
+
const fieldLabel = "_fieldLabel_qtwuf_19";
|
|
101041
|
+
const save = "_save_qtwuf_25";
|
|
101042
|
+
const cancel = "_cancel_qtwuf_31";
|
|
101043
|
+
const error = "_error_qtwuf_37";
|
|
101028
101044
|
var styles$5 = {
|
|
101029
101045
|
form: form$1,
|
|
101030
101046
|
container: container$2,
|
|
@@ -101034,9 +101050,9 @@ var styles$5 = {
|
|
|
101034
101050
|
cancel,
|
|
101035
101051
|
error
|
|
101036
101052
|
};
|
|
101037
|
-
const label$1 = "
|
|
101038
|
-
const textarea = "
|
|
101039
|
-
const resizable = "
|
|
101053
|
+
const label$1 = "_label_1vo1x_1";
|
|
101054
|
+
const textarea = "_textarea_1vo1x_9";
|
|
101055
|
+
const resizable = "_resizable_1vo1x_17";
|
|
101040
101056
|
var styles$4 = {
|
|
101041
101057
|
label: label$1,
|
|
101042
101058
|
textarea,
|
|
@@ -101080,20 +101096,20 @@ const TextAreaField = ({
|
|
|
101080
101096
|
})]
|
|
101081
101097
|
});
|
|
101082
101098
|
};
|
|
101083
|
-
const group = "
|
|
101084
|
-
const button$1 = "
|
|
101085
|
-
const enabled = "
|
|
101086
|
-
const notenabled = "
|
|
101087
|
-
const switchIcon = "
|
|
101088
|
-
const switchActive = "
|
|
101089
|
-
const switchInactive = "
|
|
101090
|
-
const label = "
|
|
101091
|
-
const labelActive = "
|
|
101092
|
-
const labelInactive = "
|
|
101099
|
+
const group = "_group_3fgum_1";
|
|
101100
|
+
const button$1 = "_button_3fgum_7";
|
|
101101
|
+
const enabled = "_enabled_3fgum_19";
|
|
101102
|
+
const notenabled = "_notenabled_3fgum_25";
|
|
101103
|
+
const switchIcon = "_switchIcon_3fgum_31";
|
|
101104
|
+
const switchActive = "_switchActive_3fgum_37";
|
|
101105
|
+
const switchInactive = "_switchInactive_3fgum_43";
|
|
101106
|
+
const label = "_label_3fgum_49";
|
|
101107
|
+
const labelActive = "_labelActive_3fgum_55";
|
|
101108
|
+
const labelInactive = "_labelInactive_3fgum_61";
|
|
101093
101109
|
var styles$3 = {
|
|
101094
101110
|
group,
|
|
101095
101111
|
button: button$1,
|
|
101096
|
-
"switch": "
|
|
101112
|
+
"switch": "_switch_3fgum_13",
|
|
101097
101113
|
enabled,
|
|
101098
101114
|
notenabled,
|
|
101099
101115
|
switchIcon,
|
|
@@ -101415,11 +101431,22 @@ const useExternalMetric = ({
|
|
|
101415
101431
|
};
|
|
101416
101432
|
return { createExternalMetric, error: error2 };
|
|
101417
101433
|
};
|
|
101434
|
+
const mdiPlus = (props) => /* @__PURE__ */ jsx("svg", {
|
|
101435
|
+
viewBox: "0 0 24 24",
|
|
101436
|
+
width: "1.2em",
|
|
101437
|
+
height: "1.2em",
|
|
101438
|
+
...props,
|
|
101439
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
101440
|
+
fill: "currentColor",
|
|
101441
|
+
d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2Z"
|
|
101442
|
+
})
|
|
101443
|
+
});
|
|
101418
101444
|
const EmbeddedMetricCreation = ({
|
|
101419
101445
|
clientId,
|
|
101420
101446
|
companyId,
|
|
101421
101447
|
mode,
|
|
101422
|
-
externalDashboardId
|
|
101448
|
+
externalDashboardId,
|
|
101449
|
+
variant = "static"
|
|
101423
101450
|
}) => {
|
|
101424
101451
|
var _a2;
|
|
101425
101452
|
const [isLoading, setLoading] = useState(false);
|
|
@@ -101462,10 +101489,11 @@ const EmbeddedMetricCreation = ({
|
|
|
101462
101489
|
const columnList = useMemo(() => {
|
|
101463
101490
|
var _a3;
|
|
101464
101491
|
return ((_a3 = selectedTableData == null ? void 0 : selectedTableData.columns) == null ? void 0 : _a3.map(({
|
|
101465
|
-
name
|
|
101492
|
+
name,
|
|
101493
|
+
as
|
|
101466
101494
|
}) => ({
|
|
101467
101495
|
value: name,
|
|
101468
|
-
label:
|
|
101496
|
+
label: as
|
|
101469
101497
|
}))) || [];
|
|
101470
101498
|
}, [selectedTableData]);
|
|
101471
101499
|
useEffect(() => {
|
|
@@ -101652,10 +101680,13 @@ const EmbeddedMetricCreation = ({
|
|
|
101652
101680
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
101653
101681
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
101654
101682
|
type: "button",
|
|
101655
|
-
variant: "primary",
|
|
101683
|
+
variant: variant === "floating" ? "custom" : "primary",
|
|
101656
101684
|
size: "large",
|
|
101685
|
+
className: variant === "floating" ? styles$p.floatingCreateButton : "",
|
|
101657
101686
|
onClick: () => setShowMetricCreateModal(true),
|
|
101658
|
-
children: "
|
|
101687
|
+
children: variant === "floating" ? /* @__PURE__ */ jsx(mdiPlus, {
|
|
101688
|
+
className: styles$p.floatingCreateButtonIcon
|
|
101689
|
+
}) : "Create Metric"
|
|
101659
101690
|
}), /* @__PURE__ */ jsx(Modal$1, {
|
|
101660
101691
|
headerTitle: "Create Metric",
|
|
101661
101692
|
isOpen: isShowMetricCreateModal,
|
|
@@ -101784,15 +101815,15 @@ const useEmbeddedDashboard = (token) => {
|
|
|
101784
101815
|
}
|
|
101785
101816
|
};
|
|
101786
101817
|
};
|
|
101787
|
-
const container$1 = "
|
|
101788
|
-
const form = "
|
|
101789
|
-
const title = "
|
|
101790
|
-
const apply = "
|
|
101791
|
-
const reset = "
|
|
101792
|
-
const filters = "
|
|
101793
|
-
const filterItem = "
|
|
101794
|
-
const filterItemOperator = "
|
|
101795
|
-
const remove = "
|
|
101818
|
+
const container$1 = "_container_lfh6d_1";
|
|
101819
|
+
const form = "_form_lfh6d_7";
|
|
101820
|
+
const title = "_title_lfh6d_13";
|
|
101821
|
+
const apply = "_apply_lfh6d_19";
|
|
101822
|
+
const reset = "_reset_lfh6d_25";
|
|
101823
|
+
const filters = "_filters_lfh6d_31";
|
|
101824
|
+
const filterItem = "_filterItem_lfh6d_37";
|
|
101825
|
+
const filterItemOperator = "_filterItemOperator_lfh6d_43";
|
|
101826
|
+
const remove = "_remove_lfh6d_49";
|
|
101796
101827
|
var styles$2 = {
|
|
101797
101828
|
container: container$1,
|
|
101798
101829
|
form,
|
|
@@ -102198,6 +102229,16 @@ const MetricFilters = ({
|
|
|
102198
102229
|
});
|
|
102199
102230
|
};
|
|
102200
102231
|
var MetricFilters$1 = React__default.memo(MetricFilters);
|
|
102232
|
+
const icOutlineFilterAltOff = (props) => /* @__PURE__ */ jsx("svg", {
|
|
102233
|
+
viewBox: "0 0 24 24",
|
|
102234
|
+
width: "1.2em",
|
|
102235
|
+
height: "1.2em",
|
|
102236
|
+
...props,
|
|
102237
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
102238
|
+
fill: "currentColor",
|
|
102239
|
+
d: "m16.95 6l-3.57 4.55l1.43 1.43c1.03-1.31 4.98-6.37 4.98-6.37A.998.998 0 0 0 19 4H6.83l2 2h8.12zM2.81 2.81L1.39 4.22L10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78l1.41-1.41L2.81 2.81z"
|
|
102240
|
+
})
|
|
102241
|
+
});
|
|
102201
102242
|
const container = "_container_7vfcn_1";
|
|
102202
102243
|
const windowIcon = "_windowIcon_7vfcn_7";
|
|
102203
102244
|
var styles = {
|
|
@@ -102242,9 +102283,67 @@ const ErrorFallback = () => {
|
|
|
102242
102283
|
});
|
|
102243
102284
|
};
|
|
102244
102285
|
var ErrorFallback$1 = React__default.memo(ErrorFallback);
|
|
102286
|
+
const applyTheme = (theme2) => {
|
|
102287
|
+
const root = document.documentElement;
|
|
102288
|
+
if (theme2.colors)
|
|
102289
|
+
Object.entries(theme2.colors).forEach(([key, value]) => {
|
|
102290
|
+
root.style.setProperty(`--databrainhq-plugin-color-${key}`, `${value}`);
|
|
102291
|
+
});
|
|
102292
|
+
if (theme2.border)
|
|
102293
|
+
Object.entries(theme2.border).forEach(([key, value]) => {
|
|
102294
|
+
root.style.setProperty(`--databrainhq-plugin-border-${key}`, `${value}`);
|
|
102295
|
+
});
|
|
102296
|
+
if (theme2.shadow)
|
|
102297
|
+
Object.entries(theme2.shadow).forEach(([key, value]) => {
|
|
102298
|
+
root.style.setProperty(`--databrainhq-plugin-shadow-${key}`, `${value}`);
|
|
102299
|
+
});
|
|
102300
|
+
if (theme2.typography)
|
|
102301
|
+
Object.entries(theme2.typography).forEach(([key, value]) => {
|
|
102302
|
+
root.style.setProperty(
|
|
102303
|
+
`--databrainhq-plugin-typography-${key}`,
|
|
102304
|
+
`${value}`
|
|
102305
|
+
);
|
|
102306
|
+
});
|
|
102307
|
+
if (theme2.breakpoint)
|
|
102308
|
+
Object.entries(theme2.breakpoint).forEach(([key, value]) => {
|
|
102309
|
+
root.style.setProperty(
|
|
102310
|
+
`--databrainhq-plugin-breakpoint-${key}`,
|
|
102311
|
+
`${value}`
|
|
102312
|
+
);
|
|
102313
|
+
});
|
|
102314
|
+
};
|
|
102315
|
+
const akarIconsSettingsHorizontal = (props) => /* @__PURE__ */ jsx("svg", {
|
|
102316
|
+
viewBox: "0 0 24 24",
|
|
102317
|
+
width: "1.2em",
|
|
102318
|
+
height: "1.2em",
|
|
102319
|
+
...props,
|
|
102320
|
+
children: /* @__PURE__ */ jsxs("g", {
|
|
102321
|
+
fill: "none",
|
|
102322
|
+
stroke: "currentColor",
|
|
102323
|
+
strokeLinecap: "round",
|
|
102324
|
+
strokeWidth: 2,
|
|
102325
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
102326
|
+
d: "M3 5h4m14 0H11m-8 7h12m6 0h-2M3 19h2m16 0H9"
|
|
102327
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
102328
|
+
cx: 9,
|
|
102329
|
+
cy: 5,
|
|
102330
|
+
r: 2
|
|
102331
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
102332
|
+
cx: 17,
|
|
102333
|
+
cy: 12,
|
|
102334
|
+
r: 2
|
|
102335
|
+
}), /* @__PURE__ */ jsx("circle", {
|
|
102336
|
+
cx: 7,
|
|
102337
|
+
cy: 19,
|
|
102338
|
+
r: 2
|
|
102339
|
+
})]
|
|
102340
|
+
})
|
|
102341
|
+
});
|
|
102245
102342
|
const queryClient = new QueryClient();
|
|
102246
102343
|
const EmbeddedDashboard = React__default.memo(({
|
|
102247
|
-
token
|
|
102344
|
+
token,
|
|
102345
|
+
options: options2,
|
|
102346
|
+
theme: theme2
|
|
102248
102347
|
}) => {
|
|
102249
102348
|
var _a2, _b2;
|
|
102250
102349
|
const {
|
|
@@ -102258,42 +102357,56 @@ const EmbeddedDashboard = React__default.memo(({
|
|
|
102258
102357
|
});
|
|
102259
102358
|
return /* @__PURE__ */ jsx(Fragment, {
|
|
102260
102359
|
children: /* @__PURE__ */ jsxs("div", {
|
|
102261
|
-
className: styles$
|
|
102360
|
+
className: styles$A["embedDashboard-container"],
|
|
102262
102361
|
children: [((_a2 = data.externalDashboard) == null ? void 0 : _a2.id) && !isLoading && /* @__PURE__ */ jsxs(Fragment, {
|
|
102263
102362
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
102264
|
-
className: styles$
|
|
102265
|
-
children: [
|
|
102266
|
-
|
|
102267
|
-
|
|
102268
|
-
|
|
102269
|
-
onClick: () => setShowFilters((s2) => !s2),
|
|
102270
|
-
children: /* @__PURE__ */ jsx(icOutlineFilterAlt, {
|
|
102271
|
-
color: "#182C60"
|
|
102363
|
+
className: (options2 == null ? void 0 : options2.headerVariant) === "floating" ? styles$A["embedDashboard-header-floating"] : styles$A["embedDashboard-header-static"],
|
|
102364
|
+
children: [(options2 == null ? void 0 : options2.headerVariant) === "floating" && /* @__PURE__ */ jsx("span", {
|
|
102365
|
+
className: styles$A.floatingButton,
|
|
102366
|
+
children: /* @__PURE__ */ jsx(akarIconsSettingsHorizontal, {
|
|
102367
|
+
className: styles$A.floatingButtonIcon
|
|
102272
102368
|
})
|
|
102273
|
-
})
|
|
102274
|
-
|
|
102275
|
-
|
|
102276
|
-
|
|
102277
|
-
|
|
102369
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
102370
|
+
className: (options2 == null ? void 0 : options2.headerVariant) === "floating" ? styles$A.floatingContainer : styles$A.staticContainer,
|
|
102371
|
+
children: [data.externalDashboard.filters.length ? /* @__PURE__ */ jsx(Button, {
|
|
102372
|
+
type: "button",
|
|
102373
|
+
variant: "custom",
|
|
102374
|
+
size: "large",
|
|
102375
|
+
className: (options2 == null ? void 0 : options2.headerVariant) === "floating" ? styles$A.floatingFilterButton : styles$A.filter,
|
|
102376
|
+
onClick: () => setShowFilters((s2) => !s2),
|
|
102377
|
+
children: isShowFilters ? /* @__PURE__ */ jsx(icOutlineFilterAltOff, {
|
|
102378
|
+
className: styles$A.floatingFilterButtonIcon
|
|
102379
|
+
}) : /* @__PURE__ */ jsx(icOutlineFilterAlt, {
|
|
102380
|
+
className: styles$A.floatingFilterButtonIcon
|
|
102381
|
+
})
|
|
102382
|
+
}) : null, !(options2 == null ? void 0 : options2.disableMetricCreation) && /* @__PURE__ */ jsx(EmbeddedMetricCreation, {
|
|
102383
|
+
clientId: data.clientId,
|
|
102384
|
+
companyId: data.companyId,
|
|
102385
|
+
mode: data.mode,
|
|
102386
|
+
externalDashboardId: data.externalDashboard.id,
|
|
102387
|
+
variant: options2 == null ? void 0 : options2.headerVariant
|
|
102388
|
+
})]
|
|
102278
102389
|
})]
|
|
102279
102390
|
}), /* @__PURE__ */ jsxs("div", {
|
|
102280
|
-
className: styles$
|
|
102391
|
+
className: styles$A["embedDashboard-wrapper"],
|
|
102281
102392
|
children: [data.externalDashboard.filters.length && isShowFilters ? /* @__PURE__ */ jsx(MetricFilters$1, {
|
|
102282
102393
|
companyId: data.companyId,
|
|
102283
102394
|
filters: data.externalDashboard.filters,
|
|
102284
102395
|
onApply: (values) => setGlobalFilters(values)
|
|
102285
102396
|
}) : null, /* @__PURE__ */ jsx(ExternalMetricList$1, {
|
|
102286
102397
|
client: data.clientId,
|
|
102287
|
-
company: data.companyId,
|
|
102288
102398
|
isLiveMode: data.mode,
|
|
102289
102399
|
params: Array.isArray(data.rlsSettings) ? data.rlsSettings : [],
|
|
102290
102400
|
externalDashboardMetrics: data.externalDashboardMetrics,
|
|
102291
102401
|
isMetricListLoading: isLoading,
|
|
102292
|
-
globalFilters
|
|
102402
|
+
globalFilters,
|
|
102403
|
+
breakpoint: theme2 == null ? void 0 : theme2.breakpoint,
|
|
102404
|
+
layoutCols: theme2 == null ? void 0 : theme2.metricLayoutCols,
|
|
102405
|
+
chartColors: options2 == null ? void 0 : options2.chartColors
|
|
102293
102406
|
})]
|
|
102294
102407
|
})]
|
|
102295
102408
|
}), isLoading && /* @__PURE__ */ jsx("div", {
|
|
102296
|
-
className: styles$
|
|
102409
|
+
className: styles$A["alt-container"],
|
|
102297
102410
|
children: /* @__PURE__ */ jsx(eosIconsLoading, {
|
|
102298
102411
|
style: {
|
|
102299
102412
|
width: "50px",
|
|
@@ -102302,21 +102415,31 @@ const EmbeddedDashboard = React__default.memo(({
|
|
|
102302
102415
|
}
|
|
102303
102416
|
})
|
|
102304
102417
|
}), !isLoading && !((_b2 = data.externalDashboard) == null ? void 0 : _b2.id) && /* @__PURE__ */ jsx("div", {
|
|
102305
|
-
className: styles$
|
|
102418
|
+
className: styles$A["alt-container"],
|
|
102306
102419
|
children: "Invalid token or Dashboard id"
|
|
102307
102420
|
})]
|
|
102308
102421
|
})
|
|
102309
102422
|
});
|
|
102310
102423
|
});
|
|
102311
102424
|
const Dashboard = React__default.memo(({
|
|
102312
|
-
token
|
|
102313
|
-
|
|
102314
|
-
|
|
102315
|
-
|
|
102316
|
-
|
|
102317
|
-
|
|
102318
|
-
|
|
102425
|
+
token,
|
|
102426
|
+
options: options2,
|
|
102427
|
+
theme: theme2
|
|
102428
|
+
}) => {
|
|
102429
|
+
useEffect(() => {
|
|
102430
|
+
if (!theme2 || !Object.keys(theme2).length)
|
|
102431
|
+
return;
|
|
102432
|
+
applyTheme(theme2);
|
|
102433
|
+
}, [theme2]);
|
|
102434
|
+
return /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
102435
|
+
FallbackComponent: ErrorFallback$1,
|
|
102436
|
+
children: /* @__PURE__ */ jsx(QueryClientProvider, {
|
|
102437
|
+
client: queryClient,
|
|
102438
|
+
children: /* @__PURE__ */ jsx(EmbeddedDashboard, {
|
|
102439
|
+
token,
|
|
102440
|
+
options: options2
|
|
102441
|
+
})
|
|
102319
102442
|
})
|
|
102320
|
-
})
|
|
102321
|
-
})
|
|
102443
|
+
});
|
|
102444
|
+
});
|
|
102322
102445
|
export { Dashboard };
|