@sisense/sdk-ui 1.31.0 → 1.33.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 +22 -423
- package/dist/ai.js +1827 -1781
- package/dist/analytics-composer.cjs +54 -54
- package/dist/analytics-composer.js +546 -525
- package/dist/derive-chart-family-B4sA-ao-.cjs +758 -0
- package/dist/derive-chart-family-nTKwlMms.js +101063 -0
- package/dist/index.cjs +30 -858
- package/dist/index.js +14249 -10959
- package/dist/packages/sdk-ui/src/ai/ai-context-provider.d.ts +3 -2
- package/dist/packages/sdk-ui/src/ai/api/chat-rest-api.d.ts +1 -3
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +12 -3
- package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +2 -2
- package/dist/packages/sdk-ui/src/ai/chatbot.d.ts +2 -2
- package/dist/packages/sdk-ui/src/ai/custom-ai-context-provider.d.ts +13 -0
- package/dist/packages/sdk-ui/src/ai/index.d.ts +7 -4
- package/dist/packages/sdk-ui/src/ai/use-get-nlg-insights.d.ts +2 -0
- package/dist/packages/sdk-ui/src/ai/use-get-nlq-result.d.ts +12 -5
- package/dist/packages/sdk-ui/src/ai/use-get-query-recommendations.d.ts +8 -4
- package/dist/packages/sdk-ui/src/ai/use-last-nlq-response-from-history.d.ts +8 -0
- package/dist/packages/sdk-ui/src/ai/use-last-nlq-response.d.ts +1 -2
- package/dist/packages/sdk-ui/src/analytics-composer/common/constants.d.ts +1 -0
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +12 -1
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +15 -0
- package/dist/packages/sdk-ui/src/area-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/bar-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart/helpers/get-load-data-function.d.ts +16 -0
- package/dist/packages/sdk-ui/src/chart/helpers/use-chart-data-preparation.d.ts +17 -0
- package/dist/packages/sdk-ui/src/chart/helpers/use-synced-data.d.ts +3 -1
- package/dist/packages/sdk-ui/src/chart/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/areamap-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data/areamap-data.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data/geo-data-coloring-function.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data-options/data-options.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/design-options/design-options.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/design-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/areamap-map.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/renderer/areamap-utils.d.ts +12 -0
- package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/areamap.d.ts +5 -5
- package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/feature-styles-dictionary.d.ts +2 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/renderer/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/use-geo-json.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/types.d.ts +35 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/bar-chart/bar-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/chart-builder-factory.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/column-chart/column-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/cartesians/data-options.d.ts +27 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/cartesians/data.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/cartesians/stackable/design-options.d.ts +5 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/data-loading.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +100 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/utils.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart-data/types.d.ts +3 -29
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +6 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +9 -8
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +1 -7
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +2 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +2 -1
- package/dist/packages/sdk-ui/src/column-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/group-header.d.ts +10 -0
- package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/group.d.ts +10 -0
- package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/grouped-items-browser.d.ts +6 -0
- package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/item-row.d.ts +15 -0
- package/dist/packages/sdk-ui/src/common/components/grouped-items-browser/types.d.ts +40 -0
- package/dist/packages/sdk-ui/src/common/components/loading-dots.d.ts +1 -1
- package/dist/packages/sdk-ui/src/common/components/popover.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/components/radio.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-data-accumulation.d.ts +7 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-get-load-more-function.d.ts +4 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-load-data-from-internal-hook.d.ts +16 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/hooks/use-manage-slice-to-load.d.ts +10 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/calculate-if-all-items-loaded.d.ts +2 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/get-hook-state-result.d.ts +9 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/helpers/utils/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/types.d.ts +27 -0
- package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/with-lazy-loading.d.ts +7 -0
- package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts +17 -0
- package/dist/packages/sdk-ui/src/common/hooks/use-defaults.d.ts +9 -0
- package/dist/packages/sdk-ui/src/common/hooks/use-last-defined.d.ts +6 -0
- package/dist/packages/sdk-ui/src/common/icons/approval-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/icons/arrow-icon.d.ts +3 -0
- package/dist/packages/sdk-ui/src/common/icons/breadcrumbs-arrows-arrow-icon.d.ts +3 -0
- package/dist/packages/sdk-ui/src/common/icons/close-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/icons/date-attribute-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/icons/elasticube-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/icons/numeric-attribute-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/icons/plus-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/icons/table-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/common/icons/text-attribute-icon.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/components/content-panel.d.ts +8 -1
- package/dist/packages/sdk-ui/src/dashboard/components/dashboard-container.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/constants.d.ts +4 -0
- package/dist/packages/sdk-ui/src/dashboard/dashboard-helpers.d.ts +6 -6
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-tabber.d.ts +18 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-widgets-layout.d.ts +14 -0
- package/dist/packages/sdk-ui/src/dashboard/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +68 -32
- package/dist/packages/sdk-ui/src/dashboard/use-composed-dashboard.d.ts +7 -2
- package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-data-browser.d.ts +9 -0
- package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/add-filter-popover.d.ts +14 -0
- package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/data-browser/add-filter-popover/popover-header.d.ts +12 -0
- package/dist/packages/sdk-ui/src/data-browser/data-source-selector/data-source-selector.d.ts +7 -0
- package/dist/packages/sdk-ui/src/data-browser/data-source-selector/use-data-source-selection.d.ts +5 -0
- package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/dimensions-browser.d.ts +6 -0
- package/dist/packages/sdk-ui/src/data-browser/dimensions-browser/types.d.ts +74 -0
- package/dist/packages/sdk-ui/src/data-browser/search-input/search-input.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/common/checkbox.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +8 -7
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-filter/date-range-calculator.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +3 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/input.d.ts +5 -2
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/search-input.d.ts +4 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/base.d.ts +11 -7
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/calendar-select.d.ts +24 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/types.d.ts +14 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/calendar-select/utils.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/members-list-select.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-multi-select.d.ts +3 -4
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/searchable-single-select.d.ts +17 -4
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/select/single-select.d.ts +3 -2
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/common/selectable-section.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-container.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-context.d.ts +13 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-datetime.d.ts +9 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-numerical.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-popover.d.ts +6 -2
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor-textual.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/filter-editor.d.ts +6 -2
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-datetime-formatter.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/hooks/use-get-attribute-stats.d.ts +4 -2
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/common/granularities.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-condition-section/condition-forms/datetime-exclude-condition-form.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-condition-section/condition-forms/datetime-is-within-condition-form.d.ts +10 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-condition-section/datetime-condition-section.d.ts +12 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-condition-section/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-members-section.d.ts +12 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-range-section.d.ts +11 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/datetime-relative-section.d.ts +9 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/members-section.d.ts +0 -5
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/not-supported-section.d.ts +6 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/numeric-condition-section/numeric-condition-section.d.ts +1 -6
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/text-condition-section.d.ts +1 -3
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/types.d.ts +4 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/sections/utils.d.ts +5 -2
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/types.d.ts +5 -0
- package/dist/packages/sdk-ui/src/filters/components/filter-editor-popover/utils.d.ts +13 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-tile-container.d.ts +7 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/constants.d.ts +6 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel-header.d.ts +6 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel.d.ts +5 -2
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-existing-filter-editing.d.ts +19 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/hooks/use-new-filter-adding.d.ts +19 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/types.d.ts +60 -0
- package/dist/packages/sdk-ui/src/filters/components/icons/date-icon.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/icons/index.d.ts +0 -1
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-filter-tile.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/hooks/use-get-filter-members.d.ts +3 -2
- package/dist/packages/sdk-ui/src/index.d.ts +2 -1
- package/dist/packages/sdk-ui/src/line-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model-translator.d.ts +0 -2
- package/dist/packages/sdk-ui/src/models/dashboard/dashboard-model.d.ts +7 -1
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +2 -1
- package/dist/packages/sdk-ui/src/models/dashboard/types.d.ts +9 -1
- package/dist/packages/sdk-ui/src/models/widget/use-get-widget-model.d.ts +1 -1
- package/dist/packages/sdk-ui/src/pie-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +1 -1
- package/dist/packages/sdk-ui/src/plugins-provider/custom-plugins-provider.d.ts +8 -8
- package/dist/packages/sdk-ui/src/plugins-provider/plugins-context.d.ts +6 -6
- package/dist/packages/sdk-ui/src/plugins-provider/plugins-provider.d.ts +3 -3
- package/dist/packages/sdk-ui/src/plugins-provider/types.d.ts +2 -1
- package/dist/packages/sdk-ui/src/polar-chart.d.ts +2 -2
- package/dist/packages/sdk-ui/src/props.d.ts +35 -15
- package/dist/packages/sdk-ui/src/query-execution/use-execute-query.d.ts +1 -1
- package/dist/packages/sdk-ui/src/scatter-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/sisense-chart/sisense-chart.d.ts +1 -16
- package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +16 -1
- package/dist/packages/sdk-ui/src/theme-provider/use-theme-settings.d.ts +1 -1
- package/dist/packages/sdk-ui/src/theme-provider/utils.d.ts +5 -0
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +47 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +94 -0
- package/dist/packages/sdk-ui/src/types.d.ts +203 -1
- package/dist/packages/sdk-ui/src/utils/data-sources-utils.d.ts +8 -0
- package/dist/packages/sdk-ui/src/utils/generate-attribute-name.d.ts +2 -0
- package/dist/packages/sdk-ui/src/utils/utility-types.d.ts +38 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +1 -0
- package/dist/packages/sdk-ui/src/widget-by-id/translate-widget-style-options.d.ts +16 -5
- package/dist/packages/sdk-ui/src/widgets/drilldown-widget.d.ts +1 -1
- package/dist/packages/sdk-ui/src/widgets/tabber-widget.d.ts +35 -0
- package/dist/use-common-filters--WPkVexd.js +28459 -0
- package/dist/use-common-filters-BNKt9a0z.cjs +271 -0
- package/dist/{widget-composer-BrQ6SrZ6.js → widget-composer-CobNNZ1e.js} +239 -233
- package/dist/widget-composer-DPqi_qzU.cjs +316 -0
- package/package.json +10 -9
- package/dist/derive-chart-family-D3iN--j2.js +0 -44430
- package/dist/derive-chart-family-Tt7cIUck.cjs +0 -271
- package/dist/packages/sdk-ui/src/ai/use-get-data-source-fields.d.ts +0 -12
- package/dist/packages/sdk-ui/src/chart-data/areamap-data.d.ts +0 -4
- package/dist/packages/sdk-ui/src/chart-data/data-coloring/geo-data-coloring-function.d.ts +0 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +0 -3
- package/dist/packages/sdk-ui/src/charts/map-charts/areamap/areamap-utils.d.ts +0 -11
- package/dist/use-common-filters-CHBXz5rL.js +0 -83439
- package/dist/use-common-filters-Dd-gOMfB.cjs +0 -916
- package/dist/widget-composer-BHf4pbvI.cjs +0 -311
- /package/dist/packages/sdk-ui/src/{charts/map-charts/areamap → chart/restructured-charts/areamap-chart/renderer}/alternative-country-names-dictionary.d.ts +0 -0
- /package/dist/packages/sdk-ui/src/{filters/components → common}/icons/search-icon.d.ts +0 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export interface AiContextProviderProps {
|
|
3
3
|
children: ReactNode;
|
|
4
|
+
/** AI context volatile mode */
|
|
4
5
|
volatile?: boolean;
|
|
5
|
-
}
|
|
6
|
+
}
|
|
6
7
|
/**
|
|
7
8
|
* React component that wraps all generative AI components and hooks.
|
|
8
9
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
2
|
import type { Chat, ChatRequest, ChatResponse, ChatWithoutHistory, ChatContext, GetNlgInsightsRequest, GetNlgInsightsResponse, LlmConfig, QueryRecommendationConfig, QueryRecommendationResponse, SendFeedbackRequest, GetNlqResultRequest, NlqResult } from './types';
|
|
3
|
-
import { DataSourceField } from '@sisense/sdk-data';
|
|
4
3
|
import { ChatContextDetails } from '../../ai/api/types';
|
|
4
|
+
/** @internal */
|
|
5
5
|
export declare class ChatRestApi {
|
|
6
6
|
private readonly volatile;
|
|
7
7
|
private httpClient;
|
|
@@ -17,14 +17,12 @@ export declare class ChatRestApi {
|
|
|
17
17
|
private postChat;
|
|
18
18
|
private deleteChatHistory;
|
|
19
19
|
private sendFeedback;
|
|
20
|
-
private getDataSourceFields;
|
|
21
20
|
ai: {
|
|
22
21
|
getNlgInsights: (request: GetNlgInsightsRequest) => Promise<GetNlgInsightsResponse | undefined>;
|
|
23
22
|
getNlqResult: (contextTitle: string, request: GetNlqResultRequest) => Promise<NlqResult | undefined>;
|
|
24
23
|
getQueryRecommendations: (contextTitle: string, config: QueryRecommendationConfig) => Promise<QueryRecommendationResponse | undefined>;
|
|
25
24
|
setLlmConfig: (config: LlmConfig) => Promise<unknown>;
|
|
26
25
|
sendFeedback: (request: SendFeedbackRequest) => Promise<unknown>;
|
|
27
|
-
getDataSourceFields: (dataSource: string) => Promise<DataSourceField[] | undefined>;
|
|
28
26
|
chat: {
|
|
29
27
|
getAll: () => Promise<never[] | ChatWithoutHistory[] | undefined>;
|
|
30
28
|
getById: (chatId: string) => Promise<Chat | undefined>;
|
|
@@ -65,13 +65,19 @@ interface ErrorResponse {
|
|
|
65
65
|
responseType: 'error';
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
68
|
-
* Response data
|
|
68
|
+
* Response data for NLQ request
|
|
69
69
|
*/
|
|
70
70
|
export interface NlqResponseData extends ExpandedQueryModel {
|
|
71
|
+
/** Detailed description of the response */
|
|
71
72
|
detailedDescription: string;
|
|
72
|
-
|
|
73
|
+
/** An array of suggested followup questions */
|
|
74
|
+
followupQuestions?: string[];
|
|
75
|
+
/** NLQ prompt used in the request */
|
|
73
76
|
nlqPrompt: string;
|
|
77
|
+
/** Suggested widget props*/
|
|
74
78
|
widgetProps?: WidgetProps | undefined;
|
|
79
|
+
/** The response message for the chat */
|
|
80
|
+
userMsg: string;
|
|
75
81
|
}
|
|
76
82
|
export interface NlqResponse {
|
|
77
83
|
data: NlqResponseData;
|
|
@@ -83,12 +89,15 @@ export interface QueryRecommendationConfig {
|
|
|
83
89
|
numOfRecommendations: number;
|
|
84
90
|
}
|
|
85
91
|
export type NlqResult = Omit<NlqResponseData, 'followupQuestions'>;
|
|
86
|
-
|
|
92
|
+
/** AI-generated recommended query you can run on your data model */
|
|
93
|
+
export interface QueryRecommendation extends Omit<NlqResponseData, 'followupQuestions'> {
|
|
94
|
+
}
|
|
87
95
|
export type QueryRecommendationResponse = QueryRecommendation[];
|
|
88
96
|
export interface GetNlgInsightsRequest {
|
|
89
97
|
jaql: Pick<JaqlQueryPayload, 'datasource' | 'metadata' | 'filterRelations'>;
|
|
90
98
|
verbosity?: 'Low' | 'High';
|
|
91
99
|
}
|
|
100
|
+
/** @internal */
|
|
92
101
|
export interface GetNlgInsightsResponse {
|
|
93
102
|
data?: {
|
|
94
103
|
answer: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Filter, Data } from '@sisense/sdk-data';
|
|
1
|
+
import { Filter, Data, FilterRelations } from '@sisense/sdk-data';
|
|
2
2
|
import type { NlqResponseData } from '../../ai';
|
|
3
3
|
import { NlqChartWidgetStyleOptions } from '../../types';
|
|
4
4
|
/**
|
|
@@ -15,7 +15,7 @@ export interface NlqChartWidgetProps {
|
|
|
15
15
|
/**
|
|
16
16
|
* The dashboard filters to be applied to the chart
|
|
17
17
|
*/
|
|
18
|
-
filters?: Filter[];
|
|
18
|
+
filters?: Filter[] | FilterRelations;
|
|
19
19
|
/**
|
|
20
20
|
* A callback that allows to modify data immediately after it has been retrieved.
|
|
21
21
|
* Can be used to inject modification of queried data.
|
|
@@ -3,7 +3,7 @@ import { ChatConfig } from './chat-config';
|
|
|
3
3
|
/**
|
|
4
4
|
* Props for {@link Chatbot} component.
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export interface ChatbotProps {
|
|
7
7
|
/**
|
|
8
8
|
* Total width of the chatbot
|
|
9
9
|
*
|
|
@@ -20,7 +20,7 @@ export type ChatbotProps = {
|
|
|
20
20
|
* Various configuration options for the chatbot
|
|
21
21
|
*/
|
|
22
22
|
config?: Partial<ChatConfig>;
|
|
23
|
-
}
|
|
23
|
+
}
|
|
24
24
|
/**
|
|
25
25
|
* React component that renders a chatbot with data topic selection. You can optionally provide `width` and/or `height`.
|
|
26
26
|
*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { type ChatRestApi } from './api/chat-rest-api';
|
|
3
|
+
/** @internal */
|
|
4
|
+
export type CustomAiContext = {
|
|
5
|
+
api?: ChatRestApi;
|
|
6
|
+
};
|
|
7
|
+
/** @internal */
|
|
8
|
+
export type CustomAiContextProviderProps = {
|
|
9
|
+
context?: CustomAiContext;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/** @internal */
|
|
13
|
+
export declare function CustomAiContextProvider({ children, context }: CustomAiContextProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export { default as AiContextProvider, type AiContextProviderProps } from './ai-context-provider';
|
|
2
2
|
export { type ChatConfig } from './chat-config';
|
|
3
3
|
export { useGetNlgInsights, type UseGetNlgInsightsParams, type UseGetNlgInsightsState, useGetNlgQueryResult, } from './use-get-nlg-insights';
|
|
4
|
-
export { useGetNlqResult, type UseGetNlqResultParams, type UseGetNlqResultState, } from './use-get-nlq-result';
|
|
5
|
-
export { useGetQueryRecommendations, type UseGetQueryRecommendationsParams, type UseGetQueryRecommendationsState, } from './use-get-query-recommendations';
|
|
4
|
+
export { useGetNlqResult, prepareGetNlqResultPayload, type UseGetNlqResultParams, type UseGetNlqResultState, type GetNlqResultParams, } from './use-get-nlq-result';
|
|
5
|
+
export { useGetQueryRecommendations, type UseGetQueryRecommendationsParams, type GetQueryRecommendationsParams, type UseGetQueryRecommendationsState, DEFAULT_RECOMMENDATIONS_COUNT, } from './use-get-query-recommendations';
|
|
6
6
|
export { useChatSession, type UseChatSessionResult } from './use-chat-session';
|
|
7
7
|
export { useLastNlqResponse } from './use-last-nlq-response';
|
|
8
|
-
export {
|
|
9
|
-
export type { GetNlgInsightsRequest, QueryRecommendationResponse, QueryRecommendation, NlqResponseData, NlqResult, NLQ_RESULT_CHART_TYPES, NlqResultChartType, } from './api/types';
|
|
8
|
+
export type { GetNlgInsightsRequest, GetNlgInsightsResponse, QueryRecommendationResponse, QueryRecommendation, NlqResponseData, NlqResult, NLQ_RESULT_CHART_TYPES, NlqResultChartType, } from './api/types';
|
|
10
9
|
export { Chatbot, type ChatbotProps } from './chatbot';
|
|
11
10
|
export { default as GetNlgInsights, type GetNlgInsightsProps, GetNlgQueryResult, type GetNlgQueryResultProps, } from './get-nlg-insights';
|
|
12
11
|
export { NlqChartWidget, type NlqChartWidgetProps } from './chart/nlq-chart-widget';
|
|
12
|
+
export { ChatRestApi } from './api/chat-rest-api';
|
|
13
|
+
export { CustomAiContextProvider, type CustomAiContext } from './custom-ai-context-provider';
|
|
14
|
+
export { prepareGetNlgInsightsPayload } from './use-get-nlg-insights';
|
|
15
|
+
export { widgetComposer } from '../analytics-composer';
|
|
@@ -39,6 +39,8 @@ export interface UseGetNlgInsightsState {
|
|
|
39
39
|
/** Callback to trigger a refetch of the data */
|
|
40
40
|
refetch: () => void;
|
|
41
41
|
}
|
|
42
|
+
/** @internal */
|
|
43
|
+
export declare function prepareGetNlgInsightsPayload(params: UseGetNlgInsightsParams | GetNlgInsightsRequest): GetNlgInsightsRequest;
|
|
42
44
|
/**
|
|
43
45
|
*
|
|
44
46
|
* @param params - {@link UseGetNlgInsightsParams}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { WidgetProps } from '../props';
|
|
2
2
|
import { DataSource } from '@sisense/sdk-data';
|
|
3
3
|
import { HookEnableParam } from '../common/hooks/types';
|
|
4
|
-
import { NlqResultChartType } from './api/types';
|
|
5
|
-
|
|
6
|
-
* Parameters for {@link useGetNlqResult} hook.
|
|
7
|
-
*/
|
|
8
|
-
export interface UseGetNlqResultParams extends HookEnableParam {
|
|
4
|
+
import { GetNlqResultRequest, NlqResultChartType } from './api/types';
|
|
5
|
+
export interface GetNlqResultParams {
|
|
9
6
|
/** Data source for queries to run against */
|
|
10
7
|
dataSource: DataSource;
|
|
11
8
|
/** Text containing the natural language query */
|
|
@@ -20,6 +17,16 @@ export interface UseGetNlqResultParams extends HookEnableParam {
|
|
|
20
17
|
*/
|
|
21
18
|
enableAxisTitlesInWidgetProps?: boolean;
|
|
22
19
|
}
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare function prepareGetNlqResultPayload(params: GetNlqResultParams): {
|
|
22
|
+
contextTitle: string;
|
|
23
|
+
request: GetNlqResultRequest;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Parameters for {@link useGetNlqResult} hook.
|
|
27
|
+
*/
|
|
28
|
+
export interface UseGetNlqResultParams extends GetNlqResultParams, HookEnableParam {
|
|
29
|
+
}
|
|
23
30
|
/**
|
|
24
31
|
* State for {@link useGetNlqResult} hook.
|
|
25
32
|
*/
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { QueryRecommendation } from './api/types';
|
|
2
2
|
import { HookEnableParam } from '../common/hooks/types';
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export interface UseGetQueryRecommendationsParams extends HookEnableParam {
|
|
3
|
+
/** @internal */
|
|
4
|
+
export declare const DEFAULT_RECOMMENDATIONS_COUNT = 4;
|
|
5
|
+
export interface GetQueryRecommendationsParams {
|
|
7
6
|
/** Data model title or perspective title */
|
|
8
7
|
contextTitle: string;
|
|
9
8
|
/**
|
|
@@ -20,6 +19,11 @@ export interface UseGetQueryRecommendationsParams extends HookEnableParam {
|
|
|
20
19
|
*/
|
|
21
20
|
enableAxisTitlesInWidgetProps?: boolean;
|
|
22
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Parameters for {@link useGetQueryRecommendations} hook.
|
|
24
|
+
*/
|
|
25
|
+
export interface UseGetQueryRecommendationsParams extends GetQueryRecommendationsParams, HookEnableParam {
|
|
26
|
+
}
|
|
23
27
|
/**
|
|
24
28
|
* State for {@link useGetQueryRecommendations} hook.
|
|
25
29
|
*/
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NlqResponseData, ChatMessage } from './api/types';
|
|
2
|
+
/**
|
|
3
|
+
* React hook that returns the last NLQ response from chat history
|
|
4
|
+
*
|
|
5
|
+
* @chatHistory [ChatMessage[]] - Parameters for the hook
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const useLastNlqResponseFromHistory: (chatHistory?: ChatMessage[]) => NlqResponseData | null;
|
|
@@ -4,7 +4,7 @@ import type { NlqResponseData, ChatContextDetails } from './api/types';
|
|
|
4
4
|
*
|
|
5
5
|
* @internal
|
|
6
6
|
*/
|
|
7
|
-
interface UseLastNlqResponseParams {
|
|
7
|
+
export interface UseLastNlqResponseParams {
|
|
8
8
|
/** The title of the data model or perspective */
|
|
9
9
|
contextTitle: string;
|
|
10
10
|
/** optional chat context details */
|
|
@@ -18,4 +18,3 @@ interface UseLastNlqResponseParams {
|
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
20
|
export declare const useLastNlqResponse: ({ contextTitle, contextDetails, }: UseLastNlqResponseParams) => NlqResponseData | null;
|
|
21
|
-
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CODE_TEMPLATES_INDENT = 6;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
2
|
import { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
|
|
3
|
-
import { type DataSource } from '@sisense/sdk-data';
|
|
3
|
+
import { DataSourceField, type DataSource } from '@sisense/sdk-data';
|
|
4
4
|
import { HierarchyDto, SharedFormulaDto, WidgetDto } from '../widget-by-id/types';
|
|
5
5
|
import type { DashboardDto } from './types/dashboard-dto';
|
|
6
6
|
import { TranslatableError } from '../translation/translatable-error';
|
|
@@ -82,6 +82,17 @@ export declare class RestApi {
|
|
|
82
82
|
* @returns A shared formula
|
|
83
83
|
*/
|
|
84
84
|
getSharedFormula: (sharedFormulaId: string) => Promise<SharedFormulaDto | undefined>;
|
|
85
|
+
/**
|
|
86
|
+
* Get datasource fields
|
|
87
|
+
* @param dataSource - A datasource name
|
|
88
|
+
* @param options - An object with offset and count
|
|
89
|
+
* @returns A list of datasource fields
|
|
90
|
+
*/
|
|
91
|
+
getDataSourceFields: (dataSource: string, options?: {
|
|
92
|
+
offset?: number;
|
|
93
|
+
count?: number;
|
|
94
|
+
searchValue?: string;
|
|
95
|
+
}) => Promise<DataSourceField[] | undefined>;
|
|
85
96
|
}
|
|
86
97
|
export declare const useRestApi: () => {
|
|
87
98
|
restApi: RestApi | undefined;
|
|
@@ -115,6 +115,21 @@ export type AppConfig = {
|
|
|
115
115
|
*/
|
|
116
116
|
enabled?: boolean;
|
|
117
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* Configuration of the tabber widget
|
|
120
|
+
*
|
|
121
|
+
* Set the `tabberConfig.enabled` property to `true` to enable the tabber widget support. Otherwise, the tabber widget will be treated as 'unkwon plugin type'.
|
|
122
|
+
*
|
|
123
|
+
* @internal
|
|
124
|
+
*/
|
|
125
|
+
tabberConfig?: {
|
|
126
|
+
/**
|
|
127
|
+
* Whether to enable tabber widget support
|
|
128
|
+
*
|
|
129
|
+
* If not specified, the default value is `false`
|
|
130
|
+
*/
|
|
131
|
+
enabled?: boolean;
|
|
132
|
+
};
|
|
118
133
|
/**
|
|
119
134
|
* Configuration of the component that is rendered in case of an error
|
|
120
135
|
*/
|
|
@@ -17,8 +17,8 @@ import { AreaChartProps } from './props';
|
|
|
17
17
|
*
|
|
18
18
|
* Additional Area Chart examples:
|
|
19
19
|
*
|
|
20
|
-
* - [Stacked Area Chart](https://www.sisense.com/
|
|
21
|
-
* - [Stacked Percentage Area Chart](https://www.sisense.com/
|
|
20
|
+
* - [Stacked Area Chart](https://www.sisense.com/developers/playground/?example=charts%2Farea-chart-stacked)
|
|
21
|
+
* - [Stacked Percentage Area Chart](https://www.sisense.com/developers/playground/?example=charts%2Farea-chart-stacked100)
|
|
22
22
|
*
|
|
23
23
|
* @param props - Area chart properties
|
|
24
24
|
* @returns Area Chart component
|
|
@@ -17,8 +17,8 @@ import { BarChartProps } from './props';
|
|
|
17
17
|
*
|
|
18
18
|
* Additional Bar Chart examples:
|
|
19
19
|
*
|
|
20
|
-
* - [Stacked Bar Chart](https://www.sisense.com/
|
|
21
|
-
* - [Stacked Percentage Bar Chart](https://www.sisense.com/
|
|
20
|
+
* - [Stacked Bar Chart](https://www.sisense.com/developers/playground/?example=charts%2Fbar-chart-stacked)
|
|
21
|
+
* - [Stacked Percentage Bar Chart](https://www.sisense.com/developers/playground/?example=charts%2Fbar-chart-stacked100)
|
|
22
22
|
*
|
|
23
23
|
* @param props - Bar chart properties
|
|
24
24
|
* @returns Bar Chart component
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClientApplication } from '../../app/client-application';
|
|
2
|
+
import { QueryDescription } from '../../query/execute-query';
|
|
3
|
+
import { ChartType } from '../../types';
|
|
4
|
+
import { QueryResultData } from '@sisense/sdk-data';
|
|
5
|
+
import { QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
6
|
+
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
7
|
+
export type LoadDataFunction = (options: {
|
|
8
|
+
app: ClientApplication;
|
|
9
|
+
chartDataOptionsInternal?: ChartDataOptionsInternal;
|
|
10
|
+
queryDescription: QueryDescription;
|
|
11
|
+
executionConfig?: QueryExecutionConfig;
|
|
12
|
+
}) => Promise<QueryResultData>;
|
|
13
|
+
/**
|
|
14
|
+
* Get the load data function based on the chart type
|
|
15
|
+
*/
|
|
16
|
+
export declare function getLoadDataFunction(chartType: ChartType): LoadDataFunction;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Attribute, Data, DataSource, Measure } from '@sisense/sdk-data';
|
|
2
|
+
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
3
|
+
import { DataColumnNamesMapping } from '../../chart-data-options/validate-data-options';
|
|
4
|
+
import { ChartData } from '../../chart-data/types';
|
|
5
|
+
import { ChartType } from '../../types';
|
|
6
|
+
type UseChartDataPreparationProps = {
|
|
7
|
+
dataSet: DataSource | Data | undefined;
|
|
8
|
+
data: Data;
|
|
9
|
+
chartDataOptions: ChartDataOptionsInternal;
|
|
10
|
+
chartType: ChartType;
|
|
11
|
+
attributes: Attribute[];
|
|
12
|
+
measures: Measure[];
|
|
13
|
+
dataColumnNamesMapping: DataColumnNamesMapping;
|
|
14
|
+
onDataReady?: (data: Data) => Data;
|
|
15
|
+
};
|
|
16
|
+
export declare function useChartDataPreparation({ dataSet, data, chartDataOptions, chartType, attributes, measures, dataColumnNamesMapping, onDataReady, }: UseChartDataPreparationProps): ChartData | null;
|
|
17
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import { Dispatch, SetStateAction } from 'react';
|
|
|
3
3
|
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
4
4
|
import { ChartType } from '../../types';
|
|
5
5
|
import { DataColumnNamesMapping } from '../../chart-data-options/validate-data-options';
|
|
6
|
+
import { LoadDataFunction } from './get-load-data-function';
|
|
6
7
|
type DataSet = DataSource | Data | undefined;
|
|
7
8
|
type UseSyncedDataProps = {
|
|
8
9
|
dataSet: DataSet;
|
|
@@ -16,6 +17,7 @@ type UseSyncedDataProps = {
|
|
|
16
17
|
refreshCounter?: number;
|
|
17
18
|
setIsLoading?: Dispatch<SetStateAction<boolean>>;
|
|
18
19
|
enabled?: boolean;
|
|
20
|
+
loadData: LoadDataFunction;
|
|
19
21
|
};
|
|
20
|
-
export declare const useSyncedData: ({ dataSet, chartDataOptions, chartType, attributes, measures, dataColumnNamesMapping, filters, highlights, refreshCounter, setIsLoading, enabled, }: UseSyncedDataProps) => [Data, ChartDataOptionsInternal];
|
|
22
|
+
export declare const useSyncedData: ({ dataSet, chartDataOptions, chartType, attributes, measures, dataColumnNamesMapping, filters, highlights, refreshCounter, setIsLoading, enabled, loadData, }: UseSyncedDataProps) => [Data, ChartDataOptionsInternal];
|
|
21
23
|
export {};
|
package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data/areamap-data.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AreamapChartDataOptionsInternal } from '../../../../chart-data-options/types.js';
|
|
2
|
+
import { DataTable } from '../../../../chart-data-processor/table-processor';
|
|
3
|
+
import { AreamapData } from '../types';
|
|
4
|
+
export declare const getAreamapData: (dataOptions: AreamapChartDataOptionsInternal, dataTable: DataTable) => AreamapData;
|
package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/data-options/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './data-options';
|
package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/design-options/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './design-options';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { FeatureCollection as GeoJsonFeatureCollection } from 'geojson';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { AreamapType } from '../../../../types.js';
|
|
4
|
+
import { GeoDataElement } from '../types.js';
|
|
5
5
|
export type AreamapProps = {
|
|
6
6
|
geoJson: GeoJsonFeatureCollection;
|
|
7
7
|
geoData: GeoDataElement[];
|
package/dist/packages/sdk-ui/src/chart/restructured-charts/areamap-chart/renderer/areamap-utils.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AreamapChartDataOptionsInternal } from '../../../../chart-data-options/types';
|
|
2
|
+
import { GeoDataElement } from '../types';
|
|
3
|
+
export declare function getAreamapDataPoint(geoDataElement: GeoDataElement, dataOptions: AreamapChartDataOptionsInternal): {
|
|
4
|
+
entries: {
|
|
5
|
+
geo: import('../../../../types').DataPointEntry[];
|
|
6
|
+
color: import('../../../../types').DataPointEntry[];
|
|
7
|
+
};
|
|
8
|
+
geoName: string;
|
|
9
|
+
originalValue: number;
|
|
10
|
+
formattedOriginalValue: string;
|
|
11
|
+
color?: import('../../../../types').Color | undefined;
|
|
12
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { AreamapChartDataOptionsInternal } from '
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { AreamapChartDataOptionsInternal } from '../../../../chart-data-options/types.js';
|
|
3
|
+
import { ChartData } from '../../../../chart-data/types.js';
|
|
4
|
+
import { AreamapDataPointEventHandler } from '../../../../props.js';
|
|
5
|
+
import { ChartRendererProps } from '../../../../chart/types.js';
|
|
6
|
+
import { AreamapChartDesignOptions, AreamapData } from '../types.js';
|
|
7
7
|
export type AreamapProps = {
|
|
8
8
|
chartData: AreamapData;
|
|
9
9
|
dataOptions: AreamapChartDataOptionsInternal;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Feature as GeoJsonFeature } from 'geojson';
|
|
2
2
|
import { PathOptions } from 'leaflet';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { AreamapType } from '../../../../types.js';
|
|
4
|
+
import { GeoDataElement } from '../types.js';
|
|
5
5
|
export type FeatureId = GeoJsonFeature['id'] & string;
|
|
6
6
|
export type FeatureInfo = {
|
|
7
7
|
/** Corresponding GeoDataElement from GeoData */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './areamap.js';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { BaseDesignOptionsType } from '../../../chart-options-processor/translations/design-options';
|
|
2
|
+
import { AreamapChartType, AreamapType, Color } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Fact final data that will be passed to Areamap-component to render
|
|
5
|
+
*
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export type AreamapData = {
|
|
9
|
+
type: AreamapChartType;
|
|
10
|
+
geoData: GeoDataElement[];
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Raw GeoDataElement from data
|
|
14
|
+
*/
|
|
15
|
+
export type RawGeoDataElement = {
|
|
16
|
+
/** Name of geo-element (country or state) */
|
|
17
|
+
geoName: string;
|
|
18
|
+
/** Original numeric measure value for this geo-element */
|
|
19
|
+
originalValue: number;
|
|
20
|
+
/** Formatted measure value for this geo-element to display*/
|
|
21
|
+
formattedOriginalValue: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* GeoDataElement with color property, calculated from `originalValue`
|
|
25
|
+
*/
|
|
26
|
+
export type GeoDataElement = RawGeoDataElement & {
|
|
27
|
+
/** Calculated color for this geo-element */
|
|
28
|
+
color?: Color;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Configuration for Areamap design options
|
|
32
|
+
*/
|
|
33
|
+
export type AreamapChartDesignOptions = BaseDesignOptionsType & {
|
|
34
|
+
mapType: AreamapType;
|
|
35
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ChartBuilder, SupportedChartType } from './types.js';
|
|
2
|
+
export declare const chartBuildersMap: Record<SupportedChartType, ChartBuilder<SupportedChartType>>;
|
|
3
|
+
export declare function getChartBuilder<CT extends SupportedChartType>(chartType: CT): ChartBuilder<CT>;
|
package/dist/packages/sdk-ui/src/chart/restructured-charts/helpers/cartesians/data-options.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CartesianChartDataOptionsInternal, ChartDataOptions, ChartDataOptionsInternal } from '../../../../chart-data-options/types';
|
|
2
|
+
import { CartesianChartDataOptions } from '../../../../types';
|
|
3
|
+
import { Attribute, Measure } from '@sisense/sdk-data';
|
|
4
|
+
/**
|
|
5
|
+
* Translates the data options for cartesian charts to internal format.
|
|
6
|
+
*/
|
|
7
|
+
export declare const translateCartesianChartDataOptions: (dataOptions: CartesianChartDataOptions) => CartesianChartDataOptionsInternal;
|
|
8
|
+
/**
|
|
9
|
+
* Returns the attributes from the internal data options for cartesian charts.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getCartesianAttributes(internalDataOptions: CartesianChartDataOptionsInternal): Attribute[];
|
|
12
|
+
/**
|
|
13
|
+
* Returns the measures from the internal data options for cartesian charts.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getCartesianMeasures(internalDataOptions: CartesianChartDataOptionsInternal): Measure[];
|
|
16
|
+
/**
|
|
17
|
+
* Checks if the data options are correct for cartesian charts.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isCartesianChartDataOptions(dataOptions: ChartDataOptions): dataOptions is CartesianChartDataOptions;
|
|
20
|
+
/**
|
|
21
|
+
* Checks if the internal data options are correct for cartesian charts.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isCartesianChartDataOptionsInternal(dataOptions: ChartDataOptionsInternal): dataOptions is CartesianChartDataOptionsInternal;
|
|
24
|
+
/**
|
|
25
|
+
* Checks if the chart should have Y2 axis.
|
|
26
|
+
*/
|
|
27
|
+
export declare function shouldHaveY2Axis(dataOptions: CartesianChartDataOptionsInternal): boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { CartesianChartDataOptionsInternal } from '../../../../chart-data-options/types';
|
|
2
|
+
import { DataTable } from '../../../../chart-data-processor/table-processor';
|
|
3
|
+
import { CartesianChartData } from '../../../../chart-data/types';
|
|
4
|
+
export declare function getCartesianChartData(chartDataOptions: CartesianChartDataOptionsInternal, dataTable: DataTable): CartesianChartData;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { CartesianChartDataOptionsInternal } from '../../../../../chart-data-options/types';
|
|
2
|
+
import { StackableChartDesignOptions } from '../../../../../chart-options-processor/translations/design-options';
|
|
3
|
+
import { ChartStyleOptions, StackableStyleOptions } from '../../../../../types';
|
|
4
|
+
export declare function translateStackableStyleOptionsToDesignOptions(chartType: 'bar' | 'column', styleOptions: StackableStyleOptions, dataOptionsInternal: CartesianChartDataOptionsInternal): StackableChartDesignOptions;
|
|
5
|
+
export declare function isStackableStyleOptions(styleOptions: ChartStyleOptions): styleOptions is StackableStyleOptions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ClientApplication } from '../../../app/client-application';
|
|
2
|
+
import { QueryDescription } from '../../../query/execute-query';
|
|
3
|
+
import { QueryResultData } from '@sisense/sdk-data';
|
|
4
|
+
import { QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
5
|
+
/**
|
|
6
|
+
* Load data by a regular single query execution.
|
|
7
|
+
*/
|
|
8
|
+
export declare function loadDataBySingleQuery(options: {
|
|
9
|
+
app: ClientApplication;
|
|
10
|
+
queryDescription: QueryDescription;
|
|
11
|
+
executionConfig?: QueryExecutionConfig | undefined;
|
|
12
|
+
}): Promise<QueryResultData>;
|