Skip to content

Commit 93f78a8

Browse files
Merge branch 'master' into fix/AnalyticalTable
2 parents 56cb2bc + 9e6173e commit 93f78a8

27 files changed

+324
-111
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.4.2-rc.11](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.10...v0.4.2-rc.11) (2019-08-02)
7+
8+
9+
### Features
10+
11+
* **FilterItem:** Add MultiSelect option to FilterTypes ([#79](https://github.com/SAP/ui5-webcomponents-react/issues/79)) ([0665824](https://github.com/SAP/ui5-webcomponents-react/commit/0665824))
12+
13+
14+
15+
16+
17+
## [0.4.2-rc.10](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.9...v0.4.2-rc.10) (2019-08-02)
18+
19+
20+
### Code Refactoring
21+
22+
* **VariantManagement:** removed unused prop enabled ([#77](https://github.com/SAP/ui5-webcomponents-react/issues/77)) ([5080316](https://github.com/SAP/ui5-webcomponents-react/commit/5080316))
23+
24+
25+
### BREAKING CHANGES
26+
27+
* **VariantManagement:** Removed prop `enabled`, please use `disabled` instead. This change should not affect your applications, because `enabled` was never implemented.
28+
29+
30+
31+
32+
633
## [0.4.2-rc.9](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.8...v0.4.2-rc.9) (2019-07-31)
734

835

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "0.4.2-rc.9",
5+
"version": "0.4.2-rc.11",
66
"npmClient": "yarn",
77
"useWorkspaces": true,
88
"command": {

packages/base/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.4.2-rc.11](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.10...v0.4.2-rc.11) (2019-08-02)
7+
8+
**Note:** Version bump only for package @ui5/webcomponents-react-base
9+
10+
11+
12+
13+
14+
## [0.4.2-rc.10](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.9...v0.4.2-rc.10) (2019-08-02)
15+
16+
**Note:** Version bump only for package @ui5/webcomponents-react-base
17+
18+
19+
20+
21+
622
## [0.4.2-rc.9](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.8...v0.4.2-rc.9) (2019-07-31)
723

824
**Note:** Version bump only for package @ui5/webcomponents-react-base

packages/base/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ui5/webcomponents-react-base",
3-
"version": "0.4.2-rc.9",
3+
"version": "0.4.2-rc.11",
44
"description": "Base for ui5-webcomponents-react",
55
"main": "index.cjs.js",
66
"module": "index.esm.js",

packages/charts/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.4.2-rc.11](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.10...v0.4.2-rc.11) (2019-08-02)
7+
8+
**Note:** Version bump only for package @ui5/webcomponents-react-charts
9+
10+
11+
12+
13+
14+
## [0.4.2-rc.10](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.9...v0.4.2-rc.10) (2019-08-02)
15+
16+
**Note:** Version bump only for package @ui5/webcomponents-react-charts
17+
18+
19+
20+
21+
622
## [0.4.2-rc.9](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.8...v0.4.2-rc.9) (2019-07-31)
723

824
**Note:** Version bump only for package @ui5/webcomponents-react-charts

packages/charts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ui5/webcomponents-react-charts",
3-
"version": "0.4.2-rc.9",
3+
"version": "0.4.2-rc.11",
44
"description": "Charts for ui5-webcomponents-react",
55
"main": "index.cjs.js",
66
"module": "index.esm.js",
@@ -20,7 +20,7 @@
2020
"@types/chart.js": "^2.7.56"
2121
},
2222
"dependencies": {
23-
"@ui5/webcomponents-react-base": "0.4.2-rc.9",
23+
"@ui5/webcomponents-react-base": "0.4.2-rc.11",
2424
"chart.js": "^2.8.0",
2525
"chartjs-plugin-datalabels": "^0.6.0",
2626
"deepmerge": "^4.0.0",

packages/cli/CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.4.2-rc.11](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.10...v0.4.2-rc.11) (2019-08-02)
7+
8+
**Note:** Version bump only for package @ui5/webcomponents-react-cli
9+
10+
11+
12+
13+
14+
## [0.4.2-rc.10](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.9...v0.4.2-rc.10) (2019-08-02)
15+
16+
**Note:** Version bump only for package @ui5/webcomponents-react-cli
17+
18+
19+
20+
21+
622
## [0.4.2-rc.9](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.8...v0.4.2-rc.9) (2019-07-31)
723

824
**Note:** Version bump only for package @ui5/webcomponents-react-cli

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ui5/webcomponents-react-cli",
33
"private": true,
4-
"version": "0.4.2-rc.9",
4+
"version": "0.4.2-rc.11",
55
"description": "CLI for creating React Components",
66
"repository": {
77
"type": "git",

packages/main/CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.4.2-rc.11](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.10...v0.4.2-rc.11) (2019-08-02)
7+
8+
9+
### Features
10+
11+
* **FilterItem:** Add MultiSelect option to FilterTypes ([#79](https://github.com/SAP/ui5-webcomponents-react/issues/79)) ([0665824](https://github.com/SAP/ui5-webcomponents-react/commit/0665824))
12+
13+
14+
15+
16+
17+
## [0.4.2-rc.10](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.9...v0.4.2-rc.10) (2019-08-02)
18+
19+
20+
### Code Refactoring
21+
22+
* **VariantManagement:** removed unused prop enabled ([#77](https://github.com/SAP/ui5-webcomponents-react/issues/77)) ([5080316](https://github.com/SAP/ui5-webcomponents-react/commit/5080316))
23+
24+
25+
### BREAKING CHANGES
26+
27+
* **VariantManagement:** Removed prop `enabled`, please use `disabled` instead. This change should not affect your applications, because `enabled` was never implemented.
28+
29+
30+
31+
32+
633
## [0.4.2-rc.9](https://github.com/SAP/ui5-webcomponents-react/compare/v0.4.2-rc.8...v0.4.2-rc.9) (2019-07-31)
734

835

packages/main/__karma_snapshots__/FilterBar.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,31 @@
352352
</div>
353353
</div>
354354
</FilterItem>
355+
<FilterItem filterItems={{...}} label="Classification" type="MultiSelect" placeholder="" renderText={[Function: renderText]} onChange={[Function: onChange]} loading={false}>
356+
<div className="FilterItem--filterItem---" style={[undefined]} title={[undefined]}>
357+
<div className="FilterItem--innerFilterItemContainer---">
358+
<Label for="">
359+
<ui5-label for="" class="">
360+
Classification
361+
</ui5-label>
362+
</Label>
363+
<MultiComboBox onSelectionChange={[Function: onMultiCbChange]} value="" placeholder="" valueState="None">
364+
<ui5-multi-combobox value="" placeholder="" value-state="None" class="">
365+
<StandardListItem data-key="1" type="Active" infoState="None">
366+
<ui5-li data-key="1" type="Active" info-state="None" class="">
367+
Text 1
368+
</ui5-li>
369+
</StandardListItem>
370+
<StandardListItem data-key="2" type="Active" infoState="None">
371+
<ui5-li data-key="2" type="Active" info-state="None" class="">
372+
Text 2
373+
</ui5-li>
374+
</StandardListItem>
375+
</ui5-multi-combobox>
376+
</MultiComboBox>
377+
</div>
378+
</div>
379+
</FilterItem>
355380
</div>
356381
</div>
357382
</FilterBar>

packages/main/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ui5/webcomponents-react",
3-
"version": "0.4.2-rc.9",
3+
"version": "0.4.2-rc.11",
44
"description": "React Wrapper for UI5 Web Components and additional components",
55
"repository": {
66
"type": "git",
@@ -22,7 +22,7 @@
2222
},
2323
"dependencies": {
2424
"@ui5/webcomponents": "1.0.0-rc.2",
25-
"@ui5/webcomponents-react-base": "0.4.2-rc.9",
25+
"@ui5/webcomponents-react-base": "0.4.2-rc.11",
2626
"lodash.debounce": "^4.0.8",
2727
"react-scroll": "^1.7.11",
2828
"react-table": "6.10.0",

packages/main/src/components/FilterBar/FilterBar.karma.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,19 @@ describe('FilterBar', () => {
106106
key="classification3"
107107
type={FilterType.Default}
108108
/>
109+
<FilterItem
110+
// onChange={(e) => alert(e.getParameter('selectedItem').key)}
111+
filterItems={filterItems}
112+
label="Classification"
113+
key="classification3"
114+
type={FilterType.MultiSelect}
115+
/>
109116
</FilterBar>
110117
);
111118
// console.log(wrapper.debug());
112119
// console.log(wrapper.find('Select').debug());
113120
wrapper
114-
.find('ui5-li')
121+
.find('ui5-option')
115122
.at(1)
116123
.simulate('change');
117124

packages/main/src/components/FilterBar/demo.stories.tsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { PlacementType } from '../../lib/PlacementType';
99
import { Switch } from '../../lib/Switch';
1010
import { TitleLevel } from '../../lib/TitleLevel';
1111
import { VariantManagement } from '../../lib/VariantManagement';
12+
import { action } from '@storybook/addon-actions';
1213

1314
const flavours = [];
1415
for (let i = 1; i <= 9; i++) {
@@ -57,17 +58,17 @@ function renderStory() {
5758
>
5859
<Switch />
5960
</FilterItem>
60-
{/*<FilterItem*/}
61-
{/*key={'filter2'}*/}
62-
{/*type={FilterType.Custom}*/}
63-
{/*label={'Custom Filter 2'}*/}
64-
{/*changeEventName={'onSelect'}*/}
65-
{/*valueParamName={'state'}*/}
66-
{/*>*/}
67-
{/*<RadioButton text={"Custom Radio Button filter"} onSelect={(e) => {*/}
68-
{/*alert(e.parameters.selectedItem);*/}
69-
{/*}}/>*/}
70-
{/*</FilterItem>*/}
61+
<FilterItem
62+
onChange={action('onChange')}
63+
filterItems={filterItems}
64+
style={{
65+
maxWidth: '200px'
66+
}}
67+
label="Multi"
68+
key="Multi"
69+
type={FilterType.MultiSelect}
70+
loading={boolean('loading', false)}
71+
/>
7172
</FilterBar>
7273
);
7374
}

packages/main/src/components/FilterItem/index.tsx

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { Event, StyleClassHelper } from '@ui5/webcomponents-react-base';
2-
import React, { forwardRef, ReactNode, RefObject, useMemo, FC } from 'react';
2+
import React, { FC, forwardRef, ReactNode, RefObject, useMemo } from 'react';
33
import { CommonProps } from '../../interfaces/CommonProps';
44
import { BusyIndicator } from '../../lib/BusyIndicator';
55
import { FilterType } from '../../lib/FilterType';
66
import { Input } from '../../lib/Input';
77
import { Label } from '../../lib/Label';
88
import { createUseStyles } from 'react-jss';
99
import { Select } from '../../lib/Select';
10+
import { MultiComboBox } from '../../lib/MultiComboBox';
11+
import { StandardListItem } from '../../lib/StandardListItem';
1012
import { Option } from '../../lib/Option';
1113
import styles from './FilterItem.jss';
1214
import { BusyIndicatorType } from '../../lib/BusyIndicatorType';
@@ -52,6 +54,17 @@ const FilterItem: FC<FilterItemPropTypes> = forwardRef((props: FilterItemPropTyp
5254
onChange(Event.of(null, e.getOriginalEvent(), { selectedItem: item }));
5355
}
5456

57+
function onMultiCbChange(e) {
58+
const selectedItems = e.getParameter('items');
59+
onChange(
60+
Event.of(null, e.getOriginalEvent(), {
61+
selectedItems: selectedItems.map((item) => {
62+
return getItemByKey(item.getAttribute('data-key'));
63+
})
64+
})
65+
);
66+
}
67+
5568
const filterComponent = useMemo(() => {
5669
if (loading) {
5770
return (
@@ -68,6 +81,16 @@ const FilterItem: FC<FilterItemPropTypes> = forwardRef((props: FilterItemPropTyp
6881
switch (type) {
6982
case FilterType.Default:
7083
return <Input placeholder={placeholder} onChange={onSelect} style={{ width: '100%' }} />;
84+
case FilterType.MultiSelect:
85+
return (
86+
<MultiComboBox onSelectionChange={onMultiCbChange}>
87+
{filterItems.map((item) => (
88+
<StandardListItem data-key={item.key} key={item.key}>
89+
{item.text}
90+
</StandardListItem>
91+
))}
92+
</MultiComboBox>
93+
);
7194
case FilterType.Select:
7295
return (
7396
<Select onChange={onSelect} style={{ width: '100%' }}>

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import * as React from 'react';
33
import { FlexBox } from '../../lib/FlexBox';
44
import { FlexBoxJustifyContent } from '../../lib/FlexBoxJustifyContent';
55

6+
declare const expect: any;
7+
68
describe('FlexBox', () => {
79
test('JustifyContent: End', () => {
810
const wrapper = mountThemedComponent(
@@ -34,4 +36,13 @@ describe('FlexBox', () => {
3436
const node = wrapper.getDOMNode();
3537
expect(window.getComputedStyle(node).display).toEqual('inline-flex');
3638
});
39+
40+
test('with Custom Class Names and Style', () => {
41+
const wrapper = mountThemedComponent(
42+
<FlexBox className="testClass" style={{ backgroundColor: '#000' }}>
43+
<span>Test 1</span>
44+
</FlexBox>
45+
);
46+
expect(wrapper.render()).toMatchSnapshot();
47+
});
3748
});
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`FlexBox with Custom Class Names and Style 1`] = `
4+
<div
5+
class="FlexBox--flexBox- FlexBox--flexBoxDirectionRow- FlexBox--justifyContentStart- FlexBox--alignItemsStretch- FlexBox--flexWrapNoWrap- testClass"
6+
style="background-color: rgb(0, 0, 0);"
7+
>
8+
<span>
9+
Test 1
10+
</span>
11+
</div>
12+
`;

0 commit comments

Comments
 (0)