@atlaskit/smart-card 40.17.1 → 40.17.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,15 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 40.17.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e6dbebe004a7f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e6dbebe004a7f) -
8
+ NAVX-1706 Adding aria-hidden attribute to LayeredLink component to be accessible to users
9
+ - [`6298cfc5a5088`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6298cfc5a5088) -
10
+ NAVX-1387 cleaning up platform-linking-ai-summary-migration-to-convo-ai
11
+ - Updated dependencies
12
+
3
13
  ## 40.17.1
4
14
 
5
15
  ### Patch Changes
@@ -12,7 +12,6 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
12
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
13
13
  var _uuid = _interopRequireDefault(require("uuid"));
14
14
  var _linkingCommon = require("@atlaskit/linking-common");
15
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
16
15
  var _readStream = require("./readStream");
17
16
  var _types = require("./types");
18
17
  var _utils = require("./utils");
@@ -35,12 +34,11 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
35
34
  });
36
35
  (0, _defineProperty2.default)(this, "subscribedStateSetters", new Set());
37
36
  (0, _defineProperty2.default)(this, "getRequestUrl", function (envKey, baseUrlOverride) {
38
- var path = (0, _platformFeatureFlags.fg)('platform-linking-ai-summary-migration-to-convo-ai') ? CONVO_AI_ENDPOINT : 'assist/chat/v1/invoke_agent/stream';
39
37
  if (baseUrlOverride || envKey) {
40
38
  var baseUrl = baseUrlOverride || (0, _linkingCommon.getBaseUrl)(envKey);
41
- return (0, _utils.addPath)(baseUrl, path);
39
+ return (0, _utils.addPath)(baseUrl, CONVO_AI_ENDPOINT);
42
40
  }
43
- return (0, _utils.addPath)('/gateway/api/', path);
41
+ return (0, _utils.addPath)('/gateway/api/', CONVO_AI_ENDPOINT);
44
42
  });
45
43
  (0, _defineProperty2.default)(this, "fetchStream", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
46
44
  var payload, options, response;
@@ -57,11 +55,11 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
57
55
  locale: _this.locale
58
56
  }
59
57
  }, {
60
- ai_feature_input: (0, _platformFeatureFlags.fg)('platform-linking-ai-summary-migration-to-convo-ai') ? {
58
+ ai_feature_input: {
61
59
  content_url: _this.url,
62
60
  content_ari: _this.ari,
63
61
  locale: _this.locale
64
- } : undefined
62
+ }
65
63
  });
66
64
  options = {
67
65
  method: 'POST',
@@ -164,7 +162,7 @@ var AISummaryService = exports.AISummaryService = /*#__PURE__*/function () {
164
162
 
165
163
  //if AI Mate service returns cached summary we get the summary text in one piece as the last message
166
164
  if (chunk.type === 'FINAL_RESPONSE') {
167
- bufferContent = (0, _platformFeatureFlags.fg)('platform-linking-ai-summary-migration-to-convo-ai') ? chunk.message.content : chunk.message.message.content;
165
+ bufferContent = chunk.message.content;
168
166
  }
169
167
  if (!(chunk.type === 'ERROR')) {
170
168
  _context2.next = 22;
@@ -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.17.0"
14
+ packageVersion: "40.17.1"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -9,6 +9,7 @@ exports.default = void 0;
9
9
  require("./index.compiled.css");
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _runtime = require("@compiled/react/runtime");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _useLinkClicked = require("../../../../../state/analytics/useLinkClicked");
13
14
  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); }
14
15
  var styles = null;
@@ -34,6 +35,8 @@ var LayeredLink = function LayeredLink(_ref) {
34
35
  onMouseDown: onMouseDown,
35
36
  target: target,
36
37
  tabIndex: -1 // Hide tab index and let the title link be the link.
38
+ ,
39
+ "aria-hidden": (0, _platformFeatureFlags.fg)('navx-1706-smart-link-layered-link-a11y-update') // This is to avoid screen readers reading out the link twice.
37
40
  }, text);
38
41
  };
39
42
  var _default = exports.default = LayeredLink;
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
19
19
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
20
20
  var PACKAGE_DATA = {
21
21
  packageName: "@atlaskit/smart-card",
22
- packageVersion: "40.17.0",
22
+ packageVersion: "40.17.1",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -1,7 +1,6 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import uuid from 'uuid';
3
3
  import { getBaseUrl } from '@atlaskit/linking-common';
4
- import { fg } from '@atlaskit/platform-feature-flags';
5
4
  import { readStream } from './readStream';
6
5
  import { ChunkProcessingError } from './types';
7
6
  import { addPath, getXProductHeaderValue } from './utils';
@@ -15,12 +14,11 @@ export class AISummaryService {
15
14
  });
