Skip to content

Commit 905dbca

Browse files
feat: update @ui5/webcomponents to 1.0.0-rc.11 (#1108)
BREAKING CHANGE: `NotificationOverflowAction` got renamed to `NotificationAction` BREAKING CHANGE: **BarDesign**: removed BarDesign `Auto` BREAKING CHANGE: **Bar**: prop `contentLeft` is now `startContent` BREAKING CHANGE: **Bar**: prop `contentMiddle` is now `middleContent` BREAKING CHANGE: **Bar**: prop `contentRight` is now `endContent`
1 parent 01814d1 commit 905dbca

83 files changed

Lines changed: 1147 additions & 601 deletions

File tree

Some content is hidden

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

docs/2-MigrationGuide.stories.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,30 @@ const withParameters = i18nBundle.getText('CAROUSEL_DOT_TEXT', 5, 20);
5050

5151
### API Updates
5252

53+
#### Bar
54+
55+
The `Bar` component has been replaced by the corresponding UI5 Web Component.
56+
57+
Migration Example:
58+
59+
```jsx
60+
<Bar contentLeft={<span>Left</span>} contentMiddle={<span>Middle</span>} contentRight={<span>Right</span>} />
61+
```
62+
63+
will become
64+
65+
```jsx
66+
<Bar startContent={<span>Left</span>} middleContent={<span>Middle</span>} endContent={<span>Right</span>} />
67+
```
68+
69+
#### Toolbar
70+
5371
The `Toolbar` was firing an event `onToolbarClick`. This event has been replaced with `onClick`.
5472

73+
#### NotificationOverflowAction
74+
75+
`NotificationOverflowAction` has been renamed to `NotificationAction`.
76+
5577
#### Device API
5678

5779
The deprecated, class-based `Device` API is now removed. Please don't be shocked by this extensive list, most of the APIs

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
"@storybook/cli": "6.1.11",
3131
"@storybook/react": "6.1.11",
3232
"@storybook/theming": "6.1.11",
33-
"@ui5/webcomponents": "1.0.0-rc.10",
34-
"@ui5/webcomponents-fiori": "1.0.0-rc.10",
35-
"@ui5/webcomponents-icons": "1.0.0-rc.10",
33+
"@ui5/webcomponents": "1.0.0-rc.11",
34+
"@ui5/webcomponents-fiori": "1.0.0-rc.11",
35+
"@ui5/webcomponents-icons": "1.0.0-rc.11",
3636
"react": "17.0.1",
3737
"react-dom": "17.0.1",
3838
"react-syntax-highlighter": "^15.2.1",
@@ -63,7 +63,7 @@
6363
"@types/react-dom": "^17.0.0",
6464
"@typescript-eslint/eslint-plugin": "^4.4.0",
6565
"@typescript-eslint/parser": "^4.4.0",
66-
"@ui5/webcomponents-tools": "1.0.0-rc.10",
66+
"@ui5/webcomponents-tools": "1.0.0-rc.11",
6767
"babel-loader": "^8.1.0",
6868
"chalk": "^4.0.0",
6969
"dedent": "^0.7.0",

packages/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"smoothscroll-polyfill": "0.4.4"
3434
},
3535
"peerDependencies": {
36-
"@ui5/webcomponents-base": "0.26.0",
36+
"@ui5/webcomponents-base": "0.28.0",
3737
"react": "^16.8.0 || ^17.0.0",
3838
"react-jss": "^10.0.4"
3939
},

packages/charts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
"recharts": "2.0.0-beta.8"
2727
},
2828
"peerDependencies": {
29-
"@ui5/webcomponents-react": "^0.12.0",
30-
"@ui5/webcomponents-react-base": "^0.12.0",
29+
"@ui5/webcomponents-react": "^0.13.0",
30+
"@ui5/webcomponents-react-base": "^0.13.0",
3131
"react": "^16.8.0 || ^17.0.0",
3232
"react-jss": "^10.0.4"
3333
},

packages/cra-template-seed/template.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
"@testing-library/jest-dom": "^5.11.4",
55
"@testing-library/react": "^11.1.0",
66
"@testing-library/user-event": "^12.1.10",
7-
"@ui5/webcomponents": "1.0.0-rc.10",
8-
"@ui5/webcomponents-fiori": "1.0.0-rc.10",
9-
"@ui5/webcomponents-icons": "1.0.0-rc.10",
10-
"@ui5/webcomponents-react": "^0.12.0",
11-
"@ui5/webcomponents-react-base": "^0.12.0",
7+
"@ui5/webcomponents": "1.0.0-rc.11",
8+
"@ui5/webcomponents-fiori": "1.0.0-rc.11",
9+
"@ui5/webcomponents-icons": "1.0.0-rc.11",
10+
"@ui5/webcomponents-react": "^0.13.0",
1211
"axios": "^0.20.0",
1312
"husky": "^4.2.5",
1413
"i18next": "^19.7.0",

