Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(Framework): update to ui5-webcomponents-rc.6 #392

Merged
merged 41 commits into from
Apr 2, 2020
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
11a8b8b
feat(WebComponents): Update to rc.6
MarcusNotheis Mar 27, 2020
717428f
Initial Version of new script
MarcusNotheis Mar 27, 2020
879131b
Update create-web-components-wrapper.js
MarcusNotheis Mar 27, 2020
f9c3328
Update create-web-components-wrapper.js
MarcusNotheis Mar 27, 2020
c7e8381
Create New Web Components
MarcusNotheis Mar 27, 2020
29fdfa6
Post upgrade fixes
MarcusNotheis Mar 27, 2020
4c158b3
Update create-web-components-wrapper.js
MarcusNotheis Mar 27, 2020
30e2a35
Re-create all wrappers and demos
MarcusNotheis Mar 27, 2020
363c24c
fix tests
MarcusNotheis Mar 27, 2020
c147141
Fix inherited components and tests
MarcusNotheis Mar 28, 2020
ce7dfa9
Append SubComponent Docs
MarcusNotheis Mar 28, 2020
f5b5f72
Update Input.stories.tsx
MarcusNotheis Mar 28, 2020
044c08c
Create subcomponents based on api.json
MarcusNotheis Mar 28, 2020
6f16235
Merge branch 'master' into chore/update-webcomponents-rc-6
MarcusNotheis Mar 28, 2020
88a45ed
fix build
MarcusNotheis Mar 28, 2020
ee4057b
Fix TS Errors
MarcusNotheis Mar 28, 2020
7376bed
Update Snapshots after fixing default props
MarcusNotheis Mar 29, 2020
d4c64d7
fix responsive popover import
MarcusNotheis Mar 29, 2020
8a05bc3
resolve inherited properties in creation script
MarcusNotheis Mar 29, 2020
7f35b0e
fix edge case for tabs
MarcusNotheis Mar 29, 2020
9a978c5
fix imports for components from fiori package
MarcusNotheis Mar 29, 2020
7526310
Improve Wrapper script
MarcusNotheis Mar 29, 2020
2d5e979
Optimize Wrappers
MarcusNotheis Mar 29, 2020
b1db6ef
Introduce new enums and update existing ones
MarcusNotheis Mar 30, 2020
b233de4
Remove old wrapper script and dependencies
MarcusNotheis Mar 30, 2020
dfda214
use enums instead of string types where available
MarcusNotheis Mar 30, 2020
40e2ed8
remove MessageToast Component
MarcusNotheis Mar 30, 2020
b074dd5
PR Comment 1
MarcusNotheis Mar 30, 2020
e464e77
Update packages/main/src/webComponents/FileUploader/FileUploader.stor…
MarcusNotheis Mar 30, 2020
1684240
Update packages/main/src/webComponents/Card/Card.stories.tsx
MarcusNotheis Mar 30, 2020
20b2c40
Update packages/main/src/webComponents/Card/Card.stories.tsx
MarcusNotheis Mar 30, 2020
95d3b9e
PR Comments
MarcusNotheis Mar 30, 2020
81ab0ed
Merge branch 'chore/update-webcomponents-rc-6' of https://github.com/…
MarcusNotheis Mar 30, 2020
bbc356f
PR Comments
MarcusNotheis Mar 30, 2020
6c07e60
Disable storybook shortcuts
MarcusNotheis Mar 30, 2020
5df09fa
Use sap-theming-base-content instead of manual CSS Variables extract
MarcusNotheis Mar 31, 2020
5cd0195
Add Theming Support
MarcusNotheis Mar 31, 2020
3e9eece
Merge branch 'master' into chore/update-webcomponents-rc-6
MarcusNotheis Mar 31, 2020
90aa801
Merge branch 'master' into chore/update-webcomponents-rc-6
MarcusNotheis Mar 31, 2020
31c28f8
Update rollup
MarcusNotheis Mar 31, 2020
64b9951
Merge branch 'master' into chore/update-webcomponents-rc-6
MarcusNotheis Apr 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 5 additions & 29 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ import { makeDecorator } from '@storybook/addons';
import { addDecorator, addParameters } from '@storybook/react';
import { setTheme } from '@ui5/webcomponents-base/dist/config/Theme';
import '@ui5/webcomponents-base/dist/features/browsersupport/IE11';
import '@ui5/webcomponents-fiori/dist/json-imports/Themes';
import '@ui5/webcomponents-react-base/polyfill/IE11';
import { ContentDensity } from '@ui5/webcomponents-react/lib/ContentDensity';
import { ThemeProvider } from '@ui5/webcomponents-react/lib/ThemeProvider';
import { Themes } from '@ui5/webcomponents-react/lib/Themes';
import '@ui5/webcomponents/dist/json-imports/i18n';
import '@ui5/webcomponents/dist/json-imports/Themes';
import '@ui5/webcomponents/dist/generated/json-imports/i18n';
import '@ui5/webcomponents/dist/generated/json-imports/Themes';
import '@webcomponents/webcomponentsjs/webcomponents-bundle';
import { window } from 'global';
import 'highlight.js/styles/solarized-dark.css';
import qs from 'qs';
import React, { useEffect } from 'react';
import 'react-app-polyfill/ie11';

