@sisense/sdk-ui 2.9.0 → 2.10.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 +31 -31
- package/dist/ai.js +27 -27
- package/dist/analytics-composer/node.cjs +3 -1
- package/dist/analytics-composer/node.js +514 -378
- package/dist/analytics-composer.cjs +1 -1
- package/dist/analytics-composer.js +6 -6
- package/dist/derive-chart-family-B1on_xkS.cjs +170 -0
- package/dist/derive-chart-family-BllGhqsW.js +29469 -0
- package/dist/{dimensions-CVJeJ8mi.cjs → dimensions-BYqdB-Q8.cjs} +1 -1
- package/dist/{dimensions-B2jz151s.js → dimensions-D-Z9sitz.js} +1 -1
- package/dist/execute-query-CABqVn7C.cjs +1 -0
- package/dist/{execute-query-agpyzZz6.js → execute-query-CGLL9vXX.js} +269 -247
- package/dist/index.cjs +25 -26
- package/dist/index.js +7945 -7469
- package/dist/index.umd.js +383 -374
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/common.d.ts +14 -0
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-dimensions.d.ts +2 -2
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-filters.d.ts +5 -5
- package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-measures.d.ts +3 -3
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +12 -0
- package/dist/packages/sdk-ui/src/calendar-heatmap-chart.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/calendar-heatmap-chart-builder.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/constants.d.ts +87 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data-options/data-options.d.ts +54 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/data.d.ts +33 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/design-options.d.ts +22 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/highcharts-options-builder.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/axes-options.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/chart-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/extras-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/index.d.ts +7 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/legend-options.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/plot-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/calendar-data-generator.d.ts +35 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/series-options/series-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/highchart-options-builder/options/tooltip-options.d.ts +9 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap-charts-grid.d.ts +26 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-heatmap.d.ts +17 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/calendar-pagination.d.ts +30 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/helpers.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/calendar-pagination/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/data-helpers.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/sizing-helpers.d.ts +25 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/helpers/view-helpers.d.ts +14 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/index.d.ts +4 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-chart-options.d.ts +55 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/hooks/use-calendar-heatmap-navigation.d.ts +33 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/renderer/index.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/calendar-heatmap-chart/types.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/data-options.d.ts +5 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/legend.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data-options.d.ts +22 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/helpers/data.d.ts +13 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/alerts/index.d.ts +5 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/data/index.d.ts +15 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/data-options/index.d.ts +32 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/design-options/index.d.ts +17 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/highchart-options/highcharts-options-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/pie-chart-builder.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/categoricals/pie-chart/types.d.ts +12 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/highcharts-based-chart-renderer.d.ts +2 -4
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/highcharts-based-chart-renderer/use-extra-config.d.ts +2 -0
- package/dist/packages/sdk-ui/src/chart/restructured-charts/highchart-based-charts/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/restructured-charts/types.d.ts +10 -9
- package/dist/packages/sdk-ui/src/chart-data/types.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart-data-options/translate-data-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart-data-options/types.d.ts +19 -2
- package/dist/packages/sdk-ui/src/chart-data-options/utils.d.ts +4 -4
- package/dist/packages/sdk-ui/src/chart-data-options/validate-data-options/validate-categorical-data-options.d.ts +14 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/cartesian/utils/series-processor.d.ts +4 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/{category-chart-options.d.ts → category-chart-options/category-chart-options.d.ts} +9 -5
- package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/funnel-chart-options.d.ts +15 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/pie-chart-options.d.ts +15 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/sunburst-chart-options.d.ts +17 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options/treemap-chart-options.d.ts +17 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/chart-options-service.d.ts +26 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/scatter-chart-options.d.ts +3 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +1 -3
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/axis-section.d.ts +6 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/design-options.d.ts +18 -4
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/legend-section.d.ts +28 -14
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/pie-series.d.ts +34 -6
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/translations-to-highcharts.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +50 -6
- package/dist/packages/sdk-ui/src/common/formatters/create-date-formatter.d.ts +10 -0
- package/dist/packages/sdk-ui/src/common/hooks/useDateFormatter.d.ts +7 -0
- package/dist/packages/sdk-ui/src/common/icons/double-arrow-end-icon.d.ts +6 -0
- package/dist/packages/sdk-ui/src/dashboard/components/editable-layout/utils.d.ts +0 -19
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/index.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-filters.d.ts +12 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-formatters.d.ts +18 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-handlers.d.ts +23 -0
- package/dist/packages/sdk-ui/src/dashboard/hooks/jtd/jtd-widget-transforms.d.ts +29 -0
- package/dist/packages/sdk-ui/src/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/pivot-table/formatters/header-cell-formatters/header-cell-value-formatter.d.ts +2 -1
- package/dist/packages/sdk-ui/src/pivot-table/formatters/types.d.ts +0 -1
- package/dist/packages/sdk-ui/src/polar-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/props.d.ts +72 -7
- package/dist/packages/sdk-ui/src/sisense-chart/types.d.ts +2 -2
- package/dist/packages/sdk-ui/src/theme-provider/default-theme-settings.d.ts +1 -0
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +11 -0
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +22 -0
- package/dist/packages/sdk-ui/src/types.d.ts +254 -16
- package/dist/packages/sdk-ui/src/utils/combine-handlers.d.ts +19 -0
- package/dist/packages/sdk-ui/src/utils/utility-types/transformer.d.ts +8 -0
- package/dist/packages/sdk-ui/src/widget-by-id/types.d.ts +4 -6
- package/dist/{types-BYUVZb6u.js → types-BRtWk8uC.js} +1 -1
- package/dist/{types-QUSMO7gF.cjs → types-Ds0KtTJF.cjs} +1 -1
- package/dist/use-common-filters-D8tEa9zb.js +91245 -0
- package/dist/use-common-filters-hw1WKPCY.cjs +844 -0
- package/dist/{widget-composer-CGp5yOny.cjs → widget-composer-B7zeAa_D.cjs} +1 -1
- package/dist/{widget-composer-BG4HonVl.js → widget-composer-DL0xPtlC.js} +3 -3
- package/package.json +9 -9
- package/dist/derive-chart-family-BLG1sO1D.js +0 -86946
- package/dist/derive-chart-family-QPmz5DJ3.cjs +0 -656
- package/dist/execute-query-Cp3se7Yb.cjs +0 -1
- package/dist/packages/sdk-ui/src/utils/__development-utils__/highcharts-options-builder-collector.d.ts +0 -61
- package/dist/packages/sdk-ui/src/utils/__development-utils__/input-output-collector.d.ts +0 -125
- package/dist/use-common-filters-DmdADAhl.cjs +0 -350
- package/dist/use-common-filters-wo5IRF5u.js +0 -31972
|
@@ -13,6 +13,20 @@ export declare function isMeasureElement(arg: QueryElement): arg is Measure;
|
|
|
13
13
|
export declare function getFactoryFunctionsMap(factoryName: string, factoryObject: Record<string, any>): Record<string, (...args: any[]) => any>;
|
|
14
14
|
export declare const measureFactoryFunctionsMap: Record<string, (...args: any[]) => any>;
|
|
15
15
|
export declare const filterFactoryFunctionsMap: Record<string, (...args: any[]) => any>;
|
|
16
|
+
/**
|
|
17
|
+
* Validates if a string is likely an attribute based on the actual table schema.
|
|
18
|
+
*
|
|
19
|
+
* @param str - The string to check
|
|
20
|
+
* @param tables - The normalized tables to check against
|
|
21
|
+
* @returns True if the string matches known table/column combinations
|
|
22
|
+
*/
|
|
23
|
+
export declare function validateLikelyAttribute(str: string, tables: NormalizedTable[]): {
|
|
24
|
+
isLikelyAttribute: true;
|
|
25
|
+
suggestion: string;
|
|
26
|
+
} | {
|
|
27
|
+
isLikelyAttribute: false;
|
|
28
|
+
suggestion?: never;
|
|
29
|
+
};
|
|
16
30
|
export declare function createAttribute(attributeName: string, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]): import("@sisense/sdk-data").Attribute | import("@sisense/sdk-data").LevelAttribute;
|
|
17
31
|
/**
|
|
18
32
|
* Recursively processes a parsed JSON object to execute filterFactory and measureFactory functions.
|
package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-dimensions.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Attribute, JaqlDataSourceForDto, JSONArray } from '@sisense/sdk-data';
|
|
2
|
-
import { NormalizedTable } from '../types.js';
|
|
3
|
-
export declare const translateDimensionsJSON: (dimensionsJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Attribute[]
|
|
2
|
+
import { NlqTranslationResult, NormalizedTable } from '../types.js';
|
|
3
|
+
export declare const translateDimensionsJSON: (dimensionsJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => NlqTranslationResult<Attribute[]>;
|
package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-filters.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Filter, FilterRelations, JaqlDataSourceForDto, JSONArray } from '@sisense/sdk-data';
|
|
2
|
-
import { NormalizedTable } from '../types.js';
|
|
2
|
+
import { NlqTranslationResult, NormalizedTable } from '../types.js';
|
|
3
3
|
import { ParsedFunctionCall } from './common.js';
|
|
4
4
|
/**
|
|
5
5
|
* Translate an array of JSON objects to filters
|
|
@@ -38,7 +38,7 @@ import { ParsedFunctionCall } from './common.js';
|
|
|
38
38
|
* @param tables - The tables to use for the filters
|
|
39
39
|
* @returns A Filter[] or FilterRelations object
|
|
40
40
|
*/
|
|
41
|
-
export declare const translateFiltersFromJSONFunctionCall: (filtersJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Filter[] | FilterRelations
|
|
42
|
-
export declare const translateFiltersJSON: (filtersJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Filter[] | FilterRelations
|
|
43
|
-
export declare const translateHighlightsFromJSONFunctionCall: (highlightsJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Filter[]
|
|
44
|
-
export declare const translateHighlightsJSON: (highlightsJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Filter[]
|
|
41
|
+
export declare const translateFiltersFromJSONFunctionCall: (filtersJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => NlqTranslationResult<Filter[] | FilterRelations>;
|
|
42
|
+
export declare const translateFiltersJSON: (filtersJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => NlqTranslationResult<Filter[] | FilterRelations>;
|
|
43
|
+
export declare const translateHighlightsFromJSONFunctionCall: (highlightsJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => NlqTranslationResult<Filter[]>;
|
|
44
|
+
export declare const translateHighlightsJSON: (highlightsJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => NlqTranslationResult<Filter[]>;
|
package/dist/packages/sdk-ui/src/analytics-composer/new-nlq-translator/translate-measures.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JaqlDataSourceForDto, JSONArray, Measure } from '@sisense/sdk-data';
|
|
2
|
-
import { NormalizedTable } from '../types.js';
|
|
2
|
+
import { NlqTranslationResult, NormalizedTable } from '../types.js';
|
|
3
3
|
import { ParsedFunctionCall } from './common.js';
|
|
4
4
|
/**
|
|
5
5
|
* Translate an array of JSON objects to measures
|
|
@@ -26,5 +26,5 @@ import { ParsedFunctionCall } from './common.js';
|
|
|
26
26
|
* @param tables - The tables to use for the measures
|
|
27
27
|
* @returns A Measure[] object
|
|
28
28
|
*/
|
|
29
|
-
export declare const translateMeasuresFromJSONFunctionCall: (measuresJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Measure[]
|
|
30
|
-
export declare const translateMeasuresJSON: (measuresJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => Measure[]
|
|
29
|
+
export declare const translateMeasuresFromJSONFunctionCall: (measuresJSON: ParsedFunctionCall[], dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => NlqTranslationResult<Measure[]>;
|
|
30
|
+
export declare const translateMeasuresJSON: (measuresJSON: JSONArray, dataSource: JaqlDataSourceForDto, tables: NormalizedTable[]) => NlqTranslationResult<Measure[]>;
|
|
@@ -316,4 +316,16 @@ export type NlqResponseJSON = {
|
|
|
316
316
|
filters: JSONArray;
|
|
317
317
|
highlights?: JSONArray;
|
|
318
318
|
};
|
|
319
|
+
/**
|
|
320
|
+
* Represents the result of a translation operation that can either succeed with data or fail with errors.
|
|
321
|
+
*
|
|
322
|
+
* @internal
|
|
323
|
+
*/
|
|
324
|
+
export type NlqTranslationResult<T> = {
|
|
325
|
+
success: true;
|
|
326
|
+
data: T;
|
|
327
|
+
} | {
|
|
328
|
+
success: false;
|
|
329
|
+
errors: string[];
|
|
330
|
+
};
|
|
319
331
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CalendarHeatmapChartProps } from './props';
|
|
3
|
+
/**
|
|
4
|
+
* A React component representing a calendar heatmap chart.
|
|
5
|
+
*
|
|
6
|
+
* @param props - Calendar Heatmap chart properties
|
|
7
|
+
* @returns Calendar Heatmap Chart component
|
|
8
|
+
* @group Charts
|
|
9
|
+
*
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
export declare const CalendarHeatmapChart: import("react").FunctionComponent<CalendarHeatmapChartProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChartBuilder } from '../../../../chart/restructured-charts/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Calendar heatmap chart builder configuration
|
|
4
|
+
*
|
|
5
|
+
* Provides a complete configuration for building calendar heatmap charts,
|
|
6
|
+
* including data processing, styling, and rendering capabilities.
|
|
7
|
+
*/
|
|
8
|
+
export declare const calendarHeatmapChartBuilder: ChartBuilder<'calendar-heatmap'>;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ViewType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Default calendar heatmap chart configuration constants
|
|
4
|
+
*/
|
|
5
|
+
export declare const CALENDAR_HEATMAP_DEFAULTS: {
|
|
6
|
+
/** Default cell size in pixels */
|
|
7
|
+
readonly CELL_SIZE: 50;
|
|
8
|
+
/** Default view type */
|
|
9
|
+
readonly VIEW_TYPE: ViewType.MONTH;
|
|
10
|
+
/** Default color for days without data */
|
|
11
|
+
readonly NO_DATA_COLOR: "rgb(245, 245, 245)";
|
|
12
|
+
/** Transparent color for empty calendar cells */
|
|
13
|
+
readonly EMPTY_CELL_COLOR: "transparent";
|
|
14
|
+
/** Default chart background color */
|
|
15
|
+
readonly BACKGROUND_COLOR: "white";
|
|
16
|
+
/** Default border width for cells */
|
|
17
|
+
readonly BORDER_WIDTH: 0;
|
|
18
|
+
/** Minimum cell size for showing data labels */
|
|
19
|
+
readonly MIN_CELL_SIZE_FOR_LABELS: 10;
|
|
20
|
+
/** Total cells in a full calendar grid (6 rows × 7 days) */
|
|
21
|
+
readonly TOTAL_CALENDAR_CELLS: 42;
|
|
22
|
+
/** Days in a week */
|
|
23
|
+
readonly DAYS_IN_WEEK: 7;
|
|
24
|
+
/** Maximum calendar rows */
|
|
25
|
+
readonly MAX_CALENDAR_ROWS: 6;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Calendar heatmap color scheme configuration
|
|
29
|
+
*/
|
|
30
|
+
export declare const CALENDAR_HEATMAP_COLORS: {
|
|
31
|
+
/** Color stops for the heatmap gradient */
|
|
32
|
+
readonly GRADIENT_STOPS: readonly [[number, string], [number, string], [number, string]];
|
|
33
|
+
/** Default text color */
|
|
34
|
+
readonly TEXT_COLOR: "#333";
|
|
35
|
+
/** Border color for tooltips */
|
|
36
|
+
readonly TOOLTIP_BORDER_COLOR: "#c0c0c0";
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Calendar layout configuration
|
|
40
|
+
*/
|
|
41
|
+
export declare const CALENDAR_LAYOUT: {
|
|
42
|
+
/** Weekday abbreviations for calendar header */
|
|
43
|
+
readonly WEEKDAY_LABELS: readonly ["S", "M", "T", "W", "T", "F", "S"];
|
|
44
|
+
/** Margin calculations based on cell size */
|
|
45
|
+
readonly MARGIN_RATIOS: {
|
|
46
|
+
readonly TOP: 0.8;
|
|
47
|
+
readonly BOTTOM: 0.4;
|
|
48
|
+
readonly LEFT: 0.3;
|
|
49
|
+
readonly RIGHT: 0.3;
|
|
50
|
+
};
|
|
51
|
+
/** Minimum margin values */
|
|
52
|
+
readonly MIN_MARGINS: {
|
|
53
|
+
readonly TOP: 60;
|
|
54
|
+
readonly BOTTOM: 30;
|
|
55
|
+
readonly LEFT: 20;
|
|
56
|
+
readonly RIGHT: 20;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Font size and spacing calculations
|
|
61
|
+
*/
|
|
62
|
+
export declare const CALENDAR_TYPOGRAPHY: {
|
|
63
|
+
/** Font size ratio relative to cell size */
|
|
64
|
+
readonly FONT_SIZE_RATIO: 0.2;
|
|
65
|
+
/** Minimum font size */
|
|
66
|
+
readonly MIN_FONT_SIZE: 10;
|
|
67
|
+
/** Maximum font size */
|
|
68
|
+
readonly MAX_FONT_SIZE: 24;
|
|
69
|
+
/** Label position adjustment ratio */
|
|
70
|
+
readonly LABEL_Y_OFFSET_RATIO: 0.08;
|
|
71
|
+
/** Axis label position ratio */
|
|
72
|
+
readonly AXIS_LABEL_Y_RATIO: 0.3;
|
|
73
|
+
/** Axis offset ratio */
|
|
74
|
+
readonly AXIS_OFFSET_RATIO: 0.4;
|
|
75
|
+
/** Axis label font size ratio */
|
|
76
|
+
readonly AXIS_FONT_SIZE_RATIO: 0.24;
|
|
77
|
+
/** Minimum axis font size */
|
|
78
|
+
readonly MIN_AXIS_FONT_SIZE: 12;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Calendar heatmap data type
|
|
82
|
+
*/
|
|
83
|
+
export declare const CALENDAR_HEATMAP_DATA_TYPE: "calendar-heatmap";
|
|
84
|
+
/**
|
|
85
|
+
* Full month date format
|
|
86
|
+
*/
|
|
87
|
+
export declare const FULL_MONTH_DATE_FORMAT = "MMMM";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Attribute, Measure } from '@sisense/sdk-data';
|
|
2
|
+
import { CalendarHeatmapChartDataOptions, CalendarHeatmapChartDataOptionsInternal } from '../../../../../chart-data-options/types';
|
|
3
|
+
import { ChartDataOptions } from '../../../../../types';
|
|
4
|
+
import { ChartDataOptionsInternal } from '../../../../../chart-data-options/types';
|
|
5
|
+
/**
|
|
6
|
+
* Translates calendar heatmap chart data options from user format to internal format
|
|
7
|
+
*
|
|
8
|
+
* Converts user-provided data options to the internal format used by the chart engine,
|
|
9
|
+
* applying default date formatting and normalizing columns.
|
|
10
|
+
*
|
|
11
|
+
* @param dataOptions - User-provided calendar heatmap chart data options
|
|
12
|
+
* @returns Normalized internal data options
|
|
13
|
+
*/
|
|
14
|
+
export declare function translateCalendarHeatmapChartDataOptions(dataOptions: CalendarHeatmapChartDataOptions): CalendarHeatmapChartDataOptionsInternal;
|
|
15
|
+
/**
|
|
16
|
+
* Extracts attributes from calendar heatmap chart data options
|
|
17
|
+
*
|
|
18
|
+
* Returns an array of attributes that can be used for data queries.
|
|
19
|
+
* For calendar heatmaps, this typically includes the date attribute.
|
|
20
|
+
*
|
|
21
|
+
* @param dataOptions - Internal calendar heatmap chart data options
|
|
22
|
+
* @returns Array of attributes extracted from the data options
|
|
23
|
+
*/
|
|
24
|
+
export declare function getCalendarHeatmapAttributes(dataOptions: CalendarHeatmapChartDataOptionsInternal): Attribute[];
|
|
25
|
+
/**
|
|
26
|
+
* Extracts measures from calendar heatmap chart data options
|
|
27
|
+
*
|
|
28
|
+
* Returns an array of measures that can be used for data queries.
|
|
29
|
+
* For calendar heatmaps, this typically includes the value measure.
|
|
30
|
+
*
|
|
31
|
+
* @param dataOptions - Internal calendar heatmap chart data options
|
|
32
|
+
* @returns Array of measures extracted from the data options
|
|
33
|
+
*/
|
|
34
|
+
export declare function getCalendarHeatmapMeasures(dataOptions: CalendarHeatmapChartDataOptionsInternal): Measure[];
|
|
35
|
+
/**
|
|
36
|
+
* Type guard to check if data options are valid for calendar heatmap charts
|
|
37
|
+
*
|
|
38
|
+
* Validates that the provided data options contain the required properties
|
|
39
|
+
* for calendar heatmap charts (date and value).
|
|
40
|
+
*
|
|
41
|
+
* @param dataOptions - Data options to validate
|
|
42
|
+
* @returns True if the data options are valid for calendar heatmap charts
|
|
43
|
+
*/
|
|
44
|
+
export declare function isCalendarHeatmapChartDataOptions(dataOptions: ChartDataOptions): dataOptions is CalendarHeatmapChartDataOptions;
|
|
45
|
+
/**
|
|
46
|
+
* Type guard to check if internal data options are valid for calendar heatmap charts
|
|
47
|
+
*
|
|
48
|
+
* Validates that the provided internal data options contain the required properties
|
|
49
|
+
* and are properly structured for calendar heatmap charts.
|
|
50
|
+
*
|
|
51
|
+
* @param dataOptions - Internal data options to validate
|
|
52
|
+
* @returns True if the internal data options are valid for calendar heatmap charts
|
|
53
|
+
*/
|
|
54
|
+
export declare function isCalendarHeatmapChartDataOptionsInternal(dataOptions: ChartDataOptionsInternal): dataOptions is CalendarHeatmapChartDataOptionsInternal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './data-options.js';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { DataTable } from '../../../../chart-data-processor/table-processor';
|
|
2
|
+
import { CalendarHeatmapChartDataOptionsInternal } from '../../../../chart-data-options/types';
|
|
3
|
+
import { ChartData } from '../../../../chart-data/types';
|
|
4
|
+
export type CalendarHeatmapDataValue = {
|
|
5
|
+
date: Date;
|
|
6
|
+
value?: number;
|
|
7
|
+
blur?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type CalendarHeatmapChartData = {
|
|
10
|
+
type: 'calendar-heatmap';
|
|
11
|
+
values: CalendarHeatmapDataValue[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Converts a data table to calendar heatmap chart data format
|
|
15
|
+
*
|
|
16
|
+
* Transforms raw data table rows into the specific format required for calendar heatmap visualization,
|
|
17
|
+
* extracting date and value pairs from the configured columns.
|
|
18
|
+
*
|
|
19
|
+
* @param chartDataOptions - Internal data options specifying which columns to use
|
|
20
|
+
* @param dataTable - Raw data table containing the source data
|
|
21
|
+
* @returns Formatted calendar heatmap chart data
|
|
22
|
+
|
|
23
|
+
*/
|
|
24
|
+
export declare function getCalendarHeatmapChartData(chartDataOptions: CalendarHeatmapChartDataOptionsInternal, dataTable: DataTable): CalendarHeatmapChartData;
|
|
25
|
+
/**
|
|
26
|
+
* Type guard to check if chart data is calendar heatmap chart data
|
|
27
|
+
*
|
|
28
|
+
* Validates that the provided chart data is specifically formatted for calendar heatmap charts.
|
|
29
|
+
*
|
|
30
|
+
* @param chartData - Chart data to validate
|
|
31
|
+
* @returns True if the chart data is calendar heatmap chart data
|
|
32
|
+
*/
|
|
33
|
+
export declare function isCalendarHeatmapChartData(chartData: ChartData): chartData is CalendarHeatmapChartData;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CalendarHeatmapStyleOptions, ChartStyleOptions } from '../../../../types';
|
|
2
|
+
import { DesignOptions } from '../../../../chart-options-processor/translations/types';
|
|
3
|
+
/**
|
|
4
|
+
* Translates calendar heatmap style options to design options
|
|
5
|
+
*
|
|
6
|
+
* Converts user-provided style options to the internal design options format
|
|
7
|
+
* used by the chart engine, applying default values where necessary.
|
|
8
|
+
*
|
|
9
|
+
* @param styleOptions - User-provided calendar heatmap style options
|
|
10
|
+
* @returns Translated design options for internal use
|
|
11
|
+
*/
|
|
12
|
+
export declare function translateCalendarHeatmapStyleOptionsToDesignOptions(styleOptions: CalendarHeatmapStyleOptions): DesignOptions<'calendar-heatmap'>;
|
|
13
|
+
/**
|
|
14
|
+
* Type guard to check if style options are valid for calendar heatmap charts
|
|
15
|
+
*
|
|
16
|
+
* Validates that the provided style options are properly structured for calendar heatmap charts.
|
|
17
|
+
* Since all style options are optional, this primarily checks for basic object structure.
|
|
18
|
+
*
|
|
19
|
+
* @param styleOptions - Style options to validate
|
|
20
|
+
* @returns True if the style options are valid for calendar heatmap charts
|
|
21
|
+
*/
|
|
22
|
+
export declare function isCalendarHeatmapStyleOptions(styleOptions: ChartStyleOptions): styleOptions is CalendarHeatmapStyleOptions;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HighchartsOptionsBuilder } from '../../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Main Highcharts options builder for calendar heatmap charts
|
|
4
|
+
*
|
|
5
|
+
* Combines all individual configuration builders to create complete
|
|
6
|
+
* Highcharts options for calendar heatmap visualization.
|
|
7
|
+
*/
|
|
8
|
+
export declare const calendarHeatmapHighchartsOptionsBuilder: HighchartsOptionsBuilder<'calendar-heatmap'>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { calendarHeatmapHighchartsOptionsBuilder } from './highcharts-options-builder.js';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HighchartsOptionsInternal } from '../../../../../../chart-options-processor/chart-options-service.js';
|
|
2
|
+
import { BuildContext } from '../../../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Prepares the Highcharts's axes options for calendar heatmap
|
|
5
|
+
*
|
|
6
|
+
* @param ctx - The highcharts options builder context
|
|
7
|
+
* @returns Axes configuration object with xAxis and yAxis
|
|
8
|
+
*/
|
|
9
|
+
export declare function getAxesOptions(ctx: BuildContext<'calendar-heatmap'>): {
|
|
10
|
+
xAxis: HighchartsOptionsInternal['xAxis'];
|
|
11
|
+
yAxis: HighchartsOptionsInternal['yAxis'];
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HighchartsOptionsInternal } from '../../../../../../chart-options-processor/chart-options-service.js';
|
|
2
|
+
import { BuildContext } from '../../../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Prepares the Highcharts's chart options for calendar heatmap
|
|
5
|
+
*
|
|
6
|
+
* @param ctx - The highcharts options builder context
|
|
7
|
+
* @returns Highchart's chart options object
|
|
8
|
+
*/
|
|
9
|
+
export declare function getChartOptions(ctx: BuildContext<'calendar-heatmap'>): HighchartsOptionsInternal['chart'];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BuildContext } from '../../../types.js';
|
|
2
|
+
import { HighchartsOptionsInternal } from '../../../../../../chart-options-processor/chart-options-service.js';
|
|
3
|
+
/**
|
|
4
|
+
* Prepares the Highcharts's extras options (title, colorAxis, accessibility) for calendar heatmap
|
|
5
|
+
*
|
|
6
|
+
* @param ctx - The highcharts options builder context
|
|
7
|
+
* @returns Extras options object
|
|
8
|
+
*/
|
|
9
|
+
export declare function getExtrasOptions(ctx: BuildContext<'calendar-heatmap'>): Partial<HighchartsOptionsInternal>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { getAxesOptions } from './axes-options.js';
|
|
2
|
+
export { getChartOptions } from './chart-options.js';
|
|
3
|
+
export { getExtrasOptions } from './extras-options.js';
|
|
4
|
+
export { getLegendOptions } from './legend-options.js';
|
|
5
|
+
export { getPlotOptions } from './plot-options.js';
|
|
6
|
+
export { getSeriesOptions } from './series-options';
|
|
7
|
+
export { getTooltipOptions } from './tooltip-options.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HighchartsOptionsInternal } from '../../../../../../chart-options-processor/chart-options-service';
|
|
2
|
+
/**
|
|
3
|
+
* Prepares the Highcharts's legend options for calendar heatmap
|
|
4
|
+
*
|
|
5
|
+
* @param ctx - The highcharts options builder context
|
|
6
|
+
* @returns Legend options object
|
|
7
|
+
*/
|
|
8
|
+
export declare function getLegendOptions(): HighchartsOptionsInternal['legend'];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HighchartsOptionsInternal } from '../../../../../../chart-options-processor/chart-options-service';
|
|
2
|
+
import { BuildContext } from '../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Prepares the Highcharts's plot options for calendar heatmap
|
|
5
|
+
*
|
|
6
|
+
* @param ctx - The highcharts options builder context
|
|
7
|
+
* @returns Plot options object
|
|
8
|
+
*/
|
|
9
|
+
export declare function getPlotOptions(ctx: BuildContext<'calendar-heatmap'>): HighchartsOptionsInternal['plotOptions'];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CalendarHeatmapChartData } from '../../../data.js';
|
|
2
|
+
import { DateFormatter } from '../../../../../../../common/formatters/create-date-formatter.js';
|
|
3
|
+
/**
|
|
4
|
+
* Represents a calendar chart data point for Highcharts
|
|
5
|
+
*/
|
|
6
|
+
export interface CalendarChartDataPoint {
|
|
7
|
+
/** X coordinate (day of week, 0-6) */
|
|
8
|
+
x: number;
|
|
9
|
+
/** Y coordinate (week row, 0-5) */
|
|
10
|
+
y: number;
|
|
11
|
+
/** Data value or null for empty cells */
|
|
12
|
+
value: number | null;
|
|
13
|
+
/** Date timestamp or null for empty cells */
|
|
14
|
+
date: number | null;
|
|
15
|
+
/** Date string for tooltip display */
|
|
16
|
+
dateString?: string;
|
|
17
|
+
/** Custom color override */
|
|
18
|
+
color?: string;
|
|
19
|
+
/** Custom properties for the data point */
|
|
20
|
+
custom: {
|
|
21
|
+
/** Day of the month (1-31) */
|
|
22
|
+
monthDay?: number;
|
|
23
|
+
/** Whether this cell has data */
|
|
24
|
+
hasData?: boolean;
|
|
25
|
+
/** Whether this is an empty calendar cell */
|
|
26
|
+
empty?: boolean;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Generates calendar chart data for an entire month with provided data values
|
|
31
|
+
*
|
|
32
|
+
* @param dataPoints - Array of data points with dates and values
|
|
33
|
+
* @returns Array of calendar chart data points formatted for Highcharts
|
|
34
|
+
*/
|
|
35
|
+
export declare function generateCalendarChartData(data: CalendarHeatmapChartData, dateFormatter: DateFormatter): CalendarChartDataPoint[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getSeriesOptions } from './series-options.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HighchartsOptionsInternal } from '../../../../../../../chart-options-processor/chart-options-service.js';
|
|
2
|
+
import { BuildContext } from '../../../../types.js';
|
|
3
|
+
/**
|
|
4
|
+
* Prepares the Highcharts's series options for calendar heatmap
|
|
5
|
+
*
|
|
6
|
+
* @param ctx - The highcharts options builder context
|
|
7
|
+
* @returns Array of series options
|
|
8
|
+
*/
|
|
9
|
+
export declare function getSeriesOptions(ctx: BuildContext<'calendar-heatmap'>): HighchartsOptionsInternal['series'];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BuildContext } from '../../../types.js';
|
|
2
|
+
import { HighchartsOptionsInternal } from '../../../../../../chart-options-processor/chart-options-service.js';
|
|
3
|
+
/**
|
|
4
|
+
* Prepares the Highcharts's tooltip options for calendar heatmap
|
|
5
|
+
*
|
|
6
|
+
* @param ctx - The highcharts options builder context
|
|
7
|
+
* @returns Tooltip options object
|
|
8
|
+
*/
|
|
9
|
+
export declare function getTooltipOptions(ctx: BuildContext<'calendar-heatmap'>): HighchartsOptionsInternal['tooltip'];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HighchartsOptionsInternal } from '../../../../../chart-options-processor/chart-options-service';
|
|
3
|
+
import { MonthInfo } from './helpers/view-helpers.js';
|
|
4
|
+
import { CalendarHeatmapViewType } from '../../../../../types';
|
|
5
|
+
export declare const ChartsContainer: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
7
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
8
|
+
} & {
|
|
9
|
+
viewType: CalendarHeatmapViewType;
|
|
10
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
export declare const ChartWrapper: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
14
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
|
+
export declare const ChartTitle: import("@emotion/styled").StyledComponent<{
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
18
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {}>;
|
|
19
|
+
interface CalendarHeatmapChartsGridProps {
|
|
20
|
+
monthCharts: (HighchartsOptionsInternal | null)[];
|
|
21
|
+
availableMonths: MonthInfo[];
|
|
22
|
+
currentViewIndex: number;
|
|
23
|
+
viewType: CalendarHeatmapViewType;
|
|
24
|
+
}
|
|
25
|
+
export declare const CalendarHeatmapChartsGrid: React.FC<CalendarHeatmapChartsGridProps>;
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { HighchartsBasedChartRendererProps } from '../../highcharts-based-chart-renderer/highcharts-based-chart-renderer.js';
|
|
3
|
+
import { ChartRendererProps } from '../../../../../chart/types.js';
|
|
4
|
+
export declare const ChartRootContainer: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
7
|
+
} & {
|
|
8
|
+
containerWidth?: number | undefined;
|
|
9
|
+
containerHeight?: number | undefined;
|
|
10
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
export declare const ChartsWrapper: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
14
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
|
+
export type CalendarHeatmapProps = HighchartsBasedChartRendererProps<'calendar-heatmap'>;
|
|
16
|
+
export declare function CalendarHeatmap({ chartData, dataOptions, designOptions, onDataPointClick, onDataPointContextMenu, onDataPointsSelected, onBeforeRender, size, }: CalendarHeatmapProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const isCalendarHeatmapProps: (props: ChartRendererProps) => props is CalendarHeatmapProps;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MonthInfo } from '../helpers/view-helpers.js';
|
|
3
|
+
import { CalendarHeatmapViewType } from '../../../../../../types.js';
|
|
4
|
+
export declare const PaginationContainer: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
7
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
+
export declare const NavigationButton: import("@emotion/styled").StyledComponent<{
|
|
9
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
11
|
+
} & {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
}, React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
|
|
14
|
+
export declare const ViewDisplay: import("@emotion/styled").StyledComponent<{
|
|
15
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
17
|
+
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
+
interface CalendarPaginationProps {
|
|
19
|
+
currentViewIndex: number;
|
|
20
|
+
availableMonths: MonthInfo[];
|
|
21
|
+
viewType: CalendarHeatmapViewType;
|
|
22
|
+
onGoToFirst: () => void;
|
|
23
|
+
onGoToPrevious: () => void;
|
|
24
|
+
onGoToNext: () => void;
|
|
25
|
+
onGoToLast: () => void;
|
|
26
|
+
onGoToPreviousGroup?: () => void;
|
|
27
|
+
onGoToNextGroup?: () => void;
|
|
28
|
+
}
|
|
29
|
+
export declare const CalendarPagination: React.FC<CalendarPaginationProps>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CalendarPagination } from './calendar-pagination.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MonthInfo } from './view-helpers.js';
|
|
2
|
+
import { CalendarHeatmapChartData } from '../../data.js';
|
|
3
|
+
export declare function filterChartDataForMonth(chartData: CalendarHeatmapChartData, targetYear: number, targetMonth: number): CalendarHeatmapChartData;
|
|
4
|
+
export declare function filterChartDataForMonths(chartData: CalendarHeatmapChartData, months: MonthInfo[]): CalendarHeatmapChartData;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CalendarHeatmapViewType } from '../../../../../../types.js';
|
|
2
|
+
export interface CalendarSize {
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
cellSize: number;
|
|
6
|
+
chartMargins: {
|
|
7
|
+
top: number;
|
|
8
|
+
right: number;
|
|
9
|
+
bottom: number;
|
|
10
|
+
left: number;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export interface ContainerSize {
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Calculate optimal calendar size based on available container space
|
|
19
|
+
* Ensures calendar cells are perfectly square (width = height)
|
|
20
|
+
*/
|
|
21
|
+
export declare function calculateCalendarSize(containerSize: ContainerSize, viewType: CalendarHeatmapViewType): CalendarSize;
|
|
22
|
+
/**
|
|
23
|
+
* Get optimal gap size based on container size and view type
|
|
24
|
+
*/
|
|
25
|
+
export declare function calculateOptimalGap(containerSize: ContainerSize, viewType: CalendarHeatmapViewType): number;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { CalendarHeatmapChartData } from '../../data';
|
|
2
|
+
import { CalendarHeatmapViewType } from '../../../../../../types';
|
|
3
|
+
export interface MonthInfo {
|
|
4
|
+
year: number;
|
|
5
|
+
month: number;
|
|
6
|
+
monthName: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function getAvailableMonths(chartData: CalendarHeatmapChartData, dateFormatter: (date: Date, format: string) => string): MonthInfo[];
|
|
9
|
+
export declare function getMonthsPerView(viewType: CalendarHeatmapViewType): number;
|
|
10
|
+
export declare function getGridLayout(viewType: CalendarHeatmapViewType): {
|
|
11
|
+
columns: string;
|
|
12
|
+
rows: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function getDisplayMonths(availableMonths: MonthInfo[], currentViewIndex: number, viewType: CalendarHeatmapViewType): MonthInfo[];
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { useCalendarHeatmapNavigation } from './use-calendar-heatmap-navigation.js';
|
|
2
|
+
export { useCalendarHeatmapChartOptions } from './use-calendar-heatmap-chart-options.js';
|
|
3
|
+
export type { CalendarHeatmapNavigationResult } from './use-calendar-heatmap-navigation.js';
|
|
4
|
+
export type { UseCalendarHeatmapChartOptionsParams } from './use-calendar-heatmap-chart-options.js';
|