@atlaskit/smart-card 27.4.2 → 27.4.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.
Files changed (38) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/messages.js +10 -0
  3. package/dist/cjs/state/hooks/use-incoming-outgoing-links/index.js +100 -0
  4. package/dist/cjs/state/hooks/use-incoming-outgoing-links/query.js +11 -0
  5. package/dist/cjs/utils/analytics/analytics.js +1 -1
  6. package/dist/cjs/view/LinkUrl/index.js +1 -1
  7. package/dist/cjs/view/RelatedLinksModal/components/EmptyState.js +41 -0
  8. package/dist/cjs/view/RelatedLinksModal/views/errored/error-svg/index.js +62 -0
  9. package/dist/cjs/view/RelatedLinksModal/views/errored/index.js +22 -0
  10. package/dist/es2019/messages.js +10 -0
  11. package/dist/es2019/state/hooks/use-incoming-outgoing-links/index.js +44 -0
  12. package/dist/es2019/state/hooks/use-incoming-outgoing-links/query.js +23 -0
  13. package/dist/es2019/utils/analytics/analytics.js +1 -1
  14. package/dist/es2019/view/LinkUrl/index.js +1 -1
  15. package/dist/es2019/view/RelatedLinksModal/components/EmptyState.js +35 -0
  16. package/dist/es2019/view/RelatedLinksModal/views/errored/error-svg/index.js +54 -0
  17. package/dist/es2019/view/RelatedLinksModal/views/errored/index.js +13 -0
  18. package/dist/esm/messages.js +10 -0
  19. package/dist/esm/state/hooks/use-incoming-outgoing-links/index.js +93 -0
  20. package/dist/esm/state/hooks/use-incoming-outgoing-links/query.js +5 -0
  21. package/dist/esm/utils/analytics/analytics.js +1 -1
  22. package/dist/esm/view/LinkUrl/index.js +1 -1
  23. package/dist/esm/view/RelatedLinksModal/components/EmptyState.js +34 -0
  24. package/dist/esm/view/RelatedLinksModal/views/errored/error-svg/index.js +54 -0
  25. package/dist/esm/view/RelatedLinksModal/views/errored/index.js +15 -0
  26. package/dist/types/messages.d.ts +1 -1
  27. package/dist/types/state/hooks/use-incoming-outgoing-links/index.d.ts +9 -0
  28. package/dist/types/state/hooks/use-incoming-outgoing-links/query.d.ts +5 -0
  29. package/dist/types/view/RelatedLinksModal/components/EmptyState.d.ts +9 -0
  30. package/dist/types/view/RelatedLinksModal/views/errored/error-svg/index.d.ts +3 -0
  31. package/dist/types/view/RelatedLinksModal/views/errored/index.d.ts +2 -0
  32. package/dist/types-ts4.5/messages.d.ts +1 -1
  33. package/dist/types-ts4.5/state/hooks/use-incoming-outgoing-links/index.d.ts +9 -0
  34. package/dist/types-ts4.5/state/hooks/use-incoming-outgoing-links/query.d.ts +5 -0
  35. package/dist/types-ts4.5/view/RelatedLinksModal/components/EmptyState.d.ts +9 -0
  36. package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/error-svg/index.d.ts +3 -0
  37. package/dist/types-ts4.5/view/RelatedLinksModal/views/errored/index.d.ts +2 -0
  38. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 27.4.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#102927](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102927)
8
+ [`f4ea3612f795`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f4ea3612f795) -
9
+ created errored view for related-links-modal component in smart cards
10
+ - [#104485](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/104485)
11
+ [`7d88a35c15dd`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7d88a35c15dd) -
12
+ Add a custom hook to make call to AGS to get incoming outgoing aris using
13
+ content-referenced-entity relationship
14
+
3
15
  ## 27.4.2
4
16
 
5
17
  ### Patch Changes
@@ -730,5 +730,15 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
730
730
  id: 'fabric.linking.related_links_includes_links_to',
731
731
  defaultMessage: 'Includes Links To',
732
732
  description: 'Informs the user of the resources the url links to'
733
+ },
734
+ related_links_modal_error_header: {
735
+ id: 'fabric.linking.related_links_modal_error_header',
736
+ defaultMessage: 'Something went wrong',
737
+ description: 'Title for related links error'
738
+ },
739
+ related_links_modal_error_message: {
740
+ id: 'fabric.linking.related_links_modal_error_message',
741
+ defaultMessage: 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
742
+ description: 'Informs the user that there was a problem loading related links'
733
743
  }
