@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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TableProps } from '../props';
|
|
3
|
+
/**
|
|
4
|
+
* Table with aggregation and pagination.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* (1) Example of Table of raw data from the `Sample ECommerce` data model:
|
|
8
|
+
*
|
|
9
|
+
* ```tsx
|
|
10
|
+
* <Table
|
|
11
|
+
* dataSet={DM.DataSource}
|
|
12
|
+
* dataOptions={{
|
|
13
|
+
* columns: [
|
|
14
|
+
* DM.Commerce.AgeRange,
|
|
15
|
+
* DM.Commerce.Revenue,
|
|
16
|
+
* DM.Commerce.Cost,
|
|
17
|
+
* DM.Commerce.Quantity,
|
|
18
|
+
* ],
|
|
19
|
+
* }}
|
|
20
|
+
* styleOptions={{ width: 600, height: 750 }}
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* <img src="media://table-example-1.png" width="800px" />
|
|
25
|
+
*
|
|
26
|
+
* (2) Example of Table of aggregated data from the same data model:
|
|
27
|
+
*
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <Table
|
|
30
|
+
* dataSet={DM.DataSource}
|
|
31
|
+
* dataOptions={{
|
|
32
|
+
* columns: [
|
|
33
|
+
* DM.Commerce.AgeRange,
|
|
34
|
+
* measures.sum(DM.Commerce.Revenue, 'Total Revenue'),
|
|
35
|
+
* measures.sum(DM.Commerce.Cost, 'Total Cost'),
|
|
36
|
+
* ],
|
|
37
|
+
* }}
|
|
38
|
+
* styleOptions={{
|
|
39
|
+
* headersColor: true,
|
|
40
|
+
* alternatingColumnsColor: false,
|
|
41
|
+
* alternatingRowsColor: true,
|
|
42
|
+
* }}
|
|
43
|
+
* />
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* <img src="media://table-example-2.png" width="800px" />
|
|
47
|
+
* @param props - Table properties
|
|
48
|
+
* @returns Table component
|
|
49
|
+
*/
|
|
50
|
+
export declare const Table: React.FunctionComponent<TableProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { CompleteThemeSettings } from '../types';
|
|
3
|
+
/** @internal */
|
|
4
|
+
export type CustomThemeProviderProps = {
|
|
5
|
+
context: {
|
|
6
|
+
themeSettings: CompleteThemeSettings;
|
|
7
|
+
skipTracking?: boolean;
|
|
8
|
+
};
|
|
9
|
+
error?: Error;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Custom Theme Provider component that allows passing external theme context.
|
|
13
|
+
*
|
|
14
|
+
* Note: it specifically designed to serve as a bridge for passing context between an external wrapper and child React components.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const CustomThemeProvider: import("react").FunctionComponent<PropsWithChildren<CustomThemeProviderProps>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './theme-provider';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ThemeProviderProps } from '../props';
|
|
3
|
+
import { CompleteThemeSettings } from '../types';
|
|
4
|
+
export declare const ThemeContext: import("react").Context<{
|
|
5
|
+
themeSettings: CompleteThemeSettings;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const useThemeContext: () => {
|
|
8
|
+
themeSettings: CompleteThemeSettings;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Theme provider, which allows you to adjust the look and feel of child components.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* Example of a theme provider, which changes the colors and font of the nested indicator chart:
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <ThemeProvider
|
|
17
|
+
* theme={{
|
|
18
|
+
* chart: {
|
|
19
|
+
* backgroundColor: '#333333',
|
|
20
|
+
* textColor: 'orange',
|
|
21
|
+
* secondaryTextColor: 'purple',
|
|
22
|
+
* },
|
|
23
|
+
* typography: {
|
|
24
|
+
* fontFamily: 'impact',
|
|
25
|
+
* },
|
|
26
|
+
* }}
|
|
27
|
+
* >
|
|
28
|
+
* <IndicatorChart {...chartOptions} />
|
|
29
|
+
* </ThemeProvider>
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* Indicator chart with custom theme settings:
|
|
33
|
+
*
|
|
34
|
+
* <img src="media://indicator-chart-example-2.png" width="400px" />
|
|
35
|
+
*
|
|
36
|
+
*
|
|
37
|
+
*
|
|
38
|
+
* For comparison, indicator chart with default theme settings:
|
|
39
|
+
*
|
|
40
|
+
* <img src="media://indicator-chart-example-1.png" width="400px" />
|
|
41
|
+
* @see {@link ThemeSettings}, {@link getDefaultThemeSettings}, {@link IndicatorChart}
|
|
42
|
+
* @param props - Theme provider props
|
|
43
|
+
* @returns A Theme Provider component
|
|
44
|
+
*/
|
|
45
|
+
export declare const ThemeProvider: import("react").FunctionComponent<ThemeProviderProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ThemeOid, ThemeSettings, CompleteThemeSettings } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the theme settings for the given theme OID or theme settings and error if it happened.
|
|
4
|
+
*
|
|
5
|
+
* If the given theme is a theme OID, the theme settings will be fetched from the Sisense instance.
|
|
6
|
+
* If the given theme is a theme settings object, the theme settings will be merged with parent's one and
|
|
7
|
+
* returned as is.
|
|
8
|
+
*
|
|
9
|
+
* @param userTheme Theme OID or theme settings object
|
|
10
|
+
* @returns Theme settings and error if it happened
|
|
11
|
+
*/
|
|
12
|
+
export declare function useThemeSettings(userTheme?: ThemeOid | ThemeSettings): [CompleteThemeSettings, null] | [null, Error];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { ThemeOid, CompleteThemeSettings } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Legacy analog of CompleteThemeSettings used in Sisense UI.
|
|
4
|
+
*/
|
|
5
|
+
export type LegacyDesignSettings = {
|
|
6
|
+
oid: ThemeOid;
|
|
7
|
+
dashboards: {
|
|
8
|
+
toolbarBackgroundColor: string;
|
|
9
|
+
toolbarSecondaryTextColor: string;
|
|
10
|
+
toolbarTextColor: string;
|
|
11
|
+
colorPaletteName: string;
|
|
12
|
+
navBackgroundColor: string;
|
|
13
|
+
navTextColor: string;
|
|
14
|
+
navTextHoverColor: string;
|
|
15
|
+
navHoverBackgroundColor: string;
|
|
16
|
+
panelBackgroundColor: string;
|
|
17
|
+
panelTitleTextColor: string;
|
|
18
|
+
widgetTextColor: string;
|
|
19
|
+
widgetSecondaryTextColor: string;
|
|
20
|
+
widgetBackgroundColor: string;
|
|
21
|
+
widgetTitleBackgroundColor: string;
|
|
22
|
+
widgetTitleColor: string;
|
|
23
|
+
widgetTitleAlignment: 'left' | 'center';
|
|
24
|
+
widgetSecondaryTitleColor: string;
|
|
25
|
+
widgetTitleDividerEnabled: boolean;
|
|
26
|
+
widgetTitleDividerColor: string;
|
|
27
|
+
widgetBorderEnabled: boolean;
|
|
28
|
+
widgetBorderColor: string;
|
|
29
|
+
widgetCornerRadius: 'none' | 'small' | 'medium' | 'large';
|
|
30
|
+
widgetShadow: 'none' | 'light' | 'medium' | 'dark';
|
|
31
|
+
widgetSpacing: 'none' | 'small' | 'medium' | 'large';
|
|
32
|
+
layoutBackgroundColor: string;
|
|
33
|
+
};
|
|
34
|
+
typography: {
|
|
35
|
+
customFontSelected: boolean;
|
|
36
|
+
fontFamily: string;
|
|
37
|
+
hyperlinkColor: string;
|
|
38
|
+
hyperlinkHoverColor: string;
|
|
39
|
+
predefinedFont: string;
|
|
40
|
+
primaryTextColor: string;
|
|
41
|
+
secondaryTextColor: string;
|
|
42
|
+
};
|
|
43
|
+
general: {
|
|
44
|
+
brandColor: string;
|
|
45
|
+
primaryButtonHoverColor: string;
|
|
46
|
+
primaryButtonTextColor: string;
|
|
47
|
+
secondaryButtonBaseColor: string;
|
|
48
|
+
secondaryButtonHoverColor: string;
|
|
49
|
+
secondaryButtonTextColor: string;
|
|
50
|
+
backgroundColor: string;
|
|
51
|
+
};
|
|
52
|
+
isDefault: boolean;
|
|
53
|
+
isSystem: boolean;
|
|
54
|
+
lastModified: string;
|
|
55
|
+
created: string;
|
|
56
|
+
name: string;
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Palette object used in legacy (form Sisense UI).
|
|
60
|
+
*/
|
|
61
|
+
export type LegacyPalette = {
|
|
62
|
+
_id: string;
|
|
63
|
+
colors: string[];
|
|
64
|
+
name: string;
|
|
65
|
+
isDefault: boolean;
|
|
66
|
+
sortOrder: number;
|
|
67
|
+
isSystem: boolean;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Error object returned by server when palette is not found.
|
|
71
|
+
*/
|
|
72
|
+
export type LegacyPaletteError = {
|
|
73
|
+
message: string;
|
|
74
|
+
status: 'error';
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Converts legacy (used in Sisense UI) design settings and it's palette object to CompleteThemeSettings.
|
|
78
|
+
*
|
|
79
|
+
* @param legacyDesignSettings - legacy design settings.
|
|
80
|
+
* @param legacyPalette - legacy palette object.
|
|
81
|
+
* @returns
|
|
82
|
+
*/
|
|
83
|
+
export declare function convertToThemeSettings(legacyDesignSettings: LegacyDesignSettings, legacyPalette: LegacyPalette): CompleteThemeSettings;
|
|
84
|
+
export declare function getPaletteName(legacyDesignSettings: LegacyDesignSettings): string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
|
+
import type { ThemeOid, CompleteThemeSettings } from '../types';
|
|
3
|
+
import { type LegacyPalette } from './legacy-design-settings';
|
|
4
|
+
/**
|
|
5
|
+
* Fetches theme settings from the Sisense instance and converts them to CompleteThemeSettings.
|
|
6
|
+
*
|
|
7
|
+
* @param themeOid - Theme oid.
|
|
8
|
+
* @param httpClient - Sisense REST API client.
|
|
9
|
+
* @returns CompleteThemeSettings from server.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function getThemeSettingsByOid(themeOid: ThemeOid, httpClient: Pick<HttpClient, 'get'>): Promise<CompleteThemeSettings>;
|
|
14
|
+
export declare function getLegacyPalette(paletteName: string, httpClient: Pick<HttpClient, 'get'>): Promise<LegacyPalette>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TreemapChartProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
* A React component displaying hierarchical data in the form of nested rectangles.
|
|
5
|
+
* This type of chart can be used in different scenarios, for example,
|
|
6
|
+
* instead of a column chart if you have to compare too many categories and sub-categories.
|
|
7
|
+
* See [Treemap Chart](https://docs.sisense.com/main/SisenseLinux/treemap.htm) for more information.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* An example of using the component to visualize the `Sample ECommerce` data source:
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <TreemapChart
|
|
13
|
+
* dataSet={DM.DataSource}
|
|
14
|
+
* dataOptions={{
|
|
15
|
+
* category: [
|
|
16
|
+
* {
|
|
17
|
+
* column: DM.Commerce.Сondition,
|
|
18
|
+
* isColored: true,
|
|
19
|
+
* },
|
|
20
|
+
* DM.Commerce.Date.Years
|
|
21
|
+
* ],
|
|
22
|
+
* value: [measures.sum(DM.Commerce.Quantity)],
|
|
23
|
+
* }}
|
|
24
|
+
* onDataPointClick= {(point, nativeEvent) => {
|
|
25
|
+
* console.log('clicked', point, nativeEvent);
|
|
26
|
+
* }}
|
|
27
|
+
* />
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* <img src="media://treemap-chart-example-1.png" width="600px" />
|
|
31
|
+
* @param props - Treemap chart properties
|
|
32
|
+
* @returns Treemap Chart component
|
|
33
|
+
*/
|
|
34
|
+
export declare const TreemapChart: import("react").FunctionComponent<TreemapChartProps>;
|