@sisense/sdk-ui 1.30.0 → 1.32.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.cjs +22 -421
- package/dist/ai.js +1825 -1769
- package/dist/analytics-composer.cjs +58 -58
- package/dist/analytics-composer.js +312 -290
- package/dist/derive-chart-family-7Fxxf6Sy.cjs +758 -0
- package/dist/derive-chart-family-CVwj-7u5.js +100883 -0
- package/dist/index.cjs +27 -833
- package/dist/index.js +11550 -9945
- package/dist/packages/sdk-ui/src/ai/api/chat-rest-api.d.ts +1 -3
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +6 -0
- package/dist/packages/sdk-ui/src/ai/chatbot.d.ts +2 -2
- package/dist/packages/sdk-ui/src/ai/custom-ai-context-provider.d.ts +13 -0
- package/dist/packages/sdk-ui/src/ai/index.d.ts +7 -4
- package/dist/packages/sdk-ui/src/ai/use-get-nlg-insights.d.ts +2 -0
- package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +12 -5
- package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +9 -5
- package/dist/packages/sdk-ui/src/analytics-composer/common/constants.d.ts +1 -0
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +13 -6
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +11 -1
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +15 -0
- package/dist/packages/sdk-ui/src/chart/helpers/get-load-data-function.d.ts +16 -0
- package/dist/packages/sdk-ui/src/chart/helpers/use-chart-data-preparation.d.ts +17 -0
- package/dist/packages/sdk-ui/src/chart/helpers/use-synced-data.d.ts +3 -1
- package/dist/packages/sdk-ui/src/chart/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/areamap-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data/areamap-data.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data/geo-data-coloring-function.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data-options/data-options.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/design-options/design-options.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/design-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/areamap-map.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/renderer/areamap-utils.d.ts +12 -0
- package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/areamap.d.ts +5 -5
- package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/feature-styles-dictionary.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/renderer/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/use-geo-json.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/types.d.ts +35 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/bar-chart/bar-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/chart-builder-factory.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/column-chart/column-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/cartesians/data-options.d.ts +27 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/cartesians/data.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/cartesians/stackable/design-options.d.ts +5 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/data-loading.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +100 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/utils.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart-data/chart-data-service.d.ts +1 -13
- package/dist/packages/sdk-ui/src/chart-data/types.d.ts +3 -29
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +6 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +9 -8
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +1 -7
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +2 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +2 -1
- package/dist/packages/sdk-ui/src/common/components/popper.d.ts +9 -0
- package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts +14 -0
- package/dist/packages/sdk-ui/src/common/hooks/use-was-modified.d.ts +5 -0
- package/dist/packages/sdk-ui/src/const.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-tabber.d.ts +18 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-widgets-layout.d.ts +14 -0
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +7 -2
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +7 -2
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +19 -19
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +8 -7
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-filter/date-range-calculator.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +3 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/input.d.ts +11 -3
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/scroll-wrapper.d.ts +13 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/search-input.d.ts +4 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/base.d.ts +5 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/calendar-select.d.ts +27 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/types.d.ts +14 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/utils.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/members-list-select.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-multi-select.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-single-select.d.ts +21 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/single-select.d.ts +3 -2
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/types.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/small-loader.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/constants.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-container.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-datetime.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-numerical.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-textual.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-datetime-formatter.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-get-attribute-stats.d.ts +28 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/common/granularities.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-condition-section/condition-forms/datetime-exclude-condition-form.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-condition-section/condition-forms/datetime-is-within-condition-form.d.ts +10 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-condition-section/datetime-condition-section.d.ts +12 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-condition-section/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-members-section.d.ts +12 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-range-section.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-relative-section.d.ts +9 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/members-section.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/numeric-condition-section.d.ts +10 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/types.d.ts +16 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/utils.d.ts +7 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-range-section.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/text-condition-section.d.ts +4 -2
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/types.d.ts +4 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/utils.d.ts +4 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/utils.d.ts +13 -1
- package/dist/packages/sdk-ui/src/filters/components/icons/date-icon.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/icons/equal-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/greater-than-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/greater-than-or-equal-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/index.d.ts +6 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/not-equal-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/smaller-than-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/smaller-than-or-equal-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-filter-tile.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/hooks/use-get-filter-members.d.ts +23 -2
- package/dist/packages/sdk-ui/src/index-typedoc.d.ts +28 -0
- package/dist/packages/sdk-ui/src/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +7 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +2 -1
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +9 -1
- package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +1 -1
- package/dist/packages/sdk-ui/src/plugins-provider/custom-plugins-provider.d.ts +8 -8
- package/dist/packages/sdk-ui/src/plugins-provider/plugins-context.d.ts +6 -6
- package/dist/packages/sdk-ui/src/plugins-provider/plugins-provider.d.ts +3 -3
- package/dist/packages/sdk-ui/src/plugins-provider/types.d.ts +2 -1
- package/dist/packages/sdk-ui/src/props.d.ts +35 -15
- package/dist/packages/sdk-ui/src/query-execution/types.d.ts +10 -1
- package/dist/packages/sdk-ui/src/sisense-chart/sisense-chart.d.ts +1 -16
- package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +16 -1
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +51 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +102 -0
- package/dist/packages/sdk-ui/src/types.d.ts +52 -1
- package/dist/packages/sdk-ui/src/utils/generate-attribute-name.d.ts +2 -0
- package/dist/packages/sdk-ui/src/utils/is-numeric-string.d.ts +10 -0
- package/dist/packages/sdk-ui/src/utils/utility-types.d.ts +34 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +1 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options.d.ts +16 -5
- package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +35 -0
- package/dist/use-common-filters-BanIIIUW.js +28409 -0
- package/dist/use-common-filters-BeKQ1bKU.cjs +271 -0
- package/dist/{widget-composer-Ch2kYMok.js → widget-composer-4bEKHitq.js} +275 -259
- package/dist/widget-composer-NDI4zssI.cjs +316 -0
- package/package.json +11 -9
- package/dist/derive-chart-family-B2J2kMs6.js +0 -44404
- package/dist/derive-chart-family-Bmg9hQGc.cjs +0 -271
- package/dist/packages/sdk-ui/src/ai/use-get-data-source-fields.d.ts +0 -12
- package/dist/packages/sdk-ui/src/chart-data/areamap-data.d.ts +0 -4
- package/dist/packages/sdk-ui/src/chart-data/data-coloring/geo-data-coloring-function.d.ts +0 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +0 -3
- package/dist/packages/sdk-ui/src/charts/map-charts/areamap/areamap-utils.d.ts +0 -11
- package/dist/useQuery-1ixYW8qO.js +0 -83434
- package/dist/useQuery-Ctzmd-JM.cjs +0 -916
- package/dist/widget-composer-CdxKUwZf.cjs +0 -308
- /package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/alternative-country-names-dictionary.d.ts +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Attribute, Measure, QueryResultData } from '@sisense/sdk-data';
|
|
3
|
+
import { QueryDescription, QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
4
|
+
import type { AreamapStyleOptions, ChartDataOptions, ChartStyleOptions, ScattermapStyleOptions, StackableStyleOptions } from '../../types';
|
|
5
|
+
import type { SisenseChartProps } from '../../sisense-chart';
|
|
6
|
+
import type { ChartRendererProps } from '../../chart';
|
|
7
|
+
import type { CartesianChartData, ScattermapChartData } from '../../chart-data/types';
|
|
8
|
+
import { AreamapChartDataOptions, AreamapChartDataOptionsInternal, CartesianChartDataOptions, CartesianChartDataOptionsInternal, ChartDataOptionsInternal, ScattermapChartDataOptions, ScattermapChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
9
|
+
import { DesignOptions } from '../../chart-options-processor/translations/types';
|
|
10
|
+
import { DataTable } from '../../chart-data-processor/table-processor';
|
|
11
|
+
import { ClientApplication } from '../../app/client-application';
|
|
12
|
+
import { AreamapProps } from '../../chart/restructured-charts/areamap-chart/renderer';
|
|
13
|
+
import { ScattermapProps } from '../../charts/map-charts/scattermap/scattermap';
|
|
14
|
+
import { AreamapData } from './areamap-chart/types';
|
|
15
|
+
export type SupportedChartType = 'areamap' | 'column' | 'bar';
|
|
16
|
+
export type TypedChartDataOptions<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapChartDataOptions : CT extends 'scattermap' ? ScattermapChartDataOptions : CT extends 'column' | 'bar' ? CartesianChartDataOptions : never;
|
|
17
|
+
export type TypedDataOptionsInternal<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapChartDataOptionsInternal : CT extends 'scattermap' ? ScattermapChartDataOptionsInternal : CT extends 'column' | 'bar' ? CartesianChartDataOptionsInternal : never;
|
|
18
|
+
export type TypedChartStyleOptions<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapStyleOptions : CT extends 'scattermap' ? ScattermapStyleOptions : CT extends 'column' | 'bar' ? StackableStyleOptions : never;
|
|
19
|
+
export type TypedDesignOptions<CT extends SupportedChartType> = DesignOptions<CT>;
|
|
20
|
+
export type TypedChartData<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapData : CT extends 'scattermap' ? ScattermapChartData : CT extends 'column' | 'bar' ? CartesianChartData : never;
|
|
21
|
+
export type TypedLoadDataFunction<CT extends SupportedChartType> = (options: {
|
|
22
|
+
app: ClientApplication;
|
|
23
|
+
chartDataOptionsInternal: TypedDataOptionsInternal<CT>;
|
|
24
|
+
queryDescription: QueryDescription;
|
|
25
|
+
executionConfig?: QueryExecutionConfig;
|
|
26
|
+
}) => Promise<QueryResultData>;
|
|
27
|
+
export type TypedChartRendererProps<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapProps : CT extends 'scattermap' ? ScattermapProps : CT extends 'column' | 'bar' ? SisenseChartProps : never;
|
|
28
|
+
/**
|
|
29
|
+
* Chart builder interface.
|
|
30
|
+
*/
|
|
31
|
+
export interface ChartBuilder<CT extends SupportedChartType = SupportedChartType> {
|
|
32
|
+
/**
|
|
33
|
+
* Data options translation utils.
|
|
34
|
+
*/
|
|
35
|
+
dataOptions: {
|
|
36
|
+
/**
|
|
37
|
+
* Translates the data options to the internal format.
|
|
38
|
+
*/
|
|
39
|
+
translateDataOptionsToInternal: (dataOptions: TypedChartDataOptions<CT>) => TypedDataOptionsInternal<CT>;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the attributes from the internal data options.
|
|
42
|
+
*/
|
|
43
|
+
getAttributes: (internalDataOptions: TypedDataOptionsInternal<CT>) => Attribute[];
|
|
44
|
+
/**
|
|
45
|
+
* Returns the measures from the internal data options.
|
|
46
|
+
*/
|
|
47
|
+
getMeasures: (internalDataOptions: TypedDataOptionsInternal<CT>) => Measure[];
|
|
48
|
+
/**
|
|
49
|
+
* Validates and cleans the data options if needed.
|
|
50
|
+
*/
|
|
51
|
+
validateAndCleanDataOptions?: (dataOptions: TypedChartDataOptions<CT>) => TypedChartDataOptions<CT>;
|
|
52
|
+
/**
|
|
53
|
+
* Checks if the data options are correct for the current chart type.
|
|
54
|
+
*/
|
|
55
|
+
isCorrectDataOptions: (dataOptions: ChartDataOptions) => dataOptions is TypedChartDataOptions<CT>;
|
|
56
|
+
/**
|
|
57
|
+
* Checks if the data options are correct for the internal format.
|
|
58
|
+
*/
|
|
59
|
+
isCorrectDataOptionsInternal: (dataOptions: ChartDataOptionsInternal) => dataOptions is TypedDataOptionsInternal<CT>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Data retrieving and translation utils.
|
|
63
|
+
*/
|
|
64
|
+
data: {
|
|
65
|
+
/**
|
|
66
|
+
* Loads the data from backend.
|
|
67
|
+
*/
|
|
68
|
+
loadData: TypedLoadDataFunction<CT>;
|
|
69
|
+
/**
|
|
70
|
+
* Translates the data table to the chart data.
|
|
71
|
+
*/
|
|
72
|
+
getChartData: (chartDataOptions: TypedDataOptionsInternal<CT>, dataTable: DataTable) => TypedChartData<CT>;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Design options translation utils.
|
|
76
|
+
*/
|
|
77
|
+
designOptions: {
|
|
78
|
+
/**
|
|
79
|
+
* Translates the style options to the design options.
|
|
80
|
+
*/
|
|
81
|
+
translateStyleOptionsToDesignOptions: (styleOptions: TypedChartStyleOptions<CT>, dataOptionsInternal: TypedDataOptionsInternal<CT>) => TypedDesignOptions<CT>;
|
|
82
|
+
/**
|
|
83
|
+
* Checks if the style options are correct for the current chart type.
|
|
84
|
+
*/
|
|
85
|
+
isCorrectStyleOptions: (styleOptions: ChartStyleOptions) => styleOptions is TypedChartStyleOptions<CT>;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Chart renderer component and related utils
|
|
89
|
+
*/
|
|
90
|
+
renderer: {
|
|
91
|
+
/**
|
|
92
|
+
* Chart renderer component.
|
|
93
|
+
*/
|
|
94
|
+
ChartRendererComponent: React.ComponentType<TypedChartRendererProps<CT>>;
|
|
95
|
+
/**
|
|
96
|
+
* Type guard for the chart renderer props.
|
|
97
|
+
*/
|
|
98
|
+
isCorrectRendererProps: (props: ChartRendererProps) => props is TypedChartRendererProps<CT>;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import { ChartDataOptionsInternal } from '../chart-data-options/types';
|
|
2
2
|
import { DataTable } from '../chart-data-processor/table-processor';
|
|
3
|
-
import type { ChartType
|
|
3
|
+
import type { ChartType } from '../types';
|
|
4
4
|
import { ChartData } from './types';
|
|
5
5
|
export declare const chartDataService: (chartType: ChartType, chartDataOptions: ChartDataOptionsInternal, dataTable: DataTable) => ChartData;
|
|
6
|
-
export type ValueColumn = {
|
|
7
|
-
column: string;
|
|
8
|
-
agg: string;
|
|
9
|
-
columnTitle: string;
|
|
10
|
-
enabled: boolean;
|
|
11
|
-
sort: SortDirection;
|
|
12
|
-
showOnRightAxis?: boolean;
|
|
13
|
-
numberFormatConfig?: NumberFormatConfig;
|
|
14
|
-
chartType?: SeriesChartType;
|
|
15
|
-
color?: string;
|
|
16
|
-
legacyInstanceId?: string;
|
|
17
|
-
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { NumberFormatConfig } from '../types';
|
|
2
|
+
import { IndicatorChartType } from '../chart-options-processor/translations/types';
|
|
3
3
|
import { ComparableData, Value } from '../chart-data-processor/table-processor';
|
|
4
4
|
import { Coordinates } from '../charts/map-charts/scattermap/types';
|
|
5
|
+
import { AreamapData } from '../chart/restructured-charts/areamap-chart/types';
|
|
5
6
|
export type CategoricalXValues = {
|
|
6
7
|
key: string;
|
|
7
8
|
xValues: string[];
|
|
@@ -124,33 +125,6 @@ export type IndicatorChartData = {
|
|
|
124
125
|
min?: number;
|
|
125
126
|
max?: number;
|
|
126
127
|
};
|
|
127
|
-
/**
|
|
128
|
-
* Raw GeoDataElement from data
|
|
129
|
-
*/
|
|
130
|
-
export type RawGeoDataElement = {
|
|
131
|
-
/** Name of geo-element (country or state) */
|
|
132
|
-
geoName: string;
|
|
133
|
-
/** Original numeric measure value for this geo-element */
|
|
134
|
-
originalValue: number;
|
|
135
|
-
/** Formatted measure value for this geo-element to display*/
|
|
136
|
-
formattedOriginalValue: string;
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* GeoDataElement with color property, calculated from `originalValue`
|
|
140
|
-
*/
|
|
141
|
-
export type GeoDataElement = RawGeoDataElement & {
|
|
142
|
-
/** Calculated color for this geo-element */
|
|
143
|
-
color?: Color;
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* Fact final data that will be passed to Areamap-component to render
|
|
147
|
-
*
|
|
148
|
-
* @internal
|
|
149
|
-
*/
|
|
150
|
-
export type AreamapData = {
|
|
151
|
-
type: AreamapChartType;
|
|
152
|
-
geoData: GeoDataElement[];
|
|
153
|
-
};
|
|
154
128
|
/**
|
|
155
129
|
* Fact final data that will be passed to chart-component to render
|
|
156
130
|
*
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
1
|
+
import { CartesianChartDataOptionsInternal, ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
2
2
|
import { ChartStyleOptions, ChartType } from '../../types';
|
|
3
|
-
import { DesignOptions, SeriesDesignOptions } from '../translations/types';
|
|
3
|
+
import { CartesianChartType, DesignOptions, SeriesDesignOptions } from '../translations/types';
|
|
4
4
|
export declare function prepareChartDesignOptions(chartType: ChartType, dataOptionsInternal: ChartDataOptionsInternal, styleOptions?: ChartStyleOptions): DesignOptions;
|
|
5
5
|
export declare function extendStyleOptionsWithDefaults(styleOptions: ChartStyleOptions, defaults: ChartStyleOptions): ChartStyleOptions;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Get design options per series for cartesian charts
|
|
8
|
+
*/
|
|
9
|
+
export declare function getDesignOptionsPerSeries(dataOptionsInternal: CartesianChartDataOptionsInternal, chartType: CartesianChartType, styleOptions: ChartStyleOptions): Record<string, SeriesDesignOptions>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { Legend, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions } from '../../types';
|
|
2
|
-
import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions, SunburstChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions } from '../translations/design-options';
|
|
1
|
+
import { Legend, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, BaseStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, BaseAxisStyleOptions, ChartStyleOptions, ChartType } from '../../types';
|
|
2
|
+
import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions, SunburstChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions, BaseDesignOptionsType } from '../translations/design-options';
|
|
3
3
|
import { LegendPosition } from '../translations/legend-section';
|
|
4
4
|
import { StackType } from '../translations/translations-to-highcharts';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { CartesianChartType, SeriesDesignOptions } from '../translations/types';
|
|
6
|
+
import { CartesianChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
7
7
|
export declare const getLegend: (legend?: Legend) => LegendPosition;
|
|
8
8
|
export declare const DefaultStackType: StackType;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const getCartesianChartStyle: (styleOptions: BaseStyleOptions & BaseAxisStyleOptions, shouldHaveY2Axis: boolean) => BaseDesignOptionsType;
|
|
10
|
+
export declare const getStackableChartDesignOptions: (styleOptions: AreaStyleOptions | StackableStyleOptions, dataOptions: CartesianChartDataOptionsInternal, hasY2Axis: boolean, chartType: CartesianChartType) => StackableChartDesignOptions;
|
|
10
11
|
export declare const getSeriesChartDesignOptions: (chartType: ChartType, styleOptions: ChartStyleOptions) => SeriesDesignOptions;
|
|
11
|
-
export declare const getLineChartDesignOptions: (styleOptions: LineStyleOptions, dataOptions:
|
|
12
|
-
export declare const getAreaChartDesignOptions: (styleOptions: AreaStyleOptions, dataOptions:
|
|
12
|
+
export declare const getLineChartDesignOptions: (styleOptions: LineStyleOptions, dataOptions: CartesianChartDataOptionsInternal, hasY2Axis: boolean) => LineChartDesignOptions;
|
|
13
|
+
export declare const getAreaChartDesignOptions: (styleOptions: AreaStyleOptions, dataOptions: CartesianChartDataOptionsInternal, hasY2Axis: boolean) => AreaChartDesignOptions;
|
|
13
14
|
export declare const DefaultPieType = "classic";
|
|
14
15
|
export declare const getPieChartDesignOptions: (styleOptions: PieStyleOptions) => PieChartDesignOptions;
|
|
15
16
|
export declare const getFunnelChartDesignOptions: (styleOptions: FunnelStyleOptions) => FunnelChartDesignOptions;
|
|
16
17
|
export declare const getTreemapChartDesignOptions: (styleOptions: TreemapStyleOptions) => TreemapChartDesignOptions;
|
|
17
18
|
export declare const getSunburstChartDesignOptions: (styleOptions: SunburstStyleOptions) => SunburstChartDesignOptions;
|
|
18
|
-
export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions, dataOptions:
|
|
19
|
+
export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions, dataOptions: CartesianChartDataOptionsInternal) => PolarChartDesignOptions;
|
|
19
20
|
export declare const getScatterChartDesignOptions: (styleOptions: ScatterStyleOptions) => ScatterChartDesignOptions;
|
|
20
21
|
export declare const getBoxplotChartDesignOptions: (styleOptions: BoxplotStyleOptions) => BoxplotChartDesignOptions;
|
|
21
22
|
export declare const getScattermapChartDesignOptions: (styleOptions: ScattermapStyleOptions) => ScattermapChartDesignOptions;
|
|
@@ -5,7 +5,7 @@ import { LegendPosition } from './legend-section';
|
|
|
5
5
|
import { LineType, StackType } from './translations-to-highcharts';
|
|
6
6
|
import { PieType, PieLabels } from './pie-plot-options';
|
|
7
7
|
import { FunnelSize, FunnelType, FunnelDirection, FunnelLabels } from './funnel-plot-options';
|
|
8
|
-
import {
|
|
8
|
+
import { Convolution, ScattermapMarkers, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
|
|
9
9
|
import { ScatterMarkerSize } from './scatter-plot-options';
|
|
10
10
|
import { DesignPerSeries } from './types';
|
|
11
11
|
type DataLimits = {
|
|
@@ -62,12 +62,6 @@ export type SunburstChartDesignOptions = BaseDesignOptionsType & SunburstStyleOp
|
|
|
62
62
|
export type ScatterChartDesignOptions = BaseDesignOptionsType & {
|
|
63
63
|
markerSize?: ScatterMarkerSize;
|
|
64
64
|
};
|
|
65
|
-
/**
|
|
66
|
-
* Configuration for Areamap design options
|
|
67
|
-
*/
|
|
68
|
-
export type AreamapChartDesignOptions = BaseDesignOptionsType & {
|
|
69
|
-
mapType: AreamapType;
|
|
70
|
-
};
|
|
71
65
|
/**
|
|
72
66
|
* Configuration for Table color options
|
|
73
67
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { StyledMeasureColumn, StyledColumn } from '../../chart-data-options/types.js';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const formatTooltipValue: (dataOption: StyledMeasureColumn | StyledColumn | undefined, value: number | undefined, displayValue: string) => string;
|
|
4
|
-
export declare const formatTooltipXValue: (dataOption: StyledMeasureColumn | StyledColumn | undefined, value: number | string | undefined, displayValue: string) => string;
|
|
2
|
+
export declare const isValueNumeric: (value: StyledMeasureColumn | StyledColumn | undefined) => boolean | "";
|
|
3
|
+
export declare const formatTooltipValue: (dataOption: StyledMeasureColumn | StyledColumn | undefined, value: number | string | undefined, displayValue: string) => string;
|
|
5
4
|
export declare function isTooltipPercentValueSupported(options: StyledMeasureColumn | undefined): boolean;
|
|
6
5
|
export type TooltipSettings = {
|
|
7
6
|
enabled?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { AreamapChartDesignOptions } from '../../chart/restructured-charts/areamap-chart/types';
|
|
1
2
|
import { ChartType } from '../../types';
|
|
2
|
-
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions,
|
|
3
|
+
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions, AreaRangeChartDesignOptions, BaseDesignOptionsType } from './design-options';
|
|
3
4
|
export declare const POLAR_CHART_TYPES: readonly ["polar"];
|
|
4
5
|
export type PolarChartType = (typeof POLAR_CHART_TYPES)[number];
|
|
5
6
|
export declare const CARTESIAN_CHART_TYPES: readonly ["line", "area", "bar", "column", "polar"];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type PopperProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
open: boolean;
|
|
5
|
+
anchorEl: HTMLElement | null;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
};
|
|
8
|
+
export declare const Popper: ({ children, open, anchorEl, style }: PopperProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { RestApiHookState } from '../../../utils/utility-types';
|
|
2
|
+
import { DataSource, DataSourceField } from '@sisense/sdk-data';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the fields of a data source.
|
|
5
|
+
*
|
|
6
|
+
* @param dataSource - The data source to get the fields for
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const useGetDataSourceFields: (params: {
|
|
10
|
+
dataSource: DataSource | undefined;
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
}) => DataSourceFieldsState;
|
|
13
|
+
type DataSourceFieldsState = RestApiHookState<'dataSourceFields', DataSourceField[]>;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { WidgetProps } from '../../props';
|
|
2
|
+
import { WidgetPanelLayoutManager } from '../../dashboard/hooks/use-widgets-layout';
|
|
3
|
+
import { TabberTab } from '../../types';
|
|
4
|
+
import { TabbersOptions, WidgetsPanelColumnLayout } from '../../models';
|
|
5
|
+
export type UseTabber = ({ widgets, config, }: {
|
|
6
|
+
widgets: WidgetProps[];
|
|
7
|
+
config?: TabbersOptions | undefined;
|
|
8
|
+
}) => {
|
|
9
|
+
layoutManager: WidgetPanelLayoutManager;
|
|
10
|
+
widgets: WidgetProps[];
|
|
11
|
+
};
|
|
12
|
+
export type SingleTabberConfig = {
|
|
13
|
+
tabs: TabberTab[];
|
|
14
|
+
activeTab: number;
|
|
15
|
+
};
|
|
16
|
+
export declare const isTabberWidget: (widget: WidgetProps) => boolean;
|
|
17
|
+
export declare const modifyLayout: (tabbersOptions: TabbersOptions, tabberState: Record<string, number>) => (layout: WidgetsPanelColumnLayout) => WidgetsPanelColumnLayout;
|
|
18
|
+
export declare const useTabber: UseTabber;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WidgetsPanelLayout } from '../../models';
|
|
2
|
+
export type WidgetPanelLayoutManager = {
|
|
3
|
+
manageLayout: (layout: WidgetsPanelLayout) => WidgetsPanelLayout;
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
type UseWidgetPanelLayoutManagement = ({ layout, layoutManagers, }: {
|
|
7
|
+
layout: WidgetsPanelLayout;
|
|
8
|
+
layoutManagers: WidgetPanelLayoutManager[];
|
|
9
|
+
}) => {
|
|
10
|
+
layout: WidgetsPanelLayout;
|
|
11
|
+
setLayout: (newLayout: WidgetsPanelLayout) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const useWidgetsLayoutManagement: UseWidgetPanelLayoutManagement;
|
|
14
|
+
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DashboardStyleOptions, WidgetsOptions, WidgetsPanelLayout } from '../models';
|
|
1
|
+
import { DashboardStyleOptions, TabbersOptions, WidgetsOptions, WidgetsPanelLayout } from '../models';
|
|
2
2
|
import { WidgetProps } from '../props';
|
|
3
3
|
import { DashboardChangeAction } from '../dashboard/dashboard';
|
|
4
4
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
5
5
|
export type { DashboardStyleOptions, WidgetsPanelColumnLayout } from '../models';
|
|
6
6
|
/**
|
|
7
|
-
* Props
|
|
7
|
+
* Props of the {@link DashboardById} component.
|
|
8
8
|
*/
|
|
9
9
|
export interface DashboardByIdProps {
|
|
10
10
|
/**
|
|
@@ -104,6 +104,11 @@ export interface DashboardProps {
|
|
|
104
104
|
defaultDataSource?: DataSource;
|
|
105
105
|
/** The options for each of the widgets */
|
|
106
106
|
widgetsOptions?: WidgetsOptions;
|
|
107
|
+
/**
|
|
108
|
+
* The Tabber widgets configurations as a single dashboard config
|
|
109
|
+
* @internal
|
|
110
|
+
* */
|
|
111
|
+
tabbersOptions?: TabbersOptions;
|
|
107
112
|
/** The style options for the dashboard */
|
|
108
113
|
styleOptions?: DashboardStyleOptions;
|
|
109
114
|
/**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DashboardProps } from './types.js';
|
|
1
|
+
import { DashboardLayoutOptions, DashboardProps } from './types.js';
|
|
2
2
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
3
|
-
|
|
3
|
+
import { WidgetsPanelLayout } from '../models';
|
|
4
|
+
export type ComposableDashboardProps = Pick<DashboardProps, 'filters' | 'widgets' | 'widgetsOptions' | 'layoutOptions' | 'tabbersOptions'>;
|
|
4
5
|
export type UseComposedDashboardOptions = {
|
|
5
6
|
/**
|
|
6
7
|
* @internal
|
|
@@ -16,6 +17,8 @@ export type UseComposedDashboardOptions = {
|
|
|
16
17
|
export declare function useComposedDashboardInternal<D extends ComposableDashboardProps | DashboardProps>(initialDashboard: D, { onFiltersChange }?: UseComposedDashboardOptions): {
|
|
17
18
|
dashboard: D;
|
|
18
19
|
setFilters: (filters: Filter[] | FilterRelations) => void;
|
|
20
|
+
setWidgetsLayout: (newLayout: WidgetsPanelLayout) => void;
|
|
21
|
+
layoutOptions: DashboardLayoutOptions;
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
21
24
|
* React hook that takes in separate dashboard elements and
|
|
@@ -27,4 +30,6 @@ export declare function useComposedDashboardInternal<D extends ComposableDashboa
|
|
|
27
30
|
export declare const useComposedDashboard: <D extends DashboardProps | ComposableDashboardProps>(args_0: D, args_1?: UseComposedDashboardOptions | undefined) => {
|
|
28
31
|
dashboard: D;
|
|
29
32
|
setFilters: (filters: Filter[] | FilterRelations) => void;
|
|
33
|
+
setWidgetsLayout: (newLayout: WidgetsPanelLayout) => void;
|
|
34
|
+
layoutOptions: DashboardLayoutOptions;
|
|
30
35
|
};
|
|
@@ -7,25 +7,25 @@ import { TFunction } from '@sisense/sdk-common';
|
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
9
|
export declare const FilterOption: {
|
|
10
|
-
NOT_BETWEEN:
|
|
11
|
-
TOP:
|
|
12
|
-
BOTTOM:
|
|
13
|
-
BETWEEN:
|
|
14
|
-
EQUALS_NUMERIC:
|
|
15
|
-
NOT_EQUALS_NUMERIC:
|
|
16
|
-
LESS_THAN:
|
|
17
|
-
LESS_THAN_OR_EQUAL:
|
|
18
|
-
GREATER_THAN:
|
|
19
|
-
GREATER_THAN_OR_EQUAL:
|
|
20
|
-
EQUALS_TEXT:
|
|
21
|
-
NOT_EQUALS_TEXT:
|
|
22
|
-
CONTAINS:
|
|
23
|
-
NOT_CONTAIN:
|
|
24
|
-
STARTS_WITH:
|
|
25
|
-
NOT_STARTS_WITH:
|
|
26
|
-
ENDS_WITH:
|
|
27
|
-
NOT_ENDS_WITH:
|
|
28
|
-
LIKE:
|
|
10
|
+
readonly NOT_BETWEEN: "excludefromto";
|
|
11
|
+
readonly TOP: "rankingtop";
|
|
12
|
+
readonly BOTTOM: "rankingbottom";
|
|
13
|
+
readonly BETWEEN: "numericfromto";
|
|
14
|
+
readonly EQUALS_NUMERIC: "numericequals";
|
|
15
|
+
readonly NOT_EQUALS_NUMERIC: "numericdoesntEqual";
|
|
16
|
+
readonly LESS_THAN: "numerictoNotEqual";
|
|
17
|
+
readonly LESS_THAN_OR_EQUAL: "numericto";
|
|
18
|
+
readonly GREATER_THAN: "numericfromNotEqual";
|
|
19
|
+
readonly GREATER_THAN_OR_EQUAL: "numericfrom";
|
|
20
|
+
readonly EQUALS_TEXT: "textequals";
|
|
21
|
+
readonly NOT_EQUALS_TEXT: "textdoesntEqual";
|
|
22
|
+
readonly CONTAINS: "textcontains";
|
|
23
|
+
readonly NOT_CONTAIN: "textdoesntContain";
|
|
24
|
+
readonly STARTS_WITH: "textstartsWith";
|
|
25
|
+
readonly NOT_STARTS_WITH: "textdoesntStartWith";
|
|
26
|
+
readonly ENDS_WITH: "textendsWith";
|
|
27
|
+
readonly NOT_ENDS_WITH: "textdoesntEndWith";
|
|
28
|
+
readonly LIKE: "textlike";
|
|
29
29
|
};
|
|
30
30
|
export type FilterOptionType = keyof typeof FilterOption;
|
|
31
31
|
/**
|
package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { FilterTileDesignOptions } from '../filter-tile-container.js';
|
|
|
3
3
|
import { Filter, Measure } from '@sisense/sdk-data';
|
|
4
4
|
import { FilterVariant } from '../common/filter-utils.js';
|
|
5
5
|
/**
|
|
6
|
-
* Props
|
|
6
|
+
* Props of the {@link CriteriaFilterTile} component.
|
|
7
7
|
*/
|
|
8
8
|
export interface CriteriaFilterTileProps {
|
|
9
9
|
/** Title for the filter tile, which is rendered into the header */
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
import dayjs from 'dayjs';
|
|
2
|
-
export type SelectorMode = 'fromSelector' | 'toSelector' | 'pointSelector';
|
|
2
|
+
export type SelectorMode = 'fromSelector' | 'toSelector' | 'pointSelector' | 'multiPointsSelector';
|
|
3
3
|
export type DateRangeLimits = {
|
|
4
4
|
maxDate?: dayjs.Dayjs;
|
|
5
5
|
minDate?: dayjs.Dayjs;
|
|
6
6
|
};
|
|
7
|
-
type DayjsDateRange = {
|
|
7
|
+
export type DayjsDateRange = {
|
|
8
8
|
from: dayjs.Dayjs;
|
|
9
9
|
to: dayjs.Dayjs;
|
|
10
10
|
};
|
|
11
11
|
export type CalendarDateSelectorProps = {
|
|
12
12
|
selectorMode: SelectorMode;
|
|
13
13
|
limit?: DateRangeLimits;
|
|
14
|
+
selectedDate?: dayjs.Dayjs;
|
|
15
|
+
selectedDates?: dayjs.Dayjs[];
|
|
16
|
+
selectedDateRange?: Partial<DayjsDateRange>;
|
|
17
|
+
onDateChanged?: (selectedDate: dayjs.Dayjs) => void;
|
|
18
|
+
onDatesChanged?: (selectedDates: dayjs.Dayjs[]) => void;
|
|
14
19
|
onDateRangeChanged?: (dateRange: DayjsDateRange) => void;
|
|
15
20
|
onSelectorModeChanged?: (newSelectorMode: SelectorMode) => void;
|
|
16
|
-
selectedDateRange?: DayjsDateRange;
|
|
17
|
-
onDateChanged?: (selectedDate: dayjs.Dayjs) => void;
|
|
18
|
-
selectedDate?: dayjs.Dayjs;
|
|
19
21
|
};
|
|
20
|
-
export declare function CalendarDateSelector({
|
|
21
|
-
export {};
|
|
22
|
+
export declare function CalendarDateSelector({ selectorMode, limit, selectedDate, selectedDates, selectedDateRange, onDateChanged, onDatesChanged, onDateRangeChanged, onSelectorModeChanged, }: CalendarDateSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,5 +4,5 @@ type DayjsDateRange = {
|
|
|
4
4
|
from: dayjs.Dayjs;
|
|
5
5
|
to: dayjs.Dayjs;
|
|
6
6
|
};
|
|
7
|
-
export declare function calculateNewDateRange(
|
|
7
|
+
export declare function calculateNewDateRange(existingDateRange: Partial<DayjsDateRange>, newSelectedDate: dayjs.Dayjs, selectorMode: SelectorMode): DayjsDateRange;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { LevelAttribute, DataSource, Filter } from '@sisense/sdk-data';
|
|
3
3
|
import { FilterTileDesignOptions } from '../../filter-tile-container';
|
|
4
|
+
/**
|
|
5
|
+
* Props of the {@link DateRangeFilterTile} component.
|
|
6
|
+
*/
|
|
4
7
|
export interface DateRangeFilterTileProps {
|
|
5
8
|
/**
|
|
6
9
|
* Filter tile title
|
|
@@ -3,7 +3,7 @@ import { Filter } from '@sisense/sdk-data';
|
|
|
3
3
|
import { FilterVariant } from '../../common/index.js';
|
|
4
4
|
import { FilterTileDesignOptions } from '../../filter-tile-container.js';
|
|
5
5
|
/**
|
|
6
|
-
* Props
|
|
6
|
+
* Props of the {@link RelativeDateFilterTile} component.
|
|
7
7
|
*/
|
|
8
8
|
export interface RelativeDateFilterTileProps {
|
|
9
9
|
/**Filter tile title */
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
1
|
+
import { DetailedHTMLProps, InputHTMLAttributes } from 'react';
|
|
2
|
+
export declare const BaseInput: import("@emotion/styled").StyledComponent<{
|
|
3
3
|
theme?: import("@emotion/react").Theme | undefined;
|
|
4
4
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
5
|
-
},
|
|
5
|
+
}, DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
6
|
+
type InputProps = DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement> & {
|
|
7
|
+
error?: boolean | string;
|
|
8
|
+
wrapperStyle?: React.CSSProperties;
|
|
9
|
+
inputRef?: (input: HTMLInputElement) => void;
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/scroll-wrapper.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
export type ScrollWrapperOnScrollEvent = {
|
|
3
|
+
top: number;
|
|
4
|
+
direction: 'down' | 'up';
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const ScrollWrapper: (props: {
|
|
10
|
+
onScroll?: ((event: ScrollWrapperOnScrollEvent) => void) | undefined;
|
|
11
|
+
style?: CSSProperties | undefined;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/search-input.d.ts
CHANGED
|
@@ -2,7 +2,11 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
type SearchInputProps = {
|
|
3
3
|
placeholder?: string;
|
|
4
4
|
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
value?: string;
|
|
5
6
|
style?: CSSProperties;
|
|
7
|
+
inputStyle?: CSSProperties;
|
|
8
|
+
inputRef?: (input: HTMLInputElement) => void;
|
|
9
|
+
className?: string;
|
|
6
10
|
};
|
|
7
11
|
export declare const SearchInput: (props: SearchInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
12
|
export {};
|
package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/base.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Focusable } from './types';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const SelectField: import("@emotion/styled").StyledComponent<{
|
|
4
4
|
theme?: import("@emotion/react").Theme | undefined;
|
|
5
5
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
6
6
|
} & Focusable, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -15,3 +15,7 @@ export declare const SelectLabel: import("@emotion/styled").StyledComponent<{
|
|
|
15
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
16
16
|
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
17
17
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
18
|
+
export declare const SelectIconContainer: import("@emotion/styled").StyledComponent<{
|
|
19
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
21
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { CalendarRangeValue, CalendarSelectLimits, CalendarSelectTypes } from './types';
|
|
3
|
+
type BaseCalendarSelectProps = {
|
|
4
|
+
limits?: CalendarSelectLimits;
|
|
5
|
+
style?: CSSProperties;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
primaryColor?: string;
|
|
8
|
+
primaryBackgroundColor?: string;
|
|
9
|
+
};
|
|
10
|
+
type CalendarSingleSelectProps = BaseCalendarSelectProps & {
|
|
11
|
+
type: CalendarSelectTypes.SINGLE_SELECT;
|
|
12
|
+
value?: Date;
|
|
13
|
+
onChange?: (value: Date) => void;
|
|
14
|
+
};
|
|
15
|
+
type CalendarMultiSelectProps = BaseCalendarSelectProps & {
|
|
16
|
+
type: CalendarSelectTypes.MULTI_SELECT;
|
|
17
|
+
value?: Date[];
|
|
18
|
+
onChange?: (value: Date[]) => void;
|
|
19
|
+
};
|
|
20
|
+
type CalendarRangeSelectProps = BaseCalendarSelectProps & {
|
|
21
|
+
type: CalendarSelectTypes.RANGE_FROM_SELECT | CalendarSelectTypes.RANGE_TO_SELECT;
|
|
22
|
+
value?: CalendarRangeValue;
|
|
23
|
+
onChange?: (value: CalendarRangeValue) => void;
|
|
24
|
+
};
|
|
25
|
+
type CalendarSelectProps = CalendarSingleSelectProps | CalendarMultiSelectProps | CalendarRangeSelectProps;
|
|
26
|
+
export declare function CalendarSelect(props: CalendarSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum CalendarSelectTypes {
|
|
2
|
+
SINGLE_SELECT = "single-select",
|
|
3
|
+
MULTI_SELECT = "multi-select",
|
|
4
|
+
RANGE_FROM_SELECT = "range-from-select",
|
|
5
|
+
RANGE_TO_SELECT = "range-to-select"
|
|
6
|
+
}
|
|
7
|
+
export type CalendarRangeValue = {
|
|
8
|
+
from?: Date;
|
|
9
|
+
to?: Date;
|
|
10
|
+
};
|
|
11
|
+
export type CalendarSelectLimits = {
|
|
12
|
+
minDate?: Date;
|
|
13
|
+
maxDate?: Date;
|
|
14
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DatetimeFormatter } from '../../../hooks/use-datetime-formatter';
|
|
2
|
+
import { CalendarSelectTypes } from './types';
|
|
3
|
+
import { SelectorMode } from '../../../../../../filters/components/date-filter/date-filter/calendar-date-selector';
|
|
4
|
+
export declare function getCalendarSelectedItemsDisplayValue(values: Date[], formatter: DatetimeFormatter): string | undefined;
|
|
5
|
+
export declare function getCalendarDateSelectorMode(type: CalendarSelectTypes): SelectorMode;
|