@sisense/sdk-ui 1.12.0 → 1.14.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/dist/ai/ai-context-provider.d.ts +1 -1
- package/dist/ai/api/chat-rest-api.d.ts +10 -11
- package/dist/ai/api/hooks.d.ts +2 -2
- package/dist/ai/api/types.d.ts +2 -16
- package/dist/ai/buttons/scroll-to-bottom-button.d.ts +3 -0
- package/dist/ai/chat-config.d.ts +12 -3
- package/dist/ai/chat-home.d.ts +2 -1
- package/dist/ai/chatbot.d.ts +1 -1
- package/dist/ai/common/constants.d.ts +1 -0
- package/dist/ai/common/tooltip.d.ts +2 -2
- package/dist/ai/data-topics/data-topic-list.d.ts +0 -1
- package/dist/ai/get-nlg-query-result.d.ts +1 -1
- package/dist/ai/icons/scroll-to-bottom-icon.d.ts +1 -0
- package/dist/ai/scroll-to-bottom.d.ts +7 -0
- package/dist/ai/use-get-nlg-query-result.d.ts +1 -1
- package/dist/ai/use-get-query-recommendations.d.ts +1 -1
- package/dist/ai.cjs +89 -80
- package/dist/ai.js +828 -933
- package/dist/api/rest-api.d.ts +7 -7
- package/dist/api/types/dashboard-dto.d.ts +2 -0
- package/dist/chart/helpers/use-synced-data.d.ts +1 -1
- package/dist/chart-options-processor/chart-options-service.d.ts +4 -0
- package/dist/chart-options-processor/subtype-to-design-options.d.ts +13 -1
- package/dist/chart-options-processor/translations/axis-section.d.ts +1 -0
- package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +2 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +2 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +2 -0
- package/dist/common/components/loading-overlay.d.ts +1 -0
- package/dist/common-filters/common-filters-connector.d.ts +9 -0
- package/dist/common-filters/selection-utils.d.ts +11 -0
- package/dist/common-filters/types.d.ts +18 -0
- package/dist/common-filters/use-common-filters.d.ts +13 -0
- package/dist/common-filters/utils.d.ts +9 -0
- package/dist/common-filters/widget-header-clear-selection-button.d.ts +3 -0
- package/dist/dashboard/components/dashboard-container.d.ts +1 -1
- package/dist/dashboard/dashboard.d.ts +1 -1
- package/dist/dashboard/index.d.ts +3 -0
- package/dist/dashboard/types.d.ts +5 -2
- package/dist/dashboard/utils.d.ts +0 -3
- package/dist/dashboard-widget/translate-dashboard-filters.d.ts +4772 -2
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +1 -1
- package/dist/dashboard-widget/translate-widget-filters.d.ts +200 -37
- package/dist/dashboard-widget/types.d.ts +1 -0
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -12
- package/dist/dashboard-widget/utils.d.ts +3 -1
- package/dist/decorators/hook-decorators/with-tracking.d.ts +1 -2
- package/dist/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +31 -0
- package/dist/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +27 -0
- package/dist/filters/components/cascading-filter-tile/index.d.ts +1 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +2 -2
- package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +7 -0
- package/dist/filters/components/custom-filter-tile.d.ts +46 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +8 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +9 -2
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +2 -2
- package/dist/filters/components/filter-tile.d.ts +24 -1
- package/dist/filters/components/filters-panel/filters-panel-tile.d.ts +4 -2
- package/dist/filters/components/filters-panel/filters-panel.d.ts +4 -2
- package/dist/filters/components/icons/background-filter-icon.d.ts +5 -0
- package/dist/filters/components/icons/index.d.ts +1 -0
- package/dist/filters/components/icons/lock-icon.d.ts +2 -0
- package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +4 -1
- package/dist/filters/components/member-filter-tile/member-list.d.ts +1 -1
- package/dist/filters/hooks/use-synchronized-filter.d.ts +12 -0
- package/dist/filters/index.d.ts +2 -0
- package/dist/filters/utils.d.ts +7 -0
- package/dist/index.cjs +261 -167
- package/dist/index.d.ts +3 -2
- package/dist/index.js +23372 -18888
- package/dist/models/dashboard/dashboard-model.d.ts +12 -8
- package/dist/models/dashboard/get-dashboard-model.d.ts +2 -1
- package/dist/models/dashboard/translate-dashboard-utils.d.ts +3 -1
- package/dist/models/dashboard/types.d.ts +3 -0
- package/dist/models/widget/get-widget-model.d.ts +2 -1
- package/dist/models/widget/translate-widget.d.ts +5 -2
- package/dist/models/widget/types.d.ts +9 -0
- package/dist/models/widget/widget-model.d.ts +31 -1
- package/dist/pivot-table/formatters/utils.d.ts +1 -1
- package/dist/props.d.ts +12 -12
- package/dist/table/hooks/use-table-data.d.ts +1 -1
- package/dist/table/table-component.d.ts +4 -4
- package/dist/theme-provider/theme-provider.d.ts +2 -0
- package/dist/translation/resources/en.d.ts +5 -0
- package/dist/translation/resources/index.d.ts +10 -0
- package/dist/types.d.ts +204 -186
- package/dist/{useQuery-0UWck_2A.js → useQuery-Cxcx_l05.js} +13983 -13662
- package/dist/{useQuery-DVHD0kJ-.cjs → useQuery-_biaqvma.cjs} +119 -119
- package/dist/utils/color/color-interpolation.d.ts +1 -0
- package/package.json +10 -10
|
@@ -18,18 +18,8 @@ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDas
|
|
|
18
18
|
includeDashboard?: boolean | undefined;
|
|
19
19
|
api: RestApi;
|
|
20
20
|
}) => Promise<{
|
|
21
|
-
widget: WidgetDto;
|
|
22
|
-
dashboard:
|
|
23
|
-
oid: string;
|
|
24
|
-
title: string;
|
|
25
|
-
datasource: import("./types").Datasource;
|
|
26
|
-
widgets?: WidgetDto[] | undefined;
|
|
27
|
-
filters?: (import("../api/types/dashboard-dto").FilterDto | import("../api/types/dashboard-dto").CascadingFilterDto)[] | undefined;
|
|
28
|
-
filterRelations?: {
|
|
29
|
-
filterRelations: import("@sisense/sdk-data").FilterRelationsModel;
|
|
30
|
-
}[] | undefined;
|
|
31
|
-
layout?: import("../api/types/dashboard-dto").Layout | undefined;
|
|
32
|
-
} & import("../utils/utility-types").AnyObject) | undefined;
|
|
21
|
+
widget: WidgetDto | undefined;
|
|
22
|
+
dashboard: DashboardDto | undefined;
|
|
33
23
|
}>;
|
|
34
24
|
/**
|
|
35
25
|
* Custom hook for fetching Widget DTO and Dashboard DTO models.
|
|
@@ -21,7 +21,9 @@ export declare function getRootPanelItem(item: PanelItem): PanelItem;
|
|
|
21
21
|
export declare function getSortType(jaqlSort: `${JaqlSortDirection}` | undefined): SortDirection;
|
|
22
22
|
/**
|
|
23
23
|
* Merges two arrays of filter objects, prioritizing 'targetFilters' over 'sourceFilters',
|
|
24
|
-
* and removes duplicates based on filter compare id
|
|
24
|
+
* and removes duplicates based on filter compare id.
|
|
25
|
+
*
|
|
26
|
+
* Saves the 'sourceFilters' filters order, while adds new filters to the end of the array.
|
|
25
27
|
*
|
|
26
28
|
* @param {Filter[]} [sourceFilters=[]] - The source array of filter objects.
|
|
27
29
|
* @param {Filter[]} [targetFilters=[]] - The target array of filter objects.
|
|
@@ -7,7 +7,6 @@ export type HookDecorator<DecoratorConfig> = (decoratorConfig: DecoratorConfig)
|
|
|
7
7
|
* @param packageName - The name of the package
|
|
8
8
|
* @param app - The client application
|
|
9
9
|
* @param onFinally - The function to call after the tracking is done
|
|
10
|
-
* @returns Promise<void>
|
|
11
10
|
*/
|
|
12
|
-
export declare const trackHook: (hookName: string, packageName: string, app: ClientApplication, onFinally: () => void) =>
|
|
11
|
+
export declare const trackHook: (hookName: string, packageName: string, app: ClientApplication, onFinally: () => void) => void;
|
|
13
12
|
export declare const withTracking: HookDecorator<string>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CascadingFilter, DataSource, Filter } from '@sisense/sdk-data';
|
|
3
|
+
import { FilterVariant } from '../common/filter-utils.js';
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link CascadingFilterTile}
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface CascadingFilterTileProps {
|
|
10
|
+
/** Cascading filter object to initialize filter type and default values */
|
|
11
|
+
filter: CascadingFilter;
|
|
12
|
+
/**
|
|
13
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
14
|
+
*
|
|
15
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
16
|
+
*/
|
|
17
|
+
dataSource?: DataSource;
|
|
18
|
+
/** Arrangement of the filter inputs. Use vertical for standard filter tiles and horizontal for toolbars */
|
|
19
|
+
arrangement?: FilterVariant;
|
|
20
|
+
/** Callback returning filter object, or null for failure */
|
|
21
|
+
onChange: (filter: Filter) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* UI component representing group of cascading (dependent) filters.
|
|
25
|
+
*
|
|
26
|
+
* @param props - Cascading filter tile props
|
|
27
|
+
* @returns Cascading filter tile component
|
|
28
|
+
* @group Filter Tiles
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare const CascadingFilterTile: import("react").FunctionComponent<CascadingFilterTileProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
2
|
+
/**
|
|
3
|
+
* Props of the {@link CascadingLevelFilterTile} component
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export type CascadingLevelFilterTileProps = {
|
|
8
|
+
/** Filter to display */
|
|
9
|
+
filter: Filter;
|
|
10
|
+
/**
|
|
11
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
12
|
+
*
|
|
13
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
14
|
+
*/
|
|
15
|
+
dataSource?: DataSource;
|
|
16
|
+
parentFilters: Filter[];
|
|
17
|
+
/** Callback to handle filter change */
|
|
18
|
+
onChange: (filter: Filter | null) => void;
|
|
19
|
+
/** Whether the filter is the last in the list */
|
|
20
|
+
isLast?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Filter tile component that renders a level filter based on its type
|
|
24
|
+
*
|
|
25
|
+
* @internal
|
|
26
|
+
*/
|
|
27
|
+
export declare const CascadingLevelFilterTile: ({ filter, dataSource, parentFilters, onChange, isLast, }: CascadingLevelFilterTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CascadingFilterTile, type CascadingFilterTileProps } from './cascading-filter-tile';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Measure } from '@sisense/sdk-data';
|
|
1
|
+
import { Filter, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { CriteriaFilterType } from './criteria-filter-tile';
|
|
3
3
|
/**
|
|
4
4
|
* Collection of filter options for the {@link CriteriaFilterMenu},
|
|
@@ -37,7 +37,7 @@ export type FilterOptionType = keyof typeof FilterOption;
|
|
|
37
37
|
* @internal
|
|
38
38
|
*/
|
|
39
39
|
export type FilterInfo = {
|
|
40
|
-
fn:
|
|
40
|
+
fn: (...args: any[]) => Filter;
|
|
41
41
|
inputCount: number;
|
|
42
42
|
symbols: string[];
|
|
43
43
|
message: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { FilterTileDesignOptions } from '../filter-tile.js';
|
|
2
3
|
import { ExcludeFilter, Filter, Measure, NumericFilter, RankingFilter, TextFilter } from '@sisense/sdk-data';
|
|
3
4
|
import { FilterVariant } from '../common/filter-utils.js';
|
|
4
5
|
/**
|
|
@@ -15,6 +16,12 @@ export interface CriteriaFilterTileProps {
|
|
|
15
16
|
onUpdate: (filter: Filter | null) => void;
|
|
16
17
|
/** List of available measures to rank by. Required only for ranking filters. */
|
|
17
18
|
measures?: Measure[];
|
|
19
|
+
/**
|
|
20
|
+
* Design options for the filter tile component
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
tileDesignOptions?: FilterTileDesignOptions;
|
|
18
25
|
}
|
|
19
26
|
export type CriteriaFilterType = NumericFilter | TextFilter | RankingFilter | ExcludeFilter;
|
|
20
27
|
/**
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Filter } from '@sisense/sdk-data';
|
|
3
|
+
import { FilterTileDesignOptions } from './filter-tile';
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link CustomFilterTile}
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface CustomFilterTileProps {
|
|
10
|
+
/** Custom filter. */
|
|
11
|
+
filter: Filter;
|
|
12
|
+
/**
|
|
13
|
+
* Callback to handle changes in custom filter.
|
|
14
|
+
*
|
|
15
|
+
* @param filter - Custom filter
|
|
16
|
+
*/
|
|
17
|
+
onUpdate: (filter: Filter | null) => void;
|
|
18
|
+
/** Design options for the tile @internal */
|
|
19
|
+
tileDesignOptions?: FilterTileDesignOptions;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* UI component for a custom filter defined with JAQL.
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const filterJaql = { from: 10, to: 20000 };
|
|
28
|
+
*
|
|
29
|
+
* const [customFilter, setCustomFilter] = useState<Filter>(
|
|
30
|
+
* filterFactory.customFilter(DM.Commerce.Cost, filterJaql),
|
|
31
|
+
* );
|
|
32
|
+
*
|
|
33
|
+
* return (
|
|
34
|
+
* <CustomFilterTile
|
|
35
|
+
* filter={customFilter}
|
|
36
|
+
* onChange={(filter: Filter) => {
|
|
37
|
+
* setCustomFilter(filter);
|
|
38
|
+
* }}
|
|
39
|
+
* />
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
* @param props - Custom filter tile props
|
|
43
|
+
* @returns Custom filter tile component
|
|
44
|
+
* @group Filter Tiles
|
|
45
|
+
*/
|
|
46
|
+
export declare const CustomFilterTile: import("react").FunctionComponent<CustomFilterTileProps>;
|
package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LevelAttribute, DataSource, Filter } from '@sisense/sdk-data';
|
|
3
|
+
import { FilterTileDesignOptions } from '../../filter-tile';
|
|
3
4
|
export interface DateRangeFilterTileProps {
|
|
4
5
|
/**
|
|
5
6
|
* Filter tile title
|
|
@@ -43,10 +44,17 @@ export interface DateRangeFilterTileProps {
|
|
|
43
44
|
parentFilters?: Filter[];
|
|
44
45
|
/**
|
|
45
46
|
* Whether to display the filter as a tiled version.
|
|
47
|
+
*
|
|
46
48
|
* @default false
|
|
47
49
|
* @internal
|
|
48
50
|
*/
|
|
49
51
|
tiled?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Design options for the filter tile component
|
|
54
|
+
*
|
|
55
|
+
* @internal
|
|
56
|
+
*/
|
|
57
|
+
tileDesignOptions?: FilterTileDesignOptions;
|
|
50
58
|
}
|
|
51
59
|
/**
|
|
52
60
|
* Date Range Filter Tile component for filtering data by date range.
|
package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Filter } from '@sisense/sdk-data';
|
|
3
3
|
import { FilterVariant } from '../../common/index.js';
|
|
4
|
+
import { FilterTileDesignOptions } from '../../filter-tile.js';
|
|
4
5
|
/**
|
|
5
6
|
* Props for {@link RelativeDateFilterTile}
|
|
6
7
|
*/
|
|
@@ -14,9 +15,9 @@ export interface RelativeDateFilterTileProps {
|
|
|
14
15
|
/**
|
|
15
16
|
* Callback function that is called when the relative date filter object should be updated.
|
|
16
17
|
*
|
|
17
|
-
* @param filter - Relative date filter
|
|
18
|
+
* @param filter - Relative date filter
|
|
18
19
|
*/
|
|
19
|
-
onUpdate: (filter: Filter
|
|
20
|
+
onUpdate: (filter: Filter) => void;
|
|
20
21
|
/**
|
|
21
22
|
* Limit of the date range that can be selected.
|
|
22
23
|
*/
|
|
@@ -24,6 +25,12 @@ export interface RelativeDateFilterTileProps {
|
|
|
24
25
|
maxDate: string;
|
|
25
26
|
minDate: string;
|
|
26
27
|
};
|
|
28
|
+
/**
|
|
29
|
+
* Design options for the filter tile component
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
tileDesignOptions?: FilterTileDesignOptions;
|
|
27
34
|
}
|
|
28
35
|
/**
|
|
29
36
|
* UI component that allows the user to filter date attributes according to
|
package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RelativeDateFilter as RelativeDateFilterType } from '@sisense/sdk-data';
|
|
2
2
|
import { FilterVariant } from '../../common/index.js';
|
|
3
3
|
import { FunctionComponent } from 'react';
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ import { FunctionComponent } from 'react';
|
|
|
7
7
|
export interface RelativeDateFilterProps {
|
|
8
8
|
filter: RelativeDateFilterType;
|
|
9
9
|
arrangement?: FilterVariant;
|
|
10
|
-
onUpdate: (filter:
|
|
10
|
+
onUpdate: (filter: RelativeDateFilterType) => void;
|
|
11
11
|
disabled: boolean;
|
|
12
12
|
limit?: {
|
|
13
13
|
maxDate: string;
|
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
import type { FunctionComponent, ReactNode } from 'react';
|
|
2
2
|
import { FilterVariant } from './common/filter-utils';
|
|
3
|
+
import { DeepRequired } from 'ts-essentials';
|
|
4
|
+
/**
|
|
5
|
+
* Design options for the filter tile component.
|
|
6
|
+
*
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export interface FilterTileDesignOptions {
|
|
10
|
+
header?: {
|
|
11
|
+
shouldBeShown?: boolean;
|
|
12
|
+
isCollapsible?: boolean;
|
|
13
|
+
hasBorder?: boolean;
|
|
14
|
+
hasBackgroundFilterIcon?: boolean;
|
|
15
|
+
};
|
|
16
|
+
border?: {
|
|
17
|
+
shouldBeShown?: boolean;
|
|
18
|
+
};
|
|
19
|
+
footer?: {
|
|
20
|
+
shouldBeShown?: boolean;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export type CompleteFilterTileDesignOptions = DeepRequired<FilterTileDesignOptions>;
|
|
3
24
|
interface Props {
|
|
4
|
-
title
|
|
25
|
+
title?: string;
|
|
5
26
|
renderContent: (collapsed: boolean, tileDisabled: boolean) => ReactNode;
|
|
6
27
|
arrangement?: FilterVariant;
|
|
7
28
|
disabled?: boolean;
|
|
8
29
|
isDependent?: boolean;
|
|
30
|
+
design?: FilterTileDesignOptions;
|
|
9
31
|
onToggleDisabled?: () => void;
|
|
32
|
+
locked?: boolean;
|
|
10
33
|
}
|
|
11
34
|
/**
|
|
12
35
|
* Generic component that owns common functionality of a filter "tile" like
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter } from '@sisense/sdk-data';
|
|
1
|
+
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
2
2
|
/**
|
|
3
3
|
* Props of the {@link FiltersPanelTile} component
|
|
4
4
|
*
|
|
@@ -9,10 +9,12 @@ export type FiltersPanelTileProps = {
|
|
|
9
9
|
filter: Filter;
|
|
10
10
|
/** Callback to handle filter change */
|
|
11
11
|
onChange: (filter: Filter | null) => void;
|
|
12
|
+
/** Default data source used for filter tiles */
|
|
13
|
+
defaultDataSource?: DataSource;
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
14
16
|
* Filter tile component that renders a filter based on its type
|
|
15
17
|
*
|
|
16
18
|
* @internal
|
|
17
19
|
*/
|
|
18
|
-
export declare const FiltersPanelTile: ({ filter, onChange }: FiltersPanelTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const FiltersPanelTile: ({ filter, onChange, defaultDataSource, }: FiltersPanelTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter } from '@sisense/sdk-data';
|
|
1
|
+
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
2
2
|
/**
|
|
3
3
|
* Props of the {@link FiltersPanel} component
|
|
4
4
|
*
|
|
@@ -9,10 +9,12 @@ export type FiltersPanelProps = {
|
|
|
9
9
|
filters: Filter[];
|
|
10
10
|
/** Callback to handle changes in filters */
|
|
11
11
|
onFiltersChange: (filters: Filter[]) => void;
|
|
12
|
+
/** Default data source used for filter tiles */
|
|
13
|
+
defaultDataSource?: DataSource;
|
|
12
14
|
};
|
|
13
15
|
/**
|
|
14
16
|
* Filters panel component that renders a list of filter tiles
|
|
15
17
|
*
|
|
16
18
|
* @internal
|
|
17
19
|
*/
|
|
18
|
-
export declare const FiltersPanel: ({ filters, onFiltersChange }: FiltersPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const FiltersPanel: ({ filters, onFiltersChange, defaultDataSource, }: FiltersPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const BackgroundFilterIcon: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -3,5 +3,6 @@ export { PencilIcon } from './pencil-icon';
|
|
|
3
3
|
export { PlusIcon } from './plus-icon';
|
|
4
4
|
export { SearchIcon } from './search-icon';
|
|
5
5
|
export { TrashIcon } from './trash-icon';
|
|
6
|
+
export { LockIcon } from './lock-icon';
|
|
6
7
|
export { DateIcon } from './date-icon';
|
|
7
8
|
export { ArrowDownIcon } from './arrow-down-icon';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Attribute, DataSource, Filter } from '@sisense/sdk-data';
|
|
2
2
|
import { FunctionComponent } from 'react';
|
|
3
|
+
import { FilterTileDesignOptions } from '../filter-tile';
|
|
3
4
|
/**
|
|
4
5
|
* Props for {@link MemberFilterTile}
|
|
5
6
|
*/
|
|
@@ -20,6 +21,8 @@ export interface MemberFilterTileProps {
|
|
|
20
21
|
onChange: (filter: Filter | null) => void;
|
|
21
22
|
/** List of filters this filter is dependent on */
|
|
22
23
|
parentFilters?: Filter[];
|
|
24
|
+
/** Design options for the tile @internal */
|
|
25
|
+
tileDesignOptions?: FilterTileDesignOptions;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* UI component that allows the user to select members to include/exclude in a
|
|
@@ -3,7 +3,7 @@ import { Member, SelectedMember } from './members-reducer';
|
|
|
3
3
|
export interface MemberListProps {
|
|
4
4
|
members: Member[];
|
|
5
5
|
selectedMembers: SelectedMember[];
|
|
6
|
-
onSelectMember: (member: Member) => void;
|
|
6
|
+
onSelectMember: (member: Member, isSelected: boolean) => void;
|
|
7
7
|
selectAllMembers: () => void;
|
|
8
8
|
clearAllMembers: () => void;
|
|
9
9
|
disabled: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Filter } from '@sisense/sdk-data';
|
|
2
|
+
/**
|
|
3
|
+
* Filter tiles supposed to be Controlled components (stateless) and to react on passed `filter`.
|
|
4
|
+
* But to achieve backward compatibility, we also need to handle `filter` as internal state
|
|
5
|
+
* in case of using Filter tile as Uncontrolled component (statefull).
|
|
6
|
+
*
|
|
7
|
+
* This hook helps with synchronization for both patterns.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useSynchronizedFilter<TFilter extends Filter = Filter>(filterFromProps: TFilter | null, updateFilterFromProps: (filter: TFilter) => void, createEmptyFilter?: () => TFilter): {
|
|
10
|
+
filter: TFilter;
|
|
11
|
+
updateFilter: (newFilter: TFilter) => void;
|
|
12
|
+
};
|
package/dist/filters/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './components/member-filter-tile';
|
|
2
2
|
export * from './components/date-filter';
|
|
3
3
|
export * from './components/criteria-filter-tile';
|
|
4
|
+
export * from './components/cascading-filter-tile';
|
|
4
5
|
export * from './components/filters-panel';
|
|
6
|
+
export * from './components/custom-filter-tile';
|
|
5
7
|
export { type FilterVariant } from './components/common/filter-utils';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Filter } from '@sisense/sdk-data';
|
|
2
|
+
/**
|
|
3
|
+
* Clones a filter with a toggled 'disabled' state.
|
|
4
|
+
* @param filter - Filter to clone
|
|
5
|
+
*/
|
|
6
|
+
export declare const cloneFilterAndToggleDisabled: <TFilter extends Filter>(filter: TFilter) => TFilter;
|
|
7
|
+
export declare const cloneFilter: <TFilter extends Filter>(filter: TFilter) => TFilter;
|