@sisense/sdk-ui 2.7.0 → 2.9.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.
Files changed (126) hide show
  1. package/dist/ai.cjs +29 -29
  2. package/dist/ai.js +175 -193
  3. package/dist/analytics-composer/node.cjs +1 -0
  4. package/dist/analytics-composer/node.d.ts +1 -0
  5. package/dist/analytics-composer/node.js +897 -0
  6. package/dist/analytics-composer.cjs +118 -118
  7. package/dist/analytics-composer.js +2244 -2951
  8. package/dist/{derive-chart-family-DvYmrG1k.js → derive-chart-family-BLG1sO1D.js} +41019 -47803
  9. package/dist/derive-chart-family-QPmz5DJ3.cjs +656 -0
  10. package/dist/{dimensions-WmjaZcrG.js → dimensions-B2jz151s.js} +2 -3
  11. package/dist/dimensions-CVJeJ8mi.cjs +1 -0
  12. package/dist/execute-query-Cp3se7Yb.cjs +1 -0
  13. package/dist/execute-query-agpyzZz6.js +6406 -0
  14. package/dist/index.cjs +25 -25
  15. package/dist/index.js +6612 -6353
  16. package/dist/index.umd.js +355 -389
  17. package/dist/packages/sdk-ui/src/ai/common/icon-button.d.ts +1 -3
  18. package/dist/packages/sdk-ui/src/ai/messages/clickable-message.d.ts +0 -1
  19. package/dist/packages/sdk-ui/src/analytics-composer/index-node.d.ts +9 -0
  20. package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +1 -0
  21. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/common.d.ts +26 -0
  22. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/index.d.ts +2 -0
  23. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-dimensions.d.ts +3 -0
  24. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-filters.d.ts +44 -0
  25. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-measures.d.ts +30 -0
  26. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query-to-jaql.d.ts +18 -0
  27. package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-query.d.ts +224 -0
  28. package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +28 -1
  29. package/dist/packages/sdk-ui/src/chart/helpers/get-load-data-function.d.ts +3 -1
  30. package/dist/packages/sdk-ui/src/chart/helpers/use-chart-data-preparation.d.ts +3 -1
  31. package/dist/packages/sdk-ui/src/chart/helpers/use-translated-data-options.d.ts +1 -1
  32. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +5 -0
  33. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/y-axis.d.ts +28 -0
  34. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/helpers/design-options.d.ts +12 -0
  35. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highchart-options/axes.d.ts +6 -0
  36. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/highcharts-options-builder.d.ts +2 -0
  37. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/line-chart/line-chart-builder.d.ts +2 -0
  38. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data/index.d.ts +10 -0
  39. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/data-options/index.d.ts +12 -0
  40. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/design-options/index.d.ts +18 -0
  41. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/axes.d.ts +6 -0
  42. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
  43. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/polar-chart/polar-chart-builder.d.ts +2 -0
  44. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/area-chart-builder.d.ts +2 -0
  45. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/helpers/design-options.d.ts +12 -0
  46. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/axes.d.ts +6 -0
  47. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
  48. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/area-chart/highchart-options/labels-spacing.d.ts +8 -0
  49. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/axes.d.ts +6 -0
  50. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/bar-chart/highchart-options/labels-spacing.d.ts +9 -0
  51. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/axes.d.ts +6 -0
  52. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/column-chart/highchart-options/labels-spacing.d.ts +9 -0
  53. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/helpers/highchart-options/stacking.d.ts +21 -0
  54. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/stackable/types.d.ts +1 -0
  55. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/types.d.ts +1 -1
  56. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/build-highchart-options.d.ts +9 -4
  57. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/utils.d.ts +2 -1
  58. package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/types.d.ts +1 -1
  59. package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +7 -7
  60. package/dist/packages/sdk-ui/src/chart/restructured-charts/utils.d.ts +5 -0
  61. package/dist/packages/sdk-ui/src/chart-data/data-coloring/types.d.ts +6 -0
  62. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +155 -0
  63. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-settings.d.ts +39 -0
  64. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-transformers.d.ts +45 -0
  65. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/axis-utils.d.ts +1 -0
  66. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/date-utils.d.ts +27 -0
  67. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis/index.d.ts +3 -0
  68. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/chart-configuration.d.ts +33 -3
  69. package/dist/packages/sdk-ui/src/chart-options-processor/chart-options-service.d.ts +0 -10
  70. package/dist/packages/sdk-ui/src/chart-options-processor/data-points.d.ts +1 -0
  71. package/dist/packages/sdk-ui/src/chart-options-processor/defaults/cartesian.d.ts +4 -3
  72. package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +5 -12
  73. package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +1 -1
  74. package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +2 -2
  75. package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +13 -0
  76. package/dist/packages/sdk-ui/src/chart-options-processor/translations/value-label-section.d.ts +2 -2
  77. package/dist/packages/sdk-ui/src/common/icons/drag-handle-icon.d.ts +2 -1
  78. package/dist/packages/sdk-ui/src/const.d.ts +2 -0
  79. package/dist/packages/sdk-ui/src/custom-widgets-provider/types.d.ts +10 -1
  80. package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/components/draggable-line.d.ts +5 -1
  81. package/dist/packages/sdk-ui/src/dashboard/hooks/use-dashboard-header-toolbar.d.ts +0 -1
  82. package/dist/packages/sdk-ui/src/dashboard/hooks/use-edit-mode-toolbar.d.ts +0 -1
  83. package/dist/packages/sdk-ui/src/dashboard/use-dashboard-theme.d.ts +4 -0
  84. package/dist/packages/sdk-ui/src/error-boundary/error-boundary.d.ts +1 -1
  85. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +0 -1
  86. package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +0 -1
  87. package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/use-members.d.ts +1 -1
  88. package/dist/packages/sdk-ui/src/pivot-table/formatters/data-cell-formatters/index.d.ts +1 -0
  89. package/dist/packages/sdk-ui/src/pivot-table/formatters/formatter-utils.d.ts +23 -0
  90. package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +45 -2
  91. package/dist/packages/sdk-ui/src/pivot-table/formatters/utils.d.ts +1 -0
  92. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/get-pivot-table-data-point.d.ts +4 -0
  93. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/index.d.ts +1 -0
  94. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/types.d.ts +32 -0
  95. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/use-apply-pivot-table-cell-events.d.ts +18 -0
  96. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-cell-events/utils.d.ts +11 -0
  97. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-apply-pivot-table-formatting.d.ts +6 -3
  98. package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +8 -4
  99. package/dist/packages/sdk-ui/src/props.d.ts +122 -1
  100. package/dist/packages/sdk-ui/src/query/date-formats/apply-date-format.d.ts +7 -6
  101. package/dist/packages/sdk-ui/src/query/date-formats/index.d.ts +1 -1
  102. package/dist/packages/sdk-ui/src/query/execute-query.d.ts +3 -1
  103. package/dist/packages/sdk-ui/src/query-execution/index.d.ts +1 -1
  104. package/dist/packages/sdk-ui/src/query-execution/types.d.ts +9 -2
  105. package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +5 -0
  106. package/dist/packages/sdk-ui/src/types.d.ts +57 -3
  107. package/dist/packages/sdk-ui/src/utils/__development-utils__/highcharts-options-builder-collector.d.ts +61 -0
  108. package/dist/packages/sdk-ui/src/utils/__development-utils__/input-output-collector.d.ts +125 -0
  109. package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +1 -1
  110. package/dist/packages/sdk-ui/src/widget-by-id/translate-panel-color-format.d.ts +9 -0
  111. package/dist/packages/sdk-ui/src/widget-by-id/translate-statistical-models.d.ts +10 -0
  112. package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-data-options.d.ts +0 -14
  113. package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +6 -4
  114. package/dist/packages/sdk-ui/src/widget-by-id/utils.d.ts +2 -2
  115. package/dist/packages/sdk-ui/src/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -6
  116. package/dist/types-BYUVZb6u.js +80 -0
  117. package/dist/types-QUSMO7gF.cjs +1 -0
  118. package/dist/use-common-filters-DmdADAhl.cjs +350 -0
  119. package/dist/{use-common-filters-CVgB69Xe.js → use-common-filters-wo5IRF5u.js} +6326 -6441
  120. package/dist/{widget-composer-B4eAv2pf.js → widget-composer-BG4HonVl.js} +159 -239
  121. package/dist/{widget-composer-D0FZj1tX.cjs → widget-composer-CGp5yOny.cjs} +9 -9
  122. package/package.json +27 -17
  123. package/dist/derive-chart-family-BCY-GLVZ.cjs +0 -672
  124. package/dist/dimensions-DAISVpEZ.cjs +0 -1
  125. package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/axis-configuration.d.ts +0 -41
  126. package/dist/use-common-filters-CRrL9rOQ.cjs +0 -350
