@sisense/sdk-ui 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/ai.js +2 -2
  2. package/dist/api/rest-api.d.ts +9 -0
  3. package/dist/app/settings/settings.d.ts +1 -0
  4. package/dist/areamap-chart.d.ts +28 -0
  5. package/dist/chart-data/areamap-data.d.ts +4 -0
  6. package/dist/chart-data/data-coloring/geo-data-coloring-function.d.ts +2 -0
  7. package/dist/chart-data/types.d.ts +29 -3
  8. package/dist/chart-data-options/translate-scattermap-data-options.d.ts +1 -1
  9. package/dist/chart-data-options/types.d.ts +23 -5
  10. package/dist/chart-options-processor/boxplot-chart-options.d.ts +2 -1
  11. package/dist/chart-options-processor/chart-options-service.d.ts +3 -1
  12. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-areamap-options.d.ts +3 -0
  13. package/dist/chart-options-processor/subtype-to-design-options.d.ts +4 -1
  14. package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +2 -1
  15. package/dist/chart-options-processor/translations/design-options.d.ts +7 -1
  16. package/dist/chart-options-processor/translations/types.d.ts +7 -3
  17. package/dist/charts/map-charts/areamap/alternative-country-names-dictionary.d.ts +9 -0
  18. package/dist/charts/map-charts/areamap/areamap-map.d.ts +16 -0
  19. package/dist/charts/map-charts/areamap/areamap.d.ts +16 -0
  20. package/dist/charts/map-charts/areamap/feature-styles-dictionary.d.ts +16 -0
  21. package/dist/charts/map-charts/areamap/use-geo-json.d.ts +9 -0
  22. package/dist/charts/map-charts/scattermap/hooks/use-locations.d.ts +3 -0
  23. package/dist/charts/{scattermap → map-charts/scattermap}/hooks/use-tooltip-handler.d.ts +2 -2
  24. package/dist/charts/{scattermap → map-charts/scattermap}/scattermap.d.ts +3 -3
  25. package/dist/charts/map-charts/scattermap/utils/color.d.ts +3 -0
  26. package/dist/charts/{scattermap → map-charts/scattermap}/utils/size.d.ts +1 -1
  27. package/dist/charts/{scattermap → map-charts/scattermap}/utils/tooltip.d.ts +2 -2
  28. package/dist/dashboard-widget/types.d.ts +5 -3
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +3362 -3403
  31. package/dist/props.d.ts +19 -2
  32. package/dist/table-widget-4275c061.js +77714 -0
  33. package/dist/translation/resources/en.d.ts +10 -0
  34. package/dist/translation/resources/index.d.ts +20 -0
  35. package/dist/types.d.ts +17 -5
  36. package/dist/utils/filters-comparator.d.ts +13 -1
  37. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  38. package/package.json +9 -6
  39. package/dist/charts/scattermap/hooks/use-locations.d.ts +0 -3
  40. package/dist/charts/scattermap/utils/color.d.ts +0 -3
  41. package/dist/table-widget-7936746a.js +0 -72481
  42. /package/dist/charts/{scattermap → map-charts/scattermap}/hooks/use-settings.d.ts +0 -0
  43. /package/dist/charts/{scattermap → map-charts/scattermap}/types.d.ts +0 -0
  44. /package/dist/charts/{scattermap → map-charts/scattermap}/utils/copyright.d.ts +0 -0
  45. /package/dist/charts/{scattermap → map-charts/scattermap}/utils/location.d.ts +0 -0
  46. /package/dist/charts/{scattermap → map-charts/scattermap}/utils/map.d.ts +0 -0
  47. /package/dist/charts/{scattermap → map-charts/scattermap}/utils/markers.d.ts +0 -0
  48. /package/dist/charts/{scattermap → map-charts/scattermap}/utils/values.d.ts +0 -0
@@ -18,6 +18,7 @@ export declare const translation: {
18
18
  };
19
19
  themeNotFound: string;
20
20
  paletteNotFound: string;
21
+ chartTypeNotSupported: string;
21
22
  unsupportedWidgetType: string;
22
23
  sisenseContextNotFound: string;
23
24
  dashboardInvalidIdentifier: string;
