Skip to content

Commit

Permalink
chore: update storybook and typings (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusNotheis authored Apr 3, 2020
1 parent 9e6736e commit 2a95fe9
Show file tree
Hide file tree
Showing 5 changed files with 206 additions and 738 deletions.
8 changes: 3 additions & 5 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ require('dotenv').config({
path: path.join(PATHS.root, '.env')
});

const IS_RELEASE_BUILD = process.env.UI5_WEBCOMPONENTS_FOR_REACT_RELEASE_BUILD === 'true';
const BUILD_FOR_IE11 = process.env.UI5_WEBCOMPONENTS_FOR_REACT_BUILD_IE11 === 'true';

const DEPENDENCY_REGEX = BUILD_FOR_IE11
Expand Down Expand Up @@ -33,7 +34,7 @@ module.exports = {
]
};

if (process.env.UI5_WEBCOMPONENTS_FOR_REACT_RELEASE_BUILD === 'true') {
if (IS_RELEASE_BUILD) {
highlightLog('Warning: Prop Types Table Generation is active');
tsLoader.use.push(require.resolve('react-docgen-typescript-loader'));
} else {
Expand All @@ -48,10 +49,7 @@ module.exports = {

config.module.rules.push(tsLoader);

if (
(process.env.UI5_WEBCOMPONENTS_FOR_REACT_RELEASE_BUILD === 'true' && configType === 'PRODUCTION') ||
BUILD_FOR_IE11 === true
) {
if ((IS_RELEASE_BUILD && configType === 'PRODUCTION') || BUILD_FOR_IE11) {
config.module.rules.push({
test: /\.(js|mjs)$/,
include: DEPENDENCY_REGEX,
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
"lint": "eslint packages/*/src/**/*.{ts,tsx}"
},
"dependencies": {
"@storybook/addon-actions": "5.3.17",
"@storybook/addon-docs": "5.3.17",
"@storybook/addon-info": "5.3.17",
"@storybook/addon-knobs": "5.3.17",
"@storybook/addons": "5.3.17",
"@storybook/cli": "5.3.17",
"@storybook/react": "5.3.17",
"@storybook/theming": "5.3.17",
"react-docgen-typescript-loader": "3.7.1"
"@storybook/addon-actions": "5.3.18",
"@storybook/addon-docs": "5.3.18",
"@storybook/addon-info": "5.3.18",
"@storybook/addon-knobs": "5.3.18",
"@storybook/addons": "5.3.18",
"@storybook/cli": "5.3.18",
"@storybook/react": "5.3.18",
"@storybook/theming": "5.3.18",
"react-docgen-typescript-loader": "3.7.2"
},
"devDependencies": {
"@babel/core": "^7.8.7",
Expand All @@ -33,7 +33,7 @@
"@rollup/plugin-json": "^4.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"@rollup/plugin-replace": "^2.3.1",
"@storybook/storybook-deployer": "^2.8.1",
"@storybook/storybook-deployer": "^2.8.5",
"@types/enzyme": "^3.10.5",
"@types/jest": "^25.1.2",
"@types/react": "^16.9.2",
Expand Down
9 changes: 6 additions & 3 deletions packages/main/src/components/AnalyticalTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { createComponentStyles } from '@ui5/webcomponents-react-base/lib/createC
import { StyleClassHelper } from '@ui5/webcomponents-react-base/lib/StyleClassHelper';
import { usePassThroughHtmlProps } from '@ui5/webcomponents-react-base/lib/usePassThroughHtmlProps';
import { enrichEventWithDetails } from '@ui5/webcomponents-react-base/lib/Utils';
import { TableSelectionMode } from '@ui5/webcomponents-react/lib/TableSelectionMode';
import { TableScaleWidthMode } from '@ui5/webcomponents-react/lib/TableScaleWidthMode';
import { TableSelectionBehavior } from '@ui5/webcomponents-react/lib/TableSelectionBehavior';
import { TableSelectionMode } from '@ui5/webcomponents-react/lib/TableSelectionMode';
import React, {
ComponentType,
FC,
Expand All @@ -30,8 +30,8 @@ import {
useSortBy,
useTable
} from 'react-table';
import { CommonProps } from '../../interfaces/CommonProps';
import { AnalyticalTableColumnDefinition } from '../../interfaces/AnalyticalTableColumnDefinition';
import { CommonProps } from '../../interfaces/CommonProps';
import styles from './AnayticalTable.jss';
import { ColumnHeader } from './ColumnHeader';
import { DefaultColumn } from './defaults/Column';
Expand All @@ -43,20 +43,23 @@ import { useDragAndDrop } from './hooks/useDragAndDrop';
import { useDynamicColumnWidths } from './hooks/useDynamicColumnWidths';
import { useRowHighlight } from './hooks/useRowHighlight';
import { useRowSelectionColumn } from './hooks/useRowSelectionColumn';
import { useSingleRowStateSelection } from './hooks/useSingleRowStateSelection';
import { useTableCellStyling } from './hooks/useTableCellStyling';
import { useTableHeaderGroupStyling } from './hooks/useTableHeaderGroupStyling';
import { useTableHeaderStyling } from './hooks/useTableHeaderStyling';
import { useTableRowStyling } from './hooks/useTableRowStyling';
import { useTableScrollHandles } from './hooks/useTableScrollHandles';
import { useTableStyling } from './hooks/useTableStyling';
import { useToggleRowExpand } from './hooks/useToggleRowExpand';
import { useSingleRowStateSelection } from './hooks/useSingleRowStateSelection';
import { stateReducer } from './tableReducer/stateReducer';
import { TitleBar } from './TitleBar';
import { orderByFn } from './util';
import { VirtualTableBody } from './virtualization/VirtualTableBody';

export interface TableProps extends CommonProps {
/**
* Please look at the [AnalyticalTableColumnDefinition interface](https://github.com/SAP/ui5-webcomponents-react/blob/master/packages/main/src/interfaces/AnalyticalTableColumnDefinition.ts) for a full list of options.
*/
columns: AnalyticalTableColumnDefinition[];
data: object[];

Expand Down
8 changes: 4 additions & 4 deletions packages/main/src/webComponents/Avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ const Avatar: FC<AvatarPropTypes> = withWebComponent<AvatarPropTypes>(UI5Avatar)
Avatar.displayName = 'Avatar';

Avatar.defaultProps = {
backgroundColor: 'Accent6',
backgroundColor: AvatarBackgroundColor.Accent6,
icon: '',
image: '',
imageFitType: 'Cover',
imageFitType: AvatarFitType.Cover,
initials: '',
shape: 'Circle',
size: 'S'
shape: AvatarShape.Circle,
size: AvatarSize.S
};

export { Avatar };
Loading

0 comments on commit 2a95fe9

Please sign in to comment.