734
744
  });
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useIncomingOutgoingAri = void 0;
8
+ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
+ var _react = require("react");
11
+ var _linkingCommon = require("@atlaskit/linking-common");
12
+ var _query = require("./query");
13
+ /**
14
+ * @param baseUriWithNoTrailingSlash base url which will then be appended with /gateway/api/graphql to make requests to AGG
15
+ */
16
+ var useIncomingOutgoingAri = exports.useIncomingOutgoingAri = function useIncomingOutgoingAri() {
17
+ var baseUriWithNoTrailingSlash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
18
+ var aggRequestCall = (0, _react.useCallback)( /*#__PURE__*/function () {
19
+ var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(body, headers) {
20
+ return _regenerator.default.wrap(function _callee$(_context) {
21
+ while (1) switch (_context.prev = _context.next) {
22
+ case 0:
23
+ return _context.abrupt("return", (0, _linkingCommon.request)('post', baseUriWithNoTrailingSlash + '/gateway/api/graphql', body, headers, [200]));
24
+ case 1:
25
+ case "end":
26
+ return _context.stop();
27
+ }
28
+ }, _callee);
29
+ }));
30
+ return function (_x, _x2) {
31
+ return _ref.apply(this, arguments);
32
+ };
33
+ }(), [baseUriWithNoTrailingSlash]);
34
+ var getIncomingOutgoingAris = (0, _react.useCallback)(
35
+ /*#__PURE__*/
36
+ /**
37
+ * Returning aris linking to (outgoing) and from (incoming) a given ari from AGS using
38
+ * https://developer.atlassian.com/cloud/ari-graph-store/relationships/content-referenced-entity/#query
39
+ * @param ari the ari for which the incoming outgoing aris are to be retrieved
40
+ * @param firstIncoming The maximum count of incoming relationships to fetch. Must not exceed 1000. This max limit is handled by AGG itself. Default is 50 (ORS batch max limit)
41
+ * @param firstOutgoing The maximum count of outgoing relationships to fetch. Must not exceed 1000. This max limit is handled by AGG itself. Default is 50 (ORS batch max limit)
42
+ *
43
+ */
44
+ function () {
45
+ var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(ari) {
46
+ var _response$data$graphS, _response$data, _response$data$graphS2, _response$data2;
47
+ var firstIncoming,
48
+ firstOutgoing,
49
+ response,
50
+ incomingAris,
51
+ outgoingAris,
52
+ _args2 = arguments;
53
+ return _regenerator.default.wrap(function _callee2$(_context2) {
54
+ while (1) switch (_context2.prev = _context2.next) {
55
+ case 0:
56
+ firstIncoming = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 50;
57
+ firstOutgoing = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : 50;
58
+ _context2.next = 4;
59
+ return aggRequestCall({
60
+ variables: {
61
+ ids: [ari],
62
+ firstIncoming: firstIncoming,
63
+ firstOutgoing: firstOutgoing
64
+ },
65
+ query: _query.queryIncomingOutgoingLinks
66
+ });
67
+ case 4:
68
+ response = _context2.sent;
69
+ incomingAris = (_response$data$graphS = response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 || (_response$data = _response$data.graphStore) === null || _response$data === void 0 || (_response$data = _response$data.incoming) === null || _response$data === void 0 || (_response$data = _response$data.nodes) === null || _response$data === void 0 || (_response$data = _response$data.map(function (node) {
70
+ var _node$from;
71
+ return node === null || node === void 0 || (_node$from = node.from) === null || _node$from === void 0 ? void 0 : _node$from.id;
72
+ })) === null || _response$data === void 0 ? void 0 : _response$data.filter(function (id) {
73
+ return !!id;
74
+ })) !== null && _response$data$graphS !== void 0 ? _response$data$graphS : [];
75
+ outgoingAris = (_response$data$graphS2 = response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 || (_response$data2 = _response$data2.graphStore) === null || _response$data2 === void 0 || (_response$data2 = _response$data2.outgoing) === null || _response$data2 === void 0 || (_response$data2 = _response$data2.nodes) === null || _response$data2 === void 0 || (_response$data2 = _response$data2.map(function (node) {
76
+ var _node$to;
77
+ return node === null || node === void 0 || (_node$to = node.to) === null || _node$to === void 0 ? void 0 : _node$to.id;
78
+ })) === null || _response$data2 === void 0 ? void 0 : _response$data2.filter(function (id) {
79
+ return !!id;
80
+ })) !== null && _response$data$graphS2 !== void 0 ? _response$data$graphS2 : [];
81
+ return _context2.abrupt("return", {
82
+ incomingAris: incomingAris,
83
+ outgoingAris: outgoingAris
84
+ });
85
+ case 8:
86
+ case "end":
87
+ return _context2.stop();
88
+ }
89
+ }, _callee2);
90
+ }));
91
+ return function (_x3) {
92
+ return _ref2.apply(this, arguments);
93
+ };
94
+ }(), [aggRequestCall]);
95
+ return (0, _react.useMemo)(function () {
96
+ return {
97
+ getIncomingOutgoingAris: getIncomingOutgoingAris
98
+ };
99
+ }, [getIncomingOutgoingAris]);
100
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.queryIncomingOutgoingLinks = void 0;
7
+ /**
8
+ * AGG query to retrieve incoming/outgoing links from AGS
9
+ * https://developer.atlassian.com/cloud/ari-graph-store/relationships/content-referenced-entity/#batch-query
10
+ */
11
+ var queryIncomingOutgoingLinks = exports.queryIncomingOutgoingLinks = "\n query SmartCard_ContentReferencedEntityBatchQuery_V1($ids: [ID!]!, $firstIncoming: Int = 50, $firstOutgoing: Int = 50) {\n graphStore @optIn(to: \"GraphStore\") {\n incoming: contentReferencedEntityInverseBatch(ids: $ids, first: $firstIncoming) @optIn(to: \"GraphStoreContentReferencedEntity\") {\n nodes {\n from {\n id\n }\n }\n }\n outgoing: contentReferencedEntityBatch(ids: $ids, first: $firstOutgoing) @optIn(to: \"GraphStoreContentReferencedEntity\") {\n nodes {\n to {\n id\n }\n }\n }\n }\n }";
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
22
22
  var context = exports.context = {
23
23
  componentName: 'smart-cards',
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "27.4.2"
25
+ packageVersion: "27.4.3"
26
26
  };
27
27
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
28
28
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
17
17
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
18
18
  var PACKAGE_DATA = {
19
19
  packageName: "@atlaskit/smart-card",
20
- packageVersion: "27.4.2",
20
+ packageVersion: "27.4.3",
21
21
  componentName: 'linkUrl'
22
22
  };
