@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 +1 @@
1
- {"version":3,"file":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,OAAO,GAAG,GAAG,IAAI,kBAAkB,CAE3E;AAED;;GAEG;AACH,MAAM,WAAW,4CAA4C;IACzD,IAAI,EAAE,WAAW,CAAC;IAElB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,IAAI,EAAE,YAAY,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,UAAU,CAAC;IAEnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B;;OAEG;IACH,QAAQ,CAAC,EAAE,yBAAyB,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,yBAAyB,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,MAAM,0CAA0C,GAAG,aAAa,CAAC;IACnE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACxB,CAAC,CAAC"}
package/esm/types.js CHANGED
@@ -1,14 +1,12 @@
1
1
  // (C) 2007-2026 GoodData Corporation
2
2
  import { isEmpty } from "lodash-es";
3
- import { isAttributeFilter, isDateFilter, isMeasureValueFilter, } from "@gooddata/sdk-model";
3
+ import { isDashboardFilter as isDashboardFilterBase, } from "@gooddata/sdk-model";
4
4
  /**
5
5
  * Type-guard testing whether the provided object is an instance of {@link IDashboardFilter}.
6
6
  *
7
7
  * @alpha
8
8
  */
9
- export function isDashboardFilter(obj) {
10
- return isAttributeFilter(obj) || isDateFilter(obj) || isMeasureValueFilter(obj);
11
- }
9
+ export const isDashboardFilter = isDashboardFilterBase;
12
10
  /**
13
11
  * Type-guard testing whether the provided object is an instance of {@link IDrillDownDefinition}.
14
12
  * @beta
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-dashboard",
3
- "version": "11.55.0-alpha.3",
3
+ "version": "11.55.0-alpha.4",
4
4
  "description": "GoodData SDK - Dashboard Component",
5
5
  "license": "LicenseRef-LICENSE",
6
6
  "author": "GoodData Corporation",
@@ -60,20 +60,20 @@
60
60
  "ts-invariant": "0.10.3",
61
61
  "tslib": "2.8.1",
62
62
  "uuid": "11.1.1",
63
- "@gooddata/sdk-backend-base": "11.55.0-alpha.3",
64
- "@gooddata/sdk-backend-spi": "11.55.0-alpha.3",
65
- "@gooddata/sdk-model": "11.55.0-alpha.3",
66
- "@gooddata/sdk-ui": "11.55.0-alpha.3",
67
- "@gooddata/sdk-ui-charts": "11.55.0-alpha.3",
68
- "@gooddata/sdk-ui-ext": "11.55.0-alpha.3",
69
- "@gooddata/sdk-ui-filters": "11.55.0-alpha.3",
70
- "@gooddata/sdk-ui-geo": "11.55.0-alpha.3",
71
- "@gooddata/sdk-ui-kit": "11.55.0-alpha.3",
72
- "@gooddata/sdk-ui-pivot": "11.55.0-alpha.3",
73
- "@gooddata/sdk-ui-semantic-search": "11.55.0-alpha.3",
74
- "@gooddata/sdk-ui-theme-provider": "11.55.0-alpha.3",
75
- "@gooddata/sdk-ui-vis-commons": "11.55.0-alpha.3",
76
- "@gooddata/util": "11.55.0-alpha.3"
63
+ "@gooddata/sdk-backend-base": "11.55.0-alpha.4",
64
+ "@gooddata/sdk-backend-spi": "11.55.0-alpha.4",
65
+ "@gooddata/sdk-model": "11.55.0-alpha.4",
66
+ "@gooddata/sdk-ui": "11.55.0-alpha.4",
67
+ "@gooddata/sdk-ui-charts": "11.55.0-alpha.4",
68
+ "@gooddata/sdk-ui-filters": "11.55.0-alpha.4",
69
+ "@gooddata/sdk-ui-geo": "11.55.0-alpha.4",
70
+ "@gooddata/sdk-ui-kit": "11.55.0-alpha.4",
71
+ "@gooddata/sdk-ui-pivot": "11.55.0-alpha.4",
72
+ "@gooddata/sdk-ui-ext": "11.55.0-alpha.4",
73
+ "@gooddata/sdk-ui-semantic-search": "11.55.0-alpha.4",
74
+ "@gooddata/sdk-ui-theme-provider": "11.55.0-alpha.4",
75
+ "@gooddata/sdk-ui-vis-commons": "11.55.0-alpha.4",
76
+ "@gooddata/util": "11.55.0-alpha.4"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@microsoft/api-documenter": "7.30.10",
@@ -92,7 +92,6 @@
92
92
  "@typescript-eslint/eslint-plugin": "8.58.0",
93
93
  "@typescript-eslint/parser": "8.58.0",
94
94
  "@typescript/native-preview": "7.0.0-dev.20260202.1",
95
- "@vitest/eslint-plugin": "1.6.19",
96
95
  "dependency-cruiser": "17.3.10",
97
96
  "eslint": "^9.39.2",
98
97
  "eslint-plugin-headers": "1.3.3",
@@ -105,7 +104,7 @@
105
104
  "eslint-plugin-sonarjs": "3.0.6",
106
105
  "happy-dom": "20.9.0",
107
106
  "npm-run-all": "4.1.5",
108
- "oxfmt": "0.52.0",
107
+ "oxfmt": "0.58.0",
109
108
  "oxlint": "1.57.0",
110
109
  "oxlint-tsgolint": "0.15.0",
111
110
  "raf": "3.4.1",
@@ -117,12 +116,12 @@
117
116
  "typescript": "5.9.3",
118
117
  "vitest": "4.1.8",
119
118
  "vitest-dom": "0.1.1",
120
- "@gooddata/eslint-config": "11.55.0-alpha.3",
121
- "@gooddata/i18n-toolkit": "11.55.0-alpha.3",
122
- "@gooddata/oxlint-config": "11.55.0-alpha.3",
123
- "@gooddata/reference-workspace": "11.55.0-alpha.3",
124
- "@gooddata/sdk-backend-mockingbird": "11.55.0-alpha.3",
125
- "@gooddata/stylelint-config": "11.55.0-alpha.3"
119
+ "@gooddata/eslint-config": "11.55.0-alpha.4",
120
+ "@gooddata/oxlint-config": "11.55.0-alpha.4",
121
+ "@gooddata/reference-workspace": "11.55.0-alpha.4",
122
+ "@gooddata/sdk-backend-mockingbird": "11.55.0-alpha.4",
123
+ "@gooddata/stylelint-config": "11.55.0-alpha.4",
124
+ "@gooddata/i18n-toolkit": "11.55.0-alpha.4"
126
125
  },
127
126
  "peerDependencies": {
128
127
  "react": "^18.0.0 || ^19.0.0",
@@ -785,8 +785,8 @@ $dashboard-menu-item-icon-color: var(--gd-palette-complementary-5-from-theme, #b
785
785
  }
786
786
 
787
787
  &:not(.gd-dashboard-nested-layout-widget):not(.gd-first-container-row-widget):not(
788
- .drag-info-placeholder
789
- ) {
788
+ .drag-info-placeholder
789
+ ) {
790
790
  padding: 10px 0; // no place between widgets, render only containers for resizers
791
791
  }
792
792
  &.gd-first-container-row-widget:not(.gd-dashboard-nested-layout-widget) {
@@ -869,8 +869,8 @@ $dashboard-menu-item-icon-color: var(--gd-palette-complementary-5-from-theme, #b
869
869
  }
870
870
 
871
871
  &:not(.gd-dashboard-nested-layout-widget):not(.gd-first-container-row-widget):not(
872
- .drag-info-placeholder
873
- ) {
872
+ .drag-info-placeholder
873
+ ) {
874
874
  padding: 0;
875
875
  }
876
876
 
@@ -1,93 +0,0 @@
1
- import { type DashboardAttributeFilterItem, type FilterContextItem, type IAttributeFilter, type IDashboardAttributeFilter, type IDashboardDateFilter, type IDashboardMeasureValueFilter, type IDateFilter, type IFilterContext, type IFilterContextDefinition, type IFilterableWidget, type IMeasureValueFilter, type ITempFilterContext, type IWidgetDefinition, type ObjRef } from "@gooddata/sdk-model";
2
- import { type IDashboardFilter } from "../types.js";
3
- /**
4
- * Gets {@link IDashboardFilter} items for filters specified in given filterContext in relation to the given widget.
5
- *
6
- * @param filterContext - filter context to get filters for
7
- * @param widget - widget to use to get dateDataSet for date filters
8
- * @public
9
- */
10
- export declare function filterContextToDashboardFiltersByWidget(filterContext: IFilterContextDefinition | IFilterContext | ITempFilterContext | undefined, widget: IWidgetDefinition): IDashboardFilter[];
11
- /**
12
- * Gets {@link IDashboardFilter} items for filters specified in given filterContext in relation to the
13
- * given dateDataSet.
14
- *
15
- * @param filterContext - filter context to get filters for
16
- * @param dateDataSet - widget to use to get dateDataSet for date filters
17
- * @public
18
- */
19
- export declare function filterContextToDashboardFiltersByDateDataSet(filterContext: IFilterContextDefinition | IFilterContext | ITempFilterContext | undefined, dateDataSet: ObjRef): IDashboardFilter[];
20
- /**
21
- * Converts {@link @gooddata/sdk-backend-spi#IDashboardAttributeFilter} to {@link @gooddata/sdk-model#IAttributeFilter} instance.
22
- *
23
- * @param filter - filter context attribute filter to convert
24
- * @deprecated Use {@link dashboardAttributeFilterItemToAttributeFilter} instead,
25
- * which supports all attribute filter types including text filters.
26
- * @public
27
- */
28
- export declare function dashboardAttributeFilterToAttributeFilter(filter: IDashboardAttributeFilter): IAttributeFilter;
29
- /**
30
- * Converts any {@link @gooddata/sdk-model#DashboardAttributeFilterItem} to {@link @gooddata/sdk-model#IAttributeFilter} instance.
31
- *
32
- * @remarks
33
- * Handles all attribute filter types: element-based (positive/negative selection),
34
- * arbitrary value filters, and match (text) filters.
35
- *
36
- * @param filter - dashboard attribute filter item to convert
37
- * @public
38
- */
39
- export declare function dashboardAttributeFilterItemToAttributeFilter(filter: DashboardAttributeFilterItem): IAttributeFilter;
40
- /**
41
- * Converts {@link @gooddata/sdk-backend-spi#IDashboardDateFilter} to {@link @gooddata/sdk-model#IDateFilter} instance.
42
- *
43
- * @param filter - filter context attribute filter to convert
44
- * @param widget - widget to use to get dateDataSet for date filters
45
- * @public
46
- */
47
- export declare function dashboardDateFilterToDateFilterByWidget(filter: IDashboardDateFilter, widget?: Partial<IFilterableWidget>): IDateFilter;
48
- /**
49
- * Converts {@link @gooddata/sdk-backend-spi#IDashboardDateFilter} to {@link @gooddata/sdk-model#IDateFilter} instance.
50
- *
51
- * @param filter - filter context attribute filter to convert
52
- * @param dateDataSet - date data set to define {@link @gooddata/sdk-model#IDateFilter}
53
- * @public
54
- */
55
- export declare function dashboardDateFilterToDateFilterByDateDataSet(filter: IDashboardDateFilter, dateDataSet: ObjRef): IDateFilter;
56
- /**
57
- * Converts {@link @gooddata/sdk-model#IDashboardMeasureValueFilter} to {@link @gooddata/sdk-model#IMeasureValueFilter} instance.
58
- *
59
- * @remarks
60
- * Dashboard measure value filters always reference a catalog metric via `ObjRef`, which is a valid
61
- * `ObjRefInScope`. When dashboard-level dimensionality is configured, it is passed through to the
62
- * execution filter; otherwise the backend derives granularity from the widget automatically.
63
- * Conditions are passed through unchanged.
64
- *
65
- * @param filter - dashboard measure value filter to convert
66
- * @public
67
- */
68
- export declare function dashboardMeasureValueFilterToMeasureValueFilter(filter: IDashboardMeasureValueFilter): IMeasureValueFilter;
69
- /**
70
- * Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
71
- *
72
- * @param filterContextItems - filter context items to get filters for
73
- * @param widget - widget to use to get dateDataSet for date filters
74
- * @public
75
- */
76
- export declare function filterContextItemsToDashboardFiltersByWidget(filterContextItems: FilterContextItem[], widget?: Partial<IFilterableWidget>): IDashboardFilter[];
77
- /**
78
- * Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
79
- *
80
- * @param filterContextItems - filter context items to get filters for
81
- * @param widget - widget to use to get dateDataSet for date filters
82
- * @public
83
- */
84
- export declare function filterContextItemsToDashboardFiltersByRichTextWidget(filterContextItems: FilterContextItem[], widget?: Partial<IFilterableWidget>): IDashboardFilter[];
85
- /**
86
- * Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
87
- *
88
- * @param filterContextItems - filter context items to get filters for
89
- * @param dateDataSet - date data set to define {@link @gooddata/sdk-model#IDateFilter}
90
- * @public
91
- */
92
- export declare function filterContextItemsToDashboardFiltersByDateDataSet(filterContextItems: FilterContextItem[], dateDataSet: ObjRef): IDashboardFilter[];
93
- //# sourceMappingURL=filterConverters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filterConverters.d.ts","sourceRoot":"","sources":["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BAAmB,CAUrB;AAED;;;;;;GAMG;AACH,wBAAgB,4CAA4C,CACxD,kBAAkB,EAAE,iBAAiB,EAAE,EACvC,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACpC,gBAAgB,EAAE,CAmBpB;AAED;;;;;;GAMG;AACH,wBAAgB,oDAAoD,CAChE,kBAAkB,EAAE,iBAAiB,EAAE,EACvC,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,GACpC,gBAAgB,EAAE,CAoBpB;AAED;;;;;;GAMG;AACH,wBAAgB,iDAAiD,CAC7D,kBAAkB,EAAE,iBAAiB,EAAE,EACvC,WAAW,EAAE,MAAM,GACpB,gBAAgB,EAAE,CAmBpB"}
@@ -1,199 +0,0 @@
1
- // (C) 2020-2026 GoodData Corporation
2
- import { isAllTimeDashboardDateFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilterItem, isDashboardDateFilter, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, newAbsoluteDateFilter, newAllTimeFilter, newArbitraryAttributeFilter, newMatchAttributeFilter, newNegativeAttributeFilter, newPositiveAttributeFilter, newRelativeDateFilter, } from "@gooddata/sdk-model";
3
- /**
4
- * Gets {@link IDashboardFilter} items for filters specified in given filterContext in relation to the given widget.
5
- *
6
- * @param filterContext - filter context to get filters for
7
- * @param widget - widget to use to get dateDataSet for date filters
8
- * @public
9
- */
10
- export function filterContextToDashboardFiltersByWidget(filterContext, widget) {
11
- if (!filterContext) {
12
- return [];
13
- }
14
- return filterContextItemsToDashboardFiltersByWidget(filterContext.filters, widget);
15
- }
16
- /**
17
- * Gets {@link IDashboardFilter} items for filters specified in given filterContext in relation to the
18
- * given dateDataSet.
19
- *
20
- * @param filterContext - filter context to get filters for
21
- * @param dateDataSet - widget to use to get dateDataSet for date filters
22
- * @public
23
- */
24
- export function filterContextToDashboardFiltersByDateDataSet(filterContext, dateDataSet) {
25
- if (!filterContext) {
26
- return [];
27
- }
28
- return filterContextItemsToDashboardFiltersByDateDataSet(filterContext.filters, dateDataSet);
29
- }
30
- /**
31
- * Converts {@link @gooddata/sdk-backend-spi#IDashboardAttributeFilter} to {@link @gooddata/sdk-model#IAttributeFilter} instance.
32
- *
33
- * @param filter - filter context attribute filter to convert
34
- * @deprecated Use {@link dashboardAttributeFilterItemToAttributeFilter} instead,
35
- * which supports all attribute filter types including text filters.
36
- * @public
37
- */
38
- export function dashboardAttributeFilterToAttributeFilter(filter) {
39
- if (filter.attributeFilter.negativeSelection) {
40
- return newNegativeAttributeFilter(filter.attributeFilter.displayForm, filter.attributeFilter.attributeElements, filter.attributeFilter.localIdentifier);
41
- }
42
- return newPositiveAttributeFilter(filter.attributeFilter.displayForm, filter.attributeFilter.attributeElements, filter.attributeFilter.localIdentifier);
43
- }
44
- /**
45
- * Converts any {@link @gooddata/sdk-model#DashboardAttributeFilterItem} to {@link @gooddata/sdk-model#IAttributeFilter} instance.
46
- *
47
- * @remarks
48
- * Handles all attribute filter types: element-based (positive/negative selection),
49
- * arbitrary value filters, and match (text) filters.
50
- *
51
- * @param filter - dashboard attribute filter item to convert
52
- * @public
53
- */
54
- export function dashboardAttributeFilterItemToAttributeFilter(filter) {
55
- if (isDashboardArbitraryAttributeFilter(filter)) {
56
- const { displayForm, values, negativeSelection, localIdentifier } = filter.arbitraryAttributeFilter;
57
- return newArbitraryAttributeFilter(displayForm, values, negativeSelection, localIdentifier);
58
- }
59
- if (isDashboardMatchAttributeFilter(filter)) {
60
- const { displayForm, operator, literal, caseSensitive, negativeSelection, localIdentifier } = filter.matchAttributeFilter;
61
- return newMatchAttributeFilter(displayForm, operator, literal, { caseSensitive, negativeSelection }, localIdentifier);
62
- }
63
- if (filter.attributeFilter.negativeSelection) {
64
- return newNegativeAttributeFilter(filter.attributeFilter.displayForm, filter.attributeFilter.attributeElements, filter.attributeFilter.localIdentifier);
65
- }
66
- return newPositiveAttributeFilter(filter.attributeFilter.displayForm, filter.attributeFilter.attributeElements, filter.attributeFilter.localIdentifier);
67
- }
68
- /**
69
- * Converts {@link @gooddata/sdk-backend-spi#IDashboardDateFilter} to {@link @gooddata/sdk-model#IDateFilter} instance.
70
- *
71
- * @param filter - filter context attribute filter to convert
72
- * @param widget - widget to use to get dateDataSet for date filters
73
- * @public
74
- */
75
- export function dashboardDateFilterToDateFilterByWidget(filter, widget) {
76
- if (isAllTimeDashboardDateFilter(filter)) {
77
- const dataSet = widget
78
- ? filter.dateFilter.dataSet || widget.dateDataSet
79
- : filter.dateFilter.dataSet;
80
- return newAllTimeFilter(dataSet, filter.dateFilter.localIdentifier, filter.dateFilter.emptyValueHandling);
81
- }
82
- if (filter.dateFilter.type === "relative") {
83
- return newRelativeDateFilter(widget ? filter.dateFilter.dataSet || widget.dateDataSet : filter.dateFilter.dataSet, filter.dateFilter.granularity, numberOrStringToNumber(filter.dateFilter.from), numberOrStringToNumber(filter.dateFilter.to), filter.dateFilter.localIdentifier, filter.dateFilter.boundedFilter, filter.dateFilter.emptyValueHandling);
84
- }
85
- else {
86
- return newAbsoluteDateFilter(widget ? filter.dateFilter.dataSet || widget.dateDataSet : filter.dateFilter.dataSet, filter.dateFilter.from.toString(), filter.dateFilter.to.toString(), filter.dateFilter.localIdentifier, filter.dateFilter.emptyValueHandling);
87
- }
88
- }
89
- /**
90
- * Converts {@link @gooddata/sdk-backend-spi#IDashboardDateFilter} to {@link @gooddata/sdk-model#IDateFilter} instance.
91
- *
92
- * @param filter - filter context attribute filter to convert
93
- * @param dateDataSet - date data set to define {@link @gooddata/sdk-model#IDateFilter}
94
- * @public
95
- */
96
- export function dashboardDateFilterToDateFilterByDateDataSet(filter, dateDataSet) {
97
- if (isAllTimeDashboardDateFilter(filter)) {
98
- return newAllTimeFilter(dateDataSet, filter.dateFilter.localIdentifier, filter.dateFilter.emptyValueHandling);
99
- }
100
- if (filter.dateFilter.type === "relative") {
101
- return newRelativeDateFilter(dateDataSet, filter.dateFilter.granularity, numberOrStringToNumber(filter.dateFilter.from), numberOrStringToNumber(filter.dateFilter.to), filter.dateFilter.localIdentifier, filter.dateFilter.boundedFilter, filter.dateFilter.emptyValueHandling);
102
- }
103
- else {
104
- return newAbsoluteDateFilter(dateDataSet, filter.dateFilter.from.toString(), filter.dateFilter.to.toString(), filter.dateFilter.localIdentifier, filter.dateFilter.emptyValueHandling);
105
- }
106
- }
107
- /**
108
- * Converts {@link @gooddata/sdk-model#IDashboardMeasureValueFilter} to {@link @gooddata/sdk-model#IMeasureValueFilter} instance.
109
- *
110
- * @remarks
111
- * Dashboard measure value filters always reference a catalog metric via `ObjRef`, which is a valid
112
- * `ObjRefInScope`. When dashboard-level dimensionality is configured, it is passed through to the
113
- * execution filter; otherwise the backend derives granularity from the widget automatically.
114
- * Conditions are passed through unchanged.
115
- *
116
- * @param filter - dashboard measure value filter to convert
117
- * @public
118
- */
119
- export function dashboardMeasureValueFilterToMeasureValueFilter(filter) {
120
- const { measure, localIdentifier, conditions, dimensionality } = filter.dashboardMeasureValueFilter;
121
- return {
122
- measureValueFilter: {
123
- measure,
124
- localIdentifier,
125
- ...(conditions && conditions.length > 0 ? { conditions } : {}),
126
- ...(dimensionality && dimensionality.length > 0 ? { dimensionality } : {}),
127
- },
128
- };
129
- }
130
- /**
131
- * Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
132
- *
133
- * @param filterContextItems - filter context items to get filters for
134
- * @param widget - widget to use to get dateDataSet for date filters
135
- * @public
136
- */
137
- export function filterContextItemsToDashboardFiltersByWidget(filterContextItems, widget) {
138
- return filterContextItems
139
- .filter((filter) => isDashboardAttributeFilterItem(filter) ||
140
- isDashboardDateFilter(filter) ||
141
- isDashboardMeasureValueFilter(filter))
142
- .map((filter) => {
143
- if (isDashboardAttributeFilterItem(filter)) {
144
- return dashboardAttributeFilterItemToAttributeFilter(filter);
145
- }
146
- if (isDashboardMeasureValueFilter(filter)) {
147
- return dashboardMeasureValueFilterToMeasureValueFilter(filter);
148
- }
149
- return dashboardDateFilterToDateFilterByWidget(filter, widget);
150
- });
151
- }
152
- /**
153
- * Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
154
- *
155
- * @param filterContextItems - filter context items to get filters for
156
- * @param widget - widget to use to get dateDataSet for date filters
157
- * @public
158
- */
159
- export function filterContextItemsToDashboardFiltersByRichTextWidget(filterContextItems, widget) {
160
- return filterContextItems
161
- .filter((filter) => isDashboardAttributeFilterItem(filter) ||
162
- isDashboardDateFilter(filter) ||
163
- isDashboardMeasureValueFilter(filter))
164
- .map((filter) => {
165
- if (isDashboardAttributeFilterItem(filter)) {
166
- return dashboardAttributeFilterItemToAttributeFilter(filter);
167
- }
168
- if (isDashboardMeasureValueFilter(filter)) {
169
- return dashboardMeasureValueFilterToMeasureValueFilter(filter);
170
- }
171
- return dashboardDateFilterToDateFilterByWidget(filter, widget);
172
- })
173
- .filter(Boolean);
174
- }
175
- /**
176
- * Gets {@link IDashboardFilter} items for filters specified as {@link @gooddata/sdk-backend-spi#FilterContextItem} instances.
177
- *
178
- * @param filterContextItems - filter context items to get filters for
179
- * @param dateDataSet - date data set to define {@link @gooddata/sdk-model#IDateFilter}
180
- * @public
181
- */
182
- export function filterContextItemsToDashboardFiltersByDateDataSet(filterContextItems, dateDataSet) {
183
- return filterContextItems
184
- .filter((filter) => isDashboardAttributeFilterItem(filter) ||
185
- isDashboardDateFilter(filter) ||
186
- isDashboardMeasureValueFilter(filter))
187
- .map((filter) => {
188
- if (isDashboardAttributeFilterItem(filter)) {
189
- return dashboardAttributeFilterItemToAttributeFilter(filter);
190
- }
191
- if (isDashboardMeasureValueFilter(filter)) {
192
- return dashboardMeasureValueFilterToMeasureValueFilter(filter);
193
- }
194
- return dashboardDateFilterToDateFilterByDateDataSet(filter, dateDataSet);
195
- });
196
- }
197
- function numberOrStringToNumber(input) {
198
- return typeof input === "string" ? Number.parseInt(input) : input;
199
- }