"regenerator-runtime": "0.13.2",
"remark-custom-blocks": "2.3.0",
"remark-slug": "5.1.0",
- "sonar-ui-common": "0.0.25",
+ "sonar-ui-common": "0.0.30",
"styled-components": "4.3.2",
"unist-util-visit": "1.4.0",
"valid-url": "1.0.9",
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import ClickEventBoundary from 'sonar-ui-common/components/controls/ClickEventBoundary';
import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown';
import { PopupPlacement } from 'sonar-ui-common/components/ui/popups';
import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n';
const { author } = issue;
return (
<DropdownOverlay placement={PopupPlacement.BottomRight}>
- <ClickEventBoundary>
- <div className="menu is-container issue-changelog">
- <table className="spaced">
- <tbody>
- <tr>
- <td className="thin text-left text-top nowrap">
- <DateTimeFormatter date={issue.creationDate} />
- </td>
- <td className="text-left text-top">
- {author ? `${translate('created_by')} ${author}` : translate('created')}
- </td>
- </tr>
+ <div className="menu is-container issue-changelog">
+ <table className="spaced">
+ <tbody>
+ <tr>
+ <td className="thin text-left text-top nowrap">
+ <DateTimeFormatter date={issue.creationDate} />
+ </td>
+ <td className="text-left text-top">
+ {author ? `${translate('created_by')} ${author}` : translate('created')}
+ </td>
+ </tr>
- {this.state.changelog.map((item, idx) => {
- const userName = item.userName || item.user;
+ {this.state.changelog.map((item, idx) => {
+ const userName = item.userName || item.user;
- return (
- <tr key={idx}>
- <td className="thin text-left text-top nowrap">
- <DateTimeFormatter date={item.creationDate} />
- </td>
- <td className="text-left text-top">
- {userName && (
- <p>
- <Avatar
- className="little-spacer-right"
- hash={item.avatar}
- name={userName}
- size={16}
- />
- {item.isUserActive
- ? userName
- : translateWithParameters('user.x_deleted', userName)}
- </p>
- )}
- {item.diffs.map(diff => (
- <IssueChangelogDiff diff={diff} key={diff.key} />
- ))}
- </td>
- </tr>
- );
- })}
- </tbody>
- </table>
- </div>
- </ClickEventBoundary>
+ return (
+ <tr key={idx}>
+ <td className="thin text-left text-top nowrap">
+ <DateTimeFormatter date={item.creationDate} />
+ </td>
+ <td className="text-left text-top">
+ {userName && (
+ <p>
+ <Avatar
+ className="little-spacer-right"
+ hash={item.avatar}
+ name={userName}
+ size={16}
+ />
+ {item.isUserActive
+ ? userName
+ : translateWithParameters('user.x_deleted', userName)}
+ </p>
+ )}
+ {item.diffs.map(diff => (
+ <IssueChangelogDiff diff={diff} key={diff.key} />
+ ))}
+ </td>
+ </tr>
+ );
+ })}
+ </tbody>
+ </table>
+ </div>
</DropdownOverlay>
);
}
*/
import * as React from 'react';
import { Button, ResetButtonLink } from 'sonar-ui-common/components/controls/buttons';
-import ClickEventBoundary from 'sonar-ui-common/components/controls/ClickEventBoundary';
import { DropdownOverlay } from 'sonar-ui-common/components/controls/Dropdown';
import { PopupPlacement } from 'sonar-ui-common/components/ui/popups';
import { translate } from 'sonar-ui-common/helpers/l10n';
const { comment, autoTriggered } = this.props;
return (
<DropdownOverlay placement={this.props.placement}>
- <ClickEventBoundary>
- <div className="issue-comment-bubble-popup">
- <div className="issue-comment-form-text">
- <textarea
- autoFocus={true}
- onChange={this.handleCommentChange}
- onKeyDown={this.handleKeyboard}
- placeholder={this.props.placeholder}
- rows={2}
- value={this.state.textComment}
- />
+ <div className="issue-comment-bubble-popup">
+ <div className="issue-comment-form-text">
+ <textarea
+ autoFocus={true}
+ onChange={this.handleCommentChange}
+ onKeyDown={this.handleKeyboard}
+ placeholder={this.props.placeholder}
+ rows={2}
+ value={this.state.textComment}
+ />
+ </div>
+ <div className="issue-comment-form-footer">
+ <div className="issue-comment-form-actions">
+ <Button
+ className="js-issue-comment-submit little-spacer-right"
+ disabled={this.state.textComment.trim().length < 1}
+ onClick={this.handleCommentClick}>
+ {comment && translate('save')}
+ {!comment && translate('issue.comment.submit')}
+ </Button>
+ <ResetButtonLink className="js-issue-comment-cancel" onClick={this.handleCancelClick}>
+ {autoTriggered ? translate('skip') : translate('cancel')}
+ </ResetButtonLink>
</div>
- <div className="issue-comment-form-footer">
- <div className="issue-comment-form-actions">
- <Button
- className="js-issue-comment-submit little-spacer-right"
- disabled={this.state.textComment.trim().length < 1}
- onClick={this.handleCommentClick}>
- {comment && translate('save')}
- {!comment && translate('issue.comment.submit')}
- </Button>
- <ResetButtonLink
- className="js-issue-comment-cancel"
- onClick={this.handleCancelClick}>
- {autoTriggered ? translate('skip') : translate('cancel')}
- </ResetButtonLink>
- </div>
- <div className="issue-comment-form-tips">
- <MarkdownTips />
- </div>
+ <div className="issue-comment-form-tips">
+ <MarkdownTips />
</div>
</div>
- </ClickEventBoundary>
+ </div>
</DropdownOverlay>
);
}
<DropdownOverlay
placement="bottom-right"
>
- <ClickEventBoundary>
- <div
- className="menu is-container issue-changelog"
+ <div
+ className="menu is-container issue-changelog"
+ >
+ <table
+ className="spaced"
>
- <table
- className="spaced"
- >
- <tbody>
- <tr>
- <td
- className="thin text-left text-top nowrap"
- >
- <DateTimeFormatter
- date="2017-03-01T09:36:01+0100"
- />
- </td>
- <td
- className="text-left text-top"
- >
- created_by john.david.dalton@gmail.com
- </td>
- </tr>
- <tr
- key="0"
+ <tbody>
+ <tr>
+ <td
+ className="thin text-left text-top nowrap"
+ >
+ <DateTimeFormatter
+ date="2017-03-01T09:36:01+0100"
+ />
+ </td>
+ <td
+ className="text-left text-top"
+ >
+ created_by john.david.dalton@gmail.com
+ </td>
+ </tr>
+ <tr
+ key="0"
+ >
+ <td
+ className="thin text-left text-top nowrap"
>
- <td
- className="thin text-left text-top nowrap"
- >
- <DateTimeFormatter
- date="2017-03-01T09:36:01+0100"
+ <DateTimeFormatter
+ date="2017-03-01T09:36:01+0100"
+ />
+ </td>
+ <td
+ className="text-left text-top"
+ >
+ <p>
+ <Connect(Avatar)
+ className="little-spacer-right"
+ hash="gravatarhash"
+ name="John Doe"
+ size={16}
/>
- </td>
- <td
- className="text-left text-top"
- >
- <p>
- <Connect(Avatar)
- className="little-spacer-right"
- hash="gravatarhash"
- name="John Doe"
- size={16}
- />
- John Doe
- </p>
- <IssueChangelogDiff
- diff={
- Object {
- "key": "severity",
- "newValue": "MINOR",
- "oldValue": "CRITICAL",
- }
+ John Doe
+ </p>
+ <IssueChangelogDiff
+ diff={
+ Object {
+ "key": "severity",
+ "newValue": "MINOR",
+ "oldValue": "CRITICAL",
}
- key="severity"
- />
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </ClickEventBoundary>
+ }
+ key="severity"
+ />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</DropdownOverlay>
`;
<DropdownOverlay
placement="bottom-right"
>
- <ClickEventBoundary>
- <div
- className="menu is-container issue-changelog"
+ <div
+ className="menu is-container issue-changelog"
+ >
+ <table
+ className="spaced"
>
- <table
- className="spaced"
- >
- <tbody>
- <tr>
- <td
- className="thin text-left text-top nowrap"
- >
- <DateTimeFormatter
- date="2017-03-01T09:36:01+0100"
- />
- </td>
- <td
- className="text-left text-top"
- >
- created_by john.david.dalton@gmail.com
- </td>
- </tr>
- <tr
- key="0"
+ <tbody>
+ <tr>
+ <td
+ className="thin text-left text-top nowrap"
+ >
+ <DateTimeFormatter
+ date="2017-03-01T09:36:01+0100"
+ />
+ </td>
+ <td
+ className="text-left text-top"
+ >
+ created_by john.david.dalton@gmail.com
+ </td>
+ </tr>
+ <tr
+ key="0"
+ >
+ <td
+ className="thin text-left text-top nowrap"
>
- <td
- className="thin text-left text-top nowrap"
- >
- <DateTimeFormatter
- date="2017-03-01T09:36:01+0100"
+ <DateTimeFormatter
+ date="2017-03-01T09:36:01+0100"
+ />
+ </td>
+ <td
+ className="text-left text-top"
+ >
+ <p>
+ <Connect(Avatar)
+ className="little-spacer-right"
+ name="john.doe"
+ size={16}
/>
- </td>
- <td
- className="text-left text-top"
- >
- <p>
- <Connect(Avatar)
- className="little-spacer-right"
- name="john.doe"
- size={16}
- />
- user.x_deleted.john.doe
- </p>
- <IssueChangelogDiff
- diff={
- Object {
- "key": "severity",
- "newValue": "MINOR",
- "oldValue": "CRITICAL",
- }
+ user.x_deleted.john.doe
+ </p>
+ <IssueChangelogDiff
+ diff={
+ Object {
+ "key": "severity",
+ "newValue": "MINOR",
+ "oldValue": "CRITICAL",
}
- key="severity"
- />
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- </ClickEventBoundary>
+ }
+ key="severity"
+ />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
</DropdownOverlay>
`;
exports[`should render the comment popup correctly when changing a comment 1`] = `
<DropdownOverlay>
- <ClickEventBoundary>
+ <div
+ className="issue-comment-bubble-popup"
+ >
<div
- className="issue-comment-bubble-popup"
+ className="issue-comment-form-text"
+ >
+ <textarea
+ autoFocus={true}
+ onChange={[Function]}
+ onKeyDown={[Function]}
+ placeholder=""
+ rows={2}
+ value="*test*"
+ />
+ </div>
+ <div
+ className="issue-comment-form-footer"
>
<div
- className="issue-comment-form-text"
+ className="issue-comment-form-actions"
>
- <textarea
- autoFocus={true}
- onChange={[Function]}
- onKeyDown={[Function]}
- placeholder=""
- rows={2}
- value="*test*"
- />
+ <Button
+ className="js-issue-comment-submit little-spacer-right"
+ disabled={false}
+ onClick={[Function]}
+ >
+ save
+ </Button>
+ <ResetButtonLink
+ className="js-issue-comment-cancel"
+ onClick={[Function]}
+ >
+ cancel
+ </ResetButtonLink>
</div>
<div
- className="issue-comment-form-footer"
+ className="issue-comment-form-tips"
>
- <div
- className="issue-comment-form-actions"
- >
- <Button
- className="js-issue-comment-submit little-spacer-right"
- disabled={false}
- onClick={[Function]}
- >
- save
- </Button>
- <ResetButtonLink
- className="js-issue-comment-cancel"
- onClick={[Function]}
- >
- cancel
- </ResetButtonLink>
- </div>
- <div
- className="issue-comment-form-tips"
- >
- <MarkdownTips />
- </div>
+ <MarkdownTips />
</div>
</div>
- </ClickEventBoundary>
+ </div>
</DropdownOverlay>
`;
exports[`should render the comment popup correctly without existing comment 1`] = `
<DropdownOverlay>
- <ClickEventBoundary>
+ <div
+ className="issue-comment-bubble-popup"
+ >
<div
- className="issue-comment-bubble-popup"
+ className="issue-comment-form-text"
+ >
+ <textarea
+ autoFocus={true}
+ onChange={[Function]}
+ onKeyDown={[Function]}
+ placeholder="placeholder test"
+ rows={2}
+ value=""
+ />
+ </div>
+ <div
+ className="issue-comment-form-footer"
>
<div
- className="issue-comment-form-text"
+ className="issue-comment-form-actions"
>
- <textarea
- autoFocus={true}
- onChange={[Function]}
- onKeyDown={[Function]}
- placeholder="placeholder test"
- rows={2}
- value=""
- />
+ <Button
+ className="js-issue-comment-submit little-spacer-right"
+ disabled={true}
+ onClick={[Function]}
+ >
+ issue.comment.submit
+ </Button>
+ <ResetButtonLink
+ className="js-issue-comment-cancel"
+ onClick={[Function]}
+ >
+ cancel
+ </ResetButtonLink>
</div>
<div
- className="issue-comment-form-footer"
+ className="issue-comment-form-tips"
>
- <div
- className="issue-comment-form-actions"
- >
- <Button
- className="js-issue-comment-submit little-spacer-right"
- disabled={true}
- onClick={[Function]}
- >
- issue.comment.submit
- </Button>
- <ResetButtonLink
- className="js-issue-comment-cancel"
- onClick={[Function]}
- >
- cancel
- </ResetButtonLink>
- </div>
- <div
- className="issue-comment-form-tips"
- >
- <MarkdownTips />
- </div>
+ <MarkdownTips />
</div>
</div>
- </ClickEventBoundary>
+ </div>
</DropdownOverlay>
`;
faye-websocket "^0.10.0"
uuid "^3.0.1"
-sonar-ui-common@0.0.25:
- version "0.0.25"
- resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-0.0.25.tgz#c448e83dece5198592f3d6097f570fd9188dcee0"
- integrity sha1-xEjoPezlGYWS89YJf1cP2RiNzuA=
+sonar-ui-common@0.0.30:
+ version "0.0.30"
+ resolved "https://repox.jfrog.io/repox/api/npm/npm/sonar-ui-common/-/sonar-ui-common-0.0.30.tgz#23cf7184b7fdf9711805b176540c6dd304ba669b"
+ integrity sha1-I89xhLf9+XEYBbF2VAxt0wS6Zps=
dependencies:
"@types/react-select" "1.2.6"
classnames "2.2.6"