@sisense/sdk-ui 2.27.0 → 2.29.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 +1 -1
- package/dist/ai.js +5 -5
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +1693 -1339
- package/dist/analytics-composer.cjs +73 -73
- package/dist/analytics-composer.js +23 -17
- package/dist/apply-styled-options-to-query-CaP4IMrQ.js +6379 -0
- package/dist/apply-styled-options-to-query-D5D8pRl2.cjs +1 -0
- package/dist/{index-D7mHzfx0.js → index-C77YCBVd.js} +4 -1
- package/dist/{index-BX9p-XrU.cjs → index-C9G8giSk.cjs} +1 -1
- package/dist/index.cjs +406 -406
- package/dist/index.js +23197 -22359
- package/dist/index.umd.js +719 -720
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/const.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/dashboard-model-translator.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts +9 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-models.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +12 -3
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +29 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-excel-download.d.ts +23 -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 +15 -0
- 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 +13 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/excel-export/build-jaql-excel-export.d.ts +48 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/excel-export/build-xlsx-export-payload.d.ts +33 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/excel-query-state-reducer.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/use-excel-query-params-changed.d.ts +8 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-excel-query/use-execute-excel-query.d.ts +8 -0
- package/dist/packages/sdk-ui/src/domains/query-execution/index.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/types.d.ts +97 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/components/scattermap/utils/map.d.ts +2 -2
- 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/calendar-heatmap-chart/utils/with-calendar-heatmap-data-coloring.d.ts +2 -2
- 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 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/types.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/formatters/data-cell-formatters/data-cell-color-formatter.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/helpers/prepare-pivot-styling-props.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/pivot-table/hooks/use-render-pivot.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/helpers/get-cell-styles.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/pure-table/types.d.ts +3 -3
- package/dist/packages/sdk-ui/src/domains/visualizations/components/table/styles/get-custom-pagination-styles.d.ts +2 -2
- 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-options/types.d.ts +27 -23
- 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/boxplot-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/cartesian-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-settings.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-transformers.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/series-processor.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/category-chart-options/category-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/category-chart-options/funnel-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/category-chart-options/pie-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/category-chart-options/sunburst-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/category-chart-options/treemap-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/chart-options-service.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/common-highcharts-option-service.d.ts +3 -3
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/range-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/scatter-chart-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/theme-option-service.d.ts +3 -3
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/funnel-series.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/pie-plot-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/pie-series.d.ts +4 -4
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/scatter-series.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-levels.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-options.d.ts +3 -3
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/sunburst/sunburst-series.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/treemap/treemap-labels.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/treemap/treemap-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/treemap/treemap-series.d.ts +2 -2
- 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 +9 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/use-chart-widget-excel-download.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/types.d.ts +20 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/custom-widget/use-custom-widget-excel-download.d.ts +16 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/pivot-table-widget.d.ts +15 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +9 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/use-pivot-widget-excel-download.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget/types.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +43 -4
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +6 -0
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/download-blob-as-file.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/excel-export-map-dimensions-measures.d.ts +18 -0
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-excel-query-file-loader.d.ts +13 -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/use-with-excel-download-menu-item.d.ts +21 -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-style-utils.d.ts +31 -2
- package/dist/packages/sdk-ui/src/domains/widgets/widget-model/get-widget-model.d.ts +2 -2
- 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-translator/widget-model-translator.d.ts +3 -3
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +9 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +24 -11
- 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 +14 -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/contexts/theme-provider/custom-theme-provider.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/default-theme-settings.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/theme-context.d.ts +3 -3
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/types.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/use-theme-settings.d.ts +2 -2
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/use-theme.d.ts +14 -0
- 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/widget-plugins/types.d.ts +52 -2
- package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/widget-plugin-registry.d.ts +3 -3
- package/dist/packages/sdk-ui/src/infra/themes/legacy-design-settings.d.ts +4 -4
- package/dist/packages/sdk-ui/src/infra/themes/theme-loader.d.ts +4 -4
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +6 -0
- package/dist/packages/sdk-ui/src/modules/ai/ai-disclaimer.d.ts +2 -2
- 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/dashboard/translate-dashboard-from-json.d.ts +17 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/dashboard/translate-dashboard-to-json.d.ts +15 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/index.d.ts +7 -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 -5
- 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/custom-formula/process-custom-formula.d.ts +2 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/factory-function-processors.d.ts +0 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/filter-processors.d.ts +8 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/error-path.d.ts +37 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/translation-helpers.d.ts +36 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +197 -7
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/index.d.ts +6 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/to-widget-props.d.ts +27 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/translate-custom-widget-filters-from-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/translate-envelope-widget-from-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/validate-widget-json.d.ts +8 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/helpers/widget-id.d.ts +17 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/translate-widget-from-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/widget/translate-widget-to-json.d.ts +18 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +7 -23
- package/dist/packages/sdk-ui/src/modules/analytics-composer/widget/chart-options/get-widget-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/props.d.ts +20 -2
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +3 -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 +5 -2
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +2 -2
- package/dist/packages/sdk-ui/src/shared/components/loading-indicator.d.ts +2 -2
- 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 +217 -1
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +5 -2
- 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 +5 -2
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +5 -2
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +5 -2
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +5 -2
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +5 -2
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +5 -2
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +5 -2
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +5 -2
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +5 -2
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +5 -2
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +5 -2
- package/dist/types-7YG0uOzO.js +74 -0
- package/dist/{types-Cq47e5cy.cjs → types-DlYJ_DZ0.cjs} +1 -1
- package/dist/{use-hover-D_mBUhp9.cjs → use-hover-CANskYrn.cjs} +129 -130
- package/dist/{use-hover-CkmV6eu9.js → use-hover-Dju4Dcv3.js} +13079 -12635
- package/dist/{utils-Db3U6oHa.js → utils-BKRpWUGm.js} +1063 -1060
- package/dist/{utils-DM5vp1gw.cjs → utils-C4PIba42.cjs} +10 -10
- package/dist/{widget-composer-CZ0_bPXK.cjs → widget-composer-BXEyx308.cjs} +7 -7
- package/dist/{widget-composer-BiGVKN49.js → widget-composer-DRDw1oBF.js} +258 -206
- package/package.json +11 -8
- package/dist/apply-styled-options-to-query-BzMAmDnD.js +0 -5979
- package/dist/apply-styled-options-to-query-k10gkPCG.cjs +0 -1
- package/dist/dimensions-C3WSSE5j.js +0 -204
- package/dist/dimensions-huCJK0y6.cjs +0 -1
- 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-CzqDZ83C.js +0 -74
|
@@ -4,5 +4,11 @@ export * from './chart/translate-chart-from-json.js';
|
|
|
4
4
|
export * from './chart/translate-chart-to-json.js';
|
|
5
5
|
export * from './pivot-table/translate-pivot-table-from-json.js';
|
|
6
6
|
export * from './pivot-table/translate-pivot-table-to-json.js';
|
|
7
|
+
export * from './widget/translate-widget-from-json.js';
|
|
8
|
+
export * from './widget/translate-widget-to-json.js';
|
|
9
|
+
export * from './dashboard/translate-dashboard-from-json.js';
|
|
10
|
+
export * from './dashboard/translate-dashboard-to-json.js';
|
|
7
11
|
export * from './query/translate-query-to-jaql.js';
|
|
8
|
-
export
|
|
12
|
+
export { getQueryElementSummary } from './constructs/get-query-element-summary.js';
|
|
13
|
+
export type { GetQueryElementSummaryOptions } from './constructs/get-query-element-summary.js';
|
|
14
|
+
export type { ChartJSON, DataOptionsJSON, ChartInput, DataSourceJSON, PivotTableJSON, PivotTableDataOptionsJSON, PivotTableInput, ChartWidgetJSON, PivotTableWidgetJSON, TextWidgetJSON, CustomWidgetJSON, WidgetJSON, WidgetInput, WidgetConfigJSON, QueryJSON, QueryInput, DimensionItemJSON, MeasureItemJSON, FunctionCall, QueryElementKind, QueryElementItemJSON, ElementSummary, SpecificWidgetOptionsJSON, WidgetsOptionsJSON, DashboardJSON, DashboardInput, } from './types.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ExecuteQueryParams } from '../../../../domains/query-execution/index.js';
|
|
2
2
|
import { NlqTranslationResult } from '../../types.js';
|
|
3
|
-
import { QueryInput } from '
|
|
3
|
+
import { QueryInput } from '../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Translates NLQ JSON format to CSDK ExecuteQueryParams object.
|
|
6
6
|
* Direction: JSON → CSDK
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExecuteQueryParams } from '../../../../domains/query-execution/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import type { QueryJSON } from '../types.js';
|
|
3
4
|
/**
|
|
4
5
|
* Translates CSDK ExecuteQueryParams to NLQ JSON format.
|
|
5
6
|
* Direction: CSDK → JSON
|
|
@@ -50,7 +51,7 @@ import { NlqResponseJSON, NlqTranslationResult } from '../../types.js';
|
|
|
50
51
|
* ```
|
|
51
52
|
*
|
|
52
53
|
* @param query - ExecuteQueryParams object with CSDK objects
|
|
53
|
-
* @returns NlqTranslationResult<
|
|
54
|
+
* @returns NlqTranslationResult<QueryJSON> with FunctionCall format or structured errors
|
|
54
55
|
* @internal
|
|
55
56
|
*/
|
|
56
|
-
export declare function translateQueryToJSON(query: ExecuteQueryParams): NlqTranslationResult<
|
|
57
|
+
export declare function translateQueryToJSON(query: ExecuteQueryParams): NlqTranslationResult<QueryJSON>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Attribute, Measure } from '@sisense/sdk-data';
|
|
2
|
-
import type { JSONArray } from '@sisense/sdk-data';
|
|
3
2
|
import type { StyledColumn, StyledMeasureColumn } from '../../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
4
3
|
import type { NlqTranslationError } from '../../../types.js';
|
|
5
4
|
import type { DimensionItemJSON, DimensionTranslationItem, MeasureItemJSON, MeasureTranslationItem } from '../../types.js';
|
|
@@ -12,8 +11,7 @@ import type { DimensionItemJSON, DimensionTranslationItem, MeasureItemJSON, Meas
|
|
|
12
11
|
export type AxisType = 'dimension' | 'measure';
|
|
13
12
|
export declare function adaptDimensionsToStyledColumn(items: DimensionTranslationItem[]): (Attribute | StyledColumn)[];
|
|
14
13
|
export declare function adaptMeasuresToStyledMeasureColumn(items: MeasureTranslationItem[]): (Measure | StyledMeasureColumn)[];
|
|
15
|
-
export declare function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
*/
|
|
14
|
+
export declare function toDimensionItemsJSON(value: DimensionItemJSON | DimensionItemJSON[]): DimensionItemJSON[];
|
|
15
|
+
export declare function toMeasureItemsJSON(value: MeasureItemJSON | MeasureItemJSON[]): MeasureItemJSON[];
|
|
16
|
+
export declare function toDataOptionItemsJSON(value: DimensionItemJSON | DimensionItemJSON[] | MeasureItemJSON | MeasureItemJSON[]): (DimensionItemJSON | MeasureItemJSON)[];
|
|
19
17
|
export declare function withAxisContext(axisKey: string): (e: NlqTranslationError) => NlqTranslationError;
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
export { adaptDimensionsToStyledColumn, adaptMeasuresToStyledMeasureColumn,
|
|
7
|
+
export { adaptDimensionsToStyledColumn, adaptMeasuresToStyledMeasureColumn, toDataOptionItemsJSON, toDimensionItemsJSON, toMeasureItemsJSON, withAxisContext, } from './adapters.js';
|
|
8
8
|
export { translateSingleAxisFromJSON, type AxisType, type TranslatedAxis, } from './translate-axis-from-json.js';
|
|
9
9
|
export { translateSingleAxisToJSON } from './translate-axis-to-json.js';
|
|
@@ -12,6 +12,7 @@ import { FunctionContext, ProcessedArg } from '../../../types.js';
|
|
|
12
12
|
*
|
|
13
13
|
* @param processedArgs - [title: string, formula: string, context: Record<string, unknown>, format?: string, description?: string]
|
|
14
14
|
* @param context - Processing context with error prefix and other metadata
|
|
15
|
+
* @returns New args array with `processedContext` at index 2 (does not mutate `processedArgs`)
|
|
15
16
|
* @throws Error with descriptive message if validation fails
|
|
16
17
|
*/
|
|
17
|
-
export declare function processCustomFormula(processedArgs: ProcessedArg[], context: FunctionContext):
|
|
18
|
+
export declare function processCustomFormula(processedArgs: ProcessedArg[], context: FunctionContext): ProcessedArg[];
|
|
@@ -13,7 +13,6 @@ import { CustomFunctionProcessor } from '../../types.js';
|
|
|
13
13
|
* ```typescript
|
|
14
14
|
* // Adding a new custom processor
|
|
15
15
|
* 'measureFactory.rank': processRankingParameters,
|
|
16
|
-
* 'filterFactory.dateRange': processDateRangeLogic,
|
|
17
16
|
* ```
|
|
18
17
|
*/
|
|
19
18
|
export declare const FUNCTION_PROCESSORS: Record<string, CustomFunctionProcessor>;
|
|
@@ -5,33 +5,37 @@ import { FunctionContext, ProcessedArg } from '../../types.js';
|
|
|
5
5
|
*
|
|
6
6
|
* @param processedArgs - [attribute, value, config?]
|
|
7
7
|
* @param context - Processing context with error prefix and other metadata
|
|
8
|
+
* @returns Same `processedArgs` reference when validation succeeds
|
|
8
9
|
* @throws Error with descriptive message if validation fails
|
|
9
10
|
*/
|
|
10
|
-
export declare function processStringOrNumericFilter(processedArgs: ProcessedArg[], context: FunctionContext):
|
|
11
|
+
export declare function processStringOrNumericFilter(processedArgs: ProcessedArg[], context: FunctionContext): ProcessedArg[];
|
|
11
12
|
/**
|
|
12
13
|
* Processes filters that only accept numeric values
|
|
13
14
|
* Used by: greaterThan, lessThan, between, etc.
|
|
14
15
|
*
|
|
15
16
|
* @param processedArgs - [attribute, value, config?]
|
|
16
17
|
* @param context - Processing context with error prefix and other metadata
|
|
18
|
+
* @returns Same `processedArgs` reference when validation succeeds
|
|
17
19
|
* @throws Error with descriptive message if validation fails
|
|
18
20
|
*/
|
|
19
|
-
export declare function processNumericFilter(processedArgs: ProcessedArg[], context: FunctionContext):
|
|
21
|
+
export declare function processNumericFilter(processedArgs: ProcessedArg[], context: FunctionContext): ProcessedArg[];
|
|
20
22
|
/**
|
|
21
23
|
* Processes filters that only accept string values
|
|
22
24
|
* Used by: contains, startsWith, endsWith, like, etc.
|
|
23
25
|
*
|
|
24
26
|
* @param processedArgs - [attribute, value, config?]
|
|
25
27
|
* @param context - Processing context with error prefix and other metadata
|
|
28
|
+
* @returns Same `processedArgs` reference when validation succeeds
|
|
26
29
|
* @throws Error with descriptive message if validation fails
|
|
27
30
|
*/
|
|
28
|
-
export declare function processStringFilter(processedArgs: ProcessedArg[], context: FunctionContext):
|
|
31
|
+
export declare function processStringFilter(processedArgs: ProcessedArg[], context: FunctionContext): ProcessedArg[];
|
|
29
32
|
/**
|
|
30
33
|
* Processes exclude filter to validate that it only accepts members filters
|
|
31
34
|
* Used by: exclude
|
|
32
35
|
*
|
|
33
36
|
* @param processedArgs - [filter, inputFilter?, config?]
|
|
34
37
|
* @param context - Processing context with error prefix and other metadata
|
|
38
|
+
* @returns Same `processedArgs` reference when validation succeeds
|
|
35
39
|
* @throws Error with descriptive message if validation fails
|
|
36
40
|
*/
|
|
37
|
-
export declare function processExcludeFilter(processedArgs: ProcessedArg[], context: FunctionContext):
|
|
41
|
+
export declare function processExcludeFilter(processedArgs: ProcessedArg[], context: FunctionContext): ProcessedArg[];
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { NlqTranslationError } from '../../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a path string for a dataOptions field.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare function dataOptionsPath(axisKey: string | number, itemIndex?: number): string;
|
|
8
|
+
/**
|
|
9
|
+
* Joins path segments using pathPrefix notation (e.g. "widgets[0].dataOptions.category[0]").
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare function joinPathStrings(prefix: string, suffix?: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Prefixes an error path with a structural segment.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare function prefixPath(prefix: string): (error: NlqTranslationError) => NlqTranslationError;
|
|
20
|
+
/**
|
|
21
|
+
* Prefixes path with widgets[index] for dashboard-level widget errors.
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare function withWidgetsArrayPath(widgetIndex: number): (error: NlqTranslationError) => NlqTranslationError;
|
|
26
|
+
/**
|
|
27
|
+
* Prefixes filter errors with filters[index] at dashboard level.
|
|
28
|
+
*
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function withFilterPath(filterIndex: number): (error: NlqTranslationError) => NlqTranslationError;
|
|
32
|
+
/**
|
|
33
|
+
* Maps errors from a translation result through a mapper.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
export declare function mapTranslationErrors(errors: readonly NlqTranslationError[], mapError: (error: NlqTranslationError) => NlqTranslationError): NlqTranslationError[];
|
|
@@ -3,17 +3,49 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @internal
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
6
|
+
import type { DataSource, JSONObject } from '@sisense/sdk-data';
|
|
7
|
+
import type { WidgetsOptions } from '../../../../../domains/dashboarding/dashboard-model/types.js';
|
|
7
8
|
import type { NlqTranslationError, NlqTranslationResult } from '../../../types.js';
|
|
9
|
+
import type { DataSourceJSON, WidgetsOptionsJSON } from '../../types.js';
|
|
10
|
+
type WithOptionalToJSON = {
|
|
11
|
+
toJSON?: () => JSONObject;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Returns a JSON-friendly snapshot for translation error reporting.
|
|
15
|
+
* Uses `toJSON()` when present (CSDK Attribute/Measure); otherwise returns the value as-is.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Serializes a CSDK data source to NLQ JSON (title string only).
|
|
21
|
+
*
|
|
22
|
+
* @param dataSource - Widget or dashboard data source
|
|
23
|
+
* @returns Data source title for JSON output
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export declare function translateDataSourceToJSON(dataSource: DataSource): DataSourceJSON;
|
|
27
|
+
/**
|
|
28
|
+
* Extracts JSON-serializable widget options from dashboard `widgetsOptions`.
|
|
29
|
+
* Omits `jtdConfig` and other non-JSON-safe fields.
|
|
30
|
+
*
|
|
31
|
+
* @param widgetsOptions - Dashboard widget options map
|
|
32
|
+
* @returns Widget options safe for NLQ JSON, or `undefined` when empty
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
35
|
+
export declare function translateWidgetsOptionsToJSON(widgetsOptions: WidgetsOptions): WidgetsOptionsJSON | undefined;
|
|
36
|
+
export declare function toNlqErrorInput(value: WithOptionalToJSON | unknown): unknown;
|
|
8
37
|
/**
|
|
9
38
|
* Recursively strips [[delimiters]] from all strings in a JSON structure.
|
|
10
39
|
* Transforms "DM.[[Commerce Sales]].[[Order Date]]" → "DM.Commerce Sales.Order Date"
|
|
11
40
|
*
|
|
12
|
-
*
|
|
41
|
+
* Accepts NLQ output shapes (e.g. ChartJSON) that are JSON-serializable at runtime but are not
|
|
42
|
+
* assignable to sdk-data `JSONValue` because of `Record<string, unknown>` style fields.
|
|
43
|
+
*
|
|
44
|
+
* @param value - The value to process
|
|
13
45
|
* @returns The value with all [[delimiters]] stripped from strings
|
|
14
46
|
* @internal
|
|
15
47
|
*/
|
|
16
|
-
export declare function stripDelimitersFromJson<T
|
|
48
|
+
export declare function stripDelimitersFromJson<T>(value: T): T;
|
|
17
49
|
export declare function getSuccessData<T>(result: NlqTranslationResult<T>): T;
|
|
18
50
|
export declare function getErrors<T>(result: NlqTranslationResult<T>): string[];
|
|
19
51
|
/**
|
|
@@ -29,3 +61,4 @@ export declare function getErrors<T>(result: NlqTranslationResult<T>): string[];
|
|
|
29
61
|
* @internal
|
|
30
62
|
*/
|
|
31
63
|
export declare function collectTranslationErrors<T>(translateFn: () => NlqTranslationResult<T>, errors: NlqTranslationError[], mapError?: (e: NlqTranslationError) => NlqTranslationError): T | null;
|
|
64
|
+
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type Arg, type ArgValue, Attribute, Filter, FilterRelations, type FunctionCall, JaqlDataSourceForDto, JSONArray, Measure, PivotGrandTotals } from '@sisense/sdk-data';
|
|
2
|
+
import type { CommonFiltersOptions } from '../../../domains/dashboarding/common-filters/types.js';
|
|
3
|
+
import type { DashboardConfig, DashboardLayoutOptions, DashboardStyleOptions } from '../../../domains/dashboarding/types.js';
|
|
2
4
|
import { CategoryStyle, SeriesStyle, ValueStyle } from '../../../domains/visualizations/core/chart-data-options/types.js';
|
|
3
|
-
import type {
|
|
5
|
+
import type { WidgetConfig, WidgetType } from '../../../domains/widgets/components/widget/types.js';
|
|
6
|
+
import type { ToolbarMenuConfig, WidgetHeaderTitleConfig } from '../../../domains/widgets/shared/widget-header/types.js';
|
|
7
|
+
import type { CustomWidgetStyleOptions, PivotTableStyleOptions, TextWidgetStyleOptions } from '../../../types.js';
|
|
4
8
|
import { DataSchemaContext, NlqTranslationInput } from '../types.js';
|
|
5
9
|
import type { SchemaIndex } from './shared/utils/schema-index.js';
|
|
6
10
|
/**
|
|
@@ -22,6 +26,8 @@ export type ArgType = 'string' | 'string[]' | 'number' | 'number[]' | 'boolean'
|
|
|
22
26
|
export interface ArgSchema {
|
|
23
27
|
type: ArgType;
|
|
24
28
|
required: boolean;
|
|
29
|
+
/** Marks this positional arg as the human-readable display name. */
|
|
30
|
+
isName?: true;
|
|
25
31
|
}
|
|
26
32
|
export type ProcessedArg = unknown;
|
|
27
33
|
export type QueryElement = Filter | FilterRelations | Measure;
|
|
@@ -38,10 +44,6 @@ export interface FunctionContext extends InternalDataSchemaContext {
|
|
|
38
44
|
export interface ArgContext extends FunctionContext {
|
|
39
45
|
argSchema: ArgSchema;
|
|
40
46
|
}
|
|
41
|
-
export type DimensionsInput = NlqTranslationInput<JSONArray, InternalDataSchemaContext>;
|
|
42
|
-
export type MeasuresInput = NlqTranslationInput<JSONArray, InternalDataSchemaContext>;
|
|
43
|
-
export type FiltersInput = NlqTranslationInput<JSONArray, InternalDataSchemaContext>;
|
|
44
|
-
export type HighlightsInput = NlqTranslationInput<JSONArray, InternalDataSchemaContext>;
|
|
45
47
|
export type MeasuresFunctionCallInput = NlqTranslationInput<FunctionCall[], InternalDataSchemaContext>;
|
|
46
48
|
export type FiltersFunctionCallInput = NlqTranslationInput<FunctionCall[], InternalDataSchemaContext>;
|
|
47
49
|
export type HighlightsFunctionCallInput = NlqTranslationInput<FunctionCall[], InternalDataSchemaContext>;
|
|
@@ -49,15 +51,19 @@ export type NodeInput = NlqTranslationInput<FunctionCall, FunctionContext>;
|
|
|
49
51
|
export type ArgInput = NlqTranslationInput<Arg, ArgContext>;
|
|
50
52
|
/**
|
|
51
53
|
* Custom processor function signature.
|
|
54
|
+
*
|
|
55
|
+
* Implementations must not mutate `processedArgs`. Returns the argument list to pass to
|
|
56
|
+
* `executeFunction`—typically the same array reference when only validating, or a new array when
|
|
57
|
+
* normalizing or replacing nested values.
|
|
52
58
|
*/
|
|
53
|
-
export type CustomFunctionProcessor = (processedArgs: ProcessedArg[], context: FunctionContext) =>
|
|
59
|
+
export type CustomFunctionProcessor = (processedArgs: ProcessedArg[], context: FunctionContext) => ProcessedArg[];
|
|
54
60
|
/**
|
|
55
61
|
* Type guard: value is a non-null object (Record<string, unknown>).
|
|
56
62
|
* @internal
|
|
57
63
|
*/
|
|
58
64
|
export declare function isRecordStringUnknown(value: unknown): value is Record<string, unknown>;
|
|
59
65
|
export declare function isFunctionCall(value: unknown): value is FunctionCall;
|
|
60
|
-
export declare function isFunctionCallArray(value:
|
|
66
|
+
export declare function isFunctionCallArray(value: readonly unknown[]): value is FunctionCall[];
|
|
61
67
|
export declare function isFilterElement(arg: QueryElement): arg is Filter;
|
|
62
68
|
export declare function isFilterRelationsElement(arg: QueryElement): arg is FilterRelations;
|
|
63
69
|
export declare function isMeasureElement(arg: QueryElement): arg is Measure;
|
|
@@ -112,6 +118,54 @@ export type DimensionItemJSON = string | StyledColumnJSON;
|
|
|
112
118
|
* @internal
|
|
113
119
|
*/
|
|
114
120
|
export type MeasureItemJSON = FunctionCall | StyledMeasureColumnJSON;
|
|
121
|
+
/**
|
|
122
|
+
* Translation input types for query constructs (precise JSON arrays).
|
|
123
|
+
*
|
|
124
|
+
* @internal
|
|
125
|
+
*/
|
|
126
|
+
export type DimensionsInput = NlqTranslationInput<DimensionItemJSON[], InternalDataSchemaContext>;
|
|
127
|
+
export type MeasuresInput = NlqTranslationInput<MeasureItemJSON[], InternalDataSchemaContext>;
|
|
128
|
+
export type FiltersInput = NlqTranslationInput<FunctionCall[], InternalDataSchemaContext>;
|
|
129
|
+
export type HighlightsInput = NlqTranslationInput<FunctionCall[], InternalDataSchemaContext>;
|
|
130
|
+
/**
|
|
131
|
+
* JSON representation of a query from the NLQ API.
|
|
132
|
+
* Precise serializable schema for dimensions, measures, filters, and highlights.
|
|
133
|
+
*
|
|
134
|
+
* @internal
|
|
135
|
+
*/
|
|
136
|
+
export interface QueryJSON {
|
|
137
|
+
dimensions: DimensionItemJSON[];
|
|
138
|
+
measures: MeasureItemJSON[];
|
|
139
|
+
filters: FunctionCall[];
|
|
140
|
+
highlights?: FunctionCall[];
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Input type for query translation (JSON → CSDK).
|
|
144
|
+
*
|
|
145
|
+
* @internal
|
|
146
|
+
*/
|
|
147
|
+
export type QueryInput = NlqTranslationInput<QueryJSON, DataSchemaContext>;
|
|
148
|
+
/**
|
|
149
|
+
* Element kind for a single {@link QueryJSON} array entry.
|
|
150
|
+
*
|
|
151
|
+
* @internal
|
|
152
|
+
*/
|
|
153
|
+
export type QueryElementKind = 'dimension' | 'measure' | 'filter' | 'highlight';
|
|
154
|
+
/**
|
|
155
|
+
* Display name and kind for a query JSON element.
|
|
156
|
+
*
|
|
157
|
+
* @internal
|
|
158
|
+
*/
|
|
159
|
+
export interface ElementSummary {
|
|
160
|
+
readonly name: string;
|
|
161
|
+
readonly type: QueryElementKind;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* A single item from {@link QueryJSON} dimensions, measures, filters, or highlights arrays.
|
|
165
|
+
*
|
|
166
|
+
* @internal
|
|
167
|
+
*/
|
|
168
|
+
export type QueryElementItemJSON = DimensionItemJSON | MeasureItemJSON | FunctionCall;
|
|
115
169
|
/**
|
|
116
170
|
* Type guard: value is StyledColumnJSON (object with column, not a FunctionCall).
|
|
117
171
|
*
|
|
@@ -209,3 +263,139 @@ export interface PivotTableJSON {
|
|
|
209
263
|
* @internal
|
|
210
264
|
*/
|
|
211
265
|
export type PivotTableInput = NlqTranslationInput<PivotTableJSON, DataSchemaContext>;
|
|
266
|
+
/**
|
|
267
|
+
* Mirrors `WithCommonWidgetProps` for the JSON layer
|
|
268
|
+
*/
|
|
269
|
+
type WithCommonWidgetJSON<Base, Type extends WidgetType> = Base & {
|
|
270
|
+
widgetType: Type;
|
|
271
|
+
readonly id: string;
|
|
272
|
+
};
|
|
273
|
+
/**
|
|
274
|
+
* JSON-safe subset of {@link WidgetConfig} (drops function-bearing menu items).
|
|
275
|
+
* Structurally assignable to {@link WidgetConfig} because `items` is optional on the runtime type.
|
|
276
|
+
*
|
|
277
|
+
* @internal
|
|
278
|
+
*/
|
|
279
|
+
export type WidgetConfigJSON = Pick<WidgetConfig, 'actions'> & {
|
|
280
|
+
header?: {
|
|
281
|
+
title?: WidgetHeaderTitleConfig;
|
|
282
|
+
toolbar?: {
|
|
283
|
+
menu?: Pick<ToolbarMenuConfig, 'enabled'>;
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
/**
|
|
288
|
+
* Data source in NLQ JSON — title only. Full JAQL details live in {@link DataSchemaContext}.
|
|
289
|
+
*
|
|
290
|
+
* @internal
|
|
291
|
+
*/
|
|
292
|
+
export type DataSourceJSON = string;
|
|
293
|
+
/**
|
|
294
|
+
* JSON representation of a chart widget
|
|
295
|
+
*
|
|
296
|
+
* @internal
|
|
297
|
+
*/
|
|
298
|
+
export type ChartWidgetJSON = ChartJSON & {
|
|
299
|
+
title?: string;
|
|
300
|
+
description?: string;
|
|
301
|
+
dataSource?: DataSourceJSON;
|
|
302
|
+
config?: WidgetConfigJSON;
|
|
303
|
+
highlightSelectionDisabled?: boolean;
|
|
304
|
+
};
|
|
305
|
+
/**
|
|
306
|
+
* JSON representation of a pivot table widget.
|
|
307
|
+
*
|
|
308
|
+
* @internal
|
|
309
|
+
*/
|
|
310
|
+
export type PivotTableWidgetJSON = PivotTableJSON & {
|
|
311
|
+
title?: string;
|
|
312
|
+
description?: string;
|
|
313
|
+
dataSource?: DataSourceJSON;
|
|
314
|
+
config?: WidgetConfigJSON;
|
|
315
|
+
};
|
|
316
|
+
/**
|
|
317
|
+
* JSON representation of a text widget
|
|
318
|
+
*
|
|
319
|
+
* @internal
|
|
320
|
+
*/
|
|
321
|
+
export type TextWidgetJSON = {
|
|
322
|
+
styleOptions: TextWidgetStyleOptions;
|
|
323
|
+
config?: WidgetConfigJSON;
|
|
324
|
+
};
|
|
325
|
+
/**
|
|
326
|
+
* JSON representation of a custom/plugin widget payload.
|
|
327
|
+
* `dataOptions` is passed through as opaque JSON — `GenericDataOptions` cannot be reliably
|
|
328
|
+
* round-tripped without custom-widget-specific schema knowledge.
|
|
329
|
+
* Only `filters` and `highlights` are translated; all other fields are pass-through.
|
|
330
|
+
* `widgetType` and `id` are added on `WidgetJSON` via `WithCommonWidgetJSON`.
|
|
331
|
+
*
|
|
332
|
+
* @internal
|
|
333
|
+
*/
|
|
334
|
+
export type CustomWidgetJSON = {
|
|
335
|
+
customWidgetType: string;
|
|
336
|
+
title?: string;
|
|
337
|
+
description?: string;
|
|
338
|
+
dataSource?: DataSourceJSON;
|
|
339
|
+
config?: WidgetConfigJSON;
|
|
340
|
+
filters?: FunctionCall[];
|
|
341
|
+
highlights?: FunctionCall[];
|
|
342
|
+
/** Opaque pass-through — GenericDataOptions serialized as plain JSON */
|
|
343
|
+
dataOptions?: Record<string, unknown>;
|
|
344
|
+
styleOptions?: CustomWidgetStyleOptions;
|
|
345
|
+
customOptions?: Record<string, unknown>;
|
|
346
|
+
};
|
|
347
|
+
/**
|
|
348
|
+
* Dashboard-level options for a specific widget in NLQ JSON.
|
|
349
|
+
* Excludes non-JSON-safe fields such as `jtdConfig` (Map / Filter objects).
|
|
350
|
+
*
|
|
351
|
+
* @internal
|
|
352
|
+
*/
|
|
353
|
+
export type SpecificWidgetOptionsJSON = {
|
|
354
|
+
filtersOptions?: CommonFiltersOptions;
|
|
355
|
+
partialDtoOptions?: {
|
|
356
|
+
options?: Record<string, unknown>;
|
|
357
|
+
style?: Record<string, unknown>;
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
/**
|
|
361
|
+
* Widget options map for NLQ dashboard JSON.
|
|
362
|
+
*
|
|
363
|
+
* @internal
|
|
364
|
+
*/
|
|
365
|
+
export type WidgetsOptionsJSON = Record<string, SpecificWidgetOptionsJSON>;
|
|
366
|
+
/**
|
|
367
|
+
* Discriminated union of all NLQ widget JSON representations.
|
|
368
|
+
* Mirrors the `WidgetProps` discriminated union in serializable JSON form.
|
|
369
|
+
*
|
|
370
|
+
* @internal
|
|
371
|
+
*/
|
|
372
|
+
export type WidgetJSON = WithCommonWidgetJSON<ChartWidgetJSON, 'chart'> | WithCommonWidgetJSON<PivotTableWidgetJSON, 'pivot'> | WithCommonWidgetJSON<TextWidgetJSON, 'text'> | WithCommonWidgetJSON<CustomWidgetJSON, 'custom'>;
|
|
373
|
+
/**
|
|
374
|
+
* JSON representation of a dashboard.
|
|
375
|
+
*
|
|
376
|
+
* @internal
|
|
377
|
+
*/
|
|
378
|
+
export interface DashboardJSON {
|
|
379
|
+
id?: string;
|
|
380
|
+
title?: string;
|
|
381
|
+
filters?: FunctionCall[];
|
|
382
|
+
widgets: WidgetJSON[];
|
|
383
|
+
layoutOptions?: DashboardLayoutOptions;
|
|
384
|
+
config?: DashboardConfig;
|
|
385
|
+
/** Data source title only — schema details live in {@link DataSchemaContext}. */
|
|
386
|
+
defaultDataSource?: DataSourceJSON;
|
|
387
|
+
styleOptions?: DashboardStyleOptions;
|
|
388
|
+
widgetsOptions?: WidgetsOptionsJSON;
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* Input type for widget translation (JSON → CSDK).
|
|
392
|
+
*
|
|
393
|
+
* @internal
|
|
394
|
+
*/
|
|
395
|
+
export type WidgetInput = NlqTranslationInput<WidgetJSON, DataSchemaContext>;
|
|
396
|
+
/**
|
|
397
|
+
* Input type for dashboard translation (JSON → CSDK).
|
|
398
|
+
*
|
|
399
|
+
* @internal
|
|
400
|
+
*/
|
|
401
|
+
export type DashboardInput = NlqTranslationInput<DashboardJSON, DataSchemaContext>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { translateCustomWidgetFiltersFromJSON } from './translate-custom-widget-filters-from-json.js';
|
|
2
|
+
export { translateEnvelopeWidgetFromJSON } from './translate-envelope-widget-from-json.js';
|
|
3
|
+
export { toChartWidgetProps, toPivotTableWidgetProps } from './to-widget-props.js';
|
|
4
|
+
export type { WidgetMeta } from './to-widget-props.js';
|
|
5
|
+
export { validateWidgetType } from './validate-widget-json.js';
|
|
6
|
+
export { hasRequiredWidgetId, missingWidgetIdError } from './widget-id.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WidgetProps } from '../../../../../domains/widgets/components/widget/types.js';
|
|
2
|
+
import type { ChartProps, PivotTableProps } from '../../../../../props.js';
|
|
3
|
+
import type { DataSourceJSON, WidgetConfigJSON } from '../../types.js';
|
|
4
|
+
export type WidgetMeta = {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly title?: string;
|
|
7
|
+
readonly description?: string;
|
|
8
|
+
readonly dataSource?: DataSourceJSON;
|
|
9
|
+
readonly config?: WidgetConfigJSON;
|
|
10
|
+
readonly highlightSelectionDisabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Maps chart component props (with `dataSet`) to chart widget props (with `dataSource`).
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const toChartWidgetProps: (chartProps: ChartProps, meta: WidgetMeta) => Extract<WidgetProps, {
|
|
18
|
+
widgetType: 'chart';
|
|
19
|
+
}>;
|
|
20
|
+
/**
|
|
21
|
+
* Maps pivot table component props (with `dataSet`) to pivot widget props (with `dataSource`).
|
|
22
|
+
*
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
export declare const toPivotTableWidgetProps: (pivotProps: PivotTableProps, meta: WidgetMeta) => Extract<WidgetProps, {
|
|
26
|
+
widgetType: 'pivot';
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Filter, FilterRelations, FunctionCall } from '@sisense/sdk-data';
|
|
2
|
+
import type { DataSchemaContext, NlqTranslationResult } from '../../../types.js';
|
|
3
|
+
export type CustomWidgetFiltersTranslation = {
|
|
4
|
+
readonly filters?: Filter[] | FilterRelations;
|
|
5
|
+
readonly highlights?: Filter[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Translates custom-widget filters and highlights from NLQ JSON to CSDK filters.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const translateCustomWidgetFiltersFromJSON: (filters: FunctionCall[] | undefined, highlights: FunctionCall[] | undefined, context: DataSchemaContext) => NlqTranslationResult<CustomWidgetFiltersTranslation>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DataSchemaContext, NlqTranslationInput, NlqTranslationResult } from '../../../types.js';
|
|
2
|
+
import type { DataSourceJSON, WidgetConfigJSON } from '../../types.js';
|
|
3
|
+
import type { WidgetMeta } from './to-widget-props.js';
|
|
4
|
+
type WidgetEnvelopeJSON = {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly title?: string;
|
|
7
|
+
readonly description?: string;
|
|
8
|
+
readonly dataSource?: DataSourceJSON;
|
|
9
|
+
readonly config?: WidgetConfigJSON;
|
|
10
|
+
readonly highlightSelectionDisabled?: boolean;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Strips widget envelope fields and delegates to a chart/pivot sub-translator,
|
|
14
|
+
* then maps component props to widget props with metadata.
|
|
15
|
+
*
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const translateEnvelopeWidgetFromJSON: <TWidgetJSON extends WidgetEnvelopeJSON, TPayload, TComponentProps, TWidgetProps>(widgetJSON: TWidgetJSON, context: DataSchemaContext, translate: (input: NlqTranslationInput<TPayload, DataSchemaContext>) => NlqTranslationResult<TComponentProps>, toWidgetProps: (props: TComponentProps, meta: WidgetMeta) => TWidgetProps) => NlqTranslationResult<TWidgetProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NlqTranslationError } from '../../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Validates that widget JSON includes a supported `widgetType`.
|
|
4
|
+
*
|
|
5
|
+
* @param rawInput - Raw widget JSON object
|
|
6
|
+
* @returns Validation error, or `null` when `widgetType` is present and valid
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateWidgetType(rawInput: unknown): NlqTranslationError | null;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NlqTranslationError } from '../../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Builds a translation error when widget JSON is missing a required `id`.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const missingWidgetIdError: (input: unknown) => NlqTranslationError;
|
|
8
|
+
/**
|
|
9
|
+
* Narrows widget JSON to require a present `id`.
|
|
10
|
+
*
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
export declare const hasRequiredWidgetId: <T extends {
|
|
14
|
+
id?: string | undefined;
|
|
15
|
+
}>(widget: T) => widget is T & {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { WidgetProps } from '../../../../domains/widgets/components/widget/types.js';
|
|
2
|
+
import type { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import type { WidgetInput } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates NLQ WidgetJSON format to CSDK widget props.
|
|
6
|
+
* Direction: JSON → CSDK
|
|
7
|
+
*
|
|
8
|
+
* Dispatches to the appropriate sub-translator based on `widgetType`:
|
|
9
|
+
* - `'chart'` → `translateChartFromJSON`
|
|
10
|
+
* - `'pivot'` → `translatePivotTableFromJSON`
|
|
11
|
+
* - `'text'` → pass-through (no data translation)
|
|
12
|
+
* - `'custom'` → filters/highlights translated; dataOptions passed through as opaque JSON
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
* @param input - WidgetInput containing widgetJSON and data schema context
|
|
16
|
+
* @returns NlqTranslationResult with WidgetProps or errors
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export declare const translateWidgetFromJSON: (input: WidgetInput) => NlqTranslationResult<WidgetProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { WidgetProps } from '../../../../domains/widgets/components/widget/types.js';
|
|
2
|
+
import type { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import type { WidgetJSON } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates CSDK widget props to NLQ WidgetJSON format.
|
|
6
|
+
* Direction: CSDK → JSON
|
|
7
|
+
*
|
|
8
|
+
* Dispatches to the appropriate sub-translator based on `widgetType`:
|
|
9
|
+
* - `'chart'` → `translateChartToJSON`
|
|
10
|
+
* - `'pivot'` → `translatePivotTableToJSON`
|
|
11
|
+
* - `'text'` → pass-through of styleOptions
|
|
12
|
+
* - `'custom'` → filters/highlights translated; dataOptions passed through as opaque JSON
|
|
13
|
+
*
|
|
14
|
+
* @param widgetProps - Widget props with widgetType discriminant (id required)
|
|
15
|
+
* @returns NlqTranslationResult with WidgetJSON or errors
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare const translateWidgetToJSON: (widgetProps: WidgetProps) => NlqTranslationResult<WidgetJSON>;
|