@gooddata/sdk-ui-dashboard 11.43.0-alpha.4 → 11.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/NOTICE +641 -841
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.d.ts.map +1 -1
  4. package/esm/__version.js +1 -1
  5. package/esm/index.d.ts +2 -2
  6. package/esm/index.d.ts.map +1 -1
  7. package/esm/index.js +2 -2
  8. package/esm/presentation/automations/{_staging/alerting → alerting}/AlertingManagementDialog.d.ts +1 -1
  9. package/esm/presentation/automations/alerting/AlertingManagementDialog.d.ts.map +1 -0
  10. package/esm/presentation/automations/{_staging/alerting → alerting}/AlertingManagementDialog.js +1 -1
  11. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.d.ts.map +1 -0
  12. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.js +8 -9
  13. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.d.ts.map +1 -0
  14. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.js +17 -29
  15. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts +1 -1
  16. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts.map +1 -0
  17. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.js +9 -28
  18. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/Alert.d.ts.map +1 -0
  19. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/components/Alert.js +15 -18
  20. package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/components/AlertDropdown.d.ts +1 -1
  21. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.d.ts.map +1 -0
  22. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/AlertsList.d.ts.map +1 -0
  23. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.d.ts.map +1 -1
  24. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.js +2 -2
  25. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.d.ts.map +1 -0
  26. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.js +31 -0
  27. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.test.d.ts +2 -0
  28. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.test.d.ts.map +1 -0
  29. package/esm/presentation/automations/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.test.js +39 -0
  30. package/esm/presentation/automations/alerting/hooks/useAlertingDialogAccessibility.d.ts.map +1 -0
  31. package/esm/presentation/automations/alerting/hooks/useAlertingDialogAccessibility.js +11 -0
  32. package/esm/presentation/automations/connectors/AlertingConnector.d.ts +6 -3
  33. package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
  34. package/esm/presentation/automations/connectors/AlertingConnector.js +75 -12
  35. package/esm/presentation/automations/connectors/AlertingConnector.test.d.ts +2 -0
  36. package/esm/presentation/automations/connectors/AlertingConnector.test.d.ts.map +1 -0
  37. package/esm/presentation/automations/connectors/AlertingConnector.test.js +152 -0
  38. package/esm/presentation/automations/connectors/DefaultAlertingManagementDialogConnected.d.ts +11 -0
  39. package/esm/presentation/automations/connectors/DefaultAlertingManagementDialogConnected.d.ts.map +1 -0
  40. package/esm/presentation/automations/connectors/DefaultAlertingManagementDialogConnected.js +20 -0
  41. package/esm/presentation/automations/connectors/hooks/useBuildAlertingManagementDialogContext.d.ts +3 -0
  42. package/esm/presentation/automations/connectors/hooks/useBuildAlertingManagementDialogContext.d.ts.map +1 -0
  43. package/esm/presentation/automations/connectors/hooks/useBuildAlertingManagementDialogContext.js +131 -0
  44. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -1
  45. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +4 -1
  46. package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +2 -0
  47. package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts +27 -0
  48. package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts.map +1 -0
  49. package/esm/presentation/automations/contexts/AlertingManagementDialogContext.js +11 -0
  50. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +1 -0
  51. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  52. package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +1 -0
  53. package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProvider.d.ts.map +1 -1
  54. package/esm/presentation/dashboard/DashboardHeader/AlertingDialogProvider.js +3 -17
  55. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeChrome.d.ts +5 -4
  56. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeChrome.d.ts.map +1 -1
  57. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeChrome.js +30 -48
  58. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.d.ts +37 -0
  59. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.d.ts.map +1 -0
  60. package/esm/presentation/dashboard/DashboardSidebar/SidebarResizeContext.js +90 -0
  61. package/esm/presentation/dashboard/components/DashboardInner.d.ts.map +1 -1
  62. package/esm/presentation/dashboard/components/DashboardInner.js +24 -14
  63. package/esm/presentation/dashboard/components/DashboardRenderer.js +1 -1
  64. package/esm/presentation/localization/bundles/zh-Hant.localization-bundle.js +1 -1
  65. package/esm/presentation/widget/insight/configuration/InsightAlertConfig/AlertsList.js +1 -1
  66. package/esm/presentation/widget/insight/configuration/InsightAlerts.d.ts.map +1 -1
  67. package/esm/presentation/widget/insight/configuration/InsightAlerts.js +8 -1
  68. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.d.ts.map +1 -1
  69. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.test.d.ts +2 -0
  70. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.test.d.ts.map +1 -0
  71. package/esm/presentation/widget/insight/configuration/InsightAlertsNew.test.js +124 -0
  72. package/esm/sdk-ui-dashboard.d.ts +6 -1
  73. package/package.json +20 -20
  74. package/styles/css/configurationPanel.css +2 -3
  75. package/styles/css/configurationPanel.css.map +1 -1
  76. package/styles/css/main.css +8767 -11368
  77. package/styles/css/main.css.map +1 -1
  78. package/styles/scss/configurationPanel.scss +2 -3
  79. package/esm/presentation/automations/_staging/alerting/AlertingManagementDialog.d.ts.map +0 -1
  80. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.d.ts.map +0 -1
  81. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.d.ts.map +0 -1
  82. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.d.ts.map +0 -1
  83. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/Alert.d.ts.map +0 -1
  84. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/AlertDropdown.d.ts.map +0 -1
  85. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/AlertsList.d.ts.map +0 -1
  86. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.d.ts +0 -11
  87. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.d.ts.map +0 -1
  88. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/DeleteAlertConfirmDialog.js +0 -38
  89. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.d.ts.map +0 -1
  90. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.js +0 -50
  91. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/hooks/useAlertValidation.d.ts +0 -7
  92. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/hooks/useAlertValidation.d.ts.map +0 -1
  93. package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/hooks/useAlertValidation.js +0 -30
  94. package/esm/presentation/automations/_staging/alerting/hooks/useAlertingDialogAccessibility.d.ts.map +0 -1
  95. package/esm/presentation/automations/_staging/alerting/hooks/useAlertingDialogAccessibility.js +0 -12
  96. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentBasic.d.ts +0 -0
  97. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogContentEnhanced.d.ts +0 -0
  98. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/components/Alert.d.ts +0 -0
  99. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/components/AlertDropdown.js +0 -0
  100. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/components/AlertsList.d.ts +0 -0
  101. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/components/AlertsList.js +0 -0
  102. /package/esm/presentation/automations/{_staging/alerting → alerting}/DefaultAlertingManagementDialog/components/PauseAlertRunner.d.ts +0 -0
  103. /package/esm/presentation/automations/{_staging/alerting → alerting}/hooks/useAlertingDialogAccessibility.d.ts +0 -0