23
23
  var Link = (0, _click.withLinkClickedEvent)('a');
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.EmptyState = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _heading = _interopRequireDefault(require("@atlaskit/heading"));
10
+ var _primitives = require("@atlaskit/primitives");
11
+ var emptyStateStyles = (0, _primitives.xcss)({
12
+ alignItems: "center",
13
+ display: 'flex',
14
+ flexDirection: 'column',
15
+ gap: "space.100",
16
+ height: '100%',
17
+ justifyContent: 'center',
18
+ marginLeft: 'space.300',
19
+ marginRight: 'space.300',
20
+ textAlign: 'center'
21
+ });
22
+ var descriptionStyles = (0, _primitives.xcss)({
23
+ marginTop: "var(--ds-space-0, 0px)",
24
+ marginBottom: "var(--ds-space-300, 24px)",
25
+ color: 'color.text'
26
+ });
27
+ var EmptyState = exports.EmptyState = function EmptyState(_ref) {
28
+ var testId = _ref.testId,
29
+ header = _ref.header,
30
+ description = _ref.description,
31
+ renderImage = _ref.renderImage;
32
+ return /*#__PURE__*/_react.default.createElement(_primitives.Box, {
33
+ xcss: emptyStateStyles,
34
+ testId: testId
35
+ }, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/_react.default.createElement(_heading.default, {
36
+ size: "small"
37
+ }, header), description && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
38
+ as: "p",
39
+ xcss: descriptionStyles
40
+ }, description));
41
+ };
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.ErrorSVG = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
+ var _react = require("@emotion/react");
10
+ /** @jsx jsx */
11
+
12
+ var errorStyles = (0, _react.css)({
13
+ width: '80px',
14
+ margin: "0 auto ".concat("var(--ds-space-300, 24px)"),
15
+ display: 'block'
16
+ });
17
+ var ErrorSVG = exports.ErrorSVG = function ErrorSVG(props) {
18
+ var id = 'related-links-error-svg';
19
+ return (0, _react.jsx)("svg", (0, _extends2.default)({
20
+ "data-testid": id,
21
+ viewBox: "0 0 164 212",
22
+ fill: "none",
23
+ xmlns: "http://www.w3.org/2000/svg",
24
+ css: errorStyles
25
+ }, props), (0, _react.jsx)("path", {
26
+ d: "m95.43 74.16 66.44 115.08c5.84 10.12-1.46 22.76-13.14 22.76H15.85c-11.68 0-18.98-12.65-13.14-22.76L69.15 74.16c5.84-10.12 20.44-10.12 26.28 0Zm-7.56 83.55 2.88-44.35c.34-5.29-3.86-9.78-9.16-9.78-5.31 0-9.51 4.48-9.16 9.78l2.88 44.35a6.3 6.3 0 0 0 6.28 5.89c3.31 0 6.06-2.58 6.28-5.89Zm-15.84 23.54c0 5.66 4.76 10.1 10.39 9.58 4.85-.45 8.73-4.5 8.83-9.37.11-5.45-4.31-9.94-9.73-9.94-5.23-.01-9.49 4.37-9.49 9.73Z",
27
+ fill: "url(#".concat(id, ")")
28
+ }), (0, _react.jsx)("path", {
29
+ opacity: ".6",
30
+ d: "M93.35 27.17 85.94.45c-.17-.62-1.07-.58-1.19.05l-4.66 25.1-5.8-1.08a.612.612 0 0 0-.7.76L81 52c.17.62 1.07.58 1.19-.05l4.66-25.1 5.8 1.08c.45.08.82-.33.7-.76ZM66.77 41.81 55.9 33.26c-.22-.18-.53.07-.41.33l5.53 11.43-2.66 1.29c-.18.09-.2.33-.05.45l10.87 8.55c.22.18.53-.07.41-.33l-5.53-11.43 2.66-1.29c.17-.08.2-.33.05-.45Z",
31
+ fill: "#C1C7D0"
32
+ }), (0, _react.jsx)("path", {
33
+ opacity: ".6",
34
+ d: "M102.78 56.75a.993.993 0 0 1-.92-1.38c-.24-.77-2.29-2.85-3.54-4.11-2.97-3.01-4.93-5-3.84-6.49 1.09-1.48 3.58-.22 7.35 1.7 1.32.67 3.35 1.7 4.45 2.03-.64-.95-2.24-2.58-3.28-3.63-2.97-3.01-4.93-5-3.84-6.49 1.08-1.48 3.58-.22 7.34 1.7 1.32.67 3.34 1.7 4.45 2.03-.64-.95-2.24-2.57-3.28-3.62-2.97-3.01-4.93-5-3.84-6.49 1.08-1.48 3.57-.22 7.34 1.7 1.58.8 4.18 2.13 4.98 2.13a1.005 1.005 0 0 1 1.46 1.36c-1.09 1.48-3.57.22-7.34-1.7-1.32-.67-3.34-1.7-4.44-2.03.64.95 2.24 2.57 3.28 3.62 2.97 3.01 4.93 5 3.84 6.49-1.08 1.48-3.57.22-7.34-1.7-1.32-.67-3.35-1.7-4.45-2.03.64.95 2.24 2.57 3.28 3.63 2.97 3.01 4.93 5 3.84 6.49-1.09 1.48-3.58.22-7.35-1.7-1.32-.67-3.35-1.71-4.45-2.03.64.95 2.24 2.58 3.28 3.63 2.97 3.01 4.93 5 3.84 6.49-.21.26-.51.4-.82.4Zm5.56 14.32c-.35 0-.69-.19-.88-.52-1.04-1.88-2.22-4.02-.91-5.21 1.31-1.2 3.34.18 5.49 1.63.87.59 2.26 1.53 2.93 1.71-.12-.68-.93-2.15-1.45-3.07-1.26-2.27-2.45-4.41-1.14-5.61 1.31-1.2 3.34.18 5.49 1.63.96.65 2.54 1.72 3.1 1.74a1 1 0 0 1 1.27 1.54c-1.31 1.2-3.34-.17-5.49-1.63-.87-.59-2.26-1.53-2.93-1.71.12.68.93 2.15 1.45 3.07 1.26 2.27 2.45 4.41 1.14 5.61-1.31 1.2-3.34-.18-5.49-1.63-.87-.59-2.26-1.53-2.93-1.71.12.68.93 2.14 1.22 2.67.27.48.09 1.09-.39 1.36-.15.09-.32.13-.48.13Zm-54.32-2.89c-.22 0-.44-.04-.67-.14-1.64-.69-1.24-3.11-.81-5.67.17-1.04.45-2.7.33-3.38-.57.39-1.56 1.75-2.18 2.6-1.53 2.09-2.99 4.07-4.62 3.38a.991.991 0 0 1-.53-1.31c.2-.48.73-.72 1.21-.57.52-.21 1.65-1.75 2.34-2.68 1.53-2.09 2.98-4.08 4.62-3.38 1.64.69 1.24 3.11.81 5.67-.17 1.04-.45 2.7-.33 3.38.57-.39 1.56-1.75 2.18-2.6 1.53-2.09 2.98-4.08 4.62-3.38 1.63.69 1.24 3.09.89 5.21-.09.54-.6.91-1.15.83-.54-.09-.92-.6-.83-1.15.1-.59.37-2.24.26-2.92-.57.39-1.56 1.75-2.18 2.6-1.33 1.79-2.59 3.51-3.96 3.51Z",
35
+ fill: "#B3BAC5"
36
+ }), (0, _react.jsx)("defs", null, (0, _react.jsx)("linearGradient", {
37
+ id: id,
38
+ x1: "26.169",
39
+ y1: "228.621",
40
+ x2: "138.408",
41
+ y2: "116.382",
42
+ gradientUnits: "userSpaceOnUse"
43
+ }, (0, _react.jsx)("stop", {
44
+ stopColor: "#C1C7D0"
45
+ }), (0, _react.jsx)("stop", {
46
+ offset: ".297",
47
+ stopColor: "#C6CBD4",
48
+ stopOpacity: ".881"
49
+ }), (0, _react.jsx)("stop", {
50
+ offset: ".63",
51
+ stopColor: "#D3D7DE",
52
+ stopOpacity: ".748"
53
+ }), (0, _react.jsx)("stop", {
54
+ offset: ".98",
55
+ stopColor: "#E9EBEF",
56
+ stopOpacity: ".608"
57
+ }), (0, _react.jsx)("stop", {
58
+ offset: "1",
59
+ stopColor: "#EBECF0",
60
+ stopOpacity: ".6"
61
+ }))));
62
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.RelatedLinksErroredView = void 0;
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactIntlNext = require("react-intl-next");
10
+ var _messages = require("../../../../messages");
11
+ var _errorSvg = require("./error-svg");
12
+ var _EmptyState = require("../../components/EmptyState");
13
+ var RelatedLinksErroredView = exports.RelatedLinksErroredView = function RelatedLinksErroredView() {
14
+ var intl = (0, _reactIntlNext.useIntl)();
15
+ return /*#__PURE__*/_react.default.createElement(_EmptyState.EmptyState, {
16
+ renderImage: function renderImage() {
17
+ return /*#__PURE__*/_react.default.createElement(_errorSvg.ErrorSVG, null);
18
+ },
19
+ header: intl.formatMessage(_messages.messages.related_links_modal_error_header),
20
+ description: /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.related_links_modal_error_message)
21
+ });
22
+ };
@@ -724,5 +724,15 @@ export const messages = defineMessages({
724
724
  id: 'fabric.linking.related_links_includes_links_to',
725
725
  defaultMessage: 'Includes Links To',
726
726
  description: 'Informs the user of the resources the url links to'
727
+ },
728
+ related_links_modal_error_header: {
729
+ id: 'fabric.linking.related_links_modal_error_header',
730
+ defaultMessage: 'Something went wrong',
731
+ description: 'Title for related links error'
732
+ },
733
+ related_links_modal_error_message: {
734
+ id: 'fabric.linking.related_links_modal_error_message',
735
+ defaultMessage: 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
736
+ description: 'Informs the user that there was a problem loading related links'
727
737
  }
728
738
  });
