Skip to content

Commit 31b51c2

Browse files
Merge pull request #7149 from gooddata/sync-from-gdc-ui-20805360736
Sync from gdc-ui/sdk hash:adcbd47
2 parents abd4f85 + e67e019 commit 31b51c2

File tree

110 files changed

+1452
-296
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+1452
-296
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@gooddata/sdk-ui-all",
5+
"comment": "Improved AI Assistant responsiveness on small screens by fixing chat overlay width, preventing mobile overflow, and restoring the mobile trigger button.",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@gooddata/sdk-ui-all"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "sdk-ui-filters: Fix Metric Value Filter's Apply button to being disabled when operator is ALL but dimensionality has changed, and fix blue backward compatibility message showing incorrectly after explicitly setting filter to ALL",
5+
"type": "none",
6+
"packageName": "@gooddata/sdk-ui-all"
7+
}
8+
],
9+
"packageName": "@gooddata/sdk-ui-all"
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "sdk-ui-loaders: Fix dashboard plugin loader to support both named and default exports from plugin entry point, restoring backward compatibility with plugins built before the 'Ban default exports' change",
5+
"type": "none",
6+
"packageName": "@gooddata/sdk-ui-all"
7+
}
8+
],
9+
"packageName": "@gooddata/sdk-ui-all"
10+
}

common/config/rush/version-policies.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
{
1313
"definitionName": "lockStepVersion",
1414
"policyName": "sdk",
15-
"version": "11.15.0-alpha.14",
15+
"version": "11.15.0-alpha.15",
1616
"nextBump": "prerelease",
1717
"mainProject": "@gooddata/sdk-ui-all"
1818
},
1919
{
2020
"definitionName": "lockStepVersion",
2121
"policyName": "sdk-examples",
22-
"version": "11.15.0-alpha.14",
22+
"version": "11.15.0-alpha.15",
2323
"nextBump": "prerelease",
2424
"mainProject": "@gooddata/sdk-ui-all"
2525
}

docs/content/en/latest/references/embed_ai_assistant/_index.md

Lines changed: 112 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ Before you can use the AI Assistant, you need to make sure it is properly set up
1717

