@gooddata/sdk-ui-filters 11.54.0-alpha.5 → 11.54.0-alpha.7
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/AttributeFilterHandler/{fixtures.d.ts → AttributeFilterHandler.test.helpers.d.ts} +1 -1
- package/esm/AttributeFilterHandler/AttributeFilterHandler.test.helpers.d.ts.map +1 -0
- package/esm/AttributeFilterHandler/{testUtils.d.ts → waitForAsync.test.utils.d.ts} +1 -1
- package/esm/AttributeFilterHandler/waitForAsync.test.utils.d.ts.map +1 -0
- package/esm/DateFilter/DateFilterCore.d.ts.map +1 -1
- package/esm/DateFilter/DateFilterCore.js +1 -0
- package/esm/DateFilter/PeriodRangePicker/PeriodRangePicker.d.ts +9 -0
- package/esm/DateFilter/PeriodRangePicker/PeriodRangePicker.d.ts.map +1 -0
- package/esm/DateFilter/PeriodRangePicker/PeriodRangePicker.js +25 -0
- package/esm/DateFilter/PeriodRangePicker/PeriodRangePickerImpl.d.ts +22 -0
- package/esm/DateFilter/PeriodRangePicker/PeriodRangePickerImpl.d.ts.map +1 -0
- package/esm/DateFilter/PeriodRangePicker/PeriodRangePickerImpl.js +146 -0
- package/esm/DateFilter/PeriodRangePicker/momentRangePicker.d.ts +9 -0
- package/esm/DateFilter/PeriodRangePicker/momentRangePicker.d.ts.map +1 -0
- package/esm/DateFilter/PeriodRangePicker/momentRangePicker.js +9 -0
- package/esm/DateFilter/PeriodRangePicker/types.d.ts +28 -0
- package/esm/DateFilter/PeriodRangePicker/types.d.ts.map +1 -0
- package/esm/DateFilter/PeriodRangePicker/types.js +2 -0
- package/esm/DateFilter/PeriodRangePicker/weekStartMomentLocale.d.ts +16 -0
- package/esm/DateFilter/PeriodRangePicker/weekStartMomentLocale.d.ts.map +1 -0
- package/esm/DateFilter/PeriodRangePicker/weekStartMomentLocale.js +30 -0
- package/esm/DateFilter/interfaces/index.d.ts +4 -0
- package/esm/DateFilter/interfaces/index.d.ts.map +1 -1
- package/esm/DateFilter/utils/StaticPeriodConversions.d.ts +34 -0
- package/esm/DateFilter/utils/StaticPeriodConversions.d.ts.map +1 -0
- package/esm/DateFilter/utils/StaticPeriodConversions.js +80 -0
- package/esm/DateFilter/utils/{Translations/fixtures.d.ts → Translations.test.helpers.d.ts} +2 -2
- package/esm/DateFilter/utils/Translations.test.helpers.d.ts.map +1 -0
- package/esm/MeasureValueFilter/{fragments/MeasureValueFilterDropdown.d.ts → MeasureValueFilterDropdown.test.utils.d.ts} +1 -1
- package/esm/MeasureValueFilter/MeasureValueFilterDropdown.test.utils.d.ts.map +1 -0
- package/esm/RankingFilter/{mocks.d.ts → RankingFilter.test.helpers.d.ts} +1 -1
- package/esm/RankingFilter/RankingFilter.test.helpers.d.ts.map +1 -0
- package/esm/RankingFilter/{fragments/RankingFilterDropdown.d.ts → RankingFilterDropdown.test.utils.d.ts} +1 -1
- package/esm/RankingFilter/RankingFilterDropdown.test.utils.d.ts.map +1 -0
- package/esm/index.d.ts +2 -0
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -0
- package/esm/sdk-ui-filters.d.ts +41 -0
- package/package.json +16 -15
- package/styles/css/components/PeriodRangePicker.css +316 -0
- package/styles/css/components/PeriodRangePicker.css.map +1 -0
- package/styles/css/dateFilter.css +315 -0
- package/styles/css/dateFilter.css.map +1 -1
- package/styles/css/main.css +315 -0
- package/styles/css/main.css.map +1 -1
- package/styles/scss/components/PeriodRangePicker.scss +431 -0
- package/styles/scss/dateFilter.scss +1 -0
- package/esm/AttributeFilter/Components/FilterMenu/FilterMenuLabelItem.d.ts +0 -27
- package/esm/AttributeFilter/Components/FilterMenu/FilterMenuLabelItem.d.ts.map +0 -1
- package/esm/AttributeFilter/Components/FilterMenu/FilterMenuLabelItem.js +0 -11
- package/esm/AttributeFilter/hooks/useAttributeFilterHandlerMethods.d.ts +0 -80
- package/esm/AttributeFilter/hooks/useAttributeFilterHandlerMethods.d.ts.map +0 -1
- package/esm/AttributeFilter/hooks/useAttributeFilterHandlerMethods.js +0 -55
- package/esm/AttributeFilterHandler/fixtures.d.ts.map +0 -1
- package/esm/AttributeFilterHandler/testUtils.d.ts.map +0 -1
- package/esm/DateFilter/AbsoluteDateFilterForm/AbsoluteDateFilterFormSection.d.ts +0 -21
- package/esm/DateFilter/AbsoluteDateFilterForm/AbsoluteDateFilterFormSection.d.ts.map +0 -1
- package/esm/DateFilter/AbsoluteDateFilterForm/AbsoluteDateFilterFormSection.js +0 -27
- package/esm/DateFilter/AbsoluteForm.d.ts +0 -15
- package/esm/DateFilter/AbsoluteForm.d.ts.map +0 -1
- package/esm/DateFilter/AbsoluteForm.js +0 -58
- package/esm/DateFilter/DateFilterBody/DateFilterBodyContent.d.ts +0 -33
- package/esm/DateFilter/DateFilterBody/DateFilterBodyContent.d.ts.map +0 -1
- package/esm/DateFilter/DateFilterBody/DateFilterBodyContent.js +0 -44
- package/esm/DateFilter/NumericInput/ArrowButton.d.ts +0 -8
- package/esm/DateFilter/NumericInput/ArrowButton.d.ts.map +0 -1
- package/esm/DateFilter/NumericInput/ArrowButton.js +0 -12
- package/esm/DateFilter/NumericInput/NumericInput.d.ts +0 -10
- package/esm/DateFilter/NumericInput/NumericInput.d.ts.map +0 -1
- package/esm/DateFilter/NumericInput/NumericInput.js +0 -46
- package/esm/DateFilter/NumericInput/utils.d.ts +0 -2
- package/esm/DateFilter/NumericInput/utils.d.ts.map +0 -1
- package/esm/DateFilter/NumericInput/utils.js +0 -6
- package/esm/DateFilter/RelativeDateFilterForm/RelativeDateFilterFormSection.d.ts +0 -19
- package/esm/DateFilter/RelativeDateFilterForm/RelativeDateFilterFormSection.d.ts.map +0 -1
- package/esm/DateFilter/RelativeDateFilterForm/RelativeDateFilterFormSection.js +0 -37
- package/esm/DateFilter/Select/Select.d.ts +0 -12
- package/esm/DateFilter/Select/Select.d.ts.map +0 -1
- package/esm/DateFilter/Select/Select.js +0 -14
- package/esm/DateFilter/Select/SelectButton.d.ts +0 -8
- package/esm/DateFilter/Select/SelectButton.d.ts.map +0 -1
- package/esm/DateFilter/Select/SelectButton.js +0 -9
- package/esm/DateFilter/Select/SelectMenu.d.ts +0 -14
- package/esm/DateFilter/Select/SelectMenu.d.ts.map +0 -1
- package/esm/DateFilter/Select/SelectMenu.js +0 -32
- package/esm/DateFilter/utils/Translations/fixtures.d.ts.map +0 -1
- package/esm/MeasureValueFilter/fragments/MeasureValueFilterDropdown.d.ts.map +0 -1
- package/esm/RankingFilter/fragments/RankingFilterDropdown.d.ts.map +0 -1
- package/esm/RankingFilter/mocks.d.ts.map +0 -1
- /package/esm/AttributeFilterHandler/{fixtures.js → AttributeFilterHandler.test.helpers.js} +0 -0
- /package/esm/AttributeFilterHandler/{testUtils.js → waitForAsync.test.utils.js} +0 -0
- /package/esm/DateFilter/utils/{Translations/fixtures.js → Translations.test.helpers.js} +0 -0
- /package/esm/MeasureValueFilter/{fragments/MeasureValueFilterDropdown.js → MeasureValueFilterDropdown.test.utils.js} +0 -0
- /package/esm/RankingFilter/{mocks.js → RankingFilter.test.helpers.js} +0 -0
- /package/esm/RankingFilter/{fragments/RankingFilterDropdown.js → RankingFilterDropdown.test.utils.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttributeFilterHandler.test.helpers.d.ts","sourceRoot":"","sources":["../../src/AttributeFilterHandler/AttributeFilterHandler.test.helpers.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,yCAAyC,EAG9C,KAAK,6BAA6B,EACrC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACH,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACb,KAAK,mBAAmB,EAQ3B,MAAM,qBAAqB,CAAC;AAI7B,eAAO,MAAM,2BAA2B,EAAE,yCAEzC,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,yCAEhD,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,6BAA6B,EAOnE,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,QAAQ,EAAyB,CAAC;AAEjE,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,EAEpD,CAAC;AAyDF,eAAO,MAAM,cAAc,qBAKpB,CAAC;AAIR,eAAO,MAAM,cAAc,UAAsB,CAAC;AAElD,eAAO,MAAM,6BAA6B,4JAuBzC,CAAC;AAEF,eAAO,MAAM,gCAAgC,wDAE3C,CAAC;AAEH,eAAO,MAAM,qCAAqC,wDAEhD,CAAC;AAEH,eAAO,MAAM,gCAAgC,wDAE3C,CAAC;AAEH,eAAO,MAAM,gDAAgD;;;gGAU5D,CAAC;AA2EF;;;;;;;GAOG;AACH,eAAO,MAAM,qDAAqD;;IAU1D;;;OAGG;;CAKV,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const waitForAsync: () => Promise<any>;
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=waitForAsync.test.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"waitForAsync.test.utils.d.ts","sourceRoot":"","sources":["../../src/AttributeFilterHandler/waitForAsync.test.utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,oBAAmF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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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yBAAyB,CAAC,CAAC;IAExE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAExD;;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,2CAkLtB"}
|
|
@@ -102,6 +102,7 @@ export function DateFilterCore({ originalSelectedFilterOption, originalExcludeCu
|
|
|
102
102
|
], onOpenStateChanged: handleOpenStateChanged, overlayPositionType: overlayPositionType, renderButton: ({ isOpen, buttonRef, dropdownId, toggleDropdown }) => (_jsx("span", { onClick: disabled ? () => { } : toggleDropdown, children: dateFilterButton(isOpen, buttonRef, dropdownId, toggleDropdown) })), ignoreClicksOnByClass: [
|
|
103
103
|
".s-do-not-close-dropdown-on-click",
|
|
104
104
|
".rdp-day", // absolute range picker calendar items
|
|
105
|
+
".rc-picker-cell-inner", // PeriodRangePicker (rc-picker) period grid cells
|
|
105
106
|
], renderBody: ({ closeDropdown, ariaAttributes }) => {
|
|
106
107
|
return isConfigurationOpen && FilterConfigurationComponent ? (_jsx(FilterConfigurationComponent, { onSaveButtonClick: closeConfiguration, onCancelButtonClick: cancelConfiguration })) : (
|
|
107
108
|
// Dropdown component uses Children.map and adds special props to this component
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type IPeriodRangePickerProps } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* A grid picker for selecting a Week/Month/Quarter/Year period range. Renders the rc-picker panel matching
|
|
4
|
+
* {@link IPeriodRangePickerProps.granularity} and reports the resolved day-level range via `onRangeChange`.
|
|
5
|
+
*
|
|
6
|
+
* @alpha
|
|
7
|
+
*/
|
|
8
|
+
export declare function PeriodRangePicker(props: IPeriodRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=PeriodRangePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PeriodRangePicker.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/PeriodRangePicker/PeriodRangePicker.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAgB1D;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,uBAAuB,2CAM/D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { Suspense, lazy } from "react";
|
|
4
|
+
// `@rc-component/picker`'s "es" build - the one its package.json `exports` map serves to the `import`
|
|
5
|
+
// condition, for every subpath - ships ESM syntax with extensionless relative imports (`from "./common"`),
|
|
6
|
+
// which Node's ESM resolver cannot resolve. It is therefore loadable by bundlers only: under plain Node ESM
|
|
7
|
+
// every entry point of that package throws ERR_MODULE_NOT_FOUND. Since this package is `"type": "module"`,
|
|
8
|
+
// Node always takes that `import` condition, so anything that statically reaches rc-picker poisons the whole
|
|
9
|
+
// `@gooddata/sdk-ui-filters` barrel for Node consumers - including every other package's vitest run, where
|
|
10
|
+
// this package's built `esm/` is externalized and resolved by Node rather than by Vite.
|
|
11
|
+
//
|
|
12
|
+
// Keeping the rc-picker-importing module behind a dynamic import keeps the barrel importable in Node and
|
|
13
|
+
// code-splits a heavy dependency out of the main bundle; the picker is only ever shown on demand anyway.
|
|
14
|
+
const PeriodRangePickerImpl = lazy(async () => ({
|
|
15
|
+
default: (await import("./PeriodRangePickerImpl.js")).PeriodRangePickerImpl,
|
|
16
|
+
}));
|
|
17
|
+
/**
|
|
18
|
+
* A grid picker for selecting a Week/Month/Quarter/Year period range. Renders the rc-picker panel matching
|
|
19
|
+
* {@link IPeriodRangePickerProps.granularity} and reports the resolved day-level range via `onRangeChange`.
|
|
20
|
+
*
|
|
21
|
+
* @alpha
|
|
22
|
+
*/
|
|
23
|
+
export function PeriodRangePicker(props) {
|
|
24
|
+
return (_jsx(Suspense, { fallback: null, children: _jsx(PeriodRangePickerImpl, { ...props }) }));
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type Moment } from "moment";
|
|
2
|
+
import { type IPeriodRange, type IPeriodRangePickerProps, type PeriodRangePickerGranularity } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the picker's raw selected [start, end] into the exact day-level range this component reports.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* rc-picker's month/quarter/year panels hand back a start-of-unit anchor for BOTH ends of the range, so the end
|
|
8
|
+
* anchor still needs expanding to the last day of its period. `resolvePeriodBoundaries` already accepts "any date
|
|
9
|
+
* within the period" for either bound, so a start-of-unit anchor works as input either way. Day needs no expansion,
|
|
10
|
+
* and `resolvePeriodBoundaries` handles it as a no-op period (start/end of day), so it's routed through uniformly.
|
|
11
|
+
*/
|
|
12
|
+
export declare function resolveSelectedRange(granularity: PeriodRangePickerGranularity, start: Moment, end: Moment, weekStart: NonNullable<IPeriodRangePickerProps["weekStart"]>): IPeriodRange;
|
|
13
|
+
/**
|
|
14
|
+
* A grid picker for selecting a Week/Month/Quarter/Year period range. Renders the rc-picker panel matching
|
|
15
|
+
* {@link IPeriodRangePickerProps.granularity} and reports the resolved day-level range via `onRangeChange`.
|
|
16
|
+
*
|
|
17
|
+
* @remarks
|
|
18
|
+
* Loaded lazily by `PeriodRangePicker`, which is the public entry point - this module has to stay out of the
|
|
19
|
+
* package's eager module graph, see the note in PeriodRangePicker.tsx. Import it directly only from tests.
|
|
20
|
+
*/
|
|
21
|
+
export declare function PeriodRangePickerImpl({ granularity, range, onRangeChange, isMobile, weekStart, withoutApply, submitForm }: IPeriodRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=PeriodRangePickerImpl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PeriodRangePickerImpl.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/PeriodRangePicker/PeriodRangePickerImpl.tsx"],"names":[],"mappings":"AA4BA,OAAe,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAU7C,OAAO,EACH,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACpC,MAAM,YAAY,CAAC;AAsEpB;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAChC,WAAW,EAAE,4BAA4B,EACzC,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,WAAW,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,GAC7D,YAAY,CAOd;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,EAClC,WAAW,EACX,KAAK,EACL,aAAa,EACb,QAAQ,EACR,SAAoB,EACpB,YAAoB,EACpB,UAAU,EACb,EAAE,uBAAuB,2CAiEzB"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { useCallback, useMemo, useRef } from "react";
|
|
4
|
+
import * as rcDeDE from "@rc-component/picker/locale/de_DE";
|
|
5
|
+
import * as rcEnGB from "@rc-component/picker/locale/en_GB";
|
|
6
|
+
import * as rcEnUS from "@rc-component/picker/locale/en_US";
|
|
7
|
+
import * as rcEsES from "@rc-component/picker/locale/es_ES";
|
|
8
|
+
import * as rcFiFI from "@rc-component/picker/locale/fi_FI";
|
|
9
|
+
import * as rcFrCA from "@rc-component/picker/locale/fr_CA";
|
|
10
|
+
import * as rcFrFR from "@rc-component/picker/locale/fr_FR";
|
|
11
|
+
import * as rcIdID from "@rc-component/picker/locale/id_ID";
|
|
12
|
+
import * as rcItIT from "@rc-component/picker/locale/it_IT";
|
|
13
|
+
import * as rcJaJP from "@rc-component/picker/locale/ja_JP";
|
|
14
|
+
import * as rcKoKR from "@rc-component/picker/locale/ko_KR";
|
|
15
|
+
import * as rcNlNL from "@rc-component/picker/locale/nl_NL";
|
|
16
|
+
import * as rcPlPL from "@rc-component/picker/locale/pl_PL";
|
|
17
|
+
import * as rcPtBR from "@rc-component/picker/locale/pt_BR";
|
|
18
|
+
import * as rcPtPT from "@rc-component/picker/locale/pt_PT";
|
|
19
|
+
import * as rcRuRU from "@rc-component/picker/locale/ru_RU";
|
|
20
|
+
import * as rcSlSI from "@rc-component/picker/locale/sl_SI";
|
|
21
|
+
import * as rcThTH from "@rc-component/picker/locale/th_TH";
|
|
22
|
+
import * as rcTrTR from "@rc-component/picker/locale/tr_TR";
|
|
23
|
+
import * as rcUkUA from "@rc-component/picker/locale/uk_UA";
|
|
24
|
+
import * as rcViVN from "@rc-component/picker/locale/vi_VN";
|
|
25
|
+
import * as rcZhCN from "@rc-component/picker/locale/zh_CN";
|
|
26
|
+
import * as rcZhTW from "@rc-component/picker/locale/zh_TW";
|
|
27
|
+
import { defaultImport } from "default-import";
|
|
28
|
+
import moment from "moment";
|
|
29
|
+
import { useIntl } from "react-intl";
|
|
30
|
+
import { useDebounce } from "@gooddata/sdk-ui";
|
|
31
|
+
import { sanitizeLocaleForMoment } from "@gooddata/util";
|
|
32
|
+
import { platformDateFormat } from "../constants/Platform.js";
|
|
33
|
+
import { resolvePeriodBoundaries } from "../utils/StaticPeriodConversions.js";
|
|
34
|
+
import { MomentRangePicker } from "./momentRangePicker.js";
|
|
35
|
+
import { getWeekStartMomentLocale } from "./weekStartMomentLocale.js";
|
|
36
|
+
// rc-picker's locale files carry the same ESM-`export default`-without-`"type": "module"` packaging quirk as
|
|
37
|
+
// its `generate/moment` module (see momentRangePicker.tsx), so the default export is unwrapped via
|
|
38
|
+
// `defaultImport`, which tolerates both interop shapes these modules can be loaded through.
|
|
39
|
+
const pickerLocale = (localeModule) => defaultImport(localeModule);
|
|
40
|
+
// Mirrors DatePicker.tsx's `convertedLocales`, narrowed to whichever rc-picker bundles under sdk-ui-filters's
|
|
41
|
+
// supported intl locale list. rc-picker has no dedicated zh_HK date-picker locale or
|
|
42
|
+
// en_AU — both fall back to their closest sibling (zh_TW, en_GB respectively).
|
|
43
|
+
const RC_PICKER_LOCALES = {
|
|
44
|
+
"en-US": pickerLocale(rcEnUS),
|
|
45
|
+
"en-US-x-24h": pickerLocale(rcEnUS),
|
|
46
|
+
"de-DE": pickerLocale(rcDeDE),
|
|
47
|
+
"es-ES": pickerLocale(rcEsES),
|
|
48
|
+
"fr-FR": pickerLocale(rcFrFR),
|
|
49
|
+
"ja-JP": pickerLocale(rcJaJP),
|
|
50
|
+
"nl-NL": pickerLocale(rcNlNL),
|
|
51
|
+
"pt-BR": pickerLocale(rcPtBR),
|
|
52
|
+
"pt-PT": pickerLocale(rcPtPT),
|
|
53
|
+
"zh-Hans": pickerLocale(rcZhCN),
|
|
54
|
+
"ru-RU": pickerLocale(rcRuRU),
|
|
55
|
+
"it-IT": pickerLocale(rcItIT),
|
|
56
|
+
"es-419": pickerLocale(rcEsES),
|
|
57
|
+
"en-GB": pickerLocale(rcEnGB),
|
|
58
|
+
"fr-CA": pickerLocale(rcFrCA),
|
|
59
|
+
"zh-Hant": pickerLocale(rcZhTW),
|
|
60
|
+
"en-AU": pickerLocale(rcEnGB),
|
|
61
|
+
"fi-FI": pickerLocale(rcFiFI),
|
|
62
|
+
"zh-HK": pickerLocale(rcZhTW),
|
|
63
|
+
"tr-TR": pickerLocale(rcTrTR),
|
|
64
|
+
"pl-PL": pickerLocale(rcPlPL),
|
|
65
|
+
"ko-KR": pickerLocale(rcKoKR),
|
|
66
|
+
"sl-SI": pickerLocale(rcSlSI),
|
|
67
|
+
"id-ID": pickerLocale(rcIdID),
|
|
68
|
+
"th-TH": pickerLocale(rcThTH),
|
|
69
|
+
"uk-UA": pickerLocale(rcUkUA),
|
|
70
|
+
"vi-VN": pickerLocale(rcViVN),
|
|
71
|
+
};
|
|
72
|
+
function getPickerLocale(intlLocale) {
|
|
73
|
+
return RC_PICKER_LOCALES[intlLocale] ?? RC_PICKER_LOCALES["en-US"];
|
|
74
|
+
}
|
|
75
|
+
const GRANULARITY_TO_PICKER_MODE = {
|
|
76
|
+
"GDC.time.date": "date",
|
|
77
|
+
"GDC.time.week_us": "week",
|
|
78
|
+
"GDC.time.month": "month",
|
|
79
|
+
"GDC.time.quarter": "quarter",
|
|
80
|
+
"GDC.time.year": "year",
|
|
81
|
+
};
|
|
82
|
+
function parseRangeValue(range) {
|
|
83
|
+
if (!range.from || !range.to) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return [moment(range.from, platformDateFormat), moment(range.to, platformDateFormat)];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Resolves the picker's raw selected [start, end] into the exact day-level range this component reports.
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* rc-picker's month/quarter/year panels hand back a start-of-unit anchor for BOTH ends of the range, so the end
|
|
93
|
+
* anchor still needs expanding to the last day of its period. `resolvePeriodBoundaries` already accepts "any date
|
|
94
|
+
* within the period" for either bound, so a start-of-unit anchor works as input either way. Day needs no expansion,
|
|
95
|
+
* and `resolvePeriodBoundaries` handles it as a no-op period (start/end of day), so it's routed through uniformly.
|
|
96
|
+
*/
|
|
97
|
+
export function resolveSelectedRange(granularity, start, end, weekStart) {
|
|
98
|
+
return resolvePeriodBoundaries(granularity, start.format(platformDateFormat), end.format(platformDateFormat), weekStart);
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* A grid picker for selecting a Week/Month/Quarter/Year period range. Renders the rc-picker panel matching
|
|
102
|
+
* {@link IPeriodRangePickerProps.granularity} and reports the resolved day-level range via `onRangeChange`.
|
|
103
|
+
*
|
|
104
|
+
* @remarks
|
|
105
|
+
* Loaded lazily by `PeriodRangePicker`, which is the public entry point - this module has to stay out of the
|
|
106
|
+
* package's eager module graph, see the note in PeriodRangePicker.tsx. Import it directly only from tests.
|
|
107
|
+
*/
|
|
108
|
+
export function PeriodRangePickerImpl({ granularity, range, onRangeChange, isMobile, weekStart = "Sunday", withoutApply = false, submitForm, }) {
|
|
109
|
+
const intl = useIntl();
|
|
110
|
+
const wrapperRef = useRef(null);
|
|
111
|
+
const debouncedSubmitForm = useDebounce(submitForm, 0);
|
|
112
|
+
const pickerMode = GRANULARITY_TO_PICKER_MODE[granularity];
|
|
113
|
+
const value = useMemo(() => parseRangeValue(range), [range]);
|
|
114
|
+
// Week-start is a workspace setting independent of display language (see weekStartMomentLocale.ts) — only
|
|
115
|
+
// relevant for the Week grid; Month/Quarter/Year/Day ignore it, so leave their locale's own default alone.
|
|
116
|
+
const locale = useMemo(() => {
|
|
117
|
+
const baseLocale = getPickerLocale(intl.locale);
|
|
118
|
+
if (granularity !== "GDC.time.week_us") {
|
|
119
|
+
return baseLocale;
|
|
120
|
+
}
|
|
121
|
+
const momentLocaleKey = getWeekStartMomentLocale(sanitizeLocaleForMoment(intl.locale), weekStart);
|
|
122
|
+
return { ...baseLocale, locale: momentLocaleKey };
|
|
123
|
+
}, [intl.locale, granularity, weekStart]);
|
|
124
|
+
const handleChange = useCallback((dates) => {
|
|
125
|
+
if (!dates?.[0] || !dates[1]) {
|
|
126
|
+
onRangeChange({ from: undefined, to: undefined });
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
onRangeChange(resolveSelectedRange(granularity, dates[0], dates[1], weekStart));
|
|
130
|
+
if (withoutApply) {
|
|
131
|
+
// rc-picker's RangePicker calls onChange twice per completed selection (both with the same,
|
|
132
|
+
// correct final value); debouncing collapses that into a single submitForm() call rather than
|
|
133
|
+
// firing it twice for one user gesture. Deferred to the next render loop — mirrors
|
|
134
|
+
// DateRangePicker.tsx's updateRangeState, whose comment notes the newest values aren't
|
|
135
|
+
// propagated to state yet within the same tick.
|
|
136
|
+
debouncedSubmitForm();
|
|
137
|
+
}
|
|
138
|
+
}, [granularity, weekStart, withoutApply, debouncedSubmitForm, onRangeChange]);
|
|
139
|
+
const getPopupContainer = useCallback(() => wrapperRef.current ?? document.body, []);
|
|
140
|
+
return (_jsx("div", { className: isMobile
|
|
141
|
+
? "gd-period-range-picker gd-period-range-picker-mobile s-period-range-picker"
|
|
142
|
+
: "gd-period-range-picker s-period-range-picker", ref: wrapperRef, children: _jsx(MomentRangePicker, { picker: pickerMode, value: value, onChange: handleChange, inputReadOnly: true, getPopupContainer: getPopupContainer, locale: locale,
|
|
143
|
+
// rc-picker's bare defaults render no clear button, a "~" separator, and no suffix icon —
|
|
144
|
+
// each is pinned explicitly here.
|
|
145
|
+
allowClear: true, separator: "\u2192", suffixIcon: _jsx("span", { className: "gd-icon-calendar", "aria-hidden": "true" }) }) }));
|
|
146
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RangePickerProps } from "@rc-component/picker";
|
|
2
|
+
import { type Moment } from "moment";
|
|
3
|
+
/**
|
|
4
|
+
* rc-picker's RangePicker with `generateConfig` pre-bound to run on `moment`, so it composes directly
|
|
5
|
+
* with this package's existing moment-based date handling without introducing a second date library.
|
|
6
|
+
*/
|
|
7
|
+
export type MomentRangePickerProps = Omit<RangePickerProps<Moment>, "generateConfig">;
|
|
8
|
+
export declare function MomentRangePicker(props: MomentRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=momentRangePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"momentRangePicker.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/PeriodRangePicker/momentRangePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAWrC;;;GAGG;AACH,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,gBAAgB,CAAC,CAAC;AAEtF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,2CAE9D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { RangePicker } from "@rc-component/picker";
|
|
4
|
+
import * as momentGenerateConfigModule from "@rc-component/picker/generate/moment";
|
|
5
|
+
import { defaultImport } from "default-import";
|
|
6
|
+
const momentGenerateConfig = defaultImport(momentGenerateConfigModule);
|
|
7
|
+
export function MomentRangePicker(props) {
|
|
8
|
+
return _jsx(RangePicker, { generateConfig: momentGenerateConfig, ...props });
|
|
9
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type DateFilterGranularity, type DateString, type WeekStart } from "@gooddata/sdk-model";
|
|
2
|
+
/**
|
|
3
|
+
* Granularities {@link PeriodRangePicker} can render a picker for.
|
|
4
|
+
* @alpha
|
|
5
|
+
*/
|
|
6
|
+
export type PeriodRangePickerGranularity = Extract<DateFilterGranularity, "GDC.time.date" | "GDC.time.week_us" | "GDC.time.month" | "GDC.time.quarter" | "GDC.time.year">;
|
|
7
|
+
/**
|
|
8
|
+
* A day-level absolute range.
|
|
9
|
+
* @alpha
|
|
10
|
+
*/
|
|
11
|
+
export interface IPeriodRange {
|
|
12
|
+
from?: DateString;
|
|
13
|
+
to?: DateString;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @alpha
|
|
17
|
+
*/
|
|
18
|
+
export interface IPeriodRangePickerProps {
|
|
19
|
+
granularity: PeriodRangePickerGranularity;
|
|
20
|
+
range: IPeriodRange;
|
|
21
|
+
onRangeChange: (newRange: IPeriodRange) => void;
|
|
22
|
+
isMobile: boolean;
|
|
23
|
+
/** Which day a week starts on; only relevant when `granularity` is `"GDC.time.week_us"`. Defaults to "Sunday". */
|
|
24
|
+
weekStart?: WeekStart;
|
|
25
|
+
withoutApply?: boolean;
|
|
26
|
+
submitForm: () => void;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/PeriodRangePicker/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAElG;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,OAAO,CAC9C,qBAAqB,EACrB,eAAe,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,eAAe,CACjG,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,YAAY;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,EAAE,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,WAAW,EAAE,4BAA4B,CAAC;IAC1C,KAAK,EAAE,YAAY,CAAC;IACpB,aAAa,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,kHAAkH;IAClH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,MAAM,IAAI,CAAC;CAC1B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type WeekStart } from "@gooddata/sdk-model";
|
|
2
|
+
/**
|
|
3
|
+
* rc-picker's moment-powered picker derives week-start purely from the active moment locale's `firstDayOfWeek()`
|
|
4
|
+
* (see `@rc-component/picker`'s moment `generateConfig`, `getWeekFirstDay`) — there is no standalone
|
|
5
|
+
* "week starts on" prop, unlike react-day-picker's `weekStartsOn` used by the existing day-grid picker. This
|
|
6
|
+
* app's `weekStart` is an independently configured workspace setting, not implied by display language, so we
|
|
7
|
+
* cannot just let the display locale's own default week-start apply: the Week grid's visual week rows must
|
|
8
|
+
* agree with the boundary this component actually resolves and applies (`resolvePeriodBoundaries`), or a user
|
|
9
|
+
* could click a visually Mon-Sun row that resolves to a different Sun-Sat range.
|
|
10
|
+
*
|
|
11
|
+
* @param baseMomentLocale - the display locale to inherit everything else (month names, formats, ...) from
|
|
12
|
+
* @param weekStart - the desired week-start; only the locale's `week.dow`/`week.doy` are overridden
|
|
13
|
+
* @returns a moment locale key carrying `baseMomentLocale`'s data with `week` overridden to match `weekStart`
|
|
14
|
+
*/
|
|
15
|
+
export declare function getWeekStartMomentLocale(baseMomentLocale: string, weekStart: WeekStart): string;
|
|
16
|
+
//# sourceMappingURL=weekStartMomentLocale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weekStartMomentLocale.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/PeriodRangePicker/weekStartMomentLocale.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD;;;;;;;;;;;;GAYG;AACH,wBAAgB,wBAAwB,CAAC,gBAAgB,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,GAAG,MAAM,CAe/F"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import moment from "moment";
|
|
3
|
+
const LOCALE_KEY_NAMESPACE = "gdc-period-range-picker-week-start";
|
|
4
|
+
/**
|
|
5
|
+
* rc-picker's moment-powered picker derives week-start purely from the active moment locale's `firstDayOfWeek()`
|
|
6
|
+
* (see `@rc-component/picker`'s moment `generateConfig`, `getWeekFirstDay`) — there is no standalone
|
|
7
|
+
* "week starts on" prop, unlike react-day-picker's `weekStartsOn` used by the existing day-grid picker. This
|
|
8
|
+
* app's `weekStart` is an independently configured workspace setting, not implied by display language, so we
|
|
9
|
+
* cannot just let the display locale's own default week-start apply: the Week grid's visual week rows must
|
|
10
|
+
* agree with the boundary this component actually resolves and applies (`resolvePeriodBoundaries`), or a user
|
|
11
|
+
* could click a visually Mon-Sun row that resolves to a different Sun-Sat range.
|
|
12
|
+
*
|
|
13
|
+
* @param baseMomentLocale - the display locale to inherit everything else (month names, formats, ...) from
|
|
14
|
+
* @param weekStart - the desired week-start; only the locale's `week.dow`/`week.doy` are overridden
|
|
15
|
+
* @returns a moment locale key carrying `baseMomentLocale`'s data with `week` overridden to match `weekStart`
|
|
16
|
+
*/
|
|
17
|
+
export function getWeekStartMomentLocale(baseMomentLocale, weekStart) {
|
|
18
|
+
const dow = weekStart === "Monday" ? 1 : 0;
|
|
19
|
+
const localeKey = `${LOCALE_KEY_NAMESPACE}-${baseMomentLocale.toLowerCase()}-${dow}`;
|
|
20
|
+
if (!moment.locales().includes(localeKey)) {
|
|
21
|
+
const parentLocale = moment.locales().includes(baseMomentLocale) ? baseMomentLocale : "en";
|
|
22
|
+
const previousGlobalLocale = moment.locale();
|
|
23
|
+
moment.defineLocale(localeKey, {
|
|
24
|
+
parentLocale,
|
|
25
|
+
week: { dow },
|
|
26
|
+
});
|
|
27
|
+
moment.locale(previousGlobalLocale);
|
|
28
|
+
}
|
|
29
|
+
return localeKey;
|
|
30
|
+
}
|
|
@@ -4,6 +4,10 @@ import { type DateFilterGranularity, type DateString, type EmptyValues, type IAb
|
|
|
4
4
|
* @public
|
|
5
5
|
*/
|
|
6
6
|
export interface IUiAbsoluteDateFilterForm extends IAbsoluteDateFilterForm {
|
|
7
|
+
/**
|
|
8
|
+
* Selected global absolute date filter granularity. Absent means "Day", for backward compatibility.
|
|
9
|
+
*/
|
|
10
|
+
granularity?: DateFilterGranularity;
|
|
7
11
|
/**
|
|
8
12
|
* Selected global absolute date filter start date
|
|
9
13
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/interfaces/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,yBAAyB,EAC9B,KAAK,sCAAsC,EAC3C,KAAK,mBAAmB,EACxB,KAAK,mCAAmC,EAK3C,MAAM,qBAAqB,CAAC;AAE7B;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,uBAAuB;IACtE;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;OAEG;IACH,EAAE,CAAC,EAAE,UAAU,CAAC;IAChB;;OAEG;IACH,kBAAkB,CAAC,EAAE,WAAW,CAAC;CACpC;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,oDAEtC,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,uBAAuB,EAAE,wBAAwB,CAAC;IACtG;;OAEG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC;;OAEG;IACH,IAAI,CAAC,EAAE,mCAAmC,CAAC;IAC3C;;OAEG;IACH,EAAE,CAAC,EAAE,mCAAmC,CAAC;IACzC;;OAEG;IACH,aAAa,CA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B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,YAAY,CAAC,EAAE,qCAAqC,CAAC;IACrD;;OAEG;IACH,YAAY,CAAC,EAAE,6BAA6B,CAAC;CAChD"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type DateFilterGranularity, type DateString, type WeekStart } from "@gooddata/sdk-model";
|
|
2
|
+
/**
|
|
3
|
+
* Static (absolute) date filter granularities supported by the period-boundary resolution utilities
|
|
4
|
+
* in this module: day and standard-calendar week/month/quarter/year.
|
|
5
|
+
* @alpha
|
|
6
|
+
*/
|
|
7
|
+
export type StaticPeriodGranularity = Extract<DateFilterGranularity, "GDC.time.date" | "GDC.time.week_us" | "GDC.time.month" | "GDC.time.quarter" | "GDC.time.year">;
|
|
8
|
+
/**
|
|
9
|
+
* A resolved day-level absolute date range.
|
|
10
|
+
* @alpha
|
|
11
|
+
*/
|
|
12
|
+
export interface IResolvedStaticPeriodRange {
|
|
13
|
+
from: DateString;
|
|
14
|
+
to: DateString;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resolves a selected static granularity + period anchor range into a day-level `{from, to}` pair.
|
|
18
|
+
*
|
|
19
|
+
* @remarks
|
|
20
|
+
* `periodStart`/`periodEnd` are any date falling within the first/last selected period of `granularity`
|
|
21
|
+
* (e.g. any day in March 2026 identifies "March 2026"). The result spans from the first day of the period
|
|
22
|
+
* containing `periodStart` to the last day of the period containing `periodEnd`, covering every whole
|
|
23
|
+
* period in between — e.g. a `periodStart` in Feb 2026 and `periodEnd` in Apr 2026 resolves to
|
|
24
|
+
* `{from: "2026-02-01", to: "2026-04-30"}`.
|
|
25
|
+
*
|
|
26
|
+
* @param granularity - one of `GDC.time.date` / `week_us` / `month` / `quarter` / `year` (standard calendar
|
|
27
|
+
* only); throws for any other granularity, e.g. fiscal variants.
|
|
28
|
+
* @param periodStart - any date within the first selected period
|
|
29
|
+
* @param periodEnd - any date within the last selected period
|
|
30
|
+
* @param weekStart - which day a week starts on; only relevant for `GDC.time.week_us`. Defaults to "Sunday".
|
|
31
|
+
* @alpha
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolvePeriodBoundaries(granularity: DateFilterGranularity, periodStart: DateString, periodEnd: DateString, weekStart?: WeekStart): IResolvedStaticPeriodRange;
|
|
34
|
+
//# sourceMappingURL=StaticPeriodConversions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StaticPeriodConversions.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/utils/StaticPeriodConversions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIlG;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,OAAO,CACzC,qBAAqB,EACrB,eAAe,GAAG,kBAAkB,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,eAAe,CACjG,CAAC;AA+DF;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACvC,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,EAAE,UAAU,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,uBAAuB,CACnC,WAAW,EAAE,qBAAqB,EAClC,WAAW,EAAE,UAAU,EACvB,SAAS,EAAE,UAAU,EACrB,SAAS,GAAE,SAAoB,GAChC,0BAA0B,CAU5B"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
import moment from "moment";
|
|
3
|
+
import { platformDateFormat } from "../constants/Platform.js";
|
|
4
|
+
const STATIC_PERIOD_GRANULARITIES = [
|
|
5
|
+
"GDC.time.date",
|
|
6
|
+
"GDC.time.week_us",
|
|
7
|
+
"GDC.time.month",
|
|
8
|
+
"GDC.time.quarter",
|
|
9
|
+
"GDC.time.year",
|
|
10
|
+
];
|
|
11
|
+
function assertStaticPeriodGranularity(granularity) {
|
|
12
|
+
if (!STATIC_PERIOD_GRANULARITIES.includes(granularity)) {
|
|
13
|
+
throw new Error(`Unsupported static period granularity: ${granularity}. Expected one of ${STATIC_PERIOD_GRANULARITIES.join(", ")}.`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
// moment's own week-start is driven by the globally mutable current locale, which this module must not
|
|
17
|
+
// depend on. moment().day() is locale-independent (always 0 = Sunday .. 6 = Saturday), so week boundaries
|
|
18
|
+
// are computed from it directly using the caller-supplied weekStart instead.
|
|
19
|
+
function startOfWeek(date, weekStart) {
|
|
20
|
+
const weekStartDay = weekStart === "Monday" ? 1 : 0;
|
|
21
|
+
const diff = (date.day() - weekStartDay + 7) % 7;
|
|
22
|
+
return date.clone().subtract(diff, "days").startOf("day");
|
|
23
|
+
}
|
|
24
|
+
function endOfWeek(date, weekStart) {
|
|
25
|
+
return startOfWeek(date, weekStart).add(6, "days").endOf("day");
|
|
26
|
+
}
|
|
27
|
+
function startOfPeriod(granularity, date, weekStart) {
|
|
28
|
+
switch (granularity) {
|
|
29
|
+
case "GDC.time.week_us":
|
|
30
|
+
return startOfWeek(date, weekStart);
|
|
31
|
+
case "GDC.time.month":
|
|
32
|
+
return date.clone().startOf("month");
|
|
33
|
+
case "GDC.time.quarter":
|
|
34
|
+
return date.clone().startOf("quarter");
|
|
35
|
+
case "GDC.time.year":
|
|
36
|
+
return date.clone().startOf("year");
|
|
37
|
+
default: // GDC.time.date
|
|
38
|
+
return date.clone().startOf("day");
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function endOfPeriod(granularity, date, weekStart) {
|
|
42
|
+
switch (granularity) {
|
|
43
|
+
case "GDC.time.week_us":
|
|
44
|
+
return endOfWeek(date, weekStart);
|
|
45
|
+
case "GDC.time.month":
|
|
46
|
+
return date.clone().endOf("month");
|
|
47
|
+
case "GDC.time.quarter":
|
|
48
|
+
return date.clone().endOf("quarter");
|
|
49
|
+
case "GDC.time.year":
|
|
50
|
+
return date.clone().endOf("year");
|
|
51
|
+
default: // GDC.time.date
|
|
52
|
+
return date.clone().endOf("day");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Resolves a selected static granularity + period anchor range into a day-level `{from, to}` pair.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* `periodStart`/`periodEnd` are any date falling within the first/last selected period of `granularity`
|
|
60
|
+
* (e.g. any day in March 2026 identifies "March 2026"). The result spans from the first day of the period
|
|
61
|
+
* containing `periodStart` to the last day of the period containing `periodEnd`, covering every whole
|
|
62
|
+
* period in between — e.g. a `periodStart` in Feb 2026 and `periodEnd` in Apr 2026 resolves to
|
|
63
|
+
* `{from: "2026-02-01", to: "2026-04-30"}`.
|
|
64
|
+
*
|
|
65
|
+
* @param granularity - one of `GDC.time.date` / `week_us` / `month` / `quarter` / `year` (standard calendar
|
|
66
|
+
* only); throws for any other granularity, e.g. fiscal variants.
|
|
67
|
+
* @param periodStart - any date within the first selected period
|
|
68
|
+
* @param periodEnd - any date within the last selected period
|
|
69
|
+
* @param weekStart - which day a week starts on; only relevant for `GDC.time.week_us`. Defaults to "Sunday".
|
|
70
|
+
* @alpha
|
|
71
|
+
*/
|
|
72
|
+
export function resolvePeriodBoundaries(granularity, periodStart, periodEnd, weekStart = "Sunday") {
|
|
73
|
+
assertStaticPeriodGranularity(granularity);
|
|
74
|
+
const from = startOfPeriod(granularity, moment(periodStart, platformDateFormat), weekStart);
|
|
75
|
+
const to = endOfPeriod(granularity, moment(periodEnd, platformDateFormat), weekStart);
|
|
76
|
+
return {
|
|
77
|
+
from: from.format(platformDateFormat),
|
|
78
|
+
to: to.format(platformDateFormat),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type IAbsoluteDateFilterPreset, type IAllTimeDateFilterOption, type IRelativeDateFilterPreset } from "@gooddata/sdk-model";
|
|
2
|
-
import { type IUiAbsoluteDateFilterForm } from "
|
|
2
|
+
import { type IUiAbsoluteDateFilterForm } from "../interfaces/index.js";
|
|
3
3
|
export declare const allTimeFilter: IAllTimeDateFilterOption;
|
|
4
4
|
export declare const absoluteFormFilter: IUiAbsoluteDateFilterForm;
|
|
5
5
|
export declare const absoluteFormFilterOneDay: IUiAbsoluteDateFilterForm;
|
|
@@ -12,4 +12,4 @@ export declare const absoluteFormFilterWithSecondsWithinMoreDays: IUiAbsoluteDat
|
|
|
12
12
|
export declare const absoluteFormFilterWithTimeWithinMoreDays: IUiAbsoluteDateFilterForm;
|
|
13
13
|
export declare const absolutePresetFilter: IAbsoluteDateFilterPreset;
|
|
14
14
|
export declare const relativePresetFilter: IRelativeDateFilterPreset;
|
|
15
|
-
//# sourceMappingURL=
|
|
15
|
+
//# sourceMappingURL=Translations.test.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Translations.test.helpers.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/utils/Translations.test.helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EACjC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,eAAO,MAAM,aAAa,EAAE,wBAK3B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,yBAOhC,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,yBAOtC,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,yBAOxC,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,yBAOhD,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,yBAOnD,CAAC;AAEF,eAAO,MAAM,+CAA+C,EAAE,yBAO7D,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,yBAOnD,CAAC;AAEF,eAAO,MAAM,2CAA2C,EAAE,yBAOzD,CAAC;AAEF,eAAO,MAAM,wCAAwC,EAAE,yBAOtD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,yBAOlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,yBAQlC,CAAC"}
|
|
@@ -26,4 +26,4 @@ export declare class MeasureValueFilterFragment {
|
|
|
26
26
|
clickTreatNullAsCheckbox: () => this;
|
|
27
27
|
getTreatNullAsCheckbox: () => HTMLInputElement | null;
|
|
28
28
|
}
|
|
29
|
-
//# sourceMappingURL=MeasureValueFilterDropdown.d.ts.map
|
|
29
|
+
//# sourceMappingURL=MeasureValueFilterDropdown.test.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MeasureValueFilterDropdown.test.utils.d.ts","sourceRoot":"","sources":["../../src/MeasureValueFilter/MeasureValueFilterDropdown.test.utils.tsx"],"names":[],"mappings":"AASA,qBAAa,0BAA0B;IAC5B,mBAAmB,2BAC+B;IAElD,0BAA0B,4BAAmE;IAE7F,yBAAyB,8BAAgE;IAEzF,sBAAsB,gBAAsC;IAE5D,cAAc,2BAAiD;IAE/D,UAAU,aAGf;IAEK,WAAW,aAGhB;IAEK,oBAAoB,2BAKzB;IAEK,WAAW,uCACsD;IAEjE,kBAAkB,4CACoE;IAEtF,cAAc,6BAGnB;IAEK,uBAAuB,yBACqC;IAE5D,kBAAkB,0BAGvB;IAEK,iBAAiB,yBACqC;IAEtD,YAAY,0BAGjB;IAEK,eAAe,yBAAkF;IAEjG,UAAU,0BAGf;IAEK,qBAAqB,gBAA+D;IAEpF,2BAA2B,gBACqC;IAEhE,wBAAwB,6BAAoE;IAE5F,gBAAgB,4BAAuD;IAEvE,iBAAiB,uBAA0D;IAE3E,2BAA2B,uCAC+B;IAE1D,UAAU,2BAAwF;IAElG,wBAAwB,aAM7B;IAEK,sBAAsB,gCACsE;CACtG"}
|
|
@@ -14,4 +14,4 @@ export declare const defaultFilter: IRankingFilter;
|
|
|
14
14
|
export declare const filterWithRichSetting: IRankingFilter;
|
|
15
15
|
export declare const measureItems: IMeasureDropdownItem[];
|
|
16
16
|
export declare const attributeItems: IAttributeDropdownItem[];
|
|
17
|
-
//# sourceMappingURL=
|
|
17
|
+
//# sourceMappingURL=RankingFilter.test.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RankingFilter.test.helpers.d.ts","sourceRoot":"","sources":["../../src/RankingFilter/RankingFilter.test.helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAA6B,MAAM,qBAAqB,CAAC;AAErF,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEpF,eAAO,MAAM,aAAa,sCAAuB,CAAC;AAClD,eAAO,MAAM,aAAa,6CAAsB,CAAC;AACjD,eAAO,MAAM,aAAa,0CAA2B,CAAC;AACtD,eAAO,MAAM,aAAa,0CAA2B,CAAC;AAEtD,eAAO,MAAM,WAAW,0CAAyB,CAAC;AAClD,eAAO,MAAM,WAAW,0CAAyB,CAAC;AAClD,eAAO,MAAM,WAAW,0CAAyB,CAAC;AAClD,eAAO,MAAM,WAAW,0CAAyB,CAAC;AAClD,eAAO,MAAM,WAAW,0CAAyB,CAAC;AAElD,eAAO,MAAM,QAAQ,0CAAsB,CAAC;AAE5C,eAAO,MAAM,aAAa,EAAE,cAM3B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,cAOnC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,oBAAoB,EAM9C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,sBAAsB,EAMlD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RankingFilterDropdown.test.utils.d.ts","sourceRoot":"","sources":["../../src/RankingFilter/RankingFilterDropdown.test.utils.tsx"],"names":[],"mappings":"AAiBA,qBAAa,6BAA6B;IAC/B,WAAW,sCAGhB;IAEK,UAAU,sCAGf;IAEK,cAAc,2BAAiD;IAE/D,qBAAqB,gBAA+D;IAEpF,sBAAsB,gBAAmE;IAEzF,yBAAyB,uBAA0D;IAEnF,oBAAoB,sCAKzB;IAEK,WAAW,mDAGhB;IAEK,WAAW,eAA+E;IAE1F,gBAAgB,uBAA2D;IAE3E,qBAAqB,4BAC+C;IAEpE,sBAAsB,gBAAmC;IAEzD,gBAAgB,mDAIrB;IAEK,QAAQ,mDAIb;IAEK,cAAc,mDAInB;IAEK,QAAQ,eAAkF;IAE1F,qBAAqB,gBAAkE;IAEvF,wBAAwB,uBAAyD;IAEjF,mBAAmB,sCAKxB;IAEK,cAAc,oCAEnB;IAEK,cAAc,mDAGnB;IAEK,UAAU,eAA8E;IAExF,yBAAyB,gBACsC;IAE/D,uBAAuB,gBAAoE;IAE3F,qBAAqB,sCAK1B;IAEK,mCAAmC,4BAExC;IAEK,gBAAgB,oCAErB;IAEK,gBAAgB,mDAGrB;IAEK,wBAAwB,sCAG7B;IAEK,0BAA0B,uBAA2D;IAErF,YAAY,eAAgE;IAE5E,UAAU,eAAmE;CACvF"}
|
package/esm/index.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export { type IDateFilterOptionInfo, findDateFilterOptionByValue, flattenDateFil
|
|
|
22
22
|
export { type CalendarTabType, type IFiscalTabsConfig, type IUiRelativeDateFilterFormLike, getFiscalTabsConfig, getDefaultCalendarTab, getFilteredPresets, getFilteredGranularities, hasFiscalPresets, hasStandardPresets, filterStandardPresets, filterFiscalPresets, filterStandardGranularities, filterFiscalGranularities, getTabForPreset, ensureCompatibleGranularity, STANDARD_GRANULARITIES_WITH_FISCAL_EQUIVALENT, } from "./DateFilter/utils/presetFilterUtils.js";
|
|
23
23
|
export { isFiscalGranularity } from "@gooddata/sdk-model";
|
|
24
24
|
export type { IFilterConfigurationProps } from "./DateFilter/DateFilterBody/types.js";
|
|
25
|
+
export { PeriodRangePicker } from "./DateFilter/PeriodRangePicker/PeriodRangePicker.js";
|
|
26
|
+
export type { IPeriodRange, IPeriodRangePickerProps, PeriodRangePickerGranularity, } from "./DateFilter/PeriodRangePicker/types.js";
|
|
25
27
|
export { type IMeasureValueFilterProps, type IMeasureValueFilterState, MeasureValueFilter, } from "./MeasureValueFilter/MeasureValueFilter.js";
|
|
26
28
|
export { type IMeasureValueFilterDropdownProps, MeasureValueFilterDropdown, } from "./MeasureValueFilter/MeasureValueFilterDropdown.js";
|
|
27
29
|
export type { IMeasureValueFilterDropdownButtonProps } from "./MeasureValueFilter/MeasureValueFilterButton.js";
|