@@ -70,5 +71,14 @@ export declare const translation: {
70
71
  latestDate: string;
71
72
  todayOutOfRange: string;
72
73
  };
74
+ boxplot: {
75
+ tooltip: {
76
+ whiskers: string;
77
+ box: string;
78
+ min: string;
79
+ median: string;
80
+ max: string;
81
+ };
82
+ };
73
83
  };
74
84
  export type TranslationDictionary = typeof translation;
@@ -22,6 +22,7 @@ export declare const resources: {
22
22
  };
23
23
  themeNotFound: string;
24
24
  paletteNotFound: string;
25
+ chartTypeNotSupported: string;
25
26
  unsupportedWidgetType: string;
26
27
  sisenseContextNotFound: string;
27
28
  dashboardInvalidIdentifier: string;
@@ -74,6 +75,15 @@ export declare const resources: {
74
75
  latestDate: string;
75
76
  todayOutOfRange: string;
76
77
  };
78
+ boxplot: {
79
+ tooltip: {
80
+ whiskers: string;
81
+ box: string;
82
+ min: string;
83
+ median: string;
84
+ max: string;
85
+ };
86
+ };
77
87
  };
78
88
  uk: {
79
89
  errors: {
@@ -95,6 +105,7 @@ export declare const resources: {
95
105
  };
96
106
  themeNotFound: string;
97
107
  paletteNotFound: string;
108
+ chartTypeNotSupported: string;
98
109
  unsupportedWidgetType: string;
99
110
  sisenseContextNotFound: string;
100
111
  dashboardInvalidIdentifier: string;
@@ -147,5 +158,14 @@ export declare const resources: {
147
158
  latestDate: string;
148
159
  todayOutOfRange: string;
149
160
  };
161
+ boxplot: {
162
+ tooltip: {
163
+ whiskers: string;
164
+ box: string;
165
+ min: string;
166
+ median: string;
167
+ max: string;
168
+ };
169
+ };
150
170
  };
151
171
  };
package/dist/types.d.ts CHANGED
@@ -5,13 +5,14 @@ import { AreaSubtype, BoxplotSubtype, LineSubtype, PieSubtype, PolarSubtype, Sta
5
5
  import { IndicatorComponents } from './chart-options-processor/translations/design-options';
6
6
  import { FunnelDirection, FunnelSize, FunnelType } from './chart-options-processor/translations/funnel-plot-options';
7
7
  import { ScatterMarkerSize } from './chart-options-processor/translations/scatter-plot-options';
8
- import { CartesianChartType, ScatterChartType, CategoricalChartType, IndicatorChartType, TableType, BoxplotChartType, ScattermapChartType } from './chart-options-processor/translations/types';
8
+ import { CartesianChartType, ScatterChartType, CategoricalChartType, IndicatorChartType, TableType, AreamapChartType, BoxplotChartType, ScattermapChartType } from './chart-options-processor/translations/types';
9
9
  import { DataPointsEventHandler } from './props';
10
+ import { LegendPosition } from './chart-options-processor/translations/legend-section';
10
11
  export type { AppConfig } from './app/client-application';
11
12
  export type { DateConfig } from './query/date-formats';
12
13
  export type { CartesianChartDataOptions, CategoricalChartDataOptions, ChartDataOptions, ScatterChartDataOptions, IndicatorChartDataOptions, StyledColumn, StyledMeasureColumn, } from './chart-data-options/types';
13
14
  export type { DataColorCondition, ConditionalDataColorOptions, DataColorOptions, RangeDataColorOptions, UniformDataColorOptions, } from './chart-data/data-coloring/types';
14
- export type { CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, ScattermapChartType, TableType, AreaSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype, BoxplotSubtype, IndicatorComponents, ScatterMarkerSize, };
15
+ export type { CartesianChartType, CategoricalChartType, ScatterChartType, IndicatorChartType, BoxplotChartType, ScattermapChartType, AreamapChartType, TableType, AreaSubtype, LineSubtype, PieSubtype, PolarSubtype, StackableSubtype, BoxplotSubtype, IndicatorComponents, ScatterMarkerSize, LegendPosition, };
15
16
  export type { MonthOfYear, DayOfWeek, DateLevel } from './query/date-formats/apply-date-format';
16
17
  /**
17
18
  * @internal
@@ -60,7 +61,7 @@ export type Legend = {
60
61
  /** Boolean flag that defines if legend should be shown on the chart */
61
62
  enabled: boolean;
62
63
  /** Position of the legend */
63
- position?: string;
64
+ position?: LegendPosition;
64
65
  };
