@sisense/sdk-ui 1.8.0 → 1.10.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 (158) hide show
  1. package/dist/ai/ai-context-provider.d.ts +1 -4
  2. package/dist/ai/ai-disclaimer.d.ts +4 -2
  3. package/dist/ai/api/chat-api-provider.d.ts +1 -1
  4. package/dist/ai/buttons/insights-button.d.ts +3 -0
  5. package/dist/ai/buttons/thumbs-down-button.d.ts +1 -2
  6. package/dist/ai/buttons/thumbs-up-button.d.ts +1 -2
  7. package/dist/ai/chat-box.d.ts +1 -2
  8. package/dist/ai/chat-config.d.ts +21 -1
  9. package/dist/ai/chat-dropup.d.ts +11 -0
  10. package/dist/ai/chat-frame.d.ts +7 -4
  11. package/dist/ai/chat-home.d.ts +1 -2
  12. package/dist/ai/chat-input.d.ts +4 -2
  13. package/dist/ai/chat-router.d.ts +1 -2
  14. package/dist/ai/chatbot.d.ts +0 -7
  15. package/dist/ai/common/collapsible.d.ts +1 -2
  16. package/dist/ai/common/dropup-section.d.ts +7 -0
  17. package/dist/ai/common/error-container.d.ts +1 -2
  18. package/dist/ai/common/icon-button.d.ts +12 -0
  19. package/dist/ai/{toolbar.d.ts → common/toolbar.d.ts} +5 -0
  20. package/dist/ai/common/tooltip.d.ts +2 -3
  21. package/dist/ai/data-topics/data-topic-item.d.ts +1 -2
  22. package/dist/ai/data-topics/data-topic-list.d.ts +1 -2
  23. package/dist/ai/icons/arrow-left-icon.d.ts +5 -2
  24. package/dist/ai/icons/clear-chat-icon.d.ts +2 -2
  25. package/dist/ai/icons/close-dialog-icon.d.ts +1 -2
  26. package/dist/ai/icons/expand-icon.d.ts +3 -2
  27. package/dist/ai/icons/info-icon.d.ts +3 -2
  28. package/dist/ai/icons/light-bulb-icon.d.ts +3 -2
  29. package/dist/ai/icons/loading-dots-icon.d.ts +1 -2
  30. package/dist/ai/icons/message-icon.d.ts +2 -2
  31. package/dist/ai/icons/refresh-icon.d.ts +1 -2
  32. package/dist/ai/icons/sisense-logo.d.ts +5 -2
  33. package/dist/ai/icons/three-dots-icon.d.ts +3 -2
  34. package/dist/ai/icons/thumbs-down-hovered-icon.d.ts +2 -2
  35. package/dist/ai/icons/thumbs-down-icon.d.ts +2 -2
  36. package/dist/ai/icons/thumbs-up-hovered-icon.d.ts +2 -2
  37. package/dist/ai/icons/thumbs-up-icon.d.ts +2 -2
  38. package/dist/ai/index.d.ts +3 -1
  39. package/dist/ai/messages/chart-message-toolbar.d.ts +1 -2
  40. package/dist/ai/messages/chart-message.d.ts +1 -2
  41. package/dist/ai/messages/chat-welcome-message.d.ts +1 -2
  42. package/dist/ai/messages/clear-history-message.d.ts +1 -2
  43. package/dist/ai/messages/clear-history-success-message.d.ts +1 -2
  44. package/dist/ai/messages/clickable-message.d.ts +4 -2
  45. package/dist/ai/messages/feedback-wrapper.d.ts +2 -2
  46. package/dist/ai/messages/get-widget-options.d.ts +14 -0
  47. package/dist/ai/messages/insights-message.d.ts +1 -7
  48. package/dist/ai/messages/jaql-element.d.ts +5 -2
  49. package/dist/ai/messages/message-list-resolver.d.ts +1 -2
  50. package/dist/ai/messages/message-resolver.d.ts +2 -1
  51. package/dist/ai/messages/nlq-message-group.d.ts +6 -4
  52. package/dist/ai/messages/text-message.d.ts +4 -5
  53. package/dist/ai/nav-back-button.d.ts +6 -4
  54. package/dist/ai/suggestions/suggestion-item.d.ts +1 -2
  55. package/dist/ai/suggestions/suggestion-list-skeleton.d.ts +1 -2
  56. package/dist/ai/suggestions/suggestion-list.d.ts +1 -2
  57. package/dist/ai/suggestions/suggestions-with-intro.d.ts +1 -2
  58. package/dist/ai/{translators/use-get-data-source.d.ts → use-get-data-source-fields.d.ts} +2 -2
  59. package/dist/ai.js +2130 -7264
  60. package/dist/alert-box/alert-box.d.ts +1 -2
  61. package/dist/api/types/dashboard-dto.d.ts +16 -0
  62. package/dist/app/client-application.d.ts +6 -2
  63. package/dist/area-chart.d.ts +3 -3
  64. package/dist/bar-chart.d.ts +2 -2
  65. package/dist/chart/helpers/use-translated-data-options.d.ts +2 -2
  66. package/dist/chart-data-options/get-translated-data-options.d.ts +2 -2
  67. package/dist/chart-data-options/utils.d.ts +10 -0
  68. package/dist/chart-options-processor/style-to-design-options-translator/prepare-design-options.d.ts +4 -2
  69. package/dist/chart-options-processor/style-to-design-options-translator/translate-to-highcharts-options.d.ts +7 -4
  70. package/dist/chart-options-processor/theme-option-service.d.ts +0 -8
  71. package/dist/chart-options-processor/translations/design-options.d.ts +9 -7
  72. package/dist/chart-options-processor/translations/types.d.ts +7 -6
  73. package/dist/charts/map-charts/areamap/areamap.d.ts +3 -6
  74. package/dist/charts/map-charts/scattermap/scattermap.d.ts +5 -9
  75. package/dist/charts/table/data-table-wrapper.d.ts +1 -2
  76. package/dist/charts/table/header/field-type-icon.d.ts +1 -2
  77. package/dist/charts/table/pure-table.d.ts +1 -2
  78. package/dist/column-chart.d.ts +2 -2
  79. package/dist/common/components/loading-dots.d.ts +1 -2
  80. package/dist/common/components/loading-indicator.d.ts +83 -2
  81. package/dist/common/components/loading-overlay.d.ts +1 -1
  82. package/dist/common/components/loading-spinner.d.ts +1 -2
  83. package/dist/common/icons/exclamation-mark-icon.d.ts +1 -2
  84. package/dist/common/icons/loading-icon.d.ts +1 -2
  85. package/dist/dashboard-widget/translate-widget-style-options.d.ts +3 -2
  86. package/dist/dashboard-widget/types.d.ts +22 -2
  87. package/dist/dashboard-widget/use-fetch-widget-dto-model.d.ts +1 -0
  88. package/dist/dashboard-widget/utils.d.ts +9 -0
  89. package/dist/debounce-2yQ2123W.js +76298 -0
  90. package/dist/decorators/component-decorators/with-tracking/use-track-component-init.d.ts +1 -1
  91. package/dist/dynamic-size-container/default-size.d.ts +5 -1
  92. package/dist/dynamic-size-container/dynamic-size-container.d.ts +12 -3
  93. package/dist/error-boundary/error-boundary-box.d.ts +1 -2
  94. package/dist/error-boundary/error-boundary.d.ts +1 -1
  95. package/dist/filters/components/common/dropdown.d.ts +1 -1
  96. package/dist/filters/components/common/switch.d.ts +4 -1
  97. package/dist/filters/components/common/triangle-indicator.d.ts +1 -2
  98. package/dist/filters/components/date-filter/date-filter/calendar-date-selector.d.ts +1 -2
  99. package/dist/filters/components/date-filter/date-filter/calendar-header.d.ts +1 -2
  100. package/dist/filters/components/date-filter/date-filter/date-filter.d.ts +1 -2
  101. package/dist/filters/components/date-filter/date-filter/quick-date-selection-buttons.d.ts +1 -2
  102. package/dist/filters/components/icons/arrow-down-icon.d.ts +1 -1
  103. package/dist/filters/components/icons/arrow-right-icon.d.ts +1 -1
  104. package/dist/filters/components/icons/date-icon.d.ts +1 -1
  105. package/dist/filters/components/icons/double-arrow-right-icon.d.ts +1 -1
  106. package/dist/filters/components/icons/menu-icon.d.ts +1 -1
  107. package/dist/filters/components/icons/pencil-icon.d.ts +1 -1
  108. package/dist/filters/components/icons/plus-icon.d.ts +1 -1
  109. package/dist/filters/components/icons/search-icon.d.ts +1 -1
  110. package/dist/filters/components/icons/trash-icon.d.ts +1 -1
  111. package/dist/highcharts-memorized.d.ts +1 -1
  112. package/dist/index.d.ts +2 -1
  113. package/dist/index.js +35808 -7229
  114. package/dist/indicator-canvas.d.ts +4 -9
  115. package/dist/line-chart.d.ts +2 -2
  116. package/dist/models/dashboard/translate-dashboard.d.ts +3 -2
  117. package/dist/models/dashboard/types.d.ts +6 -8
  118. package/dist/models/widget/use-get-widget-model.d.ts +1 -1
  119. package/dist/models/widget/widget-model.d.ts +50 -6
  120. package/dist/no-results-overlay/no-results-overlay.d.ts +1 -2
  121. package/dist/pie-chart.d.ts +2 -2
  122. package/dist/pivot-table/helpers/prepare-pivot-styling-props.d.ts +20 -0
  123. package/dist/pivot-table/sorting-utils.d.ts +11 -55
  124. package/dist/pivot-table/use-get-pivot-table-query.d.ts +10 -2
  125. package/dist/pivot-table/use-pivot-table-data-options-internal.d.ts +15 -0
  126. package/dist/polar-chart.d.ts +2 -2
  127. package/dist/props.d.ts +61 -2
  128. package/dist/query-execution/use-execute-query.d.ts +1 -1
  129. package/dist/scatter-chart.d.ts +1 -1
  130. package/dist/sisense-chart/sisense-chart.d.ts +4 -6
  131. package/dist/theme-provider/default-theme-settings.d.ts +9 -0
  132. package/dist/theme-provider/types.d.ts +7 -0
  133. package/dist/translation/i18n-provider.d.ts +1 -1
  134. package/dist/translation/resources/en.d.ts +3 -1
  135. package/dist/translation/resources/index.d.ts +6 -2
  136. package/dist/types.d.ts +170 -1
  137. package/dist/widgets/common/context-menu.d.ts +1 -2
  138. package/dist/widgets/common/drilldown-breadcrumbs/styled-buttons.d.ts +2 -2
  139. package/dist/widgets/common/widget-container.d.ts +15 -0
  140. package/dist/widgets/common/widget-header-info-button.d.ts +1 -2
  141. package/dist/widgets/drilldown-widget.d.ts +2 -3
  142. package/dist/widgets/pivot-table-widget.d.ts +22 -0
  143. package/package.json +18 -19
  144. package/dist/ai/chat-style-provider.d.ts +0 -22
  145. package/dist/ai/icons/magic-wand-icon.d.ts +0 -2
  146. package/dist/ai/magic-wand-dropdown.d.ts +0 -7
  147. package/dist/ai/suggestions/suggestion-dropdown-item.d.ts +0 -7
  148. package/dist/ai/suggestions/suggestion-dropdown-list.d.ts +0 -7
  149. package/dist/ai/translators/code-templates.d.ts +0 -11
  150. package/dist/ai/translators/generate-code.d.ts +0 -9
  151. package/dist/ai/translators/index.d.ts +0 -4
  152. package/dist/ai/translators/model-translator.d.ts +0 -51
  153. package/dist/ai/translators/query-translator.d.ts +0 -137
  154. package/dist/ai/translators/translate-filters-to-code.d.ts +0 -2
  155. package/dist/ai/translators/translate-props-to-code.d.ts +0 -8
  156. package/dist/ai/translators/types.d.ts +0 -105
  157. package/dist/ai/translators/utils.d.ts +0 -12
  158. package/dist/useQuery-cb11e76c.js +0 -121619
