@gooddata/sdk-ui-loaders 11.68.0-alpha.7 → 11.68.0-alpha.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDashboardLoader.d.ts","sourceRoot":"","sources":["../../src/dashboard/useDashboardLoader.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDashboardLoader.d.ts","sourceRoot":"","sources":["../../src/dashboard/useDashboardLoader.ts"],"names":[],"mappings":"AAQA,OAAO,EAEH,KAAK,yBAAyB,EAIjC,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EAAE,KAAK,mBAAmB,EAAyB,MAAM,aAAa,CAAC;AAC9E,OAAO,EAEH,KAAK,qBAAqB,EAE7B,MAAM,YAAY,CAAC;AAEpB;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAAG,yBAAyB,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;AAwBtF;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,qBAAqB,GAAG,mBAAmB,CAoHtF"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
import { useEffect, useMemo, useState } from "react";
|
|
3
3
|
import stringify from "json-stable-stringify";
|
|
4
|
-
import { compact } from "lodash-es";
|
|
5
4
|
import { invariant } from "ts-invariant";
|
|
6
5
|
import { idRef, isDashboard, objRefToString } from "@gooddata/sdk-model";
|
|
7
6
|
import { useBackendStrict, useCancelablePromise, useWorkspaceStrict, } from "@gooddata/sdk-ui";
|
|
7
|
+
import { _compact } from "@gooddata/util";
|
|
8
8
|
import { DashboardLoader } from "./dashboardLoader.js";
|
|
9
9
|
const InitialStatus = {
|
|
10
10
|
result: undefined,
|
|
@@ -71,7 +71,7 @@ export function useDashboardLoader(options) {
|
|
|
71
71
|
else {
|
|
72
72
|
loader = DashboardLoader.staticOnly();
|
|
73
73
|
}
|
|
74
|
-
const extraPluginsArr = Array.isArray(extraPlugins) ? extraPlugins :
|
|
74
|
+
const extraPluginsArr = Array.isArray(extraPlugins) ? extraPlugins : _compact([extraPlugins]);
|
|
75
75
|
initializeLoader(loader, baseProps, extraPluginsArr, clientWorkspace);
|
|
76
76
|
// oxlint-disable-next-line eslint-js/no-console
|
|
77
77
|
console.debug(`Dashboard loader initialized in ${loadingMode} mode to load ${dashboardRef ? objRefToString(dashboardRef) : "empty dashboard"}.`);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// (C) 2022-
|
|
1
|
+
// (C) 2022-2026 GoodData Corporation
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { compact } from "lodash-es";
|
|
4
3
|
import { invariant } from "ts-invariant";
|
|
5
4
|
import { idRef } from "@gooddata/sdk-model";
|
|
6
5
|
import { selectDashboardWorkingDefinition, selectRenderMode, selectWidgetsOverlay, uiActions, } from "@gooddata/sdk-ui-dashboard";
|
|
6
|
+
import { _compact } from "@gooddata/util";
|
|
7
7
|
import { useDashboardLoader } from "./useDashboardLoader.js";
|
|
8
8
|
function sanitizedDashboardRef(dashboard) {
|
|
9
9
|
return typeof dashboard === "string" ? idRef(dashboard, "analyticalDashboard") : dashboard;
|
|
@@ -19,7 +19,7 @@ export function useDashboardLoaderWithPluginManipulation(options) {
|
|
|
19
19
|
const [renderMode, setRenderMode] = useState(options.dashboard ? "view" : "edit");
|
|
20
20
|
const [widgetsOverlay, setWidgetsOverlay] = useState(options.config?.widgetsOverlay);
|
|
21
21
|
const [loadingMode, setLoadingMode] = useState(options.loadingMode ?? "adaptive");
|
|
22
|
-
const [currentExtraPlugins, setCurrentExtraPlugins] = useState(() => Array.isArray(options.extraPlugins) ? options.extraPlugins :
|
|
22
|
+
const [currentExtraPlugins, setCurrentExtraPlugins] = useState(() => Array.isArray(options.extraPlugins) ? options.extraPlugins : _compact([options.extraPlugins]));
|
|
23
23
|
const augmentedConfig = useMemo(() => ({ ...options.config, initialRenderMode: renderMode, widgetsOverlay }), [options.config, renderMode, widgetsOverlay]);
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
setDashboard(sanitizedDashboardRef(options.dashboard));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-loaders",
|
|
3
|
-
"version": "11.68.0-alpha.
|
|
3
|
+
"version": "11.68.0-alpha.8",
|
|
4
4
|
"description": "GoodData SDK Runtime Component Loaders",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"semver": "7.7.4",
|
|
33
33
|
"ts-invariant": "0.10.3",
|
|
34
34
|
"tslib": "2.8.1",
|
|
35
|
-
"@gooddata/sdk-backend-spi": "11.68.0-alpha.
|
|
36
|
-
"@gooddata/
|
|
37
|
-
"@gooddata/sdk-
|
|
38
|
-
"@gooddata/
|
|
39
|
-
"@gooddata/sdk-ui": "11.68.0-alpha.
|
|
35
|
+
"@gooddata/sdk-backend-spi": "11.68.0-alpha.8",
|
|
36
|
+
"@gooddata/sdk-ui": "11.68.0-alpha.8",
|
|
37
|
+
"@gooddata/sdk-model": "11.68.0-alpha.8",
|
|
38
|
+
"@gooddata/util": "11.68.0-alpha.8",
|
|
39
|
+
"@gooddata/sdk-ui-dashboard": "11.68.0-alpha.8"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@microsoft/api-documenter": "7.30.20",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"react": "19.1.1",
|
|
68
68
|
"react-dom": "19.1.1",
|
|
69
69
|
"typescript": "7.0.2",
|
|
70
|
-
"@gooddata/eslint-config": "11.68.0-alpha.
|
|
71
|
-
"@gooddata/oxlint-config": "11.68.0-alpha.
|
|
70
|
+
"@gooddata/eslint-config": "11.68.0-alpha.8",
|
|
71
|
+
"@gooddata/oxlint-config": "11.68.0-alpha.8"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"react": "^18.0.0 || ^19.0.0",
|