@sisense/sdk-ui 2.29.0 → 2.30.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 +57 -57
- package/dist/ai.js +767 -797
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +723 -696
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +6 -6
- package/dist/{apply-styled-options-to-query-CaP4IMrQ.js → apply-styled-options-to-query-BK1NnV4P.js} +1936 -1862
- package/dist/apply-styled-options-to-query-Dl8vVNxo.cjs +1 -0
- package/dist/{index-C77YCBVd.js → index-DCYw3JUB.js} +29 -7
- package/dist/index-DTvxJdqZ.cjs +1 -0
- package/dist/index.cjs +575 -482
- package/dist/index.js +26629 -25620
- package/dist/index.umd.js +925 -802
- package/dist/packages/sdk-ui/src/domains/dashboarding/common-filters/utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-container.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header-config.d.ts +127 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header-targets.d.ts +30 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header-title.d.ts +20 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header.d.ts +10 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/constants.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-helpers.d.ts +21 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +43 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-module/dashboard-module.d.ts +34 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-module/types.d.ts +58 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/use-duplicate-widget-menu-item.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-dashboard-header-menu-item.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/types.d.ts +11 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +18 -7
- package/dist/packages/sdk-ui/src/domains/dashboarding/utils.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/add-measure-data-browser.d.ts +11 -0
- package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/add-measure-popover.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/measure-ranking-title.d.ts +21 -0
- package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/measures.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/filter-editor-context.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/filter-editor-popover.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/filter-editor.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/sections/numeric-condition-section/types.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/sections/ranking-condition/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/sections/ranking-condition/ranking-condition-controls.d.ts +33 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-editor-popover/sections/ranking-condition/ranking-condition-utils.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-collapsible.d.ts +22 -4
- package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-top-slot-shell.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/narrative/components/narrative-trigger-button.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative-interactive.d.ts +20 -2
- package/dist/packages/sdk-ui/src/domains/narrative/components/widget-narrative.d.ts +11 -9
- package/dist/packages/sdk-ui/src/domains/narrative/core/build-narrative-request.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/narrative/core/get-narrative-dimensions-and-measures.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/narrative/core/get-widget-narrative-from-widget-props.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/narrative/core/to-nlg-api-verbosity.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +101 -23
- package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts +35 -32
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +11 -22
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-line-height.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +8 -9
- package/dist/packages/sdk-ui/src/domains/query-execution/core/execute-query.d.ts +34 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/excel-export/build-jaql-excel-export.d.ts +13 -5
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/excel-export/build-xlsx-export-payload.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query-by-widget-id/use-execute-query-by-widget-id.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/types.d.ts +55 -3
- package/dist/packages/sdk-ui/src/domains/shared/header/header-item-size.d.ts +30 -0
- package/dist/packages/sdk-ui/src/domains/shared/header/header-items-renderer.d.ts +19 -0
- package/dist/packages/sdk-ui/src/domains/shared/header/header-spacer-item.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/shared/header/index.d.ts +6 -0
- package/dist/packages/sdk-ui/src/domains/shared/header/resolve-header-items.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/shared/header/types.d.ts +98 -0
- package/dist/packages/sdk-ui/src/domains/shared/header/use-resolved-header-items.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/areamap-chart/data/areamap-data.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/helpers/data.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/stackable/streamgraph-chart/helpers/chart-data.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/categoricals/sunburst-chart/data/index.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/categoricals/treemap-chart/data/index.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/build-highchart-options.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/alerts/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/data/index.d.ts +22 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/data-options/index.d.ts +33 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/design-options/index.d.ts +21 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/highchart-options/highcharts-options-builder.d.ts +3 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/sankey-chart-builder.d.ts +3 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/sankey-node-colors.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/sankey-chart/types.d.ts +38 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/types.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/types.d.ts +12 -9
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/formatters/data-cell-formatters/data-cell-value-formatter.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/hooks/use-pivot-data-loading.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/resolve-pivot-container-size.d.ts +28 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/sankey-chart.d.ts +30 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/helpers/format-numbers.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/cartesian-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/categorical-data.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/chart-data-service.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/scatter-data.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data/types.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/apply-styled-options-to-query.d.ts +4 -4
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +47 -7
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +3 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/tooltip.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +10 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/funnel-plot-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/number-format-config.d.ts +12 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/pie-plot-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-options.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/types.d.ts +12 -3
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +8 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-excel-download.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-narrative.d.ts +28 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/use-custom-widget-excel-download.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/pivot-table-widget.d.ts +4 -4
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +7 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-pivot-widget-excel-download.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/tabber.d.ts +17 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/widget-narrative-style.d.ts +31 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +30 -1
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/excel-export-map-dimensions-measures.d.ts +17 -2
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/number-format-config-to-numeric-mask.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-container/widget-container.d.ts +7 -1
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model.d.ts +6 -1
- package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +18 -0
- package/dist/packages/sdk-ui/src/infra/plugins/types.d.ts +34 -6
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +169 -49
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +22 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +44 -0
- package/dist/packages/sdk-ui/src/modules/ai/common/collapsible.d.ts +38 -2
- package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +4 -13
- package/dist/packages/sdk-ui/src/modules/ai/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/process-measured-value.d.ts +14 -0
- package/dist/packages/sdk-ui/src/props.d.ts +46 -2
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +3 -1
- package/dist/packages/sdk-ui/src/public-api/beta.d.ts +6 -0
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +5 -3
- package/dist/packages/sdk-ui/src/types.d.ts +78 -6
- package/dist/{use-hover-Dju4Dcv3.js → quota-notification-DqabeDbO.js} +23733 -22015
- package/dist/quota-notification-gYE6PTWA.cjs +750 -0
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +27 -5
- package/dist/translations/en-us.cjs +1 -1
- package/dist/translations/en-us.js +1 -1
- package/dist/translations/es-ar.cjs +1 -1
- package/dist/translations/es-ar.js +27 -5
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +27 -5
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +27 -5
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +29 -7
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +27 -5
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +27 -5
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +29 -7
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +27 -5
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +27 -5
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +27 -5
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +27 -5
- package/dist/{types-DlYJ_DZ0.cjs → types-DSNnndG6.cjs} +1 -1
- package/dist/{types-7YG0uOzO.js → types-DecTaxy7.js} +1 -1
- package/dist/{utils-C4PIba42.cjs → utils-Cpeyj9TN.cjs} +52 -52
- package/dist/{utils-BKRpWUGm.js → utils-L-HO2pCd.js} +2518 -2469
- package/dist/{widget-composer-BXEyx308.cjs → widget-composer-CyWQaInf.cjs} +1 -1
- package/dist/{widget-composer-DRDw1oBF.js → widget-composer-u6NMLm1C.js} +3 -3
- package/package.json +8 -8
- package/dist/apply-styled-options-to-query-D5D8pRl2.cjs +0 -1
- package/dist/index-C9G8giSk.cjs +0 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-dashboard-header-toolbar.d.ts +0 -25
- package/dist/use-hover-CANskYrn.cjs +0 -720
|
@@ -22,5 +22,5 @@ type GetWidgetDataOptionsWithDrilldownParams = {
|
|
|
22
22
|
* @param params.drilldownOptions - The drilldown options of the widget.
|
|
23
23
|
* @returns The widget data options with drilldown applied.
|
|
24
24
|
*/
|
|
25
|
-
export declare function getWidgetDataOptionsWithDrilldown({ widgetType, chartType, dataOptions, drilldownOptions, }: GetWidgetDataOptionsWithDrilldownParams): import('../../../index.js').CategoricalChartDataOptions | import('../../../index.js').ScatterChartDataOptions | import('../../../index.js').IndicatorChartDataOptions | import('../../../index.js').BoxplotChartDataOptions | import('../../../index.js').BoxplotChartCustomDataOptions | import('../../../index.js').AreamapChartDataOptions | import('../../../index.js').ScattermapChartDataOptions | import('../../../index.js').RangeChartDataOptions | import('../../../index.js').CalendarHeatmapChartDataOptions | import('../../../index.js').TableDataOptions | PivotTableDataOptions | GenericDataOptions;
|
|
25
|
+
export declare function getWidgetDataOptionsWithDrilldown({ widgetType, chartType, dataOptions, drilldownOptions, }: GetWidgetDataOptionsWithDrilldownParams): import('../../../index.js').CategoricalChartDataOptions | import('../../../index.js').ScatterChartDataOptions | import('../../../index.js').IndicatorChartDataOptions | import('../../../index.js').BoxplotChartDataOptions | import('../../../index.js').BoxplotChartCustomDataOptions | import('../../../index.js').AreamapChartDataOptions | import('../../../index.js').ScattermapChartDataOptions | import('../../../index.js').RangeChartDataOptions | import('../../../index.js').CalendarHeatmapChartDataOptions | import('../../../index.js').SankeyChartDataOptions | import('../../../index.js').TableDataOptions | PivotTableDataOptions | GenericDataOptions;
|
|
26
26
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DashboardContainerProps } from '../../../domains/dashboarding/types';
|
|
2
|
-
export declare const DashboardContainer: ({ editMode, onLayoutChange,
|
|
2
|
+
export declare const DashboardContainer: ({ editMode, onLayoutChange, headerItems, headerConfig, title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource, filterPanelCollapsed, onFilterPanelCollapsedChange, }: DashboardContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Size of a custom dashboard header item, in pixels.
|
|
4
|
+
*
|
|
5
|
+
* @alpha
|
|
6
|
+
*/
|
|
7
|
+
export interface DashboardHeaderItemSize {
|
|
8
|
+
/**
|
|
9
|
+
* Fixed width of the item, in pixels.
|
|
10
|
+
*
|
|
11
|
+
* If omitted, it falls back to the default dashboard header item size of `28px`.
|
|
12
|
+
*/
|
|
13
|
+
width?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Fixed height of the item, in pixels.
|
|
16
|
+
*
|
|
17
|
+
* If omitted, falls back to the default dashboard header item size of `28px`.
|
|
18
|
+
*/
|
|
19
|
+
height?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Props passed to a {@link DashboardHeaderItemComponent} when it is rendered.
|
|
23
|
+
*
|
|
24
|
+
* @alpha
|
|
25
|
+
*/
|
|
26
|
+
export interface DashboardHeaderItemComponentProps {
|
|
27
|
+
/** The size resolved for the item by the header layout, with defaults applied. */
|
|
28
|
+
size: {
|
|
29
|
+
/**
|
|
30
|
+
* Fixed width of the item, in pixels.
|
|
31
|
+
*/
|
|
32
|
+
width: number;
|
|
33
|
+
/**
|
|
34
|
+
* Fixed height of the item, in pixels.
|
|
35
|
+
*/
|
|
36
|
+
height: number;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* A React component that renders the content of a custom dashboard header item.
|
|
41
|
+
*
|
|
42
|
+
* @alpha
|
|
43
|
+
*/
|
|
44
|
+
export type DashboardHeaderItemComponent = (props: DashboardHeaderItemComponentProps) => ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Position of a custom dashboard header item relative to the other items.
|
|
47
|
+
*
|
|
48
|
+
* - `auto` (default) — placed in the trailing group, after the center spacer.
|
|
49
|
+
* - `before` / `after` — placed immediately before/after the item with the given `target` id.
|
|
50
|
+
* Pass a {@link DashboardHeaderTargets} constant to anchor to a built-in item (works even when
|
|
51
|
+
* that built-in is currently hidden), or any custom item id to anchor to another injected item.
|
|
52
|
+
* - `first` / `last` — placed at the very start/end of the header.
|
|
53
|
+
*
|
|
54
|
+
* @alpha
|
|
55
|
+
*/
|
|
56
|
+
export type DashboardHeaderItemPosition = {
|
|
57
|
+
type: 'auto';
|
|
58
|
+
} | {
|
|
59
|
+
type: 'before';
|
|
60
|
+
target: string;
|
|
61
|
+
} | {
|
|
62
|
+
type: 'after';
|
|
63
|
+
target: string;
|
|
64
|
+
} | {
|
|
65
|
+
type: 'first';
|
|
66
|
+
} | {
|
|
67
|
+
type: 'last';
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* A custom item to inject into the dashboard header.
|
|
71
|
+
*
|
|
72
|
+
* @alpha
|
|
73
|
+
*/
|
|
74
|
+
export interface DashboardHeaderItem {
|
|
75
|
+
/**
|
|
76
|
+
* Unique identifier of the item.
|
|
77
|
+
*
|
|
78
|
+
* Must not match a built-in dashboard header item id (see {@link DashboardHeaderTargets}).
|
|
79
|
+
*/
|
|
80
|
+
id: string;
|
|
81
|
+
/**
|
|
82
|
+
* Component that renders the content of the item.
|
|
83
|
+
*/
|
|
84
|
+
component: DashboardHeaderItemComponent;
|
|
85
|
+
/**
|
|
86
|
+
* Placement of the item.
|
|
87
|
+
*
|
|
88
|
+
* Defaults to `{ type: 'auto' }` (after the center spacer).
|
|
89
|
+
*/
|
|
90
|
+
position?: DashboardHeaderItemPosition;
|
|
91
|
+
/**
|
|
92
|
+
* Size of the item.
|
|
93
|
+
*/
|
|
94
|
+
size?: DashboardHeaderItemSize;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* A dashboard header item after the built-in and custom items have been ordered (position applied).
|
|
98
|
+
*
|
|
99
|
+
* This is the shape passed to {@link DashboardHeaderConfig.onBeforeRender}.
|
|
100
|
+
*
|
|
101
|
+
* @alpha
|
|
102
|
+
*/
|
|
103
|
+
export type DashboardResolvedHeaderItem = Omit<DashboardHeaderItem, 'position'>;
|
|
104
|
+
/**
|
|
105
|
+
* Transforms the fully ordered list of dashboard header items right before rendering.
|
|
106
|
+
*
|
|
107
|
+
* @alpha
|
|
108
|
+
*/
|
|
109
|
+
export type DashboardHeaderItemsTransform = (items: ReadonlyArray<DashboardResolvedHeaderItem>) => DashboardResolvedHeaderItem[];
|
|
110
|
+
/**
|
|
111
|
+
* Configuration for the dashboard header items.
|
|
112
|
+
*
|
|
113
|
+
* @alpha
|
|
114
|
+
*/
|
|
115
|
+
export interface DashboardHeaderConfig {
|
|
116
|
+
/**
|
|
117
|
+
* Custom items to inject into the header.
|
|
118
|
+
*
|
|
119
|
+
* Each item's `id` must not match a built-in item id (see {@link DashboardHeaderTargets}).
|
|
120
|
+
*/
|
|
121
|
+
items?: DashboardHeaderItem[];
|
|
122
|
+
/**
|
|
123
|
+
* Advanced hook to inspect and rewrite the full, ordered list of header items (built-in +
|
|
124
|
+
* custom) right before rendering.
|
|
125
|
+
*/
|
|
126
|
+
onBeforeRender?: DashboardHeaderItemsTransform;
|
|
127
|
+
}
|
package/dist/packages/sdk-ui/src/domains/dashboarding/components/dashboard-header-targets.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ids of the built-in dashboard header items.
|
|
3
|
+
*
|
|
4
|
+
* Use these as `target`s for the `before`/`after` position of a {@link DashboardHeaderItem}.
|
|
5
|
+
* A target stays valid even when it is not currently shown (e.g. the filter toggle when
|
|
6
|
+
* its icon is disabled): the position resolves as if the built-in were there, so the custom item lands
|
|
7
|
+
* in a stable spot regardless of which built-ins happen to be visible.
|
|
8
|
+
*
|
|
9
|
+
* @alpha
|
|
10
|
+
*/
|
|
11
|
+
export declare const DashboardHeaderTargets: {
|
|
12
|
+
/** The dashboard title. */
|
|
13
|
+
readonly Title: "dashboard-header-title";
|
|
14
|
+
/** The flexible center spacer that separates the title and trailing groups. */
|
|
15
|
+
readonly Spacer: "dashboard-header-spacer";
|
|
16
|
+
/** The edit-mode toolbar (undo/redo/cancel/apply), shown while editing with batch changes. */
|
|
17
|
+
readonly EditModeToolbar: "dashboard-header-edit-mode-toolbar";
|
|
18
|
+
/** The edit-mode toggle button. */
|
|
19
|
+
readonly EditToggle: "dashboard-header-edit-toggle";
|
|
20
|
+
/** The filters-panel toggle button. */
|
|
21
|
+
readonly FilterToggle: "dashboard-header-filter-toggle";
|
|
22
|
+
/** The overflow/context menu button. */
|
|
23
|
+
readonly Menu: "dashboard-header-menu";
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Union of the built-in dashboard header item ids, usable as `target` for `before`/`after` positions.
|
|
27
|
+
*
|
|
28
|
+
* @alpha
|
|
29
|
+
*/
|
|
30
|
+
export type DashboardHeaderTarget = (typeof DashboardHeaderTargets)[keyof typeof DashboardHeaderTargets];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HeaderItem } from '../../../domains/shared/header';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link DashboardHeaderTitle}.
|
|
4
|
+
*/
|
|
5
|
+
export interface DashboardHeaderTitleProps {
|
|
6
|
+
/** The dashboard title text. */
|
|
7
|
+
title: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The dashboard title, rendered as the content of the built-in title header item.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DashboardHeaderTitle: ({ title }: DashboardHeaderTitleProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/**
|
|
14
|
+
* Builds the built-in title header item.
|
|
15
|
+
*
|
|
16
|
+
* The title can be targeted by `before`/`after`. It uses the internal `fill: 'truncate'` so it
|
|
17
|
+
* takes its natural content width on the leading side and is the only item that shrinks/ellipsizes
|
|
18
|
+
* under pressure (action buttons keep their size); the center spacer absorbs the free space.
|
|
19
|
+
*/
|
|
20
|
+
export declare const createDashboardTitleItem: (title: string) => HeaderItem;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import { DashboardHeaderProps } from '../../../domains/dashboarding/types';
|
|
2
2
|
export declare const DASHBOARD_HEADER_HEIGHT = 48;
|
|
3
|
-
|
|
3
|
+
/** Default size (px) for dashboard header items that don't specify their own size. */
|
|
4
|
+
export declare const DASHBOARD_HEADER_ITEM_SIZE = 28;
|
|
5
|
+
/**
|
|
6
|
+
* Dashboard header.
|
|
7
|
+
*
|
|
8
|
+
* Pure renderer: it receives the full list of built-in header items (title and center spacer
|
|
9
|
+
* included), resolves them against the user {@link DashboardHeaderConfig} (ordering then
|
|
10
|
+
* `onBeforeRender`), and renders the result. Auto-positioned items land after the center spacer.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DashboardHeader: ({ items, config }: DashboardHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DeepRequired } from 'ts-essentials';
|
|
2
2
|
import { DashboardByIdConfig, DashboardConfig, EditModeConfig, WidgetsPanelConfig } from './types.js';
|
|
3
|
-
export declare const DEFAULT_DASHBOARD_CONFIG: DeepRequired<Omit<DashboardConfig, 'widgetsPanel' | 'tabbers'> & {
|
|
3
|
+
export declare const DEFAULT_DASHBOARD_CONFIG: DeepRequired<Omit<DashboardConfig, 'widgetsPanel' | 'tabbers' | 'header'> & {
|
|
4
4
|
widgetsPanel: Omit<WidgetsPanelConfig, 'editMode'> & {
|
|
5
5
|
editMode: Omit<EditModeConfig, 'isEditing'>;
|
|
6
6
|
};
|
|
7
7
|
}>;
|
|
8
|
-
export declare const DEFAULT_DASHBOARD_BY_ID_CONFIG: DeepRequired<Omit<DashboardByIdConfig, 'widgetsPanel' | 'tabbers'> & {
|
|
8
|
+
export declare const DEFAULT_DASHBOARD_BY_ID_CONFIG: DeepRequired<Omit<DashboardByIdConfig, 'widgetsPanel' | 'tabbers' | 'header'> & {
|
|
9
9
|
widgetsPanel: Omit<WidgetsPanelConfig, 'editMode'> & {
|
|
10
10
|
editMode: Omit<EditModeConfig, 'isEditing'>;
|
|
11
11
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
+
import { DashboardHeaderItem } from './components/dashboard-header-config.js';
|
|
2
3
|
import type { JumpToDashboardConfig } from './hooks/jtd/jtd-types.js';
|
|
3
4
|
import { DashboardProps } from './types.js';
|
|
4
5
|
/**
|
|
@@ -216,3 +217,23 @@ export declare const applyJtdConfig: (dashboard: DashboardProps, widgetOid: stri
|
|
|
216
217
|
* @group Dashboard Utilities
|
|
217
218
|
*/
|
|
218
219
|
export declare const applyJtdConfigs: (dashboard: DashboardProps, jtdConfigs: Record<string, JumpToDashboardConfig>) => DashboardProps;
|
|
220
|
+
/**
|
|
221
|
+
* Creates a transformer that appends the given item to `config.header.items` of a dashboard.
|
|
222
|
+
*
|
|
223
|
+
* This is the canonical way for a dashboard customization (see `DashboardCustomization`) to add a
|
|
224
|
+
* header toolbar item. The returned transformer is pure — it does not modify the original dashboard;
|
|
225
|
+
* instead, it returns a new dashboard with the header item added.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* Add a custom header item to a dashboard.
|
|
229
|
+
* ```ts
|
|
230
|
+
* const updatedDashboard = withHeaderItem({
|
|
231
|
+
* id: 'my-button',
|
|
232
|
+
* component: () => <MyButton />,
|
|
233
|
+
* })(dashboard);
|
|
234
|
+
* ```
|
|
235
|
+
* @param item - The header item to add.
|
|
236
|
+
* @returns A transformer `(dashboard: DashboardProps) => DashboardProps` with the item appended.
|
|
237
|
+
* @sisenseInternal
|
|
238
|
+
*/
|
|
239
|
+
export declare const withHeaderItem: (item: DashboardHeaderItem) => (dashboard: Readonly<DashboardProps>) => DashboardProps;
|
package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dimension, Filter, FilterRelations, Measure } from '@sisense/sdk-data';
|
|
2
2
|
import { JtdTarget, JumpToDashboardConfig, JumpToDashboardConfigForPivot, TriggerMethod } from '../../../domains/dashboarding/hooks/jtd/jtd-types';
|
|
3
|
-
import { TabbersConfig } from '../../../domains/dashboarding/hooks/use-tabber';
|
|
3
|
+
import { TabberConfig, TabbersConfig } from '../../../domains/dashboarding/hooks/use-tabber';
|
|
4
4
|
import { Panel, WidgetDto } from '../../../domains/widgets/components/widget-by-id/types';
|
|
5
5
|
import { RestApi } from '../../../infra/api/rest-api';
|
|
6
6
|
import { type CascadingFilterDto, DashboardDto, type FilterDto, type LayoutDto } from '../../../infra/api/types/dashboard-dto';
|
|
@@ -39,6 +39,48 @@ export declare function translateWidgetsOptions(widgets?: WidgetDto[]): WidgetsO
|
|
|
39
39
|
* @internal
|
|
40
40
|
*/
|
|
41
41
|
export declare function withSpecificWidgetOptions(widgetOptions?: SpecificWidgetOptions): (widgetDto: WidgetDto) => WidgetDto;
|
|
42
|
+
/**
|
|
43
|
+
* The dashboard-level context held about a single widget, gathered from the
|
|
44
|
+
* (separate) containers it can live in: `widgetsOptions[id]`
|
|
45
|
+
* ({@link SpecificWidgetOptions}: common filters, JTD, partial DTO snapshot) and
|
|
46
|
+
* `config.tabbers[id]` ({@link TabberConfig}: per-tab show/hide mapping).
|
|
47
|
+
*
|
|
48
|
+
* Consumed by {@link withDashboardWidgetContext} to re-project this context onto a
|
|
49
|
+
* freshly-translated {@link WidgetDto} on add/duplicate, so dashboard-level config
|
|
50
|
+
* survives the model → DTO write path.
|
|
51
|
+
*
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export type WidgetContext = {
|
|
55
|
+
/** Per-widget options from `widgetsOptions[id]`. */
|
|
56
|
+
options?: SpecificWidgetOptions;
|
|
57
|
+
/** Tabber show/hide mapping from `config.tabbers[id]`. */
|
|
58
|
+
tabber?: TabberConfig;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Overlays a {@link TabberConfig} onto a tabber {@link WidgetDto}.
|
|
62
|
+
*
|
|
63
|
+
* The widget-level translator (`toTabberWidgetStyle`) rebuilds `style.tabs[]` with
|
|
64
|
+
* tab names / `activeTab` / styling but empty `displayWidgetIds` — the widget model
|
|
65
|
+
* does not know about other widgets' ids. This overlays the dashboard-level
|
|
66
|
+
* show/hide mapping back onto those tabs by index. No-op for non-tabber DTOs or
|
|
67
|
+
* when there is no tabber config.
|
|
68
|
+
*
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export declare function withTabberWidgetConfig(tabberConfig?: TabberConfig): (widgetDto: WidgetDto) => WidgetDto;
|
|
72
|
+
/**
|
|
73
|
+
* Projects all dashboard-level {@link WidgetContext} for a widget onto a freshly
|
|
74
|
+
* translated {@link WidgetDto}. Composes the per-container projections
|
|
75
|
+
* ({@link withSpecificWidgetOptions} for `widgetsOptions`, {@link withTabberWidgetConfig}
|
|
76
|
+
* for `config.tabbers`); each is last-write-wins and a no-op when its slice is absent.
|
|
77
|
+
*
|
|
78
|
+
* This is the single seam that re-attaches dashboard-level widget config on
|
|
79
|
+
* add/duplicate; a new per-widget side-channel adds its projection here.
|
|
80
|
+
*
|
|
81
|
+
* @internal
|
|
82
|
+
*/
|
|
83
|
+
export declare function withDashboardWidgetContext(context: WidgetContext): (widgetDto: WidgetDto) => WidgetDto;
|
|
42
84
|
export declare function translateTabbersOptions(widgets?: WidgetDto[]): TabbersConfig;
|
|
43
85
|
/**
|
|
44
86
|
* Replace all shared formulas, which defined by id references, in the dashboard with their actual values.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
2
|
import { DashboardModel, SpecificWidgetOptions, WidgetsPanelLayout } from '../../../../../domains/dashboarding/dashboard-model';
|
|
3
|
+
import { TabberConfig } from '../../../../../domains/dashboarding/hooks/use-tabber';
|
|
3
4
|
import type { WidgetPropsUpdate } from '../../../../../domains/dashboarding/persistence/update-types.js';
|
|
4
5
|
import type { WidgetDto } from '../../../../../domains/widgets/components/widget-by-id/types';
|
|
5
6
|
import { WidgetModel } from '../../../../../domains/widgets/widget-model';
|
|
@@ -123,6 +124,12 @@ export type UseDashboardModelAddWidgetAction = {
|
|
|
123
124
|
widget: WidgetModel;
|
|
124
125
|
widgetsPanelLayout?: WidgetsPanelLayout;
|
|
125
126
|
widgetOptions?: SpecificWidgetOptions;
|
|
127
|
+
/**
|
|
128
|
+
* Dashboard-level tabber config for the widget (from `config.tabbers[id]`),
|
|
129
|
+
* carried so the persist middleware can project it back onto the widget DTO
|
|
130
|
+
* and the reducer can store it under the new widget id on duplication.
|
|
131
|
+
*/
|
|
132
|
+
tabberConfig?: TabberConfig;
|
|
126
133
|
};
|
|
127
134
|
};
|
|
128
135
|
/**
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
2
|
import { SpecificWidgetOptions, WidgetsPanelLayout } from '../../../../../domains/dashboarding/dashboard-model';
|
|
3
|
+
import { TabberConfig } from '../../../../../domains/dashboarding/hooks/use-tabber';
|
|
3
4
|
import { WidgetModel } from '../../../../../domains/widgets/widget-model';
|
|
4
5
|
import { AddWidgetPayload } from './types.js';
|
|
5
6
|
/**
|
|
@@ -24,6 +25,7 @@ export declare function parseAddWidgetPayload(payload: AddWidgetPayload): {
|
|
|
24
25
|
widget: WidgetModel;
|
|
25
26
|
widgetsPanelLayout?: WidgetsPanelLayout;
|
|
26
27
|
widgetOptions?: SpecificWidgetOptions;
|
|
28
|
+
tabberConfig?: TabberConfig;
|
|
27
29
|
};
|
|
28
30
|
/**
|
|
29
31
|
* Appends a widget cell to the first column's first row. Creates row/cells if missing.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ApiContract, ApiField, Module } from '../../../infra/modules/types';
|
|
2
|
+
import { DashboardCustomization } from './types.js';
|
|
3
|
+
/** Name of the `dashboard` module. */
|
|
4
|
+
export declare const DASHBOARD_MODULE_NAME = "dashboard";
|
|
5
|
+
/**
|
|
6
|
+
* API declaration for the `dashboard` module.
|
|
7
|
+
*/
|
|
8
|
+
export interface DashboardModuleApiDefinition {
|
|
9
|
+
/**
|
|
10
|
+
* Registry of dashboard customization middlewares. Each contribution is applied, in registration
|
|
11
|
+
* order, to the props of every {@link Dashboard}.
|
|
12
|
+
*/
|
|
13
|
+
customizations: ApiField<DashboardCustomization[], DashboardCustomization[]>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The `dashboard` module.
|
|
17
|
+
*
|
|
18
|
+
* Owns the `customizations` registry — other modules contribute {@link DashboardCustomization}
|
|
19
|
+
* middlewares there (via their `integrations`), which `Dashboard` applies to its props. Register it
|
|
20
|
+
* on `SisenseContextProvider`'s `modules` prop together with the modules that customize dashboards.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* <SisenseContextProvider modules={[DashboardModule, ...otherModules]} ... />
|
|
25
|
+
* ```
|
|
26
|
+
* @sisenseInternal
|
|
27
|
+
*/
|
|
28
|
+
export declare const DashboardModule: Module<DashboardModuleApiDefinition>;
|
|
29
|
+
/**
|
|
30
|
+
* API contract for contributing to the `dashboard` module.
|
|
31
|
+
*
|
|
32
|
+
* @sisenseInternal
|
|
33
|
+
*/
|
|
34
|
+
export type DashboardModuleApi = ApiContract<DashboardModuleApiDefinition>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
+
import { WidgetsPanelLayout } from '../../../domains/dashboarding/dashboard-model';
|
|
3
|
+
import { DashboardProps } from '../../../domains/dashboarding/types';
|
|
4
|
+
import { WidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
5
|
+
/**
|
|
6
|
+
* Dashboard state API.
|
|
7
|
+
*
|
|
8
|
+
* Passed as the second argument to every {@link DashboardCustomization}. Each method is backed by
|
|
9
|
+
* the composition layer's own state, so mutations flow through the normal dashboard pipeline and are
|
|
10
|
+
* persisted automatically when the dashboard has persistence enabled.
|
|
11
|
+
*
|
|
12
|
+
* @sisenseInternal
|
|
13
|
+
*/
|
|
14
|
+
export interface DashboardStateApi {
|
|
15
|
+
/**
|
|
16
|
+
* Adds a widget to the dashboard. Persists automatically when the dashboard is configured with
|
|
17
|
+
* persistence enabled; otherwise updates local state only.
|
|
18
|
+
*
|
|
19
|
+
* @param widget - The widget to add.
|
|
20
|
+
* @returns void
|
|
21
|
+
*/
|
|
22
|
+
addWidget: (widget: WidgetProps) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Replaces the dashboard filters.
|
|
25
|
+
*
|
|
26
|
+
* @param filters - The new filters or filter relations to apply.
|
|
27
|
+
* @returns void
|
|
28
|
+
*/
|
|
29
|
+
setFilters: (filters: Filter[] | FilterRelations) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Replaces the widgets-panel layout.
|
|
32
|
+
*
|
|
33
|
+
* @param layout - The new widgets-panel layout.
|
|
34
|
+
* @returns void
|
|
35
|
+
*/
|
|
36
|
+
setWidgetsLayout: (layout: WidgetsPanelLayout) => void;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A dashboard customization middleware.
|
|
40
|
+
*
|
|
41
|
+
* Receives the dashboard props and returns a (possibly) modified copy — for example to
|
|
42
|
+
* inject a header item via `config.header.items`. The second argument is a {@link DashboardStateApi}
|
|
43
|
+
* for imperatively mutating dashboard state (e.g. adding a widget) in response to later user
|
|
44
|
+
* interaction. Customizations must be pure with respect to `dashboard` (return new props rather than
|
|
45
|
+
* mutate the argument) and idempotent, since they are re-applied on every render.
|
|
46
|
+
*
|
|
47
|
+
* @sisenseInternal
|
|
48
|
+
*/
|
|
49
|
+
export type DashboardCustomization = (
|
|
50
|
+
/**
|
|
51
|
+
* The current dashboard props (read-only). Return a new object with your modifications rather
|
|
52
|
+
* than mutating this value directly.
|
|
53
|
+
*
|
|
54
|
+
* @param dashboard - Current dashboard props.
|
|
55
|
+
* @param stateApi - API for imperatively mutating dashboard state.
|
|
56
|
+
* @returns Modified dashboard props.
|
|
57
|
+
*/
|
|
58
|
+
dashboard: Readonly<DashboardProps>, stateApi: DashboardStateApi) => DashboardProps;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { WidgetsOptions, WidgetsPanelLayout } from '../../../../domains/dashboarding/dashboard-model/types.js';
|
|
3
|
+
import type { TabbersConfig } from '../../../../domains/dashboarding/hooks/use-tabber.js';
|
|
3
4
|
import { type WidgetProps } from '../../../../domains/widgets/components/widget/types.js';
|
|
4
5
|
import type { DashboardPersistenceManager } from '../../persistence/types.js';
|
|
5
6
|
/** Setter for widgets array (e.g. React setState or updater function). */
|
|
6
7
|
export type SetWidgets = React.Dispatch<React.SetStateAction<WidgetProps[]>>;
|
|
7
8
|
/** Setter for widgets options array (e.g. React setState or updater function). */
|
|
8
9
|
export type SetWidgetsOptions = React.Dispatch<React.SetStateAction<WidgetsOptions>>;
|
|
10
|
+
/** Setter for the dashboard-level tabbers config (e.g. React setState or updater function). */
|
|
11
|
+
export type SetTabbersConfig = React.Dispatch<React.SetStateAction<TabbersConfig>>;
|
|
9
12
|
/** Setter for widgets panel layout. */
|
|
10
13
|
export type SetWidgetsLayout = (newLayout: WidgetsPanelLayout) => void;
|
|
11
14
|
/** Options for the duplicate widget middleware hook. */
|
|
@@ -24,6 +27,10 @@ export type UseDuplicateWidgetMenuItemParams = {
|
|
|
24
27
|
widgetsOptions?: WidgetsOptions;
|
|
25
28
|
/** Setter to update widgets options (e.g. from parent state). */
|
|
26
29
|
setWidgetsOptions: SetWidgetsOptions;
|
|
30
|
+
/** Dashboard-level tabbers config (copied to the cloned widget so its tab show/hide mapping survives). */
|
|
31
|
+
tabbersConfig?: TabbersConfig;
|
|
32
|
+
/** Setter to update the tabbers config (e.g. from parent state). */
|
|
33
|
+
setTabbersConfig?: SetTabbersConfig;
|
|
27
34
|
persistence?: Pick<DashboardPersistenceManager, 'addWidget'>;
|
|
28
35
|
};
|
|
29
36
|
/** Output of the duplicate widget middleware. */
|
package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-dashboard-header-menu-item.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HeaderItem } from '../../../domains/shared/header';
|
|
2
|
+
import { MenuItemSection } from '../../../props';
|
|
3
|
+
/**
|
|
4
|
+
* Builds the built-in dashboard header menu item from the given menu sections.
|
|
5
|
+
*
|
|
6
|
+
* Always returns the item so it can anchor `before`/`after` positioning; it is marked `hidden`
|
|
7
|
+
* (anchor-only, not rendered) when there are no menu sections.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDashboardHeaderMenuItem: (menuItemSections?: MenuItemSection[]) => HeaderItem;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SpecificWidgetOptions, WidgetPatch, WidgetsPanelLayout } from '../../../domains/dashboarding/dashboard-model';
|
|
2
|
+
import type { TabberConfig } from '../../../domains/dashboarding/hooks/use-tabber';
|
|
2
3
|
import type { WidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
3
4
|
import type { WidgetPropsUpdate } from './update-types.js';
|
|
4
5
|
export type { WidgetPropsUpdate, OnWidgetUpdate } from './update-types.js';
|
|
@@ -24,7 +25,12 @@ export type DashboardPersistenceManager = {
|
|
|
24
25
|
/**
|
|
25
26
|
* The dashboard-level options for the new widget.
|
|
26
27
|
*/
|
|
27
|
-
widgetOptions?: SpecificWidgetOptions
|
|
28
|
+
widgetOptions?: SpecificWidgetOptions,
|
|
29
|
+
/**
|
|
30
|
+
* The dashboard-level tabber config for the new widget (from `config.tabbers[id]`).
|
|
31
|
+
* Projected back onto the widget DTO and stored under the new widget id.
|
|
32
|
+
*/
|
|
33
|
+
tabberConfig?: TabberConfig) => Promise<{
|
|
28
34
|
/**
|
|
29
35
|
* The persisted widget (possibly modified by the server, e.g. new id).
|
|
30
36
|
*/
|
|
@@ -37,6 +43,10 @@ export type DashboardPersistenceManager = {
|
|
|
37
43
|
* The options for the widget (after server modifications).
|
|
38
44
|
*/
|
|
39
45
|
widgetOptions?: SpecificWidgetOptions;
|
|
46
|
+
/**
|
|
47
|
+
* The tabber config for the widget (after server modifications).
|
|
48
|
+
*/
|
|
49
|
+
tabberConfig?: TabberConfig;
|
|
40
50
|
}>;
|
|
41
51
|
/**
|
|
42
52
|
* Patch a single field (e.g. title) on an existing widget.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
1
|
import { DataSource, Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
+
import { DashboardHeaderConfig } from '../../domains/dashboarding/components/dashboard-header-config';
|
|
3
3
|
import { DashboardStyleOptions, WidgetsOptions, WidgetsPanelLayout } from '../../domains/dashboarding/dashboard-model';
|
|
4
4
|
import { TabbersConfig } from '../../domains/dashboarding/hooks/use-tabber';
|
|
5
5
|
import { FiltersPanelConfig } from '../../domains/filters/components/filters-panel/types';
|
|
6
|
+
import { HeaderItem } from '../../domains/shared/header';
|
|
6
7
|
import { WidgetProps } from '../../domains/widgets/components/widget/types';
|
|
7
8
|
import type { DashboardPersistenceManager } from './persistence/types.js';
|
|
8
9
|
export type { DashboardStyleOptions, SpecificWidgetOptions, WidgetsPanelColumnLayout, WidgetsPanelLayout, WidgetsPanelCell, WidgetsPanelRow, WidgetsPanelColumn, } from '../../domains/dashboarding/dashboard-model';
|
|
@@ -111,11 +112,13 @@ export interface DashboardContainerProps {
|
|
|
111
112
|
*/
|
|
112
113
|
onLayoutChange: (layout: WidgetsPanelLayout) => void;
|
|
113
114
|
/**
|
|
114
|
-
*
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
* Built-in action items rendered in the dashboard header.
|
|
116
|
+
*/
|
|
117
|
+
headerItems?: HeaderItem[];
|
|
118
|
+
/**
|
|
119
|
+
* User configuration for the dashboard header items.
|
|
117
120
|
*/
|
|
118
|
-
|
|
121
|
+
headerConfig?: DashboardHeaderConfig;
|
|
119
122
|
}
|
|
120
123
|
/**
|
|
121
124
|
* Dashboard filters panel configuration
|
|
@@ -293,6 +296,12 @@ export interface DashboardConfig {
|
|
|
293
296
|
* Configuration for the filters panel
|
|
294
297
|
*/
|
|
295
298
|
filtersPanel?: DashboardFiltersPanelConfig;
|
|
299
|
+
/**
|
|
300
|
+
* Configuration for the dashboard header
|
|
301
|
+
*
|
|
302
|
+
* @alpha
|
|
303
|
+
*/
|
|
304
|
+
header?: DashboardHeaderConfig;
|
|
296
305
|
/**
|
|
297
306
|
* Configuration for the toolbar
|
|
298
307
|
*/
|
|
@@ -397,6 +406,8 @@ export interface DashboardProps {
|
|
|
397
406
|
* @internal
|
|
398
407
|
*/
|
|
399
408
|
export interface DashboardHeaderProps {
|
|
400
|
-
title
|
|
401
|
-
|
|
409
|
+
/** Built-in header items (title, spacer, edit-mode toolbar, toggles, menu) before user config is merged. */
|
|
410
|
+
items?: HeaderItem[];
|
|
411
|
+
/** User configuration for the header items. */
|
|
412
|
+
config?: DashboardHeaderConfig;
|
|
402
413
|
}
|
|
@@ -10,6 +10,15 @@ export declare const getDividerStyle: (color: string, width: number) => string;
|
|
|
10
10
|
* @returns The default layout for the widgets.
|
|
11
11
|
*/
|
|
12
12
|
export declare const getDefaultWidgetsPanelLayout: (widgets: WidgetProps[]) => WidgetsPanelColumnLayout;
|
|
13
|
+
/**
|
|
14
|
+
* Returns a copy of the layout with a new full-width row holding `widgetId` appended to the first
|
|
15
|
+
* column (a column is created if the layout has none). Pure; does not mutate the input.
|
|
16
|
+
*
|
|
17
|
+
* @param layout - The current widgets-panel layout.
|
|
18
|
+
* @param widgetId - The id of the widget to append.
|
|
19
|
+
* @returns The layout with the widget appended.
|
|
20
|
+
*/
|
|
21
|
+
export declare const withWidgetAppendedToPanelLayout: (layout: WidgetsPanelColumnLayout, widgetId: string) => WidgetsPanelColumnLayout;
|
|
13
22
|
/**
|
|
14
23
|
* With optionally disabled auto height.
|
|
15
24
|
*
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseMeasure, DataSource } from '@sisense/sdk-data';
|
|
2
|
+
type AddMeasureDataBrowserProps = {
|
|
3
|
+
dataSources: DataSource[];
|
|
4
|
+
initialDataSource: DataSource;
|
|
5
|
+
onMeasureCreated: (measure: BaseMeasure) => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* A component that allows users to select a data source and an attribute to create a measure.
|
|
9
|
+
*/
|
|
10
|
+
export declare const AddMeasureDataBrowser: ({ initialDataSource, dataSources, onMeasureCreated, }: AddMeasureDataBrowserProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/add-measure-popover.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseMeasure, DataSource } from '@sisense/sdk-data';
|
|
2
|
+
type AddMeasurePopoverProps = {
|
|
3
|
+
anchorEl: HTMLElement;
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
dataSources: DataSource[];
|
|
7
|
+
initialDataSource: DataSource;
|
|
8
|
+
onMeasureCreated: (measure: BaseMeasure) => void;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A popover with "data browser" that allows users to select a data source and an attribute to create a measure.
|
|
12
|
+
*/
|
|
13
|
+
export declare const AddMeasurePopover: ({ anchorEl, isOpen, onClose, dataSources, initialDataSource, onMeasureCreated, }: AddMeasurePopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
package/dist/packages/sdk-ui/src/domains/data-browser/add-measure-popover/measure-ranking-title.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AggregationType, Measure } from '@sisense/sdk-data';
|
|
2
|
+
import type { TFunction } from 'i18next';
|
|
3
|
+
/**
|
|
4
|
+
* Builds a human-readable measure title from an aggregation type and attribute name.
|
|
5
|
+
*
|
|
6
|
+
* @param aggregation - Measure aggregation type.
|
|
7
|
+
* @param attributeName - Attribute name appended to the aggregation label.
|
|
8
|
+
* @param t - Translation function for aggregation labels.
|
|
9
|
+
* @returns Human-readable measure title.
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function buildMeasureRankingTitle(aggregation: AggregationType, attributeName: string, t: TFunction): string;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the ranked-by display label for a measure.
|
|
15
|
+
*
|
|
16
|
+
* @param measure - Measure to display, or null when unset.
|
|
17
|
+
* @param t - Translation function for aggregation labels.
|
|
18
|
+
* @returns Display label for the ranked-by field.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function getRankingMeasureDisplayName(measure: Measure | null, t: TFunction): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AggregationType, DimensionalAttribute, LevelAttribute } from '@sisense/sdk-data';
|
|
2
|
+
type MeasureConfig = {
|
|
3
|
+
titleKey: string;
|
|
4
|
+
name: AggregationType;
|
|
5
|
+
merged?: boolean;
|
|
6
|
+
class: string;
|
|
7
|
+
group: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare function getMeasuresListForAttribute(attribute: DimensionalAttribute | LevelAttribute): MeasureConfig[];
|
|
13
|
+
export {};
|