@gooddata/sdk-ui-filters 11.68.0-alpha.8 → 11.68.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/NOTICE +17 -17
- package/esm/AttributeFilter/AttributeFilterProviders.d.ts.map +1 -1
- package/esm/AttributeFilter/AttributeFilterProviders.js +2 -2
- package/esm/AttributeFilter/hooks/useAttributeFilterController.d.ts.map +1 -1
- package/esm/AttributeFilter/hooks/useAttributeFilterController.js +7 -8
- package/esm/AttributeFilter/hooks/useElementsFilterController.js +3 -3
- package/esm/AttributeFilter/hooks/useFilterDetailRequestHandler.d.ts +4 -3
- package/esm/AttributeFilter/hooks/useFilterDetailRequestHandler.d.ts.map +1 -1
- package/esm/AttributeFilter/hooks/useFilterDetailRequestHandler.js +9 -4
- package/esm/AttributeFilterHandler/internal/redux/elements/elementsSaga.d.ts.map +1 -1
- package/esm/AttributeFilterHandler/internal/redux/elements/elementsSaga.js +2 -2
- package/esm/AttributeFilterHandler/internal/redux/elements/formatElementTitles.d.ts +9 -0
- package/esm/AttributeFilterHandler/internal/redux/elements/formatElementTitles.d.ts.map +1 -1
- package/esm/AttributeFilterHandler/internal/redux/elements/formatElementTitles.js +16 -0
- package/esm/AttributeFilterHandler/internal/redux/filter/filterSelectors.d.ts.map +1 -1
- package/esm/AttributeFilterHandler/internal/redux/filter/filterSelectors.js +4 -3
- package/esm/AttributeFilterHandler/internal/redux/loadNextElementsPage/loadNextElementsPageSelectors.d.ts.map +1 -1
- package/esm/AttributeFilterHandler/internal/redux/loadNextElementsPage/loadNextElementsPageSelectors.js +2 -3
- package/esm/DateFilter/DynamicSelect/utils.d.ts.map +1 -1
- package/esm/DateFilter/DynamicSelect/utils.js +3 -3
- package/esm/DateFilter/GranularityTabs.d.ts.map +1 -1
- package/esm/DateFilter/GranularityTabs.js +2 -2
- package/esm/DateFilter/Select/ScrollableSelectMenu.d.ts.map +1 -1
- package/esm/DateFilter/Select/ScrollableSelectMenu.js +2 -2
- package/esm/DateFilter/utils/DateFilterConfigConversions.d.ts.map +1 -1
- package/esm/DateFilter/utils/DateFilterConfigConversions.js +3 -2
- package/package.json +12 -12
package/NOTICE
CHANGED
|
@@ -3,11 +3,11 @@ Copyright (c) 2017-2026 GoodData Corporation
|
|
|
3
3
|
This product includes a number of subcomponents with separate copyright notices and license terms below. Your use of these subcomponents is subject to the terms and conditions of the subcomponent's license. This GoodData project does not necessarily use all the open source software referred to below and may also only use portions of a given package. With respect to the open source software listed in this document, if you (i) have any questions, (ii) wish to receive source code for packages under licenses that require their source code to be made available (such as the GNU Lesser Public License), or (iii) discover any errors or omissions in the licensing information provided, please contact us at legal@gooddata.com. Please identify in source code requests: (i) the packages for which you are requesting corresponding source, (ii) the GoodData product (including any available version) with which the package was provided; and (iii) an email address (if available) or postal address at which GoodData may contact you.
|
|
4
4
|
|
|
5
5
|
--------------------------------------------------------------------------------
|
|
6
|
-
Attribution Notice for @gooddata/sdk-ui-filters (11.68.0
|
|
6
|
+
Attribution Notice for @gooddata/sdk-ui-filters (11.68.0)
|
|
7
7
|
Package License: MIT
|
|
8
8
|
Own License File: LICENSE
|
|
9
|
-
Date generated: 2026-11-
|
|
10
|
-
Revision ID:
|
|
9
|
+
Date generated: 2026-11-12
|
|
10
|
+
Revision ID: c56f4e258b22c698a7b4595c97b12a469452f25a
|
|
11
11
|
|
|
12
12
|
This notice lists the components that @gooddata/sdk-ui-filters depends on, directly or through other
|
|
13
13
|
packages, with the license and copyright information reported for each of them.
|
|
@@ -19,13 +19,13 @@ change those terms.
|
|
|
19
19
|
Dependencies
|
|
20
20
|
|
|
21
21
|
Local GoodData SDK components
|
|
22
|
-
- @gooddata/sdk-backend-spi (11.68.0
|
|
23
|
-
- @gooddata/sdk-code-schemas (11.68.0
|
|
24
|
-
- @gooddata/sdk-model (11.68.0
|
|
25
|
-
- @gooddata/sdk-ui (11.68.0
|
|
26
|
-
- @gooddata/sdk-ui-kit (11.68.0
|
|
27
|
-
- @gooddata/sdk-ui-theme-provider (11.68.0
|
|
28
|
-
- @gooddata/util (11.68.0
|
|
22
|
+
- @gooddata/sdk-backend-spi (11.68.0) [MIT] — Direct
|
|
23
|
+
- @gooddata/sdk-code-schemas (11.68.0) [MIT] — Transitive
|
|
24
|
+
- @gooddata/sdk-model (11.68.0) [MIT] — Direct
|
|
25
|
+
- @gooddata/sdk-ui (11.68.0) [MIT] — Direct
|
|
26
|
+
- @gooddata/sdk-ui-kit (11.68.0) [MIT] — Direct
|
|
27
|
+
- @gooddata/sdk-ui-theme-provider (11.68.0) [MIT] — Transitive
|
|
28
|
+
- @gooddata/util (11.68.0) [MIT] — Direct
|
|
29
29
|
|
|
30
30
|
External components
|
|
31
31
|
- @aaronhayes/react-use-hubspot-form (2.1.2) [MIT] — Transitive
|
|
@@ -327,7 +327,7 @@ Local GoodData SDK components
|
|
|
327
327
|
================================================================================
|
|
328
328
|
|
|
329
329
|
--------------------------------------------------------------------------------
|
|
330
|
-
Package Title: @gooddata/sdk-backend-spi (11.68.0
|
|
330
|
+
Package Title: @gooddata/sdk-backend-spi (11.68.0)
|
|
331
331
|
Package Source: Local workspace
|
|
332
332
|
Package Depth: Direct
|
|
333
333
|
--------------------------------------------------------------------------------
|
|
@@ -345,7 +345,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
345
345
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
346
346
|
|
|
347
347
|
--------------------------------------------------------------------------------
|
|
348
|
-
Package Title: @gooddata/sdk-code-schemas (11.68.0
|
|
348
|
+
Package Title: @gooddata/sdk-code-schemas (11.68.0)
|
|
349
349
|
Package Source: Local workspace
|
|
350
350
|
Package Depth: Transitive
|
|
351
351
|
--------------------------------------------------------------------------------
|
|
@@ -375,7 +375,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
375
375
|
SOFTWARE.
|
|
376
376
|
|
|
377
377
|
--------------------------------------------------------------------------------
|
|
378
|
-
Package Title: @gooddata/sdk-model (11.68.0
|
|
378
|
+
Package Title: @gooddata/sdk-model (11.68.0)
|
|
379
379
|
Package Source: Local workspace
|
|
380
380
|
Package Depth: Direct
|
|
381
381
|
--------------------------------------------------------------------------------
|
|
@@ -393,7 +393,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
393
393
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
394
394
|
|
|
395
395
|
--------------------------------------------------------------------------------
|
|
396
|
-
Package Title: @gooddata/sdk-ui (11.68.0
|
|
396
|
+
Package Title: @gooddata/sdk-ui (11.68.0)
|
|
397
397
|
Package Source: Local workspace
|
|
398
398
|
Package Depth: Direct
|
|
399
399
|
--------------------------------------------------------------------------------
|
|
@@ -411,7 +411,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
411
411
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
412
412
|
|
|
413
413
|
--------------------------------------------------------------------------------
|
|
414
|
-
Package Title: @gooddata/sdk-ui-kit (11.68.0
|
|
414
|
+
Package Title: @gooddata/sdk-ui-kit (11.68.0)
|
|
415
415
|
Package Source: Local workspace
|
|
416
416
|
Package Depth: Direct
|
|
417
417
|
--------------------------------------------------------------------------------
|
|
@@ -429,7 +429,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
429
429
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
430
430
|
|
|
431
431
|
--------------------------------------------------------------------------------
|
|
432
|
-
Package Title: @gooddata/sdk-ui-theme-provider (11.68.0
|
|
432
|
+
Package Title: @gooddata/sdk-ui-theme-provider (11.68.0)
|
|
433
433
|
Package Source: Local workspace
|
|
434
434
|
Package Depth: Transitive
|
|
435
435
|
--------------------------------------------------------------------------------
|
|
@@ -447,7 +447,7 @@ The above copyright notice and this permission notice shall be included in all c
|
|
|
447
447
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
448
448
|
|
|
449
449
|
--------------------------------------------------------------------------------
|
|
450
|
-
Package Title: @gooddata/util (11.68.0
|
|
450
|
+
Package Title: @gooddata/util (11.68.0)
|
|
451
451
|
Package Source: Local workspace
|
|
452
452
|
Package Depth: Direct
|
|
453
453
|
--------------------------------------------------------------------------------
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttributeFilterProviders.d.ts","sourceRoot":"","sources":["../../src/AttributeFilter/AttributeFilterProviders.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,yBAAyB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"AttributeFilterProviders.d.ts","sourceRoot":"","sources":["../../src/AttributeFilter/AttributeFilterProviders.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE5D;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,yBAAyB,GAAG;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,2CA8HlG"}
|
|
@@ -7,7 +7,7 @@ import { AttributeFilterContextProvider } from "./Context/AttributeFilterContext
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export function AttributeFilterProviders(props) {
|
|
10
|
-
const { resetOnParentFilterChange = true, children, locale, backend, workspace, title, filter, workingFilter, displayAsLabel, connectToPlaceholder, parentFilters, dependentDateFilters, parentFilterOverAttribute, validateElementsBy, hiddenElements, staticElements, fullscreenOnMobile = false, selectionMode = "multi", selectFirst = false, disabled, customIcon, withoutApply = false, overlayPositionType, alignPoints, menuConfig, hideTooltips, showHeader, onApply, onChange, onSelect, onError, onInitLoadingChanged, ErrorComponent, LoadingComponent, DropdownButtonComponent, DropdownBodyComponent, DropdownActionsComponent, ElementsSearchBarComponent, ElementsSelectComponent, ElementsSelectItemComponent, ElementsSelectErrorComponent, ElementsSelectLoadingComponent, ElementsSelectActionsComponent, EmptyResultComponent, StatusBarComponent, FilterMenuComponent, TextFilterBodyComponent, enableImmediateAttributeFilterDisplayAsLabelMigration = false, } = props;
|
|
10
|
+
const { resetOnParentFilterChange = true, children, locale, backend, workspace, title, filter, workingFilter, displayAsLabel, connectToPlaceholder, parentFilters, dependentDateFilters, parentFilterOverAttribute, validateElementsBy, hiddenElements, staticElements, fullscreenOnMobile = false, selectionMode = "multi", selectFirst = false, disabled, customIcon, withoutApply = false, separators, overlayPositionType, alignPoints, menuConfig, hideTooltips, showHeader, onApply, onChange, onSelect, onError, onInitLoadingChanged, ErrorComponent, LoadingComponent, DropdownButtonComponent, DropdownBodyComponent, DropdownActionsComponent, ElementsSearchBarComponent, ElementsSelectComponent, ElementsSelectItemComponent, ElementsSelectErrorComponent, ElementsSelectLoadingComponent, ElementsSelectActionsComponent, EmptyResultComponent, StatusBarComponent, FilterMenuComponent, TextFilterBodyComponent, enableImmediateAttributeFilterDisplayAsLabelMigration = false, } = props;
|
|
11
11
|
const DefaultComponents = getAttributeFilterDefaultComponents(props);
|
|
12
|
-
return (_jsx(IntlWrapper, { locale: locale, children: _jsx(AttributeFilterComponentsProvider, { ErrorComponent: ErrorComponent ?? DefaultComponents.ErrorComponent, LoadingComponent: LoadingComponent ?? DefaultComponents.LoadingComponent, DropdownButtonComponent: DropdownButtonComponent ?? DefaultComponents.DropdownButtonComponent, DropdownBodyComponent: DropdownBodyComponent ?? DefaultComponents.DropdownBodyComponent, DropdownActionsComponent: DropdownActionsComponent ?? DefaultComponents.DropdownActionsComponent, ElementsSearchBarComponent: ElementsSearchBarComponent ?? DefaultComponents.ElementsSearchBarComponent, ElementsSelectComponent: ElementsSelectComponent ?? DefaultComponents.ElementsSelectComponent, ElementsSelectItemComponent: ElementsSelectItemComponent ?? DefaultComponents.ElementsSelectItemComponent, ElementsSelectErrorComponent: ElementsSelectErrorComponent ?? DefaultComponents.ElementsSelectErrorComponent, ElementsSelectLoadingComponent: ElementsSelectLoadingComponent ?? DefaultComponents.ElementsSelectLoadingComponent, ElementsSelectActionsComponent: ElementsSelectActionsComponent ?? DefaultComponents.ElementsSelectActionsComponent, EmptyResultComponent: EmptyResultComponent ?? DefaultComponents.EmptyResultComponent, StatusBarComponent: StatusBarComponent ?? DefaultComponents.StatusBarComponent, FilterMenuComponent: FilterMenuComponent ?? DefaultComponents.FilterMenuComponent, TextFilterBodyComponent: TextFilterBodyComponent ?? DefaultComponents.TextFilterBodyComponent, children: _jsx(AttributeFilterContextProvider, { backend: backend, workspace: workspace, title: title, filter: filter, workingFilter: workingFilter, displayAsLabel: displayAsLabel, connectToPlaceholder: connectToPlaceholder, resetOnParentFilterChange: resetOnParentFilterChange, parentFilters: parentFilters, dependentDateFilters: dependentDateFilters, parentFilterOverAttribute: parentFilterOverAttribute, validateElementsBy: validateElementsBy, onApply: onApply, onChange: onChange ?? onSelect, onError: onError, onInitLoadingChanged: onInitLoadingChanged, hiddenElements: hiddenElements, staticElements: staticElements, fullscreenOnMobile: fullscreenOnMobile, selectionMode: selectionMode, selectFirst: selectFirst, disabled: disabled, customIcon: customIcon, enableImmediateAttributeFilterDisplayAsLabelMigration: enableImmediateAttributeFilterDisplayAsLabelMigration, withoutApply: withoutApply, overlayPositionType: overlayPositionType, alignPoints: alignPoints, menuConfig: menuConfig, hideTooltips: hideTooltips, showHeader: showHeader, children: children }) }) }));
|
|
12
|
+
return (_jsx(IntlWrapper, { locale: locale, children: _jsx(AttributeFilterComponentsProvider, { ErrorComponent: ErrorComponent ?? DefaultComponents.ErrorComponent, LoadingComponent: LoadingComponent ?? DefaultComponents.LoadingComponent, DropdownButtonComponent: DropdownButtonComponent ?? DefaultComponents.DropdownButtonComponent, DropdownBodyComponent: DropdownBodyComponent ?? DefaultComponents.DropdownBodyComponent, DropdownActionsComponent: DropdownActionsComponent ?? DefaultComponents.DropdownActionsComponent, ElementsSearchBarComponent: ElementsSearchBarComponent ?? DefaultComponents.ElementsSearchBarComponent, ElementsSelectComponent: ElementsSelectComponent ?? DefaultComponents.ElementsSelectComponent, ElementsSelectItemComponent: ElementsSelectItemComponent ?? DefaultComponents.ElementsSelectItemComponent, ElementsSelectErrorComponent: ElementsSelectErrorComponent ?? DefaultComponents.ElementsSelectErrorComponent, ElementsSelectLoadingComponent: ElementsSelectLoadingComponent ?? DefaultComponents.ElementsSelectLoadingComponent, ElementsSelectActionsComponent: ElementsSelectActionsComponent ?? DefaultComponents.ElementsSelectActionsComponent, EmptyResultComponent: EmptyResultComponent ?? DefaultComponents.EmptyResultComponent, StatusBarComponent: StatusBarComponent ?? DefaultComponents.StatusBarComponent, FilterMenuComponent: FilterMenuComponent ?? DefaultComponents.FilterMenuComponent, TextFilterBodyComponent: TextFilterBodyComponent ?? DefaultComponents.TextFilterBodyComponent, children: _jsx(AttributeFilterContextProvider, { backend: backend, workspace: workspace, title: title, filter: filter, workingFilter: workingFilter, displayAsLabel: displayAsLabel, connectToPlaceholder: connectToPlaceholder, resetOnParentFilterChange: resetOnParentFilterChange, parentFilters: parentFilters, dependentDateFilters: dependentDateFilters, parentFilterOverAttribute: parentFilterOverAttribute, validateElementsBy: validateElementsBy, onApply: onApply, onChange: onChange ?? onSelect, onError: onError, onInitLoadingChanged: onInitLoadingChanged, hiddenElements: hiddenElements, staticElements: staticElements, fullscreenOnMobile: fullscreenOnMobile, selectionMode: selectionMode, selectFirst: selectFirst, disabled: disabled, customIcon: customIcon, enableImmediateAttributeFilterDisplayAsLabelMigration: enableImmediateAttributeFilterDisplayAsLabelMigration, withoutApply: withoutApply, separators: separators, overlayPositionType: overlayPositionType, alignPoints: alignPoints, menuConfig: menuConfig, hideTooltips: hideTooltips, showHeader: showHeader, children: children }) }) }));
|
|
13
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAttributeFilterController.d.ts","sourceRoot":"","sources":["../../../src/AttributeFilter/hooks/useAttributeFilterController.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useAttributeFilterController.d.ts","sourceRoot":"","sources":["../../../src/AttributeFilter/hooks/useAttributeFilterController.ts"],"names":[],"mappings":"AA8BA,OAAO,EACH,KAAK,yBAAyB,EAGjC,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAS5D;;;GAGG;AACH,MAAM,MAAM,kCAAkC,GAAG,IAAI,CACjD,yBAAyB,EACzB,oBAAoB,GAAG,QAAQ,GAAG,OAAO,CAC5C,GAAG;IACA,eAAe,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC,CAAC;AAMF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B,UAC9B,kCAAkC,KAC1C,yBAonBF,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import noop from "lodash-es/noop.js";
|
|
4
3
|
import { invariant } from "ts-invariant";
|
|
5
4
|
import { areObjRefsEqual, filterLocalIdentifier, filterObjRef, isArbitraryAttributeFilter, isMatchAttributeFilter, isNegativeFilter, } from "@gooddata/sdk-model";
|
|
6
5
|
import { useBackendStrict, useWorkspaceStrict } from "@gooddata/sdk-ui";
|
|
@@ -105,7 +104,7 @@ export const useAttributeFilterController = (props) => {
|
|
|
105
104
|
: (onChange ?? NOOP_ON_CHANGE);
|
|
106
105
|
const effectiveOnError = isTextSelectionType ? undefined : onError;
|
|
107
106
|
const effectiveOnInitLoadingChanged = isTextSelectionType ? undefined : onInitLoadingChanged;
|
|
108
|
-
const filterDetailRequestHandler = useFilterDetailRequestHandler(backend, workspace);
|
|
107
|
+
const filterDetailRequestHandler = useFilterDetailRequestHandler(backend, workspace, separators);
|
|
109
108
|
const limitingAttributeFilters = useResolveParentFiltersInput(parentFilters, parentFilterOverAttribute, supportsSettingConnectingAttributes);
|
|
110
109
|
const limitingDateFilters = useResolveDependentDateFiltersInput(dependentDateFilters);
|
|
111
110
|
const availableInternalSelectionTypes = mapAvailableSelectionTypesToInternal(availableSelectionTypes);
|
|
@@ -438,7 +437,7 @@ export const useAttributeFilterController = (props) => {
|
|
|
438
437
|
onReset: onResetTextMode,
|
|
439
438
|
filterDetailRequestHandler,
|
|
440
439
|
setDisplayForm,
|
|
441
|
-
resetForModeSwitch: textFilterController.resetForModeSwitch ??
|
|
440
|
+
resetForModeSwitch: textFilterController.resetForModeSwitch ?? (() => { }),
|
|
442
441
|
onSelectionTypeChange: availableInternalSelectionTypes.length > 1 ? onSelectionTypeChangeForControllers : undefined,
|
|
443
442
|
currentSelectionType: selectionType,
|
|
444
443
|
availableInternalSelectionTypes,
|
|
@@ -459,13 +458,13 @@ export const useAttributeFilterController = (props) => {
|
|
|
459
458
|
searchString: elementsFilterController.searchString,
|
|
460
459
|
isFilteredByParentFilters: false,
|
|
461
460
|
parentFilterAttributes: [],
|
|
462
|
-
onLoadNextElementsPage:
|
|
461
|
+
onLoadNextElementsPage: () => { },
|
|
463
462
|
// Expose onSearch in text mode for autocomplete lazy loading
|
|
464
463
|
onSearch: elementsFilterController.onSearch,
|
|
465
|
-
onSelect:
|
|
466
|
-
onOpen:
|
|
467
|
-
onShowFilteredElements:
|
|
468
|
-
onClearIrrelevantSelection:
|
|
464
|
+
onSelect: () => { },
|
|
465
|
+
onOpen: () => { },
|
|
466
|
+
onShowFilteredElements: () => { },
|
|
467
|
+
onClearIrrelevantSelection: () => { },
|
|
469
468
|
};
|
|
470
469
|
}
|
|
471
470
|
return {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
2
|
// oxlint-disable @typescript-eslint/require-array-sort-compare
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { difference, differenceBy } from "lodash-es";
|
|
5
5
|
import { invariant } from "ts-invariant";
|
|
6
6
|
import { areObjRefsEqual, filterAttributeElements, filterLocalIdentifier, filterObjRef, isArbitraryAttributeFilter, isAttributeElementsByRef, isAttributeElementsByValue, isAttributeFilterWithSelection, isMatchAttributeFilter, isNegativeAttributeFilter, isPositiveAttributeFilter, newNegativeAttributeFilter, newPositiveAttributeFilter, objRefToString, } from "@gooddata/sdk-model";
|
|
7
7
|
import { UnexpectedSdkError } from "@gooddata/sdk-ui";
|
|
8
|
-
import { _isEmpty, _isEqual } from "@gooddata/util";
|
|
8
|
+
import { _debounce, _isEmpty, _isEqual } from "@gooddata/util";
|
|
9
9
|
import { isValidSingleSelectionFilter } from "../utils.js";
|
|
10
10
|
import { DISPLAY_FORM_CHANGED_CORRELATION, IRRELEVANT_SELECTION, MAX_SELECTION_SIZE, PARENT_FILTERS_CORRELATION, RESET_CORRELATION, SEARCH_CORRELATION, SHOW_FILTERED_ELEMENTS_CORRELATION, } from "./constants.js";
|
|
11
11
|
import { useAttributeFilterControllerData } from "./useAttributeFilterControllerData.js";
|
|
@@ -495,7 +495,7 @@ function useCallbacks(handler, props, supportsShowingFilteredElements, supportsK
|
|
|
495
495
|
}, [handler, selectionMode, onSelectionChange, onChangeInputCallback, withoutApply]);
|
|
496
496
|
// Rule is not working with debounce
|
|
497
497
|
// oxlint-disable-next-line react-hooks/exhaustive-deps
|
|
498
|
-
const onSearch = useCallback(
|
|
498
|
+
const onSearch = useCallback(_debounce((search) => {
|
|
499
499
|
if (handler.getSearch() !== search) {
|
|
500
500
|
handler.setSearch(search);
|
|
501
501
|
handler.loadInitialElementsPage(SEARCH_CORRELATION);
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { type IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { type IAttributeElement, type ObjRef } from "@gooddata/sdk-model";
|
|
2
|
+
import { type IAttributeElement, type ISeparators, type ObjRef } from "@gooddata/sdk-model";
|
|
3
3
|
/**
|
|
4
4
|
* Creates a request handler for loading filter details (sample elements + total count).
|
|
5
|
-
* Used by AttributeFilterDetailsBubble for both elements and text filter modes.
|
|
5
|
+
* Used by AttributeFilterDetailsBubble for both elements and text filter modes. Values of a numeric
|
|
6
|
+
* computed attribute get a formatted title by the number format of the query and the separators.
|
|
6
7
|
*
|
|
7
8
|
* @internal
|
|
8
9
|
*/
|
|
9
|
-
export declare function useFilterDetailRequestHandler(backend: IAnalyticalBackend, workspace: string): (labelRef: ObjRef) => Promise<{
|
|
10
|
+
export declare function useFilterDetailRequestHandler(backend: IAnalyticalBackend, workspace: string, separators?: ISeparators): (labelRef: ObjRef) => Promise<{
|
|
10
11
|
elements: IAttributeElement[];
|
|
11
12
|
totalCount: number;
|
|
12
13
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFilterDetailRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/AttributeFilter/hooks/useFilterDetailRequestHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"useFilterDetailRequestHandler.d.ts","sourceRoot":"","sources":["../../../src/AttributeFilter/hooks/useFilterDetailRequestHandler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,KAAK,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM5F;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CACzC,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,MAAM,EACjB,UAAU,CAAC,EAAE,WAAW,GACzB,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAiBtF"}
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
// (C) 2025-2026 GoodData Corporation
|
|
2
2
|
import { useCallback } from "react";
|
|
3
|
+
import { formatElementTitles } from "../../AttributeFilterHandler/internal/redux/elements/formatElementTitles.js";
|
|
3
4
|
const FILTER_DETAILS_ELEMENT_LIMIT = 5;
|
|
4
5
|
/**
|
|
5
6
|
* Creates a request handler for loading filter details (sample elements + total count).
|
|
6
|
-
* Used by AttributeFilterDetailsBubble for both elements and text filter modes.
|
|
7
|
+
* Used by AttributeFilterDetailsBubble for both elements and text filter modes. Values of a numeric
|
|
8
|
+
* computed attribute get a formatted title by the number format of the query and the separators.
|
|
7
9
|
*
|
|
8
10
|
* @internal
|
|
9
11
|
*/
|
|
10
|
-
export function useFilterDetailRequestHandler(backend, workspace) {
|
|
12
|
+
export function useFilterDetailRequestHandler(backend, workspace, separators) {
|
|
11
13
|
return useCallback(async (labelRef) => {
|
|
12
14
|
const result = await backend
|
|
13
15
|
.workspace(workspace)
|
|
@@ -16,6 +18,9 @@ export function useFilterDetailRequestHandler(backend, workspace) {
|
|
|
16
18
|
.forDisplayForm(labelRef)
|
|
17
19
|
.withLimit(FILTER_DETAILS_ELEMENT_LIMIT)
|
|
18
20
|
.query();
|
|
19
|
-
return {
|
|
20
|
-
|
|
21
|
+
return {
|
|
22
|
+
elements: formatElementTitles(result.items, result.numberFormat, separators),
|
|
23
|
+
totalCount: result.totalCount,
|
|
24
|
+
};
|
|
25
|
+
}, [backend, workspace, separators]);
|
|
21
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elementsSaga.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/elements/elementsSaga.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"elementsSaga.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/elements/elementsSaga.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAInE,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAYvG;;GAEG;AACH,wBAAiB,YAAY,CACzB,OAAO,EAAE,oBAAoB,GAAG,iBAAiB,EACjD,OAAO,CAAC,EAAE,MAAM,GACjB,YAAY,CAAC,mBAAmB,CAAC,CA6DnC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// (C) 2022-2026 GoodData Corporation
|
|
2
|
-
import { omit } from "lodash-es";
|
|
3
2
|
import { call, select } from "redux-saga/effects";
|
|
3
|
+
import { _omit } from "@gooddata/util";
|
|
4
4
|
import { getAttributeFilterContext } from "../common/sagas.js";
|
|
5
5
|
import { selectAttributeFilterDisplayAsLabel, selectAttributeFilterDisplayForm, selectHiddenElementsAsAttributeElements, } from "../filter/filterSelectors.js";
|
|
6
6
|
import { selectAttribute } from "../loadAttribute/loadAttributeSelectors.js";
|
|
@@ -33,7 +33,7 @@ export function* elementsSaga(options, cacheId) {
|
|
|
33
33
|
return {
|
|
34
34
|
elements: elementsQueryResult.items,
|
|
35
35
|
totalCount: elementsQueryResult.totalCount,
|
|
36
|
-
options:
|
|
36
|
+
options: _omit(allOptions, "signal"),
|
|
37
37
|
cacheId: elementsQueryResult.cacheId,
|
|
38
38
|
...(elementsQueryResult.numberFormat === undefined
|
|
39
39
|
? {}
|
|
@@ -10,4 +10,13 @@ import { type IAttributeElement, type ISeparators } from "@gooddata/sdk-model";
|
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export declare function formatElementTitlesMap(elements: Record<string, IAttributeElement>, numberFormat: string | undefined, separators: ISeparators | undefined): Record<string, IAttributeElement>;
|
|
13
|
+
/**
|
|
14
|
+
* Gives a list of elements a formatted title according to the number format of their values.
|
|
15
|
+
*
|
|
16
|
+
* @remarks
|
|
17
|
+
* Returns the very same list when nothing gets formatted.
|
|
18
|
+
*
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function formatElementTitles(elements: IAttributeElement[], numberFormat: string | undefined, separators: ISeparators | undefined): IAttributeElement[];
|
|
13
22
|
//# sourceMappingURL=formatElementTitles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatElementTitles.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/elements/formatElementTitles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAwB/E;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAC3C,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,UAAU,EAAE,WAAW,GAAG,SAAS,GACpC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAcnC"}
|
|
1
|
+
{"version":3,"file":"formatElementTitles.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/elements/formatElementTitles.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAwB/E;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CAClC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAC3C,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,UAAU,EAAE,WAAW,GAAG,SAAS,GACpC,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAcnC;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAC/B,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,UAAU,EAAE,WAAW,GAAG,SAAS,GACpC,iBAAiB,EAAE,CASrB"}
|
|
@@ -34,3 +34,19 @@ export function formatElementTitlesMap(elements, numberFormat, separators) {
|
|
|
34
34
|
? elements
|
|
35
35
|
: Object.fromEntries(formatted);
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Gives a list of elements a formatted title according to the number format of their values.
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Returns the very same list when nothing gets formatted.
|
|
42
|
+
*
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export function formatElementTitles(elements, numberFormat, separators) {
|
|
46
|
+
if (!numberFormat) {
|
|
47
|
+
return elements;
|
|
48
|
+
}
|
|
49
|
+
const formatter = createNumberFormatter(separators);
|
|
50
|
+
const formatted = elements.map((element) => formatElementTitle(element, numberFormat, formatter));
|
|
51
|
+
return formatted.every((element, index) => element === elements[index]) ? elements : formatted;
|
|
52
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/filter/filterSelectors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"filterSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/filter/filterSelectors.ts"],"names":[],"mappings":"AAQA,OAAO,EACH,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,MAAM,EAGd,MAAM,qBAAqB,CAAC;AAI7B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOzD;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,cAAc,CAAC,MAAM,GAAG,QAAQ,CAG/E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,MAAM,EAAE,CAGzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uCAAuC,EAAE,cAAc,CAAC,kBAAkB,CAKtF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gCAAgC,EAAE,cAAc,CAAC,MAAM,CAGnE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mCAAmC,EAAE,cAAc,CAAC,MAAM,GAAG,SAAS,CAGlF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oCAAoC,EAAE,cAAc,CAAC,MAAM,GAAG,SAAS,CAGnF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAAc,CAAC,gBAAgB,GAAG,SAAS,CAG7E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,6BAA6B,EAAE,cAAc,CAAC,kBAAkB,CAK5E,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,uDAAuD,EAAE,cAAc,CAAC,kBAAkB,CAelG,CAAC;AAEN;;;GAGG;AACH,eAAO,MAAM,gEAAgE,EAAE,cAAc,CAAC,kBAAkB,CAoB3G,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,wBAAwB,GAAG,wBAAwB,CAUjG,CAAC;AAEN;;GAEG;AACH,eAAO,MAAM,8BAA8B,EAAE,cAAc,CACvD,wBAAwB,GAAG,wBAAwB,CAoBtD,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
// (C) 2021-
|
|
1
|
+
// (C) 2021-2026 GoodData Corporation
|
|
2
2
|
// in current version of @reduxjs/toolkit esm export are not defined
|
|
3
3
|
// we need direct import from esm module otherwise import ar not node compatible
|
|
4
4
|
// https://github.com/reduxjs/redux-toolkit/issues/1960
|
|
5
5
|
import { createSelector } from "@reduxjs/toolkit";
|
|
6
|
-
import { difference, union
|
|
6
|
+
import { difference, union } from "lodash-es";
|
|
7
7
|
import { newNegativeAttributeFilter, newPositiveAttributeFilter, } from "@gooddata/sdk-model";
|
|
8
|
+
import { _uniq } from "@gooddata/util";
|
|
8
9
|
import { selectState } from "../common/selectors.js";
|
|
9
10
|
import { selectElements } from "../elements/elementsSelectors.js";
|
|
10
11
|
import { selectCommittedSelection, selectIsCommittedSelectionInverted, } from "../selection/selectionSelectors.js";
|
|
@@ -62,7 +63,7 @@ export const selectAttributeFilterElementsToDisplayWithHiddenElementsResolved =
|
|
|
62
63
|
const selectedTitles = elements
|
|
63
64
|
.filter((element) => updatedSelection.find((selectionItem) => selectionItem === element.uri))
|
|
64
65
|
.map((element) => element.title);
|
|
65
|
-
const uniqueTitles =
|
|
66
|
+
const uniqueTitles = _uniq(selectedTitles);
|
|
66
67
|
return elementsForm === "uris"
|
|
67
68
|
? { uris: uniqueTitles }
|
|
68
69
|
: { values: uniqueTitles };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadNextElementsPageSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/loadNextElementsPage/loadNextElementsPageSelectors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"loadNextElementsPageSelectors.d.ts","sourceRoot":"","sources":["../../../../../src/AttributeFilterHandler/internal/redux/loadNextElementsPage/loadNextElementsPageSelectors.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOzD;;GAEG;AACH,eAAO,MAAM,gCAAgC,EAAE,cAAc,CAAC,oBAAoB,CAGjF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,+BAA+B,EAAE,cAAc,CAAC,gBAAgB,GAAG,SAAS,CAGxF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iCAAiC,EAAE,cAAc,CAAC,oBAAoB,CAQlF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAAC,OAAO,CAOrD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kCAAkC,EAAE,cAAc,CAAC,OAAO,CAWtE,CAAC"}
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
// we need direct import from esm module otherwise import ar not node compatible
|
|
4
4
|
// https://github.com/reduxjs/redux-toolkit/issues/1960
|
|
5
5
|
import { createSelector } from "@reduxjs/toolkit";
|
|
6
|
-
import {
|
|
7
|
-
import { _isEqual } from "@gooddata/util";
|
|
6
|
+
import { _isEqual, _omit } from "@gooddata/util";
|
|
8
7
|
import { selectState } from "../common/selectors.js";
|
|
9
8
|
import { selectElementsTotalCountWithCurrentSettings, selectLastLoadedElementsOptions, selectLoadElementsOptions, } from "../elements/elementsSelectors.js";
|
|
10
9
|
/**
|
|
@@ -38,5 +37,5 @@ export const selectIsLoadElementsOptionsChanged = createSelector(selectLoadEleme
|
|
|
38
37
|
return !_isEqual(
|
|
39
38
|
// omit offset as it changes for each page
|
|
40
39
|
// omit options which can not be set externally by user and thus are not stored in state
|
|
41
|
-
|
|
40
|
+
_omit(loadOptions, "offset", "excludePrimaryLabel", "filterByPrimaryLabel"), _omit(lastLoadedOptions, "offset", "excludePrimaryLabel", "filterByPrimaryLabel"));
|
|
42
41
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DynamicSelect/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/DynamicSelect/utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAMjE,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE9E,eAAO,MAAM,MAAM,EAAE,qBAAyC,CAAC;AAC/D,eAAO,MAAM,MAAM,EAAE,qBAAyC,CAAC;AAC/D,eAAO,MAAM,IAAI,EAAE,qBAAuC,CAAC;AAC3D,eAAO,MAAM,GAAG,EAAE,qBAAuC,CAAC;AAC1D,eAAO,MAAM,OAAO,EAAE,qBAA0C,CAAC;AACjE,eAAO,MAAM,KAAK,EAAE,qBAAwC,CAAC;AAC7D,eAAO,MAAM,OAAO,EAAE,qBAA0C,CAAC;AACjE,eAAO,MAAM,IAAI,EAAE,qBAAuC,CAAC;AAC3D,eAAO,MAAM,YAAY,EAAE,qBAA+C,CAAC;AAC3E,eAAO,MAAM,cAAc,EAAE,qBAAiD,CAAC;AAC/E,eAAO,MAAM,WAAW,EAAE,qBAA8C,CAAC;AA4LzE,eAAO,MAAM,mCAAmC,YACnC,iBAAiB,EAAE,SACrB,MAAM,KACd,mBAAmB,GAAG,IAGxB,CAAC;AAEF,eAAO,MAAM,wCAAwC,YACxC,iBAAiB,EAAE,SACrB,MAAM,KACd,MAGF,CAAC;AAEF,eAAO,MAAM,mCAAmC,YACnC,iBAAiB,EAAE,SACrB,MAAM,KACd,mBAAmB,GAAG,IAExB,CAAC;AAEF,wBAAgB,0BAA0B,CACtC,KAAK,EAAE,MAAM,YAAK,EAClB,WAAW,EAAE,qBAAqB,YAAM,EACxC,IAAI,EAAE,kBAAkB,GACzB,iBAAiB,EAAE,CAkBrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
|
-
import {
|
|
2
|
+
import { _range } from "@gooddata/util";
|
|
3
3
|
import { messages } from "../../locales.js";
|
|
4
4
|
import { granularityIntlCodes } from "../constants/i18n.js";
|
|
5
5
|
import { getSelectableItems } from "../Select/utils.js";
|
|
@@ -81,8 +81,8 @@ const getOption = (offset, granularity, intl) => {
|
|
|
81
81
|
const getOptionsForOffsets = (offsets, granularity, intl) => offsets.map((offset) => getOption(offset, granularity, intl));
|
|
82
82
|
const getDefaultOptions = (granularity, intl) => {
|
|
83
83
|
const optionRange = granularityOffsetLimits[granularity];
|
|
84
|
-
const negativeOptions = getOptionsForOffsets(
|
|
85
|
-
const positiveOptions = getOptionsForOffsets(
|
|
84
|
+
const negativeOptions = getOptionsForOffsets(_range(-optionRange, 0), granularity, intl);
|
|
85
|
+
const positiveOptions = getOptionsForOffsets(_range(1, optionRange + 1), granularity, intl);
|
|
86
86
|
return [
|
|
87
87
|
...negativeOptions,
|
|
88
88
|
{ type: "separator" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GranularityTabs.d.ts","sourceRoot":"","sources":["../../src/DateFilter/GranularityTabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GranularityTabs.d.ts","sourceRoot":"","sources":["../../src/DateFilter/GranularityTabs.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,qBAAqB,EAA4B,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAerE,MAAM,WAAW,qBAAqB;IAClC,sBAAsB,EAAE,qBAAqB,EAAE,CAAC;IAChD,mBAAmB,EAAE,qBAAqB,CAAC;IAC3C,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,2BAA2B,EAAE,CAAC,WAAW,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC1E;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,EAC5B,sBAAsB,EACtB,mBAAmB,EACnB,mBAAmB,EACnB,2BAA2B,EAC3B,SAAS,EACT,aAAa,GAChB,EAAE,qBAAqB,2CAyBvB"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2019-2026 GoodData Corporation
|
|
3
|
-
import { sortBy } from "lodash-es";
|
|
4
3
|
import { FormattedMessage } from "react-intl";
|
|
5
4
|
import { getGranularityDescriptor } from "@gooddata/sdk-model";
|
|
5
|
+
import { _sortBy } from "@gooddata/util";
|
|
6
6
|
import { messages } from "../locales.js";
|
|
7
7
|
import { granularityIntlCodesFull } from "./constants/i18n.js";
|
|
8
8
|
import { Tab, TabsWrapper } from "./Tabs/Tabs.js";
|
|
9
9
|
// Canonical coarse→fine order from the registry (fiscal ranked next to its standard sibling).
|
|
10
|
-
const sortGranularities = (granularities) =>
|
|
10
|
+
const sortGranularities = (granularities) => _sortBy(granularities, (granularity) => getGranularityDescriptor(granularity)?.order ?? Number.MAX_SAFE_INTEGER);
|
|
11
11
|
export function GranularityTabs({ availableGranularities, selectedGranularity, accessibilityConfig, onSelectedGranularityChange, className, selectedTabId, }) {
|
|
12
12
|
return (_jsx(TabsWrapper, { className: className, children: sortGranularities(availableGranularities)
|
|
13
13
|
.map((granularity) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollableSelectMenu.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/Select/ScrollableSelectMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"ScrollableSelectMenu.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/Select/ScrollableSelectMenu.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAO3D,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAwB,MAAM,YAAY,CAAC;AAG5F,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACjC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7B,YAAY,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AACD,MAAM,WAAW,gBAAgB,CAAC,CAAC,CAAE,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC9D,YAAY,EAAE,yBAAyB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;IACxE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAgE1C,eAAO,MAAM,cAAc,UAAW,GAAG,EAAE,KAAG,MAAsC,CAAC;AAErF,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,MAAM,EAAE,EACnD,KAAK,EACL,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,SAAS,EACT,eAAe,EACf,iBAA4C,EAC5C,UAAU,EACV,mBAAmB,GACtB,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CA4IrB"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2019-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useLayoutEffect, useRef } from "react";
|
|
4
4
|
import cx from "classnames";
|
|
5
|
-
import {
|
|
5
|
+
import { _range } from "@gooddata/util";
|
|
6
6
|
import { SelectHeading } from "./SelectHeading.js";
|
|
7
7
|
import { SelectOption } from "./SelectOption.js";
|
|
8
8
|
import { SelectSeparator } from "./SelectSeparator.js";
|
|
@@ -138,7 +138,7 @@ export function ScrollableSelectMenu({ items, selectedItem, highlightedIndex, ge
|
|
|
138
138
|
optionClassName,
|
|
139
139
|
});
|
|
140
140
|
const middleItemIndex = getMedianIndex(getSelectableItems(items));
|
|
141
|
-
const visibleIndexes =
|
|
141
|
+
const visibleIndexes = _range(Math.max(middleItemIndex - visibleItemsRange, 0), Math.min(middleItemIndex + visibleItemsRange + 1, items.length));
|
|
142
142
|
const itemHeightFn = getItemHeight(items);
|
|
143
143
|
const listHeight = visibleIndexes.reduce((totalHeight, itemIndex) => totalHeight + itemHeightFn(itemIndex), 0);
|
|
144
144
|
return (_jsx("div", { ...getMenuProps({ className: cx("gd-select-menu-wrapper", className) }), children: _jsx("div", { className: "gd-select-menu s-select-menu", children: _jsx("div", { className: "List", ref: listRef, style: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateFilterConfigConversions.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/utils/DateFilterConfigConversions.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,KAAK,iBAAiB,EAIzB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"DateFilterConfigConversions.d.ts","sourceRoot":"","sources":["../../../src/DateFilter/utils/DateFilterConfigConversions.ts"],"names":[],"mappings":"AAKA,OAAO,EAIH,KAAK,iBAAiB,EAIzB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAGH,KAAK,wBAAwB,EAIhC,MAAM,wBAAwB,CAAC;AAOhC;;;;;;;;;;GAUG;AACH,wBAAgB,0CAA0C,CACtD,MAAM,EAAE,iBAAiB,GAC1B,wBAAwB,CAgB1B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// (C) 2019-2026 GoodData Corporation
|
|
2
2
|
import { endOfDay, format, startOfDay, subMonths } from "date-fns";
|
|
3
|
-
import {
|
|
3
|
+
import { max, min } from "lodash-es";
|
|
4
|
+
import { _groupBy } from "@gooddata/util";
|
|
4
5
|
import { removeEmptyKeysFromDateFilterOptions } from "./OptionUtils.js";
|
|
5
6
|
// date-fns tokens of the platform date-time format (Platform.ts holds the moment spelling).
|
|
6
7
|
const PLATFORM_DATE_FORMAT = "yyyy-MM-dd HH:mm";
|
|
@@ -72,7 +73,7 @@ function convertAbsolutePresets(filters) {
|
|
|
72
73
|
}
|
|
73
74
|
function convertRelativePresets(filters) {
|
|
74
75
|
return (filters &&
|
|
75
|
-
|
|
76
|
+
_groupBy(filters.map((preset) => sanitizeDateFilterOption({
|
|
76
77
|
...preset,
|
|
77
78
|
type: "relativePreset",
|
|
78
79
|
})), (preset) => preset.granularity));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-filters",
|
|
3
|
-
"version": "11.68.0
|
|
3
|
+
"version": "11.68.0",
|
|
4
4
|
"description": "GoodData.UI SDK - Filter Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"ts-invariant": "0.10.3",
|
|
49
49
|
"tslib": "2.8.1",
|
|
50
50
|
"uuid": "11.1.1",
|
|
51
|
-
"@gooddata/sdk-
|
|
52
|
-
"@gooddata/sdk-
|
|
53
|
-
"@gooddata/sdk-
|
|
54
|
-
"@gooddata/
|
|
55
|
-
"@gooddata/
|
|
51
|
+
"@gooddata/sdk-backend-spi": "11.68.0",
|
|
52
|
+
"@gooddata/sdk-ui": "11.68.0",
|
|
53
|
+
"@gooddata/sdk-model": "11.68.0",
|
|
54
|
+
"@gooddata/util": "11.68.0",
|
|
55
|
+
"@gooddata/sdk-ui-kit": "11.68.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@microsoft/api-documenter": "7.30.20",
|
|
@@ -90,12 +90,12 @@
|
|
|
90
90
|
"stylelint": "16.26.1",
|
|
91
91
|
"typescript": "7.0.2",
|
|
92
92
|
"vitest": "5.0.4",
|
|
93
|
-
"@gooddata/eslint-config": "11.68.0
|
|
94
|
-
"@gooddata/oxlint-config": "11.68.0
|
|
95
|
-
"@gooddata/reference-workspace": "11.68.0
|
|
96
|
-
"@gooddata/sdk-backend-mockingbird": "11.68.0
|
|
97
|
-
"@gooddata/sdk-ui-theme-provider": "11.68.0
|
|
98
|
-
"@gooddata/stylelint-config": "11.68.0
|
|
93
|
+
"@gooddata/eslint-config": "11.68.0",
|
|
94
|
+
"@gooddata/oxlint-config": "11.68.0",
|
|
95
|
+
"@gooddata/reference-workspace": "11.68.0",
|
|
96
|
+
"@gooddata/sdk-backend-mockingbird": "11.68.0",
|
|
97
|
+
"@gooddata/sdk-ui-theme-provider": "11.68.0",
|
|
98
|
+
"@gooddata/stylelint-config": "11.68.0"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"react": "^18.0.0 || ^19.0.0",
|