@gooddata/sdk-ui-filters 11.52.0-alpha.6 → 11.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/DateFilter/AbsoluteDateFilterForm/AbsoluteDateFilterForm.d.ts +3 -1
- package/esm/DateFilter/AbsoluteDateFilterForm/AbsoluteDateFilterForm.d.ts.map +1 -1
- package/esm/DateFilter/AbsoluteDateFilterForm/AbsoluteDateFilterForm.js +2 -2
- package/esm/DateFilter/DateFilter.d.ts +13 -1
- package/esm/DateFilter/DateFilter.d.ts.map +1 -1
- package/esm/DateFilter/DateFilter.js +2 -2
- package/esm/DateFilter/DateFilterBody/DateFilterBody.d.ts +7 -1
- package/esm/DateFilter/DateFilterBody/DateFilterBody.d.ts.map +1 -1
- package/esm/DateFilter/DateFilterBody/DateFilterBody.js +1 -1
- package/esm/DateFilter/DateFilterBody/DateFilterFormContent.d.ts +3 -1
- package/esm/DateFilter/DateFilterBody/DateFilterFormContent.d.ts.map +1 -1
- package/esm/DateFilter/DateFilterBody/DateFilterFormContent.js +2 -2
- package/esm/DateFilter/DateFilterCore.d.ts +7 -1
- package/esm/DateFilter/DateFilterCore.d.ts.map +1 -1
- package/esm/DateFilter/DateRangePicker/DateRangeHint.d.ts +3 -1
- package/esm/DateFilter/DateRangePicker/DateRangeHint.d.ts.map +1 -1
- package/esm/DateFilter/DateRangePicker/DateRangeHint.js +2 -3
- package/esm/DateFilter/DateRangePicker/DateRangePicker.d.ts +3 -1
- package/esm/DateFilter/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/esm/DateFilter/DateRangePicker/DateRangePicker.js +2 -2
- package/esm/sdk-ui-filters.d.ts +12 -0
- package/package.json +12 -12
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type WeekStart } from "@gooddata/sdk-model";
|
|
2
3
|
import { type DateFilterOption, type IUiAbsoluteDateFilterForm } from "../interfaces/index.js";
|
|
3
4
|
/**
|
|
@@ -14,9 +15,10 @@ export interface IAbsoluteDateFilterFormProps {
|
|
|
14
15
|
shouldOverlayDatePicker?: boolean;
|
|
15
16
|
withoutApply?: boolean;
|
|
16
17
|
submitForm: () => void;
|
|
18
|
+
customRangeHint?: ReactNode;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* @internal
|
|
20
22
|
*/
|
|
21
|
-
export declare function AbsoluteDateFilterForm({ dateFormat, isMobile, selectedFilterOption, isTimeEnabled, isSecondsEnabled, weekStart, shouldOverlayDatePicker, withoutApply, onSelectedFilterOptionChange, submitForm }: IAbsoluteDateFilterFormProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function AbsoluteDateFilterForm({ dateFormat, isMobile, selectedFilterOption, isTimeEnabled, isSecondsEnabled, weekStart, shouldOverlayDatePicker, withoutApply, onSelectedFilterOptionChange, submitForm, customRangeHint }: IAbsoluteDateFilterFormProps): import("react/jsx-runtime").JSX.Element;
|
|
22
24
|
//# sourceMappingURL=AbsoluteDateFilterForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbsoluteDateFilterForm.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/AbsoluteDateFilterForm/AbsoluteDateFilterForm.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AbsoluteDateFilterForm.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/AbsoluteDateFilterForm/AbsoluteDateFilterForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAI/F;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,yBAAyB,CAAC;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,4BAA4B,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACjE,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;CAC/B;AAOD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,EACnC,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,aAAa,EACb,gBAAwB,EACxB,SAAS,EACT,uBAAuB,EACvB,YAAY,EACZ,4BAA4B,EAC5B,UAAU,EACV,eAAe,EAClB,EAAE,4BAA4B,2CA6B9B"}
|
|
@@ -8,9 +8,9 @@ const dayPickerProps = {
|
|
|
8
8
|
/**
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
export function AbsoluteDateFilterForm({ dateFormat, isMobile, selectedFilterOption, isTimeEnabled, isSecondsEnabled = false, weekStart, shouldOverlayDatePicker, withoutApply, onSelectedFilterOptionChange, submitForm, }) {
|
|
11
|
+
export function AbsoluteDateFilterForm({ dateFormat, isMobile, selectedFilterOption, isTimeEnabled, isSecondsEnabled = false, weekStart, shouldOverlayDatePicker, withoutApply, onSelectedFilterOptionChange, submitForm, customRangeHint, }) {
|
|
12
12
|
const handleRangeChange = (range) => {
|
|
13
13
|
onSelectedFilterOptionChange(dateRangeToDateFilterValue(range, selectedFilterOption.localIdentifier, isTimeEnabled, selectedFilterOption.emptyValueHandling, isSecondsEnabled));
|
|
14
14
|
};
|
|
15
|
-
return (_jsx(DateRangePicker, { dateFormat: dateFormat, onRangeChange: handleRangeChange, range: dateFilterValueToDateRange(selectedFilterOption, isTimeEnabled, isSecondsEnabled), isMobile: isMobile, dayPickerProps: dayPickerProps, isTimeEnabled: isTimeEnabled, isSecondsEnabled: isSecondsEnabled, weekStart: weekStart, shouldOverlayDatePicker: shouldOverlayDatePicker, submitForm: submitForm, withoutApply: withoutApply }));
|
|
15
|
+
return (_jsx(DateRangePicker, { dateFormat: dateFormat, onRangeChange: handleRangeChange, range: dateFilterValueToDateRange(selectedFilterOption, isTimeEnabled, isSecondsEnabled), isMobile: isMobile, dayPickerProps: dayPickerProps, isTimeEnabled: isTimeEnabled, isSecondsEnabled: isSecondsEnabled, weekStart: weekStart, shouldOverlayDatePicker: shouldOverlayDatePicker, submitForm: submitForm, withoutApply: withoutApply, customRangeHint: customRangeHint }));
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentType, PureComponent } from "react";
|
|
1
|
+
import { type ComponentType, PureComponent, type ReactNode } from "react";
|
|
2
2
|
import { type DateFilterGranularity, type IActiveCalendars, type WeekStart } from "@gooddata/sdk-model";
|
|
3
3
|
import { type OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
4
4
|
import { type IFilterButtonCustomIcon, type VisibilityMode } from "../shared/interfaces/index.js";
|
|
@@ -120,6 +120,18 @@ export interface IDateFilterOwnProps extends IDateFilterStatePropsIntersection {
|
|
|
120
120
|
* @alpha
|
|
121
121
|
*/
|
|
122
122
|
activeCalendars?: IActiveCalendars;
|
|
123
|
+
/**
|
|
124
|
+
* Custom content rendered at the end of the hint area of the static period (absolute range) form,
|
|
125
|
+
* after the default date/time format hints.
|
|
126
|
+
*
|
|
127
|
+
* @remarks
|
|
128
|
+
* Use this to surface an application-specific note about the selected range (e.g. that the whole
|
|
129
|
+
* period is always applied). The content is appended after the built-in hints, so their
|
|
130
|
+
* accessibility wiring (`aria-describedby` of the range inputs) is preserved.
|
|
131
|
+
*
|
|
132
|
+
* @alpha
|
|
133
|
+
*/
|
|
134
|
+
customRangeHint?: ReactNode;
|
|
123
135
|
}
|
|
124
136
|
/**
|
|
125
137
|
* Callback props of the {@link DateFilter} component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFilter.d.ts","sourceRoot":"","sources":["../../src/DateFilter/DateFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DateFilter.d.ts","sourceRoot":"","sources":["../../src/DateFilter/DateFilter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI1E,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAIjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,OAAO,EAAE,KAAK,uBAAuB,EAAE,KAAK,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGlG,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAErF,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAEhC,MAAM,uBAAuB,CAAC;AAK/B;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAC9C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,oBAAoB,EAAE,gBAAgB,CAAC;CAC1C;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,iCAAiC;IAC1E,aAAa,EAAE,wBAAwB,CAAC;IACxC,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,cAAc,CAAC;IAC/B,UAAU,CAAC,E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@@ export class DateFilter extends PureComponent {
|
|
|
101
101
|
DateFilter.checkInitialFilterOption(this.props.selectedFilterOption);
|
|
102
102
|
}
|
|
103
103
|
render() {
|
|
104
|
-
const { customFilterName, dateFilterMode, dateFormat, filterOptions, selectedFilterOption: originalSelectedFilterOption, excludeCurrentPeriod: originalExcludeCurrentPeriod, availableGranularities, isEditMode, openOnInit, locale, isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled, weekStart, customIcon, showDropDownHeaderMessage, FilterConfigurationComponent, withoutApply, ButtonComponent, overlayPositionType, activeCalendars, enableEmptyDateValues, } = this.props;
|
|
104
|
+
const { customFilterName, dateFilterMode, dateFormat, filterOptions, selectedFilterOption: originalSelectedFilterOption, excludeCurrentPeriod: originalExcludeCurrentPeriod, availableGranularities, isEditMode, openOnInit, locale, isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled, weekStart, customIcon, showDropDownHeaderMessage, FilterConfigurationComponent, withoutApply, ButtonComponent, overlayPositionType, activeCalendars, enableEmptyDateValues, customRangeHint, } = this.props;
|
|
105
105
|
const { excludeCurrentPeriod, selectedFilterOption, isExcludeCurrentPeriodEnabled } = this.state;
|
|
106
|
-
return dateFilterMode === "hidden" ? null : (_jsx(DateFilterCore, { availableGranularities: availableGranularities, customFilterName: customFilterName, dateFormat: dateFormat ?? DEFAULT_DATE_FORMAT, openOnInit: openOnInit, showDropDownHeaderMessage: showDropDownHeaderMessage, disabled: dateFilterMode === "readonly", excludeCurrentPeriod: excludeCurrentPeriod, originalExcludeCurrentPeriod: originalExcludeCurrentPeriod, isExcludeCurrentPeriodEnabled: isExcludeCurrentPeriodEnabled, hideDisabledExclude: this.props.hideDisabledExclude, isTimeForAbsoluteRangeEnabled: isTimeForAbsoluteRangeEnabled ?? false, isSecondsForAbsoluteRangeEnabled: isSecondsForAbsoluteRangeEnabled ?? false, isEditMode: isEditMode ?? false, filterOptions: filterOptions, selectedFilterOption: selectedFilterOption, originalSelectedFilterOption: originalSelectedFilterOption, locale: locale, onApplyClick: this.handleApplyClick, onCancelClick: this.onCancelClicked, onDropdownOpenChanged: this.onDropdownOpenChanged, onExcludeCurrentPeriodChange: this.handleExcludeCurrentPeriodChange, onSelectedFilterOptionChange: this.handleSelectedFilterOptionChange, errors: validateFilterOption(selectedFilterOption), weekStart: weekStart, customIcon: customIcon, FilterConfigurationComponent: FilterConfigurationComponent, withoutApply: withoutApply, ButtonComponent: ButtonComponent, overlayPositionType: overlayPositionType, activeCalendars: activeCalendars, enableEmptyDateValues: enableEmptyDateValues }));
|
|
106
|
+
return dateFilterMode === "hidden" ? null : (_jsx(DateFilterCore, { availableGranularities: availableGranularities, customFilterName: customFilterName, dateFormat: dateFormat ?? DEFAULT_DATE_FORMAT, openOnInit: openOnInit, showDropDownHeaderMessage: showDropDownHeaderMessage, disabled: dateFilterMode === "readonly", excludeCurrentPeriod: excludeCurrentPeriod, originalExcludeCurrentPeriod: originalExcludeCurrentPeriod, isExcludeCurrentPeriodEnabled: isExcludeCurrentPeriodEnabled, hideDisabledExclude: this.props.hideDisabledExclude, isTimeForAbsoluteRangeEnabled: isTimeForAbsoluteRangeEnabled ?? false, isSecondsForAbsoluteRangeEnabled: isSecondsForAbsoluteRangeEnabled ?? false, isEditMode: isEditMode ?? false, filterOptions: filterOptions, selectedFilterOption: selectedFilterOption, originalSelectedFilterOption: originalSelectedFilterOption, locale: locale, onApplyClick: this.handleApplyClick, onCancelClick: this.onCancelClicked, onDropdownOpenChanged: this.onDropdownOpenChanged, onExcludeCurrentPeriodChange: this.handleExcludeCurrentPeriodChange, onSelectedFilterOptionChange: this.handleSelectedFilterOptionChange, errors: validateFilterOption(selectedFilterOption), weekStart: weekStart, customIcon: customIcon, FilterConfigurationComponent: FilterConfigurationComponent, withoutApply: withoutApply, ButtonComponent: ButtonComponent, overlayPositionType: overlayPositionType, activeCalendars: activeCalendars, enableEmptyDateValues: enableEmptyDateValues, customRangeHint: customRangeHint }));
|
|
107
107
|
}
|
|
108
108
|
handleApplyClick = () => {
|
|
109
109
|
const normalizedSelectedFilterOption = this.normalizeEmptyValueHandling(normalizeSelectedFilterOption(this.state.selectedFilterOption));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactElement } from "react";
|
|
1
|
+
import { type ReactElement, type ReactNode } from "react";
|
|
2
2
|
import { type DateFilterGranularity, type IActiveCalendars, type WeekStart } from "@gooddata/sdk-model";
|
|
3
3
|
import { type DateFilterOption, type IDateFilterOptionsByType, type IExtendedDateFilterErrors } from "../interfaces/index.js";
|
|
4
4
|
export interface IDateFilterBodyProps {
|
|
@@ -38,6 +38,12 @@ export interface IDateFilterBodyProps {
|
|
|
38
38
|
* @alpha
|
|
39
39
|
*/
|
|
40
40
|
enableEmptyDateValues?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Custom content rendered at the end of the static period form hint area.
|
|
43
|
+
*
|
|
44
|
+
* @alpha
|
|
45
|
+
*/
|
|
46
|
+
customRangeHint?: ReactNode;
|
|
41
47
|
}
|
|
42
48
|
export declare const DateFilterBody: import("react").ForwardRefExoticComponent<IDateFilterBodyProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
49
|
//# sourceMappingURL=DateFilterBody.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFilterBody.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DateFilterBody/DateFilterBody.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,YAAY,
|
|
1
|
+
{"version":3,"file":"DateFilterBody.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DateFilterBody/DateFilterBody.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,YAAY,EACjB,KAAK,SAAS,EAKjB,MAAM,OAAO,CAAC;AAMf,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAKjB,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EACH,KAAK,gBAAgB,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AM,cAAc,iHA6ZzB,CAAC"}
|
|
@@ -163,7 +163,7 @@ export const DateFilterBody = forwardRef((props, ref) => {
|
|
|
163
163
|
return (_jsxs("div", { ref: rootRef, className: cx(!isMobile && "gd-extended-date-filter-body-redesigned", "gd-extended-date-filter-body", "s-extended-date-filters-body", isMobile && "gd-extended-date-filter-body-mobile", route && "gd-active-form"), onKeyDown: handleKeyDown, onFocus: handleFocus, role: "dialog", id: formId, "aria-label": formLabel, children: [route === null && isMobile ? (_jsx("div", { className: "gd-extended-date-filter-mobile-header", onClick: () => {
|
|
164
164
|
onCancelClick();
|
|
165
165
|
closeDropdown();
|
|
166
|
-
}, children: dateFilterButton })) : null, route ? (_jsx("div", { className: "gd-extended-date-filter-form-wrapper", ref: ref, children: _jsx(DateFilterFormContent, { filterOptions: filterOptions, selectedFilterOption: selectedFilterOption, onSelectedFilterOptionChange: onSelectedFilterOptionChange, dateFormat: dateFormat, weekStart: weekStart, isTimeForAbsoluteRangeEnabled: isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled: isSecondsForAbsoluteRangeEnabled, availableGranularities: filteredAvailableGranularities, isMobile: isMobile, withoutApply: withoutApply, enableEmptyDateValues: props.enableEmptyDateValues, activeForm: route, onBackNavigation: handleBackNavigation, onClose: closeDropdown, submitForm: () => {
|
|
166
|
+
}, children: dateFilterButton })) : null, route ? (_jsx("div", { className: "gd-extended-date-filter-form-wrapper", ref: ref, children: _jsx(DateFilterFormContent, { filterOptions: filterOptions, selectedFilterOption: selectedFilterOption, onSelectedFilterOptionChange: onSelectedFilterOptionChange, dateFormat: dateFormat, weekStart: weekStart, isTimeForAbsoluteRangeEnabled: isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled: isSecondsForAbsoluteRangeEnabled, availableGranularities: filteredAvailableGranularities, isMobile: isMobile, withoutApply: withoutApply, enableEmptyDateValues: props.enableEmptyDateValues, customRangeHint: props.customRangeHint, activeForm: route, onBackNavigation: handleBackNavigation, onClose: closeDropdown, submitForm: () => {
|
|
167
167
|
onApplyClick();
|
|
168
168
|
if (!withoutApply) {
|
|
169
169
|
closeDropdown();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type DateFilterGranularity, type WeekStart } from "@gooddata/sdk-model";
|
|
2
3
|
import { type DateFilterOption, type IDateFilterOptionsByType, type IExtendedDateFilterErrors } from "../interfaces/index.js";
|
|
3
4
|
import { type DateFilterRoute } from "./types.js";
|
|
@@ -13,6 +14,7 @@ export interface IDateFilterFormContentProps {
|
|
|
13
14
|
isMobile: boolean;
|
|
14
15
|
withoutApply?: boolean;
|
|
15
16
|
enableEmptyDateValues?: boolean;
|
|
17
|
+
customRangeHint?: ReactNode;
|
|
16
18
|
activeForm: DateFilterRoute;
|
|
17
19
|
onBackNavigation: () => void;
|
|
18
20
|
onClose: () => void;
|
|
@@ -25,5 +27,5 @@ export interface IDateFilterFormContentProps {
|
|
|
25
27
|
*
|
|
26
28
|
* @internal
|
|
27
29
|
*/
|
|
28
|
-
export declare function DateFilterFormContent({ filterOptions, selectedFilterOption, onSelectedFilterOptionChange, dateFormat, weekStart, isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled, availableGranularities, isMobile, withoutApply, enableEmptyDateValues, activeForm, onBackNavigation, onClose, submitForm, errors }: IDateFilterFormContentProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function DateFilterFormContent({ filterOptions, selectedFilterOption, onSelectedFilterOptionChange, dateFormat, weekStart, isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled, availableGranularities, isMobile, withoutApply, enableEmptyDateValues, customRangeHint, activeForm, onBackNavigation, onClose, submitForm, errors }: IDateFilterFormContentProps): import("react/jsx-runtime").JSX.Element;
|
|
29
31
|
//# sourceMappingURL=DateFilterFormContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFilterFormContent.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DateFilterBody/DateFilterFormContent.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateFilterFormContent.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DateFilterBody/DateFilterFormContent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAKhF,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,SAAS,EAKjB,MAAM,qBAAqB,CAAC;AAU7B,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAGjC,MAAM,wBAAwB,CAAC;AAIhC,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,2BAA2B;IACxC,aAAa,EAAE,wBAAwB,CAAC;IACxC,oBAAoB,EAAE,gBAAgB,CAAC;IACvC,4BAA4B,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAEjE,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,6BAA6B,EAAE,OAAO,CAAC;IACvC,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAEhD,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,eAAe,CAAC,EAAE,SAAS,CAAC;IAE5B,UAAU,EAAE,eAAe,CAAC;IAC5B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IAEpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,yBAAyB,CAAC;CACtC;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,aAAa,EACb,oBAAoB,EACpB,4BAA4B,EAC5B,UAAU,EACV,SAAS,EACT,6BAA6B,EAC7B,gCAAgC,EAChC,sBAAsB,EACtB,QAAQ,EACR,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,MAAM,EACT,EAAE,2BAA2B,2CA2I7B"}
|
|
@@ -17,7 +17,7 @@ import { DateFilterFormNavigationWrapper } from "./DateFilterFormNavigationWrapp
|
|
|
17
17
|
*
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
|
-
export function DateFilterFormContent({ filterOptions, selectedFilterOption, onSelectedFilterOptionChange, dateFormat, weekStart, isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled, availableGranularities, isMobile, withoutApply, enableEmptyDateValues, activeForm, onBackNavigation, onClose, submitForm, errors, }) {
|
|
20
|
+
export function DateFilterFormContent({ filterOptions, selectedFilterOption, onSelectedFilterOptionChange, dateFormat, weekStart, isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled, availableGranularities, isMobile, withoutApply, enableEmptyDateValues, customRangeHint, activeForm, onBackNavigation, onClose, submitForm, errors, }) {
|
|
21
21
|
const showStaticForm = activeForm === "absoluteForm" && filterOptions.absoluteForm;
|
|
22
22
|
const showRelativeForm = activeForm === "relativeForm" && filterOptions.relativeForm && availableGranularities.length > 0;
|
|
23
23
|
const absoluteSelectedFilterOption = filterOptions.absoluteForm && isAbsoluteDateFilterForm(selectedFilterOption)
|
|
@@ -47,7 +47,7 @@ export function DateFilterFormContent({ filterOptions, selectedFilterOption, onS
|
|
|
47
47
|
return (_jsxs("div", { className: "gd-date-filter-form-content", children: [showStaticForm ? (_jsx(DateFilterFormNavigationWrapper, { title: filterOptions.absoluteForm?.name
|
|
48
48
|
? filterOptions.absoluteForm.name
|
|
49
49
|
: intl.formatMessage({ id: "filters.staticPeriod" }), onBack: onBackNavigation, backLabel: intl.formatMessage({ id: "menu.back" }), isMobile: isMobile, children: _jsxs(DateFilterFormWrapper, { isMobile: isMobile, children: [
|
|
50
|
-
_jsx(AbsoluteDateFilterForm, { dateFormat: dateFormat, onSelectedFilterOptionChange: onSelectedFilterOptionChange, selectedFilterOption: absoluteSelectedFilterOption, isMobile: isMobile, isTimeEnabled: isTimeForAbsoluteRangeEnabled, isSecondsEnabled: isSecondsForAbsoluteRangeEnabled, weekStart: weekStart, submitForm: submitForm, withoutApply: withoutApply }), shouldRenderEmptyValuesHandling ? (_jsx(EmptyValuesHandlingToggle, { mode: "include", className: "gd-date-filter-empty-values-handling-toggle", checked: emptyValueHandlingToggleChecked, onChange: (checked) => {
|
|
50
|
+
_jsx(AbsoluteDateFilterForm, { dateFormat: dateFormat, onSelectedFilterOptionChange: onSelectedFilterOptionChange, selectedFilterOption: absoluteSelectedFilterOption, isMobile: isMobile, isTimeEnabled: isTimeForAbsoluteRangeEnabled, isSecondsEnabled: isSecondsForAbsoluteRangeEnabled, weekStart: weekStart, submitForm: submitForm, withoutApply: withoutApply, customRangeHint: customRangeHint }), shouldRenderEmptyValuesHandling ? (_jsx(EmptyValuesHandlingToggle, { mode: "include", className: "gd-date-filter-empty-values-handling-toggle", checked: emptyValueHandlingToggleChecked, onChange: (checked) => {
|
|
51
51
|
const emptyValueHandling = checked ? "include" : undefined;
|
|
52
52
|
onSelectedFilterOptionChange({
|
|
53
53
|
...absoluteSelectedFilterOption,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ComponentType } from "react";
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
2
|
import { type DateFilterGranularity, type IActiveCalendars, type WeekStart } from "@gooddata/sdk-model";
|
|
3
3
|
import { type OverlayPositionType } from "@gooddata/sdk-ui-kit";
|
|
4
4
|
import { type IFilterButtonCustomIcon } from "../shared/interfaces/index.js";
|
|
@@ -61,6 +61,12 @@ export interface IDateFilterCoreProps {
|
|
|
61
61
|
* @alpha
|
|
62
62
|
*/
|
|
63
63
|
enableEmptyDateValues?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Custom content rendered at the end of the static period form hint area.
|
|
66
|
+
*
|
|
67
|
+
* @alpha
|
|
68
|
+
*/
|
|
69
|
+
customRangeHint?: ReactNode;
|
|
64
70
|
}
|
|
65
71
|
export declare const verifyDateFormat: (dateFormat: string) => string;
|
|
66
72
|
export declare function DateFilterCore({ originalSelectedFilterOption, originalExcludeCurrentPeriod, selectedFilterOption, excludeCurrentPeriod, onDropdownOpenChanged, customFilterName, dateFormat, disabled, openOnInit, locale, filterOptions, isTimeForAbsoluteRangeEnabled, isSecondsForAbsoluteRangeEnabled, weekStart, customIcon, FilterConfigurationComponent, onApplyClick, onCancelClick, showDropDownHeaderMessage, withoutApply, ButtonComponent, overlayPositionType, activeCalendars, hideDisabledExclude, ...dropdownBodyProps }: IDateFilterCoreProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFilterCore.d.ts","sourceRoot":"","sources":["../../src/DateFilter/DateFilterCore.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"DateFilterCore.d.ts","sourceRoot":"","sources":["../../src/DateFilter/DateFilterCore.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,EAGlB,KAAK,SAAS,EAKjB,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAOxG,OAAO,EAAY,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAe7E,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAErF,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,K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D;;OAEG;IACH,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAE1C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC;IAEnC;;;;;;;;OAQG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;OAIG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB,gCAY5B,CAAC;AAqCF,wBAAgB,cAAc,CAAC,EAC3B,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,UAAU,EACV,QAAQ,EACR,UAAU,EACV,MAAM,EACN,aAAa,EACb,6BAA6B,EAC7B,gCAAgC,EAChC,SAAS,EACT,UAAU,EACV,4BAA4B,EAC5B,YAAY,EACZ,aAAa,EACb,yBAAyB,EACzB,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,GAAG,iBAAiB,EACvB,EAAE,oBAAoB,2CAiLtB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type IntlShape } from "react-intl";
|
|
2
|
-
export declare function DateRangeHint({ dateFormat, isTimeEnabled, isSecondsEnabled, dateHintId, timeHintId, intl }: {
|
|
3
|
+
export declare function DateRangeHint({ dateFormat, isTimeEnabled, isSecondsEnabled, dateHintId, timeHintId, customRangeHint, intl }: {
|
|
3
4
|
dateFormat: string;
|
|
4
5
|
isTimeEnabled: boolean;
|
|
5
6
|
isSecondsEnabled?: boolean;
|
|
6
7
|
dateHintId: string;
|
|
7
8
|
timeHintId: string;
|
|
9
|
+
customRangeHint?: ReactNode;
|
|
8
10
|
intl: IntlShape;
|
|
9
11
|
}): import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
//# sourceMappingURL=DateRangeHint.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeHint.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DateRangePicker/DateRangeHint.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,YAAY,CAAC;AAU5D,wBAAgB,aAAa,CAAC,EAC1B,UAAU,EACV,aAAa,EACb,gBAAwB,EACxB,UAAU,EACV,UAAU,EACV,IAAI,EACP,EAAE;IACC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,SAAS,CAAC;CACnB,
|
|
1
|
+
{"version":3,"file":"DateRangeHint.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DateRangePicker/DateRangeHint.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,YAAY,CAAC;AAU5D,wBAAgB,aAAa,CAAC,EAC1B,UAAU,EACV,aAAa,EACb,gBAAwB,EACxB,UAAU,EACV,UAAU,EACV,eAAe,EACf,IAAI,EACP,EAAE;IACC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,IAAI,EAAE,SAAS,CAAC;CACnB,2CAkBA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2025-2026 GoodData Corporation
|
|
3
2
|
import { defineMessages } from "react-intl";
|
|
4
3
|
import { getLocalizedDateFormat } from "../utils/FormattingUtils.js";
|
|
5
4
|
const messages = defineMessages({
|
|
@@ -7,9 +6,9 @@ const messages = defineMessages({
|
|
|
7
6
|
timeFormatHint: { id: "filters.staticPeriod.timeFormatHint" },
|
|
8
7
|
timeFormatHintWithSeconds: { id: "filters.staticPeriod.timeFormatHintWithSeconds" },
|
|
9
8
|
});
|
|
10
|
-
export function DateRangeHint({ dateFormat, isTimeEnabled, isSecondsEnabled = false, dateHintId, timeHintId, intl, }) {
|
|
9
|
+
export function DateRangeHint({ dateFormat, isTimeEnabled, isSecondsEnabled = false, dateHintId, timeHintId, customRangeHint, intl, }) {
|
|
11
10
|
return (_jsxs("div", { className: "gd-date-range__hint", children: [
|
|
12
11
|
_jsx("div", { id: dateHintId, children: intl.formatMessage(messages.dateFormatHint, {
|
|
13
12
|
format: dateFormat || getLocalizedDateFormat(intl.locale),
|
|
14
|
-
}) }), isTimeEnabled ? (_jsx("div", { id: timeHintId, children: intl.formatMessage(isSecondsEnabled ? messages.timeFormatHintWithSeconds : messages.timeFormatHint) })) : null] }));
|
|
13
|
+
}) }), isTimeEnabled ? (_jsx("div", { id: timeHintId, children: intl.formatMessage(isSecondsEnabled ? messages.timeFormatHintWithSeconds : messages.timeFormatHint) })) : null, customRangeHint] }));
|
|
15
14
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
1
2
|
import { type DayPickerProps } from "react-day-picker";
|
|
2
3
|
import { type WeekStart } from "@gooddata/sdk-model";
|
|
3
4
|
import { type IDateRange } from "./types.js";
|
|
@@ -13,6 +14,7 @@ export interface IDateRangePickerProps {
|
|
|
13
14
|
shouldOverlayDatePicker?: boolean;
|
|
14
15
|
withoutApply?: boolean;
|
|
15
16
|
submitForm: () => void;
|
|
17
|
+
customRangeHint?: ReactNode;
|
|
16
18
|
}
|
|
17
|
-
export declare function DateRangePicker({ range, onRangeChange, dateFormat, dayPickerProps, isMobile, isTimeEnabled, isSecondsEnabled, weekStart, shouldOverlayDatePicker, withoutApply, submitForm }: IDateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function DateRangePicker({ range, onRangeChange, dateFormat, dayPickerProps, isMobile, isTimeEnabled, isSecondsEnabled, weekStart, shouldOverlayDatePicker, withoutApply, submitForm, customRangeHint }: IDateRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
//# sourceMappingURL=DateRangePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAA4C,MAAM,OAAO,CAAC;AAErG,OAAO,EAAkB,KAAK,cAAc,EAAgC,MAAM,kBAAkB,CAAC;AAGrG,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAQrD,OAAO,EAEH,KAAK,UAAU,EAIlB,MAAM,YAAY,CAAC;AAoPpB,MAAM,WAAW,qBAAqB;IAClC,KAAK,EAAE,UAAU,CAAC;IAClB,aAAa,EAAE,CAAC,QAAQ,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED,wBAAgB,eAAe,CAAC,EAC5B,KAAK,EACL,aAAa,EACb,UAAU,EACV,cAAc,EACd,QAAQ,EACR,aAAa,EACb,gBAAwB,EACxB,SAAoB,EACpB,uBAA+B,EAC/B,YAAoB,EACpB,UAAU,EACV,eAAe,EAClB,EAAE,qBAAqB,2CAyHvB"}
|
|
@@ -146,7 +146,7 @@ const useRangeState = (range, onRangeChange, closeCalendarPopup, selectedInput,
|
|
|
146
146
|
onEndTimeChange,
|
|
147
147
|
};
|
|
148
148
|
};
|
|
149
|
-
export function DateRangePicker({ range, onRangeChange, dateFormat, dayPickerProps, isMobile, isTimeEnabled, isSecondsEnabled = false, weekStart = "Sunday", shouldOverlayDatePicker = false, withoutApply = false, submitForm, }) {
|
|
149
|
+
export function DateRangePicker({ range, onRangeChange, dateFormat, dayPickerProps, isMobile, isTimeEnabled, isSecondsEnabled = false, weekStart = "Sunday", shouldOverlayDatePicker = false, withoutApply = false, submitForm, customRangeHint, }) {
|
|
150
150
|
const intl = useIntl();
|
|
151
151
|
const { selectedInput, isCalendarPopupOpen, onDateInputKeyDown, onStartDateClick, onEndDateClick, calendarPopupRef, startDateInputRef, endDateInputRef, closeCalendarPopup, } = useCalendarPopup();
|
|
152
152
|
const { startDate, startTime, endDate, endTime, startDateTimeErrors, endDateTimeErrors, onCalendarDateSelect, onStartDateChange, onStartTimeChange, onEndDateChange, onEndTimeChange, } = useRangeState(range, onRangeChange, closeCalendarPopup, selectedInput, submitForm);
|
|
@@ -154,7 +154,7 @@ export function DateRangePicker({ range, onRangeChange, dateFormat, dayPickerPro
|
|
|
154
154
|
const EndDateField = (_jsx(EndDateInputField, { ref: endDateInputRef, date: endDate, time: endTime, onDateChange: onEndDateChange, onTimeChange: onEndTimeChange, onInputClick: onEndDateClick, onDateInputKeyDown: onDateInputKeyDown, dateFormat: dateFormat, isMobile: isMobile, isTimeEnabled: isTimeEnabled, isSecondsEnabled: isSecondsEnabled, errors: endDateTimeErrors, intl: intl }));
|
|
155
155
|
const datePickerRange = { from: startDate, to: endDate };
|
|
156
156
|
const DatePicker = (_jsx(DayPicker, { ref: calendarPopupRef, mode: selectedInput, originalDateRange: datePickerRange, selectedDateRange: datePickerRange, onDateRangeSelect: onCalendarDateSelect, alignTo: `.gd-date-range-picker-${isTimeEnabled ? selectedInput : "from"}`, calendarClassNames: `gd-date-range-picker-picker s-date-range-calendar-${selectedInput}`, dayPickerProps: dayPickerProps, weekStart: weekStart, renderAsOverlay: shouldOverlayDatePicker, intl: intl }));
|
|
157
|
-
const HintPanel = isMobile ? null : (_jsx(DateRangeHint, { dateFormat: dateFormat, isTimeEnabled: isTimeEnabled, isSecondsEnabled: isSecondsEnabled, dateHintId: DATE_INPUT_HINT_ID, timeHintId: TIME_INPUT_HINT_ID, intl: intl }));
|
|
157
|
+
const HintPanel = isMobile ? null : (_jsx(DateRangeHint, { dateFormat: dateFormat, isTimeEnabled: isTimeEnabled, isSecondsEnabled: isSecondsEnabled, dateHintId: DATE_INPUT_HINT_ID, timeHintId: TIME_INPUT_HINT_ID, customRangeHint: customRangeHint, intl: intl }));
|
|
158
158
|
if (isTimeEnabled) {
|
|
159
159
|
const isFromInputDatePickerOpen = selectedInput === "from" && isCalendarPopupOpen;
|
|
160
160
|
const isToInputDatePickerOpen = selectedInput === "to" && isCalendarPopupOpen;
|
package/esm/sdk-ui-filters.d.ts
CHANGED
|
@@ -3351,6 +3351,18 @@ export declare interface IDateFilterOwnProps extends IDateFilterStatePropsInters
|
|
|
3351
3351
|
* @alpha
|
|
3352
3352
|
*/
|
|
3353
3353
|
activeCalendars?: IActiveCalendars;
|
|
3354
|
+
/**
|
|
3355
|
+
* Custom content rendered at the end of the hint area of the static period (absolute range) form,
|
|
3356
|
+
* after the default date/time format hints.
|
|
3357
|
+
*
|
|
3358
|
+
* @remarks
|
|
3359
|
+
* Use this to surface an application-specific note about the selected range (e.g. that the whole
|
|
3360
|
+
* period is always applied). The content is appended after the built-in hints, so their
|
|
3361
|
+
* accessibility wiring (`aria-describedby` of the range inputs) is preserved.
|
|
3362
|
+
*
|
|
3363
|
+
* @alpha
|
|
3364
|
+
*/
|
|
3365
|
+
customRangeHint?: ReactNode;
|
|
3354
3366
|
}
|
|
3355
3367
|
|
|
3356
3368
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-filters",
|
|
3
|
-
"version": "11.52.0
|
|
3
|
+
"version": "11.52.0",
|
|
4
4
|
"description": "GoodData.UI SDK - Filter Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"ts-invariant": "0.10.3",
|
|
47
47
|
"tslib": "2.8.1",
|
|
48
48
|
"uuid": "11.1.1",
|
|
49
|
-
"@gooddata/sdk-backend-spi": "11.52.0
|
|
50
|
-
"@gooddata/sdk-model": "11.52.0
|
|
51
|
-
"@gooddata/sdk-ui
|
|
52
|
-
"@gooddata/sdk-ui": "11.52.0
|
|
53
|
-
"@gooddata/util": "11.52.0
|
|
49
|
+
"@gooddata/sdk-backend-spi": "11.52.0",
|
|
50
|
+
"@gooddata/sdk-model": "11.52.0",
|
|
51
|
+
"@gooddata/sdk-ui": "11.52.0",
|
|
52
|
+
"@gooddata/sdk-ui-kit": "11.52.0",
|
|
53
|
+
"@gooddata/util": "11.52.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"typescript": "5.9.3",
|
|
93
93
|
"vitest": "4.1.8",
|
|
94
94
|
"vitest-dom": "0.1.1",
|
|
95
|
-
"@gooddata/
|
|
96
|
-
"@gooddata/
|
|
97
|
-
"@gooddata/
|
|
98
|
-
"@gooddata/
|
|
99
|
-
"@gooddata/sdk-
|
|
100
|
-
"@gooddata/stylelint-config": "11.52.0
|
|
95
|
+
"@gooddata/oxlint-config": "11.52.0",
|
|
96
|
+
"@gooddata/eslint-config": "11.52.0",
|
|
97
|
+
"@gooddata/reference-workspace": "11.52.0",
|
|
98
|
+
"@gooddata/sdk-ui-theme-provider": "11.52.0",
|
|
99
|
+
"@gooddata/sdk-backend-mockingbird": "11.52.0",
|
|
100
|
+
"@gooddata/stylelint-config": "11.52.0"
|
|
101
101
|
},
|
|
102
102
|
"peerDependencies": {
|
|
103
103
|
"react": "^18.0.0 || ^19.0.0",
|