Skip to content

Commit 4a5976f

Browse files
merging latest master
2 parents a79082e + cf1194d commit 4a5976f

File tree

12 files changed

+88
-196
lines changed

12 files changed

+88
-196
lines changed

RELEASENOTES.md

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,51 @@ These are changes that have backwards-compatible solutions present and that comp
3131

3232
### Latest Release
3333

34+
## Release 0.10.12
35+
36+
**Minor Features**
37+
38+
* `Popover`: Add feature variant
39+
* `SplitView`: `onSelect` now called with `enter` key
40+
* `BuilderHeader`: Add miscellaneous section sub-component
41+
* `BuilderHeader`: Use Error Popover in Utility Bar example
42+
* `Accordion`: Update Base example to allow a panel to be toggled
43+
* Add ARIA attributes to all `input` tags in library in order to enable increased accessibility support for consumers
44+
* `SetupAssistant`: Add capacity to pass Icons into a `SetupAssistantStep`
45+
* `Dropdown`: Adds `hover` capabilities w/ keyboard interactions
46+
* `Accordion`: Add arrow key panel support (accessibility)
47+
48+
**Bugfixes**
49+
50+
* `Dropdown`: Menu Tooltip content now works with `options` array
51+
* `Tabs`: White space around words in disabled tabs no longer trigger tab change. Disabled Tab style `import '!style-loader!css-loader!@salesforce/design-system-react/styles/tabs/tab.css';` updated to SLDS's modified BEM.
52+
* `Expression`: Static markup accessibility violations fixed.
53+
* `Files`: Add inverse classname to download button
54+
* `BuilderHeader`: Make Tooltips in example accessible
55+
* `TimePicker`: Remove default time-picker placeholder text
56+
57+
**Maintainance**
58+
59+
* `SplitView` Example: File name change
60+
* Add functional programming eslint rules to increase maintainability
61+
* `TravisCI`: Enable matrix build to speed up CI time
62+
* Remove `PhantomJS` legacy code and instructions
63+
* Bump `eslint-plugin-filenames` from 1.2.0 to 1.3.2
64+
* Bump `babel-plugin-istanbul` from 5.1.4 to 5.2.0
65+
* Bump `karma-chrome-launcher` from 2.2.0 to 3.1.0
66+
* Bump `react` from 16.8.6 to 16.9.0
67+
* Bump `@babel/polyfill` from 7.4.4 to 7.6.0
68+
* Bump `cross-env` from 5.2.0 to 5.2.1
69+
* Bump `fs-extra` from 3.0.1 to 8.1.0
70+
* Bump `@storybook/addon-storyshots-puppeteer` from 5.1.9 to 5.1.11
71+
* Bump `normalizr` from 3.2.4 to 3.4.1
72+
* Bump `chownr` from 1.1.0 to 1.1.2
73+
* Bump `eslint-plugin-import` from 2.17.3 to 2.18.2
74+
* Bump `mocha-loader` from 2.0.1 to 3.0.0
75+
* Bump `babel-eslint` from 10.0.2 to 10.0.3
76+
* Bump `karma-coverage` from 1.1.2 to 2.0.1
77+
* Bump `eslint-config-prettier` from 3.0.1 to 6.1.0
78+
3479
## Release 0.10.11
3580

3681
**Major Features**
@@ -73,6 +118,7 @@ These are changes that have backwards-compatible solutions present and that comp
73118
* `mixin-deep` update from 1.3.1 to 1.3.2 (security)
74119

75120
# Release 0.10.10
121+
76122
**Bug with release script caused this version to be skipped. Please use 0.10.11**
77123

78124
## Release 0.10.9
@@ -194,11 +240,11 @@ These are changes that have backwards-compatible solutions present and that comp
194240
* `enzyme` update from 3.9.0 to 3.10.0
195241
* `react-text-truncate` update from 0.12.1 to 0.14.1
196242
* `react-modal` update from 3.4.4 to 3.8.1
197-
* `@babel/preset-env` update from 7.4.4 to 7.4.5
243+
* `@babel/preset-env` update from 7.4.4 to 7.4.5
198244
* `karma-coverage` update from 1.1.1 to 1.1.2
199-
* `webpack-hot-middleware` update from 2.21.0 to 2.25.0
245+
* `webpack-hot-middleware` update from 2.21.0 to 2.25.0
200246
* `eslint-plugin-import` update from 2.17.2 to 2.17.3
201-
* `eslint-plugin-json` update from 1.2.0 to 1.4.0
247+
* `eslint-plugin-json` update from 1.2.0 to 1.4.0
202248
* `shortid` update from 2.2.8 to 2.2.14
203249
* `concurrently` update from 4.0.1 to 4.1.0
204250
* `lint-staged` update from 3.6.1 to 8.2.0