@@ -0,0 +1,44 @@
1
+ import { useCallback, useMemo } from 'react';
2
+ import { request } from '@atlaskit/linking-common';
3
+ import { queryIncomingOutgoingLinks as queryIncomingOutgoingAris } from './query';
4
+ /**
5
+ * @param baseUriWithNoTrailingSlash base url which will then be appended with /gateway/api/graphql to make requests to AGG
6
+ */
7
+ export const useIncomingOutgoingAri = (baseUriWithNoTrailingSlash = '') => {
8
+ const aggRequestCall = useCallback(async (body, headers) => request('post', baseUriWithNoTrailingSlash + '/gateway/api/graphql', body, headers, [200]), [baseUriWithNoTrailingSlash]);
9
+ const getIncomingOutgoingAris = useCallback(
10
+ /**
11
+ * Returning aris linking to (outgoing) and from (incoming) a given ari from AGS using
12
+ * https://developer.atlassian.com/cloud/ari-graph-store/relationships/content-referenced-entity/#query
13
+ * @param ari the ari for which the incoming outgoing aris are to be retrieved
14
+ * @param firstIncoming The maximum count of incoming relationships to fetch. Must not exceed 1000. This max limit is handled by AGG itself. Default is 50 (ORS batch max limit)
15
+ * @param firstOutgoing The maximum count of outgoing relationships to fetch. Must not exceed 1000. This max limit is handled by AGG itself. Default is 50 (ORS batch max limit)
16
+ *
17
+ */
18
+ async (ari, firstIncoming = 50, firstOutgoing = 50) => {
19
+ var _response$data$graphS, _response$data, _response$data$graphS2, _response$data$graphS3, _response$data$graphS4, _response$data$graphS5, _response$data$graphS6, _response$data2, _response$data2$graph, _response$data2$graph2, _response$data2$graph3, _response$data2$graph4;
20
+ const response = await aggRequestCall({
21
+ variables: {
22
+ ids: [ari],
23
+ firstIncoming,
24
+ firstOutgoing
25
+ },
26
+ query: queryIncomingOutgoingAris
27
+ });
28
+ const incomingAris = (_response$data$graphS = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$graphS2 = _response$data.graphStore) === null || _response$data$graphS2 === void 0 ? void 0 : (_response$data$graphS3 = _response$data$graphS2.incoming) === null || _response$data$graphS3 === void 0 ? void 0 : (_response$data$graphS4 = _response$data$graphS3.nodes) === null || _response$data$graphS4 === void 0 ? void 0 : (_response$data$graphS5 = _response$data$graphS4.map(node => {
29
+ var _node$from;
30
+ return node === null || node === void 0 ? void 0 : (_node$from = node.from) === null || _node$from === void 0 ? void 0 : _node$from.id;
31
+ })) === null || _response$data$graphS5 === void 0 ? void 0 : _response$data$graphS5.filter(id => !!id)) !== null && _response$data$graphS !== void 0 ? _response$data$graphS : [];
32
+ const outgoingAris = (_response$data$graphS6 = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$graph = _response$data2.graphStore) === null || _response$data2$graph === void 0 ? void 0 : (_response$data2$graph2 = _response$data2$graph.outgoing) === null || _response$data2$graph2 === void 0 ? void 0 : (_response$data2$graph3 = _response$data2$graph2.nodes) === null || _response$data2$graph3 === void 0 ? void 0 : (_response$data2$graph4 = _response$data2$graph3.map(node => {
33
+ var _node$to;
34
+ return node === null || node === void 0 ? void 0 : (_node$to = node.to) === null || _node$to === void 0 ? void 0 : _node$to.id;
35
+ })) === null || _response$data2$graph4 === void 0 ? void 0 : _response$data2$graph4.filter(id => !!id)) !== null && _response$data$graphS6 !== void 0 ? _response$data$graphS6 : [];
36
+ return {
37
+ incomingAris,
38
+ outgoingAris
39
+ };
40
+ }, [aggRequestCall]);
41
+ return useMemo(() => ({
42
+ getIncomingOutgoingAris
43
+ }), [getIncomingOutgoingAris]);
44
+ };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * AGG query to retrieve incoming/outgoing links from AGS
3
+ * https://developer.atlassian.com/cloud/ari-graph-store/relationships/content-referenced-entity/#batch-query
4
+ */
5
+ export const queryIncomingOutgoingLinks = `
6
+ query SmartCard_ContentReferencedEntityBatchQuery_V1($ids: [ID!]!, $firstIncoming: Int = 50, $firstOutgoing: Int = 50) {
7
+ graphStore @optIn(to: "GraphStore") {
8
+ incoming: contentReferencedEntityInverseBatch(ids: $ids, first: $firstIncoming) @optIn(to: "GraphStoreContentReferencedEntity") {
9
+ nodes {
10
+ from {
11
+ id
12
+ }
13
+ }
14
+ }
15
+ outgoing: contentReferencedEntityBatch(ids: $ids, first: $firstOutgoing) @optIn(to: "GraphStoreContentReferencedEntity") {
16
+ nodes {
17
+ to {
18
+ id
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }`;
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card",
7
- packageVersion: "27.4.2"
7
+ packageVersion: "27.4.3"
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
7
7
  import LinkWarningModal from './LinkWarningModal';
8
8
  const PACKAGE_DATA = {
9
9
  packageName: "@atlaskit/smart-card",
10
- packageVersion: "27.4.2",
10
+ packageVersion: "27.4.3",
11
11
  componentName: 'linkUrl'
12
12
  };
