@atlaskit/smart-card 43.1.3 → 43.1.5

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.
Files changed (23) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.js +1 -2
  4. package/dist/cjs/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -2
  5. package/dist/cjs/view/LinkUrl/HyperlinkResolver/index.js +21 -1
  6. package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +1 -2
  7. package/dist/cjs/view/LinkUrl/index.js +1 -1
  8. package/dist/cjs/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +1 -2
  9. package/dist/es2019/utils/analytics/analytics.js +1 -1
  10. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.js +1 -2
  11. package/dist/es2019/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -2
  12. package/dist/es2019/view/LinkUrl/HyperlinkResolver/index.js +21 -1
  13. package/dist/es2019/view/LinkUrl/LinkWarningModal/index.js +1 -2
  14. package/dist/es2019/view/LinkUrl/index.js +1 -1
  15. package/dist/es2019/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +1 -2
  16. package/dist/esm/utils/analytics/analytics.js +1 -1
  17. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-container/manual-triggers-form/main.js +1 -2
  18. package/dist/esm/view/FlexibleCard/components/actions/automation-action/automation-manual-triggers/manual-triggers-modal/sub-components/header/main.js +1 -2
  19. package/dist/esm/view/LinkUrl/HyperlinkResolver/index.js +21 -1
  20. package/dist/esm/view/LinkUrl/LinkWarningModal/index.js +1 -2
  21. package/dist/esm/view/LinkUrl/index.js +1 -1
  22. package/dist/esm/view/RelatedLinksModal/components/RelatedLinksBaseModal.js +1 -2
  23. package/package.json +3 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`4f3b60691a4d6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4f3b60691a4d6) -
8
+ NAVX-1976 cleaning up navx-1483-a11y-close-button-in-modal-updates
9
+
10
+ ## 43.1.4
11
+
12
+ ### Patch Changes
13
+
14
+ - [`b692539d43044`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b692539d43044) -
15
+ [ux] Adjust hyperlink connect button logic to not show if the url is embedded in text
16
+ - Updated dependencies
17
+
3
18
  ## 43.1.3
4
19
 
5
20
  ### 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: "43.1.2"
14
+ packageVersion: "43.1.4"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -12,7 +12,6 @@ var _reactMagneticDi = require("react-magnetic-di");
12
12
  var _new = _interopRequireDefault(require("@atlaskit/button/new"));
13
13
  var _form = _interopRequireWildcard(require("@atlaskit/form"));
14
14
  var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _messages = _interopRequireDefault(require("../common/messages"));
17
16
  var _types = require("../common/types");
18
17
  var _main = _interopRequireDefault(require("./boolean-prompt/main"));
@@ -122,7 +121,7 @@ var UserInputForm = function UserInputForm(props) {
122
121
  var formProps = _ref4.formProps,
123
122
  submitting = _ref4.submitting;
124
123
  return /*#__PURE__*/_react.default.createElement("form", formProps, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalHeader, {
125
- hasCloseButton: (0, _platformFeatureFlags.fg)('navx-1483-a11y-close-button-in-modal-updates')
124
+ hasCloseButton: true
126
125
  }, /*#__PURE__*/_react.default.createElement(_modalDialog.ModalTitle, null, rule.name)), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalBody, null, _messages.default.inputRequiredForAction.defaultMessage, /*#__PURE__*/_react.default.createElement(_form.FormSection, null, userInputPrompts.map(generateUserInputForm))), /*#__PURE__*/_react.default.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/_react.default.createElement(_new.default, {
127
126
  appearance: "subtle",
128
127
  onClick: handleClose,
@@ -14,7 +14,6 @@ var _reactIntlNext = require("react-intl-next");
14
14
  var _heading = _interopRequireDefault(require("@atlaskit/heading"));
15
15
  var _manualTriggerIcon = _interopRequireDefault(require("@atlaskit/legacy-custom-icons/manual-trigger-icon"));
16
16
  var _modalDialog = require("@atlaskit/modal-dialog");
17
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
18
17
  var _compiled = require("@atlaskit/primitives/compiled");
19
18
  var _colors = require("@atlaskit/theme/colors");
20
19
  var _menuContext = require("../../menu-context");
@@ -42,7 +41,7 @@ var AutomationModalHeader = exports.AutomationModalHeader = function AutomationM
42
41
  titleId = _useModal.titleId;
43
42
  var showDescription = initialised && rules.length > 0 && !!modalDescription;
44
43
  return /*#__PURE__*/React.createElement(_modalDialog.ModalHeader, {
45
- hasCloseButton: (0, _platformFeatureFlags.fg)('navx-1483-a11y-close-button-in-modal-updates')
44
+ hasCloseButton: true
46
45
  }, /*#__PURE__*/React.createElement(_compiled.Stack, null, /*#__PURE__*/React.createElement(_compiled.Inline, {
47
46
  alignBlock: "center"
48
47
  }, /*#__PURE__*/React.createElement(_compiled.Box, {
@@ -58,7 +58,27 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
58
58
  var onAuthorize = (0, _react.useCallback)(function () {
59
59
  return actions.authorize('hyperlink');
60
60
  }, [actions]);
61
- if ((state === null || state === void 0 ? void 0 : state.status) === 'unauthorized' && (_featureGateJsClient.default.getExperimentValue('platform_linking_bluelink_connect_confluence', 'isEnabled', false) || _featureGateJsClient.default.getExperimentValue('platform_linking_bluelink_connect_jira', 'isEnabled', false))) {
61
+ var shouldRenderConnectBtn = function shouldRenderConnectBtn() {
62
+ if (!props.children || !Array.isArray(props.children) || props.children.length === 0) {
63
+ return false;
64
+ }
65
+ var firstChild = props.children[0];
66
+ try {
67
+ var _firstChild$props;
68
+ // Check if first child has a string matching href
69
+ if (typeof firstChild === 'string') {
70
+ return props.href === firstChild;
71
+ }
72
+
73
+ // Check if first child has another child object containing matching href. This aligns with the behavior of the TextWrapper component used by editor to render link nodes
74
+ if (firstChild !== null && firstChild !== void 0 && (_firstChild$props = firstChild.props) !== null && _firstChild$props !== void 0 && _firstChild$props.children && typeof firstChild.props.children === 'string') {
75
+ return props.href === firstChild.props.children;
76
+ }
77
+ } catch (_) {
78
+ return false;
79
+ }
80
+ };
81
+ if ((state === null || state === void 0 ? void 0 : state.status) === 'unauthorized' && shouldRenderConnectBtn() && (_featureGateJsClient.default.getExperimentValue('platform_linking_bluelink_connect_confluence', 'isEnabled', false) || _featureGateJsClient.default.getExperimentValue('platform_linking_bluelink_connect_jira', 'isEnabled', false))) {
62
82
  var provider = (0, _linkExtractors.extractSmartLinkProvider)(state === null || state === void 0 ? void 0 : state.details);
63
83
  return /*#__PURE__*/_react.default.createElement(_unauthorizeView.default, (0, _extends2.default)({}, props, {
64
84
  onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
@@ -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;
@@ -30,7 +29,7 @@ var WarningModal = function WarningModal(props) {
30
29
  onClose: onClose,
31
30
  testId: "link-with-safety-warning"
32
31
  }, /*#__PURE__*/React.createElement(_modalDialog.ModalHeader, {
33
- hasCloseButton: (0, _platformFeatureFlags.fg)('navx-1483-a11y-close-button-in-modal-updates')
32
+ hasCloseButton: true
34
33
  }, /*#__PURE__*/React.createElement(_modalDialog.ModalTitle, {
35
34
  appearance: "warning"
36
35
  }, /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, _messages.messages.check_this_link))), /*#__PURE__*/React.createElement(_modalDialog.ModalBody, null, /*#__PURE__*/React.createElement("div", {
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
22
22
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
23
23
  var PACKAGE_DATA = {
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "43.1.2",
25
+ packageVersion: "43.1.4",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -13,7 +13,6 @@ var _runtime = require("@compiled/react/runtime");
13
13
  var _reactIntlNext = require("react-intl-next");
14
14
  var _new = _interopRequireDefault(require("@atlaskit/button/new"));
15
15
  var _modalDialog = _interopRequireWildcard(require("@atlaskit/modal-dialog"));
16
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
16
  var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
18
17
  var _messages = require("../../../messages");
19
18
  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); }
@@ -45,7 +44,7 @@ var RelatedLinksBaseModal = function RelatedLinksBaseModal(_ref) {
45
44
  onOpenComplete: openCompleteHandler,
46
45
  height: '504px'
47
46
  }, /*#__PURE__*/React.createElement(_modalDialog.ModalHeader, {
48
- hasCloseButton: (0, _platformFeatureFlags.fg)('navx-1483-a11y-close-button-in-modal-updates')
47
+ hasCloseButton: true
49
48
  }, /*#__PURE__*/React.createElement(_modalDialog.ModalTitle, null, /*#__PURE__*/React.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_modal_title))), /*#__PURE__*/React.createElement(_modalDialog.ModalBody, null, children), /*#__PURE__*/React.createElement(_modalDialog.ModalFooter, null, /*#__PURE__*/React.createElement(_new.default, {
50
49
  appearance: "primary",
51
50
  onClick: closeHandler
@@ -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: "43.1.2"
5
+ packageVersion: "43.1.4"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -3,7 +3,6 @@ import { di } from 'react-magnetic-di';
3
3
  import Button from '@atlaskit/button/new';
4
4
  import Form, { ErrorMessage, FormSection } from '@atlaskit/form';
5
5
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
6
- import { fg } from '@atlaskit/platform-feature-flags';
7
6
  import messages from '../common/messages';
8
7
  import { UserInputType } from '../common/types';
9
8
  import BooleanInputPrompt from './boolean-prompt/main';
@@ -114,7 +113,7 @@ const UserInputForm = props => {
114
113
  formProps,
115
114
  submitting
116
115
  }) => /*#__PURE__*/React.createElement("form", formProps, /*#__PURE__*/React.createElement(ModalHeader, {
117
- hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
116
+ hasCloseButton: true
118
117
  }, /*#__PURE__*/React.createElement(ModalTitle, null, rule.name)), /*#__PURE__*/React.createElement(ModalBody, null, messages.inputRequiredForAction.defaultMessage, /*#__PURE__*/React.createElement(FormSection, null, userInputPrompts.map(generateUserInputForm))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
119
118
  appearance: "subtle",
120
119
  onClick: handleClose,
@@ -6,7 +6,6 @@ import { defineMessages, useIntl } from 'react-intl-next';
6
6
  import Heading from '@atlaskit/heading';
7
7
  import LegacyManualTriggerIcon from '@atlaskit/legacy-custom-icons/manual-trigger-icon';
8
8
  import { ModalHeader, useModal } from '@atlaskit/modal-dialog';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { Box, Inline, Stack } from '@atlaskit/primitives/compiled';
11
10
  import { G50 } from '@atlaskit/theme/colors';
12
11
  import { useAutomationMenu } from '../../menu-context';
@@ -37,7 +36,7 @@ export const AutomationModalHeader = ({
37
36
  } = useModal();
38
37
  const showDescription = initialised && rules.length > 0 && !!modalDescription;
39
38
  return /*#__PURE__*/React.createElement(ModalHeader, {
40
- hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
39
+ hasCloseButton: true
41
40
  }, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Inline, {
42
41
  alignBlock: "center"
43
42
  }, /*#__PURE__*/React.createElement(Box, {
@@ -43,7 +43,27 @@ const HyperlinkWithSmartLinkResolverInner = ({
43
43
  onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback(e);
44
44
  }, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
45
45
  const onAuthorize = useCallback(() => actions.authorize('hyperlink'), [actions]);
46
- if ((state === null || state === void 0 ? void 0 : state.status) === 'unauthorized' && (FeatureGates.getExperimentValue('platform_linking_bluelink_connect_confluence', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_linking_bluelink_connect_jira', 'isEnabled', false))) {
46
+ const shouldRenderConnectBtn = () => {
47
+ if (!props.children || !Array.isArray(props.children) || props.children.length === 0) {
48
+ return false;
49
+ }
50
+ const firstChild = props.children[0];
51
+ try {
52
+ var _firstChild$props;
53
+ // Check if first child has a string matching href
54
+ if (typeof firstChild === 'string') {
55
+ return props.href === firstChild;
56
+ }
57
+
58
+ // Check if first child has another child object containing matching href. This aligns with the behavior of the TextWrapper component used by editor to render link nodes
59
+ if (firstChild !== null && firstChild !== void 0 && (_firstChild$props = firstChild.props) !== null && _firstChild$props !== void 0 && _firstChild$props.children && typeof firstChild.props.children === 'string') {
60
+ return props.href === firstChild.props.children;
61
+ }
62
+ } catch (_) {
63
+ return false;
64
+ }
65
+ };
66
+ if ((state === null || state === void 0 ? void 0 : state.status) === 'unauthorized' && shouldRenderConnectBtn() && (FeatureGates.getExperimentValue('platform_linking_bluelink_connect_confluence', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_linking_bluelink_connect_jira', 'isEnabled', false))) {
47
67
  const provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
48
68
  return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
49
69
  onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
@@ -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 => {
@@ -23,7 +22,7 @@ const WarningModal = props => {
23
22
  onClose: onClose,
24
23
  testId: "link-with-safety-warning"
25
24
  }, /*#__PURE__*/React.createElement(ModalHeader, {
26
- hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
25
+ hasCloseButton: true
27
26
  }, /*#__PURE__*/React.createElement(ModalTitle, {
28
27
  appearance: "warning"
29
28
  }, /*#__PURE__*/React.createElement(FormattedMessage, messages.check_this_link))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement("div", {
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  const PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "43.1.2",
15
+ packageVersion: "43.1.4",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  const Anchor = withLinkClickedEvent('a');
@@ -5,7 +5,6 @@ import { useCallback, useRef } from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import Button from '@atlaskit/button/new';
7
7
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
10
9
  import { messages } from '../../../messages';
11
10
  const fixedWidth = 'small'; // pre-defined 400px by Atlaskit
@@ -38,7 +37,7 @@ const RelatedLinksBaseModal = ({
38
37
  onOpenComplete: openCompleteHandler,
39
38
  height: '504px'
40
39
  }, /*#__PURE__*/React.createElement(ModalHeader, {
41
- hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
40
+ hasCloseButton: true
42
41
  }, /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_title))), /*#__PURE__*/React.createElement(ModalBody, null, children), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
43
42
  appearance: "primary",
44
43
  onClick: closeHandler
@@ -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: "43.1.2"
7
+ packageVersion: "43.1.4"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -4,7 +4,6 @@ import { di } from 'react-magnetic-di';
4
4
  import Button from '@atlaskit/button/new';
5
5
  import Form, { ErrorMessage, FormSection } from '@atlaskit/form';
6
6
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle } from '@atlaskit/modal-dialog';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import messages from '../common/messages';
9
8
  import { UserInputType } from '../common/types';
10
9
  import BooleanInputPrompt from './boolean-prompt/main';
@@ -113,7 +112,7 @@ var UserInputForm = function UserInputForm(props) {
113
112
  var formProps = _ref4.formProps,
114
113
  submitting = _ref4.submitting;
115
114
  return /*#__PURE__*/React.createElement("form", formProps, /*#__PURE__*/React.createElement(ModalHeader, {
116
- hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
115
+ hasCloseButton: true
117
116
  }, /*#__PURE__*/React.createElement(ModalTitle, null, rule.name)), /*#__PURE__*/React.createElement(ModalBody, null, messages.inputRequiredForAction.defaultMessage, /*#__PURE__*/React.createElement(FormSection, null, userInputPrompts.map(generateUserInputForm))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
118
117
  appearance: "subtle",
119
118
  onClick: handleClose,
@@ -6,7 +6,6 @@ import { defineMessages, useIntl } from 'react-intl-next';
6
6
  import Heading from '@atlaskit/heading';
7
7
  import LegacyManualTriggerIcon from '@atlaskit/legacy-custom-icons/manual-trigger-icon';
8
8
  import { ModalHeader, useModal } from '@atlaskit/modal-dialog';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import { Box, Inline, Stack } from '@atlaskit/primitives/compiled';
11
10
  import { G50 } from '@atlaskit/theme/colors';
12
11
  import { useAutomationMenu } from '../../menu-context';
@@ -33,7 +32,7 @@ export var AutomationModalHeader = function AutomationModalHeader(_ref) {
33
32
  titleId = _useModal.titleId;
34
33
  var showDescription = initialised && rules.length > 0 && !!modalDescription;
35
34
  return /*#__PURE__*/React.createElement(ModalHeader, {
36
- hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
35
+ hasCloseButton: true
37
36
  }, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Inline, {
38
37
  alignBlock: "center"
39
38
  }, /*#__PURE__*/React.createElement(Box, {
@@ -49,7 +49,27 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
49
49
  var onAuthorize = useCallback(function () {
50
50
  return actions.authorize('hyperlink');
51
51
  }, [actions]);
52
- if ((state === null || state === void 0 ? void 0 : state.status) === 'unauthorized' && (FeatureGates.getExperimentValue('platform_linking_bluelink_connect_confluence', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_linking_bluelink_connect_jira', 'isEnabled', false))) {
52
+ var shouldRenderConnectBtn = function shouldRenderConnectBtn() {
53
+ if (!props.children || !Array.isArray(props.children) || props.children.length === 0) {
54
+ return false;
55
+ }
56
+ var firstChild = props.children[0];
57
+ try {
58
+ var _firstChild$props;
59
+ // Check if first child has a string matching href
60
+ if (typeof firstChild === 'string') {
61
+ return props.href === firstChild;
62
+ }
63
+
64
+ // Check if first child has another child object containing matching href. This aligns with the behavior of the TextWrapper component used by editor to render link nodes
65
+ if (firstChild !== null && firstChild !== void 0 && (_firstChild$props = firstChild.props) !== null && _firstChild$props !== void 0 && _firstChild$props.children && typeof firstChild.props.children === 'string') {
66
+ return props.href === firstChild.props.children;
67
+ }
68
+ } catch (_) {
69
+ return false;
70
+ }
71
+ };
72
+ if ((state === null || state === void 0 ? void 0 : state.status) === 'unauthorized' && shouldRenderConnectBtn() && (FeatureGates.getExperimentValue('platform_linking_bluelink_connect_confluence', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_linking_bluelink_connect_jira', 'isEnabled', false))) {
53
73
  var provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
54
74
  return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
55
75
  onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
@@ -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) {
@@ -21,7 +20,7 @@ var WarningModal = function WarningModal(props) {
21
20
  onClose: onClose,
22
21
  testId: "link-with-safety-warning"
23
22
  }, /*#__PURE__*/React.createElement(ModalHeader, {
24
- hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
23
+ hasCloseButton: true
25
24
  }, /*#__PURE__*/React.createElement(ModalTitle, {
26
25
  appearance: "warning"
27
26
  }, /*#__PURE__*/React.createElement(FormattedMessage, messages.check_this_link))), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement("div", {
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "43.1.2",
18
+ packageVersion: "43.1.4",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -5,7 +5,6 @@ import { useCallback, useRef } from 'react';
5
5
  import { FormattedMessage } from 'react-intl-next';
6
6
  import Button from '@atlaskit/button/new';
7
7
  import Modal, { ModalBody, ModalFooter, ModalHeader, ModalTitle, ModalTransition } from '@atlaskit/modal-dialog';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
10
9
  import { messages } from '../../../messages';
11
10
  var fixedWidth = 'small'; // pre-defined 400px by Atlaskit
@@ -36,7 +35,7 @@ var RelatedLinksBaseModal = function RelatedLinksBaseModal(_ref) {
36
35
  onOpenComplete: openCompleteHandler,
37
36
  height: '504px'
38
37
  }, /*#__PURE__*/React.createElement(ModalHeader, {
39
- hasCloseButton: fg('navx-1483-a11y-close-button-in-modal-updates')
38
+ hasCloseButton: true
40
39
  }, /*#__PURE__*/React.createElement(ModalTitle, null, /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_title))), /*#__PURE__*/React.createElement(ModalBody, null, children), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
41
40
  appearance: "primary",
42
41
  onClick: closeHandler
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.1.3",
3
+ "version": "43.1.5",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -55,7 +55,7 @@
55
55
  "@atlaskit/link-extractors": "^2.4.0",
56
56
  "@atlaskit/link-test-helpers": "^8.4.0",
57
57
  "@atlaskit/linking-common": "^9.7.0",
58
- "@atlaskit/linking-types": "^14.0.0",
58
+ "@atlaskit/linking-types": "^14.1.0",
59
59
  "@atlaskit/logo": "^19.9.0",
60
60
  "@atlaskit/lozenge": "^13.0.0",
61
61
  "@atlaskit/menu": "^8.4.0",
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/textarea": "^8.0.0",
71
71
  "@atlaskit/textfield": "^8.0.0",
72
72
  "@atlaskit/theme": "^21.0.0",
73
- "@atlaskit/tmp-editor-statsig": "^13.6.0",
73
+ "@atlaskit/tmp-editor-statsig": "^13.10.0",
74
74
  "@atlaskit/tokens": "^6.4.0",
75
75
  "@atlaskit/tooltip": "^20.5.0",
76
76
  "@atlaskit/ufo": "^0.4.0",
@@ -220,9 +220,6 @@
220
220
  "platform_deprecate_lp_cc_embed": {
221
221
  "type": "boolean"
222
222
  },
223
- "navx-1483-a11y-close-button-in-modal-updates": {
224
- "type": "boolean"
225
- },
226
223
  "navx-1706-smart-link-layered-link-a11y-update": {
227
224
  "type": "boolean"
228
225
  },