@gooddata/sdk-ui-dashboard 11.70.0-alpha.2 → 11.70.0-alpha.3
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 +49 -49
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/_staging/dashboard/parameterizedDateFilters.d.ts +2 -0
- package/esm/_staging/dashboard/parameterizedDateFilters.d.ts.map +1 -0
- package/esm/_staging/dashboard/parameterizedDateFilters.js +2 -0
- package/esm/index.d.ts +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/index.js +7 -30
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts +14 -2
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.d.ts.map +1 -1
- package/esm/model/commandHandlers/dashboard/initializeDashboardHandler/loadDashboardParameters.js +44 -7
- package/esm/model/commandHandlers/drill/common/sourceDrillFilters.d.ts.map +1 -1
- package/esm/model/commandHandlers/drill/common/sourceDrillFilters.js +7 -2
- package/esm/model/commandHandlers/drill/drillToDashboardHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.d.ts.map +1 -1
- package/esm/model/commandHandlers/filterContext/changeFilterContextSelectionHandler.js +6 -1
- package/esm/model/commands/filters.d.ts +2 -1
- package/esm/model/commands/filters.d.ts.map +1 -1
- package/esm/model/commands/filters.js +6 -2
- package/esm/model/store/catalog/catalogSelectors.d.ts +42 -6
- package/esm/model/store/catalog/catalogSelectors.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogSelectors.js +42 -6
- package/esm/model/store/catalog/catalogState.d.ts +22 -2
- package/esm/model/store/catalog/catalogState.d.ts.map +1 -1
- package/esm/model/store/catalog/catalogState.js +6 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DestinationSelect/DestinationSelect.d.ts.map +1 -1
- package/esm/presentation/automations/scheduledEmail/DefaultScheduledEmailDialog/components/DestinationSelect/DestinationSelect.js +20 -3
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts +2 -2
- package/esm/presentation/automations/shared/automationFilters/utils.d.ts.map +1 -1
- package/esm/presentation/automations/shared/automationFilters/utils.js +14 -1
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.d.ts.map +1 -1
- package/esm/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.js +1 -1
- package/esm/presentation/insightEditor/filterContext/dateFilters.d.ts.map +1 -1
- package/esm/presentation/insightEditor/filterContext/dateFilters.js +4 -1
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.js +4 -1
- package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.d.ts.map +1 -1
- package/esm/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.js +3 -1
- package/esm/sdk-ui-dashboard.d.ts +47 -5
- package/package.json +23 -23
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2024-2026 GoodData Corporation
|
|
3
|
-
import { useMemo } from "react";
|
|
3
|
+
import { useEffect, useMemo } from "react";
|
|
4
4
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
5
|
-
import {
|
|
5
|
+
import { createInvalidDatapoint, createInvalidNode, useValidationContextValue } from "@gooddata/sdk-ui";
|
|
6
|
+
import { Dropdown, DropdownButton, Hyperlink, SingleSelectListItem, UiListbox, useIdPrefixed, } from "@gooddata/sdk-ui-kit";
|
|
6
7
|
import { DEFAULT_DROPDOWN_ALIGN_POINTS } from "../../constants.js";
|
|
7
8
|
const DROPDOWN_WIDTH = 199;
|
|
8
9
|
export function DestinationSelect({ notificationChannels, selectedItemId, onChange, closeOnParentScroll, overlayPositionType, }) {
|
|
@@ -17,7 +18,23 @@ export function DestinationSelect({ notificationChannels, selectedItemId, onChan
|
|
|
17
18
|
return items.find((item) => item.id === selectedItemId);
|
|
18
19
|
}, [items, selectedItemId]);
|
|
19
20
|
const accessibilityValue = "schedule.destination";
|
|
20
|
-
|
|
21
|
+
const labelId = useIdPrefixed("destinationLabel");
|
|
22
|
+
const missingDestinationId = useIdPrefixed("destinationMissing");
|
|
23
|
+
const isEmpty = items.length === 0;
|
|
24
|
+
// Registers the "no destination" warning in the dialog's validation tree, so the disabled submit
|
|
25
|
+
// button references it through its validation-driven aria-describedby.
|
|
26
|
+
const { setInvalidDatapoints } = useValidationContextValue(createInvalidNode({ id: "DestinationSelect" }));
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setInvalidDatapoints(() => isEmpty
|
|
29
|
+
? [
|
|
30
|
+
createInvalidDatapoint({
|
|
31
|
+
id: missingDestinationId,
|
|
32
|
+
message: intl.formatMessage({ id: "dialogs.schedule.email.destination.missing" }),
|
|
33
|
+
}),
|
|
34
|
+
]
|
|
35
|
+
: []);
|
|
36
|
+
}, [isEmpty, missingDestinationId, intl, setInvalidDatapoints]);
|
|
37
|
+
return (_jsxs("div", { className: "gd-input-component gd-destination-field s-gd-notifications-channels-dialog-destination", role: isEmpty ? "group" : undefined, "aria-labelledby": isEmpty ? `${labelId} ${missingDestinationId}` : undefined, children: [_jsx("label", { id: labelId, htmlFor: isEmpty ? undefined : accessibilityValue, className: "gd-label", children: _jsx(FormattedMessage, { id: "dialogs.schedule.email.destination" }) }), isEmpty ? (_jsxs("div", { className: "gd-notifications-channels-dialog-destination-empty", children: [_jsxs("span", { id: missingDestinationId, children: [_jsx("span", { className: "gd-icon-warning", "aria-hidden": "true" }), _jsx(FormattedMessage, { id: "dialogs.schedule.email.destination.missing" })] }), _jsx(Hyperlink, { text: intl.formatMessage({ id: "dialogs.schedule.email.destination.help" }), href: "/settings" })] })) : (_jsx(Dropdown, { overlayPositionType: overlayPositionType, closeOnParentScroll: closeOnParentScroll, alignPoints: DEFAULT_DROPDOWN_ALIGN_POINTS, className: "gd-notifications-channels-dialog-destination s-gd-notifications-channels-dialog-destination", autofocusOnOpen: true, renderButton: ({ toggleDropdown, dropdownId, isOpen, buttonRef }) => (_jsx(DropdownButton, { id: accessibilityValue, value: selectedItem?.title, onClick: toggleDropdown, className: "gd-notifications-channels-dialog-destination-button", buttonRef: buttonRef, dropdownId: dropdownId, isOpen: isOpen, accessibilityConfig: {
|
|
21
38
|
popupType: "listbox",
|
|
22
39
|
} })), renderBody: ({ closeDropdown, ariaAttributes }) => {
|
|
23
40
|
const listboxItems = items.map((item) => ({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IntlShape } from "react-intl";
|
|
2
|
-
import { type DateFilterOfAnyType, type FilterContextItem, type ICatalogAttribute, type ICatalogDateDataset, type ICatalogMeasure, type IDashboardAttributeFilterConfig, type IDashboardDateFilterConfigItem, type IDashboardMeasureValueFilterConfig, type IFilter, type ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
import { type DateFilterOfAnyType, type FilterContextItem, type ICatalogAttribute, type ICatalogDateDataset, type ICatalogMeasure, type IDashboardAttributeFilterConfig, type IDashboardDateFilterConfigItem, type IDashboardMeasureValueFilterConfig, type IFilter, type IParameterizedDateFilter, type ObjRef } from "@gooddata/sdk-model";
|
|
3
3
|
import { type ExtendedDashboardWidget } from "../../../../model/types/layoutTypes.js";
|
|
4
4
|
export declare const getFilterLocalIdentifier: (filter: FilterContextItem) => string | undefined;
|
|
5
5
|
export declare const validateAllFilterLocalIdentifiers: (filters: FilterContextItem[]) => boolean;
|
|
@@ -43,7 +43,7 @@ export declare function areFiltersEqual(filter1: IFilter, filter2: IFilter): boo
|
|
|
43
43
|
* Values to compare date filters by. A bounded range never matches an empty date, so a missing
|
|
44
44
|
* `emptyValueHandling` counts as "exclude" there; on an all-time filter it means no filtering at all.
|
|
45
45
|
*/
|
|
46
|
-
export declare function dateFilterValues(filter: DateFilterOfAnyType): import("@gooddata/sdk-model").IAbsoluteDateFilterValues | import("@gooddata/sdk-model").IRelativeDateFilterValues | import("@gooddata/sdk-model").IAbsoluteGranularityDateFilterValues | undefined;
|
|
46
|
+
export declare function dateFilterValues(filter: Exclude<DateFilterOfAnyType, IParameterizedDateFilter>): import("@gooddata/sdk-model").IAbsoluteDateFilterValues | import("@gooddata/sdk-model").IRelativeDateFilterValues | import("@gooddata/sdk-model").IAbsoluteGranularityDateFilterValues | undefined;
|
|
47
47
|
export declare function isFilterIgnoredByWidget(filter: FilterContextItem, widget: ExtendedDashboardWidget): boolean;
|
|
48
48
|
export declare function isFilterMatch(filter1: IFilter, filter2: IFilter): boolean;
|
|
49
49
|
export declare const getFilterTitle: (filter: FilterContextItem, allAttributes: ICatalogAttribute[], allDateDatasets: ICatalogDateDataset[], intl: IntlShape) => string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,KAAK,+BAA+B,EACpC,KAAK,8BAA8B,EACnC,KAAK,kCAAkC,EACvC,KAAK,OAAO,EACZ,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/automations/shared/automationFilters/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,eAAe,E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
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
|
-
import { absoluteDateFilterValues, absoluteGranularityDateFilterValues, areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemLocalIdentifier, dashboardFilterLocalIdentifier, dashboardFilterObjRef, filterAttributeElements, filterLocalIdentifier, filterObjRef, getAttributeElementsItems, isAbsoluteDateFilter, isAbsoluteGranularityDateFilter, isAllTimeDateFilter, isArbitraryAttributeFilter, isAttributeFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, isDateFilterOfAnyType, isInsightWidget, isMatchAttributeFilter, isNegativeAttributeFilter, isPositiveAttributeFilter, isRelativeDateFilter, relativeDateFilterValues, } from "@gooddata/sdk-model";
|
|
2
|
+
import { absoluteDateFilterValues, absoluteGranularityDateFilterValues, areObjRefsEqual, dashboardAttributeFilterItemDisplayForm, dashboardAttributeFilterItemLocalIdentifier, dashboardFilterLocalIdentifier, dashboardFilterObjRef, filterAttributeElements, filterLocalIdentifier, filterObjRef, getAttributeElementsItems, isAbsoluteDateFilter, isAbsoluteGranularityDateFilter, isAllTimeDateFilter, isArbitraryAttributeFilter, isAttributeFilter, isDashboardArbitraryAttributeFilter, isDashboardAttributeFilter, isDashboardAttributeFilterItem, isDashboardCommonDateFilter, isDashboardDateFilter, isDashboardMatchAttributeFilter, isDashboardMeasureValueFilter, isDateFilterOfAnyType, isInsightWidget, isMatchAttributeFilter, isNegativeAttributeFilter, isParameterizedDateFilter, isPositiveAttributeFilter, isRelativeDateFilter, relativeDateFilterValues, } from "@gooddata/sdk-model";
|
|
3
3
|
import { _isEqual } from "@gooddata/util";
|
|
4
4
|
export const getFilterLocalIdentifier = (filter) => {
|
|
5
5
|
return dashboardFilterLocalIdentifier(filter);
|
|
@@ -223,6 +223,11 @@ export function areFiltersEqual(filter1, filter2) {
|
|
|
223
223
|
filter1Type === filter2Type);
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
|
+
else if (isParameterizedDateFilter(filter1) || isParameterizedDateFilter(filter2)) {
|
|
227
|
+
return (isParameterizedDateFilter(filter1) &&
|
|
228
|
+
isParameterizedDateFilter(filter2) &&
|
|
229
|
+
areParameterizedDateFiltersEqual(filter1, filter2));
|
|
230
|
+
}
|
|
226
231
|
else if (isAbsoluteDateFilter(filter1) && isAbsoluteDateFilter(filter2)) {
|
|
227
232
|
// An alert does not store the granularity, so it counts only when both filters have one.
|
|
228
233
|
const filter1Values = dateFilterValues(filter1);
|
|
@@ -243,6 +248,14 @@ export function areFiltersEqual(filter1, filter2) {
|
|
|
243
248
|
// Filter types are different
|
|
244
249
|
return _isEqual(filter1, filter2);
|
|
245
250
|
}
|
|
251
|
+
// a missing emptyValueHandling means the backend default, which excludes empty dates
|
|
252
|
+
function areParameterizedDateFiltersEqual(filter1, filter2) {
|
|
253
|
+
const body1 = filter1.parameterizedDateFilter;
|
|
254
|
+
const body2 = filter2.parameterizedDateFilter;
|
|
255
|
+
return (areObjRefsEqual(body1.dataSet, body2.dataSet) &&
|
|
256
|
+
areObjRefsEqual(body1.parameter, body2.parameter) &&
|
|
257
|
+
(body1.emptyValueHandling ?? "exclude") === (body2.emptyValueHandling ?? "exclude"));
|
|
258
|
+
}
|
|
246
259
|
/**
|
|
247
260
|
* Values to compare date filters by. A bounded range never matches an empty date, so a missing
|
|
248
261
|
* `emptyValueHandling` counts as "exclude" there; on an all-time filter it means no filtering at all.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultDashboardDateFilter.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,OAAO,CAAC;AAmC1E,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAmB5D;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,EACvC,MAAM,EACN,aAAa,EACb,eAAe,EACf,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,eAAe,GAClB,EAAE,yBAAyB,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"DefaultDashboardDateFilter.d.ts","sourceRoot":"","sources":["../../../../src/presentation/filterBar/dateFilter/DefaultDashboardDateFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAkC,MAAM,OAAO,CAAC;AAmC1E,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAmB5D;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,EACvC,MAAM,EACN,aAAa,EACb,eAAe,EACf,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,KAAK,EACL,eAAe,GAClB,EAAE,yBAAyB,GAAG,YAAY,CA8L1C"}
|
|
@@ -110,5 +110,5 @@ export function DefaultDashboardDateFilter({ filter, workingFilter, onFilterChan
|
|
|
110
110
|
}, [intl, filter?.dateFilter.dataSet, defaultDateFilterName]);
|
|
111
111
|
return (_jsx(DateFilter, { excludeCurrentPeriod: excludeCurrentPeriod, selectedFilterOption: dateFilterOption, workingExcludeCurrentPeriod: isApplyAllAtOnceEnabledAndSet ? workingExcludeCurrentPeriod : undefined, workingSelectedFilterOption: isApplyAllAtOnceEnabledAndSet ? workingFilterOption : undefined, dateFilterMode: readonly
|
|
112
112
|
? DashboardDateFilterConfigModeValues.READONLY
|
|
113
|
-
: DashboardDateFilterConfigModeValues.ACTIVE, filterOptions: dateFilterOptions, availableGranularities: availableGranularities, customFilterName: title, onApply: onApply, onSelect: isApplyAllAtOnceEnabledAndSet ? onSelect : undefined, dateFormat: dateFormat, locale: locale, isTimeForAbsoluteRangeEnabled: isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled: isSecondsForAbsoluteRangeEnabled, isAbsoluteDateFilterGranularityEnabled: isAbsoluteDateFilterGranularityEnabled, isEditMode: isInEditMode, openOnInit: autoOpen, weekStart: weekStart, customIcon: visibilityIcon, showDropDownHeaderMessage: !filter?.dateFilter.dataSet, FilterConfigurationComponent: isConfigurationEnabled ? FilterConfigurationComponent : undefined, withoutApply: isApplyAllAtOnceEnabledAndSet, ButtonComponent: ButtonComponent, overlayPositionType: overlayPositionType, activeCalendars: activeCalendars, enableEmptyDateValues: enableEmptyDateValues, hideDisabledExclude: true, customRangeHint: customRangeHint }));
|
|
113
|
+
: DashboardDateFilterConfigModeValues.ACTIVE, filterOptions: dateFilterOptions, availableGranularities: availableGranularities, customFilterName: title, onApply: onApply, onSelect: isApplyAllAtOnceEnabledAndSet ? onSelect : undefined, dateFormat: dateFormat, locale: locale, isTimeForAbsoluteRangeEnabled: isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled: isSecondsForAbsoluteRangeEnabled, isAbsoluteDateFilterGranularityEnabled: isAbsoluteDateFilterGranularityEnabled, isEditMode: isInEditMode, openOnInit: autoOpen, weekStart: weekStart, customIcon: visibilityIcon, showDropDownHeaderMessage: !filter?.dateFilter.dataSet, FilterConfigurationComponent: isConfigurationEnabled ? FilterConfigurationComponent : undefined, withoutApply: isApplyAllAtOnceEnabledAndSet, ButtonComponent: ButtonComponent, overlayPositionType: overlayPositionType, activeCalendars: activeCalendars, enableEmptyDateValues: enableEmptyDateValues, hideDisabledExclude: true, customRangeHint: customRangeHint, shouldOverlayRelativeRangeMenu: true }));
|
|
114
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateFilters.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/dateFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAEH,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,QAAQ,EAEb,KAAK,OAAO,
|
|
1
|
+
{"version":3,"file":"dateFilters.d.ts","sourceRoot":"","sources":["../../../../src/presentation/insightEditor/filterContext/dateFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAEH,KAAK,oBAAoB,EACzB,KAAK,OAAO,EACZ,KAAK,QAAQ,EAEb,KAAK,OAAO,EAaf,MAAM,qBAAqB,CAAC;AA0C7B,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,OAAO,EACf,qBAAqB,EAAE,oBAAoB,GAAG,SAAS,GACxD,cAAc,GAAG,SAAS,CAK5B;AA8ED,wBAAgB,kBAAkB,CAAC,cAAc,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,QAAQ,GAAG,cAAc,EAAE,CAOjG"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2020-2026 GoodData Corporation
|
|
2
|
-
import { absoluteDateFilterValues, areObjRefsEqual, filterObjRef, insightFilters, isAbsoluteDateFilter, isAbsoluteGranularityDateFilter, isAllTimeDateFilter, isDateFilterOfAnyType, isRelativeDateFilter, relativeDateFilterValues, } from "@gooddata/sdk-model";
|
|
2
|
+
import { absoluteDateFilterValues, areObjRefsEqual, filterObjRef, insightFilters, isAbsoluteDateFilter, isAbsoluteGranularityDateFilter, isAllTimeDateFilter, isDateFilterOfAnyType, isParameterizedDateFilter, isRelativeDateFilter, relativeDateFilterValues, } from "@gooddata/sdk-model";
|
|
3
3
|
import { _compact } from "@gooddata/util";
|
|
4
4
|
const ALL_TIME_GRANULARITY = "ALL_TIME_GRANULARITY";
|
|
5
5
|
function getDateFilterItem(dataSet, dateFilterContextItem) {
|
|
@@ -90,6 +90,9 @@ function getDateFilterContext(dateFilter) {
|
|
|
90
90
|
else if (isAbsoluteGranularityDateFilter(dateFilter)) {
|
|
91
91
|
throw new Error("Absolute date filters with granularity are not supported in the insight editor yet.");
|
|
92
92
|
}
|
|
93
|
+
else if (isParameterizedDateFilter(dateFilter)) {
|
|
94
|
+
throw new Error("Parameterized date filters are not supported in the insight editor yet.");
|
|
95
|
+
}
|
|
93
96
|
else if (isRelativeDateFilter(dateFilter)) {
|
|
94
97
|
const { dataSet, from, to, granularity, boundedFilter } = relativeDateFilterValues(dateFilter, includeDataSet);
|
|
95
98
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSaveButton.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,
|
|
1
|
+
{"version":3,"file":"DefaultSaveButton.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/topBar/buttonBar/button/saveButton/DefaultSaveButton.tsx"],"names":[],"mappings":"AA6BA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,CA2DrD;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,SAAS,EACT,SAAS,EACT,QAAQ,EACR,WAAW,EACX,WAAW,GACd,EAAE,gBAAgB,kDAoClB"}
|
|
@@ -45,7 +45,10 @@ export function useSaveButtonProps() {
|
|
|
45
45
|
const isDashboardDirty = useDashboardSelector(selectIsDashboardDirty);
|
|
46
46
|
const isSaving = isSavingDashboard || optimisticIsSaving;
|
|
47
47
|
const isVisible = isEditing;
|
|
48
|
-
const isEnabled =
|
|
48
|
+
const isEnabled = (isAiMode || (isDashboardDirty && canSaveDashboard)) &&
|
|
49
|
+
!isEmptyDashboard &&
|
|
50
|
+
!isAiLoading &&
|
|
51
|
+
!isAiBuilding;
|
|
49
52
|
let buttonTitle = messages.controlButtonsSaveAndPublishTitle;
|
|
50
53
|
if (isPrivateDashboard) {
|
|
51
54
|
buttonTitle = messages.controlButtonsSaveAsPrivateTitle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultShareButton.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultShareButton.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/topBar/buttonBar/button/shareButton/DefaultShareButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAe,MAAM,OAAO,CAAC;AAoBvD,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,iBAAiB,CAYvD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,EAC/B,SAAS,EACT,SAAS,EACT,kBAAkB,GACrB,EAAE,iBAAiB,GAAG,YAAY,GAAG,IAAI,CAoCzC"}
|
|
@@ -8,7 +8,7 @@ import { useDashboardDispatch, useDashboardSelector, } from "../../../../../mode
|
|
|
8
8
|
import { selectIsAiBuilding, selectIsAiLoading } from "../../../../../model/store/config/configSelectors.js";
|
|
9
9
|
import { selectIsShareButtonVisible } from "../../../../../model/store/topBar/topBarSelectors.js";
|
|
10
10
|
import { uiActions } from "../../../../../model/store/ui/index.js";
|
|
11
|
-
import { selectDashboardDensity } from "../../../../../model/store/ui/uiSelectors.js";
|
|
11
|
+
import { selectDashboardDensity, selectIsShareDialogOpen, } from "../../../../../model/store/ui/uiSelectors.js";
|
|
12
12
|
import { HiddenShareButton } from "./HiddenShareButton.js";
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
@@ -30,6 +30,7 @@ export function useShareButtonProps() {
|
|
|
30
30
|
*/
|
|
31
31
|
export function DefaultShareButton({ isVisible, isEnabled, onShareButtonClick, }) {
|
|
32
32
|
const density = useDashboardSelector(selectDashboardDensity);
|
|
33
|
+
const isShareDialogOpen = useDashboardSelector(selectIsShareDialogOpen);
|
|
33
34
|
const intl = useIntl();
|
|
34
35
|
const tooltipText = intl.formatMessage({ id: "share.button.tooltip" });
|
|
35
36
|
if (!isVisible) {
|
|
@@ -41,5 +42,6 @@ export function DefaultShareButton({ isVisible, isEnabled, onShareButtonClick, }
|
|
|
41
42
|
ariaLabel: tooltipText,
|
|
42
43
|
popupType: "dialog",
|
|
43
44
|
popupId: "share-dialog",
|
|
45
|
+
isExpanded: isShareDialogOpen,
|
|
44
46
|
} }), triggerBy: ["hover", "focus"] }));
|
|
45
47
|
}
|
|
@@ -134,6 +134,7 @@ import { IDateFilterButtonProps } from '@gooddata/sdk-ui-filters';
|
|
|
134
134
|
import { IDateFilterConfig } from '@gooddata/sdk-model';
|
|
135
135
|
import { IDateFilterOptionsByType } from '@gooddata/sdk-ui-filters';
|
|
136
136
|
import { IDateHierarchyTemplate } from '@gooddata/sdk-model';
|
|
137
|
+
import { IDateRangeParameterMetadataObject } from '@gooddata/sdk-model';
|
|
137
138
|
import { Identifier } from '@gooddata/sdk-model';
|
|
138
139
|
import { IdentifierRef } from '@gooddata/sdk-model';
|
|
139
140
|
import { IDrillDownIntersectionIgnoredAttributes } from '@gooddata/sdk-model';
|
|
@@ -1042,7 +1043,8 @@ export declare function applyAttributeFilter(filterLocalId: string, filter: IAtt
|
|
|
1042
1043
|
* update (e.g. hidden date filter option by dateFilterConfig).
|
|
1043
1044
|
*
|
|
1044
1045
|
* All parameters for {@link ChangeDateFilterSelection} command is derived from the provided date filter.
|
|
1045
|
-
* An absolute date filter with granularity is not supported yet and throws
|
|
1046
|
+
* An absolute date filter with granularity or a parameterized date filter is not supported yet and throws
|
|
1047
|
+
* an error.
|
|
1046
1048
|
*
|
|
1047
1049
|
* See {@link ChangeDateFilterSelection} for a more complete description of the different parameters
|
|
1048
1050
|
*
|
|
@@ -8737,13 +8739,33 @@ export declare interface ICatalogParameterDependenciesState {
|
|
|
8737
8739
|
}
|
|
8738
8740
|
|
|
8739
8741
|
/**
|
|
8740
|
-
* Catalog parameters slice.
|
|
8742
|
+
* Catalog parameters slice: the workspace parameters from one request, split by kind.
|
|
8743
|
+
*
|
|
8744
|
+
* @remarks
|
|
8745
|
+
* Each list has its own setting and its own status. A list whose setting is off is empty and `gated-off`,
|
|
8746
|
+
* even when the other list loaded.
|
|
8741
8747
|
*
|
|
8742
8748
|
* @alpha
|
|
8743
8749
|
*/
|
|
8744
8750
|
export declare interface ICatalogParametersState {
|
|
8751
|
+
/**
|
|
8752
|
+
* Load status of `parameters`. `gated-off` when the `enableParameters` setting is off.
|
|
8753
|
+
*/
|
|
8745
8754
|
status: CatalogParametersStatus;
|
|
8755
|
+
/**
|
|
8756
|
+
* Number and string parameters. Loaded only when the `enableParameters` setting is on, string parameters
|
|
8757
|
+
* only when the `enableStringParameters` setting is on too.
|
|
8758
|
+
*/
|
|
8746
8759
|
parameters: IScalarParameterMetadataObject[];
|
|
8760
|
+
/**
|
|
8761
|
+
* Load status of `dateRangeParameters`. `gated-off` when the `enableDateRangeParameters` setting is off,
|
|
8762
|
+
* so a period missing from a loaded list can be told apart from periods that were never loaded.
|
|
8763
|
+
*/
|
|
8764
|
+
dateRangeParametersStatus: CatalogParametersStatus;
|
|
8765
|
+
/**
|
|
8766
|
+
* Date range parameters (named periods). Loaded only when the `enableDateRangeParameters` setting is on.
|
|
8767
|
+
*/
|
|
8768
|
+
dateRangeParameters: IDateRangeParameterMetadataObject[];
|
|
8747
8769
|
}
|
|
8748
8770
|
|
|
8749
8771
|
/**
|
|
@@ -28480,6 +28502,25 @@ export declare const selectCatalogDateAttributes: DashboardSelector<ICatalogDate
|
|
|
28480
28502
|
*/
|
|
28481
28503
|
export declare const selectCatalogDateDatasets: DashboardSelector<ICatalogDateDataset[]>;
|
|
28482
28504
|
|
|
28505
|
+
/**
|
|
28506
|
+
* Returns the workspace date range parameters (named periods) loaded into the dashboard catalog.
|
|
28507
|
+
*
|
|
28508
|
+
* @remarks
|
|
28509
|
+
* Empty until they load, when the `enableDateRangeParameters` setting is off, and when they failed to load.
|
|
28510
|
+
* The load status is {@link selectCatalogDateRangeParametersStatus}.
|
|
28511
|
+
*
|
|
28512
|
+
* @alpha
|
|
28513
|
+
*/
|
|
28514
|
+
export declare const selectCatalogDateRangeParameters: DashboardSelector<IDateRangeParameterMetadataObject[]>;
|
|
28515
|
+
|
|
28516
|
+
/**
|
|
28517
|
+
* Returns the load status of the date range parameters in {@link selectCatalogDateRangeParameters}. It is
|
|
28518
|
+
* `gated-off` when the `enableDateRangeParameters` setting is off.
|
|
28519
|
+
*
|
|
28520
|
+
* @alpha
|
|
28521
|
+
*/
|
|
28522
|
+
export declare const selectCatalogDateRangeParametersStatus: DashboardSelector<CatalogParametersStatus>;
|
|
28523
|
+
|
|
28483
28524
|
/**
|
|
28484
28525
|
* @public
|
|
28485
28526
|
*/
|
|
@@ -28512,21 +28553,22 @@ export declare const selectCatalogParameterDependencies: DashboardSelector<Recor
|
|
|
28512
28553
|
export declare const selectCatalogParameterDependenciesStatus: DashboardSelector<CatalogParameterDependenciesStatus>;
|
|
28513
28554
|
|
|
28514
28555
|
/**
|
|
28515
|
-
* Returns the workspace parameters loaded into the dashboard catalog.
|
|
28556
|
+
* Returns the workspace number and string parameters loaded into the dashboard catalog.
|
|
28516
28557
|
*
|
|
28517
28558
|
* @alpha
|
|
28518
28559
|
*/
|
|
28519
28560
|
export declare const selectCatalogParameters: DashboardSelector<IScalarParameterMetadataObject[]>;
|
|
28520
28561
|
|
|
28521
28562
|
/**
|
|
28522
|
-
* Returns true once the
|
|
28563
|
+
* Returns true once the number and string parameters in {@link selectCatalogParameters} have loaded.
|
|
28523
28564
|
*
|
|
28524
28565
|
* @alpha
|
|
28525
28566
|
*/
|
|
28526
28567
|
export declare const selectCatalogParametersIsLoaded: DashboardSelector<boolean>;
|
|
28527
28568
|
|
|
28528
28569
|
/**
|
|
28529
|
-
* Returns the load status of
|
|
28570
|
+
* Returns the load status of the number and string parameters in {@link selectCatalogParameters}. It is
|
|
28571
|
+
* `gated-off` when the `enableParameters` setting is off.
|
|
28530
28572
|
*
|
|
28531
28573
|
* @alpha
|
|
28532
28574
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-dashboard",
|
|
3
|
-
"version": "11.70.0-alpha.
|
|
3
|
+
"version": "11.70.0-alpha.3",
|
|
4
4
|
"description": "GoodData SDK - Dashboard Component",
|
|
5
5
|
"license": "LicenseRef-LICENSE",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -62,22 +62,22 @@
|
|
|
62
62
|
"ts-invariant": "0.10.3",
|
|
63
63
|
"tslib": "2.8.1",
|
|
64
64
|
"uuid": "11.1.1",
|
|
65
|
-
"@gooddata/sdk-backend-spi": "11.70.0-alpha.
|
|
66
|
-
"@gooddata/sdk-
|
|
67
|
-
"@gooddata/sdk-
|
|
68
|
-
"@gooddata/sdk-
|
|
69
|
-
"@gooddata/sdk-ui
|
|
70
|
-
"@gooddata/sdk-
|
|
71
|
-
"@gooddata/sdk-ui-charts": "11.70.0-alpha.
|
|
72
|
-
"@gooddata/sdk-ui-
|
|
73
|
-
"@gooddata/sdk-ui-geo": "11.70.0-alpha.
|
|
74
|
-
"@gooddata/sdk-ui-
|
|
75
|
-
"@gooddata/sdk-ui-
|
|
76
|
-
"@gooddata/sdk-ui-
|
|
77
|
-
"@gooddata/sdk-ui-
|
|
78
|
-
"@gooddata/sdk-ui-theme-provider": "11.70.0-alpha.
|
|
79
|
-
"@gooddata/sdk-ui-
|
|
80
|
-
"@gooddata/util": "11.70.0-alpha.
|
|
65
|
+
"@gooddata/sdk-backend-spi": "11.70.0-alpha.3",
|
|
66
|
+
"@gooddata/sdk-backend-base": "11.70.0-alpha.3",
|
|
67
|
+
"@gooddata/sdk-embedding": "11.70.0-alpha.3",
|
|
68
|
+
"@gooddata/sdk-model": "11.70.0-alpha.3",
|
|
69
|
+
"@gooddata/sdk-ui": "11.70.0-alpha.3",
|
|
70
|
+
"@gooddata/sdk-ui-analytical-designer": "11.70.0-alpha.3",
|
|
71
|
+
"@gooddata/sdk-ui-charts": "11.70.0-alpha.3",
|
|
72
|
+
"@gooddata/sdk-ui-ext": "11.70.0-alpha.3",
|
|
73
|
+
"@gooddata/sdk-ui-geo": "11.70.0-alpha.3",
|
|
74
|
+
"@gooddata/sdk-ui-filters": "11.70.0-alpha.3",
|
|
75
|
+
"@gooddata/sdk-ui-kit": "11.70.0-alpha.3",
|
|
76
|
+
"@gooddata/sdk-ui-pivot": "11.70.0-alpha.3",
|
|
77
|
+
"@gooddata/sdk-ui-semantic-search": "11.70.0-alpha.3",
|
|
78
|
+
"@gooddata/sdk-ui-theme-provider": "11.70.0-alpha.3",
|
|
79
|
+
"@gooddata/sdk-ui-vis-commons": "11.70.0-alpha.3",
|
|
80
|
+
"@gooddata/util": "11.70.0-alpha.3"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@microsoft/api-documenter": "7.30.20",
|
|
@@ -119,12 +119,12 @@
|
|
|
119
119
|
"svgo": "2.8.4",
|
|
120
120
|
"typescript": "7.0.2",
|
|
121
121
|
"vitest": "5.0.4",
|
|
122
|
-
"@gooddata/
|
|
123
|
-
"@gooddata/
|
|
124
|
-
"@gooddata/
|
|
125
|
-
"@gooddata/
|
|
126
|
-
"@gooddata/
|
|
127
|
-
"@gooddata/
|
|
122
|
+
"@gooddata/i18n-toolkit": "11.70.0-alpha.3",
|
|
123
|
+
"@gooddata/eslint-config": "11.70.0-alpha.3",
|
|
124
|
+
"@gooddata/oxlint-config": "11.70.0-alpha.3",
|
|
125
|
+
"@gooddata/reference-workspace": "11.70.0-alpha.3",
|
|
126
|
+
"@gooddata/sdk-backend-mockingbird": "11.70.0-alpha.3",
|
|
127
|
+
"@gooddata/stylelint-config": "11.70.0-alpha.3"
|
|
128
128
|
},
|
|
129
129
|
"peerDependencies": {
|
|
130
130
|
"react": "^18.0.0 || ^19.0.0",
|