@sisense/sdk-ui 0.14.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 +2 -1
- 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 +2 -2
- package/dist/dashboard-widget/translate-widget-data-options.d.ts +2 -2
- package/dist/dashboard-widget/translate-widget-filters.d.ts +4 -16
- package/dist/dashboard-widget/types.d.ts +1 -54
- package/dist/dashboard-widget/utils.d.ts +2 -2
- package/dist/filters/components/common/index.d.ts +2 -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 +11 -3
- 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 +3 -0
- 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 +3 -1
- 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/index.d.ts +2 -1
- package/dist/index.js +8180 -71481
- package/dist/models/dashboard/get-dashboard-models.d.ts +1 -1
- package/dist/models/dashboard/use-get-dashboard-model.d.ts +1 -1
- package/dist/props.d.ts +30 -11
- 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/types.d.ts +6 -0
- package/dist/widgets/common/widget-header-info-button.d.ts +8 -0
- package/dist/widgets/common/widget-header.d.ts +1 -1
- package/package.json +18 -8
|
@@ -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/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';
|