13
13
  const Link = withLinkClickedEvent('a');
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import Heading from '@atlaskit/heading';
3
+ import { Box, xcss } from '@atlaskit/primitives';
4
+ const emptyStateStyles = xcss({
5
+ alignItems: "center",
6
+ display: 'flex',
7
+ flexDirection: 'column',
8
+ gap: "space.100",
9
+ height: '100%',
10
+ justifyContent: 'center',
11
+ marginLeft: 'space.300',
12
+ marginRight: 'space.300',
13
+ textAlign: 'center'
14
+ });
15
+ const descriptionStyles = xcss({
16
+ marginTop: "var(--ds-space-0, 0px)",
17
+ marginBottom: "var(--ds-space-300, 24px)",
18
+ color: 'color.text'
19
+ });
20
+ export const EmptyState = ({
21
+ testId,
22
+ header,
23
+ description,
24
+ renderImage
25
+ }) => {
26
+ return /*#__PURE__*/React.createElement(Box, {
27
+ xcss: emptyStateStyles,
28
+ testId: testId
29
+ }, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(Heading, {
30
+ size: "small"
31
+ }, header), description && /*#__PURE__*/React.createElement(Box, {
32
+ as: "p",
33
+ xcss: descriptionStyles
34
+ }, description));
35
+ };
@@ -0,0 +1,54 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ /** @jsx jsx */
3
+ import { css, jsx } from '@emotion/react';
4
+ const errorStyles = css({
5
+ width: '80px',
6
+ margin: `0 auto ${"var(--ds-space-300, 24px)"}`,
7
+ display: 'block'
8
+ });
9
+ export const ErrorSVG = props => {
10
+ const id = 'related-links-error-svg';
11
+ return jsx("svg", _extends({
12
+ "data-testid": id,
13
+ viewBox: "0 0 164 212",
14
+ fill: "none",
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ css: errorStyles
17
+ }, props), jsx("path", {
18
+ d: "m95.43 74.16 66.44 115.08c5.84 10.12-1.46 22.76-13.14 22.76H15.85c-11.68 0-18.98-12.65-13.14-22.76L69.15 74.16c5.84-10.12 20.44-10.12 26.28 0Zm-7.56 83.55 2.88-44.35c.34-5.29-3.86-9.78-9.16-9.78-5.31 0-9.51 4.48-9.16 9.78l2.88 44.35a6.3 6.3 0 0 0 6.28 5.89c3.31 0 6.06-2.58 6.28-5.89Zm-15.84 23.54c0 5.66 4.76 10.1 10.39 9.58 4.85-.45 8.73-4.5 8.83-9.37.11-5.45-4.31-9.94-9.73-9.94-5.23-.01-9.49 4.37-9.49 9.73Z",
19
+ fill: `url(#${id})`
20
+ }), jsx("path", {
21
+ opacity: ".6",
22
+ d: "M93.35 27.17 85.94.45c-.17-.62-1.07-.58-1.19.05l-4.66 25.1-5.8-1.08a.612.612 0 0 0-.7.76L81 52c.17.62 1.07.58 1.19-.05l4.66-25.1 5.8 1.08c.45.08.82-.33.7-.76ZM66.77 41.81 55.9 33.26c-.22-.18-.53.07-.41.33l5.53 11.43-2.66 1.29c-.18.09-.2.33-.05.45l10.87 8.55c.22.18.53-.07.41-.33l-5.53-11.43 2.66-1.29c.17-.08.2-.33.05-.45Z",
23
+ fill: "#C1C7D0"
24
+ }), jsx("path", {
25
+ opacity: ".6",
26
+ d: "M102.78 56.75a.993.993 0 0 1-.92-1.38c-.24-.77-2.29-2.85-3.54-4.11-2.97-3.01-4.93-5-3.84-6.49 1.09-1.48 3.58-.22 7.35 1.7 1.32.67 3.35 1.7 4.45 2.03-.64-.95-2.24-2.58-3.28-3.63-2.97-3.01-4.93-5-3.84-6.49 1.08-1.48 3.58-.22 7.34 1.7 1.32.67 3.34 1.7 4.45 2.03-.64-.95-2.24-2.57-3.28-3.62-2.97-3.01-4.93-5-3.84-6.49 1.08-1.48 3.57-.22 7.34 1.7 1.58.8 4.18 2.13 4.98 2.13a1.005 1.005 0 0 1 1.46 1.36c-1.09 1.48-3.57.22-7.34-1.7-1.32-.67-3.34-1.7-4.44-2.03.64.95 2.24 2.57 3.28 3.62 2.97 3.01 4.93 5 3.84 6.49-1.08 1.48-3.57.22-7.34-1.7-1.32-.67-3.35-1.7-4.45-2.03.64.95 2.24 2.57 3.28 3.63 2.97 3.01 4.93 5 3.84 6.49-1.09 1.48-3.58.22-7.35-1.7-1.32-.67-3.35-1.71-4.45-2.03.64.95 2.24 2.58 3.28 3.63 2.97 3.01 4.93 5 3.84 6.49-.21.26-.51.4-.82.4Zm5.56 14.32c-.35 0-.69-.19-.88-.52-1.04-1.88-2.22-4.02-.91-5.21 1.31-1.2 3.34.18 5.49 1.63.87.59 2.26 1.53 2.93 1.71-.12-.68-.93-2.15-1.45-3.07-1.26-2.27-2.45-4.41-1.14-5.61 1.31-1.2 3.34.18 5.49 1.63.96.65 2.54 1.72 3.1 1.74a1 1 0 0 1 1.27 1.54c-1.31 1.2-3.34-.17-5.49-1.63-.87-.59-2.26-1.53-2.93-1.71.12.68.93 2.15 1.45 3.07 1.26 2.27 2.45 4.41 1.14 5.61-1.31 1.2-3.34-.18-5.49-1.63-.87-.59-2.26-1.53-2.93-1.71.12.68.93 2.14 1.22 2.67.27.48.09 1.09-.39 1.36-.15.09-.32.13-.48.13Zm-54.32-2.89c-.22 0-.44-.04-.67-.14-1.64-.69-1.24-3.11-.81-5.67.17-1.04.45-2.7.33-3.38-.57.39-1.56 1.75-2.18 2.6-1.53 2.09-2.99 4.07-4.62 3.38a.991.991 0 0 1-.53-1.31c.2-.48.73-.72 1.21-.57.52-.21 1.65-1.75 2.34-2.68 1.53-2.09 2.98-4.08 4.62-3.38 1.64.69 1.24 3.11.81 5.67-.17 1.04-.45 2.7-.33 3.38.57-.39 1.56-1.75 2.18-2.6 1.53-2.09 2.98-4.08 4.62-3.38 1.63.69 1.24 3.09.89 5.21-.09.54-.6.91-1.15.83-.54-.09-.92-.6-.83-1.15.1-.59.37-2.24.26-2.92-.57.39-1.56 1.75-2.18 2.6-1.33 1.79-2.59 3.51-3.96 3.51Z",
27
+ fill: "#B3BAC5"
28
+ }), jsx("defs", null, jsx("linearGradient", {
29
+ id: id,
30
+ x1: "26.169",
31
+ y1: "228.621",
32
+ x2: "138.408",
33
+ y2: "116.382",
34
+ gradientUnits: "userSpaceOnUse"
35
+ }, jsx("stop", {
36
+ stopColor: "#C1C7D0"
37
+ }), jsx("stop", {
38
+ offset: ".297",
39
+ stopColor: "#C6CBD4",
40
+ stopOpacity: ".881"
41
+ }), jsx("stop", {
42
+ offset: ".63",
43
+ stopColor: "#D3D7DE",
44
+ stopOpacity: ".748"
45
+ }), jsx("stop", {
46
+ offset: ".98",
47
+ stopColor: "#E9EBEF",
48
+ stopOpacity: ".608"
49
+ }), jsx("stop", {
50
+ offset: "1",
51
+ stopColor: "#EBECF0",
52
+ stopOpacity: ".6"
53
+ }))));
54
+ };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { FormattedMessage, useIntl } from "react-intl-next";
3
+ import { messages } from '../../../../messages';
4
+ import { ErrorSVG } from "./error-svg";
5
+ import { EmptyState } from '../../components/EmptyState';
6
+ export const RelatedLinksErroredView = () => {
7
+ const intl = useIntl();
8
+ return /*#__PURE__*/React.createElement(EmptyState, {
9
+ renderImage: () => /*#__PURE__*/React.createElement(ErrorSVG, null),
10
+ header: intl.formatMessage(messages.related_links_modal_error_header),
11
+ description: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_error_message)
12
+ });
13
+ };
@@ -724,5 +724,15 @@ export var messages = defineMessages({
724
724
  id: 'fabric.linking.related_links_includes_links_to',
725
725
  defaultMessage: 'Includes Links To',
726
726
  description: 'Informs the user of the resources the url links to'
727
+ },
728
+ related_links_modal_error_header: {
729
+ id: 'fabric.linking.related_links_modal_error_header',
730
+ defaultMessage: 'Something went wrong',
731
+ description: 'Title for related links error'
732
+ },
733
+ related_links_modal_error_message: {
734
+ id: 'fabric.linking.related_links_modal_error_message',
735
+ defaultMessage: 'We ran into an issue trying to load recent links. Check your connection or refresh to try again.',
736
+ description: 'Informs the user that there was a problem loading related links'
727
737
  }
728
738
  });
