@sisense/sdk-ui 2.21.0 → 2.23.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 +58 -58
- package/dist/ai.js +861 -844
- package/dist/analytics-composer/node.cjs +1 -1
- package/dist/analytics-composer/node.js +2240 -1230
- package/dist/analytics-composer.cjs +47 -47
- package/dist/analytics-composer.js +135 -131
- package/dist/dimensions-2t18RSZC.cjs +1 -0
- package/dist/dimensions-C0BmtTH2.js +204 -0
- package/dist/execute-query-CHYTupEo.js +5866 -0
- package/dist/execute-query-DmAyVFF5.cjs +1 -0
- package/dist/{index-Ck90GjPy.js → index-DCAC0mJe.js} +33 -2
- package/dist/{index-0brX9D6q.cjs → index-Dx6wvLd3.cjs} +1 -1
- package/dist/index.cjs +423 -410
- package/dist/index.js +24905 -23677
- package/dist/index.umd.js +728 -675
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/const.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/components/editable-layout/smart-pointer-sensor.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/get-dashboard-model.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +8 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +9 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/{use-dashboard-model-reducer.d.ts → dashboard-model-reducer/types.d.ts} +43 -38
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/use-dashboard-model-reducer.d.ts +9 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +29 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/use-dashboard-persistence.d.ts +6 -5
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/duplicate-widget-utils.d.ts +34 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/duplicate-widget/use-duplicate-widget-menu-item.d.ts +57 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/jtd/jtd-types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/rename-widget/use-widget-renaming.d.ts +34 -0
- package/dist/packages/sdk-ui/src/domains/dashboarding/types.d.ts +65 -2
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +15 -3
- package/dist/packages/sdk-ui/src/domains/dashboarding/use-dashboard-theme.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/add-filter-popover/add-filter-data-browser.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/data-schema-browser/data-schema-browser.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/data-browser/dimensions-browser/types.d.ts +9 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +4 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/use-cascadding-filter-tile-menu-items/use-cascadding-filter-tile-lock-menu-item.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/cascading-filter-tile/use-cascadding-filter-tile-menu-items/use-cascadding-filter-tile-menu-items.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/custom-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/{filter-tile.d.ts → filter-tile/filter-tile.d.ts} +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-tile/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-tile/types.d.ts +36 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filter-tile-container.d.ts +6 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/filters-panel/types.d.ts +13 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/filters/components/member-filter-tile/member-filter-tile.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/components/unsupported-filter-tile.d.ts +10 -1
- package/dist/packages/sdk-ui/src/domains/filters/shared/clone-filter-and-toggle-locked.d.ts +7 -0
- package/dist/packages/sdk-ui/src/domains/filters/shared/filter-tile-menu-button.d.ts +10 -0
- package/dist/packages/sdk-ui/src/domains/filters/shared/use-filter-tile-menu-items/use-filter-tile-lock-menu-item.d.ts +15 -0
- package/dist/packages/sdk-ui/src/domains/filters/shared/use-filter-tile-menu-items/use-filter-tile-menu-items.d.ts +14 -0
- package/dist/packages/sdk-ui/src/domains/formulas/fetch-formula.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/formulas/index.d.ts +0 -1
- package/dist/packages/sdk-ui/src/domains/formulas/use-get-shared-formula.d.ts +20 -7
- package/dist/packages/sdk-ui/src/domains/query-execution/core/execute-query.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query-by-widget-id/use-execute-query-by-widget-id.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-query-cache/use-query-cache.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/helpers/get-load-data-function.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/helpers/data-loading.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/change-events.d.ts +73 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/chart-widget/types.d.ts +12 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/pivot-table-widget/types.d.ts +12 -2
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-dashboard-filters.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-data-options.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/to-widget-dto-style.d.ts +63 -0
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +3 -2
- package/dist/packages/sdk-ui/src/domains/widgets/event-to-delta.d.ts +17 -0
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/header-menu-utils.d.ts +14 -4
- package/dist/packages/sdk-ui/src/domains/widgets/helpers/index.d.ts +2 -1
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-title-renaming.d.ts +27 -0
- package/dist/packages/sdk-ui/src/domains/widgets/hooks/use-widget-header-management.d.ts +28 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-container/widget-container.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/types.d.ts +32 -17
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-header.d.ts +3 -1
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-header/widget-menu-button.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +4 -0
- package/dist/packages/sdk-ui/src/infra/api/types/dashboard-dto.d.ts +3 -2
- package/dist/packages/sdk-ui/src/infra/app/client-application.d.ts +6 -215
- package/dist/packages/sdk-ui/src/infra/app/helpers.d.ts +16 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +3 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/types/deployment-props.d.ts +4 -1
- package/dist/packages/sdk-ui/src/infra/app/settings/types/features.d.ts +19 -1
- package/dist/packages/sdk-ui/src/infra/app/types.d.ts +236 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/plugin-context.d.ts +15 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/plugin-provider.d.ts +21 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/types.d.ts +50 -0
- package/dist/packages/sdk-ui/src/infra/contexts/plugin-provider/validate-plugins.d.ts +9 -0
- package/dist/packages/sdk-ui/src/infra/contexts/sisense-context/sisense-context.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/contexts/theme-provider/theme-context.d.ts +2 -1
- package/dist/packages/sdk-ui/src/infra/decorators/component-decorators/with-tracking/with-tracking.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/decorators/hook-decorators/with-tracking.d.ts +1 -1
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/de-de.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/en-us.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-ar.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/es-es.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/fr-fr.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/it-it.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ja-jp.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ko-kr.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/nl-nl.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/pt-br.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/ru-ru.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/tr-tr.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/__external__/zh-cn.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/en.d.ts +31 -0
- package/dist/packages/sdk-ui/src/infra/translation/resources/index.d.ts +62 -0
- package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +2 -1
- package/dist/packages/sdk-ui/src/modules/ai/api/narration-endpoints.d.ts +2 -1
- package/dist/packages/sdk-ui/src/modules/ai/get-nlg-insights-from-widget.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/ai/use-get-nlq-result.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/ai/use-get-query-recommendations.d.ts +1 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/axis-type-detection.d.ts +17 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/chart-type-schemas.d.ts +37 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/translate-data-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/helpers/validate-chart-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/translate-chart-from-json.d.ts +42 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/chart/translate-chart-to-json.d.ts +41 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-from-json.d.ts +11 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/dimensions/translate-dimensions-to-json.d.ts +22 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-filters-from-json.d.ts → constructs/filters/translate-filters-from-json.d.ts} +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-filters-to-json.d.ts → constructs/filters/translate-filters-to-json.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-measures-from-json.d.ts → constructs/measures/translate-measures-from-json.d.ts} +4 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/constructs/measures/translate-measures-to-json.d.ts +22 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/index.d.ts +8 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/index.d.ts +7 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/translate-data-options.d.ts +14 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/helpers/validate-pivot-table-json.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/translate-pivot-table-from-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/pivot-table/translate-pivot-table-to-json.d.ts +12 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/constants.d.ts +8 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-from-json.d.ts → query/translate-query-from-json.d.ts} +3 -3
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-to-jaql.d.ts → query/translate-query-to-jaql.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{translate-query-to-json.d.ts → query/translate-query-to-json.d.ts} +2 -2
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/adapters.d.ts +19 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/index.d.ts +9 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/translate-axis-from-json.d.ts +24 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/translate-axis-to-json.d.ts +18 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/custom-formula/process-custom-formula.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/custom-formula/validate-custom-formula.d.ts +13 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/execute-function.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/factory-function-processors.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/factory-function-schemas.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/filter-processors.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/expression/formula-function-schemas.d.ts +25 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/process-arg.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{process-function → shared/expression}/process-node.d.ts +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/attribute-helpers.d.ts +50 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/fuzzy-match.d.ts +16 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/{parse-compose-code.d.ts → shared/utils/parse-compose-code.d.ts} +1 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/schema-index.d.ts +49 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/utils/translation-helpers.d.ts +31 -0
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/types.d.ts +115 -4
- package/dist/packages/sdk-ui/src/modules/analytics-composer/types.d.ts +6 -6
- package/dist/packages/sdk-ui/src/props.d.ts +14 -21
- package/dist/packages/sdk-ui/src/public-api/alpha.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/beta.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +9 -6
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +2 -2
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +18 -5
- package/dist/packages/sdk-ui/src/shared/components/alert/alert.d.ts +91 -0
- package/dist/packages/sdk-ui/src/shared/components/alert/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/shared/components/grouped-items-browser/types.d.ts +7 -1
- package/dist/packages/sdk-ui/src/shared/components/inline-text-editor/inline-text-editor.d.ts +26 -0
- package/dist/packages/sdk-ui/src/shared/components/inline-text-editor/use-blur-on-pointer-down-outside.d.ts +11 -0
- package/dist/packages/sdk-ui/src/shared/components/loading-indicator.d.ts +2 -1
- package/dist/packages/sdk-ui/src/shared/components/menu/menu-button.d.ts +2 -1
- package/dist/packages/sdk-ui/src/shared/components/quota-notification/quota-notification.d.ts +32 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-app-settings.d.ts +12 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-quota-notification.d.ts +54 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-quota-warning-dismissed.d.ts +8 -0
- package/dist/packages/sdk-ui/src/shared/hooks/use-should-load.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/hooks/use-with-change-detection.d.ts +5 -5
- package/dist/packages/sdk-ui/src/shared/icons/warning-icon.d.ts +6 -0
- package/dist/packages/sdk-ui/src/shared/icons/x-circle-icon.d.ts +6 -0
- package/dist/packages/sdk-ui/src/shared/types/menu-item.d.ts +17 -0
- package/dist/packages/sdk-ui/src/types.d.ts +3 -3
- package/dist/{use-common-filters-DBqRT0et.js → quota-notification-CVl0isIV.js} +18254 -16897
- package/dist/quota-notification-RAaHp-eO.cjs +713 -0
- package/dist/translations/de-de.cjs +1 -1
- package/dist/translations/de-de.js +34 -3
- 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 +34 -3
- package/dist/translations/es-es.cjs +1 -1
- package/dist/translations/es-es.js +34 -3
- package/dist/translations/fr-fr.cjs +1 -1
- package/dist/translations/fr-fr.js +34 -3
- package/dist/translations/it-it.cjs +1 -1
- package/dist/translations/it-it.js +34 -3
- package/dist/translations/ja-jp.cjs +1 -1
- package/dist/translations/ja-jp.js +34 -3
- package/dist/translations/ko-kr.cjs +1 -1
- package/dist/translations/ko-kr.js +34 -3
- package/dist/translations/nl-nl.cjs +1 -1
- package/dist/translations/nl-nl.js +34 -3
- package/dist/translations/pt-br.cjs +1 -1
- package/dist/translations/pt-br.js +34 -3
- package/dist/translations/ru-ru.cjs +1 -1
- package/dist/translations/ru-ru.js +34 -3
- package/dist/translations/tr-tr.cjs +1 -1
- package/dist/translations/tr-tr.js +34 -3
- package/dist/translations/zh-cn.cjs +1 -1
- package/dist/translations/zh-cn.js +34 -3
- package/dist/{types-Ockb-LJ0.js → types-B96nVbgX.js} +1 -1
- package/dist/{types-Ch9J6ycn.cjs → types-DZ4vWh8j.cjs} +1 -1
- package/dist/{utils-DH69_bUK.cjs → utils-CgV-jWWQ.cjs} +44 -44
- package/dist/{utils-BXDqo_yg.js → utils-ChqSLRbz.js} +2073 -2081
- package/dist/{widget-composer-DgCWcMJ1.cjs → widget-composer-Blul90Zb.cjs} +3 -3
- package/dist/{widget-composer-DfVCQL2G.js → widget-composer-Cf_CN3Ux.js} +8 -8
- package/package.json +12 -9
- package/dist/dimensions-DVGn8ORR.cjs +0 -1
- package/dist/dimensions-DuUqQgpi.js +0 -202
- package/dist/execute-query-B21bnb05.js +0 -5802
- package/dist/execute-query-BIkhszY1.cjs +0 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/common.d.ts +0 -84
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-from-json.d.ts +0 -12
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-dimensions-to-json.d.ts +0 -13
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/translate-measures-to-json.d.ts +0 -13
- package/dist/use-common-filters-CXJN3RSs.cjs +0 -672
- /package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/{use-dasboard-model-utils.d.ts → use-dashboard-model-utils.d.ts} +0 -0
|
@@ -221,12 +221,14 @@ export declare const resources: {
|
|
|
221
221
|
};
|
|
222
222
|
};
|
|
223
223
|
widgetHeader: {
|
|
224
|
+
addTitle: string;
|
|
224
225
|
info: {
|
|
225
226
|
details: string;
|
|
226
227
|
tooltip: string;
|
|
227
228
|
};
|
|
228
229
|
menu: {
|
|
229
230
|
deleteWidget: string;
|
|
231
|
+
renameWidget: string;
|
|
230
232
|
distributeEqualWidth: string;
|
|
231
233
|
};
|
|
232
234
|
};
|
|
@@ -277,6 +279,12 @@ export declare const resources: {
|
|
|
277
279
|
unknownResponse: string;
|
|
278
280
|
invalidInput: string;
|
|
279
281
|
noAvailableDataTopics: string;
|
|
282
|
+
failedToFetchCreditBalance: string;
|
|
283
|
+
};
|
|
284
|
+
quota: {
|
|
285
|
+
exceededErrorTitle: string;
|
|
286
|
+
exceededErrorDescription: string;
|
|
287
|
+
warningDescription: string;
|
|
280
288
|
};
|
|
281
289
|
};
|
|
282
290
|
attribute: {
|
|
@@ -357,6 +365,9 @@ export declare const resources: {
|
|
|
357
365
|
configureFilter: string;
|
|
358
366
|
noResults: string;
|
|
359
367
|
searchPlaceholder: string;
|
|
368
|
+
more: string;
|
|
369
|
+
filter: string;
|
|
370
|
+
addMeasure: string;
|
|
360
371
|
};
|
|
361
372
|
pivotTable: {
|
|
362
373
|
grandTotal: string;
|
|
@@ -396,6 +407,26 @@ export declare const resources: {
|
|
|
396
407
|
nextGroup: string;
|
|
397
408
|
};
|
|
398
409
|
};
|
|
410
|
+
filterTile: {
|
|
411
|
+
menu: {
|
|
412
|
+
lock: string;
|
|
413
|
+
unlock: string;
|
|
414
|
+
lockGroup: string;
|
|
415
|
+
unlockGroup: string;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
measures: {
|
|
419
|
+
countShort: string;
|
|
420
|
+
countDistinct: string;
|
|
421
|
+
count: string;
|
|
422
|
+
average: string;
|
|
423
|
+
sum: string;
|
|
424
|
+
min: string;
|
|
425
|
+
max: string;
|
|
426
|
+
stdev: string;
|
|
427
|
+
median: string;
|
|
428
|
+
variance: string;
|
|
429
|
+
};
|
|
399
430
|
};
|
|
400
431
|
'en-US': {
|
|
401
432
|
errors: {
|
|
@@ -610,12 +641,14 @@ export declare const resources: {
|
|
|
610
641
|
};
|
|
611
642
|
};
|
|
612
643
|
widgetHeader: {
|
|
644
|
+
addTitle: string;
|
|
613
645
|
info: {
|
|
614
646
|
details: string;
|
|
615
647
|
tooltip: string;
|
|
616
648
|
};
|
|
617
649
|
menu: {
|
|
618
650
|
deleteWidget: string;
|
|
651
|
+
renameWidget: string;
|
|
619
652
|
distributeEqualWidth: string;
|
|
620
653
|
};
|
|
621
654
|
};
|
|
@@ -666,6 +699,12 @@ export declare const resources: {
|
|
|
666
699
|
unknownResponse: string;
|
|
667
700
|
invalidInput: string;
|
|
668
701
|
noAvailableDataTopics: string;
|
|
702
|
+
failedToFetchCreditBalance: string;
|
|
703
|
+
};
|
|
704
|
+
quota: {
|
|
705
|
+
exceededErrorTitle: string;
|
|
706
|
+
exceededErrorDescription: string;
|
|
707
|
+
warningDescription: string;
|
|
669
708
|
};
|
|
670
709
|
};
|
|
671
710
|
attribute: {
|
|
@@ -746,6 +785,9 @@ export declare const resources: {
|
|
|
746
785
|
configureFilter: string;
|
|
747
786
|
noResults: string;
|
|
748
787
|
searchPlaceholder: string;
|
|
788
|
+
more: string;
|
|
789
|
+
filter: string;
|
|
790
|
+
addMeasure: string;
|
|
749
791
|
};
|
|
750
792
|
pivotTable: {
|
|
751
793
|
grandTotal: string;
|
|
@@ -785,5 +827,25 @@ export declare const resources: {
|
|
|
785
827
|
nextGroup: string;
|
|
786
828
|
};
|
|
787
829
|
};
|
|
830
|
+
filterTile: {
|
|
831
|
+
menu: {
|
|
832
|
+
lock: string;
|
|
833
|
+
unlock: string;
|
|
834
|
+
lockGroup: string;
|
|
835
|
+
unlockGroup: string;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
measures: {
|
|
839
|
+
countShort: string;
|
|
840
|
+
countDistinct: string;
|
|
841
|
+
count: string;
|
|
842
|
+
average: string;
|
|
843
|
+
sum: string;
|
|
844
|
+
min: string;
|
|
845
|
+
max: string;
|
|
846
|
+
stdev: string;
|
|
847
|
+
median: string;
|
|
848
|
+
variance: string;
|
|
849
|
+
};
|
|
788
850
|
};
|
|
789
851
|
};
|
|
@@ -6,7 +6,8 @@ export declare class ChatRestApi {
|
|
|
6
6
|
private readonly volatile;
|
|
7
7
|
private httpClient;
|
|
8
8
|
private readonly isUnifiedNarrationEnabled;
|
|
9
|
-
|
|
9
|
+
private readonly isSisenseAiEnabled;
|
|
10
|
+
constructor(httpClient: HttpClient, volatile?: boolean, isUnifiedNarrationEnabled?: boolean, isSisenseAiEnabled?: boolean);
|
|
10
11
|
getChatContexts: () => Promise<ChatContext[]>;
|
|
11
12
|
private getNlgInsights;
|
|
12
13
|
private getQueryRecommendations;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
2
|
import type { GetNlgInsightsRequest, GetNlgInsightsResponse } from './types.js';
|
|
3
3
|
/** Unified narrative endpoint. Try first; fall back to legacy on 404. */
|
|
4
|
-
export declare const UNIFIED_NARRATION_ENDPOINT = "api/v2/ai/
|
|
4
|
+
export declare const UNIFIED_NARRATION_ENDPOINT = "api/v2/ai/narrative";
|
|
5
5
|
/** Legacy endpoint (used when unified narrative returns 404). */
|
|
6
6
|
export declare const LEGACY_NARRATION_ENDPOINT = "api/v2/ai/nlg/queryResult";
|
|
7
7
|
/**
|
|
@@ -10,6 +10,7 @@ export declare const LEGACY_NARRATION_ENDPOINT = "api/v2/ai/nlg/queryResult";
|
|
|
10
10
|
*/
|
|
11
11
|
export type GetNarrationsOptions = {
|
|
12
12
|
isUnifiedNarrationEnabled?: boolean;
|
|
13
|
+
isSisenseAiEnabled?: boolean;
|
|
13
14
|
};
|
|
14
15
|
/**
|
|
15
16
|
* Fetches narrations. Single place for endpoint logic: isUnifiedNarrationEnabled === false → legacy only;
|
|
@@ -12,6 +12,7 @@ export interface GetNlgInsightsFromWidgetOptions {
|
|
|
12
12
|
verbosity?: 'Low' | 'High';
|
|
13
13
|
/** When false, legacy narration endpoint only; when true or undefined, try unified then fallback. From props.isUnifiedNarrationEnabled. */
|
|
14
14
|
isUnifiedNarrationEnabled?: boolean;
|
|
15
|
+
isSisenseAiEnabled?: boolean;
|
|
15
16
|
}
|
|
16
17
|
/**
|
|
17
18
|
* Pure function that fetches NLG insights from WidgetProps.
|
|
@@ -94,6 +94,7 @@ export declare const useGetNlqResultInternal: (params: UseGetNlqResultParams) =>
|
|
|
94
94
|
* ```
|
|
95
95
|
* @returns NLQ load state that contains the status of the execution, the result (data) as WidgetProps
|
|
96
96
|
* @group Generative AI
|
|
97
|
+
*
|
|
97
98
|
* @beta
|
|
98
99
|
*/
|
|
99
100
|
export declare const useGetNlqResult: (params: UseGetNlqResultParams) => UseGetNlqResultState;
|
|
@@ -79,6 +79,7 @@ export declare const useGetQueryRecommendationsInternal: (params: UseGetQueryRec
|
|
|
79
79
|
* ```
|
|
80
80
|
* @returns An array of objects, each containing recommended question text and its corresponding `widgetProps`
|
|
81
81
|
* @group Generative AI
|
|
82
|
+
*
|
|
82
83
|
* @beta
|
|
83
84
|
*/
|
|
84
85
|
export declare const useGetQueryRecommendations: (params: UseGetQueryRecommendationsParams) => UseGetQueryRecommendationsState;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines whether a dataOptions axis contains dimensions or measures.
|
|
3
|
+
* Uses schema metadata and content-based detection for mixed axes.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
import type { DimensionItemJSON, MeasureItemJSON } from '../../types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Determines if an axis contains dimensions (vs measures).
|
|
10
|
+
* Uses axis name and type detection to make the determination.
|
|
11
|
+
*
|
|
12
|
+
* @param axisKey - The dataOptions axis key (e.g., 'category', 'value', 'x')
|
|
13
|
+
* @param axisValue - The axis value (dimension or measure item(s))
|
|
14
|
+
* @param chartType - Optional chart type for chart-specific overrides
|
|
15
|
+
* @returns true if the axis contains dimensions, false if measures
|
|
16
|
+
*/
|
|
17
|
+
export declare function isDimensionAxisType(axisKey: string, axisValue: DimensionItemJSON | DimensionItemJSON[] | MeasureItemJSON | MeasureItemJSON[], chartType?: string): boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ChartType } from '../../../../../types.js';
|
|
2
|
+
/** Returns a defensive copy of the set of valid chart types. */
|
|
3
|
+
export declare function getValidChartTypes(): Set<string>;
|
|
4
|
+
/** Frozen array of chart types valid for NLQ translation (excludes 'image') */
|
|
5
|
+
export declare const VALID_CHART_TYPES_ARRAY: readonly string[];
|
|
6
|
+
/** Top-level ChartJSON keys */
|
|
7
|
+
export declare const CHART_JSON_TOP_LEVEL_KEYS: readonly ["chartType", "dataOptions", "styleOptions", "filters", "highlights"];
|
|
8
|
+
/** Valid dataOptions axis keys (union of all chart types) */
|
|
9
|
+
export declare const VALID_DATA_OPTIONS_KEYS: Set<string>;
|
|
10
|
+
/** Per-chart-type axes metadata: valid axes and required axes */
|
|
11
|
+
export declare const CHART_TYPE_AXES_METADATA: Record<string, {
|
|
12
|
+
validAxes: Set<string>;
|
|
13
|
+
requiredAxes: string[];
|
|
14
|
+
}>;
|
|
15
|
+
/** Known dimension axes (used for axis type detection) */
|
|
16
|
+
export declare const DIMENSION_AXES: Set<string>;
|
|
17
|
+
/** Known measure axes (used for axis type detection) */
|
|
18
|
+
export declare const MEASURE_AXES: Set<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Returns valid/required axes metadata for a chart type.
|
|
21
|
+
* Returns defensive copies so callers cannot mutate shared structures.
|
|
22
|
+
*
|
|
23
|
+
* @param chartType - The chart type to look up
|
|
24
|
+
* @returns Metadata (with new Set and array copies) or undefined if chart type is unknown
|
|
25
|
+
*/
|
|
26
|
+
export declare function getChartTypeMetadata(chartType: string): {
|
|
27
|
+
validAxes: Set<string>;
|
|
28
|
+
requiredAxes: readonly string[];
|
|
29
|
+
} | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Type guard: value is a valid ChartType for NLQ translation.
|
|
32
|
+
*/
|
|
33
|
+
export declare function isValidChartType(value: unknown): value is ChartType;
|
|
34
|
+
/**
|
|
35
|
+
* Checks if a key is a valid dataOptions axis.
|
|
36
|
+
*/
|
|
37
|
+
export declare function isValidDataOptionsKey(key: string): boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chart JSON processing: schema metadata, validation, and translation.
|
|
3
|
+
*
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export { CHART_TYPE_AXES_METADATA, DIMENSION_AXES, getChartTypeMetadata, getValidChartTypes, isValidChartType, isValidDataOptionsKey, MEASURE_AXES, VALID_CHART_TYPES_ARRAY, VALID_DATA_OPTIONS_KEYS, } from './chart-type-schemas.js';
|
|
7
|
+
export { isDimensionAxisType } from './axis-type-detection.js';
|
|
8
|
+
export { validateChartJSONStructure } from './validate-chart-json.js';
|
|
9
|
+
export { translateDataOptionsFromJSON } from './translate-data-options.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChartDataOptions } from '../../../../../types.js';
|
|
2
|
+
import { NlqTranslationError } from '../../../types.js';
|
|
3
|
+
import type { DataOptionsJSON, InternalDataSchemaContext } from '../../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates dataOptions from JSON to CSDK format.
|
|
6
|
+
* Delegates to dimension/measure translators for each axis.
|
|
7
|
+
* Collects errors via collectTranslationErrors; never throws.
|
|
8
|
+
*/
|
|
9
|
+
export declare function translateDataOptionsFromJSON(dataOptionsJSON: DataOptionsJSON | undefined, context: InternalDataSchemaContext, translationErrors: NlqTranslationError[]): ChartDataOptions | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates top-level ChartJSON structure.
|
|
3
|
+
* Detects typos in prop names and invalid chartType values.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
import { NlqTranslationError } from '../../../types.js';
|
|
8
|
+
import type { ChartJSON } from '../../types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Validates top-level ChartJSON structure.
|
|
11
|
+
* Returns normalized ChartJSON and any structural errors.
|
|
12
|
+
*
|
|
13
|
+
* @param rawInput - Raw input (object) to validate
|
|
14
|
+
* @returns Normalized ChartJSON and array of validation errors
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateChartJSONStructure(rawInput: unknown): {
|
|
17
|
+
normalized: ChartJSON;
|
|
18
|
+
errors: NlqTranslationError[];
|
|
19
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ChartProps } from '../../../../props.js';
|
|
2
|
+
import { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import type { ChartInput } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates NLQ ChartJSON format to CSDK chart props.
|
|
6
|
+
* Direction: JSON → CSDK
|
|
7
|
+
*
|
|
8
|
+
* Translates chart JSON generated by the NLQ API to CSDK ChartProps object.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* Input:
|
|
12
|
+
* {
|
|
13
|
+
* chartType: 'column',
|
|
14
|
+
* dataOptions: {
|
|
15
|
+
* category: ['DM.Commerce.Date.Years'],
|
|
16
|
+
* value: [
|
|
17
|
+
* { function: 'measureFactory.sum', args: ['DM.Commerce.Revenue', 'Total Revenue'] }
|
|
18
|
+
* ],
|
|
19
|
+
* breakBy: [{ column: 'DM.Commerce.Gender', sortType: 'sortAsc' }]
|
|
20
|
+
* },
|
|
21
|
+
* filters: [
|
|
22
|
+
* { function: 'filterFactory.members', args: ['DM.Commerce.Date.Years', ['2024-01-01T00:00:00']] }
|
|
23
|
+
* ]
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* Output:
|
|
27
|
+
* {
|
|
28
|
+
* chartType: 'column',
|
|
29
|
+
* dataSet: { ... },
|
|
30
|
+
* dataOptions: {
|
|
31
|
+
* category: [Attribute(...), ...],
|
|
32
|
+
* value: [Measure(...), ...],
|
|
33
|
+
* breakBy: [Attribute(...), ...]
|
|
34
|
+
* },
|
|
35
|
+
* filters: [Filter(...), ...]
|
|
36
|
+
* }
|
|
37
|
+
*
|
|
38
|
+
* @param input - ChartInput object containing chartJSON and data schema context
|
|
39
|
+
* @returns NlqTranslationResult with ChartProps or errors
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
export declare const translateChartFromJSON: (input: ChartInput) => NlqTranslationResult<ChartProps>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ChartProps } from '../../../../props.js';
|
|
2
|
+
import { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import { ChartJSON } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates CSDK chart props to NLQ ChartJSON format.
|
|
6
|
+
* Direction: CSDK → JSON
|
|
7
|
+
*
|
|
8
|
+
* Translates CSDK ChartProps object to chart JSON format compatible with NLQ API.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* Input:
|
|
12
|
+
* {
|
|
13
|
+
* chartType: 'column',
|
|
14
|
+
* dataOptions: {
|
|
15
|
+
* category: [Attribute(...)],
|
|
16
|
+
* value: [Measure(...)],
|
|
17
|
+
* breakBy: [Attribute(...)]
|
|
18
|
+
* },
|
|
19
|
+
* filters: [Filter(...)]
|
|
20
|
+
* }
|
|
21
|
+
*
|
|
22
|
+
* Output:
|
|
23
|
+
* {
|
|
24
|
+
* chartType: 'column',
|
|
25
|
+
* dataOptions: {
|
|
26
|
+
* category: ['DM.Commerce.Date.Years'],
|
|
27
|
+
* value: [
|
|
28
|
+
* { function: 'measureFactory.sum', args: ['DM.Commerce.Revenue', 'Total Revenue'] }
|
|
29
|
+
* ],
|
|
30
|
+
* breakBy: [{ column: 'DM.Commerce.Gender', sortType: 'sortAsc' }]
|
|
31
|
+
* },
|
|
32
|
+
* filters: [
|
|
33
|
+
* { function: 'filterFactory.members', args: ['DM.Commerce.Date.Years', ['2024-01-01T00:00:00']] }
|
|
34
|
+
* ]
|
|
35
|
+
* }
|
|
36
|
+
*
|
|
37
|
+
* @param chartProps - Partial chart props with chartType and dataOptions
|
|
38
|
+
* @returns NlqTranslationResult with ChartJSON or errors
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export declare const translateChartToJSON: (chartProps: Partial<ChartProps>) => NlqTranslationResult<ChartJSON>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NlqTranslationResult } from '../../../types.js';
|
|
2
|
+
import { DimensionsInput, DimensionTranslationItem } from '../../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Translates an array of JSON dimension items (strings or StyledColumnJSON) to enriched format.
|
|
5
|
+
*
|
|
6
|
+
* Direction: JSON → CSDK
|
|
7
|
+
*
|
|
8
|
+
* @param input - DimensionsInput object
|
|
9
|
+
* @returns NlqTranslationResult<DimensionTranslationItem[]>
|
|
10
|
+
*/
|
|
11
|
+
export declare const translateDimensionsFromJSON: (input: DimensionsInput) => NlqTranslationResult<DimensionTranslationItem[]>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Attribute, JSONArray } from '@sisense/sdk-data';
|
|
2
|
+
import type { SortDirection } from '@sisense/sdk-data';
|
|
3
|
+
import { NlqTranslationResult } from '../../../types.js';
|
|
4
|
+
/** Runtime StyledColumn: wrapper with column and optional CategoryStyle (from chart dataOptions) */
|
|
5
|
+
type StyledColumn = {
|
|
6
|
+
column: Attribute;
|
|
7
|
+
sortType?: SortDirection;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Translates CSDK Attribute or StyledColumn array to NLQ JSON format (string or StyledColumnJSON array).
|
|
12
|
+
*
|
|
13
|
+
* When an attribute has sort applied (via getSort() or StyledColumn.sortType), or when StyledColumn
|
|
14
|
+
* has other style props (dateFormat, numberFormatConfig, etc.), outputs StyledColumnJSON with all
|
|
15
|
+
* properties; otherwise outputs composeCode string.
|
|
16
|
+
*
|
|
17
|
+
* @param dimensions - Array of CSDK Attribute or StyledColumn objects
|
|
18
|
+
* @returns NlqTranslationResult<JSONArray> - JSON array output for NLQ dimensions
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function translateDimensionsToJSON(dimensions: (Attribute | StyledColumn)[]): NlqTranslationResult<JSONArray>;
|
|
22
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Filter, FilterRelations } from '@sisense/sdk-data';
|
|
2
|
-
import { NlqTranslationResult } from '
|
|
3
|
-
import { FiltersFunctionCallInput, FiltersInput, HighlightsFunctionCallInput, HighlightsInput } from '
|
|
2
|
+
import { NlqTranslationResult } from '../../../types.js';
|
|
3
|
+
import { FiltersFunctionCallInput, FiltersInput, HighlightsFunctionCallInput, HighlightsInput } from '../../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Translate an array of JSON objects to filters
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Filter, FilterRelations, JSONArray } from '@sisense/sdk-data';
|
|
2
|
-
import { NlqTranslationResult } from '
|
|
2
|
+
import { NlqTranslationResult } from '../../../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Translates CSDK Filter array or FilterRelations to NLQ JSON format (FunctionCall array).
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Measure } from '@sisense/sdk-data';
|
|
2
|
-
import { NlqTranslationErrorContext, NlqTranslationResult } from '
|
|
3
|
-
import { FunctionCall, InternalDataSchemaContext, MeasuresInput } from '
|
|
2
|
+
import { NlqTranslationErrorContext, NlqTranslationResult } from '../../../types.js';
|
|
3
|
+
import { FunctionCall, InternalDataSchemaContext, MeasuresInput, MeasureTranslationItem } from '../../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Translate a single function call to a measure.
|
|
6
6
|
*
|
|
@@ -8,7 +8,7 @@ import { FunctionCall, InternalDataSchemaContext, MeasuresInput } from './types.
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const translateMeasureFromJSONFunctionCall: (functionCall: FunctionCall, context: InternalDataSchemaContext, errorContext: NlqTranslationErrorContext) => NlqTranslationResult<Measure>;
|
|
10
10
|
/**
|
|
11
|
-
* Translates an array of JSON measure items (FunctionCall or StyledMeasureColumnJSON) to
|
|
11
|
+
* Translates an array of JSON measure items (FunctionCall or StyledMeasureColumnJSON) to enriched format.
|
|
12
12
|
*
|
|
13
13
|
* Direction: JSON → CSDK
|
|
14
14
|
*
|
|
@@ -19,4 +19,4 @@ export declare const translateMeasureFromJSONFunctionCall: (functionCall: Functi
|
|
|
19
19
|
* ]
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
export declare const translateMeasuresFromJSON: (input: MeasuresInput) => NlqTranslationResult<
|
|
22
|
+
export declare const translateMeasuresFromJSON: (input: MeasuresInput) => NlqTranslationResult<MeasureTranslationItem[]>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { JSONArray, Measure } from '@sisense/sdk-data';
|
|
2
|
+
import type { SortDirection } from '@sisense/sdk-data';
|
|
3
|
+
import { NlqTranslationResult } from '../../../types.js';
|
|
4
|
+
/** Runtime StyledMeasureColumn: wrapper with column and optional style (from chart dataOptions) */
|
|
5
|
+
type StyledMeasureColumn = {
|
|
6
|
+
column: Measure;
|
|
7
|
+
sortType?: SortDirection;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Translates CSDK Measure or StyledMeasureColumn array to NLQ JSON format (FunctionCall or StyledMeasureColumnJSON array).
|
|
12
|
+
*
|
|
13
|
+
* When a measure has sort applied (via getSort() or StyledMeasureColumn.sortType), or when StyledMeasureColumn
|
|
14
|
+
* has other style props (trend, forecast, numberFormatConfig, etc.), outputs StyledMeasureColumnJSON;
|
|
15
|
+
* otherwise outputs the parsed FunctionCall.
|
|
16
|
+
*
|
|
17
|
+
* @param measures - Array of CSDK Measure or StyledMeasureColumn objects
|
|
18
|
+
* @returns NlqTranslationResult<JSONArray> - JSON array output for NLQ measures
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare function translateMeasuresToJSON(measures: (Measure | StyledMeasureColumn)[]): NlqTranslationResult<JSONArray>;
|
|
22
|
+
export {};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
export * from './translate-query-from-json.js';
|
|
2
|
-
export * from './translate-query-to-json.js';
|
|
3
|
-
export * from './translate-
|
|
1
|
+
export * from './query/translate-query-from-json.js';
|
|
2
|
+
export * from './query/translate-query-to-json.js';
|
|
3
|
+
export * from './chart/translate-chart-from-json.js';
|
|
4
|
+
export * from './chart/translate-chart-to-json.js';
|
|
5
|
+
export * from './pivot-table/translate-pivot-table-from-json.js';
|
|
6
|
+
export * from './pivot-table/translate-pivot-table-to-json.js';
|
|
7
|
+
export * from './query/translate-query-to-jaql.js';
|
|
8
|
+
export type { ChartJSON, DataOptionsJSON, ChartInput, PivotTableJSON, PivotTableDataOptionsJSON, PivotTableInput, } from './types.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translates pivot table dataOptions from JSON to CSDK format.
|
|
3
|
+
* Uses shared translateSingleAxisFromJSON for rows, columns, values.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
import type { PivotTableDataOptions } from '../../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
8
|
+
import { NlqTranslationError } from '../../../types.js';
|
|
9
|
+
import type { InternalDataSchemaContext, PivotTableDataOptionsJSON } from '../../types.js';
|
|
10
|
+
/**
|
|
11
|
+
* Translates pivot table dataOptions from JSON to CSDK format.
|
|
12
|
+
* Pivot has fixed axes: rows/columns (dimensions), values (measures), grandTotals (passthrough).
|
|
13
|
+
*/
|
|
14
|
+
export declare function translatePivotTableDataOptionsFromJSON(dataOptionsJSON: PivotTableDataOptionsJSON | undefined, context: InternalDataSchemaContext, translationErrors: NlqTranslationError[]): PivotTableDataOptions | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validates top-level PivotTableJSON structure.
|
|
3
|
+
* Detects typos in prop names and invalid dataOptions structure.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
import { NlqTranslationError } from '../../../types.js';
|
|
8
|
+
import type { PivotTableJSON } from '../../types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Validates top-level PivotTableJSON structure.
|
|
11
|
+
* Returns normalized PivotTableJSON and any structural errors.
|
|
12
|
+
*
|
|
13
|
+
* @param rawInput - Raw input (object) to validate
|
|
14
|
+
* @returns Normalized PivotTableJSON and array of validation errors
|
|
15
|
+
*/
|
|
16
|
+
export declare function validatePivotTableJSONStructure(rawInput: unknown): {
|
|
17
|
+
normalized: PivotTableJSON;
|
|
18
|
+
errors: NlqTranslationError[];
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PivotTableProps } from '../../../../props.js';
|
|
2
|
+
import { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import type { PivotTableInput } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates NLQ PivotTableJSON format to CSDK pivot table props.
|
|
6
|
+
* Direction: JSON → CSDK
|
|
7
|
+
*
|
|
8
|
+
* @param input - PivotTableInput object containing pivotTableJSON and data schema context
|
|
9
|
+
* @returns NlqTranslationResult with PivotTableProps or errors
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const translatePivotTableFromJSON: (input: PivotTableInput) => NlqTranslationResult<PivotTableProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PivotTableProps } from '../../../../props.js';
|
|
2
|
+
import { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import type { PivotTableJSON } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates CSDK pivot table props to NLQ PivotTableJSON format.
|
|
6
|
+
* Direction: CSDK → JSON
|
|
7
|
+
*
|
|
8
|
+
* @param pivotTableProps - Partial pivot table props with dataOptions
|
|
9
|
+
* @returns NlqTranslationResult with PivotTableJSON or errors
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const translatePivotTableToJSON: (pivotTableProps: Partial<PivotTableProps>) => NlqTranslationResult<PivotTableJSON>;
|
package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/query/constants.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Name prefixes for trend and forecast measures in query JSON.
|
|
3
|
+
* Aligns with chart behavior so generated measure names are consistent.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const TREND_PREFIX = "$trend";
|
|
8
|
+
export declare const FORECAST_PREFIX = "$forecast";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseQueryParams } from '
|
|
2
|
-
import { NlqTranslationResult } from '
|
|
3
|
-
import { QueryInput } from '
|
|
1
|
+
import { BaseQueryParams } from '../../../../domains/query-execution/index.js';
|
|
2
|
+
import { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import { QueryInput } from '../../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Translates NLQ JSON format to CSDK BaseQueryParams object.
|
|
6
6
|
* Direction: JSON → CSDK
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type DataSource } from '@sisense/sdk-data';
|
|
2
2
|
import type { JaqlQueryPayload } from '@sisense/sdk-query-client';
|
|
3
|
-
import { BaseQueryParams } from '
|
|
3
|
+
import { BaseQueryParams } from '../../../../domains/query-execution/types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Converts BaseQueryParams to JAQL payload
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseQueryParams } from '
|
|
2
|
-
import { NlqResponseJSON, NlqTranslationResult } from '
|
|
1
|
+
import { BaseQueryParams } from '../../../../domains/query-execution/index.js';
|
|
2
|
+
import { NlqResponseJSON, NlqTranslationResult } from '../../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Translates CSDK BaseQueryParams to NLQ JSON format.
|
|
5
5
|
* Direction: CSDK → JSON
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Attribute, Measure } from '@sisense/sdk-data';
|
|
2
|
+
import type { JSONArray } from '@sisense/sdk-data';
|
|
3
|
+
import type { StyledColumn, StyledMeasureColumn } from '../../../../../domains/visualizations/core/chart-data-options/types.js';
|
|
4
|
+
import type { NlqTranslationError } from '../../../types.js';
|
|
5
|
+
import type { DimensionItemJSON, DimensionTranslationItem, MeasureItemJSON, MeasureTranslationItem } from '../../types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Shared adapters and utilities for data options translation.
|
|
8
|
+
* Used by chart and pivot-table translators.
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export type AxisType = 'dimension' | 'measure';
|
|
13
|
+
export declare function adaptDimensionsToStyledColumn(items: DimensionTranslationItem[]): (Attribute | StyledColumn)[];
|
|
14
|
+
export declare function adaptMeasuresToStyledMeasureColumn(items: MeasureTranslationItem[]): (Measure | StyledMeasureColumn)[];
|
|
15
|
+
export declare function toJSONArray(value: DimensionItemJSON | DimensionItemJSON[] | MeasureItemJSON | MeasureItemJSON[]): JSONArray;
|
|
16
|
+
/**
|
|
17
|
+
* Maps inner translation errors to dataOptions axis context.
|
|
18
|
+
*/
|
|
19
|
+
export declare function withAxisContext(axisKey: string): (e: NlqTranslationError) => NlqTranslationError;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared data options translation utilities.
|
|
3
|
+
* Used by chart and pivot-table translators.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export { adaptDimensionsToStyledColumn, adaptMeasuresToStyledMeasureColumn, toJSONArray, withAxisContext, } from './adapters.js';
|
|
8
|
+
export { translateSingleAxisFromJSON, type AxisType, type TranslatedAxis, } from './translate-axis-from-json.js';
|
|
9
|
+
export { translateSingleAxisToJSON } from './translate-axis-to-json.js';
|