1818
If you are using GoodData.CN, some additional configuration may be required. For details, see the [AI in GoodData.CN](https://www.gooddata.com/docs/cloud/ai/use-ai_assistant/configure-ai-assistant/#ai-in-gooddatacn) section of the article.
1919

20-
## Features
20+
## AI Assistant Component Features
2121

2222
- Embed UI for the AI Assistant chat.
2323
- Subscribe to chat events.
2424
- Handle links in chat messages.
2525
- Theming is supported out of the box through [Theme Provider].
26+
- Customization of the initial assistant experience (welcome content and suggested questions).
2627

2728
## Basic integration example
2829

@@ -73,20 +74,21 @@ const App = () => {
7374

7475
### Props
7576

76-
| Name | Type | Default | Description |
77-
| ------------------ | --------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
78-
| locale | ILocale | "en-US" | Specifies the locale for internationalization |
79-
| backend | IAnalyticalBackend | - | Backend instance. Falls back to BackendProvider context if not specified |
80-
| workspace | string | - | Workspace ID. Falls back to WorkspaceProvider context if not specified |
81-
| colorPalette | IColorPalette | - | Color palette used for rendering the visualizations. If not provided, the default color palette will be used |
82-
| catalogItems | CatalogItem[] | - | Catalog items used for autocompletion. If not provided - will be lazy-loaded when needed |
83-
| eventHandlers | ChatEventHandler[] | - | Event handlers for user interactions with the chat UI |
84-
| onLinkClick | (LinkHandlerEvent) => void | - | Handle user clicks on the catalog items mentioned in chat. |
85-
| allowNativeLinks | boolean | false | Whether to allow native links in chat messages. If false, `onLinkClick` handler will be fired when clicking on links |
86-
| disableManage | boolean | false | This will disable manage permissions for the user even if the user has them defined. |
87-
| disableAnalyze | boolean | false | This will disable analyze permissions for the user even if the user has them defined. |
88-
| disableFullControl | boolean | false | This will disable full control permissions for the user even if the user has them defined. |
89-
| onDispatcher | (dispatch: (action: unknown) => void) => void | - | Dispatcher for sending messages in the chat. |
77+
| Name | Type | Default | Description |
78+
| ------------------------------ | --------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------- |
79+
| locale | ILocale | "en-US" | Specifies the locale for internationalization |
80+
| backend | IAnalyticalBackend | - | Backend instance. Falls back to BackendProvider context if not specified |
81+
| workspace | string | - | Workspace ID. Falls back to WorkspaceProvider context if not specified |
82+
| colorPalette | IColorPalette | - | Color palette used for rendering the visualizations. If not provided, the default color palette will be used |
83+
| catalogItems | CatalogItem[] | - | Catalog items used for autocompletion. If not provided - will be lazy-loaded when needed |
84+
| eventHandlers | ChatEventHandler[] | - | Event handlers for user interactions with the chat UI |
85+
| onLinkClick | (LinkHandlerEvent) => void | - | Handle user clicks on the catalog items mentioned in chat. |
86+
| allowNativeLinks | boolean | false | Whether to allow native links in chat messages. If false, `onLinkClick` handler will be fired when clicking on links |
87+
| disableManage | boolean | false | This will disable manage permissions for the user even if the user has them defined. |
88+
| disableAnalyze | boolean | false | This will disable analyze permissions for the user even if the user has them defined. |
89+
| disableFullControl | boolean | false | This will disable full control permissions for the user even if the user has them defined. |
90+
| onDispatcher | (dispatch: (action: unknown) => void) => void | - | Dispatcher for sending messages in the chat. |
91+
| LandingScreenComponentProvider | () => ComponentType | - | Factory for providing a custom initial assistant experience component. When omitted, the default landing screen with quick questions is displayed. |
9092

9193
#### eventHandlers
9294

@@ -116,7 +118,7 @@ Here is a list of the relevant events:
116118
| `ChatAssistantMessageEvent` | `isChatAssistantMessageEvent` | Assistant responded with a message |
117119
| `ChatFeedbackEvent` | `isChatFeedbackEvent` | User gave a feedback |
118120
| `ChatVisualizationErrorEvent` | `isChatVisualizationErrorEvent` | Visualization failed to render |
119-
| `ChatSaveVisualizationErrorEvent` | `isChatSaveVisualizationErrorEvent` | Chat failed to saved visualisation |
121+
| `ChatSaveVisualizationErrorEvent` | `isChatSaveVisualizationErrorEvent` | Chat failed to save visualisation |
120122
| `ChatSaveVisualizationSuccessEvent` | `isChatSaveVisualizationSuccessEvent` | Chat successfully saved visualisation |
121123
| `ChatCopyToClipboardEvent` | `isChatCopyToClipboardEvent` | Chat copy to clipboard event |
122124

@@ -133,9 +135,101 @@ Each event contains the following properties:
133135
| newTab | boolean | Whether the link should be opened in a new tab |
134136
| preventDefault | () => void | Prevent default behavior of the link click |
135137

136-
> Note: If `allowNativeLinks` is set to `false` or keep default, in must be implemented `onLinkClick` handler to handle
138+
> Note: If `allowNativeLinks` is set to `false` or keep default, in must implement `onLinkClick` handler to handle
137139
> the links in chat messages. Otherwise, the links will not be clickable and do not have any effect.
138140
141+
## Initial Assistant Experience
142+
143+
The initial assistant experience defines what users see before they send their first message to the AI Assistant. It is used to introduce the assistant, provide guidance, and offer suggested questions to help users get started. Once a user submits a question the assistant switches to the standard chat interface. By default, the AI Assistant displays a built-in initial experience with a title and quick questions, which you can fully replace or customize to match your application’s branding and guidance needs.
144+
145+
### Customizing the initial assistant experience
146+
147+
To replace the default initial experience, provide the `LandingScreenComponentProvider` prop.
148+
This prop accepts a factory function that returns a React component type, which is rendered as the initial assistant experience. The provider must return a component type, not JSX.
149+
150+
```tsx
151+
import { GenAIAssistant } from "@gooddata/sdk-ui-gen-ai";
152+
import "@gooddata/sdk-ui-gen-ai/styles/css/main.css";
153+
154+
const CustomLandingScreen = () => (
155+
<div style={{ padding: 24 }}>
156+
<h3>Welcome to the embedded assistant</h3>
157+
<p>Describe what you are looking for and we will prepare the right insight.</p>
158+
</div>
159+
);
160+
161+
export const App = () => <GenAIAssistant LandingScreenComponentProvider={() => CustomLandingScreen} />;
162+
```
163+
164+
The package exports building blocks used by the default initial assistant experience.
165+
You can use these components to apply custom branding or modify content while preserving the built-in layout,
166+
accessibility, and automated question behavior.
167+
168+
Available components:
169+
170+
- `DefaultLandingScreen`
171+
- `DefaultLandingTitle` and `DefaultLandingTitleAscent`
172+
- `DefaultLandingQuestion`
173+
174+
To extend the default experience (for example, to customize the suggested questions), wrap
175+
`DefaultLandingScreen` in your own component and provide custom children:
176+
177+
```tsx
178+
import {
179+
DefaultLandingScreen,
180+
DefaultLandingQuestion,
181+
DefaultLandingTitle,
182+
DefaultLandingTitleAscent,
183+
} from "@gooddata/sdk-ui-gen-ai";
184+
185+
const CustomDefaultLanding = () => (
186+
<DefaultLandingScreen>
187+
<DefaultLandingTitle>
188+
<DefaultLandingTitleAscent>Ask AI to explore your workspace</DefaultLandingTitleAscent>
189+
<br />
190+
Pick one of the suggestions below.
191+
</DefaultLandingTitle>
192+
<DefaultLandingQuestion
193+
question="Show revenue by product for 2024"
194+
answer="Here is the revenue by product for 2024"
195+
/>
196+
<DefaultLandingQuestion question="What is our YoY trend?" answer="Here is the year-over-year trend" />
197+
</DefaultLandingScreen>
198+
);
199+
200+
export const App = () => <GenAIAssistant LandingScreenComponentProvider={() => CustomDefaultLanding} />;
201+
```
202+
203+
You can also reuse individual building blocks, such as `DefaultLandingQuestion`, inside a fully custom layout.
204+
This allows you to create a personalized introduction while keeping the pre-wired assistant behavior for suggested questions.
205+
206+
Each `DefaultLandingQuestion` automatically dispatches a user message and triggers the assistant response,
207+
using the same mechanism as the chat input.
208+
209+
```tsx
210+
const CustomLandingScreen = () => (
211+
<div className="my-company-landing">
212+
<h3>Welcome back!</h3>
213+
<p>Use the shortcuts to get started quickly.</p>
214+
<div className="my-company-landing__actions">
215+
<DefaultLandingQuestion
216+
question="List my top KPIs"
217+
answer="Here are your top KPIs"
218+
title="Top KPIs"
219+
/>
220+
<DefaultLandingQuestion
221+
question="Create a new dashboard"
222+
answer="Here is a blank dashboard to start with"
223+
title="New dashboard"
224+
/>
225+
</div>
226+
</div>
227+
);
228+
```
229+
230+
Use these building blocks to mix default styling and accessibility features with your own branding,
231+
while still benefiting from the automated assistant interactions.
232+
139233
## Resetting the chat thread
140234

141235
To reset the chat thread, use the `reset` method on the ChatThread interface.
@@ -151,7 +245,7 @@ or dispatch clear thread action by using dispatcher
151245
```typescript jsx
152246
import { clearThreadAction } from "@gooddata/sdk-ui-gen-ai";
153247

154-
// Retreve dispatcher from chat UI
248+
// Retrieve dispatcher from chat UI
155249
dispatcher(clearThreadAction());
156250
```
157251

docs/content/en/latest/references/filters/date_filter.md

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,106 @@ To remove granularities, delete the corresponding items in the relativeForm sect
244244
}
245245
```
246246

247+
### Using To Date filters
248+
249+
To Date filters combine two concepts:
250+
251+
1. A **relative date filter** that selects the current period (e.g., "this year")
252+
2. A **bounded filter** that additionally limits the end boundary to "today"
253+
254+
To create a "To Date" preset, add a `boundedFilter` property to a relative date filter preset:
255+
256+
```typescript
257+
import { IRelativeDateFilterPreset } from "@gooddata/sdk-model";
258+
259+
const yearToDatePreset: IRelativeDateFilterPreset = {
260+
from: 0,
261+
to: 0,
262+
granularity: "GDC.time.year",
263+
localIdentifier: "year_to_date",
264+
name: "Year to Date",
265+
visible: true,
266+
boundedFilter: {
267+
to: 0,
268+
granularity: "GDC.time.date"
269+
}
270+
};
271+
```
272+
273+
#### Bounded Filter Properties
274+
275+
The `boundedFilter` object supports two variants:
276+
277+
| Property | Type | Description |
278+
|-------------|--------------------------|---------------------------------------------------------------|
279+
| granularity | DateAttributeGranularity | The granularity for the bound (typically "GDC.time.date") |
280+
| to | number | Upper bound - use 0 for "today" (creates "To Date" filters) |
281+
| from | number | Lower bound - use 0 for "today" (creates "From Date" filters) |
282+
283+
{{% alert color="warning" %}}
284+
The `boundedFilter` must specify only a `from` or a `to`, not both.
285+
{{% /alert %}}
286+
287+
#### Complete Examples
288+
289+
```javascript
290+
// Year to Date
291+
{
292+
from: 0,
293+
to: 0,
294+
granularity: "GDC.time.year",
295+
localIdentifier: "year_to_date",
296+
name: "Year to Date",
297+
visible: true,
298+
boundedFilter: {
299+
to: 0,
300+
granularity: "GDC.time.date"
301+
}
302+
}
303+
304+
// Quarter to Date
305+
{
306+
from: 0,
307+
to: 0,
308+
granularity: "GDC.time.quarter",
309+
localIdentifier: "quarter_to_date",
310+
name: "Quarter to Date",
311+
visible: true,
312+
boundedFilter: {
313+
to: 0,
314+
granularity: "GDC.time.date"
315+
}
316+
}
317+
318+
// Month to Date
319+
{
320+
from: 0,
321+
to: 0,
322+
granularity: "GDC.time.month",
323+
localIdentifier: "month_to_date",
324+
name: "Month to Date",
325+
visible: true,
326+
boundedFilter: {
327+
to: 0,
328+
granularity: "GDC.time.date"
329+
}
330+
}
331+
332+
// Week to Date
333+
{
334+
from: 0,
335+
to: 0,
336+
granularity: "GDC.time.week_us",
337+
localIdentifier: "week_to_date",
338+
name: "Week to Date",
339+
visible: true,
340+
boundedFilter: {
341+
to: 0,
342+
granularity: "GDC.time.date"
343+
}
344+
}
345+
```
346+
247347
### Deleting dateFilterConfig
248348

249349
To delete the configuration, send a `DELETE` request to the following endpoints:

examples/sdk-interactive-examples/examples-template/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gooddata/sdk-interactive-examples-template",
3-
"version": "11.15.0-alpha.14",
3+
"version": "11.15.0-alpha.15",
44
"private": false,
55
"description": "GoodData interactive example template",
66
"license": "LicenseRef-LICENSE",

examples/sdk-interactive-examples/examples/example-attributefilter/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gooddata/sdk-interactive-example-attributefilter",
3-
"version": "11.15.0-alpha.14",
3+
"version": "11.15.0-alpha.15",
44
"private": false,
55
"description": "This example demonstrates how to use the AttributeFilter component to filter data in a visualization.",
66
"license": "LicenseRef-LICENSE",

examples/sdk-interactive-examples/examples/example-chartconfig/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gooddata/sdk-interactive-example-chartconfig",
3-
"version": "11.15.0-alpha.14",
3+
"version": "11.15.0-alpha.15",
44
"private": false,
55
"description": "This interactive example demonstrates how to manipulate the chart config.",
66
"license": "LicenseRef-LICENSE",

examples/sdk-interactive-examples/examples/example-columnchart/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@gooddata/sdk-interactive-example-columnchart",
3-
"version": "11.15.0-alpha.14",
3+
"version": "11.15.0-alpha.15",
44
"private": false,
55
"description": "This example demonstrates the usage of the ColumnChart component with the viewBy and stackBy properties.",
66
"license": "LicenseRef-LICENSE",

0 commit comments

Comments
 (0)