@@ -6,7 +6,7 @@ import { selectEnableAlertAttributes, selectEnableAlertOncePerInterval, selectEn
6
6
  import { selectEntitlementMinimumRecurrenceMinutes, selectMaxAutomationRecipients, } from "../../../../model/store/entitlements/entitlementsSelectors.js";
7
7
  import { selectAutomationAvailableDashboardFilters, selectAutomationCommonDateFilterId, selectAutomationDefaultSelectedFilters, selectAutomationFiltersByTab, selectDashboardFiltersWithoutCrossFiltering, selectDashboardHiddenFilters, selectDashboardLockedFilters, } from "../../../../model/store/filtering/dashboardFilterSelectors.js";
8
8
  import { selectPersistedDashboardFilterContextDateFilterConfig } from "../../../../model/store/meta/metaSelectors.js";
9
- import { selectCanManageWorkspace, selectCanUseAiAssistant, } from "../../../../model/store/permissions/permissionsSelectors.js";
9
+ import { selectCanCreateAutomation, selectCanManageWorkspace, selectCanUseAiAssistant, } from "../../../../model/store/permissions/permissionsSelectors.js";
10
10
  import { selectAttributeFilterConfigsOverrides, selectAttributeFilterConfigsOverridesByTab, selectAttributeFilterConfigsSelectionTypeMap, selectAttributeFilterConfigsSelectionTypeMapByTab, } from "../../../../model/store/tabs/attributeFilterConfigs/attributeFilterConfigsSelectors.js";
11
11
  import { selectDateFilterConfigOverridesByTab, selectEffectiveDateFilterAvailableGranularities, selectEffectiveDateFilterGranularitiesPerTab, selectEffectiveDateFilterOptions, selectEffectiveDateFilterOptionsPerTab, } from "../../../../model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.js";
12
12
  import { selectDateFilterConfigsOverrides, selectDateFilterConfigsOverridesByTab, } from "../../../../model/store/tabs/dateFilterConfigs/dateFilterConfigsSelectors.js";
@@ -57,6 +57,7 @@ export function useBuildAutomationsContext() {
57
57
  const enableAlertOncePerInterval = useDashboardSelector(selectEnableAlertOncePerInterval);
58
58
  const enableAnomalyDetectionAlert = useDashboardSelector(selectEnableAnomalyDetectionAlert);
59
59
  const enableAutomationManagement = useDashboardSelector(selectEnableAutomationManagement);
60
+ const canCreateAutomation = useDashboardSelector(selectCanCreateAutomation);
60
61
  const canUseAiAssistant = useDashboardSelector(selectCanUseAiAssistant);
61
62
  const canManageWorkspace = useDashboardSelector(selectCanManageWorkspace);
62
63
  const enableComparisonInAlerting = useDashboardSelector(selectEnableComparisonInAlerting);
@@ -76,6 +77,7 @@ export function useBuildAutomationsContext() {
76
77
  getOptionsForTab: (tabId) => optionsPerTab[tabId],
77
78
  }), [availableGranularities, dateFilterOptions, granularitiesPerTab, optionsPerTab]);
