@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
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Attribute, Measure, QueryResultData } from '@sisense/sdk-data';
|
|
3
|
+
import { QueryDescription, QueryExecutionConfig } from '@sisense/sdk-query-client';
|
|
4
|
+
import type { AreamapStyleOptions, ChartDataOptions, ChartStyleOptions, ScattermapStyleOptions, StackableStyleOptions } from '../../types';
|
|
5
|
+
import type { SisenseChartProps } from '../../sisense-chart';
|
|
6
|
+
import type { ChartRendererProps } from '../../chart';
|
|
7
|
+
import type { CartesianChartData, ScattermapChartData } from '../../chart-data/types';
|
|
8
|
+
import { AreamapChartDataOptions, AreamapChartDataOptionsInternal, CartesianChartDataOptions, CartesianChartDataOptionsInternal, ChartDataOptionsInternal, ScattermapChartDataOptions, ScattermapChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
9
|
+
import { DesignOptions } from '../../chart-options-processor/translations/types';
|
|
10
|
+
import { DataTable } from '../../chart-data-processor/table-processor';
|
|
11
|
+
import { ClientApplication } from '../../app/client-application';
|
|
12
|
+
import { AreamapProps } from '../../chart/restructured-charts/areamap-chart/renderer';
|
|
13
|
+
import { ScattermapProps } from '../../charts/map-charts/scattermap/scattermap';
|
|
14
|
+
import { AreamapData } from './areamap-chart/types';
|
|
15
|
+
export type SupportedChartType = 'areamap' | 'column' | 'bar';
|
|
16
|
+
export type TypedChartDataOptions<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapChartDataOptions : CT extends 'scattermap' ? ScattermapChartDataOptions : CT extends 'column' | 'bar' ? CartesianChartDataOptions : never;
|
|
17
|
+
export type TypedDataOptionsInternal<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapChartDataOptionsInternal : CT extends 'scattermap' ? ScattermapChartDataOptionsInternal : CT extends 'column' | 'bar' ? CartesianChartDataOptionsInternal : never;
|
|
18
|
+
export type TypedChartStyleOptions<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapStyleOptions : CT extends 'scattermap' ? ScattermapStyleOptions : CT extends 'column' | 'bar' ? StackableStyleOptions : never;
|
|
19
|
+
export type TypedDesignOptions<CT extends SupportedChartType> = DesignOptions<CT>;
|
|
20
|
+
export type TypedChartData<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapData : CT extends 'scattermap' ? ScattermapChartData : CT extends 'column' | 'bar' ? CartesianChartData : never;
|
|
21
|
+
export type TypedLoadDataFunction<CT extends SupportedChartType> = (options: {
|
|
22
|
+
app: ClientApplication;
|
|
23
|
+
chartDataOptionsInternal: TypedDataOptionsInternal<CT>;
|
|
24
|
+
queryDescription: QueryDescription;
|
|
25
|
+
executionConfig?: QueryExecutionConfig;
|
|
26
|
+
}) => Promise<QueryResultData>;
|
|
27
|
+
export type TypedChartRendererProps<CT extends SupportedChartType> = CT extends 'areamap' ? AreamapProps : CT extends 'scattermap' ? ScattermapProps : CT extends 'column' | 'bar' ? SisenseChartProps : never;
|
|
28
|
+
/**
|
|
29
|
+
* Chart builder interface.
|
|
30
|
+
*/
|
|
31
|
+
export interface ChartBuilder<CT extends SupportedChartType = SupportedChartType> {
|
|
32
|
+
/**
|
|
33
|
+
* Data options translation utils.
|
|
34
|
+
*/
|
|
35
|
+
dataOptions: {
|
|
36
|
+
/**
|
|
37
|
+
* Translates the data options to the internal format.
|
|
38
|
+
*/
|
|
39
|
+
translateDataOptionsToInternal: (dataOptions: TypedChartDataOptions<CT>) => TypedDataOptionsInternal<CT>;
|
|
40
|
+
/**
|
|
41
|
+
* Returns the attributes from the internal data options.
|
|
42
|
+
*/
|
|
43
|
+
getAttributes: (internalDataOptions: TypedDataOptionsInternal<CT>) => Attribute[];
|
|
44
|
+
/**
|
|
45
|
+
* Returns the measures from the internal data options.
|
|
46
|
+
*/
|
|
47
|
+
getMeasures: (internalDataOptions: TypedDataOptionsInternal<CT>) => Measure[];
|
|
48
|
+
/**
|
|
49
|
+
* Validates and cleans the data options if needed.
|
|
50
|
+
*/
|
|
51
|
+
validateAndCleanDataOptions?: (dataOptions: TypedChartDataOptions<CT>) => TypedChartDataOptions<CT>;
|
|
52
|
+
/**
|
|
53
|
+
* Checks if the data options are correct for the current chart type.
|
|
54
|
+
*/
|
|
55
|
+
isCorrectDataOptions: (dataOptions: ChartDataOptions) => dataOptions is TypedChartDataOptions<CT>;
|
|
56
|
+
/**
|
|
57
|
+
* Checks if the data options are correct for the internal format.
|
|
58
|
+
*/
|
|
59
|
+
isCorrectDataOptionsInternal: (dataOptions: ChartDataOptionsInternal) => dataOptions is TypedDataOptionsInternal<CT>;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Data retrieving and translation utils.
|
|
63
|
+
*/
|
|
64
|
+
data: {
|
|
65
|
+
/**
|
|
66
|
+
* Loads the data from backend.
|
|
67
|
+
*/
|
|
68
|
+
loadData: TypedLoadDataFunction<CT>;
|
|
69
|
+
/**
|
|
70
|
+
* Translates the data table to the chart data.
|
|
71
|
+
*/
|
|
72
|
+
getChartData: (chartDataOptions: TypedDataOptionsInternal<CT>, dataTable: DataTable) => TypedChartData<CT>;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Design options translation utils.
|
|
76
|
+
*/
|
|
77
|
+
designOptions: {
|
|
78
|
+
/**
|
|
79
|
+
* Translates the style options to the design options.
|
|
80
|
+
*/
|
|
81
|
+
translateStyleOptionsToDesignOptions: (styleOptions: TypedChartStyleOptions<CT>, dataOptionsInternal: TypedDataOptionsInternal<CT>) => TypedDesignOptions<CT>;
|
|
82
|
+
/**
|
|
83
|
+
* Checks if the style options are correct for the current chart type.
|
|
84
|
+
*/
|
|
85
|
+
isCorrectStyleOptions: (styleOptions: ChartStyleOptions) => styleOptions is TypedChartStyleOptions<CT>;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Chart renderer component and related utils
|
|
89
|
+
*/
|
|
90
|
+
renderer: {
|
|
91
|
+
/**
|
|
92
|
+
* Chart renderer component.
|
|
93
|
+
*/
|
|
94
|
+
ChartRendererComponent: React.ComponentType<TypedChartRendererProps<CT>>;
|
|
95
|
+
/**
|
|
96
|
+
* Type guard for the chart renderer props.
|
|
97
|
+
*/
|
|
98
|
+
isCorrectRendererProps: (props: ChartRendererProps) => props is TypedChartRendererProps<CT>;
|
|
99
|
+
};
|
|
100
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { NumberFormatConfig } from '../types';
|
|
2
|
+
import { IndicatorChartType } from '../chart-options-processor/translations/types';
|
|
3
3
|
import { ComparableData, Value } from '../chart-data-processor/table-processor';
|
|
4
4
|
import { Coordinates } from '../charts/map-charts/scattermap/types';
|
|
5
|
+
import { AreamapData } from '../chart/restructured-charts/areamap-chart/types';
|
|
5
6
|
export type CategoricalXValues = {
|
|
6
7
|
key: string;
|
|
7
8
|
xValues: string[];
|
|
@@ -124,33 +125,6 @@ export type IndicatorChartData = {
|
|
|
124
125
|
min?: number;
|
|
125
126
|
max?: number;
|
|
126
127
|
};
|
|
127
|
-
/**
|
|
128
|
-
* Raw GeoDataElement from data
|
|
129
|
-
*/
|
|
130
|
-
export type RawGeoDataElement = {
|
|
131
|
-
/** Name of geo-element (country or state) */
|
|
132
|
-
geoName: string;
|
|
133
|
-
/** Original numeric measure value for this geo-element */
|
|
134
|
-
originalValue: number;
|
|
135
|
-
/** Formatted measure value for this geo-element to display*/
|
|
136
|
-
formattedOriginalValue: string;
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* GeoDataElement with color property, calculated from `originalValue`
|
|
140
|
-
*/
|
|
141
|
-
export type GeoDataElement = RawGeoDataElement & {
|
|
142
|
-
/** Calculated color for this geo-element */
|
|
143
|
-
color?: Color;
|
|
144
|
-
};
|
|
145
|
-
/**
|
|
146
|
-
* Fact final data that will be passed to Areamap-component to render
|
|
147
|
-
*
|
|
148
|
-
* @internal
|
|
149
|
-
*/
|
|
150
|
-
export type AreamapData = {
|
|
151
|
-
type: AreamapChartType;
|
|
152
|
-
geoData: GeoDataElement[];
|
|
153
|
-
};
|
|
154
128
|
/**
|
|
155
129
|
* Fact final data that will be passed to chart-component to render
|
|
156
130
|
*
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
1
|
+
import { CartesianChartDataOptionsInternal, ChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
2
2
|
import { ChartStyleOptions, ChartType } from '../../types';
|
|
3
|
-
import { DesignOptions, SeriesDesignOptions } from '../translations/types';
|
|
3
|
+
import { CartesianChartType, DesignOptions, SeriesDesignOptions } from '../translations/types';
|
|
4
4
|
export declare function prepareChartDesignOptions(chartType: ChartType, dataOptionsInternal: ChartDataOptionsInternal, styleOptions?: ChartStyleOptions): DesignOptions;
|
|
5
5
|
export declare function extendStyleOptionsWithDefaults(styleOptions: ChartStyleOptions, defaults: ChartStyleOptions): ChartStyleOptions;
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* Get design options per series for cartesian charts
|
|
8
|
+
*/
|
|
9
|
+
export declare function getDesignOptionsPerSeries(dataOptionsInternal: CartesianChartDataOptionsInternal, chartType: CartesianChartType, styleOptions: ChartStyleOptions): Record<string, SeriesDesignOptions>;
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { Legend, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions } from '../../types';
|
|
2
|
-
import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions, SunburstChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions } from '../translations/design-options';
|
|
1
|
+
import { Legend, PolarStyleOptions, PieStyleOptions, StackableStyleOptions, LineStyleOptions, AreaStyleOptions, FunnelStyleOptions, ScatterStyleOptions, BaseStyleOptions, TreemapStyleOptions, SunburstStyleOptions, BoxplotStyleOptions, ScattermapStyleOptions, BaseAxisStyleOptions, ChartStyleOptions, ChartType } from '../../types';
|
|
2
|
+
import { StackableChartDesignOptions, LineChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, AreaChartDesignOptions, TreemapChartDesignOptions, SunburstChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions, BaseDesignOptionsType } from '../translations/design-options';
|
|
3
3
|
import { LegendPosition } from '../translations/legend-section';
|
|
4
4
|
import { StackType } from '../translations/translations-to-highcharts';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { CartesianChartType, SeriesDesignOptions } from '../translations/types';
|
|
6
|
+
import { CartesianChartDataOptionsInternal } from '../../chart-data-options/types';
|
|
7
7
|
export declare const getLegend: (legend?: Legend) => LegendPosition;
|
|
8
8
|
export declare const DefaultStackType: StackType;
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const getCartesianChartStyle: (styleOptions: BaseStyleOptions & BaseAxisStyleOptions, shouldHaveY2Axis: boolean) => BaseDesignOptionsType;
|
|
10
|
+
export declare const getStackableChartDesignOptions: (styleOptions: AreaStyleOptions | StackableStyleOptions, dataOptions: CartesianChartDataOptionsInternal, hasY2Axis: boolean, chartType: CartesianChartType) => StackableChartDesignOptions;
|
|
10
11
|
export declare const getSeriesChartDesignOptions: (chartType: ChartType, styleOptions: ChartStyleOptions) => SeriesDesignOptions;
|
|
11
|
-
export declare const getLineChartDesignOptions: (styleOptions: LineStyleOptions, dataOptions:
|
|
12
|
-
export declare const getAreaChartDesignOptions: (styleOptions: AreaStyleOptions, dataOptions:
|
|
12
|
+
export declare const getLineChartDesignOptions: (styleOptions: LineStyleOptions, dataOptions: CartesianChartDataOptionsInternal, hasY2Axis: boolean) => LineChartDesignOptions;
|
|
13
|
+
export declare const getAreaChartDesignOptions: (styleOptions: AreaStyleOptions, dataOptions: CartesianChartDataOptionsInternal, hasY2Axis: boolean) => AreaChartDesignOptions;
|
|
13
14
|
export declare const DefaultPieType = "classic";
|
|
14
15
|
export declare const getPieChartDesignOptions: (styleOptions: PieStyleOptions) => PieChartDesignOptions;
|
|
15
16
|
export declare const getFunnelChartDesignOptions: (styleOptions: FunnelStyleOptions) => FunnelChartDesignOptions;
|
|
16
17
|
export declare const getTreemapChartDesignOptions: (styleOptions: TreemapStyleOptions) => TreemapChartDesignOptions;
|
|
17
18
|
export declare const getSunburstChartDesignOptions: (styleOptions: SunburstStyleOptions) => SunburstChartDesignOptions;
|
|
18
|
-
export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions, dataOptions:
|
|
19
|
+
export declare const getPolarChartDesignOptions: (styleOptions: PolarStyleOptions, dataOptions: CartesianChartDataOptionsInternal) => PolarChartDesignOptions;
|
|
19
20
|
export declare const getScatterChartDesignOptions: (styleOptions: ScatterStyleOptions) => ScatterChartDesignOptions;
|
|
20
21
|
export declare const getBoxplotChartDesignOptions: (styleOptions: BoxplotStyleOptions) => BoxplotChartDesignOptions;
|
|
21
22
|
export declare const getScattermapChartDesignOptions: (styleOptions: ScattermapStyleOptions) => ScattermapChartDesignOptions;
|
|
@@ -5,7 +5,7 @@ import { LegendPosition } from './legend-section';
|
|
|
5
5
|
import { LineType, StackType } from './translations-to-highcharts';
|
|
6
6
|
import { PieType, PieLabels } from './pie-plot-options';
|
|
7
7
|
import { FunnelSize, FunnelType, FunnelDirection, FunnelLabels } from './funnel-plot-options';
|
|
8
|
-
import {
|
|
8
|
+
import { Convolution, ScattermapMarkers, SunburstStyleOptions, TreemapStyleOptions } from '../../types';
|
|
9
9
|
import { ScatterMarkerSize } from './scatter-plot-options';
|
|
10
10
|
import { DesignPerSeries } from './types';
|
|
11
11
|
type DataLimits = {
|
|
@@ -62,12 +62,6 @@ export type SunburstChartDesignOptions = BaseDesignOptionsType & SunburstStyleOp
|
|
|
62
62
|
export type ScatterChartDesignOptions = BaseDesignOptionsType & {
|
|
63
63
|
markerSize?: ScatterMarkerSize;
|
|
64
64
|
};
|
|
65
|
-
/**
|
|
66
|
-
* Configuration for Areamap design options
|
|
67
|
-
*/
|
|
68
|
-
export type AreamapChartDesignOptions = BaseDesignOptionsType & {
|
|
69
|
-
mapType: AreamapType;
|
|
70
|
-
};
|
|
71
65
|
/**
|
|
72
66
|
* Configuration for Table color options
|
|
73
67
|
*/
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { StyledMeasureColumn, StyledColumn } from '../../chart-data-options/types.js';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const formatTooltipValue: (dataOption: StyledMeasureColumn | StyledColumn | undefined, value: number | undefined, displayValue: string) => string;
|
|
4
|
-
export declare const formatTooltipXValue: (dataOption: StyledMeasureColumn | StyledColumn | undefined, value: number | string | undefined, displayValue: string) => string;
|
|
2
|
+
export declare const isValueNumeric: (value: StyledMeasureColumn | StyledColumn | undefined) => boolean | "";
|
|
3
|
+
export declare const formatTooltipValue: (dataOption: StyledMeasureColumn | StyledColumn | undefined, value: number | string | undefined, displayValue: string) => string;
|
|
5
4
|
export declare function isTooltipPercentValueSupported(options: StyledMeasureColumn | undefined): boolean;
|
|
6
5
|
export type TooltipSettings = {
|
|
7
6
|
enabled?: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { AreamapChartDesignOptions } from '../../chart/restructured-charts/areamap-chart/types';
|
|
1
2
|
import { ChartType } from '../../types';
|
|
2
|
-
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions,
|
|
3
|
+
import { LineChartDesignOptions, AreaChartDesignOptions, BarChartDesignOptions, ColumnChartDesignOptions, PieChartDesignOptions, FunnelChartDesignOptions, IndicatorChartDesignOptions, PolarChartDesignOptions, ScatterChartDesignOptions, TreemapChartDesignOptions, BoxplotChartDesignOptions, ScattermapChartDesignOptions, AreaRangeChartDesignOptions, BaseDesignOptionsType } from './design-options';
|
|
3
4
|
export declare const POLAR_CHART_TYPES: readonly ["polar"];
|
|
4
5
|
export type PolarChartType = (typeof POLAR_CHART_TYPES)[number];
|
|
5
6
|
export declare const CARTESIAN_CHART_TYPES: readonly ["line", "area", "bar", "column", "polar"];
|
|
@@ -20,8 +20,8 @@ import { ColumnChartProps } from './props';
|
|
|
20
20
|
*
|
|
21
21
|
* Additional Column Chart examples:
|
|
22
22
|
*
|
|
23
|
-
* - [Stacked Column Chart](https://www.sisense.com/
|
|
24
|
-
* - [Stacked Percentage Column Chart](https://www.sisense.com/
|
|
23
|
+
* - [Stacked Column Chart](https://www.sisense.com/developers/playground/?example=charts%2Fcolumn-chart-stacked)
|
|
24
|
+
* - [Stacked Percentage Column Chart](https://www.sisense.com/developers/playground/?example=charts%2Fcolumn-chart-stacked100)
|
|
25
25
|
*
|
|
26
26
|
* @param props - Column chart properties
|
|
27
27
|
* @returns Column Chart component
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ItemsGroup, GroupSecondaryActionConfig } from './types';
|
|
3
|
+
type GroupHeaderProps = {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
group: ItemsGroup;
|
|
6
|
+
secondaryAction?: GroupSecondaryActionConfig;
|
|
7
|
+
onOpenStateChange?: (open: boolean) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const GroupHeader: React.FC<GroupHeaderProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ItemsGroup, GroupSecondaryActionConfig, ItemActionConfig, ItemSecondaryActionConfig } from './types';
|
|
3
|
+
type GroupProps = {
|
|
4
|
+
group: ItemsGroup;
|
|
5
|
+
groupSecondaryActionConfig?: GroupSecondaryActionConfig;
|
|
6
|
+
itemActionConfig?: ItemActionConfig;
|
|
7
|
+
itemSecondaryActionConfig?: ItemSecondaryActionConfig;
|
|
8
|
+
};
|
|
9
|
+
export declare const Group: React.FC<GroupProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Item, ItemActionConfig, ItemSecondaryActionConfig } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the item row component.
|
|
5
|
+
*/
|
|
6
|
+
type ItemRowProps = {
|
|
7
|
+
/** The item to display. */
|
|
8
|
+
item: Item;
|
|
9
|
+
/** The action to perform when the item is clicked. */
|
|
10
|
+
itemActionConfig?: ItemActionConfig;
|
|
11
|
+
/** The secondary action of the item. */
|
|
12
|
+
itemSecondaryActionConfig?: ItemSecondaryActionConfig;
|
|
13
|
+
};
|
|
14
|
+
export declare const ItemRow: React.FC<ItemRowProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export type GroupedItemsBrowserProps = {
|
|
3
|
+
groupedItems: ItemsGroup[];
|
|
4
|
+
groupSecondaryActionConfig?: GroupSecondaryActionConfig;
|
|
5
|
+
itemActionConfig?: ItemActionConfig;
|
|
6
|
+
itemSecondaryActionConfig?: ItemSecondaryActionConfig;
|
|
7
|
+
onScrolledToBottom?: () => void;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A group of items.
|
|
11
|
+
*/
|
|
12
|
+
export type ItemsGroup = {
|
|
13
|
+
title: string;
|
|
14
|
+
id: string;
|
|
15
|
+
items: Item[];
|
|
16
|
+
Icon?: React.ComponentType;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* An item in the list of grouped items.
|
|
20
|
+
*/
|
|
21
|
+
export type Item = {
|
|
22
|
+
id: string;
|
|
23
|
+
title: string;
|
|
24
|
+
Icon?: React.ComponentType;
|
|
25
|
+
};
|
|
26
|
+
export type GroupSecondaryActionConfig = {
|
|
27
|
+
SecondaryActionButtonIcon: React.ComponentType<{
|
|
28
|
+
group: ItemsGroup;
|
|
29
|
+
}>;
|
|
30
|
+
onClick(this: void, group: ItemsGroup): void;
|
|
31
|
+
};
|
|
32
|
+
export type ItemActionConfig = {
|
|
33
|
+
onClick(this: void, item: Item): void;
|
|
34
|
+
};
|
|
35
|
+
export type ItemSecondaryActionConfig = {
|
|
36
|
+
SecondaryActionButtonIcon: React.ComponentType<{
|
|
37
|
+
item: Item;
|
|
38
|
+
}>;
|
|
39
|
+
onClick(this: void, item: Item): void;
|
|
40
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AnyArray, RestApiHookState } from '../../../../../../utils/utility-types';
|
|
2
|
+
import { RestApiHookParams, SliceableRestApiHook, UnsliceableParams, Slice, DataChunk, HookExecutionStatus } from '../../types';
|
|
3
|
+
type UseLoadDataFromInternalHookOptions<HookParams extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray, Hook extends SliceableRestApiHook<HookParams, DataKey, SuccessDataType>> = {
|
|
4
|
+
hook: Hook;
|
|
5
|
+
params: UnsliceableParams<HookParams>;
|
|
6
|
+
sliceToLoad: Slice;
|
|
7
|
+
dataKey: DataKey;
|
|
8
|
+
};
|
|
9
|
+
type UseLoadDataFromInternalHookResult<DataKey extends string, SuccessDataType extends AnyArray> = {
|
|
10
|
+
dataChunk: DataChunk | null;
|
|
11
|
+
hookExecutionStatus: HookExecutionStatus;
|
|
12
|
+
dataLoadingError: Error | undefined;
|
|
13
|
+
hookResultState: RestApiHookState<DataKey, SuccessDataType>;
|
|
14
|
+
};
|
|
15
|
+
export declare function useLoadDataFromInternalHook<HookParams extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray, Hook extends SliceableRestApiHook<HookParams, DataKey, SuccessDataType>>(options: UseLoadDataFromInternalHookOptions<HookParams, DataKey, SuccessDataType, Hook>): UseLoadDataFromInternalHookResult<DataKey, SuccessDataType>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DataChunk, Slice } from '../../types';
|
|
2
|
+
export declare function useManageSliceToLoad({ initialCount, chunkSize, accumulatedData, shouldBeReset, }: {
|
|
3
|
+
initialCount: number;
|
|
4
|
+
chunkSize: number;
|
|
5
|
+
accumulatedData: DataChunk[];
|
|
6
|
+
shouldBeReset: boolean;
|
|
7
|
+
}): {
|
|
8
|
+
sliceToLoad: Slice;
|
|
9
|
+
increaseSliceToLoad: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AnyArray, RestApiHookState } from '../../../../../../utils/utility-types';
|
|
2
|
+
import { HookExecutionStatus, WithLoadMore } from '../../types';
|
|
3
|
+
export declare function getHookStateResult<DataKey extends string, SuccessDataType extends AnyArray>(options: {
|
|
4
|
+
status: HookExecutionStatus;
|
|
5
|
+
dataKey: DataKey;
|
|
6
|
+
data: SuccessDataType;
|
|
7
|
+
loadMore: () => void;
|
|
8
|
+
error?: Error;
|
|
9
|
+
}): WithLoadMore<RestApiHookState<DataKey, SuccessDataType>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { withLazyLoading } from './with-lazy-loading';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AnyArray, AnyObject, RestApiHookState } from '../../../../utils/utility-types';
|
|
2
|
+
export type Slice = {
|
|
3
|
+
count: number;
|
|
4
|
+
offset: number;
|
|
5
|
+
};
|
|
6
|
+
type Sliceable = Partial<Slice>;
|
|
7
|
+
type Enableable = {
|
|
8
|
+
enabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type RestApiHookParams = Sliceable & Enableable & AnyObject;
|
|
11
|
+
export type UnsliceableParams<Params extends RestApiHookParams> = Omit<Params, keyof Slice>;
|
|
12
|
+
export type LazyLoadingConfig = {
|
|
13
|
+
initialCount: number;
|
|
14
|
+
chunkSize: number;
|
|
15
|
+
dataKey: string;
|
|
16
|
+
};
|
|
17
|
+
export type SliceableRestApiHook<Params extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray> = (params: Params) => RestApiHookState<DataKey, SuccessDataType>;
|
|
18
|
+
export type WithLoadMore<ReturnObject> = ReturnObject & {
|
|
19
|
+
loadMore: () => void;
|
|
20
|
+
};
|
|
21
|
+
export type HookWithLazyLoading<HookParams extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray, Hook extends SliceableRestApiHook<HookParams, DataKey, SuccessDataType>> = (params: UnsliceableParams<HookParams>) => WithLoadMore<ReturnType<Hook>>;
|
|
22
|
+
export type DataChunk = {
|
|
23
|
+
slice: Slice;
|
|
24
|
+
data: AnyArray;
|
|
25
|
+
};
|
|
26
|
+
export type HookExecutionStatus = 'success' | 'error' | 'loading';
|
|
27
|
+
export {};
|
package/dist/packages/sdk-ui/src/common/hooks/decorators/with-lazy-loading/with-lazy-loading.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AnyArray } from '../../../../utils/utility-types';
|
|
2
|
+
import { LazyLoadingConfig, SliceableRestApiHook, HookWithLazyLoading, RestApiHookParams } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* A decorator that adds lazy loading functionality to a hook.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
export declare const withLazyLoading: (config: LazyLoadingConfig) => <HookParams extends RestApiHookParams, DataKey extends string, SuccessDataType extends AnyArray>(hook: SliceableRestApiHook<HookParams, DataKey, SuccessDataType>) => HookWithLazyLoading<HookParams, DataKey, SuccessDataType, SliceableRestApiHook<HookParams, DataKey, SuccessDataType>>;
|
package/dist/packages/sdk-ui/src/common/hooks/fusion-endpoints/use-get-data-source-fields.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RestApiHookState } from '../../../utils/utility-types';
|
|
2
|
+
import { DataSource, DataSourceField } from '@sisense/sdk-data';
|
|
3
|
+
/**
|
|
4
|
+
* Gets the fields of a data source.
|
|
5
|
+
*
|
|
6
|
+
* @param dataSource - The data source to get the fields for
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare const useGetDataSourceFields: (params: {
|
|
10
|
+
dataSource: DataSource | undefined;
|
|
11
|
+
enabled?: boolean;
|
|
12
|
+
count?: number;
|
|
13
|
+
offset?: number;
|
|
14
|
+
searchValue?: string;
|
|
15
|
+
}) => DataSourceFieldsState;
|
|
16
|
+
type DataSourceFieldsState = RestApiHookState<'dataSourceFields', DataSourceField[]>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DeepRequired } from 'ts-essentials';
|
|
2
|
+
import { AnyObject } from '../../utils/utility-types';
|
|
3
|
+
/**
|
|
4
|
+
* Merges the provided configuration with the default configuration.
|
|
5
|
+
* @param config - The configuration to merge with the default configuration.
|
|
6
|
+
* @param defaults - The default configuration.
|
|
7
|
+
* @returns The merged configuration.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDefaults: <Config extends AnyObject>(config: Config | undefined, defaults: DeepRequired<Config>) => DeepRequired<Config>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ApprovalIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const CloseIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DateAttributeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ElasticubeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NumericAttributeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PlusIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TableIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TextAttributeIcon: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,6 +10,13 @@ export interface ContentPanelProps {
|
|
|
10
10
|
* An object defining how the widgets should be laid out.
|
|
11
11
|
*/
|
|
12
12
|
layout?: WidgetsPanelLayout;
|
|
13
|
+
/**
|
|
14
|
+
* If true adjust layout based on available width of content panel.
|
|
15
|
+
*
|
|
16
|
+
* If not specified, the default value is `false`.
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
responsive?: boolean;
|
|
13
20
|
/**
|
|
14
21
|
* A list of widget props to render.
|
|
15
22
|
*/
|
|
@@ -21,4 +28,4 @@ export interface ContentPanelProps {
|
|
|
21
28
|
* @param props - {@link ContentPanelProps}
|
|
22
29
|
* @internal
|
|
23
30
|
*/
|
|
24
|
-
export declare const ContentPanel: ({ layout, widgets }: ContentPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const ContentPanel: ({ layout, responsive, widgets }: ContentPanelProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DashboardContainerProps } from '../../dashboard/types';
|
|
2
|
-
export declare const DashboardContainer: ({ title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource, onChange,
|
|
2
|
+
export declare const DashboardContainer: ({ title, layoutOptions, config, widgets, filters, onFiltersChange, defaultDataSource, onChange, }: DashboardContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import type { DeepRequired } from 'ts-essentials';
|
|
2
|
+
import { DashboardByIdConfig, DashboardConfig } from './types';
|
|
1
3
|
export declare const DASHBOARD_DIVIDER_COLOR = "#d5d5d5";
|
|
2
4
|
export declare const DASHBOARD_DIVIDER_WIDTH = 1;
|
|
5
|
+
export declare const DEFAULT_DASHBOARD_CONFIG: DeepRequired<DashboardConfig>;
|
|
6
|
+
export declare const DEFAULT_DASHBOARD_BY_ID_CONFIG: DeepRequired<DashboardByIdConfig>;
|