@atlaskit/smart-card 40.5.0 → 40.5.1
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 +8 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +7 -5
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +7 -5
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +7 -5
- package/package.json +1 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 40.5.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#188198](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/188198)
|
|
8
|
+
[`19d5545b5d8df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/19d5545b5d8df) -
|
|
9
|
+
[ux] EDM-10717 Clean up platform_editor_hyperlink_underline
|
|
10
|
+
|
|
3
11
|
## 40.5.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
11
11
|
var context = exports.context = {
|
|
12
12
|
componentName: 'smart-cards',
|
|
13
13
|
packageName: "@atlaskit/smart-card",
|
|
14
|
-
packageVersion: "40.
|
|
14
|
+
packageVersion: "40.5.0"
|
|
15
15
|
};
|
|
16
16
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
17
17
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -11,7 +11,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
11
11
|
var _reactMagneticDi = require("react-magnetic-di");
|
|
12
12
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
13
13
|
var _link = _interopRequireDefault(require("@atlaskit/link"));
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _click = require("../../utils/analytics/click");
|
|
16
15
|
var _LinkAnalyticsContext = require("../../utils/analytics/LinkAnalyticsContext");
|
|
17
16
|
var _LinkWarningModal = _interopRequireDefault(require("./LinkWarningModal"));
|
|
@@ -20,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
|
|
|
20
19
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
21
20
|
var PACKAGE_DATA = {
|
|
22
21
|
packageName: "@atlaskit/smart-card",
|
|
23
|
-
packageVersion: "40.
|
|
22
|
+
packageVersion: "40.5.0",
|
|
24
23
|
componentName: 'linkUrl'
|
|
25
24
|
};
|
|
26
25
|
var Anchor = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -40,12 +39,15 @@ var LinkUrl = function LinkUrl(_ref) {
|
|
|
40
39
|
isLinkSafe = _useLinkWarningModal.isLinkSafe,
|
|
41
40
|
showSafetyWarningModal = _useLinkWarningModal.showSafetyWarningModal,
|
|
42
41
|
linkWarningModalProps = (0, _objectWithoutProperties2.default)(_useLinkWarningModal, _excluded2);
|
|
43
|
-
var Link = isLinkComponent
|
|
42
|
+
var Link = isLinkComponent ? LinkComponent : Anchor;
|
|
44
43
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_LinkAnalyticsContext.LinkAnalyticsContext, {
|
|
45
44
|
url: href,
|
|
46
45
|
display: "url"
|
|
47
|
-
}, /*#__PURE__*/_react.default.createElement(Link, (0, _extends2.default)({
|
|
48
|
-
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement(Link, (0, _extends2.default)({}, isLinkComponent ? {
|
|
47
|
+
testId: testId
|
|
48
|
+
} : {
|
|
49
|
+
'data-testid': testId
|
|
50
|
+
}, {
|
|
49
51
|
href: href || '',
|
|
50
52
|
onClick: function onClick(e) {
|
|
51
53
|
if (!checkSafety) {
|
|
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
2
2
|
export const context = {
|
|
3
3
|
componentName: 'smart-cards',
|
|
4
4
|
packageName: "@atlaskit/smart-card",
|
|
5
|
-
packageVersion: "40.
|
|
5
|
+
packageVersion: "40.5.0"
|
|
6
6
|
};
|
|
7
7
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
8
8
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -3,14 +3,13 @@ import React from 'react';
|
|
|
3
3
|
import { di } from 'react-magnetic-di';
|
|
4
4
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
5
5
|
import AKLink from '@atlaskit/link';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { withLinkClickedEvent } from '../../utils/analytics/click';
|
|
8
7
|
import { LinkAnalyticsContext } from '../../utils/analytics/LinkAnalyticsContext';
|
|
9
8
|
import LinkWarningModal from './LinkWarningModal';
|
|
10
9
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
11
10
|
const PACKAGE_DATA = {
|
|
12
11
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "40.
|
|
12
|
+
packageVersion: "40.5.0",
|
|
14
13
|
componentName: 'linkUrl'
|
|
15
14
|
};
|
|
16
15
|
const Anchor = withLinkClickedEvent('a');
|
|
@@ -29,12 +28,15 @@ const LinkUrl = ({
|
|
|
29
28
|
showSafetyWarningModal,
|
|
30
29
|
...linkWarningModalProps
|
|
31
30
|
} = useLinkWarningModal();
|
|
32
|
-
const Link = isLinkComponent
|
|
31
|
+
const Link = isLinkComponent ? LinkComponent : Anchor;
|
|
33
32
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkAnalyticsContext, {
|
|
34
33
|
url: href,
|
|
35
34
|
display: "url"
|
|
36
|
-
}, /*#__PURE__*/React.createElement(Link, _extends({
|
|
37
|
-
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Link, _extends({}, isLinkComponent ? {
|
|
36
|
+
testId
|
|
37
|
+
} : {
|
|
38
|
+
'data-testid': testId
|
|
39
|
+
}, {
|
|
38
40
|
href: href || '',
|
|
39
41
|
onClick: e => {
|
|
40
42
|
if (!checkSafety) {
|
|
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export var context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "40.
|
|
7
|
+
packageVersion: "40.5.0"
|
|
8
8
|
};
|
|
9
9
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -6,14 +6,13 @@ import React from 'react';
|
|
|
6
6
|
import { di } from 'react-magnetic-di';
|
|
7
7
|
import { withAnalyticsContext } from '@atlaskit/analytics-next';
|
|
8
8
|
import AKLink from '@atlaskit/link';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { withLinkClickedEvent } from '../../utils/analytics/click';
|
|
11
10
|
import { LinkAnalyticsContext } from '../../utils/analytics/LinkAnalyticsContext';
|
|
12
11
|
import LinkWarningModal from './LinkWarningModal';
|
|
13
12
|
import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
|
|
14
13
|
var PACKAGE_DATA = {
|
|
15
14
|
packageName: "@atlaskit/smart-card",
|
|
16
|
-
packageVersion: "40.
|
|
15
|
+
packageVersion: "40.5.0",
|
|
17
16
|
componentName: 'linkUrl'
|
|
18
17
|
};
|
|
19
18
|
var Anchor = withLinkClickedEvent('a');
|
|
@@ -33,12 +32,15 @@ var LinkUrl = function LinkUrl(_ref) {
|
|
|
33
32
|
isLinkSafe = _useLinkWarningModal.isLinkSafe,
|
|
34
33
|
showSafetyWarningModal = _useLinkWarningModal.showSafetyWarningModal,
|
|
35
34
|
linkWarningModalProps = _objectWithoutProperties(_useLinkWarningModal, _excluded2);
|
|
36
|
-
var Link = isLinkComponent
|
|
35
|
+
var Link = isLinkComponent ? LinkComponent : Anchor;
|
|
37
36
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkAnalyticsContext, {
|
|
38
37
|
url: href,
|
|
39
38
|
display: "url"
|
|
40
|
-
}, /*#__PURE__*/React.createElement(Link, _extends({
|
|
41
|
-
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Link, _extends({}, isLinkComponent ? {
|
|
40
|
+
testId: testId
|
|
41
|
+
} : {
|
|
42
|
+
'data-testid': testId
|
|
43
|
+
}, {
|
|
42
44
|
href: href || '',
|
|
43
45
|
onClick: function onClick(e) {
|
|
44
46
|
if (!checkSafety) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "40.5.
|
|
3
|
+
"version": "40.5.1",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -181,9 +181,6 @@
|
|
|
181
181
|
"platform_bandicoots-smartlink-unresolved-error-key": {
|
|
182
182
|
"type": "boolean"
|
|
183
183
|
},
|
|
184
|
-
"platform_editor_hyperlink_underline": {
|
|
185
|
-
"type": "boolean"
|
|
186
|
-
},
|
|
187
184
|
"platform-smart-card-shift-key": {
|
|
188
185
|
"type": "boolean"
|
|
189
186
|
},
|