@ui5/webcomponents-ai 0.0.0-bf8366eb6 → 0.0.0-f42e7c18c
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/CHANGELOG.md +297 -0
- package/README.md +5 -7
- package/dist/Button.d.ts +82 -7
- package/dist/Button.js +183 -17
- package/dist/Button.js.map +1 -1
- package/dist/ButtonState.d.ts +60 -0
- package/dist/ButtonState.js +51 -0
- package/dist/ButtonState.js.map +1 -0
- package/dist/ButtonTemplate.d.ts +2 -0
- package/dist/ButtonTemplate.js +6 -0
- package/dist/ButtonTemplate.js.map +1 -0
- package/dist/PromptInput.d.ts +136 -7
- package/dist/PromptInput.js +199 -11
- package/dist/PromptInput.js.map +1 -1
- package/dist/PromptInputTemplate.d.ts +2 -0
- package/dist/PromptInputTemplate.js +12 -0
- package/dist/PromptInputTemplate.js.map +1 -0
- package/dist/bundle.esm.js +3 -2
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.scoped.config.d.ts +1 -0
- package/dist/bundle.scoped.config.js +3 -0
- package/dist/bundle.scoped.config.js.map +1 -0
- package/dist/bundle.scoped.esm.d.ts +2 -1
- package/dist/bundle.scoped.esm.js +2 -2
- package/dist/bundle.scoped.esm.js.map +1 -1
- package/dist/css/themes/Button.css +1 -0
- package/dist/css/themes/PromptInput.css +1 -0
- package/dist/custom-elements-internal.json +460 -28
- package/dist/custom-elements.json +396 -24
- package/dist/generated/assets/i18n/messagebundle_ar.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_bg.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ca.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cnr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cs.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_cy.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_da.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_de.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_el.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_GB.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_sappsd.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_saprigi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_en_US_saptrc.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_es_MX.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_et.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_fr_CA.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_hu.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_it.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_iw.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ja.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_kk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ko.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_lt.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_lv.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_mk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ms.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_nl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_no.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pt.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_pt_PT.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ro.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_ru.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sh.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sl.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_sv.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_th.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_tr.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_uk.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_vi.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_zh_CN.json +1 -0
- package/dist/generated/assets/i18n/messagebundle_zh_TW.json +1 -0
- package/dist/generated/i18n/i18n-defaults.d.ts +4 -1
- package/dist/generated/i18n/i18n-defaults.js +3 -1
- package/dist/generated/i18n/i18n-defaults.js.map +1 -1
- package/dist/generated/json-imports/Themes-fetch.d.ts +1 -0
- package/dist/generated/json-imports/Themes-fetch.js +21 -0
- package/dist/generated/json-imports/Themes-fetch.js.map +1 -0
- package/dist/generated/json-imports/Themes.js.map +1 -1
- package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
- package/dist/generated/json-imports/i18n-fetch.js +118 -0
- package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
- package/dist/generated/json-imports/i18n.d.ts +1 -0
- package/dist/generated/json-imports/i18n.js +117 -1
- package/dist/generated/json-imports/i18n.js.map +1 -1
- package/dist/generated/themes/Button.css.js +2 -1
- package/dist/generated/themes/Button.css.js.map +1 -1
- package/dist/generated/themes/PromptInput.css.d.ts +3 -0
- package/dist/generated/themes/PromptInput.css.js +9 -0
- package/dist/generated/themes/PromptInput.css.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/vscode.html-custom-data.json +98 -3
- package/dist/web-types.json +233 -8
- package/package.json +7 -7
- package/src/ButtonTemplate.tsx +24 -0
- package/src/PromptInputTemplate.tsx +49 -0
- package/src/i18n/messagebundle.properties +6 -0
- package/src/i18n/messagebundle_ar.properties +4 -0
- package/src/i18n/messagebundle_bg.properties +4 -0
- package/src/i18n/messagebundle_ca.properties +4 -0
- package/src/i18n/messagebundle_cnr.properties +4 -0
- package/src/i18n/messagebundle_cs.properties +4 -0
- package/src/i18n/messagebundle_cy.properties +4 -0
- package/src/i18n/messagebundle_da.properties +4 -0
- package/src/i18n/messagebundle_de.properties +4 -0
- package/src/i18n/messagebundle_el.properties +4 -0
- package/src/i18n/messagebundle_en.properties +4 -0
- package/src/i18n/messagebundle_en_GB.properties +4 -0
- package/src/i18n/messagebundle_en_US_sappsd.properties +4 -0
- package/src/i18n/messagebundle_en_US_saprigi.properties +4 -0
- package/src/i18n/messagebundle_en_US_saptrc.properties +4 -0
- package/src/i18n/messagebundle_es.properties +4 -0
- package/src/i18n/messagebundle_es_MX.properties +4 -0
- package/src/i18n/messagebundle_et.properties +4 -0
- package/src/i18n/messagebundle_fi.properties +4 -0
- package/src/i18n/messagebundle_fr.properties +4 -0
- package/src/i18n/messagebundle_fr_CA.properties +4 -0
- package/src/i18n/messagebundle_hi.properties +4 -0
- package/src/i18n/messagebundle_hr.properties +4 -0
- package/src/i18n/messagebundle_hu.properties +4 -0
- package/src/i18n/messagebundle_id.properties +4 -0
- package/src/i18n/messagebundle_it.properties +4 -0
- package/src/i18n/messagebundle_iw.properties +4 -0
- package/src/i18n/messagebundle_ja.properties +4 -0
- package/src/i18n/messagebundle_kk.properties +4 -0
- package/src/i18n/messagebundle_ko.properties +4 -0
- package/src/i18n/messagebundle_lt.properties +4 -0
- package/src/i18n/messagebundle_lv.properties +4 -0
- package/src/i18n/messagebundle_mk.properties +4 -0
- package/src/i18n/messagebundle_ms.properties +4 -0
- package/src/i18n/messagebundle_nl.properties +4 -0
- package/src/i18n/messagebundle_no.properties +4 -0
- package/src/i18n/messagebundle_pl.properties +4 -0
- package/src/i18n/messagebundle_pt.properties +4 -0
- package/src/i18n/messagebundle_pt_PT.properties +4 -0
- package/src/i18n/messagebundle_ro.properties +4 -0
- package/src/i18n/messagebundle_ru.properties +4 -0
- package/src/i18n/messagebundle_sh.properties +4 -0
- package/src/i18n/messagebundle_sk.properties +4 -0
- package/src/i18n/messagebundle_sl.properties +4 -0
- package/src/i18n/messagebundle_sr.properties +4 -0
- package/src/i18n/messagebundle_sv.properties +4 -0
- package/src/i18n/messagebundle_th.properties +4 -0
- package/src/i18n/messagebundle_tr.properties +4 -0
- package/src/i18n/messagebundle_uk.properties +4 -0
- package/src/i18n/messagebundle_vi.properties +4 -0
- package/src/i18n/messagebundle_zh_CN.properties +4 -0
- package/src/i18n/messagebundle_zh_TW.properties +4 -0
- package/src/themes/Button.css +88 -0
- package/src/themes/PromptInput.css +30 -0
- package/tsconfig.json +36 -26
- package/dist/PromtInput.d.ts +0 -4
- package/dist/PromtInput.js +0 -28
- package/dist/PromtInput.js.map +0 -1
- package/dist/generated/templates/ButtonTemplate.lit.d.ts +0 -4
- package/dist/generated/templates/ButtonTemplate.lit.js +0 -5
- package/dist/generated/templates/ButtonTemplate.lit.js.map +0 -1
- package/src/Button.hbs +0 -3
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,303 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
# [2.5.0](https://github.com/SAP/ui5-webcomponents/compare/v2.5.0-rc.3...v2.5.0) (2024-12-05)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
# [2.5.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.5.0-rc.2...v2.5.0-rc.3) (2024-12-05)
|
15
|
+
|
16
|
+
|
17
|
+
### Features
|
18
|
+
|
19
|
+
* **framework:** add strict event type checking ([#10235](https://github.com/SAP/ui5-webcomponents/issues/10235)) ([4ff8ab7](https://github.com/SAP/ui5-webcomponents/commit/4ff8ab7c34db5058b92511767be1b96c69a91cb5))
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
# [2.5.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.5.0-rc.1...v2.5.0-rc.2) (2024-11-28)
|
26
|
+
|
27
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
# [2.5.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.5.0-rc.0...v2.5.0-rc.1) (2024-11-21)
|
34
|
+
|
35
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
# [2.5.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.4.1-rc.0...v2.5.0-rc.0) (2024-11-14)
|
42
|
+
|
43
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
## [2.4.1-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0...v2.4.1-rc.0) (2024-11-07)
|
50
|
+
|
51
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
|
57
|
+
# [2.4.0](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0-rc.4...v2.4.0) (2024-11-03)
|
58
|
+
|
59
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
# [2.4.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0-rc.3...v2.4.0-rc.4) (2024-10-31)
|
66
|
+
|
67
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
# [2.4.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0-rc.2...v2.4.0-rc.3) (2024-10-28)
|
74
|
+
|
75
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
# [2.4.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0-rc.1...v2.4.0-rc.2) (2024-10-24)
|
82
|
+
|
83
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
# [2.4.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.4.0-rc.0...v2.4.0-rc.1) (2024-10-17)
|
90
|
+
|
91
|
+
|
92
|
+
### Bug Fixes
|
93
|
+
|
94
|
+
* scoping issues and document how scoping is used correctly ([#10023](https://github.com/SAP/ui5-webcomponents/issues/10023)) ([ee808c3](https://github.com/SAP/ui5-webcomponents/commit/ee808c309f316fe145b05d292c92328396c655ab))
|
95
|
+
* **tools:** revert tsconfig moduleResolution to node ([#10014](https://github.com/SAP/ui5-webcomponents/issues/10014)) ([0724b92](https://github.com/SAP/ui5-webcomponents/commit/0724b9289ad04f88972d4978ed37e76f13abca13))
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
# [2.4.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.3.1-rc.0...v2.4.0-rc.0) (2024-10-10)
|
102
|
+
|
103
|
+
|
104
|
+
### Bug Fixes
|
105
|
+
|
106
|
+
* **ui5-ai-button:** reset button width after animations ([#9923](https://github.com/SAP/ui5-webcomponents/issues/9923)) ([2a5c7db](https://github.com/SAP/ui5-webcomponents/commit/2a5c7db734b08f629f41b586f4aa0f39b20de632))
|
107
|
+
|
108
|
+
|
109
|
+
### Features
|
110
|
+
|
111
|
+
* enhance `[@event](https://github.com/event)` decorator ([#9944](https://github.com/SAP/ui5-webcomponents/issues/9944)) ([fe1d816](https://github.com/SAP/ui5-webcomponents/commit/fe1d816f512400b839fd4ce1b9af1506d0cb4c9a))
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
## [2.3.1-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.3.0...v2.3.1-rc.0) (2024-10-03)
|
118
|
+
|
119
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
# [2.3.0](https://github.com/SAP/ui5-webcomponents/compare/v2.3.0-rc.3...v2.3.0) (2024-10-02)
|
126
|
+
|
127
|
+
|
128
|
+
### Features
|
129
|
+
|
130
|
+
* **framework:** introduce the `i18n` decorator and the `cldr` option ([#9897](https://github.com/SAP/ui5-webcomponents/issues/9897)) ([1f29d23](https://github.com/SAP/ui5-webcomponents/commit/1f29d231fe892a850871e7f73afca93c730ecffd))
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
# [2.3.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.3.0-rc.2...v2.3.0-rc.3) (2024-09-26)
|
137
|
+
|
138
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
# [2.3.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.3.0-rc.1...v2.3.0-rc.2) (2024-09-19)
|
145
|
+
|
146
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
# [2.3.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.3.0-rc.0...v2.3.0-rc.1) (2024-09-12)
|
153
|
+
|
154
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
# [2.3.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.2.0...v2.3.0-rc.0) (2024-09-05)
|
161
|
+
|
162
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
# [2.2.0](https://github.com/SAP/ui5-webcomponents/compare/v2.2.0-rc.3...v2.2.0) (2024-09-03)
|
169
|
+
|
170
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
# [2.2.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.2.0-rc.2...v2.2.0-rc.3) (2024-08-29)
|
177
|
+
|
178
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
# [2.2.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.2.0-rc.1...v2.2.0-rc.2) (2024-08-22)
|
185
|
+
|
186
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
# [2.2.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.2.0-rc.0...v2.2.0-rc.1) (2024-08-15)
|
193
|
+
|
194
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
# [2.2.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.1.1...v2.2.0-rc.0) (2024-08-08)
|
201
|
+
|
202
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
## [2.1.1](https://github.com/SAP/ui5-webcomponents/compare/v2.1.0...v2.1.1) (2024-08-02)
|
209
|
+
|
210
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
# [2.1.0](https://github.com/SAP/ui5-webcomponents/compare/v2.1.0-rc.3...v2.1.0) (2024-08-02)
|
217
|
+
|
218
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
# [2.1.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v2.1.0-rc.2...v2.1.0-rc.3) (2024-08-01)
|
225
|
+
|
226
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
# [2.1.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v2.1.0-rc.1...v2.1.0-rc.2) (2024-07-25)
|
233
|
+
|
234
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
# [2.1.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v2.1.0-rc.0...v2.1.0-rc.1) (2024-07-18)
|
241
|
+
|
242
|
+
|
243
|
+
### Features
|
244
|
+
|
245
|
+
* **ui5-prompt-input:** implement suggestions ([#9390](https://github.com/SAP/ui5-webcomponents/issues/9390)) ([a261cfb](https://github.com/SAP/ui5-webcomponents/commit/a261cfbfa06328e1f496a8a2acd1e4b22e78243d))
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
# [2.1.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v2.0.1...v2.1.0-rc.0) (2024-07-11)
|
252
|
+
|
253
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
## [2.0.1](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0...v2.0.1) (2024-07-05)
|
260
|
+
|
261
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
|
267
|
+
# [2.0.0](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.6...v2.0.0) (2024-07-03)
|
268
|
+
|
269
|
+
|
270
|
+
### Features
|
271
|
+
|
272
|
+
* add property initializers ([#8846](https://github.com/SAP/ui5-webcomponents/issues/8846)) ([eef0cc9](https://github.com/SAP/ui5-webcomponents/commit/eef0cc9b663fda6268b98e516ed46439435fa2b0))
|
273
|
+
* **ui5-ai-button:** initial implementation ([b39548f](https://github.com/SAP/ui5-webcomponents/commit/b39548f7af9e0dd76543327d5bab5242d9ef15a0))
|
274
|
+
|
275
|
+
|
276
|
+
### BREAKING CHANGES
|
277
|
+
|
278
|
+
* @property decorator must be adapted according to new type parameter
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
# [2.0.0-rc.6](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.5...v2.0.0-rc.6) (2024-06-17)
|
285
|
+
|
286
|
+
|
287
|
+
### Features
|
288
|
+
|
289
|
+
* **ui5-ai-prompt-input:** initial (experimental) implementation ([#9078](https://github.com/SAP/ui5-webcomponents/issues/9078)) ([9dcdfdb](https://github.com/SAP/ui5-webcomponents/commit/9dcdfdbcf78eda087099e12301ad91e624038a17))
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
# [2.0.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.4...v2.0.0-rc.5) (2024-06-06)
|
296
|
+
|
297
|
+
**Note:** Version bump only for package @ui5/webcomponents-ai
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
6
303
|
# [2.0.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v2.0.0-rc.3...v2.0.0-rc.4) (2024-05-29)
|
7
304
|
|
8
305
|
**Note:** Version bump only for package @ui5/webcomponents-ai
|
package/README.md
CHANGED
@@ -1,7 +1,4 @@
|
|
1
|
-
UI5 Web Components - AI
|
5
2
|
|
6
3
|
[](https://www.npmjs.com/package/@ui5/webcomponents)
|
7
4
|
|
@@ -13,9 +10,10 @@ Provides web components implementing AI-related visual and interaction.
|
|
13
10
|
|
14
11
|
## Provided components
|
15
12
|
|
16
|
-
| Web Component | Tag name
|
17
|
-
|
18
|
-
|
13
|
+
| Web Component | Tag name | Module import |
|
14
|
+
|--------------------------|--------------------------------|---------------------------------------------------------|
|
15
|
+
| Button | `ui5-ai-button` | `import "@ui5/webcomponents-ai/dist/Button.js";` |
|
16
|
+
| PromptInput | `ui5-ai-prompt-input` | `import "@ui5/webcomponents-ai/dist/PromptInput.js";` |
|
19
17
|
|
20
18
|
## Provided assets
|
21
19
|
|
package/dist/Button.d.ts
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
2
|
+
import MainButton from "@ui5/webcomponents/dist/Button.js";
|
3
|
+
import type ButtonDesign from "@ui5/webcomponents/dist/types/ButtonDesign.js";
|
4
|
+
import ButtonState from "./ButtonState.js";
|
2
5
|
/**
|
3
6
|
* @class
|
4
7
|
*
|
@@ -11,12 +14,11 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
11
14
|
* ### Usage
|
12
15
|
*
|
13
16
|
* For the `ui5-ai-button` UI, you can define one or more states of the button by placing `ai-button-state` components in its default slot.
|
14
|
-
* Each state have a
|
17
|
+
* Each state have a name that identifies it and can have text, icon and end icon defined (in any combination) depending on the state purpose.
|
15
18
|
*
|
16
|
-
* You can choose from a set of predefined designs that
|
19
|
+
* You can choose from a set of predefined designs (the same as for regular `ui5-button` component) that allow different styling to correspond to the triggered action.
|
17
20
|
*
|
18
|
-
*
|
19
|
-
* the mouse cursor. A disabled `ui5-ai-button` appears inactive and cannot be pressed.
|
21
|
+
* `ui5-ai-button` can be activated by clicking or tapping it. The state can be changed in `click` event handler.
|
20
22
|
*
|
21
23
|
* ### ES6 Module Import
|
22
24
|
*
|
@@ -24,10 +26,20 @@ import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
|
24
26
|
*
|
25
27
|
* @constructor
|
26
28
|
* @extends UI5Element
|
27
|
-
* @since 2.0
|
29
|
+
* @since 2.0.0
|
28
30
|
* @public
|
31
|
+
* @experimental The Button and ButtonState web components are availabe since 2.0 under an experimental flag and their API and behaviour are subject to change.
|
29
32
|
*/
|
30
33
|
declare class Button extends UI5Element {
|
34
|
+
eventDetails: {
|
35
|
+
click: void;
|
36
|
+
};
|
37
|
+
/**
|
38
|
+
* Defines the component design.
|
39
|
+
* @default "Default"
|
40
|
+
* @public
|
41
|
+
*/
|
42
|
+
design?: `${ButtonDesign}`;
|
31
43
|
/**
|
32
44
|
* Defines whether the component is disabled.
|
33
45
|
* A disabled component can't be pressed or
|
@@ -36,7 +48,70 @@ declare class Button extends UI5Element {
|
|
36
48
|
* @public
|
37
49
|
*/
|
38
50
|
disabled: boolean;
|
39
|
-
|
40
|
-
|
51
|
+
/**
|
52
|
+
* Defines the current state of the component.
|
53
|
+
*
|
54
|
+
* @default undefined
|
55
|
+
* @public
|
56
|
+
*/
|
57
|
+
state?: string;
|
58
|
+
/**
|
59
|
+
* Keeps the current state object of the component.
|
60
|
+
* @private
|
61
|
+
*/
|
62
|
+
_currentStateObject?: ButtonState;
|
63
|
+
/**
|
64
|
+
* Initiates button elements fade-out phase.
|
65
|
+
* @default false
|
66
|
+
* @private
|
67
|
+
*/
|
68
|
+
fadeOut: boolean;
|
69
|
+
/**
|
70
|
+
* Initiates button fade middle phase.
|
71
|
+
* @default false
|
72
|
+
* @private
|
73
|
+
*/
|
74
|
+
fadeMid: boolean;
|
75
|
+
/**
|
76
|
+
* Initiates button elements fade-in phase.
|
77
|
+
* @default false
|
78
|
+
* @private
|
79
|
+
*/
|
80
|
+
fadeIn: boolean;
|
81
|
+
/**
|
82
|
+
* Defines the available states of the component.
|
83
|
+
* **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use `ui5-ai-button-state` components in order to preserve the intended design.
|
84
|
+
* @public
|
85
|
+
*/
|
86
|
+
states: Array<ButtonState>;
|
87
|
+
onBeforeRendering(): void;
|
88
|
+
/**
|
89
|
+
* Starts the fade-out animation.
|
90
|
+
* @private
|
91
|
+
*/
|
92
|
+
_fadeOut(): Promise<void>;
|
93
|
+
/**
|
94
|
+
* Starts the fade-in animation.
|
95
|
+
* @private
|
96
|
+
*/
|
97
|
+
_fadeIn(): void;
|
98
|
+
/**
|
99
|
+
* Resets the fade phases when the animation is completed.
|
100
|
+
* @private
|
101
|
+
*/
|
102
|
+
_resetFade(): void;
|
103
|
+
/**
|
104
|
+
* Handles the click event.
|
105
|
+
* @private
|
106
|
+
*/
|
107
|
+
_onclick(e: MouseEvent): void;
|
108
|
+
get _mainButton(): MainButton;
|
109
|
+
get _effectiveState(): string;
|
110
|
+
get _effectiveStateObject(): ButtonState | undefined;
|
111
|
+
get _stateIconOnly(): boolean;
|
112
|
+
get _stateText(): string | undefined;
|
113
|
+
get _stateIcon(): string | undefined;
|
114
|
+
get _stateEndIcon(): string | undefined;
|
115
|
+
get _hasText(): boolean;
|
41
116
|
}
|
42
117
|
export default Button;
|
package/dist/Button.js
CHANGED
@@ -5,15 +5,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
6
6
|
};
|
7
7
|
import UI5Element from "@ui5/webcomponents-base/dist/UI5Element.js";
|
8
|
+
import { renderFinished } from "@ui5/webcomponents-base/dist/Render.js";
|
8
9
|
import customElement from "@ui5/webcomponents-base/dist/decorators/customElement.js";
|
9
10
|
import property from "@ui5/webcomponents-base/dist/decorators/property.js";
|
10
|
-
import
|
11
|
-
|
11
|
+
import event from "@ui5/webcomponents-base/dist/decorators/event-strict.js";
|
12
|
+
import slot from "@ui5/webcomponents-base/dist/decorators/slot.js";
|
13
|
+
import jsxRenderer from "@ui5/webcomponents-base/dist/renderer/JsxRenderer.js";
|
12
14
|
import MainButton from "@ui5/webcomponents/dist/Button.js";
|
13
|
-
|
14
|
-
import
|
15
|
+
import Icon from "@ui5/webcomponents/dist/Icon.js";
|
16
|
+
import ButtonState from "./ButtonState.js";
|
17
|
+
import ButtonTemplate from "./ButtonTemplate.js";
|
15
18
|
// Styles
|
16
|
-
import
|
19
|
+
import ButtonCss from "./generated/themes/Button.css.js";
|
17
20
|
/**
|
18
21
|
* @class
|
19
22
|
*
|
@@ -26,12 +29,11 @@ import styles from "./generated/themes/Button.css.js";
|
|
26
29
|
* ### Usage
|
27
30
|
*
|
28
31
|
* For the `ui5-ai-button` UI, you can define one or more states of the button by placing `ai-button-state` components in its default slot.
|
29
|
-
* Each state have a
|
32
|
+
* Each state have a name that identifies it and can have text, icon and end icon defined (in any combination) depending on the state purpose.
|
30
33
|
*
|
31
|
-
* You can choose from a set of predefined designs that
|
34
|
+
* You can choose from a set of predefined designs (the same as for regular `ui5-button` component) that allow different styling to correspond to the triggered action.
|
32
35
|
*
|
33
|
-
*
|
34
|
-
* the mouse cursor. A disabled `ui5-ai-button` appears inactive and cannot be pressed.
|
36
|
+
* `ui5-ai-button` can be activated by clicking or tapping it. The state can be changed in `click` event handler.
|
35
37
|
*
|
36
38
|
* ### ES6 Module Import
|
37
39
|
*
|
@@ -39,27 +41,191 @@ import styles from "./generated/themes/Button.css.js";
|
|
39
41
|
*
|
40
42
|
* @constructor
|
41
43
|
* @extends UI5Element
|
42
|
-
* @since 2.0
|
44
|
+
* @since 2.0.0
|
43
45
|
* @public
|
46
|
+
* @experimental The Button and ButtonState web components are availabe since 2.0 under an experimental flag and their API and behaviour are subject to change.
|
44
47
|
*/
|
45
48
|
let Button = class Button extends UI5Element {
|
49
|
+
constructor() {
|
50
|
+
super(...arguments);
|
51
|
+
/**
|
52
|
+
* Defines the component design.
|
53
|
+
* @default "Default"
|
54
|
+
* @public
|
55
|
+
*/
|
56
|
+
this.design = "Default";
|
57
|
+
/**
|
58
|
+
* Defines whether the component is disabled.
|
59
|
+
* A disabled component can't be pressed or
|
60
|
+
* focused, and it is not in the tab chain.
|
61
|
+
* @default false
|
62
|
+
* @public
|
63
|
+
*/
|
64
|
+
this.disabled = false;
|
65
|
+
/**
|
66
|
+
* Initiates button elements fade-out phase.
|
67
|
+
* @default false
|
68
|
+
* @private
|
69
|
+
*/
|
70
|
+
this.fadeOut = false;
|
71
|
+
/**
|
72
|
+
* Initiates button fade middle phase.
|
73
|
+
* @default false
|
74
|
+
* @private
|
75
|
+
*/
|
76
|
+
this.fadeMid = false;
|
77
|
+
/**
|
78
|
+
* Initiates button elements fade-in phase.
|
79
|
+
* @default false
|
80
|
+
* @private
|
81
|
+
*/
|
82
|
+
this.fadeIn = false;
|
83
|
+
}
|
84
|
+
onBeforeRendering() {
|
85
|
+
if (this.fadeOut || this.fadeIn) {
|
86
|
+
return;
|
87
|
+
}
|
88
|
+
if (!this._currentStateObject?.name) {
|
89
|
+
this._currentStateObject = this._effectiveStateObject;
|
90
|
+
}
|
91
|
+
const currentStateName = this._currentStateObject?.name || "";
|
92
|
+
if (currentStateName !== "" && currentStateName !== this._effectiveState) {
|
93
|
+
this._fadeOut();
|
94
|
+
}
|
95
|
+
}
|
96
|
+
/**
|
97
|
+
* Starts the fade-out animation.
|
98
|
+
* @private
|
99
|
+
*/
|
100
|
+
async _fadeOut() {
|
101
|
+
const fadeOutDuration = 180;
|
102
|
+
const button = this._mainButton;
|
103
|
+
const newStateObject = this._effectiveStateObject;
|
104
|
+
if (!newStateObject) {
|
105
|
+
// eslint-disable-next-line no-console
|
106
|
+
console.warn(`State with name="${this.state}" doesn't exist!`);
|
107
|
+
}
|
108
|
+
else if (button) {
|
109
|
+
const buttonWidth = button.offsetWidth;
|
110
|
+
const hiddenButton = this.shadowRoot?.querySelector(".ui5-ai-button-hidden");
|
111
|
+
button.style.width = `${buttonWidth}px`;
|
112
|
+
hiddenButton.icon = newStateObject.icon;
|
113
|
+
hiddenButton.endIcon = newStateObject.endIcon;
|
114
|
+
hiddenButton.textContent = newStateObject.text || null;
|
115
|
+
await renderFinished();
|
116
|
+
const hiddenButtonWidth = hiddenButton.offsetWidth;
|
117
|
+
this.fadeOut = true;
|
118
|
+
button.style.width = `${hiddenButtonWidth}px`;
|
119
|
+
setTimeout(() => {
|
120
|
+
this.fadeMid = true;
|
121
|
+
this._currentStateObject = newStateObject;
|
122
|
+
this._fadeIn();
|
123
|
+
}, fadeOutDuration);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
/**
|
127
|
+
* Starts the fade-in animation.
|
128
|
+
* @private
|
129
|
+
*/
|
130
|
+
_fadeIn() {
|
131
|
+
const fadeInDuration = 60;
|
132
|
+
setTimeout(() => {
|
133
|
+
this.fadeIn = true;
|
134
|
+
this._resetFade();
|
135
|
+
}, fadeInDuration);
|
136
|
+
}
|
137
|
+
/**
|
138
|
+
* Resets the fade phases when the animation is completed.
|
139
|
+
* @private
|
140
|
+
*/
|
141
|
+
_resetFade() {
|
142
|
+
const fadeResetDuration = 160;
|
143
|
+
setTimeout(() => {
|
144
|
+
this.fadeOut = false;
|
145
|
+
this.fadeMid = false;
|
146
|
+
this.fadeIn = false;
|
147
|
+
}, fadeResetDuration);
|
148
|
+
// reset the button's width after animations
|
149
|
+
const button = this._mainButton;
|
150
|
+
if (button) {
|
151
|
+
button.style.width = "";
|
152
|
+
}
|
153
|
+
}
|
154
|
+
/**
|
155
|
+
* Handles the click event.
|
156
|
+
* @private
|
157
|
+
*/
|
158
|
+
_onclick(e) {
|
159
|
+
e.stopImmediatePropagation();
|
160
|
+
this.fireDecoratorEvent("click");
|
161
|
+
}
|
162
|
+
get _mainButton() {
|
163
|
+
return this.shadowRoot?.querySelector("[ui5-button]");
|
164
|
+
}
|
165
|
+
get _effectiveState() {
|
166
|
+
return this.state || (this.states.length && this.states[0].name) || "";
|
167
|
+
}
|
168
|
+
get _effectiveStateObject() {
|
169
|
+
return this.states.find(state => state.name === this._effectiveState);
|
170
|
+
}
|
171
|
+
get _stateIconOnly() {
|
172
|
+
return !this._stateText && !!this._stateIcon;
|
173
|
+
}
|
174
|
+
get _stateText() {
|
175
|
+
return this._currentStateObject?.text;
|
176
|
+
}
|
177
|
+
get _stateIcon() {
|
178
|
+
return this._currentStateObject?.icon;
|
179
|
+
}
|
180
|
+
get _stateEndIcon() {
|
181
|
+
return this._currentStateObject?.endIcon;
|
182
|
+
}
|
183
|
+
get _hasText() {
|
184
|
+
return !!this._stateText;
|
185
|
+
}
|
46
186
|
};
|
187
|
+
__decorate([
|
188
|
+
property()
|
189
|
+
], Button.prototype, "design", void 0);
|
47
190
|
__decorate([
|
48
191
|
property({ type: Boolean })
|
49
192
|
], Button.prototype, "disabled", void 0);
|
50
193
|
__decorate([
|
51
194
|
property()
|
52
|
-
], Button.prototype, "
|
195
|
+
], Button.prototype, "state", void 0);
|
53
196
|
__decorate([
|
54
|
-
property()
|
55
|
-
], Button.prototype, "
|
197
|
+
property({ type: Object })
|
198
|
+
], Button.prototype, "_currentStateObject", void 0);
|
199
|
+
__decorate([
|
200
|
+
property({ type: Boolean })
|
201
|
+
], Button.prototype, "fadeOut", void 0);
|
202
|
+
__decorate([
|
203
|
+
property({ type: Boolean })
|
204
|
+
], Button.prototype, "fadeMid", void 0);
|
205
|
+
__decorate([
|
206
|
+
property({ type: Boolean })
|
207
|
+
], Button.prototype, "fadeIn", void 0);
|
208
|
+
__decorate([
|
209
|
+
slot({ type: HTMLElement, "default": true })
|
210
|
+
], Button.prototype, "states", void 0);
|
56
211
|
Button = __decorate([
|
57
212
|
customElement({
|
58
213
|
tag: "ui5-ai-button",
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
214
|
+
languageAware: true,
|
215
|
+
renderer: jsxRenderer,
|
216
|
+
template: ButtonTemplate,
|
217
|
+
styles: ButtonCss,
|
218
|
+
dependencies: [MainButton, Icon, ButtonState],
|
219
|
+
shadowRootOptions: { delegatesFocus: true },
|
220
|
+
})
|
221
|
+
/**
|
222
|
+
* Fired when the component is activated either with a
|
223
|
+
* mouse/tap or by using the Enter or Space key.
|
224
|
+
* @public
|
225
|
+
*/
|
226
|
+
,
|
227
|
+
event("click", {
|
228
|
+
bubbles: true,
|
63
229
|
})
|
64
230
|
], Button);
|
65
231
|
Button.define();
|