@gooddata/sdk-ui-dashboard 11.55.0-alpha.3 → 11.55.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 (106) hide show
  1. package/NOTICE +8 -8
  2. package/esm/__version.d.ts +1 -1
  3. package/esm/__version.js +1 -1
  4. package/esm/_staging/automation/index.d.ts +19 -1
  5. package/esm/_staging/automation/index.d.ts.map +1 -1
  6. package/esm/_staging/automation/index.js +44 -8
  7. package/esm/_staging/dashboard/dashboardFilterConverter.d.ts +1 -18
  8. package/esm/_staging/dashboard/dashboardFilterConverter.d.ts.map +1 -1
  9. package/esm/_staging/dashboard/dashboardFilterConverter.js +1 -62
  10. package/esm/_staging/insight/insightWidgetProperties.d.ts +6 -0
  11. package/esm/_staging/insight/insightWidgetProperties.d.ts.map +1 -0
  12. package/esm/_staging/insight/insightWidgetProperties.js +32 -0
  13. package/esm/_staging/sharedHooks/useRichTextFilters.d.ts.map +1 -1
  14. package/esm/_staging/sharedHooks/useRichTextFilters.js +1 -2
  15. package/esm/index.d.ts +7 -7
  16. package/esm/index.d.ts.map +1 -1
  17. package/esm/index.js +4 -4
  18. package/esm/internal.d.ts +2 -2
  19. package/esm/internal.d.ts.map +1 -1
  20. package/esm/internal.js +2 -2
  21. package/esm/kdaDialog/dialog/hooks/useChangeAnalysis.d.ts.map +1 -1
  22. package/esm/kdaDialog/dialog/hooks/useChangeAnalysis.js +1 -2
  23. package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.d.ts.map +1 -1
  24. package/esm/model/commandHandlers/common/validateDrillToCustomUrlParams.js +1 -2
  25. package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
  26. package/esm/model/commandHandlers/drill/drillToDashboardHandler.js +1 -2
  27. package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.d.ts +11 -5
  28. package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.d.ts.map +1 -1
  29. package/esm/model/commandHandlers/scheduledEmail/automationParametersRestore.js +24 -7
  30. package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.d.ts.map +1 -1
  31. package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.js +1 -2
  32. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.d.ts.map +1 -1
  33. package/esm/model/commandHandlers/scheduledEmail/initializeAutomationsHandler.js +5 -0
  34. package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.d.ts.map +1 -1
  35. package/esm/model/commandHandlers/widgets/exportInsightWidgetHandler.js +21 -3
  36. package/esm/model/commandHandlers/widgets/exportRawInsightWidgetHandler.js +1 -2
  37. package/esm/model/commands/filters.d.ts +1 -1
  38. package/esm/model/commands/filters.js +1 -1
  39. package/esm/model/events/filters.d.ts +6 -6
  40. package/esm/model/store/tabs/layout/layoutSelectors.d.ts.map +1 -1
  41. package/esm/model/store/tabs/layout/layoutSelectors.js +1 -2
  42. package/esm/presentation/automations/alerting/AlertingManagementDialog.d.ts +4 -0
  43. package/esm/presentation/automations/alerting/AlertingManagementDialog.d.ts.map +1 -1
  44. package/esm/presentation/automations/alerting/AlertingManagementDialog.js +6 -2
  45. package/esm/presentation/automations/alerting/types.d.ts +50 -0
  46. package/esm/presentation/automations/alerting/types.d.ts.map +1 -1
  47. package/esm/presentation/automations/connectors/AlertingConnector.d.ts +3 -3
  48. package/esm/presentation/automations/connectors/AlertingConnector.d.ts.map +1 -1
  49. package/esm/presentation/automations/connectors/AlertingConnector.js +6 -4
  50. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts +3 -3
  51. package/esm/presentation/automations/connectors/ScheduledEmailConnector.d.ts.map +1 -1
  52. package/esm/presentation/automations/connectors/ScheduledEmailConnector.js +6 -4
  53. package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts +10 -0
  54. package/esm/presentation/automations/contexts/AlertingManagementDialogContext.d.ts.map +1 -1
  55. package/esm/presentation/automations/contexts/AlertingManagementDialogContext.js +10 -0
  56. package/esm/presentation/automations/contexts/AutomationsContext.d.ts +10 -0
  57. package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
  58. package/esm/presentation/automations/contexts/AutomationsContext.js +10 -0
  59. package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts +10 -0
  60. package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.d.ts.map +1 -1
  61. package/esm/presentation/automations/contexts/ScheduledEmailManagementDialogContext.js +10 -0
  62. package/esm/presentation/automations/scheduledEmail/ScheduledEmailManagementDialog.d.ts +4 -0
  63. package/esm/presentation/automations/scheduledEmail/ScheduledEmailManagementDialog.d.ts.map +1 -1
  64. package/esm/presentation/automations/scheduledEmail/ScheduledEmailManagementDialog.js +6 -2
  65. package/esm/presentation/automations/scheduledEmail/types.d.ts +52 -0
  66. package/esm/presentation/automations/scheduledEmail/types.d.ts.map +1 -1
  67. package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts +8 -4
  68. package/esm/presentation/automations/shared/automationFilters/automationParameters.d.ts.map +1 -1
  69. package/esm/presentation/automations/shared/automationFilters/automationParameters.js +30 -13
  70. package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.d.ts.map +1 -1
  71. package/esm/presentation/automations/shared/automationFilters/components/AutomationParameter.js +1 -4
  72. package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
  73. package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +12 -7
  74. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.d.ts.map +1 -1
  75. package/esm/presentation/automations/shared/automationFilters/useAutomationAlertParameters.js +3 -1
  76. package/esm/presentation/automations/shared/filters/conversions.d.ts.map +1 -1
  77. package/esm/presentation/automations/shared/filters/conversions.js +1 -2
  78. package/esm/presentation/dashboard/components/DashboardRenderer.d.ts.map +1 -1
  79. package/esm/presentation/dashboard/components/DashboardRenderer.js +4 -1
  80. package/esm/presentation/dashboard/types.d.ts +32 -2
  81. package/esm/presentation/dashboard/types.d.ts.map +1 -1
  82. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts +6 -2
  83. package/esm/presentation/dashboardContexts/DashboardComponentsContext.d.ts.map +1 -1
  84. package/esm/presentation/dashboardContexts/DashboardComponentsContext.js +3 -0
  85. package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.d.ts.map +1 -1
  86. package/esm/presentation/drill/DrillConfigPanel/DrillToUrl/CustomUrlEditor.js +1 -2
  87. package/esm/presentation/filterBar/attributeFilter/AttributeFilterParentFilteringContext.d.ts.map +1 -1
  88. package/esm/presentation/filterBar/attributeFilter/AttributeFilterParentFilteringContext.js +1 -2
  89. package/esm/presentation/filterBar/attributeFilter/DefaultDashboardAttributeFilter.js +1 -3
  90. package/esm/presentation/filterBar/attributeFilter/useParentFilters.d.ts.map +1 -1
  91. package/esm/presentation/filterBar/attributeFilter/useParentFilters.js +1 -2
  92. package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.d.ts.map +1 -1
  93. package/esm/presentation/filterBar/parameterFilter/DashboardParameterFilter.js +12 -8
  94. package/esm/presentation/widget/insight/ViewModeDashboardInsight/useResolveDashboardInsightProperties.d.ts.map +1 -1
  95. package/esm/presentation/widget/insight/ViewModeDashboardInsight/useResolveDashboardInsightProperties.js +3 -35
  96. package/esm/presentation/widget/widget/DefaultDashboardWidget.d.ts +2 -1
  97. package/esm/presentation/widget/widget/DefaultDashboardWidget.d.ts.map +1 -1
  98. package/esm/sdk-ui-dashboard.d.ts +262 -94
  99. package/esm/types.d.ts +59 -3
  100. package/esm/types.d.ts.map +1 -1
  101. package/esm/types.js +2 -4
  102. package/package.json +22 -23
  103. package/styles/scss/dashboard.scss +4 -4
  104. package/esm/converters/filterConverters.d.ts +0 -93
  105. package/esm/converters/filterConverters.d.ts.map +0 -1
  106. package/esm/converters/filterConverters.js +0 -199
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { defineMessages, useIntl } from "react-intl";
3
- import { DashboardParameterModeValues, objRefToString } from "@gooddata/sdk-model";
4
- import { Dropdown, ParameterControl, ParameterControlButton, useIdPrefixed } from "@gooddata/sdk-ui-kit";
3
+ import { DashboardParameterModeValues, objRefToString, } from "@gooddata/sdk-model";
4
+ import { Dropdown, ParameterControl, ParameterControlButton, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
5
5
  import { useDashboardDispatch, useDashboardSelector } from "../../../model/react/DashboardStoreProvider.js";
6
6
  import { selectCatalogParameterByRef } from "../../../model/store/catalog/catalogSelectors.js";
7
7
  import { selectIsApplyFiltersAllAtOnceEnabledAndSet } from "../../../model/store/config/configSelectors.js";
@@ -41,10 +41,14 @@ export function DashboardParameterFilter({ parameter }) {
41
41
  if (parameter.mode === DashboardParameterModeValues.READONLY) {
42
42
  return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(ParameterControlButton, { name: name, definition: definition, value: displayValue, isActive: false, isDraggable: isInEditMode, warningTooltip: warningTooltip, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` }) }));
43
43
  }
44
- return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(Dropdown, { autofocusOnOpen: true, initialFocus: valueInputId, closeOnEscape: true, renderButton: ({ isOpen, toggleDropdown, dropdownId }) => (_jsx(ParameterControlButton, { name: name, definition: definition, value: displayValue, isActive: isOpen, isDraggable: isInEditMode, dropdownId: dropdownId, onClick: () => toggleDropdown(), warningTooltip: warningTooltip, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(ParameterControl, { name: name, definition: definition, value: displayValue, resetValue: resetValue, inputId: valueInputId, ariaAttributes: ariaAttributes, onApply: (value) => {
45
- dispatch(isApplyAllAtOnceEnabledAndSet
46
- ? tabsActions.setParameterWorkingValue({ ref: parameter.ref, value })
47
- : tabsActions.setParameterRuntimeValue({ ref: parameter.ref, value }));
48
- closeDropdown();
49
- }, onCancel: closeDropdown })) }) }));
44
+ const submitModeProps = isApplyAllAtOnceEnabledAndSet
45
+ ? {
46
+ mode: "staged",
47
+ onStage: (value) => dispatch(tabsActions.setParameterWorkingValue({ ref: parameter.ref, value })),
48
+ }
49
+ : {
50
+ mode: "commit",
51
+ onCommit: (value) => dispatch(tabsActions.setParameterRuntimeValue({ ref: parameter.ref, value })),
52
+ };
53
+ return (_jsx(DraggableChipSource, { dragItem: dragItem, canDrag: isInEditMode, children: _jsx(Dropdown, { autofocusOnOpen: true, initialFocus: valueInputId, closeOnEscape: true, renderButton: ({ isOpen, toggleDropdown, dropdownId }) => (_jsx(ParameterControlButton, { name: name, definition: definition, value: displayValue, isActive: isOpen, isDraggable: isInEditMode, dropdownId: dropdownId, onClick: () => toggleDropdown(), warningTooltip: warningTooltip, "data-testid": `dashboard-parameter-${objRefToString(parameter.ref)}` })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(ParameterControl, { name: name, definition: definition, value: displayValue, resetValue: resetValue, inputId: valueInputId, ariaAttributes: ariaAttributes, ...submitModeProps, onClose: closeDropdown })) }) }));
50
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"useResolveDashboardInsightProperties.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/ViewModeDashboardInsight/useResolveDashboardInsightProperties.ts"],"names":[],"mappings":"AAMA,OAAO,EACH,KAAK,QAAQ,EACb,KAAK,cAAc,EAGtB,MAAM,qBAAqB,CAAC;AAK7B;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACpD,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,oCAAoC,8DA6ChD,CAAC"}
1
+ {"version":3,"file":"useResolveDashboardInsightProperties.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/widget/insight/ViewModeDashboardInsight/useResolveDashboardInsightProperties.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAIzE;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACpD,OAAO,EAAE,QAAQ,CAAC;IAClB,MAAM,EAAE,cAAc,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,oCAAoC,8DAOhD,CAAC"}
@@ -1,43 +1,11 @@
1
1
  // (C) 2020-2026 GoodData Corporation
2
2
  import { useMemo } from "react";
3
- import { mergeWith } from "lodash-es";
4
- import { insightProperties, insightSetProperties, } from "@gooddata/sdk-model";
5
- import { useDashboardSelector } from "../../../../model/react/DashboardStoreProvider.js";
6
- import { selectSettings } from "../../../../model/store/config/configSelectors.js";
3
+ import { mergeInsightWithWidgetProperties } from "../../../../_staging/insight/insightWidgetProperties.js";
7
4
  /**
8
5
  * @internal
9
6
  */
10
7
  export const useResolveDashboardInsightProperties = (props) => {
11
8
  const { widget, insight } = props;
12
- const settings = useDashboardSelector(selectSettings);
13
- return useMemo(() => {
14
- if (!insight) {
15
- return insight;
16
- }
17
- const fromWidget = widget.properties;
18
- if (!fromWidget) {
19
- return insight;
20
- }
21
- const fromWidgetWithZoomingHandled = {
22
- ...fromWidget,
23
- controls: {
24
- ...fromWidget?.["controls"],
25
- // we need to take the relevant feature flag into account as well
26
- zoomInsight: !!fromWidget?.["controls"]?.zoomInsight,
27
- },
28
- };
29
- const fromInsight = insightProperties(insight);
30
- const merged = mergeWith({}, fromInsight, fromWidgetWithZoomingHandled, (currentValue, incomingValue) => {
31
- /**
32
- * Replace arrays instead of merging them. This is important for column sizing for example,
33
- * where widget might provide an empty array to override the custom column sizes defined on the insight level.
34
- */
35
- if (Array.isArray(currentValue)) {
36
- return incomingValue;
37
- }
38
- // for other types fall back to the default merging strategy by returning nothing
39
- });
40
- return insightSetProperties(insight, merged);
41
- // eslint-disable-next-line react-hooks/exhaustive-deps
42
- }, [insight, widget.properties, settings]);
9
+ // eslint-disable-next-line react-hooks/exhaustive-deps
10
+ return useMemo(() => mergeInsightWithWidgetProperties(insight, widget), [insight, widget.properties]);
43
11
  };
@@ -1,6 +1,7 @@
1
+ import { type NamedExoticComponent } from "react";
1
2
  import { type IDashboardWidgetProps } from "./types.js";
2
3
  /**
3
4
  * @internal
4
5
  */
5
- export declare const DefaultDashboardWidget: import("react").NamedExoticComponent<IDashboardWidgetProps>;
6
+ export declare const DefaultDashboardWidget: NamedExoticComponent<IDashboardWidgetProps>;
6
7
  //# sourceMappingURL=DefaultDashboardWidget.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultDashboardWidget.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/widget/DefaultDashboardWidget.tsx"],"names":[],"mappings":"AA+BA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA2DxD;;GAEG;AACH,eAAO,MAAM,sBAAsB,6DA6FjC,CAAC"}
1
+ {"version":3,"file":"DefaultDashboardWidget.d.ts","sourceRoot":"","sources":["../../../../src/presentation/widget/widget/DefaultDashboardWidget.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAoC,MAAM,OAAO,CAAC;AA6BpF,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AA2DxD;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,oBAAoB,CAAC,qBAAqB,CA+F9E,CAAC"}