@gooddata/sdk-ui-analytical-designer 11.69.0-alpha.2 → 11.69.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/NOTICE +47 -47
  2. package/esm/actions/data_actions.d.ts +2 -1
  3. package/esm/actions/data_actions.d.ts.map +1 -1
  4. package/esm/actions/data_actions.js +2 -2
  5. package/esm/backend.d.ts +15 -1
  6. package/esm/backend.d.ts.map +1 -1
  7. package/esm/backend.js +26 -2
  8. package/esm/components/DeleteReportDialog.d.ts.map +1 -1
  9. package/esm/components/DeleteReportDialog.js +12 -8
  10. package/esm/components/DeleteReportDialogUsageList.d.ts +2 -4
  11. package/esm/components/DeleteReportDialogUsageList.d.ts.map +1 -1
  12. package/esm/components/DeleteReportDialogUsageList.js +10 -7
  13. package/esm/components/InsightUsageOnDashboards.d.ts.map +1 -1
  14. package/esm/components/InsightUsageOnDashboards.js +16 -8
  15. package/esm/components/Report.d.ts +3 -1
  16. package/esm/components/Report.d.ts.map +1 -1
  17. package/esm/components/Report.js +13 -4
  18. package/esm/components/SaveReportFromKDDialog.js +1 -1
  19. package/esm/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.d.ts +1 -0
  20. package/esm/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.d.ts.map +1 -1
  21. package/esm/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.js +1 -0
  22. package/esm/components/header/EditorActions.d.ts +1 -0
  23. package/esm/components/header/EditorActions.d.ts.map +1 -1
  24. package/esm/components/header/EditorActions.js +1 -0
  25. package/esm/components/header/OptionsMenu/useOptionsProps.d.ts +1 -0
  26. package/esm/components/header/OptionsMenu/useOptionsProps.d.ts.map +1 -1
  27. package/esm/components/header/OptionsMenu/useOptionsProps.js +1 -0
  28. package/esm/components/report/executionProgress/ExecutionProgressPanel.d.ts +12 -0
  29. package/esm/components/report/executionProgress/ExecutionProgressPanel.d.ts.map +1 -0
  30. package/esm/components/report/executionProgress/ExecutionProgressPanel.js +157 -0
  31. package/esm/components/report/executionProgress/ExecutionProgressSteps.d.ts +17 -0
  32. package/esm/components/report/executionProgress/ExecutionProgressSteps.d.ts.map +1 -0
  33. package/esm/components/report/executionProgress/ExecutionProgressSteps.js +122 -0
  34. package/esm/components/report/executionProgress/ExecutionStats.d.ts +10 -0
  35. package/esm/components/report/executionProgress/ExecutionStats.d.ts.map +1 -0
  36. package/esm/components/report/executionProgress/ExecutionStats.js +105 -0
  37. package/esm/components/report/executionProgress/timeline.d.ts +34 -0
  38. package/esm/components/report/executionProgress/timeline.d.ts.map +1 -0
  39. package/esm/components/report/executionProgress/timeline.js +51 -0
  40. package/esm/components/saveReportFromKD/InsightUsageOnDashboardsList.d.ts +2 -2
  41. package/esm/components/saveReportFromKD/InsightUsageOnDashboardsList.d.ts.map +1 -1
  42. package/esm/components/saveReportFromKD/InsightUsageOnDashboardsList.js +13 -6
  43. package/esm/models/metadata.d.ts +3 -0
  44. package/esm/models/metadata.d.ts.map +1 -1
  45. package/esm/models/metadata.js +3 -0
  46. package/esm/reducers/combined_root_reducer.d.ts +3 -0
  47. package/esm/reducers/combined_root_reducer.d.ts.map +1 -1
  48. package/esm/reducers/combined_root_reducer.js +2 -0
  49. package/esm/sagas/execute_report_sagas.d.ts +1 -0
  50. package/esm/sagas/execute_report_sagas.d.ts.map +1 -1
  51. package/esm/sagas/open_report_sagas.d.ts +3 -1
  52. package/esm/sagas/open_report_sagas.d.ts.map +1 -1
  53. package/esm/sagas/open_report_sagas.js +7 -2
  54. package/esm/sagas/sagas.d.ts.map +1 -1
  55. package/esm/sagas/sagas.js +4 -0
  56. package/esm/selectors/feature_flag_selector.d.ts +23 -2
  57. package/esm/selectors/feature_flag_selector.d.ts.map +1 -1
  58. package/esm/selectors/feature_flag_selector.js +2 -0
  59. package/esm/selectors/report_selector.js +1 -1
  60. package/esm/selectors/report_visualization_selector.d.ts +4 -0
  61. package/esm/selectors/report_visualization_selector.d.ts.map +1 -1
  62. package/esm/selectors/save_report_from_kd_dialog_selector.d.ts +10 -10
  63. package/esm/selectors/save_report_selector.d.ts +12 -12
  64. package/esm/selectors/save_report_selector.js +1 -1
  65. package/esm/services/buckets_service.d.ts +1 -0
  66. package/esm/services/buckets_service.d.ts.map +1 -1
  67. package/esm/store/execution_progress/execution_loading_view_model.d.ts +72 -0
  68. package/esm/store/execution_progress/execution_loading_view_model.d.ts.map +1 -0
  69. package/esm/store/execution_progress/execution_loading_view_model.js +122 -0
  70. package/esm/store/execution_progress/execution_progress_actions.d.ts +42 -0
  71. package/esm/store/execution_progress/execution_progress_actions.d.ts.map +1 -0
  72. package/esm/store/execution_progress/execution_progress_actions.js +19 -0
  73. package/esm/store/execution_progress/execution_progress_mock.d.ts +31 -0
  74. package/esm/store/execution_progress/execution_progress_mock.d.ts.map +1 -0
  75. package/esm/store/execution_progress/execution_progress_mock.js +458 -0
  76. package/esm/store/execution_progress/execution_progress_saga.d.ts +56 -0
  77. package/esm/store/execution_progress/execution_progress_saga.d.ts.map +1 -0
  78. package/esm/store/execution_progress/execution_progress_saga.js +226 -0
  79. package/esm/store/execution_progress/execution_progress_selectors.d.ts +66 -0
  80. package/esm/store/execution_progress/execution_progress_selectors.d.ts.map +1 -0
  81. package/esm/store/execution_progress/execution_progress_selectors.js +7 -0
  82. package/esm/store/execution_progress/execution_progress_slice.d.ts +4 -0
  83. package/esm/store/execution_progress/execution_progress_slice.d.ts.map +1 -0
  84. package/esm/store/execution_progress/execution_progress_slice.js +95 -0
  85. package/esm/store/execution_progress/execution_progress_state.d.ts +54 -0
  86. package/esm/store/execution_progress/execution_progress_state.d.ts.map +1 -0
  87. package/esm/store/execution_progress/execution_progress_state.js +12 -0
  88. package/esm/store/execution_progress/execution_progress_view_model.d.ts +136 -0
  89. package/esm/store/execution_progress/execution_progress_view_model.d.ts.map +1 -0
  90. package/esm/store/execution_progress/execution_progress_view_model.js +378 -0
  91. package/esm/store/execution_progress/execution_stats_view_model.d.ts +42 -0
  92. package/esm/store/execution_progress/execution_stats_view_model.d.ts.map +1 -0
  93. package/esm/store/execution_progress/execution_stats_view_model.js +51 -0
  94. package/esm/store/insight_usage/insight_usage_helpers.d.ts +13 -3
  95. package/esm/store/insight_usage/insight_usage_helpers.d.ts.map +1 -1
  96. package/esm/store/insight_usage/insight_usage_helpers.js +37 -1
  97. package/esm/store/insight_usage/insight_usage_selectors.d.ts +5 -6
  98. package/esm/store/insight_usage/insight_usage_selectors.d.ts.map +1 -1
  99. package/esm/store/insight_usage/insight_usage_selectors.js +5 -4
  100. package/esm/store/insight_usage/insight_usage_slice.d.ts.map +1 -1
  101. package/esm/store/insight_usage/insight_usage_slice.js +1 -0
  102. package/esm/store/insight_usage/insight_usage_state.d.ts +8 -0
  103. package/esm/store/insight_usage/insight_usage_state.d.ts.map +1 -1
  104. package/esm/store/types.d.ts +3 -0
  105. package/esm/store/types.d.ts.map +1 -1
  106. package/esm/translations/en-US.json +196 -0
  107. package/esm/utils/api.d.ts +6 -1
  108. package/esm/utils/api.d.ts.map +1 -1
  109. package/esm/utils/api.js +28 -0
  110. package/package.json +21 -21
  111. package/styles/css/execution_progress.css +486 -0
  112. package/styles/css/execution_progress.css.map +1 -0
  113. package/styles/css/main.css +485 -0
  114. package/styles/css/main.css.map +1 -1
  115. package/styles/scss/_ad_partials.scss +1 -0
  116. package/styles/scss/execution_progress.scss +547 -0
