@gooddata/sdk-ui-analytical-designer 11.65.0-alpha.8 → 11.65.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/NOTICE +622 -2311
- package/README.md +31 -57
- package/esm/actions/app_context_actions.d.ts +0 -10
- package/esm/actions/app_context_actions.d.ts.map +1 -1
- package/esm/actions/app_context_actions.js +0 -1
- package/esm/backend.d.ts +20 -13
- package/esm/backend.d.ts.map +1 -1
- package/esm/backend.js +32 -89
- package/esm/components/CustomDragLayer.d.ts.map +1 -1
- package/esm/components/CustomDragLayer.js +0 -1
- package/esm/components/DragScroller/DragScroller.d.ts.map +1 -1
- package/esm/components/DragScroller/DragScroller.js +1 -2
- package/esm/components/Messages.d.ts.map +1 -1
- package/esm/components/Messages.js +13 -11
- package/esm/components/ReportTitle.js +1 -1
- package/esm/components/buckets/BucketIcon.d.ts +1 -1
- package/esm/components/buckets/BucketIcon.d.ts.map +1 -1
- package/esm/components/buckets/BucketIcon.js +11 -161
- package/esm/components/buckets/MeasureAttributeFilterPickerBody.d.ts.map +1 -1
- package/esm/components/buckets/MeasureAttributeFilterPickerBody.js +0 -1
- package/esm/components/buckets/MeasureDateFilter.d.ts.map +1 -1
- package/esm/components/filterBar/dateFilter/AdditionalFiltersSection/AdditionalDateAttributes.js +1 -1
- package/esm/components/header/VisualizationsDropdown.js +1 -1
- package/esm/components/report/PluggableVisualization.d.ts.map +1 -1
- package/esm/components/report/PluggableVisualization.js +0 -3
- package/esm/components/sort/chart_sort_button_combiners.js +1 -1
- package/esm/constants/actions.d.ts +0 -1
- package/esm/constants/actions.d.ts.map +1 -1
- package/esm/constants/actions.js +0 -2
- package/esm/embedding/AnalyticalDesigner.d.ts +0 -1
- package/esm/embedding/AnalyticalDesigner.d.ts.map +1 -1
- package/esm/embedding/AnalyticalDesigner.js +2 -4
- package/esm/embedding/AnalyticalDesignerEmbedded.d.ts +12 -9
- package/esm/embedding/AnalyticalDesignerEmbedded.d.ts.map +1 -1
- package/esm/embedding/AnalyticalDesignerEmbedded.js +5 -11
- package/esm/embedding/analyticalDesignerConfig.d.ts +0 -6
- package/esm/embedding/analyticalDesignerConfig.d.ts.map +1 -1
- package/esm/embedding/analyticalDesignerConfig.js +0 -36
- package/esm/embedding/analyticalDesignerTypes.d.ts +119 -104
- package/esm/embedding/analyticalDesignerTypes.d.ts.map +1 -1
- package/esm/embedding/hostBridge.d.ts +2 -9
- package/esm/embedding/hostBridge.d.ts.map +1 -1
- package/esm/embedding/platformContext.d.ts +4 -3
- package/esm/embedding/platformContext.d.ts.map +1 -1
- package/esm/embedding/platformContext.js +4 -5
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/internal.d.ts +3 -2
- package/esm/internal.d.ts.map +1 -1
- package/esm/internal.js +3 -2
- package/esm/models/decorated_bucket_item.js +2 -2
- package/esm/models/metadata.d.ts +17 -4
- package/esm/models/metadata.d.ts.map +1 -1
- package/esm/models/metadata.js +103 -25
- package/esm/postMessageApi/outgoing/drill_events.d.ts.map +1 -1
- package/esm/postMessageApi/outgoing/drill_events.js +10 -3
- package/esm/postMessageApi/outgoing/open_insight_events.d.ts +1 -1
- package/esm/postMessageApi/outgoing/post_event_helper.d.ts +11 -1
- package/esm/postMessageApi/outgoing/post_event_helper.d.ts.map +1 -1
- package/esm/postMessageApi/outgoing/post_event_helper.js +22 -13
- package/esm/postMessageApi/sagas/api_token_received_saga.d.ts +4 -1
- package/esm/postMessageApi/sagas/api_token_received_saga.d.ts.map +1 -1
- package/esm/postMessageApi/sagas/api_token_received_saga.js +8 -19
- package/esm/postMessageApi/sagas/command_received_saga.d.ts +4 -1
- package/esm/postMessageApi/sagas/command_received_saga.d.ts.map +1 -1
- package/esm/sagas/bootstrap_sagas.d.ts +1 -6
- package/esm/sagas/bootstrap_sagas.d.ts.map +1 -1
- package/esm/sagas/bootstrap_sagas.js +2 -7
- package/esm/sagas/open_report_sagas.d.ts +6 -0
- package/esm/sagas/open_report_sagas.d.ts.map +1 -1
- package/esm/sagas/open_report_sagas.js +13 -9
- package/esm/sagas/sagas.d.ts.map +1 -1
- package/esm/sagas/sagas.js +0 -2
- package/esm/sdk-ui-analytical-designer.d.ts +112 -95
- package/esm/selectors/bootstrap_selector.d.ts +0 -21
- package/esm/selectors/bootstrap_selector.d.ts.map +1 -1
- package/esm/selectors/bootstrap_selector.js +0 -2
- package/esm/selectors/buckets_selector.d.ts +44 -4
- package/esm/selectors/buckets_selector.d.ts.map +1 -1
- package/esm/selectors/buckets_selector.js +5 -5
- package/esm/selectors/date_datasets_selector.d.ts +88 -8
- package/esm/selectors/date_datasets_selector.d.ts.map +1 -1
- package/esm/selectors/dialogs_selector.d.ts +11 -11
- package/esm/selectors/insight_selectors.d.ts +110 -10
- package/esm/selectors/insight_selectors.d.ts.map +1 -1
- package/esm/selectors/report_selector.d.ts +44 -4
- package/esm/selectors/report_selector.d.ts.map +1 -1
- package/esm/selectors/report_visualization_selector.d.ts +26 -6
- package/esm/selectors/report_visualization_selector.d.ts.map +1 -1
- package/esm/selectors/route_selector.d.ts +1 -1
- package/esm/selectors/save_report_from_kd_dialog_selector.d.ts +11 -11
- package/esm/selectors/save_report_from_kd_dialog_selector.js +1 -1
- package/esm/selectors/save_report_selector.d.ts +3 -0
- package/esm/selectors/save_report_selector.d.ts.map +1 -1
- package/esm/selectors/save_report_selector.js +18 -2
- package/esm/selectors/uri_selector.d.ts +5 -6
- package/esm/selectors/uri_selector.d.ts.map +1 -1
- package/esm/selectors/uri_selector.js +1 -10
- package/esm/services/bootstrap_error_service.d.ts.map +1 -1
- package/esm/services/bootstrap_error_service.js +5 -14
- package/esm/translations/de-DE.json +0 -22
- package/esm/translations/en-AU.json +0 -22
- package/esm/translations/en-GB.json +3 -25
- package/esm/translations/es-419.json +0 -22
- package/esm/translations/es-ES.json +13 -35
- package/esm/translations/fi-FI.json +0 -22
- package/esm/translations/fr-CA.json +0 -22
- package/esm/translations/fr-FR.json +21 -43
- package/esm/translations/id-ID.json +0 -22
- package/esm/translations/it-IT.json +0 -22
- package/esm/translations/ja-JP.json +0 -22
- package/esm/translations/ko-KR.json +0 -22
- package/esm/translations/nl-NL.json +0 -22
- package/esm/translations/pl-PL.json +0 -22
- package/esm/translations/pt-BR.json +0 -22
- package/esm/translations/pt-PT.json +0 -22
- package/esm/translations/ru-RU.json +0 -22
- package/esm/translations/sl-SI.json +0 -22
- package/esm/translations/th-TH.json +0 -22
- package/esm/translations/tr-TR.json +0 -22
- package/esm/translations/uk-UA.json +0 -22
- package/esm/translations/vi-VN.json +0 -22
- package/esm/translations/zh-HK.json +0 -22
- package/esm/translations/zh-Hans.json +0 -22
- package/esm/translations/zh-Hant.json +0 -22
- package/esm/typings/bear/bearTypes.d.ts +0 -6
- package/esm/typings/bear/bearTypes.d.ts.map +1 -1
- package/esm/utils/appHeader.d.ts +2 -2
- package/esm/utils/appHeader.js +2 -2
- package/esm/utils/custom_mouse_backend.d.ts +1 -1
- package/esm/utils/location.d.ts +0 -1
- package/esm/utils/location.d.ts.map +1 -1
- package/esm/utils/location.js +0 -6
- package/esm/utils/organized_catalog_api.d.ts.map +1 -1
- package/esm/utils/organized_catalog_api.js +0 -1
- package/package.json +21 -23
- package/styles/css/buckets.css +7 -0
- package/styles/css/buckets.css.map +1 -1
- package/styles/css/editor_header.css +1 -1
- package/styles/css/editor_header.css.map +1 -1
- package/styles/css/main.css +11 -1
- package/styles/css/main.css.map +1 -1
- package/styles/css/typo.css +3 -0
- package/styles/css/typo.css.map +1 -1
- package/styles/scss/buckets.scss +10 -0
- package/styles/scss/editor_header.scss +2 -2
- package/styles/scss/filter_bucket.scss +2 -2
- package/styles/scss/typo.scss +4 -0
- package/esm/embedding/embeddedCallbacks.d.ts +0 -31
- package/esm/embedding/embeddedCallbacks.d.ts.map +0 -1
- package/esm/embedding/embeddedCallbacks.js +0 -59
- package/esm/sagas/external_scripts_saga.d.ts +0 -4
- package/esm/sagas/external_scripts_saga.d.ts.map +0 -1
- package/esm/sagas/external_scripts_saga.js +0 -13
- package/esm/tigerNotAuthenticatedHandler.d.ts +0 -8
- package/esm/tigerNotAuthenticatedHandler.d.ts.map +0 -1
- package/esm/tigerNotAuthenticatedHandler.js +0 -24
package/README.md
CHANGED
|
@@ -43,39 +43,6 @@ React peers:
|
|
|
43
43
|
With the same version, the host and AD share one copy of each SDK package, so they share its React
|
|
44
44
|
contexts and the bundle contains one SDK.
|
|
45
45
|
|
|
46
|
-
### Vite configuration
|
|
47
|
-
|
|
48
|
-
```ts
|
|
49
|
-
// vite.config.ts
|
|
50
|
-
import react from "@vitejs/plugin-react";
|
|
51
|
-
import { defineConfig } from "vite";
|
|
52
|
-
|
|
53
|
-
export default defineConfig({
|
|
54
|
-
plugins: [react()],
|
|
55
|
-
define: {
|
|
56
|
-
// Legacy CommonJS dependencies bundled with AD read these.
|
|
57
|
-
global: "globalThis",
|
|
58
|
-
"process.env": "{}",
|
|
59
|
-
},
|
|
60
|
-
optimizeDeps: {
|
|
61
|
-
rolldownOptions: {
|
|
62
|
-
// The metric editor in AD imports its Monaco worker with `?worker&url`, which the
|
|
63
|
-
// dependency pre-bundler cannot load. Leave that import external, so Vite's own
|
|
64
|
-
// pipeline resolves it to the worker URL when it serves the pre-bundled chunk.
|
|
65
|
-
plugins: [
|
|
66
|
-
{
|
|
67
|
-
name: "external-worker-url",
|
|
68
|
-
resolveId: (id: string) => (/\?worker(&url)?$/.test(id) ? { id, external: true } : null),
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
});
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Without the `optimizeDeps` plugin, the dev server stops while it pre-bundles dependencies, with
|
|
77
|
-
`[UNLOADABLE_DEPENDENCY] Could not load …/editorWebWorkerMain.js?worker&url`. See Workers below.
|
|
78
|
-
|
|
79
46
|
### Backend
|
|
80
47
|
|
|
81
48
|
AD runs on the host's backend. When the backend caches, give AD the cache resets, so the catalog
|
|
@@ -149,8 +116,7 @@ export function App() {
|
|
|
149
116
|
config={{ locale: "en-US" }}
|
|
150
117
|
cacheReset={cacheReset}
|
|
151
118
|
slots={slots}
|
|
152
|
-
|
|
153
|
-
onInsightSaved={({ insight }) => console.log("saved", insight)}
|
|
119
|
+
onEvent={(event) => console.log(event.type, event.data)}
|
|
154
120
|
onError={(error) => console.error("AD error", error)}
|
|
155
121
|
/>
|
|
156
122
|
</div>
|
|
@@ -169,19 +135,20 @@ Leave out `insight` to open a new insight. The AnalyticalDesigner component sect
|
|
|
169
135
|
built with. AD mounts its own backend, workspace and theme providers, so it runs next to a host on
|
|
170
136
|
another SDK version. Align the versions when host components and AD components have to share a
|
|
171
137
|
React context from the SDK, and to avoid bundling two SDK copies.
|
|
172
|
-
- **Build-time defines**: `
|
|
173
|
-
|
|
138
|
+
- **Build-time defines**: `process.env` must be defined (`{}`). The MAQL parser of the metric editor
|
|
139
|
+
(`antlr4ts`) loads the `assert` and `util` polyfills, which read it when they load. No other
|
|
140
|
+
define is needed: AD does not read `global`. The
|
|
174
141
|
build flags `DEBUG`, `TESTING`, `READONLY_MODE` and `TIGER_API_TOKEN` are optional: the code reads
|
|
175
142
|
them behind `typeof` guards and falls back to production defaults, so define them only to change
|
|
176
143
|
that behavior. `modules/gdc-analytical-designer/module/vite.config.ts` is the reference setup.
|
|
177
|
-
- **Workers**:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
144
|
+
- **Workers**: no setup is needed in Vite or webpack. The metric editor
|
|
145
|
+
(`@gooddata/sdk-ui-metric-component`) ships Monaco's editor worker bundled into one file. It starts
|
|
146
|
+
the worker from that file when the bundler emitted it next to the page, and from a Blob of the same
|
|
147
|
+
code otherwise, for example in the Vite dev server or when the editor loads from another origin. A
|
|
148
|
+
content security policy must then allow `blob:` workers. A page that enforces Trusted Types must
|
|
149
|
+
allow the `gdMetricEditorWorker` policy, or create it through
|
|
150
|
+
`MonacoEnvironment.createTrustedTypesPolicy`. A host that sets its own `MonacoEnvironment`
|
|
151
|
+
(`getWorker` or `getWorkerUrl`) before the editor loads keeps its own workers.
|
|
185
152
|
|
|
186
153
|
- **Import side effects**: importing an entry creates no router and no browser history. `Root`
|
|
187
154
|
creates its router when it mounts: a `BrowserRouter` under the host's base path in the pluggable
|
|
@@ -244,8 +211,16 @@ import "@gooddata/sdk-ui-analytical-designer/styles/css/main.css";
|
|
|
244
211
|
insight="insight-id"
|
|
245
212
|
config={{ locale: "en-US", hiddenActions: ["open"], isReadOnly: false }}
|
|
246
213
|
cacheReset={cacheReset}
|
|
247
|
-
|
|
248
|
-
|
|
214
|
+
onEvent={(event) => {
|
|
215
|
+
switch (event.type) {
|
|
216
|
+
case "visualizationSaved":
|
|
217
|
+
console.log("saved", event.data.insight);
|
|
218
|
+
break;
|
|
219
|
+
case "metricsChanged":
|
|
220
|
+
console.log("metrics changed");
|
|
221
|
+
break;
|
|
222
|
+
}
|
|
223
|
+
}}
|
|
249
224
|
/>
|
|
250
225
|
</WorkspaceProvider>
|
|
251
226
|
</BackendProvider>;
|
|
@@ -267,16 +242,15 @@ import "@gooddata/sdk-ui-analytical-designer/styles/css/main.css";
|
|
|
267
242
|
`isEmbedded`, `allowDashboardLinks`) follow the props.
|
|
268
243
|
- **Theme**: `theme` replaces the workspace theme, `disableThemeLoading` skips it, and
|
|
269
244
|
`themeModifier` changes the theme AD applies.
|
|
270
|
-
- **Events**: `
|
|
271
|
-
|
|
272
|
-
`
|
|
273
|
-
|
|
274
|
-
`
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
(`resetAll`, `resetCatalogs`; the `CacheControl` of `withCaching` fits): AD calls it when the user
|
|
245
|
+
- **Events**: `onEvent` gets every event AD emits as an `AnalyticalDesignerEvent`: `type`, `data`
|
|
246
|
+
and the `contextId` of the command the event answers. Checking `type` narrows `data`;
|
|
247
|
+
`IAnalyticalDesignerEventDataMap` lists the payload of each type. The types are the names of the
|
|
248
|
+
`@gooddata/sdk-embedding` contract (`visualizationSaved`, `insightEditingCancelled`,
|
|
249
|
+
`insightOpened`, `appCommandFailed`, `undoFinished`, ...), plus `metricsChanged`, when the user
|
|
250
|
+
saves or deletes a metric, and `availableCommands`. The `drill` event carries the `IDrillEvent` of
|
|
251
|
+
`@gooddata/sdk-ui`. `onError` fires when AD cannot start. A host that shares a caching backend
|
|
252
|
+
with AD passes `cacheReset` (`resetAll`, `resetCatalogs`; the `CacheControl` of `withCaching`
|
|
253
|
+
fits): AD calls it when the user
|
|
280
254
|
refreshes the catalog or edits a metric, before it reloads the data.
|
|
281
255
|
- **Commands**: `apiRef` takes `clear`, `requestCancellation`, `setFilterContext` and
|
|
282
256
|
`sendCommand`. Commands sent before AD mounts run once it does.
|
|
@@ -3,11 +3,6 @@ import { type IColorPalette, type ITheme } from "@gooddata/sdk-model";
|
|
|
3
3
|
import { type ISeparators } from "@gooddata/sdk-ui";
|
|
4
4
|
import { ActionTypeKeys } from "../constants/actions.js";
|
|
5
5
|
import { type IBearBootstrap } from "../typings/bear/bearTypes.js";
|
|
6
|
-
export interface IExternalScripts {
|
|
7
|
-
walkMe: string;
|
|
8
|
-
walkMeEnvironment: string;
|
|
9
|
-
includeTrialSnippet: string;
|
|
10
|
-
}
|
|
11
6
|
export interface IBootstrapData {
|
|
12
7
|
mapboxToken?: string;
|
|
13
8
|
agGridToken?: string;
|
|
@@ -59,7 +54,6 @@ export interface IBootstrapData {
|
|
|
59
54
|
defaultDashboardTab: string;
|
|
60
55
|
analyticalDashboards: IBearBootstrap["bootstrapResource"]["current"]["analyticalDashboards"];
|
|
61
56
|
};
|
|
62
|
-
externalScripts?: IExternalScripts;
|
|
63
57
|
colorPalette?: IColorPalette;
|
|
64
58
|
bear: {
|
|
65
59
|
profileSetting?: IBearBootstrap["bootstrapResource"]["profileSetting"];
|
|
@@ -107,10 +101,6 @@ export declare const resetApplication: import("@reduxjs/toolkit").ActionCreatorW
|
|
|
107
101
|
export type IResetApplicationAction = ReturnType<typeof resetApplication>;
|
|
108
102
|
export declare const clearInsightContent: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<ActionTypeKeys.CLEAR_INSIGHT_CONTENT>;
|
|
109
103
|
export type IClearInsightContentAction = ReturnType<typeof clearInsightContent>;
|
|
110
|
-
export declare const loadExternalScripts: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[scripts: IExternalScripts], {
|
|
111
|
-
scripts: IExternalScripts;
|
|
112
|
-
}, ActionTypeKeys.LOAD_EXTERNAL_SCRIPTS_REQUESTED, never, never>;
|
|
113
|
-
export type ILoadExternalScriptsAction = ReturnType<typeof loadExternalScripts>;
|
|
114
104
|
export declare const refreshSessionId: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[], {
|
|
115
105
|
sessionId: string;
|
|
116
106
|
}, ActionTypeKeys.STORE_REFRESH_SESSION_ID, never, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app_context_actions.d.ts","sourceRoot":"","sources":["../../src/actions/app_context_actions.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"app_context_actions.d.ts","sourceRoot":"","sources":["../../src/actions/app_context_actions.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,K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,eAAe;;kDAG3B,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
|
@@ -33,7 +33,6 @@ export const appFinishedLoading = createAction(ActionTypeKeys.APP_READINESS_CHAN
|
|
|
33
33
|
export const appFinishedSuccessfulInitialization = createAction(ActionTypeKeys.APP_FINISHED_SUCCESSFUL_INITIALIZATION, (isEmptyReport) => ({ payload: { isEmptyReport } }));
|
|
34
34
|
export const resetApplication = createAction(ActionTypeKeys.RESET_APPLICATION);
|
|
35
35
|
export const clearInsightContent = createAction(ActionTypeKeys.CLEAR_INSIGHT_CONTENT);
|
|
36
|
-
export const loadExternalScripts = createAction(ActionTypeKeys.LOAD_EXTERNAL_SCRIPTS_REQUESTED, (scripts) => ({ payload: { scripts } }));
|
|
37
36
|
// the fresh id is generated HERE so the sessionId reducer stays pure
|
|
38
37
|
export const refreshSessionId = createAction(ActionTypeKeys.STORE_REFRESH_SESSION_ID, () => ({
|
|
39
38
|
payload: { sessionId: uuid() },
|
package/esm/backend.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type JwtIsAboutToExpireHandler, type SetJwtCallback } from "@gooddata/sdk-backend-tiger";
|
|
3
2
|
import { type IExecutionDefinition } from "@gooddata/sdk-model";
|
|
4
3
|
export type ApiTokenType = "gooddata" | "jwt";
|
|
5
4
|
export interface IApiToken {
|
|
@@ -8,17 +7,14 @@ export interface IApiToken {
|
|
|
8
7
|
secondsBeforeTokenExpirationToCallReminder?: number;
|
|
9
8
|
}
|
|
10
9
|
export declare const isValidApiTokenType: (type?: ApiTokenType) => type is "gooddata" | "jwt" | undefined;
|
|
11
|
-
export declare let setJwtHandler:
|
|
12
|
-
export declare let setApiTokenHandler:
|
|
13
|
-
export declare const jwtIsAboutToExpire: JwtIsAboutToExpireHandler;
|
|
10
|
+
export declare let setJwtHandler: IAdHostBackend["setJwt"];
|
|
11
|
+
export declare let setApiTokenHandler: IAdHostBackend["setApiToken"];
|
|
14
12
|
export declare let clearCache: () => void;
|
|
15
13
|
export declare let resetCatalogs: () => void;
|
|
16
14
|
export declare let explainExecDef: IExecutionDefinition;
|
|
17
15
|
export declare let backend: IAnalyticalBackend;
|
|
18
|
-
export declare const reinitializeBackend: (apiToken?: IApiToken, externalProviderId?: string) => void;
|
|
19
16
|
/**
|
|
20
|
-
*
|
|
21
|
-
* See adoptHostBackend.
|
|
17
|
+
* The backend of the host application AD runs against. See adoptHostBackend.
|
|
22
18
|
*/
|
|
23
19
|
export interface IAdHostBackend {
|
|
24
20
|
/**
|
|
@@ -30,14 +26,25 @@ export interface IAdHostBackend {
|
|
|
30
26
|
resetAllCaches?: () => void;
|
|
31
27
|
/** Resets the catalog cache of the host's caching decorator; backs the resetCatalogs ref. */
|
|
32
28
|
resetCatalogs?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Applies an API token the SetApiToken command delivers: the first token as well as a renewal.
|
|
31
|
+
* The host renews its auth provider in place or switches its backend to the token, and adopts
|
|
32
|
+
* the new instance again when it did. Omit when the host handles the command itself, AD then
|
|
33
|
+
* only records the token.
|
|
34
|
+
*/
|
|
35
|
+
setApiToken?: (token: string) => void;
|
|
36
|
+
/** The JWT counterpart of setApiToken. */
|
|
37
|
+
setJwt?: (jwt: string, secondsBeforeTokenExpirationToCallReminder?: number) => void;
|
|
33
38
|
}
|
|
34
|
-
export declare let isHostBackendAdopted: boolean;
|
|
35
39
|
/**
|
|
36
|
-
* Makes AD run against the host's backend instance
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
40
|
+
* Makes AD run against the host's backend instance; AD never builds a backend of its own. The
|
|
41
|
+
* host's auth provider owns authentication. AD's cache-invalidation refs are wired to the host's
|
|
42
|
+
* callbacks, so when the host passes the instance it runs on itself (AnalyticalDesignerInternal,
|
|
43
|
+
* the dashboards), a metric edit in AD also drops the host's stale executions. The pluggable
|
|
44
|
+
* module builds AD a backend of its own from the host auth, so there the resets stay with that
|
|
45
|
+
* instance. The token renewals AD receives (SetApiToken) go to the host's setters when given.
|
|
41
46
|
*/
|
|
42
47
|
export declare const adoptHostBackend: (host: IAdHostBackend) => void;
|
|
48
|
+
/** Drops the adopted host backend; the backend is uninitialized again until the next adoption. */
|
|
49
|
+
export declare const resetBackend: () => void;
|
|
43
50
|
//# sourceMappingURL=backend.d.ts.map
|
package/esm/backend.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAgBhE,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,KAAK,CAAC;AAE9C,MAAM,WAAW,SAAS;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,0CAA0C,CAAC,EAAE,MAAM,CAAC;CACvD;AAED,eAAO,MAAM,mBAAmB,UAAW,YAAY,2CACQ,CAAC;AAIhE,eAAO,IAAI,aAAa,EAAE,cAAc,CAAC,QAAQ,CAAa,CAAC;AAI/D,eAAO,IAAI,kBAAkB,EAAE,cAAc,CAAC,aAAa,CAAa,CAAC;AAEzE,eAAO,IAAI,UAAU,EAAE,MAAM,IAAW,CAAC;AACzC,eAAO,IAAI,aAAa,EAAE,MAAM,IAAW,CAAC;AAC5C,eAAO,IAAI,cAAc,EAAE,oBAAoB,CAAC;AAwBhD,eAAO,IAAI,OAAO,EAAE,kBAAiD,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;;OAGG;IACH,QAAQ,EAAE,kBAAkB,CAAC;IAC7B,mFAAmF;IACnF,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,6FAA6F;IAC7F,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,0CAA0C;IAC1C,MAAM,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,0CAA0C,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CACvF;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,SAAU,cAAc,KAAG,IAMvD,CAAC;AAEF,kGAAkG;AAClG,eAAO,MAAM,YAAY,QAAO,IAM/B,CAAC"}
|
package/esm/backend.js
CHANGED
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { withEventing } from "@gooddata/sdk-backend-base";
|
|
3
|
+
import { tigerFactory } from "@gooddata/sdk-backend-tiger";
|
|
4
4
|
import { IS_DEBUG } from "./buildParams.js";
|
|
5
|
-
import { emitApiTokenIsAboutToExpire } from "./postMessageApi/outgoing/set_api_token_events.js";
|
|
6
5
|
import { withSemanticCfSimulation } from "./semanticCfSimulation.js";
|
|
7
|
-
import { createNotAuthenticatedHandler } from "./tigerNotAuthenticatedHandler.js";
|
|
8
6
|
const hasWindow = typeof window !== "undefined";
|
|
9
|
-
const
|
|
10
|
-
if (hasWindow && window["customWorkspaceSettings"]) {
|
|
11
|
-
const settingsConfig = {
|
|
12
|
-
commonSettingsWrapper: (originalSettings) => {
|
|
13
|
-
return {
|
|
14
|
-
...originalSettings,
|
|
15
|
-
...window["customWorkspaceSettings"],
|
|
16
|
-
};
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
return withCustomWorkspaceSettings(backend, settingsConfig);
|
|
20
|
-
}
|
|
21
|
-
return backend;
|
|
22
|
-
};
|
|
7
|
+
const noop = () => { };
|
|
23
8
|
const wrapWithSemanticCfSimulation = (backend) => {
|
|
24
9
|
if (IS_DEBUG && hasWindow && window["semanticCfSimConfig"]) {
|
|
25
10
|
return withSemanticCfSimulation(backend, window["semanticCfSimConfig"]);
|
|
@@ -27,96 +12,54 @@ const wrapWithSemanticCfSimulation = (backend) => {
|
|
|
27
12
|
return backend;
|
|
28
13
|
};
|
|
29
14
|
export const isValidApiTokenType = (type) => type === undefined || type === "gooddata" || type === "jwt";
|
|
30
|
-
//
|
|
31
|
-
//
|
|
15
|
+
// Renews the JWT of the host backend's auth provider in place (SetApiToken command); undefined
|
|
16
|
+
// when the host renews its provider itself.
|
|
32
17
|
export let setJwtHandler = undefined;
|
|
33
|
-
//
|
|
34
|
-
//
|
|
18
|
+
// Renews the API token of the host backend's auth provider in place (SetApiToken command);
|
|
19
|
+
// undefined when the host renews its provider itself.
|
|
35
20
|
export let setApiTokenHandler = undefined;
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
emitApiTokenIsAboutToExpire();
|
|
39
|
-
};
|
|
40
|
-
const getBackendImplementation = (apiTokenConfiguration, externalProviderId) => {
|
|
41
|
-
const backend = tigerFactory(undefined, {
|
|
42
|
-
packageName: "@gooddata/sdk-ui-analytical-designer",
|
|
43
|
-
packageVersion: hasWindow && typeof window.COMMITHASH === "string" ? window.COMMITHASH : "dev",
|
|
44
|
-
});
|
|
45
|
-
const { apiToken, apiTokenType, secondsBeforeTokenExpirationToCallReminder } = apiTokenConfiguration;
|
|
46
|
-
if (apiToken && apiTokenType === "gooddata") {
|
|
47
|
-
/*
|
|
48
|
-
* Authentication using Tiger API Token is the only viable way at the moment because Tiger
|
|
49
|
-
* cross-origin dev support is flaky.
|
|
50
|
-
*/
|
|
51
|
-
// oxlint-disable-next-line eslint-js/no-console
|
|
52
|
-
console.log("Using Tiger API Token for authentication");
|
|
53
|
-
const notAuthenticatedHandler = createNotAuthenticatedHandler();
|
|
54
|
-
const tigerTokenAuthProvider = new TigerTokenAuthProvider(apiToken, notAuthenticatedHandler);
|
|
55
|
-
// Store the reference to Tiger API Token update callback (used by postMessage API saga).
|
|
56
|
-
setApiTokenHandler = tigerTokenAuthProvider.updateApiToken;
|
|
57
|
-
return wrapWithCustomSettings(backend.withAuthentication(tigerTokenAuthProvider));
|
|
58
|
-
}
|
|
59
|
-
else if (apiToken && apiTokenType === "jwt") {
|
|
60
|
-
// oxlint-disable-next-line eslint-js/no-console
|
|
61
|
-
console.log("Using JWT for authentication");
|
|
62
|
-
const notAuthenticatedHandler = createNotAuthenticatedHandler();
|
|
63
|
-
const jwtAuthProvider = new TigerJwtAuthProvider(apiToken, notAuthenticatedHandler, jwtIsAboutToExpire, secondsBeforeTokenExpirationToCallReminder);
|
|
64
|
-
// Store the reference to JWT update callback (used by postMessage API saga).
|
|
65
|
-
setJwtHandler = jwtAuthProvider.updateJwt;
|
|
66
|
-
return wrapWithCustomSettings(backend.withAuthentication(jwtAuthProvider));
|
|
67
|
-
}
|
|
68
|
-
const handler = createNotAuthenticatedHandler(externalProviderId);
|
|
69
|
-
return wrapWithCustomSettings(backend.withAuthentication(new ContextDeferredAuthProvider(handler)));
|
|
70
|
-
};
|
|
71
|
-
export let clearCache = () => { };
|
|
72
|
-
export let resetCatalogs = () => { };
|
|
21
|
+
export let clearCache = noop;
|
|
22
|
+
export let resetCatalogs = noop;
|
|
73
23
|
export let explainExecDef;
|
|
74
24
|
const withExplainEventing = (backend) => withEventing(backend, {
|
|
75
25
|
beforeExecute: (execDefinition) => {
|
|
76
26
|
explainExecDef = execDefinition;
|
|
77
27
|
},
|
|
78
28
|
});
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
})));
|
|
87
|
-
};
|
|
88
|
-
const decorateWithNoAccessProxy = (backend) => new Proxy(backend, {
|
|
29
|
+
/**
|
|
30
|
+
* The backend before a host backend is adopted. Only the capabilities are readable: they are
|
|
31
|
+
* static, tiger is the only backend. Any other access throws, so a request made before the
|
|
32
|
+
* adoption fails loudly instead of running unauthenticated.
|
|
33
|
+
*/
|
|
34
|
+
const createUninitializedBackend = () => new Proxy(tigerFactory(), {
|
|
89
35
|
get(target, prop, receiver) {
|
|
90
|
-
// capabilities are OK to use, these are static — tiger is the only backend
|
|
91
|
-
// and will not change when backend is re-initiated with new API token
|
|
92
36
|
if (prop === "capabilities") {
|
|
93
37
|
return Reflect.get(target, prop, receiver);
|
|
94
38
|
}
|
|
95
39
|
throw new Error("Backend API cannot be used as it was not yet initialized!");
|
|
96
40
|
},
|
|
97
41
|
});
|
|
98
|
-
|
|
99
|
-
// without the guard every consumer bundling the runtime would have to DefinePlugin it or crash on
|
|
100
|
-
// chunk load. Builds that define it (the standalone/iframe AD app) fold this to the defined value.
|
|
101
|
-
const DEFAULT_TIGER_API_TOKEN = typeof TIGER_API_TOKEN === "undefined" ? undefined : TIGER_API_TOKEN;
|
|
102
|
-
export let backend = decorateWithNoAccessProxy(decorateBackend(getBackendImplementation({ apiToken: DEFAULT_TIGER_API_TOKEN, apiTokenType: "gooddata" })));
|
|
103
|
-
export const reinitializeBackend = (apiToken = { apiToken: DEFAULT_TIGER_API_TOKEN, apiTokenType: "gooddata" }, externalProviderId) => {
|
|
104
|
-
backend = decorateBackend(getBackendImplementation(apiToken, externalProviderId));
|
|
105
|
-
isHostBackendAdopted = false;
|
|
106
|
-
};
|
|
107
|
-
export let isHostBackendAdopted = false;
|
|
42
|
+
export let backend = createUninitializedBackend();
|
|
108
43
|
/**
|
|
109
|
-
* Makes AD run against the host's backend instance
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
44
|
+
* Makes AD run against the host's backend instance; AD never builds a backend of its own. The
|
|
45
|
+
* host's auth provider owns authentication. AD's cache-invalidation refs are wired to the host's
|
|
46
|
+
* callbacks, so when the host passes the instance it runs on itself (AnalyticalDesignerInternal,
|
|
47
|
+
* the dashboards), a metric edit in AD also drops the host's stale executions. The pluggable
|
|
48
|
+
* module builds AD a backend of its own from the host auth, so there the resets stay with that
|
|
49
|
+
* instance. The token renewals AD receives (SetApiToken) go to the host's setters when given.
|
|
114
50
|
*/
|
|
115
51
|
export const adoptHostBackend = (host) => {
|
|
116
52
|
backend = withExplainEventing(wrapWithSemanticCfSimulation(host.instance));
|
|
117
|
-
clearCache = host.resetAllCaches ??
|
|
118
|
-
resetCatalogs = host.resetCatalogs ??
|
|
53
|
+
clearCache = host.resetAllCaches ?? noop;
|
|
54
|
+
resetCatalogs = host.resetCatalogs ?? noop;
|
|
55
|
+
setApiTokenHandler = host.setApiToken;
|
|
56
|
+
setJwtHandler = host.setJwt;
|
|
57
|
+
};
|
|
58
|
+
/** Drops the adopted host backend; the backend is uninitialized again until the next adoption. */
|
|
59
|
+
export const resetBackend = () => {
|
|
60
|
+
backend = createUninitializedBackend();
|
|
61
|
+
clearCache = noop;
|
|
62
|
+
resetCatalogs = noop;
|
|
119
63
|
setApiTokenHandler = undefined;
|
|
120
64
|
setJwtHandler = undefined;
|
|
121
|
-
isHostBackendAdopted = true;
|
|
122
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomDragLayer.d.ts","sourceRoot":"","sources":["../../src/components/CustomDragLayer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CustomDragLayer.d.ts","sourceRoot":"","sources":["../../src/components/CustomDragLayer.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAMnD,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAgB3F,wBAAgB,eAAe,CAC3B,QAAQ,EAAE,qBAAqB,EAC/B,KAAK,EAAE,qBAAqB,EAC5B,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,qBAAqB,KAAK,IAAI,EACnF,QAAQ,GAAE,QAAQ,CAAC,MAAM,CAAY,EACrC,cAAc,GAAE;IAAE,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,CAAA;CAAgC,QAmD7F;AAED,UAAU,qBAAqB;IAC3B,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;IAC1B,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,UAAU,wBAAwB;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,GAAG,qBAAqB,CAAC;AAEpF,UAAU,OAAO;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,qBAAqB;IAClC,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,aAAa,EAAE,OAAO,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,YAAY,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,wBAAwB,kDAqC/D"}
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
4
|
import { useDragLayer } from "@evil-internetmann/react-dnd";
|
|
5
|
-
import CustomEvent from "custom-event";
|
|
6
5
|
import { useDispatch } from "react-redux";
|
|
7
6
|
import { GOODSTRAP_DRAG_EVENT } from "@gooddata/sdk-ui-kit";
|
|
8
7
|
import { dragItemFailed } from "../sagas/drag_and_drop/drag_and_drop_actions.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DragScroller.d.ts","sourceRoot":"","sources":["../../../src/components/DragScroller/DragScroller.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DragScroller.d.ts","sourceRoot":"","sources":["../../../src/components/DragScroller/DragScroller.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AAe3F,MAAM,WAAW,kBAAkB;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,CACP,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,KAChB,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACrC,sBAAsB,CAAC,EAAE,CAAC,cAAc,EAAE,MAAM,IAAI,KAAK,MAAM,CAAC;IAChE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,wBAAgB,YAAY,CAAC,EACzB,SAAc,EACd,QAAQ,EACR,QAA6B,EAC7B,sBAAkE,EAClE,cAA0C,EAC1C,MAAM,EAAE,UAAmB,GAC9B,EAAE,kBAAkB,2CAgLpB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2021-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useEffect, useRef } from "react";
|
|
4
|
-
import CustomEvent from "custom-event";
|
|
5
4
|
import { throttle } from "lodash-es";
|
|
6
5
|
import { GOODSTRAP_SCROLLED_EVENT } from "@gooddata/sdk-ui-kit";
|
|
7
6
|
import { smoothingGenerator } from "./cd_smooth.js";
|
|
@@ -31,7 +30,7 @@ export function DragScroller({ className = "", children, smoother = smoothingGen
|
|
|
31
30
|
containerScrollHeightRef.current = getContainer() ? getContainer().scrollHeight : 0;
|
|
32
31
|
}, [getContainer]);
|
|
33
32
|
const dispatchScroll = useCallback((event) => {
|
|
34
|
-
// Ignore scroll event when just scrollable container size has changed. Chrome issue.
|
|
33
|
+
// Ignore scroll event when just scrollable container size has changed. Chrome issue.
|
|
35
34
|
const { scrollHeight } = getContainer();
|
|
36
35
|
if (scrollHeight !== containerScrollHeightRef.current) {
|
|
37
36
|
updateContainerRect();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Messages.d.ts","sourceRoot":"","sources":["../../src/components/Messages.tsx"],"names":[],"mappings":"AAcA,wBAAgB,QAAQ,
|
|
1
|
+
{"version":3,"file":"Messages.d.ts","sourceRoot":"","sources":["../../src/components/Messages.tsx"],"names":[],"mappings":"AAcA,wBAAgB,QAAQ,4CA2CvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
|
-
import { useCallback } from "react";
|
|
3
|
+
import { useCallback, useMemo } from "react";
|
|
4
4
|
import { useIntl } from "react-intl";
|
|
5
5
|
import { useDispatch, useSelector } from "react-redux";
|
|
6
6
|
import { NonContextToastsInterop } from "@gooddata/sdk-ui-kit";
|
|
@@ -13,15 +13,10 @@ export function Messages() {
|
|
|
13
13
|
const onDismissMessage = useCallback((messageId) => {
|
|
14
14
|
dispatch(hideMessage(messageId));
|
|
15
15
|
}, [dispatch]);
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
const formatted = intl.formatMessage({ id }, { ...values, b: bold });
|
|
21
|
-
return typeof formatted === "string" ? { text: formatted } : { text: "", node: formatted };
|
|
22
|
-
}
|
|
23
|
-
const localizedMessages = messages
|
|
24
|
-
.map((message) => ({ ...message, ...formatMessage(message) }))
|
|
16
|
+
// The toasts interop re-adds every message whose reference changed, so the messages keep their
|
|
17
|
+
// identity across the renders that do not change them.
|
|
18
|
+
const localizedMessages = useMemo(() => messages
|
|
19
|
+
.map((message) => ({ ...message, ...formatMessage(intl, message) }))
|
|
25
20
|
.map((message) => {
|
|
26
21
|
const errorDetails = message.errorDetails || undefined;
|
|
27
22
|
if (errorDetails) {
|
|
@@ -34,13 +29,20 @@ export function Messages() {
|
|
|
34
29
|
};
|
|
35
30
|
}
|
|
36
31
|
return message;
|
|
37
|
-
});
|
|
32
|
+
}), [messages, intl]);
|
|
38
33
|
return (_jsx(NonContextToastsInterop
|
|
39
34
|
// the runtime message shape matches the ui-kit toast contract; the repo model is wider
|
|
40
35
|
, {
|
|
41
36
|
// the runtime message shape matches the ui-kit toast contract; the repo model is wider
|
|
42
37
|
messages: localizedMessages, onDismissMessage: onDismissMessage }));
|
|
43
38
|
}
|
|
39
|
+
function formatMessage(intl, { text: id, values }) {
|
|
40
|
+
if (!id) {
|
|
41
|
+
return { text: "" };
|
|
42
|
+
}
|
|
43
|
+
const formatted = intl.formatMessage({ id }, { ...values, b: bold });
|
|
44
|
+
return typeof formatted === "string" ? { text: formatted } : { text: "", node: formatted };
|
|
45
|
+
}
|
|
44
46
|
function bold(chunks) {
|
|
45
47
|
return _jsx("strong", { children: chunks });
|
|
46
48
|
}
|
|
@@ -27,7 +27,7 @@ export function ReportTitle() {
|
|
|
27
27
|
};
|
|
28
28
|
const renderLockIcon = () => {
|
|
29
29
|
if (isReportLocked) {
|
|
30
|
-
//
|
|
30
|
+
// Inherited insights are locked and cannot be edited; we need to give slightly different tooltip.
|
|
31
31
|
return (_jsxs(BubbleHoverTrigger, { className: "gd-icon-lock-wrapper", showDelay: 0, hideDelay: 0, children: [_jsx("i", { className: "gd-icon-lock" }), _jsx(Bubble, { className: "bubble-primary", alignPoints: [{ align: "bc tl" }], children: _jsx(FormattedMessage, { id: defineMessage({ id: "inherited_report" }).id }) })] }));
|
|
32
32
|
}
|
|
33
33
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BucketIcon.d.ts","sourceRoot":"","sources":["../../../src/components/buckets/BucketIcon.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BucketIcon.d.ts","sourceRoot":"","sources":["../../../src/components/buckets/BucketIcon.tsx"],"names":[],"mappings":"AAUA,UAAU,gBAAgB;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CAoBpD"}
|