@gooddata/sdk-ui-dashboard 11.43.0-alpha.0 → 11.43.0-alpha.1
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.
- package/NOTICE +128 -128
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/index.d.ts +3 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/dateFilter/removeDateFiltersHandler.js +22 -4
- package/esm/model/commandHandlers/scheduledEmail/createScheduledEmailHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/createScheduledEmailHandler.js +3 -1
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.d.ts +2 -2
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/csvRawExecutionDefinition.js +36 -3
- package/esm/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/scheduledEmail/saveScheduledEmailHandler.js +3 -1
- package/esm/model/store/executionResults/executionResultsSelectors.d.ts +4 -0
- package/esm/model/store/executionResults/executionResultsSelectors.d.ts.map +1 -1
- package/esm/model/store/executionResults/executionResultsSelectors.js +4 -1
- package/esm/model/store/filtering/dashboardFilterSelectors.d.ts +1 -30
- package/esm/model/store/filtering/dashboardFilterSelectors.d.ts.map +1 -1
- package/esm/model/store/filtering/dashboardFilterSelectors.js +3 -0
- package/esm/model/store/filtering/types.d.ts +33 -0
- package/esm/model/store/filtering/types.d.ts.map +1 -0
- package/esm/model/store/filtering/types.js +2 -0
- package/esm/model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.d.ts +14 -0
- package/esm/model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/dateFilterConfig/dateFilterConfigSelectors.js +35 -0
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts +12 -0
- package/esm/model/store/tabs/parameters/parametersSelectors.d.ts.map +1 -1
- package/esm/model/store/tabs/parameters/parametersSelectors.js +37 -12
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultAlertingDialog.d.ts.map +1 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/DefaultAlertingDialog.js +9 -3
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingManagementDialog/components/PauseAlertRunner.js +1 -1
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts +3 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.js +110 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.d.ts +2 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useBuildAutomationsContext.test.js +99 -0
- package/esm/presentation/automations/connectors/hooks/useWidgetAutomationFilters.d.ts +4 -0
- package/esm/presentation/automations/connectors/hooks/useWidgetAutomationFilters.d.ts.map +1 -0
- package/esm/presentation/automations/connectors/hooks/useWidgetAutomationFilters.js +46 -0
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts +42 -2
- package/esm/presentation/automations/contexts/AutomationsContext.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/DefaultScheduledEmailDialog.js +8 -2
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts +2 -3
- package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/hooks/useWidgetAutomationFilters.js +4 -45
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.js +9 -16
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.d.ts +2 -0
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.d.ts.map +1 -0
- package/esm/presentation/automations/shared/automationFilters/components/AutomationDateFilter.test.js +131 -0
- package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/components/AutomationFiltersSelect.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useAutomationVisibleFilters.js +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForExistingAutomation.js +4 -6
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useDefaultSelectedFiltersForNewAutomation.js +3 -4
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/hooks/useValidateExistingAutomationFilters.js +4 -10
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFilters.js +3 -28
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts +2 -2
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/useAutomationFiltersSelect.js +2 -5
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts +1 -1
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterConfigConverters.d.ts +10 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterConfigConverters.d.ts.map +1 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterConfigConverters.js +89 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterOptionMapping.d.ts +34 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterOptionMapping.d.ts.map +1 -0
- package/esm/presentation/automations/shared/dateFilterConfig/dateFilterOptionMapping.js +261 -0
- package/esm/presentation/automations/shared/dateFilterConfig/defaultConfig.d.ts +12 -0
- package/esm/presentation/automations/shared/dateFilterConfig/defaultConfig.d.ts.map +1 -0
- package/esm/presentation/automations/shared/dateFilterConfig/defaultConfig.js +437 -0
- package/esm/presentation/automations/shared/exportUtils/filterUtils.d.ts +3 -0
- package/esm/presentation/automations/shared/exportUtils/filterUtils.d.ts.map +1 -0
- package/esm/presentation/automations/shared/exportUtils/filterUtils.js +14 -0
- package/esm/presentation/automations/shared/hooks/useAttributeFilterDisplayFormFromMap.d.ts +3 -0
- package/esm/presentation/automations/shared/hooks/useAttributeFilterDisplayFormFromMap.d.ts.map +1 -0
- package/esm/presentation/automations/shared/hooks/useAttributeFilterDisplayFormFromMap.js +7 -0
- package/esm/presentation/automations/shared/hooks/useCommonDateFilterTitle.d.ts +3 -0
- package/esm/presentation/automations/shared/hooks/useCommonDateFilterTitle.d.ts.map +1 -0
- package/esm/presentation/automations/shared/hooks/useCommonDateFilterTitle.js +6 -0
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.d.ts +4 -0
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.d.ts.map +1 -0
- package/esm/presentation/automations/shared/hooks/useDateFiltersTitles.js +19 -0
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts +13 -0
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.d.ts.map +1 -0
- package/esm/presentation/automations/shared/hooks/useFiltersNamings.js +196 -0
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts +24 -0
- package/esm/presentation/automations/shared/utils/automationUtils.d.ts.map +1 -0
- package/esm/presentation/automations/shared/utils/automationUtils.js +135 -0
- package/esm/presentation/automations/shared/utils/filterContextUtils.d.ts +4 -0
- package/esm/presentation/automations/shared/utils/filterContextUtils.d.ts.map +1 -0
- package/esm/presentation/automations/shared/utils/filterContextUtils.js +67 -0
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFilterConfigurationState.js +34 -16
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/dashboardDropdownBody/configuration/hooks/useDependentDateFiltersConfiguration.js +23 -8
- package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.d.ts.map +1 -1
- package/esm/presentation/filterBar/attributeFilter/useDependentDateFilters.js +17 -6
- package/esm/presentation/topBar/menuButton/DefaultMenuButton.js +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.d.ts.map +1 -1
- package/esm/presentation/widget/insight/ViewModeDashboardInsight/InsightDrillDialog/DrillDialogInsight.js +11 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useCreateAlert.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useInsightWidgetAlerting.js +2 -2
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useSaveAlertToBackend.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useUpdateAlert.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useWidgetAutomationFilters.d.ts +4 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useWidgetAutomationFilters.d.ts.map +1 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertConfig/hooks/useWidgetAutomationFilters.js +46 -0
- package/esm/presentation/widget/insight/configuration/InsightAlertsNew.d.ts.map +1 -1
- package/esm/presentation/widget/insight/configuration/InsightAlertsNew.js +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.d.ts.map +1 -1
- package/esm/presentation/widget/insightMenu/DefaultDashboardInsightMenu/DashboardInsightMenu/DashboardInsightMenuItemButton.js +2 -2
- package/esm/presentation/widget/insightMenu/types.js +1 -1
- package/esm/presentation/widget/widget/warningPartialResult/InsightWidgetWarningPartialResult.d.ts.map +1 -1
- package/esm/presentation/widget/widget/warningPartialResult/InsightWidgetWarningPartialResult.js +1 -1
- package/esm/sdk-ui-dashboard.d.ts +11 -2
- package/esm/tsdoc-metadata.json +1 -1
- package/package.json +20 -20
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useCreateAlert.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useSaveAlertToBackend.d.ts.map +0 -1
- package/esm/presentation/automations/_staging/alerting/DefaultAlertingDialog/hooks/useUpdateAlert.d.ts.map +0 -1
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useCreateAlert.d.ts +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useCreateAlert.js +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useSaveAlertToBackend.d.ts +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useSaveAlertToBackend.js +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useUpdateAlert.d.ts +0 -0
- /package/esm/presentation/{automations/_staging/alerting/DefaultAlertingDialog → widget/insight/configuration/InsightAlertConfig}/hooks/useUpdateAlert.js +0 -0
|
@@ -0,0 +1,437 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { idRef } from "@gooddata/sdk-model";
|
|
3
|
+
/**
|
|
4
|
+
* Default date filter preset for standard calendar.
|
|
5
|
+
*/
|
|
6
|
+
export const DEFAULT_DATE_FILTER_PRESET = "THIS_MONTH";
|
|
7
|
+
/**
|
|
8
|
+
* Default date filter preset for fiscal calendar.
|
|
9
|
+
* Used when fiscal calendar is set as the default calendar type.
|
|
10
|
+
*/
|
|
11
|
+
export const DEFAULT_FISCAL_DATE_FILTER_PRESET = "THIS_FISCAL_MONTH";
|
|
12
|
+
export const defaultDateFilterConfig = {
|
|
13
|
+
ref: idRef("defaultDateFilterProjectConfig"),
|
|
14
|
+
selectedOption: DEFAULT_DATE_FILTER_PRESET,
|
|
15
|
+
allTime: {
|
|
16
|
+
localIdentifier: "ALL_TIME",
|
|
17
|
+
type: "allTime",
|
|
18
|
+
name: "",
|
|
19
|
+
visible: true,
|
|
20
|
+
},
|
|
21
|
+
emptyValues: {
|
|
22
|
+
localIdentifier: "EMPTY_VALUES",
|
|
23
|
+
type: "emptyValues",
|
|
24
|
+
name: "",
|
|
25
|
+
visible: true,
|
|
26
|
+
},
|
|
27
|
+
absoluteForm: {
|
|
28
|
+
localIdentifier: "ABSOLUTE_FORM",
|
|
29
|
+
type: "absoluteForm",
|
|
30
|
+
name: "",
|
|
31
|
+
visible: true,
|
|
32
|
+
},
|
|
33
|
+
relativeForm: {
|
|
34
|
+
type: "relativeForm",
|
|
35
|
+
// month has to be the first as it should be the default selected option
|
|
36
|
+
availableGranularities: [
|
|
37
|
+
"GDC.time.month",
|
|
38
|
+
"GDC.time.fiscal_month",
|
|
39
|
+
"GDC.time.minute",
|
|
40
|
+
"GDC.time.hour",
|
|
41
|
+
"GDC.time.date",
|
|
42
|
+
"GDC.time.week_us",
|
|
43
|
+
"GDC.time.quarter",
|
|
44
|
+
"GDC.time.fiscal_quarter",
|
|
45
|
+
"GDC.time.year",
|
|
46
|
+
"GDC.time.fiscal_year",
|
|
47
|
+
],
|
|
48
|
+
localIdentifier: "RELATIVE_FORM",
|
|
49
|
+
name: "",
|
|
50
|
+
visible: true,
|
|
51
|
+
},
|
|
52
|
+
relativePresets: [
|
|
53
|
+
{
|
|
54
|
+
from: -14,
|
|
55
|
+
to: 0,
|
|
56
|
+
granularity: "GDC.time.minute",
|
|
57
|
+
localIdentifier: "LAST_15_MINUTES",
|
|
58
|
+
type: "relativePreset",
|
|
59
|
+
visible: true,
|
|
60
|
+
name: "",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
from: -29,
|
|
64
|
+
to: 0,
|
|
65
|
+
granularity: "GDC.time.minute",
|
|
66
|
+
localIdentifier: "LAST_30_MINUTES",
|
|
67
|
+
type: "relativePreset",
|
|
68
|
+
visible: true,
|
|
69
|
+
name: "",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
from: -44,
|
|
73
|
+
to: 0,
|
|
74
|
+
granularity: "GDC.time.minute",
|
|
75
|
+
localIdentifier: "LAST_45_MINUTES",
|
|
76
|
+
type: "relativePreset",
|
|
77
|
+
visible: true,
|
|
78
|
+
name: "",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
from: -59,
|
|
82
|
+
to: 0,
|
|
83
|
+
granularity: "GDC.time.minute",
|
|
84
|
+
localIdentifier: "LAST_60_MINUTES",
|
|
85
|
+
type: "relativePreset",
|
|
86
|
+
visible: true,
|
|
87
|
+
name: "",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
from: -1,
|
|
91
|
+
to: -1,
|
|
92
|
+
granularity: "GDC.time.hour",
|
|
93
|
+
localIdentifier: "LAST_HOUR",
|
|
94
|
+
type: "relativePreset",
|
|
95
|
+
visible: true,
|
|
96
|
+
name: "",
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
from: -7,
|
|
100
|
+
to: 0,
|
|
101
|
+
granularity: "GDC.time.hour",
|
|
102
|
+
localIdentifier: "LAST_8_HOURS",
|
|
103
|
+
type: "relativePreset",
|
|
104
|
+
visible: true,
|
|
105
|
+
name: "",
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
from: -11,
|
|
109
|
+
to: 0,
|
|
110
|
+
granularity: "GDC.time.hour",
|
|
111
|
+
localIdentifier: "LAST_12_HOURS",
|
|
112
|
+
type: "relativePreset",
|
|
113
|
+
visible: true,
|
|
114
|
+
name: "",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
from: -23,
|
|
118
|
+
to: 0,
|
|
119
|
+
granularity: "GDC.time.hour",
|
|
120
|
+
localIdentifier: "LAST_24_HOURS",
|
|
121
|
+
type: "relativePreset",
|
|
122
|
+
visible: true,
|
|
123
|
+
name: "",
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
from: 0,
|
|
127
|
+
to: 0,
|
|
128
|
+
granularity: "GDC.time.week_us",
|
|
129
|
+
localIdentifier: "THIS_WEEK",
|
|
130
|
+
type: "relativePreset",
|
|
131
|
+
visible: true,
|
|
132
|
+
name: "",
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
from: 0,
|
|
136
|
+
to: 0,
|
|
137
|
+
granularity: "GDC.time.week_us",
|
|
138
|
+
localIdentifier: "THIS_WEEK_TO_DATE",
|
|
139
|
+
type: "relativePreset",
|
|
140
|
+
visible: true,
|
|
141
|
+
name: "",
|
|
142
|
+
boundedFilter: {
|
|
143
|
+
granularity: "GDC.time.date",
|
|
144
|
+
to: 0,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
from: -1,
|
|
149
|
+
to: -1,
|
|
150
|
+
granularity: "GDC.time.week_us",
|
|
151
|
+
localIdentifier: "LAST_WEEK",
|
|
152
|
+
type: "relativePreset",
|
|
153
|
+
visible: true,
|
|
154
|
+
name: "",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
from: -1,
|
|
158
|
+
to: 0,
|
|
159
|
+
granularity: "GDC.time.week_us",
|
|
160
|
+
localIdentifier: "LAST_2_WEEKS",
|
|
161
|
+
type: "relativePreset",
|
|
162
|
+
visible: true,
|
|
163
|
+
name: "",
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
from: 0,
|
|
167
|
+
to: 0,
|
|
168
|
+
granularity: "GDC.time.date",
|
|
169
|
+
localIdentifier: "TODAY",
|
|
170
|
+
type: "relativePreset",
|
|
171
|
+
visible: true,
|
|
172
|
+
name: "",
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
from: -1,
|
|
176
|
+
to: -1,
|
|
177
|
+
granularity: "GDC.time.date",
|
|
178
|
+
localIdentifier: "YESTERDAY",
|
|
179
|
+
type: "relativePreset",
|
|
180
|
+
visible: true,
|
|
181
|
+
name: "",
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
from: -6,
|
|
185
|
+
to: 0,
|
|
186
|
+
granularity: "GDC.time.date",
|
|
187
|
+
localIdentifier: "LAST_7_DAYS",
|
|
188
|
+
type: "relativePreset",
|
|
189
|
+
visible: true,
|
|
190
|
+
name: "",
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
from: -29,
|
|
194
|
+
to: 0,
|
|
195
|
+
granularity: "GDC.time.date",
|
|
196
|
+
localIdentifier: "LAST_30_DAYS",
|
|
197
|
+
type: "relativePreset",
|
|
198
|
+
visible: true,
|
|
199
|
+
name: "",
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
from: -89,
|
|
203
|
+
to: 0,
|
|
204
|
+
granularity: "GDC.time.date",
|
|
205
|
+
localIdentifier: "LAST_90_DAYS",
|
|
206
|
+
type: "relativePreset",
|
|
207
|
+
visible: true,
|
|
208
|
+
name: "",
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
from: 0,
|
|
212
|
+
to: 0,
|
|
213
|
+
granularity: "GDC.time.month",
|
|
214
|
+
localIdentifier: "THIS_MONTH_TO_DATE",
|
|
215
|
+
type: "relativePreset",
|
|
216
|
+
visible: true,
|
|
217
|
+
name: "",
|
|
218
|
+
boundedFilter: {
|
|
219
|
+
granularity: "GDC.time.date",
|
|
220
|
+
to: 0,
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
from: 0,
|
|
225
|
+
to: 0,
|
|
226
|
+
granularity: "GDC.time.month",
|
|
227
|
+
localIdentifier: "THIS_MONTH",
|
|
228
|
+
type: "relativePreset",
|
|
229
|
+
visible: true,
|
|
230
|
+
name: "",
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
from: -1,
|
|
234
|
+
to: -1,
|
|
235
|
+
granularity: "GDC.time.month",
|
|
236
|
+
localIdentifier: "LAST_MONTH",
|
|
237
|
+
type: "relativePreset",
|
|
238
|
+
visible: true,
|
|
239
|
+
name: "",
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
from: -11,
|
|
243
|
+
to: 0,
|
|
244
|
+
granularity: "GDC.time.month",
|
|
245
|
+
localIdentifier: "LAST_12_MONTHS",
|
|
246
|
+
type: "relativePreset",
|
|
247
|
+
visible: true,
|
|
248
|
+
name: "",
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
from: 0,
|
|
252
|
+
to: 0,
|
|
253
|
+
granularity: "GDC.time.quarter",
|
|
254
|
+
localIdentifier: "THIS_QUARTER_TO_DATE",
|
|
255
|
+
type: "relativePreset",
|
|
256
|
+
visible: true,
|
|
257
|
+
name: "",
|
|
258
|
+
boundedFilter: {
|
|
259
|
+
granularity: "GDC.time.date",
|
|
260
|
+
to: 0,
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
from: 0,
|
|
265
|
+
to: 0,
|
|
266
|
+
granularity: "GDC.time.quarter",
|
|
267
|
+
localIdentifier: "THIS_QUARTER",
|
|
268
|
+
type: "relativePreset",
|
|
269
|
+
visible: true,
|
|
270
|
+
name: "",
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
from: -1,
|
|
274
|
+
to: -1,
|
|
275
|
+
granularity: "GDC.time.quarter",
|
|
276
|
+
localIdentifier: "LAST_QUARTER",
|
|
277
|
+
type: "relativePreset",
|
|
278
|
+
visible: true,
|
|
279
|
+
name: "",
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
from: -3,
|
|
283
|
+
to: 0,
|
|
284
|
+
granularity: "GDC.time.quarter",
|
|
285
|
+
localIdentifier: "LAST_4_QUARTERS",
|
|
286
|
+
type: "relativePreset",
|
|
287
|
+
visible: true,
|
|
288
|
+
name: "",
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
from: 0,
|
|
292
|
+
to: 0,
|
|
293
|
+
granularity: "GDC.time.year",
|
|
294
|
+
localIdentifier: "THIS_YEAR_TO_DATE",
|
|
295
|
+
type: "relativePreset",
|
|
296
|
+
visible: true,
|
|
297
|
+
name: "",
|
|
298
|
+
boundedFilter: {
|
|
299
|
+
granularity: "GDC.time.date",
|
|
300
|
+
to: 0,
|
|
301
|
+
},
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
from: 0,
|
|
305
|
+
to: 0,
|
|
306
|
+
granularity: "GDC.time.year",
|
|
307
|
+
localIdentifier: "THIS_YEAR",
|
|
308
|
+
type: "relativePreset",
|
|
309
|
+
visible: true,
|
|
310
|
+
name: "",
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
from: -1,
|
|
314
|
+
to: -1,
|
|
315
|
+
granularity: "GDC.time.year",
|
|
316
|
+
localIdentifier: "LAST_YEAR",
|
|
317
|
+
type: "relativePreset",
|
|
318
|
+
visible: true,
|
|
319
|
+
name: "",
|
|
320
|
+
},
|
|
321
|
+
// Fiscal Year presets
|
|
322
|
+
{
|
|
323
|
+
from: 0,
|
|
324
|
+
to: 0,
|
|
325
|
+
granularity: "GDC.time.fiscal_year",
|
|
326
|
+
localIdentifier: "THIS_FISCAL_YEAR_TO_DATE",
|
|
327
|
+
type: "relativePreset",
|
|
328
|
+
visible: true,
|
|
329
|
+
name: "",
|
|
330
|
+
boundedFilter: {
|
|
331
|
+
granularity: "GDC.time.date",
|
|
332
|
+
to: 0,
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
from: 0,
|
|
337
|
+
to: 0,
|
|
338
|
+
granularity: "GDC.time.fiscal_year",
|
|
339
|
+
localIdentifier: "THIS_FISCAL_YEAR",
|
|
340
|
+
type: "relativePreset",
|
|
341
|
+
visible: true,
|
|
342
|
+
name: "",
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
from: -1,
|
|
346
|
+
to: -1,
|
|
347
|
+
granularity: "GDC.time.fiscal_year",
|
|
348
|
+
localIdentifier: "LAST_FISCAL_YEAR",
|
|
349
|
+
type: "relativePreset",
|
|
350
|
+
visible: true,
|
|
351
|
+
name: "",
|
|
352
|
+
},
|
|
353
|
+
// Fiscal Quarter presets
|
|
354
|
+
{
|
|
355
|
+
from: 0,
|
|
356
|
+
to: 0,
|
|
357
|
+
granularity: "GDC.time.fiscal_quarter",
|
|
358
|
+
localIdentifier: "THIS_FISCAL_QUARTER_TO_DATE",
|
|
359
|
+
type: "relativePreset",
|
|
360
|
+
visible: true,
|
|
361
|
+
name: "",
|
|
362
|
+
boundedFilter: {
|
|
363
|
+
granularity: "GDC.time.date",
|
|
364
|
+
to: 0,
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
from: 0,
|
|
369
|
+
to: 0,
|
|
370
|
+
granularity: "GDC.time.fiscal_quarter",
|
|
371
|
+
localIdentifier: "THIS_FISCAL_QUARTER",
|
|
372
|
+
type: "relativePreset",
|
|
373
|
+
visible: true,
|
|
374
|
+
name: "",
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
from: -1,
|
|
378
|
+
to: -1,
|
|
379
|
+
granularity: "GDC.time.fiscal_quarter",
|
|
380
|
+
localIdentifier: "LAST_FISCAL_QUARTER",
|
|
381
|
+
type: "relativePreset",
|
|
382
|
+
visible: true,
|
|
383
|
+
name: "",
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
from: -3,
|
|
387
|
+
to: 0,
|
|
388
|
+
granularity: "GDC.time.fiscal_quarter",
|
|
389
|
+
localIdentifier: "LAST_4_FISCAL_QUARTERS",
|
|
390
|
+
type: "relativePreset",
|
|
391
|
+
visible: true,
|
|
392
|
+
name: "",
|
|
393
|
+
},
|
|
394
|
+
// Fiscal Month (Period) presets
|
|
395
|
+
{
|
|
396
|
+
from: 0,
|
|
397
|
+
to: 0,
|
|
398
|
+
granularity: "GDC.time.fiscal_month",
|
|
399
|
+
localIdentifier: "THIS_FISCAL_MONTH_TO_DATE",
|
|
400
|
+
type: "relativePreset",
|
|
401
|
+
visible: true,
|
|
402
|
+
name: "",
|
|
403
|
+
boundedFilter: {
|
|
404
|
+
granularity: "GDC.time.date",
|
|
405
|
+
to: 0,
|
|
406
|
+
},
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
from: 0,
|
|
410
|
+
to: 0,
|
|
411
|
+
granularity: "GDC.time.fiscal_month",
|
|
412
|
+
localIdentifier: "THIS_FISCAL_MONTH",
|
|
413
|
+
type: "relativePreset",
|
|
414
|
+
visible: true,
|
|
415
|
+
name: "",
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
from: -1,
|
|
419
|
+
to: -1,
|
|
420
|
+
granularity: "GDC.time.fiscal_month",
|
|
421
|
+
localIdentifier: "LAST_FISCAL_MONTH",
|
|
422
|
+
type: "relativePreset",
|
|
423
|
+
visible: true,
|
|
424
|
+
name: "",
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
from: -11,
|
|
428
|
+
to: 0,
|
|
429
|
+
granularity: "GDC.time.fiscal_month",
|
|
430
|
+
localIdentifier: "LAST_12_FISCAL_MONTHS",
|
|
431
|
+
type: "relativePreset",
|
|
432
|
+
visible: true,
|
|
433
|
+
name: "",
|
|
434
|
+
},
|
|
435
|
+
],
|
|
436
|
+
absolutePresets: [],
|
|
437
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterUtils.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/exportUtils/filterUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAA+B,MAAM,qBAAqB,CAAC;AAU1F,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,EAAE,CAI9F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
|
+
import { isDashboardCommonDateFilter } from "@gooddata/sdk-model";
|
|
3
|
+
// the value is taken from gdc-dashboards
|
|
4
|
+
const allTimeFilterContextItem = {
|
|
5
|
+
dateFilter: {
|
|
6
|
+
type: "absolute",
|
|
7
|
+
granularity: "GDC.time.year",
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
export function ensureAllTimeFilterForExport(filters) {
|
|
11
|
+
// if there is no date filter, add an "all time" filter so that in case the dashboard is saved with some
|
|
12
|
+
// date filter, it is overridden to All time for the purpose of the export
|
|
13
|
+
return filters.some(isDashboardCommonDateFilter) ? filters : [allTimeFilterContextItem, ...filters];
|
|
14
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
export declare function useAttributeFilterDisplayFormFromMap(): (displayForm: ObjRef) => import("@gooddata/sdk-model").IAttributeDisplayFormMetadataObject | undefined;
|
|
3
|
+
//# sourceMappingURL=useAttributeFilterDisplayFormFromMap.d.ts.map
|
package/esm/presentation/automations/shared/hooks/useAttributeFilterDisplayFormFromMap.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAttributeFilterDisplayFormFromMap.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/hooks/useAttributeFilterDisplayFormFromMap.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAIlD,wBAAgB,oCAAoC,2GAMnD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// (C) 2025-2026 GoodData Corporation
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
4
|
+
export function useAttributeFilterDisplayFormFromMap() {
|
|
5
|
+
const { getAttributeFilterDisplayForm } = useAutomationsContext();
|
|
6
|
+
return useCallback((displayForm) => getAttributeFilterDisplayForm(displayForm), [getAttributeFilterDisplayForm]);
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCommonDateFilterTitle.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/hooks/useCommonDateFilterTitle.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAI5C,eAAO,MAAM,wBAAwB,6BAIpC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// (C) 2024-2026 GoodData Corporation
|
|
2
|
+
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
3
|
+
export const useCommonDateFilterTitle = (intl) => {
|
|
4
|
+
const { dateFilterContextConfig } = useAutomationsContext();
|
|
5
|
+
return dateFilterContextConfig?.filterName ?? intl.formatMessage({ id: "dateFilterDropdown.title" });
|
|
6
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type IntlShape } from "react-intl";
|
|
2
|
+
import { type IDashboardDateFilter } from "@gooddata/sdk-model";
|
|
3
|
+
export declare const useDateFiltersTitles: (filters: IDashboardDateFilter[], intl: IntlShape) => Record<string, string>;
|
|
4
|
+
//# sourceMappingURL=useDateFiltersTitles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDateFiltersTitles.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/hooks/useDateFiltersTitles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAAE,KAAK,oBAAoB,EAAoC,MAAM,qBAAqB,CAAC;AAIlG,eAAO,MAAM,oBAAoB,8EA6BhC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// (C) 2024-2026 GoodData Corporation
|
|
2
|
+
import { areObjRefsEqual, serializeObjRef } from "@gooddata/sdk-model";
|
|
3
|
+
import { useAutomationsContext } from "../../contexts/AutomationsContext.js";
|
|
4
|
+
export const useDateFiltersTitles = (filters, intl) => {
|
|
5
|
+
const { catalogDateDatasets: allDateDatasets, dateFilterConfigs: allDateOverrides } = useAutomationsContext();
|
|
6
|
+
return filters.reduce((acc, filter) => {
|
|
7
|
+
if (!filter.dateFilter.dataSet) {
|
|
8
|
+
return acc;
|
|
9
|
+
}
|
|
10
|
+
const key = serializeObjRef(filter.dateFilter.dataSet);
|
|
11
|
+
const customFilterName = allDateOverrides.find((config) => areObjRefsEqual(config.dateDataSet, filter.dateFilter.dataSet))?.config?.filterName;
|
|
12
|
+
const dateDataSetName = allDateDatasets.find((ds) => areObjRefsEqual(ds.dataSet.ref, filter?.dateFilter.dataSet))?.dataSet?.title;
|
|
13
|
+
const title = customFilterName || dateDataSetName || intl.formatMessage({ id: "dateFilterDropdown.title" });
|
|
14
|
+
if (title) {
|
|
15
|
+
acc[key] = title;
|
|
16
|
+
}
|
|
17
|
+
return acc;
|
|
18
|
+
}, {});
|
|
19
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type FilterContextItem, type ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
export type FilterNaming = {
|
|
3
|
+
type: "attributeFilter" | "dateFilter" | "measureValueFilter";
|
|
4
|
+
all: boolean;
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
subtitle: string;
|
|
8
|
+
common?: true;
|
|
9
|
+
dataSet?: ObjRef;
|
|
10
|
+
};
|
|
11
|
+
export declare function useFiltersNamings(filtersToDisplay: FilterContextItem[]): (FilterNaming | undefined)[];
|
|
12
|
+
export declare function useFiltersByTabNamings(tabFilters: Record<string, FilterContextItem[]>): Record<string, (FilterNaming | undefined)[]>;
|
|
13
|
+
//# sourceMappingURL=useFiltersNamings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFiltersNamings.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/hooks/useFiltersNamings.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,iBAAiB,EAItB,KAAK,MAAM,EAgBd,MAAM,qBAAqB,CAAC;AAqB7B,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAE,iBAAiB,GAAG,YAAY,GAAG,oBAAoB,CAAC;IAC9D,GAAG,EAAE,OAAO,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA8OF,wBAAgB,iBAAiB,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,GAAG,CAAC,YAAY,GAAG,SAAS,CAAC,EAAE,CAIrG;AAED,wBAAgB,sBAAsB,CAClC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,EAAE,CAAC,GAChD,MAAM,CAAC,MAAM,EAAE,CAAC,YAAY,GAAG,SAAS,CAAC,EAAE,CAAC,CAa9C"}
|