@sisense/sdk-ui 2.28.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 +1310 -1230
- package/dist/analytics-composer.cjs +7 -7
- package/dist/analytics-composer.js +19 -18
- package/dist/apply-styled-options-to-query-BK1NnV4P.js +6453 -0
- 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 +611 -518
- package/dist/index.js +26556 -24829
- package/dist/index.umd.js +952 -829
- 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/get-dashboard-model.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +45 -3
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +10 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +36 -1
- 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/hooks/use-widget-updates-persistence.d.ts +27 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/deep-merge.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/types.d.ts +26 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/persistence/update-types.d.ts +51 -0
- 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/calendar-heatmap-chart/data.d.ts +0 -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/filter-and-aggregate-chart-data.d.ts +2 -2
- 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 +74 -30
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/utils.d.ts +4 -4
- 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/visualizations/core/query-definition/filter-to-readable-label.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-definition.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +5 -0
- package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/truncate-pill-label.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/widgets/change-events.d.ts +6 -0
- 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/types.d.ts +11 -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 +15 -0
- 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/to-widget-dto-style.d.ts +41 -2
- 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 +36 -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/hooks/use-track-widget-init.d.ts +44 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/widget-entity-id.d.ts +30 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/widget-tracking-adapters.d.ts +41 -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/shared/widget-style-utils.d.ts +29 -0
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +29 -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/api/rest-api.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +1 -7
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +1 -9
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +32 -0
- package/dist/packages/sdk-ui/src/infra/contexts/sisense-context/sisense-context-provider.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/formatting/format-data-set.d.ts +21 -0
- package/dist/packages/sdk-ui/src/infra/formatting/format-date.d.ts +67 -0
- package/dist/packages/sdk-ui/src/infra/formatting/format-number.d.ts +24 -0
- package/dist/packages/sdk-ui/src/infra/formatting/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/infra/modules/build-module-graph.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/modules/build-module-registry.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/modules/core-module-providers-tree.d.ts +11 -0
- package/dist/packages/sdk-ui/src/infra/modules/core-module.d.ts +26 -0
- package/dist/packages/sdk-ui/src/infra/modules/index.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/modules/module-provider.d.ts +17 -0
- package/dist/packages/sdk-ui/src/infra/modules/modules-context.d.ts +20 -0
- package/dist/packages/sdk-ui/src/infra/modules/types.d.ts +79 -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 +219 -49
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/widget-plugin-registry.d.ts +3 -3
- 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/constructs/dimensions/get-dimension-name.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-to-json.d.ts +4 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/filters/get-filter-name.d.ts +10 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/filters/translate-filters-to-json.d.ts +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/get-query-element-summary.d.ts +23 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/get-measure-name.d.ts +10 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/translate-measures-to-json.d.ts +4 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/index.d.ts +3 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-from-json.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/translate-query-to-json.d.ts +4 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/adapters.d.ts +3 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/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/modules/analytics-composer/nlq-v3-translator/types.d.ts +70 -9
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/to-widget-props.d.ts +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/translate-envelope-widget-from-json.d.ts +2 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +1 -18
- package/dist/packages/sdk-ui/src/props.d.ts +55 -2
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +6 -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/public.d.ts +3 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +5 -3
- package/dist/packages/sdk-ui/src/shared/components/loading-overlay.d.ts +1 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-element-height.d.ts +19 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-synced-state.d.ts +23 -2
- package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +8 -0
- package/dist/packages/sdk-ui/src/shared/utils/gradient.d.ts +5 -0
- package/dist/packages/sdk-ui/src/types.d.ts +78 -6
- package/dist/{use-hover-B6VmMb06.js → quota-notification-DqabeDbO.js} +24790 -22993
- 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-CzgBH2kL.cjs → types-DSNnndG6.cjs} +1 -1
- package/dist/types-DecTaxy7.js +74 -0
- package/dist/{utils-BwGnDoB0.cjs → utils-Cpeyj9TN.cjs} +52 -52
- package/dist/{utils-CsV-iYtb.js → utils-L-HO2pCd.js} +2521 -2469
- package/dist/{widget-composer-C72Io-3c.cjs → widget-composer-CyWQaInf.cjs} +1 -1
- package/dist/{widget-composer-Bv_OVu1o.js → widget-composer-u6NMLm1C.js} +3 -3
- package/package.json +9 -8
- package/dist/apply-styled-options-to-query-23D9br-S.cjs +0 -1
- package/dist/apply-styled-options-to-query-BagjzMqm.js +0 -5992
- package/dist/dimensions-Bn1EaWiP.js +0 -204
- package/dist/dimensions-D8r34WRI.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/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +0 -16
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +0 -10
- package/dist/types-D3fPN43o.js +0 -74
- package/dist/use-hover-CaSOzp0i.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/get-dashboard-model.d.ts
CHANGED
|
@@ -30,6 +30,13 @@ export interface GetDashboardModelOptions {
|
|
|
30
30
|
* @internal
|
|
31
31
|
*/
|
|
32
32
|
useLegacyApiVersion?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Whether to fetch the dashboard with admin-level access.
|
|
35
|
+
*
|
|
36
|
+
* @default false
|
|
37
|
+
* @sisenseInternal
|
|
38
|
+
*/
|
|
39
|
+
adminAccess?: boolean;
|
|
33
40
|
}
|
|
34
41
|
/**
|
|
35
42
|
* Retrieves a dashboard model by its OID.
|
package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Dimension, Filter, FilterRelations,
|
|
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';
|
|
7
7
|
import type { SpecificWidgetOptions, WidgetsOptions, WidgetsPanelColumnLayout } from './types';
|
|
8
8
|
type WidgetJtdDtoSlice = Pick<WidgetDto, 'oid' | 'type' | 'metadata' | 'drillToDashboardConfig'>;
|
|
9
9
|
export declare const translateLayout: (layout: LayoutDto) => WidgetsPanelColumnLayout;
|
|
10
|
-
export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>,
|
|
10
|
+
export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>, filterRelationsDtoOptions?: DashboardDto['filterRelations']): Filter[] | FilterRelations;
|
|
11
11
|
export declare const getJtdNavigateType: (widget: WidgetJtdDtoSlice) => TriggerMethod;
|
|
12
12
|
export declare const convertDimensionsToDimIndexes: (widget: WidgetJtdDtoSlice, dimensionIds: string[]) => string[];
|
|
13
13
|
/**
|
|
@@ -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,4 +1,5 @@
|
|
|
1
1
|
import { DataSource } from '@sisense/sdk-data';
|
|
2
|
+
import { DashboardModel } from '../../../../../domains/dashboarding/dashboard-model';
|
|
2
3
|
import { RestApi } from '../../../../../infra/api/rest-api';
|
|
3
4
|
import { AppSettings } from '../../../../../infra/app/settings/settings';
|
|
4
5
|
import { CompleteThemeSettingsInternal } from '../../../../../types';
|
|
@@ -22,6 +23,14 @@ export type PersistDashboardModelMiddlewareParams = {
|
|
|
22
23
|
* still satisfies the server's datasource schema.
|
|
23
24
|
*/
|
|
24
25
|
dashboardDataSource?: DataSource;
|
|
26
|
+
/**
|
|
27
|
+
* Pre-reducer dashboard model snapshot. Used by UPDATE_WIDGET to read
|
|
28
|
+
* `widgetsOptions[oid].partialDtoOptions.options` so the Fusion PATCH carries
|
|
29
|
+
* the full options object (Fusion replaces, not merges).
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
model?: DashboardModel;
|
|
25
34
|
};
|
|
26
35
|
/**
|
|
27
36
|
* Middleware that persists the dashboard model changes to the Sisense server.
|
|
@@ -29,4 +38,4 @@ export type PersistDashboardModelMiddlewareParams = {
|
|
|
29
38
|
* @returns Promise resolving to the action (possibly transformed, e.g. for ADD_WIDGET)
|
|
30
39
|
* @internal
|
|
31
40
|
*/
|
|
32
|
-
export declare function persistDashboardModelMiddleware({ dashboardOid, action, restApi, sharedMode, appSettings, themeSettings, dashboardDataSource, }: PersistDashboardModelMiddlewareParams): Promise<UseDashboardModelInternalAction>;
|
|
41
|
+
export declare function persistDashboardModelMiddleware({ dashboardOid, action, restApi, sharedMode, appSettings, themeSettings, dashboardDataSource, model, }: PersistDashboardModelMiddlewareParams): Promise<UseDashboardModelInternalAction>;
|
|
@@ -1,5 +1,7 @@
|
|
|
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';
|
|
4
|
+
import type { WidgetPropsUpdate } from '../../../../../domains/dashboarding/persistence/update-types.js';
|
|
3
5
|
import type { WidgetDto } from '../../../../../domains/widgets/components/widget-by-id/types';
|
|
4
6
|
import { WidgetModel } from '../../../../../domains/widgets/widget-model';
|
|
5
7
|
export type UseDashboardModelState = DashboardModel | null;
|
|
@@ -21,6 +23,7 @@ export declare enum UseDashboardModelActionType {
|
|
|
21
23
|
FILTERS_UPDATE = "FILTERS.UPDATE",
|
|
22
24
|
ADD_WIDGET = "WIDGETS.ADD",
|
|
23
25
|
PATCH_WIDGET = "WIDGETS.PATCH",
|
|
26
|
+
UPDATE_WIDGET = "WIDGETS.UPDATE",
|
|
24
27
|
WIDGETS_PANEL_LAYOUT_UPDATE = "WIDGETS_PANEL_LAYOUT.UPDATE",
|
|
25
28
|
WIDGETS_DELETE = "WIDGETS.DELETE"
|
|
26
29
|
}
|
|
@@ -46,6 +49,18 @@ export type WidgetPatch = {
|
|
|
46
49
|
max: number;
|
|
47
50
|
};
|
|
48
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* Full opaque widget style to send in the PATCH request. Used for custom
|
|
54
|
+
* (plugin) widgets whose `styleOptions` round-trip through `WidgetDto.style`.
|
|
55
|
+
* Must reconstruct the entire style object (the server replaces it on PATCH).
|
|
56
|
+
*/
|
|
57
|
+
style?: WidgetDto['style'];
|
|
58
|
+
/**
|
|
59
|
+
* Full custom-widget options bag to send in the PATCH request.
|
|
60
|
+
* Must include all existing keys alongside the changed ones, because the
|
|
61
|
+
* server replaces the entire object rather than merging.
|
|
62
|
+
*/
|
|
63
|
+
customOptions?: Record<string, unknown>;
|
|
49
64
|
};
|
|
50
65
|
/**
|
|
51
66
|
* Internal actions for the dashboard model state used in {@link useDashboardModel}.
|
|
@@ -62,12 +77,26 @@ export type UseDashboardModelInternalAction = UseDashboardModelAction | {
|
|
|
62
77
|
widgets: string[];
|
|
63
78
|
};
|
|
64
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* Props-shaped widget update action. Carries a partial `WidgetPropsUpdate` that
|
|
82
|
+
* the reducer applies to the in-memory `WidgetModel` and the persist middleware
|
|
83
|
+
* translates to a targeted DTO patch via its per-field mapping table.
|
|
84
|
+
*
|
|
85
|
+
* @internal
|
|
86
|
+
*/
|
|
87
|
+
export type UseDashboardModelUpdateWidgetAction = {
|
|
88
|
+
type: UseDashboardModelActionType.UPDATE_WIDGET;
|
|
89
|
+
payload: {
|
|
90
|
+
widgetOid: string;
|
|
91
|
+
update: WidgetPropsUpdate;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
65
94
|
/**
|
|
66
95
|
* Actions for the dashboard model state used in {@link useDashboardModel}.
|
|
67
96
|
*
|
|
68
97
|
* @internal
|
|
69
98
|
*/
|
|
70
|
-
export type UseDashboardModelAction = UseDashboardModelFilterUpdateAction | UseDashboardModelAddWidgetAction | UseDashboardModelPatchWidgetAction | UseDashboardModelLayoutUpdateAction | UseDashboardWidgetsDeleteAction;
|
|
99
|
+
export type UseDashboardModelAction = UseDashboardModelFilterUpdateAction | UseDashboardModelAddWidgetAction | UseDashboardModelPatchWidgetAction | UseDashboardModelUpdateWidgetAction | UseDashboardModelLayoutUpdateAction | UseDashboardWidgetsDeleteAction;
|
|
71
100
|
/**
|
|
72
101
|
* Filter update actions for the dashboard model state used in {@link useDashboardModel}.
|
|
73
102
|
*
|
|
@@ -95,6 +124,12 @@ export type UseDashboardModelAddWidgetAction = {
|
|
|
95
124
|
widget: WidgetModel;
|
|
96
125
|
widgetsPanelLayout?: WidgetsPanelLayout;
|
|
97
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;
|
|
98
133
|
};
|
|
99
134
|
};
|
|
100
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;
|
package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-updates-persistence.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DashboardPersistenceManager } from '../../../domains/dashboarding/persistence/types';
|
|
2
|
+
import type { WidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
3
|
+
type Persistence = Pick<DashboardPersistenceManager, 'updateWidget'> | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* Composition middleware that adds persistable widget-update plumbing to a
|
|
6
|
+
* widget list. For each widget that exposes a known runtime-state callback
|
|
7
|
+
* (currently only `styleOptions.navigator.onScrollerChange` for charts with
|
|
8
|
+
* a navigator), the hook injects a handler that:
|
|
9
|
+
*
|
|
10
|
+
* 1. Applies the update optimistically to local widget state (the parent
|
|
11
|
+
* `useComposedDashboardInternal` re-renders with the new value).
|
|
12
|
+
* 2. Schedules a debounced (500 ms) call to `persistence.updateWidget` with
|
|
13
|
+
* a {@link WidgetPropsUpdate}-shaped payload.
|
|
14
|
+
*
|
|
15
|
+
* When `persistence` is `undefined`, the optimistic apply still runs (so
|
|
16
|
+
* visualizations behave correctly in read-only mode) and the persist call
|
|
17
|
+
* is skipped.
|
|
18
|
+
*
|
|
19
|
+
* Errors during persistence are logged via `console.error`; the hook does
|
|
20
|
+
* not roll back local state.
|
|
21
|
+
*
|
|
22
|
+
* @sisenseInternal
|
|
23
|
+
*/
|
|
24
|
+
export declare function useWidgetUpdatesPersistence(widgets: WidgetProps[], setWidgets: (updater: (prev: WidgetProps[]) => WidgetProps[]) => void, persistence?: Persistence): {
|
|
25
|
+
widgets: WidgetProps[];
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deep-merges a partial `update` into `base` for widget-update persistence.
|
|
3
|
+
*
|
|
4
|
+
* Merge semantics (shared by every merge point of the unified widget-update
|
|
5
|
+
* channel — pending-update accumulator, optimistic apply, model reducer and
|
|
6
|
+
* DTO patch):
|
|
7
|
+
* - nested plain objects are merged recursively at any depth;
|
|
8
|
+
* - arrays, primitives and non-plain objects (e.g. `Date`) are replaced
|
|
9
|
+
* wholesale (last-write-wins);
|
|
10
|
+
* - keys cannot be deleted via merge — overwrite with an explicit value
|
|
11
|
+
* (e.g. `null`) instead.
|
|
12
|
+
*
|
|
13
|
+
* Pure: returns a new object, never mutates the inputs.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare function deepMerge<T extends object>(base: T, update: object): T;
|