@sisense/sdk-ui 1.13.0 → 1.14.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 (47) hide show
  1. package/dist/ai/ai-context-provider.d.ts +1 -1
  2. package/dist/ai/api/chat-rest-api.d.ts +8 -8
  3. package/dist/ai/chat-config.d.ts +4 -3
  4. package/dist/ai/chat-home.d.ts +2 -1
  5. package/dist/ai/chatbot.d.ts +1 -1
  6. package/dist/ai/get-nlg-query-result.d.ts +1 -1
  7. package/dist/ai/use-get-nlg-query-result.d.ts +1 -1
  8. package/dist/ai/use-get-query-recommendations.d.ts +1 -1
  9. package/dist/ai.cjs +67 -75
  10. package/dist/ai.js +593 -614
  11. package/dist/api/rest-api.d.ts +7 -7
  12. package/dist/api/types/dashboard-dto.d.ts +2 -0
  13. package/dist/chart-options-processor/translations/axis-section.d.ts +1 -0
  14. package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +2 -0
  15. package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +2 -0
  16. package/dist/common-filters/types.d.ts +4 -0
  17. package/dist/common-filters/utils.d.ts +1 -1
  18. package/dist/dashboard/index.d.ts +3 -0
  19. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +2 -12
  20. package/dist/decorators/hook-decorators/with-tracking.d.ts +1 -2
  21. package/dist/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +7 -1
  22. package/dist/filters/components/cascading-filter-tile/cascading-level-filter.d.ts +8 -2
  23. package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +1 -0
  24. package/dist/filters/components/custom-filter-tile.d.ts +3 -0
  25. package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +2 -0
  26. package/dist/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +1 -0
  27. package/dist/filters/components/filter-tile.d.ts +3 -0
  28. package/dist/filters/components/icons/background-filter-icon.d.ts +5 -0
  29. package/dist/filters/components/icons/index.d.ts +1 -0
  30. package/dist/filters/components/icons/lock-icon.d.ts +2 -0
  31. package/dist/index.cjs +174 -126
  32. package/dist/index.d.ts +2 -2
  33. package/dist/index.js +11866 -11666
  34. package/dist/pivot-table/formatters/utils.d.ts +1 -1
  35. package/dist/props.d.ts +12 -12
  36. package/dist/query/query-result-date-formatting.d.ts +0 -1
  37. package/dist/table/hooks/use-table-data.d.ts +1 -1
  38. package/dist/table/table-component.d.ts +4 -4
  39. package/dist/theme-provider/theme-provider.d.ts +2 -0
  40. package/dist/translation/resources/en.d.ts +1 -0
  41. package/dist/translation/resources/index.d.ts +2 -0
  42. package/dist/types.d.ts +195 -183
  43. package/dist/{useQuery-D5W0RM1R.js → useQuery-Cxcx_l05.js} +15251 -15187
  44. package/dist/useQuery-_biaqvma.cjs +603 -0
  45. package/dist/utils/color/color-interpolation.d.ts +1 -0
  46. package/package.json +7 -7
  47. package/dist/useQuery-C8plkncQ.cjs +0 -603
@@ -12,31 +12,31 @@ type GetDashboardOptions = {
12
12
  };
