@sisense/sdk-ui 0.13.0 → 0.15.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/api/chat-api-context.d.ts +12 -0
- package/dist/ai/api/chat-rest-api.d.ts +28 -0
- package/dist/ai/api/hooks.d.ts +74 -0
- package/dist/ai/api/types.d.ts +139 -0
- package/dist/ai/chat-box.d.ts +6 -0
- package/dist/ai/chat-frame.d.ts +8 -0
- package/dist/ai/chat-home.d.ts +2 -0
- package/dist/ai/chat-input.d.ts +7 -0
- package/dist/ai/chatbot-context.d.ts +11 -0
- package/dist/ai/chatbot.d.ts +27 -0
- package/dist/ai/data-topics/data-topic-item.d.ts +8 -0
- package/dist/ai/data-topics/data-topic-list.d.ts +10 -0
- package/dist/ai/data-topics/index.d.ts +2 -0
- package/dist/ai/icons/arrow-left-icon.d.ts +2 -0
- package/dist/ai/icons/clear-chat-icon.d.ts +2 -0
- package/dist/ai/icons/close-dialog-icon.d.ts +2 -0
- package/dist/ai/icons/expand-icon.d.ts +2 -0
- package/dist/ai/icons/info-icon.d.ts +2 -0
- package/dist/ai/icons/light-bulb-icon.d.ts +2 -0
- package/dist/ai/icons/loading-dots-icon.d.ts +2 -0
- package/dist/ai/icons/magic-wand-icon.d.ts +2 -0
- package/dist/ai/icons/message-icon.d.ts +2 -0
- package/dist/ai/icons/refresh-icon.d.ts +2 -0
- package/dist/ai/icons/sisense-logo.d.ts +2 -0
- package/dist/ai/icons/three-dots-icon.d.ts +2 -0
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/magic-wand-dropdown.d.ts +7 -0
- package/dist/ai/messages/chart-message-toolbar.d.ts +8 -0
- package/dist/ai/messages/chart-message.d.ts +8 -0
- package/dist/ai/messages/clear-history-message.d.ts +6 -0
- package/dist/ai/messages/get-widget-options.d.ts +13 -0
- package/dist/ai/messages/insights-message.d.ts +10 -0
- package/dist/ai/messages/jaql-element.d.ts +25 -0
- package/dist/ai/messages/message-list-resolver.d.ts +7 -0
- package/dist/ai/messages/message-resolver.d.ts +11 -0
- package/dist/ai/messages/text-message.d.ts +8 -0
- package/dist/ai/nav-back-button.d.ts +6 -0
- package/dist/ai/nlg-query-result.d.ts +20 -0
- package/dist/ai/suggestions/index.d.ts +4 -0
- package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +7 -0
- package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +7 -0
- package/dist/ai/suggestions/suggestion-item.d.ts +7 -0
- package/dist/ai/suggestions/suggestion-list-skeleton.d.ts +2 -0
- package/dist/ai/suggestions/suggestion-list.d.ts +7 -0
- package/dist/ai/suggestions/suggestions-with-intro.d.ts +8 -0
- package/dist/ai/toolbar.d.ts +8 -0
- package/dist/ai/use-chat-session.d.ts +22 -0
- package/dist/ai.d.ts +1 -0
- package/dist/ai.js +3390 -0
- package/dist/api/types/dashboard-dto.d.ts +13 -5
- package/dist/chart-data-options/types.d.ts +11 -5
- package/dist/chart-options-processor/translations/axis-section.d.ts +1 -0
- package/dist/chart-options-processor/translations/scatter-series.d.ts +1 -0
- package/dist/chart-options-processor/translations/sunburst/sunburst-series.d.ts +2 -1
- package/dist/chart-options-processor/translations/translations-to-highcharts.d.ts +3 -2
- package/dist/charts/indicator/chart/indicator.d.ts +1 -1
- package/dist/charts/indicator/chart/ticker.d.ts +2 -2
- package/dist/charts/indicator/indicator-legacy-chart-options/default-options.d.ts +2 -1
- package/dist/charts/indicator/types.d.ts +47 -6
- package/dist/common/components/loading-indicator.d.ts +33 -0
- package/dist/common/icons/loading-icon.d.ts +6 -0
- package/dist/dashboard-widget/translate-dashboard-filters.d.ts +13 -0
- package/dist/dashboard-widget/translate-panel-color-format.d.ts +3 -2
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +2 -2
- package/dist/dashboard-widget/translate-widget-filters.d.ts +21 -2
- package/dist/dashboard-widget/types.d.ts +14 -52
- package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +48 -0
- package/dist/dashboard-widget/utils.d.ts +3 -3
- package/dist/decorators/{with-tracking → component-decorators/with-tracking}/error-tracker.d.ts +1 -1
- package/dist/decorators/hook-decorators/index.d.ts +1 -0
- package/dist/decorators/hook-decorators/with-tracking.d.ts +2 -0
- package/dist/filters/components/common/basic-input.d.ts +8 -0
- package/dist/filters/components/common/index.d.ts +3 -0
- package/dist/filters/components/common/triangle-indicator.d.ts +2 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-display.d.ts +25 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-menu.d.ts +20 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-operations.d.ts +62 -0
- package/dist/filters/components/criteria-filter-tile/criteria-filter-tile.d.ts +27 -0
- package/dist/filters/components/criteria-filter-tile/index.d.ts +2 -0
- package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +4 -0
- package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts +12 -4
- package/dist/filters/components/date-filter/date-range-filter-tile/use-date-limits.d.ts +2 -2
- package/dist/filters/components/filter-tile.d.ts +5 -2
- package/dist/filters/components/member-filter-tile/basic-member-filter-tile.d.ts +2 -0
- package/dist/filters/components/member-filter-tile/member-filter-tile.d.ts +4 -2
- package/dist/filters/index.d.ts +1 -0
- package/dist/formulas/fetch-formula.d.ts +16 -0
- package/dist/formulas/index.d.ts +1 -0
- package/dist/formulas/use-get-shared-formula.d.ts +95 -0
- package/dist/funnel-chart.d.ts +1 -1
- package/dist/highcharts-memorized.d.ts +6 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +8248 -71295
- package/dist/indicator-chart.d.ts +1 -1
- package/dist/models/dashboard/get-dashboard-models.d.ts +1 -1
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +6 -1
- package/dist/models/dashboard/use-get-dashboard-models.d.ts +6 -1
- package/dist/pie-chart.d.ts +1 -1
- package/dist/props.d.ts +66 -19
- package/dist/query-execution/use-execute-query-by-widget-id.d.ts +18 -5
- package/dist/query-execution/use-execute-query.d.ts +10 -6
- package/dist/scatter-chart.d.ts +1 -1
- package/dist/table-widget-7b20ecf7.js +64167 -0
- package/dist/themes/colors.d.ts +86 -0
- package/dist/translation/resources/en.d.ts +25 -0
- package/dist/translation/resources/index.d.ts +50 -0
- package/dist/treemap-chart.d.ts +1 -2
- package/dist/types.d.ts +13 -3
- package/dist/widgets/chart-widget.d.ts +2 -2
- package/dist/widgets/common/drilldown.d.ts +1 -1
- package/dist/widgets/common/widget-header-info-button.d.ts +8 -0
- package/dist/widgets/common/widget-header.d.ts +1 -1
- package/dist/widgets/table-widget.d.ts +1 -2
- package/package.json +18 -7
- /package/dist/decorators/{as-sisense-component.d.ts → component-decorators/as-sisense-component.d.ts} +0 -0
- /package/dist/decorators/{with-default-translations.d.ts → component-decorators/with-default-translations.d.ts} +0 -0
- /package/dist/decorators/{with-error-boundary.d.ts → component-decorators/with-error-boundary.d.ts} +0 -0
- /package/dist/decorators/{with-sisense-context-validation.d.ts → component-decorators/with-sisense-context-validation.d.ts} +0 -0
- /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/index.d.ts +0 -0
- /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/use-track-component-init.d.ts +0 -0
- /package/dist/decorators/{with-tracking → component-decorators/with-tracking}/with-tracking.d.ts +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of filter options for the {@link CriteriaFilterMenu},
|
|
3
|
+
* to be provided to subcomponents as the `filterType` prop.
|
|
4
|
+
*
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export declare const FilterOption: {
|
|
8
|
+
BETWEEN: string;
|
|
9
|
+
EQUALS: string;
|
|
10
|
+
NOT_EQUALS: string;
|
|
11
|
+
LESS_THAN: string;
|
|
12
|
+
LESS_THAN_OR_EQUAL: string;
|
|
13
|
+
GREATER_THAN: string;
|
|
14
|
+
GREATER_THAN_OR_EQUAL: string;
|
|
15
|
+
IS: string;
|
|
16
|
+
IS_NOT: string;
|
|
17
|
+
CONTAINS: string;
|
|
18
|
+
NOT_CONTAIN: string;
|
|
19
|
+
STARTS_WITH: string;
|
|
20
|
+
NOT_STARTS_WITH: string;
|
|
21
|
+
ENDS_WITH: string;
|
|
22
|
+
NOT_ENDS_WITH: string;
|
|
23
|
+
LIKE: string;
|
|
24
|
+
};
|
|
25
|
+
export type FilterOptionType = keyof typeof FilterOption;
|
|
26
|
+
export type FilterVariant = 'vertical' | 'horizontal';
|
|
27
|
+
export type FilterInputType = 'text' | 'number';
|
|
28
|
+
/**
|
|
29
|
+
* Object containing related information for a filter option,
|
|
30
|
+
* including the function to be used for filtering, the number of inputs,
|
|
31
|
+
* and the symbols to be displayed in the UI as field labels.
|
|
32
|
+
* Ranked indicates whether the filter is ranked (e.g. Top 10).
|
|
33
|
+
*
|
|
34
|
+
* @internal
|
|
35
|
+
*/
|
|
36
|
+
export type FilterInfo = {
|
|
37
|
+
fn: Function;
|
|
38
|
+
inputCount: number;
|
|
39
|
+
symbols: string[];
|
|
40
|
+
message: string;
|
|
41
|
+
ranked: boolean;
|
|
42
|
+
type: FilterInputType;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Map of {@link FilterOption} to {@link FilterInfo}
|
|
46
|
+
* for each type of filter available.
|
|
47
|
+
*
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
export declare const CRITERIA_FILTER_MAP: {
|
|
51
|
+
[key: string]: FilterInfo;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Determines whether the arrangement of the filter menu is vertical.
|
|
55
|
+
*
|
|
56
|
+
* @param arrangement - Arrangement of the filter menu
|
|
57
|
+
* @returns True if the arrangement is vertical, false otherwise
|
|
58
|
+
* @internal
|
|
59
|
+
*/
|
|
60
|
+
export declare const isVertical: (arrangement: FilterVariant) => boolean;
|
|
61
|
+
export declare const operatorsToOption: (operatorA?: string, operatorB?: string) => "BETWEEN" | "EQUALS" | "NOT_EQUALS" | "LESS_THAN" | "LESS_THAN_OR_EQUAL" | "GREATER_THAN" | "GREATER_THAN_OR_EQUAL" | "IS" | "IS_NOT" | "CONTAINS" | "NOT_CONTAIN" | "STARTS_WITH" | "NOT_STARTS_WITH" | "ENDS_WITH" | "NOT_ENDS_WITH" | "LIKE";
|
|
62
|
+
export declare const translatedMsgNoVal: (message: string, t: Function) => any;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterVariant } from './criteria-filter-operations.js';
|
|
3
|
+
import { Filter, NumericFilter, TextFilter } from '@sisense/sdk-data';
|
|
4
|
+
/**
|
|
5
|
+
* Props for {@link CriteriaFilterTile}
|
|
6
|
+
*/
|
|
7
|
+
export interface CriteriaFilterTileProps {
|
|
8
|
+
/** Title for the filter tile, which is rendered into the header */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Text or numeric filter object to initialize filter type and default values */
|
|
11
|
+
filter: CriteriaFilterType;
|
|
12
|
+
/** Arrangement of the filter inputs. Use vertical for standard filter tiles and horizontal for toolbars */
|
|
13
|
+
arrangement?: FilterVariant;
|
|
14
|
+
/** Callback returning filter object, or null for failure */
|
|
15
|
+
onUpdate: (filter: Filter | null) => void;
|
|
16
|
+
}
|
|
17
|
+
export type CriteriaFilterType = NumericFilter | TextFilter;
|
|
18
|
+
/**
|
|
19
|
+
* UI component that allows the user to filter numeric or text attributes according to
|
|
20
|
+
* a number of built-in operations defined in the {@link NumericFilter} or {@link TextFilter}.
|
|
21
|
+
*
|
|
22
|
+
* The arrangement prop determines whether the filter is rendered vertically or horizontally, with the latter intended for toolbar use and omitting title, enable/disable, and collapse/expand functionality.
|
|
23
|
+
*
|
|
24
|
+
* @param props - Criteria filter tile props
|
|
25
|
+
* @returns Criteria filter tile component
|
|
26
|
+
*/
|
|
27
|
+
export declare const CriteriaFilterTile: import("react").FunctionComponent<CriteriaFilterTileProps>;
|
package/dist/filters/components/date-filter/date-range-filter-tile/date-range-filter-tile.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { LevelAttribute, DataSource, Filter } from '@sisense/sdk-data';
|
|
3
3
|
export interface DateRangeFilterTileProps {
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Filter tile title
|
|
6
6
|
*/
|
|
7
7
|
title: string;
|
|
8
8
|
/**
|
|
@@ -12,7 +12,7 @@ export interface DateRangeFilterTileProps {
|
|
|
12
12
|
/**
|
|
13
13
|
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
14
14
|
*
|
|
15
|
-
* If not specified, the query will use the `defaultDataSource` specified in the parent
|
|
15
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
16
16
|
*/
|
|
17
17
|
dataSource?: DataSource;
|
|
18
18
|
/**
|
|
@@ -20,11 +20,15 @@ export interface DateRangeFilterTileProps {
|
|
|
20
20
|
*/
|
|
21
21
|
filter: Filter;
|
|
22
22
|
/**
|
|
23
|
-
* Earliest
|
|
23
|
+
* Earliest allowed date for selection.
|
|
24
|
+
*
|
|
25
|
+
* If not specified, the earliest date of the target date-level attribute will be used.
|
|
24
26
|
*/
|
|
25
27
|
earliestDate?: string;
|
|
26
28
|
/**
|
|
27
|
-
*
|
|
29
|
+
* Latest allowed date for selection.
|
|
30
|
+
*
|
|
31
|
+
* If not specified, the latest date of the target date-level attribute will be used.
|
|
28
32
|
*/
|
|
29
33
|
lastDate?: string;
|
|
30
34
|
/**
|
|
@@ -33,6 +37,10 @@ export interface DateRangeFilterTileProps {
|
|
|
33
37
|
* @param filter - Date range filter
|
|
34
38
|
*/
|
|
35
39
|
onChange: (filter: Filter) => void;
|
|
40
|
+
/**
|
|
41
|
+
* List of filters this filter is dependent on.
|
|
42
|
+
*/
|
|
43
|
+
parentFilters?: Filter[];
|
|
36
44
|
}
|
|
37
45
|
/**
|
|
38
46
|
* Date Range Filter Tile component for filtering data by date range.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataSource, LevelAttribute } from '@sisense/sdk-data';
|
|
1
|
+
import { DataSource, Filter, LevelAttribute } from '@sisense/sdk-data';
|
|
2
2
|
type DateLimits = {
|
|
3
3
|
minDate?: string;
|
|
4
4
|
maxDate?: string;
|
|
5
5
|
};
|
|
6
|
-
export declare const useDateLimits: (userLimits: DateLimits, attribute: LevelAttribute, dataSource?: DataSource) => Required<DateLimits> | null;
|
|
6
|
+
export declare const useDateLimits: (userLimits: DateLimits, attribute: LevelAttribute, dataSource?: DataSource, parentFilters?: Filter[]) => Required<DateLimits> | null;
|
|
7
7
|
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { FunctionComponent, ReactNode } from 'react';
|
|
2
|
+
import { FilterVariant } from './criteria-filter-tile/criteria-filter-operations';
|
|
2
3
|
interface Props {
|
|
3
4
|
title: string;
|
|
4
5
|
renderContent: (collapsed: boolean, tileDisabled: boolean) => ReactNode;
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
arrangement?: FilterVariant;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
isDependent?: boolean;
|
|
9
|
+
onToggleDisabled?: () => void;
|
|
7
10
|
}
|
|
8
11
|
/**
|
|
9
12
|
* Generic component that owns common functionality of a filter "tile" like
|
|
@@ -16,6 +16,8 @@ export interface BasicMemberFilterTileProps {
|
|
|
16
16
|
onUpdateSelectedMembers?: (members: string[]) => void;
|
|
17
17
|
/** Configurable limit on size of allowedMembers */
|
|
18
18
|
maxAllowedMembers?: number;
|
|
19
|
+
/** Whether this is a dependent filter */
|
|
20
|
+
isDependent?: boolean;
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* UI component that, given a list of members to select from and a list of
|
|
@@ -9,15 +9,17 @@ export interface MemberFilterTileProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* Data source the query is run against - e.g. `Sample ECommerce`
|
|
11
11
|
*
|
|
12
|
-
* If not specified, the query will use the `defaultDataSource` specified in the parent
|
|
12
|
+
* If not specified, the query will use the `defaultDataSource` specified in the parent Sisense Context.
|
|
13
13
|
*/
|
|
14
14
|
dataSource?: DataSource;
|
|
15
|
-
/** Attribute to filter on. A query will
|
|
15
|
+
/** Attribute to filter on. A query will run to fetch all this attribute's members */
|
|
16
16
|
attribute: Attribute;
|
|
17
17
|
/** Source filter object. Caller is responsible for keeping track of filter state */
|
|
18
18
|
filter: Filter | null;
|
|
19
19
|
/** Callback indicating when the source member filter object should be updated */
|
|
20
20
|
onChange: (filter: Filter | null) => void;
|
|
21
|
+
/** List of filters this filter is dependent on */
|
|
22
|
+
parentFilters?: Filter[];
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* UI component that allows the user to select members to include/exclude in a
|
package/dist/filters/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ClientApplication } from '../app/client-application.js';
|
|
2
|
+
import { DimensionalCalculatedMeasure } from '@sisense/sdk-data';
|
|
3
|
+
/**
|
|
4
|
+
* Fetch a formula by oid from the default Sisense instance
|
|
5
|
+
*
|
|
6
|
+
* @param oid - Formula identifier in Sisense instance
|
|
7
|
+
* @param app - Client application
|
|
8
|
+
*/
|
|
9
|
+
export declare function fetchFormulaByOid(oid: string, app: ClientApplication): Promise<DimensionalCalculatedMeasure | null>;
|
|
10
|
+
/**
|
|
11
|
+
* Fetch a shared formula by name and data source from the Sisense instance
|
|
12
|
+
*
|
|
13
|
+
* @param name - Formula name/title in Sisense instance
|
|
14
|
+
* @param dataSource - Data source in Sisense instance
|
|
15
|
+
*/
|
|
16
|
+
export declare function fetchFormula(name: string, dataSource: string, app: ClientApplication): Promise<DimensionalCalculatedMeasure | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './use-get-shared-formula';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { CalculatedMeasure } from '@sisense/sdk-data';
|
|
2
|
+
import { UseGetSharedFormulaParams } from '../props.js';
|
|
3
|
+
import { HookEnableParam } from '../common/hooks/types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Parameters for {@link useGetSharedFormula} hook.
|
|
6
|
+
*/
|
|
7
|
+
export interface GetSharedFormulaParams extends UseGetSharedFormulaParams, HookEnableParam {
|
|
8
|
+
/**
|
|
9
|
+
* Dashboard identifier
|
|
10
|
+
*/
|
|
11
|
+
dashboardOid: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* States of a shared formula load.
|
|
15
|
+
*/
|
|
16
|
+
export type SharedFormulaState = SharedFormulaLoadingState | SharedFormulaErrorState | SharedFormulaSuccessState;
|
|
17
|
+
/**
|
|
18
|
+
* State of a shared formula loading.
|
|
19
|
+
*/
|
|
20
|
+
export type SharedFormulaLoadingState = {
|
|
21
|
+
/** Whether the shared formula is loading */
|
|
22
|
+
isLoading: true;
|
|
23
|
+
/** Whether the shared formula load has failed */
|
|
24
|
+
isError: false;
|
|
25
|
+
/** Whether the shared formula load has succeeded */
|
|
26
|
+
isSuccess: false;
|
|
27
|
+
/** The error if any occurred */
|
|
28
|
+
error: undefined;
|
|
29
|
+
/** The result shared formula if the load has succeeded */
|
|
30
|
+
formula: CalculatedMeasure | null;
|
|
31
|
+
/** The status of the shared formula load */
|
|
32
|
+
status: 'loading';
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* State of a shared formula load that has failed.
|
|
36
|
+
*/
|
|
37
|
+
export type SharedFormulaErrorState = {
|
|
38
|
+
/** Whether the shared formula is loading */
|
|
39
|
+
isLoading: false;
|
|
40
|
+
/** Whether the shared formula load has failed */
|
|
41
|
+
isError: true;
|
|
42
|
+
/** Whether the shared formula load has succeeded */
|
|
43
|
+
isSuccess: false;
|
|
44
|
+
/** The error if any occurred */
|
|
45
|
+
error: Error;
|
|
46
|
+
/** The result shared formula if the load has succeeded */
|
|
47
|
+
formula: undefined;
|
|
48
|
+
/** The status of the shared formula load */
|
|
49
|
+
status: 'error';
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* State of a shared formula load that has succeeded.
|
|
53
|
+
*/
|
|
54
|
+
export type SharedFormulaSuccessState = {
|
|
55
|
+
/** Whether the shared formula is loading */
|
|
56
|
+
isLoading: false;
|
|
57
|
+
/** Whether the shared formula load has failed */
|
|
58
|
+
isError: false;
|
|
59
|
+
/** Whether the shared formula load has succeeded */
|
|
60
|
+
isSuccess: true;
|
|
61
|
+
/** The error if any occurred */
|
|
62
|
+
error: undefined;
|
|
63
|
+
/** The result shared formula if the load has succeeded */
|
|
64
|
+
formula: CalculatedMeasure | null;
|
|
65
|
+
/** The status of the shared formula load */
|
|
66
|
+
status: 'success';
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Fetch a [shared formula](https://docs.sisense.com/main/SisenseLinux/shared-formulas.htm) from the Sisense instance
|
|
70
|
+
*
|
|
71
|
+
* Formula can be identified either by `oid` or by name and data source pair
|
|
72
|
+
*
|
|
73
|
+
* When the retrieval is successful but the shared formula is not found, the result is altered from being `undefined` to `null`
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* An example of retrieving a shared formula by oid:
|
|
77
|
+
```tsx
|
|
78
|
+
const { formula, isLoading, isError } = useGetSharedFormula({ oid: 'd61c337b-fabc-4e9e-b4cc-a30116857153' })
|
|
79
|
+
```
|
|
80
|
+
* @example
|
|
81
|
+
* An example of retrieving a shared formula by name and data source:
|
|
82
|
+
```tsx
|
|
83
|
+
const { formula, isLoading, isError } = useGetSharedFormula({ name: 'My Shared Formula', datasource: DM.DataSource })
|
|
84
|
+
```
|
|
85
|
+
* @param params - {@link UseGetSharedFormulaParams}
|
|
86
|
+
* @param dataSource - Data source in Sisense instance
|
|
87
|
+
* @returns Formula load state that contains the status of the execution, the result formula, or the error if any
|
|
88
|
+
*/
|
|
89
|
+
export declare const useGetSharedFormula: (params: UseGetSharedFormulaParams) => SharedFormulaState;
|
|
90
|
+
/**
|
|
91
|
+
* {@link useGetSharedFormula} without tracking to be used inside other hooks or components in Compose SDK.
|
|
92
|
+
*
|
|
93
|
+
* @internal
|
|
94
|
+
*/
|
|
95
|
+
export declare function useGetSharedFormulaInternal(params: UseGetSharedFormulaParams): SharedFormulaState;
|
package/dist/funnel-chart.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FunnelChartProps } from './props';
|
|
3
3
|
/**
|
|
4
|
-
* A React component representing data progressively decreasing in size or quantity through a
|
|
4
|
+
* A React component representing data progressively decreasing in size or quantity through a funnel shape.
|
|
5
5
|
* See [Funnel Chart](https://docs.sisense.com/main/SisenseLinux/funnel-chart.htm) for more information.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HighchartsOptionsInternal } from './chart-options-processor/chart-options-service';
|
|
3
|
+
export declare const HighchartsReactMemoized: import("react").MemoExoticComponent<({ options, immutable, }: {
|
|
4
|
+
options: HighchartsOptionsInternal;
|
|
5
|
+
immutable: boolean | null | undefined;
|
|
6
|
+
}) => JSX.Element>;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,8 @@ export * from './sisense-context/custom-sisense-context-provider';
|
|
|
31
31
|
export * from './theme-provider/custom-theme-provider';
|
|
32
32
|
export { getThemeSettingsByOid } from './themes/theme-loader';
|
|
33
33
|
export { getDefaultThemeSettings } from './chart-options-processor/theme-option-service';
|
|
34
|
-
export { useGetDashboardModel, useGetDashboardModels, getDashboardModel, getDashboardModels, type DashboardModel, type GetDashboardModelParams, type GetDashboardModelsParams, type DashboardModelState, type DashboardModelLoadingState, type DashboardModelSuccessState, type DashboardModelErrorState, type DashboardModelsState, type DashboardModelsLoadingState, type DashboardModelsSuccessState, type DashboardModelsErrorState, type WidgetModel, } from './models';
|
|
34
|
+
export { useGetDashboardModel, useGetDashboardModels, getDashboardModel, getDashboardModels, 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 GetDashboardModelOptions, type GetDashboardModelsOptions, } from './models';
|
|
35
35
|
export * from './props';
|
|
36
36
|
export * from './types';
|
|
37
37
|
export * from './filters';
|
|
38
|
+
export * from './formulas';
|