@sisense/sdk-ui 2.27.0 → 2.28.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 +1322 -1021
- package/dist/analytics-composer.cjs +73 -73
- package/dist/analytics-composer.js +22 -17
- package/dist/{apply-styled-options-to-query-k10gkPCG.cjs → apply-styled-options-to-query-23D9br-S.cjs} +1 -1
- package/dist/{apply-styled-options-to-query-BzMAmDnD.js → apply-styled-options-to-query-BagjzMqm.js} +835 -822
- package/dist/{dimensions-C3WSSE5j.js → dimensions-Bn1EaWiP.js} +1 -1
- package/dist/{dimensions-huCJK0y6.cjs → dimensions-D8r34WRI.cjs} +1 -1
- 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 +298 -298
- package/dist/index.js +11807 -11687
- package/dist/index.umd.js +663 -664
- 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 +2 -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/use-dashboard-model/dashboard-model-reducer/persist-dashboard-model-middleware.d.ts +2 -2
- 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/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/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-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/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 +9 -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 +0 -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 +3 -3
- 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-with-excel-download-menu-item.d.ts +21 -0
- package/dist/packages/sdk-ui/src/domains/widgets/shared/widget-style-utils.d.ts +2 -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/widget-model-translator.d.ts +3 -3
- package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +7 -0
- package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +25 -6
- 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/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/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 +5 -1
- package/dist/packages/sdk-ui/src/modules/analytics-composer/nlq-v3-translator/shared/data-options/adapters.d.ts +0 -3
- 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 +131 -2
- 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 +20 -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 +6 -5
- 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 +11 -2
- package/dist/packages/sdk-ui/src/public-api/internal.d.ts +1 -1
- package/dist/packages/sdk-ui/src/public-api/public.d.ts +2 -1
- package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +1 -1
- package/dist/packages/sdk-ui/src/shared/components/loading-indicator.d.ts +2 -2
- 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-Cq47e5cy.cjs → types-CzgBH2kL.cjs} +1 -1
- package/dist/{types-CzqDZ83C.js → types-D3fPN43o.js} +1 -1
- package/dist/{use-hover-CkmV6eu9.js → use-hover-B6VmMb06.js} +10428 -10063
- package/dist/{use-hover-D_mBUhp9.cjs → use-hover-CaSOzp0i.cjs} +128 -129
- package/dist/{utils-DM5vp1gw.cjs → utils-BwGnDoB0.cjs} +3 -3
- package/dist/{utils-Db3U6oHa.js → utils-CsV-iYtb.js} +3 -3
- package/dist/{widget-composer-BiGVKN49.js → widget-composer-Bv_OVu1o.js} +258 -206
- package/dist/{widget-composer-CZ0_bPXK.cjs → widget-composer-C72Io-3c.cjs} +7 -7
- package/package.json +10 -8
|
@@ -10,7 +10,7 @@ import { WidgetDto } from '../../../../domains/widgets/components/widget-by-id/t
|
|
|
10
10
|
import { WidgetProps } from '../../../../domains/widgets/components/widget/types';
|
|
11
11
|
import { AppSettings } from '../../../../infra/app/settings/settings.js';
|
|
12
12
|
import { ChartProps, PivotTableProps, TableProps } from '../../../../props';
|
|
13
|
-
import {
|
|
13
|
+
import { CompleteThemeSettingsInternal } from '../../../../types.js';
|
|
14
14
|
import { WidgetModel } from '../widget-model';
|
|
15
15
|
/**
|
|
16
16
|
* Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
|
|
@@ -160,7 +160,7 @@ export declare function toJtdConfig(widgetModel: WidgetModel): JumpToDashboardCo
|
|
|
160
160
|
* @returns The widget model
|
|
161
161
|
* @internal
|
|
162
162
|
*/
|
|
163
|
-
export declare function fromWidgetDto(widgetDto: WidgetDto, themeSettings?:
|
|
163
|
+
export declare function fromWidgetDto(widgetDto: WidgetDto, themeSettings?: CompleteThemeSettingsInternal, appSettings?: AppSettings): WidgetModel;
|
|
164
164
|
/**
|
|
165
165
|
* Creates a {@link WidgetModel} from a {@link ChartWidgetProps}.
|
|
166
166
|
*
|
|
@@ -212,4 +212,4 @@ export declare function fromWidgetProps(widgetProps: WidgetProps): WidgetModel;
|
|
|
212
212
|
*
|
|
213
213
|
* @sisenseInternal
|
|
214
214
|
*/
|
|
215
|
-
export declare function toWidgetDto(widgetModel: WidgetModel, dataSource?: JaqlDataSourceForDto, themeSettings?:
|
|
215
|
+
export declare function toWidgetDto(widgetModel: WidgetModel, dataSource?: JaqlDataSourceForDto, themeSettings?: CompleteThemeSettingsInternal, appSettings?: AppSettings): WidgetDto;
|
|
@@ -123,6 +123,13 @@ export declare class RestApi {
|
|
|
123
123
|
count?: number;
|
|
124
124
|
searchValue?: string;
|
|
125
125
|
}) => Promise<DataSourceField[] | undefined>;
|
|
126
|
+
/**
|
|
127
|
+
* Export JAQL query results as an XLSX file (binary response).
|
|
128
|
+
*
|
|
129
|
+
* @param body - JSON payload for the JAQL export API
|
|
130
|
+
* @returns XLSX file as a {@link Blob}
|
|
131
|
+
*/
|
|
132
|
+
exportJaqlToXlsx: (body: object) => Promise<Blob | undefined>;
|
|
126
133
|
}
|
|
127
134
|
export declare const useRestApi: () => {
|
|
128
135
|
restApi: RestApi | undefined;
|
|
@@ -2,18 +2,35 @@ import { HttpClient } from '@sisense/sdk-rest-client';
|
|
|
2
2
|
import { AppConfig, ThemeSettings } from '../../../types';
|
|
3
3
|
import { LegacyDesignSettings } from '../../themes/legacy-design-settings.js';
|
|
4
4
|
import { FeatureMap } from './types/features.js';
|
|
5
|
+
/**
|
|
6
|
+
* Known AI feature flags exposed on {@link AppSettings} `ai.featureFlags`.
|
|
7
|
+
* Add a flag here when you want first-class typing/autocomplete for it; otherwise
|
|
8
|
+
* it still surfaces via the index signature on {@link AiFeatureFlags}.
|
|
9
|
+
*/
|
|
10
|
+
type KnownAiFeatureFlags = {
|
|
11
|
+
completionV2: boolean;
|
|
12
|
+
naturalResponseEnabled: boolean;
|
|
13
|
+
nlqV3Enabled: boolean;
|
|
14
|
+
queryDefinition: boolean;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Loose, forward-compatible shape of `ai.featureFlags`. Known flags are strongly typed
|
|
18
|
+
* (see {@link KnownAiFeatureFlags}); arbitrary string-keyed flags are type-allowed
|
|
19
|
+
* for forward compatibility (unknown keys are readable as `boolean | undefined`)
|
|
20
|
+
* without requiring a CSDK type bump.
|
|
21
|
+
*
|
|
22
|
+
* @sisenseInternal
|
|
23
|
+
*/
|
|
24
|
+
export type AiFeatureFlags = KnownAiFeatureFlags & {
|
|
25
|
+
[flag: string]: boolean | undefined;
|
|
26
|
+
};
|
|
5
27
|
/**
|
|
6
28
|
* AI-related slice derived from globals (`serverFeatures` + deployment props),
|
|
7
29
|
* aligned with admin UI paths such as `ai.featureFlags.*`, `ai.featureModelType`,
|
|
8
30
|
* `ai.quotaNotification`, and `ai.aiStudio.*`.
|
|
9
31
|
*/
|
|
10
32
|
type AiSettingsSlice = {
|
|
11
|
-
featureFlags:
|
|
12
|
-
completionV2: boolean;
|
|
13
|
-
naturalResponseEnabled: boolean;
|
|
14
|
-
nlqV3Enabled: boolean;
|
|
15
|
-
queryDefinition: boolean;
|
|
16
|
-
};
|
|
33
|
+
featureFlags: AiFeatureFlags;
|
|
17
34
|
/**
|
|
18
35
|
* Only when `serverFeatures.aiAssistant` exists.
|
|
19
36
|
* If the block is present but omits this field, defaults to `customer_byok`.
|
|
@@ -112,6 +129,8 @@ type ServerSettings = {
|
|
|
112
129
|
lastName?: string;
|
|
113
130
|
/** From `api/globals` `user.email`. */
|
|
114
131
|
email?: string;
|
|
132
|
+
/** From `api/globals` `user.baseRoleName`. */
|
|
133
|
+
baseRoleName?: string;
|
|
115
134
|
};
|
|
116
135
|
/**
|
|
117
136
|
* Raw Fusion `designSettings` from `api/globals` (before palette / theme conversion).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { CompleteThemeSettingsInternal, CustomContextProviderProps } from '../../../types';
|
|
3
3
|
/** @internal */
|
|
4
4
|
export type CustomThemeProviderProps = CustomContextProviderProps<{
|
|
5
|
-
themeSettings:
|
|
5
|
+
themeSettings: CompleteThemeSettingsInternal;
|
|
6
6
|
skipTracking?: boolean;
|
|
7
7
|
}>;
|
|
8
8
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompleteThemeSettingsInternal } from '../../../types';
|
|
2
2
|
export declare const DEFAULT_DIVIDER_COLOR = "#F2F2F2";
|
|
3
3
|
export declare const DEFAULT_DIVIDER_WIDTH = 4;
|
|
4
4
|
export declare const DEFAULT_DASHBOARD_BORDER_COLOR = "#D5D5D5";
|
|
@@ -19,4 +19,4 @@ export declare const DEFAULT_HYPERLINK_HOVER_COLOR = "#1FCCF3";
|
|
|
19
19
|
* @returns Theme settings object
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
export declare const getDefaultThemeSettings: (isDarkMode?: boolean) =>
|
|
22
|
+
export declare const getDefaultThemeSettings: (isDarkMode?: boolean) => CompleteThemeSettingsInternal;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { CompleteThemeSettingsInternal, ThemeConfig } from '../../../types';
|
|
3
3
|
export declare const ThemeContext: import("react").Context<{
|
|
4
|
-
themeSettings:
|
|
4
|
+
themeSettings: CompleteThemeSettingsInternal;
|
|
5
5
|
config?: ThemeConfig | undefined;
|
|
6
6
|
}>;
|
|
7
7
|
/**
|
|
@@ -12,6 +12,6 @@ export declare const ThemeContext: import("react").Context<{
|
|
|
12
12
|
* @sisenseInternal
|
|
13
13
|
*/
|
|
14
14
|
export declare const useThemeContext: () => {
|
|
15
|
-
themeSettings:
|
|
15
|
+
themeSettings: CompleteThemeSettingsInternal;
|
|
16
16
|
config?: ThemeConfig | undefined;
|
|
17
17
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompleteThemeSettingsInternal } from '../../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Themable interface for styled components that require theme settings.
|
|
4
4
|
*/
|
|
5
5
|
export type Themable = {
|
|
6
|
-
theme:
|
|
6
|
+
theme: CompleteThemeSettingsInternal;
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompleteThemeSettingsInternal, ThemeOid, ThemeSettings } from '../../../types';
|
|
2
2
|
/**
|
|
3
3
|
* Returns the theme settings for the given theme OID or theme settings and error if it happened.
|
|
4
4
|
*
|
|
@@ -9,4 +9,4 @@ import { CompleteThemeSettings, ThemeOid, ThemeSettings } from '../../../types';
|
|
|
9
9
|
* @param userTheme Theme OID or theme settings object
|
|
10
10
|
* @returns Theme settings and error if it happened
|
|
11
11
|
*/
|
|
12
|
-
export declare function useThemeSettings(userTheme?: ThemeOid | ThemeSettings): [
|
|
12
|
+
export declare function useThemeSettings(userTheme?: ThemeOid | ThemeSettings): [CompleteThemeSettingsInternal, null] | [null, Error];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CompleteThemeSettings } from '../../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns the resolved theme from the nearest {@link ThemeProvider}.
|
|
4
|
+
* Falls back to the default theme when no provider is present.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const { palette, typography, widget } = useTheme();
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* @returns Resolved {@link CompleteThemeSettings}
|
|
12
|
+
* @group Contexts
|
|
13
|
+
*/
|
|
14
|
+
export declare const useTheme: () => CompleteThemeSettings;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompleteThemeSettingsInternal, ThemeOid } from '../../types.js';
|
|
2
2
|
/**
|
|
3
|
-
* Legacy analog of
|
|
3
|
+
* Legacy analog of CompleteThemeSettingsInternal used in Sisense UI.
|
|
4
4
|
*/
|
|
5
5
|
export type LegacyDesignSettings = {
|
|
6
6
|
oid: ThemeOid;
|
|
@@ -88,11 +88,11 @@ export declare const LEGACY_DESIGN_TYPES: {
|
|
|
88
88
|
dark: string;
|
|
89
89
|
};
|
|
90
90
|
/**
|
|
91
|
-
* Converts legacy (used in Sisense UI) design settings and
|
|
91
|
+
* Converts legacy (used in Sisense UI) design settings and its palette object to CompleteThemeSettingsInternal.
|
|
92
92
|
*
|
|
93
93
|
* @param legacyDesignSettings - legacy design settings.
|
|
94
94
|
* @param legacyPalette - legacy palette object.
|
|
95
95
|
* @returns
|
|
96
96
|
*/
|
|
97
|
-
export declare function convertToThemeSettings(legacyDesignSettings: LegacyDesignSettings, legacyPalette: LegacyPalette, domainUrl: string):
|
|
97
|
+
export declare function convertToThemeSettings(legacyDesignSettings: LegacyDesignSettings, legacyPalette: LegacyPalette, domainUrl: string): CompleteThemeSettingsInternal;
|
|
98
98
|
export declare function getPaletteName(legacyDesignSettings: LegacyDesignSettings): string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CompleteThemeSettingsInternal, ThemeOid } from '../../types';
|
|
3
3
|
import { type LegacyPalette } from './legacy-design-settings';
|
|
4
4
|
/**
|
|
5
|
-
* Fetches theme settings from the Sisense instance and converts them to
|
|
5
|
+
* Fetches theme settings from the Sisense instance and converts them to CompleteThemeSettingsInternal.
|
|
6
6
|
*
|
|
7
7
|
* @param themeOid - Theme oid.
|
|
8
8
|
* @param httpClient - Sisense REST API client.
|
|
9
|
-
* @returns
|
|
9
|
+
* @returns CompleteThemeSettingsInternal from server.
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
|
-
export declare function getThemeSettingsByOid(themeOid: ThemeOid, httpClient: Pick<HttpClient, 'get' | 'url'>): Promise<
|
|
12
|
+
export declare function getThemeSettingsByOid(themeOid: ThemeOid, httpClient: Pick<HttpClient, 'get' | 'url'>): Promise<CompleteThemeSettingsInternal>;
|
|
13
13
|
export declare function getLegacyPalette(paletteName: string, httpClient: Pick<HttpClient, 'get'>): Promise<LegacyPalette>;
|
|
@@ -232,6 +232,9 @@ export declare const resources: {
|
|
|
232
232
|
distributeEqualWidth: string;
|
|
233
233
|
download: string;
|
|
234
234
|
csvFile: string;
|
|
235
|
+
excelFile: string;
|
|
236
|
+
repeatRowsRecommended: string;
|
|
237
|
+
mergeRows: string;
|
|
235
238
|
};
|
|
236
239
|
};
|
|
237
240
|
customWidgets: {
|
|
@@ -681,6 +684,9 @@ export declare const resources: {
|
|
|
681
684
|
distributeEqualWidth: string;
|
|
682
685
|
download: string;
|
|
683
686
|
csvFile: string;
|
|
687
|
+
excelFile: string;
|
|
688
|
+
repeatRowsRecommended: string;
|
|
689
|
+
mergeRows: string;
|
|
684
690
|
};
|
|
685
691
|
};
|
|
686
692
|
customWidgets: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CompleteThemeSettingsInternal } from '../..';
|
|
2
2
|
export default function AiDisclaimer({ theme }: {
|
|
3
|
-
theme:
|
|
3
|
+
theme: CompleteThemeSettingsInternal;
|
|
4
4
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DashboardProps } from '../../../../domains/dashboarding/types.js';
|
|
2
|
+
import type { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import type { DashboardInput } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates NLQ DashboardJSON format to CSDK DashboardProps.
|
|
6
|
+
* Direction: JSON → CSDK
|
|
7
|
+
*
|
|
8
|
+
* Translates each widget using `translateWidgetFromJSON` (which requires each widget JSON to
|
|
9
|
+
* have an `id`). Dashboard-level filters are translated using the shared filter translator.
|
|
10
|
+
*
|
|
11
|
+
* Translation fails if any widget or filter translation fails.
|
|
12
|
+
*
|
|
13
|
+
* @param input - DashboardInput containing dashboardJSON and data schema context
|
|
14
|
+
* @returns NlqTranslationResult with DashboardProps or errors
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export declare const translateDashboardFromJSON: (input: DashboardInput) => NlqTranslationResult<DashboardProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DashboardProps } from '../../../../domains/dashboarding/types.js';
|
|
2
|
+
import type { NlqTranslationResult } from '../../types.js';
|
|
3
|
+
import type { DashboardJSON } from '../types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Translates CSDK DashboardProps to NLQ DashboardJSON format.
|
|
6
|
+
* Direction: CSDK → JSON
|
|
7
|
+
*
|
|
8
|
+
* Translates each widget using `translateWidgetToJSON` and dashboard-level filters using
|
|
9
|
+
* the shared filter translator. Translation fails if any widget or filter translation fails.
|
|
10
|
+
*
|
|
11
|
+
* @param dashboardProps - Dashboard props to serialize
|
|
12
|
+
* @returns NlqTranslationResult with DashboardJSON or errors
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
export declare const translateDashboardToJSON: (dashboardProps: DashboardProps) => NlqTranslationResult<DashboardJSON>;
|
|
@@ -4,5 +4,9 @@ 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 type { ChartJSON, DataOptionsJSON, ChartInput, PivotTableJSON, PivotTableDataOptionsJSON, PivotTableInput, } from './types.js';
|
|
12
|
+
export type { ChartJSON, DataOptionsJSON, ChartInput, DataSourceJSON, PivotTableJSON, PivotTableDataOptionsJSON, PivotTableInput, ChartWidgetJSON, PivotTableWidgetJSON, TextWidgetJSON, CustomWidgetJSON, WidgetJSON, WidgetInput, SpecificWidgetOptionsJSON, WidgetsOptionsJSON, DashboardJSON, DashboardInput, } from './types.js';
|
|
@@ -13,7 +13,4 @@ export type AxisType = 'dimension' | 'measure';
|
|
|
13
13
|
export declare function adaptDimensionsToStyledColumn(items: DimensionTranslationItem[]): (Attribute | StyledColumn)[];
|
|
14
14
|
export declare function adaptMeasuresToStyledMeasureColumn(items: MeasureTranslationItem[]): (Measure | StyledMeasureColumn)[];
|
|
15
15
|
export declare function toJSONArray(value: DimensionItemJSON | DimensionItemJSON[] | MeasureItemJSON | MeasureItemJSON[]): JSONArray;
|
|
16
|
-
/**
|
|
17
|
-
* Maps inner translation errors to dataOptions axis context.
|
|
18
|
-
*/
|
|
19
16
|
export declare function withAxisContext(axisKey: string): (e: NlqTranslationError) => NlqTranslationError;
|
|
@@ -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 {};
|