@@ -26,8 +26,10 @@ export interface IReportProps {
26
26
  hasReportLoadingError?: boolean;
27
27
  customError?: IExtendedRefPointCustomError | null;
28
28
  messages?: Record<string, string>;
29
+ /** replaces the computing spinner with the live execution progress */
30
+ isExecutionProgressEnabled?: boolean;
29
31
  }
30
- export declare const ReportBase: import("react").MemoExoticComponent<({ projectId, appSessionId, messages, isSmallScreen, isExecutionRunning, isReportNotFound, reportNotFoundMissingItems, isReportTooLargeToCompute, isReportTooLargeToDisplay, isInvalidConfiguration, isReportWithFiltersEmpty, isReportWithoutFiltersEmpty, isBadRequest, isReportProtected, isMissingLocation, isMissingArea, isMissingMetric, isMissingColumns, isExecutable, isComputingShortcut, isNoMetricSupported, hasNegativeValue, unsupportedConfiguration, hasReportLoadingError, customError, }: IReportProps) => import("react/jsx-runtime").JSX.Element>;
32
+ export declare const ReportBase: import("react").MemoExoticComponent<({ projectId, appSessionId, messages, isSmallScreen, isExecutionRunning, isReportNotFound, reportNotFoundMissingItems, isReportTooLargeToCompute, isReportTooLargeToDisplay, isInvalidConfiguration, isReportWithFiltersEmpty, isReportWithoutFiltersEmpty, isBadRequest, isReportProtected, isMissingLocation, isMissingArea, isMissingMetric, isMissingColumns, isExecutable, isComputingShortcut, isNoMetricSupported, hasNegativeValue, unsupportedConfiguration, hasReportLoadingError, customError, isExecutionProgressEnabled, }: IReportProps) => import("react/jsx-runtime").JSX.Element>;
31
33
  export declare function Report({ isSmallScreen }: {
32
34
  isSmallScreen: boolean;
33
35
  }): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Report.d.ts","sourceRoot":"","sources":["../../src/components/Report.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAC/G,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAoBnE,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0BAA0B,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACnE,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACrC;AAED,eAAO,MAAM,UAAU,mhBA0BpB,YAAY,6CA2Db,CAAC;AAEH,wBAAgB,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,2CAInE"}