@@ -0,0 +1,93 @@
1
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
3
+ import { useCallback, useMemo } from 'react';
4
+ import { request } from '@atlaskit/linking-common';
5
+ import { queryIncomingOutgoingLinks as queryIncomingOutgoingAris } from './query';
6
+ /**
7
+ * @param baseUriWithNoTrailingSlash base url which will then be appended with /gateway/api/graphql to make requests to AGG
8
+ */
9
+ export var useIncomingOutgoingAri = function useIncomingOutgoingAri() {
10
+ var baseUriWithNoTrailingSlash = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
11
+ var aggRequestCall = useCallback( /*#__PURE__*/function () {
12
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(body, headers) {
13
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
14
+ while (1) switch (_context.prev = _context.next) {
15
+ case 0:
16
+ return _context.abrupt("return", request('post', baseUriWithNoTrailingSlash + '/gateway/api/graphql', body, headers, [200]));
17
+ case 1:
18
+ case "end":
19
+ return _context.stop();
20
+ }
21
+ }, _callee);
22
+ }));
23
+ return function (_x, _x2) {
24
+ return _ref.apply(this, arguments);
25
+ };
26
+ }(), [baseUriWithNoTrailingSlash]);
27
+ var getIncomingOutgoingAris = useCallback(
28
+ /*#__PURE__*/
29
+ /**
30
+ * Returning aris linking to (outgoing) and from (incoming) a given ari from AGS using
31
+ * https://developer.atlassian.com/cloud/ari-graph-store/relationships/content-referenced-entity/#query
32
+ * @param ari the ari for which the incoming outgoing aris are to be retrieved
33
+ * @param firstIncoming The maximum count of incoming relationships to fetch. Must not exceed 1000. This max limit is handled by AGG itself. Default is 50 (ORS batch max limit)
34
+ * @param firstOutgoing The maximum count of outgoing relationships to fetch. Must not exceed 1000. This max limit is handled by AGG itself. Default is 50 (ORS batch max limit)
35
+ *
36
+ */
37
+ function () {
38
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(ari) {
39
+ var _response$data$graphS, _response$data, _response$data$graphS2, _response$data2;
40
+ var firstIncoming,
41
+ firstOutgoing,
42
+ response,
43
+ incomingAris,
44
+ outgoingAris,
45
+ _args2 = arguments;
46
+ return _regeneratorRuntime.wrap(function _callee2$(_context2) {
47
+ while (1) switch (_context2.prev = _context2.next) {
48
+ case 0:
49
+ firstIncoming = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 50;
50
+ firstOutgoing = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : 50;
51
+ _context2.next = 4;
52
+ return aggRequestCall({
53
+ variables: {
54
+ ids: [ari],
55
+ firstIncoming: firstIncoming,
56
+ firstOutgoing: firstOutgoing
57
+ },
58
+ query: queryIncomingOutgoingAris
59
+ });
60
+ case 4:
61
+ response = _context2.sent;
62
+ incomingAris = (_response$data$graphS = response === null || response === void 0 || (_response$data = response.data) === null || _response$data === void 0 || (_response$data = _response$data.graphStore) === null || _response$data === void 0 || (_response$data = _response$data.incoming) === null || _response$data === void 0 || (_response$data = _response$data.nodes) === null || _response$data === void 0 || (_response$data = _response$data.map(function (node) {
63
+ var _node$from;
64
+ return node === null || node === void 0 || (_node$from = node.from) === null || _node$from === void 0 ? void 0 : _node$from.id;
65
+ })) === null || _response$data === void 0 ? void 0 : _response$data.filter(function (id) {
66
+ return !!id;
67
+ })) !== null && _response$data$graphS !== void 0 ? _response$data$graphS : [];
68
+ outgoingAris = (_response$data$graphS2 = response === null || response === void 0 || (_response$data2 = response.data) === null || _response$data2 === void 0 || (_response$data2 = _response$data2.graphStore) === null || _response$data2 === void 0 || (_response$data2 = _response$data2.outgoing) === null || _response$data2 === void 0 || (_response$data2 = _response$data2.nodes) === null || _response$data2 === void 0 || (_response$data2 = _response$data2.map(function (node) {
69
+ var _node$to;
70
+ return node === null || node === void 0 || (_node$to = node.to) === null || _node$to === void 0 ? void 0 : _node$to.id;
71
+ })) === null || _response$data2 === void 0 ? void 0 : _response$data2.filter(function (id) {
72
+ return !!id;
73
+ })) !== null && _response$data$graphS2 !== void 0 ? _response$data$graphS2 : [];
74
+ return _context2.abrupt("return", {
75
+ incomingAris: incomingAris,
76
+ outgoingAris: outgoingAris
77
+ });
78
+ case 8:
79
+ case "end":
80
+ return _context2.stop();
81
+ }
82
+ }, _callee2);
83
+ }));
84
+ return function (_x3) {
85
+ return _ref2.apply(this, arguments);
86
+ };
87
+ }(), [aggRequestCall]);
88
+ return useMemo(function () {
89
+ return {
90
+ getIncomingOutgoingAris: getIncomingOutgoingAris
91
+ };
92
+ }, [getIncomingOutgoingAris]);
93
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * AGG query to retrieve incoming/outgoing links from AGS
3
+ * https://developer.atlassian.com/cloud/ari-graph-store/relationships/content-referenced-entity/#batch-query
4
+ */
5
+ export var queryIncomingOutgoingLinks = "\n query SmartCard_ContentReferencedEntityBatchQuery_V1($ids: [ID!]!, $firstIncoming: Int = 50, $firstOutgoing: Int = 50) {\n graphStore @optIn(to: \"GraphStore\") {\n incoming: contentReferencedEntityInverseBatch(ids: $ids, first: $firstIncoming) @optIn(to: \"GraphStoreContentReferencedEntity\") {\n nodes {\n from {\n id\n }\n }\n }\n outgoing: contentReferencedEntityBatch(ids: $ids, first: $firstOutgoing) @optIn(to: \"GraphStoreContentReferencedEntity\") {\n nodes {\n to {\n id\n }\n }\n }\n }\n }";
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
15
15
  export var context = {
16
16
  componentName: 'smart-cards',
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "27.4.2"
18
+ packageVersion: "27.4.3"
19
19
  };
