@gooddata/sdk-ui-dashboard 11.60.0-alpha.2 → 11.60.0-alpha.3

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.
Files changed (124) hide show
  1. package/esm/__version.d.ts +1 -1
  2. package/esm/__version.js +1 -1
  3. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts +1 -1
  4. package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
  5. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
  6. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +11 -3
  7. package/esm/model/commandHandlers/scheduledEmail/loadAutomations.d.ts +8 -1
  8. package/esm/model/commandHandlers/scheduledEmail/loadAutomations.d.ts.map +1 -1
  9. package/esm/model/commandHandlers/scheduledEmail/loadAutomations.js +3 -2
  10. package/esm/model/commandHandlers/scheduledEmail/refreshAutomationsHandlers.d.ts.map +1 -1
  11. package/esm/model/commandHandlers/scheduledEmail/refreshAutomationsHandlers.js +9 -2
  12. package/esm/model/store/dashboardStore.d.ts +2 -2
  13. package/esm/model/store/unavailableObjects/index.d.ts +1 -1
  14. package/esm/model/store/unavailableObjects/unavailableObjectsEntityAdapter.d.ts +1 -2
  15. package/esm/model/store/unavailableObjects/unavailableObjectsEntityAdapter.d.ts.map +1 -1
  16. package/esm/model/store/widgetDrills/drillRestrictionSelectors.d.ts +3 -3
  17. package/esm/model/store/widgetDrills/drillRestrictionSelectors.d.ts.map +1 -1
  18. package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts +36 -2
  19. package/esm/model/store/widgetDrills/widgetDrillSelectors.d.ts.map +1 -1
  20. package/esm/model/store/widgetDrills/widgetDrillSelectors.js +46 -6
  21. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts +1 -1
  22. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.d.ts.map +1 -1
  23. package/esm/presentation/drill/DrillSelect/DrillSelectDropdown.js +36 -29
  24. package/esm/presentation/drill/DrillSelect/WithDrillSelect.d.ts.map +1 -1
  25. package/esm/presentation/drill/DrillSelect/WithDrillSelect.js +34 -7
  26. package/esm/presentation/drill/DrillSelect/types.d.ts +15 -2
  27. package/esm/presentation/drill/DrillSelect/types.d.ts.map +1 -1
  28. package/esm/presentation/drill/DrillSelect/types.js +3 -0
  29. package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.d.ts +0 -1
  30. package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.d.ts.map +1 -1
  31. package/esm/presentation/drill/hooks/useDrillSelectDropdownMenuItems.js +28 -22
  32. package/esm/presentation/export/useExportData.d.ts +5 -0
  33. package/esm/presentation/export/useExportData.d.ts.map +1 -1
  34. package/esm/presentation/export/useExportData.js +8 -0
  35. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts +2 -0
  36. package/esm/presentation/localization/bundles/de-DE.localization-bundle.d.ts.map +1 -1
  37. package/esm/presentation/localization/bundles/de-DE.localization-bundle.js +2 -0
  38. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts +2 -0
  39. package/esm/presentation/localization/bundles/en-AU.localization-bundle.d.ts.map +1 -1
  40. package/esm/presentation/localization/bundles/en-AU.localization-bundle.js +2 -0
  41. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts +2 -0
  42. package/esm/presentation/localization/bundles/en-GB.localization-bundle.d.ts.map +1 -1
  43. package/esm/presentation/localization/bundles/en-GB.localization-bundle.js +2 -0
  44. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts +2 -0
  45. package/esm/presentation/localization/bundles/es-419.localization-bundle.d.ts.map +1 -1
  46. package/esm/presentation/localization/bundles/es-419.localization-bundle.js +2 -0
  47. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts +2 -0
  48. package/esm/presentation/localization/bundles/es-ES.localization-bundle.d.ts.map +1 -1
  49. package/esm/presentation/localization/bundles/es-ES.localization-bundle.js +2 -0
  50. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts +2 -0
  51. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.d.ts.map +1 -1
  52. package/esm/presentation/localization/bundles/fi-FI.localization-bundle.js +2 -0
  53. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts +2 -0
  54. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.d.ts.map +1 -1
  55. package/esm/presentation/localization/bundles/fr-CA.localization-bundle.js +2 -0
  56. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts +2 -0
  57. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.d.ts.map +1 -1
  58. package/esm/presentation/localization/bundles/fr-FR.localization-bundle.js +2 -0
  59. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts +2 -0
  60. package/esm/presentation/localization/bundles/id-ID.localization-bundle.d.ts.map +1 -1
  61. package/esm/presentation/localization/bundles/id-ID.localization-bundle.js +2 -0
  62. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts +2 -0
  63. package/esm/presentation/localization/bundles/it-IT.localization-bundle.d.ts.map +1 -1
  64. package/esm/presentation/localization/bundles/it-IT.localization-bundle.js +2 -0
  65. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts +2 -0
  66. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.d.ts.map +1 -1
  67. package/esm/presentation/localization/bundles/ja-JP.localization-bundle.js +2 -0
  68. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts +2 -0
  69. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.d.ts.map +1 -1
  70. package/esm/presentation/localization/bundles/ko-KR.localization-bundle.js +2 -0
  71. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts +2 -0
  72. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.d.ts.map +1 -1
  73. package/esm/presentation/localization/bundles/nl-NL.localization-bundle.js +2 -0
  74. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts +2 -0
  75. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.d.ts.map +1 -1
  76. package/esm/presentation/localization/bundles/pl-PL.localization-bundle.js +2 -0
  77. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts +2 -0
  78. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.d.ts.map +1 -1
  79. package/esm/presentation/localization/bundles/pt-BR.localization-bundle.js +2 -0
  80. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts +2 -0
  81. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.d.ts.map +1 -1
  82. package/esm/presentation/localization/bundles/pt-PT.localization-bundle.js +2 -0
  83. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts +2 -0
  84. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.d.ts.map +1 -1
  85. package/esm/presentation/localization/bundles/ru-RU.localization-bundle.js +2 -0
  86. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts +2 -0
  87. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.d.ts.map +1 -1
  88. package/esm/presentation/localization/bundles/sl-SI.localization-bundle.js +2 -0
  89. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts +2 -0
  90. package/esm/presentation/localization/bundles/th-TH.localization-bundle.d.ts.map +1 -1
  91. package/esm/presentation/localization/bundles/th-TH.localization-bundle.js +2 -0
  92. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts +2 -0
  93. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.d.ts.map +1 -1
  94. package/esm/presentation/localization/bundles/tr-TR.localization-bundle.js +2 -0
  95. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts +2 -0
  96. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.d.ts.map +1 -1
  97. package/esm/presentation/localization/bundles/uk-UA.localization-bundle.js +2 -0
  98. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts +2 -0
  99. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.d.ts.map +1 -1
  100. package/esm/presentation/localization/bundles/vi-VN.localization-bundle.js +2 -0
  101. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts +2 -0
  102. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.d.ts.map +1 -1
  103. package/esm/presentation/localization/bundles/zh-HK.localization-bundle.js +5 -3
  104. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts +2 -0
  105. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.d.ts.map +1 -1
  106. package/esm/presentation/localization/bundles/zh-Hans.localization-bundle.js +2 -0
  107. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts +2 -0
  108. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.d.ts.map +1 -1
  109. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +2 -0
  110. package/esm/presentation/widget/common/RestrictedPlaceholder.d.ts.map +1 -1
  111. package/esm/presentation/widget/common/RestrictedPlaceholder.js +2 -1
  112. package/esm/presentation/widget/common/useResolveRestrictedRender.d.ts +8 -0
  113. package/esm/presentation/widget/common/useResolveRestrictedRender.d.ts.map +1 -0
  114. package/esm/presentation/widget/common/useResolveRestrictedRender.js +19 -0
  115. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/useDrillDialogInsightDrills.d.ts.map +1 -1
  116. package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/useDrillDialogInsightDrills.js +1 -1
  117. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcherRestricted.d.ts.map +1 -1
  118. package/esm/presentation/widget/visualizationSwitcher/ViewModeDashboardVisualizationSwitcherRestricted.js +5 -1
  119. package/esm/presentation/widget/widget/InsightWidget/DashboardWidgetInsightGuard.d.ts.map +1 -1
  120. package/esm/presentation/widget/widget/InsightWidget/DashboardWidgetInsightGuard.js +2 -0
  121. package/esm/sdk-ui-dashboard.d.ts +1 -1
  122. package/package.json +21 -21
  123. package/styles/css/main.css +26 -10
  124. package/styles/css/main.css.map +1 -1
