@atlaskit/smart-card 40.4.3 → 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 CHANGED
@@ -1,5 +1,28 @@
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
+
11
+ ## 40.5.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#189158](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189158)
16
+ [`aea9c37b3cfb2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aea9c37b3cfb2) -
17
+ Cleanup do-not-show-link-mismatch-warning-for-same-origin FF
18
+ - [#189145](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/189145)
19
+ [`2aa0440a09569`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2aa0440a09569) -
20
+ Clean up send-smart-link-rendered-ufo-event-half-time FF
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 40.4.3
4
27
 
5
28
  ### Patch Changes
package/compass.yml CHANGED
@@ -15,7 +15,7 @@ fields:
15
15
  links:
16
16
  - name: ''
17
17
  type: CHAT_CHANNEL
18
- url: 'https://atlassian.enterprise.slack.com/archives/C07TNMDEVHC'
18
+ url: 'https://atlassian.enterprise.slack.com/archives/CFKGAQZRV'
19
19
  - name: ''
20
20
  type: ON_CALL
21
21
  url: 'https://hello.jira.atlassian.cloud/jira/ops/teams/e738fbc3-d778-4660-aa11-5697a458ffa7/on-call'
@@ -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.4.2"
14
+ packageVersion: "40.5.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.LazyIntersectionObserverCard = LazyIntersectionObserverCard;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
11
  var _state = require("../../../state");
13
12
  var _ufoExperiences = require("../../../state/analytics/ufoExperiences");
14
13
  var _shouldSample = require("../../../utils/shouldSample");
@@ -40,11 +39,7 @@ function LazyIntersectionObserverCard(props) {
40
39
  return entry.isIntersecting;
41
40
  });
42
41
  if (isVisible) {
43
- if ((0, _platformFeatureFlags.fg)('send-smart-link-rendered-ufo-event-half-time')) {
44
- if (shouldSendRenderedUFOEvent) {
45
- (0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
46
- }
47
- } else {
42
+ if (shouldSendRenderedUFOEvent) {
48
43
  (0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
49
44
  }
50
45
  setIsIntersecting(true);
@@ -9,7 +9,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
9
9
  var _react = require("react");
10
10
  var _analyticsNext = require("@atlaskit/analytics-next");
11
11
  var _url = require("@atlaskit/linking-common/url");
12
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
13
12
  var _analytics = require("../../../../utils/analytics");
14
13
  var toUrl = function toUrl(url, base) {
15
14
  try {
@@ -80,12 +79,10 @@ var useLinkWarningModal = exports.useLinkWarningModal = function useLinkWarningM
80
79
  if (!hrefUrl || !linkTextUrl) {
81
80
  return true;
82
81
  }
83
- if ((0, _platformFeatureFlags.fg)('do-not-show-link-mismatch-warning-for-same-origin')) {
84
- var currentAtlassianProductOrigin = window.location.origin;
85
- var isSafeToIgnoreNonOriginDifferences = (hrefUrl === null || hrefUrl === void 0 ? void 0 : hrefUrl.origin) === currentAtlassianProductOrigin && (linkTextUrl === null || linkTextUrl === void 0 ? void 0 : linkTextUrl.origin) === currentAtlassianProductOrigin;
86
- if (isSafeToIgnoreNonOriginDifferences) {
87
- return true;
88
- }
82
+ var currentAtlassianProductOrigin = window.location.origin;
83
+ var isSafeToIgnoreNonOriginDifferences = (hrefUrl === null || hrefUrl === void 0 ? void 0 : hrefUrl.origin) === currentAtlassianProductOrigin && (linkTextUrl === null || linkTextUrl === void 0 ? void 0 : linkTextUrl.origin) === currentAtlassianProductOrigin;
84
+ if (isSafeToIgnoreNonOriginDifferences) {
85
+ return true;
89
86
  }
90
87
  var httpProtocols = ['http:', 'https:'];
91
88
  var areProtocolsEquivalent;
@@ -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.4.2",
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 && (0, _platformFeatureFlags.fg)('platform_editor_hyperlink_underline') ? LinkComponent : Anchor;
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
- "data-testid": testId,
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.4.2"
5
+ packageVersion: "40.5.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,5 +1,4 @@
1
1
  import React, { useCallback, useEffect, useRef, useState } from 'react';
2
- import { fg } from '@atlaskit/platform-feature-flags';
3
2
  import { usePrefetch } from '../../../state';
4
3
  import { startUfoExperience } from '../../../state/analytics/ufoExperiences';
5
4
  import { shouldSample } from '../../../utils/shouldSample';
@@ -26,11 +25,7 @@ export function LazyIntersectionObserverCard(props) {
26
25
  const onIntersection = useCallback((entries, observer) => {
27
26
  const isVisible = entries.some(entry => entry.isIntersecting);
28
27
  if (isVisible) {
29
- if (fg('send-smart-link-rendered-ufo-event-half-time')) {
30
- if (shouldSendRenderedUFOEvent) {
31
- startUfoExperience('smart-link-rendered', id);
32
- }
33
- } else {
28
+ if (shouldSendRenderedUFOEvent) {
34
29
  startUfoExperience('smart-link-rendered', id);
35
30
  }
36
31
  setIsIntersecting(true);
@@ -1,7 +1,6 @@
1
1
  import { useState } from 'react';
2
2
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
3
3
  import { normalizeUrl } from '@atlaskit/linking-common/url';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { ANALYTICS_CHANNEL } from '../../../../utils/analytics';
6
5
  const toUrl = (url, base) => {
7
6
  try {
@@ -64,12 +63,10 @@ export const useLinkWarningModal = () => {
64
63
  if (!hrefUrl || !linkTextUrl) {
65
64
  return true;
66
65
  }
67
- if (fg('do-not-show-link-mismatch-warning-for-same-origin')) {
68
- const currentAtlassianProductOrigin = window.location.origin;
69
- const isSafeToIgnoreNonOriginDifferences = (hrefUrl === null || hrefUrl === void 0 ? void 0 : hrefUrl.origin) === currentAtlassianProductOrigin && (linkTextUrl === null || linkTextUrl === void 0 ? void 0 : linkTextUrl.origin) === currentAtlassianProductOrigin;
70
- if (isSafeToIgnoreNonOriginDifferences) {
71
- return true;
72
- }
66
+ const currentAtlassianProductOrigin = window.location.origin;
67
+ const isSafeToIgnoreNonOriginDifferences = (hrefUrl === null || hrefUrl === void 0 ? void 0 : hrefUrl.origin) === currentAtlassianProductOrigin && (linkTextUrl === null || linkTextUrl === void 0 ? void 0 : linkTextUrl.origin) === currentAtlassianProductOrigin;
68
+ if (isSafeToIgnoreNonOriginDifferences) {
69
+ return true;
73
70
  }
74
71
  const httpProtocols = ['http:', 'https:'];
75
72
  let areProtocolsEquivalent;
@@ -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.4.2",
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 && fg('platform_editor_hyperlink_underline') ? LinkComponent : Anchor;
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
- "data-testid": testId,
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.4.2"
7
+ packageVersion: "40.5.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,6 +1,5 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useCallback, useEffect, useRef, useState } from 'react';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  import { usePrefetch } from '../../../state';
5
4
  import { startUfoExperience } from '../../../state/analytics/ufoExperiences';
6
5
  import { shouldSample } from '../../../utils/shouldSample';
@@ -32,11 +31,7 @@ export function LazyIntersectionObserverCard(props) {
32
31
  return entry.isIntersecting;
33
32
  });
34
33
  if (isVisible) {
35
- if (fg('send-smart-link-rendered-ufo-event-half-time')) {
36
- if (shouldSendRenderedUFOEvent) {
37
- startUfoExperience('smart-link-rendered', id);
38
- }
39
- } else {
34
+ if (shouldSendRenderedUFOEvent) {
40
35
  startUfoExperience('smart-link-rendered', id);
41
36
  }
42
37
  setIsIntersecting(true);
@@ -2,7 +2,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import { useState } from 'react';
3
3
  import { useAnalyticsEvents } from '@atlaskit/analytics-next';
4
4
  import { normalizeUrl } from '@atlaskit/linking-common/url';
5
- import { fg } from '@atlaskit/platform-feature-flags';
6
5
  import { ANALYTICS_CHANNEL } from '../../../../utils/analytics';
7
6
  var toUrl = function toUrl(url, base) {
8
7
  try {
@@ -73,12 +72,10 @@ export var useLinkWarningModal = function useLinkWarningModal() {
73
72
  if (!hrefUrl || !linkTextUrl) {
74
73
  return true;
75
74
  }
76
- if (fg('do-not-show-link-mismatch-warning-for-same-origin')) {
77
- var currentAtlassianProductOrigin = window.location.origin;
78
- var isSafeToIgnoreNonOriginDifferences = (hrefUrl === null || hrefUrl === void 0 ? void 0 : hrefUrl.origin) === currentAtlassianProductOrigin && (linkTextUrl === null || linkTextUrl === void 0 ? void 0 : linkTextUrl.origin) === currentAtlassianProductOrigin;
79
- if (isSafeToIgnoreNonOriginDifferences) {
80
- return true;
81
- }
75
+ var currentAtlassianProductOrigin = window.location.origin;
76
+ var isSafeToIgnoreNonOriginDifferences = (hrefUrl === null || hrefUrl === void 0 ? void 0 : hrefUrl.origin) === currentAtlassianProductOrigin && (linkTextUrl === null || linkTextUrl === void 0 ? void 0 : linkTextUrl.origin) === currentAtlassianProductOrigin;
77
+ if (isSafeToIgnoreNonOriginDifferences) {
78
+ return true;
82
79
  }
83
80
  var httpProtocols = ['http:', 'https:'];
84
81
  var areProtocolsEquivalent;
@@ -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.4.2",
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 && fg('platform_editor_hyperlink_underline') ? LinkComponent : Anchor;
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
- "data-testid": testId,
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.4.3",
3
+ "version": "40.5.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -34,11 +34,11 @@
34
34
  "@atlaskit/button": "^23.2.0",
35
35
  "@atlaskit/checkbox": "^17.1.0",
36
36
  "@atlaskit/css": "^0.12.0",
37
- "@atlaskit/dropdown-menu": "^16.2.0",
37
+ "@atlaskit/dropdown-menu": "^16.3.0",
38
38
  "@atlaskit/form": "^12.0.0",
39
39
  "@atlaskit/frontend-utilities": "^3.1.0",
40
40
  "@atlaskit/heading": "^5.2.0",
41
- "@atlaskit/icon": "^27.5.0",
41
+ "@atlaskit/icon": "^27.6.0",
42
42
  "@atlaskit/icon-file-type": "^7.0.0",
43
43
  "@atlaskit/icon-lab": "^5.2.0",
44
44
  "@atlaskit/icon-object": "^7.1.0",
@@ -61,7 +61,7 @@
61
61
  "@atlaskit/platform-feature-flags": "^1.1.0",
62
62
  "@atlaskit/popup": "^4.3.0",
63
63
  "@atlaskit/primitives": "^14.10.0",
64
- "@atlaskit/section-message": "^8.2.0",
64
+ "@atlaskit/section-message": "^8.3.0",
65
65
  "@atlaskit/select": "^21.2.0",
66
66
  "@atlaskit/spinner": "^18.0.0",
67
67
  "@atlaskit/textarea": "^8.0.0",
@@ -166,9 +166,6 @@
166
166
  ".": "./src/index.ts"
167
167
  },
168
168
  "platform-feature-flags": {
169
- "send-smart-link-rendered-ufo-event-half-time": {
170
- "type": "boolean"
171
- },
172
169
  "platform-visual-refresh-icons": {
173
170
  "type": "boolean"
174
171
  },
@@ -184,9 +181,6 @@
184
181
  "platform_bandicoots-smartlink-unresolved-error-key": {
185
182
  "type": "boolean"
186
183
  },
187
- "platform_editor_hyperlink_underline": {
188
- "type": "boolean"
189
- },
190
184
  "platform-smart-card-shift-key": {
191
185
  "type": "boolean"
192
186
  },
@@ -196,9 +190,6 @@
196
190
  "confluence-issue-terminology-refresh": {
197
191
  "type": "boolean"
198
192
  },
199
- "do-not-show-link-mismatch-warning-for-same-origin": {
200
- "type": "boolean"
201
- },
202
193
  "fix_a11y_violation_in_hover_card_trigger": {
203
194
  "type": "boolean"
204
195
  },