20
20
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
21
21
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "27.4.2",
13
+ packageVersion: "27.4.3",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import Heading from '@atlaskit/heading';
3
+ import { Box, xcss } from '@atlaskit/primitives';
4
+ var emptyStateStyles = xcss({
5
+ alignItems: "center",
6
+ display: 'flex',
7
+ flexDirection: 'column',
8
+ gap: "space.100",
9
+ height: '100%',
10
+ justifyContent: 'center',
11
+ marginLeft: 'space.300',
12
+ marginRight: 'space.300',
13
+ textAlign: 'center'
14
+ });
15
+ var descriptionStyles = xcss({
16
+ marginTop: "var(--ds-space-0, 0px)",
17
+ marginBottom: "var(--ds-space-300, 24px)",
18
+ color: 'color.text'
19
+ });
20
+ export var EmptyState = function EmptyState(_ref) {
21
+ var testId = _ref.testId,
22
+ header = _ref.header,
23
+ description = _ref.description,
24
+ renderImage = _ref.renderImage;
25
+ return /*#__PURE__*/React.createElement(Box, {
26
+ xcss: emptyStateStyles,
27
+ testId: testId
28
+ }, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(Heading, {
29
+ size: "small"
30
+ }, header), description && /*#__PURE__*/React.createElement(Box, {
31
+ as: "p",
32
+ xcss: descriptionStyles
33
+ }, description));
34
+ };
@@ -0,0 +1,54 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ /** @jsx jsx */
3
+ import { css, jsx } from '@emotion/react';
4
+ var errorStyles = css({
5
+ width: '80px',
6
+ margin: "0 auto ".concat("var(--ds-space-300, 24px)"),
7
+ display: 'block'
8
+ });
9
+ export var ErrorSVG = function ErrorSVG(props) {
10
+ var id = 'related-links-error-svg';
11
+ return jsx("svg", _extends({
12
+ "data-testid": id,
13
+ viewBox: "0 0 164 212",
14
+ fill: "none",
15
+ xmlns: "http://www.w3.org/2000/svg",
16
+ css: errorStyles
17
+ }, props), jsx("path", {
18
+ d: "m95.43 74.16 66.44 115.08c5.84 10.12-1.46 22.76-13.14 22.76H15.85c-11.68 0-18.98-12.65-13.14-22.76L69.15 74.16c5.84-10.12 20.44-10.12 26.28 0Zm-7.56 83.55 2.88-44.35c.34-5.29-3.86-9.78-9.16-9.78-5.31 0-9.51 4.48-9.16 9.78l2.88 44.35a6.3 6.3 0 0 0 6.28 5.89c3.31 0 6.06-2.58 6.28-5.89Zm-15.84 23.54c0 5.66 4.76 10.1 10.39 9.58 4.85-.45 8.73-4.5 8.83-9.37.11-5.45-4.31-9.94-9.73-9.94-5.23-.01-9.49 4.37-9.49 9.73Z",
19
+ fill: "url(#".concat(id, ")")
20
+ }), jsx("path", {
21
+ opacity: ".6",
22
+ d: "M93.35 27.17 85.94.45c-.17-.62-1.07-.58-1.19.05l-4.66 25.1-5.8-1.08a.612.612 0 0 0-.7.76L81 52c.17.62 1.07.58 1.19-.05l4.66-25.1 5.8 1.08c.45.08.82-.33.7-.76ZM66.77 41.81 55.9 33.26c-.22-.18-.53.07-.41.33l5.53 11.43-2.66 1.29c-.18.09-.2.33-.05.45l10.87 8.55c.22.18.53-.07.41-.33l-5.53-11.43 2.66-1.29c.17-.08.2-.33.05-.45Z",
23
+ fill: "#C1C7D0"
24
+ }), jsx("path", {
25
+ opacity: ".6",
26
+ d: "M102.78 56.75a.993.993 0 0 1-.92-1.38c-.24-.77-2.29-2.85-3.54-4.11-2.97-3.01-4.93-5-3.84-6.49 1.09-1.48 3.58-.22 7.35 1.7 1.32.67 3.35 1.7 4.45 2.03-.64-.95-2.24-2.58-3.28-3.63-2.97-3.01-4.93-5-3.84-6.49 1.08-1.48 3.58-.22 7.34 1.7 1.32.67 3.34 1.7 4.45 2.03-.64-.95-2.24-2.57-3.28-3.62-2.97-3.01-4.93-5-3.84-6.49 1.08-1.48 3.57-.22 7.34 1.7 1.58.8 4.18 2.13 4.98 2.13a1.005 1.005 0 0 1 1.46 1.36c-1.09 1.48-3.57.22-7.34-1.7-1.32-.67-3.34-1.7-4.44-2.03.64.95 2.24 2.57 3.28 3.62 2.97 3.01 4.93 5 3.84 6.49-1.08 1.48-3.57.22-7.34-1.7-1.32-.67-3.35-1.7-4.45-2.03.64.95 2.24 2.57 3.28 3.63 2.97 3.01 4.93 5 3.84 6.49-1.09 1.48-3.58.22-7.35-1.7-1.32-.67-3.35-1.71-4.45-2.03.64.95 2.24 2.58 3.28 3.63 2.97 3.01 4.93 5 3.84 6.49-.21.26-.51.4-.82.4Zm5.56 14.32c-.35 0-.69-.19-.88-.52-1.04-1.88-2.22-4.02-.91-5.21 1.31-1.2 3.34.18 5.49 1.63.87.59 2.26 1.53 2.93 1.71-.12-.68-.93-2.15-1.45-3.07-1.26-2.27-2.45-4.41-1.14-5.61 1.31-1.2 3.34.18 5.49 1.63.96.65 2.54 1.72 3.1 1.74a1 1 0 0 1 1.27 1.54c-1.31 1.2-3.34-.17-5.49-1.63-.87-.59-2.26-1.53-2.93-1.71.12.68.93 2.15 1.45 3.07 1.26 2.27 2.45 4.41 1.14 5.61-1.31 1.2-3.34-.18-5.49-1.63-.87-.59-2.26-1.53-2.93-1.71.12.68.93 2.14 1.22 2.67.27.48.09 1.09-.39 1.36-.15.09-.32.13-.48.13Zm-54.32-2.89c-.22 0-.44-.04-.67-.14-1.64-.69-1.24-3.11-.81-5.67.17-1.04.45-2.7.33-3.38-.57.39-1.56 1.75-2.18 2.6-1.53 2.09-2.99 4.07-4.62 3.38a.991.991 0 0 1-.53-1.31c.2-.48.73-.72 1.21-.57.52-.21 1.65-1.75 2.34-2.68 1.53-2.09 2.98-4.08 4.62-3.38 1.64.69 1.24 3.11.81 5.67-.17 1.04-.45 2.7-.33 3.38.57-.39 1.56-1.75 2.18-2.6 1.53-2.09 2.98-4.08 4.62-3.38 1.63.69 1.24 3.09.89 5.21-.09.54-.6.91-1.15.83-.54-.09-.92-.6-.83-1.15.1-.59.37-2.24.26-2.92-.57.39-1.56 1.75-2.18 2.6-1.33 1.79-2.59 3.51-3.96 3.51Z",
27
+ fill: "#B3BAC5"
28
+ }), jsx("defs", null, jsx("linearGradient", {
29
+ id: id,
30
+ x1: "26.169",
31
+ y1: "228.621",
32
+ x2: "138.408",
33
+ y2: "116.382",
34
+ gradientUnits: "userSpaceOnUse"
35
+ }, jsx("stop", {
36
+ stopColor: "#C1C7D0"
37
+ }), jsx("stop", {
38
+ offset: ".297",
39
+ stopColor: "#C6CBD4",
40
+ stopOpacity: ".881"
41
+ }), jsx("stop", {
42
+ offset: ".63",
43
+ stopColor: "#D3D7DE",
44
+ stopOpacity: ".748"
45
+ }), jsx("stop", {
46
+ offset: ".98",
47
+ stopColor: "#E9EBEF",
48
+ stopOpacity: ".608"
49
+ }), jsx("stop", {
50
+ offset: "1",
51
+ stopColor: "#EBECF0",
52
+ stopOpacity: ".6"
53
+ }))));
54
+ };
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { FormattedMessage, useIntl } from "react-intl-next";
3
+ import { messages } from '../../../../messages';
4
+ import { ErrorSVG } from "./error-svg";
5
+ import { EmptyState } from '../../components/EmptyState';
6
+ export var RelatedLinksErroredView = function RelatedLinksErroredView() {
7
+ var intl = useIntl();
8
+ return /*#__PURE__*/React.createElement(EmptyState, {
9
+ renderImage: function renderImage() {
10
+ return /*#__PURE__*/React.createElement(ErrorSVG, null);
11
+ },
12
+ header: intl.formatMessage(messages.related_links_modal_error_header),
13
+ description: /*#__PURE__*/React.createElement(FormattedMessage, messages.related_links_modal_error_message)
14
+ });
15
+ };
@@ -1,6 +1,6 @@
1
1
  import { type MessageDescriptor } from 'react-intl-next';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
