@atlaskit/smart-card 43.1.1 → 43.1.3

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,21 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 43.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2c3e300807c81`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2c3e300807c81) -
8
+ NAVX-1902 cleaning up `navx-1842-sl-unnecessary-textual-description-for-decorative-images`
9
+
10
+ ## 43.1.2
11
+
12
+ ### Patch Changes
13
+
14
+ - [`52a78935ac6ef`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/52a78935ac6ef) -
15
+ Adjust experiment exposure logic for platform*linking_bluelink_connect*{product} logic so that the
16
+ experiment related logic only happens behind the gate.
17
+ - Updated dependencies
18
+
3
19
  ## 43.1.1
4
20
 
5
21
  ### 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.0"
14
+ packageVersion: "43.1.2"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -98,15 +98,14 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
98
98
  }, /*#__PURE__*/React.createElement("span", null, text), /*#__PURE__*/React.createElement(_compiled.Box, {
99
99
  as: "span",
100
100
  xcss: styles.chevronDown
101
- }, /*#__PURE__*/React.createElement(_chevronDown.default, (0, _extends2.default)({
101
+ }, /*#__PURE__*/React.createElement(_chevronDown.default, {
102
102
  color: "currentColor",
103
103
  label: "options",
104
104
  LEGACY_size: "medium",
105
105
  LEGACY_margin: "-4px -8px -4px -7px",
106
- size: "small"
107
- }, (0, _platformFeatureFlags.fg)('navx-1842-hiding-unnecessary-image-descriptions') ? {
108
- 'aria-hidden': true
109
- } : {}))))));
106
+ size: "small",
107
+ "aria-hidden": true
108
+ })))));
110
109
  }, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
111
110
  return /*#__PURE__*/React.createElement("button", (0, _extends2.default)({
112
111
  type: "button"
@@ -43,7 +43,6 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
43
43
  var services = (0, _helpers.getServices)(state === null || state === void 0 ? void 0 : state.details);
44
44
  var thirdPartyARI = (0, _helpers.getThirdPartyARI)(state === null || state === void 0 ? void 0 : state.details);
45
45
  var firstPartyIdentifier = (0, _helpers.getFirstPartyIdentifier)();
46
- var isConnectButtonExperimentEnabled = _featureGateJsClient.default.getExperimentValue('platform_linking_bluelink_connect_CONFLUENCE', 'isEnabled', false) || _featureGateJsClient.default.getExperimentValue('platform_linking_bluelink_connect_JIRA', 'isEnabled', false);
47
46
  var fire3PClickEvent = (0, _platformFeatureFlags.fg)('platform_smartlink_3pclick_analytics') ?
48
47
  // eslint-disable-next-line react-hooks/rules-of-hooks
49
48
  (0, _useSmartLinkEvents.useFire3PWorkflowsClickEvent)(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -56,26 +55,17 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
56
55
  }
57
56
  onClickCallback === null || onClickCallback === void 0 || onClickCallback(e);
58
57
  }, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
59
- var onAuthorize = isConnectButtonExperimentEnabled ?
60
- // eslint-disable-next-line react-hooks/rules-of-hooks
61
- (0, _react.useCallback)(function () {
58
+ var onAuthorize = (0, _react.useCallback)(function () {
62
59
  return actions.authorize('hyperlink');
63
- }, [actions]) : undefined;
64
- if (isConnectButtonExperimentEnabled) {
65
- switch (state === null || state === void 0 ? void 0 : state.status) {
66
- case 'unauthorized':
67
- var provider = (0, _linkExtractors.extractSmartLinkProvider)(state === null || state === void 0 ? void 0 : state.details);
68
- return /*#__PURE__*/_react.default.createElement(_unauthorizeView.default, (0, _extends2.default)({}, props, {
69
- onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
70
- onClick: onClick,
71
- showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
72
- provider: provider
73
- }));
74
- default:
75
- return /*#__PURE__*/_react.default.createElement(_Hyperlink.default, (0, _extends2.default)({}, props, {
76
- onClick: onClick
77
- }));
78
- }
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))) {
62
+ var provider = (0, _linkExtractors.extractSmartLinkProvider)(state === null || state === void 0 ? void 0 : state.details);
63
+ return /*#__PURE__*/_react.default.createElement(_unauthorizeView.default, (0, _extends2.default)({}, props, {
64
+ onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
65
+ onClick: onClick,
66
+ showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
67
+ provider: provider
68
+ }));
79
69
  }
80
70
  return /*#__PURE__*/_react.default.createElement(_Hyperlink.default, (0, _extends2.default)({}, props, {
81
71
  onClick: onClick
@@ -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.0",
25
+ packageVersion: "43.1.2",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  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: "43.1.0"
5
+ packageVersion: "43.1.2"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -68,15 +68,14 @@ const LozengeActionTrigger = ({
68
68
  }, /*#__PURE__*/React.createElement("span", null, text), /*#__PURE__*/React.createElement(Box, {
69
69
  as: "span",
70
70
  xcss: styles.chevronDown
71
- }, /*#__PURE__*/React.createElement(ChevronDownIcon, _extends({
71
+ }, /*#__PURE__*/React.createElement(ChevronDownIcon, {
72
72
  color: "currentColor",
73
73
  label: "options",
74
74
  LEGACY_size: "medium",
75
75
  LEGACY_margin: "-4px -8px -4px -7px",
76
- size: "small"
77
- }, fg('navx-1842-hiding-unnecessary-image-descriptions') ? {
78
- 'aria-hidden': true
79
- } : {}))))));
76
+ size: "small",
77
+ "aria-hidden": true
78
+ })))));
80
79
  }, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
81
80
  return /*#__PURE__*/React.createElement("button", _extends({
82
81
  type: "button"
@@ -30,7 +30,6 @@ const HyperlinkWithSmartLinkResolverInner = ({
30
30
  const services = getServices(state === null || state === void 0 ? void 0 : state.details);
31
31
  const thirdPartyARI = getThirdPartyARI(state === null || state === void 0 ? void 0 : state.details);
32
32
  const firstPartyIdentifier = getFirstPartyIdentifier();
33
- const isConnectButtonExperimentEnabled = FeatureGates.getExperimentValue('platform_linking_bluelink_connect_CONFLUENCE', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_linking_bluelink_connect_JIRA', 'isEnabled', false);
34
33
  const fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
35
34
  // eslint-disable-next-line react-hooks/rules-of-hooks
36
35
  useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -43,24 +42,15 @@ const HyperlinkWithSmartLinkResolverInner = ({
43
42
  }
44
43
  onClickCallback === null || onClickCallback === void 0 ? void 0 : onClickCallback(e);
45
44
  }, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
46
- const onAuthorize = isConnectButtonExperimentEnabled ?
47
- // eslint-disable-next-line react-hooks/rules-of-hooks
48
- useCallback(() => actions.authorize('hyperlink'), [actions]) : undefined;
49
- if (isConnectButtonExperimentEnabled) {
50
- switch (state === null || state === void 0 ? void 0 : state.status) {
51
- case 'unauthorized':
52
- const provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
53
- return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
54
- onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
55
- onClick: onClick,
56
- showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
57
- provider: provider
58
- }));
59
- default:
60
- return /*#__PURE__*/React.createElement(Hyperlink, _extends({}, props, {
61
- onClick: onClick
62
- }));
63
- }
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))) {
47
+ const provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
48
+ return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
49
+ onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
50
+ onClick: onClick,
51
+ showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
52
+ provider: provider
53
+ }));
64
54
  }
65
55
  return /*#__PURE__*/React.createElement(Hyperlink, _extends({}, props, {
66
56
  onClick: onClick
@@ -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.0",
15
+ packageVersion: "43.1.2",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  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: "43.1.0"
7
+ packageVersion: "43.1.2"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -90,15 +90,14 @@ var LozengeActionTrigger = function LozengeActionTrigger(_ref) {
90
90
  }, /*#__PURE__*/React.createElement("span", null, text), /*#__PURE__*/React.createElement(Box, {
91
91
  as: "span",
92
92
  xcss: styles.chevronDown
93
- }, /*#__PURE__*/React.createElement(ChevronDownIcon, _extends({
93
+ }, /*#__PURE__*/React.createElement(ChevronDownIcon, {
94
94
  color: "currentColor",
95
95
  label: "options",
96
96
  LEGACY_size: "medium",
97
97
  LEGACY_margin: "-4px -8px -4px -7px",
98
- size: "small"
99
- }, fg('navx-1842-hiding-unnecessary-image-descriptions') ? {
100
- 'aria-hidden': true
101
- } : {}))))));
98
+ size: "small",
99
+ "aria-hidden": true
100
+ })))));
102
101
  }, [appearance, isHovering, isPressing, text, isOpen, lozengeBackgroundColor, lozengeForegroundColor]);
103
102
  return /*#__PURE__*/React.createElement("button", _extends({
104
103
  type: "button"
@@ -34,7 +34,6 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
34
34
  var services = getServices(state === null || state === void 0 ? void 0 : state.details);
35
35
  var thirdPartyARI = getThirdPartyARI(state === null || state === void 0 ? void 0 : state.details);
36
36
  var firstPartyIdentifier = getFirstPartyIdentifier();
37
- var isConnectButtonExperimentEnabled = FeatureGates.getExperimentValue('platform_linking_bluelink_connect_CONFLUENCE', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_linking_bluelink_connect_JIRA', 'isEnabled', false);
38
37
  var fire3PClickEvent = fg('platform_smartlink_3pclick_analytics') ?
39
38
  // eslint-disable-next-line react-hooks/rules-of-hooks
40
39
  useFire3PWorkflowsClickEvent(firstPartyIdentifier, thirdPartyARI) : undefined;
@@ -47,26 +46,17 @@ var HyperlinkWithSmartLinkResolverInner = function HyperlinkWithSmartLinkResolve
47
46
  }
48
47
  onClickCallback === null || onClickCallback === void 0 || onClickCallback(e);
49
48
  }, [onClickCallback, fire3PClickEvent, state === null || state === void 0 ? void 0 : state.status]);
50
- var onAuthorize = isConnectButtonExperimentEnabled ?
51
- // eslint-disable-next-line react-hooks/rules-of-hooks
52
- useCallback(function () {
49
+ var onAuthorize = useCallback(function () {
53
50
  return actions.authorize('hyperlink');
54
- }, [actions]) : undefined;
55
- if (isConnectButtonExperimentEnabled) {
56
- switch (state === null || state === void 0 ? void 0 : state.status) {
57
- case 'unauthorized':
58
- var provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
59
- return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
60
- onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
61
- onClick: onClick,
62
- showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
63
- provider: provider
64
- }));
65
- default:
66
- return /*#__PURE__*/React.createElement(Hyperlink, _extends({}, props, {
67
- onClick: onClick
68
- }));
69
- }
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))) {
53
+ var provider = extractSmartLinkProvider(state === null || state === void 0 ? void 0 : state.details);
54
+ return /*#__PURE__*/React.createElement(HyperlinkUnauthorizedView, _extends({}, props, {
55
+ onAuthorize: services !== null && services !== void 0 && services.length ? onAuthorize : undefined,
56
+ onClick: onClick,
57
+ showConnectBtn: (services === null || services === void 0 ? void 0 : services.length) > 0,
58
+ provider: provider
59
+ }));
70
60
  }
71
61
  return /*#__PURE__*/React.createElement(Hyperlink, _extends({}, props, {
72
62
  onClick: onClick
@@ -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.0",
18
+ packageVersion: "43.1.2",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.1.1",
3
+ "version": "43.1.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,7 +29,7 @@
29
29
  "@atlaskit/afm-i18n-platform-linking-platform-smart-card": "2.6.0",
30
30
  "@atlaskit/analytics-gas-types": "^5.1.0",
31
31
  "@atlaskit/analytics-next": "^11.1.0",
32
- "@atlaskit/avatar": "^25.3.0",
32
+ "@atlaskit/avatar": "^25.4.0",
33
33
  "@atlaskit/avatar-group": "^12.3.0",
34
34
  "@atlaskit/badge": "^18.2.0",
35
35
  "@atlaskit/button": "^23.5.0",
@@ -226,9 +226,6 @@
226
226
  "navx-1706-smart-link-layered-link-a11y-update": {
227
227
  "type": "boolean"
228
228
  },
229
- "navx-1842-hiding-unnecessary-image-descriptions": {
230
- "type": "boolean"
231
- },
232
229
  "hover-card-on-visibility-change-callback": {
233
230
  "type": "boolean"
234
231
  },