@atlaskit/smart-card 18.0.8 → 18.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 18.0.9
4
+
5
+ ### Patch Changes
6
+
7
+ - [`6adaa6b5c18`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6adaa6b5c18) - Updated default renderer onClick to not fire on a Flexible UI link to prevent links from being openned twice
8
+
3
9
  ## 18.0.8
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "18.0.8",
3
+ "version": "18.0.9",
4
4
  "sideEffects": false
5
5
  }
@@ -80,7 +80,11 @@ function CardWithUrlContent(_ref) {
80
80
  analytics.ui.cardClickedEvent(isFlexibleUi ? 'flexible' : appearance, definitionId, extensionKey, isModifierKeyPressed);
81
81
  }
82
82
 
83
- onClick ? onClick(event) : handleClick(event);
83
+ if (onClick) {
84
+ onClick(event);
85
+ } else if (!isFlexibleUi) {
86
+ handleClick(event);
87
+ }
84
88
  }, [state.status, analytics.ui, appearance, definitionId, extensionKey, onClick, handleClick, isFlexibleUi]);
85
89
  var handleAuthorize = (0, _react.useCallback)(function () {
86
90
  return actions.authorize(appearance);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "18.0.8",
3
+ "version": "18.0.9",
4
4
  "sideEffects": false
5
5
  }
@@ -52,7 +52,11 @@ export function CardWithUrlContent({
52
52
  analytics.ui.cardClickedEvent(isFlexibleUi ? 'flexible' : appearance, definitionId, extensionKey, isModifierKeyPressed);
53
53
  }
54
54
 
55
- onClick ? onClick(event) : handleClick(event);
55
+ if (onClick) {
56
+ onClick(event);
57
+ } else if (!isFlexibleUi) {
58
+ handleClick(event);
59
+ }
56
60
  }, [state.status, analytics.ui, appearance, definitionId, extensionKey, onClick, handleClick, isFlexibleUi]);
57
61
  const handleAuthorize = useCallback(() => actions.authorize(appearance), [actions, appearance]);
58
62
  const handleRetry = useCallback(() => {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "18.0.8",
3
+ "version": "18.0.9",
4
4
  "sideEffects": false
5
5
  }
@@ -54,7 +54,11 @@ export function CardWithUrlContent(_ref) {
54
54
  analytics.ui.cardClickedEvent(isFlexibleUi ? 'flexible' : appearance, definitionId, extensionKey, isModifierKeyPressed);
55
55
  }
56
56
 
57
- onClick ? onClick(event) : handleClick(event);
57
+ if (onClick) {
58
+ onClick(event);
59
+ } else if (!isFlexibleUi) {
60
+ handleClick(event);
61
+ }
58
62
  }, [state.status, analytics.ui, appearance, definitionId, extensionKey, onClick, handleClick, isFlexibleUi]);
59
63
  var handleAuthorize = useCallback(function () {
60
64
  return actions.authorize(appearance);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "18.0.8",
3
+ "version": "18.0.9",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"