packages/cra-template/template.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"package": {
33
"dependencies": {
4-
"@ui5/webcomponents": "1.0.0-rc.10",
5-
"@ui5/webcomponents-fiori": "1.0.0-rc.10",
6-
"@ui5/webcomponents-icons": "1.0.0-rc.10",
7-
"@ui5/webcomponents-react": "^0.12.0",
4+
"@ui5/webcomponents": "1.0.0-rc.11",
5+
"@ui5/webcomponents-fiori": "1.0.0-rc.11",
6+
"@ui5/webcomponents-icons": "1.0.0-rc.11",
7+
"@ui5/webcomponents-react": "^0.13.0",
88
"@testing-library/jest-dom": "^5.11.4",
99
"@testing-library/react": "^11.1.0",
1010
"@testing-library/user-event": "^12.1.10",

packages/main/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
"react-virtual": "2.3.2"
4242
},
4343
"peerDependencies": {
44-
"@ui5/webcomponents": "1.0.0-rc.10",
45-
"@ui5/webcomponents-base": "0.26.0",
46-
"@ui5/webcomponents-fiori": "1.0.0-rc.10",
47-
"@ui5/webcomponents-icons": "1.0.0-rc.10",
44+
"@ui5/webcomponents": "1.0.0-rc.11",
45+
"@ui5/webcomponents-base": "1.0.0-rc.11",
46+
"@ui5/webcomponents-fiori": "1.0.0-rc.11",
47+
"@ui5/webcomponents-icons": "1.0.0-rc.11",
4848
"react": "^16.8.0 || ^17.0.0",
4949
"react-dom": "^16.8.0 || ^17.0.0"
5050
},

packages/main/scripts/create-web-components-wrapper.mjs

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const prettierConfig = {
2929
const WEB_COMPONENTS_ROOT_DIR = path.join(PATHS.packages, 'main', 'src', 'webComponents');
3030
const LIB_DIR = path.join(PATHS.packages, 'main', 'src', 'lib');
3131

32-
const KNOWN_EVENTS = new Set(['click', 'input', 'submit', 'change', 'select']);
32+
const KNOWN_EVENTS = new Set(['click', 'input', 'submit', 'change', 'select', 'drop']);
3333

3434
const PRIVATE_COMPONENTS = new Set([
3535
'CalendarHeader',
@@ -41,6 +41,8 @@ const PRIVATE_COMPONENTS = new Set([
4141
'MonthPicker',
4242
'NotificationListItemBase',
4343
'Popup',
44+
'PickerBase',
45+
'SliderBase',
4446
'TabBase',
4547
'ThemePropertiesProvider',
4648
'TreeListItem',
@@ -206,7 +208,7 @@ COMPONENTS_WITHOUT_DEMOS.add('SideNavigationItem');
206208
COMPONENTS_WITHOUT_DEMOS.add('SideNavigationSubItem');
207209
COMPONENTS_WITHOUT_DEMOS.add('SuggestionItem');
208210
COMPONENTS_WITHOUT_DEMOS.add('UploadCollectionItem');
209-
COMPONENTS_WITHOUT_DEMOS.add('NotificationOverflowAction');
211+
COMPONENTS_WITHOUT_DEMOS.add('NotificationAction');
210212
COMPONENTS_WITHOUT_DEMOS.add('WizardStep');
211213

212214
const componentsFromFioriPackage = new Set(fioriWebComponentsSpec.symbols.map((componentSpec) => componentSpec.module));
@@ -292,6 +294,19 @@ const getTypeScriptTypeForProperty = (property) => {
292294
tsType: 'FileList'
293295
};
294296
}
297+
case 'DataTransfer': {
298+
return {
299+
importStatement: null,
300+
tsType: 'DataTransfer'
301+
};
302+
}
303+
case 'object':
304+
case 'Object': {
305+
return {
306+
importStatement: null,
307+
tsType: 'Record<string, unknown>'
308+
};
309+
}
295310

296311
// react ts types
297312
case 'Node[]':
@@ -318,6 +333,12 @@ const getTypeScriptTypeForProperty = (property) => {
318333
tsType: 'AvatarFitType',
319334
isEnum: true
320335
};
336+
case 'AvatarGroupType':
337+
return {
338+
importStatement: "import { AvatarGroupType } from '@ui5/webcomponents-react/lib/AvatarGroupType';",
339+
tsType: 'AvatarGroupType',
340+
isEnum: true
341+
};
321342
case 'AvatarShape':
322343
return {
323344
importStatement: "import { AvatarShape } from '@ui5/webcomponents-react/lib/AvatarShape';",
@@ -330,6 +351,12 @@ const getTypeScriptTypeForProperty = (property) => {
330351
tsType: 'AvatarSize',
331352
isEnum: true
332353
};
354+
case 'BarDesign':
355+
return {
356+
importStatement: "import { BarDesign } from '@ui5/webcomponents-react/lib/BarDesign';",
357+
tsType: 'BarDesign',
358+
isEnum: true
359+
};
333360
case 'BusyIndicatorSize':
334361
return {
335362
importStatement: "import { BusyIndicatorSize } from '@ui5/webcomponents-react/lib/BusyIndicatorSize';",
@@ -348,6 +375,12 @@ const getTypeScriptTypeForProperty = (property) => {
348375
tsType: 'CalendarType',
349376
isEnum: true
350377
};
378+
case 'CalendarSelection':
379+
return {
380+
importStatement: "import { CalendarSelection } from '@ui5/webcomponents-react/lib/CalendarSelection';",
381+
tsType: 'CalendarSelection',
382+
isEnum: true
383+
};
351384
case 'CarouselArrowsPlacement':
352385
return {
353386
importStatement:
@@ -774,7 +807,13 @@ const recursivePropertyResolver = (componentSpec, { properties, slots, events })
774807
return { properties, slots, events };
775808
}
776809

777-
const parentComponent = allWebComponents.find((c) => c.module === componentSpec.extends);
810+
console.log(componentSpec.extends);
811+
const parentComponent = allWebComponents.find((c) => {
812+
if (componentSpec.extends.includes('.')) {
813+
return c.name === componentSpec.extends;
814+
}
815+
return c.module === componentSpec.extends;
816+
});
778817
if (parentComponent) {
779818
return recursivePropertyResolver(parentComponent, {
780819
properties,

packages/main/src/components/Bar/Bar.jss.ts

Lines changed: 0 additions & 86 deletions
This file was deleted.

packages/main/src/components/Bar/Bar.test.tsx

Lines changed: 0 additions & 66 deletions
This file was deleted.

0 commit comments

Comments
 (0)