@gooddata/sdk-ui-dashboard 11.58.0-alpha.4 → 11.58.0-alpha.6
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/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/insight/insightWidgetDescription.d.ts +9 -0
- package/esm/_staging/insight/insightWidgetDescription.d.ts.map +1 -0
- package/esm/_staging/insight/insightWidgetDescription.js +12 -0
- package/esm/_staging/sharedHooks/useRichTextFilters.d.ts +4 -22
- package/esm/_staging/sharedHooks/useRichTextFilters.d.ts.map +1 -1
- package/esm/_staging/sharedHooks/useRichTextFilters.js +11 -15
- package/esm/_staging/sharedHooks/useRichTextInputs.d.ts +35 -0
- package/esm/_staging/sharedHooks/useRichTextInputs.d.ts.map +1 -0
- package/esm/_staging/sharedHooks/useRichTextInputs.js +37 -0
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/model/DashboardTester.d.ts.map +1 -1
- package/esm/model/DashboardTester.js +2 -4
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +21 -13
- package/esm/model/commandHandlers/parameters/dashboardParameterRoots.d.ts +20 -0
- package/esm/model/commandHandlers/parameters/dashboardParameterRoots.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/dashboardParameterRoots.js +61 -0
- package/esm/model/commandHandlers/parameters/loadParameterDependencies.d.ts +27 -0
- package/esm/model/commandHandlers/parameters/loadParameterDependencies.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/loadParameterDependencies.js +114 -0
- package/esm/model/commandHandlers/parameters/parameterDependenciesWorker.d.ts +6 -0
- package/esm/model/commandHandlers/parameters/parameterDependenciesWorker.d.ts.map +1 -0
- package/esm/model/commandHandlers/parameters/parameterDependenciesWorker.js +107 -0
- package/esm/model/react/useInitializeDashboardStore.d.ts.map +1 -1
- package/esm/model/react/useInitializeDashboardStore.js +2 -4
- package/esm/model/react/useTextParameters.d.ts +34 -0
- package/esm/model/react/useTextParameters.d.ts.map +1 -0
- package/esm/model/react/useTextParameters.js +68 -0
- package/esm/model/react/useWidgetExecConfig.d.ts.map +1 -1
- package/esm/model/react/useWidgetExecConfig.js +3 -2
- package/esm/model/store/catalog/catalogReducers.d.ts +8 -8
- package/esm/model/store/catalog/catalogReducers.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogReducers.js +25 -12
- package/esm/model/store/catalog/catalogSelectors.d.ts +8 -16
- package/esm/model/store/catalog/catalogSelectors.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogSelectors.js +7 -15
- package/esm/model/store/catalog/catalogState.d.ts +15 -30
- package/esm/model/store/catalog/catalogState.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogState.js +1 -2
- package/esm/model/store/catalog/index.d.ts +4 -4
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts +25 -9
- package/esm/model/store/tabs/parameters/parametersHelpers.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersHelpers.js +46 -13
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +9 -9
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +26 -22
- package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.d.ts.map +1 -1
- package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.js +7 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/DashboardLayoutSectionHeaderDescription.js +3 -10
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.d.ts.map +1 -1
- package/esm/presentation/flexibleLayout/DefaultDashboardLayoutRenderer/EditableHeader/SectionHeaderEditable.js +5 -10
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-419.localization-bundle.js +13 -8
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +10 -5
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +8 -3
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +18 -13
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +10 -5
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +9 -4
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +6 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
- package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +12 -7
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.js +3 -2
- package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.d.ts.map +1 -1
- package/esm/presentation/widget/description/ExportModeInsightWidgetDescription.js +4 -11
- package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.d.ts.map +1 -1
- package/esm/presentation/widget/description/InsightWidgetDescriptionTrigger.js +4 -9
- package/esm/presentation/widget/description/types.d.ts +3 -5
- package/esm/presentation/widget/description/types.d.ts.map +1 -1
- package/esm/presentation/widget/description/useInsightWidgetDescription.d.ts.map +1 -1
- package/esm/presentation/widget/description/useInsightWidgetDescription.js +2 -5
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/InsightDrillDialog.js +5 -10
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.d.ts +4 -3
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescription.js +5 -7
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescriptionConfig.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightDescriptionConfig/InsightDescriptionConfig.js +1 -3
- package/esm/presentation/widget/richText/EditModeDashboardRichText.d.ts.map +1 -1
- package/esm/presentation/widget/richText/EditModeDashboardRichText.js +5 -9
- package/esm/presentation/widget/richText/ViewModeDashboardRichText.d.ts.map +1 -1
- package/esm/presentation/widget/richText/ViewModeDashboardRichText.js +4 -10
- package/esm/sdk-ui-dashboard.d.ts +34 -60
- package/package.json +21 -21
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.d.ts +0 -45
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/filterParameterDependenciesWorker.js +0 -99
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.d.ts +0 -11
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/insightParameterDependenciesWorker.js +0 -71
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.d.ts +0 -22
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/loadFilterParameterDependencies.js +0 -39
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.d.ts +0 -21
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.d.ts.map +0 -1
- package/esm/model/commandHandlers/parameters/loadInsightParameterDependencies.js +0 -86
|
@@ -1316,25 +1316,18 @@ export declare const catalogActions: {
|
|
|
1316
1316
|
updateAttributeHierarchy: ActionCreatorWithPayload<ICatalogAttributeHierarchy, "catalog/updateAttributeHierarchy">;
|
|
1317
1317
|
deleteAttributeHierarchy: ActionCreatorWithPayload<ICatalogAttributeHierarchy, "catalog/deleteAttributeHierarchy">;
|
|
1318
1318
|
setCatalogParameters: ActionCreatorWithPayload<ICatalogParametersState, "catalog/setCatalogParameters">;
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1319
|
+
setCatalogParameterDependencies: ActionCreatorWithPayload<ICatalogParameterDependenciesState, "catalog/setCatalogParameterDependencies">;
|
|
1320
|
+
mergeCatalogParameterDependencies: ActionCreatorWithPayload<Record<string, IdentifierRef[]>, "catalog/mergeCatalogParameterDependencies">;
|
|
1321
|
+
markParameterDependenciesPending: ActionCreatorWithPayload<IdentifierRef[], "catalog/markParameterDependenciesPending">;
|
|
1322
|
+
markParameterDependenciesFailed: ActionCreatorWithPayload<IdentifierRef[], "catalog/markParameterDependenciesFailed">;
|
|
1323
1323
|
};
|
|
1324
1324
|
|
|
1325
1325
|
/**
|
|
1326
|
-
* Status of the dashboard-wide
|
|
1326
|
+
* Status of the dashboard-wide root → parameter dependency map.
|
|
1327
1327
|
*
|
|
1328
1328
|
* @alpha
|
|
1329
1329
|
*/
|
|
1330
|
-
export declare type
|
|
1331
|
-
|
|
1332
|
-
/**
|
|
1333
|
-
* Status of the dashboard-wide insight → parameter dependency map.
|
|
1334
|
-
*
|
|
1335
|
-
* @alpha
|
|
1336
|
-
*/
|
|
1337
|
-
export declare type CatalogInsightParametersStatus = "uninitialized" | "loading" | "loaded" | "failed";
|
|
1330
|
+
export declare type CatalogParameterDependenciesStatus = "uninitialized" | "loaded";
|
|
1338
1331
|
|
|
1339
1332
|
/**
|
|
1340
1333
|
* Status of catalog parameters loading.
|
|
@@ -1369,9 +1362,7 @@ export declare type CatalogState = {
|
|
|
1369
1362
|
/** @alpha */
|
|
1370
1363
|
parameters: ICatalogParametersState;
|
|
1371
1364
|
/** @alpha */
|
|
1372
|
-
|
|
1373
|
-
/** @alpha */
|
|
1374
|
-
filterParameters: ICatalogFilterParametersState;
|
|
1365
|
+
parameterDependencies: ICatalogParameterDependenciesState;
|
|
1375
1366
|
};
|
|
1376
1367
|
|
|
1377
1368
|
/**
|
|
@@ -8468,29 +8459,21 @@ export declare interface ICancelRenamingDashboardTabPayload {
|
|
|
8468
8459
|
}
|
|
8469
8460
|
|
|
8470
8461
|
/**
|
|
8471
|
-
* Maps each object a dashboard filter reads
|
|
8472
|
-
* of
|
|
8473
|
-
*
|
|
8474
|
-
*
|
|
8475
|
-
* filters, which are not part of its insight.
|
|
8476
|
-
*
|
|
8477
|
-
* @alpha
|
|
8478
|
-
*/
|
|
8479
|
-
export declare interface ICatalogFilterParametersState {
|
|
8480
|
-
status: CatalogFilterParametersStatus;
|
|
8481
|
-
byRef: Record<string, IdentifierRef[]>;
|
|
8482
|
-
}
|
|
8483
|
-
|
|
8484
|
-
/**
|
|
8485
|
-
* Maps each dashboard insight (keyed by `serializeObjRef(insightRef)`) to the parameter refs it
|
|
8486
|
-
* depends on through its metrics and computed attributes, as reported by the workspace references
|
|
8487
|
-
* service. Drives runtime parameter applicability for widget execution.
|
|
8462
|
+
* Maps each dependency root (an insight, a text reference, or an object a dashboard filter reads; keyed by
|
|
8463
|
+
* `serializeObjRef` of the ref exactly as the caller supplied it) to the parameter refs it depends
|
|
8464
|
+
* on through its metrics and computed attributes, as reported by the workspace references service.
|
|
8465
|
+
* Drives runtime parameter applicability for execution and for display.
|
|
8488
8466
|
*
|
|
8489
8467
|
* @alpha
|
|
8490
8468
|
*/
|
|
8491
|
-
export declare interface
|
|
8492
|
-
status:
|
|
8493
|
-
|
|
8469
|
+
export declare interface ICatalogParameterDependenciesState {
|
|
8470
|
+
status: CatalogParameterDependenciesStatus;
|
|
8471
|
+
byRoot: Record<string, IdentifierRef[]>;
|
|
8472
|
+
/**
|
|
8473
|
+
* Request status keyed by `serializeObjRef`. Successful loads clear the entry. Failed roots
|
|
8474
|
+
* are skipped until initialization or an insight update requests them again.
|
|
8475
|
+
*/
|
|
8476
|
+
requestedRoots: Record<string, "pending" | "failed">;
|
|
8494
8477
|
}
|
|
8495
8478
|
|
|
8496
8479
|
/**
|
|
@@ -27583,46 +27566,30 @@ export declare const selectCatalogDateDatasets: DashboardSelector<ICatalogDateDa
|
|
|
27583
27566
|
export declare const selectCatalogFacts: DashboardSelector<ICatalogFact[]>;
|
|
27584
27567
|
|
|
27585
27568
|
/**
|
|
27586
|
-
* Returns the dashboard-wide map from the serialized ref of an object a dashboard filter reads (a computed
|
|
27587
|
-
* attribute, a metric) to the parameter refs it depends on. Populated during dashboard initialization from
|
|
27588
|
-
* the workspace references service and extended when the filter context gains filters on other objects.
|
|
27589
|
-
*
|
|
27590
27569
|
* @alpha
|
|
27591
27570
|
*/
|
|
27592
|
-
export declare const
|
|
27571
|
+
export declare const selectCatalogIsLoaded: DashboardSelector<boolean>;
|
|
27593
27572
|
|
|
27594
27573
|
/**
|
|
27595
|
-
*
|
|
27596
|
-
*
|
|
27597
|
-
* @alpha
|
|
27574
|
+
* @public
|
|
27598
27575
|
*/
|
|
27599
|
-
export declare const
|
|
27576
|
+
export declare const selectCatalogMeasures: DashboardSelector<ICatalogMeasure[]>;
|
|
27600
27577
|
|
|
27601
27578
|
/**
|
|
27602
|
-
* Returns the dashboard-wide map from serialized
|
|
27579
|
+
* Returns the dashboard-wide map from serialized root ref to the parameter refs that root depends on.
|
|
27603
27580
|
* The map is populated during dashboard initialization from the workspace references service and extended
|
|
27604
|
-
* when insights
|
|
27581
|
+
* when insights, text references, or dashboard filters add roots later.
|
|
27605
27582
|
*
|
|
27606
27583
|
* @alpha
|
|
27607
27584
|
*/
|
|
27608
|
-
export declare const
|
|
27585
|
+
export declare const selectCatalogParameterDependencies: DashboardSelector<Record<string, IdentifierRef[]>>;
|
|
27609
27586
|
|
|
27610
27587
|
/**
|
|
27611
|
-
* Returns the load status of the dashboard-wide
|
|
27588
|
+
* Returns the load status of the dashboard-wide root → parameter dependency map.
|
|
27612
27589
|
*
|
|
27613
27590
|
* @alpha
|
|
27614
27591
|
*/
|
|
27615
|
-
export declare const
|
|
27616
|
-
|
|
27617
|
-
/**
|
|
27618
|
-
* @alpha
|
|
27619
|
-
*/
|
|
27620
|
-
export declare const selectCatalogIsLoaded: DashboardSelector<boolean>;
|
|
27621
|
-
|
|
27622
|
-
/**
|
|
27623
|
-
* @public
|
|
27624
|
-
*/
|
|
27625
|
-
export declare const selectCatalogMeasures: DashboardSelector<ICatalogMeasure[]>;
|
|
27592
|
+
export declare const selectCatalogParameterDependenciesStatus: DashboardSelector<CatalogParameterDependenciesStatus>;
|
|
27626
27593
|
|
|
27627
27594
|
/**
|
|
27628
27595
|
* Returns the workspace parameters loaded into the dashboard catalog.
|
|
@@ -27645,6 +27612,13 @@ export declare const selectCatalogParametersIsLoaded: DashboardSelector<boolean>
|
|
|
27645
27612
|
*/
|
|
27646
27613
|
export declare const selectCatalogParametersStatus: DashboardSelector<CatalogParametersStatus>;
|
|
27647
27614
|
|
|
27615
|
+
/**
|
|
27616
|
+
* Returns pending and failed dependency requests, keyed by serialized root ref.
|
|
27617
|
+
*
|
|
27618
|
+
* @alpha
|
|
27619
|
+
*/
|
|
27620
|
+
export declare const selectCatalogRequestedParameterRoots: DashboardSelector<Record<string, "pending" | "failed">>;
|
|
27621
|
+
|
|
27648
27622
|
/**
|
|
27649
27623
|
* Returns the color palette for dashboard charts.
|
|
27650
27624
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-dashboard",
|
|
3
|
-
"version": "11.58.0-alpha.
|
|
3
|
+
"version": "11.58.0-alpha.6",
|
|
4
4
|
"description": "GoodData SDK - Dashboard Component",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -60,20 +60,20 @@
|
|
|
60
60
|
"ts-invariant": "0.10.3",
|
|
61
61
|
"tslib": "2.8.1",
|
|
62
62
|
"uuid": "11.1.1",
|
|
63
|
-
"@gooddata/sdk-
|
|
64
|
-
"@gooddata/sdk-backend-
|
|
65
|
-
"@gooddata/sdk-model": "11.58.0-alpha.
|
|
66
|
-
"@gooddata/sdk-
|
|
67
|
-
"@gooddata/sdk-ui-charts": "11.58.0-alpha.
|
|
68
|
-
"@gooddata/sdk-ui-ext": "11.58.0-alpha.
|
|
69
|
-
"@gooddata/sdk-ui-filters": "11.58.0-alpha.
|
|
70
|
-
"@gooddata/sdk-ui-
|
|
71
|
-
"@gooddata/sdk-ui-
|
|
72
|
-
"@gooddata/sdk-ui-
|
|
73
|
-
"@gooddata/sdk-ui-
|
|
74
|
-
"@gooddata/sdk-ui-
|
|
75
|
-
"@gooddata/
|
|
76
|
-
"@gooddata/
|
|
63
|
+
"@gooddata/sdk-ui": "11.58.0-alpha.6",
|
|
64
|
+
"@gooddata/sdk-backend-base": "11.58.0-alpha.6",
|
|
65
|
+
"@gooddata/sdk-model": "11.58.0-alpha.6",
|
|
66
|
+
"@gooddata/sdk-backend-spi": "11.58.0-alpha.6",
|
|
67
|
+
"@gooddata/sdk-ui-charts": "11.58.0-alpha.6",
|
|
68
|
+
"@gooddata/sdk-ui-ext": "11.58.0-alpha.6",
|
|
69
|
+
"@gooddata/sdk-ui-filters": "11.58.0-alpha.6",
|
|
70
|
+
"@gooddata/sdk-ui-kit": "11.58.0-alpha.6",
|
|
71
|
+
"@gooddata/sdk-ui-geo": "11.58.0-alpha.6",
|
|
72
|
+
"@gooddata/sdk-ui-theme-provider": "11.58.0-alpha.6",
|
|
73
|
+
"@gooddata/sdk-ui-pivot": "11.58.0-alpha.6",
|
|
74
|
+
"@gooddata/sdk-ui-vis-commons": "11.58.0-alpha.6",
|
|
75
|
+
"@gooddata/util": "11.58.0-alpha.6",
|
|
76
|
+
"@gooddata/sdk-ui-semantic-search": "11.58.0-alpha.6"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@microsoft/api-documenter": "7.30.10",
|
|
@@ -115,12 +115,12 @@
|
|
|
115
115
|
"typescript": "7.0.2",
|
|
116
116
|
"vitest": "4.1.11",
|
|
117
117
|
"vitest-dom": "0.1.1",
|
|
118
|
-
"@gooddata/
|
|
119
|
-
"@gooddata/
|
|
120
|
-
"@gooddata/
|
|
121
|
-
"@gooddata/
|
|
122
|
-
"@gooddata/
|
|
123
|
-
"@gooddata/
|
|
118
|
+
"@gooddata/i18n-toolkit": "11.58.0-alpha.6",
|
|
119
|
+
"@gooddata/oxlint-config": "11.58.0-alpha.6",
|
|
120
|
+
"@gooddata/eslint-config": "11.58.0-alpha.6",
|
|
121
|
+
"@gooddata/stylelint-config": "11.58.0-alpha.6",
|
|
122
|
+
"@gooddata/reference-workspace": "11.58.0-alpha.6",
|
|
123
|
+
"@gooddata/sdk-backend-mockingbird": "11.58.0-alpha.6"
|
|
124
124
|
},
|
|
125
125
|
"peerDependencies": {
|
|
126
126
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { type SagaIterator } from "redux-saga";
|
|
2
|
-
import { type DashboardContext } from "../../types/commonTypes.js";
|
|
3
|
-
/**
|
|
4
|
-
* Keeps the dashboard-filter → parameter dependency map complete as the filter contexts change.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* Counterpart of {@link newInsightParameterDependenciesWorker} for dashboard filters. After any write
|
|
8
|
-
* to the tabs slice it collects the objects the current filters of every tab read and loads the ones
|
|
9
|
-
* the map does not know yet, so a widget picks up a parameter it now depends on through a filter added
|
|
10
|
-
* or changed after initialization (edit mode, an applied filter view, a new tab). Removing a filter
|
|
11
|
-
* needs nothing: the map is keyed by the object a filter reads, not by the filter, and a widget only
|
|
12
|
-
* consults the entries of the filters it currently has. A failed load leaves the map as it is, so the
|
|
13
|
-
* dependencies known so far stay in effect; the failed roots are not retried until the map is
|
|
14
|
-
* initialized again (a dashboard reload), so a filter on an object the graph rejects does not trigger a
|
|
15
|
-
* request on every later write.
|
|
16
|
-
*/
|
|
17
|
-
export declare function newFilterParameterDependenciesWorker(): (ctx: DashboardContext) => SagaIterator<void>;
|
|
18
|
-
/**
|
|
19
|
-
* The roots one store has already requested but that are not in the map: those in flight and those whose
|
|
20
|
-
* request failed. Neither is requested again until {@link IFilterParameterRootTracker.reset}, which also
|
|
21
|
-
* starts a new generation so that a request still in flight from before the reset is discarded on
|
|
22
|
-
* completion instead of writing into the freshly initialized map.
|
|
23
|
-
*
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
export interface IFilterParameterRootTracker {
|
|
27
|
-
pending: Set<string>;
|
|
28
|
-
failed: Set<string>;
|
|
29
|
-
generation: number;
|
|
30
|
-
reset(): void;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
export declare function newFilterParameterRootTracker(): IFilterParameterRootTracker;
|
|
36
|
-
/**
|
|
37
|
-
* Loads the dependencies of the filter roots the map does not know yet. A root is requested at most once
|
|
38
|
-
* between two initializations of the map: one in flight is skipped by the handlers that run meanwhile,
|
|
39
|
-
* and one the graph rejected (a deleted or forbidden object, typically) is remembered by the tracker
|
|
40
|
-
* rather than retried on every later write to the tabs slice. Only real results reach the map.
|
|
41
|
-
*
|
|
42
|
-
* @internal
|
|
43
|
-
*/
|
|
44
|
-
export declare function registerFilterParameterDependencies(ctx: DashboardContext, tracker: IFilterParameterRootTracker): SagaIterator<void>;
|
|
45
|
-
//# sourceMappingURL=filterParameterDependenciesWorker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filterParameterDependenciesWorker.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/parameters/filterParameterDependenciesWorker.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAa/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AASnE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oCAAoC,UACQ,gBAAgB,KAAG,YAAY,CAAC,IAAI,CAAC,CAShG;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,2BAA2B;IACxC,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACrB,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,IAAI,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,2BAA2B,CAa3E;AAED;;;;;;;GAOG;AACH,wBAAiB,mCAAmC,CAChD,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE,2BAA2B,GACrC,YAAY,CAAC,IAAI,CAAC,CAuCpB"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { call, put, select, takeEvery } from "redux-saga/effects";
|
|
3
|
-
import { serializeObjRef } from "@gooddata/sdk-model";
|
|
4
|
-
import { selectCatalogFilterParameters, selectCatalogFilterParametersStatus, } from "../../store/catalog/catalogSelectors.js";
|
|
5
|
-
import { catalogActions } from "../../store/catalog/index.js";
|
|
6
|
-
import { selectFiltersByTab } from "../../store/tabs/filterContext/filterContextSelectors.js";
|
|
7
|
-
import { tabsActions } from "../../store/tabs/index.js";
|
|
8
|
-
import { collectFilterParameterRoots } from "../../store/tabs/parameters/parametersHelpers.js";
|
|
9
|
-
import { unbatched } from "./insightParameterDependenciesWorker.js";
|
|
10
|
-
import { loadReachableParameterMap } from "./loadInsightParameterDependencies.js";
|
|
11
|
-
// every filter context write is a `tabs/*` action (the filter contexts live in the tabs slice)
|
|
12
|
-
const TABS_ACTION_PREFIX = `${tabsActions.setTabs.type.split("/")[0]}/`;
|
|
13
|
-
/**
|
|
14
|
-
* Keeps the dashboard-filter → parameter dependency map complete as the filter contexts change.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* Counterpart of {@link newInsightParameterDependenciesWorker} for dashboard filters. After any write
|
|
18
|
-
* to the tabs slice it collects the objects the current filters of every tab read and loads the ones
|
|
19
|
-
* the map does not know yet, so a widget picks up a parameter it now depends on through a filter added
|
|
20
|
-
* or changed after initialization (edit mode, an applied filter view, a new tab). Removing a filter
|
|
21
|
-
* needs nothing: the map is keyed by the object a filter reads, not by the filter, and a widget only
|
|
22
|
-
* consults the entries of the filters it currently has. A failed load leaves the map as it is, so the
|
|
23
|
-
* dependencies known so far stay in effect; the failed roots are not retried until the map is
|
|
24
|
-
* initialized again (a dashboard reload), so a filter on an object the graph rejects does not trigger a
|
|
25
|
-
* request on every later write.
|
|
26
|
-
*/
|
|
27
|
-
export function newFilterParameterDependenciesWorker() {
|
|
28
|
-
return function* filterParameterDependenciesWorker(ctx) {
|
|
29
|
-
const tracker = newFilterParameterRootTracker();
|
|
30
|
-
yield takeEvery(catalogActions.setCatalogFilterParameters.match, function onMapReset() {
|
|
31
|
-
tracker.reset();
|
|
32
|
-
});
|
|
33
|
-
yield takeEvery(writesTabs, function* onTabsWritten() {
|
|
34
|
-
yield call(registerFilterParameterDependencies, ctx, tracker);
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* @internal
|
|
40
|
-
*/
|
|
41
|
-
export function newFilterParameterRootTracker() {
|
|
42
|
-
const pending = new Set();
|
|
43
|
-
const failed = new Set();
|
|
44
|
-
return {
|
|
45
|
-
pending,
|
|
46
|
-
failed,
|
|
47
|
-
generation: 0,
|
|
48
|
-
reset() {
|
|
49
|
-
pending.clear();
|
|
50
|
-
failed.clear();
|
|
51
|
-
this.generation += 1;
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Loads the dependencies of the filter roots the map does not know yet. A root is requested at most once
|
|
57
|
-
* between two initializations of the map: one in flight is skipped by the handlers that run meanwhile,
|
|
58
|
-
* and one the graph rejected (a deleted or forbidden object, typically) is remembered by the tracker
|
|
59
|
-
* rather than retried on every later write to the tabs slice. Only real results reach the map.
|
|
60
|
-
*
|
|
61
|
-
* @internal
|
|
62
|
-
*/
|
|
63
|
-
export function* registerFilterParameterDependencies(ctx, tracker) {
|
|
64
|
-
const status = yield select(selectCatalogFilterParametersStatus);
|
|
65
|
-
if (status !== "loaded") {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const filtersByTab = yield select(selectFiltersByTab);
|
|
69
|
-
const known = yield select(selectCatalogFilterParameters);
|
|
70
|
-
const unknownRoots = collectFilterParameterRoots(Object.values(filtersByTab).flat()).filter((root) => {
|
|
71
|
-
const key = serializeObjRef(root);
|
|
72
|
-
return !(key in known) && !tracker.pending.has(key) && !tracker.failed.has(key);
|
|
73
|
-
});
|
|
74
|
-
if (unknownRoots.length === 0) {
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const keys = unknownRoots.map(serializeObjRef);
|
|
78
|
-
const generation = tracker.generation;
|
|
79
|
-
keys.forEach((key) => tracker.pending.add(key));
|
|
80
|
-
try {
|
|
81
|
-
const byRef = yield call(loadReachableParameterMap, ctx, unknownRoots);
|
|
82
|
-
if (tracker.generation === generation) {
|
|
83
|
-
yield put(catalogActions.mergeCatalogFilterParameters(byRef));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
if (tracker.generation === generation) {
|
|
88
|
-
keys.forEach((key) => tracker.failed.add(key));
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
finally {
|
|
92
|
-
if (tracker.generation === generation) {
|
|
93
|
-
keys.forEach((key) => tracker.pending.delete(key));
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
function writesTabs(action) {
|
|
98
|
-
return unbatched(action).some((item) => item.type.startsWith(TABS_ACTION_PREFIX));
|
|
99
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type Action } from "@reduxjs/toolkit";
|
|
2
|
-
import { type SagaIterator } from "redux-saga";
|
|
3
|
-
import { type DashboardContext } from "../../types/commonTypes.js";
|
|
4
|
-
export declare function newInsightParameterDependenciesWorker(): (ctx: DashboardContext) => SagaIterator<void>;
|
|
5
|
-
/**
|
|
6
|
-
* The plain actions an action stands for: itself, or the (recursively unbatched) members of a batch.
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export declare function unbatched(action: Action): Action[];
|
|
11
|
-
//# sourceMappingURL=insightParameterDependenciesWorker.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insightParameterDependenciesWorker.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/parameters/insightParameterDependenciesWorker.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAKnE,wBAAgB,qCAAqC,UACQ,gBAAgB,KAAG,YAAY,CAAC,IAAI,CAAC,CAKjG;AA4DD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAElD"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { call, put, select, takeEvery } from "redux-saga/effects";
|
|
3
|
-
import { insightRef, serializeObjRef } from "@gooddata/sdk-model";
|
|
4
|
-
import { selectCatalogInsightParameters, selectCatalogInsightParametersStatus, } from "../../store/catalog/catalogSelectors.js";
|
|
5
|
-
import { catalogActions } from "../../store/catalog/index.js";
|
|
6
|
-
import { insightsActions } from "../../store/insights/index.js";
|
|
7
|
-
import { loadInsightParameterDependencies } from "./loadInsightParameterDependencies.js";
|
|
8
|
-
export function newInsightParameterDependenciesWorker() {
|
|
9
|
-
return function* insightParameterDependenciesWorker(ctx) {
|
|
10
|
-
yield takeEvery(writesInsights, function* onInsightsWritten(action) {
|
|
11
|
-
yield call(registerInsightParameterDependencies, ctx, action);
|
|
12
|
-
});
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
function* registerInsightParameterDependencies(ctx, action) {
|
|
16
|
-
const status = yield select(selectCatalogInsightParametersStatus);
|
|
17
|
-
if (status !== "loaded") {
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
const known = yield select(selectCatalogInsightParameters);
|
|
21
|
-
const insights = [
|
|
22
|
-
...writtenInsights(action),
|
|
23
|
-
...replacedInsights(action).filter((insight) => !(serializeObjRef(insightRef(insight)) in known)),
|
|
24
|
-
];
|
|
25
|
-
if (insights.length === 0) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
const dependencies = yield call(loadInsightParameterDependencies, ctx, insights, true);
|
|
29
|
-
if (dependencies.status === "loaded") {
|
|
30
|
-
yield put(catalogActions.mergeCatalogInsightParameters(dependencies.byInsight));
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
function writesInsights(action) {
|
|
34
|
-
return writtenInsights(action).length > 0 || replacedInsights(action).length > 0;
|
|
35
|
-
}
|
|
36
|
-
function writtenInsights(action) {
|
|
37
|
-
return unbatched(action).flatMap(writtenInsightsOf);
|
|
38
|
-
}
|
|
39
|
-
function writtenInsightsOf(action) {
|
|
40
|
-
if (insightsActions.addInsights.match(action)) {
|
|
41
|
-
return entityPayloadInsights(action.payload);
|
|
42
|
-
}
|
|
43
|
-
if (insightsActions.upsertInsight.match(action)) {
|
|
44
|
-
return [action.payload];
|
|
45
|
-
}
|
|
46
|
-
return [];
|
|
47
|
-
}
|
|
48
|
-
function replacedInsights(action) {
|
|
49
|
-
return unbatched(action).flatMap(replacedInsightsOf);
|
|
50
|
-
}
|
|
51
|
-
function replacedInsightsOf(action) {
|
|
52
|
-
return insightsActions.setInsights.match(action) ? entityPayloadInsights(action.payload) : [];
|
|
53
|
-
}
|
|
54
|
-
function entityPayloadInsights(payload) {
|
|
55
|
-
return Array.isArray(payload) ? [...payload] : Object.values(payload);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* The plain actions an action stands for: itself, or the (recursively unbatched) members of a batch.
|
|
59
|
-
*
|
|
60
|
-
* @internal
|
|
61
|
-
*/
|
|
62
|
-
export function unbatched(action) {
|
|
63
|
-
return isBatchAction(action) ? action.payload.flatMap(unbatched) : [action];
|
|
64
|
-
}
|
|
65
|
-
function isBatchAction(action) {
|
|
66
|
-
return ("meta" in action &&
|
|
67
|
-
typeof action.meta === "object" &&
|
|
68
|
-
action.meta !== null &&
|
|
69
|
-
"batch" in action.meta &&
|
|
70
|
-
action.meta.batch === true);
|
|
71
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type FilterContextItem, type IDashboard } from "@gooddata/sdk-model";
|
|
2
|
-
import { type ICatalogFilterParametersState } from "../../store/catalog/catalogState.js";
|
|
3
|
-
import { type DashboardContext } from "../../types/commonTypes.js";
|
|
4
|
-
/**
|
|
5
|
-
* Loads the dashboard-wide dashboard-filter → parameter dependency map from the workspace references
|
|
6
|
-
* service.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* A dashboard filter is not part of any insight, so the insight-rooted map cannot see the parameters a
|
|
10
|
-
* widget depends on through it. The roots are the objects the filters read (see
|
|
11
|
-
* {@link collectFilterParameterRoots}); they go to the service in the same single `direction: "down"`
|
|
12
|
-
* request shape as the insight roots, and the map is keyed by `serializeObjRef(root)`. Disabled
|
|
13
|
-
* parameters return `uninitialized`; backend errors return `failed`.
|
|
14
|
-
*/
|
|
15
|
-
export declare function loadFilterParameterDependencies(ctx: DashboardContext, filters: ReadonlyArray<FilterContextItem>, enableParameters: boolean): Promise<ICatalogFilterParametersState>;
|
|
16
|
-
/**
|
|
17
|
-
* Every dashboard filter of the dashboard being initialized: the filters of each tab plus those of the root
|
|
18
|
-
* filter context. The root context is the single tab of a dashboard without tabs, and the tab state keeps
|
|
19
|
-
* it as a default tab even when tabs exist, so it is always included; roots are deduped downstream.
|
|
20
|
-
*/
|
|
21
|
-
export declare function collectDashboardFilterContextItems(dashboard: IDashboard): FilterContextItem[];
|
|
22
|
-
//# sourceMappingURL=loadFilterParameterDependencies.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loadFilterParameterDependencies.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/parameters/loadFilterParameterDependencies.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,KAAK,6BAA6B,EAAE,MAAM,qCAAqC,CAAC;AAEzF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAInE;;;;;;;;;;GAUG;AACH,wBAAsB,+BAA+B,CACjD,GAAG,EAAE,gBAAgB,EACrB,OAAO,EAAE,aAAa,CAAC,iBAAiB,CAAC,EACzC,gBAAgB,EAAE,OAAO,GAC1B,OAAO,CAAC,6BAA6B,CAAC,CAgBxC;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,UAAU,GAAG,iBAAiB,EAAE,CAG7F"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { collectFilterParameterRoots } from "../../store/tabs/parameters/parametersHelpers.js";
|
|
3
|
-
import { loadReachableParameterMap } from "./loadInsightParameterDependencies.js";
|
|
4
|
-
/**
|
|
5
|
-
* Loads the dashboard-wide dashboard-filter → parameter dependency map from the workspace references
|
|
6
|
-
* service.
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* A dashboard filter is not part of any insight, so the insight-rooted map cannot see the parameters a
|
|
10
|
-
* widget depends on through it. The roots are the objects the filters read (see
|
|
11
|
-
* {@link collectFilterParameterRoots}); they go to the service in the same single `direction: "down"`
|
|
12
|
-
* request shape as the insight roots, and the map is keyed by `serializeObjRef(root)`. Disabled
|
|
13
|
-
* parameters return `uninitialized`; backend errors return `failed`.
|
|
14
|
-
*/
|
|
15
|
-
export async function loadFilterParameterDependencies(ctx, filters, enableParameters) {
|
|
16
|
-
if (!enableParameters) {
|
|
17
|
-
return { status: "uninitialized", byRef: {} };
|
|
18
|
-
}
|
|
19
|
-
const roots = collectFilterParameterRoots(filters);
|
|
20
|
-
if (roots.length === 0) {
|
|
21
|
-
return { status: "loaded", byRef: {} };
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
const byRef = await loadReachableParameterMap(ctx, roots);
|
|
25
|
-
return { status: "loaded", byRef };
|
|
26
|
-
}
|
|
27
|
-
catch {
|
|
28
|
-
return { status: "failed", byRef: {} };
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Every dashboard filter of the dashboard being initialized: the filters of each tab plus those of the root
|
|
33
|
-
* filter context. The root context is the single tab of a dashboard without tabs, and the tab state keeps
|
|
34
|
-
* it as a default tab even when tabs exist, so it is always included; roots are deduped downstream.
|
|
35
|
-
*/
|
|
36
|
-
export function collectDashboardFilterContextItems(dashboard) {
|
|
37
|
-
const tabFilters = (dashboard.tabs ?? []).flatMap((tab) => tab.filterContext?.filters ?? []);
|
|
38
|
-
return [...tabFilters, ...(dashboard.filterContext?.filters ?? [])];
|
|
39
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { type IInsight, type IdentifierRef } from "@gooddata/sdk-model";
|
|
2
|
-
import { type ICatalogInsightParametersState } from "../../store/catalog/catalogState.js";
|
|
3
|
-
import { type DashboardContext } from "../../types/commonTypes.js";
|
|
4
|
-
/**
|
|
5
|
-
* Loads the dashboard-wide insight -> parameter dependency map from the workspace references service.
|
|
6
|
-
*
|
|
7
|
-
* @remarks
|
|
8
|
-
* Walks the dependency graph in `direction: "down"` from each insight, then collects the parameter
|
|
9
|
-
* nodes reachable from it through metrics and computed attributes. Disabled parameters return
|
|
10
|
-
* `uninitialized`; backend errors return `failed`.
|
|
11
|
-
*/
|
|
12
|
-
export declare function loadInsightParameterDependencies(ctx: DashboardContext, insights: IInsight[], enableParameters: boolean): Promise<ICatalogInsightParametersState>;
|
|
13
|
-
/**
|
|
14
|
-
* Asks the workspace references service for the dependency graph below `roots` (one request for all of
|
|
15
|
-
* them) and maps each root (keyed by `serializeObjRef`) to the parameter refs reachable from it. Throws
|
|
16
|
-
* when the service does; the caller decides how that degrades.
|
|
17
|
-
*
|
|
18
|
-
* @internal
|
|
19
|
-
*/
|
|
20
|
-
export declare function loadReachableParameterMap(ctx: DashboardContext, roots: IdentifierRef[]): Promise<Record<string, IdentifierRef[]>>;
|
|
21
|
-
//# sourceMappingURL=loadInsightParameterDependencies.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loadInsightParameterDependencies.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/parameters/loadInsightParameterDependencies.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,aAAa,EAIrB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAC1F,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE;;;;;;;GAOG;AACH,wBAAsB,gCAAgC,CAClD,GAAG,EAAE,gBAAgB,EACrB,QAAQ,EAAE,QAAQ,EAAE,EACpB,gBAAgB,EAAE,OAAO,GAC1B,OAAO,CAAC,8BAA8B,CAAC,CAgBzC;AAED;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC3C,GAAG,EAAE,gBAAgB,EACrB,KAAK,EAAE,aAAa,EAAE,GACvB,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,EAAE,CAAC,CAAC,CAO1C"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
// (C) 2026 GoodData Corporation
|
|
2
|
-
import { insightRef, isIdentifierRef, serializeObjRef, } from "@gooddata/sdk-model";
|
|
3
|
-
/**
|
|
4
|
-
* Loads the dashboard-wide insight -> parameter dependency map from the workspace references service.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* Walks the dependency graph in `direction: "down"` from each insight, then collects the parameter
|
|
8
|
-
* nodes reachable from it through metrics and computed attributes. Disabled parameters return
|
|
9
|
-
* `uninitialized`; backend errors return `failed`.
|
|
10
|
-
*/
|
|
11
|
-
export async function loadInsightParameterDependencies(ctx, insights, enableParameters) {
|
|
12
|
-
if (!enableParameters) {
|
|
13
|
-
return { status: "uninitialized", byInsight: {} };
|
|
14
|
-
}
|
|
15
|
-
const roots = insights.map(insightRef).filter(isIdentifierRef);
|
|
16
|
-
if (roots.length === 0) {
|
|
17
|
-
return { status: "loaded", byInsight: {} };
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
const byInsight = await loadReachableParameterMap(ctx, roots);
|
|
21
|
-
return { status: "loaded", byInsight };
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
return { status: "failed", byInsight: {} };
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Asks the workspace references service for the dependency graph below `roots` (one request for all of
|
|
29
|
-
* them) and maps each root (keyed by `serializeObjRef`) to the parameter refs reachable from it. Throws
|
|
30
|
-
* when the service does; the caller decides how that degrades.
|
|
31
|
-
*
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
export async function loadReachableParameterMap(ctx, roots) {
|
|
35
|
-
const result = await ctx.backend
|
|
36
|
-
.workspace(ctx.workspace)
|
|
37
|
-
.references()
|
|
38
|
-
.getReferences(roots, { direction: "down" });
|
|
39
|
-
return buildReachableParameterMap(roots, result.edges);
|
|
40
|
-
}
|
|
41
|
-
function buildReachableParameterMap(roots, edges) {
|
|
42
|
-
const adjacency = buildAdjacency(edges);
|
|
43
|
-
const result = {};
|
|
44
|
-
for (const root of roots) {
|
|
45
|
-
result[serializeObjRef(root)] = reachableParameterRefs(graphInsightRef(root), adjacency);
|
|
46
|
-
}
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
function graphInsightRef(root) {
|
|
50
|
-
return root.type ? root : { ...root, type: "insight" };
|
|
51
|
-
}
|
|
52
|
-
function buildAdjacency(edges) {
|
|
53
|
-
const adjacency = new Map();
|
|
54
|
-
for (const edge of edges) {
|
|
55
|
-
const fromKey = serializeObjRef(edge.from);
|
|
56
|
-
const neighbors = adjacency.get(fromKey);
|
|
57
|
-
if (neighbors) {
|
|
58
|
-
neighbors.push(edge.to);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
adjacency.set(fromKey, [edge.to]);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
return adjacency;
|
|
65
|
-
}
|
|
66
|
-
function reachableParameterRefs(start, adjacency) {
|
|
67
|
-
const parameters = [];
|
|
68
|
-
const visited = new Set([serializeObjRef(start)]);
|
|
69
|
-
const queue = [start];
|
|
70
|
-
for (let i = 0; i < queue.length; i++) {
|
|
71
|
-
for (const neighbor of adjacency.get(serializeObjRef(queue[i])) ?? []) {
|
|
72
|
-
const key = serializeObjRef(neighbor);
|
|
73
|
-
if (visited.has(key)) {
|
|
74
|
-
continue;
|
|
75
|
-
}
|
|
76
|
-
visited.add(key);
|
|
77
|
-
if (neighbor.type === "parameter") {
|
|
78
|
-
parameters.push(neighbor);
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
queue.push(neighbor);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
return parameters;
|
|
86
|
-
}
|