@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
|
@@ -1,36 +1,114 @@
|
|
|
1
|
-
import type { DataSource } from '@sisense/sdk-data';
|
|
2
1
|
/**
|
|
3
|
-
*
|
|
4
|
-
* {@link getNlgInsightsFromWidget}.
|
|
2
|
+
* Location where the narrative is displayed in the widget.
|
|
5
3
|
*
|
|
6
|
-
*
|
|
4
|
+
* - `above`: displayed above the widget
|
|
5
|
+
* - `below`: displayed below the widget
|
|
6
|
+
* - `alone`: displayed alone, without any other widget content
|
|
7
|
+
*
|
|
8
|
+
* @default 'above'
|
|
9
|
+
* @alpha
|
|
10
|
+
*/
|
|
11
|
+
export type WidgetNarrativeDisplayLocation = 'above' | 'below' | 'alone';
|
|
12
|
+
/**
|
|
13
|
+
* Narrative configuration options for widgets.
|
|
14
|
+
*
|
|
15
|
+
* @alpha
|
|
7
16
|
*/
|
|
8
|
-
export
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
17
|
+
export type WidgetNarrativeOptions = {
|
|
18
|
+
/**
|
|
19
|
+
* Verbosity for narrative generation.
|
|
20
|
+
*
|
|
21
|
+
* @default low
|
|
22
|
+
*/
|
|
23
|
+
verbosity?: 'low' | 'high';
|
|
13
24
|
/**
|
|
14
|
-
* When `true`,
|
|
15
|
-
* on 404. When `false` or omitted, only the legacy endpoint is used.
|
|
25
|
+
* When `true`, any trend and forecast companion measures present on the widget are included in the narrative request.
|
|
16
26
|
*
|
|
17
|
-
*
|
|
18
|
-
* from `app.settings.narrative.canGenerateNarrativeViaAI` via {@link useSisenseContext}.
|
|
27
|
+
* When `false`, they are not included in the narrative request.
|
|
19
28
|
*
|
|
20
|
-
*
|
|
21
|
-
* performed — omitting this option is equivalent to `false` (legacy endpoint only).
|
|
29
|
+
* @default true
|
|
22
30
|
*/
|
|
23
|
-
|
|
31
|
+
includeTrendAndForecast?: boolean;
|
|
24
32
|
/**
|
|
25
|
-
* When `true`,
|
|
26
|
-
*
|
|
33
|
+
* When `true`, narrative is enabled for the widget.
|
|
34
|
+
*
|
|
35
|
+
* When `false`, narrative is disabled for the widget and will not be generated.
|
|
27
36
|
*
|
|
28
37
|
* @default false
|
|
29
38
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
enabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Location where the narrative is displayed in the widget. See {@link WidgetNarrativeDisplayLocation} for more details.
|
|
42
|
+
*
|
|
43
|
+
* @default 'above'
|
|
44
|
+
*/
|
|
45
|
+
displayLocation?: WidgetNarrativeDisplayLocation;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the narrative auto-shows on load without user interaction.
|
|
48
|
+
*
|
|
49
|
+
* When `true`, narrative is requested and displayed as soon as the widget loads.
|
|
50
|
+
*
|
|
51
|
+
* When `false`, narrative is requested and displayed only after user interaction.
|
|
52
|
+
*
|
|
53
|
+
* @default true (for backwards compatibility with older narrative settings in Fusion widgets)
|
|
54
|
+
*/
|
|
55
|
+
autoShow?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Settings for interactive AI feedback icons.
|
|
58
|
+
*/
|
|
59
|
+
feedback?: {
|
|
60
|
+
/**
|
|
61
|
+
* Whether the interactive AI feedback icons are enabled.
|
|
62
|
+
*
|
|
63
|
+
* When `true`, the interactive AI feedback icons are shown.
|
|
64
|
+
*
|
|
65
|
+
* When `false`, the interactive AI feedback icons are not shown.
|
|
66
|
+
*
|
|
67
|
+
* @default false
|
|
68
|
+
*/
|
|
69
|
+
enabled?: boolean;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Maximum fraction of the content area height the narrative area may occupy.
|
|
73
|
+
*
|
|
74
|
+
* The content area is the space below the widget header — i.e. the area previously occupied
|
|
75
|
+
* by the chart alone. `heightFraction = 0.5` therefore means the narrative receives half the space that
|
|
76
|
+
* was available to the chart.
|
|
77
|
+
*
|
|
78
|
+
* Accepts a value in the range `0`–`1`.
|
|
79
|
+
* - `undefined` (default): narrative takes whatever vertical space it needs; the chart fills the rest.
|
|
80
|
+
* - `0.3`: narrative is capped at 30 % of the content area; the chart always receives the remaining 70 %.
|
|
81
|
+
*
|
|
82
|
+
* Practical guidelines:
|
|
83
|
+
* - Values above `~0.8` leave very little room for the chart.
|
|
84
|
+
* - Values below `~0.1` may clip the collapsed narrative text (~46 px).
|
|
85
|
+
* - Has no effect when {@link WidgetNarrativeOptions.displayLocation | displayLocation} is `'alone'`
|
|
86
|
+
* (the chart is already hidden in that mode).
|
|
87
|
+
*/
|
|
88
|
+
heightFraction?: number;
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* {@link WidgetNarrativeOptions} with all optional fields filled using {@link getCompleteWidgetNarrativeOptions}.
|
|
92
|
+
*
|
|
93
|
+
* @alpha
|
|
94
|
+
*/
|
|
95
|
+
export type CompleteWidgetNarrativeOptions = {
|
|
96
|
+
enabled: boolean;
|
|
97
|
+
verbosity: 'low' | 'high';
|
|
98
|
+
displayLocation: WidgetNarrativeDisplayLocation;
|
|
99
|
+
autoShow: boolean;
|
|
100
|
+
includeTrendAndForecast: boolean;
|
|
101
|
+
feedback: {
|
|
102
|
+
enabled: boolean;
|
|
103
|
+
};
|
|
104
|
+
/** Resolved from {@link WidgetNarrativeOptions.heightFraction}. `undefined` means no constraint. */
|
|
105
|
+
heightFraction: number | undefined;
|
|
106
|
+
};
|
|
32
107
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
108
|
+
* Returns {@link WidgetNarrativeOptions} with defaults applied for runtime.
|
|
109
|
+
*
|
|
110
|
+
* @param narrative - Optional narrative configuration to apply defaults to
|
|
111
|
+
* @returns Complete narrative configuration with defaults applied
|
|
112
|
+
* @alpha
|
|
35
113
|
*/
|
|
36
|
-
export
|
|
114
|
+
export declare function getCompleteWidgetNarrativeOptions(narrative?: WidgetNarrativeOptions): CompleteWidgetNarrativeOptions;
|
package/dist/packages/sdk-ui/src/domains/narrative/core/widget-props-to-narrative-params.d.ts
CHANGED
|
@@ -4,49 +4,66 @@ import type { PivotTableWidgetProps } from '../../../domains/widgets/components/
|
|
|
4
4
|
import type { WidgetProps, WithCommonWidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
5
5
|
import type { NarrativeRequest } from '../../../infra/api/narrative/narrative-api-types.js';
|
|
6
6
|
import type { NarrativeQueryParams } from './build-narrative-request.js';
|
|
7
|
+
import { type CompleteWidgetNarrativeOptions } from './widget-narrative-options.js';
|
|
7
8
|
/**
|
|
8
9
|
* Converts ChartWidgetProps to {@link NarrativeQueryParams} by extracting dimensions and measures
|
|
9
10
|
* from the chart data options.
|
|
10
11
|
*
|
|
11
|
-
* @param props - ChartWidgetProps to convert
|
|
12
|
+
* @param props - ChartWidgetProps to convert. `aiOptions.narrative` supplies {@link WidgetNarrativeOptions}. Defaults are calculated via {@link getCompleteWidgetNarrativeOptions})
|
|
12
13
|
* @param defaultDataSource - Optional default data source to use if props.dataSource is undefined
|
|
13
|
-
* @param verbosity - Optional verbosity for narrative text
|
|
14
|
-
* @param ignoreTrendAndForecast - When `true`, omits trend/forecast companion measures from the narrative JAQL
|
|
15
14
|
* @returns Params ready for {@link prepareNarrativeRequest}
|
|
16
15
|
* @throws If neither `props.dataSource` nor `defaultDataSource` is set
|
|
17
16
|
* @internal
|
|
18
17
|
*/
|
|
19
|
-
export declare function convertChartWidgetPropsToNarrativeParams(props: ChartWidgetProps, defaultDataSource?: DataSource
|
|
18
|
+
export declare function convertChartWidgetPropsToNarrativeParams(props: ChartWidgetProps, defaultDataSource?: DataSource): NarrativeQueryParams;
|
|
20
19
|
/**
|
|
21
20
|
* Builds a narrative API request from pivot widget props using the same JAQL as pivot query
|
|
22
21
|
* execution ({@link getPivotJaqlQueryPayload}).
|
|
23
22
|
*
|
|
24
|
-
* @param props - Pivot widget props (`widgetType: 'pivot'`)
|
|
23
|
+
* @param props - Pivot widget props (`widgetType: 'pivot'`); `aiOptions.narrative` supplies
|
|
24
|
+
* {@link WidgetNarrativeOptions} via {@link getWidgetNarrativeOptionsFromWidgetProps}
|
|
25
25
|
* @param defaultDataSource - Used when `props.dataSource` is undefined
|
|
26
|
-
* @param verbosity - Optional verbosity for narrative text
|
|
27
|
-
* @param ignoreTrendAndForecast - When `true`, omits trend/forecast from pivot value columns in the narrative JAQL
|
|
28
26
|
* @returns Request ready for `getNarrative`
|
|
29
27
|
* @throws If data source cannot be resolved, or pivot query description is invalid
|
|
30
28
|
* @internal
|
|
31
29
|
*/
|
|
32
|
-
export declare function convertPivotWidgetPropsToNarrativeRequest(props: WithCommonWidgetProps<PivotTableWidgetProps, 'pivot'>, defaultDataSource?: DataSource
|
|
30
|
+
export declare function convertPivotWidgetPropsToNarrativeRequest(props: WithCommonWidgetProps<PivotTableWidgetProps, 'pivot'>, defaultDataSource?: DataSource): NarrativeRequest;
|
|
33
31
|
/**
|
|
34
|
-
* @deprecated Use {@link convertChartWidgetPropsToNarrativeParams}
|
|
32
|
+
* @deprecated Use {@link convertChartWidgetPropsToNarrativeParams} for {@link NarrativeQueryParams},
|
|
33
|
+
* or {@link convertWidgetPropsToNarrativeParams} for a ready {@link NarrativeRequest}.
|
|
35
34
|
*/
|
|
36
35
|
export declare const convertChartWidgetPropsToUseGetNlgInsightsParams: typeof convertChartWidgetPropsToNarrativeParams;
|
|
37
36
|
/**
|
|
38
|
-
*
|
|
39
|
-
* props omit `dataSource` and no `defaultDataSource` is passed.
|
|
37
|
+
* Builds a {@link NarrativeRequest} from chart or pivot widget props (including `id` / `widgetType`).
|
|
40
38
|
*
|
|
39
|
+
* @param props - Chart or pivot {@link WidgetProps}
|
|
40
|
+
* @param defaultDataSource - Used when `props.dataSource` is undefined
|
|
41
|
+
* @returns Request ready for {@link getNarrative}
|
|
42
|
+
* @throws If widget type is not chart or pivot, data source cannot be resolved, or conversion fails
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
export declare function convertWidgetPropsToNarrativeParams(props: WithCommonWidgetProps<ChartWidgetProps, 'chart'> | WithCommonWidgetProps<PivotTableWidgetProps, 'pivot'>, defaultDataSource?: DataSource): NarrativeRequest;
|
|
46
|
+
/**
|
|
47
|
+
* Completes widget narrative options from chart/pivot `WidgetProps` for NLG (`aiOptions.narrative`).
|
|
48
|
+
*
|
|
49
|
+
* @param props - Widget props (chart, pivot, or other)
|
|
50
|
+
* @returns Complete narrative defaults for non-chart/pivot types
|
|
41
51
|
* @internal
|
|
42
52
|
*/
|
|
43
|
-
export declare
|
|
53
|
+
export declare function getCompleteWidgetNarrativeOptionsFromWidgetProps(props: WidgetProps): CompleteWidgetNarrativeOptions;
|
|
54
|
+
/**
|
|
55
|
+
* Error message for imperative callers (e.g. {@link getNlgInsightsFromWidget}) when chart or pivot widget
|
|
56
|
+
* props omit `dataSource`, no defaultDataSource can be resolved from app context, and no defaultDataSource is provided.
|
|
57
|
+
*
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare const MISSING_DATASOURCE_NLG_ERROR = "dataSource is required. Provide it on the widget props, defaultDataSource parameter or via SisenseContextProvider.";
|
|
44
61
|
export type WidgetNarrativeRequestPair = {
|
|
45
62
|
supported: boolean;
|
|
46
63
|
narrativeRequest: NarrativeRequest | undefined;
|
|
47
64
|
/**
|
|
48
|
-
* Same request with trend/forecast stripped. `undefined` when `
|
|
49
|
-
* already `
|
|
65
|
+
* Same request with trend/forecast stripped. `undefined` when `includeTrendAndForecast` is
|
|
66
|
+
* already `false` (primary already stripped), when the widget type is unsupported, or when
|
|
50
67
|
* the fallback conversion itself fails.
|
|
51
68
|
*/
|
|
52
69
|
narrativeFallbackRequest: NarrativeRequest | undefined;
|
|
@@ -61,26 +78,12 @@ export type WidgetNarrativeRequestPair = {
|
|
|
61
78
|
* stripped — both from the same widget props in a single call.
|
|
62
79
|
*
|
|
63
80
|
* @param props - Chart or pivot widget props
|
|
64
|
-
* @param defaultDataSource - Used when `props.dataSource` is undefined
|
|
65
|
-
* @param verbosity - Optional verbosity for narrative text
|
|
66
|
-
* @param ignoreTrendAndForecast - When `true`, the primary request already omits trend/forecast
|
|
67
|
-
* and no fallback is needed
|
|
81
|
+
* @param defaultDataSource - Used when `props.dataSource` is undefined.
|
|
68
82
|
* @returns `{ supported, narrativeRequest, narrativeFallbackRequest }`. `supported` is `false`
|
|
69
83
|
* when the widget type is unsupported, when no data source can be resolved for chart/pivot, or
|
|
70
84
|
* when the primary conversion fails.
|
|
71
|
-
* @
|
|
72
|
-
*
|
|
73
|
-
* const { supported, narrativeRequest, narrativeFallbackRequest } =
|
|
74
|
-
* buildWidgetNarrativeRequests(
|
|
75
|
-
* widgetProps, // `WithCommonWidgetProps<ChartWidgetProps, 'chart'>` or pivot equivalent
|
|
76
|
-
* defaultDataSource,
|
|
77
|
-
* 'High',
|
|
78
|
-
* false,
|
|
79
|
-
* );
|
|
80
|
-
* ```
|
|
81
|
-
* On success, `supported` is `true` and `narrativeRequest` / `narrativeFallbackRequest` hold the
|
|
82
|
-
* primary and trend-stripped NLG payloads; otherwise `supported` is `false` and requests are
|
|
83
|
-
* `undefined` (and `missingDataSource` may be set when no source could be resolved).
|
|
85
|
+
* @remarks {@link WidgetNarrativeOptions} are derived from `props.aiOptions?.narrative`
|
|
86
|
+
* via {@link getWidgetNarrativeOptionsFromWidgetProps} and {@link getCompleteWidgetNarrativeOptions}.
|
|
84
87
|
* @internal
|
|
85
88
|
*/
|
|
86
|
-
export declare function buildWidgetNarrativeRequests(props: WidgetProps, defaultDataSource?: DataSource
|
|
89
|
+
export declare function buildWidgetNarrativeRequests(props: WidgetProps, defaultDataSource?: DataSource): WidgetNarrativeRequestPair;
|
|
@@ -1,42 +1,33 @@
|
|
|
1
1
|
import type { WidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { HookEnableParam } from '../../../shared/hooks/types';
|
|
3
3
|
import { type WidgetNarrativeQueryState } from './use-widget-narrative-state.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Parameters for {@link useGetWidgetNarrative}.
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
export type UseGetWidgetNarrativeOptions = WidgetNarrativeOptions & {
|
|
14
|
-
/**
|
|
15
|
-
* When `false`, skips the narrative request.
|
|
16
|
-
*
|
|
17
|
-
* @default true
|
|
18
|
-
*/
|
|
19
|
-
enabled?: boolean;
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
8
|
+
* Narrative endpoint selection uses `app.settings.narrative.canGenerateNarrativeViaAI` from
|
|
9
|
+
* {@link useSisenseContext}. {@link WidgetNarrativeOptions} come from
|
|
10
|
+
* `widgetProps.aiOptions.narrative` (see {@link getCompleteWidgetNarrativeOptions}).
|
|
11
|
+
*
|
|
12
|
+
* The `enabled` flag follows {@link HookEnableParam} (defaults to `true` when omitted).
|
|
22
13
|
* @sisenseInternal
|
|
23
14
|
*/
|
|
24
15
|
export type UseGetWidgetNarrativeParams = {
|
|
25
16
|
/** Widget configuration whose query drives the narrative (chart or pivot). */
|
|
26
17
|
widgetProps: WidgetProps;
|
|
27
|
-
} &
|
|
18
|
+
} & HookEnableParam;
|
|
28
19
|
/**
|
|
29
20
|
* @sisenseInternal
|
|
30
21
|
*/
|
|
31
22
|
export type UseGetWidgetNarrativeResult = WidgetNarrativeQueryState & {
|
|
32
23
|
/**
|
|
33
24
|
* `true` when `widgetProps` is a chart or pivot widget and narrative params could be built
|
|
34
|
-
* (including resolving `dataSource` via `defaultDataSource`).
|
|
25
|
+
* (including resolving `dataSource` via context `defaultDataSource` when omitted on props).
|
|
35
26
|
*/
|
|
36
27
|
supported: boolean;
|
|
37
28
|
/**
|
|
38
|
-
*
|
|
39
|
-
* `data` is not populated from cache.
|
|
29
|
+
* Effective value after applying {@link HookEnableParam} defaults (always `true` or `false`).
|
|
30
|
+
* When `false`, narrative is opted out and `data` is not populated from cache.
|
|
40
31
|
*/
|
|
41
32
|
enabled: boolean;
|
|
42
33
|
};
|
|
@@ -53,8 +44,6 @@ export type UseGetWidgetNarrativeResult = WidgetNarrativeQueryState & {
|
|
|
53
44
|
* ```tsx
|
|
54
45
|
* const { data, isLoading, supported } = useGetWidgetNarrative({
|
|
55
46
|
* widgetProps,
|
|
56
|
-
* defaultDataSource: DM.DataSource,
|
|
57
|
-
* verbosity: 'Low',
|
|
58
47
|
* });
|
|
59
48
|
* ```
|
|
60
49
|
* @sisenseInternal
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Measures the line height of the element referenced by `ref` in pixels.
|
|
4
|
+
* Re-measures on resize and after fonts load. Returns `null` until measured.
|
|
5
|
+
*
|
|
6
|
+
* @param ref - Ref to the element whose line height should be measured.
|
|
7
|
+
* @returns The line height in pixels, or `null` if not yet measured.
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare function useLineHeight<T extends HTMLElement>(ref: React.RefObject<T | null>): number | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WidgetProps } from '../../../domains/widgets/components/widget/types';
|
|
2
2
|
import type { NarrativeRequest } from '../../../infra/api/narrative/narrative-api-types.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { HookEnableParam } from '../../../shared/hooks/types';
|
|
4
4
|
/**
|
|
5
5
|
* Hook state aligned with legacy {@link UseGetNlgInsightsState}; used by {@link useGetWidgetNarrative}.
|
|
6
6
|
*
|
|
@@ -16,24 +16,23 @@ export type WidgetNarrativeQueryState = {
|
|
|
16
16
|
};
|
|
17
17
|
export type UseWidgetNarrativeStateParams = {
|
|
18
18
|
widgetProps: WidgetProps;
|
|
19
|
-
|
|
20
|
-
} & WidgetNarrativeOptions;
|
|
19
|
+
} & HookEnableParam;
|
|
21
20
|
export type UseWidgetNarrativeStateResult = WidgetNarrativeQueryState & {
|
|
22
21
|
supported: boolean;
|
|
23
22
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* query rather than "no insights."
|
|
23
|
+
* Effective value after applying {@link HookEnableParam} defaults (always `true` or `false`).
|
|
24
|
+
* When `false`, narrative is opted out: `data` is cleared (no cached fallback), `narrativeRequest`
|
|
25
|
+
* is undefined, and loading/error flags reflect a disabled query rather than "no insights."
|
|
27
26
|
*/
|
|
28
27
|
enabled: boolean;
|
|
29
28
|
/** Present when `supported` and `enabled`; used by {@link WidgetNarrative} for feedback payload only. */
|
|
30
29
|
narrativeRequest: NarrativeRequest | undefined;
|
|
31
30
|
};
|
|
32
31
|
/**
|
|
33
|
-
* Resolves chart or pivot widget props to a
|
|
34
|
-
* Depends on {@link useSisenseContext} (`httpClient`,
|
|
32
|
+
* Resolves chart or pivot widget props to a narrative request and runs `getNarrative` via TanStack Query.
|
|
33
|
+
* Depends on {@link useSisenseContext} (`httpClient`, narrative settings) and a `QueryClientProvider`.
|
|
35
34
|
* Not exported from `@sisenseInternal` public API.
|
|
36
35
|
*
|
|
37
36
|
* @internal
|
|
38
37
|
*/
|
|
39
|
-
export declare function useWidgetNarrativeState({ widgetProps,
|
|
38
|
+
export declare function useWidgetNarrativeState({ widgetProps, enabled, }: UseWidgetNarrativeStateParams): UseWidgetNarrativeStateResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Attribute, DataSource, Measure, PivotAttribute, PivotMeasure, PivotQueryResultData, QueryResultData } from '@sisense/sdk-data';
|
|
2
2
|
import type { PivotQueryDescription as InternalPivotQueryDescription, QueryDescription as InternalQueryDescription, QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
3
|
-
import { CreateCacheKeyFn } from '../../../shared/utils/create-cache';
|
|
3
|
+
import { CacheKey, CreateCacheKeyFn } from '../../../shared/utils/create-cache';
|
|
4
4
|
import { type ClientApplication } from '../../../infra/app/types.js';
|
|
5
5
|
/**
|
|
6
6
|
* All the properties that fully describe a query you want to send.
|
|
@@ -30,9 +30,42 @@ export declare const prepareQueryParams: (queryDescription: QueryDescription, de
|
|
|
30
30
|
/** @internal */
|
|
31
31
|
export declare function executeQuery(queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig): Promise<QueryResultData>;
|
|
32
32
|
/** @internal */
|
|
33
|
+
export declare function executeRowCountQuery(queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig): Promise<number>;
|
|
34
|
+
/** Result of a data query executed together with its total row count. */
|
|
35
|
+
export type QueryResultWithRowCount = {
|
|
36
|
+
data: QueryResultData;
|
|
37
|
+
/**
|
|
38
|
+
* Total row count of the query, ignoring `count`/`offset` paging.
|
|
39
|
+
* Undefined when the total could not be retrieved.
|
|
40
|
+
*/
|
|
41
|
+
rowCount?: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Executes a data query together with a row count query and returns both the
|
|
45
|
+
* result data and the total row count.
|
|
46
|
+
*
|
|
47
|
+
* A row count failure does not fail the data query: `rowCount` is left
|
|
48
|
+
* undefined when the total cannot be retrieved (e.g. a Sisense instance
|
|
49
|
+
* without the row count API).
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare function executeQueryWithRowCount(queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig, baseExecuteQuery?: typeof executeQuery): Promise<QueryResultWithRowCount>;
|
|
54
|
+
/** @internal */
|
|
33
55
|
export declare const executeCsvQuery: (queryDescription: QueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig) => Promise<Blob>;
|
|
34
56
|
/** @internal */
|
|
35
57
|
export declare const executePivotQuery: (queryDescription: PivotQueryDescription, app: ClientApplication, executionConfig?: QueryExecutionConfig) => Promise<PivotQueryResultData>;
|
|
36
58
|
export declare const createExecuteQueryCacheKey: CreateCacheKeyFn<typeof executeQuery>;
|
|
37
59
|
export declare const executeQueryWithCache: typeof executeQuery;
|
|
38
60
|
export declare const clearExecuteQueryCache: (specificKey?: string | undefined) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Creates a cache key for a row count query.
|
|
63
|
+
*
|
|
64
|
+
* The key is page-independent: `count` and `offset` are excluded so the total
|
|
65
|
+
* row count is reused across pages of the same query.
|
|
66
|
+
*
|
|
67
|
+
* @internal
|
|
68
|
+
*/
|
|
69
|
+
export declare const createRowCountQueryCacheKey: CreateCacheKeyFn<typeof executeRowCountQuery>;
|
|
70
|
+
/** @internal */
|
|
71
|
+
export declare const clearRowCountQueryCache: (specificKey?: CacheKey) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Attribute, type DataSource, type Measure } from '@sisense/sdk-data';
|
|
1
|
+
import { type Attribute, type DataSource, type Filter, type FilterRelations, type Measure, type MetadataItem } from '@sisense/sdk-data';
|
|
2
2
|
/** `by` field for JAQL export requests. */
|
|
3
3
|
export declare const EXCEL_EXPORT_JAQL_BY = "export";
|
|
4
4
|
/**
|
|
@@ -16,6 +16,7 @@ type ExcelExportJaqlWidgetContext = {
|
|
|
16
16
|
type XlsxExportQueryParams = {
|
|
17
17
|
dimensions?: readonly Attribute[];
|
|
18
18
|
measures?: readonly Measure[];
|
|
19
|
+
filters?: readonly Filter[] | FilterRelations;
|
|
19
20
|
};
|
|
20
21
|
/**
|
|
21
22
|
* Resolves XLSX metadata `panel` for a dimension.
|
|
@@ -32,17 +33,24 @@ export declare function resolveExcelDimensionMetadataPanel(dimension: Attribute,
|
|
|
32
33
|
*/
|
|
33
34
|
export declare function createPanelsMetadataForXlsx(dimensions: XlsxExportQueryParams['dimensions'], measures: XlsxExportQueryParams['measures'], mergeRows: boolean): {
|
|
34
35
|
jaql: {
|
|
35
|
-
column:
|
|
36
|
-
title:
|
|
37
|
-
dim:
|
|
36
|
+
column: string | undefined;
|
|
37
|
+
title: string | undefined;
|
|
38
|
+
dim: string | undefined;
|
|
38
39
|
merged: boolean;
|
|
39
40
|
};
|
|
40
41
|
field: {
|
|
41
42
|
id: string;
|
|
42
43
|
index: number;
|
|
43
44
|
};
|
|
44
|
-
format: Record<string,
|
|
45
|
+
format: Record<string, unknown>;
|
|
45
46
|
panel: "measures" | ExcelExportDimensionPanel;
|
|
46
47
|
}[];
|
|
48
|
+
/**
|
|
49
|
+
* Returns `scope`-panel metadata for filters.
|
|
50
|
+
*
|
|
51
|
+
* @param filters - Scope filters (plain list or filter relations)
|
|
52
|
+
* @returns Filter metadata for the export JAQL
|
|
53
|
+
*/
|
|
54
|
+
export declare function createFiltersMetadataForXlsx(filters: readonly Filter[] | FilterRelations | undefined): MetadataItem[];
|
|
47
55
|
export declare function buildJaqlForExcelExport(params: XlsxExportQueryParams, context: ExcelExportJaqlWidgetContext): Record<string, unknown>;
|
|
48
56
|
export {};
|
|
@@ -21,6 +21,11 @@ export type XlsxExportRequestPayload = {
|
|
|
21
21
|
jaql: Record<string, unknown>;
|
|
22
22
|
mergeRows: boolean;
|
|
23
23
|
language: string;
|
|
24
|
+
widgetStyles?: {
|
|
25
|
+
coloringRules?: {
|
|
26
|
+
alternatingRows?: boolean;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
24
29
|
};
|
|
25
30
|
/**
|
|
26
31
|
* Builds the XLSX JAQL export request body shared by chart, pivot, and custom widgets.
|
|
@@ -46,8 +46,9 @@ export declare function useExecuteQueryByWidgetIdInternal(params: ExecuteQueryBy
|
|
|
46
46
|
*/
|
|
47
47
|
export declare function useParamsChanged(params: ExecuteQueryByWidgetIdParams): boolean;
|
|
48
48
|
/** @internal */
|
|
49
|
-
export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, includeDashboardFilters, app, onBeforeQuery, }: ExecuteQueryByWidgetIdParams & {
|
|
49
|
+
export declare function executeQueryByWidgetId({ widgetOid, dashboardOid, filters, highlights, filtersMergeStrategy, count, offset, includeRowCount, includeDashboardFilters, app, onBeforeQuery, }: ExecuteQueryByWidgetIdParams & {
|
|
50
50
|
app: ClientApplication;
|
|
51
51
|
}): Promise<{
|
|
52
52
|
data: QueryResultData;
|
|
53
|
+
rowCount?: number;
|
|
53
54
|
} & QueryByWidgetIdQueryParams>;
|
|
@@ -197,6 +197,23 @@ export interface ExecuteQueryByWidgetIdParams {
|
|
|
197
197
|
count?: number;
|
|
198
198
|
/** {@inheritDoc ExecuteQueryParams.offset} */
|
|
199
199
|
offset?: number;
|
|
200
|
+
/**
|
|
201
|
+
* Boolean flag whether to include the total row count of the query result,
|
|
202
|
+
* ignoring the `count` and `offset` paging.
|
|
203
|
+
*
|
|
204
|
+
* When enabled, the total is returned as `rowCount` in the query state
|
|
205
|
+
* ({@link QueryByWidgetIdState.rowCount}) and is reused for subsequent pages of the same query.
|
|
206
|
+
*
|
|
207
|
+
* Row count feature requires a Sisense instance version of 2026.3.0 or greater.
|
|
208
|
+
* On older versions, the query still succeeds and `rowCount` stays `undefined`.
|
|
209
|
+
*
|
|
210
|
+
* Not supported for pivot table widgets.
|
|
211
|
+
*
|
|
212
|
+
* If not specified, the default value is `false`
|
|
213
|
+
*
|
|
214
|
+
* @beta
|
|
215
|
+
*/
|
|
216
|
+
includeRowCount?: boolean;
|
|
200
217
|
/**
|
|
201
218
|
* Strategy for merging the existing widget filters (including highlights) with the filters provided via the `filters` and `highlights` props:
|
|
202
219
|
*
|
|
@@ -230,7 +247,17 @@ export type QueryByWidgetIdQueryParams = {
|
|
|
230
247
|
/**
|
|
231
248
|
* State of a query execution retrieving data of Fusion widget.
|
|
232
249
|
*/
|
|
233
|
-
export type QueryByWidgetIdState = QueryState & QueryByWidgetIdQueryParams
|
|
250
|
+
export type QueryByWidgetIdState = QueryState & QueryByWidgetIdQueryParams & {
|
|
251
|
+
/**
|
|
252
|
+
* Total row count of the query result, ignoring the `count` and `offset` paging.
|
|
253
|
+
*
|
|
254
|
+
* Populated only when {@link ExecuteQueryByWidgetIdParams.includeRowCount} is enabled and
|
|
255
|
+
* the Sisense instance supports the row count API; `undefined` otherwise.
|
|
256
|
+
*
|
|
257
|
+
* @beta
|
|
258
|
+
*/
|
|
259
|
+
rowCount?: number;
|
|
260
|
+
};
|
|
234
261
|
/**
|
|
235
262
|
* Base query parameters
|
|
236
263
|
*
|
|
@@ -287,6 +314,22 @@ export interface ExecuteQueryParams extends BaseQueryParams {
|
|
|
287
314
|
* If not specified, the default value is `false`
|
|
288
315
|
*/
|
|
289
316
|
ungroup?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Boolean flag whether to include the total row count of the query result,
|
|
319
|
+
* ignoring the `count` and `offset` paging.
|
|
320
|
+
*
|
|
321
|
+
* When enabled, an additional row count query is sent to the server alongside
|
|
322
|
+
* the data query, and the total is returned in {@link ExecuteQueryResult.rowCount}.
|
|
323
|
+
* The retrieved total is reused for subsequent pages of the same query.
|
|
324
|
+
*
|
|
325
|
+
* Row count feature requires a Sisense instance version of 2026.3.0 or greater.
|
|
326
|
+
* On older versions, the query still succeeds and `rowCount` stays `undefined`.
|
|
327
|
+
*
|
|
328
|
+
* If not specified, the default value is `false`
|
|
329
|
+
*
|
|
330
|
+
* @beta
|
|
331
|
+
*/
|
|
332
|
+
includeRowCount?: boolean;
|
|
290
333
|
/**
|
|
291
334
|
* Sync or async callback that allows to modify the JAQL payload before it is sent to the server.
|
|
292
335
|
*
|
|
@@ -318,6 +361,15 @@ export type ExecuteQueryResult = QueryState & {
|
|
|
318
361
|
* @internal
|
|
319
362
|
*/
|
|
320
363
|
isAllItemsLoaded: boolean;
|
|
364
|
+
/**
|
|
365
|
+
* Total row count of the query result, ignoring the `count` and `offset` paging.
|
|
366
|
+
*
|
|
367
|
+
* Populated only when {@link ExecuteQueryParams.includeRowCount} is enabled and
|
|
368
|
+
* the Sisense instance supports the row count API; `undefined` otherwise.
|
|
369
|
+
*
|
|
370
|
+
* @beta
|
|
371
|
+
*/
|
|
372
|
+
rowCount?: number;
|
|
321
373
|
};
|
|
322
374
|
/** Configuration for {@link useExecuteCsvQuery} hook. */
|
|
323
375
|
export type ExecuteCSVQueryConfig = {
|
|
@@ -329,13 +381,13 @@ export type ExecuteCSVQueryConfig = {
|
|
|
329
381
|
/**
|
|
330
382
|
* Parameters for {@link useExecuteCsvQuery} hook.
|
|
331
383
|
*/
|
|
332
|
-
export interface ExecuteCsvQueryParams extends ExecuteQueryParams {
|
|
384
|
+
export interface ExecuteCsvQueryParams extends Omit<ExecuteQueryParams, 'includeRowCount'> {
|
|
333
385
|
config?: ExecuteCSVQueryConfig;
|
|
334
386
|
}
|
|
335
387
|
/**
|
|
336
388
|
* Parameters for {@link useExecuteExcelQueryInternal} (JAQL XLSX export).
|
|
337
389
|
*/
|
|
338
|
-
export interface ExecuteExcelQueryParams extends ExecuteQueryParams {
|
|
390
|
+
export interface ExecuteExcelQueryParams extends Omit<ExecuteQueryParams, 'includeRowCount'> {
|
|
339
391
|
/** `false` = repeat rows (Angular default); `true` = merge rows. */
|
|
340
392
|
mergeRows: boolean;
|
|
341
393
|
/** Suggested download file name (e.g. from widget title). */
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { HeaderItemFill, HeaderItemSize } from './types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Default size (in pixels) for a header item dimension that is not specified.
|
|
5
|
+
*
|
|
6
|
+
* Each component can override this with its own default (e.g. the dashboard uses 28px) by passing
|
|
7
|
+
* `defaultSize` to the renderer.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_HEADER_ITEM_SIZE = 24;
|
|
10
|
+
/**
|
|
11
|
+
* Applies the default-size fallback to a (possibly partial) size.
|
|
12
|
+
*
|
|
13
|
+
* The result is what gets passed to a {@link HeaderItemComponent} via `props.size`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const resolveHeaderItemSize: (size?: HeaderItemSize, defaultSize?: number) => Required<HeaderItemSize>;
|
|
16
|
+
/**
|
|
17
|
+
* Maps a resolved size and the internal {@link HeaderItemFill} to the CSS for an item's wrapper.
|
|
18
|
+
*
|
|
19
|
+
* - `fill: 'grow'` → flexible, grows to fill the row (the center spacer).
|
|
20
|
+
* - `fill: 'truncate'` → natural content width, shrinkable (the title — enables ellipsis).
|
|
21
|
+
* - `fill: 'content'` → natural content width, never shrinks (built-in action buttons/menu — so a
|
|
22
|
+
* long title cannot squeeze and clip their icons).
|
|
23
|
+
* - no `fill` (external items) → fixed pixel `width` (provided or defaulted).
|
|
24
|
+
*
|
|
25
|
+
* `fill` is internal: it is set only on built-in items. External items never carry it, so they are
|
|
26
|
+
* always laid out at a fixed pixel width.
|
|
27
|
+
*
|
|
28
|
+
* `height` is applied as a fixed pixel height (provided or defaulted).
|
|
29
|
+
*/
|
|
30
|
+
export declare const getHeaderItemStyle: (size: Required<HeaderItemSize>, fill?: HeaderItemFill) => CSSProperties;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ResolvedHeaderItem } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Props for {@link HeaderItemsRenderer}.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface HeaderItemsRendererProps {
|
|
8
|
+
/** The resolved, ordered header items to render. */
|
|
9
|
+
items: ResolvedHeaderItem[];
|
|
10
|
+
/**
|
|
11
|
+
* Default size (px) applied to items that don't specify one. Lets each component pick its own
|
|
12
|
+
* default (the dashboard uses 28). Defaults to {@link DEFAULT_HEADER_ITEM_SIZE}.
|
|
13
|
+
*/
|
|
14
|
+
defaultSize?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Renders a resolved list of header items as a single horizontal flex row.
|
|
18
|
+
*/
|
|
19
|
+
export declare const HeaderItemsRenderer: ({ items, defaultSize }: HeaderItemsRendererProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HeaderItem } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a flexible, empty "spacer" header item.
|
|
4
|
+
*
|
|
5
|
+
* The spacer renders nothing but grows (`fill: 'grow'`) to fill the available width, separating the
|
|
6
|
+
* leading group of items (e.g. the title) from the trailing group (action buttons). It is also the
|
|
7
|
+
* anchor that `{ type: 'auto' }` items are placed after.
|
|
8
|
+
*/
|
|
9
|
+
export declare const createHeaderSpacerItem: (id: string) => HeaderItem;
|