78
79
  const features = useMemo(() => ({
80
+ canCreateAutomation,
79
81
  enableAlertOncePerInterval,
80
82
  enableAnomalyDetectionAlert,
81
83
  enableAutomationManagement,
@@ -85,6 +87,7 @@ export function useBuildAutomationsContext() {
85
87
  enableAlertAttributes,
86
88
  canManageWorkspace,
87
89
  }), [
90
+ canCreateAutomation,
88
91
  enableAlertOncePerInterval,
89
92
  enableAnomalyDetectionAlert,
90
93
  enableAutomationManagement,
@@ -60,6 +60,7 @@ vi.mock("../../../../model/store/config/configSelectors.js", () => ({
60
60
  selectWeekStart: () => "Sunday",
61
61
  }));
62
62
  vi.mock("../../../../model/store/permissions/permissionsSelectors.js", () => ({
63
+ selectCanCreateAutomation: () => true,
63
64
  selectCanManageWorkspace: () => false,
64
65
  selectCanUseAiAssistant: () => false,
65
66
  }));
@@ -122,5 +123,6 @@ describe("useBuildAutomationsContext", () => {
122
123
  expect(result.current.dateFilterConfig.getOptionsForTab("tab1")).toEqual(selectors.optionsPerTab["tab1"]);
123
124
  expect(result.current.dateFilterConfig.getGranularitiesForTab("missing-tab")).toEqual([]);
124
125
  expect(result.current.dateFilterConfig.getOptionsForTab("missing-tab")).toBeUndefined();
126
+ expect(result.current.features.canCreateAutomation).toBe(true);
125
127
  });
126
128
  });
@@ -0,0 +1,27 @@
1
+ import type { IAutomationMetadataObject, IInsight, IUser, IWidget, ObjRef } from "@gooddata/sdk-model";
2
+ /**
3
+ * Sub-context for the alerting management dialog.
4
+ * The connector hydrates this from dashboard state.
5
+ * The management dialog tree reads from this context instead of calling useDashboardSelector directly.
6
+ */
7
+ export interface IAlertingManagementDialogContextValue {
8
+ currentUser?: IUser;
9
+ dashboardId?: string;
10
+ dashboardTitle?: string;
11
+ canManageWorkspace: boolean;
12
+ isAlertDialogOpen: boolean;
13
+ alertingDialogReturnFocusTo?: string;
14
+ managementDialogContext: {
15
+ widgetRef?: ObjRef;
16
+ };
17
+ automationsInvalidationId?: number;
18
+ isEmbedded: boolean;
19
+ enableAccessibilityMode: boolean;
20
+ getWidgetByRef: (ref: ObjRef | undefined) => IWidget | undefined;
21
+ getInsightByWidgetRef: (ref: ObjRef | undefined) => IInsight | undefined;
22
+ pauseAlert(alert: IAutomationMetadataObject): Promise<IAutomationMetadataObject>;
23
+ resumeAlert(alert: IAutomationMetadataObject): Promise<IAutomationMetadataObject>;
24
+ }
25
+ export declare const AlertingManagementDialogContextProvider: import("react").Provider<IAlertingManagementDialogContextValue | undefined>;
26
+ export declare function useAlertingManagementDialogContext(): IAlertingManagementDialogContextValue;
27
+ //# sourceMappingURL=AlertingManagementDialogContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlertingManagementDialogContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AlertingManagementDialogContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,yBAAyB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAEvG;;;;GAIG;AACH,MAAM,WAAW,qCAAqC;IAClD,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,uBAAuB,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChD,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,uBAAuB,EAAE,OAAO,CAAC;IACjC,cAAc,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,GAAG,SAAS,CAAC;IACjE,qBAAqB,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,KAAK,QAAQ,GAAG,SAAS,CAAC;IACzE,UAAU,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;IACjF,WAAW,CAAC,KAAK,EAAE,yBAAyB,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAC;CACrF;AAMD,eAAO,MAAM,uCAAuC,6EAA2C,CAAC;AAEhG,wBAAgB,kCAAkC,IAAI,qCAAqC,CAQ1F"}
@@ -0,0 +1,11 @@
1
+ // (C) 2026 GoodData Corporation
2
+ import { createContext, useContext } from "react";
3
+ const AlertingManagementDialogContext = createContext(undefined);
4
+ export const AlertingManagementDialogContextProvider = AlertingManagementDialogContext.Provider;
5
+ export function useAlertingManagementDialogContext() {
6
+ const ctx = useContext(AlertingManagementDialogContext);
7
+ if (!ctx) {
8
+ throw new Error("useAlertingManagementDialogContext must be used within AlertingManagementDialogContextProvider");
9
+ }
10
+ return ctx;
11
+ }
@@ -52,6 +52,7 @@ export interface IAutomationsContextValue {
52
52
  isSecondaryTitleVisible: boolean;
53
53
  externalRecipient: string | undefined;
54
54
  features: {
55
+ canCreateAutomation: boolean;
55
56
  enableAlertOncePerInterval: boolean;
56
57
  enableAnomalyDetectionAlert: boolean;
57
58
  enableAutomationManagement: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,qCAAqC,EACrC,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,k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qB,GAAG,SAAS,CAAC;IACjG,6BAA6B,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,mCAAmC,GAAG,SAAS,CAAC;CAC3G;AAID,eAAO,MAAM,0BAA0B,gEAA8B,CAAC;AAEtE,wBAAgB,qBAAqB,IAAI,wBAAwB,CAWhE"}
1
+ {"version":3,"file":"AutomationsContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/automations/contexts/AutomationsContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACR,qCAAqC,EACrC,qBAAqB,EACrB,iBAAiB,EACjB,mCAAmC,EACnC,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EACf,+BAA+B,EAC/B,0BAA0B,EAC1B,8BAA8B,EAC9B,kCAAkC,EAClC,WAAW,EACX,SAAS,EACT,KAAK,EACL,MAAM,EACN,SAAS,EACZ,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AAEzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAErF;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IACzC,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,iBAAiB,EAAE,wBAAwB,CAAC;IAC5C,sBAAsB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,qBAAqB,EAAE,CAAC;IACnE,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,wBAAwB,GAAG,SAAS,CAAC;CAC7E;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACrC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,WAAW,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,iBAAiB,EAAE,iBAAiB,EAAE,CAAC;IACvC,mBAAmB,EAAE,mBAAmB,EAAE,CAAC;IAC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C;IAC7B,cAAc,EAAE,OAAO,CAAC;IACxB,uBAAuB,EAAE,OAAO,CAAC;IACjC,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,EAAE;QACN,mBAAmB,EAAE,OAAO,CAAC;QAC7B,0BAA0B,EAAE,OAAO,CAAC;QACpC,2BAA2B,EAAE,OAAO,CAAC;QACrC,0BAA0B,EAAE,OAAO,CAAC;QACpC,iBAAiB,EAAE,OAAO,CAAC;QAC3B,0BAA0B,EAAE,OAAO,CAAC;QACpC,wBAAwB,EAAE,OAAO,CAAC;QAClC,qBAAqB,EAAE,OAAO,CAAC;QAC/B,kBAAkB,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF,wBAAwB,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,iBAAiB,GAAG,qBAAqB,GAAG,SAAS,CAAC;IACjG,6BAA6B,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,mCAAmC,GAAG,SAAS,CAAC;CAC3G;AAID,eAAO,MAAM,0BAA0B,gEAA8B,CAAC;AAEtE,wBAAgB,qBAAqB,IAAI,wBAAwB,CAWhE"}
@@ -61,6 +61,7 @@ function createAutomationsContextValue(overrides) {
61
61
  isSecondaryTitleVisible: false,
62
62
  externalRecipient: undefined,
63
63
  features: {
64
+ canCreateAutomation: false,
64
65
  enableAlertOncePerInterval: false,
65
66
  enableAnomalyDetectionAlert: false,
66
67
  enableAutomationManagement: false,
@@ -1 +1 @@
1
- {"version":3,"file":"AlertingDialogProvider.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardHeader/AlertingDialogProvider.tsx"],"names":[],"mappings":"AAWA,wBAAgB,sBAAsB,4CAOrC"}
1
+ {"version":3,"file":"AlertingDialogProvider.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardHeader/AlertingDialogProvider.tsx"],"names":[],"mappings":"AAOA,wBAAgB,sBAAsB,4CAMrC"}
@@ -1,20 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useDashboardAlerts } from "../../../model/react/useDashboardAlerting/useDashboardAlerts.js";
3
- import { AlertingManagementDialog } from "../../automations/_staging/alerting/AlertingManagementDialog.js";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2022-2026 GoodData Corporation
4
3
  import { AlertingAutomationsProvider, AlertingConnector, } from "../../automations/connectors/AlertingConnector.js";
5
4
  export function AlertingDialogProvider() {
6
- return (_jsxs(AlertingAutomationsProvider, { children: [
7
- _jsx(StagedManagementBridge, {}), _jsx(AlertingConnector, {})
8
- ] }));
9
- }
10
- /**
11
- * Renders the staged management dialog directly from Redux state.
12
- * This bridge is removed in PR5 when management migrates out of _staging and into AlertingConnector.
13
- */
14
- function StagedManagementBridge() {
15
- const { isInitialized, isAlertManagementDialogOpen, automations, automationsLoading, automationsError, notificationChannels, onAlertingManagementClose, onAlertingManagementAdd, onAlertingManagementEdit, onAlertingManagementDeleteSuccess, onAlertingManagementDeleteError, onAlertingManagementPauseSuccess, onAlertingManagementPauseError, } = useDashboardAlerts();
16
- if (!isInitialized || !isAlertManagementDialogOpen) {
17
- return null;
18
- }
19
- return (_jsx(AlertingManagementDialog, { automations: automations, notificationChannels: notificationChannels, alertDataError: automationsError, isLoadingAlertingData: automationsLoading, onAdd: onAlertingManagementAdd, onEdit: onAlertingManagementEdit, onClose: onAlertingManagementClose, onDeleteSuccess: onAlertingManagementDeleteSuccess, onDeleteError: onAlertingManagementDeleteError, onPauseSuccess: onAlertingManagementPauseSuccess, onPauseError: onAlertingManagementPauseError }));
5
+ return (_jsx(AlertingAutomationsProvider, { children: _jsx(AlertingConnector, {}) }));
20
6
  }
@@ -1,10 +1,11 @@
1
1
  import { type ReactElement, type ReactNode } from "react";
2
2
  /**
3
- * Internal presentational wrapper that holds the dashboard sidebar drag-to-resize state.
3
+ * Internal presentational wrapper that drives the dashboard sidebar drag-to-resize interaction.
4
4
  *
5
- * Owns: committed width (persisted to localStorage), live drag width (only used for the dashed
6
- * indicator transform), drag phase, and a window-width tracker that enforces a minimum editor
7
- * canvas width without overwriting the user's persisted preference.
5
+ * Owns only the live drag state (drag width used for the dashed indicator transform — and drag
6
+ * phase). The committed width, min/max, and the editor-canvas constraint live in the shared
7
+ * {@link useResizableSidebar} state, so the same value also feeds the content area's width via the
8
+ * `--gd-dashboard-sidebar-width` custom property.
8
9
  *
9
10
  * Renders `.gd-sidebar-container` itself so the resize handle can be positioned absolutely inside
10
11
  * it — that element is sticky+100vh, so the handle (and the grip centered inside it) tracks the
@@ -1 +1 @@
1
- {"version":3,"file":"SidebarResizeChrome.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardSidebar/SidebarResizeChrome.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,SAAS,EAKjB,MAAM,OAAO,CAAC;AAqCf;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,gBAAgB,EAChB,QAAQ,EACX,EAAE;IACC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACvB,GAAG,YAAY,CAyHf"}
1
+ {"version":3,"file":"SidebarResizeChrome.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardSidebar/SidebarResizeChrome.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,SAAS,EAIjB,MAAM,OAAO,CAAC;AAkBf;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,EAChC,gBAAgB,EAChB,QAAQ,EACX,EAAE;IACC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,EAAE,SAAS,CAAC;CACvB,GAAG,YAAY,CAiHf"}
@@ -1,15 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // (C) 2026 GoodData Corporation
3
- import { useEffect, useRef, useState, } from "react";
3
+ import { useRef, useState, } from "react";
4
4
  import cx from "classnames";
5
5
  import { clamp } from "lodash-es";
6
- import { useLocalStorage } from "@gooddata/sdk-ui";
7
6
  import { makeKeyboardNavigation, useCloseOnEscape } from "@gooddata/sdk-ui-kit";
8
- const SIDEBAR_MIN_WIDTH = 230;
9
- const SIDEBAR_MAX_WIDTH = 500;
10
- const EDITOR_MIN_WIDTH = 960;
7
+ import { useResizableSidebar } from "./SidebarResizeContext.js";
11
8
  const KEYBOARD_STEP = 10;
12
- const LOCAL_STORAGE_KEY = "gd-dashboard-sidebar-width";
13
9
  const handleSeparatorKeyboardNavigation = makeKeyboardNavigation({
14
10
  shrink: [{ code: "ArrowLeft" }],
15
11
  grow: [{ code: "ArrowRight" }],
@@ -17,23 +13,12 @@ const handleSeparatorKeyboardNavigation = makeKeyboardNavigation({
17
13
  maximize: [{ code: "End" }],
18
14
  });
19
15
  /**
20
- * Returns the current `window.innerWidth`, kept in sync with the `resize` event.
21
- */
22
- function useWindowWidth() {
23
- const [width, setWidth] = useState(() => window.innerWidth);
24
- useEffect(() => {
25
- const handleResize = () => setWidth(window.innerWidth);
26
- window.addEventListener("resize", handleResize);
27
- return () => window.removeEventListener("resize", handleResize);
28
- }, []);
29
- return width;
30
- }
31
- /**
32
- * Internal presentational wrapper that holds the dashboard sidebar drag-to-resize state.
16
+ * Internal presentational wrapper that drives the dashboard sidebar drag-to-resize interaction.
33
17
  *
34
- * Owns: committed width (persisted to localStorage), live drag width (only used for the dashed
35
- * indicator transform), drag phase, and a window-width tracker that enforces a minimum editor
36
- * canvas width without overwriting the user's persisted preference.
18
+ * Owns only the live drag state (drag width used for the dashed indicator transform — and drag
19
+ * phase). The committed width, min/max, and the editor-canvas constraint live in the shared
20
+ * {@link useResizableSidebar} state, so the same value also feeds the content area's width via the
21
+ * `--gd-dashboard-sidebar-width` custom property.
37
22
  *
38
23
  * Renders `.gd-sidebar-container` itself so the resize handle can be positioned absolutely inside
39
24
  * it — that element is sticky+100vh, so the handle (and the grip centered inside it) tracks the
@@ -47,49 +32,46 @@ function useWindowWidth() {
47
32
  export function SidebarResizeChrome({ onContainerClick, children, }) {
48
33
  const [dragWidth, setDragWidth] = useState(null);
49
34
  const dragOriginRef = useRef(null);
50
- const containerWidth = useWindowWidth();
51
- const [persistedWidth, setPersistedWidth] = useLocalStorage(LOCAL_STORAGE_KEY, SIDEBAR_MIN_WIDTH);
52
- const effectiveMax = clamp(containerWidth - EDITOR_MIN_WIDTH, SIDEBAR_MIN_WIDTH, SIDEBAR_MAX_WIDTH);
53
- const effectiveWidth = clamp(persistedWidth, SIDEBAR_MIN_WIDTH, effectiveMax);
35
+ const { width, min, max, canResize, setWidth } = useResizableSidebar();
54
36
  const isDragging = dragWidth !== null;
55
- const isResizable = effectiveMax > SIDEBAR_MIN_WIDTH;
37
+ // Tear down the drag without committing — used when the user presses Escape.
56
38
  const endDrag = () => {
57
39
  dragOriginRef.current = null;
58
40
  setDragWidth(null);
59
41
  };
60
42
  useCloseOnEscape(isDragging, endDrag);
61
43
  const handleKeyDown = handleSeparatorKeyboardNavigation({
62
- shrink: () => setPersistedWidth(clamp(effectiveWidth - KEYBOARD_STEP, SIDEBAR_MIN_WIDTH, effectiveMax)),
63
- grow: () => setPersistedWidth(clamp(effectiveWidth + KEYBOARD_STEP, SIDEBAR_MIN_WIDTH, effectiveMax)),
64
- minimize: () => setPersistedWidth(SIDEBAR_MIN_WIDTH),
65
- maximize: () => setPersistedWidth(effectiveMax),
44
+ shrink: () => setWidth(width - KEYBOARD_STEP),
45
+ grow: () => setWidth(width + KEYBOARD_STEP),
46
+ minimize: () => setWidth(min),
47
+ maximize: () => setWidth(max),
66
48
  });
67
49
  const handlePointerDown = (event) => {
68
50
  event.preventDefault();
69
51
  event.currentTarget.setPointerCapture(event.pointerId);
70
52
  dragOriginRef.current = {
71
53
  clientX: event.clientX,
72
- width: effectiveWidth,
54
+ width,
73
55
  pointerId: event.pointerId,
74
56
  };
75
- setDragWidth(effectiveWidth);
57
+ setDragWidth(width);
76
58
  };
77
59
  const handlePointerMove = (event) => {
78
60
  if (event.pointerId !== dragOriginRef.current?.pointerId) {
79
61
  return;
80
62
  }
81
- const width = widthFromClientX(event.clientX);
82
- if (width !== null) {
83
- setDragWidth(width);
63
+ const nextWidth = widthFromClientX(event.clientX);
64
+ if (nextWidth !== null) {
65
+ setDragWidth(nextWidth);
84
66
  }
85
67
  };
86
- const handlePointerUp = (event) => {
87
- if (event.pointerId !== dragOriginRef.current?.pointerId) {
88
- return;
89
- }
90
- const width = widthFromClientX(event.clientX);
91
- if (width !== null) {
92
- setPersistedWidth(width);
68
+ // Commit the last dragged width, then tear the drag down. onLostPointerCapture fires whenever the
69
+ // captured pointer is released for any reason — pointerup, pointercancel, or the pointer being
70
+ // lost (e.g. the mouse released outside the iframe/window) — so the final width is always
71
+ // persisted even if a plain pointerup never reaches us.
72
+ const handleLostPointerCapture = () => {
73
+ if (dragWidth !== null) {
74
+ setWidth(dragWidth);
93
75
  }
94
76
  endDrag();
95
77
  };
@@ -98,15 +80,15 @@ export function SidebarResizeChrome({ onContainerClick, children, }) {
98
80
  if (!origin) {
99
81
  return null;
100
82
  }
101
- return clamp(origin.width + (clientX - origin.clientX), SIDEBAR_MIN_WIDTH, effectiveMax);
83
+ return clamp(origin.width + (clientX - origin.clientX), min, max);
102
84
  };
103
85
  return (_jsx("div", { className: cx("gd-resizable-sidebar", {
104
- "gd-resizable-sidebar--resizable": isResizable,
86
+ "gd-resizable-sidebar--resizable": canResize,
105
87
  "gd-resizable-sidebar--dragging": isDragging,
106
- }), style: { width: effectiveWidth }, children: _jsxs("div", { className: "col gd-flex-item gd-sidebar-container gd-sidebar-container--resizable", onClick: onContainerClick, children: [children, _jsx("button", { type: "button", style: {
107
- "--drag-x": `${isDragging ? dragWidth : effectiveWidth}px`,
88
+ }), style: { width }, children: _jsxs("div", { className: "col gd-flex-item gd-sidebar-container gd-sidebar-container--resizable", onClick: onContainerClick, children: [children, _jsx("button", { type: "button", style: {
89
+ "--drag-x": `${isDragging ? dragWidth : width}px`,
108
90
  }, className: cx("gd-resizable-sidebar__handle", {
109
91
  "gd-resizable-sidebar__handle--dragging": isDragging,
110
- }), disabled: !isResizable, role: "separator", "aria-orientation": "vertical", "aria-valuemin": SIDEBAR_MIN_WIDTH, "aria-valuemax": effectiveMax, "aria-valuenow": effectiveWidth, onPointerDown: isResizable ? handlePointerDown : undefined, onPointerMove: handlePointerMove, onPointerUp: handlePointerUp, onPointerCancel: endDrag, onKeyDown: isDragging ? undefined : handleKeyDown, children: _jsx("span", { className: "gd-resizable-sidebar__handle-grip", "aria-hidden": "true" }) })
92
+ }), disabled: !canResize, role: "separator", "aria-orientation": "vertical", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": width, onPointerDown: canResize ? handlePointerDown : undefined, onPointerMove: handlePointerMove, onLostPointerCapture: handleLostPointerCapture, onKeyDown: isDragging ? undefined : handleKeyDown, children: _jsx("span", { className: "gd-resizable-sidebar__handle-grip", "aria-hidden": "true" }) })
111
93
  ] }) }));
112
94
  }
@@ -0,0 +1,37 @@
1
+ import { type ReactNode } from "react";
2
+ interface IResizableSidebar {
3
+ width: number;
4
+ min: number;
5
+ max: number;
6
+ canResize: boolean;
7
+ setWidth: (width: number) => void;
8
+ }
9
+ /**
10
+ * Computes the resizable-sidebar state. When the sidebar is not resizable (not edit mode, the feature
11
+ * is off, or it is replaced by the enhanced insight picker) it returns the static
12
+ * {@link NON_RESIZABLE_SIDEBAR} — no window resize listener, no width math.
13
+ *
14
+ * Reads the config store, so it must be called below the dashboard loading gate where the config is
15
+ * initialized.
16
+ *
17
+ * @internal
18
+ */
19
+ export declare function useResizableSidebarState(): IResizableSidebar;
20
+ /**
21
+ * Shares the resize state produced by {@link useResizableSidebarState} with descendants such as the
22
+ * resize handle, so it stays a single source of truth.
23
+ *
24
+ * @internal
25
+ */
26
+ export declare function ResizableSidebarProvider({ value, children }: {
27
+ value: IResizableSidebar;
28
+ children: ReactNode;
29
+ }): import("react/jsx-runtime").JSX.Element;
30
+ /**
31
+ * Returns the sidebar resize state, or {@link NON_RESIZABLE_SIDEBAR} when the sidebar is not resizable.
32
+ *
33
+ * @internal
34
+ */
35
+ export declare function useResizableSidebar(): IResizableSidebar;
36
+ export {};
37
+ //# sourceMappingURL=SidebarResizeContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarResizeContext.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/DashboardSidebar/SidebarResizeContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkD,MAAM,OAAO,CAAC;AAsCvF,UAAU,iBAAiB;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAeD;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,IAAI,iBAAiB,CA2B5D;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,KAAK,EACL,QAAQ,EACX,EAAE;IACC,KAAK,EAAE,iBAAiB,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACvB,2CAEA;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,iBAAiB,CAEvD"}
@@ -0,0 +1,90 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { createContext, useContext, useEffect, useState } from "react";
4
+ import { clamp } from "lodash-es";
5
+ import { useLocalStorage } from "@gooddata/sdk-ui";
6
+ import { useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
7
+ import { selectSettings } from "../../../model/store/config/configSelectors.js";
8
+ import { selectIsInEditMode } from "../../../model/store/renderMode/renderModeSelectors.js";
9
+ const SIDEBAR_MIN_WIDTH = 230;
10
+ const SIDEBAR_MAX_WIDTH = 500;
11
+ const EDITOR_MIN_WIDTH = 960;
12
+ const LOCAL_STORAGE_KEY = "gd-dashboard-sidebar-width";
13
+ /**
14
+ * Returns the current `window.innerWidth`, kept in sync with the `resize` event. Only attaches the
15
+ * listener while `active`, so a non-resizable sidebar triggers no resize-driven re-renders.
16
+ */
17
+ function useWindowWidth(active) {
18
+ const [width, setWidth] = useState(() => window.innerWidth);
19
+ useEffect(() => {
20
+ if (!active) {
21
+ return undefined;
22
+ }
23
+ setWidth(window.innerWidth);
24
+ const handleResize = () => setWidth(window.innerWidth);
25
+ window.addEventListener("resize", handleResize);
26
+ return () => window.removeEventListener("resize", handleResize);
27
+ }, [active]);
28
+ return width;
29
+ }
30
+ // Stable value used whenever the sidebar is not resizable: it is fixed at the minimum width, cannot
31
+ // be resized, and ignores writes — so consumers never have to null-check.
32
+ const NON_RESIZABLE_SIDEBAR = {
33
+ width: SIDEBAR_MIN_WIDTH,
34
+ min: SIDEBAR_MIN_WIDTH,
35
+ max: SIDEBAR_MIN_WIDTH,
36
+ canResize: false,
37
+ setWidth: () => { },
38
+ };
39
+ const ResizableSidebarContext = createContext(NON_RESIZABLE_SIDEBAR);
40
+ ResizableSidebarContext.displayName = "ResizableSidebarContext";
41
+ /**
42
+ * Computes the resizable-sidebar state. When the sidebar is not resizable (not edit mode, the feature
43
+ * is off, or it is replaced by the enhanced insight picker) it returns the static
44
+ * {@link NON_RESIZABLE_SIDEBAR} — no window resize listener, no width math.
45
+ *
46
+ * Reads the config store, so it must be called below the dashboard loading gate where the config is
47
+ * initialized.
48
+ *
49
+ * @internal
50
+ */
51
+ export function useResizableSidebarState() {
52
+ const settings = useDashboardSelector(selectSettings);
53
+ const isEditMode = useDashboardSelector(selectIsInEditMode);
54
+ const isSidebarResizeEnabled = settings?.enableDashboardSidebarResize ?? false;
55
+ const enableEnhancedInsightPicker = settings?.enableEnhancedInsightPicker ?? false;
56
+ const isResizable = isEditMode && isSidebarResizeEnabled && !enableEnhancedInsightPicker;
57
+ const containerWidth = useWindowWidth(isResizable);
58
+ const [persistedWidth, setPersistedWidth] = useLocalStorage(LOCAL_STORAGE_KEY, SIDEBAR_MIN_WIDTH);
59
+ if (!isResizable) {
60
+ return NON_RESIZABLE_SIDEBAR;
61
+ }
62
+ const max = clamp(containerWidth - EDITOR_MIN_WIDTH, SIDEBAR_MIN_WIDTH, SIDEBAR_MAX_WIDTH);
63
+ const width = clamp(persistedWidth, SIDEBAR_MIN_WIDTH, max);
64
+ return {
65
+ width,
66
+ min: SIDEBAR_MIN_WIDTH,
67
+ max,
68
+ canResize: max > SIDEBAR_MIN_WIDTH,
69
+ // Clamp every write to the current bounds, so callers can't persist an out-of-range width and
70
+ // a non-resizable sidebar (max === min) collapses any value back to the minimum.
71
+ setWidth: (next) => setPersistedWidth(clamp(next, SIDEBAR_MIN_WIDTH, max)),
72
+ };
73
+ }
74
+ /**
75
+ * Shares the resize state produced by {@link useResizableSidebarState} with descendants such as the
76
+ * resize handle, so it stays a single source of truth.
77
+ *
78
+ * @internal
79
+ */
80
+ export function ResizableSidebarProvider({ value, children, }) {
81
+ return _jsx(ResizableSidebarContext.Provider, { value: value, children: children });
82
+ }
83
+ /**
84
+ * Returns the sidebar resize state, or {@link NON_RESIZABLE_SIDEBAR} when the sidebar is not resizable.
85
+ *
86
+ * @internal
87
+ */
88
+ export function useResizableSidebar() {
89
+ return useContext(ResizableSidebarContext);
90
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardInner.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/components/DashboardInner.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAOnD,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,2CA6FpD"}
1
+ {"version":3,"file":"DashboardInner.d.ts","sourceRoot":"","sources":["../../../../src/presentation/dashboard/components/DashboardInner.tsx"],"names":[],"mappings":"AAwCA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAOnD,wBAAgB,cAAc,CAAC,KAAK,EAAE,eAAe,2CA2GpD"}
@@ -23,6 +23,7 @@ import { DashboardContent } from "../DashboardContent.js";
23
23
  import { DashboardHeader } from "../DashboardHeader/DashboardHeader.js";
24
24
  import { DashboardSidebar } from "../DashboardSidebar/DashboardSidebar.js";
25
25
  import { RenderModeAwareDashboardSidebar } from "../DashboardSidebar/RenderModeAwareDashboardSidebar.js";
26
+ import { ResizableSidebarProvider, useResizableSidebarState, } from "../DashboardSidebar/SidebarResizeContext.js";
26
27
  import { DashboardScreenSizeProvider } from "./DashboardScreenSizeContext.js";
27
28
  const overlayController = OverlayController.getInstance(DASHBOARD_HEADER_OVERLAYS_Z_INDEX);
28
29
  const toastsOverlayController = OverlayController.getInstance(DASHBOARD_TOASTS_OVERLAY_Z_INDEX);
@@ -56,20 +57,29 @@ export function DashboardInner(props) {
56
57
  "gd-dash-content--density-standard": density === "comfortable",
57
58
  "gd-dash-content--density-compact": density === "compact",
58
59
  });
60
+ const resizableSidebar = useResizableSidebarState();
61
+ // When the sidebar can be resized, expose its live width so the sibling content area can subtract
62
+ // it (see `--gd-dashboard-sidebar-width` in sdk-dashboard.scss). Otherwise leave it unset so the
63
+ // content falls back to the static sidebar width.
64
+ const dashboardsRootStyle = resizableSidebar.canResize
65
+ ? {
66
+ "--gd-dashboard-sidebar-width": `${resizableSidebar.width}px`,
67
+ }
68
+ : undefined;
59
69
  return (_jsx(IntlWrapper, { locale: locale, children: _jsxs(ToastsCenterContextProvider, { skipAutomaticMessageRendering: true, children: [
60
- _jsx(OverlayControllerProvider, { overlayController: toastsOverlayController, children: _jsx(ToastsCenter, {}) }), _jsxs("div", { className: cx("component-root", {
61
- "sdk-edit-mode-on": isEditMode,
62
- "catalog-is-loaded": isCatalogLoaded,
63
- "accessible-dashboards-loaded": accessibleDashboardsLoaded,
64
- }), children: [
65
- _jsx(DragLayerComponent, {}), _jsxs("div", { className: cx("gd-dashboards-root gd-flex-container", {
66
- "gd-dashboards-root--floating-toolbar": enableEnhancedInsightPicker,
67
- }), children: [
68
- _jsx(DashboardSidebar, { DefaultSidebar: RenderModeAwareDashboardSidebar, DeleteDropZoneComponent: DeleteDropZone, WrapCreatePanelItemWithDragComponent: WrapCreatePanelItemWithDrag, WrapInsightListItemWithDragComponent: WrapInsightListItemWithDrag }), _jsxs("main", { className: dashboardContentClassNames, ...mainContentNavigationProps, children: [
69
- _jsx("div", { className: "gd-dash-header-wrapper gd-dash-header-wrapper-sdk-8-12", ref: headerRef, children: _jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(DashboardHeader, {}) }) }), _jsxs("div", { className: "gd-flex-item-stretch dash-section dash-section-kpis", ref: layoutRef, children: [
70
- _jsx(DashboardScreenSizeProvider, { children: _jsx(DashboardContent, { ...props }) }), enableEnhancedInsightPicker ? _jsx(FilterDeleteOverlay, {}) : null] }), _jsx("div", { className: "gd-dash-bottom-position-pixel", ref: bottomRef })
71
- ] })
72
- ] }), _jsx(Toolbar, {})
73
- ] })
70
+ _jsx(OverlayControllerProvider, { overlayController: toastsOverlayController, children: _jsx(ToastsCenter, {}) }), _jsx(ResizableSidebarProvider, { value: resizableSidebar, children: _jsxs("div", { className: cx("component-root", {
71
+ "sdk-edit-mode-on": isEditMode,
72
+ "catalog-is-loaded": isCatalogLoaded,
73
+ "accessible-dashboards-loaded": accessibleDashboardsLoaded,
74
+ }), children: [
75
+ _jsx(DragLayerComponent, {}), _jsxs("div", { className: cx("gd-dashboards-root gd-flex-container", {
76
+ "gd-dashboards-root--floating-toolbar": enableEnhancedInsightPicker,
77
+ }), style: dashboardsRootStyle, children: [
78
+ _jsx(DashboardSidebar, { DefaultSidebar: RenderModeAwareDashboardSidebar, DeleteDropZoneComponent: DeleteDropZone, WrapCreatePanelItemWithDragComponent: WrapCreatePanelItemWithDrag, WrapInsightListItemWithDragComponent: WrapInsightListItemWithDrag }), _jsxs("main", { className: dashboardContentClassNames, ...mainContentNavigationProps, children: [
79
+ _jsx("div", { className: "gd-dash-header-wrapper gd-dash-header-wrapper-sdk-8-12", ref: headerRef, children: _jsx(OverlayControllerProvider, { overlayController: overlayController, children: _jsx(DashboardHeader, {}) }) }), _jsxs("div", { className: "gd-flex-item-stretch dash-section dash-section-kpis", ref: layoutRef, children: [
80
+ _jsx(DashboardScreenSizeProvider, { children: _jsx(DashboardContent, { ...props }) }), enableEnhancedInsightPicker ? _jsx(FilterDeleteOverlay, {}) : null] }), _jsx("div", { className: "gd-dash-bottom-position-pixel", ref: bottomRef })
81
+ ] })
82
+ ] }), _jsx(Toolbar, {})
83
+ ] }) })
74
84
  ] }) }));
75
85
  }