16
15
  _defineProperty(this, "subscribedStateSetters", new Set());
17
16
  _defineProperty(this, "getRequestUrl", (envKey, baseUrlOverride) => {
18
- const path = fg('platform-linking-ai-summary-migration-to-convo-ai') ? CONVO_AI_ENDPOINT : 'assist/chat/v1/invoke_agent/stream';
19
17
  if (baseUrlOverride || envKey) {
20
18
  const baseUrl = baseUrlOverride || getBaseUrl(envKey);
21
- return addPath(baseUrl, path);
19
+ return addPath(baseUrl, CONVO_AI_ENDPOINT);
22
20
  }
23
- return addPath('/gateway/api/', path);
21
+ return addPath('/gateway/api/', CONVO_AI_ENDPOINT);
24
22
  });
25
23
  _defineProperty(this, "fetchStream", async () => {
26
24
  const payload = {
@@ -33,11 +31,11 @@ export class AISummaryService {
33
31
  locale: this.locale
34
32
  },
35
33
  ...{
36
- ai_feature_input: fg('platform-linking-ai-summary-migration-to-convo-ai') ? {
34
+ ai_feature_input: {
37
35
  content_url: this.url,
38
36
  content_ari: this.ari,
39
37
  locale: this.locale
40
- } : undefined
38
+ }
41
39
  }
42
40
  };
43
41
  const options = {
@@ -95,7 +93,7 @@ export class AISummaryService {
95
93
 
96
94
  //if AI Mate service returns cached summary we get the summary text in one piece as the last message
97
95
  if (chunk.type === 'FINAL_RESPONSE') {
98
- bufferContent = fg('platform-linking-ai-summary-migration-to-convo-ai') ? chunk.message.content : chunk.message.message.content;
96
+ bufferContent = chunk.message.content;
99
97
  }
100
98
  if (chunk.type === 'ERROR') {
101
99
  var _chunk$message;
@@ -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.17.0"
5
+ packageVersion: "40.17.1"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -2,6 +2,7 @@
2
2
  import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
6
7
  const styles = null;
7
8
 
@@ -27,6 +28,8 @@ const LayeredLink = ({
27
28
  onMouseDown: onMouseDown,
28
29
  target: target,
29
30
  tabIndex: -1 // Hide tab index and let the title link be the link.
31
+ ,
32
+ "aria-hidden": fg('navx-1706-smart-link-layered-link-a11y-update') // This is to avoid screen readers reading out the link twice.
30
33
  }, text);
31
34
  };
32
35
  export default LayeredLink;
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
9
9
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
10
10
  const PACKAGE_DATA = {
11
11
  packageName: "@atlaskit/smart-card",
12
- packageVersion: "40.17.0",
12
+ packageVersion: "40.17.1",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const Anchor = withLinkClickedEvent('a');
@@ -12,7 +12,6 @@ function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symb
12
12
  function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(r) { var n = this.s.return; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, throw: function _throw(r) { var n = this.s.return; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
13
13
  import uuid from 'uuid';
14
14
  import { getBaseUrl } from '@atlaskit/linking-common';
15
- import { fg } from '@atlaskit/platform-feature-flags';
16
15
  import { readStream } from './readStream';
17
16
  import { ChunkProcessingError } from './types';
18
17
  import { addPath, getXProductHeaderValue } from './utils';
@@ -28,12 +27,11 @@ export var AISummaryService = /*#__PURE__*/function () {
28
27
  });
29
28
  _defineProperty(this, "subscribedStateSetters", new Set());
30
29
  _defineProperty(this, "getRequestUrl", function (envKey, baseUrlOverride) {
31
- var path = fg('platform-linking-ai-summary-migration-to-convo-ai') ? CONVO_AI_ENDPOINT : 'assist/chat/v1/invoke_agent/stream';
32
30
  if (baseUrlOverride || envKey) {
33
31
  var baseUrl = baseUrlOverride || getBaseUrl(envKey);
34
- return addPath(baseUrl, path);
32
+ return addPath(baseUrl, CONVO_AI_ENDPOINT);
35
33
  }
36
- return addPath('/gateway/api/', path);
34
+ return addPath('/gateway/api/', CONVO_AI_ENDPOINT);
37
35
  });
38
36
  _defineProperty(this, "fetchStream", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
39
37
  var payload, options, response;
@@ -50,11 +48,11 @@ export var AISummaryService = /*#__PURE__*/function () {
50
48
  locale: _this.locale
51
49
  }
52
50
  }, {
53
- ai_feature_input: fg('platform-linking-ai-summary-migration-to-convo-ai') ? {
51
+ ai_feature_input: {
54
52
  content_url: _this.url,
55
53
  content_ari: _this.ari,
56
54
  locale: _this.locale
57
- } : undefined
55
+ }
58
56
  });
59
57
  options = {
60
58
  method: 'POST',
@@ -157,7 +155,7 @@ export var AISummaryService = /*#__PURE__*/function () {
157
155
 
158
156
  //if AI Mate service returns cached summary we get the summary text in one piece as the last message
159
157
  if (chunk.type === 'FINAL_RESPONSE') {
160
- bufferContent = fg('platform-linking-ai-summary-migration-to-convo-ai') ? chunk.message.content : chunk.message.message.content;
158
+ bufferContent = chunk.message.content;
161
159
  }
162
160
  if (!(chunk.type === 'ERROR')) {
163
161
  _context2.next = 22;
@@ -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.17.0"
7
+ packageVersion: "40.17.1"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -2,6 +2,7 @@
2
2
  import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ import { fg } from '@atlaskit/platform-feature-flags';
5
6
  import { useMouseDownEvent } from '../../../../../state/analytics/useLinkClicked';
6
7
  var styles = null;
7
8
 
@@ -26,6 +27,8 @@ var LayeredLink = function LayeredLink(_ref) {
26
27
  onMouseDown: onMouseDown,
27
28
  target: target,
28
29
  tabIndex: -1 // Hide tab index and let the title link be the link.
30
+ ,
31
+ "aria-hidden": fg('navx-1706-smart-link-layered-link-a11y-update') // This is to avoid screen readers reading out the link twice.
29
32
  }, text);
30
33
  };
31
34
  export default LayeredLink;
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  var PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "40.17.0",
15
+ packageVersion: "40.17.1",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var Anchor = withLinkClickedEvent('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "40.17.1",
3
+ "version": "40.17.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -62,13 +62,13 @@
62
62
  "@atlaskit/platform-feature-flags": "^1.1.0",
63
63
  "@atlaskit/popup": "^4.3.0",
64
64
  "@atlaskit/primitives": "^14.12.0",
65
- "@atlaskit/section-message": "^8.6.0",
65
+ "@atlaskit/section-message": "^8.7.0",
66
66
  "@atlaskit/select": "^21.2.0",
67
67
  "@atlaskit/spinner": "^19.0.0",
68
68
  "@atlaskit/textarea": "^8.0.0",
69
69
  "@atlaskit/textfield": "^8.0.0",
70
70
  "@atlaskit/theme": "^20.0.0",
71
- "@atlaskit/tmp-editor-statsig": "^12.1.0",
71
+ "@atlaskit/tmp-editor-statsig": "^12.2.0",
72
72
  "@atlaskit/tokens": "^6.1.0",
73
73
  "@atlaskit/tooltip": "^20.4.0",
74
74
  "@atlaskit/ufo": "^0.4.0",
@@ -184,9 +184,6 @@
184
184
  "confluence-issue-terminology-refresh": {
185
185
  "type": "boolean"
186
186
  },
187
- "platform-linking-ai-summary-migration-to-convo-ai": {
188
- "type": "boolean"
189
- },
190
187
  "dst-a11y__replace-anchor-with-link__linking-platfo": {
191
188
  "type": "boolean"
192
189
  },
@@ -231,6 +228,9 @@
231
228
  },
232
229
  "navx-1483-a11y-close-button-in-modal-updates": {
233
230
  "type": "boolean"
231
+ },
232
+ "navx-1706-smart-link-layered-link-a11y-update": {
233
+ "type": "boolean"
234
234
  }
235
235
  },
236
236
  "compassUnitTestMetricSourceId": "ari:cloud:compass:a436116f-02ce-4520-8fbb-7301462a1674:metric-source/c5751cc6-3513-4070-9deb-af31e86aed34/f74ef1bc-7240-4aac-9dc8-9dc43b502089"