13
13
  export declare class RestApi {
14
14
  private httpClient;
15
- constructor(httpClient: HttpClient);
15
+ constructor(httpClient: HttpClient | undefined);
16
16
  /**
17
17
  * Get all dashboards
18
18
  */
19
- getDashboards: (options?: GetDashboardsOptions) => Promise<DashboardDto[]>;
19
+ getDashboards: (options?: GetDashboardsOptions) => Promise<DashboardDto[] | undefined>;
20
20
  /**
21
21
  * Get a specific dashboard
22
22
  */
23
- getDashboard: (dashboardOid: string, options?: GetDashboardOptions) => Promise<DashboardDto>;
23
+ getDashboard: (dashboardOid: string, options?: GetDashboardOptions) => Promise<DashboardDto | undefined>;
24
24
  /**
25
25
  * Get all widgets of a specific dashboard
26
26
  */
27
- getDashboardWidgets: (dashboardOid: string) => Promise<WidgetDto[]>;
27
+ getDashboardWidgets: (dashboardOid: string) => Promise<WidgetDto[] | undefined>;
28
28
  /**
29
29
  * Get a specific widget from a dashboard
30
30
  */
31
- getWidget: (widgetOid: string, dashboardOid: string) => Promise<WidgetDto>;
31
+ getWidget: (widgetOid: string, dashboardOid: string) => Promise<WidgetDto | undefined>;
32
32
  /**
33
33
  * Get a GeoJSON data for all countries
34
34
  */
35
- getCountriesGeoJson: () => Promise<GeoJsonFeatureCollection>;
35
+ getCountriesGeoJson: () => Promise<GeoJsonFeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties> | undefined>;
36
36
  /**
37
37
  * Get a GeoJSON data for all USA states
38
38
  */
39
- getUsaStatesGeoJson: () => Promise<GeoJsonFeatureCollection>;
39
+ getUsaStatesGeoJson: () => Promise<GeoJsonFeatureCollection<import("geojson").Geometry, import("geojson").GeoJsonProperties> | undefined>;
40
40
  }
41
41
  export declare const useGetApi: () => RestApi;
42
42
  export {};
@@ -21,12 +21,14 @@ export type FilterDto = {
21
21
  jaql: FilterJaql & AnyObject;
22
22
  instanceid?: string;
23
23
  disabled?: boolean;
24
+ locked?: boolean;
24
25
  };
25
26
  export type CascadingFilterDto = {
26
27
  isCascading: true;
27
28
  levels: FilterJaql[];
28
29
  instanceid?: string;
29
30
  disabled?: boolean;
31
+ locked?: boolean;
30
32
  };
31
33
  export declare const isCascadingFilterDto: (filter: FilterDto | CascadingFilterDto) => filter is CascadingFilterDto;
32
34
  export type DashboardDto = {
@@ -101,6 +101,7 @@ export type AxisPlotBand = {
101
101
  };
102
102
  };
103
103
  export declare const getCategoricalCompareValue: (value: CategoricalXValues) => number;
104
+ export declare const getDefaultDateFormat: (granularity?: string) => "HH:mm:ss" | "yyyy" | "yyyy Q" | "MM/yyyy" | "ww yyyy" | "M/d/yy" | "HH" | "M/d/yy HH" | "HH:mm" | undefined;
104
105
  export declare const getDateFormatter: (category: Category, dateFormatter?: ((date: Date, format: string) => string) | undefined) => (time: number) => string;
105
106
  export declare const getXAxisDatetimeSettings: (axis: Axis, category: Category, values: number[], dateFormatter?: ((date: Date, format: string) => string) | undefined) => AxisSettings[];
106
107
  export declare const getXAxisSettings: (axis: Axis, axis2: Axis | undefined, categories: string[], plotBands: PlotBand[], xAxisOrientation: AxisOrientation, chartDataOptions: ChartDataOptionsInternal, chartType: ChartType) => AxisSettings[];
@@ -35,4 +35,6 @@ export declare function prepareSunburstDataItems(chartData: CategoricalChartData
35
35
  id?: string | undefined;
36
36
  drilldown?: string | undefined;
37
37
  parent?: string | undefined;
38
+ low?: number | null | undefined;
39
+ high?: number | null | undefined;
38
40
  })[];
@@ -39,6 +39,8 @@ export type SeriesPointStructure = {
39
39
  id?: string;
40
40
  drilldown?: string;
41
41
  parent?: string;
42
+ low?: number | null;
43
+ high?: number | null;
42
44
  };