@@ -6,8 +6,8 @@ import { BackendProvider, ErrorComponent as DefaultError, LoadingComponent as De
6
6
  import { OverlayController, OverlayControllerProvider } from "@gooddata/sdk-ui-kit";
7
7
  import { ThemeProvider } from "@gooddata/sdk-ui-theme-provider";
8
8
  import { DashboardStoreProvider } from "../../../model/react/DashboardStoreProvider.js";
9
- import { DefaultAlertingManagementDialogNew } from "../../automations/_staging/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.js";
10
9
  import { DefaultAlertingDialog } from "../../automations/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js";
10
+ import { DefaultAlertingManagementDialogNew } from "../../automations/alerting/DefaultAlertingManagementDialog/DefaultAlertingManagementDialogNew.js";
11
11
  import { DefaultScheduledEmailDialog } from "../../automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js";
12
12
  import { ScheduledEmailManagementDialog as DefaultScheduledEmailManagementDialog } from "../../automations/scheduledEmail/DefaultScheduledEmailManagementDialog/DefaultScheduledEmailManagementDialog.js";
13
13
  import { DASHBOARD_OVERLAYS_Z_INDEX } from "../../constants/zIndex.js";
@@ -742,7 +742,7 @@ export const zh_Hant = {
742
742
  "insightAlert.config.accessibility.title": "自訂警報名稱",
743
743
  "insightAlert.config.when": "什麼時候",
744
744
  "insightAlert.config.for": "為了",
745
- "insightAlert.config.condition": "狀態",
745
+ "insightAlert.config.condition": "條件",
746
746
  "insightAlert.config.threshold": "臨界點",
747
747
  "insightAlert.config.comparison": "比較",
748
748
  "insightAlert.config.recipients": "收件者",
@@ -4,7 +4,7 @@ import { useCallback, useState } from "react";
4
4
  import { FormattedMessage, useIntl } from "react-intl";
5
5
  import Skeleton from "react-loading-skeleton";
6
6
  import { AddButton, SeparatorLine, UiAutofocus, useIdPrefixed, useListWithActionsKeyboardNavigation, } from "@gooddata/sdk-ui-kit";
7
- import { Alert } from "../../../../automations/_staging/alerting/DefaultAlertingManagementDialog/components/Alert.js";
7
+ import { Alert } from "../../../../automations/alerting/DefaultAlertingManagementDialog/components/Alert.js";
8
8
  import { DashboardInsightSubmenuContainer } from "../../../insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightSubmenuContainer.js";
9
9
  const getItemAdditionalActions = () => {
10
10
  return ["dropdown", "item"];
@@ -1 +1 @@
1
- {"version":3,"file":"InsightAlerts.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/InsightAlerts.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAIpF,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,iCAAiC,2CAE7F"}
1
+ {"version":3,"file":"InsightAlerts.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/InsightAlerts.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAIpF,wBAAgB,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,iCAAiC,2CAW7F"}
@@ -1,5 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ // (C) 2022-2026 GoodData Corporation
3
+ import { useBuildAlertingManagementDialogContext } from "../../../automations/connectors/hooks/useBuildAlertingManagementDialogContext.js";
4
+ import { useBuildAutomationsContext } from "../../../automations/connectors/hooks/useBuildAutomationsContext.js";
5
+ import { AlertingManagementDialogContextProvider } from "../../../automations/contexts/AlertingManagementDialogContext.js";
6
+ import { AutomationsContextProvider } from "../../../automations/contexts/AutomationsContext.js";
2
7
  import { InsightAlertsNew } from "./InsightAlertsNew.js";
3
8
  export function InsightAlerts({ widget, onClose, onGoBack }) {
4
- return _jsx(InsightAlertsNew, { widget: widget, onClose: onClose, onGoBack: onGoBack });
9
+ const automationsCtx = useBuildAutomationsContext();
10
+ const managementCtx = useBuildAlertingManagementDialogContext();
11
+ return (_jsx(AutomationsContextProvider, { value: automationsCtx, children: _jsx(AlertingManagementDialogContextProvider, { value: managementCtx, children: _jsx(InsightAlertsNew, { widget: widget, onClose: onClose, onGoBack: onGoBack }) }) }));
5
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"InsightAlertsNew.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/InsightAlertsNew.tsx"],"names":[],"mappings":"AAkDA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAQpF,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,iCAAiC,2CAyKhG"}
1
+ {"version":3,"file":"InsightAlertsNew.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/InsightAlertsNew.tsx"],"names":[],"mappings":"AAkDA,OAAO,EAAE,KAAK,iCAAiC,EAAE,MAAM,4BAA4B,CAAC;AAQpF,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,iCAAiC,2CAwKhG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=InsightAlertsNew.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsightAlertsNew.test.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/configuration/InsightAlertsNew.test.tsx"],"names":[],"mappings":""}