components/combobox/__docs__/storybook-stories.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ storiesOf(COMBOBOX, module)
8686
.add('Inline Single Search/Add Entities', () => (
8787
<InlineSingleSearchAddEntities action={action} />
8888
))
89+
.add('Inline Single Search/Add Entities - Open', () => (
90+
<InlineSingleSearchAddEntities isOpen action={action} />
91+
))
8992
.add('Inline Multiple Selection', () => <InlineMultiple action={action} />)
9093
.add('Inline Multiple Selection Loading', () => (
9194
<InlineMultipleLoading action={action} />

components/combobox/__examples__/inline-single-search-add-entities.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ class Example extends React.Component {
176176
: this.state.inputValue
177177
}
178178
variant="inline-listbox"
179+
{...this.props}
179180
/>
180181
</IconSettings>
181182
);

components/component-docs.json

Lines changed: 0 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -10009,155 +10009,6 @@
1000910009
}
1001010010
]
1001110011
},
10012-
"map": {
10013-
"description": "A map component is used to find a location",
10014-
"methods": [
10015-
{
10016-
"name": "getId",
10017-
"docblock": "Get the Map's HTML id. Generate a new one if no ID present.",
10018-
"modifiers": [],
10019-
"params": [],
10020-
"returns": null,
10021-
"description": "Get the Map's HTML id. Generate a new one if no ID present."
10022-
},
10023-
{
10024-
"name": "handleClick",
10025-
"docblock": "Handles clicking of a location",
10026-
"modifiers": [],
10027-
"params": [
10028-
{
10029-
"name": "event"
10030-
},
10031-
{
10032-
"name": "i"
10033-
}
10034-
],
10035-
"returns": null,
10036-
"description": "Handles clicking of a location"
10037-
}
10038-
],
10039-
"props": {
10040-
"className": {
10041-
"type": {
10042-
"name": "union",
10043-
"value": [
10044-
{
10045-
"name": "array"
10046-
},
10047-
{
10048-
"name": "object"
10049-
},
10050-
{
10051-
"name": "string"
10052-
}
10053-
]
10054-
},
10055-
"required": false,
10056-
"description": "CSS class names to be added with `slds-map` class. `array`, `object`, or `string` are accepted."
10057-
},
10058-
"classNameContainer": {
10059-
"type": {
10060-
"name": "union",
10061-
"value": [
10062-
{
10063-
"name": "array"
10064-
},
10065-
{
10066-
"name": "object"
10067-
},
10068-
{
10069-
"name": "string"
10070-
}
10071-
]
10072-
},
10073-
"required": false,
10074-
"description": "CSS class names to be added to the container element. `array`, `object`, or `string` are accepted."
10075-
},
10076-
"id": {
10077-
"type": {
10078-
"name": "string"
10079-
},
10080-
"required": false,
10081-
"description": "HTML id for component."
10082-
},
10083-
"labels": {
10084-
"type": {
10085-
"name": "shape",
10086-
"value": {
10087-
"title": {
10088-
"name": "string",
10089-
"required": false
10090-
}
10091-
}
10092-
},
10093-
"required": false,
10094-
"description": "Labels\n * `title` - Title for the Map component."
10095-
},
10096-
"locations": {
10097-
"type": {
10098-
"name": "arrayOf",
10099-
"value": {
10100-
"name": "shape",
10101-
"value": {
10102-
"id": {
10103-
"name": "string",
10104-
"required": true
10105-
},
10106-
"name": {
10107-
"name": "string",
10108-
"required": true
10109-
},
10110-
"address": {
10111-
"name": "string",
10112-
"required": true
10113-
}
10114-
}
10115-
}
10116-
},
10117-
"required": true,
10118-
"description": "Array of locations objects for the Map component.**\nEach location object can contain:\n * `id` : A unique identifier string for the location\n * `name` : Name of the location\n * `address` : Address of the location"
10119-
},
10120-
"onClickLocation": {
10121-
"type": {
10122-
"name": "func"
10123-
},
10124-
"required": false,
10125-
"description": "Callback function triggered when a location is selected"
10126-
},
10127-
"googleAPIKey": {
10128-
"type": {
10129-
"name": "string"
10130-
},
10131-
"required": true,
10132-
"description": "Accepts a Google Map API Key that will be used for showing the map"
10133-
},
10134-
"selection": {
10135-
"type": {
10136-
"name": "shape",
10137-
"value": {
10138-
"id": {
10139-
"name": "string",
10140-
"required": true
10141-
},
10142-
"name": {
10143-
"name": "string",
10144-
"required": true
10145-
},
10146-
"address": {
10147-
"name": "string",
10148-
"required": true
10149-
}
10150-
}
10151-
},
10152-
"required": false,
10153-
"description": "Accepts location object that will be selected to shown on load\n * `id` : A unique identifier string for the location\n * `name` : Name of the location\n * `address` : Address of the location"
10154-
}
10155-
},
10156-
"route": "map",
10157-
"display-name": "Map",
10158-
"SLDS-component-path": "/components/map",
10159-
"dependencies": []
10160-
},
1016110012
"media-object": {
1016210013
"description": "When you need text and a figure next to each other, use a media object.",
1016310014
"methods": [],

components/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,6 @@ export LookupDefaultHeader from './lookup/menu/default-header';
159159
export SLDSLookupDefaultHeader from './lookup/menu/default-header';
160160
export LookupDefaultSectionDivider from './lookup/menu/default-section-divider';
161161
export SLDSLookupDefaultSectionDivider from './lookup/menu/default-section-divider';
162-
export Map from './map';
163-
export SLDSMap from './map';
164162
export MediaObject from './media-object';
165163
export SLDSMediaObject from './media-object';
166164
export MenuDropdown from './menu-dropdown';

components/map/__docs__/storybook-stories.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ storiesOf(MAP, module)
1212
))
1313
.add('Multi Locations', () => <MultiLocations action={action} />)
1414
.add('Multi Locations pre-selected', () => (
15-
<MultiLocations isPreSelected action={action} />
15+
<MultiLocations
16+
selection={{
17+
id: '3',
18+
name: 'salesforce.com inc Bellevue',
19+
address: '929 108th Ave NE, Bellevue, WA',
20+
}}
21+
action={action}
22+
/>
1623
))
1724
.add('Multi locations inside Modal', () => (
1825
<MultiLocations isModal action={action} />

components/map/__examples__/multiple-locations.jsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,21 @@ const locations = [
5858
class Example extends React.Component {
5959
static displayName = 'MapExampleMultipleLocations';
6060

61+
constructor(props) {
62+
super(props);
63+
this.state = {
64+
selection: this.props.selection || locations[1],
65+
};
66+
}
67+
6168
render() {
6269
const map = (
6370
<Map
6471
id="map-multiple-locations-example"
6572
googleAPIKey="AIzaSyDliLquGXGts9S8YtkWVolSQEJdBL1ZuWc"
6673
labels={{ title: 'Salesforce Locations In United States' }}
6774
locations={locations}
68-
selection={this.props.isPreSelected ? locations[2] : null}
75+
selection={this.state.selection}
6976
onClickLocation={(event, data) =>
7077
log({
7178
action: this.props.action,

components/map/index.jsx

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,6 @@ const propTypes = {
8585
class Map extends React.Component {
8686
constructor(props) {
8787
super(props);
88-
if (this.props.selection)
89-
this.state = {
90-
selected: this.props.locations.indexOf(this.props.selection),
91-
};
92-
else
93-
this.state = {
94-
selected: 0,
95-
};
9688
this.generatedId = shortid.generate();
9789
}
9890

@@ -109,16 +101,9 @@ class Map extends React.Component {
109101
handleClick = (event, i) => {
110102
if (typeof this.props.onClickLocation === 'function')
111103
this.props.onClickLocation(event, this.props.locations[i]);
112-
this.setState({ selected: i });
113104
};
114105

115106
render() {
116-
let queryParam = '';
117-
118-
if (this.props.locations && this.props.locations[this.state.selected]) {
119-
queryParam = this.props.locations[this.state.selected].address;
120-
}
121-
122107
return (
123108
<div
124109
id={this.getId()}
@@ -135,7 +120,7 @@ class Map extends React.Component {
135120
title={this.props.labels.title}
136121
src={`https://www.google.com/maps/embed/v1/place?key=${
137122
this.props.googleAPIKey
138-
}&q=${encodeURIComponent(queryParam)}`}
123+
}&q=${encodeURIComponent(this.props.selection.address)}`}
139124
/>
140125
</div>
141126
</div>
@@ -156,7 +141,7 @@ class Map extends React.Component {
156141
type="button"
157142
onClick={(event) => this.handleClick(event, i)}
158143
className="slds-coordinates__item-action slds-button_reset slds-media"
159-
aria-pressed={this.state.selected === i}
144+
aria-pressed={this.props.selection.id === location.id}
160145
>
161146
<span className="slds-media__figure">
162147
<Icon category="standard" name="account" />

components/site-stories.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,6 @@ const documentationSiteLiveExamples = {
169169
require('raw-loader!@salesforce/design-system-react/components/input/__examples__/field-level-help.jsx'),
170170
require('raw-loader!@salesforce/design-system-react/components/input/__examples__/counter-input.jsx'),
171171
],
172-
map: [
173-
require('raw-loader!@salesforce/design-system-react/components/map/__examples__/multiple-locations.jsx'),
174-
require('raw-loader!@salesforce/design-system-react/components/map/__examples__/single-location.jsx'),
175-
],
176172
'media-object': [
177173
require('raw-loader!@salesforce/design-system-react/components/media-object/__examples__/default.jsx'),
178174
require('raw-loader!@salesforce/design-system-react/components/media-object/__examples__/vertically-centered.jsx'),

0 commit comments

Comments
 (0)