@sisense/sdk-ui 0.11.3
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/LICENSE.md +35 -0
- package/README.md +2 -0
- package/dist/alert-box/alert-box.d.ts +6 -0
- package/dist/app/client-application.d.ts +52 -0
- package/dist/app/settings/settings.d.ts +23 -0
- package/dist/app/settings/types/brand.d.ts +1 -0
- package/dist/app/settings/types/deployment-props.d.ts +37 -0
- package/dist/app/settings/types/ecm-props.d.ts +11 -0
- package/dist/app/settings/types/features.d.ts +124 -0
- package/dist/app/settings/types/globalization.d.ts +7 -0
- package/dist/app/settings/types/globals.d.ts +33 -0
- package/dist/app/settings/types/index.d.ts +1 -0
- package/dist/app/settings/types/role-manifest.d.ts +263 -0
- package/dist/app/settings/types/user.d.ts +51 -0
- package/dist/area-chart.d.ts +30 -0
- package/dist/bar-chart.d.ts +29 -0
- package/dist/chart-data/cartesian-data.d.ts +5 -0
- package/dist/chart-data/categorical-data.d.ts +5 -0
- package/dist/chart-data/chart-data-service.d.ts +18 -0
- package/dist/chart-data/filter-and-aggregate-chart-data.d.ts +4 -0
- package/dist/chart-data/indicator-data.d.ts +4 -0
- package/dist/chart-data/scatter-data.d.ts +23 -0
- package/dist/chart-data/series-data-color-service/index.d.ts +3 -0
- package/dist/chart-data/series-data-color-service/legend-color.d.ts +2 -0
- package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +4 -0
- package/dist/chart-data/series-data-color-service/types.d.ts +143 -0
- package/dist/chart-data/table-data.d.ts +6 -0
- package/dist/chart-data/types.d.ts +80 -0
- package/dist/chart-data/utils.d.ts +7 -0
- package/dist/chart-data-options/coloring/coloring-service.d.ts +22 -0
- package/dist/chart-data-options/coloring/conditional-coloring.d.ts +9 -0
- package/dist/chart-data-options/coloring/consts.d.ts +1 -0
- package/dist/chart-data-options/coloring/index.d.ts +1 -0
- package/dist/chart-data-options/coloring/range-coloring.d.ts +9 -0
- package/dist/chart-data-options/coloring/uniform-coloring.d.ts +4 -0
- package/dist/chart-data-options/translate-data-options.d.ts +7 -0
- package/dist/chart-data-options/types.d.ts +349 -0
- package/dist/chart-data-options/utils.d.ts +11 -0
- package/dist/chart-data-options/validate-data-options.d.ts +21 -0
- package/dist/chart-data-processor/categorical-distribution.d.ts +10 -0
- package/dist/chart-data-processor/data-table-date-period.d.ts +37 -0
- package/dist/chart-data-processor/distribution.d.ts +22 -0
- package/dist/chart-data-processor/row-comparator.d.ts +24 -0
- package/dist/chart-data-processor/table-creators.d.ts +39 -0
- package/dist/chart-data-processor/table-processor.d.ts +93 -0
- package/dist/chart-options-processor/apply-event-handlers.d.ts +49 -0
- package/dist/chart-options-processor/cartesian-chart-options.d.ts +18 -0
- package/dist/chart-options-processor/category-chart-options.d.ts +16 -0
- package/dist/chart-options-processor/chart-options-service.d.ts +253 -0
- package/dist/chart-options-processor/common-highcharts-option-service.d.ts +4 -0
- package/dist/chart-options-processor/defaults/cartesian.d.ts +45 -0
- package/dist/chart-options-processor/plot-bands.d.ts +23 -0
- package/dist/chart-options-processor/scatter-chart-options.d.ts +22 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +4 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +13 -0
- package/dist/chart-options-processor/style-to-design-options-translator/translate-to-indicator-options.d.ts +3 -0
- package/dist/chart-options-processor/subtype-to-design-options.d.ts +97 -0
- package/dist/chart-options-processor/theme-option-service.d.ts +11 -0
- package/dist/chart-options-processor/tooltip.d.ts +29 -0
- package/dist/chart-options-processor/translations/axis-section.d.ts +105 -0
- package/dist/chart-options-processor/translations/base-design-options.d.ts +7 -0
- package/dist/chart-options-processor/translations/design-options.d.ts +118 -0
- package/dist/chart-options-processor/translations/funnel-plot-options.d.ts +53 -0
- package/dist/chart-options-processor/translations/funnel-series.d.ts +15 -0
- package/dist/chart-options-processor/translations/legend-section.d.ts +23 -0
- package/dist/chart-options-processor/translations/marker-section.d.ts +26 -0
- package/dist/chart-options-processor/translations/navigator.d.ts +32 -0
- package/dist/chart-options-processor/translations/number-format-config.d.ts +16 -0
- package/dist/chart-options-processor/translations/pie-plot-options.d.ts +29 -0
- package/dist/chart-options-processor/translations/pie-series.d.ts +19 -0
- package/dist/chart-options-processor/translations/scatter-axis.d.ts +7 -0
- package/dist/chart-options-processor/translations/scatter-plot-options.d.ts +22 -0
- package/dist/chart-options-processor/translations/scatter-series.d.ts +23 -0
- package/dist/chart-options-processor/translations/scatter-tooltip.d.ts +21 -0
- package/dist/chart-options-processor/translations/tooltip-utils.d.ts +39 -0
- package/dist/chart-options-processor/translations/tooltip.d.ts +3 -0
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +73 -0
- package/dist/chart-options-processor/translations/treemap/treemap-labels.d.ts +6 -0
- package/dist/chart-options-processor/translations/treemap/treemap-options.d.ts +6 -0
- package/dist/chart-options-processor/translations/treemap/treemap-series.d.ts +5 -0
- package/dist/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +6 -0
- package/dist/chart-options-processor/translations/treemap/types.d.ts +19 -0
- package/dist/chart-options-processor/translations/types.d.ts +36 -0
- package/dist/chart-options-processor/translations/value-label-section.d.ts +28 -0
- package/dist/chart.d.ts +80 -0
- package/dist/charts/indicator/chart/gauge.d.ts +166 -0
- package/dist/charts/indicator/chart/indicator-helper.d.ts +47 -0
- package/dist/charts/indicator/chart/indicator.d.ts +39 -0
- package/dist/charts/indicator/chart/numeric-bar.d.ts +98 -0
- package/dist/charts/indicator/chart/numeric-simple.d.ts +91 -0
- package/dist/charts/indicator/chart/ticker.d.ts +65 -0
- package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +36 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +4 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/index.d.ts +1 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +16 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/legacy-chart-options-to-theme-settings-dictionary.d.ts +12 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/override-with-theme-settings.d.ts +3 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +35 -0
- package/dist/charts/indicator/indicator-legacy-chart-options/utils/override-with-custom-settings.d.ts +22 -0
- package/dist/charts/indicator/types.d.ts +118 -0
- package/dist/charts/table/data-table-wrapper.d.ts +3 -0
- package/dist/charts/table/header/field-type-icon.d.ts +6 -0
- package/dist/charts/table/header/sortable-table-column-header.d.ts +10 -0
- package/dist/charts/table/helpers/calc-column-widths.d.ts +2 -0
- package/dist/charts/table/helpers/format-numbers.d.ts +3 -0
- package/dist/charts/table/helpers/get-cell-styles.d.ts +13 -0
- package/dist/charts/table/index.d.ts +3 -0
- package/dist/charts/table/pure-table.d.ts +8 -0
- package/dist/charts/table/styles/style-constants.d.ts +9 -0
- package/dist/charts/table/types.d.ts +83 -0
- package/dist/column-chart.d.ts +29 -0
- package/dist/dashboard-widget/dashboard-widget.d.ts +16 -0
- package/dist/dashboard-widget/fetch-widget.d.ts +11 -0
- package/dist/dashboard-widget/translate-panel-color-format.d.ts +5 -0
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +7 -0
- package/dist/dashboard-widget/translate-widget-drilldown-options.d.ts +3 -0
- package/dist/dashboard-widget/translate-widget-filters.d.ts +16 -0
- package/dist/dashboard-widget/translate-widget-style-options.d.ts +5 -0
- package/dist/dashboard-widget/translate-widget.d.ts +12 -0
- package/dist/dashboard-widget/types.d.ts +336 -0
- package/dist/dashboard-widget/utils.d.ts +32 -0
- package/dist/decorators/as-sisense-component.d.ts +19 -0
- package/dist/decorators/with-error-boundary.d.ts +5 -0
- package/dist/decorators/with-sisense-context-validation.d.ts +7 -0
- package/dist/decorators/with-tracking/error-tracker.d.ts +20 -0
- package/dist/decorators/with-tracking/index.d.ts +1 -0
- package/dist/decorators/with-tracking/use-track-component-init.d.ts +5 -0
- package/dist/decorators/with-tracking/with-tracking.d.ts +10 -0
- package/dist/dynamic-size-container/default-size.d.ts +14 -0
- package/dist/dynamic-size-container/dynamic-size-container.d.ts +22 -0
- package/dist/dynamic-size-container/index.d.ts +2 -0
- package/dist/error-boundary/error-boundary-box.d.ts +13 -0
- package/dist/error-boundary/error-boundary.d.ts +34 -0
- package/dist/error-boundary/use-set-error.d.ts +2 -0
- package/dist/filters/components/common/buttons.d.ts +10 -0
- package/dist/filters/components/common/checkbox.d.ts +7 -0
- package/dist/filters/components/common/date-range-field-button.d.ts +13 -0
- package/dist/filters/components/common/index.d.ts +5 -0
- package/dist/filters/components/common/input.d.ts +7 -0
- package/dist/filters/components/common/radio.d.ts +6 -0
- package/dist/filters/components/common/switch.d.ts +1 -0
- package/dist/filters/components/date-filter/consts.d.ts +1 -0
- package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +20 -0
- package/dist/filters/components/date-filter/date-filter/calendar-header.d.ts +12 -0
- package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +61 -0
- package/dist/filters/components/date-filter/date-filter/date-range-calculator.d.ts +8 -0
- package/dist/filters/components/date-filter/date-filter/index.d.ts +1 -0
- package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +13 -0
- package/dist/filters/components/date-filter/date-filter/styled-date-picker.d.ts +7 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +63 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/index.d.ts +1 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +7 -0
- package/dist/filters/components/date-filter/index.d.ts +2 -0
- package/dist/filters/components/date-filter/types.d.ts +14 -0
- package/dist/filters/components/filter-tile.d.ts +14 -0
- package/dist/filters/components/icons/arrow-down-icon.d.ts +2 -0
- package/dist/filters/components/icons/arrow-right-icon.d.ts +2 -0
- package/dist/filters/components/icons/date-icon.d.ts +5 -0
- package/dist/filters/components/icons/double-arrow-right-icon.d.ts +2 -0
- package/dist/filters/components/icons/index.d.ts +7 -0
- package/dist/filters/components/icons/menu-icon.d.ts +2 -0
- package/dist/filters/components/icons/pencil-icon.d.ts +2 -0
- package/dist/filters/components/icons/plus-icon.d.ts +2 -0
- package/dist/filters/components/icons/search-icon.d.ts +2 -0
- package/dist/filters/components/icons/trash-icon.d.ts +2 -0
- package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +50 -0
- package/dist/filters/components/member-filter-tile/index.d.ts +3 -0
- package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +46 -0
- package/dist/filters/components/member-filter-tile/member-list.d.ts +11 -0
- package/dist/filters/components/member-filter-tile/members-reducer.d.ts +32 -0
- package/dist/filters/components/member-filter-tile/pill-section.d.ts +9 -0
- package/dist/filters/components/member-filter-tile/use-members.d.ts +14 -0
- package/dist/filters/components/member-filter-tile/use-validate-members.d.ts +8 -0
- package/dist/filters/index.d.ts +2 -0
- package/dist/funnel-chart.d.ts +47 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +71761 -0
- package/dist/indicator-canvas.d.ts +21 -0
- package/dist/indicator-chart.d.ts +60 -0
- package/dist/line-chart.d.ts +28 -0
- package/dist/locales/en.d.ts +17 -0
- package/dist/no-results-overlay/images/index.d.ts +2 -0
- package/dist/no-results-overlay/no-results-overlay.d.ts +13 -0
- package/dist/pie-chart.d.ts +28 -0
- package/dist/polar-chart.d.ts +28 -0
- package/dist/props.d.ts +882 -0
- package/dist/query/date-formats/angular-text-date-format-replacers.d.ts +5 -0
- package/dist/query/date-formats/apply-date-format.d.ts +65 -0
- package/dist/query/date-formats/fiscal-date-format-replacers.d.ts +33 -0
- package/dist/query/date-formats/index.d.ts +2 -0
- package/dist/query/date-formats/new-date-format.d.ts +16 -0
- package/dist/query/date-formats/simple-date-format-replacers.d.ts +4 -0
- package/dist/query/execute-query.d.ts +8 -0
- package/dist/query/query-result-date-formatting.d.ts +5 -0
- package/dist/query-execution/execute-query-by-widget-id.d.ts +29 -0
- package/dist/query-execution/execute-query.d.ts +32 -0
- package/dist/query-execution/index.d.ts +5 -0
- package/dist/query-execution/query-state-reducer.d.ts +66 -0
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +71 -0
- package/dist/query-execution/use-execute-query.d.ts +70 -0
- package/dist/query-execution/utils.d.ts +9 -0
- package/dist/scatter-chart.d.ts +68 -0
- package/dist/sisense-chart.d.ts +23 -0
- package/dist/sisense-context/custom-sisense-context-provider.d.ts +19 -0
- package/dist/sisense-context/sisense-context-provider.d.ts +36 -0
- package/dist/sisense-context/sisense-context.d.ts +9 -0
- package/dist/table/hooks/use-table-data.d.ts +11 -0
- package/dist/table/hooks/use-table-datatable.d.ts +11 -0
- package/dist/table/index.d.ts +1 -0
- package/dist/table/styles/get-custom-pagination-styles.d.ts +10 -0
- package/dist/table/table.d.ts +50 -0
- package/dist/theme-provider/custom-theme-provider.d.ts +18 -0
- package/dist/theme-provider/index.d.ts +1 -0
- package/dist/theme-provider/theme-provider.d.ts +45 -0
- package/dist/theme-provider/use-theme-settings.d.ts +12 -0
- package/dist/themes/legacy-design-settings.d.ts +84 -0
- package/dist/themes/theme-loader.d.ts +14 -0
- package/dist/treemap-chart.d.ts +34 -0
- package/dist/types.d.ts +692 -0
- package/dist/utils/color/color-interpolation.d.ts +37 -0
- package/dist/utils/color/index.d.ts +1 -0
- package/dist/utils/data-limit-warning.d.ts +2 -0
- package/dist/utils/dedupe.d.ts +1 -0
- package/dist/utils/filters-comparator.d.ts +11 -0
- package/dist/utils/utility-types.d.ts +39 -0
- package/dist/vite.svg +1 -0
- package/dist/widgets/chart-widget.d.ts +30 -0
- package/dist/widgets/common/context-menu.d.ts +3 -0
- package/dist/widgets/common/custom-drilldown.d.ts +20 -0
- package/dist/widgets/common/drilldown-breadcrumbs/drilldown-breadcrumbs.d.ts +4 -0
- package/dist/widgets/common/drilldown-breadcrumbs/index.d.ts +1 -0
- package/dist/widgets/common/drilldown-breadcrumbs/use-buttons.d.ts +27 -0
- package/dist/widgets/common/drilldown-breadcrumbs/use-popper.d.ts +24 -0
- package/dist/widgets/common/drilldown-breadcrumbs/use-theme-for-breadcrumbs.d.ts +11 -0
- package/dist/widgets/common/drilldown.d.ts +32 -0
- package/dist/widgets/common/use-widget-drilldown.d.ts +2 -0
- package/dist/widgets/common/widget-header.d.ts +11 -0
- package/dist/widgets/common/widget-style-utils.d.ts +13 -0
- package/dist/widgets/drilldown-widget.d.ts +49 -0
- package/dist/widgets/table-widget.d.ts +23 -0
- package/package.json +110 -0
package/dist/props.d.ts
ADDED
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
import { Attribute, Filter, Measure, DataSource, Data, QueryResultData } from '@sisense/sdk-data';
|
|
2
|
+
import { ChartDataOptions, CartesianChartDataOptions, CategoricalChartDataOptions, ThemeSettings, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, StyleOptions, ChartType, IndicatorStyleOptions, DrilldownOptions, TableStyleOptions, ThemeOid, WidgetStyleOptions, TreemapStyleOptions, CustomDrilldownResult, MenuPosition, MenuItemSection } from './types';
|
|
3
|
+
import { HighchartsOptions } from './chart-options-processor/chart-options-service';
|
|
4
|
+
import { ComponentType, PropsWithChildren, ReactNode } from 'react';
|
|
5
|
+
import { IndicatorDataOptions, ScatterChartDataOptions, TableDataOptions } from './chart-data-options/types';
|
|
6
|
+
import { DataPointEventHandler, DataPointsEventHandler, ScatterDataPointEventHandler, ScatterDataPointsEventHandler } from './chart-options-processor/apply-event-handlers';
|
|
7
|
+
import { AppConfig } from './app/client-application';
|
|
8
|
+
import { ExecuteQueryParams } from './query-execution';
|
|
9
|
+
import { FiltersMergeStrategy } from './dashboard-widget/types';
|
|
10
|
+
export type { ScatterDataPointEventHandler, ScatterDataPointsEventHandler, DataPointEventHandler, DataPointsEventHandler, MenuItemSection, HighchartsOptions, };
|
|
11
|
+
/**
|
|
12
|
+
* Props for {@link SisenseContextProvider} component
|
|
13
|
+
*/
|
|
14
|
+
export interface SisenseContextProviderProps {
|
|
15
|
+
/**
|
|
16
|
+
* Default data source explicitly set to be used by child components that are not defined with a data source.
|
|
17
|
+
*/
|
|
18
|
+
defaultDataSource?: DataSource;
|
|
19
|
+
/** URL of the Sisense environment the app connects to */
|
|
20
|
+
url: string;
|
|
21
|
+
/**
|
|
22
|
+
* [Single Sign-On](https://docs.sisense.com/main/SisenseLinux/using-single-sign-on-to-access-sisense.htm) toggle
|
|
23
|
+
*
|
|
24
|
+
* This is used when user wants to use sso authentication. Default is false.
|
|
25
|
+
* If set to true, this will override any other authentication method.
|
|
26
|
+
*
|
|
27
|
+
* @category Authentication
|
|
28
|
+
*/
|
|
29
|
+
ssoEnabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Token for [bearer authentication](https://sisense.dev/guides/restApi/using-rest-api.html).
|
|
32
|
+
*
|
|
33
|
+
* This is used only when basic username/password authentication is not specified.
|
|
34
|
+
*
|
|
35
|
+
* @category Authentication
|
|
36
|
+
*/
|
|
37
|
+
token?: string;
|
|
38
|
+
/**
|
|
39
|
+
* [Web Access Token](https://docs.sisense.com/main/SisenseLinux/using-web-access-token.htm).
|
|
40
|
+
*
|
|
41
|
+
* This is used only when neither username, password, and token is specified.
|
|
42
|
+
*
|
|
43
|
+
* @category Authentication
|
|
44
|
+
*/
|
|
45
|
+
wat?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Application specific configurations such as locale and date formats.
|
|
48
|
+
*/
|
|
49
|
+
appConfig?: AppConfig;
|
|
50
|
+
/**
|
|
51
|
+
* Boolean flag to show or hide run-time errors that involve Sisense context in the UI.
|
|
52
|
+
* Example errors include incorrect Sisense URL or invalid authentication.
|
|
53
|
+
* Note that this flag does not hide run-time errors in the console.
|
|
54
|
+
*
|
|
55
|
+
* If not specified, the default value is `true`.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*/
|
|
59
|
+
showRuntimeErrors?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Boolean flag to enable sending tracking events to the Sisense instance.
|
|
62
|
+
*
|
|
63
|
+
* If not specified, the default value is `true`.
|
|
64
|
+
*
|
|
65
|
+
* @internal
|
|
66
|
+
*/
|
|
67
|
+
enableTracking?: boolean;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Props for {@link ExecuteQuery} component.
|
|
71
|
+
*/
|
|
72
|
+
export interface ExecuteQueryProps {
|
|
73
|
+
/**
|
|
74
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
75
|
+
*
|
|
76
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
|
|
77
|
+
*/
|
|
78
|
+
dataSource?: DataSource;
|
|
79
|
+
/** Dimensions of the query */
|
|
80
|
+
dimensions?: Attribute[];
|
|
81
|
+
/** Measures of the query */
|
|
82
|
+
measures?: Measure[];
|
|
83
|
+
/** Filters that will slice query results */
|
|
84
|
+
filters?: Filter[];
|
|
85
|
+
/** Highlight filters that will highlight results that pass filter criteria */
|
|
86
|
+
highlights?: Filter[];
|
|
87
|
+
/**
|
|
88
|
+
* Number of rows to return in the query result
|
|
89
|
+
*
|
|
90
|
+
* If not specified, the default value is `20000`
|
|
91
|
+
*/
|
|
92
|
+
count?: number;
|
|
93
|
+
/**
|
|
94
|
+
* Offset of the first row to return
|
|
95
|
+
*
|
|
96
|
+
* If not specified, the default value is `0`
|
|
97
|
+
*/
|
|
98
|
+
offset?: number;
|
|
99
|
+
/** Function as child component that is called to render the query results */
|
|
100
|
+
children?: (queryResult: QueryResultData) => ReactNode;
|
|
101
|
+
/** Callback function that is evaluated when query results are ready */
|
|
102
|
+
onDataChanged?: (data: QueryResultData) => void;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Props for {@link ThemeProvider} component.
|
|
106
|
+
*
|
|
107
|
+
* Two options are supported:
|
|
108
|
+
*
|
|
109
|
+
* (1) `ThemeOid` -- Theme identifier as defined in the Sisense application (`Admin page` > `Look and Feel`).
|
|
110
|
+
* See [Sisense documentation](https://docs.sisense.com/main/SisenseLinux/customizing-the-sisense-user-interface.htm)
|
|
111
|
+
* for more details.
|
|
112
|
+
*
|
|
113
|
+
* OR
|
|
114
|
+
*
|
|
115
|
+
* (2) `ThemeSettings` -- Custom theme settings that override the default theme settings.
|
|
116
|
+
*/
|
|
117
|
+
export type ThemeProviderProps = PropsWithChildren<{
|
|
118
|
+
/**
|
|
119
|
+
*
|
|
120
|
+
* Theme for visual styling of the various components
|
|
121
|
+
*/
|
|
122
|
+
theme?: ThemeOid | ThemeSettings;
|
|
123
|
+
/**
|
|
124
|
+
* Used internally for explicitly skipping the tracking call (mainly for
|
|
125
|
+
* SisenseContextProvider, since it internally renders a ThemeProvider).
|
|
126
|
+
*
|
|
127
|
+
* @internal
|
|
128
|
+
*/
|
|
129
|
+
skipTracking?: boolean;
|
|
130
|
+
}>;
|
|
131
|
+
/**
|
|
132
|
+
* Before render handler where any custom adjustments can be made to the chart options
|
|
133
|
+
* of [highcharts](https://api.highcharts.com/highcharts/),
|
|
134
|
+
* which is an underlying charting library used by Sisense.
|
|
135
|
+
*
|
|
136
|
+
* @see {@link https://api.highcharts.com/highcharts/}
|
|
137
|
+
*/
|
|
138
|
+
export type BeforeRenderHandler = (
|
|
139
|
+
/** Highcharts options */
|
|
140
|
+
highchartsOptions: HighchartsOptions) => HighchartsOptions;
|
|
141
|
+
interface ChartEventProps {
|
|
142
|
+
/**
|
|
143
|
+
* Click handler callback for a data point
|
|
144
|
+
*
|
|
145
|
+
* @category Callbacks
|
|
146
|
+
*/
|
|
147
|
+
onDataPointClick?: DataPointEventHandler | ScatterDataPointEventHandler;
|
|
148
|
+
/**
|
|
149
|
+
* Context menu handler callback for a data point
|
|
150
|
+
*
|
|
151
|
+
* @category Callbacks
|
|
152
|
+
*/
|
|
153
|
+
onDataPointContextMenu?: DataPointEventHandler | ScatterDataPointEventHandler;
|
|
154
|
+
/**
|
|
155
|
+
* Handler callback for selection of multiple data points
|
|
156
|
+
*
|
|
157
|
+
* @category Callbacks
|
|
158
|
+
*/
|
|
159
|
+
onDataPointsSelected?: DataPointsEventHandler | ScatterDataPointsEventHandler;
|
|
160
|
+
/**
|
|
161
|
+
* Before render handler callback that allows adjusting
|
|
162
|
+
* detail chart options prior to render
|
|
163
|
+
*
|
|
164
|
+
* This callback is not yet supported for {@link IndicatorChart}
|
|
165
|
+
*
|
|
166
|
+
* @category Callbacks
|
|
167
|
+
*/
|
|
168
|
+
onBeforeRender?: BeforeRenderHandler;
|
|
169
|
+
}
|
|
170
|
+
interface CartesianChartEventProps extends ChartEventProps {
|
|
171
|
+
/**
|
|
172
|
+
* Click handler callback for a data point
|
|
173
|
+
*
|
|
174
|
+
* @category Callbacks
|
|
175
|
+
*/
|
|
176
|
+
onDataPointClick?: DataPointEventHandler;
|
|
177
|
+
/**
|
|
178
|
+
* Context menu handler callback for a data point
|
|
179
|
+
*
|
|
180
|
+
* @category Callbacks
|
|
181
|
+
*/
|
|
182
|
+
onDataPointContextMenu?: DataPointEventHandler;
|
|
183
|
+
/**
|
|
184
|
+
* Handler callback for selection of multiple data points
|
|
185
|
+
*
|
|
186
|
+
* @category Callbacks
|
|
187
|
+
*/
|
|
188
|
+
onDataPointsSelected?: DataPointsEventHandler;
|
|
189
|
+
}
|
|
190
|
+
interface ScatterChartEventProps extends ChartEventProps {
|
|
191
|
+
/**
|
|
192
|
+
* Click handler callback for a data point
|
|
193
|
+
*
|
|
194
|
+
* @category Callbacks
|
|
195
|
+
*/
|
|
196
|
+
onDataPointClick?: ScatterDataPointEventHandler;
|
|
197
|
+
/**
|
|
198
|
+
* Context menu handler callback for a data point
|
|
199
|
+
*
|
|
200
|
+
* @category Callbacks
|
|
201
|
+
*/
|
|
202
|
+
onDataPointContextMenu?: ScatterDataPointEventHandler;
|
|
203
|
+
/**
|
|
204
|
+
* Handler callback for selection of multiple data points
|
|
205
|
+
*
|
|
206
|
+
* @category Callbacks
|
|
207
|
+
*/
|
|
208
|
+
onDataPointsSelected?: ScatterDataPointsEventHandler;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Base Chart Props to be extended by {@link ChartProps}
|
|
212
|
+
*
|
|
213
|
+
* @internal
|
|
214
|
+
*/
|
|
215
|
+
export interface BaseChartProps {
|
|
216
|
+
/**
|
|
217
|
+
* Data set for this chart, which supports two options:
|
|
218
|
+
*
|
|
219
|
+
* (1) Data source name (as a `string`) - e.g. `Sample ECommerce`. Under the hood,
|
|
220
|
+
* the chart will have an internal {@link ExecuteQuery} connect to the data source
|
|
221
|
+
* and load the data as specified in {@link dataOptions}, {@link filters}, and {@link highlights}.
|
|
222
|
+
*
|
|
223
|
+
* OR
|
|
224
|
+
*
|
|
225
|
+
* (2) Explicit {@link @sisense/sdk-data!Data}, which is made up of
|
|
226
|
+
* an array of {@link @sisense/sdk-data!Column | columns}
|
|
227
|
+
* and a two-dimensional array of data {@link @sisense/sdk-data!Cell | cells}.
|
|
228
|
+
* This allows the chart component to be used
|
|
229
|
+
* with user-provided data.
|
|
230
|
+
*
|
|
231
|
+
* If neither option is specified,
|
|
232
|
+
* the chart will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
|
|
233
|
+
*
|
|
234
|
+
*
|
|
235
|
+
* @category Data
|
|
236
|
+
*/
|
|
237
|
+
dataSet?: DataSource | Data;
|
|
238
|
+
/**
|
|
239
|
+
* Filters that will slice query results
|
|
240
|
+
*
|
|
241
|
+
* @category Data
|
|
242
|
+
*/
|
|
243
|
+
filters?: Filter[];
|
|
244
|
+
/**
|
|
245
|
+
* Highlight filters that will highlight results that pass filter criteria
|
|
246
|
+
*
|
|
247
|
+
* @category Data
|
|
248
|
+
*/
|
|
249
|
+
highlights?: Filter[];
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Props shared across {@link Chart} components.
|
|
253
|
+
*/
|
|
254
|
+
export interface ChartProps extends BaseChartProps, ChartEventProps {
|
|
255
|
+
/**
|
|
256
|
+
* Default chart type of each series.
|
|
257
|
+
*
|
|
258
|
+
* @category Chart
|
|
259
|
+
*/
|
|
260
|
+
chartType: ChartType;
|
|
261
|
+
/**
|
|
262
|
+
* Configurations for how to interpret and present data passed to the chart.
|
|
263
|
+
*
|
|
264
|
+
* @category Chart
|
|
265
|
+
*/
|
|
266
|
+
dataOptions: ChartDataOptions;
|
|
267
|
+
/**
|
|
268
|
+
* Style options union across chart types.
|
|
269
|
+
*
|
|
270
|
+
* @category Chart
|
|
271
|
+
*/
|
|
272
|
+
styleOptions?: StyleOptions;
|
|
273
|
+
/**
|
|
274
|
+
* Used to force a refresh of the chart from outside the chart component
|
|
275
|
+
* Since added to dependencies of useEffect, will trigger a query execution
|
|
276
|
+
*
|
|
277
|
+
* @internal
|
|
278
|
+
*/
|
|
279
|
+
refreshCounter?: number;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Props of the {@link AreaChart} component.
|
|
283
|
+
*/
|
|
284
|
+
export interface AreaChartProps extends BaseChartProps, CartesianChartEventProps {
|
|
285
|
+
/**
|
|
286
|
+
* Configurations for how to interpret and present data passed to the chart.
|
|
287
|
+
*
|
|
288
|
+
* @category Chart
|
|
289
|
+
*/
|
|
290
|
+
dataOptions: CartesianChartDataOptions;
|
|
291
|
+
/**
|
|
292
|
+
* Configuration that defines the functional style of the various chart elements.
|
|
293
|
+
*
|
|
294
|
+
* @category Chart
|
|
295
|
+
*/
|
|
296
|
+
styleOptions?: AreaStyleOptions;
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Props of the {@link BarChart} component.
|
|
300
|
+
*/
|
|
301
|
+
export interface BarChartProps extends BaseChartProps, CartesianChartEventProps {
|
|
302
|
+
/**
|
|
303
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
304
|
+
*
|
|
305
|
+
* @category Chart
|
|
306
|
+
*/
|
|
307
|
+
dataOptions: CartesianChartDataOptions;
|
|
308
|
+
/**
|
|
309
|
+
* Configuration that define functional style of the various chart elements
|
|
310
|
+
*
|
|
311
|
+
* @category Chart
|
|
312
|
+
*/
|
|
313
|
+
styleOptions?: StackableStyleOptions;
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Props of the {@link ColumnChart} component.
|
|
317
|
+
*/
|
|
318
|
+
export interface ColumnChartProps extends BaseChartProps, CartesianChartEventProps {
|
|
319
|
+
/**
|
|
320
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
321
|
+
*
|
|
322
|
+
* @category Chart
|
|
323
|
+
*/
|
|
324
|
+
dataOptions: CartesianChartDataOptions;
|
|
325
|
+
/**
|
|
326
|
+
* Configuration that define functional style of the various chart elements
|
|
327
|
+
*
|
|
328
|
+
* @category Chart
|
|
329
|
+
*/
|
|
330
|
+
styleOptions?: StackableStyleOptions;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* Props of the {@link FunnelChart} component.
|
|
334
|
+
*/
|
|
335
|
+
export interface FunnelChartProps extends BaseChartProps, CartesianChartEventProps {
|
|
336
|
+
/**
|
|
337
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
338
|
+
*
|
|
339
|
+
* @category Chart
|
|
340
|
+
*/
|
|
341
|
+
dataOptions: CategoricalChartDataOptions;
|
|
342
|
+
/**
|
|
343
|
+
* Configuration that define functional style of the various chart elements
|
|
344
|
+
*
|
|
345
|
+
* @category Chart
|
|
346
|
+
*/
|
|
347
|
+
styleOptions?: FunnelStyleOptions;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Props of the {@link LineChart} component.
|
|
351
|
+
*/
|
|
352
|
+
export interface LineChartProps extends BaseChartProps, CartesianChartEventProps {
|
|
353
|
+
/**
|
|
354
|
+
* Configurations for how to interpret and present data passed to the chart.
|
|
355
|
+
*
|
|
356
|
+
* @category Chart
|
|
357
|
+
*/
|
|
358
|
+
dataOptions: CartesianChartDataOptions;
|
|
359
|
+
/**
|
|
360
|
+
* Configuration that defines the functional style of the various chart elements.
|
|
361
|
+
*
|
|
362
|
+
* @category Chart
|
|
363
|
+
*/
|
|
364
|
+
styleOptions?: LineStyleOptions;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Props of the {@link PieChart} component.
|
|
368
|
+
*/
|
|
369
|
+
export interface PieChartProps extends BaseChartProps, CartesianChartEventProps {
|
|
370
|
+
/**
|
|
371
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
372
|
+
*
|
|
373
|
+
* @category Chart
|
|
374
|
+
*/
|
|
375
|
+
dataOptions: CategoricalChartDataOptions;
|
|
376
|
+
/**
|
|
377
|
+
* Configuration that define functional style of the various chart elements
|
|
378
|
+
*
|
|
379
|
+
* @category Chart
|
|
380
|
+
*/
|
|
381
|
+
styleOptions?: PieStyleOptions;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Props of the {@link PolarChart} component.
|
|
385
|
+
*/
|
|
386
|
+
export interface PolarChartProps extends BaseChartProps, CartesianChartEventProps {
|
|
387
|
+
/** Configurations for how to interpret and present the data passed to the chart */
|
|
388
|
+
dataOptions: CartesianChartDataOptions;
|
|
389
|
+
/** Configuration that define functional style of the various chart elements */
|
|
390
|
+
styleOptions?: PolarStyleOptions;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Props of the {@link IndicatorChart} component.
|
|
394
|
+
*/
|
|
395
|
+
export interface IndicatorChartProps extends BaseChartProps {
|
|
396
|
+
/** Configurations for how to interpret and present the data passed to the chart */
|
|
397
|
+
dataOptions: IndicatorDataOptions;
|
|
398
|
+
/** Configuration that define functional style of the various chart elements */
|
|
399
|
+
styleOptions?: IndicatorStyleOptions;
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* Props of the {@link Table} component.
|
|
403
|
+
*/
|
|
404
|
+
export interface TableProps {
|
|
405
|
+
/**
|
|
406
|
+
* Data set for this chart, which supports two options:
|
|
407
|
+
*
|
|
408
|
+
* (1) Data source name (as a `string`) - e.g. `Sample ECommerce`. Under the hood,
|
|
409
|
+
* the chart will have an internal {@link ExecuteQuery} connect to the data source
|
|
410
|
+
* and load the data as specified in {@link dataOptions} and {@link filters}.
|
|
411
|
+
*
|
|
412
|
+
* OR
|
|
413
|
+
*
|
|
414
|
+
* (2) Explicit {@link @sisense/sdk-data!Data}, which is made up of
|
|
415
|
+
* an array of {@link @sisense/sdk-data!Column | columns}
|
|
416
|
+
* and a two-dimensional array of data {@link @sisense/sdk-data!Cell | cells}.
|
|
417
|
+
* This allows the chart component to be used
|
|
418
|
+
* with user-provided data.
|
|
419
|
+
*
|
|
420
|
+
* If neither option is specified,
|
|
421
|
+
* the chart will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
|
|
422
|
+
*
|
|
423
|
+
*
|
|
424
|
+
* @category Data
|
|
425
|
+
*/
|
|
426
|
+
dataSet?: DataSource | Data;
|
|
427
|
+
/**
|
|
428
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
429
|
+
*
|
|
430
|
+
* @category Chart
|
|
431
|
+
*/
|
|
432
|
+
dataOptions: TableDataOptions;
|
|
433
|
+
/**
|
|
434
|
+
* Filters that will slice query results
|
|
435
|
+
*
|
|
436
|
+
* @category Data
|
|
437
|
+
*/
|
|
438
|
+
filters?: Filter[];
|
|
439
|
+
/**
|
|
440
|
+
* Configurations that define functional style of the various chart elements
|
|
441
|
+
*
|
|
442
|
+
* @category Chart
|
|
443
|
+
*/
|
|
444
|
+
styleOptions?: TableStyleOptions;
|
|
445
|
+
/**
|
|
446
|
+
* Used to force a refresh of the table from outside the table component
|
|
447
|
+
* Since added to dependencies of useEffect, will trigger a query execution
|
|
448
|
+
*
|
|
449
|
+
* @internal
|
|
450
|
+
*/
|
|
451
|
+
refreshCounter?: number;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Props of the {@link ScatterChart} component.
|
|
455
|
+
*/
|
|
456
|
+
export interface ScatterChartProps extends BaseChartProps, ScatterChartEventProps {
|
|
457
|
+
/**
|
|
458
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
459
|
+
*
|
|
460
|
+
* @category Chart
|
|
461
|
+
*/
|
|
462
|
+
dataOptions: ScatterChartDataOptions;
|
|
463
|
+
/**
|
|
464
|
+
* Configuration that define functional style of the various chart elements
|
|
465
|
+
*
|
|
466
|
+
* @category Chart
|
|
467
|
+
*/
|
|
468
|
+
styleOptions?: ScatterStyleOptions;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Props for the {@link DashboardWidget} component
|
|
472
|
+
*
|
|
473
|
+
*/
|
|
474
|
+
export interface DashboardWidgetProps extends Omit<ChartWidgetProps, 'dataSource' | 'dataOptions' | 'chartType' | 'styleOptions'>, ChartEventProps {
|
|
475
|
+
/**
|
|
476
|
+
* Identifier of the widget
|
|
477
|
+
*
|
|
478
|
+
* @category Widget
|
|
479
|
+
*/
|
|
480
|
+
widgetOid: string;
|
|
481
|
+
/**
|
|
482
|
+
* Identifier of the dashboard that contains the widget
|
|
483
|
+
*
|
|
484
|
+
* @category Widget
|
|
485
|
+
*/
|
|
486
|
+
dashboardOid: string;
|
|
487
|
+
/**
|
|
488
|
+
* Filters that will slice query results
|
|
489
|
+
*
|
|
490
|
+
* Provided filters will be merged with the existing filters from the widget configuration.
|
|
491
|
+
*
|
|
492
|
+
* @category Data
|
|
493
|
+
*/
|
|
494
|
+
filters?: Filter[];
|
|
495
|
+
/**
|
|
496
|
+
* Highlight filters that will highlight results that pass filter criteria
|
|
497
|
+
*
|
|
498
|
+
* @category Data
|
|
499
|
+
*/
|
|
500
|
+
highlights?: Filter[];
|
|
501
|
+
/**
|
|
502
|
+
* {@inheritDoc ExecuteQueryByWidgetIdProps.filtersMergeStrategy}
|
|
503
|
+
*
|
|
504
|
+
* @category Data
|
|
505
|
+
*/
|
|
506
|
+
filtersMergeStrategy?: FiltersMergeStrategy;
|
|
507
|
+
/**
|
|
508
|
+
* Title of the widget
|
|
509
|
+
*
|
|
510
|
+
* If not specified, it takes the existing value from the widget configuration.
|
|
511
|
+
*
|
|
512
|
+
* @category Widget
|
|
513
|
+
*/
|
|
514
|
+
title?: string;
|
|
515
|
+
/**
|
|
516
|
+
* Description of the widget
|
|
517
|
+
*
|
|
518
|
+
* If not specified, it takes the existing value from the widget configuration.
|
|
519
|
+
*
|
|
520
|
+
* @category Widget
|
|
521
|
+
*/
|
|
522
|
+
description?: string;
|
|
523
|
+
/**
|
|
524
|
+
* Style options for the widget container including the widget header
|
|
525
|
+
*
|
|
526
|
+
* @category Widget
|
|
527
|
+
*/
|
|
528
|
+
widgetStyleOptions?: WidgetStyleOptions;
|
|
529
|
+
/**
|
|
530
|
+
* General style options for the visual component of the widget – for example, chart or table.
|
|
531
|
+
*
|
|
532
|
+
* @category Widget
|
|
533
|
+
*/
|
|
534
|
+
styleOptions?: {
|
|
535
|
+
/**
|
|
536
|
+
* Total width of the component, which is considered in the following order of priority:
|
|
537
|
+
*
|
|
538
|
+
* 1. Value passed to this property (in pixels)
|
|
539
|
+
* 2. Width of the container wrapping this component
|
|
540
|
+
* 3. Default value as specified per chart type
|
|
541
|
+
*
|
|
542
|
+
*/
|
|
543
|
+
width?: number;
|
|
544
|
+
/**
|
|
545
|
+
* Total height of the component, which is considered in the following order of priority:
|
|
546
|
+
*
|
|
547
|
+
* 1. Value passed to this property (in pixels).
|
|
548
|
+
* 2. Height of the container wrapping this component
|
|
549
|
+
* 3. Default value as specified per chart type
|
|
550
|
+
*/
|
|
551
|
+
height?: number;
|
|
552
|
+
};
|
|
553
|
+
/**
|
|
554
|
+
* {@inheritDoc ChartWidgetProps.drilldownOptions}
|
|
555
|
+
*
|
|
556
|
+
* @category Widget
|
|
557
|
+
* @internal
|
|
558
|
+
*/
|
|
559
|
+
drilldownOptions?: DrilldownOptions;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Props for the {@link ChartWidget} component
|
|
563
|
+
*
|
|
564
|
+
*/
|
|
565
|
+
export interface ChartWidgetProps extends ChartEventProps {
|
|
566
|
+
/**
|
|
567
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
568
|
+
*
|
|
569
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
|
|
570
|
+
*
|
|
571
|
+
* @category Data
|
|
572
|
+
*/
|
|
573
|
+
dataSource?: DataSource;
|
|
574
|
+
/**
|
|
575
|
+
* Filters that will slice query results
|
|
576
|
+
*
|
|
577
|
+
* @category Data
|
|
578
|
+
*/
|
|
579
|
+
filters?: Filter[];
|
|
580
|
+
/**
|
|
581
|
+
* Highlight filters that will highlight results that pass filter criteria
|
|
582
|
+
*
|
|
583
|
+
* @category Data
|
|
584
|
+
*/
|
|
585
|
+
highlights?: Filter[];
|
|
586
|
+
/**
|
|
587
|
+
* Default chart type of each series
|
|
588
|
+
*
|
|
589
|
+
* @category Chart
|
|
590
|
+
*/
|
|
591
|
+
chartType: ChartType;
|
|
592
|
+
/**
|
|
593
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
594
|
+
*
|
|
595
|
+
* @category Chart
|
|
596
|
+
*/
|
|
597
|
+
dataOptions: ChartDataOptions;
|
|
598
|
+
/**
|
|
599
|
+
* Style options for both the widget as a whole and specifically for the widget header
|
|
600
|
+
*
|
|
601
|
+
* @category Widget
|
|
602
|
+
*/
|
|
603
|
+
widgetStyleOptions?: WidgetStyleOptions;
|
|
604
|
+
/**
|
|
605
|
+
* Style options union across chart types
|
|
606
|
+
*
|
|
607
|
+
* @category Chart
|
|
608
|
+
*/
|
|
609
|
+
styleOptions?: StyleOptions;
|
|
610
|
+
/**
|
|
611
|
+
* List of categories to allow drilldowns on
|
|
612
|
+
*
|
|
613
|
+
* @category Widget
|
|
614
|
+
*/
|
|
615
|
+
drilldownOptions?: DrilldownOptions;
|
|
616
|
+
/**
|
|
617
|
+
* React nodes to be rendered at the top of component, before the chart
|
|
618
|
+
*
|
|
619
|
+
* @category Widget
|
|
620
|
+
* @internal
|
|
621
|
+
*/
|
|
622
|
+
topSlot?: ReactNode;
|
|
623
|
+
/**
|
|
624
|
+
* React nodes to be rendered at the bottom of component, after the chart
|
|
625
|
+
*
|
|
626
|
+
* @category Widget
|
|
627
|
+
* @internal
|
|
628
|
+
*/
|
|
629
|
+
bottomSlot?: ReactNode;
|
|
630
|
+
/**
|
|
631
|
+
* ContextMenu items for when data points are selected or right-clicked
|
|
632
|
+
*
|
|
633
|
+
* @category Widget
|
|
634
|
+
* @internal
|
|
635
|
+
*/
|
|
636
|
+
contextMenuItems?: MenuItemSection[];
|
|
637
|
+
/**
|
|
638
|
+
* Callback for when context menu is closed
|
|
639
|
+
*
|
|
640
|
+
* @category Widget
|
|
641
|
+
* @internal
|
|
642
|
+
*/
|
|
643
|
+
onContextMenuClose?: () => void;
|
|
644
|
+
/**
|
|
645
|
+
* Title of the widget
|
|
646
|
+
*
|
|
647
|
+
* @category Widget
|
|
648
|
+
*/
|
|
649
|
+
title?: string;
|
|
650
|
+
/**
|
|
651
|
+
* Description of the widget
|
|
652
|
+
*
|
|
653
|
+
* @category Widget
|
|
654
|
+
*/
|
|
655
|
+
description?: string;
|
|
656
|
+
}
|
|
657
|
+
/**
|
|
658
|
+
* Props for the {@link TableWidget} component
|
|
659
|
+
*
|
|
660
|
+
* @internal
|
|
661
|
+
*/
|
|
662
|
+
export interface TableWidgetProps {
|
|
663
|
+
/**
|
|
664
|
+
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
665
|
+
*
|
|
666
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent {@link SisenseContextProvider} component.
|
|
667
|
+
*
|
|
668
|
+
* @category Data
|
|
669
|
+
*/
|
|
670
|
+
dataSource?: DataSource;
|
|
671
|
+
/**
|
|
672
|
+
* Filters that will slice query results
|
|
673
|
+
*
|
|
674
|
+
* @category Data
|
|
675
|
+
*/
|
|
676
|
+
filters?: Filter[];
|
|
677
|
+
/**
|
|
678
|
+
* Configurations for how to interpret and present the data passed to the table
|
|
679
|
+
*
|
|
680
|
+
* @category Chart
|
|
681
|
+
*/
|
|
682
|
+
dataOptions: TableDataOptions;
|
|
683
|
+
/**
|
|
684
|
+
* Style options for both the widget as a whole and specifically for the widget header
|
|
685
|
+
*
|
|
686
|
+
* @category Widget
|
|
687
|
+
*/
|
|
688
|
+
widgetStyleOptions?: WidgetStyleOptions;
|
|
689
|
+
/**
|
|
690
|
+
* Style options for table
|
|
691
|
+
*
|
|
692
|
+
* @category Chart
|
|
693
|
+
*/
|
|
694
|
+
styleOptions?: TableStyleOptions;
|
|
695
|
+
/**
|
|
696
|
+
* React nodes to be rendered at the top of component, before the table
|
|
697
|
+
*
|
|
698
|
+
* @category Widget
|
|
699
|
+
*/
|
|
700
|
+
topSlot?: ReactNode;
|
|
701
|
+
/**
|
|
702
|
+
* React nodes to be rendered at the bottom of component, after the table
|
|
703
|
+
*
|
|
704
|
+
* @category Widget
|
|
705
|
+
*/
|
|
706
|
+
bottomSlot?: ReactNode;
|
|
707
|
+
/**
|
|
708
|
+
* Title of the widget
|
|
709
|
+
*
|
|
710
|
+
* @category Widget
|
|
711
|
+
*/
|
|
712
|
+
title?: string;
|
|
713
|
+
/**
|
|
714
|
+
* Description of the widget
|
|
715
|
+
*
|
|
716
|
+
* @category Widget
|
|
717
|
+
*/
|
|
718
|
+
description?: string;
|
|
719
|
+
}
|
|
720
|
+
/**
|
|
721
|
+
* Props for {@link ExecuteQueryByWidgetId} component.
|
|
722
|
+
*/
|
|
723
|
+
export interface ExecuteQueryByWidgetIdProps {
|
|
724
|
+
/** Identifier of the widget */
|
|
725
|
+
widgetOid: string;
|
|
726
|
+
/** Identifier of the dashboard that contains the widget */
|
|
727
|
+
dashboardOid: string;
|
|
728
|
+
/**
|
|
729
|
+
* Filters that will slice query results.
|
|
730
|
+
*
|
|
731
|
+
* The provided filters will be merged with the existing widget filters based on `filtersMergeStrategy`
|
|
732
|
+
*/
|
|
733
|
+
filters?: Filter[];
|
|
734
|
+
/** Highlight filters that will highlight results that pass filter criteria */
|
|
735
|
+
highlights?: Filter[];
|
|
736
|
+
/** {@inheritDoc ExecuteQueryProps.count} */
|
|
737
|
+
count?: number;
|
|
738
|
+
/** {@inheritDoc ExecuteQueryProps.offset} */
|
|
739
|
+
offset?: number;
|
|
740
|
+
/**
|
|
741
|
+
* Strategy for merging the existing widget filters with the filters provided via the `filters` prop:
|
|
742
|
+
*
|
|
743
|
+
* - `widgetFirst` - prioritizes the widget filters over the provided filters in case of filter conflicts by certain attributes.
|
|
744
|
+
* - `codeFirst` - prioritizes the provided filters over the widget filters in case of filter conflicts by certain attributes.
|
|
745
|
+
* - `codeOnly` - applies only the provided filters and completely ignores the widget filters.
|
|
746
|
+
*
|
|
747
|
+
* If not specified, the default strategy is `widgetFirst`.
|
|
748
|
+
*/
|
|
749
|
+
filtersMergeStrategy?: FiltersMergeStrategy;
|
|
750
|
+
/** Function as child component that is called to render the query results */
|
|
751
|
+
children?: (queryResult: QueryResultData, queryParams: ExecuteQueryParams) => ReactNode;
|
|
752
|
+
/** Callback function that is evaluated when query results are ready */
|
|
753
|
+
onDataChanged?: (data: QueryResultData, queryParams: ExecuteQueryParams) => void;
|
|
754
|
+
}
|
|
755
|
+
/**
|
|
756
|
+
* Props of the {@link TreemapChart} component.
|
|
757
|
+
*/
|
|
758
|
+
export interface TreemapChartProps extends BaseChartProps, CartesianChartEventProps {
|
|
759
|
+
/**
|
|
760
|
+
* Configurations for how to interpret and present the data passed to the chart
|
|
761
|
+
*
|
|
762
|
+
* @category Chart
|
|
763
|
+
*/
|
|
764
|
+
dataOptions: CategoricalChartDataOptions;
|
|
765
|
+
/**
|
|
766
|
+
* Configuration that define functional style of the various chart elements
|
|
767
|
+
*
|
|
768
|
+
* @category Chart
|
|
769
|
+
*/
|
|
770
|
+
styleOptions?: TreemapStyleOptions;
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* Props for {@link ContextMenu} component.
|
|
774
|
+
*/
|
|
775
|
+
export type ContextMenuProps = {
|
|
776
|
+
/**
|
|
777
|
+
* Position of the context menu
|
|
778
|
+
*
|
|
779
|
+
* @category Widget
|
|
780
|
+
*/
|
|
781
|
+
position?: MenuPosition | null;
|
|
782
|
+
/**
|
|
783
|
+
* Callback function that is evaluated when context menu is closed
|
|
784
|
+
*
|
|
785
|
+
* @category Widget
|
|
786
|
+
*/
|
|
787
|
+
closeContextMenu: () => void;
|
|
788
|
+
/**
|
|
789
|
+
* Sections of menu items
|
|
790
|
+
*
|
|
791
|
+
* @category Widget
|
|
792
|
+
*/
|
|
793
|
+
itemSections?: MenuItemSection[];
|
|
794
|
+
/**
|
|
795
|
+
* React nodes to be rendered at the bottom of the context menu
|
|
796
|
+
*
|
|
797
|
+
* @category Widget
|
|
798
|
+
*/
|
|
799
|
+
children?: React.ReactNode;
|
|
800
|
+
};
|
|
801
|
+
export type DrilldownBreadcrumbsProps = {
|
|
802
|
+
/**
|
|
803
|
+
* List of drilldown filters formatted to be displayed as breadcrumbs
|
|
804
|
+
*
|
|
805
|
+
* @category Widget
|
|
806
|
+
*/
|
|
807
|
+
filtersDisplayValues: string[][];
|
|
808
|
+
/**
|
|
809
|
+
* Currently selected drilldown dimension
|
|
810
|
+
*
|
|
811
|
+
* @category Widget
|
|
812
|
+
*/
|
|
813
|
+
currentDimension: Attribute;
|
|
814
|
+
/**
|
|
815
|
+
* Callback function that is evaluated when X button is clicked
|
|
816
|
+
*
|
|
817
|
+
* @category Widget
|
|
818
|
+
*/
|
|
819
|
+
clearDrilldownSelections: () => void;
|
|
820
|
+
/**
|
|
821
|
+
* Callback function that is evaluated when a breadcrumb is clicked
|
|
822
|
+
*
|
|
823
|
+
* @category Widget
|
|
824
|
+
*/
|
|
825
|
+
sliceDrilldownSelections: (i: number) => void;
|
|
826
|
+
};
|
|
827
|
+
/**
|
|
828
|
+
* An object that allows users to pass advanced configuration options as a prop for the {@link DrilldownWidget} component
|
|
829
|
+
*/
|
|
830
|
+
export type DrilldownWidgetConfig = {
|
|
831
|
+
/**
|
|
832
|
+
* Boolean to override default breadcrumbs location and instead only return them as a property of the 'children' function
|
|
833
|
+
*
|
|
834
|
+
* @category Widget
|
|
835
|
+
*/
|
|
836
|
+
isBreadcrumbsDetached?: boolean;
|
|
837
|
+
/**
|
|
838
|
+
* React component to be rendered as breadcrumbs
|
|
839
|
+
*
|
|
840
|
+
* {@link DrilldownBreadcrumbs} will be used if not provided
|
|
841
|
+
*
|
|
842
|
+
* @category Widget
|
|
843
|
+
*/
|
|
844
|
+
breadcrumbsComponent?: ComponentType<DrilldownBreadcrumbsProps>;
|
|
845
|
+
/**
|
|
846
|
+
* Boolean to override default breadcrumbs location and instead only return them as a property of the 'children' function
|
|
847
|
+
*
|
|
848
|
+
* @category Widget
|
|
849
|
+
*/
|
|
850
|
+
contextMenuComponent?: (contextMenuProps: ContextMenuProps) => JSX.Element;
|
|
851
|
+
};
|
|
852
|
+
/**
|
|
853
|
+
* Props for the {@link DrilldownWidget} component
|
|
854
|
+
*/
|
|
855
|
+
export type DrilldownWidgetProps = {
|
|
856
|
+
/**
|
|
857
|
+
* List of dimensions to allow drilldowns on
|
|
858
|
+
*
|
|
859
|
+
* @category Widget
|
|
860
|
+
*/
|
|
861
|
+
drilldownDimensions: Attribute[];
|
|
862
|
+
/**
|
|
863
|
+
* Initial dimension to apply first set of filters to
|
|
864
|
+
*
|
|
865
|
+
* @category Widget
|
|
866
|
+
*/
|
|
867
|
+
initialDimension: Attribute;
|
|
868
|
+
/**
|
|
869
|
+
* An object that allows users to pass advanced configuration options as a prop for the {@link DrilldownWidget} component
|
|
870
|
+
*
|
|
871
|
+
* @category Widget
|
|
872
|
+
*/
|
|
873
|
+
config?: DrilldownWidgetConfig;
|
|
874
|
+
/**
|
|
875
|
+
* React component to be rendered as context menu
|
|
876
|
+
*
|
|
877
|
+
* {@link ContextMenu} will be used if not provided
|
|
878
|
+
*
|
|
879
|
+
* @category Widget
|
|
880
|
+
*/
|
|
881
|
+
children: (customDrilldownResult: CustomDrilldownResult) => ReactNode;
|
|
882
|
+
};
|