Skip to content

Commit 2d25784

Browse files
committed
AI: run wrapper script
1 parent 66493d1 commit 2d25784

File tree

3 files changed

+53
-5
lines changed

3 files changed

+53
-5
lines changed

.storybook/custom-element-manifests/ai.json

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,17 @@
654654
"_ui5allowPreventDefault": true,
655655
"_ui5Bubbles": false
656656
},
657+
{
658+
"name": "item-click",
659+
"_ui5privacy": "public",
660+
"type": {
661+
"text": "CustomEvent"
662+
},
663+
"description": "Fired when an item from the AI actions menu is clicked.",
664+
"_ui5Cancelable": false,
665+
"_ui5allowPreventDefault": false,
666+
"_ui5Bubbles": false
667+
},
657668
{
658669
"name": "stop-generation",
659670
"_ui5privacy": "public",
@@ -669,7 +680,14 @@
669680
"name": "version-change",
670681
"_ui5privacy": "public",
671682
"type": {
672-
"text": "CustomEvent<undefined>"
683+
"text": "CustomEvent<InputVersionChangeEventDetail>",
684+
"references": [
685+
{
686+
"name": "InputVersionChangeEventDetail",
687+
"package": "@ui5/webcomponents-ai",
688+
"module": "dist/Input.js"
689+
}
690+
]
673691
},
674692
"description": "Fired when the user selects the version navigation buttons.",
675693
"_ui5Cancelable": false,
@@ -1410,12 +1428,29 @@
14101428
"name": "version-change",
14111429
"_ui5privacy": "public",
14121430
"type": {
1413-
"text": "CustomEvent"
1431+
"text": "CustomEvent<TextAreaVersionChangeEventDetail>",
1432+
"references": [
1433+
{
1434+
"name": "TextAreaVersionChangeEventDetail",
1435+
"package": "@ui5/webcomponents-ai",
1436+
"module": "dist/TextArea.js"
1437+
}
1438+
]
14141439
},
14151440
"description": "Fired when the user clicks on version navigation buttons.",
14161441
"_ui5Cancelable": false,
14171442
"_ui5allowPreventDefault": false,
1418-
"_ui5Bubbles": false
1443+
"_ui5Bubbles": false,
1444+
"_ui5parameters": [
1445+
{
1446+
"type": {
1447+
"text": "boolean"
1448+
},
1449+
"name": "backwards",
1450+
"_ui5privacy": "public",
1451+
"description": "Indicates if navigation is backwards (true) or forwards (false, default)."
1452+
}
1453+
]
14191454
},
14201455
{
14211456
"name": "stop-generation",

packages/ai/src/components/Input/index.tsx

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import '@ui5/webcomponents-ai/dist/Input.js';
44
import type { InputSelectionChangeEventDetail } from '@ui5/webcomponents/dist/Input.js';
55
import type InputType from '@ui5/webcomponents/dist/types/InputType.js';
6+
import type { InputVersionChangeEventDetail } from '@ui5/webcomponents-ai/dist/Input.js';
67
import type ValueState from '@ui5/webcomponents-base/dist/types/ValueState.js';
78
import { withWebComponent } from '@ui5/webcomponents-react-base';
89
import type { CommonProps, Ui5CustomEvent, Ui5DomRef, UI5WCSlotsNode } from '@ui5/webcomponents-react-base';
@@ -179,6 +180,7 @@ interface InputPropTypes
179180
| 'onChange'
180181
| 'onClose'
181182
| 'onInput'
183+
| 'onItemClick'
182184
| 'onOpen'
183185
| 'onSelect'
184186
| 'onSelectionChange'
@@ -287,6 +289,15 @@ interface InputPropTypes
287289
*/
288290
onInput?: (event: Ui5CustomEvent<InputDomRef>) => void;
289291

292+
/**
293+
* Fired when an item from the AI actions menu is clicked.
294+
*
295+
* | cancelable | bubbles |
296+
* | :--------: | :-----: |
297+
* | ❌|❌|
298+
*/
299+
onItemClick?: (event: Ui5CustomEvent<InputDomRef>) => void;
300+
290301
/**
291302
* Fired when the suggestions picker is open.
292303
*
@@ -337,7 +348,7 @@ interface InputPropTypes
337348
* | :--------: | :-----: |
338349
* | ❌|❌|
339350
*/
340-
onVersionChange?: (event: Ui5CustomEvent<InputDomRef>) => void;
351+
onVersionChange?: (event: Ui5CustomEvent<InputDomRef, InputVersionChangeEventDetail>) => void;
341352
}
342353

343354
/**
@@ -389,6 +400,7 @@ const Input = withWebComponent<InputPropTypes, InputDomRef>(
389400
'change',
390401
'close',
391402
'input',
403+
'item-click',
392404
'open',
393405
'select',
394406
'selection-change',

packages/ai/src/components/TextArea/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import '@ui5/webcomponents-ai/dist/TextArea.js';
44
import type { TextAreaInputEventDetail } from '@ui5/webcomponents/dist/TextArea.js';
5+
import type { TextAreaVersionChangeEventDetail } from '@ui5/webcomponents-ai/dist/TextArea.js';
56
import type ValueState from '@ui5/webcomponents-base/dist/types/ValueState.js';
67
import { withWebComponent } from '@ui5/webcomponents-react-base';
78
import type { CommonProps, Ui5CustomEvent, Ui5DomRef, UI5WCSlotsNode } from '@ui5/webcomponents-react-base';
@@ -262,7 +263,7 @@ interface TextAreaPropTypes
262263
* | :--------: | :-----: |
263264
* | ❌|❌|
264265
*/
265-
onVersionChange?: (event: Ui5CustomEvent<TextAreaDomRef>) => void;
266+
onVersionChange?: (event: Ui5CustomEvent<TextAreaDomRef, TextAreaVersionChangeEventDetail>) => void;
266267
}
267268

268269
/**

0 commit comments

Comments
 (0)