@atlaskit/smart-card 38.13.1 → 38.13.2

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,14 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 38.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#174646](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/174646)
8
+ [`90061d11aac8b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/90061d11aac8b) -
9
+ EDM-12573 cleaning up platform-linking-fix-a11y-in-smart-card
10
+ - Updated dependencies
11
+
3
12
  ## 38.13.1
4
13
 
5
14
  ### Patch 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: "38.13.0"
14
+ packageVersion: "38.13.1"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -12,7 +12,6 @@ var React = _interopRequireWildcard(require("react"));
12
12
  var _runtime = require("@compiled/react/runtime");
13
13
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
14
14
  var _reactMagneticDi = require("react-magnetic-di");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _utils = require("../../../../utils");
17
16
  var _IFrame = require("../../../EmbedCard/components/IFrame");
18
17
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
@@ -31,9 +30,9 @@ var EmbedContent = function EmbedContent(_ref) {
31
30
  src: src,
32
31
  'data-testid': "".concat(testId, "-embed")
33
32
  };
34
- return /*#__PURE__*/React.createElement(_IFrame.IFrame, (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform-linking-fix-a11y-in-smart-card') ? {
35
- 'aria-label': ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "".concat(testId, "-embed")
36
- } : {}, props, {
33
+ return /*#__PURE__*/React.createElement(_IFrame.IFrame, (0, _extends2.default)({
34
+ "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "".concat(testId, "-embed")
35
+ }, props, {
37
36
  className: (0, _runtime.ax)(["_1bsb1osq _4t3i815d"])
38
37
  }));
39
38
  };
@@ -10,7 +10,6 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
10
10
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
11
11
  var _react = _interopRequireWildcard(require("react"));
12
12
  var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
13
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
14
13
  var _tokens = require("@atlaskit/tokens");
15
14
  var _constants = require("../../constants");
16
15
  var _useInvokeClientAction = _interopRequireDefault(require("../../state/hooks/use-invoke-client-action"));
@@ -102,16 +101,15 @@ var EmbedModal = function EmbedModal(_ref) {
102
101
  if (previewUrl && isSupportTheming) {
103
102
  previewUrl = (0, _utils.getPreviewUrlWithTheme)(previewUrl, themeState);
104
103
  }
105
- return /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default, (0, _extends2.default)({
104
+ return /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTransition, null, isOpen && /*#__PURE__*/_react.default.createElement(_modalDialog.default, {
106
105
  height: "100%",
107
106
  onClose: handleOnClose,
108
107
  onCloseComplete: handleOnCloseComplete,
109
108
  onOpenComplete: handleOnOpenComplete,
110
109
  testId: testId,
111
- width: width
112
- }, (0, _platformFeatureFlags.fg)('platform-linking-fix-a11y-in-smart-card') ? {
110
+ width: width,
113
111
  label: title
114
- } : {}), /*#__PURE__*/_react.default.createElement(_linkInfo.default, {
112
+ }, /*#__PURE__*/_react.default.createElement(_linkInfo.default, {
115
113
  icon: linkIcon && {
116
114
  icon: /*#__PURE__*/_react.default.createElement(_common.BaseIconElement, (0, _extends2.default)({}, linkIcon, {
117
115
  size: _constants.SmartLinkSize.Large
@@ -9,20 +9,12 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _link = _interopRequireDefault(require("@atlaskit/link"));
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _constants = require("../../../../../constants");
14
13
  var _excluded = ["children"];
15
14
  var AILearnMoreAnchor = function AILearnMoreAnchor(_ref) {
16
15
  var children = _ref.children,
17
16
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
18
- return (0, _platformFeatureFlags.fg)('platform-linking-fix-a11y-in-smart-card') ? /*#__PURE__*/_react.default.createElement(_link.default, (0, _extends2.default)({
19
- href: _constants.CONTENT_URL_AI,
20
- target: "_blank",
21
- rel: "noopener noreferrer"
22
- }, props), children) :
23
- /*#__PURE__*/
24
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
25
- _react.default.createElement("a", (0, _extends2.default)({
17
+ return /*#__PURE__*/_react.default.createElement(_link.default, (0, _extends2.default)({
26
18
  href: _constants.CONTENT_URL_AI,
27
19
  target: "_blank",
28
20
  rel: "noopener noreferrer"
@@ -15,7 +15,6 @@ var _reactIntlNext = require("react-intl-next");
15
15
  var _standardButton = _interopRequireDefault(require("@atlaskit/button/standard-button"));
16
16
  var _link = _interopRequireDefault(require("@atlaskit/link"));
17
17
  var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
18
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
18
  var _messages = require("../../../messages");
20
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
21
20
  var breakWordsCss = null;
@@ -37,14 +36,7 @@ var WarningModal = function WarningModal(props) {
37
36
  values: {
38
37
  unsafeLinkText: unsafeLinkText,
39
38
  a: function a() {
40
- return (0, _platformFeatureFlags.fg)('platform-linking-fix-a11y-in-smart-card') ? /*#__PURE__*/React.createElement(_link.default, {
41
- href: url,
42
- target: "_blank",
43
- rel: "noopener noreferrer"
44
- }, url) :
45
- /*#__PURE__*/
46
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
47
- React.createElement("a", {
39
+ return /*#__PURE__*/React.createElement(_link.default, {
48
40
  href: url,
49
41
  target: "_blank",
50
42
  rel: "noopener noreferrer"
@@ -20,7 +20,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
20
20
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
21
21
  var PACKAGE_DATA = {
22
22
  packageName: "@atlaskit/smart-card",
23
- packageVersion: "38.13.0",
23
+ packageVersion: "38.13.1",
24
24
  componentName: 'linkUrl'
25
25
  };
26
26
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -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: "38.13.0"
5
+ packageVersion: "38.13.1"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -4,7 +4,6 @@ import "./index.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { di } from 'react-magnetic-di';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { getIframeSandboxAttribute } from '../../../../utils';
9
8
  import { IFrame } from '../../../EmbedCard/components/IFrame';
10
9
  const iframeCss = null;
@@ -23,9 +22,9 @@ const EmbedContent = ({
23
22
  src,
24
23
  'data-testid': `${testId}-embed`
25
24
  };
26
- return /*#__PURE__*/React.createElement(IFrame, _extends({}, fg('platform-linking-fix-a11y-in-smart-card') ? {
27
- 'aria-label': ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : `${testId}-embed`
28
- } : {}, props, {
25
+ return /*#__PURE__*/React.createElement(IFrame, _extends({
26
+ "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : `${testId}-embed`
27
+ }, props, {
29
28
  className: ax(["_1bsb1osq _4t3i815d"])
30
29
  }));
31
30
  };
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useRef, useState } from 'react';
3
3
  import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { useThemeObserver } from '@atlaskit/tokens';
6
5
  import { SmartLinkSize } from '../../constants';
7
6
  import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
@@ -78,16 +77,15 @@ const EmbedModal = ({
78
77
  if (previewUrl && isSupportTheming) {
79
78
  previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
80
79
  }
81
- return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, _extends({
80
+ return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, {
82
81
  height: "100%",
83
82
  onClose: handleOnClose,
84
83
  onCloseComplete: handleOnCloseComplete,
85
84
  onOpenComplete: handleOnOpenComplete,
86
85
  testId: testId,
87
- width: width
88
- }, fg('platform-linking-fix-a11y-in-smart-card') ? {
86
+ width: width,
89
87
  label: title
90
- } : {}), /*#__PURE__*/React.createElement(LinkInfo, {
88
+ }, /*#__PURE__*/React.createElement(LinkInfo, {
91
89
  icon: linkIcon && {
92
90
  icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
93
91
  size: SmartLinkSize.Large
@@ -1,19 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React from 'react';
3
3
  import Link from '@atlaskit/link';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { CONTENT_URL_AI } from '../../../../../constants';
6
5
  const AILearnMoreAnchor = ({
7
6
  children,
8
7
  ...props
9
- }) => fg('platform-linking-fix-a11y-in-smart-card') ? /*#__PURE__*/React.createElement(Link, _extends({
10
- href: CONTENT_URL_AI,
11
- target: "_blank",
12
- rel: "noopener noreferrer"
13
- }, props), children) :
14
- /*#__PURE__*/
15
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
16
- React.createElement("a", _extends({
8
+ }) => /*#__PURE__*/React.createElement(Link, _extends({
17
9
  href: CONTENT_URL_AI,
18
10
  target: "_blank",
19
11
  rel: "noopener noreferrer"
@@ -7,7 +7,6 @@ import { FormattedMessage, injectIntl, IntlProvider } from 'react-intl-next';
7
7
  import Button from '@atlaskit/button/standard-button';
8
8
  import Link from '@atlaskit/link';
9
9
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { messages } from '../../../messages';
12
11
  const breakWordsCss = null;
13
12
  const WarningModal = props => {
@@ -29,14 +28,7 @@ const WarningModal = props => {
29
28
  }, url && unsafeLinkText && /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.link_safety_warning_message, {
30
29
  values: {
31
30
  unsafeLinkText: unsafeLinkText,
32
- a: () => fg('platform-linking-fix-a11y-in-smart-card') ? /*#__PURE__*/React.createElement(Link, {
33
- href: url,
34
- target: "_blank",
35
- rel: "noopener noreferrer"
36
- }, url) :
37
- /*#__PURE__*/
38
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
39
- React.createElement("a", {
31
+ a: () => /*#__PURE__*/React.createElement(Link, {
40
32
  href: url,
41
33
  target: "_blank",
42
34
  rel: "noopener noreferrer"
@@ -10,7 +10,7 @@ import LinkWarningModal from './LinkWarningModal';
10
10
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
11
11
  const PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "38.13.0",
13
+ packageVersion: "38.13.1",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  const Anchor = withLinkClickedEvent('a');
@@ -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: "38.13.0"
7
+ packageVersion: "38.13.1"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -4,7 +4,6 @@ import "./index.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { di } from 'react-magnetic-di';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { getIframeSandboxAttribute } from '../../../../utils';
9
8
  import { IFrame } from '../../../EmbedCard/components/IFrame';
10
9
  var iframeCss = null;
@@ -22,9 +21,9 @@ var EmbedContent = function EmbedContent(_ref) {
22
21
  src: src,
23
22
  'data-testid': "".concat(testId, "-embed")
24
23
  };
25
- return /*#__PURE__*/React.createElement(IFrame, _extends({}, fg('platform-linking-fix-a11y-in-smart-card') ? {
26
- 'aria-label': ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "".concat(testId, "-embed")
27
- } : {}, props, {
24
+ return /*#__PURE__*/React.createElement(IFrame, _extends({
25
+ "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : "".concat(testId, "-embed")
26
+ }, props, {
28
27
  className: ax(["_1bsb1osq _4t3i815d"])
29
28
  }));
30
29
  };
@@ -2,7 +2,6 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import React, { useCallback, useRef, useState } from 'react';
4
4
  import ModalDialog, { ModalBody, ModalTransition } from '@atlaskit/modal-dialog';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { useThemeObserver } from '@atlaskit/tokens';
7
6
  import { SmartLinkSize } from '../../constants';
8
7
  import useInvokeClientAction from '../../state/hooks/use-invoke-client-action';
@@ -93,16 +92,15 @@ var EmbedModal = function EmbedModal(_ref) {
93
92
  if (previewUrl && isSupportTheming) {
94
93
  previewUrl = getPreviewUrlWithTheme(previewUrl, themeState);
95
94
  }
96
- return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, _extends({
95
+ return /*#__PURE__*/React.createElement(ModalTransition, null, isOpen && /*#__PURE__*/React.createElement(ModalDialog, {
97
96
  height: "100%",
98
97
  onClose: handleOnClose,
99
98
  onCloseComplete: handleOnCloseComplete,
100
99
  onOpenComplete: handleOnOpenComplete,
101
100
  testId: testId,
102
- width: width
103
- }, fg('platform-linking-fix-a11y-in-smart-card') ? {
101
+ width: width,
104
102
  label: title
105
- } : {}), /*#__PURE__*/React.createElement(LinkInfo, {
103
+ }, /*#__PURE__*/React.createElement(LinkInfo, {
106
104
  icon: linkIcon && {
107
105
  icon: /*#__PURE__*/React.createElement(BaseIconElement, _extends({}, linkIcon, {
108
106
  size: SmartLinkSize.Large
@@ -3,19 +3,11 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  var _excluded = ["children"];
4
4
  import React from 'react';
5
5
  import Link from '@atlaskit/link';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import { CONTENT_URL_AI } from '../../../../../constants';
8
7
  var AILearnMoreAnchor = function AILearnMoreAnchor(_ref) {
9
8
  var children = _ref.children,
10
9
  props = _objectWithoutProperties(_ref, _excluded);
11
- return fg('platform-linking-fix-a11y-in-smart-card') ? /*#__PURE__*/React.createElement(Link, _extends({
12
- href: CONTENT_URL_AI,
13
- target: "_blank",
14
- rel: "noopener noreferrer"
15
- }, props), children) :
16
- /*#__PURE__*/
17
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
18
- React.createElement("a", _extends({
10
+ return /*#__PURE__*/React.createElement(Link, _extends({
19
11
  href: CONTENT_URL_AI,
20
12
  target: "_blank",
21
13
  rel: "noopener noreferrer"
@@ -7,7 +7,6 @@ import { FormattedMessage, injectIntl, IntlProvider } from 'react-intl-next';
7
7
  import Button from '@atlaskit/button/standard-button';
8
8
  import Link from '@atlaskit/link';
9
9
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { messages } from '../../../messages';
12
11
  var breakWordsCss = null;
13
12
  var WarningModal = function WarningModal(props) {
@@ -28,14 +27,7 @@ var WarningModal = function WarningModal(props) {
28
27
  values: {
29
28
  unsafeLinkText: unsafeLinkText,
30
29
  a: function a() {
31
- return fg('platform-linking-fix-a11y-in-smart-card') ? /*#__PURE__*/React.createElement(Link, {
32
- href: url,
33
- target: "_blank",
34
- rel: "noopener noreferrer"
35
- }, url) :
36
- /*#__PURE__*/
37
- // eslint-disable-next-line @atlaskit/design-system/no-html-anchor
38
- React.createElement("a", {
30
+ return /*#__PURE__*/React.createElement(Link, {
39
31
  href: url,
40
32
  target: "_blank",
41
33
  rel: "noopener noreferrer"
@@ -13,7 +13,7 @@ import LinkWarningModal from './LinkWarningModal';
13
13
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
14
  var PACKAGE_DATA = {
15
15
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "38.13.0",
16
+ packageVersion: "38.13.1",
17
17
  componentName: 'linkUrl'
18
18
  };
19
19
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "38.13.1",
3
+ "version": "38.13.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,7 +39,7 @@
39
39
  "@atlaskit/form": "^12.0.0",
40
40
  "@atlaskit/frontend-utilities": "^3.0.0",
41
41
  "@atlaskit/heading": "^5.2.0",
42
- "@atlaskit/icon": "^27.0.0",
42
+ "@atlaskit/icon": "^27.1.0",
43
43
  "@atlaskit/icon-file-type": "^7.0.0",
44
44
  "@atlaskit/icon-lab": "^5.0.0",
45
45
  "@atlaskit/icon-object": "^7.1.0",
@@ -234,9 +234,6 @@
234
234
  "platform-linking-additional-flexible-element-props": {
235
235
  "type": "boolean"
236
236
  },
237
- "platform-linking-fix-a11y-in-smart-card": {
238
- "type": "boolean"
239
- },
240
237
  "platform-linking-flexible-card-context": {
241
238
  "type": "boolean"
242
239
  },