@sisense/sdk-ui 1.22.0 → 1.24.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 +53 -45
- package/dist/ai.js +780 -702
- package/dist/analytics-composer.cjs +89 -148
- package/dist/analytics-composer.js +1196 -1479
- package/dist/index.cjs +119 -118
- package/dist/index.js +4898 -5523
- package/dist/packages/sdk-ui/src/ai/api/chat-rest-api.d.ts +1 -1
- package/dist/packages/sdk-ui/src/ai/api/types.d.ts +3 -23
- package/dist/packages/sdk-ui/src/ai/chart/chart-insights.d.ts +6 -0
- package/dist/packages/sdk-ui/src/ai/chart/nlq-chart-widget.d.ts +46 -0
- package/dist/packages/sdk-ui/src/ai/icons/ai-icon.d.ts +2 -0
- package/dist/packages/sdk-ui/src/ai/icons/exclamation-mark-brand-icon.d.ts +3 -0
- package/dist/packages/sdk-ui/src/ai/index.d.ts +2 -3
- package/dist/packages/sdk-ui/src/ai/messages/chart-message.d.ts +1 -2
- package/dist/packages/sdk-ui/src/ai/use-get-data-source-fields.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/{translators → code}/code-templates.d.ts +1 -1
- package/dist/packages/sdk-ui/src/analytics-composer/{translators → code}/generate-code.d.ts +3 -3
- package/dist/packages/sdk-ui/src/analytics-composer/{translators → common}/utils.d.ts +3 -1
- package/dist/packages/sdk-ui/src/analytics-composer/index.d.ts +12 -1
- package/dist/packages/sdk-ui/src/analytics-composer/query/index.d.ts +1 -0
- package/dist/packages/sdk-ui/src/analytics-composer/{translators → query}/query-translator.d.ts +2 -3
- package/dist/packages/sdk-ui/src/analytics-composer/types.d.ts +153 -0
- package/dist/packages/sdk-ui/src/{ai/messages → analytics-composer/widget/chart-options}/get-widget-options.d.ts +5 -14
- package/dist/packages/sdk-ui/src/analytics-composer/widget/stringify-filters.d.ts +2 -0
- package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-code.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/widget/to-widget-props.d.ts +3 -0
- package/dist/packages/sdk-ui/src/analytics-composer/widget/widget-composer.d.ts +16 -0
- package/dist/packages/sdk-ui/src/api/rest-api.d.ts +13 -2
- package/dist/packages/sdk-ui/src/api/types/dashboard-dto.d.ts +1 -1
- package/dist/packages/sdk-ui/src/app/client-application.d.ts +7 -7
- package/dist/packages/sdk-ui/src/app/settings/types/user.d.ts +0 -1
- package/dist/packages/sdk-ui/src/chart/advanced-chart.d.ts +1 -1
- package/dist/packages/sdk-ui/src/chart/helpers/derive-chart-family.d.ts +8 -0
- package/dist/packages/sdk-ui/src/chart/regular-chart.d.ts +3 -0
- package/dist/packages/sdk-ui/src/chart-data-options/utils.d.ts +1 -0
- package/dist/packages/sdk-ui/src/chart-options-processor/category-chart-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/sunburst/sunburst-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-options.d.ts +2 -1
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/treemap/treemap-tooltip.d.ts +3 -2
- package/dist/packages/sdk-ui/src/chart-options-processor/translations/types.d.ts +2 -0
- package/dist/packages/sdk-ui/src/common/components/menu/types.d.ts +1 -0
- package/dist/packages/sdk-ui/src/dashboard/components/dashboard-container.d.ts +1 -1
- package/dist/packages/sdk-ui/src/dashboard/components/horizontal-collapse.d.ts +6 -0
- package/dist/packages/sdk-ui/src/dashboard/dashboard.d.ts +6 -1
- package/dist/packages/sdk-ui/src/dashboard/hooks/use-filters-panel-collapsed-state.d.ts +8 -0
- package/dist/packages/sdk-ui/src/dashboard/types.d.ts +19 -1
- package/dist/packages/sdk-ui/src/decorators/component-decorators/with-error-boundary.d.ts +3 -1
- package/dist/packages/sdk-ui/src/error-boundary/error-boundary.d.ts +4 -2
- package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/common/member-radio.d.ts +8 -0
- package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/custom-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/helpers.d.ts +6 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/date-filter/relative-date-filter-tile/relative-date-filter.d.ts +2 -1
- package/dist/packages/sdk-ui/src/filters/components/filter-tile.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/filters-panel/filters-panel-tile.d.ts +3 -1
- package/dist/packages/sdk-ui/src/filters/components/icons/trash-icon.d.ts +1 -1
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-filter-tile.d.ts +2 -0
- package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-list.d.ts +1 -0
- package/dist/packages/sdk-ui/src/filters/components/unsupported-filter-tile.d.ts +3 -1
- package/dist/packages/sdk-ui/src/index.d.ts +15 -8
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-dto-utils.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/dashboard/translate-dashboard-utils.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dasboard-model-utils.d.ts +2 -4
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model-reducer.d.ts +24 -16
- package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model.d.ts +1 -0
- package/dist/packages/sdk-ui/src/models/dashboard/use-get-dashboard-model.d.ts +2 -2
- package/dist/packages/sdk-ui/src/models/hierarchy/get-hierarchy-models.d.ts +6 -1
- package/dist/packages/sdk-ui/src/models/hierarchy/hierarchy-model-translator.d.ts +1 -1
- package/dist/packages/sdk-ui/src/models/hierarchy/types.d.ts +3 -0
- package/dist/packages/sdk-ui/src/models/hierarchy/use-get-hierarchy-models.d.ts +4 -4
- package/dist/packages/sdk-ui/src/models/widget/widget-model-translator.d.ts +12 -2
- package/dist/packages/sdk-ui/src/models/widget/widget-model.d.ts +1 -1
- package/dist/packages/sdk-ui/src/pivot-table/hooks/use-render-pivot.d.ts +3 -1
- package/dist/packages/sdk-ui/src/props.d.ts +29 -17
- package/dist/packages/sdk-ui/src/query-execution/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/sisense-context/custom-sisense-context-provider.d.ts +1 -3
- package/dist/packages/sdk-ui/src/sisense-context/sisense-context.d.ts +5 -0
- package/dist/packages/sdk-ui/src/table/table-component.d.ts +1 -1
- package/dist/packages/sdk-ui/src/translation/i18n-provider.d.ts +3 -1
- package/dist/packages/sdk-ui/src/translation/resources/en.d.ts +27 -2
- package/dist/packages/sdk-ui/src/translation/resources/index.d.ts +32 -4
- package/dist/packages/sdk-ui/src/types.d.ts +12 -5
- package/dist/packages/sdk-ui/src/utils/filters.d.ts +1 -0
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/dashboard-widget.d.ts +2 -1
- package/dist/packages/sdk-ui/src/widget-by-id/translate-dashboard-filters.d.ts +4800 -0
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-panel-color-format.d.ts +3 -3
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-data-options.d.ts +5 -5
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-drilldown-options.d.ts +2 -2
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-filters.d.ts +85 -83
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/types.d.ts +1 -1
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/use-fetch-widget-dto-model.d.ts +3 -3
- package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/utils.d.ts +14 -13
- package/dist/packages/sdk-ui/src/widget-by-id/widget-by-id.d.ts +26 -0
- package/dist/packages/sdk-ui/src/widgets/common/use-drilldown-core.d.ts +7 -0
- package/dist/packages/sdk-ui/src/widgets/common/widget-container.d.ts +2 -0
- package/dist/packages/sdk-ui/src/widgets/common/widget-errors-and-warnings-context.d.ts +14 -0
- package/dist/packages/sdk-ui/src/widgets/common/widget-header-info-button.d.ts +3 -1
- package/dist/packages/sdk-ui/src/widgets/common/widget-header.d.ts +2 -0
- package/dist/packages/sdk-ui/src/widgets/hooks/use-drilldown.d.ts +2 -0
- package/dist/useQuery-CIeSzN0Z.js +7945 -0
- package/dist/useQuery-LqaaNBLw.cjs +175 -0
- package/dist/widget-composer-CvgsMHyb.cjs +237 -0
- package/dist/widget-composer-L8kmRhgX.js +624 -0
- package/dist/widget-model-translator-CYeCKnTa.js +116687 -0
- package/dist/widget-model-translator-_Z-8UaTN.cjs +917 -0
- package/package.json +7 -7
- package/dist/get-widget-options-DTIulxC2.js +0 -44253
- package/dist/get-widget-options-DixoCEhn.cjs +0 -271
- package/dist/packages/sdk-ui/src/ai/messages/jaql-element.d.ts +0 -28
- package/dist/packages/sdk-ui/src/analytics-composer/translators/index.d.ts +0 -3
- package/dist/packages/sdk-ui/src/analytics-composer/translators/model-translator.d.ts +0 -48
- package/dist/packages/sdk-ui/src/analytics-composer/translators/translate-filters-to-code.d.ts +0 -2
- package/dist/packages/sdk-ui/src/analytics-composer/translators/types.d.ts +0 -95
- package/dist/packages/sdk-ui/src/dashboard/components/HorizontalCollapse.d.ts +0 -5
- package/dist/packages/sdk-ui/src/dashboard-widget/translate-dashboard-filters.d.ts +0 -4798
- package/dist/packages/sdk-ui/src/translation/custom-translations-loader.d.ts +0 -10
- package/dist/table-widget-CLL1iN3H.js +0 -79317
- package/dist/table-widget-CYCcYqzZ.cjs +0 -821
- /package/dist/packages/sdk-ui/src/analytics-composer/{translators → query}/query-templates.d.ts +0 -0
- /package/dist/packages/sdk-ui/src/analytics-composer/{translators/translate-props-to-code.d.ts → widget/stringify-props.d.ts} +0 -0
- /package/dist/packages/sdk-ui/src/{dashboard-widget → widget-by-id}/translate-widget-style-options.d.ts +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare const HorizontalCollapse: ({ collapsed, onCollapsedChange, children, }: {
|
|
3
|
+
collapsed?: boolean | undefined;
|
|
4
|
+
onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,11 +3,16 @@ import { DashboardProps } from '../dashboard/types';
|
|
|
3
3
|
import { Filter } from '@sisense/sdk-data';
|
|
4
4
|
export declare enum DashboardChangeType {
|
|
5
5
|
/** Dashboard filters have been updated */
|
|
6
|
-
FILTERS_UPDATE = "FILTERS.UPDATE"
|
|
6
|
+
FILTERS_UPDATE = "FILTERS.UPDATE",
|
|
7
|
+
/** Filters panel collapsed state changed */
|
|
8
|
+
UI_FILTERS_PANEL_COLLAPSE = "UI.FILTERS.PANEL.COLLAPSE"
|
|
7
9
|
}
|
|
8
10
|
export type DashboardChangeAction = {
|
|
9
11
|
type: DashboardChangeType.FILTERS_UPDATE;
|
|
10
12
|
payload: Filter[];
|
|
13
|
+
} | {
|
|
14
|
+
type: DashboardChangeType.UI_FILTERS_PANEL_COLLAPSE;
|
|
15
|
+
payload: boolean;
|
|
11
16
|
};
|
|
12
17
|
/**
|
|
13
18
|
* React component that renders a dashboard whose elements are customizable. It includes internal logic of applying common filters to widgets.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
export declare const LS_KEY_FILTERS_PANEL_COLLAPSED = "csdk_dashboard_filters_panel_collapsed";
|
|
5
|
+
/**
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare const useFiltersPanelCollapsedState: (initialState?: boolean, shouldUseLocalStorage?: boolean) => [boolean, (state: boolean) => void];
|
|
@@ -34,6 +34,12 @@ export interface DashboardContainerProps {
|
|
|
34
34
|
filters: Filter[];
|
|
35
35
|
onFiltersChange: (filters: Filter[]) => void;
|
|
36
36
|
defaultDataSource?: DataSource;
|
|
37
|
+
/**
|
|
38
|
+
* Callback to receive changes
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
|
+
onChange?: (action: DashboardChangeAction) => void;
|
|
37
43
|
}
|
|
38
44
|
/**
|
|
39
45
|
* Dashboard configuration
|
|
@@ -42,7 +48,19 @@ export interface DashboardContainerProps {
|
|
|
42
48
|
*/
|
|
43
49
|
export interface DashboardConfig {
|
|
44
50
|
filtersPanel?: {
|
|
45
|
-
isVisible
|
|
51
|
+
isVisible?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Boolean flag that controls the initial "collapsed" state of the filters panel.
|
|
54
|
+
*
|
|
55
|
+
* If not specified, the default value is `false`.
|
|
56
|
+
*/
|
|
57
|
+
isCollapsedInitially?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Setting this to true will use the isCollapsed state from local storage, if available, and store any changes to local storage.
|
|
60
|
+
* This state is shared across all dashboards.
|
|
61
|
+
* This state has a higher priority than "initialIsCollapsed" when enabled.
|
|
62
|
+
*/
|
|
63
|
+
persistCollapsedStateToLocalStorage?: boolean;
|
|
46
64
|
};
|
|
47
65
|
toolbar?: {
|
|
48
66
|
isVisible: boolean;
|
|
@@ -2,4 +2,6 @@ import { ComponentDecorator } from './as-sisense-component';
|
|
|
2
2
|
/**
|
|
3
3
|
* Adds error boundary to the component
|
|
4
4
|
*/
|
|
5
|
-
export declare const withErrorBoundary: ComponentDecorator<
|
|
5
|
+
export declare const withErrorBoundary: ComponentDecorator<{
|
|
6
|
+
componentName: string;
|
|
7
|
+
}>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Component, ReactNode } from 'react';
|
|
2
|
-
import { SisenseContextPayload } from '../sisense-context/sisense-context';
|
|
3
2
|
import { AbstractTranslatableError } from '@sisense/sdk-common';
|
|
4
3
|
/**
|
|
5
4
|
* @internal
|
|
@@ -9,6 +8,8 @@ interface ErrorBoundaryProps {
|
|
|
9
8
|
error?: AbstractTranslatableError | Error | string;
|
|
10
9
|
children: ReactNode;
|
|
11
10
|
resetKeys?: any[];
|
|
11
|
+
onError?: (error: Error) => void;
|
|
12
|
+
isContainerComponent?: boolean;
|
|
12
13
|
}
|
|
13
14
|
type ErrorBoundaryState = {
|
|
14
15
|
error: AbstractTranslatableError | Error | string | null;
|
|
@@ -23,7 +24,8 @@ type ErrorBoundaryState = {
|
|
|
23
24
|
*/
|
|
24
25
|
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
25
26
|
showErrorBox: boolean;
|
|
26
|
-
|
|
27
|
+
onError?: (error: Error) => void;
|
|
28
|
+
isContainerComponent: boolean;
|
|
27
29
|
constructor(props: ErrorBoundaryProps);
|
|
28
30
|
static getDerivedStateFromError(error: Error): {
|
|
29
31
|
error: Error;
|
package/dist/packages/sdk-ui/src/filters/components/cascading-filter-tile/cascading-filter-tile.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface CascadingFilterTileProps {
|
|
|
19
19
|
arrangement?: FilterVariant;
|
|
20
20
|
/** Callback returning filter object, or null for failure */
|
|
21
21
|
onChange: (filter: Filter) => void;
|
|
22
|
+
/** Filter delete callback */
|
|
23
|
+
onDelete?: () => void;
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* UI component representing group of cascading (dependent) filters.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FunctionComponent, type InputHTMLAttributes } from 'react';
|
|
2
|
+
type MemberRadioProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
isLabelInactive?: boolean;
|
|
5
|
+
wrapperClassName?: string;
|
|
6
|
+
} & InputHTMLAttributes<HTMLInputElement>;
|
|
7
|
+
export declare const MemberRadio: FunctionComponent<MemberRadioProps>;
|
|
8
|
+
export {};
|
package/dist/packages/sdk-ui/src/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export interface CriteriaFilterTileProps {
|
|
|
14
14
|
arrangement?: FilterVariant;
|
|
15
15
|
/** Callback returning filter object, or null for failure */
|
|
16
16
|
onUpdate: (filter: Filter | null) => void;
|
|
17
|
+
/** Filter delete callback */
|
|
18
|
+
onDelete?: () => void;
|
|
17
19
|
/** List of available measures to rank by. Required only for ranking filters. */
|
|
18
20
|
measures?: Measure[];
|
|
19
21
|
/**
|
|
@@ -15,6 +15,8 @@ export interface CustomFilterTileProps {
|
|
|
15
15
|
* @param filter - Custom filter
|
|
16
16
|
*/
|
|
17
17
|
onUpdate: (filter: Filter | null) => void;
|
|
18
|
+
/** Filter delete callback */
|
|
19
|
+
onDelete?: () => void;
|
|
18
20
|
/** Design options for the tile @internal */
|
|
19
21
|
tileDesignOptions?: FilterTileDesignOptions;
|
|
20
22
|
}
|
|
@@ -19,7 +19,8 @@ export interface RelativeDateFilterProps {
|
|
|
19
19
|
*/
|
|
20
20
|
export declare const RelativeDateFilter: FunctionComponent<RelativeDateFilterProps>;
|
|
21
21
|
export declare const DATE_OPS_MAP: {
|
|
22
|
-
readonly
|
|
22
|
+
readonly last: "dateFilter.last";
|
|
23
|
+
readonly next: "dateFilter.next";
|
|
23
24
|
};
|
|
24
25
|
export declare const DATE_LEVELS_MAP: {
|
|
25
26
|
readonly [x: string]: "dateFilter.days" | "dateFilter.weeks" | "dateFilter.months" | "dateFilter.quarters" | "dateFilter.years";
|
|
@@ -9,6 +9,8 @@ export type FiltersPanelTileProps = {
|
|
|
9
9
|
filter: Filter;
|
|
10
10
|
/** Callback to handle filter change */
|
|
11
11
|
onChange: (filter: Filter | null) => void;
|
|
12
|
+
/** Filter delete callback */
|
|
13
|
+
onDelete?: () => void;
|
|
12
14
|
/** Default data source used for filter tiles */
|
|
13
15
|
defaultDataSource?: DataSource;
|
|
14
16
|
};
|
|
@@ -17,4 +19,4 @@ export type FiltersPanelTileProps = {
|
|
|
17
19
|
*
|
|
18
20
|
* @internal
|
|
19
21
|
*/
|
|
20
|
-
export declare const FiltersPanelTile: ({ filter, onChange, defaultDataSource, }: FiltersPanelTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const FiltersPanelTile: ({ filter, onChange, onDelete, defaultDataSource, }: FiltersPanelTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { SVGProps } from 'react';
|
|
2
|
-
export declare const TrashIcon: (props: Pick<SVGProps<SVGElement>, 'className' | 'width' | 'height'>) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const TrashIcon: (props: Pick<SVGProps<SVGElement>, 'className' | 'width' | 'height' | 'fill'>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/packages/sdk-ui/src/filters/components/member-filter-tile/member-filter-tile.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export interface MemberFilterTileProps {
|
|
|
19
19
|
filter: Filter | null;
|
|
20
20
|
/** Callback indicating when the source member filter object should be updated */
|
|
21
21
|
onChange: (filter: Filter | null) => void;
|
|
22
|
+
/** Filter delete callback */
|
|
23
|
+
onDelete?: () => void;
|
|
22
24
|
/** List of filters this filter is dependent on */
|
|
23
25
|
parentFilters?: Filter[];
|
|
24
26
|
/** Design options for the tile @internal */
|
|
@@ -3,10 +3,12 @@ import { Filter } from '@sisense/sdk-data';
|
|
|
3
3
|
export type UnsupportedFilterTileProps = {
|
|
4
4
|
filter: Filter;
|
|
5
5
|
design?: FilterTileDesignOptions;
|
|
6
|
+
/** Filter delete callback */
|
|
7
|
+
onDelete?: () => void;
|
|
6
8
|
};
|
|
7
9
|
/**
|
|
8
10
|
* Filter tile component that renders an unsupported filter (which is not recognized by the JAQL to Filter translation)
|
|
9
11
|
*
|
|
10
12
|
* @internal
|
|
11
13
|
*/
|
|
12
|
-
export declare const UnsupportedFilterTile: ({ filter, design }: UnsupportedFilterTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const UnsupportedFilterTile: ({ filter, design, onDelete }: UnsupportedFilterTileProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,9 +3,11 @@ export * from './chart-data-options/types';
|
|
|
3
3
|
export { Chart } from './chart';
|
|
4
4
|
export { ThemeProvider } from './theme-provider';
|
|
5
5
|
export * from './dashboard';
|
|
6
|
-
export { DashboardWidget } from './
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
6
|
+
export { DashboardWidget } from './widget-by-id/dashboard-widget';
|
|
7
|
+
export { WidgetById } from './widget-by-id/widget-by-id';
|
|
8
|
+
export { isChartWidgetProps, isPivotTableWidgetProps, isTextWidgetProps, isPluginWidgetProps, } from './widget-by-id/utils';
|
|
9
|
+
export { type WidgetType, type CartesianWidgetType, type CategoricalWidgetType, type TabularWidgetType, type TextWidgetType, } from './widget-by-id/types';
|
|
10
|
+
export { getChartType } from './widget-by-id/utils';
|
|
9
11
|
export * from './query-execution';
|
|
10
12
|
export { executeQuery } from './query/execute-query';
|
|
11
13
|
export { SisenseContextProvider } from './sisense-context/sisense-context-provider';
|
|
@@ -43,7 +45,7 @@ export { usePlugins } from './plugins-provider/plugins-provider';
|
|
|
43
45
|
export { extractDimensionsAndMeasures, useExecutePluginQuery, } from './plugins-provider/use-execute-plugin-query';
|
|
44
46
|
export { getThemeSettingsByOid } from './themes/theme-loader';
|
|
45
47
|
export { getDefaultThemeSettings } from './theme-provider/default-theme-settings';
|
|
46
|
-
export { useGetDashboardModel, useGetDashboardModels, getDashboardModel, getDashboardModels, useGetWidgetModel, getWidgetModel, translateToDashboardResponse, translateToDashboardsResponse, useGetHierarchyModels, getHierarchyModels, 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, type WidgetsPanelColumnLayout as WidgetsPanelColumnLayout, type WidgetsPanelLayout as WidgetsPanelLayout, type WidgetId, type WidgetsOptions, type CommonFiltersOptions, type CommonFiltersApplyMode, type FiltersIgnoringRules, type HierarchyModel, type Hierarchy, type HierarchyId, type
|
|
48
|
+
export { useGetDashboardModel, useGetDashboardModels, useDashboardModel, getDashboardModel, getDashboardModels, useGetWidgetModel, getWidgetModel, translateToDashboardResponse, translateToDashboardsResponse, useGetHierarchyModels, getHierarchyModels, 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, type WidgetsPanelColumnLayout as WidgetsPanelColumnLayout, type WidgetsPanelLayout as WidgetsPanelLayout, type WidgetId, type WidgetsOptions, type CommonFiltersOptions, type CommonFiltersApplyMode, type FiltersIgnoringRules, type HierarchyModel, type Hierarchy, type HierarchyId, type GetHierarchyModelsParams, type HierarchyModelsState, type HierarchyModelsLoadingState, type HierarchyModelsErrorState, type HierarchyModelsSuccessState, UseDashboardModelActionType, } from './models';
|
|
47
49
|
/**
|
|
48
50
|
* Utility functions to translate a Fusion widget model from and to other widget data structures
|
|
49
51
|
*
|
|
@@ -67,7 +69,7 @@ export * as dashboardModelTranslator from './models/dashboard/dashboard-model-tr
|
|
|
67
69
|
* @shortDescription Utility functions to manipulate dashboard elements
|
|
68
70
|
*/
|
|
69
71
|
export * as dashboardHelpers from './dashboard/dashboard-helpers';
|
|
70
|
-
export type { AutoZoomNavigatorScrollerLocation } from './
|
|
72
|
+
export type { AutoZoomNavigatorScrollerLocation } from './widget-by-id/types';
|
|
71
73
|
export { boxWhiskerProcessResult } from './boxplot-utils';
|
|
72
74
|
export { queryStateReducer } from './query-execution/query-state-reducer';
|
|
73
75
|
export * from './props';
|
|
@@ -76,12 +78,17 @@ export * from './filters';
|
|
|
76
78
|
export * from './formulas';
|
|
77
79
|
export { trackHook } from './decorators/hook-decorators';
|
|
78
80
|
export * from './common/hooks/data-load-state-reducer';
|
|
79
|
-
export { createDataOptionsFromPanels } from './
|
|
81
|
+
export { createDataOptionsFromPanels } from './widget-by-id/translate-widget-data-options';
|
|
80
82
|
export { type DashboardDto } from './api/types/dashboard-dto';
|
|
81
|
-
export { type WidgetDto } from './
|
|
82
|
-
export { extractCombinedFilters } from './
|
|
83
|
+
export { type WidgetDto } from './widget-by-id/types';
|
|
84
|
+
export { extractCombinedFilters } from './widget-by-id/translate-dashboard-filters';
|
|
83
85
|
export { useThemeContext } from './theme-provider';
|
|
84
86
|
export { LoadingIndicator } from './common/components/loading-indicator';
|
|
85
87
|
export { LoadingOverlay } from './common/components/loading-overlay';
|
|
86
88
|
export { useFetch, type RequestConfig, type UseQueryResult } from './common/hooks/use-fetch';
|
|
87
89
|
export type { EmptyObject } from './utils/utility-types';
|
|
90
|
+
export { translateColumnToAttribute } from './chart-data-options/utils';
|
|
91
|
+
export { isSameAttribute } from './utils/filters';
|
|
92
|
+
export { updateDrilldownSelections } from './widgets/common/use-drilldown-core';
|
|
93
|
+
export { getSelectionTitleMenuItem, getDrilldownMenuItems } from './widgets/hooks/use-drilldown';
|
|
94
|
+
export { type TranslationDictionary, PACKAGE_NAMESPACE as translationNamespace, } from './translation/resources';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Filter } from '@sisense/sdk-data';
|
|
2
|
-
import { FilterDto } from '../../api/types/dashboard-dto';
|
|
2
|
+
import { CascadingFilterDto, FilterDto } from '../../api/types/dashboard-dto';
|
|
3
3
|
/**
|
|
4
4
|
* Translates a {@link Filter} to a {@link FilterDto}.
|
|
5
5
|
* @param filter
|
|
@@ -8,4 +8,4 @@ import { FilterDto } from '../../api/types/dashboard-dto';
|
|
|
8
8
|
*
|
|
9
9
|
* @internal
|
|
10
10
|
*/
|
|
11
|
-
export declare function filterToFilterDto(filter: Filter): FilterDto;
|
|
11
|
+
export declare function filterToFilterDto(filter: Filter): FilterDto | CascadingFilterDto;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type LayoutDto, type FilterDto, type CascadingFilterDto } from '../../api/types/dashboard-dto';
|
|
2
2
|
import type { WidgetsPanelColumnLayout, WidgetsOptions } from './types';
|
|
3
3
|
import { Filter } from '@sisense/sdk-data';
|
|
4
|
-
import { WidgetDto } from '../../
|
|
4
|
+
import { WidgetDto } from '../../widget-by-id/types';
|
|
5
5
|
export declare const translateLayout: (layout: LayoutDto) => WidgetsPanelColumnLayout;
|
|
6
6
|
export declare function extractDashboardFilters(dashboardFilters: Array<FilterDto | CascadingFilterDto>): Filter[];
|
|
7
7
|
export declare function translateWidgetsOptions(widgets?: WidgetDto[]): WidgetsOptions;
|
package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dasboard-model-utils.d.ts
CHANGED
|
@@ -3,20 +3,18 @@ import { DashboardChangeAction } from '../../../dashboard/dashboard';
|
|
|
3
3
|
import { Authenticator } from '@sisense/sdk-rest-client';
|
|
4
4
|
/**
|
|
5
5
|
* Convert a dashboard change action to a use dashboard model action.
|
|
6
|
-
* @param action - The dashboard change action to convert
|
|
7
6
|
*
|
|
7
|
+
* @param action - The dashboard change action to convert
|
|
8
8
|
* @returns The useDashboardModel action or null if the action is not supported
|
|
9
|
-
*
|
|
10
9
|
* @internal
|
|
11
10
|
*/
|
|
12
11
|
export declare function dashboardChangeActionToUseDashboardModelAction(action: DashboardChangeAction): UseDashboardModelAction | null;
|
|
13
12
|
/**
|
|
14
13
|
* Check if the persistence is supported and log a warning if it is not.
|
|
14
|
+
*
|
|
15
15
|
* @param authType - The authentication type
|
|
16
16
|
* @param shouldWarn - Whether to log a warning
|
|
17
|
-
*
|
|
18
17
|
* @returns True if the persistence is supported, false otherwise
|
|
19
|
-
*
|
|
20
18
|
* @internal
|
|
21
19
|
*/
|
|
22
20
|
export declare function checkPersistenceSupport(authType: Authenticator['type'], shouldWarn: boolean): boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DashboardModel } from '../../../models';
|
|
1
|
+
import { DashboardModel, WidgetModel } from '../../../models';
|
|
2
2
|
import { Filter } from '@sisense/sdk-data';
|
|
3
3
|
import { RestApi } from '../../../api/rest-api';
|
|
4
4
|
export type UseDashboardModelState = DashboardModel | null;
|
|
@@ -8,7 +8,8 @@ export type UseDashboardModelState = DashboardModel | null;
|
|
|
8
8
|
* @internal
|
|
9
9
|
*/
|
|
10
10
|
export declare enum UseDashboardModelActionTypeInternal {
|
|
11
|
-
DASHBOARD_INIT = "DASHBOARD.INIT"
|
|
11
|
+
DASHBOARD_INIT = "DASHBOARD.INIT",
|
|
12
|
+
DASHBOARD_UPDATE_LAYOUT = "DASHBOARD.UPDATE_LAYOUT"
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Action types for the dashboard model state used in {@link useDashboardModel}.
|
|
@@ -16,14 +17,15 @@ export declare enum UseDashboardModelActionTypeInternal {
|
|
|
16
17
|
* @internal
|
|
17
18
|
*/
|
|
18
19
|
export declare enum UseDashboardModelActionType {
|
|
19
|
-
FILTERS_UPDATE = "FILTERS.UPDATE"
|
|
20
|
+
FILTERS_UPDATE = "FILTERS.UPDATE",
|
|
21
|
+
ADD_WIDGET = "WIDGETS.ADD"
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* Internal actions for the dashboard model state used in {@link useDashboardModel}.
|
|
23
25
|
*
|
|
24
26
|
* @internal
|
|
25
27
|
*/
|
|
26
|
-
type UseDashboardModelInternalAction = UseDashboardModelAction | {
|
|
28
|
+
export type UseDashboardModelInternalAction = UseDashboardModelAction | {
|
|
27
29
|
type: UseDashboardModelActionTypeInternal.DASHBOARD_INIT;
|
|
28
30
|
payload: DashboardModel;
|
|
29
31
|
};
|
|
@@ -32,32 +34,38 @@ type UseDashboardModelInternalAction = UseDashboardModelAction | {
|
|
|
32
34
|
*
|
|
33
35
|
* @internal
|
|
34
36
|
*/
|
|
35
|
-
export type UseDashboardModelAction =
|
|
37
|
+
export type UseDashboardModelAction = UseDashboardModelFilterUpdateAction | UseDashboardModelAddWidgetAction;
|
|
38
|
+
/**
|
|
39
|
+
* Filter update actions for the dashboard model state used in {@link useDashboardModel}.
|
|
40
|
+
*
|
|
41
|
+
* @internal
|
|
42
|
+
*/
|
|
43
|
+
export type UseDashboardModelFilterUpdateAction = {
|
|
36
44
|
type: UseDashboardModelActionType.FILTERS_UPDATE;
|
|
37
45
|
payload: Filter[];
|
|
38
46
|
};
|
|
39
47
|
/**
|
|
40
|
-
*
|
|
41
|
-
* @param state
|
|
42
|
-
* @param action
|
|
48
|
+
* Add widget action for the dashboard model state used in {@link useDashboardModel}.
|
|
43
49
|
*
|
|
44
50
|
* @internal
|
|
45
51
|
*/
|
|
46
|
-
export
|
|
52
|
+
export type UseDashboardModelAddWidgetAction = {
|
|
53
|
+
type: UseDashboardModelActionType.ADD_WIDGET;
|
|
54
|
+
payload: WidgetModel;
|
|
55
|
+
};
|
|
47
56
|
/**
|
|
48
|
-
*
|
|
49
|
-
* @param restApi - The Sisense REST API instance
|
|
50
|
-
* @param reducer - The dashboard model reducer
|
|
57
|
+
* Reducer for the dashboard model state used in {@link useDashboardModel}.
|
|
51
58
|
*
|
|
59
|
+
* @param state
|
|
60
|
+
* @param action
|
|
52
61
|
* @internal
|
|
53
62
|
*/
|
|
54
|
-
export declare function
|
|
63
|
+
export declare function dashboardReducer(state: UseDashboardModelState, action: UseDashboardModelInternalAction): UseDashboardModelState;
|
|
55
64
|
/**
|
|
56
65
|
* Middleware that persists the dashboard model changes to the Sisense server.
|
|
66
|
+
*
|
|
57
67
|
* @param restApi - The Sisense REST API instance
|
|
58
68
|
* @param reducer - The dashboard model reducer
|
|
59
|
-
*
|
|
60
69
|
* @internal
|
|
61
70
|
*/
|
|
62
|
-
export declare function persistDashboardModelMiddleware(
|
|
63
|
-
export {};
|
|
71
|
+
export declare function persistDashboardModelMiddleware(dashbordOid: string | undefined, action: UseDashboardModelInternalAction, restApi: RestApi): Promise<UseDashboardModelInternalAction>;
|
package/dist/packages/sdk-ui/src/models/dashboard/use-dashboard-model/use-dashboard-model.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { UseDashboardModelAction } from './use-dashboard-model-reducer';
|
|
|
4
4
|
export interface UseDashboardModelParams extends GetDashboardModelParams {
|
|
5
5
|
/**
|
|
6
6
|
* Boolean flag indicating whether changes to the dashboard state should be saved to the dashboard in Fusion
|
|
7
|
+
*
|
|
7
8
|
* @default true
|
|
8
9
|
* @internal
|
|
9
10
|
*/
|
|
@@ -72,7 +72,7 @@ export type DashboardModelSuccessState = {
|
|
|
72
72
|
* **Note:** Dashboard extensions based on JS scripts and add-ons in Fusion are not supported.
|
|
73
73
|
*
|
|
74
74
|
* @example
|
|
75
|
-
* An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component `
|
|
75
|
+
* An example of retrieving an existing dashboard model from the Sisense instance and render its widgets with component `WidgetById`:
|
|
76
76
|
```tsx
|
|
77
77
|
const { dashboard, isLoading, isError } = useGetDashboardModel({
|
|
78
78
|
dashboardOid: '6448665edac1920034bce7a8',
|
|
@@ -89,7 +89,7 @@ export type DashboardModelSuccessState = {
|
|
|
89
89
|
<div>
|
|
90
90
|
{`Dashboard Title - ${dashboard.title}`}
|
|
91
91
|
{dashboard.widgets?.map((widget) => (
|
|
92
|
-
<
|
|
92
|
+
<WidgetById key={widget.oid} widgetOid={widget.oid} dashboardOid={dashboard.oid} />
|
|
93
93
|
))}
|
|
94
94
|
</div>
|
|
95
95
|
);
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { HttpClient } from '@sisense/sdk-rest-client';
|
|
2
|
+
import { HierarchyModel } from '../../models';
|
|
2
3
|
import { DataSource } from '@sisense/sdk-data';
|
|
3
4
|
import { GetHierarchiesOptions } from './types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Options for retrieving hierarchy models.
|
|
7
|
+
*/
|
|
8
|
+
export type GetHierarchyModelsOptions = GetHierarchiesOptions;
|
|
4
9
|
/** @internal */
|
|
5
|
-
export declare function getHierarchyModels(http: HttpClient, options:
|
|
10
|
+
export declare function getHierarchyModels(http: HttpClient, options: GetHierarchyModelsOptions, defaultDataSource?: DataSource): Promise<HierarchyModel[]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HookEnableParam } from '../../common/hooks/types.js';
|
|
2
2
|
import { HierarchyModel } from '../../models/hierarchy/hierarchy-model';
|
|
3
|
-
import {
|
|
3
|
+
import { GetHierarchyModelsOptions } from './get-hierarchy-models.js';
|
|
4
4
|
/**
|
|
5
5
|
* Parameters for {@link useGetHierarchyModels} hook.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface GetHierarchyModelsParams extends GetHierarchyModelsOptions, HookEnableParam {
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* States of hierarchy models load.
|
|
@@ -87,11 +87,11 @@ export type HierarchyModelsSuccessState = {
|
|
|
87
87
|
* @group Fusion Assets
|
|
88
88
|
* @fusionEmbed
|
|
89
89
|
*/
|
|
90
|
-
export declare const useGetHierarchyModels: (params:
|
|
90
|
+
export declare const useGetHierarchyModels: (params: GetHierarchyModelsParams) => HierarchyModelsState;
|
|
91
91
|
/**
|
|
92
92
|
* {@link useGetHierarchyModels} without tracking to be used inside other hooks or components in Compose SDK.
|
|
93
93
|
*
|
|
94
94
|
* @param params - Parameters of the hierarchies to be retrieved
|
|
95
95
|
* @internal
|
|
96
96
|
*/
|
|
97
|
-
export declare function useGetHierarchyModelsInternal(params:
|
|
97
|
+
export declare function useGetHierarchyModelsInternal(params: GetHierarchyModelsParams): HierarchyModelsState;
|
|
@@ -3,7 +3,7 @@ import { WidgetModel } from './widget-model.js';
|
|
|
3
3
|
import { ChartProps, ChartWidgetProps, WidgetProps, PivotTableProps, PivotTableWidgetProps, PluginWidgetProps, TableProps, TableWidgetProps, TextWidgetProps, CommonWidgetProps } from '../../props';
|
|
4
4
|
import { JaqlDataSource } from '@sisense/sdk-data';
|
|
5
5
|
import { CompleteThemeSettings } from '../../types.js';
|
|
6
|
-
import { WidgetDto } from '../../
|
|
6
|
+
import { WidgetDto } from '../../widget-by-id/types.js';
|
|
7
7
|
import { AppSettings } from '../../app/settings/settings.js';
|
|
8
8
|
/**
|
|
9
9
|
* Translates a {@link WidgetModel} to the parameters for executing a query for the widget.
|
|
@@ -152,6 +152,16 @@ export declare function fromWidgetDto(widgetDto: WidgetDto, themeSettings?: Comp
|
|
|
152
152
|
* @internal
|
|
153
153
|
*/
|
|
154
154
|
export declare function fromChartWidgetProps(chartWidgetProps: ChartWidgetProps): WidgetModel;
|
|
155
|
+
/**
|
|
156
|
+
* Data source as specified in the jaql
|
|
157
|
+
* but with required filelds
|
|
158
|
+
*
|
|
159
|
+
* @internal
|
|
160
|
+
*/
|
|
161
|
+
export type JaqlDataSourceForWidgetDto = JaqlDataSource & {
|
|
162
|
+
id: string;
|
|
163
|
+
address: string;
|
|
164
|
+
};
|
|
155
165
|
/**
|
|
156
166
|
* Translates a {@link WidgetModel} to {@link WidgetDto}.
|
|
157
167
|
*
|
|
@@ -160,4 +170,4 @@ export declare function fromChartWidgetProps(chartWidgetProps: ChartWidgetProps)
|
|
|
160
170
|
* @returns WidgetDto
|
|
161
171
|
* @internal
|
|
162
172
|
*/
|
|
163
|
-
export declare function toWidgetDto(widgetModel: WidgetModel, dataSource
|
|
173
|
+
export declare function toWidgetDto(widgetModel: WidgetModel, dataSource?: JaqlDataSourceForWidgetDto): WidgetDto;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DataSource, Filter } from '@sisense/sdk-data';
|
|
2
2
|
import { ChartDataOptions, PivotTableDataOptions } from '../../chart-data-options/types';
|
|
3
|
-
import { WidgetType } from '../../
|
|
3
|
+
import { WidgetType } from '../../widget-by-id/types';
|
|
4
4
|
import { ChartProps, ChartWidgetProps, PivotTableProps, TableProps, TableWidgetProps, PivotTableWidgetProps, TextWidgetProps } from '../../props';
|
|
5
5
|
import { ExecutePivotQueryParams, ExecuteQueryParams } from '../../query-execution';
|
|
6
6
|
import { ChartType, DrilldownOptions, WidgetStyleOptions } from '../../types';
|
|
@@ -16,9 +16,11 @@ type PivotRenderOptions = {
|
|
|
16
16
|
themeSettings: CompleteThemeSettings;
|
|
17
17
|
/** The size of the pivot table container. */
|
|
18
18
|
size: ContainerSize | null;
|
|
19
|
+
/** Callback to handle total height change. */
|
|
20
|
+
onTotalHeightChange?: (totalHeight: number) => void;
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
23
|
* A hook that renders the pivot table.
|
|
22
24
|
*/
|
|
23
|
-
export declare function useRenderPivot({ nodeRef, pivotBuilder, dataOptions, styleOptions, themeSettings, size, }: PivotRenderOptions): void;
|
|
25
|
+
export declare function useRenderPivot({ nodeRef, pivotBuilder, dataOptions, styleOptions, themeSettings, size, onTotalHeightChange, }: PivotRenderOptions): void;
|
|
24
26
|
export {};
|