@atlaskit/smart-card 26.42.2 → 26.42.4
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 +13 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +9 -18
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +9 -18
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +9 -18
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.42.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 26.42.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#43009](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43009) [`df50e1df692`](https://bitbucket.org/atlassian/atlassian-frontend/commits/df50e1df692) - Remove should-call-onclick-in-warning-modal-only-when-safe FF
|
|
14
|
+
- Updated dependencies
|
|
15
|
+
|
|
3
16
|
## 26.42.2
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "26.42.
|
|
25
|
+
packageVersion: "26.42.4"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -13,12 +13,11 @@ var _click = require("../../utils/analytics/click");
|
|
|
13
13
|
var _LinkAnalyticsContext = require("../../utils/analytics/LinkAnalyticsContext");
|
|
14
14
|
var _useLinkWarningModal2 = require("./LinkWarningModal/hooks/use-link-warning-modal");
|
|
15
15
|
var _LinkWarningModal = _interopRequireDefault(require("./LinkWarningModal"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
16
|
var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
18
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
19
18
|
var PACKAGE_DATA = {
|
|
20
19
|
packageName: "@atlaskit/smart-card",
|
|
21
|
-
packageVersion: "26.42.
|
|
20
|
+
packageVersion: "26.42.4",
|
|
22
21
|
componentName: 'linkUrl'
|
|
23
22
|
};
|
|
24
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -42,24 +41,16 @@ var LinkUrl = function LinkUrl(_ref) {
|
|
|
42
41
|
"data-testid": testId,
|
|
43
42
|
href: href,
|
|
44
43
|
onClick: function onClick(e) {
|
|
45
|
-
if (
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
44
|
+
if (!checkSafety) {
|
|
45
|
+
_onClick && _onClick(e);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
_onClick && _onClick(e);
|
|
54
|
-
} else {
|
|
55
|
-
showSafetyWarningModal(e, href);
|
|
56
|
-
}
|
|
57
|
-
} else {
|
|
58
|
-
if (checkSafety && !isLinkSafe(e, href)) {
|
|
59
|
-
showSafetyWarningModal(e, href);
|
|
60
|
-
}
|
|
61
|
-
// Call the onClick regardless of the link safety
|
|
49
|
+
// Only call the onClick if the link is safe
|
|
50
|
+
if (isLinkSafe(e, href)) {
|
|
62
51
|
_onClick && _onClick(e);
|
|
52
|
+
} else {
|
|
53
|
+
showSafetyWarningModal(e, href);
|
|
63
54
|
}
|
|
64
55
|
}
|
|
65
56
|
}, props), children)), checkSafety && /*#__PURE__*/_react.default.createElement(_LinkWarningModal.default, linkWarningModalProps));
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.42.
|
|
7
|
+
packageVersion: "26.42.4"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -5,10 +5,9 @@ import { withLinkClickedEvent } from '../../utils/analytics/click';
|
|
|
5
5
|
import { LinkAnalyticsContext } from '../../utils/analytics/LinkAnalyticsContext';
|
|
6
6
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
const PACKAGE_DATA = {
|
|
10
9
|
packageName: "@atlaskit/smart-card",
|
|
11
|
-
packageVersion: "26.42.
|
|
10
|
+
packageVersion: "26.42.4",
|
|
12
11
|
componentName: 'linkUrl'
|
|
13
12
|
};
|
|
14
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -32,24 +31,16 @@ const LinkUrl = ({
|
|
|
32
31
|
"data-testid": testId,
|
|
33
32
|
href: href,
|
|
34
33
|
onClick: e => {
|
|
35
|
-
if (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
34
|
+
if (!checkSafety) {
|
|
35
|
+
onClick && onClick(e);
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
40
38
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
onClick && onClick(e);
|
|
44
|
-
} else {
|
|
45
|
-
showSafetyWarningModal(e, href);
|
|
46
|
-
}
|
|
47
|
-
} else {
|
|
48
|
-
if (checkSafety && !isLinkSafe(e, href)) {
|
|
49
|
-
showSafetyWarningModal(e, href);
|
|
50
|
-
}
|
|
51
|
-
// Call the onClick regardless of the link safety
|
|
39
|
+
// Only call the onClick if the link is safe
|
|
40
|
+
if (isLinkSafe(e, href)) {
|
|
52
41
|
onClick && onClick(e);
|
|
42
|
+
} else {
|
|
43
|
+
showSafetyWarningModal(e, href);
|
|
53
44
|
}
|
|
54
45
|
}
|
|
55
46
|
}, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps));
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.42.
|
|
18
|
+
packageVersion: "26.42.4"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -8,10 +8,9 @@ import { withLinkClickedEvent } from '../../utils/analytics/click';
|
|
|
8
8
|
import { LinkAnalyticsContext } from '../../utils/analytics/LinkAnalyticsContext';
|
|
9
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
|
-
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
var PACKAGE_DATA = {
|
|
13
12
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "26.42.
|
|
13
|
+
packageVersion: "26.42.4",
|
|
15
14
|
componentName: 'linkUrl'
|
|
16
15
|
};
|
|
17
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -35,24 +34,16 @@ var LinkUrl = function LinkUrl(_ref) {
|
|
|
35
34
|
"data-testid": testId,
|
|
36
35
|
href: href,
|
|
37
36
|
onClick: function onClick(e) {
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
37
|
+
if (!checkSafety) {
|
|
38
|
+
_onClick && _onClick(e);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
_onClick && _onClick(e);
|
|
47
|
-
} else {
|
|
48
|
-
showSafetyWarningModal(e, href);
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
51
|
-
if (checkSafety && !isLinkSafe(e, href)) {
|
|
52
|
-
showSafetyWarningModal(e, href);
|
|
53
|
-
}
|
|
54
|
-
// Call the onClick regardless of the link safety
|
|
42
|
+
// Only call the onClick if the link is safe
|
|
43
|
+
if (isLinkSafe(e, href)) {
|
|
55
44
|
_onClick && _onClick(e);
|
|
45
|
+
} else {
|
|
46
|
+
showSafetyWarningModal(e, href);
|
|
56
47
|
}
|
|
57
48
|
}
|
|
58
49
|
}, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.42.
|
|
3
|
+
"version": "26.42.4",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"@atlaskit/avatar": "^21.4.0",
|
|
28
28
|
"@atlaskit/avatar-group": "^9.4.0",
|
|
29
29
|
"@atlaskit/badge": "^15.1.0",
|
|
30
|
-
"@atlaskit/button": "^16.
|
|
30
|
+
"@atlaskit/button": "^16.16.0",
|
|
31
31
|
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
32
32
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
33
33
|
"@atlaskit/icon": "^21.12.0",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"@atlaskit/link-analytics": "^8.3.0",
|
|
39
39
|
"@atlaskit/link-client-extension": "^1.8.0",
|
|
40
40
|
"@atlaskit/link-extractors": "^1.2.0",
|
|
41
|
-
"@atlaskit/linking-common": "^4.
|
|
42
|
-
"@atlaskit/linking-types": "^8.
|
|
41
|
+
"@atlaskit/linking-common": "^4.18.0",
|
|
42
|
+
"@atlaskit/linking-types": "^8.5.0",
|
|
43
43
|
"@atlaskit/logo": "^13.14.0",
|
|
44
44
|
"@atlaskit/lozenge": "^11.4.0",
|
|
45
45
|
"@atlaskit/modal-dialog": "^12.8.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@atlaskit/spinner": "^15.6.0",
|
|
51
51
|
"@atlaskit/theme": "^12.6.0",
|
|
52
52
|
"@atlaskit/tokens": "^1.28.0",
|
|
53
|
-
"@atlaskit/tooltip": "^
|
|
53
|
+
"@atlaskit/tooltip": "^18.0.0",
|
|
54
54
|
"@atlaskit/ufo": "^0.2.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|
|
56
56
|
"@emotion/react": "^11.7.1",
|
|
@@ -141,9 +141,6 @@
|
|
|
141
141
|
"platform.linking-platform.smart-card.follow-button": {
|
|
142
142
|
"type": "boolean"
|
|
143
143
|
},
|
|
144
|
-
"platform.linking-platform.smart-card.should-call-onclick-in-warning-modal-only-when-safe": {
|
|
145
|
-
"type": "boolean"
|
|
146
|
-
},
|
|
147
144
|
"platform.linking-platform.smart-card.show-smart-links-refreshed-design": {
|
|
148
145
|
"type": "boolean"
|
|
149
146
|
},
|