1
+ {"version":3,"file":"Report.d.ts","sourceRoot":"","sources":["../../src/components/Report.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,4DAA4D,CAAC;AAC/G,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAsBnE,MAAM,WAAW,YAAY;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,0BAA0B,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACnE,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,sEAAsE;IACtE,0BAA0B,CAAC,EAAE,OAAO,CAAC;CACxC;AAED,eAAO,MAAM,UAAU,+iBA2BpB,YAAY,6CAwEb,CAAC;AAEH,wBAAgB,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,2CAWnE"}
@@ -1,9 +1,12 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // (C) 2007-2026 GoodData Corporation
3
3
  import { memo } from "react";
4
4
  import classNames from "classnames";
5
5
  import { useSelector } from "react-redux";
6
+ import { isExecutionProgressEnabled } from "../selectors/feature_flag_selector.js";
6
7
  import { reportSelector } from "../selectors/report_selector.js";
8
+ import { ExecutionProgressPanel } from "./report/executionProgress/ExecutionProgressPanel.js";
9
+ import { ExecutionStats } from "./report/executionProgress/ExecutionStats.js";
7
10
  import { ReportBlank } from "./report/ReportBlank.js";
8
11
  import { ReportComputing } from "./report/ReportComputing.js";
9
12
  import { ReportCustomError } from "./report/ReportCustomError.js";
@@ -21,7 +24,7 @@ import { ReportTooLargeToDisplay } from "./report/ReportTooLargeToDisplay.js";
21
24
  import { ReportUnsupportedConfiguration } from "./report/ReportUnsupportedConfiguration.js";
22
25
  import { ReportVisualization } from "./report/ReportVisualization.js";
23
26
  import { WorkspaceEmpty } from "./report/WorkspaceEmpty.js";
24
- export const ReportBase = memo(function Report({ projectId = null, appSessionId, messages = {}, isSmallScreen = false, isExecutionRunning = false, isReportNotFound = false, reportNotFoundMissingItems, isReportTooLargeToCompute = false, isReportTooLargeToDisplay = false, isInvalidConfiguration = false, isReportWithFiltersEmpty = false, isReportWithoutFiltersEmpty = false, isBadRequest = false, isReportProtected = false, isMissingLocation = false, isMissingArea = false, isMissingMetric = false, isMissingColumns = false, isExecutable = false, isComputingShortcut = false, isNoMetricSupported, hasNegativeValue = false, unsupportedConfiguration = false, hasReportLoadingError = false, customError = null, }) {
27
+ export const ReportBase = memo(function Report({ projectId = null, appSessionId, messages = {}, isSmallScreen = false, isExecutionRunning = false, isReportNotFound = false, reportNotFoundMissingItems, isReportTooLargeToCompute = false, isReportTooLargeToDisplay = false, isInvalidConfiguration = false, isReportWithFiltersEmpty = false, isReportWithoutFiltersEmpty = false, isBadRequest = false, isReportProtected = false, isMissingLocation = false, isMissingArea = false, isMissingMetric = false, isMissingColumns = false, isExecutable = false, isComputingShortcut = false, isNoMetricSupported, hasNegativeValue = false, unsupportedConfiguration = false, hasReportLoadingError = false, customError = null, isExecutionProgressEnabled = false, }) {
25
28
  const getReportErrorComponent = () => {
26
29
  if (hasReportLoadingError) {
27
30
  return ReportBlank; // we do not render specific error for now, only red toast message
@@ -79,10 +82,16 @@ export const ReportBase = memo(function Report({ projectId = null, appSessionId,
79
82
  const ErrorComponent = getReportErrorComponent();
80
83
  const className = classNames({
81
84
  "invisible-report-visualization": ErrorComponent !== null,
85
+ "adi-execution-stats-enabled": isExecutionProgressEnabled,
82
86
  });
83
- return (_jsxs("div", { className: className, children: [ErrorComponent === ReportNotFound ? (_jsx(ReportNotFound, { missingItems: reportNotFoundMissingItems })) : ErrorComponent === null ? null : (_jsx(ErrorComponent, { isSmallScreen: isSmallScreen })), _jsx(ReportVisualization, { projectId: projectId, appSessionId: appSessionId, messages: messages }, appSessionId)] }));
87
+ // The progress panel takes the spinner's place while the report executes. It stays mounted
88
+ // whatever the outcome is (visualization, empty or error state), and overlays it for a moment
89
+ // after the execution settled so the final progress is readable; it renders nothing otherwise.
90
+ const replacesSpinner = isExecutionProgressEnabled && ErrorComponent === ReportComputing && isExecutionRunning;
91
+ return (_jsxs("div", { className: className, children: [isExecutionProgressEnabled ? (_jsxs(_Fragment, { children: [_jsx(ExecutionProgressPanel, { isExecutionRunning: isExecutionRunning }), isExecutable ? _jsx(ExecutionStats, { isExecutionRunning: isExecutionRunning }) : null] })) : null, replacesSpinner ? null : ErrorComponent === ReportNotFound ? (_jsx(ReportNotFound, { missingItems: reportNotFoundMissingItems })) : ErrorComponent === null ? null : (_jsx(ErrorComponent, { isSmallScreen: isSmallScreen })), _jsx(ReportVisualization, { projectId: projectId, appSessionId: appSessionId, messages: messages }, appSessionId)] }));
84
92
  });
85
93
  export function Report({ isSmallScreen }) {
86
94
  const reportProps = useSelector(reportSelector);
87
- return _jsx(ReportBase, { ...reportProps, isSmallScreen: isSmallScreen });
95
+ const executionProgressEnabled = useSelector(isExecutionProgressEnabled);
96
+ return (_jsx(ReportBase, { ...reportProps, isSmallScreen: isSmallScreen, isExecutionProgressEnabled: executionProgressEnabled }));
88
97
  }
@@ -42,7 +42,7 @@ export function SaveReportFromKDDialog() {
42
42
  if (!openSaveReportFromKD) {
43
43
  return null;
44
44
  }
45
- const isUsedInDocuments = insightUsedInDocuments.length > 0;
45
+ const isUsedInDocuments = insightUsedInDocuments.allDocumentsCount > 0;
46
46
  const isUpdateMode = () => state.saveOption === DIALOG_UPDATE_MODE;
47
47
  const isSaveAsNewMode = () => state.saveOption === DIALOG_CREATE_MODE;
48
48
  const handleSaveOptionChange = (e) => {
@@ -12,6 +12,7 @@ import { type IDateFilterOption } from "../dateFilterOptionFactory.js";
12
12
  * @param allRelativeDateFilterPresets -
13
13
  * @param selectedDateDataset -
14
14
  * @param dateDatasetRefsWithGranularities -
15
+ * @param isSecondsGranularityEnabled - whether the seconds granularity is supported
15
16
  */
16
17
  export declare const useSupportedDateFilterPresets: (allRelativeDateFilterPresets: DateFilterRelativeOptionGroup, selectedDateDataset: IDecoratedDateDataset, dateDatasetRefsWithGranularities: IDateDatasetRefWithGranularities[], isSecondsGranularityEnabled: boolean) => {
17
18
  supportedDateFilterPresets: DateFilterRelativeOptionGroup;
@@ -1 +1 @@
1
- {"version":3,"file":"supportedPresetsHook.d.ts","sourceRoot":"","sources":["../../../../../src/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,qBAAqB,EAI7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,EAErC,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,iCACR,6BAA6B,uBACtC,qBAAqB,oCACR,gCAAgC,EAAE,+BACvC,OAAO;gCAGJ,6BAA6B;yCACpB,qBAAqB,EAAE;CAkCnE,CAAC;AAkBF;;;;;;;GAOG;AACH,eAAO,MAAM,0CAA0C,mBACnC,gBAAgB,8BACJ,6BAA6B,iBAC1C,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,SAOrD,CAAC;AAYF;;;;;;;GAOG;AACH,eAAO,MAAM,iDAAiD,mBAC1C,gBAAgB,uCACK,qBAAqB,EAAE,iBAC7C,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,SAOrD,CAAC"}
1
+ {"version":3,"file":"supportedPresetsHook.d.ts","sourceRoot":"","sources":["../../../../../src/components/filterBar/dateFilter/PresetSection/supportedPresetsHook.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,qBAAqB,EAI7B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,6BAA6B,EAErC,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAC1F,OAAO,EAAE,KAAK,gCAAgC,EAAE,MAAM,iCAAiC,CAAC;AACxF,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGvE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,6BAA6B,iCACR,6BAA6B,uBACtC,qBAAqB,oCACR,gCAAgC,EAAE,+BACvC,OAAO;gCAGJ,6BAA6B;yCACpB,qBAAqB,EAAE;CAkCnE,CAAC;AAkBF;;;;;;;GAOG;AACH,eAAO,MAAM,0CAA0C,mBACnC,gBAAgB,8BACJ,6BAA6B,iBAC1C,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,SAOrD,CAAC;AAYF;;;;;;;GAOG;AACH,eAAO,MAAM,iDAAiD,mBAC1C,gBAAgB,uCACK,qBAAqB,EAAE,iBAC7C,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,SAOrD,CAAC"}
@@ -13,6 +13,7 @@ import { ALL_TIME_FILTER_OPTION, RELATIVE_PERIOD_FILTER_OPTION } from "../defaul
13
13
  * @param allRelativeDateFilterPresets -
14
14
  * @param selectedDateDataset -
15
15
  * @param dateDatasetRefsWithGranularities -
16
+ * @param isSecondsGranularityEnabled - whether the seconds granularity is supported
16
17
  */
17
18
  export const useSupportedDateFilterPresets = (allRelativeDateFilterPresets, selectedDateDataset, dateDatasetRefsWithGranularities, isSecondsGranularityEnabled) => {
18
19
  return useMemo(() => {
@@ -4,6 +4,7 @@ import { type IAnalyticalDesignerEditorActionsProps, type IAnalyticalDesignerHea
4
4
  * The EditorActions region with the slots of the controls AD shows resolved. A control AD does not show for its
5
5
  * permissions, configuration or mode is not in the items, so its slot does not render.
6
6
  *
7
+ * @param context - the header context
7
8
  * @param onChangeTimezone - opens the time zone dialog owned by the header
8
9
  */
9
10
  export declare function useEditorActions(context: IAnalyticalDesignerHeaderContext, onChangeTimezone: () => void): ReactElement;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorActions.d.ts","sourceRoot":"","sources":["../../../src/components/header/EditorActions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,EAEH,KAAK,qCAAqC,EAC1C,KAAK,gCAAgC,EACxC,MAAM,0CAA0C,CAAC;AAuBlD;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC5B,OAAO,EAAE,gCAAgC,EACzC,gBAAgB,EAAE,MAAM,IAAI,GAC7B,YAAY,CA+Cd;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,qCAAqC,2CAQpF"}
1
+ {"version":3,"file":"EditorActions.d.ts","sourceRoot":"","sources":["../../../src/components/header/EditorActions.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,EAEH,KAAK,qCAAqC,EAC1C,KAAK,gCAAgC,EACxC,MAAM,0CAA0C,CAAC;AAuBlD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC5B,OAAO,EAAE,gCAAgC,EACzC,gBAAgB,EAAE,MAAM,IAAI,GAC7B,YAAY,CA+Cd;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE,qCAAqC,2CAQpF"}
@@ -17,6 +17,7 @@ import { DefaultUndoRedo, useUndoRedoProps } from "./UndoRedoButtons.js";
17
17
  * The EditorActions region with the slots of the controls AD shows resolved. A control AD does not show for its
18
18
  * permissions, configuration or mode is not in the items, so its slot does not render.
19
19
  *
20
+ * @param context - the header context
20
21
  * @param onChangeTimezone - opens the time zone dialog owned by the header
21
22
  */
22
23
  export function useEditorActions(context, onChangeTimezone) {
@@ -15,6 +15,7 @@ export declare const OPTIONS_ITEM_IDS: {
15
15
  /**
16
16
  * Props of the Options slot.
17
17
  *
18
+ * @param context - the header context
18
19
  * @param onChangeTimezone - opens the time zone dialog, which the editor actions own so that it opens for a
19
20
  * host's own Options menu too
20
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useOptionsProps.d.ts","sourceRoot":"","sources":["../../../../src/components/header/OptionsMenu/useOptionsProps.ts"],"names":[],"mappings":"AAYA,OAAO,EACH,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACvC,MAAM,6CAA6C,CAAC;AA0BrD;;GAEG;AACH,eAAO,MAAM,gBAAgB;aACzB,wBAAwB,EAAE,0BAA0B;aACpD,aAAa,EAAE,eAAe;aAC9B,UAAU,EAAE,YAAY;aACxB,SAAS,EAAE,WAAW;aACtB,SAAS,EAAE,WAAW;aACtB,YAAY,EAAE,cAAc;aAC5B,iBAAiB,EAAE,mBAAmB;aACtC,cAAc,EAAE,gBAAgB;CAC1B,CAAC;AA4BX;;;;;GAKG;AACH,wBAAgB,eAAe,CAC3B,OAAO,EAAE,gCAAgC,EACzC,gBAAgB,EAAE,MAAM,IAAI,GAC7B,+BAA+B,CA4IjC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,SAAS,6BAA6B,EAAE,GAChD,6BAA6B,EAAE,CAkBjC"}
1
+ {"version":3,"file":"useOptionsProps.d.ts","sourceRoot":"","sources":["../../../../src/components/header/OptionsMenu/useOptionsProps.ts"],"names":[],"mappings":"AAYA,OAAO,EACH,KAAK,6BAA6B,EAClC,KAAK,gCAAgC,EACrC,KAAK,+BAA+B,EACvC,MAAM,6CAA6C,CAAC;AA0BrD;;GAEG;AACH,eAAO,MAAM,gBAAgB;aACzB,wBAAwB,EAAE,0BAA0B;aACpD,aAAa,EAAE,eAAe;aAC9B,UAAU,EAAE,YAAY;aACxB,SAAS,EAAE,WAAW;aACtB,SAAS,EAAE,WAAW;aACtB,YAAY,EAAE,cAAc;aAC5B,iBAAiB,EAAE,mBAAmB;aACtC,cAAc,EAAE,gBAAgB;CAC1B,CAAC;AA4BX;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC3B,OAAO,EAAE,gCAAgC,EACzC,gBAAgB,EAAE,MAAM,IAAI,GAC7B,+BAA+B,CA4IjC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACjC,KAAK,EAAE,SAAS,6BAA6B,EAAE,GAChD,6BAA6B,EAAE,CAkBjC"}
@@ -43,6 +43,7 @@ const noBubbleText = (_intl) => "";
43
43
  /**
44
44
  * Props of the Options slot.
45
45
  *
46
+ * @param context - the header context
46
47
  * @param onChangeTimezone - opens the time zone dialog, which the editor actions own so that it opens for a
47
48
  * host's own Options menu too
48
49
  */
@@ -0,0 +1,12 @@
1
+ export interface IExecutionProgressPanelProps {
2
+ isExecutionRunning: boolean;
3
+ }
4
+ /**
5
+ * The loading view of the report execution, in place of the computing spinner: the "Rendering
6
+ * visualisation" header, with the sub-steps appended below it (revealed one by one) when the data comes
7
+ * from the data source. Falls back to the spinner when no progress arrives.
8
+ *
9
+ * Everything sits in one fixed-width box, so the block keeps its place while the text changes.
10
+ */
11
+ export declare function ExecutionProgressPanel({ isExecutionRunning }: IExecutionProgressPanelProps): import("react/jsx-runtime").JSX.Element | null;
12
+ //# sourceMappingURL=ExecutionProgressPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionProgressPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/report/executionProgress/ExecutionProgressPanel.tsx"],"names":[],"mappings":"AA4CA,MAAM,WAAW,4BAA4B;IACzC,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,kBAAkB,EAAE,EAAE,4BAA4B,kDA8C1F"}
@@ -0,0 +1,157 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { useEffect, useMemo, useState } from "react";
4
+ import classNames from "classnames";
5
+ import { useIntl } from "react-intl";
6
+ import { useSelector } from "react-redux";
7
+ import { UiAiThinkingIcon, UiIconButton } from "@gooddata/sdk-ui-kit";
8
+ import { advanceStepReveal, buildExecutionLoadingViewModel, initialStepRevealState, loadingStepDuration, nextStepRevealAt, revealedLoadingSteps, } from "../../../store/execution_progress/execution_loading_view_model.js";
9
+ import { getExecutionProgressViewModel } from "../../../store/execution_progress/execution_progress_selectors.js";
10
+ import { ReportComputing } from "../ReportComputing.js";
11
+ import { dataSourceLabel } from "./ExecutionProgressSteps.js";
12
+ import { computeGanttBars } from "./timeline.js";
13
+ /** no progress event by then: the generic spinner is shown instead */
14
+ const NO_EVENT_FALLBACK_MS = 1500;
15
+ /** the stream may lag behind a settled report execution at most this long */
16
+ const MAX_STREAM_LAG_MS = 10_000;
17
+ const TICK_MS = 250;
18
+ function useNow(enabled) {
19
+ const [now, setNow] = useState(() => Date.now());
20
+ useEffect(() => {
21
+ if (!enabled) {
22
+ return undefined;
23
+ }
24
+ setNow(Date.now());
25
+ const timer = setInterval(() => setNow(Date.now()), TICK_MS);
26
+ return () => clearInterval(timer);
27
+ }, [enabled]);
28
+ return now;
29
+ }
30
+ /**
31
+ * The loading view of the report execution, in place of the computing spinner: the "Rendering
32
+ * visualisation" header, with the sub-steps appended below it (revealed one by one) when the data comes
33
+ * from the data source. Falls back to the spinner when no progress arrives.
34
+ *
35
+ * Everything sits in one fixed-width box, so the block keeps its place while the text changes.
36
+ */
37
+ export function ExecutionProgressPanel({ isExecutionRunning }) {
38
+ const viewModel = useSelector(getExecutionProgressViewModel);
39
+ // the view follows a stream that lags behind the settled report (e.g. a mocked stream); a
40
+ // finished stream closes it at once — there is no hold after the finish
41
+ const streamLagging = !viewModel.unavailable &&
42
+ viewModel.hasEvents &&
43
+ (viewModel.phase === "running" || viewModel.phase === "waiting") &&
44
+ viewModel.reportFinishedAt !== undefined &&
45
+ Date.now() - viewModel.reportFinishedAt < MAX_STREAM_LAG_MS;
46
+ const active = isExecutionRunning || streamLagging;
47
+ const now = useNow(active);
48
+ // the view re-renders on every tick; the steps change only with the progress
49
+ const loading = useMemo(() => buildExecutionLoadingViewModel(viewModel), [viewModel]);
50
+ if (!active) {
51
+ return null;
52
+ }
53
+ const showsProgress = viewModel.source === "browserCache" ||
54
+ viewModel.hasEvents ||
55
+ (!viewModel.unavailable &&
56
+ (viewModel.reportStartedAt === undefined ||
57
+ now - viewModel.reportStartedAt < NO_EVENT_FALLBACK_MS));
58
+ if (!showsProgress) {
59
+ return isExecutionRunning ? _jsx(ReportComputing, {}) : null;
60
+ }
61
+ return (_jsx("div", { className: "adi-execution-progress s-execution-progress", "data-phase": viewModel.phase, "data-mode": loading.mode, "data-cache-hit": viewModel.cacheHit || viewModel.source === "browserCache" ? "true" : undefined, children: _jsx("div", { className: "adi-execution-progress-box", children: _jsx(LoadingSteps, { steps: loading.steps, serverNow: now - viewModel.clockOffsetMs }, viewModel.reportStartedAt ?? "none") }) }));
62
+ }
63
+ const COLLAPSED_STORAGE_KEY = "adi-execution-progress-collapsed";
64
+ function readCollapsed() {
65
+ try {
66
+ return window.localStorage?.getItem(COLLAPSED_STORAGE_KEY) === "true";
67
+ }
68
+ catch {
69
+ return false;
70
+ }
71
+ }
72
+ function writeCollapsed(collapsed) {
73
+ try {
74
+ window.localStorage?.setItem(COLLAPSED_STORAGE_KEY, String(collapsed));
75
+ }
76
+ catch {
77
+ // a convenience only: without storage the state is not remembered
78
+ }
79
+ }
80
+ /**
81
+ * The persistent "Rendering visualisation" header with the animated sparkle and, once there are
82
+ * sub-steps, the collapse toggle; below it the sub-steps revealed so far in chronological order, at
83
+ * least STEP_REVEAL_GAP_MS apart even when they started together.
84
+ */
85
+ function LoadingSteps({ steps, serverNow }) {
86
+ const intl = useIntl();
87
+ const [reveal, setReveal] = useState(initialStepRevealState);
88
+ const [collapsed, setCollapsed] = useState(readCollapsed);
89
+ const started = steps.length;
90
+ useEffect(() => {
91
+ const dueAt = nextStepRevealAt(reveal, started);
92
+ if (dueAt === undefined) {
93
+ return undefined;
94
+ }
95
+ const timer = setTimeout(() => setReveal((current) => advanceStepReveal(current, started, Date.now())), Math.max(0, dueAt - Date.now()));
96
+ return () => clearTimeout(timer);
97
+ }, [reveal, started]);
98
+ const shown = revealedLoadingSteps(steps, Math.min(reveal.revealed, started));
99
+ const header = intl.formatMessage({ id: "executionProgress.loading.render" });
100
+ const toggleLabel = collapsed
101
+ ? intl.formatMessage({ id: "executionProgress.toggle.expand" })
102
+ : intl.formatMessage({ id: "executionProgress.toggle.collapse" });
103
+ const toggle = () => {
104
+ setCollapsed(!collapsed);
105
+ writeCollapsed(!collapsed);
106
+ };
107
+ // only the step transitions are announced, not the ticking durations or the toggle
108
+ const latest = shown[shown.length - 1];
109
+ const announcement = latest ? loadingStepLabel(intl, latest) : header;
110
+ return (_jsxs(_Fragment, { children: [_jsx("span", { className: "sr-only", role: "status", "aria-live": "polite", children: announcement }), _jsxs("div", { className: "adi-execution-progress-header s-execution-progress-header", children: [_jsx("span", { className: "adi-execution-progress-step-marker", children: _jsx(UiAiThinkingIcon, {}) }), _jsx("span", { className: "adi-execution-progress-header-label", title: header, children: header }), shown.length > 0 ? (_jsx("span", { className: "adi-execution-progress-toggle", children: _jsx(UiIconButton, { icon: collapsed ? "chevronDown" : "chevronUp", size: "medium", variant: "tertiary", label: toggleLabel, onClick: toggle, dataTestId: "s-execution-progress-toggle", ariaAttributes: { role: "button", "aria-expanded": !collapsed } }) })) : null] }), shown.length > 0 && !collapsed ? (_jsx("ol", { className: "adi-execution-progress-list s-execution-progress-list", children: shown.map((step) => (_jsx(LoadingStep, { step: step, serverNow: serverNow }, step.kind))) })) : null] }));
111
+ }
112
+ function LoadingStep({ step, serverNow }) {
113
+ const intl = useIntl();
114
+ const duration = loadingStepDuration(step, serverNow);
115
+ const label = loadingStepLabel(intl, step);
116
+ return (_jsxs("li", { className: classNames("adi-execution-progress-step", "s-execution-progress-step", `s-execution-progress-step-${step.kind}`, `is-${step.state}`), "data-step": step.kind, "data-state": step.state, children: [_jsxs("div", { className: "adi-execution-progress-step-row", children: [_jsx("span", { className: "adi-execution-progress-step-marker", "aria-hidden": "true", children: _jsx("span", { className: "adi-execution-progress-dot" }) }), _jsx("span", { className: "adi-execution-progress-step-label", title: label, children: label }), _jsx("span", { className: "adi-execution-progress-step-duration s-execution-progress-step-duration", children: duration ?? "" })] }), step.kind === "query" && step.sources && step.sources.length > 1 ? (_jsx(LoadingSources, { step: step, serverNow: serverNow })) : null] }));
117
+ }
118
+ function loadingStepLabel(intl, step) {
119
+ switch (step.kind) {
120
+ case "cache":
121
+ return intl.formatMessage({ id: "executionProgress.loading.cache" });
122
+ case "prepare":
123
+ return intl.formatMessage({ id: "executionProgress.loading.prepare" });
124
+ case "query":
125
+ return step.dataSourceId && !(step.sources && step.sources.length > 1)
126
+ ? intl.formatMessage({ id: "executionProgress.loading.query.dataSource" }, { dataSource: dataSourceLabel(step.dataSourceId, step.dataSourceName) })
127
+ : intl.formatMessage({ id: "executionProgress.loading.query" });
128
+ case "render":
129
+ return intl.formatMessage({ id: "executionProgress.loading.render" });
130
+ default:
131
+ return "";
132
+ }
133
+ }
134
+ /** the federated data sources: one row each, the slowest highlighted */
135
+ function LoadingSources({ step, serverNow }) {
136
+ const intl = useIntl();
137
+ const sources = step.sources ?? [];
138
+ const spanStart = step.startedAt ?? serverNow;
139
+ const spanEnd = step.finishedAt ?? serverNow;
140
+ const bars = new Map(computeGanttBars(sources.map((source) => ({
141
+ id: source.resultId,
142
+ startedAt: source.startedAt,
143
+ finishedAt: source.finishedAt,
144
+ })), spanStart, spanEnd).map((bar) => [bar.id, bar]));
145
+ const slowest = sources.find((source) => source.resultId === step.slowestSourceResultId);
146
+ const waitingOn = step.state === "running" && slowest?.dataSourceId
147
+ ? intl.formatMessage({ id: "executionProgress.waitingOn" }, { dataSource: dataSourceLabel(slowest.dataSourceId, slowest.dataSourceName) })
148
+ : undefined;
149
+ return (_jsxs("div", { className: "adi-execution-progress-federation", children: [waitingOn ? (_jsx("div", { className: "adi-execution-progress-waiting s-execution-progress-waiting", title: waitingOn, children: waitingOn })) : null, _jsx("ul", { className: "adi-execution-progress-sources", children: sources.map((source) => {
150
+ const bar = bars.get(source.resultId);
151
+ const duration = loadingStepDuration(source, serverNow);
152
+ const name = source.dataSourceId
153
+ ? dataSourceLabel(source.dataSourceId, source.dataSourceName)
154
+ : source.resultId;
155
+ return (_jsxs("li", { className: classNames("adi-execution-progress-source", "s-execution-progress-source", `is-${source.state}`, { "is-slowest": source.resultId === step.slowestSourceResultId }), "data-data-source": source.dataSourceId, "data-state": source.state, children: [_jsx("span", { className: "adi-execution-progress-source-name", title: name, children: name }), _jsx("span", { className: "adi-execution-progress-source-track", children: bar ? (_jsx("span", { className: "adi-execution-progress-source-bar", style: { left: `${bar.offsetPct}%`, width: `${bar.widthPct}%` } })) : null }), _jsx("span", { className: "adi-execution-progress-source-duration", children: duration ?? "" })] }, source.resultId));
156
+ }) })] }));
157
+ }
@@ -0,0 +1,17 @@
1
+ import { type ExecutionCacheSaving, type IExecutionProgressStepViewModel } from "../../../store/execution_progress/execution_progress_view_model.js";
2
+ /** the largest whole unit of a time span in the past, e.g. [-2, "hour"] */
3
+ export declare function toRelativeTime(agoMs: number): [number, Intl.RelativeTimeFormatUnit];
4
+ export declare function ExecutionProgressSteps({ steps, serverNow, }: {
5
+ steps: IExecutionProgressStepViewModel[];
6
+ serverNow: number;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ /** the display name of a data source; its id when the backend could not resolve the name */
9
+ export declare function dataSourceLabel(dataSourceId: string, dataSourceName?: string): string;
10
+ /** the original end-to-end time; "~" when it ends before the post-processing */
11
+ export declare function formatOriginalTotal(totalDurationMs: number, approximate?: boolean): string;
12
+ /** what a cache hit saved: the time when it is meaningful, otherwise the queries not run */
13
+ export declare function CacheSaving({ saving, className }: {
14
+ saving: ExecutionCacheSaving;
15
+ className: string;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ //# sourceMappingURL=ExecutionProgressSteps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionProgressSteps.d.ts","sourceRoot":"","sources":["../../../../src/components/report/executionProgress/ExecutionProgressSteps.tsx"],"names":[],"mappings":"AAOA,OAAO,EACH,KAAK,oBAAoB,EAEzB,KAAK,+BAA+B,EACvC,MAAM,oEAAoE,CAAC;AAc5E,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,sBAAsB,CAAC,CAInF;AAED,wBAAgB,sBAAsB,CAAC,EACnC,KAAK,EACL,SAAS,GACZ,EAAE;IACC,KAAK,EAAE,+BAA+B,EAAE,CAAC;IACzC,SAAS,EAAE,MAAM,CAAC;CACrB,2CA6BA;AA4LD,4FAA4F;AAC5F,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAErF;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAE1F;AAmDD,4FAA4F;AAC5F,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;IAAE,MAAM,EAAE,oBAAoB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,2CAmBrG"}
@@ -0,0 +1,122 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ import { FormattedMessage, useIntl } from "react-intl";
4
+ import { computeGanttBars, computeSegments, formatDuration } from "./timeline.js";
5
+ // The detailed step list of an execution (timeline, steps, federation bars, query breakdown) and
6
+ // helpers shared by the execution stats popover.
7
+ const RELATIVE_UNITS = [
8
+ ["day", 24 * 60 * 60 * 1000],
9
+ ["hour", 60 * 60 * 1000],
10
+ ["minute", 60 * 1000],
11
+ ["second", 1000],
12
+ ];
13
+ /** the largest whole unit of a time span in the past, e.g. [-2, "hour"] */
14
+ export function toRelativeTime(agoMs) {
15
+ const ms = Math.max(agoMs, 0);
16
+ const [unit, size] = RELATIVE_UNITS.find(([, unitMs]) => ms >= unitMs) ?? RELATIVE_UNITS[3];
17
+ return [-Math.floor(ms / size), unit];
18
+ }
19
+ export function ExecutionProgressSteps({ steps, serverNow, }) {
20
+ const segments = computeSegments(steps.map((step) => ({ id: step.kind, startedAt: step.startedAt, finishedAt: step.finishedAt })), serverNow);
21
+ const stateByKind = new Map(steps.map((step) => [step.kind, step.state]));
22
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: "adi-execution-progress-timeline", "aria-hidden": "true", children: segments.map((segment) => (_jsx("div", { className: classNames("adi-execution-progress-timeline-segment", `is-${segment.id}`, `is-${stateByKind.get(segment.id)}`), style: { width: `${segment.widthPct}%` } }, segment.id))) }), _jsx("ol", { className: "adi-execution-progress-steps", children: steps.map((step) => (_jsx(Step, { step: step, serverNow: serverNow }, step.kind))) })] }));
23
+ }
24
+ function Step({ step, serverNow }) {
25
+ const durationMs = step.startedAt === undefined ? undefined : (step.finishedAt ?? serverNow) - step.startedAt;
26
+ return (_jsxs("li", { className: classNames("adi-execution-progress-step", "s-execution-progress-step", `s-execution-progress-step-${step.kind}`, `is-${step.state}`), "data-step": step.kind, "data-state": step.state, children: [_jsxs("div", { className: "adi-execution-progress-step-row", children: [_jsx("span", { className: "adi-execution-progress-step-indicator", "aria-hidden": "true" }), _jsx("span", { className: "adi-execution-progress-step-label", children: _jsx(StepLabel, { step: step }) }), step.state === "running" && step.kind === "federation" ? _jsx(WaitingOn, { step: step }) : null, _jsx("span", { className: "adi-execution-progress-step-duration", children: durationMs === undefined ? "" : formatDuration(durationMs) })] }), step.kind === "federation" && step.sources ? (_jsx(FederationSources, { step: step, serverNow: serverNow })) : null, step.kind === "query" && step.state === "done" && step.queryBreakdown ? (_jsx(QueryBreakdown, { breakdown: step.queryBreakdown })) : null] }));
27
+ }
28
+ function StepLabel({ step }) {
29
+ switch (step.kind) {
30
+ case "preparing":
31
+ return _jsx(FormattedMessage, { id: "executionProgress.step.preparing" });
32
+ case "sqlGeneration":
33
+ return _jsx(FormattedMessage, { id: "executionProgress.step.sqlGeneration" });
34
+ case "federation":
35
+ return (_jsx(FormattedMessage, { id: "executionProgress.step.federation", values: { count: step.sources?.length ?? 0 } }));
36
+ case "query":
37
+ if (step.cacheHit) {
38
+ return _jsx(FormattedMessage, { id: "executionProgress.step.query.rawCache" });
39
+ }
40
+ return step.dataSourceId ? (_jsx(FormattedMessage, { id: "executionProgress.step.query", values: {
41
+ dataSource: (_jsx("strong", { title: step.dataSourceId, children: dataSourceLabel(step.dataSourceId, step.dataSourceName) })),
42
+ } })) : (_jsx(FormattedMessage, { id: "executionProgress.step.query.unknown" }));
43
+ case "postprocessing":
44
+ return step.postprocessingTypes && step.postprocessingTypes.length > 0 ? (_jsx(FormattedMessage, { id: "executionProgress.step.postprocessing.types", values: { types: step.postprocessingTypes.join(", ") } })) : (_jsx(FormattedMessage, { id: "executionProgress.step.postprocessing" }));
45
+ default:
46
+ return null;
47
+ }
48
+ }
49
+ function WaitingOn({ step }) {
50
+ const slowest = step.sources?.find((source) => source.resultId === step.slowestSourceResultId);
51
+ if (!slowest?.dataSourceId) {
52
+ return null;
53
+ }
54
+ return (_jsx("span", { className: "adi-execution-progress-waiting s-execution-progress-waiting", title: slowest.dataSourceId, children: _jsx(FormattedMessage, { id: "executionProgress.waitingOn", values: { dataSource: dataSourceLabel(slowest.dataSourceId, slowest.dataSourceName) } }) }));
55
+ }
56
+ function FederationSources({ step, serverNow, }) {
57
+ const intl = useIntl();
58
+ const sources = step.sources ?? [];
59
+ const spanStart = step.startedAt ?? serverNow;
60
+ const spanEnd = step.finishedAt ?? serverNow;
61
+ const bars = new Map(computeGanttBars(sources.map((source) => ({
62
+ id: source.resultId,
63
+ startedAt: source.startedAt,
64
+ finishedAt: source.finishedAt,
65
+ })), spanStart, spanEnd).map((bar) => [bar.id, bar]));
66
+ return (_jsx("ul", { className: "adi-execution-progress-sources", children: sources.map((source) => {
67
+ const bar = bars.get(source.resultId);
68
+ const isSlowest = source.resultId === step.slowestSourceResultId && sources.length > 1;
69
+ const durationMs = source.startedAt === undefined
70
+ ? undefined
71
+ : (source.finishedAt ?? serverNow) - source.startedAt;
72
+ const queuedPct = source.queuedMs !== undefined && durationMs
73
+ ? Math.min((source.queuedMs / durationMs) * 100, 100)
74
+ : 0;
75
+ return (_jsxs("li", { className: classNames("adi-execution-progress-source", "s-execution-progress-source", `is-${source.state}`, { "is-slowest": isSlowest }), "data-data-source": source.dataSourceId, "data-state": source.state, children: [_jsx("span", { className: "adi-execution-progress-source-name", title: source.dataSourceId, children: source.dataSourceId
76
+ ? dataSourceLabel(source.dataSourceId, source.dataSourceName)
77
+ : source.resultId }), _jsx("span", { className: "adi-execution-progress-source-track", children: bar ? (_jsx("span", { className: "adi-execution-progress-source-bar", style: { left: `${bar.offsetPct}%`, width: `${bar.widthPct}%` }, children: queuedPct > 0 ? (_jsx("span", { className: "adi-execution-progress-source-bar-queued", style: { width: `${queuedPct}%` } })) : null })) : null }), _jsxs("span", { className: "adi-execution-progress-source-duration", children: [source.cacheHit
78
+ ? intl.formatMessage({ id: "executionProgress.source.cacheHit" })
79
+ : durationMs === undefined
80
+ ? ""
81
+ : formatDuration(durationMs), source.queuedMs === undefined
82
+ ? ""
83
+ : ` · ${intl.formatMessage({ id: "executionProgress.source.queued" }, { duration: formatDuration(source.queuedMs) })}`] })] }, source.resultId));
84
+ }) }));
85
+ }
86
+ /** the display name of a data source; its id when the backend could not resolve the name */
87
+ export function dataSourceLabel(dataSourceId, dataSourceName) {
88
+ return dataSourceName || dataSourceId;
89
+ }
90
+ /** the original end-to-end time; "~" when it ends before the post-processing */
91
+ export function formatOriginalTotal(totalDurationMs, approximate) {
92
+ return `${approximate ? "~" : ""}${formatDuration(totalDurationMs)}`;
93
+ }
94
+ const QUERY_PARTS = [
95
+ { part: "waiting", key: "waitingMs", label: _jsx(FormattedMessage, { id: "executionProgress.query.waiting" }) },
96
+ {
97
+ part: "database",
98
+ key: "databaseMs",
99
+ label: _jsx(FormattedMessage, { id: "executionProgress.query.database" }),
100
+ },
101
+ {
102
+ part: "transfer",
103
+ key: "transferMs",
104
+ label: _jsx(FormattedMessage, { id: "executionProgress.query.transfer" }),
105
+ },
106
+ ];
107
+ /** where the time of the finished query went: the parts add up to the step's duration */
108
+ function QueryBreakdown({ breakdown }) {
109
+ const totalMs = breakdown.waitingMs + breakdown.databaseMs + breakdown.transferMs;
110
+ let offsetMs = 0;
111
+ return (_jsx("ul", { className: "adi-execution-progress-sources adi-execution-progress-query-breakdown s-execution-progress-query-breakdown", children: QUERY_PARTS.map(({ part, key, label }) => {
112
+ const durationMs = breakdown[key];
113
+ const offsetPct = totalMs > 0 ? (offsetMs / totalMs) * 100 : 0;
114
+ const widthPct = totalMs > 0 ? Math.max((durationMs / totalMs) * 100, 0.5) : 0;
115
+ offsetMs += durationMs;
116
+ return (_jsxs("li", { className: `adi-execution-progress-source adi-execution-progress-query-part is-${part} s-execution-progress-query-part`, "data-part": part, "data-duration-ms": durationMs, children: [_jsx("span", { className: "adi-execution-progress-source-name", children: label }), _jsx("span", { className: "adi-execution-progress-source-track", children: _jsx("span", { className: "adi-execution-progress-source-bar", style: { left: `${Math.min(offsetPct, 99.5)}%`, width: `${widthPct}%` } }) }), _jsx("span", { className: "adi-execution-progress-source-duration", children: formatDuration(durationMs) })] }, part));
117
+ }) }));
118
+ }
119
+ /** what a cache hit saved: the time when it is meaningful, otherwise the queries not run */
120
+ export function CacheSaving({ saving, className }) {
121
+ return (_jsx("div", { className: classNames("adi-execution-progress-original-saved", className), "data-saved-ms": saving.kind === "time" ? saving.savedMs : undefined, children: saving.kind === "time" ? (_jsx(FormattedMessage, { id: "executionProgress.original.saved", values: { duration: formatOriginalTotal(saving.savedMs, saving.approximate) } })) : (_jsx(FormattedMessage, { id: "executionProgress.original.savedQueries", values: { count: saving.count } })) }));
122
+ }
@@ -0,0 +1,10 @@
1
+ export interface IExecutionStatsProps {
2
+ isExecutionRunning: boolean;
3
+ }
4
+ /**
5
+ * The stats of the last report execution, kept after the loading view closed: a small link at the
6
+ * bottom right of the canvas ("Live data" / "Saved result") with a one-line summary on hover and the
7
+ * details on click.
8
+ */
9
+ export declare function ExecutionStats({ isExecutionRunning }: IExecutionStatsProps): import("react/jsx-runtime").JSX.Element | null;
10
+ //# sourceMappingURL=ExecutionStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutionStats.d.ts","sourceRoot":"","sources":["../../../../src/components/report/executionProgress/ExecutionStats.tsx"],"names":[],"mappings":"AAuBA,MAAM,WAAW,oBAAoB;IACjC,kBAAkB,EAAE,OAAO,CAAC;CAC/B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAAE,kBAAkB,EAAE,EAAE,oBAAoB,kDA8D1E"}
@@ -0,0 +1,105 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { useState } from "react";
4
+ import { FormattedMessage, useIntl } from "react-intl";
5
+ import { useDispatch, useSelector } from "react-redux";
6
+ import { UiIcon, UiPopover, UiTooltip } from "@gooddata/sdk-ui-kit";
7
+ import { executionStatsOpened } from "../../../store/execution_progress/execution_progress_actions.js";
8
+ import { getExecutionStatsViewModel } from "../../../store/execution_progress/execution_progress_selectors.js";
9
+ import { CacheSaving, ExecutionProgressSteps, dataSourceLabel, formatOriginalTotal, toRelativeTime, } from "./ExecutionProgressSteps.js";
10
+ import { formatDuration } from "./timeline.js";
11
+ /**
12
+ * The stats of the last report execution, kept after the loading view closed: a small link at the
13
+ * bottom right of the canvas ("Live data" / "Saved result") with a one-line summary on hover and the
14
+ * details on click.
15
+ */
16
+ export function ExecutionStats({ isExecutionRunning }) {
17
+ const intl = useIntl();
18
+ const dispatch = useDispatch();
19
+ const stats = useSelector(getExecutionStatsViewModel);
20
+ const [isOpen, setIsOpen] = useState(false);
21
+ if (isExecutionRunning || !stats.available || !stats.reportExecutionId || stats.load === "unknown") {
22
+ return null;
23
+ }
24
+ const reportExecutionId = stats.reportExecutionId;
25
+ const summary = formatSummary(intl, stats);
26
+ const label = intl.formatMessage({ id: "executionStats.title" });
27
+ return (_jsx("div", { className: "adi-execution-stats-anchor", children: _jsx(UiTooltip, { content: summary, triggerBy: ["hover", "focus"], arrowPlacement: "right", disabled: isOpen, anchor: _jsx("span", { className: "adi-execution-stats-tooltip-anchor", children: _jsx(UiPopover, { title: label, closeVisible: true, arrowPlacement: "bottom-end", width: 360, onOpen: () => {
28
+ setIsOpen(true);
29
+ if (stats.showsOriginal) {
30
+ dispatch(executionStatsOpened({ reportExecutionId }));
31
+ }
32
+ }, onClose: () => setIsOpen(false), anchor: _jsxs("button", { type: "button", className: "adi-execution-stats-trigger s-execution-stats-trigger", "aria-label": `${label}: ${summary}`, "data-load": stats.load, children: [stats.load === "fresh" ? (_jsx(DatabaseIcon, {})) : (_jsx(UiIcon, { type: "history", size: 12, color: "currentColor" })), _jsx("span", { className: "adi-execution-stats-trigger-text", children: stats.load === "fresh" ? (_jsx(FormattedMessage, { id: "executionStats.link.live" })) : (_jsx(FormattedMessage, { id: "executionStats.link.saved" })) })] }), content: _jsx(ExecutionStatsContent, { stats: stats, summary: summary }) }) }) }) }));
33
+ }
34
+ function formatSummary(intl, stats) {
35
+ const duration = stats.totalMs === undefined ? "" : formatDuration(stats.totalMs);
36
+ if (stats.failed) {
37
+ return intl.formatMessage({ id: "executionStats.summary.failed" }, { duration });
38
+ }
39
+ switch (stats.load) {
40
+ case "cacheHit":
41
+ return intl.formatMessage({ id: "executionStats.summary.cacheHit" }, { duration });
42
+ case "browserCache":
43
+ return intl.formatMessage({ id: "executionStats.summary.browserCache" }, { duration });
44
+ default:
45
+ // "fresh"; an unknown load shows no stats
46
+ return intl.formatMessage({ id: "executionStats.summary.fresh" }, { duration });
47
+ }
48
+ }
49
+ function ExecutionStatsContent({ stats, summary }) {
50
+ const { progress } = stats;
51
+ // the steps of a settled load end at the root's finish; a step the stream did not see finish
52
+ // ends at the report's finish (on the server clock), so its duration does not keep growing
53
+ const serverNow = progress.finishedAt ?? (progress.reportFinishedAt ?? Date.now()) - progress.clockOffsetMs;
54
+ return (_jsxs("div", { className: "adi-execution-stats s-execution-stats", "data-load": stats.load, children: [_jsxs("section", { className: "adi-execution-stats-section s-execution-stats-this-load", children: [_jsx("h4", { className: "adi-execution-stats-heading", children: _jsx(FormattedMessage, { id: "executionStats.thisLoad" }) }), _jsx("div", { className: "adi-execution-stats-summary s-execution-stats-summary", children: summary }), progress.steps.length > 0 ? (_jsx("div", { className: "adi-execution-stats-steps", children: _jsx(ExecutionProgressSteps, { steps: progress.steps, serverNow: serverNow }) })) : null] }), stats.showsOriginal ? (_jsxs("section", { className: "adi-execution-stats-section s-execution-stats-original", children: [_jsx("h4", { className: "adi-execution-stats-heading", children: _jsx(FormattedMessage, { id: "executionStats.original" }) }), _jsx(OriginalComputationStats, { stats: stats, serverNow: Date.now() - progress.clockOffsetMs })] })) : null] }));
55
+ }
56
+ function OriginalComputationStats({ stats, serverNow, }) {
57
+ const intl = useIntl();
58
+ const { status, computation } = stats.original;
59
+ if (status === "idle" || status === "loading") {
60
+ return (_jsx("div", { className: "adi-execution-stats-note s-execution-stats-original-loading", children: _jsx(FormattedMessage, { id: "executionStats.original.loading" }) }));
61
+ }
62
+ if (status === "missing") {
63
+ return (_jsx("div", { className: "adi-execution-stats-note s-execution-stats-original-missing", children: _jsx(FormattedMessage, { id: "executionStats.original.missing" }) }));
64
+ }
65
+ if (!computation) {
66
+ return (_jsx("div", { className: "adi-execution-stats-note s-execution-stats-original-unavailable", children: _jsx(FormattedMessage, { id: "executionStats.original.unavailable" }) }));
67
+ }
68
+ const { computedAt, totalDurationMs } = computation;
69
+ const ago = computedAt === undefined
70
+ ? undefined
71
+ : intl.formatRelativeTime(...toRelativeTime(serverNow - computedAt));
72
+ const duration = totalDurationMs === undefined
73
+ ? undefined
74
+ : formatOriginalTotal(totalDurationMs, computation.totalApproximate);
75
+ const approximateTitle = computation.totalApproximate
76
+ ? intl.formatMessage({ id: "executionProgress.original.approximate" })
77
+ : undefined;
78
+ const computedAtTitle = computedAt === undefined
79
+ ? undefined
80
+ : intl.formatDate(computedAt, { dateStyle: "medium", timeStyle: "medium" });
81
+ return (_jsxs(_Fragment, { children: [ago === undefined && duration === undefined ? null : (_jsx("div", { className: "adi-execution-stats-computed-at s-execution-stats-computed-at", title: [computedAtTitle, approximateTitle].filter(Boolean).join(" · ") || undefined, "data-total-duration-ms": totalDurationMs, "data-approximate": computation.totalApproximate ? "true" : undefined, children: duration === undefined ? (_jsx(FormattedMessage, { id: "executionStats.original.computedAt", values: { ago } })) : ago === undefined ? (_jsx(FormattedMessage, { id: "executionStats.original.computedIn", values: { duration } })) : (_jsx(FormattedMessage, { id: "executionStats.original.computedInAgo", values: { duration, ago } })) })), computation.sources.length === 1 ? (_jsx(OriginalSourceLine, { source: computation.sources[0] })) : computation.sources.length > 1 ? (_jsxs("table", { className: "adi-execution-stats-sources", children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", { children: _jsx(FormattedMessage, { id: "executionStats.original.dataSource" }) }), _jsx("th", { children: _jsx(FormattedMessage, { id: "executionStats.original.querying" }) })] }) }), _jsx("tbody", { children: computation.sources.map((source, index) => (_jsxs("tr", { className: "s-execution-stats-original-source", "data-data-source": source.dataSourceId, "data-querying-ms": source.queryingMs, title: formatSourceBreakdown(intl, source), children: [_jsx("td", { className: "adi-execution-stats-source-name", children: source.dataSourceId
82
+ ? dataSourceLabel(source.dataSourceId, source.dataSourceName)
83
+ : "–" }), _jsx("td", { children: source.queryingMs === undefined
84
+ ? "–"
85
+ : formatDuration(source.queryingMs) })] }, `${source.dataSourceId ?? ""}-${index}`))) })] })) : null, stats.saved ? _jsx(CacheSaving, { saving: stats.saved, className: "s-execution-stats-saved" }) : null] }));
86
+ }
87
+ /** the database time and the query + upload of a source, for its title */
88
+ function formatSourceBreakdown(intl, source) {
89
+ if (source.dbDurationMs === undefined && source.totalDurationMs === undefined) {
90
+ return undefined;
91
+ }
92
+ return intl.formatMessage({ id: "executionStats.original.breakdown" }, {
93
+ database: source.dbDurationMs === undefined ? "–" : formatDuration(source.dbDurationMs),
94
+ upload: source.totalDurationMs === undefined ? "–" : formatDuration(source.totalDurationMs),
95
+ });
96
+ }
97
+ /** the only data source of the original computation: one line instead of a table */
98
+ function OriginalSourceLine({ source }) {
99
+ const intl = useIntl();
100
+ const dataSource = source.dataSourceId ? (_jsx("strong", { title: source.dataSourceId, children: dataSourceLabel(source.dataSourceId, source.dataSourceName) })) : (intl.formatMessage({ id: "executionProgress.original.unknownDataSource" }));
101
+ return (_jsx("div", { className: "adi-execution-stats-original-line s-execution-stats-original-source", "data-data-source": source.dataSourceId, "data-querying-ms": source.queryingMs, title: formatSourceBreakdown(intl, source), children: source.queryingMs === undefined ? (_jsx(FormattedMessage, { id: "executionStats.original.queryingSource.noDuration", values: { dataSource } })) : (_jsx(FormattedMessage, { id: "executionStats.original.queryingSource", values: { dataSource, duration: formatDuration(source.queryingMs) } })) }));
102
+ }
103
+ function DatabaseIcon() {
104
+ return (_jsxs("svg", { className: "adi-execution-stats-trigger-icon", viewBox: "0 0 16 16", width: "12", height: "12", "aria-hidden": "true", children: [_jsx("ellipse", { cx: "8", cy: "3.5", rx: "5.5", ry: "2", fill: "none", stroke: "currentColor", strokeWidth: "1.4" }), _jsx("path", { d: "M2.5 3.5v9c0 1.1 2.5 2 5.5 2s5.5-.9 5.5-2v-9M2.5 8c0 1.1 2.5 2 5.5 2s5.5-.9 5.5-2", fill: "none", stroke: "currentColor", strokeWidth: "1.4" })] }));
105
+ }