@sisense/sdk-ui 0.16.0 → 1.0.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 (123) hide show
  1. package/dist/ai/messages/get-widget-options.d.ts +3 -3
  2. package/dist/ai.js +334 -308
  3. package/dist/area-chart.d.ts +2 -2
  4. package/dist/bar-chart.d.ts +2 -2
  5. package/dist/boxplot-chart.d.ts +38 -0
  6. package/dist/boxplot-utils.d.ts +30 -0
  7. package/dist/chart-data/boxplot-data.d.ts +11 -0
  8. package/dist/chart-data/cartesian-data.d.ts +6 -3
  9. package/dist/chart-data/data-coloring/create-data-coloring-function.d.ts +7 -0
  10. package/dist/chart-data/data-coloring/index.d.ts +3 -0
  11. package/dist/chart-data/{series-data-color-service → data-coloring}/legend-color.d.ts +1 -1
  12. package/dist/chart-data/data-coloring/series-data-coloring-function.d.ts +11 -0
  13. package/dist/chart-data/indicator-data.d.ts +2 -2
  14. package/dist/chart-data/scatter-data.d.ts +2 -2
  15. package/dist/chart-data/scattermap-data.d.ts +4 -0
  16. package/dist/chart-data/types.d.ts +46 -1
  17. package/dist/chart-data-options/translate-boxplot-data-options.d.ts +7 -0
  18. package/dist/chart-data-options/translate-scattermap-data-options.d.ts +3 -0
  19. package/dist/chart-data-options/types.d.ts +122 -10
  20. package/dist/chart-data-options/utils.d.ts +6 -1
  21. package/dist/chart-options-processor/boxplot-chart-options.d.ts +10 -0
  22. package/dist/chart-options-processor/chart-options-service.d.ts +21 -5
  23. package/dist/chart-options-processor/style-to-design-options-translator/translate-style-to-design-options.d.ts +2 -2
  24. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +4 -2
  25. package/dist/chart-options-processor/subtype-to-design-options.d.ts +5 -2
  26. package/dist/chart-options-processor/theme-option-service.d.ts +0 -1
  27. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -2
  28. package/dist/chart-options-processor/translations/boxplot/boxplot-axis.d.ts +10 -0
  29. package/dist/chart-options-processor/translations/boxplot/boxplot-plot-options.d.ts +3 -0
  30. package/dist/chart-options-processor/translations/boxplot/boxplot-series.d.ts +5 -0
  31. package/dist/chart-options-processor/translations/boxplot/boxplot-tooltip.d.ts +3 -0
  32. package/dist/chart-options-processor/translations/design-options.d.ts +9 -2
  33. package/dist/chart-options-processor/translations/legend-section.d.ts +4 -3
  34. package/dist/chart-options-processor/translations/tooltip-utils.d.ts +5 -0
  35. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +5 -1
  36. package/dist/chart-options-processor/translations/types.d.ts +10 -2
  37. package/dist/chart-options-processor/translations/value-label-section.d.ts +2 -1
  38. package/dist/chart.d.ts +2 -2
  39. package/dist/charts/indicator/indicator-legacy-chart-data-options.d.ts +2 -2
  40. package/dist/charts/indicator/indicator-legacy-chart-options/indicator-legacy-chart-options.d.ts +2 -2
  41. package/dist/charts/indicator/indicator-legacy-chart-options/override-with-value-color.d.ts +2 -2
  42. package/dist/charts/scattermap/hooks/use-locations.d.ts +3 -0
  43. package/dist/charts/scattermap/hooks/use-settings.d.ts +5 -0
  44. package/dist/charts/scattermap/hooks/use-tooltip-handler.d.ts +14 -0
  45. package/dist/charts/scattermap/scattermap.d.ts +13 -0
  46. package/dist/charts/scattermap/types.d.ts +16 -0
  47. package/dist/charts/scattermap/utils/color.d.ts +3 -0
  48. package/dist/charts/scattermap/utils/copyright.d.ts +2 -0
  49. package/dist/charts/scattermap/utils/location.d.ts +5 -0
  50. package/dist/charts/scattermap/utils/map.d.ts +2 -0
  51. package/dist/charts/scattermap/utils/markers.d.ts +28 -0
  52. package/dist/charts/scattermap/utils/size.d.ts +2 -0
  53. package/dist/charts/scattermap/utils/tooltip.d.ts +8 -0
  54. package/dist/charts/scattermap/utils/values.d.ts +4 -0
  55. package/dist/charts/table/types.d.ts +1 -1
  56. package/dist/column-chart.d.ts +2 -2
  57. package/dist/common/components/loading-dots.d.ts +4 -0
  58. package/dist/dashboard-widget/translate-dashboard-filters.d.ts +1 -1
  59. package/dist/dashboard-widget/translate-panel-color-format.d.ts +1 -1
  60. package/dist/dashboard-widget/translate-widget-data-options.d.ts +4 -3
  61. package/dist/dashboard-widget/translate-widget-style-options.d.ts +2 -2
  62. package/dist/dashboard-widget/types.d.ts +26 -3
  63. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -4
  64. package/dist/decorators/component-decorators/as-sisense-component.d.ts +1 -0
  65. package/dist/filters/components/common/basic-input.d.ts +1 -1
  66. package/dist/filters/components/common/date-range-field-button.d.ts +3 -2
  67. package/dist/filters/components/common/dropdown.d.ts +1 -0
  68. package/dist/filters/components/common/filter-utils.d.ts +13 -0
  69. package/dist/filters/components/common/index.d.ts +1 -0
  70. package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +2 -1
  71. package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +0 -9
  72. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -2
  73. package/dist/filters/components/criteria-filter-tile/index.d.ts +0 -1
  74. package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +10 -8
  75. package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +4 -4
  76. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +1 -1
  77. package/dist/filters/components/date-filter/index.d.ts +1 -0
  78. package/dist/filters/components/date-filter/relative-date-filter-tile/index.d.ts +1 -0
  79. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-display.d.ts +14 -0
  80. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +36 -0
  81. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +26 -0
  82. package/dist/filters/components/filter-tile.d.ts +1 -1
  83. package/dist/filters/index.d.ts +1 -0
  84. package/dist/index.d.ts +3 -1
  85. package/dist/index.js +3804 -3927
  86. package/dist/indicator-canvas.d.ts +3 -3
  87. package/dist/indicator-chart.d.ts +4 -4
  88. package/dist/line-chart.d.ts +2 -2
  89. package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -0
  90. package/dist/models/dashboard/use-get-dashboard-models.d.ts +2 -1
  91. package/dist/models/widget/use-get-widget-model.d.ts +1 -0
  92. package/dist/models/widget/widget-model.d.ts +5 -4
  93. package/dist/pie-chart.d.ts +2 -2
  94. package/dist/polar-chart.d.ts +2 -2
  95. package/dist/props.d.ts +67 -62
  96. package/dist/query/execute-query.d.ts +1 -1
  97. package/dist/query-execution/execute-query-by-widget-id.d.ts +10 -2
  98. package/dist/query-execution/execute-query.d.ts +11 -4
  99. package/dist/query-execution/index.d.ts +1 -1
  100. package/dist/query-execution/types.d.ts +10 -8
  101. package/dist/query-execution/use-execute-csv-query.d.ts +4 -6
  102. package/dist/query-execution/use-execute-query-by-widget-id.d.ts +6 -2
  103. package/dist/query-execution/use-execute-query.d.ts +2 -2
  104. package/dist/scatter-chart.d.ts +4 -4
  105. package/dist/scattermap-chart.d.ts +36 -0
  106. package/dist/sunburst-chart.d.ts +1 -1
  107. package/dist/table/hooks/use-table-data.d.ts +3 -2
  108. package/dist/table/table.d.ts +2 -2
  109. package/dist/table-widget-7936746a.js +72481 -0
  110. package/dist/themes/theme-loader.d.ts +0 -1
  111. package/dist/translation/resources/en.d.ts +15 -0
  112. package/dist/translation/resources/index.d.ts +30 -0
  113. package/dist/treemap-chart.d.ts +2 -2
  114. package/dist/types.d.ts +76 -7
  115. package/dist/widgets/chart-widget-deprecated.d.ts +1 -1
  116. package/dist/widgets/chart-widget.d.ts +1 -1
  117. package/dist/widgets/common/drilldown.d.ts +12 -2
  118. package/dist/widgets/drilldown-widget.d.ts +2 -2
  119. package/package.json +19 -6
  120. package/dist/chart-data/series-data-color-service/index.d.ts +0 -3
  121. package/dist/chart-data/series-data-color-service/series-data-color-service.d.ts +0 -4
  122. package/dist/table-widget-5f3b1d03.js +0 -64456
  123. /package/dist/chart-data/{series-data-color-service → data-coloring}/types.d.ts +0 -0
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
  import dayjs from 'dayjs';