@@ -3,9 +3,7 @@ import { type IconButtonProps as MuiIconButtonProps } from '@mui/material/IconBu
3
3
  interface IconButtonProps extends MuiIconButtonProps {
4
4
  $hoverColor?: string;
5
5
  }
6
- declare const IconButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
7
- ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
8
- }, "loading" | "children" | "disabled" | "size" | "className" | "style" | "tabIndex" | "color" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & {
6
+ declare const IconButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "loading" | "children" | "disabled" | "size" | "className" | "style" | "tabIndex" | "color" | "sx" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge" | "loadingIndicator"> & {
9
7
  theme?: import("@emotion/react").Theme | undefined;
10
8
  } & IconButtonProps, {}, {}>;
11
9
  export default IconButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  type Props = {
3
2
  children: string | JSX.Element;
4
3
  align: 'left' | 'right';
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Node.js compatible exports for analytics-composer
3
+ *
4
+ * This module exports only the functions that work in Node.js environment
5
+ * without any browser dependencies like DOM, React components, or chart libraries.
6
+ */
7
+ export * from './types';
8
+ export * from './common/custom-superjson';
9
+ export * from './new-nlq-translator/';
@@ -20,3 +20,4 @@ export * as dashboardComposer from './dashboard/dashboard-composer';
20
20
  export * as executeQueryComposer from './execute-query/execute-query-composer';
21
21
  export * from './common/custom-superjson';
22
22
  export * from './widget/chart-options/get-widget-options';
23
+ export * from './new-nlq-translator/';
@@ -0,0 +1,26 @@
1
+ import { Filter, FilterRelations, JaqlDataSourceForDto, JSONArray, Measure } from '@sisense/sdk-data';
2
+ import { NormalizedTable } from '../types.js';
3
+ export type ParsedArg = string | number | ParsedFunctionCall | string[];
4
+ export type ParsedFunctionCall = {
5
+ function: string;
6
+ args: ParsedArg[];
7
+ };
8
+ export declare function isParsedFunctionCallArray(value: JSONArray): value is ParsedFunctionCall[];
9
+ type QueryElement = Filter | FilterRelations | Measure;
10
+ export declare function isFilterElement(arg: QueryElement): arg is Filter;
11
+ export declare function isFilterRelationsElement(arg: QueryElement): arg is FilterRelations;
12
+ export declare function isMeasureElement(arg: QueryElement): arg is Measure;
13
+ export declare function getFactoryFunctionsMap(factoryName: string, factoryObject: Record<string, any>): Record<string, (...args: any[]) => any>;
14
+ export declare const measureFactoryFunctionsMap: Record<string, (...args: any[]) => any>;
15
+ export declare const filterFactoryFunctionsMap: Record<string, (...args: any[]) => any>;
16
+ export declare function createAttribute(attributeName: string, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]): import("@sisense/sdk-data").Attribute | import("@sisense/sdk-data").LevelAttribute;
17
+ /**
18
+ * Recursively processes a parsed JSON object to execute filterFactory and measureFactory functions.
19
+ *
20
+ * @param parsedObject - The parsed JSON object representing a function call or a nested structure.
21
+ * @param dataSource - The data source to use for the query.
22
+ * @param tables - The tables to use for the query.
23
+ * @returns The result of the executed function or the processed nested structure.
24
+ */
25
+ export declare function processNode(parsedObject: ParsedFunctionCall, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]): QueryElement;
26
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './translate-query';
2
+ export * from './translate-query-to-jaql';
@@ -0,0 +1,3 @@
1
+ import { Attribute, JaqlDataSourceForDto, JSONArray } from '@sisense/sdk-data';
2
+ import { NormalizedTable } from '../types.js';
3
+ export declare const translateDimensionsJSON: (dimensionsJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Attribute[];
@@ -0,0 +1,44 @@
1
+ import { Filter, FilterRelations, JaqlDataSourceForDto, JSONArray } from '@sisense/sdk-data';
2
+ import { NormalizedTable } from '../types.js';
3
+ import { ParsedFunctionCall } from './common.js';
4
+ /**
5
+ * Translate an array of JSON objects to filters
6
+ *
7
+ * @example
8
+ * [{
9
+ * "function": "filterFactory.logic.or",
10
+ * "args": [
11
+ * {
12
+ * "function": "filterFactory.startsWith",
13
+ * "args": ["DM.Country.Country", "A"]
14
+ * },
15
+ * {
16
+ * "function": "filterFactory.measureGreaterThan",
17
+ * "args": [
18
+ * {
19
+ * "function": "measureFactory.sum",
20
+ * "args": ["DM.Commerce.Revenue", "Total Revenue"]
21
+ * },
22
+ * 1000
23
+ * ]
24
+ * }
25
+ * ]
26
+ * }]
27
+ *
28
+ * is translated to the following Filter[] or FilterRelations object:
29
+ * filterFactory.logic.or([
30
+ * filterFactory.startsWith("DM.Country.Country", "A"),
31
+ * filterFactory.measureGreaterThan(
32
+ * measureFactory.sum("DM.Commerce.Revenue", "Total Revenue"),
33
+ * 1000
34
+ * )
35
+ * ])
36
+ * @param filtersJSON - A JSON array representing the filters
37
+ * @param dataSource - The data source to use for the filters
38
+ * @param tables - The tables to use for the filters
39
+ * @returns A Filter[] or FilterRelations object
40
+ */
41
+ export declare const translateFiltersFromJSONFunctionCall: (filtersJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Filter[] | FilterRelations;
42
+ export declare const translateFiltersJSON: (filtersJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Filter[] | FilterRelations;
43
+ export declare const translateHighlightsFromJSONFunctionCall: (highlightsJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Filter[];
44
+ export declare const translateHighlightsJSON: (highlightsJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Filter[];
@@ -0,0 +1,30 @@
1
+ import { JaqlDataSourceForDto, JSONArray, Measure } from '@sisense/sdk-data';
2
+ import { NormalizedTable } from '../types.js';
3
+ import { ParsedFunctionCall } from './common.js';
4
+ /**
5
+ * Translate an array of JSON objects to measures
6
+ *
7
+ * @example
8
+ * [
9
+ * {
10
+ * "function": "measureFactory.sum",
11
+ * "args": ["DM.Commerce.Revenue", "Total Revenue"]
12
+ * },
13
+ * {
14
+ * "function": "measureFactory.sum",
15
+ * "args": ["DM.Commerce.Cost", "Total Cost"]
16
+ * }
17
+ * ]
18
+ *
19
+ * is translated to the following Measure[] object:
20
+ * [
21
+ * measureFactory.sum("DM.Commerce.Revenue", "Total Revenue"),
22
+ * measureFactory.sum("DM.Commerce.Cost", "Total Cost")
23
+ * ]
24
+ * @param measuresJSON - A JSON array representing the measures
25
+ * @param dataSource - The data source to use for the measures
26
+ * @param tables - The tables to use for the measures
27
+ * @returns A Measure[] object
28
+ */
29
+ export declare const translateMeasuresFromJSONFunctionCall: (measuresJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Measure[];
30
+ export declare const translateMeasuresJSON: (measuresJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Measure[];
@@ -0,0 +1,18 @@
1
+ import { type DataSource } from '@sisense/sdk-data';
2
+ import type { JaqlQueryPayload } from '@sisense/sdk-query-client';
3
+ import { BaseQueryParams } from '../../query-execution/types.js';
4
+ /**
5
+ * Converts BaseQueryParams to JAQL payload
6
+ *
7
+ * This is a pure TypeScript function that works in Node.js environments
8
+ * and converts query parameters to JAQL without requiring React hooks or browser APIs.
9
+ *
10
+ * Reuses the existing query preparation logic from executeQuery to avoid duplication.
11
+ *
12
+ * @param queryParams - The base query parameters from NLQ translation
13
+ * @param defaultDataSource - Default data source if not specified in queryParams
14
+ * @param shouldSkipHighlightsWithoutAttributes - Whether to skip highlights without corresponding attributes
15
+ * @returns The JAQL query payload
16
+ * @internal
17
+ */
18
+ export declare function translateQueryToJaql(queryParams: BaseQueryParams, defaultDataSource?: DataSource, shouldSkipHighlightsWithoutAttributes?: boolean): JaqlQueryPayload;
@@ -0,0 +1,224 @@
1
+ import { JaqlDataSourceForDto } from '@sisense/sdk-data';
2
+ import { NormalizedTable, NlqResponseJSON } from '../types.js';
3
+ import { BaseQueryParams } from '../../query-execution';
4
+ /**
5
+ * Translate Query JSON generated by the new NLQ API to BaseQueryParams object.
6
+ *
7
+ * @example
8
+ * {
9
+ dimensions: ['DM.Category.Category', 'DM.Brand.Brand'],
10
+ measures: [
11
+ {
12
+ function: 'measureFactory.sum',
13
+ args: ['DM.Commerce.Revenue', 'Total Revenue'],
14
+ },
15
+ {
16
+ function: 'measureFactory.sum',
17
+ args: ['DM.Commerce.Cost', 'Total Cost'],
18
+ },
19
+ ],
20
+ filters: [
21
+ {
22
+ function: 'filterFactory.members',
23
+ args: ['DM.Commerce.Date.Years', ['2024-01-01T00:00:00']],
24
+ },
25
+ {
26
+ function: 'filterFactory.topRanking',
27
+ args: [
28
+ 'DM.Brand.Brand',
29
+ {
30
+ function: 'measureFactory.sum',
31
+ args: ['DM.Commerce.Revenue', 'Total Revenue'],
32
+ },
33
+ 5,
34
+ ],
35
+ },
36
+ ],
37
+ }
38
+ *
39
+ * is translated to the following Query object:
40
+ * {
41
+ "dataSource": {
42
+ "address": "LocalHost",
43
+ "id": "localhost_aSampleIAAaECommerce",
44
+ "title": "Sample ECommerce",
45
+ "type": "elasticube",
46
+ },
47
+ "dimensions": [
48
+ {
49
+ "__serializable": "DimensionalAttribute",
50
+ "composeCode": "DM.Category.Category",
51
+ "dataSource": {
52
+ "address": "LocalHost",
53
+ "id": "localhost_aSampleIAAaECommerce",
54
+ "live": false,
55
+ "title": "Sample ECommerce",
56
+ },
57
+ "description": "",
58
+ "expression": "[Category.Category]",
59
+ "name": "Category",
60
+ "type": "text-attribute",
61
+ },
62
+ {
63
+ "__serializable": "DimensionalAttribute",
64
+ "composeCode": "DM.Brand.Brand",
65
+ "dataSource": {
66
+ "address": "LocalHost",
67
+ "id": "localhost_aSampleIAAaECommerce",
68
+ "live": false,
69
+ "title": "Sample ECommerce",
70
+ },
71
+ "description": "",
72
+ "expression": "[Brand.Brand]",
73
+ "name": "Brand",
74
+ "type": "text-attribute",
75
+ },
76
+ ],
77
+ "filters": [
78
+ {
79
+ "__serializable": "RankingFilter",
80
+ "_name": "filter",
81
+ "attribute": {
82
+ "__serializable": "DimensionalAttribute",
83
+ "composeCode": "DM.Brand.Brand",
84
+ "dataSource": {
85
+ "address": "LocalHost",
86
+ "id": "localhost_aSampleIAAaECommerce",
87
+ "live": false,
88
+ "title": "Sample ECommerce",
89
+ },
90
+ "description": "",
91
+ "expression": "[Brand.Brand]",
92
+ "name": "Brand",
93
+ "type": "text-attribute",
94
+ },
95
+ "composeCode": "filterFactory.topRanking(DM.Brand.Brand, measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue'), 5)",
96
+ "config": {
97
+ "disabled": false,
98
+ "locked": false,
99
+ },
100
+ "count": 5,
101
+ "description": "",
102
+ "filterType": "ranking",
103
+ "isScope": true,
104
+ "measure": {
105
+ "__serializable": "DimensionalBaseMeasure",
106
+ "aggregation": "sum",
107
+ "attribute": {
108
+ "__serializable": "DimensionalAttribute",
109
+ "composeCode": "DM.Commerce.Revenue",
110
+ "dataSource": {
111
+ "address": "LocalHost",
112
+ "id": "localhost_aSampleIAAaECommerce",
113
+ "live": false,
114
+ "title": "Sample ECommerce",
115
+ },
116
+ "description": "",
117
+ "expression": "[Commerce.Revenue]",
118
+ "name": "Revenue",
119
+ "type": "numeric-attribute",
120
+ },
121
+ "composeCode": "measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')",
122
+ "dataSource": undefined,
123
+ "description": "",
124
+ "name": "Total Revenue",
125
+ "sort": 0,
126
+ "type": "basemeasure",
127
+ },
128
+ "operator": "top",
129
+ "type": "filter",
130
+ },
131
+ {
132
+ "__serializable": "MembersFilter",
133
+ "_name": "filter",
134
+ "attribute": {
135
+ "__serializable": "DimensionalLevelAttribute",
136
+ "composeCode": "DM.Commerce.Date.Years",
137
+ "dataSource": {
138
+ "address": "LocalHost",
139
+ "id": "localhost_aSampleIAAaECommerce",
140
+ "live": false,
141
+ "title": "Sample ECommerce",
142
+ },
143
+ "description": "",
144
+ "expression": "[Commerce.Date]",
145
+ "format": "yyyy",
146
+ "granularity": "Years",
147
+ "name": "Date",
148
+ "type": "datelevel",
149
+ },
150
+ "composeCode": "filterFactory.members(DM.Commerce.Date.Years, ['2024-01-01T00:00:00'], { disabled: false, locked: false, excludeMembers: false, enableMultiSelection: true, deactivatedMembers: [] })",
151
+ "config": {
152
+ "deactivatedMembers": [],
153
+ "disabled": false,
154
+ "enableMultiSelection": true,
155
+ "excludeMembers": false,
156
+ "locked": false,
157
+ },
158
+ "description": "",
159
+ "filterType": "members",
160
+ "isScope": true,
161
+ "members": [
162
+ "2024-01-01T00:00:00",
163
+ ],
164
+ "type": "filter",
165
+ },
166
+ ],
167
+ "measures": [
168
+ {
169
+ "__serializable": "DimensionalBaseMeasure",
170
+ "aggregation": "sum",
171
+ "attribute": {
172
+ "__serializable": "DimensionalAttribute",
173
+ "composeCode": "DM.Commerce.Revenue",
174
+ "dataSource": {
175
+ "address": "LocalHost",
176
+ "id": "localhost_aSampleIAAaECommerce",
177
+ "live": false,
178
+ "title": "Sample ECommerce",
179
+ },
180
+ "description": "",
181
+ "expression": "[Commerce.Revenue]",
182
+ "name": "Revenue",
183
+ "type": "numeric-attribute",
184
+ },
185
+ "composeCode": "measureFactory.sum(DM.Commerce.Revenue, 'Total Revenue')",
186
+ "dataSource": undefined,
187
+ "description": "",
188
+ "name": "Total Revenue",
189
+ "sort": 0,
190
+ "type": "basemeasure",
191
+ },
192
+ {
193
+ "__serializable": "DimensionalBaseMeasure",
194
+ "aggregation": "sum",
195
+ "attribute": {
196
+ "__serializable": "DimensionalAttribute",
197
+ "composeCode": "DM.Commerce.Cost",
198
+ "dataSource": {
199
+ "address": "LocalHost",
200
+ "id": "localhost_aSampleIAAaECommerce",
201
+ "live": false,
202
+ "title": "Sample ECommerce",
203
+ },
204
+ "description": "",
205
+ "expression": "[Commerce.Cost]",
206
+ "name": "Cost",
207
+ "type": "numeric-attribute",
208
+ },
209
+ "composeCode": "measureFactory.sum(DM.Commerce.Cost, 'Total Cost')",
210
+ "dataSource": undefined,
211
+ "description": "",
212
+ "name": "Total Cost",
213
+ "sort": 0,
214
+ "type": "basemeasure",
215
+ },
216
+ ],
217
+ }
218
+ * @param queryJSON - A JSON string representing the query generated by the new NLQ API
219
+ * @param dataSource - The data source to use for the query
220
+ * @param tables - The tables to use for the query
221
+ * @returns BaseQueryParams object
222
+ * @internal
223
+ */
224
+ export declare const translateQueryJSON: (queryJSON: NlqResponseJSON, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => BaseQueryParams;
@@ -1,7 +1,7 @@
1
1
  import { WidgetProps, ChartWidgetProps, PivotTableWidgetProps } from '../props';
2
2
  import { ChartDataOptions, ChartStyleOptions } from '../types';
3
3
  import { ExecuteQueryParams, ExecutePivotQueryParams } from '../query-execution';
4
- import { MetadataItem } from '@sisense/sdk-data';
4
+ import { JSONArray, MetadataItem } from '@sisense/sdk-data';
5
5
  import { DynamicChartType } from '../chart-options-processor/translations/types.js';
6
6
  import { AnyColumn } from '../chart-data-options/types.js';
7
7
  import { DashboardProps } from '../dashboard/types.js';
@@ -289,4 +289,31 @@ export declare const isByIdDashboardCodeParams: (params: DashboardCodeParams) =>
289
289
  * @internal
290
290
  */
291
291
  export type DashboardCodeProps = Stringify<DashboardProps> & ExtraWidgetCodeProps;
292
+ /**
293
+ * @internal
294
+ */
295
+ export type NormalizedField = {
296
+ name: string;
297
+ dataType: string;
298
+ expression: string;
299
+ description?: string;
300
+ };
301
+ /**
302
+ * @internal
303
+ */
304
+ export type NormalizedTable = {
305
+ name: string;
306
+ columns: NormalizedField[];
307
+ };
308
+ /**
309
+ * Response JSON generated by the new NLQ API.
310
+ *
311
+ * @internal
312
+ */
313
+ export type NlqResponseJSON = {
314
+ dimensions: JSONArray;
315
+ measures: JSONArray;
316
+ filters: JSONArray;
317
+ highlights?: JSONArray;
318
+ };
292
319
  export {};
@@ -13,4 +13,6 @@ export type LoadDataFunction = (options: {
13
13
  /**
14
14
  * Get the load data function based on the chart type
15
15
  */
16
- export declare function getLoadDataFunction(chartType: ChartType): LoadDataFunction;
16
+ export declare function getLoadDataFunction(chartType: ChartType,
17
+ /** Indicates if the chart is a forecast or trend chart for temporal routing between legacy and restructured charts processing */
18
+ isForecastOrTrendChart: boolean): LoadDataFunction;
@@ -8,10 +8,12 @@ type UseChartDataPreparationProps = {
8
8
  data: Data;
9
9
  chartDataOptions: ChartDataOptionsInternal;
10
10
  chartType: ChartType;
11
+ /** Indicates if the chart is a forecast or trend chart for temporal routing between legacy and restructured charts processing */
12
+ isForecastOrTrendChart: boolean;
11
13
  attributes: Attribute[];
12
14
  measures: Measure[];
13
15
  dataColumnNamesMapping: DataColumnNamesMapping;
14
16
  onDataReady?: (data: Data) => Data;
15
17
  };
16
- export declare function useChartDataPreparation({ dataSet, data, chartDataOptions, chartType, attributes, measures, dataColumnNamesMapping, onDataReady, }: UseChartDataPreparationProps): ChartData | null;
18
+ export declare function useChartDataPreparation({ dataSet, data, chartDataOptions, chartType, isForecastOrTrendChart, attributes, measures, dataColumnNamesMapping, onDataReady, }: UseChartDataPreparationProps): ChartData | null;
17
19
  export {};
@@ -1,5 +1,5 @@
1
1
  import { ChartDataOptions, ChartType } from '../../types';
2
- export declare const useTranslatedDataOptions: (chartDataOptions: ChartDataOptions, chartType: ChartType) => {
2
+ export declare const useTranslatedDataOptions: (chartDataOptions: ChartDataOptions, chartType: ChartType, isForecastOrTrendChart: boolean) => {
3
3
  dataOptions: import("../..").ChartDataOptionsInternal;
4
4
  attributes: import("@sisense/sdk-data").Attribute[];
5
5
  measures: import("@sisense/sdk-data").Measure[];
@@ -0,0 +1,5 @@
1
+ import { BuildContext } from '../../../types';
2
+ import { CartesianChartTypes } from '../../types';
3
+ import { AxisSettings } from '../../../../../../chart-options-processor/translations/axis-section';
4
+ import { XAxisOrientation } from '../../../../../../chart-options-processor/cartesian/utils/axis/axis-builders';
5
+ export declare const getCartesianXAxis: (ctx: BuildContext<CartesianChartTypes>, orientation: XAxisOrientation) => AxisSettings[];
@@ -0,0 +1,28 @@
1
+ import { BuildContext } from '../../../types';
2
+ import { CartesianChartTypes } from '../../types';
3
+ import { AxisSettings } from '../../../../../../chart-options-processor/translations/axis-section';
4
+ /**
5
+ * Creates basic Y-axis settings for cartesian charts with data-driven min/max calculation.
6
+ * This function provides the foundation Y-axis configuration that can be enhanced
7
+ * by chart-specific transformers later using functional programming patterns.
8
+ *
9
+ * The function always calculates min/max values from chart data, ensuring proper
10
+ * scaling for all chart types. User-provided min/max values are handled separately
11
+ * in the final axis settings, following the legacy behavior pattern.
12
+ *
13
+ * @param ctx - Build context containing chart data, options, and configuration
14
+ * @param chartType - The specific chart type for min/max calculations
15
+ * @returns Basic Y-axis settings array that can be enhanced by chart-specific transformers
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * // Basic usage
20
+ * const basicYAxis = getBasicYAxisSettings(ctx, 'line');
21
+ *
22
+ * // Enhanced with chart-specific transformers
23
+ * const enhancedYAxis = flow(
24
+ * withStacking(ctx, 'bar'),
25
+ * )(basicYAxis);
26
+ * ```
27
+ */
28
+ export declare const getBasicYAxisSettings: (ctx: BuildContext<CartesianChartTypes>, chartType: CartesianChartTypes) => AxisSettings[];
@@ -0,0 +1,12 @@
1
+ import { CartesianChartDataOptionsInternal } from '../../../../../../chart-data-options/types';
2
+ import { LineChartDesignOptions } from '../../../../../../chart-options-processor/translations/design-options';
3
+ import { ChartStyleOptions, LineStyleOptions } from '../../../../../../types';
4
+ /**
5
+ * Translates LineStyleOptions to LineChartDesignOptions using functional composition
6
+ */
7
+ export declare function translateLineStyleOptionsToDesignOptions(styleOptions: LineStyleOptions, dataOptionsInternal: CartesianChartDataOptionsInternal): LineChartDesignOptions;
8
+ /**
9
+ * Type guard to check if chart style options are valid for line charts
10
+ * Uses functional approach without mutations
11
+ */
12
+ export declare function isLineStyleOptions(styleOptions: ChartStyleOptions): styleOptions is LineStyleOptions;
@@ -0,0 +1,6 @@
1
+ import { AxisSettings } from '../../../../../../chart-options-processor/translations/axis-section';
2
+ import { BuildContext } from '../../../types';
3
+ export declare const getAxes: (ctx: BuildContext<'line'>) => {
4
+ xAxis: AxisSettings[];
5
+ yAxis: AxisSettings[];
6
+ };
@@ -0,0 +1,2 @@
1
+ import { HighchartsOptionsBuilder } from '../../types';
2
+ export declare const lineHighchartsOptionsBuilder: HighchartsOptionsBuilder<'line'>;
@@ -0,0 +1,2 @@
1
+ import { ChartBuilder } from '../../../types.js';
2
+ export declare const lineChartBuilder: ChartBuilder<'line'>;
@@ -0,0 +1,10 @@
1
+ import { loadDataBySingleQuery } from '../../../../helpers/data-loading';
2
+ import { getCartesianChartData } from '../../helpers/data';
3
+ /**
4
+ * Data translators for polar charts.
5
+ * Polar charts use the same data loading and processing as cartesian charts.
6
+ */
7
+ export declare const dataTranslators: {
8
+ loadData: typeof loadDataBySingleQuery;
9
+ getChartData: typeof getCartesianChartData;
10
+ };
@@ -0,0 +1,12 @@
1
+ import { getCartesianAttributes, getCartesianMeasures, isCartesianChartDataOptions, isCartesianChartDataOptionsInternal } from '../../helpers/data-options';
2
+ /**
3
+ * Data options translators for polar charts.
4
+ * Polar charts use the same data structure as cartesian charts.
5
+ */
6
+ export declare const dataOptionsTranslators: {
7
+ translateDataOptionsToInternal: (dataOptions: import("../../../../../..").CartesianChartDataOptions) => import("../../../../../..").CartesianChartDataOptionsInternal;
8
+ getAttributes: typeof getCartesianAttributes;
9
+ getMeasures: typeof getCartesianMeasures;
10
+ isCorrectDataOptions: typeof isCartesianChartDataOptions;
11
+ isCorrectDataOptionsInternal: typeof isCartesianChartDataOptionsInternal;
12
+ };
@@ -0,0 +1,18 @@
1
+ import { CartesianChartDataOptionsInternal } from '../../../../../../chart-data-options/types';
2
+ import { PolarChartDesignOptions } from '../../../../../../chart-options-processor/translations/design-options';
3
+ import { ChartStyleOptions, PolarStyleOptions } from '../../../../../../types';
4
+ /**
5
+ * Translates style options to design options for polar charts.
6
+ */
7
+ export declare function translateStyleOptionsToDesignOptions(styleOptions: PolarStyleOptions, dataOptionsInternal: CartesianChartDataOptionsInternal): PolarChartDesignOptions;
8
+ /**
9
+ * Checks if the style options are correct for polar charts.
10
+ */
11
+ export declare function isCorrectStyleOptions(styleOptions: ChartStyleOptions): styleOptions is PolarStyleOptions;
12
+ /**
13
+ * Design options translators for polar charts.
14
+ */
15
+ export declare const designOptionsTranslators: {
16
+ translateStyleOptionsToDesignOptions: typeof translateStyleOptionsToDesignOptions;
17
+ isCorrectStyleOptions: typeof isCorrectStyleOptions;
18
+ };
@@ -0,0 +1,6 @@
1
+ import { AxisSettings } from '../../../../../../chart-options-processor/translations/axis-section';
2
+ import { BuildContext } from '../../../types';
3
+ export declare function getAxes(ctx: BuildContext<'polar'>): {
4
+ xAxis: AxisSettings[];
5
+ yAxis: AxisSettings[];
6
+ };
@@ -0,0 +1,2 @@
1
+ import { HighchartsOptionsBuilder } from '../../../types';
2
+ export declare const polarHighchartsOptionsBuilder: HighchartsOptionsBuilder<'polar'>;
@@ -0,0 +1,2 @@
1
+ import { ChartBuilder } from '../../../types';
2
+ export declare const polarChartBuilder: ChartBuilder<'polar'>;
@@ -0,0 +1,2 @@
1
+ import { ChartBuilder } from '../../../../types.js';
2
+ export declare const areaChartBuilder: ChartBuilder<'area'>;
@@ -0,0 +1,12 @@
1
+ import { CartesianChartDataOptionsInternal } from '../../../../../../../chart-data-options/types';
2
+ import { AreaChartDesignOptions } from '../../../../../../../chart-options-processor/translations/design-options';
3
+ import { AreaStyleOptions, ChartStyleOptions } from '../../../../../../../types';
4
+ /**
5
+ * Translates AreaStyleOptions to AreaChartDesignOptions using functional composition
6
+ */
7
+ export declare function translateAreaStyleOptionsToDesignOptions(styleOptions: AreaStyleOptions, dataOptionsInternal: CartesianChartDataOptionsInternal): AreaChartDesignOptions;
8
+ /**
9
+ * Type guard to check if chart style options are valid for area charts
10
+ * Uses functional approach without mutations
11
+ */
12
+ export declare function isAreaStyleOptions(styleOptions: ChartStyleOptions): styleOptions is AreaStyleOptions;
@@ -0,0 +1,6 @@
1
+ import { AxisSettings } from '../../../../../../../chart-options-processor/translations/axis-section';
2
+ import { BuildContext } from '../../../../types';
3
+ export declare const getAxes: (ctx: BuildContext<'area'>) => {
4
+ xAxis: AxisSettings[];
5
+ yAxis: AxisSettings[];
6
+ };
@@ -0,0 +1,2 @@
1
+ import { HighchartsOptionsBuilder } from '../../../../types';
2
+ export declare const areaHighchartsOptionsBuilder: HighchartsOptionsBuilder<'area'>;
@@ -0,0 +1,8 @@
1
+ import { StackableChartDesignOptions } from '../../../../../../../chart-options-processor/translations/design-options';
2
+ /**
3
+ * Calculate spacing for area chart total labels based on rotation.
4
+ */
5
+ export declare function getAreaChartSpacingForTotalLabels(chartDesignOptions: StackableChartDesignOptions): {
6
+ rightSpacing: number;
7
+ topSpacing: number;
8
+ };