65
66
  /** Configuration that defines behavior of data labels on chart */
66
67
  export type Labels = {
@@ -377,6 +378,17 @@ export interface BoxplotStyleOptions extends BaseStyleOptions, BaseAxisStyleOpti
377
378
  /** Subtype of {@link BoxplotChart}*/
378
379
  subtype?: BoxplotSubtype;
379
380
  }
381
+ /**
382
+ * Type of map to display on {@link AreamapChart}
383
+ */
384
+ export type AreamapType = 'world' | 'usa';
385
+ /**
386
+ * Configuration options that define functional style of the various elements of {@link AreamapChart}
387
+ */
388
+ export interface AreamapStyleOptions extends Pick<BaseStyleOptions, 'width' | 'height'> {
389
+ /** Type of map to display on {@link AreamapChart} */
390
+ mapType?: AreamapType;
391
+ }
380
392
  /**
381
393
  * Markers style configuration of Scattermap chart
382
394
  */
@@ -401,7 +413,7 @@ export interface ScattermapStyleOptions extends Pick<BaseStyleOptions, 'width' |
401
413
  /**
402
414
  * Configuration options that define functional style of the various elements of chart.
403
415
  */
404
- export type ChartStyleOptions = LineStyleOptions | AreaStyleOptions | StackableStyleOptions | PieStyleOptions | FunnelStyleOptions | PolarStyleOptions | IndicatorStyleOptions | ScatterStyleOptions | TreemapStyleOptions | SunburstStyleOptions | BoxplotStyleOptions | ScattermapStyleOptions;
416
+ export type ChartStyleOptions = LineStyleOptions | AreaStyleOptions | StackableStyleOptions | PieStyleOptions | FunnelStyleOptions | PolarStyleOptions | IndicatorStyleOptions | ScatterStyleOptions | TreemapStyleOptions | SunburstStyleOptions | BoxplotStyleOptions | AreamapStyleOptions | ScattermapStyleOptions;
405
417
  /** Mapping of each of the chart value series to colors. */
406
418
  export type ValueToColorMap = {
407
419
  [value: string]: string;
@@ -413,7 +425,7 @@ export type MultiColumnValueToColorMap = {
413
425
  /**
414
426
  * Chart type of one of the supported chart families
415
427
  */
416
- export type ChartType = CartesianChartType | CategoricalChartType | ScatterChartType | IndicatorChartType | BoxplotChartType | ScattermapChartType;
428
+ export type ChartType = CartesianChartType | CategoricalChartType | ScatterChartType | IndicatorChartType | AreamapChartType | BoxplotChartType | ScattermapChartType;
417
429
  /**
418
430
  * Series chart type, which is used with {@link StyledMeasureColumn} to customize
419
431
  * series in a mixed chart.
@@ -1,4 +1,4 @@
1
- import { Filter } from '@sisense/sdk-data';
1
+ import { Filter, FilterRelation } from '@sisense/sdk-data';
2
2
  /**
3
3
  * Checks if the filters have changed by deep comparison.
4
4
  *
@@ -9,3 +9,15 @@ import { Filter } from '@sisense/sdk-data';
9
9
  * The function ignores randomly generated names of the filters.
10
10
  */
11
11
  export declare function isFiltersChanged(prevFilters: Filter[] | undefined, newFilters: Filter[] | undefined): boolean;
12
+ /**
13
+ * Checks if filter relations have changed by deep comparison.
14
+ *
15
+ * @param prevFilters - Previous filters
16
+ * @param newFilters - New filters
17
+ * @param prevRelations - Previous relations
18
+ * @param newRelations - New relations
19
+ * @returns Whether filter relations have changed
20
+ * @remarks
21
+ * The function ignores node swaps since this does not affect logical result.
22
+ */
23
+ export declare function isRelationsChanged(prevFilters: Filter[] | undefined, newFilters: Filter[] | undefined, prevRelations: FilterRelation | undefined, newRelations: FilterRelation | undefined): boolean;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  export declare const StyledPrevButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
4
- }, "style" | "children" | "size" | "disabled" | "className" | "tabIndex" | "color" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
4
+ }, "style" | "children" | "size" | "color" | "disabled" | "className" | "tabIndex" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
5
5
  theme?: import("@emotion/react").Theme | undefined;