@@ -1,137 +0,0 @@
1
- import { ExpandedQueryModel, SimpleQueryModel, SimpleChartRecommendations } from '../../ai/translators/types';
2
- import { DataSourceField, MetadataItem, MetadataItemJaql } from '@sisense/sdk-query-client';
3
- import { ChartRecommendations } from '../../ai';
4
- /**
5
- * A class that translates ExpandedQueryModel (Raw JAQL+Chart Recommendations)
6
- * to SimpleQueryModel (Simple JAQL+Simple Chart Options) and vice versa.
7
- *
8
- * It also provides methods to stringify query models to YAML strings
9
- * and parse YAML strings to query models.
10
- *
11
- * @internal
12
- */
13
- export declare class QueryTranslator {
14
- private readonly contextTitle;
15
- private readonly indexedFields;
16
- /**
17
- * Constructor for QueryTranslator.
18
- *
19
- * @param contextTitle - The context title
20
- * @param fields - The data source fields
21
- */
22
- constructor(contextTitle: string, fields: DataSourceField[]);
23
- private indexFields;
24
- /**
25
- * Concatenates Aggregation Types.
26
- */
27
- private concatAggTypes;
28
- /**
29
- * Simplifies Aggregation Formula defined in MetadataItemJaql returned from chat response.
30
- *
31
- * @param aggFormula - The Aggregation Formula to simplify
32
- * @returns The equivalent measure
33
- * @privateRemarks
34
- * See unit tests for examples of aggregation formulas and their equivalent measures.
35
- */
36
- simplifyAggFormula(aggFormula: MetadataItemJaql): MetadataItemJaql;
37
- /**
38
- * Simplifies MetadataItemJaql.
39
- *
40
- * @param item - The MetadataItemJaql to simplify
41
- * @returns The simplified MetadataItemJaql
42
- */
43
- simplifyMetadataItemJaql(item: MetadataItemJaql): MetadataItemJaql;
44
- /**
45
- * Simplify filter
46
- *
47
- * @param item - the MetadataItem
48
- * @return the MetadataItem with simplified filter
49
- */
50
- simplifyMetadataItemFilter(item: MetadataItem): MetadataItem;
51
- /**
52
- * Simplify date and number format
53
- *
54
- * @param item - the MetadataItem
55
- * @return the MetadataItem with simplified format
56
- */
57
- simplifyMetadataItemFormat(item: MetadataItem): MetadataItem;
58
- /**
59
- * Simplifies MetadataItem.
60
- *
61
- * @param item - The MetadataItem to simplify
62
- * @returns The simplified MetadataItem
63
- */
64
- simplifyMetadataItem(item: MetadataItem): MetadataItem;
65
- /**
66
- * Simplifies Chart Recommendations.
67
- *
68
- * @param chartRecommendations - The Chart Recommendations to simplify
69
- * @returns The simplified chart data options
70
- */
71
- simplifyChartRecommendations(chartRecommendations: ChartRecommendations | {}): SimpleChartRecommendations | {};
72
- /**
73
- * Returns the query title with the chart type.
74
- *
75
- * @param queryTitle - The query title
76
- * @param chartRecommendations - The chart recommendations
77
- * @returns The query title with the chart type
78
- */
79
- getQueryTitleWithChartType(queryTitle: string, chartRecommendations: {} | ChartRecommendations): string;
80
- /**
81
- * Takes a ExpandedQueryModel (e.g., from chat response) and translates it to SimpleQueryModel.
82
- *
83
- * @param expandedQueryModel - The Expanded Query model to simplify
84
- * @returns The simplified query model
85
- */
86
- translateToSimple(expandedQueryModel: ExpandedQueryModel): SimpleQueryModel;
87
- /**
88
- * Stringifies a simple query model to YAML string.
89
- *
90
- * @param simpleQueryModel - The Simple Query model to convert
91
- * @returns The YAML string representing the simple query model
92
- */
93
- stringifySimple(simpleQueryModel: SimpleQueryModel): string;
94
- /**
95
- * Parses a YAML string to Simple Query Model.
96
- *
97
- * @param simpleQueryYaml - The YAML string to parse
98
- * @returns The Simple Query Model
99
- */
100
- parseSimple(simpleQueryYaml: string): SimpleQueryModel;
101
- /**
102
- * Derives chart family from chart type.
103
- *
104
- * @param chartType - chart type
105
- * @returns chart family
106
- */
107
- private deriveChartFamily;
108
- /**
109
- * Expands Chart Recommendations.
110
- *
111
- * @param chartRecommendations - The Chart Recommendations to expand
112
- * @returns The expanded chart recommendations
113
- */
114
- expandChartRecommendations(chartRecommendations: SimpleChartRecommendations | {}): ChartRecommendations | {};
115
- /**
116
- * Expands MetadataItemJaql by adding table, column, datatype, and title
117
- * if they are missing from the item.
118
- *
119
- * @param item - The MetadataItemJaql to expand
120
- * @returns The expanded MetadataItemJaql
121
- */
122
- expandMetadataItemJaql(item: MetadataItemJaql): MetadataItemJaql;
123
- /**
124
- * Expands MetadataItem
125
- *
126
- * @param item - The MetadataItem to expand
127
- * @returns The expanded MetadataItem
128
- */
129
- expandMetadataItem(item: MetadataItem): MetadataItem;
130
- /**
131
- * Translates a Simple Query Model to Expanded Query Model.
132
- *
133
- * @param simpleQueryModel - The Simple Query model to convert
134
- * @returns The Expanded Query Model
135
- */
136
- translateToExpanded(simpleQueryModel: SimpleQueryModel): ExpandedQueryModel;
137
- }
@@ -1,2 +0,0 @@
1
- import { Filter } from '@sisense/sdk-data';
2
- export declare const stringifyFilterList: (filters: Filter[], indent?: number) => string;
@@ -1,8 +0,0 @@
1
- export type MembersFilterJaql = {
2
- members: string[];
3
- };
4
- export type FromNotEqualFilterJaql = {
5
- fromNotEqual: number;
6
- };
7
- export type FilterJaql = MembersFilterJaql | FromNotEqualFilterJaql;
8
- export declare const stringifyProps: (props: object | string, indent?: number, wrapInQuotes?: boolean) => string;
@@ -1,105 +0,0 @@
1
- import { MetadataItem } from '@sisense/sdk-query-client';
2
- import { AxesMapping, NlqResponseData } from '../../ai';
3
- import { ChartType, TableType } from '../../types';
4
- import { WidgetModel } from '../../models';
5
- /**
6
- * Expanded Query Model that is based on NlqResponseData.
7
- * It contains expanded JAQL and chart recommendations returned from the chat response.
8
- *
9
- * @internal
10
- */
11
- export type ExpandedQueryModel = Pick<NlqResponseData, 'jaql' | 'chartRecommendations' | 'queryTitle'>;
12
- /**
13
- * Expanded Query Model
14
- *
15
- * Used as a default value for ExpandedQueryModel
16
- *
17
- * @internal
18
- */
19
- export declare const EMPTY_EXPANDED_QUERY_MODEL: ExpandedQueryModel;
20
- /**
21
- * Simple Chart Recommendations
22
- *
23
- * @internal
24
- */
25
- export interface SimpleChartRecommendations {
26
- chartType: string;
27
- dataOptions: AxesMapping;
28
- }
29
- /**
30
- * Simple Query Model that is a simplified version of ExpandedQueryModel.
31
- *
32
- * It removes any JAQL syntax or information that already exists in the schema.
33
- * Also, any parameters that have a default do not need to be specified.
34
- *
35
- * Users manipulates this model via the query in YAML format.
36
- *
37
- * ModelTranslator is responsible for translating this query model to SimpleWidgetModel.
38
- *
39
- * @internal
40
- */
41
- export interface SimpleQueryModel {
42
- /**
43
- * The data model or perspective title.
44
- */
45
- model: string;
46
- metadata: MetadataItem[];
47
- chart: SimpleChartRecommendations | {};
48
- /**
49
- * Title of the query
50
- */
51
- queryTitle: string;
52
- }
53
- /**
54
- * Empty Simple Query Model
55
- *
56
- * Used as a default value for SimpleQueryModel
57
- *
58
- * @internal
59
- */
60
- export declare const EMPTY_SIMPLE_QUERY_MODEL: SimpleQueryModel;
61
- /**
62
- * All Chart Types including Table
63
- * Note: Table will be re-united with ChartType in a future MR
64
- *
65
- * @internal
66
- */
67
- export type AllChartType = ChartType | TableType;
68
- /**
69
- * Chart Widget Model
70
- *
71
- * This model serves two purposes:
72
- *
73
- * (1) For rendering a chart or table widget in the Query Composer.
74
- * (2) For reverse engineered (translated) to CSDK code
75
- *
76
- * Naming TBD
77
- *
78
- * @internal
79
- */
80
- export type ChartWidgetModel = Pick<WidgetModel, 'getChartWidgetProps' | 'getTableWidgetProps'> & {
81
- chartType: AllChartType;
82
- queryTitle: string;
83
- };
84
- /**
85
- * UI Framework
86
- *
87
- * @internal
88
- */
89
- export type UiFramework = 'react' | 'vue' | 'angular';
90
- /**
91
- * Code Template Key
92
- *
93
- * @internal
94
- */
95
- export type CodeTemplateKey = 'baseChartTmpl' | 'chartTmpl' | 'chartWidgetTmpl' | 'tableWidgetTmpl';
96
- /**
97
- * Code Templates
98
- *
99
- * @internal
100
- */
101
- export type CodeTemplates = {
102
- [key in UiFramework]: {
103
- [key in CodeTemplateKey]: string;
104
- };
105
- };
@@ -1,12 +0,0 @@
1
- import { ExpandedQueryModel, SimpleQueryModel } from './types';
2
- export declare function toKebabCase(str: string): string;
3
- export declare function capitalizeFirstLetter(str: string): string;
4
- /**
5
- * Sanitize ID of a dimension
6
- *
7
- * @param str - input string
8
- * @return sanitized ID
9
- */
10
- export declare function sanitizeDimensionId(str: string): string;
11
- export declare function validateQueryModel(model: any): SimpleQueryModel;
12
- export declare function isEmptyQueryModel(queryModel: ExpandedQueryModel | undefined | null): boolean;