Skip to content
This repository has been archived by the owner on Aug 8, 2018. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Bachman committed Jul 17, 2018
2 parents c88e7ec + 3f34d01 commit 0252200
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-common",
"version": "1.1.2",
"version": "1.1.3",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/Components/LinkButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class LinkButton extends Component {
styles.inlineToolbarButton_wrapper,
{
[buttonStyles.inlineToolbarButton_wrapper]: !!buttonStyles.inlineToolbarButton_wrapper,
[buttonStyles.inlineToolbarButton_wrapper]: !!buttonStyles.inlineToolbarButton_wrapper,
[buttonStyles.pluginToolbarButton_wrapper]: !!buttonStyles.pluginToolbarButton_wrapper,
}
),
icon: classNames(styles.inlineToolbarButton_icon,
Expand Down
17 changes: 13 additions & 4 deletions packages/common/src/Components/LinkPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,16 @@ class LinkPanel extends Component {
}
};

handleKeyPress = e => {
if (e.charCode === 13) {
this.validateUrl();
handleKeyDown = e => {
const { onEnter, onEscape } = this.props;
if (e.key === 'Enter') { // TODO: only the 2nd 'Enter' key closes the panel because of setState() call in the validateUrl
if (onEnter) {
onEnter(e);
} else {
this.validateUrl();
}
} else if (e.key === 'Escape') {
onEscape && onEscape(e);
}
};

Expand All @@ -118,7 +125,7 @@ class LinkPanel extends Component {
<div className={styles.linkPanel_Content} {...ariaProps} role="form">
<div className={styles.linkPanel_Input}>
<input
onKeyPress={this.handleKeyPress}
onKeyDown={this.handleKeyDown}
tabIndex="0" type="url" ref={ref => (this.input = ref)} className={textInputClassName} placeholder={this.inputPlaceholder}
data-hook="linkPanelInput" onChange={this.handleIntermediateUrlChange} onBlur={this.validateUrl} value={this.state.intermediateUrl}
/>
Expand Down Expand Up @@ -163,5 +170,7 @@ LinkPanel.propTypes = {
onTargetBlankChange: PropTypes.func,
onNofollowChange: PropTypes.func,
onValidateUrl: PropTypes.func,
onEnter: PropTypes.func,
onEscape: PropTypes.func,
};
export default LinkPanel;
1 change: 1 addition & 0 deletions packages/common/src/Components/LinkPanelContainer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ class LinkPanelContainer extends Component {
<FocusManager className={linkPanelContainerClassName} data-hook="linkPanelContainer" role="form" {...ariaProps}>
<div className={styles.linkPanel_content}>
<LinkPanel
onEnter={e => this.onDoneClick(e)} onEscape={e => this.onCancelClick(e)}
ref={this.setLinkPanel} theme={theme} url={url} targetBlank={targetBlank} anchorTarget={anchorTarget}
relValue={relValue} nofollow={nofollow} t={t} ariaProps={{ 'aria-label': 'Link management' }}
/>
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": false,
"name": "wix-rich-content-editor",
"version": "1.2.3",
"version": "1.2.4",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -58,7 +58,7 @@
"react-i18next": "^7.6.1",
"react-measure": "^2.0.2",
"redraft": "^0.9.0",
"wix-rich-content-common": "^1.1.2",
"wix-rich-content-common": "^1.1.3",
"wnpm-ci": "latest"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-divider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-divider",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -62,7 +62,7 @@
"react-dom": "15.5.4"
},
"dependencies": {
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-emoji/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-emoji",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -62,7 +62,7 @@
"dependencies": {
"draft-js-emoji-plugin": "^2.0.2",
"react-icons": "^2.2.7",
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-gallery/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-gallery",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -65,7 +65,7 @@
"image-client-api": "^1.195.0",
"pro-gallery-renderer": "^1.0.177",
"react-sortable-hoc": "^0.6.8",
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-hashtag/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-hashtag",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -54,7 +54,7 @@
"react-dom": "15.5.4"
},
"dependencies": {
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-html/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-html",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -61,7 +61,7 @@
},
"dependencies": {
"react-i18next": "^7.6.1",
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-image/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-image",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -60,7 +60,7 @@
"react-dom": "15.5.4"
},
"dependencies": {
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-link/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-link",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -54,7 +54,7 @@
},
"dependencies": {
"draft-js-linkify-plugin": "^2.0.1",
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-mentions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-mentions",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Vytenis Butkevicius",
"email": "vytenisb@wix.com"
Expand Down Expand Up @@ -57,7 +57,7 @@
"dependencies": {
"decorate-component-with-props": "^1.1.0",
"draft-js-mention-plugin": "^3.0.4",
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-video/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-plugin-video",
"version": "1.1.1",
"version": "1.1.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -61,7 +61,7 @@
},
"dependencies": {
"react-player": "^1.5.0",
"wix-rich-content-common": "^1.1.2"
"wix-rich-content-common": "^1.1.3"
},
"unpkg": true,
"publishConfig": {
Expand Down
4 changes: 2 additions & 2 deletions packages/viewer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wix-rich-content-viewer",
"version": "1.2.1",
"version": "1.2.2",
"author": {
"name": "Jonathan Bachman",
"email": "jonathanb@wix.com"
Expand Down Expand Up @@ -39,7 +39,7 @@
"classnames": "^2.2.6",
"lodash": "^4.17.10",
"redraft": "^0.9.0",
"wix-rich-content-common": "^1.1.2",
"wix-rich-content-common": "^1.1.3",
"wnpm-ci": "latest"
},
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/viewer/src/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export { default as RichContentViewer } from './RichContentViewer';
export { LinkStrategy } from './decorators/linkDecorator';

0 comments on commit 0252200

Please sign in to comment.