@sisense/sdk-ui 0.16.0 → 1.1.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/messages/get-widget-options.d.ts +3 -3
- package/dist/ai.js +334 -308
- package/dist/api/rest-api.d.ts +9 -0
- package/dist/app/settings/settings.d.ts +1 -0
- package/dist/area-chart.d.ts +2 -2
- package/dist/areamap-chart.d.ts +28 -0
- package/dist/bar-chart.d.ts +2 -2
- package/dist/boxplot-chart.d.ts +38 -0
- package/dist/boxplot-utils.d.ts +30 -0
- package/dist/chart-data/areamap-data.d.ts +4 -0
- package/dist/chart-data/boxplot-data.d.ts +11 -0
- package/dist/chart-data/cartesian-data.d.ts +6 -3
- package/dist/chart-data/data-coloring/create-data-coloring-function.d.ts +7 -0
- package/dist/chart-data/data-coloring/geo-data-coloring-function.d.ts +2 -0
- package/dist/chart-data/data-coloring/index.d.ts +3 -0
- package/dist/chart-data/{series-data-color-service → data-coloring}/legend-color.d.ts +1 -1
- package/dist/chart-data/data-coloring/series-data-coloring-function.d.ts +11 -0
- package/dist/chart-data/indicator-data.d.ts +2 -2
- package/dist/chart-data/scatter-data.d.ts +2 -2
- package/dist/chart-data/scattermap-data.d.ts +4 -0
- package/dist/chart-data/types.d.ts +74 -3
- package/dist/chart-data-options/translate-boxplot-data-options.d.ts +7 -0
- package/dist/chart-data-options/translate-scattermap-data-options.d.ts +3 -0
- package/dist/chart-data-options/types.d.ts +140 -10
- package/dist/chart-data-options/utils.d.ts +6 -1
- package/dist/chart-options-processor/boxplot-chart-options.d.ts +11 -0
- package/dist/chart-options-processor/chart-options-service.d.ts +24 -6
- package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +3 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
- package/dist/chart-options-processor/subtype-to-design-options.d.ts +8 -2
- package/dist/chart-options-processor/theme-option-service.d.ts +0 -1
- package/dist/chart-options-processor/translations/axis-section.d.ts +1 -2
- package/dist/chart-options-processor/translations/boxplot/boxplot-axis.d.ts +10 -0
- package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +3 -0
- package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +5 -0
- package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +4 -0
- package/dist/chart-options-processor/translations/design-options.d.ts +15 -2
- package/dist/chart-options-processor/translations/legend-section.d.ts +4 -3
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +5 -1
- package/dist/chart-options-processor/translations/types.d.ts +15 -3
- package/dist/chart-options-processor/translations/value-label-section.d.ts +2 -1
- package/dist/chart.d.ts +2 -2
- package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +2 -2
- package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +2 -2
- package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +2 -2
- package/dist/charts/map-charts/areamap/alternative-country-names-dictionary.d.ts +9 -0
- package/dist/charts/map-charts/areamap/areamap-map.d.ts +16 -0
- package/dist/charts/map-charts/areamap/areamap.d.ts +16 -0
- package/dist/charts/map-charts/areamap/feature-styles-dictionary.d.ts +16 -0
- package/dist/charts/map-charts/areamap/use-geo-json.d.ts +9 -0
- package/dist/charts/map-charts/scattermap/hooks/use-locations.d.ts +3 -0
- package/dist/charts/map-charts/scattermap/hooks/use-settings.d.ts +5 -0
- package/dist/charts/map-charts/scattermap/hooks/use-tooltip-handler.d.ts +14 -0
- package/dist/charts/map-charts/scattermap/scattermap.d.ts +13 -0
- package/dist/charts/map-charts/scattermap/types.d.ts +16 -0
- package/dist/charts/map-charts/scattermap/utils/color.d.ts +3 -0
- package/dist/charts/map-charts/scattermap/utils/copyright.d.ts +2 -0
- package/dist/charts/map-charts/scattermap/utils/location.d.ts +5 -0
- package/dist/charts/map-charts/scattermap/utils/map.d.ts +2 -0
- package/dist/charts/map-charts/scattermap/utils/markers.d.ts +28 -0
- package/dist/charts/map-charts/scattermap/utils/size.d.ts +2 -0
- package/dist/charts/map-charts/scattermap/utils/tooltip.d.ts +8 -0
- package/dist/charts/map-charts/scattermap/utils/values.d.ts +4 -0
- package/dist/charts/table/types.d.ts +1 -1
- package/dist/column-chart.d.ts +2 -2
- package/dist/common/components/loading-dots.d.ts +4 -0
- package/dist/dashboard-widget/translate-dashboard-filters.d.ts +1 -1
- package/dist/dashboard-widget/translate-panel-color-format.d.ts +1 -1
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +4 -3
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +2 -2
- package/dist/dashboard-widget/types.d.ts +28 -3
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -4
- package/dist/decorators/component-decorators/as-sisense-component.d.ts +1 -0
- package/dist/filters/components/common/basic-input.d.ts +1 -1
- package/dist/filters/components/common/date-range-field-button.d.ts +3 -2
- package/dist/filters/components/common/dropdown.d.ts +1 -0
- package/dist/filters/components/common/filter-utils.d.ts +13 -0
- package/dist/filters/components/common/index.d.ts +1 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
- package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +0 -9
- package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -2
- package/dist/filters/components/criteria-filter-tile/index.d.ts +0 -1
- package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +10 -8
- package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +4 -4
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -1
- package/dist/filters/components/date-filter/index.d.ts +1 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/index.d.ts +1 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-display.d.ts +14 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +36 -0
- package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +26 -0
- package/dist/filters/components/filter-tile.d.ts +1 -1
- package/dist/filters/index.d.ts +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +4712 -4876
- package/dist/indicator-canvas.d.ts +3 -3
- package/dist/indicator-chart.d.ts +4 -4
- package/dist/line-chart.d.ts +2 -2
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -0
- package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -1
- package/dist/models/widget/use-get-widget-model.d.ts +1 -0
- package/dist/models/widget/widget-model.d.ts +5 -4
- package/dist/pie-chart.d.ts +2 -2
- package/dist/polar-chart.d.ts +2 -2
- package/dist/props.d.ts +84 -62
- package/dist/query/execute-query.d.ts +1 -1
- package/dist/query-execution/execute-query-by-widget-id.d.ts +10 -2
- package/dist/query-execution/execute-query.d.ts +11 -4
- package/dist/query-execution/index.d.ts +1 -1
- package/dist/query-execution/types.d.ts +10 -8
- package/dist/query-execution/use-execute-csv-query.d.ts +4 -6
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +6 -2
- package/dist/query-execution/use-execute-query.d.ts +2 -2
- package/dist/scatter-chart.d.ts +4 -4
- package/dist/scattermap-chart.d.ts +36 -0
- package/dist/sunburst-chart.d.ts +1 -1
- package/dist/table/hooks/use-table-data.d.ts +3 -2
- package/dist/table/table.d.ts +2 -2
- package/dist/table-widget-4275c061.js +77714 -0
- package/dist/themes/theme-loader.d.ts +0 -1
- package/dist/translation/resources/en.d.ts +25 -0
- package/dist/translation/resources/index.d.ts +50 -0
- package/dist/treemap-chart.d.ts +2 -2
- package/dist/types.d.ts +89 -8
- package/dist/utils/filters-comparator.d.ts +13 -1
- package/dist/widgets/chart-widget-deprecated.d.ts +1 -1
- package/dist/widgets/chart-widget.d.ts +1 -1
- package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
- package/dist/widgets/common/drilldown.d.ts +12 -2
- package/dist/widgets/drilldown-widget.d.ts +2 -2
- package/package.json +22 -6
- package/dist/chart-data/series-data-color-service/index.d.ts +0 -3
- package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +0 -4
- package/dist/table-widget-5f3b1d03.js +0 -64456
- /package/dist/chart-data/{series-data-color-service → data-coloring}/types.d.ts +0 -0
|
@@ -20,7 +20,7 @@ export type TableProps = {
|
|
|
20
20
|
*/
|
|
21
21
|
dataOptions: TableDataOptionsInternal;
|
|
22
22
|
/**
|
|
23
|
-
* Configuration that
|
|
23
|
+
* Configuration that defines functional style of the various chart elements
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
designOptions?: TableDesignOptions;
|
package/dist/column-chart.d.ts
CHANGED
|
@@ -12,10 +12,10 @@ import { ColumnChartProps } from './props';
|
|
|
12
12
|
* dataSet={DM.DataSource}
|
|
13
13
|
* dataOptions={{
|
|
14
14
|
* category: [DM.Commerce.AgeRange],
|
|
15
|
-
* value: [
|
|
15
|
+
* value: [measureFactory.sum(DM.Commerce.Revenue)],
|
|
16
16
|
* breakBy: [DM.Commerce.Gender],
|
|
17
17
|
* }}
|
|
18
|
-
* filters={[
|
|
18
|
+
* filters={[filterFactory.greaterThan(DM.Commerce.Revenue, 1000)]}
|
|
19
19
|
* onDataPointClick={(point, nativeEvent) => {
|
|
20
20
|
* console.log('clicked', point, nativeEvent);
|
|
21
21
|
* }}
|
|
@@ -5,7 +5,7 @@ import { WidgetDto } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
* @param {DashboardDto} dashboard - The dashboard containing the filters.
|
|
7
7
|
* @param {WidgetDto} widget - The widget to extract filters from.
|
|
8
|
-
* @returns {
|
|
8
|
+
* @returns {object} An object containing an array of filters and an array of highlights.
|
|
9
9
|
*/
|
|
10
10
|
export declare function extractDashboardFiltersForWidget(dashboard: DashboardDto, widget: WidgetDto): {
|
|
11
11
|
filters: import("@sisense/sdk-data").Filter[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataColorOptions } from '../chart-data/
|
|
1
|
+
import { DataColorOptions } from '../chart-data/data-coloring';
|
|
2
2
|
import { ValueToColorMap, MultiColumnValueToColorMap, Color } from '../types';
|
|
3
3
|
import { PanelColorFormat, PanelItem, PanelMembersFormat } from './types';
|
|
4
4
|
export declare const createValueColorOptions: (format?: PanelColorFormat, customPaletteColors?: Color[]) => DataColorOptions | undefined;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DimensionalBaseMeasure, DimensionalAttribute, DimensionalCalculatedMeasure, Jaql } from '@sisense/sdk-data';
|
|
2
2
|
import { StyledMeasureColumn, StyledColumn, Color } from '../types';
|
|
3
|
-
import { Panel, PanelItem, WidgetType } from './types';
|
|
3
|
+
import { Panel, PanelItem, WidgetType, WidgetStyle, BoxplotWidgetStyle } from './types';
|
|
4
4
|
import { WidgetDataOptions } from '../models';
|
|
5
5
|
export declare function createDimensionalElementFromJaql(jaql: Jaql, format?: PanelItem['format']): import("@sisense/sdk-data").Filter | DimensionalCalculatedMeasure | DimensionalBaseMeasure | DimensionalAttribute;
|
|
6
|
-
export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]):
|
|
7
|
-
export declare function
|
|
6
|
+
export declare function createDataColumn(item: PanelItem, customPaletteColors?: Color[]): StyledColumn | StyledMeasureColumn;
|
|
7
|
+
export declare function extractBoxplotBoxType(style: BoxplotWidgetStyle): "iqr" | "extremums" | "standardDeviation";
|
|
8
|
+
export declare function extractDataOptions(widgetType: WidgetType, panels: Panel[], style: WidgetStyle, customPaletteColors?: Color[]): WidgetDataOptions;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChartStyleOptions, TableStyleOptions, NumericBarIndicatorStyleOptions, NumericSimpleIndicatorStyleOptions, GaugeIndicatorStyleOptions } from '../types';
|
|
2
2
|
import { Panel, WidgetStyle, WidgetSubtype, WidgetType, TableWidgetStyle, IndicatorWidgetStyle } from './types';
|
|
3
3
|
export declare function extractTableChartStyleOptions(widgetStyle: TableWidgetStyle): TableStyleOptions;
|
|
4
4
|
export declare const getIndicatorTypeSpecificOptions: (widgetSubtype: WidgetSubtype, widgetStyle: IndicatorWidgetStyle) => NumericSimpleIndicatorStyleOptions | NumericBarIndicatorStyleOptions | GaugeIndicatorStyleOptions;
|
|
5
|
-
export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]):
|
|
5
|
+
export declare function extractStyleOptions<WType extends WidgetType>(widgetType: WType, widgetSubtype: WidgetSubtype, style: WidgetStyle, panels: Panel[]): ChartStyleOptions | TableStyleOptions;
|
|
@@ -14,8 +14,8 @@ export type TabularWidgetType = 'tablewidget' | 'tablewidgetagg';
|
|
|
14
14
|
/**
|
|
15
15
|
* The type of a widget on a dashboard.
|
|
16
16
|
*/
|
|
17
|
-
export type WidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType;
|
|
18
|
-
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst';
|
|
17
|
+
export type WidgetType = CartesianWidgetType | CategoricalWidgetType | 'chart/scatter' | 'indicator' | TabularWidgetType | 'chart/boxplot' | 'map/scatter' | 'map/area';
|
|
18
|
+
export type WidgetSubtype = 'area/basic' | 'area/stacked' | 'area/stacked100' | 'area/spline' | 'area/stackedspline' | 'area/stackedspline100' | 'bar/classic' | 'bar/stacked' | 'bar/stacked100' | 'column/classic' | 'column/stackedcolumn' | 'column/stackedcolumn100' | 'line/basic' | 'line/spline' | 'pie/classic' | 'pie/donut' | 'pie/ring' | 'column/polar' | 'area/polar' | 'line/polar' | 'indicator/numeric' | 'indicator/gauge' | 'bubble/scatter' | 'treemap' | 'sunburst' | 'boxplot/full' | 'boxplot/hollow' | 'map/scatter' | 'areamap/world' | 'areamap/usa';
|
|
19
19
|
export declare enum WidgetDashboardFilterMode {
|
|
20
20
|
FILTER = "filter",
|
|
21
21
|
SELECT = "select"
|
|
@@ -110,6 +110,7 @@ export type PanelItem = {
|
|
|
110
110
|
singleSeriesType?: SeriesType;
|
|
111
111
|
categoriesSorting?: SortDirection;
|
|
112
112
|
isColored?: boolean;
|
|
113
|
+
geoLevel?: 'country' | 'state' | 'city';
|
|
113
114
|
};
|
|
114
115
|
export type PanelColorFormat = PanelColorFormatSingle | PanelColorFormatRange | PanelColorFormatConditional;
|
|
115
116
|
export type PanelMembersFormat = Record<string, {
|
|
@@ -299,7 +300,31 @@ export type SunburstWidgetStyle = {
|
|
|
299
300
|
'tooltip/contribution': boolean;
|
|
300
301
|
'tooltip/value': boolean;
|
|
301
302
|
};
|
|
302
|
-
export type
|
|
303
|
+
export type BoxplotWidgetStyle = {
|
|
304
|
+
xAxis: AxisStyle;
|
|
305
|
+
yAxis: AxisStyle;
|
|
306
|
+
whisker: {
|
|
307
|
+
'whisker/iqr': boolean;
|
|
308
|
+
'whisker/extremums': boolean;
|
|
309
|
+
'whisker/deviation': boolean;
|
|
310
|
+
};
|
|
311
|
+
outliers: {
|
|
312
|
+
enabled: boolean;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
export type ScattermapWidgetStyle = {
|
|
316
|
+
markers: {
|
|
317
|
+
fill: 'filled' | 'filled-light' | 'hollow' | 'hollow-bold';
|
|
318
|
+
size: {
|
|
319
|
+
defaultSize: number;
|
|
320
|
+
min: number;
|
|
321
|
+
max: number;
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
/** Currently, WidgetStyle for areamap is an empty object */
|
|
326
|
+
export type AreamapWidgetStyle = {};
|
|
327
|
+
export type WidgetStyle = CartesianWidgetStyle | PolarWidgetStyle | FunnelWidgetStyle | ScatterWidgetStyle | TableWidgetStyle | IndicatorWidgetStyle | TreemapWidgetStyle | SunburstWidgetStyle | BoxplotWidgetStyle | ScattermapWidgetStyle | AreamapWidgetStyle;
|
|
303
328
|
export declare enum FiltersMergeStrategyEnum {
|
|
304
329
|
WIDGET_FIRST = "widgetFirst",
|
|
305
330
|
CODE_FIRST = "codeFirst",
|
|
@@ -5,8 +5,7 @@ import { WidgetDto } from './types';
|
|
|
5
5
|
* Fetches a Widget DTO model and, optionally, a Dashboard DTO model.
|
|
6
6
|
*
|
|
7
7
|
* @internal
|
|
8
|
-
*
|
|
9
|
-
* @param {Object} options - The options for fetching the DTO models.
|
|
8
|
+
* @param {object} options - The options for fetching the DTO models.
|
|
10
9
|
* @param {string} options.widgetOid - The OID of the widget to fetch.
|
|
11
10
|
* @param {string} options.dashboardOid - The OID of the dashboard to which the widget belongs.
|
|
12
11
|
* @param {boolean} [options.includeDashboard] - (Optional) Whether to include the associated dashboard.
|
|
@@ -32,8 +31,7 @@ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDas
|
|
|
32
31
|
* Custom hook for fetching Widget DTO and Dashboard DTO models.
|
|
33
32
|
*
|
|
34
33
|
* @internal
|
|
35
|
-
*
|
|
36
|
-
* @param {Object} options - The options for fetching the DTO models.
|
|
34
|
+
* @param {object} options - The options for fetching the DTO models.
|
|
37
35
|
* @param {string} options.widgetOid - The OID of the widget to fetch.
|
|
38
36
|
* @param {string} options.dashboardOid - The OID of the dashboard to which the widget belongs.
|
|
39
37
|
* @param {boolean} [options.includeDashboard] - (Optional) Whether to include the associated dashboard.
|
|
@@ -15,6 +15,7 @@ export type SisenseComponentConfig = {
|
|
|
15
15
|
export type ComponentDecorator<DecoratorConfig> = (decoratorConfig: DecoratorConfig) => <ComponentProps extends Record<string, any>>(Component: FunctionComponent<ComponentProps>) => FunctionComponent<ComponentProps>;
|
|
16
16
|
/**
|
|
17
17
|
* Decorator that adds sisense-specific functionality to a component
|
|
18
|
+
*
|
|
18
19
|
* @param componentConfig - component configuration
|
|
19
20
|
* @returns A component with sisense-specific functionality
|
|
20
21
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type FunctionComponent, type InputHTMLAttributes } from 'react';
|
|
2
2
|
type BasicInputProps = {
|
|
3
3
|
variant?: 'white' | 'grey';
|
|
4
|
-
label
|
|
4
|
+
label?: string;
|
|
5
5
|
callback: (value: string) => void;
|
|
6
6
|
} & InputHTMLAttributes<HTMLInputElement>;
|
|
7
7
|
export declare const BasicInput: FunctionComponent<BasicInputProps>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CompleteThemeSettings } from '../../../types';
|
|
2
2
|
import { type FunctionComponent, type ButtonHTMLAttributes } from 'react';
|
|
3
|
+
type Variant = 'white' | 'grey';
|
|
3
4
|
type InputProps = {
|
|
4
|
-
variant?:
|
|
5
|
-
label
|
|
5
|
+
variant?: Variant;
|
|
6
|
+
label?: string;
|
|
6
7
|
isActive?: boolean;
|
|
7
8
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
8
9
|
type ThemeMixin = {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orientation options for the filter tile. The filter tile can
|
|
3
|
+
* be arranged vertically, or horizontally to fit most toolbars.
|
|
4
|
+
*/
|
|
5
|
+
export type FilterVariant = 'vertical' | 'horizontal';
|
|
6
|
+
/**
|
|
7
|
+
* Determines whether the arrangement of the filter menu is vertical.
|
|
8
|
+
*
|
|
9
|
+
* @param arrangement - Arrangement of the filter menu
|
|
10
|
+
* @returns True if the arrangement is vertical, false otherwise
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare const isVertical: (arrangement: FilterVariant) => boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { FilterOptionType,
|
|
2
|
+
import { FilterOptionType, CriteriaFilterValueType } from './criteria-filter-operations';
|
|
3
3
|
import { Measure } from '@sisense/sdk-data';
|
|
4
|
+
import { FilterVariant } from '../common/filter-utils';
|
|
4
5
|
/**
|
|
5
6
|
* Props for {@link CriteriaFilterMenu}
|
|
6
7
|
*
|
|
@@ -28,7 +28,6 @@ export declare const FilterOption: {
|
|
|
28
28
|
LIKE: string;
|
|
29
29
|
};
|
|
30
30
|
export type FilterOptionType = keyof typeof FilterOption;
|
|
31
|
-
export type FilterVariant = 'vertical' | 'horizontal';
|
|
32
31
|
/**
|
|
33
32
|
* Object containing related information for a filter option,
|
|
34
33
|
* including the function to be used for filtering, the number of inputs,
|
|
@@ -54,14 +53,6 @@ export type FilterInfo = {
|
|
|
54
53
|
export declare const CRITERIA_FILTER_MAP: {
|
|
55
54
|
[key: string]: FilterInfo;
|
|
56
55
|
};
|
|
57
|
-
/**
|
|
58
|
-
* Determines whether the arrangement of the filter menu is vertical.
|
|
59
|
-
*
|
|
60
|
-
* @param arrangement - Arrangement of the filter menu
|
|
61
|
-
* @returns True if the arrangement is vertical, false otherwise
|
|
62
|
-
* @internal
|
|
63
|
-
*/
|
|
64
|
-
export declare const isVertical: (arrangement: FilterVariant) => boolean;
|
|
65
56
|
/**
|
|
66
57
|
* Given an input filter, use the filterType and operators to determine
|
|
67
58
|
* the corresponding {@link FilterOption} and {@link FilterInfo}.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FilterVariant } from './criteria-filter-operations.js';
|
|
3
2
|
import { ExcludeFilter, Filter, Measure, NumericFilter, RankingFilter, TextFilter } from '@sisense/sdk-data';
|
|
3
|
+
import { FilterVariant } from '../common/filter-utils.js';
|
|
4
4
|
/**
|
|
5
5
|
* Props for {@link CriteriaFilterTile}
|
|
6
6
|
*/
|
|
@@ -25,7 +25,7 @@ export type CriteriaFilterType = NumericFilter | TextFilter | RankingFilter | Ex
|
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* ```tsx
|
|
28
|
-
* const initialRevenueFilter =
|
|
28
|
+
* const initialRevenueFilter = filterFactory.greaterThanOrEqual(DM.Commerce.Revenue, 10000);
|
|
29
29
|
* const [revenueFilter, setRevenueFilter] = useState<Filter | null>(initialRevenueFilter);
|
|
30
30
|
*
|
|
31
31
|
* return (
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
|
-
export type SelectorMode = 'fromSelector' | 'toSelector';
|
|
3
|
+
export type SelectorMode = 'fromSelector' | 'toSelector' | 'pointSelector';
|
|
4
4
|
export type DateRangeLimits = {
|
|
5
|
-
maxDate
|
|
6
|
-
minDate
|
|
5
|
+
maxDate?: dayjs.Dayjs;
|
|
6
|
+
minDate?: dayjs.Dayjs;
|
|
7
7
|
};
|
|
8
8
|
type DayjsDateRange = {
|
|
9
9
|
from: dayjs.Dayjs;
|
|
@@ -11,10 +11,12 @@ type DayjsDateRange = {
|
|
|
11
11
|
};
|
|
12
12
|
export type CalendarDateSelectorProps = {
|
|
13
13
|
selectorMode: SelectorMode;
|
|
14
|
-
limit
|
|
15
|
-
onDateRangeChanged
|
|
16
|
-
onSelectorModeChanged
|
|
17
|
-
selectedDateRange
|
|
14
|
+
limit?: DateRangeLimits;
|
|
15
|
+
onDateRangeChanged?: (dateRange: DayjsDateRange) => void;
|
|
16
|
+
onSelectorModeChanged?: (newSelectorMode: SelectorMode) => void;
|
|
17
|
+
selectedDateRange?: DayjsDateRange;
|
|
18
|
+
onDateChanged?: (selectedDate: dayjs.Dayjs) => void;
|
|
19
|
+
selectedDate?: dayjs.Dayjs;
|
|
18
20
|
};
|
|
19
|
-
export declare function CalendarDateSelector({ selectedDateRange, limit, onDateRangeChanged, selectorMode, onSelectorModeChanged, }: CalendarDateSelectorProps): JSX.Element;
|
|
21
|
+
export declare function CalendarDateSelector({ selectedDateRange, limit, onDateRangeChanged, selectorMode, onSelectorModeChanged, onDateChanged, selectedDate, }: CalendarDateSelectorProps): JSX.Element;
|
|
20
22
|
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import dayjs from 'dayjs';
|
|
3
|
-
type ButtonId = 'earliest' | 'today' | 'latest';
|
|
3
|
+
export type ButtonId = 'earliest' | 'today' | 'latest';
|
|
4
4
|
type QuickDateSelectionButtonsProps = {
|
|
5
5
|
onDateSelected: (selectedDate: dayjs.Dayjs) => void;
|
|
6
6
|
enabledButtons: ButtonId[];
|
|
7
|
-
limit
|
|
8
|
-
maxDate
|
|
9
|
-
minDate
|
|
7
|
+
limit?: {
|
|
8
|
+
maxDate?: dayjs.Dayjs;
|
|
9
|
+
minDate?: dayjs.Dayjs;
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
export declare const QuickDateSelectionButtons: (props: QuickDateSelectionButtonsProps) => JSX.Element;
|
package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export interface DateRangeFilterTileProps {
|
|
|
49
49
|
* React example of configuring the date min max values and handling onChange event.
|
|
50
50
|
* ```tsx
|
|
51
51
|
* const [dateRangeFilter, setDateRangeFilter] = useState<Filter>(
|
|
52
|
-
*
|
|
52
|
+
* filterFactory.dateRange(DM.Commerce.Date.Years),
|
|
53
53
|
* );
|
|
54
54
|
*
|
|
55
55
|
* return (
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RelativeDateFilterTile, type RelativeDateFilterTileProps, } from './relative-date-filter-tile.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RelativeDateFilter } from '@sisense/sdk-data';
|
|
2
|
+
import { FunctionComponent } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export type RelativeDateFilterDisplayProps = {
|
|
7
|
+
filter: RelativeDateFilter;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Displays a relative date filter as a human-readable string.
|
|
11
|
+
*
|
|
12
|
+
* @internal
|
|
13
|
+
*/
|
|
14
|
+
export declare const RelativeDateFilterDisplay: FunctionComponent<RelativeDateFilterDisplayProps>;
|
package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Filter } from '@sisense/sdk-data';
|
|
3
|
+
import { FilterVariant } from '../../common/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link RelativeDateFilterTile}
|
|
6
|
+
*/
|
|
7
|
+
export interface RelativeDateFilterTileProps {
|
|
8
|
+
/**Filter tile title */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Relative date filter. */
|
|
11
|
+
filter: Filter;
|
|
12
|
+
/** Arrangement of the filter inputs. Use vertical for standard filter tiles and horizontal for toolbars */
|
|
13
|
+
arrangement?: FilterVariant;
|
|
14
|
+
/**
|
|
15
|
+
* Callback function that is called when the relative date filter object should be updated.
|
|
16
|
+
*
|
|
17
|
+
* @param filter - Relative date filter, or null for failure/disabled
|
|
18
|
+
*/
|
|
19
|
+
onUpdate: (filter: Filter | null) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Limit of the date range that can be selected.
|
|
22
|
+
*/
|
|
23
|
+
limit?: {
|
|
24
|
+
maxDate: string;
|
|
25
|
+
minDate: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* UI component that allows the user to filter date attributes according to
|
|
30
|
+
* a number of built-in operations defined in the relative date filter.
|
|
31
|
+
* Useful for filtering data by relative date ranges, such as "last 7 days" or "next 30 days from Date".
|
|
32
|
+
*
|
|
33
|
+
* @param props - Relative date filter tile props
|
|
34
|
+
* @returns Relative date filter tile component
|
|
35
|
+
*/
|
|
36
|
+
export declare const RelativeDateFilterTile: import("react").FunctionComponent<RelativeDateFilterTileProps>;
|
package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Filter, RelativeDateFilter as RelativeDateFilterType } from '@sisense/sdk-data';
|
|
2
|
+
import { FilterVariant } from '../../common/index.js';
|
|
3
|
+
import { FunctionComponent } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface RelativeDateFilterProps {
|
|
8
|
+
filter: RelativeDateFilterType;
|
|
9
|
+
arrangement?: FilterVariant;
|
|
10
|
+
onUpdate: (filter: Filter | null) => void;
|
|
11
|
+
disabled: boolean;
|
|
12
|
+
limit?: {
|
|
13
|
+
maxDate: string;
|
|
14
|
+
minDate: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare const RelativeDateFilter: FunctionComponent<RelativeDateFilterProps>;
|
|
21
|
+
export declare const DATE_OPS_MAP: {
|
|
22
|
+
[x: string]: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const DATE_LEVELS_MAP: {
|
|
25
|
+
[x: string]: string;
|
|
26
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { FilterVariant } from './
|
|
2
|
+
import { FilterVariant } from './common/filter-utils';
|
|
3
3
|
interface Props {
|
|
4
4
|
title: string;
|
|
5
5
|
renderContent: (collapsed: boolean, tileDisabled: boolean) => ReactNode;
|
package/dist/filters/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @packageDocumentation
|
|
3
|
-
* @beta
|
|
4
3
|
*/
|
|
5
4
|
export { ClientApplication, createClientApplication } from './app/client-application';
|
|
6
5
|
export * from './chart-data-options/types';
|
|
@@ -28,11 +27,15 @@ export * from './indicator-chart';
|
|
|
28
27
|
export * from './table';
|
|
29
28
|
export * from './treemap-chart';
|
|
30
29
|
export * from './sunburst-chart';
|
|
30
|
+
export * from './boxplot-chart';
|
|
31
|
+
export * from './scattermap-chart';
|
|
32
|
+
export * from './areamap-chart';
|
|
31
33
|
export * from './sisense-context/custom-sisense-context-provider';
|
|
32
34
|
export * from './theme-provider/custom-theme-provider';
|
|
33
35
|
export { getThemeSettingsByOid } from './themes/theme-loader';
|
|
34
36
|
export { getDefaultThemeSettings } from './chart-options-processor/theme-option-service';
|
|
35
37
|
export { useGetDashboardModel, useGetDashboardModels, getDashboardModel, getDashboardModels, useGetWidgetModel, getWidgetModel, type DashboardModel, type GetDashboardModelParams, type GetDashboardModelsParams, type DashboardModelState, type DashboardModelLoadingState, type DashboardModelSuccessState, type DashboardModelErrorState, type DashboardModelsState, type DashboardModelsLoadingState, type DashboardModelsSuccessState, type DashboardModelsErrorState, type WidgetModel, type WidgetDataOptions, type WidgetModelState, type WidgetModelLoadingState, type WidgetModelErrorState, type WidgetModelSuccessState, type GetWidgetModelParams, type GetDashboardModelOptions, type GetDashboardModelsOptions, } from './models';
|
|
38
|
+
export { boxWhiskerProcessResult } from './boxplot-utils';
|
|
36
39
|
export * from './props';
|
|
37
40
|
export * from './types';
|
|
38
41
|
export * from './filters';
|