@gooddata/sdk-ui 10.44.0-alpha.2 → 10.44.0-alpha.4
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/esm/base/localization/IntlWrapper.d.ts +3 -3
- package/esm/base/localization/IntlWrapper.d.ts.map +1 -1
- package/esm/base/localization/IntlWrapper.js +3 -2
- package/esm/base/localization/IntlWrapper.js.map +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/Context.d.ts +4 -4
- package/esm/base/localization/TranslationsCustomizationProvider/Context.d.ts.map +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/Context.js +7 -7
- package/esm/base/localization/TranslationsCustomizationProvider/Context.js.map +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/TranslationsCustomizationProvider.d.ts +2 -2
- package/esm/base/localization/TranslationsCustomizationProvider/TranslationsCustomizationProvider.d.ts.map +1 -1
- package/esm/base/localization/TranslationsCustomizationProvider/TranslationsCustomizationProvider.js +3 -2
- package/esm/base/localization/TranslationsCustomizationProvider/TranslationsCustomizationProvider.js.map +1 -1
- package/esm/base/localization/intlUtils.d.ts +4 -4
- package/esm/base/localization/intlUtils.d.ts.map +1 -1
- package/esm/base/localization/intlUtils.js +5 -8
- package/esm/base/localization/intlUtils.js.map +1 -1
- package/esm/base/react/BackendContext.d.ts +4 -4
- package/esm/base/react/BackendContext.d.ts.map +1 -1
- package/esm/base/react/BackendContext.js +7 -6
- package/esm/base/react/BackendContext.js.map +1 -1
- package/esm/base/react/ClientWorkspaceContext/ClientWorkspaceContext.d.ts +4 -4
- package/esm/base/react/ClientWorkspaceContext/ClientWorkspaceContext.d.ts.map +1 -1
- package/esm/base/react/ClientWorkspaceContext/ClientWorkspaceContext.js +9 -10
- package/esm/base/react/ClientWorkspaceContext/ClientWorkspaceContext.js.map +1 -1
- package/esm/base/react/ClientWorkspaceContext/interfaces.d.ts +2 -1
- package/esm/base/react/ClientWorkspaceContext/interfaces.d.ts.map +1 -1
- package/esm/base/react/ClientWorkspaceContext/interfaces.js +1 -1
- package/esm/base/react/CorrelationContext.d.ts +5 -5
- package/esm/base/react/CorrelationContext.d.ts.map +1 -1
- package/esm/base/react/CorrelationContext.js +7 -6
- package/esm/base/react/CorrelationContext.js.map +1 -1
- package/esm/base/react/ErrorComponent.d.ts +1 -2
- package/esm/base/react/ErrorComponent.d.ts.map +1 -1
- package/esm/base/react/ErrorComponent.js +14 -19
- package/esm/base/react/ErrorComponent.js.map +1 -1
- package/esm/base/react/LoadingComponent.d.ts +1 -2
- package/esm/base/react/LoadingComponent.d.ts.map +1 -1
- package/esm/base/react/LoadingComponent.js +3 -12
- package/esm/base/react/LoadingComponent.js.map +1 -1
- package/esm/base/react/OrganizationContext.d.ts +4 -4
- package/esm/base/react/OrganizationContext.d.ts.map +1 -1
- package/esm/base/react/OrganizationContext.js +4 -3
- package/esm/base/react/OrganizationContext.js.map +1 -1
- package/esm/base/react/WorkspaceContext.d.ts +4 -4
- package/esm/base/react/WorkspaceContext.d.ts.map +1 -1
- package/esm/base/react/WorkspaceContext.js +7 -6
- package/esm/base/react/WorkspaceContext.js.map +1 -1
- package/esm/base/react/contextStore.d.ts +3 -3
- package/esm/base/react/contextStore.d.ts.map +1 -1
- package/esm/base/react/contextStore.js +11 -10
- package/esm/base/react/contextStore.js.map +1 -1
- package/esm/base/react/debounce.js +4 -4
- package/esm/base/react/debounce.js.map +1 -1
- package/esm/base/react/forwardRefWithGenerics.d.ts +2 -2
- package/esm/base/react/forwardRefWithGenerics.d.ts.map +1 -1
- package/esm/base/react/forwardRefWithGenerics.js +2 -2
- package/esm/base/react/forwardRefWithGenerics.js.map +1 -1
- package/esm/base/react/legacy/withEntireDataView.d.ts +2 -2
- package/esm/base/react/legacy/withEntireDataView.d.ts.map +1 -1
- package/esm/base/react/legacy/withEntireDataView.js +6 -6
- package/esm/base/react/legacy/withEntireDataView.js.map +1 -1
- package/esm/base/react/placeholders/context.d.ts +2 -2
- package/esm/base/react/placeholders/context.d.ts.map +1 -1
- package/esm/base/react/placeholders/context.js +4 -3
- package/esm/base/react/placeholders/context.js.map +1 -1
- package/esm/base/react/useAutoupdateRef.d.ts +1 -2
- package/esm/base/react/useAutoupdateRef.d.ts.map +1 -1
- package/esm/base/react/useAutoupdateRef.js +3 -3
- package/esm/base/react/useAutoupdateRef.js.map +1 -1
- package/esm/base/react/useCombineRefs.d.ts +2 -2
- package/esm/base/react/useCombineRefs.d.ts.map +1 -1
- package/esm/base/react/useCombineRefs.js +2 -2
- package/esm/base/react/useCombineRefs.js.map +1 -1
- package/esm/base/react/useInitialProp.js +2 -2
- package/esm/base/react/useInitialProp.js.map +1 -1
- package/esm/base/react/useLocalStorage.d.ts.map +1 -1
- package/esm/base/react/useLocalStorage.js +4 -4
- package/esm/base/react/useLocalStorage.js.map +1 -1
- package/esm/base/react/useObjectDiff.js +3 -3
- package/esm/base/react/useObjectDiff.js.map +1 -1
- package/esm/base/react/usePagedResource.d.ts +2 -1
- package/esm/base/react/usePagedResource.d.ts.map +1 -1
- package/esm/base/react/usePagedResource.js.map +1 -1
- package/esm/base/react/usePromiseCache.d.ts +2 -1
- package/esm/base/react/usePromiseCache.d.ts.map +1 -1
- package/esm/base/react/usePromiseCache.js.map +1 -1
- package/esm/base/react/usePropState.d.ts +1 -2
- package/esm/base/react/usePropState.d.ts.map +1 -1
- package/esm/base/react/usePropState.js +3 -3
- package/esm/base/react/usePropState.js.map +1 -1
- package/esm/base/react/validation/ValidationContextStore.d.ts.map +1 -1
- package/esm/base/react/validation/ValidationContextStore.js +7 -7
- package/esm/base/react/validation/ValidationContextStore.js.map +1 -1
- package/esm/base/react/withContexts.d.ts +2 -1
- package/esm/base/react/withContexts.d.ts.map +1 -1
- package/esm/base/react/withContexts.js.map +1 -1
- package/esm/base/react/wrapDisplayName.d.ts +2 -1
- package/esm/base/react/wrapDisplayName.d.ts.map +1 -1
- package/esm/base/react/wrapDisplayName.js +1 -1
- package/esm/base/react/wrapDisplayName.js.map +1 -1
- package/esm/base/vis/VisualizationProps.d.ts +3 -3
- package/esm/base/vis/VisualizationProps.d.ts.map +1 -1
- package/esm/execution/Execute.d.ts +3 -3
- package/esm/execution/Execute.d.ts.map +1 -1
- package/esm/execution/Execute.js +4 -5
- package/esm/execution/Execute.js.map +1 -1
- package/esm/execution/ExecuteInsight.d.ts +3 -3
- package/esm/execution/ExecuteInsight.d.ts.map +1 -1
- package/esm/execution/ExecuteInsight.js +3 -4
- package/esm/execution/ExecuteInsight.js.map +1 -1
- package/esm/execution/RawExecute.d.ts +3 -3
- package/esm/execution/RawExecute.d.ts.map +1 -1
- package/esm/execution/RawExecute.js +3 -4
- package/esm/execution/RawExecute.js.map +1 -1
- package/esm/execution/useExecutionDataView.d.ts +2 -1
- package/esm/execution/useExecutionDataView.d.ts.map +1 -1
- package/esm/execution/useExecutionDataView.js.map +1 -1
- package/esm/execution/useInsight.d.ts +2 -1
- package/esm/execution/useInsight.d.ts.map +1 -1
- package/esm/execution/useInsight.js +1 -0
- package/esm/execution/useInsight.js.map +1 -1
- package/esm/execution/useInsightDataView.d.ts +2 -1
- package/esm/execution/useInsightDataView.d.ts.map +1 -1
- package/esm/execution/useInsightDataView.js +1 -0
- package/esm/execution/useInsightDataView.js.map +1 -1
- package/esm/execution/withExecution.d.ts +2 -1
- package/esm/execution/withExecution.d.ts.map +1 -1
- package/esm/execution/withExecution.js.map +1 -1
- package/esm/execution/withExecutionLoading.d.ts +2 -2
- package/esm/execution/withExecutionLoading.d.ts.map +1 -1
- package/esm/execution/withExecutionLoading.js +7 -6
- package/esm/execution/withExecutionLoading.js.map +1 -1
- package/esm/kpi/FormattedNumber.d.ts +1 -2
- package/esm/kpi/FormattedNumber.d.ts.map +1 -1
- package/esm/kpi/FormattedNumber.js +2 -2
- package/esm/kpi/FormattedNumber.js.map +1 -1
- package/esm/kpi/Kpi.d.ts +4 -4
- package/esm/kpi/Kpi.d.ts.map +1 -1
- package/esm/kpi/Kpi.js +14 -16
- package/esm/kpi/Kpi.js.map +1 -1
- package/esm/kpi/KpiError.d.ts +1 -2
- package/esm/kpi/KpiError.d.ts.map +1 -1
- package/esm/kpi/KpiError.js +3 -4
- package/esm/kpi/KpiError.js.map +1 -1
- package/esm/sdk-ui.d.ts +62 -54
- package/package.json +14 -14
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
// (C) 2024-2025 GoodData Corporation
|
|
2
|
-
import
|
|
3
|
+
import { createContext, useContext, useMemo } from "react";
|
|
3
4
|
import { BackendProvider, useBackend } from "./BackendContext.js";
|
|
4
5
|
/**
|
|
5
6
|
* Context for storing request correlation metadata across components
|
|
6
7
|
*/
|
|
7
|
-
const CorrelationContext =
|
|
8
|
+
const CorrelationContext = createContext({});
|
|
8
9
|
CorrelationContext.displayName = "CorrelationContext";
|
|
9
10
|
/**
|
|
10
11
|
* CorrelationProvider provides request correlation metadata to components.
|
|
@@ -23,7 +24,7 @@ export function CorrelationProvider({ children, correlationData }) {
|
|
|
23
24
|
const mergedData = useMemo(() => {
|
|
24
25
|
return { ...parentCorrelationData, ...memoizedAdditionalCorrelationData };
|
|
25
26
|
}, [parentCorrelationData, memoizedAdditionalCorrelationData]);
|
|
26
|
-
return
|
|
27
|
+
return _jsx(CorrelationContext.Provider, { value: mergedData, children: children });
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* Hook to get correlation metadata from the nearest correlation provider.
|
|
@@ -31,7 +32,7 @@ export function CorrelationProvider({ children, correlationData }) {
|
|
|
31
32
|
* @public
|
|
32
33
|
*/
|
|
33
34
|
export const useCorrelationData = () => {
|
|
34
|
-
return
|
|
35
|
+
return useContext(CorrelationContext);
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
37
38
|
* Hook to get a backend instance with correlation metadata from context,
|
|
@@ -93,9 +94,9 @@ export function BackendProviderWithCorrelation({ backend: externalBackend, corre
|
|
|
93
94
|
}, [baseBackend, mergedData]);
|
|
94
95
|
// If we have no backend at all, just provide the correlation metadata
|
|
95
96
|
if (!baseBackend) {
|
|
96
|
-
return
|
|
97
|
+
return _jsx(CorrelationProvider, { correlationData: correlationData, children: children });
|
|
97
98
|
}
|
|
98
99
|
// Otherwise provide both enhanced backend and correlation metadata
|
|
99
|
-
return (
|
|
100
|
+
return (_jsx(CorrelationContext.Provider, { value: mergedData, children: enhancedBackend ? _jsx(BackendProvider, { backend: enhancedBackend, children: children }) : null }));
|
|
100
101
|
}
|
|
101
102
|
//# sourceMappingURL=CorrelationContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CorrelationContext.js","sourceRoot":"","sources":["../../../src/base/react/CorrelationContext.tsx"],"names":[],"mappings":"AAAA,qCAAqC;
|
|
1
|
+
{"version":3,"file":"CorrelationContext.js","sourceRoot":"","sources":["../../../src/base/react/CorrelationContext.tsx"],"names":[],"mappings":";AAAA,qCAAqC;AAErC,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAItE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAElE;;GAEG;AACH,MAAM,kBAAkB,GAAG,aAAa,CAA8B,EAAE,CAAC,CAAC;AAC1E,kBAAkB,CAAC,WAAW,GAAG,oBAAoB,CAAC;AAkBtD;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAAE,QAAQ,EAAE,eAAe,EAA6B;IACxF,gDAAgD;IAChD,MAAM,qBAAqB,GAAG,kBAAkB,EAAE,CAAC;IAEnD,MAAM,iCAAiC,GAAG,OAAO,CAAC,GAAG,EAAE;QACnD,OAAO,eAAe,CAAC;QACvB,uDAAuD;IAC3D,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAEtC,0DAA0D;IAC1D,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE;QAC5B,OAAO,EAAE,GAAG,qBAAqB,EA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AAI,GACvE,CACjC,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
/**
|
|
3
2
|
* Props of the {@link ErrorComponent}.
|
|
4
3
|
* @public
|
|
@@ -28,5 +27,5 @@ export interface IErrorProps {
|
|
|
28
27
|
*
|
|
29
28
|
* @public
|
|
30
29
|
*/
|
|
31
|
-
export declare function ErrorComponent({ icon, className, width, height, style, message, description, clientHeight, }: IErrorProps):
|
|
30
|
+
export declare function ErrorComponent({ icon, className, width, height, style, message, description, clientHeight, }: IErrorProps): import("react/jsx-runtime").JSX.Element;
|
|
32
31
|
//# sourceMappingURL=ErrorComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorComponent.d.ts","sourceRoot":"","sources":["../../../src/base/react/ErrorComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorComponent.d.ts","sourceRoot":"","sources":["../../../src/base/react/ErrorComponent.tsx"],"names":[],"mappings":"AA+BA;;;GAGG;AACH,MAAM,WAAW,WAAW;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ;;OAEG;IACH,MAAM,CAAC,EAAE,GAAG,CAAC;IACb;;OAEG;IACH,YAAY,CAAC,EAAE,GAAG,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAC3B,IAAwB,EACxB,SAA2B,EAC3B,KAAiB,EACjB,MAAe,EACf,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,GACf,EAAE,WAAW,2CAmEb"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
/**
|
|
4
3
|
* With custom size layouting enable it needs to be aware of the widget size to update
|
|
5
4
|
* its content accordingly.
|
|
@@ -51,8 +50,7 @@ export function ErrorComponent({ icon = "gd-icon-warning", className = "Error s-
|
|
|
51
50
|
width,
|
|
52
51
|
height,
|
|
53
52
|
};
|
|
54
|
-
return (
|
|
55
|
-
React.createElement("div", { className: "info-label", style: {
|
|
53
|
+
return (_jsx("div", { className: className, style: wrapperStyle, children: _jsxs("div", { className: "info-label", style: {
|
|
56
54
|
fontSize: "14px",
|
|
57
55
|
fontWeight: 400,
|
|
58
56
|
lineHeight: "normal",
|
|
@@ -61,20 +59,17 @@ export function ErrorComponent({ icon = "gd-icon-warning", className = "Error s-
|
|
|
61
59
|
height: customHeight,
|
|
62
60
|
width: "100%",
|
|
63
61
|
overflow: "hidden",
|
|
64
|
-
} }
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
overflow: "hidden",
|
|
77
|
-
whiteSpace: clientHeight && clientHeight < LARGE_CLIENT_HEIGHT ? "nowrap" : undefined,
|
|
78
|
-
} }, description))));
|
|
62
|
+
}, children: [icon ? (_jsx("div", { className: `info-label-icon ${icon}`, style: clientHeight && clientHeight < LARGEST_CLIENT_HEIGHT
|
|
63
|
+
? undefined
|
|
64
|
+
: { fontSize: "40px" } })) : null, _jsx("div", { style: {
|
|
65
|
+
fontWeight: 400,
|
|
66
|
+
fontSize: clientHeight && clientHeight < MEDIUM_CLIENT_HEIGHT ? undefined : "20px",
|
|
67
|
+
textTransform: "uppercase",
|
|
68
|
+
}, children: message }), _jsx("div", { style: {
|
|
69
|
+
margin: "3px 0",
|
|
70
|
+
textOverflow: "ellipsis",
|
|
71
|
+
overflow: "hidden",
|
|
72
|
+
whiteSpace: clientHeight && clientHeight < LARGE_CLIENT_HEIGHT ? "nowrap" : undefined,
|
|
73
|
+
}, children: description })] }) }));
|
|
79
74
|
}
|
|
80
75
|
//# sourceMappingURL=ErrorComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorComponent.js","sourceRoot":"","sources":["../../../src/base/react/ErrorComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorComponent.js","sourceRoot":"","sources":["../../../src/base/react/ErrorComponent.tsx"],"names":[],"mappings":";AAIA;;;GAGG;AACH,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAChC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC,MAAM,mBAAmB,GAAG,EAAE,CAAC;AAC/B,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,MAAM,eAAe,GAAG,CAAC,YAAqB,EAAE,EAAE;IAC9C,IAAI,YAAY,EAAE,CAAC;QACf,IAAI,YAAY,IAAI,mBAAmB,EAAE,CAAC;YACtC,OAAO,mBAAmB,CAAC;QAC/B,CAAC;aAAM,IAAI,YAAY,GAAG,oBAAoB,EAAE,CAAC;YAC7C,OAAO,oBAAoB,CAAC;QAChC,CAAC;aAAM,CAAC;YACJ,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAwBF;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,EAC3B,IAAI,GAAG,iBAAiB,EACxB,SAAS,GAAG,eAAe,EAC3B,KAAK,GAAG,SAAS,EACjB,MAAM,GAAG,MAAM,EACf,KAAK,EACL,OAAO,EACP,WAAW,EACX,YAAY,GACF;IACV,MAAM,YAAY,GAAG,eAAe,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AI,YAAY,GAAG,mBAAmB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;qBACxF,YAEA,WAAW,GACV,IACJ,GACJ,CACT,CAAC;AACN,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
/**
|
|
3
2
|
* Props of the {@link LoadingComponent}.
|
|
4
3
|
* @public
|
|
@@ -21,5 +20,5 @@ export interface ILoadingProps {
|
|
|
21
20
|
*
|
|
22
21
|
* @public
|
|
23
22
|
*/
|
|
24
|
-
export declare function LoadingComponent({ className, color, speed, inline, height, width, imageHeight, imageWidth, }: ILoadingProps):
|
|
23
|
+
export declare function LoadingComponent({ className, color, speed, inline, height, width, imageHeight, imageWidth, }: ILoadingProps): import("react/jsx-runtime").JSX.Element;
|
|
25
24
|
//# sourceMappingURL=LoadingComponent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingComponent.d.ts","sourceRoot":"","sources":["../../../src/base/react/LoadingComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingComponent.d.ts","sourceRoot":"","sources":["../../../src/base/react/LoadingComponent.tsx"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,UAAU,CAAC,EAAE,GAAG,CAAC;CACpB;AAID;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,EAC7B,SAAuB,EACvB,KAAoD,EACpD,KAAS,EACT,MAAc,EACd,MAAe,EACf,KAAiB,EACjB,WAAe,EACf,UAAsB,GACzB,EAAE,aAAa,2CAoEf"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import React from "react";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
2
|
const baseAnimationDuration = 1.4;
|
|
4
3
|
/**
|
|
5
4
|
* Component that renders a default loading indicator.
|
|
@@ -47,9 +46,7 @@ export function LoadingComponent({ className = "s-loading", color = "var(--gd-pa
|
|
|
47
46
|
transformOrigin: "32px 4px",
|
|
48
47
|
animationDelay: "0",
|
|
49
48
|
};
|
|
50
|
-
return (
|
|
51
|
-
React.createElement("svg", { style: svgStyles, version: "1.1", x: "0px", y: "0px", viewBox: "0 0 36 8" },
|
|
52
|
-
React.createElement("style", null, `
|
|
49
|
+
return (_jsx("div", { className: className, style: wrapperStyles, children: _jsxs("svg", { style: svgStyles, version: "1.1", x: "0px", y: "0px", viewBox: "0 0 36 8", children: [_jsx("style", { children: `
|
|
53
50
|
@keyframes GDC-pop {
|
|
54
51
|
0%,
|
|
55
52
|
80%,
|
|
@@ -60,12 +57,6 @@ export function LoadingComponent({ className = "s-loading", color = "var(--gd-pa
|
|
|
60
57
|
transform: scale(1);
|
|
61
58
|
}
|
|
62
59
|
}
|
|
63
|
-
`),
|
|
64
|
-
React.createElement("g", { style: dot1Styles },
|
|
65
|
-
React.createElement("circle", { cx: "4", cy: "4", r: "4" })),
|
|
66
|
-
React.createElement("g", { style: dot2Styles },
|
|
67
|
-
React.createElement("circle", { cx: "18", cy: "4", r: "4" })),
|
|
68
|
-
React.createElement("g", { style: dot3Styles },
|
|
69
|
-
React.createElement("circle", { cx: "32", cy: "4", r: "4" })))));
|
|
60
|
+
` }), _jsx("g", { style: dot1Styles, children: _jsx("circle", { cx: "4", cy: "4", r: "4" }) }), _jsx("g", { style: dot2Styles, children: _jsx("circle", { cx: "18", cy: "4", r: "4" }) }), _jsx("g", { style: dot3Styles, children: _jsx("circle", { cx: "32", cy: "4", r: "4" }) })] }) }));
|
|
70
61
|
}
|
|
71
62
|
//# sourceMappingURL=LoadingComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingComponent.js","sourceRoot":"","sources":["../../../src/base/react/LoadingComponent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LoadingComponent.js","sourceRoot":"","sources":["../../../src/base/react/LoadingComponent.tsx"],"names":[],"mappings":";AAmBA,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC7B,SAAS,GAAG,WAAW,EACvB,KAAK,GAAG,4CAA4C,EACpD,KAAK,GAAG,CAAC,EACT,MAAM,GAAG,KAAK,EACd,MAAM,GAAG,MAAM,EACf,KAAK,GAAG,SAAS,EACjB,WAAW,GAAG,CAAC,EACf,UAAU,GAAG,SAAS,GACV;IACZ,MAAM,QAAQ,GAAG,qBAAqB,GAAG,KAAK,CAAC;IAC/C,MAAM,KAAK,GAAG,QAAQ,GAAG,CAAC,CAAC,CAAC;IAE5B,MAAM,SAAS,GAAkB;QAC7B,eAAe,EAAE,SAAS;QAC1B,SAAS,EAAE,WAAW,QAAQ,YAAY;QAC1C,cAAc,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG;QAC/B,IAAI,EAAE,KAAK;KACd,CAAC;IAEF,MAAM,aAAa,GAAkB;QACjC,SAAS,EAAE,QAAQ;QACnB,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM;QACxC,aAAa,EAAE,QAAQ;QACvB,aAAa,EAAE,QAAQ;QACvB,YAAY,EAAE,QAAQ;QACtB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE,UAAU;QAChB,MAAM;QACN,KAAK;KACR,CAAC;IACF,MAAM,SAAS,GAAkB;QAC7B,SAAS,EAAE,MAAM;QACjB,QAAQ,EAAE,MAAM;QAChB,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,UAAU;QACjB,MAAM,EAAE,WAAW;KACtB,CAAC;IACF,MAAM,UAAU,GAAkB,SAAS,CAAC;IAC5C,MAAM,UAAU,GAAkB;QAC9B,GAAG,SAAS;QACZ,eAAe,EAAE,UAAU;QAC3B,cAAc,EAAE,GAAG,KAAK,GAAG;KAC9B,CAAC;IACF,MAAM,UAAU,GAAkB;QAC9B,GAAG,SAAS;QACZ,eAAe,EAAE,UAAU;QAC3B,cAAc,EAAE,GAAG;KACtB,CAAC;IAEF,OAAO,CACH,cAAK,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,aAAa,YAC3C,eAAK,KAAK,EAAE,SAAS,EAAE,OAAO,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,EAAC,CAAC,EAAC,KAAK,EAAC,OAAO,EAAC,UAAU,aACnE,0BAAQ;;;;;;;;;;;iBAWP,GAAS,EACV,YAAG,KAAK,EAAE,UAAU,YAChB,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,GAAG,GAC9B,EACJ,YAAG,KAAK,EAAE,UAAU,YAChB,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,GAAG,GAC/B,EACJ,YAAG,KAAK,EAAE,UAAU,YAChB,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,GAAG,GAAG,GAC/B,IACF,GACJ,CACT,CAAC;AACN,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
export declare const OrganizationContext:
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
export declare const OrganizationContext: import("react").Context<string | undefined>;
|
|
3
3
|
/**
|
|
4
4
|
* Properties of the organization provider.
|
|
5
5
|
*
|
|
@@ -13,14 +13,14 @@ export interface IOrganizationProviderProps {
|
|
|
13
13
|
/**
|
|
14
14
|
* Children to render.
|
|
15
15
|
*/
|
|
16
|
-
children?:
|
|
16
|
+
children?: ReactNode;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Organization context provider.
|
|
20
20
|
*
|
|
21
21
|
* @public
|
|
22
22
|
*/
|
|
23
|
-
export declare function OrganizationProvider({ organization, children }: IOrganizationProviderProps):
|
|
23
|
+
export declare function OrganizationProvider({ organization, children }: IOrganizationProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
/**
|
|
25
25
|
* Hook to get organization identifier provided to {@link OrganizationProvider}.
|
|
26
26
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationContext.d.ts","sourceRoot":"","sources":["../../../src/base/react/OrganizationContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OrganizationContext.d.ts","sourceRoot":"","sources":["../../../src/base/react/OrganizationContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AAE7D,eAAO,MAAM,mBAAmB,6CAA+C,CAAC;AAGhF;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACvC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,0BAA0B,2CAE1F;AAED;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAO,MAAM,GAAG,SAE3C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
// (C) 2024-2025 GoodData Corporation
|
|
2
|
-
import
|
|
3
|
-
export const OrganizationContext =
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
export const OrganizationContext = createContext(undefined);
|
|
4
5
|
OrganizationContext.displayName = "OrganizationContext";
|
|
5
6
|
/**
|
|
6
7
|
* Organization context provider.
|
|
@@ -8,7 +9,7 @@ OrganizationContext.displayName = "OrganizationContext";
|
|
|
8
9
|
* @public
|
|
9
10
|
*/
|
|
10
11
|
export function OrganizationProvider({ organization, children }) {
|
|
11
|
-
return
|
|
12
|
+
return _jsx(OrganizationContext.Provider, { value: organization, children: children });
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Hook to get organization identifier provided to {@link OrganizationProvider}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationContext.js","sourceRoot":"","sources":["../../../src/base/react/OrganizationContext.tsx"],"names":[],"mappings":"AAAA,qCAAqC;
|
|
1
|
+
{"version":3,"file":"OrganizationContext.js","sourceRoot":"","sources":["../../../src/base/react/OrganizationContext.tsx"],"names":[],"mappings":";AAAA,qCAAqC;AAErC,OAAO,EAAa,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE7D,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAqB,SAAS,CAAC,CAAC;AAChF,mBAAmB,CAAC,WAAW,GAAG,qBAAqB,CAAC;AAmBxD;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,EAAE,YAAY,EAAE,QAAQ,EAA8B;IACvF,OAAO,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YAAG,QAAQ,GAAgC,CAAC;AACxG,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,GAAuB,EAAE;IACpD,OAAO,UAAU,CAAC,mBAAmB,CAAC,CAAC;AAC3C,CAAC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentType, ReactNode } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Props of the {@link WorkspaceProvider} component.
|
|
4
4
|
* @public
|
|
@@ -11,14 +11,14 @@ export interface IWorkspaceProviderProps {
|
|
|
11
11
|
/**
|
|
12
12
|
* React children
|
|
13
13
|
*/
|
|
14
|
-
children?:
|
|
14
|
+
children?: ReactNode;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
17
|
* WorkspaceProvider can be used to inject analytical workspace instance to all ui-sdk components in your app.
|
|
18
18
|
*
|
|
19
19
|
* @public
|
|
20
20
|
*/
|
|
21
|
-
export declare function WorkspaceProvider({ children, workspace }: IWorkspaceProviderProps):
|
|
21
|
+
export declare function WorkspaceProvider({ children, workspace }: IWorkspaceProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
22
22
|
/**
|
|
23
23
|
* Hook to get workspace instance provided to {@link WorkspaceProvider}.
|
|
24
24
|
*
|
|
@@ -73,5 +73,5 @@ export declare const useWorkspaceStrict: (workspace?: string, context?: string)
|
|
|
73
73
|
*/
|
|
74
74
|
export declare function withWorkspace<T extends {
|
|
75
75
|
workspace?: string;
|
|
76
|
-
}>(Component:
|
|
76
|
+
}>(Component: ComponentType<T>): ComponentType<T>;
|
|
77
77
|
//# sourceMappingURL=WorkspaceContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceContext.d.ts","sourceRoot":"","sources":["../../../src/base/react/WorkspaceContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WorkspaceContext.d.ts","sourceRoot":"","sources":["../../../src/base/react/WorkspaceContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AAS5E;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACpC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,uBAAuB,2CAEjF;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,KAAG,MAAM,GAAG,SAG1D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,kBAAkB,GAAI,YAAY,MAAM,EAAE,gBAA8B,KAAG,MAQvF,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS;IAAE,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EAC1D,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,GAC5B,aAAa,CAAC,CAAC,CAAC,CAUlB"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
// (C) 2019-2025 GoodData Corporation
|
|
2
|
-
import
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
3
4
|
import { invariant } from "ts-invariant";
|
|
4
5
|
import { wrapDisplayName } from "./wrapDisplayName.js";
|
|
5
|
-
const WorkspaceContext =
|
|
6
|
+
const WorkspaceContext = createContext(undefined);
|
|
6
7
|
WorkspaceContext.displayName = "WorkspaceContext";
|
|
7
8
|
/**
|
|
8
9
|
* WorkspaceProvider can be used to inject analytical workspace instance to all ui-sdk components in your app.
|
|
@@ -10,7 +11,7 @@ WorkspaceContext.displayName = "WorkspaceContext";
|
|
|
10
11
|
* @public
|
|
11
12
|
*/
|
|
12
13
|
export function WorkspaceProvider({ children, workspace }) {
|
|
13
|
-
return
|
|
14
|
+
return _jsx(WorkspaceContext.Provider, { value: workspace, children: children });
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* Hook to get workspace instance provided to {@link WorkspaceProvider}.
|
|
@@ -34,7 +35,7 @@ export function WorkspaceProvider({ children, workspace }) {
|
|
|
34
35
|
* @public
|
|
35
36
|
*/
|
|
36
37
|
export const useWorkspace = (workspace) => {
|
|
37
|
-
const workspaceFromContext =
|
|
38
|
+
const workspaceFromContext = useContext(WorkspaceContext);
|
|
38
39
|
return workspace ?? workspaceFromContext;
|
|
39
40
|
};
|
|
40
41
|
/**
|
|
@@ -61,7 +62,7 @@ export const useWorkspace = (workspace) => {
|
|
|
61
62
|
* @public
|
|
62
63
|
*/
|
|
63
64
|
export const useWorkspaceStrict = (workspace, context = "useWorkspaceStrict") => {
|
|
64
|
-
const workspaceFromContext =
|
|
65
|
+
const workspaceFromContext = useContext(WorkspaceContext);
|
|
65
66
|
const effectiveWorkspace = workspace ?? workspaceFromContext;
|
|
66
67
|
invariant(effectiveWorkspace, `${context}: workspace must be defined. Either pass it as a parameter or make sure there is a WorkspaceProvider up the component tree.`);
|
|
67
68
|
return effectiveWorkspace;
|
|
@@ -74,7 +75,7 @@ export const useWorkspaceStrict = (workspace, context = "useWorkspaceStrict") =>
|
|
|
74
75
|
*/
|
|
75
76
|
export function withWorkspace(Component) {
|
|
76
77
|
function ComponentWithInjectedWorkspace(props) {
|
|
77
|
-
return (
|
|
78
|
+
return (_jsx(WorkspaceContext.Consumer, { children: (workspace) => _jsx(Component, { ...props, workspace: props.workspace ?? workspace }) }));
|
|
78
79
|
}
|
|
79
80
|
return wrapDisplayName("withWorkspace", Component)(ComponentWithInjectedWorkspace);
|
|
80
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceContext.js","sourceRoot":"","sources":["../../../src/base/react/WorkspaceContext.tsx"],"names":[],"mappings":"AAAA,qCAAqC;
|
|
1
|
+
{"version":3,"file":"WorkspaceContext.js","sourceRoot":"","sources":["../../../src/base/react/WorkspaceContext.tsx"],"names":[],"mappings":";AAAA,qCAAqC;AAErC,OAAO,EAA4B,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE5E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,gBAAgB,GAAG,aAAa,CAAqB,SAAS,CAAC,CAAC;AACtE,gBAAgB,CAAC,WAAW,GAAG,kBAAkB,CAAC;AAkBlD;;;;GAIG;AACH,MAAM,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reProvider<T> =
|
|
5
|
+
export type IContextStoreProvider<T> = FC<{
|
|
6
6
|
value: T;
|
|
7
|
-
children:
|
|
7
|
+
children: ReactNode;
|
|
8
8
|
}>;
|
|
9
9
|
/**
|
|
10
10
|
* @internal
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextStore.d.ts","sourceRoot":"","sources":["../../../src/base/react/contextStore.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"contextStore.d.ts","sourceRoot":"","sources":["../../../src/base/react/contextStore.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAE,SAAS,EAA0D,MAAM,OAAO,CAAC;AAuC9F;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,EAAE,CAAC;IAAE,KAAK,EAAE,CAAC,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAC7E;;GAEG;AACH,MAAM,MAAM,qBAAqB,CAAC,CAAC,EAAE,cAAc,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,cAAc,CAAC;AACpF;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK,IAAI,CAAC,cAAc,EACjE,QAAQ,CAAC,EAAE,qBAAqB,CAAC,CAAC,EAAE,cAAc,CAAC,EACnD,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,EAAE,cAAc,KAAK,OAAO,KAC7D,UAAU,SAAS,KAAK,GAAG,cAAc,GAAG,cAAc,GAAG,SAAS,CAAC;AAE5E;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,GAAG;IACtD,eAAe,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACrC,uBAAuB,EAAE,gBAAgB,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;IACnD,cAAc,EAAE,CAAC,cAAc,EAC3B,QAAQ,EAAE,qBAAqB,CAAC,CAAC,EAAE,cAAc,CAAC,KACjD,qBAAqB,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAG,MAAM,MAAM,KAAG,aAAa,CAAC,CAAC,CAgEpE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
// (C) 2025 GoodData Corporation
|
|
2
|
-
import
|
|
3
|
+
import { createContext, useContext, useEffect, useRef, useState } from "react";
|
|
3
4
|
import isEqual from "react-fast-compare";
|
|
4
5
|
function createStore(initialState) {
|
|
5
6
|
let state = initialState;
|
|
@@ -31,20 +32,20 @@ function createStore(initialState) {
|
|
|
31
32
|
* @internal
|
|
32
33
|
*/
|
|
33
34
|
export const createContextStore = (name) => {
|
|
34
|
-
const Context =
|
|
35
|
+
const Context = createContext(null);
|
|
35
36
|
function Provider({ value, children }) {
|
|
36
|
-
const [store] =
|
|
37
|
-
|
|
37
|
+
const [store] = useState(() => createStore(value));
|
|
38
|
+
useEffect(() => {
|
|
38
39
|
store.setState(() => value);
|
|
39
40
|
}, [store, value]);
|
|
40
|
-
return
|
|
41
|
+
return _jsx(Context.Provider, { value: store, children: children });
|
|
41
42
|
}
|
|
42
43
|
Provider.displayName = `ContextStoreProvider(${name})`;
|
|
43
44
|
const useContextStoreOptional = (selector = (state) => state, equalityFn = isEqual) => {
|
|
44
|
-
const store =
|
|
45
|
-
const [selectedState, setSelectedState] =
|
|
46
|
-
const prevSelectedStateRef =
|
|
47
|
-
|
|
45
|
+
const store = useContext(Context);
|
|
46
|
+
const [selectedState, setSelectedState] = useState(() => store ? selector(store.getState()) : undefined);
|
|
47
|
+
const prevSelectedStateRef = useRef(selectedState);
|
|
48
|
+
useEffect(() => {
|
|
48
49
|
if (!store) {
|
|
49
50
|
return undefined;
|
|
50
51
|
}
|
|
@@ -60,7 +61,7 @@ export const createContextStore = (name) => {
|
|
|
60
61
|
return selectedState;
|
|
61
62
|
};
|
|
62
63
|
const useContextStore = (selector = (state) => state, equalityFn = isEqual) => {
|
|
63
|
-
const store =
|
|
64
|
+
const store = useContext(Context);
|
|
64
65
|
if (store === null) {
|
|
65
66
|
throw new Error(`Context store '${name}' must be used within a Provider`);
|
|
66
67
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contextStore.js","sourceRoot":"","sources":["../../../src/base/react/contextStore.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,
|
|
1
|
+
{"version":3,"file":"contextStore.js","sourceRoot":"","sources":["../../../src/base/react/contextStore.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAiB,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9F,OAAO,OAAO,MAAM,oBAAoB,CAAC;AAUzC,SAAS,WAAW,CAAI,YAAe;IACnC,IAAI,KAAK,GAAG,YAAY,CAAC;IACzB,MAAM,WAAW,GAAG,IAAI,GAAG,EAAiB,CAAC;IAE7C,MAAM,QAAQ,GAAyB,GAAG,EAAE,CAAC,KAAK,CAAC;IAEnD,MAAM,QAAQ,GAAyB,CAAC,MAAM,EAAE,EAAE;QAC9C,MAAM,SAAS,GAAG,KAAK,CAAC;QACxB,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;QAE1B,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IACtE,CAAC,CAAC;IAEF,MAAM,SAAS,GAAG,CAAC,UAAyB,EAAE,EAAE;QAC5C,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;QAC5B,OAAO,GAAG,EAAE;YACR,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;QAC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setState pair but also a debounced version of the state.
|
|
5
5
|
* @internal
|
|
@@ -15,9 +15,9 @@ import * as React from "react";
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
export const useDebouncedState = (initialValue, delay) => {
|
|
18
|
-
const [value, setValue] =
|
|
19
|
-
const [debouncedValue, setDebouncedValue] =
|
|
20
|
-
|
|
18
|
+
const [value, setValue] = useState(initialValue);
|
|
19
|
+
const [debouncedValue, setDebouncedValue] = useState(initialValue);
|
|
20
|
+
useEffect(() => {
|
|
21
21
|
const timeout = setTimeout(() => {
|
|
22
22
|
setDebouncedValue(value);
|
|
23
23
|
}, delay);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../src/base/react/debounce.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,
|
|
1
|
+
{"version":3,"file":"debounce.js","sourceRoot":"","sources":["../../../src/base/react/debounce.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAyB5C;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAI,YAAe,EAAE,KAAa,EAA8B,EAAE;IAC/F,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IACjD,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEnE,SAAS,CAAC,GAAG,EAAE;QACX,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YAC5B,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAC7B,CAAC,EAAE,KAAK,CAAC,CAAC;QAEV,OAAO,GAAG,EAAE;YACR,YAAY,CAAC,OAAO,CAAC,CAAC;QAC1B,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnB,MAAM,YAAY,GAAG,CAAC,KAAQ,EAAE,EAAE;QAC9B,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC7B,CAAC,CAAC;IAEF,OAAO,CAAC,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;AAC3D,CAAC,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { PropsWithoutRef, ReactNode, Ref, RefAttributes } from "react";
|
|
2
2
|
/**
|
|
3
3
|
* Usage: first define your component with generics and a second argument `ref`,
|
|
4
4
|
* then define another const wrapping the original component with `forwardRefWithGenerics`
|
|
5
5
|
*
|
|
6
6
|
* @internal
|
|
7
7
|
*/
|
|
8
|
-
export declare function forwardRefWithGenerics<T, P>(render: (props:
|
|
8
|
+
export declare function forwardRefWithGenerics<T, P>(render: (props: PropsWithoutRef<P>, ref: Ref<T>) => ReactNode): (props: PropsWithoutRef<P> & RefAttributes<T>) => ReactNode;
|
|
9
9
|
//# sourceMappingURL=forwardRefWithGenerics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forwardRefWithGenerics.d.ts","sourceRoot":"","sources":["../../../src/base/react/forwardRefWithGenerics.ts"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"forwardRefWithGenerics.d.ts","sourceRoot":"","sources":["../../../src/base/react/forwardRefWithGenerics.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAE,aAAa,EAAc,MAAM,OAAO,CAAC;AAEnF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,CAAC,EACvC,MAAM,EAAE,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC,CAAC,KAAK,SAAS,GAC9D,CAAC,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,KAAK,SAAS,CAE7D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2025 GoodData Corporation
|
|
2
|
-
import
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* Usage: first define your component with generics and a second argument `ref`,
|
|
5
5
|
* then define another const wrapping the original component with `forwardRefWithGenerics`
|
|
@@ -7,6 +7,6 @@ import React from "react";
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export function forwardRefWithGenerics(render) {
|
|
10
|
-
return
|
|
10
|
+
return forwardRef(render);
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=forwardRefWithGenerics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forwardRefWithGenerics.js","sourceRoot":"","sources":["../../../src/base/react/forwardRefWithGenerics.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,
|
|
1
|
+
{"version":3,"file":"forwardRefWithGenerics.js","sourceRoot":"","sources":["../../../src/base/react/forwardRefWithGenerics.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAkD,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAClC,MAA6D;IAE7D,OAAO,UAAU,CAAC,MAAM,CAAQ,CAAC;AACrC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ComponentType } from "react";
|
|
2
2
|
import { IntlShape } from "react-intl";
|
|
3
3
|
import { IDataView } from "@gooddata/sdk-backend-spi";
|
|
4
4
|
import { GoodDataSdkError } from "../../errors/GoodDataSdkError.js";
|
|
@@ -52,5 +52,5 @@ export interface ILoadingInjectedProps {
|
|
|
52
52
|
* @param InnerComponent - component to wrap
|
|
53
53
|
* @internal
|
|
54
54
|
*/
|
|
55
|
-
export declare function withEntireDataView<T extends IDataVisualizationProps>(InnerComponent:
|
|
55
|
+
export declare function withEntireDataView<T extends IDataVisualizationProps>(InnerComponent: ComponentType<T & ILoadingInjectedProps>): ComponentType<T>;
|
|
56
56
|
//# sourceMappingURL=withEntireDataView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withEntireDataView.d.ts","sourceRoot":"","sources":["../../../../src/base/react/legacy/withEntireDataView.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"withEntireDataView.d.ts","sourceRoot":"","sources":["../../../../src/base/react/legacy/withEntireDataView.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA6B,aAAa,EAAE,MAAM,OAAO,CAAC;AAKjE,OAAO,EAAE,SAAS,EAAc,MAAM,YAAY,CAAC;AAEnD,OAAO,EAEH,SAAS,EAMZ,MAAM,2BAA2B,CAAC;AAKnC,OAAO,EAIH,gBAAgB,EAInB,MAAM,kCAAkC,CAAC;AAG1C,OAAO,EAAE,eAAe,EAAiB,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAU1E;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IAClC;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IAGpC,IAAI,EAAE,SAAS,CAAC;IAEhB;;OAEG;IACH,aAAa,CAAC,cAAc,EAAE,eAAe,GAAG,IAAI,CAAC;IAErD;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvD;;OAEG;IACH,gBAAgB,IAAI,IAAI,CAAC;CAC5B;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,uBAAuB,EAChE,cAAc,EAAE,aAAa,CAAC,CAAC,GAAG,qBAAqB,CAAC,GACzD,aAAa,CAAC,CAAC,CAAC,CAmTlB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
// (C) 2019-2025 GoodData Corporation
|
|
2
|
-
import
|
|
3
|
+
import { Component } from "react";
|
|
3
4
|
import isEqual from "lodash/isEqual.js";
|
|
4
5
|
import noop from "lodash/noop.js";
|
|
5
6
|
import omit from "lodash/omit.js";
|
|
@@ -23,7 +24,7 @@ import { createExportErrorFunction, createExportFunction } from "../../vis/expor
|
|
|
23
24
|
* @internal
|
|
24
25
|
*/
|
|
25
26
|
export function withEntireDataView(InnerComponent) {
|
|
26
|
-
class LoadingHOCWrapped extends
|
|
27
|
+
class LoadingHOCWrapped extends Component {
|
|
27
28
|
static defaultProps = InnerComponent.defaultProps || {};
|
|
28
29
|
hasUnmounted = false;
|
|
29
30
|
abortController;
|
|
@@ -53,7 +54,7 @@ export function withEntireDataView(InnerComponent) {
|
|
|
53
54
|
const { intl } = this.props;
|
|
54
55
|
// lower-level components do not need workspace
|
|
55
56
|
const props = this.stripWorkspace(this.props);
|
|
56
|
-
return (
|
|
57
|
+
return (_jsx(InnerComponent, { ...props, dataView: dataView, onDataTooLarge: this.onDataTooLarge, onNegativeValues: this.onNegativeValues, error: error, seType: seType, isLoading: isLoading, intl: intl }));
|
|
57
58
|
}
|
|
58
59
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
59
60
|
// we need strict equality here in case only the buckets changed (not measures or attributes)
|
|
@@ -233,10 +234,9 @@ export function withEntireDataView(InnerComponent) {
|
|
|
233
234
|
};
|
|
234
235
|
}
|
|
235
236
|
const IntlLoadingHOC = injectIntl(LoadingHOCWrapped);
|
|
236
|
-
return class LoadingHOC extends
|
|
237
|
+
return class LoadingHOC extends Component {
|
|
237
238
|
render() {
|
|
238
|
-
return (
|
|
239
|
-
React.createElement(IntlLoadingHOC, { ...this.props })));
|
|
239
|
+
return (_jsx(IntlWrapper, { locale: this.props.locale, children: _jsx(IntlLoadingHOC, { ...this.props }) }));
|
|
240
240
|
}
|
|
241
241
|
};
|
|
242
242
|
}
|