- export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found';
3
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_message' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found';
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @param baseUriWithNoTrailingSlash base url which will then be appended with /gateway/api/graphql to make requests to AGG
3
+ */
4
+ export declare const useIncomingOutgoingAri: (baseUriWithNoTrailingSlash?: string) => {
5
+ getIncomingOutgoingAris: (ari: string, firstIncoming?: number, firstOutgoing?: number) => Promise<{
6
+ incomingAris: string[];
7
+ outgoingAris: string[];
8
+ }>;
9
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * AGG query to retrieve incoming/outgoing links from AGS
3
+ * https://developer.atlassian.com/cloud/ari-graph-store/relationships/content-referenced-entity/#batch-query
4
+ */
5
+ export declare const queryIncomingOutgoingLinks = "\n query SmartCard_ContentReferencedEntityBatchQuery_V1($ids: [ID!]!, $firstIncoming: Int = 50, $firstOutgoing: Int = 50) {\n graphStore @optIn(to: \"GraphStore\") {\n incoming: contentReferencedEntityInverseBatch(ids: $ids, first: $firstIncoming) @optIn(to: \"GraphStoreContentReferencedEntity\") {\n nodes {\n from {\n id\n }\n }\n }\n outgoing: contentReferencedEntityBatch(ids: $ids, first: $firstOutgoing) @optIn(to: \"GraphStoreContentReferencedEntity\") {\n nodes {\n to {\n id\n }\n }\n }\n }\n }";
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type EmptyStateProps = {
3
+ header: string;
4
+ testId?: string;
5
+ description?: React.ReactNode;
6
+ renderImage?: () => React.ReactNode;
7
+ };
8
+ export declare const EmptyState: ({ testId, header, description, renderImage, }: EmptyStateProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const ErrorSVG: (props: React.SVGProps<SVGSVGElement>) => jsx.JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const RelatedLinksErroredView: () => JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { type MessageDescriptor } from 'react-intl-next';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
- export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found';
3
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_description' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message' | 'related_links_modal_error_header' | 'related_links_modal_error_message' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found';
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @param baseUriWithNoTrailingSlash base url which will then be appended with /gateway/api/graphql to make requests to AGG
3
+ */
4
+ export declare const useIncomingOutgoingAri: (baseUriWithNoTrailingSlash?: string) => {
5
+ getIncomingOutgoingAris: (ari: string, firstIncoming?: number, firstOutgoing?: number) => Promise<{
6
+ incomingAris: string[];
7
+ outgoingAris: string[];
8
+ }>;
9
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * AGG query to retrieve incoming/outgoing links from AGS
3
+ * https://developer.atlassian.com/cloud/ari-graph-store/relationships/content-referenced-entity/#batch-query
4
+ */
5
+ export declare const queryIncomingOutgoingLinks = "\n query SmartCard_ContentReferencedEntityBatchQuery_V1($ids: [ID!]!, $firstIncoming: Int = 50, $firstOutgoing: Int = 50) {\n graphStore @optIn(to: \"GraphStore\") {\n incoming: contentReferencedEntityInverseBatch(ids: $ids, first: $firstIncoming) @optIn(to: \"GraphStoreContentReferencedEntity\") {\n nodes {\n from {\n id\n }\n }\n }\n outgoing: contentReferencedEntityBatch(ids: $ids, first: $firstOutgoing) @optIn(to: \"GraphStoreContentReferencedEntity\") {\n nodes {\n to {\n id\n }\n }\n }\n }\n }";
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type EmptyStateProps = {
3
+ header: string;
4
+ testId?: string;
5
+ description?: React.ReactNode;
6
+ renderImage?: () => React.ReactNode;
7
+ };
8
+ export declare const EmptyState: ({ testId, header, description, renderImage, }: EmptyStateProps) => JSX.Element;
9
+ export {};
@@ -0,0 +1,3 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const ErrorSVG: (props: React.SVGProps<SVGSVGElement>) => jsx.JSX.Element;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const RelatedLinksErroredView: () => JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "27.4.2",
3
+ "version": "27.4.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -36,7 +36,7 @@
36
36
  "@atlaskit/button": "^17.17.0",
37
37
  "@atlaskit/checkbox": "^13.4.0",
38
38
  "@atlaskit/dropdown-menu": "^12.10.0",
39
- "@atlaskit/form": "^10.2.0",
39
+ "@atlaskit/form": "^10.3.0",
40
40
  "@atlaskit/frontend-utilities": "^2.7.0",
41
41
  "@atlaskit/heading": "^2.3.0",
42
42
  "@atlaskit/icon": "^22.3.0",