@@ -1,4 +1,4 @@
1
- export declare const LIB_VERSION = "11.60.0-alpha.2";
1
+ export declare const LIB_VERSION = "11.60.0-alpha.3";
2
2
  export declare const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
3
3
  export declare const LIB_NAME = "@gooddata/sdk-ui-dashboard";
4
4
  //# sourceMappingURL=__version.d.ts.map
package/esm/__version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // (C) 2021 GoodData Corporation
2
2
  // DO NOT CHANGE THIS FILE, IT IS RE-GENERATED ON EVERY BUILD
3
- export const LIB_VERSION = "11.60.0-alpha.2";
3
+ export const LIB_VERSION = "11.60.0-alpha.3";
4
4
  export const LIB_DESCRIPTION = "GoodData SDK - Dashboard Component";
5
5
  export const LIB_NAME = "@gooddata/sdk-ui-dashboard";
@@ -10,7 +10,7 @@ export declare function requestCatalog(ctx: DashboardContext, cmd: InitializeDas
10
10
  export declare function preloadAttributeFiltersData(ctx: DashboardContext, dashboard: IDashboard): Generator<import("redux-saga/effects").CallEffect<import("@gooddata/sdk-backend-spi").IAttributeWithReferences[]> | import("redux-saga/effects").PutEffect<{
11
11
  payload: import("@gooddata/sdk-backend-spi").IAttributeWithReferences[];
12
12
  type: "tabs/setPreloadedAttributesWithReferences";
13
- }> | import("redux-saga/effects").SelectEffect, void, import("@gooddata/sdk-backend-spi").IUnavailableDashboardReference[] & import("@gooddata/sdk-backend-spi").IAttributeWithReferences[]>;
13
+ }> | import("redux-saga/effects").SelectEffect, void, import("@gooddata/sdk-model").IUnavailableReference[] & import("@gooddata/sdk-backend-spi").IAttributeWithReferences[]>;
14
14
  export declare function requestDashboardsList(ctx: DashboardContext): Generator<import("redux-saga/effects").CallEffect<import("@gooddata/sdk-model").IListedDashboard[]> | import("redux-saga/effects").PutEffect<BatchAction>, void, import("@gooddata/sdk-model").IListedDashboard[]>;
15
15
  export declare function initializeDashboardHandler(ctx: DashboardContext, cmd: InitializeDashboard): SagaIterator;
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACH,KAAK,UAAU,EAIf,KAAK,sBAAsB,EAW9B,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAyB1E,OAAO,EACH,KAAK,gBAAgB,EAGxB,MAAM,+BAA+B,CAAC;AAmfvC,wBAAiB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB;;;uIAyB9E;AAkCD,wBAAiB,2BAA2B,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU;;;6LAOxF;AAED,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,sNAW3D;AAoCD,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB,GAAG,YAAY,CAoCzG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/model/commandHandlers/dashboard/initializeDashboardHandler/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,WAAW,EAAgB,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/C,OAAO,EACH,KAAK,UAAU,EAIf,KAAK,sBAAsB,EAW9B,MAAM,qBAAqB,CAAC;AAO7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAyB1E,OAAO,EACH,KAAK,gBAAgB,EAGxB,MAAM,+BAA+B,CAAC;AAmfvC,wBAAiB,cAAc,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB;;;uIAyB9E;AAkCD,wBAAiB,2BAA2B,CAAC,GAAG,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU;;;8KAOxF;AAED,wBAAiB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,sNAW3D;AAoCD,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB,GAAG,YAAY,CAoCzG"}
@@ -1 +1 @@
1
- {"version":3,"file":"initializeAutomationsHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAgD/C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAuC/E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAWnE,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,sBAAsB,GAC7B,YAAY,CA0Sd"}
1
+ {"version":3,"file":"initializeAutomationsHandler.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAiD/C,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAwC/E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAWnE,wBAAiB,4BAA4B,CACzC,GAAG,EAAE,gBAAgB,EACrB,IAAI,EAAE,sBAAsB,GAC7B,YAAY,CA4Sd"}
@@ -5,6 +5,7 @@ import { all, call, put, select } from "redux-saga/effects";
5
5
  import { generateDateFilterLocalIdentifier } from "@gooddata/sdk-backend-base";
6
6
  import { dashboardFilterLocalIdentifier, filterLocalIdentifier, filterObjRef, idRef, insightFilters, isAbsoluteDateFilter, isAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDateFilter, isExportDefinitionDashboardRequestPayload, isExportDefinitionVisualizationObjectRequestPayload, isFilterContextItem, isInsightWidget, isMeasureValueFilter, isRankingFilter, isRelativeDateFilter, isSingleSelectionFilter, } from "@gooddata/sdk-model";
7
7
  import { convertError } from "@gooddata/sdk-ui";
8
+ import { isAutomationRestricted } from "@gooddata/sdk-ui-ext";
8
9
  import { getAutomationAlertParameters, getAutomationExportParametersByTab, } from "../../../_staging/automation/index.js";
9
10
  import { dashboardFilterToFilterContextItem } from "../../../_staging/dashboard/dashboardFilterContext.js";
10
11
  import { isDashboardFilter } from "../../../types.js";
@@ -15,7 +16,7 @@ import { dispatchDashboardEvent } from "../../store/_infra/eventDispatcher.js";
15
16
  import { selectAutomationsIsInitialized, selectAutomationsIsLoading, } from "../../store/automations/automationsSelectors.js";
16
17
  import { automationsActions } from "../../store/automations/index.js";
17
18
  import { selectCatalogParameters, selectCatalogParametersIsLoaded, } from "../../store/catalog/catalogSelectors.js";
18
- import { selectEnableNotificationChannelIdentifiers, selectEnableParameters, selectEnableStringParameters, selectExternalRecipient, selectFocusObject, selectIsExport, selectIsReadOnly, selectOpenAutomationOnLoad, } from "../../store/config/configSelectors.js";
19
+ import { selectEnableDashboardPartialRendering, selectEnableNotificationChannelIdentifiers, selectEnableParameters, selectEnableStringParameters, selectExternalRecipient, selectFocusObject, selectIsExport, selectIsReadOnly, selectOpenAutomationOnLoad, } from "../../store/config/configSelectors.js";
19
20
  import { selectInsightByWidgetRef } from "../../store/insights/insightsSelectors.js";
20
21
  import { selectDashboardId } from "../../store/meta/metaSelectors.js";
21
22
  import { notificationChannelsActions } from "../../store/notificationChannels/index.js";