43
45
  export type AxisClipped = {
44
46
  minClipped: boolean;
@@ -1,3 +1,4 @@
1
+ import { DeepRequired } from 'ts-essentials';
1
2
  /** @internal */
2
3
  export declare enum CommonFiltersApplyMode {
3
4
  HIGHLIGHT = "highlight",
@@ -11,4 +12,7 @@ export type CommonFiltersOptions = {
11
12
  all?: boolean;
12
13
  ids?: string[];
13
14
  };
15
+ forceApplyBackgroundFilters?: boolean;
14
16
  };
17
+ /** @internal */
18
+ export type CompleteCommonFiltersOptions = DeepRequired<CommonFiltersOptions>;
@@ -6,4 +6,4 @@ export declare function getFilterByAttribute(filters: Filter[], attribute: Attri
6
6
  export declare function createCommonFilter(attribute: Attribute, members: (string | number)[], existingCommonFilters: Filter[]): Filter;
7
7
  export declare function isEqualMembersFilters(filterA: Filter, filterB: Filter): boolean;
8
8
  export declare function isIncludeAllFilter(filter: Filter): boolean;
9
- export declare function clearCommonFilter({ attribute, guid }: Filter): Filter;
9
+ export declare function clearCommonFilter(filter: Filter): Filter;
@@ -0,0 +1,3 @@
1
+ export { DashboardById } from './dashboard-by-id';
2
+ export { Dashboard } from './dashboard';
3
+ export { type DashboardByIdProps, type DashboardProps } from './types';
@@ -18,18 +18,8 @@ export declare const fetchWidgetDtoModel: ({ widgetOid, dashboardOid, includeDas
18
18
  includeDashboard?: boolean | undefined;
19
19
  api: RestApi;
20
20
  }) => Promise<{
21
- widget: WidgetDto;
22
- dashboard: ({
23
- oid: string;
24
- title: string;
25
- datasource: import("./types").Datasource;
26
- widgets?: WidgetDto[] | undefined;
27
- filters?: (import("../api/types/dashboard-dto").FilterDto | import("../api/types/dashboard-dto").CascadingFilterDto)[] | undefined;
28
- filterRelations?: {
29
- filterRelations: import("@sisense/sdk-data").FilterRelationsModel;
30
- }[] | undefined;
31
- layout?: import("../api/types/dashboard-dto").Layout | undefined;
32
- } & import("../utils/utility-types").AnyObject) | undefined;
21
+ widget: WidgetDto | undefined;
22
+ dashboard: DashboardDto | undefined;
33
23
  }>;
34
24
  /**
35
25
  * Custom hook for fetching Widget DTO and Dashboard DTO models.
@@ -7,7 +7,6 @@ export type HookDecorator<DecoratorConfig> = (decoratorConfig: DecoratorConfig)
7
7
  * @param packageName - The name of the package
8
8
  * @param app - The client application
9
9
  * @param onFinally - The function to call after the tracking is done
10
- * @returns Promise<void>
11
10
  */
12
- export declare const trackHook: (hookName: string, packageName: string, app: ClientApplication, onFinally: () => void) => Promise<void>;
11
+ export declare const trackHook: (hookName: string, packageName: string, app: ClientApplication, onFinally: () => void) => void;
13
12
  export declare const withTracking: HookDecorator<string>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { CascadingFilter, Filter } from '@sisense/sdk-data';
2
+ import { CascadingFilter, DataSource, Filter } from '@sisense/sdk-data';
3
3
  import { FilterVariant } from '../common/filter-utils.js';
4
4
  /**
5
5
  * Props for {@link CascadingFilterTile}
@@ -9,6 +9,12 @@ import { FilterVariant } from '../common/filter-utils.js';
9
9
  export interface CascadingFilterTileProps {
10
10
  /** Cascading filter object to initialize filter type and default values */
11
11
  filter: CascadingFilter;
12
+ /**
13
+ * Data source the query is run against - e.g. `Sample ECommerce`
14
+ *
15
+ * If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
16
+ */
17
+ dataSource?: DataSource;
12
18
  /** Arrangement of the filter inputs. Use vertical for standard filter tiles and horizontal for toolbars */
13
19
  arrangement?: FilterVariant;
14
20
  /** Callback returning filter object, or null for failure */
@@ -1,4 +1,4 @@
1
- import { Filter } from '@sisense/sdk-data';
1
+ import { DataSource, Filter } from '@sisense/sdk-data';
2
2
  /**
3
3
  * Props of the {@link CascadingLevelFilterTile} component
4
4
  *
@@ -7,6 +7,12 @@ import { Filter } from '@sisense/sdk-data';
7
7
  export type CascadingLevelFilterTileProps = {
8
8
  /** Filter to display */
9
9
  filter: Filter;
10
+ /**
11
+ * Data source the query is run against - e.g. `Sample ECommerce`
12
+ *
13
+ * If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
14
+ */
15
+ dataSource?: DataSource;
10
16
  parentFilters: Filter[];
11
17
  /** Callback to handle filter change */
12
18
  onChange: (filter: Filter | null) => void;
@@ -18,4 +24,4 @@ export type CascadingLevelFilterTileProps = {
18
24
  *
19
25
  * @internal
20
26
  */
21
- export declare const CascadingLevelFilterTile: ({ filter, parentFilters, onChange, isLast, }: CascadingLevelFilterTileProps) => import("react/jsx-runtime").JSX.Element;
27
+ export declare const CascadingLevelFilterTile: ({ filter, dataSource, parentFilters, onChange, isLast, }: CascadingLevelFilterTileProps) => import("react/jsx-runtime").JSX.Element;
@@ -18,6 +18,7 @@ export interface CriteriaFilterTileProps {
18
18
  measures?: Measure[];
19
19
  /**
20
20
  * Design options for the filter tile component
21
+ *
21
22
  * @internal
22
23
  */
23
24
  tileDesignOptions?: FilterTileDesignOptions;
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Filter } from '@sisense/sdk-data';
3
+ import { FilterTileDesignOptions } from './filter-tile';
3
4
  /**
4
5
  * Props for {@link CustomFilterTile}
5
6
  *
@@ -14,6 +15,8 @@ export interface CustomFilterTileProps {
14
15
  * @param filter - Custom filter
15
16
  */
16
17
  onUpdate: (filter: Filter | null) => void;
18
+ /** Design options for the tile @internal */
19
+ tileDesignOptions?: FilterTileDesignOptions;
17
20
  }
18
21
  /**
19
22
  * UI component for a custom filter defined with JAQL.
@@ -44,12 +44,14 @@ export interface DateRangeFilterTileProps {
44
44
  parentFilters?: Filter[];
45
45
  /**
46
46
  * Whether to display the filter as a tiled version.
47
+ *
47
48
  * @default false
48
49
  * @internal
49
50
  */
50
51
  tiled?: boolean;
51
52
  /**
52
53
  * Design options for the filter tile component
54
+ *
53
55
  * @internal
54
56
  */
55
57
  tileDesignOptions?: FilterTileDesignOptions;
@@ -27,6 +27,7 @@ export interface RelativeDateFilterTileProps {
27
27
  };
28
28
  /**
29
29
  * Design options for the filter tile component
30
+ *
30
31
  * @internal
31
32
  */
32
33
  tileDesignOptions?: FilterTileDesignOptions;
@@ -3,6 +3,7 @@ import { FilterVariant } from './common/filter-utils';
3
3
  import { DeepRequired } from 'ts-essentials';
4
4
  /**
5
5
  * Design options for the filter tile component.
6
+ *
6
7
  * @internal
7
8
  */
8
9
  export interface FilterTileDesignOptions {
@@ -10,6 +11,7 @@ export interface FilterTileDesignOptions {
10
11
  shouldBeShown?: boolean;
11
12
  isCollapsible?: boolean;
12
13
  hasBorder?: boolean;
14
+ hasBackgroundFilterIcon?: boolean;
13
15
  };
14
16
  border?: {
15
17
  shouldBeShown?: boolean;
@@ -27,6 +29,7 @@ interface Props {
27
29
  isDependent?: boolean;
28
30
  design?: FilterTileDesignOptions;
29
31
  onToggleDisabled?: () => void;
32
+ locked?: boolean;
30
33
  }
31
34
  /**
32
35
  * Generic component that owns common functionality of a filter "tile" like
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export declare const BackgroundFilterIcon: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -3,5 +3,6 @@ export { PencilIcon } from './pencil-icon';
3
3
  export { PlusIcon } from './plus-icon';
4
4
  export { SearchIcon } from './search-icon';
5
5
  export { TrashIcon } from './trash-icon';
6
+ export { LockIcon } from './lock-icon';
6
7
  export { DateIcon } from './date-icon';
7
8
  export { ArrowDownIcon } from './arrow-down-icon';
@@ -0,0 +1,2 @@
1
+ import type { SVGProps } from 'react';
2
+ export declare const LockIcon: (props: Pick<SVGProps<SVGElement>, 'className' | 'width' | 'height'>) => import("react/jsx-runtime").JSX.Element;