6
6
  }, {}, {}>;
7
7
  export declare const StyledNextButton: import("@emotion/styled").StyledComponent<import("@mui/material/IconButton").IconButtonOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
8
8
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
9
- }, "style" | "children" | "size" | "disabled" | "className" | "tabIndex" | "color" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
9
+ }, "style" | "children" | "size" | "color" | "disabled" | "className" | "tabIndex" | "classes" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple" | "edge"> & {
10
10
  theme?: import("@emotion/react").Theme | undefined;
11
11
  }, {}, {}>;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "Sisense",
12
12
  "Compose SDK"
13
13
  ],
14
- "version": "1.0.0",
14
+ "version": "1.1.0",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -39,11 +39,11 @@
39
39
  "@emotion/react": "^11.10.5",
40
40
  "@emotion/styled": "^11.10.5",
41
41
  "@mui/material": "^5.11.6",
42
- "@sisense/sdk-common": "^1.0.0",
43
- "@sisense/sdk-data": "^1.0.0",
44
- "@sisense/sdk-query-client": "^1.0.0",
45
- "@sisense/sdk-rest-client": "^1.0.0",
46
- "@sisense/sdk-tracking": "^1.0.0",
42
+ "@sisense/sdk-common": "^1.1.0",
43
+ "@sisense/sdk-data": "^1.1.0",
44
+ "@sisense/sdk-query-client": "^1.1.0",
45
+ "@sisense/sdk-rest-client": "^1.1.0",
46
+ "@sisense/sdk-tracking": "^1.1.0",
47
47
  "@sisense/sisense-charts": "5.1.0-alpha-04052758.0",
48
48
  "@tanstack/react-query": "4.36.1",
49
49
  "classnames": "^2.3.2",
@@ -52,12 +52,14 @@
52
52
  "date-fns-tz": "^2.0.0",
53
53
  "dayjs": "^1.11.7",
54
54
  "fixed-data-table-2": "^1.2.18",
55
+ "geojson": "^0.5.0",
55
56
  "guid-typescript": "^1.0.9",
56
57
  "highcharts-react-official": "^3.2.1",
57
58
  "immer": "^10.0.2",
58
59
  "leaflet": "^1.9.4",
59
60
  "lodash": "^4.17.21",
60
61
  "merge-deep": "^3.0.3",
62
+ "proj4leaflet": "^1.0.2",
61
63
  "react-datepicker": "^4.16.0",
62
64
  "react-error-boundary": "^4.0.11",
63
65
  "react-i18next": "^13.2.2",
@@ -107,6 +109,7 @@
107
109
  "@types/fixed-data-table-2": "^0.8.8",
108
110
  "@types/leaflet": "^1.9.8",
109
111
  "@types/lodash": "^4.14.194",
112
+ "@types/proj4leaflet": "^1.0.10",
110
113
  "@types/react": "18.2.0",
111
114
  "@types/react-datepicker": "^4.11.2",
112
115
  "@types/react-dom": "18.2.0",
@@ -1,3 +0,0 @@
1
- import { Location } from '../types.js';
2
- import { ScattermapLocationLevel } from '../../../chart-data-options/types.js';
3
- export declare const useLocations: (locationsNames: string[], locationLevel: ScattermapLocationLevel) => Location[] | null;
@@ -1,3 +0,0 @@
1
- import { ScattermapChartLocation } from '../../../chart-data/types.js';
2
- import { DataColorOptions } from '../../../types.js';
3
- export declare function getLocationsMarkerColors(locations: ScattermapChartLocation[], colorOptions?: DataColorOptions): string[];