@@ -47,6 +48,7 @@ export function* initializeAutomationsHandler(ctx, _cmd) {
47
48
  const { automationId } = yield select(selectFocusObject);
48
49
  const externalRecipient = yield select(selectExternalRecipient);
49
50
  const openAutomationOnLoad = yield select(selectOpenAutomationOnLoad);
51
+ const isPartialRenderingEnabled = yield select(selectEnableDashboardPartialRendering);
50
52
  if (!dashboardId ||
51
53
  !user ||
52
54
  automationsInitialized ||
@@ -59,7 +61,13 @@ export function* initializeAutomationsHandler(ctx, _cmd) {
59
61
  yield put(automationsActions.setAutomationsLoading(true));
60
62
  try {
61
63
  const [automations, allAutomationsCount, notificationChannels] = yield all([
62
- call(loadDashboardUserAutomations, ctx, dashboardId, user.login, !canManageAutomations, externalRecipient),
64
+ call(loadDashboardUserAutomations, ctx, {
65
+ dashboardId,
66
+ userId: user.login,
67
+ filterByUser: !canManageAutomations,
68
+ externalRecipient,
69
+ includeUnavailableReferences: isPartialRenderingEnabled,
70
+ }),
63
71
  call(loadWorkspaceAutomationsCount, ctx),
64
72
  call(loadNotificationChannels, ctx, enableNotificationChannelIdentifiers),
65
73
  ]);
@@ -178,7 +186,7 @@ export function* initializeAutomationsHandler(ctx, _cmd) {
178
186
  for (const change of parameterChanges) {
179
187
  yield call(changeParameterValuesHandler, ctx, changeParameterValues(change));
180
188
  }
181
- if (targetAutomation && openAutomationOnLoad) {
189
+ if (targetAutomation && openAutomationOnLoad && !isAutomationRestricted(targetAutomation)) {
182
190
  const widgetRef = targetWidget && idRef(targetWidget);
183
191
  if (targetAutomation.alert) {
184
192
  yield put(uiActions.openAlertingDialog({
@@ -1,5 +1,12 @@
1
1
  import { type IAutomationMetadataObject } from "@gooddata/sdk-model";
2
2
  import { type DashboardContext } from "../../types/commonTypes.js";
3
3
  export declare function loadWorkspaceAutomationsCount({ backend, workspace, }: DashboardContext): Promise<number>;
4
- export declare function loadDashboardUserAutomations(ctx: DashboardContext, dashboardId: string, userId: string, filterByUser: boolean, externalRecipient: string | undefined): Promise<IAutomationMetadataObject[]>;
4
+ export interface ILoadDashboardUserAutomationsOptions {
5
+ dashboardId: string;
6
+ userId: string;
7
+ filterByUser: boolean;
8
+ externalRecipient: string | undefined;
9
+ includeUnavailableReferences: boolean;
10
+ }
11
+ export declare function loadDashboardUserAutomations(ctx: DashboardContext, { dashboardId, userId, filterByUser, externalRecipient, includeUnavailableReferences, }: ILoadDashboardUserAutomationsOptions): Promise<IAutomationMetadataObject[]>;
5
12
  //# sourceMappingURL=loadAutomations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loadAutomations.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/loadAutomations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,wBAAsB,6BAA6B,CAAC,EAChD,OAAO,EACP,SAAS,GACZ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAIpC;AAED,wBAAgB,4BAA4B,CACxC,GAAG,EAAE,gBAAgB,EACrB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,OAAO,EACrB,iBAAiB,EAAE,MAAM,GAAG,SAAS,GACtC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAkBtC"}
1
+ {"version":3,"file":"loadAutomations.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/loadAutomations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAErE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,wBAAsB,6BAA6B,CAAC,EAChD,OAAO,EACP,SAAS,GACZ,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAIpC;AAED,MAAM,WAAW,oCAAoC;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,4BAA4B,EAAE,OAAO,CAAC;CACzC;AAED,wBAAgB,4BAA4B,CACxC,GAAG,EAAE,gBAAgB,EACrB,EACI,WAAW,EACX,MAAM,EACN,YAAY,EACZ,iBAAiB,EACjB,4BAA4B,GAC/B,EAAE,oCAAoC,GACxC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAkBtC"}
@@ -1,13 +1,14 @@
1
+ // (C) 2021-2026 GoodData Corporation
1
2
  export async function loadWorkspaceAutomationsCount({ backend, workspace, }) {
2
3
  const result = await backend.workspace(workspace).automations().getAutomationsQuery().withSize(1).query();
3
4
  return result.totalCount ?? 0;
4
5
  }
5
- export function loadDashboardUserAutomations(ctx, dashboardId, userId, filterByUser, externalRecipient) {
6
+ export function loadDashboardUserAutomations(ctx, { dashboardId, userId, filterByUser, externalRecipient, includeUnavailableReferences, }) {
6
7
  const { backend, workspace } = ctx;
7
8
  let dashboardQuery = backend
8
9
  .workspace(workspace)
9
10
  .automations()
10
- .getAutomationsQuery()
11
+ .getAutomationsQuery({ includeUnavailableReferences })
11
12
  .withSorting(["title,asc", "createdAt,asc"])
12
13
  .withDashboard(dashboardId);
13
14
  // External recipients from context are prioritized to signed-in user
@@ -1 +1 @@
1
- {"version":3,"file":"refreshAutomationsHandlers.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/refreshAutomationsHandlers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAO5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAKnE,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB,GAAG,YAAY,CAgDzG"}
1
+ {"version":3,"file":"refreshAutomationsHandlers.d.ts","sourceRoot":"","sources":["../../../../src/model/commandHandlers/scheduledEmail/refreshAutomationsHandlers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAW5E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAKnE,wBAAiB,0BAA0B,CAAC,GAAG,EAAE,gBAAgB,EAAE,GAAG,EAAE,mBAAmB,GAAG,YAAY,CAkDzG"}
@@ -4,7 +4,7 @@ import { all, call, put, select } from "redux-saga/effects";
4
4
  import { convertError } from "@gooddata/sdk-ui";
5
5
  import { automationsRefreshed } from "../../events/scheduledEmail.js";
6
6
  import { automationsActions } from "../../store/automations/index.js";
7
- import { selectExternalRecipient, selectIsReadOnly } from "../../store/config/configSelectors.js";
7
+ import { selectEnableDashboardPartialRendering, selectExternalRecipient, selectIsReadOnly, } from "../../store/config/configSelectors.js";
8
8
  import { selectDashboardId } from "../../store/meta/metaSelectors.js";
9
9
  import { selectCanManageWorkspace } from "../../store/permissions/permissionsSelectors.js";
10
10
  import { selectCurrentUser } from "../../store/user/userSelectors.js";
@@ -15,13 +15,20 @@ export function* refreshAutomationsHandlers(ctx, cmd) {
15
15
  const canManageAutomations = yield select(selectCanManageWorkspace);
16
16
  const isReadOnly = yield select(selectIsReadOnly);
17
17
  const externalRecipient = yield select(selectExternalRecipient);
18
+ const isPartialRenderingEnabled = yield select(selectEnableDashboardPartialRendering);
18
19
  if (!dashboardId || !user || isReadOnly) {
19
20
  return;
20
21
  }
21
22
  yield put(automationsActions.setAutomationsLoading(true));
22
23
  try {
23
24
  const [automations, allAutomationsCount] = yield all([
24
- call(loadDashboardUserAutomations, ctx, dashboardId, user.login, !canManageAutomations, externalRecipient),
25
+ call(loadDashboardUserAutomations, ctx, {
26
+ dashboardId,
27
+ userId: user.login,
28
+ filterByUser: !canManageAutomations,
29
+ externalRecipient,
30
+ includeUnavailableReferences: isPartialRenderingEnabled,
31
+ }),
25
32
  call(loadWorkspaceAutomationsCount, ctx),
26
33
  ]);
27
34
  yield put(batchActions([
@@ -121,7 +121,7 @@ export declare function createDashboardRootReducer({ queryCache, }?: {
121
121
  listedDashboards: import("@reduxjs/toolkit").EntityState<import("@gooddata/sdk-model").IListedDashboard, import("@reduxjs/toolkit").EntityId> & object;
122
122
  accessibleDashboards: import("./accessibleDashboards/index.js").IAccessibleDashboardsState;
123
123
  inaccessibleDashboards: import("@reduxjs/toolkit").EntityState<import("../types/inaccessibleDashboardTypes.js").IInaccessibleDashboard, import("@reduxjs/toolkit").EntityId> & object;
124
- unavailableObjects: import("@reduxjs/toolkit").EntityState<import("@gooddata/sdk-backend-spi").IUnavailableDashboardReference, import("@reduxjs/toolkit").EntityId> & object;
124
+ unavailableObjects: import("@reduxjs/toolkit").EntityState<import("@gooddata/sdk-model").IUnavailableReference, import("@reduxjs/toolkit").EntityId> & object;
125
125
  executionResults: import("@reduxjs/toolkit").EntityState<import("./executionResults/types.js").IExecutionResultEnvelope, import("@reduxjs/toolkit").EntityId> & object;
126
126
  renderMode: import("./renderMode/renderModeState.js").IRenderModeState;
127
127
  ui: import("./ui/uiState.js").IUiState;
@@ -150,7 +150,7 @@ export declare function createDashboardRootReducer({ queryCache, }?: {
150
150
  listedDashboards: (import("@reduxjs/toolkit").EntityState<import("@gooddata/sdk-model").IListedDashboard, import("@reduxjs/toolkit").EntityId> & object) | undefined;
151
151
  accessibleDashboards: import("./accessibleDashboards/index.js").IAccessibleDashboardsState | undefined;
152
152
  inaccessibleDashboards: (import("@reduxjs/toolkit").EntityState<import("../types/inaccessibleDashboardTypes.js").IInaccessibleDashboard, import("@reduxjs/toolkit").EntityId> & object) | undefined;
153
- unavailableObjects: (import("@reduxjs/toolkit").EntityState<import("@gooddata/sdk-backend-spi").IUnavailableDashboardReference, import("@reduxjs/toolkit").EntityId> & object) | undefined;
153
+ unavailableObjects: (import("@reduxjs/toolkit").EntityState<import("@gooddata/sdk-model").IUnavailableReference, import("@reduxjs/toolkit").EntityId> & object) | undefined;
154
154
  executionResults: (import("@reduxjs/toolkit").EntityState<import("./executionResults/types.js").IExecutionResultEnvelope, import("@reduxjs/toolkit").EntityId> & object) | undefined;
155
155
  renderMode: import("./renderMode/renderModeState.js").IRenderModeState | undefined;
156
156
  ui: import("./ui/uiState.js").IUiState | undefined;
@@ -3,6 +3,6 @@ import { unavailableObjectsEntityAdapter } from "./unavailableObjectsEntityAdapt
3
3
  export type UnavailableObjectsState = ReturnType<typeof unavailableObjectsEntityAdapter.getInitialState>;
4
4
  export declare const unavailableObjectsSliceReducer: Reducer<UnavailableObjectsState>;
5
5
  export declare const unavailableObjectsActions: {
6
- setUnavailableObjects: import("@reduxjs/toolkit").ActionCreatorWithPayload<readonly import("@gooddata/sdk-backend-spi").IUnavailableDashboardReference[] | Record<import("@reduxjs/toolkit").EntityId, import("@gooddata/sdk-backend-spi").IUnavailableDashboardReference>, "unavailableObjects/setUnavailableObjects">;
6
+ setUnavailableObjects: import("@reduxjs/toolkit").ActionCreatorWithPayload<readonly import("@gooddata/sdk-model").IUnavailableReference[] | Record<import("@reduxjs/toolkit").EntityId, import("@gooddata/sdk-model").IUnavailableReference>, "unavailableObjects/setUnavailableObjects">;
7
7
  };
8
8
  //# sourceMappingURL=index.d.ts.map
@@ -1,9 +1,8 @@
1
1
  import { type EntityId } from "@reduxjs/toolkit";
2
- import type { IUnavailableDashboardReference } from "@gooddata/sdk-backend-spi";
3
2
  import { type ObjRef, type ObjectType } from "@gooddata/sdk-model";
4
3
  /**
5
4
  * Objects of different types may share an identifier, so entries are keyed by type as well.
6
5
  */
7
6
  export declare function unavailableObjectKey(type: ObjectType, ref: ObjRef): string;
8
- export declare const unavailableObjectsEntityAdapter: import("@reduxjs/toolkit").EntityAdapter<IUnavailableDashboardReference, EntityId>;
7
+ export declare const unavailableObjectsEntityAdapter: import("@reduxjs/toolkit").EntityAdapter<import("@gooddata/sdk-model").IUnavailableReference, EntityId>;
9
8
  //# sourceMappingURL=unavailableObjectsEntityAdapter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unavailableObjectsEntityAdapter.d.ts","sourceRoot":"","sources":["../../../../src/model/store/unavailableObjects/unavailableObjectsEntityAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAuB,MAAM,kBAAkB,CAAC;AAEtE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAkB,MAAM,qBAAqB,CAAC;AAEnF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,eAAO,MAAM,+BAA+B,oFAE1C,CAAC"}
1
+ {"version":3,"file":"unavailableObjectsEntityAdapter.d.ts","sourceRoot":"","sources":["../../../../src/model/store/unavailableObjects/unavailableObjectsEntityAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,QAAQ,EAAuB,MAAM,kBAAkB,CAAC;AAGtE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,UAAU,EAAkB,MAAM,qBAAqB,CAAC;AAEnF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,eAAO,MAAM,+BAA+B,yGAE1C,CAAC"}
@@ -4,14 +4,14 @@ export declare const selectIsDrillRestricted: ((state: import("../types.js").Das
4
4
  resultsCount: () => number;
5
5
  resetResultsCount: () => void;
6
6
  } & {
7
- resultFunc: (resultFuncArgs_0: import("@gooddata/sdk-backend-spi").IUnavailableDashboardReference[]) => (drill: DashboardDrillDefinition) => boolean;
8
- memoizedResultFunc: ((resultFuncArgs_0: import("@gooddata/sdk-backend-spi").IUnavailableDashboardReference[]) => (drill: DashboardDrillDefinition) => boolean) & {
7
+ resultFunc: (resultFuncArgs_0: import("@gooddata/sdk-model").IUnavailableReference[]) => (drill: DashboardDrillDefinition) => boolean;
8
+ memoizedResultFunc: ((resultFuncArgs_0: import("@gooddata/sdk-model").IUnavailableReference[]) => (drill: DashboardDrillDefinition) => boolean) & {
9
9
  clearCache: () => void;
10
10
  resultsCount: () => number;
11
11
  resetResultsCount: () => void;
12
12
  };
13
13
  lastResult: () => (drill: DashboardDrillDefinition) => boolean;
14
- dependencies: [import("../types.js").DashboardSelector<import("@gooddata/sdk-backend-spi").IUnavailableDashboardReference[]>];
14
+ dependencies: [import("../types.js").DashboardSelector<import("@gooddata/sdk-model").IUnavailableReference[]>];
15
15
  recomputations: () => number;
16
16
  resetRecomputations: () => void;
17
17
  dependencyRecomputations: () => number;
@@ -1 +1 @@
1
- {"version":3,"file":"drillRestrictionSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/drillRestrictionSelectors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAKlE,eAAO,MAAM,uBAAuB,4DAGpB,wBAAwB,KAAG,OAAO;;;;;oHAAlC,wBAAwB,KAAG,OAAO;;;;;;8BAAlC,wBAAwB,KAAG,OAAO;;;;;;;;;CAEjD,CAAC"}
1
+ {"version":3,"file":"drillRestrictionSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/drillRestrictionSelectors.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAKlE,eAAO,MAAM,uBAAuB,4DAGpB,wBAAwB,KAAG,OAAO;;;;;qGAAlC,wBAAwB,KAAG,OAAO;;;;;;8BAAlC,wBAAwB,KAAG,OAAO;;;;;;;;;CAEjD,CAAC"}
@@ -1,5 +1,6 @@
1
- import { type IDrillDownReference, type ObjRef } from "@gooddata/sdk-model";
1
+ import { type IAttributeDescriptor, type ICatalogAttribute, type ICatalogDateAttribute, type IDrillDownReference, type ObjRef } from "@gooddata/sdk-model";
2
2
  import { type ExplicitDrill, type IAvailableDrillTargets, type IHeaderPredicate } from "@gooddata/sdk-ui";
3
+ import { type ObjRefMap } from "../../../_staging/metadata/objRefMap.js";
3
4
  import { type DashboardDrillDefinition, type IDrillToUrlAttributeDefinition, type IGlobalDrillDownAttributeHierarchyDefinition } from "../../../types.js";
4
5
  import { type DashboardSelector } from "../types.js";
5
6
  /**
@@ -13,6 +14,39 @@ export interface IImplicitDrillWithPredicates {
13
14
  * @internal
14
15
  */
15
16
  export declare const selectImplicitDrillsDownByWidgetRef: (ref: ObjRef) => DashboardSelector<IImplicitDrillWithPredicates[]>;
17
+ /**
18
+ * A drill down through a hierarchy the user cannot read. Only the hierarchy and the clicked
19
+ * attribute are known, so it is listed as restricted and cannot be opened.
20
+ *
21
+ * @internal
22
+ */
23
+ export interface IRestrictedDrillDown {
24
+ hierarchyRef: ObjRef;
25
+ originLocalIdentifier: string;
26
+ }
27
+ /**
28
+ * When restricted drill downs are listed: only with partial rendering on, and only where drilling
29
+ * down is possible at all.
30
+ *
31
+ * @internal
32
+ */
33
+ export interface IRestrictedDrillDownConditions {
34
+ supportsAttributeHierarchies?: boolean;
35
+ enablePartialRendering: boolean;
36
+ disableDrillDown?: boolean;
37
+ }
38
+ /**
39
+ * The restricted drill downs of the given drill attributes: one for every restricted hierarchy an
40
+ * attribute belongs to, unless the widget ignores that hierarchy for it. The same rule serves the
41
+ * dashboard, the drill dialog and the drill menu.
42
+ *
43
+ * @internal
44
+ */
45
+ export declare function getRestrictedDrillDowns(attributes: IAttributeDescriptor[], catalogAttributes: ObjRefMap<ICatalogAttribute | ICatalogDateAttribute>, ignoredHierarchies: IDrillDownReference[], { supportsAttributeHierarchies, enablePartialRendering, disableDrillDown, }: IRestrictedDrillDownConditions): IRestrictedDrillDown[];
46
+ /**
47
+ * @internal
48
+ */
49
+ export declare const selectRestrictedDrillDownsByWidgetRef: (ref: ObjRef) => DashboardSelector<IRestrictedDrillDown[]>;
16
50
  /**
17
51
  * @internal
18
52
  */
@@ -48,5 +82,5 @@ export declare const selectImplicitDrillsByAvailableDrillTargets: (availableDril
48
82
  /**
49
83
  * @internal
50
84
  */
51
- export declare const selectDrillableItemsByAvailableDrillTargets: (availableDrillTargets: IAvailableDrillTargets | undefined, ignoredDrillDownHierarchies: IDrillDownReference[] | undefined, disableDrillIntoURL: boolean | undefined) => DashboardSelector<IHeaderPredicate[]>;
85
+ export declare const selectDrillableItemsByAvailableDrillTargets: (availableDrillTargets: IAvailableDrillTargets | undefined, ignoredDrillDownHierarchies: IDrillDownReference[] | undefined, disableDrillIntoURL: boolean | undefined, disableDrillDown?: boolean) => DashboardSelector<IHeaderPredicate[]>;
52
86
  //# sourceMappingURL=widgetDrillSelectors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"widgetDrillSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/widgetDrillSelectors.ts"],"names":[],"mappings":"AAMA,OAAO,EASH,KAAK,mBAAmB,EAGxB,KAAK,MAAM,EAad,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,aAAa,EAGlB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACxB,MAAM,kBAAkB,CAAC;AAI1B,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,4CAA4C,EACpD,MAAM,mBAAmB,CAAC;AA0C3B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,eAAe,EAAE,wBAAwB,CAAC;IAC1C,UAAU,EAAE,gBAAgB,EAAE,CAAC;CAClC;AA2TD;;GAEG;AACH,eAAO,MAAM,mCAAmC,EAAE,CAC9C,GAAG,EAAE,MAAM,KACV,iBAAiB,CAAC,4BAA4B,EAAE,CAuCpD,CAAC;AA+JF;;GAEG;AACH,eAAO,MAAM,mDAAm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 {"version":3,"file":"widgetDrillSelectors.d.ts","sourceRoot":"","sources":["../../../../src/model/store/widgetDrills/widgetDrillSelectors.ts"],"names":[],"mappings":"AAMA,OAAO,EAIH,KAAK,oBAAoB,EAEzB,KAAK,iBAAiB,EAEtB,KAAK,qBAAqB,EAE1B,KAAK,mBAAmB,EAGxB,KAAK,MAAM,EAcd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,aAAa,EAGlB,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EACxB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EACH,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,4CAA4C,EACpD,MAAM,mBAAmB,CAAC;AA2C3B,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAIrD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,eAAe,EAAE,wBAAwB,CAAC;IAC1C,UAAU,EAAE,gBAAgB,EAAE,CAAC;CAClC;AA2TD;;GAEG;AACH,eAAO,MAAM,mCAAmC,EAAE,CAC9C,GAAG,EAAE,MAAM,KACV,iBAAiB,CAAC,4BAA4B,EAAE,CAuCpD,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB;IACjC,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;CACjC;AAED;;;;;GAKG;AACH,MAAM,WAAW,8BAA8B;IAC3C,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC,sBAAsB,EAAE,OAAO,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,oBAAoB,EAAE,EAClC,iBAAiB,EAAE,SAAS,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,EACvE,kBAAkB,EAAE,mBAAmB,EAAE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AA4B,EAAE,CA4CpD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2CAA2C,EAAE,CACtD,qBAAqB,EAAE,sBAAsB,GAAG,SAAS,EACzD,2BAA2B,EAAE,mBAAmB,EAAE,GAAG,SAAS,EAC9D,mBAAmB,EAAE,OAAO,GAAG,SAAS,EACxC,gBAAgB,CAAC,EAAE,OAAO,KACzB,iBAAiB,CAAC,gBAAgB,EAAE,CA6BxC,CAAC"}
@@ -2,7 +2,7 @@
2
2
  import { createSelector } from "@reduxjs/toolkit";
3
3
  import { compact } from "lodash-es";
4
4
  import { UnexpectedError } from "@gooddata/sdk-backend-spi";
5
- import { areObjRefsEqual, getHierarchyAttributes, getHierarchyRef, isCatalogAttribute, isDrillFromAttribute, isDrillFromMeasure, isIdentifierRef, isLocalIdRef, isUriRef, localIdRef, objRefToString, } from "@gooddata/sdk-model";
5
+ import { areObjRefsEqual, getHierarchyAttributes, getHierarchyRef, isAttributeHierarchyReference, isCatalogAttribute, isDrillFromAttribute, isDrillFromMeasure, isIdentifierRef, isLocalIdRef, isUriRef, localIdRef, objRefToString, } from "@gooddata/sdk-model";
6
6
  import { HeaderPredicates, } from "@gooddata/sdk-ui";
7
7
  import { isInsightKeyDriverAnalysisEnabled } from "@gooddata/sdk-ui-ext";
8
8
  import { existBlacklistHierarchyPredicate } from "../../utils/attributeHierarchyUtils.js";
@@ -10,7 +10,7 @@ import { createMemoizedSelector } from "../_infra/selectors.js";
10
10
  import { selectAccessibleDashboardsLoaded, selectAccessibleDashboardsMap, } from "../accessibleDashboards/accessibleDashboardsSelectors.js";
11
11
  import { selectBackendCapabilities, selectSupportsAttributeHierarchies, selectSupportsCrossFiltering, } from "../backendCapabilities/backendCapabilitiesSelectors.js";
12
12
  import { selectAllCatalogAttributesMap, selectAllCatalogDisplayFormsMap, selectAttributesWithDisplayFormLink, selectAttributesWithHierarchyDescendants, selectCatalogDateAttributes, selectCatalogIsLoaded, selectDrillableAttributeHierarchies, } from "../catalog/catalogSelectors.js";
13
- import { selectDisableDefaultDrills, selectEnableDrillToUrlByDefault, selectEnableKda, selectEnableSecondGranularities, selectIsDisabledCrossFiltering, selectIsDisabledKda, selectIsEmbedded, } from "../config/configSelectors.js";
13
+ import { selectDisableDefaultDrills, selectEnableDashboardPartialRendering, selectEnableDrillToUrlByDefault, selectEnableKda, selectEnableSecondGranularities, selectIsDisabledCrossFiltering, selectIsDisabledKda, selectIsEmbedded, } from "../config/configSelectors.js";
14
14
  import { selectDrillableItems } from "../drill/drillSelectors.js";
15
15
  import { selectDrillTargetsByWidgetRef } from "../drillTargets/drillTargetsSelectors.js";
16
16
  import { selectInsightByWidgetRef, selectInsightsMap } from "../insights/insightsSelectors.js";
@@ -213,6 +213,41 @@ export const selectImplicitDrillsDownByWidgetRef = createMemoizedSelector((ref)
213
213
  }
214
214
  return [];
215
215
  }));
216
+ /**
217
+ * The restricted drill downs of the given drill attributes: one for every restricted hierarchy an
218
+ * attribute belongs to, unless the widget ignores that hierarchy for it. The same rule serves the
219
+ * dashboard, the drill dialog and the drill menu.
220
+ *
221
+ * @internal
222
+ */
223
+ export function getRestrictedDrillDowns(attributes, catalogAttributes, ignoredHierarchies, { supportsAttributeHierarchies, enablePartialRendering, disableDrillDown, }) {
224
+ if (!supportsAttributeHierarchies || !enablePartialRendering || disableDrillDown) {
225
+ return [];
226
+ }
227
+ return attributes.flatMap(({ attributeHeader }) => {
228
+ const attributeRef = attributeHeader.formOf.ref;
229
+ const catalogAttribute = catalogAttributes.get(attributeRef);
230
+ const unavailable = isCatalogAttribute(catalogAttribute) ? (catalogAttribute.unavailable ?? []) : [];
231
+ return unavailable
232
+ .filter(({ ref, type }) => type === "attributeHierarchy" &&
233
+ !ignoredHierarchies.some((reference) => isAttributeHierarchyReference(reference) &&
234
+ areObjRefsEqual(reference.attributeHierarchy, ref) &&
235
+ areObjRefsEqual(reference.attribute, attributeRef)))
236
+ .map(({ ref }) => ({
237
+ hierarchyRef: ref,
238
+ originLocalIdentifier: attributeHeader.localIdentifier,
239
+ }));
240
+ });
241
+ }
242
+ const restrictedDrillDownPredicates = (restrictedDrillDowns) => restrictedDrillDowns.map(({ originLocalIdentifier }) => HeaderPredicates.localIdentifierMatch(originLocalIdentifier));
243
+ /**
244
+ * @internal
245
+ */
246
+ export const selectRestrictedDrillDownsByWidgetRef = createMemoizedSelector((ref) => createSelector(selectDrillTargetsByWidgetRef(ref), selectAllCatalogAttributesMap, selectIgnoredDrillDownHierarchiesByWidgetRef(ref), selectSupportsAttributeHierarchies, selectEnableDashboardPartialRendering, selectInsightByWidgetRef(ref), (availableDrillTargets, catalogAttributes, ignoredHierarchies = [], supportsAttributeHierarchies, enablePartialRendering, widgetInsight) => getRestrictedDrillDowns((availableDrillTargets?.availableDrillTargets?.attributes ?? []).map(({ attribute }) => attribute), catalogAttributes, ignoredHierarchies, {
247
+ supportsAttributeHierarchies,
248
+ enablePartialRendering,
249
+ disableDrillDown: widgetInsight?.insight?.properties?.["controls"]?.disableDrillDown,
250
+ })));
216
251
  const selectCrossFilteringByWidgetRef = createMemoizedSelector((ref) => createSelector(selectSupportsCrossFiltering, selectDrillTargetsByWidgetRef(ref), selectDisableDashboardCrossFiltering, selectIsDisabledCrossFiltering, selectDrillableItems, (isCrossFilteringSupported, availableDrillTargets, disableCrossFiltering, disableCrossFilteringByConfig, drillableItems) => {
217
252
  if (!isCrossFilteringSupported ||
218
253
  disableCrossFiltering ||
@@ -415,6 +450,7 @@ const selectImplicitDrillToUrlPredicates = createMemoizedSelector((ref) => creat
415
450
  const selectImplicitDrillDownPredicates = createMemoizedSelector((ref) => createSelector(selectImplicitDrillsDownByWidgetRef(ref), (drillDownDrills) => {
416
451
  return drillDownDrills.flatMap((drill) => drill.predicates);
417
452
  }));
453
+ const selectRestrictedDrillDownPredicates = createMemoizedSelector((ref) => createSelector(selectRestrictedDrillDownsByWidgetRef(ref), restrictedDrillDownPredicates));
418
454
  const selectConfiguredDrillPredicates = createMemoizedSelector((ref) => createSelector(selectValidConfiguredDrillsByWidgetRef(ref), (configuredDrills = []) => {
419
455
  return configuredDrills.flatMap((drill) => drill.predicates);
420
456
  }));
@@ -445,10 +481,10 @@ export const selectConfiguredAndImplicitDrillsByWidgetRef = createMemoizedSelect
445
481
  /**
446
482
  * @internal
447
483
  */
448
- export const selectDrillableItemsByWidgetRef = createMemoizedSelector((ref) => createSelector(selectDisableDefaultDrills, selectDrillableItems, selectConfiguredDrillPredicates(ref), selectImplicitDrillDownPredicates(ref), selectImplicitDrillToUrlPredicates(ref), selectCrossFilteringPredicates(ref), selectKeyDriverAnalysisPredicates(ref), (disableDefaultDrills, drillableItems, configuredDrills, implicitDrillDownDrills, implicitDrillToUrlDrills, crossFilteringDrills, keyDriverAnalysisDrills) => {
484
+ export const selectDrillableItemsByWidgetRef = createMemoizedSelector((ref) => createSelector(selectDisableDefaultDrills, selectDrillableItems, selectConfiguredDrillPredicates(ref), selectImplicitDrillDownPredicates(ref), selectRestrictedDrillDownPredicates(ref), selectImplicitDrillToUrlPredicates(ref), selectCrossFilteringPredicates(ref), selectKeyDriverAnalysisPredicates(ref), (disableDefaultDrills, drillableItems, configuredDrills, implicitDrillDownDrills, restrictedDrillDownDrills, implicitDrillToUrlDrills, crossFilteringDrills, keyDriverAnalysisDrills) => {
449
485
  const resolvedDrillableItems = [...drillableItems];
450
486
  if (!disableDefaultDrills) {
451
- resolvedDrillableItems.push(...configuredDrills, ...implicitDrillDownDrills, ...implicitDrillToUrlDrills, ...crossFilteringDrills, ...keyDriverAnalysisDrills);
487
+ resolvedDrillableItems.push(...configuredDrills, ...implicitDrillDownDrills, ...restrictedDrillDownDrills, ...implicitDrillToUrlDrills, ...crossFilteringDrills, ...keyDriverAnalysisDrills);
452
488
  }
453
489
  return resolvedDrillableItems;
454
490
  }));
@@ -470,8 +506,12 @@ export const selectImplicitDrillsByAvailableDrillTargets = createMemoizedSelecto
470
506
  /**
471
507
  * @internal
472
508
  */
473
- export const selectDrillableItemsByAvailableDrillTargets = createMemoizedSelector((availableDrillTargets, ignoredDrillDownHierarchies, disableDrillIntoURL) => createSelector(selectImplicitDrillsByAvailableDrillTargets(availableDrillTargets, ignoredDrillDownHierarchies, disableDrillIntoURL), (implicitDrillDowns) => {
474
- return implicitDrillDowns.flatMap((implicitDrill) => implicitDrill.predicates);
509
+ export const selectDrillableItemsByAvailableDrillTargets = createMemoizedSelector((availableDrillTargets, ignoredDrillDownHierarchies, disableDrillIntoURL, disableDrillDown) => createSelector(selectImplicitDrillsByAvailableDrillTargets(availableDrillTargets, ignoredDrillDownHierarchies, disableDrillIntoURL), selectAllCatalogAttributesMap, selectSupportsAttributeHierarchies, selectEnableDashboardPartialRendering, (implicitDrillDowns, catalogAttributes, supportsAttributeHierarchies, enablePartialRendering) => {
510
+ const restrictedDrillDowns = getRestrictedDrillDowns((availableDrillTargets?.attributes ?? []).map(({ attribute }) => attribute), catalogAttributes, ignoredDrillDownHierarchies ?? [], { supportsAttributeHierarchies, enablePartialRendering, disableDrillDown });
511
+ return [
512
+ ...implicitDrillDowns.flatMap((implicitDrill) => implicitDrill.predicates),
513
+ ...restrictedDrillDownPredicates(restrictedDrillDowns),
514
+ ];
475
515
  }));
476
516
  function getMetricDisabled(insight, localIdentifier) {
477
517
  return (insight?.insight.properties?.["controls"]?.["disableKeyDriveAnalysisOn"]?.[localIdentifier] ?? false);
@@ -11,7 +11,7 @@ export interface IDrillSelectDropdownProps extends IDrillSelectContext {
11
11
  onCloseReturnFocus: () => void;
12
12
  onSelect: (item: DashboardDrillDefinition, context: unknown) => void;
13
13
  }
14
- export declare function DrillSelectDropdown({ isOpen, dropDownAnchorClass, onClose, onCloseReturnFocus, onSelect, drillDefinitions, drillEvent, }: IDrillSelectDropdownProps): import("react/jsx-runtime").JSX.Element | null;
14
+ export declare function DrillSelectDropdown({ isOpen, dropDownAnchorClass, onClose, onCloseReturnFocus, onSelect, drillDefinitions, restrictedDrillDowns, drillEvent, }: IDrillSelectDropdownProps): import("react/jsx-runtime").JSX.Element | null;
15
15
  export declare const createDrillSelectItems: ({ drillDefinitions, drillEvent, insights, dashboardList, dashboardTitle, intl, widget, attributeDisplayForms, enableSecondGranularities, isDrillRestricted, }: {
16
16
  isDrillRestricted: (drill: DashboardDrillDefinition) => boolean;
17
17
  drillDefinitions: DashboardDrillDefinition[];
@@ -1 +1 @@
1
- {"version":3,"file":"DrillSelectDropdown.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/DrillSelect/DrillSelectDropdown.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAW,MAAM,YAAY,CAAC;AAGrD,OAAO,EACH,KAAK,mCAAmC,EACxC,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,OAAO,EAcf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AAIxE,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,yCAAyC,CAAC;AASzE,OAAO,EAAE,KAAK,wBAAwB,EAAyB,MAAM,mBAAmB,CAAC;AAazF,OAAO,EAAa,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAExF,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IAClE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CACxE;AAED,wBAAgB,mBAAmB,CAAC,EAChC,MAAM,EACN,mBAAmB,EACnB,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,UAAU,GACb,EAAE,yBAAyB,kDA6K3B;AAqFD,eAAO,MAAM,sBAAsB,kKAWhC;IACC,iBAAiB,EAAE,CAAC,KAAK,EAAE,wBAAwB,K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BAAgB,mBAAmB,CAAC,EAChC,MAAM,EACN,mBAAmB,EACnB,OAAO,EACP,kBAAkB,EAClB,QAAQ,EACR,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,GACb,EAAE,yBAAyB,kDA+K3B;AAgGD,eAAO,MAAM,sBAAsB,kKAWhC;IACC,iBAAiB,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,OAAO,CAAC;IAChE,gBAAgB,EAAE,wBAAwB,EAAE,CAAC;IAC7C,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC9B,aAAa,EAAE,gBAAgB,EAAE,CAAC;IAClC,cAAc,EAAE,MAAM,CAAC;IACvB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,mCAAmC,CAAC,CAAC;IAC3E,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC,KAAG,gBAAgB,EAqJnB,CAAC"}
@@ -5,7 +5,7 @@ import stringify from "json-stable-stringify";
5
5
  import { compact, groupBy, uniqBy } from "lodash-es";
6
6
  import { useIntl } from "react-intl";
7
7
  import { invariant } from "ts-invariant";
8
- import { areObjRefsEqual, insightTitle, isAttributeDescriptor, isCrossFiltering, isDrillFromAttribute, isDrillToAttributeUrl, isDrillToCustomUrl, isDrillToDashboard, isDrillToInsight, isDrillToLegacyDashboard, isIdentifierRef, isKeyDriveAnalysis, } from "@gooddata/sdk-model";
8
+ import { areObjRefsEqual, insightTitle, isAttributeDescriptor, isCrossFiltering, isDrillFromAttribute, isDrillToAttributeUrl, isDrillToCustomUrl, isDrillToDashboard, isDrillToInsight, isDrillToLegacyDashboard, isIdentifierRef, isKeyDriveAnalysis, objRefToString, } from "@gooddata/sdk-model";
9
9
  import { UnexpectedSdkError } from "@gooddata/sdk-ui";
10
10
  import { Overlay, UiFocusManager, UiMenu } from "@gooddata/sdk-ui-kit";
11
11
  import { getDrillOriginLocalIdentifier } from "../../../_staging/drills/drillingUtils.js";
@@ -25,8 +25,8 @@ import { getDrillDownTitle, getDrillOriginAttributeElementTitle, getTotalDrillTo
25
25
  import { getDrillToCustomUrlMissingAttributes } from "../utils/drillToCustomUrlUtils.js";
26
26
  import { getKdaKeyDriverCombinations, getKeyDriverCombinationItemTitle } from "../utils/kdaUtils.js";
27
27
  import { DrillSelectDropdownMenuItem } from "./DrillSelectDropdownMenuItem.js";
28
- import { DrillType } from "./types.js";
29
- export function DrillSelectDropdown({ isOpen, dropDownAnchorClass, onClose, onCloseReturnFocus, onSelect, drillDefinitions, drillEvent, }) {
28
+ import { DrillType, } from "./types.js";
29
+ export function DrillSelectDropdown({ isOpen, dropDownAnchorClass, onClose, onCloseReturnFocus, onSelect, drillDefinitions, restrictedDrillDowns, drillEvent, }) {
30
30
  const intl = useIntl();
31
31
  const isDrillRestricted = useDashboardSelector(selectIsDrillRestricted);
32
32
  const dashboardList = useDashboardSelector(selectAccessibleDashboards);
@@ -72,19 +72,23 @@ export function DrillSelectDropdown({ isOpen, dropDownAnchorClass, onClose, onCl
72
72
  nextElement.focus();
73
73
  }
74
74
  }, [previouslyFocusedRef, onClose, removeHighchartsFocusBorders, findNextFocusableVisualisation]);
75
- const drillSelectItems = useMemo(() => createDrillSelectItems({
76
- drillDefinitions: deduplicateDrillIntoUrlItems(drillDefinitions),
77
- drillEvent,
78
- isDrillRestricted,
79
- insights,
80
- dashboardList,
81
- dashboardTitle,
82
- attributeDisplayForms,
83
- intl,
84
- widget: widget,
85
- enableSecondGranularities,
86
- }), [
75
+ const drillSelectItems = useMemo(() => [
76
+ ...createDrillSelectItems({
77
+ drillDefinitions: deduplicateDrillIntoUrlItems(drillDefinitions),
78
+ drillEvent,
79
+ isDrillRestricted,
80
+ insights,
81
+ dashboardList,
82
+ dashboardTitle,
83
+ attributeDisplayForms,
84
+ intl,
85
+ widget: widget,
86
+ enableSecondGranularities,
87
+ }),
88
+ ...createRestrictedDrillDownItems(restrictedDrillDowns, intl),
89
+ ], [
87
90
  drillDefinitions,
91
+ restrictedDrillDowns,
88
92
  isDrillRestricted,
89
93
  drillEvent,
90
94
  insights,
@@ -96,19 +100,18 @@ export function DrillSelectDropdown({ isOpen, dropDownAnchorClass, onClose, onCl
96
100
  enableSecondGranularities,
97
101
  ]);
98
102
  const grouped = groupBy(drillSelectItems, (item) => {
99
- if (isDrillDownDefinition(item.drillDefinition)) {
100
- return "drillDown";
101
- }
102
- if (isDrillToUrl(item.drillDefinition)) {
103
- return "drillToUrl";
103
+ switch (item.type) {
104
+ case DrillType.DRILL_DOWN:
105
+ return "drillDown";
106
+ case DrillType.DRILL_TO_URL:
107
+ return "drillToUrl";
108
+ case DrillType.CROSS_FILTERING:
109
+ return "crossFiltering";
110
+ case DrillType.KEY_DRIVER_ANALYSIS:
111
+ return "keyDriverAnalysis";
112
+ default:
113
+ return "drill";
104
114
  }
105
- if (isCrossFiltering(item.drillDefinition)) {
106
- return "crossFiltering";
107
- }
108
- if (isKeyDriveAnalysis(item.drillDefinition)) {
109
- return "keyDriverAnalysis";
110
- }
111
- return "drill";
112
115
  });
113
116
  const menuItems = useDrillSelectDropdownMenuItems({
114
117
  drillDownItems: grouped["drillDown"] ?? [],
@@ -216,6 +219,12 @@ function calculateAlignPoints(anchorClass, drillEvent) {
216
219
  },
217
220
  ];
218
221
  }
222
+ const createRestrictedDrillDownItems = (restrictedDrillDowns, intl) => restrictedDrillDowns.map(({ hierarchyRef, originLocalIdentifier }) => ({
223
+ type: DrillType.DRILL_DOWN,
224
+ name: intl.formatMessage({ id: "drill_modal_picker.restricted" }),
225
+ id: `restricted-drill-down-${originLocalIdentifier}-${objRefToString(hierarchyRef)}`,
226
+ isRestricted: true,
227
+ }));
219
228
  export const createDrillSelectItems = ({ drillDefinitions, drillEvent, insights, dashboardList, dashboardTitle, intl, widget, attributeDisplayForms, enableSecondGranularities = false, isDrillRestricted, }) => {
220
229
  const totalDrillToUrls = getTotalDrillToUrlCount(drillDefinitions);
221
230
  return drillDefinitions.flatMap((drillDefinition) => {
@@ -228,10 +237,8 @@ export const createDrillSelectItems = ({ drillDefinitions, drillEvent, insights,
228
237
  ? DrillType.DRILL_TO_DASHBOARD
229
238
  : DrillType.DRILL_TO_URL,
230
239
  name: intl.formatMessage({ id: "drill_modal_picker.restricted" }),
231
- drillDefinition,
232
240
  id: stringify(drillDefinition) || "undefined",
233
241
  isRestricted: true,
234
- isDisabled: true,
235
242
  };
236
243
  }
237
244
  if (isDrillDownDefinition(drillDefinition)) {
@@ -1 +1 @@
1
- {"version":3,"file":"WithDrillSelect.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/DrillSelect/WithDrillSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAA0C,MAAM,OAAO,CAAC;AAKlF,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,MAAM,EAOd,MAAM,qBAAqB,CAAC;AAsB7B,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EACrB,MAAM,aAAa,CAAC;AAMrB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,QAAQ,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAClD,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD,4BAA4B,CAAC,EAAE,4BAA4B,CAAC;IAC5D,yBAAyB,CAAC,EAAE,yBAAyB,CAAC;IACtD,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IACxD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,aAAa,CAAA;KAAE,KAAK,YAAY,CAAC;CACjE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC5B,SAAS,EACT,QAAQ,EACR,OAAO,EACP,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,EACzB,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,OAAO,GACV,EAAE,qBAAqB,GAAG,YAAY,CAmLtC"}
1
+ {"version":3,"file":"WithDrillSelect.d.ts","sourceRoot":"","sources":["../../../../src/presentation/drill/DrillSelect/WithDrillSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAA0C,MAAM,OAAO,CAAC;AAKlF,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,MAAM,EAQd,MAAM,qBAAqB,CAAC;AAgC7B,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EACrB,MAAM,aAAa,CAAC;AAMrB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,QAAQ,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,uBAAuB,CAAC,EAAE,uBAAuB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