3
- export type SelectorMode = 'fromSelector' | 'toSelector';
3
+ export type SelectorMode = 'fromSelector' | 'toSelector' | 'pointSelector';
4
4
  export type DateRangeLimits = {
5
- maxDate: dayjs.Dayjs;
6
- minDate: dayjs.Dayjs;
5
+ maxDate?: dayjs.Dayjs;
6
+ minDate?: dayjs.Dayjs;
7
7
  };
8
8
  type DayjsDateRange = {
9
9
  from: dayjs.Dayjs;
@@ -11,10 +11,12 @@ type DayjsDateRange = {
11
11
  };
12
12
  export type CalendarDateSelectorProps = {
13
13
  selectorMode: SelectorMode;
14
- limit: DateRangeLimits;
15
- onDateRangeChanged: (dateRange: DayjsDateRange) => void;
16
- onSelectorModeChanged: (newSelectorMode: SelectorMode) => void;
17
- selectedDateRange: DayjsDateRange;
14
+ limit?: DateRangeLimits;
15
+ onDateRangeChanged?: (dateRange: DayjsDateRange) => void;
16
+ onSelectorModeChanged?: (newSelectorMode: SelectorMode) => void;
17
+ selectedDateRange?: DayjsDateRange;
18
+ onDateChanged?: (selectedDate: dayjs.Dayjs) => void;
19
+ selectedDate?: dayjs.Dayjs;
18
20
  };
19
- export declare function CalendarDateSelector({ selectedDateRange, limit, onDateRangeChanged, selectorMode, onSelectorModeChanged, }: CalendarDateSelectorProps): JSX.Element;
21
+ export declare function CalendarDateSelector({ selectedDateRange, limit, onDateRangeChanged, selectorMode, onSelectorModeChanged, onDateChanged, selectedDate, }: CalendarDateSelectorProps): JSX.Element;
20
22
  export {};
@@ -1,12 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import dayjs from 'dayjs';
3
- type ButtonId = 'earliest' | 'today' | 'latest';
3
+ export type ButtonId = 'earliest' | 'today' | 'latest';
4
4
  type QuickDateSelectionButtonsProps = {
5
5
  onDateSelected: (selectedDate: dayjs.Dayjs) => void;
6
6
  enabledButtons: ButtonId[];
7
- limit: {
8
- maxDate: dayjs.Dayjs;
9
- minDate: dayjs.Dayjs;
7
+ limit?: {
8
+ maxDate?: dayjs.Dayjs;
9
+ minDate?: dayjs.Dayjs;
10
10
  };
11
11
  };
12
12
  export declare const QuickDateSelectionButtons: (props: QuickDateSelectionButtonsProps) => JSX.Element;
@@ -49,7 +49,7 @@ export interface DateRangeFilterTileProps {
49
49
  * React example of configuring the date min max values and handling onChange event.
50
50
  * ```tsx
51
51
  * const [dateRangeFilter, setDateRangeFilter] = useState<Filter>(
52
- * filters.dateRange(DM.Commerce.Date.Years),
52
+ * filterFactory.dateRange(DM.Commerce.Date.Years),
53
53
  * );
54
54
  *
55
55
  * return (
@@ -1,2 +1,3 @@
1
1
  export * from './date-filter';
2
2
  export * from './date-range-filter-tile';
3
+ export * from './relative-date-filter-tile';
@@ -0,0 +1 @@
1
+ export { RelativeDateFilterTile, type RelativeDateFilterTileProps, } from './relative-date-filter-tile.js';
@@ -0,0 +1,14 @@
1
+ import { RelativeDateFilter } from '@sisense/sdk-data';
2
+ import { FunctionComponent } from 'react';
3
+ /**
4
+ * @internal
5
+ */
6
+ export type RelativeDateFilterDisplayProps = {
7
+ filter: RelativeDateFilter;
8
+ };
9
+ /**
10
+ * Displays a relative date filter as a human-readable string.
11
+ *
12
+ * @internal
13
+ */
14
+ export declare const RelativeDateFilterDisplay: FunctionComponent<RelativeDateFilterDisplayProps>;
@@ -0,0 +1,36 @@
1
+ /// <reference types="react" />
2
+ import { Filter } from '@sisense/sdk-data';
3
+ import { FilterVariant } from '../../common/index.js';
4
+ /**
5
+ * Props for {@link RelativeDateFilterTile}
6
+ */
7
+ export interface RelativeDateFilterTileProps {
8
+ /**Filter tile title */
9
+ title: string;
10
+ /** Relative date filter. */
11
+ filter: Filter;
12
+ /** Arrangement of the filter inputs. Use vertical for standard filter tiles and horizontal for toolbars */
13
+ arrangement?: FilterVariant;
14
+ /**
15
+ * Callback function that is called when the relative date filter object should be updated.
16
+ *
17
+ * @param filter - Relative date filter, or null for failure/disabled
18
+ */
19
+ onUpdate: (filter: Filter | null) => void;
20
+ /**
21
+ * Limit of the date range that can be selected.
22
+ */
23
+ limit?: {
24
+ maxDate: string;
25
+ minDate: string;
26
+ };
27
+ }
28
+ /**
29
+ * UI component that allows the user to filter date attributes according to
30
+ * a number of built-in operations defined in the relative date filter.
31
+ * Useful for filtering data by relative date ranges, such as "last 7 days" or "next 30 days from Date".
32
+ *
33
+ * @param props - Relative date filter tile props
34
+ * @returns Relative date filter tile component
35
+ */
36
+ export declare const RelativeDateFilterTile: import("react").FunctionComponent<RelativeDateFilterTileProps>;
@@ -0,0 +1,26 @@
1
+ import { Filter, RelativeDateFilter as RelativeDateFilterType } from '@sisense/sdk-data';
2
+ import { FilterVariant } from '../../common/index.js';
3
+ import { FunctionComponent } from 'react';
4
+ /**
5
+ * @internal
6
+ */
7
+ export interface RelativeDateFilterProps {
8
+ filter: RelativeDateFilterType;
9
+ arrangement?: FilterVariant;
10
+ onUpdate: (filter: Filter | null) => void;
11
+ disabled: boolean;
12
+ limit?: {
13
+ maxDate: string;
14
+ minDate: string;
15
+ };
16
+ }
17
+ /**
18
+ * @internal
19
+ */
20
+ export declare const RelativeDateFilter: FunctionComponent<RelativeDateFilterProps>;
21
+ export declare const DATE_OPS_MAP: {
22
+ [x: string]: string;
23
+ };
24
+ export declare const DATE_LEVELS_MAP: {
25
+ [x: string]: string;
26
+ };
@@ -1,5 +1,5 @@
1
1
  import type { FunctionComponent, ReactNode } from 'react';
2
- import { FilterVariant } from './criteria-filter-tile/criteria-filter-operations';
2
+ import { FilterVariant } from './common/filter-utils';
3
3
  interface Props {
4
4
  title: string;
5
5
  renderContent: (collapsed: boolean, tileDisabled: boolean) => ReactNode;
@@ -1,3 +1,4 @@
1
1
  export * from './components/member-filter-tile';
2
2
  export * from './components/date-filter';
3
3
  export * from './components/criteria-filter-tile';
4
+ export { type FilterVariant } from './components/common/filter-utils';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * @packageDocumentation
3
- * @beta
4
3
  */
5
4
  export { ClientApplication, createClientApplication } from './app/client-application';
6
5
  export * from './chart-data-options/types';
@@ -28,11 +27,14 @@ export * from './indicator-chart';
28
27
  export * from './table';
29
28
  export * from './treemap-chart';
30
29
  export * from './sunburst-chart';
30
+ export * from './boxplot-chart';
31
+ export * from './scattermap-chart';
31
32
  export * from './sisense-context/custom-sisense-context-provider';
32
33
  export * from './theme-provider/custom-theme-provider';
33
34
  export { getThemeSettingsByOid } from './themes/theme-loader';
34
35
  export { getDefaultThemeSettings } from './chart-options-processor/theme-option-service';
35
36
  export { useGetDashboardModel, useGetDashboardModels, getDashboardModel, getDashboardModels, useGetWidgetModel, getWidgetModel, type DashboardModel, type GetDashboardModelParams, type GetDashboardModelsParams, type DashboardModelState, type DashboardModelLoadingState, type DashboardModelSuccessState, type DashboardModelErrorState, type DashboardModelsState, type DashboardModelsLoadingState, type DashboardModelsSuccessState, type DashboardModelsErrorState, type WidgetModel, type WidgetDataOptions, type WidgetModelState, type WidgetModelLoadingState, type WidgetModelErrorState, type WidgetModelSuccessState, type GetWidgetModelParams, type GetDashboardModelOptions, type GetDashboardModelsOptions, } from './models';
37
+ export { boxWhiskerProcessResult } from './boxplot-utils';
36
38
  export * from './props';
37
39
  export * from './types';
38
40
  export * from './filters';