Expand All @@ -30,14 +26,14 @@ addParameters({

addDecorator(withKnobs);

const ThemeContainer = ({ theme, contentDensity, children, setQueryParam, direction }) => {
const ThemeContainer = ({ theme, contentDensity, children, direction }) => {
useEffect(() => {
if (contentDensity === ContentDensity.Compact) {
document.body.classList.add('ui5-content-density-compact');
} else {
document.body.classList.remove('ui5-content-density-compact');
}
}, [contentDensity, setQueryParam]);
}, [contentDensity]);

useEffect(() => {
document.querySelector('html').setAttribute('dir', direction.toLowerCase());
Expand All @@ -54,31 +50,11 @@ const withQuery = makeDecorator({
name: 'withQuery',
parameterName: 'query',
wrapper: (getStory, context) => {
function setQueryParam(queryObj) {
const iframe = window.parent.document.getElementById('storybook-preview-iframe');
const [base, search] = iframe.src.split('?');
const currentQuery = qs.parse(search, { ignoreQueryPrefix: true });
iframe.src = `${base}?${qs.stringify({ ...currentQuery, ...queryObj })}`;
}

let contentDensity;
try {
const iframe = window.parent.document.getElementById('storybook-preview-iframe');
const currentQuery = qs.parse(iframe.src.split('?')[1]);
contentDensity =
currentQuery['sap-ui-compactSize'] && currentQuery['sap-ui-compactSize'] !== 'false'
? ContentDensity.Compact
: ContentDensity.Cozy;
} catch (e) {
contentDensity = ContentDensity.Compact;
}

return (
<ThemeContainer
theme={select('Theme', [Themes.sap_fiori_3, Themes.sap_fiori_3_dark], Themes.sap_fiori_3)}
contentDensity={select('ContentDensity', ContentDensity, contentDensity)}
contentDensity={select('ContentDensity', ContentDensity, ContentDensity.Cozy)}
direction={select('Text Direction', ['LTR', 'RTL'], 'LTR')}
setQueryParam={setQueryParam}
>
{getStory(context)}
</ThemeContainer>
Expand Down
2 changes: 1 addition & 1 deletion config/jestsetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Adapter from 'enzyme-adapter-react-16';
import { createSerializer } from 'enzyme-to-json';
import ResizeObserver from 'resize-observer-polyfill';
import 'intersection-observer';
import '@ui5/webcomponents/dist/json-imports/i18n';
import '@ui5/webcomponents/dist/generated/json-imports/i18n';

process.env.NODE_ENV = 'test';
process.env.BABEL_ENV = 'test';
Expand Down
13 changes: 1 addition & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,8 @@
"eslint": "^6.8.0",
"eslint-plugin-prefer-arrow": "^1.1.7",
"eslint-plugin-react": "^7.18.3",
"esm": "^3.2.22",
"extract-comments": "^1.1.0",
"file-loader": "^5.0.2",
"file-url": "^3.0.0",
"filesize": "^6.0.1",
"glob": "^7.1.6",
"global": "^4.4.0",
"google-closure-compiler": "^20200204.0.0",
"gzip-size": "^5.1.0",
"husky": "^4.2.1",
Expand All @@ -77,8 +72,6 @@
"ncp": "^2.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"puppeteer": "^2.1.1",
"qs": "^6.9.1",
"react": "^16.8.6",
"react-app-polyfill": "^1.0.6",
"react-dom": "^16.8.6",
Expand All @@ -95,12 +88,8 @@
"sinon": "^8.1.1",
"targz": "^1.0.1",
"tmp": "^0.1.0",
"ts-node": "8.6.2",
"tslint": "^6.0.0",
"typescript": "^3.8.3",
"util": "^0.12.0",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
"typescript": "^3.8.3"
},
"resolutions": {
"@types/react": "16.9.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/Device/Support.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { supportTouch } from '@ui5/webcomponents-core/dist/sap/ui/Device';
import { supportTouch } from '@ui5/webcomponents-base/dist/Device';
import '@ui5/webcomponents-react-base/third-party/modernizr';

declare const Modernizr: {
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/Device/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getBrowser, getOS, getSystem } from '@ui5/webcomponents-core/dist/sap/ui/Device';
import { getBrowser, getOS, getSystem } from '@ui5/webcomponents-base/dist/Device';
import { EventRegistry } from './EventRegistry';
import { Media } from './Media';
import { Orientation } from './Orientation';
Expand Down
12 changes: 3 additions & 9 deletions packages/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@
],
"scripts": {
"clean": "rimraf cjs components enums interfaces internal lib webComponents index.esm.js index.d.ts",
"generateWebComponents": "ts-node -O '{\"module\": \"commonjs\"}' -r esm ./scripts/wrapperGeneration/index.js --onlyStopForMerge",
"build": "webpack --config ./scripts/wrapperGeneration/webpack.config.js",
"postbuild": "rollup -c rollup.config.js"
},
"dependencies": {
"@ui5/webcomponents": "1.0.0-rc.5",
"@ui5/webcomponents-fiori": "1.0.0-rc.5",
"@ui5/webcomponents-icons": "1.0.0-rc.5",
"@ui5/webcomponents": "1.0.0-rc.6",
"@ui5/webcomponents-fiori": "1.0.0-rc.6",
"@ui5/webcomponents-icons": "1.0.0-rc.6",
"@ui5/webcomponents-react-base": "^0.9.0-rc.5",
"lodash.debounce": "^4.0.8",
"react-content-loader": "^5.0.2",
Expand All @@ -33,10 +31,6 @@
"react-toastify": "^5.5.0",
"react-window": "^1.8.5"
},
"devDependencies": {
"diff": "^4.0.1",
"inquirer": "^7.0.0"
},
"peerDependencies": {
"react": "^16.8.0",
"react-dom": "^16.8.0"
Expand Down
Loading