@databrainhq/plugin 0.8.7 → 0.8.8
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/MetricCreation.d.ts +1 -1
- package/dist/hooks/useEmbeddedDashboard.d.ts +1 -0
- package/dist/index.es.js +17 -10
- package/dist/index.umd.js +55 -53
- package/dist/types/metricCreate.d.ts +1 -0
- package/dist/utils/generated/graphql.d.ts +6 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { EmbeddedMetricCreationProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const EmbeddedMetricCreation: ({ clientId, companyId, mode, externalDashboardId, variant, chartColors, }: EmbeddedMetricCreationProps) => JSX.Element;
|
|
3
|
+
export declare const EmbeddedMetricCreation: ({ clientId, companyId, mode, externalDashboardId, variant, chartColors, workspaceId, }: EmbeddedMetricCreationProps) => JSX.Element;
|
package/dist/index.es.js
CHANGED
|
@@ -6678,8 +6678,10 @@ const useGetClientDashboardLayoutQuery = (variables, options2) => useQuery(
|
|
|
6678
6678
|
options2
|
|
6679
6679
|
);
|
|
6680
6680
|
const CompanySubsetTableDataDocument = `
|
|
6681
|
-
mutation CompanySubsetTableData($clientId: String = "", $companyId: String = "") {
|
|
6682
|
-
companySubsetTableData(
|
|
6681
|
+
mutation CompanySubsetTableData($clientId: String = "", $companyId: String = "", $workspaceId: String = "") {
|
|
6682
|
+
companySubsetTableData(
|
|
6683
|
+
input: {clientId: $clientId, companyId: $companyId, workspaceId: $workspaceId}
|
|
6684
|
+
) {
|
|
6683
6685
|
companyIntegrationId
|
|
6684
6686
|
dbName
|
|
6685
6687
|
error {
|
|
@@ -7084,6 +7086,7 @@ const useEmbeddedDashboard = (token) => {
|
|
|
7084
7086
|
const externalDashboardId = (_a2 = params.dashboard) == null ? void 0 : _a2.id;
|
|
7085
7087
|
const companyId = tokenParams == null ? void 0 : tokenParams.companyId;
|
|
7086
7088
|
const clientId = tokenParams == null ? void 0 : tokenParams.clientId;
|
|
7089
|
+
const workspace = params == null ? void 0 : params.workspace;
|
|
7087
7090
|
const mode = (_b2 = params == null ? void 0 : params.dashboard) == null ? void 0 : _b2.isLive;
|
|
7088
7091
|
const rlsSettings = params == null ? void 0 : params.rlsSettings;
|
|
7089
7092
|
const companyTenancyType = params == null ? void 0 : params.companyTenancyType;
|
|
@@ -7118,7 +7121,8 @@ const useEmbeddedDashboard = (token) => {
|
|
|
7118
7121
|
rlsSettings,
|
|
7119
7122
|
companyTenancyType: companyTenancyType || "TABLE",
|
|
7120
7123
|
isAllowedToCreateMetrics,
|
|
7121
|
-
isAllowedToDeleteMetrics
|
|
7124
|
+
isAllowedToDeleteMetrics,
|
|
7125
|
+
workspace
|
|
7122
7126
|
}
|
|
7123
7127
|
};
|
|
7124
7128
|
};
|
|
@@ -89425,7 +89429,8 @@ const EmbeddedMetricCreation = ({
|
|
|
89425
89429
|
mode,
|
|
89426
89430
|
externalDashboardId,
|
|
89427
89431
|
variant = "static",
|
|
89428
|
-
chartColors
|
|
89432
|
+
chartColors,
|
|
89433
|
+
workspaceId
|
|
89429
89434
|
}) => {
|
|
89430
89435
|
var _a2;
|
|
89431
89436
|
const [isLoading, setLoading] = useState(false);
|
|
@@ -89479,7 +89484,8 @@ const EmbeddedMetricCreation = ({
|
|
|
89479
89484
|
if (clientId && companyId) {
|
|
89480
89485
|
getCompanySubsetTableData({
|
|
89481
89486
|
clientId,
|
|
89482
|
-
companyId
|
|
89487
|
+
companyId,
|
|
89488
|
+
workspaceId
|
|
89483
89489
|
}, {
|
|
89484
89490
|
onSuccess(response) {
|
|
89485
89491
|
var _a3;
|
|
@@ -96815,7 +96821,7 @@ const EmbeddedDashboard = React__default.memo(({
|
|
|
96815
96821
|
options: options2,
|
|
96816
96822
|
theme: theme2
|
|
96817
96823
|
}) => {
|
|
96818
|
-
var _a2, _b2;
|
|
96824
|
+
var _a2, _b2, _c2;
|
|
96819
96825
|
const {
|
|
96820
96826
|
data,
|
|
96821
96827
|
isLoading
|
|
@@ -96833,8 +96839,8 @@ const EmbeddedDashboard = React__default.memo(({
|
|
|
96833
96839
|
enabled: !!data.companyId
|
|
96834
96840
|
});
|
|
96835
96841
|
const [adminTheme, adminThemeChartColors] = useMemo(() => {
|
|
96836
|
-
var _a3, _b3,
|
|
96837
|
-
const colors2 = (_d = (
|
|
96842
|
+
var _a3, _b3, _c3, _d;
|
|
96843
|
+
const colors2 = (_d = (_c3 = (_b3 = (_a3 = adminThemeData == null ? void 0 : adminThemeData.themes[0]) == null ? void 0 : _a3.chart) == null ? void 0 : _b3.palettes) == null ? void 0 : _c3.find((palette) => {
|
|
96838
96844
|
var _a4, _b4;
|
|
96839
96845
|
return palette.name === ((_b4 = (_a4 = adminThemeData.themes[0]) == null ? void 0 : _a4.chart) == null ? void 0 : _b4.selected);
|
|
96840
96846
|
})) == null ? void 0 : _d.colors;
|
|
@@ -96872,7 +96878,8 @@ const EmbeddedDashboard = React__default.memo(({
|
|
|
96872
96878
|
mode: data.mode,
|
|
96873
96879
|
externalDashboardId: data.externalDashboard.id,
|
|
96874
96880
|
variant: options2 == null ? void 0 : options2.headerVariant,
|
|
96875
|
-
chartColors: adminThemeChartColors != null ? adminThemeChartColors : options2 == null ? void 0 : options2.chartColors
|
|
96881
|
+
chartColors: adminThemeChartColors != null ? adminThemeChartColors : options2 == null ? void 0 : options2.chartColors,
|
|
96882
|
+
workspaceId: (_b2 = data.workspace) == null ? void 0 : _b2.id
|
|
96876
96883
|
})]
|
|
96877
96884
|
})]
|
|
96878
96885
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -96906,7 +96913,7 @@ const EmbeddedDashboard = React__default.memo(({
|
|
|
96906
96913
|
color: "blue"
|
|
96907
96914
|
}
|
|
96908
96915
|
})
|
|
96909
|
-
}), !isLoading && !((
|
|
96916
|
+
}), !isLoading && !((_c2 = data.externalDashboard) == null ? void 0 : _c2.id) && /* @__PURE__ */ jsx("div", {
|
|
96910
96917
|
className: styles$F["alt-container"],
|
|
96911
96918
|
children: "Invalid token or Dashboard id"
|
|
96912
96919
|
})]
|