@atlaskit/link-picker 1.0.0 → 1.1.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,23 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 1.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`28f54174eaf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/28f54174eaf) - Removes example-helpers from built distribution. Fixes missing /dist from previous patch.
8
+
9
+ ## 1.1.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`780484d9518`](https://bitbucket.org/atlassian/atlassian-frontend/commits/780484d9518) - Fixes missing svg asset for no search results in version 1.1.0.
14
+
15
+ ## 1.1.0
16
+
17
+ ### Minor Changes
18
+
19
+ - [`ba5d8ed23cc`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba5d8ed23cc) - Adds search error message
20
+
3
21
  ## 1.0.0
4
22
 
5
23
  ### Major Changes
@@ -89,14 +89,24 @@ var messages = (0, _reactIntlNext.defineMessages)({
89
89
  description: 'Describes type of items shown in the list for screen-reader users'
90
90
  },
91
91
  cancelButton: {
92
- id: 'fabric.linkPicker.cancel.button',
92
+ id: 'fabric.linkPicker.button.cancel',
93
93
  defaultMessage: 'Cancel',
94
94
  description: 'Button to cancel and dismiss the link picker'
95
95
  },
96
96
  insertButton: {
97
- id: 'fabric.linkPicker.cancel.insert',
97
+ id: 'fabric.linkPicker.button.insert',
98
98
  defaultMessage: 'Insert',
99
99
  description: 'Button to insert searched or selected link'
100
+ },
101
+ noResults: {
102
+ id: 'fabric.linkPicker.search.noResults.heading',
103
+ defaultMessage: 'We couldn’t find anything matching your search.',
104
+ description: 'Heading message shown when a search has no results'
105
+ },
106
+ noResultsDescription: {
107
+ id: 'fabric.linkPicker.search.noResults.description',
108
+ defaultMessage: 'Try again with a different term.',
109
+ description: 'Describes possible action when a search returns no results'
100
110
  }
101
111
  });
102
112
  exports.messages = messages;
@@ -57,6 +57,8 @@ var _search = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/search
57
57
 
58
58
  var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
59
59
 
60
+ var _linkSearchNoResults = _interopRequireDefault(require("./link-search-no-results"));
61
+
60
62
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
61
63
 
62
64
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
@@ -495,6 +497,7 @@ var LinkPicker = /*#__PURE__*/function (_PureComponent) {
495
497
  size: "medium",
496
498
  label: ''
497
499
  }));
500
+ var noResults = activePlugin && !isLoading && !items.length && !(0, _url.isSafeUrl)(url);
498
501
  return (0, _react2.jsx)("div", {
499
502
  "data-testid": "link-picker",
500
503
  className: "recent-list",
@@ -566,6 +569,10 @@ var LinkPicker = /*#__PURE__*/function (_PureComponent) {
566
569
  onSelect: this.handleSelected,
567
570
  onMouseEnter: this.handleMouseEnterResultItem,
568
571
  onMouseLeave: this.handleMouseLeaveResultItem
572
+ }), noResults && (0, _react2.jsx)(_linkSearchNoResults.default, {
573
+ testId: "link-search-no-results",
574
+ header: formatMessage(_messages.messages.noResults),
575
+ description: formatMessage(_messages.messages.noResultsDescription)
569
576
  }), (0, _react2.jsx)(_form.FormFooter, {
570
577
  align: "end"
571
578
  }, (0, _react2.jsx)(_button.ButtonGroup, null, (0, _react2.jsx)(_button.default, {
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _react = _interopRequireDefault(require("react"));
13
+
14
+ var _emptyState = _interopRequireDefault(require("@atlaskit/empty-state"));
15
+
16
+ var _noResults = _interopRequireDefault(require("./no-results.svg"));
17
+
18
+ var NoResults = function NoResults(props) {
19
+ return /*#__PURE__*/_react.default.createElement(_emptyState.default, (0, _extends2.default)({}, props, {
20
+ imageUrl: _noResults.default,
21
+ maxImageWidth: 130,
22
+ maxImageHeight: 130
23
+ }));
24
+ };
25
+
26
+ var _default = NoResults;
27
+ exports.default = _default;
@@ -0,0 +1,38 @@
1
+ <svg width="208" height="191" viewBox="0 0 208 191" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1442_1680)">
3
+ <rect width="207.16" height="189.87" transform="translate(0 0.619141)" fill="white" fill-opacity="0.01"/>
4
+ <path opacity="0.3" d="M105.28 190.44C104.35 190.47 103.42 190.49 102.49 190.5C101.19 190.51 100.13 189.46 100.13 188.16C100.12 186.89 101.13 185.84 102.4 185.8C102.42 185.8 102.45 185.8 102.47 185.8C108.4 185.77 114.42 185.13 120.21 183.9C121.48 183.63 122.73 184.44 123 185.71C123.27 186.98 122.46 188.23 121.19 188.5C115.98 189.59 110.63 190.25 105.28 190.44Z" fill="#B3BAC5"/>
5
+ <path opacity="0.3" d="M89.77 189.649C89.64 189.649 89.5 189.649 89.36 189.629C83.14 188.769 77 187.259 71.09 185.139C69.87 184.699 69.23 183.359 69.67 182.129C70.11 180.909 71.46 180.269 72.68 180.709C78.28 182.719 84.1 184.149 90 184.959C91.29 185.139 92.19 186.319 92.01 187.609C91.86 188.769 90.89 189.609 89.77 189.649Z" fill="#B3BAC5"/>
6
+ <path opacity="0.3" d="M133.08 184.98C132.09 185.01 131.15 184.42 130.79 183.44C130.34 182.22 130.96 180.87 132.18 180.42C137.76 178.36 143.14 175.71 148.19 172.55C149.29 171.86 150.74 172.19 151.43 173.29C152.12 174.39 151.79 175.84 150.69 176.53C145.37 179.86 139.69 182.66 133.82 184.83C133.57 184.93 133.33 184.97 133.08 184.98Z" fill="#B3BAC5"/>
7
+ <path opacity="0.3" d="M60.25 180.089C59.85 180.099 59.44 180.019 59.07 179.819C53.54 176.879 48.28 173.349 43.46 169.339C42.46 168.509 42.32 167.029 43.15 166.029C43.98 165.029 45.46 164.889 46.46 165.719C51.04 169.529 56.02 172.869 61.27 175.659C62.42 176.269 62.85 177.689 62.24 178.839C61.83 179.619 61.06 180.069 60.25 180.089Z" fill="#B3BAC5"/>
8
+ <path opacity="0.3" d="M35.79 161.01C35.12 161.03 34.44 160.77 33.96 160.24C29.75 155.58 26.01 150.48 22.85 145.07C22.19 143.95 22.57 142.51 23.69 141.85C24.81 141.19 26.25 141.57 26.91 142.69C29.91 147.82 33.46 152.66 37.45 157.08C38.32 158.04 38.25 159.53 37.28 160.4C36.85 160.79 36.32 160.99 35.79 161.01Z" fill="#B3BAC5"/>
9
+ <path opacity="0.3" d="M179.7 145.469C179.28 145.479 178.84 145.389 178.45 145.159C177.32 144.509 176.93 143.079 177.58 141.949C180.54 136.779 182.97 131.289 184.8 125.639C185.2 124.399 186.53 123.729 187.76 124.129C189 124.529 189.67 125.859 189.27 127.089C187.34 133.049 184.77 138.829 181.65 144.279C181.24 145.019 180.49 145.439 179.7 145.469Z" fill="#B3BAC5"/>
10
+ <path opacity="0.3" d="M19.3 134.749C18.34 134.779 17.42 134.219 17.04 133.279C14.68 127.469 12.92 121.399 11.81 115.219C11.58 113.939 12.43 112.719 13.71 112.489C14.99 112.259 16.21 113.109 16.44 114.389C17.5 120.249 19.17 126.009 21.4 131.519C21.89 132.719 21.31 134.099 20.1 134.579C19.84 134.679 19.57 134.739 19.3 134.749Z" fill="#B3BAC5"/>
11
+ <path opacity="0.3" d="M190.19 116.26C190.03 116.27 189.87 116.26 189.71 116.23C188.43 116.01 187.57 114.8 187.79 113.52C188.79 107.68 189.18 101.69 188.97 95.7197L188.96 95.5197C188.91 94.2197 189.93 93.1297 191.23 93.0897C192.53 93.0397 193.62 94.0597 193.66 95.3597L193.67 95.5597C193.89 101.85 193.47 108.16 192.42 114.32C192.23 115.43 191.28 116.22 190.19 116.26Z" fill="#B3BAC5"/>
12
+ <path opacity="0.3" d="M12.82 104.36C11.52 104.41 10.43 103.44 10.39 102.14V102.04C10.17 95.7795 10.58 89.4995 11.62 83.3795C11.84 82.0995 13.05 81.2395 14.33 81.4495C15.61 81.6695 16.47 82.8795 16.26 84.1595C15.28 89.9695 14.88 95.9295 15.09 101.86C15.14 103.17 14.12 104.31 12.82 104.36Z" fill="#B3BAC5"/>
13
+ <path opacity="0.3" d="M190 85.05C188.85 85.09 187.82 84.28 187.61 83.12C186.54 77.26 184.87 71.5 182.63 66C182.14 64.8 182.72 63.42 183.92 62.93C185.12 62.44 186.5 63.02 186.99 64.22C189.35 70.02 191.12 76.1 192.24 82.28C192.47 83.56 191.63 84.78 190.35 85.02C190.23 85.03 190.12 85.04 190 85.05Z" fill="#B3BAC5"/>
14
+ <path opacity="0.3" d="M17.07 73.6685C16.8 73.6785 16.53 73.6385 16.26 73.5585C15.02 73.1585 14.35 71.8285 14.75 70.5985C16.68 64.6385 19.23 58.8485 22.35 53.3985C22.99 52.2685 24.43 51.8785 25.56 52.5185C26.69 53.1585 27.08 54.5985 26.44 55.7285C23.49 60.8985 21.06 66.3885 19.23 72.0485C18.91 73.0085 18.03 73.6385 17.07 73.6685Z" fill="#B3BAC5"/>
15
+ <path opacity="0.3" d="M179.22 55.9797C178.38 56.0097 177.56 55.5897 177.11 54.8197C174.1 49.6997 170.55 44.8597 166.55 40.4397C165.68 39.4797 165.75 37.9897 166.72 37.1197C167.68 36.2497 169.17 36.3197 170.04 37.2897C174.26 41.9497 178 47.0397 181.17 52.4397C181.83 53.5597 181.45 54.9997 180.33 55.6597C179.98 55.8597 179.6 55.9597 179.22 55.9797Z" fill="#B3BAC5"/>
16
+ <path opacity="0.3" d="M31.61 46.2591C31.08 46.2791 30.54 46.1191 30.08 45.7591C29.06 44.9591 28.87 43.4791 29.67 42.4591C33.53 37.5091 37.9 32.9491 42.68 28.8891C43.67 28.0491 45.15 28.1691 46 29.1591C46.84 30.1491 46.72 31.6291 45.73 32.4791C41.2 36.3291 37.04 40.6691 33.38 45.3591C32.94 45.9291 32.28 46.2391 31.61 46.2591Z" fill="#B3BAC5"/>
17
+ <path opacity="0.3" d="M159.12 32.3496C158.56 32.3696 158 32.1896 157.54 31.8096C152.95 28.0096 147.97 24.6696 142.71 21.8796C141.56 21.2696 141.12 19.8496 141.73 18.6996C142.34 17.5496 143.76 17.1196 144.91 17.7196C150.44 20.6496 155.7 24.1696 160.53 28.1796C161.53 29.0096 161.67 30.4896 160.84 31.4896C160.4 32.0296 159.76 32.3196 159.12 32.3496Z" fill="#B3BAC5"/>
18
+ <path opacity="0.3" d="M54.62 25.4492C53.81 25.4792 53.01 25.0892 52.54 24.3492C51.85 23.2492 52.18 21.7992 53.28 21.1092C58.6 17.7692 64.27 14.9692 70.15 12.7892C71.37 12.3392 72.72 12.9592 73.17 14.1792C73.62 15.3992 73 16.7492 71.78 17.1992C66.21 19.2592 60.83 21.9192 55.78 25.0892C55.42 25.3192 55.02 25.4392 54.62 25.4492Z" fill="#B3BAC5"/>
19
+ <path opacity="0.3" d="M132.16 16.9787C131.87 16.9887 131.57 16.9487 131.29 16.8387C125.69 14.8387 119.86 13.4187 113.96 12.6087C112.67 12.4287 111.77 11.2487 111.95 9.9587C112.13 8.6687 113.32 7.7687 114.6 7.9487C120.82 8.7987 126.96 10.2987 132.87 12.4087C134.09 12.8487 134.73 14.1887 134.29 15.4187C133.96 16.3487 133.09 16.9487 132.16 16.9787Z" fill="#B3BAC5"/>
20
+ <path opacity="0.3" d="M83.36 13.7797C82.24 13.8197 81.22 13.0497 80.98 11.9197C80.71 10.6497 81.52 9.39968 82.79 9.12968C88.9 7.82968 95.24 7.14968 101.48 7.09968C102.78 7.08968 103.84 8.13968 103.85 9.43968C103.86 10.7197 102.85 11.7597 101.58 11.8097C101.56 11.8097 101.53 11.8097 101.51 11.8097C95.58 11.8397 89.56 12.4997 83.77 13.7297C83.63 13.7597 83.49 13.7697 83.36 13.7797Z" fill="#B3BAC5"/>
21
+ <path opacity="0.3" d="M190.8 34.8096C190.55 34.7396 190.38 34.5096 190.41 34.2496C190.43 34.0996 190.45 33.9496 190.47 33.7996C190.52 33.5096 190.58 33.1996 190.66 32.8796C190.96 31.7296 191.51 30.6996 192.3 29.7896C193.09 28.8796 194.23 28.1196 195.7 27.5296L198.18 26.5196C199.66 25.9296 200.57 24.9496 200.93 23.5996C201.06 23.1096 201.1 22.6096 201.05 22.0896C201 21.5696 200.85 21.0796 200.58 20.6296C200.31 20.1796 199.94 19.7696 199.45 19.4096C198.96 19.0496 198.36 18.7796 197.64 18.5896C196.86 18.3896 196.17 18.3596 195.55 18.4996C194.93 18.6396 194.38 18.8896 193.9 19.2396C193.42 19.5896 193.02 20.0396 192.7 20.5796C192.37 21.1196 192.13 21.6996 191.97 22.2996C191.92 22.4796 191.88 22.6596 191.85 22.8196C191.76 23.2896 191.29 23.5696 190.83 23.4296L187 22.2596C186.64 22.1496 186.39 21.7996 186.43 21.4296C186.44 21.3096 186.46 21.1896 186.48 21.0696C186.54 20.7296 186.61 20.4096 186.69 20.0896C186.99 18.9396 187.5 17.8696 188.22 16.8796C188.94 15.8896 189.83 15.0796 190.89 14.4496C191.95 13.8196 193.15 13.4096 194.51 13.2096C195.87 13.0096 197.35 13.1296 198.96 13.5496C200.63 13.9896 202.03 14.6196 203.16 15.4396C204.3 16.2596 205.19 17.1796 205.84 18.1896C206.49 19.2096 206.9 20.2896 207.06 21.4396C207.22 22.5896 207.16 23.7096 206.87 24.7996C206.42 26.5196 205.64 27.8896 204.55 28.9096C203.45 29.9296 202.14 30.7296 200.6 31.2996L198.51 32.0896C197.92 32.2796 197.04 32.6696 196.31 33.4696C196.24 33.5496 195.94 33.8796 195.64 34.3896C195.42 34.7696 195.26 35.1396 195.15 35.4596C195.06 35.7196 194.78 35.8596 194.52 35.7896L190.8 34.8096ZM187.74 40.6796C187.99 39.7296 188.53 39.0096 189.37 38.5096C190.21 38.0096 191.1 37.8796 192.05 38.1296C193 38.3796 193.72 38.9296 194.22 39.7796C194.72 40.6296 194.84 41.5296 194.59 42.4796C194.34 43.4296 193.79 44.1396 192.94 44.6296C192.09 45.1096 191.19 45.2296 190.25 44.9796C189.3 44.7296 188.58 44.1896 188.1 43.3596C187.61 42.5196 187.49 41.6296 187.74 40.6796Z" fill="#C1C7D0"/>
22
+ <path opacity="0.3" d="M18.51 21.9392C18.27 21.8592 18.11 21.6092 18.16 21.3592C18.19 21.2092 18.22 21.0592 18.25 20.9092C18.32 20.6192 18.4 20.3192 18.51 20.0092C18.89 18.8792 19.5 17.8892 20.36 17.0392C21.21 16.1792 22.39 15.5092 23.91 15.0092L26.45 14.1692C27.96 13.6792 28.94 12.7692 29.39 11.4392C29.55 10.9592 29.63 10.4592 29.61 9.93915C29.6 9.41915 29.47 8.91915 29.24 8.44915C29.01 7.97915 28.66 7.54915 28.19 7.15915C27.73 6.76915 27.14 6.45915 26.44 6.21915C25.68 5.95915 24.98 5.88915 24.36 5.98915C23.73 6.08915 23.17 6.29915 22.67 6.61915C22.17 6.93915 21.74 7.35915 21.38 7.87915C21 8.39915 20.72 8.95915 20.52 9.54915C20.46 9.72915 20.41 9.89915 20.37 10.0592C20.25 10.5192 19.76 10.7692 19.31 10.5992L15.57 9.17915C15.22 9.04915 15 8.67915 15.06 8.30915C15.08 8.18915 15.11 8.06915 15.14 7.94915C15.22 7.61915 15.31 7.29915 15.42 6.98915C15.8 5.85915 16.38 4.82915 17.17 3.88915C17.96 2.94915 18.9 2.19915 19.99 1.63915C21.09 1.07915 22.32 0.749152 23.68 0.649152C25.05 0.549152 26.52 0.759152 28.09 1.28915C29.72 1.83915 31.08 2.55915 32.16 3.45915C33.24 4.35915 34.07 5.32915 34.65 6.38915C35.23 7.44915 35.57 8.54915 35.65 9.70915C35.73 10.8692 35.59 11.9792 35.23 13.0492C34.66 14.7392 33.8 16.0492 32.63 16.9892C31.47 17.9292 30.1 18.6392 28.53 19.1092L26.39 19.7492C25.79 19.8992 24.88 20.2292 24.1 20.9792C24.02 21.0592 23.7 21.3692 23.37 21.8492C23.12 22.2192 22.94 22.5692 22.81 22.8792C22.71 23.1292 22.42 23.2592 22.16 23.1692L18.51 21.9392ZM15.06 27.5892C15.37 26.6592 15.96 25.9692 16.83 25.5292C17.7 25.0892 18.6 25.0192 19.53 25.3292C20.46 25.6392 21.14 26.2392 21.58 27.1192C22.02 27.9992 22.08 28.9092 21.77 29.8392C21.46 30.7692 20.86 31.4492 19.98 31.8692C19.1 32.2892 18.2 32.3492 17.27 32.0392C16.34 31.7292 15.66 31.1392 15.23 30.2692C14.81 29.4192 14.75 28.5192 15.06 27.5892Z" fill="#C1C7D0"/>
23
+ <path opacity="0.3" d="M12.39 180.998C12.15 181.088 11.87 180.998 11.75 180.768C11.68 180.638 11.61 180.498 11.54 180.358C11.41 180.088 11.29 179.798 11.17 179.498C10.76 178.388 10.61 177.228 10.74 176.028C10.87 174.828 11.36 173.558 12.23 172.218L13.68 169.968C14.55 168.638 14.74 167.308 14.25 165.998C14.07 165.528 13.82 165.088 13.48 164.688C13.14 164.288 12.74 163.978 12.26 163.758C11.78 163.538 11.24 163.428 10.63 163.408C10.02 163.398 9.37001 163.518 8.68001 163.778C7.93001 164.058 7.34001 164.428 6.91001 164.908C6.48001 165.378 6.18001 165.898 5.99001 166.458C5.80001 167.018 5.73001 167.618 5.77001 168.248C5.81001 168.878 5.94001 169.488 6.16001 170.078C6.23001 170.258 6.29001 170.418 6.36001 170.568C6.56001 170.998 6.33001 171.508 5.88001 171.658L2.08001 172.898C1.72001 173.018 1.32001 172.868 1.14001 172.538C1.08001 172.428 1.03001 172.318 0.970012 172.208C0.820012 171.898 0.690012 171.588 0.580012 171.288C0.170012 170.178 -0.029988 169.008 -0.00998796 167.778C0.010012 166.548 0.270012 165.378 0.780012 164.258C1.28001 163.138 2.03001 162.108 3.03001 161.168C4.03001 160.228 5.31001 159.468 6.87001 158.898C8.49001 158.298 9.99001 158.008 11.39 158.028C12.79 158.048 14.05 158.288 15.17 158.738C16.29 159.198 17.24 159.848 18.03 160.698C18.82 161.548 19.41 162.498 19.8 163.558C20.42 165.228 20.57 166.798 20.26 168.258C19.95 169.718 19.33 171.128 18.4 172.488L17.14 174.338C16.77 174.838 16.27 175.658 16.13 176.728C16.12 176.838 16.06 177.278 16.11 177.858C16.15 178.298 16.23 178.688 16.33 179.008C16.41 179.268 16.26 179.548 16 179.648L12.39 180.998ZM13.26 187.558C12.92 186.638 12.95 185.738 13.35 184.838C13.75 183.948 14.41 183.328 15.33 182.988C16.25 182.648 17.16 182.688 18.05 183.098C18.95 183.508 19.57 184.178 19.91 185.098C20.25 186.018 20.21 186.918 19.79 187.798C19.37 188.678 18.7 189.288 17.79 189.628C16.87 189.968 15.97 189.938 15.09 189.538C14.21 189.138 13.6 188.478 13.26 187.558Z" fill="#C1C7D0"/>
24
+ <path d="M149.36 134.209L142.21 127.279L132.58 137.229L139.73 144.159C141.56 145.929 142.84 148.179 143.44 150.649C144.04 153.119 145.33 155.369 147.15 157.139L176.18 185.239C180.58 189.499 187.59 189.379 191.85 184.989C196.11 180.589 195.99 173.579 191.6 169.319L162.57 141.219C160.74 139.449 158.45 138.239 155.96 137.719C153.48 137.189 151.19 135.969 149.36 134.209Z" fill="#CFD4DB"/>
25
+ <path d="M155.68 137.628C153.31 137.078 151.12 135.898 149.37 134.198L147.19 132.088C144.44 129.428 140.06 129.498 137.4 132.248C134.74 134.998 134.81 139.378 137.56 142.038L139.74 144.148C141.49 145.848 142.74 147.988 143.37 150.338C145.72 148.558 147.94 146.588 150.03 144.428C152.1 142.298 153.98 140.018 155.68 137.628Z" fill="#B3BAC5"/>
26
+ <path d="M101.95 156.619C86.48 156.869 71.84 151.079 60.73 140.319C37.78 118.109 37.19 81.369 59.4 58.419C70.16 47.309 84.61 41.049 100.07 40.789C115.54 40.539 130.18 46.329 141.29 57.089C152.41 67.849 158.66 82.299 158.92 97.759C159.17 113.229 153.38 127.869 142.62 138.979C131.87 150.109 117.42 156.369 101.95 156.619ZM100.3 54.619C88.52 54.809 77.53 59.579 69.33 68.039C52.42 85.509 52.87 113.479 70.34 130.389C78.8 138.579 89.95 142.989 101.73 142.799C113.51 142.609 124.5 137.839 132.7 129.379C140.89 120.919 145.3 109.769 145.11 97.989C144.92 86.209 140.15 75.219 131.69 67.019C123.22 58.839 112.08 54.429 100.3 54.619Z" fill="url(#paint0_linear_1442_1680)"/>
27
+ <path d="M118.92 85.8396L113.58 80.5896C112.79 79.8196 111.53 79.8296 110.75 80.6196L100.96 90.5896L90.9899 80.7996C90.1999 80.0296 88.9399 80.0396 88.1599 80.8296L82.9099 86.1696C82.1399 86.9596 82.1499 88.2196 82.9399 88.9996L92.9099 98.7896L83.1199 108.76C82.3499 109.55 82.3599 110.81 83.1499 111.59L88.4899 116.84C89.2799 117.61 90.5399 117.6 91.3199 116.81L101.11 106.84L111.08 116.63C111.87 117.4 113.13 117.39 113.91 116.6L119.16 111.26C119.93 110.47 119.92 109.21 119.13 108.43L109.16 98.6396L118.95 88.6696C119.72 87.8796 119.71 86.6096 118.92 85.8396Z" fill="#C1C7D0"/>
28
+ </g>
29
+ <defs>
30
+ <linearGradient id="paint0_linear_1442_1680" x1="60.0621" y1="139.664" x2="141.969" y2="57.757" gradientUnits="userSpaceOnUse">
31
+ <stop offset="0.5572" stop-color="#C1C7D0"/>
32
+ <stop offset="0.966" stop-color="#E9EBEF" stop-opacity="0.5"/>
33
+ </linearGradient>
34
+ <clipPath id="clip0_1442_1680">
35
+ <rect width="207.16" height="189.87" fill="white" transform="translate(0 0.619141)"/>
36
+ </clipPath>
37
+ </defs>
38
+ </svg>
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.0.0",
3
+ "version": "1.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -81,13 +81,23 @@ export const messages = defineMessages({
81
81
  description: 'Describes type of items shown in the list for screen-reader users'
82
82
  },
83
83
  cancelButton: {
84
- id: 'fabric.linkPicker.cancel.button',
84
+ id: 'fabric.linkPicker.button.cancel',
85
85
  defaultMessage: 'Cancel',
86
86
  description: 'Button to cancel and dismiss the link picker'
87
87
  },
88
88
  insertButton: {
89
- id: 'fabric.linkPicker.cancel.insert',
89
+ id: 'fabric.linkPicker.button.insert',
90
90
  defaultMessage: 'Insert',
91
91
  description: 'Button to insert searched or selected link'
92
+ },
93
+ noResults: {
94
+ id: 'fabric.linkPicker.search.noResults.heading',
95
+ defaultMessage: 'We couldn’t find anything matching your search.',
96
+ description: 'Heading message shown when a search has no results'
97
+ },
98
+ noResultsDescription: {
99
+ id: 'fabric.linkPicker.search.noResults.description',
100
+ defaultMessage: 'Try again with a different term.',
101
+ description: 'Describes possible action when a search returns no results'
92
102
  }
93
103
  });
@@ -16,6 +16,7 @@ import Button, { ButtonGroup } from '@atlaskit/button';
16
16
  import { FormFooter } from '@atlaskit/form';
17
17
  import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
18
18
  import VisuallyHidden from '@atlaskit/visually-hidden';
19
+ import LinkSearchNoResults from './link-search-no-results';
19
20
  export const RECENT_SEARCH_LIST_SIZE = 5;
20
21
 
21
22
  class LinkPicker extends PureComponent {
@@ -386,6 +387,7 @@ class LinkPicker extends PureComponent {
386
387
  size: "medium",
387
388
  label: ''
388
389
  }));
390
+ const noResults = activePlugin && !isLoading && !items.length && !isSafeUrl(url);
389
391
  return jsx("div", {
390
392
  "data-testid": "link-picker",
391
393
  className: "recent-list",
@@ -457,6 +459,10 @@ class LinkPicker extends PureComponent {
457
459
  onSelect: this.handleSelected,
458
460
  onMouseEnter: this.handleMouseEnterResultItem,
459
461
  onMouseLeave: this.handleMouseLeaveResultItem
462
+ }), noResults && jsx(LinkSearchNoResults, {
463
+ testId: "link-search-no-results",
464
+ header: formatMessage(messages.noResults),
465
+ description: formatMessage(messages.noResultsDescription)
460
466
  }), jsx(FormFooter, {
461
467
  align: "end"
462
468
  }, jsx(ButtonGroup, null, jsx(Button, {
@@ -0,0 +1,12 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import EmptyState from '@atlaskit/empty-state';
4
+ import noResultsImg from './no-results.svg';
5
+
6
+ const NoResults = props => /*#__PURE__*/React.createElement(EmptyState, _extends({}, props, {
7
+ imageUrl: noResultsImg,
8
+ maxImageWidth: 130,
9
+ maxImageHeight: 130
10
+ }));
11
+
12
+ export default NoResults;
@@ -0,0 +1,38 @@
1
+ <svg width="208" height="191" viewBox="0 0 208 191" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1442_1680)">
3
+ <rect width="207.16" height="189.87" transform="translate(0 0.619141)" fill="white" fill-opacity="0.01"/>
4
+ <path opacity="0.3" d="M105.28 190.44C104.35 190.47 103.42 190.49 102.49 190.5C101.19 190.51 100.13 189.46 100.13 188.16C100.12 186.89 101.13 185.84 102.4 185.8C102.42 185.8 102.45 185.8 102.47 185.8C108.4 185.77 114.42 185.13 120.21 183.9C121.48 183.63 122.73 184.44 123 185.71C123.27 186.98 122.46 188.23 121.19 188.5C115.98 189.59 110.63 190.25 105.28 190.44Z" fill="#B3BAC5"/>
5
+ <path opacity="0.3" d="M89.77 189.649C89.64 189.649 89.5 189.649 89.36 189.629C83.14 188.769 77 187.259 71.09 185.139C69.87 184.699 69.23 183.359 69.67 182.129C70.11 180.909 71.46 180.269 72.68 180.709C78.28 182.719 84.1 184.149 90 184.959C91.29 185.139 92.19 186.319 92.01 187.609C91.86 188.769 90.89 189.609 89.77 189.649Z" fill="#B3BAC5"/>
6
+ <path opacity="0.3" d="M133.08 184.98C132.09 185.01 131.15 184.42 130.79 183.44C130.34 182.22 130.96 180.87 132.18 180.42C137.76 178.36 143.14 175.71 148.19 172.55C149.29 171.86 150.74 172.19 151.43 173.29C152.12 174.39 151.79 175.84 150.69 176.53C145.37 179.86 139.69 182.66 133.82 184.83C133.57 184.93 133.33 184.97 133.08 184.98Z" fill="#B3BAC5"/>
7
+ <path opacity="0.3" d="M60.25 180.089C59.85 180.099 59.44 180.019 59.07 179.819C53.54 176.879 48.28 173.349 43.46 169.339C42.46 168.509 42.32 167.029 43.15 166.029C43.98 165.029 45.46 164.889 46.46 165.719C51.04 169.529 56.02 172.869 61.27 175.659C62.42 176.269 62.85 177.689 62.24 178.839C61.83 179.619 61.06 180.069 60.25 180.089Z" fill="#B3BAC5"/>
8
+ <path opacity="0.3" d="M35.79 161.01C35.12 161.03 34.44 160.77 33.96 160.24C29.75 155.58 26.01 150.48 22.85 145.07C22.19 143.95 22.57 142.51 23.69 141.85C24.81 141.19 26.25 141.57 26.91 142.69C29.91 147.82 33.46 152.66 37.45 157.08C38.32 158.04 38.25 159.53 37.28 160.4C36.85 160.79 36.32 160.99 35.79 161.01Z" fill="#B3BAC5"/>
9
+ <path opacity="0.3" d="M179.7 145.469C179.28 145.479 178.84 145.389 178.45 145.159C177.32 144.509 176.93 143.079 177.58 141.949C180.54 136.779 182.97 131.289 184.8 125.639C185.2 124.399 186.53 123.729 187.76 124.129C189 124.529 189.67 125.859 189.27 127.089C187.34 133.049 184.77 138.829 181.65 144.279C181.24 145.019 180.49 145.439 179.7 145.469Z" fill="#B3BAC5"/>
10
+ <path opacity="0.3" d="M19.3 134.749C18.34 134.779 17.42 134.219 17.04 133.279C14.68 127.469 12.92 121.399 11.81 115.219C11.58 113.939 12.43 112.719 13.71 112.489C14.99 112.259 16.21 113.109 16.44 114.389C17.5 120.249 19.17 126.009 21.4 131.519C21.89 132.719 21.31 134.099 20.1 134.579C19.84 134.679 19.57 134.739 19.3 134.749Z" fill="#B3BAC5"/>
11
+ <path opacity="0.3" d="M190.19 116.26C190.03 116.27 189.87 116.26 189.71 116.23C188.43 116.01 187.57 114.8 187.79 113.52C188.79 107.68 189.18 101.69 188.97 95.7197L188.96 95.5197C188.91 94.2197 189.93 93.1297 191.23 93.0897C192.53 93.0397 193.62 94.0597 193.66 95.3597L193.67 95.5597C193.89 101.85 193.47 108.16 192.42 114.32C192.23 115.43 191.28 116.22 190.19 116.26Z" fill="#B3BAC5"/>
12
+ <path opacity="0.3" d="M12.82 104.36C11.52 104.41 10.43 103.44 10.39 102.14V102.04C10.17 95.7795 10.58 89.4995 11.62 83.3795C11.84 82.0995 13.05 81.2395 14.33 81.4495C15.61 81.6695 16.47 82.8795 16.26 84.1595C15.28 89.9695 14.88 95.9295 15.09 101.86C15.14 103.17 14.12 104.31 12.82 104.36Z" fill="#B3BAC5"/>
13
+ <path opacity="0.3" d="M190 85.05C188.85 85.09 187.82 84.28 187.61 83.12C186.54 77.26 184.87 71.5 182.63 66C182.14 64.8 182.72 63.42 183.92 62.93C185.12 62.44 186.5 63.02 186.99 64.22C189.35 70.02 191.12 76.1 192.24 82.28C192.47 83.56 191.63 84.78 190.35 85.02C190.23 85.03 190.12 85.04 190 85.05Z" fill="#B3BAC5"/>
14
+ <path opacity="0.3" d="M17.07 73.6685C16.8 73.6785 16.53 73.6385 16.26 73.5585C15.02 73.1585 14.35 71.8285 14.75 70.5985C16.68 64.6385 19.23 58.8485 22.35 53.3985C22.99 52.2685 24.43 51.8785 25.56 52.5185C26.69 53.1585 27.08 54.5985 26.44 55.7285C23.49 60.8985 21.06 66.3885 19.23 72.0485C18.91 73.0085 18.03 73.6385 17.07 73.6685Z" fill="#B3BAC5"/>
15
+ <path opacity="0.3" d="M179.22 55.9797C178.38 56.0097 177.56 55.5897 177.11 54.8197C174.1 49.6997 170.55 44.8597 166.55 40.4397C165.68 39.4797 165.75 37.9897 166.72 37.1197C167.68 36.2497 169.17 36.3197 170.04 37.2897C174.26 41.9497 178 47.0397 181.17 52.4397C181.83 53.5597 181.45 54.9997 180.33 55.6597C179.98 55.8597 179.6 55.9597 179.22 55.9797Z" fill="#B3BAC5"/>
16
+ <path opacity="0.3" d="M31.61 46.2591C31.08 46.2791 30.54 46.1191 30.08 45.7591C29.06 44.9591 28.87 43.4791 29.67 42.4591C33.53 37.5091 37.9 32.9491 42.68 28.8891C43.67 28.0491 45.15 28.1691 46 29.1591C46.84 30.1491 46.72 31.6291 45.73 32.4791C41.2 36.3291 37.04 40.6691 33.38 45.3591C32.94 45.9291 32.28 46.2391 31.61 46.2591Z" fill="#B3BAC5"/>
17
+ <path opacity="0.3" d="M159.12 32.3496C158.56 32.3696 158 32.1896 157.54 31.8096C152.95 28.0096 147.97 24.6696 142.71 21.8796C141.56 21.2696 141.12 19.8496 141.73 18.6996C142.34 17.5496 143.76 17.1196 144.91 17.7196C150.44 20.6496 155.7 24.1696 160.53 28.1796C161.53 29.0096 161.67 30.4896 160.84 31.4896C160.4 32.0296 159.76 32.3196 159.12 32.3496Z" fill="#B3BAC5"/>
18
+ <path opacity="0.3" d="M54.62 25.4492C53.81 25.4792 53.01 25.0892 52.54 24.3492C51.85 23.2492 52.18 21.7992 53.28 21.1092C58.6 17.7692 64.27 14.9692 70.15 12.7892C71.37 12.3392 72.72 12.9592 73.17 14.1792C73.62 15.3992 73 16.7492 71.78 17.1992C66.21 19.2592 60.83 21.9192 55.78 25.0892C55.42 25.3192 55.02 25.4392 54.62 25.4492Z" fill="#B3BAC5"/>
19
+ <path opacity="0.3" d="M132.16 16.9787C131.87 16.9887 131.57 16.9487 131.29 16.8387C125.69 14.8387 119.86 13.4187 113.96 12.6087C112.67 12.4287 111.77 11.2487 111.95 9.9587C112.13 8.6687 113.32 7.7687 114.6 7.9487C120.82 8.7987 126.96 10.2987 132.87 12.4087C134.09 12.8487 134.73 14.1887 134.29 15.4187C133.96 16.3487 133.09 16.9487 132.16 16.9787Z" fill="#B3BAC5"/>
20
+ <path opacity="0.3" d="M83.36 13.7797C82.24 13.8197 81.22 13.0497 80.98 11.9197C80.71 10.6497 81.52 9.39968 82.79 9.12968C88.9 7.82968 95.24 7.14968 101.48 7.09968C102.78 7.08968 103.84 8.13968 103.85 9.43968C103.86 10.7197 102.85 11.7597 101.58 11.8097C101.56 11.8097 101.53 11.8097 101.51 11.8097C95.58 11.8397 89.56 12.4997 83.77 13.7297C83.63 13.7597 83.49 13.7697 83.36 13.7797Z" fill="#B3BAC5"/>
21
+ <path opacity="0.3" d="M190.8 34.8096C190.55 34.7396 190.38 34.5096 190.41 34.2496C190.43 34.0996 190.45 33.9496 190.47 33.7996C190.52 33.5096 190.58 33.1996 190.66 32.8796C190.96 31.7296 191.51 30.6996 192.3 29.7896C193.09 28.8796 194.23 28.1196 195.7 27.5296L198.18 26.5196C199.66 25.9296 200.57 24.9496 200.93 23.5996C201.06 23.1096 201.1 22.6096 201.05 22.0896C201 21.5696 200.85 21.0796 200.58 20.6296C200.31 20.1796 199.94 19.7696 199.45 19.4096C198.96 19.0496 198.36 18.7796 197.64 18.5896C196.86 18.3896 196.17 18.3596 195.55 18.4996C194.93 18.6396 194.38 18.8896 193.9 19.2396C193.42 19.5896 193.02 20.0396 192.7 20.5796C192.37 21.1196 192.13 21.6996 191.97 22.2996C191.92 22.4796 191.88 22.6596 191.85 22.8196C191.76 23.2896 191.29 23.5696 190.83 23.4296L187 22.2596C186.64 22.1496 186.39 21.7996 186.43 21.4296C186.44 21.3096 186.46 21.1896 186.48 21.0696C186.54 20.7296 186.61 20.4096 186.69 20.0896C186.99 18.9396 187.5 17.8696 188.22 16.8796C188.94 15.8896 189.83 15.0796 190.89 14.4496C191.95 13.8196 193.15 13.4096 194.51 13.2096C195.87 13.0096 197.35 13.1296 198.96 13.5496C200.63 13.9896 202.03 14.6196 203.16 15.4396C204.3 16.2596 205.19 17.1796 205.84 18.1896C206.49 19.2096 206.9 20.2896 207.06 21.4396C207.22 22.5896 207.16 23.7096 206.87 24.7996C206.42 26.5196 205.64 27.8896 204.55 28.9096C203.45 29.9296 202.14 30.7296 200.6 31.2996L198.51 32.0896C197.92 32.2796 197.04 32.6696 196.31 33.4696C196.24 33.5496 195.94 33.8796 195.64 34.3896C195.42 34.7696 195.26 35.1396 195.15 35.4596C195.06 35.7196 194.78 35.8596 194.52 35.7896L190.8 34.8096ZM187.74 40.6796C187.99 39.7296 188.53 39.0096 189.37 38.5096C190.21 38.0096 191.1 37.8796 192.05 38.1296C193 38.3796 193.72 38.9296 194.22 39.7796C194.72 40.6296 194.84 41.5296 194.59 42.4796C194.34 43.4296 193.79 44.1396 192.94 44.6296C192.09 45.1096 191.19 45.2296 190.25 44.9796C189.3 44.7296 188.58 44.1896 188.1 43.3596C187.61 42.5196 187.49 41.6296 187.74 40.6796Z" fill="#C1C7D0"/>
22
+ <path opacity="0.3" d="M18.51 21.9392C18.27 21.8592 18.11 21.6092 18.16 21.3592C18.19 21.2092 18.22 21.0592 18.25 20.9092C18.32 20.6192 18.4 20.3192 18.51 20.0092C18.89 18.8792 19.5 17.8892 20.36 17.0392C21.21 16.1792 22.39 15.5092 23.91 15.0092L26.45 14.1692C27.96 13.6792 28.94 12.7692 29.39 11.4392C29.55 10.9592 29.63 10.4592 29.61 9.93915C29.6 9.41915 29.47 8.91915 29.24 8.44915C29.01 7.97915 28.66 7.54915 28.19 7.15915C27.73 6.76915 27.14 6.45915 26.44 6.21915C25.68 5.95915 24.98 5.88915 24.36 5.98915C23.73 6.08915 23.17 6.29915 22.67 6.61915C22.17 6.93915 21.74 7.35915 21.38 7.87915C21 8.39915 20.72 8.95915 20.52 9.54915C20.46 9.72915 20.41 9.89915 20.37 10.0592C20.25 10.5192 19.76 10.7692 19.31 10.5992L15.57 9.17915C15.22 9.04915 15 8.67915 15.06 8.30915C15.08 8.18915 15.11 8.06915 15.14 7.94915C15.22 7.61915 15.31 7.29915 15.42 6.98915C15.8 5.85915 16.38 4.82915 17.17 3.88915C17.96 2.94915 18.9 2.19915 19.99 1.63915C21.09 1.07915 22.32 0.749152 23.68 0.649152C25.05 0.549152 26.52 0.759152 28.09 1.28915C29.72 1.83915 31.08 2.55915 32.16 3.45915C33.24 4.35915 34.07 5.32915 34.65 6.38915C35.23 7.44915 35.57 8.54915 35.65 9.70915C35.73 10.8692 35.59 11.9792 35.23 13.0492C34.66 14.7392 33.8 16.0492 32.63 16.9892C31.47 17.9292 30.1 18.6392 28.53 19.1092L26.39 19.7492C25.79 19.8992 24.88 20.2292 24.1 20.9792C24.02 21.0592 23.7 21.3692 23.37 21.8492C23.12 22.2192 22.94 22.5692 22.81 22.8792C22.71 23.1292 22.42 23.2592 22.16 23.1692L18.51 21.9392ZM15.06 27.5892C15.37 26.6592 15.96 25.9692 16.83 25.5292C17.7 25.0892 18.6 25.0192 19.53 25.3292C20.46 25.6392 21.14 26.2392 21.58 27.1192C22.02 27.9992 22.08 28.9092 21.77 29.8392C21.46 30.7692 20.86 31.4492 19.98 31.8692C19.1 32.2892 18.2 32.3492 17.27 32.0392C16.34 31.7292 15.66 31.1392 15.23 30.2692C14.81 29.4192 14.75 28.5192 15.06 27.5892Z" fill="#C1C7D0"/>
23
+ <path opacity="0.3" d="M12.39 180.998C12.15 181.088 11.87 180.998 11.75 180.768C11.68 180.638 11.61 180.498 11.54 180.358C11.41 180.088 11.29 179.798 11.17 179.498C10.76 178.388 10.61 177.228 10.74 176.028C10.87 174.828 11.36 173.558 12.23 172.218L13.68 169.968C14.55 168.638 14.74 167.308 14.25 165.998C14.07 165.528 13.82 165.088 13.48 164.688C13.14 164.288 12.74 163.978 12.26 163.758C11.78 163.538 11.24 163.428 10.63 163.408C10.02 163.398 9.37001 163.518 8.68001 163.778C7.93001 164.058 7.34001 164.428 6.91001 164.908C6.48001 165.378 6.18001 165.898 5.99001 166.458C5.80001 167.018 5.73001 167.618 5.77001 168.248C5.81001 168.878 5.94001 169.488 6.16001 170.078C6.23001 170.258 6.29001 170.418 6.36001 170.568C6.56001 170.998 6.33001 171.508 5.88001 171.658L2.08001 172.898C1.72001 173.018 1.32001 172.868 1.14001 172.538C1.08001 172.428 1.03001 172.318 0.970012 172.208C0.820012 171.898 0.690012 171.588 0.580012 171.288C0.170012 170.178 -0.029988 169.008 -0.00998796 167.778C0.010012 166.548 0.270012 165.378 0.780012 164.258C1.28001 163.138 2.03001 162.108 3.03001 161.168C4.03001 160.228 5.31001 159.468 6.87001 158.898C8.49001 158.298 9.99001 158.008 11.39 158.028C12.79 158.048 14.05 158.288 15.17 158.738C16.29 159.198 17.24 159.848 18.03 160.698C18.82 161.548 19.41 162.498 19.8 163.558C20.42 165.228 20.57 166.798 20.26 168.258C19.95 169.718 19.33 171.128 18.4 172.488L17.14 174.338C16.77 174.838 16.27 175.658 16.13 176.728C16.12 176.838 16.06 177.278 16.11 177.858C16.15 178.298 16.23 178.688 16.33 179.008C16.41 179.268 16.26 179.548 16 179.648L12.39 180.998ZM13.26 187.558C12.92 186.638 12.95 185.738 13.35 184.838C13.75 183.948 14.41 183.328 15.33 182.988C16.25 182.648 17.16 182.688 18.05 183.098C18.95 183.508 19.57 184.178 19.91 185.098C20.25 186.018 20.21 186.918 19.79 187.798C19.37 188.678 18.7 189.288 17.79 189.628C16.87 189.968 15.97 189.938 15.09 189.538C14.21 189.138 13.6 188.478 13.26 187.558Z" fill="#C1C7D0"/>
24
+ <path d="M149.36 134.209L142.21 127.279L132.58 137.229L139.73 144.159C141.56 145.929 142.84 148.179 143.44 150.649C144.04 153.119 145.33 155.369 147.15 157.139L176.18 185.239C180.58 189.499 187.59 189.379 191.85 184.989C196.11 180.589 195.99 173.579 191.6 169.319L162.57 141.219C160.74 139.449 158.45 138.239 155.96 137.719C153.48 137.189 151.19 135.969 149.36 134.209Z" fill="#CFD4DB"/>
25
+ <path d="M155.68 137.628C153.31 137.078 151.12 135.898 149.37 134.198L147.19 132.088C144.44 129.428 140.06 129.498 137.4 132.248C134.74 134.998 134.81 139.378 137.56 142.038L139.74 144.148C141.49 145.848 142.74 147.988 143.37 150.338C145.72 148.558 147.94 146.588 150.03 144.428C152.1 142.298 153.98 140.018 155.68 137.628Z" fill="#B3BAC5"/>
26
+ <path d="M101.95 156.619C86.48 156.869 71.84 151.079 60.73 140.319C37.78 118.109 37.19 81.369 59.4 58.419C70.16 47.309 84.61 41.049 100.07 40.789C115.54 40.539 130.18 46.329 141.29 57.089C152.41 67.849 158.66 82.299 158.92 97.759C159.17 113.229 153.38 127.869 142.62 138.979C131.87 150.109 117.42 156.369 101.95 156.619ZM100.3 54.619C88.52 54.809 77.53 59.579 69.33 68.039C52.42 85.509 52.87 113.479 70.34 130.389C78.8 138.579 89.95 142.989 101.73 142.799C113.51 142.609 124.5 137.839 132.7 129.379C140.89 120.919 145.3 109.769 145.11 97.989C144.92 86.209 140.15 75.219 131.69 67.019C123.22 58.839 112.08 54.429 100.3 54.619Z" fill="url(#paint0_linear_1442_1680)"/>
27
+ <path d="M118.92 85.8396L113.58 80.5896C112.79 79.8196 111.53 79.8296 110.75 80.6196L100.96 90.5896L90.9899 80.7996C90.1999 80.0296 88.9399 80.0396 88.1599 80.8296L82.9099 86.1696C82.1399 86.9596 82.1499 88.2196 82.9399 88.9996L92.9099 98.7896L83.1199 108.76C82.3499 109.55 82.3599 110.81 83.1499 111.59L88.4899 116.84C89.2799 117.61 90.5399 117.6 91.3199 116.81L101.11 106.84L111.08 116.63C111.87 117.4 113.13 117.39 113.91 116.6L119.16 111.26C119.93 110.47 119.92 109.21 119.13 108.43L109.16 98.6396L118.95 88.6696C119.72 87.8796 119.71 86.6096 118.92 85.8396Z" fill="#C1C7D0"/>
28
+ </g>
29
+ <defs>
30
+ <linearGradient id="paint0_linear_1442_1680" x1="60.0621" y1="139.664" x2="141.969" y2="57.757" gradientUnits="userSpaceOnUse">
31
+ <stop offset="0.5572" stop-color="#C1C7D0"/>
32
+ <stop offset="0.966" stop-color="#E9EBEF" stop-opacity="0.5"/>
33
+ </linearGradient>
34
+ <clipPath id="clip0_1442_1680">
35
+ <rect width="207.16" height="189.87" fill="white" transform="translate(0 0.619141)"/>
36
+ </clipPath>
37
+ </defs>
38
+ </svg>
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.0.0",
3
+ "version": "1.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -81,13 +81,23 @@ export var messages = defineMessages({
81
81
  description: 'Describes type of items shown in the list for screen-reader users'
82
82
  },
83
83
  cancelButton: {
84
- id: 'fabric.linkPicker.cancel.button',
84
+ id: 'fabric.linkPicker.button.cancel',
85
85
  defaultMessage: 'Cancel',
86
86
  description: 'Button to cancel and dismiss the link picker'
87
87
  },
88
88
  insertButton: {
89
- id: 'fabric.linkPicker.cancel.insert',
89
+ id: 'fabric.linkPicker.button.insert',
90
90
  defaultMessage: 'Insert',
91
91
  description: 'Button to insert searched or selected link'
92
+ },
93
+ noResults: {
94
+ id: 'fabric.linkPicker.search.noResults.heading',
95
+ defaultMessage: 'We couldn’t find anything matching your search.',
96
+ description: 'Heading message shown when a search has no results'
97
+ },
98
+ noResultsDescription: {
99
+ id: 'fabric.linkPicker.search.noResults.description',
100
+ defaultMessage: 'Try again with a different term.',
101
+ description: 'Describes possible action when a search returns no results'
92
102
  }
93
103
  });
@@ -1,4 +1,3 @@
1
- import _regeneratorRuntime from "@babel/runtime/regenerator";
2
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
3
  import _createClass from "@babel/runtime/helpers/createClass";
@@ -12,6 +11,8 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
12
11
 
13
12
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14
13
 
14
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
15
+
15
16
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
16
17
 
17
18
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
@@ -32,6 +33,7 @@ import Button, { ButtonGroup } from '@atlaskit/button';
32
33
  import { FormFooter } from '@atlaskit/form';
33
34
  import EditorSearchIcon from '@atlaskit/icon/glyph/editor/search';
34
35
  import VisuallyHidden from '@atlaskit/visually-hidden';
36
+ import LinkSearchNoResults from './link-search-no-results';
35
37
  export var RECENT_SEARCH_LIST_SIZE = 5;
36
38
 
37
39
  var LinkPicker = /*#__PURE__*/function (_PureComponent) {
@@ -473,6 +475,7 @@ var LinkPicker = /*#__PURE__*/function (_PureComponent) {
473
475
  size: "medium",
474
476
  label: ''
475
477
  }));
478
+ var noResults = activePlugin && !isLoading && !items.length && !isSafeUrl(url);
476
479
  return jsx("div", {
477
480
  "data-testid": "link-picker",
478
481
  className: "recent-list",
@@ -544,6 +547,10 @@ var LinkPicker = /*#__PURE__*/function (_PureComponent) {
544
547
  onSelect: this.handleSelected,
545
548
  onMouseEnter: this.handleMouseEnterResultItem,
546
549
  onMouseLeave: this.handleMouseLeaveResultItem
550
+ }), noResults && jsx(LinkSearchNoResults, {
551
+ testId: "link-search-no-results",
552
+ header: formatMessage(messages.noResults),
553
+ description: formatMessage(messages.noResultsDescription)
547
554
  }), jsx(FormFooter, {
548
555
  align: "end"
549
556
  }, jsx(ButtonGroup, null, jsx(Button, {
@@ -0,0 +1,14 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ import EmptyState from '@atlaskit/empty-state';
4
+ import noResultsImg from './no-results.svg';
5
+
6
+ var NoResults = function NoResults(props) {
7
+ return /*#__PURE__*/React.createElement(EmptyState, _extends({}, props, {
8
+ imageUrl: noResultsImg,
9
+ maxImageWidth: 130,
10
+ maxImageHeight: 130
11
+ }));
12
+ };
13
+
14
+ export default NoResults;
@@ -0,0 +1,38 @@
1
+ <svg width="208" height="191" viewBox="0 0 208 191" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g clip-path="url(#clip0_1442_1680)">
3
+ <rect width="207.16" height="189.87" transform="translate(0 0.619141)" fill="white" fill-opacity="0.01"/>
4
+ <path opacity="0.3" d="M105.28 190.44C104.35 190.47 103.42 190.49 102.49 190.5C101.19 190.51 100.13 189.46 100.13 188.16C100.12 186.89 101.13 185.84 102.4 185.8C102.42 185.8 102.45 185.8 102.47 185.8C108.4 185.77 114.42 185.13 120.21 183.9C121.48 183.63 122.73 184.44 123 185.71C123.27 186.98 122.46 188.23 121.19 188.5C115.98 189.59 110.63 190.25 105.28 190.44Z" fill="#B3BAC5"/>
5
+ <path opacity="0.3" d="M89.77 189.649C89.64 189.649 89.5 189.649 89.36 189.629C83.14 188.769 77 187.259 71.09 185.139C69.87 184.699 69.23 183.359 69.67 182.129C70.11 180.909 71.46 180.269 72.68 180.709C78.28 182.719 84.1 184.149 90 184.959C91.29 185.139 92.19 186.319 92.01 187.609C91.86 188.769 90.89 189.609 89.77 189.649Z" fill="#B3BAC5"/>
6
+ <path opacity="0.3" d="M133.08 184.98C132.09 185.01 131.15 184.42 130.79 183.44C130.34 182.22 130.96 180.87 132.18 180.42C137.76 178.36 143.14 175.71 148.19 172.55C149.29 171.86 150.74 172.19 151.43 173.29C152.12 174.39 151.79 175.84 150.69 176.53C145.37 179.86 139.69 182.66 133.82 184.83C133.57 184.93 133.33 184.97 133.08 184.98Z" fill="#B3BAC5"/>
7
+ <path opacity="0.3" d="M60.25 180.089C59.85 180.099 59.44 180.019 59.07 179.819C53.54 176.879 48.28 173.349 43.46 169.339C42.46 168.509 42.32 167.029 43.15 166.029C43.98 165.029 45.46 164.889 46.46 165.719C51.04 169.529 56.02 172.869 61.27 175.659C62.42 176.269 62.85 177.689 62.24 178.839C61.83 179.619 61.06 180.069 60.25 180.089Z" fill="#B3BAC5"/>
8
+ <path opacity="0.3" d="M35.79 161.01C35.12 161.03 34.44 160.77 33.96 160.24C29.75 155.58 26.01 150.48 22.85 145.07C22.19 143.95 22.57 142.51 23.69 141.85C24.81 141.19 26.25 141.57 26.91 142.69C29.91 147.82 33.46 152.66 37.45 157.08C38.32 158.04 38.25 159.53 37.28 160.4C36.85 160.79 36.32 160.99 35.79 161.01Z" fill="#B3BAC5"/>
9
+ <path opacity="0.3" d="M179.7 145.469C179.28 145.479 178.84 145.389 178.45 145.159C177.32 144.509 176.93 143.079 177.58 141.949C180.54 136.779 182.97 131.289 184.8 125.639C185.2 124.399 186.53 123.729 187.76 124.129C189 124.529 189.67 125.859 189.27 127.089C187.34 133.049 184.77 138.829 181.65 144.279C181.24 145.019 180.49 145.439 179.7 145.469Z" fill="#B3BAC5"/>
10
+ <path opacity="0.3" d="M19.3 134.749C18.34 134.779 17.42 134.219 17.04 133.279C14.68 127.469 12.92 121.399 11.81 115.219C11.58 113.939 12.43 112.719 13.71 112.489C14.99 112.259 16.21 113.109 16.44 114.389C17.5 120.249 19.17 126.009 21.4 131.519C21.89 132.719 21.31 134.099 20.1 134.579C19.84 134.679 19.57 134.739 19.3 134.749Z" fill="#B3BAC5"/>
11
+ <path opacity="0.3" d="M190.19 116.26C190.03 116.27 189.87 116.26 189.71 116.23C188.43 116.01 187.57 114.8 187.79 113.52C188.79 107.68 189.18 101.69 188.97 95.7197L188.96 95.5197C188.91 94.2197 189.93 93.1297 191.23 93.0897C192.53 93.0397 193.62 94.0597 193.66 95.3597L193.67 95.5597C193.89 101.85 193.47 108.16 192.42 114.32C192.23 115.43 191.28 116.22 190.19 116.26Z" fill="#B3BAC5"/>
12
+ <path opacity="0.3" d="M12.82 104.36C11.52 104.41 10.43 103.44 10.39 102.14V102.04C10.17 95.7795 10.58 89.4995 11.62 83.3795C11.84 82.0995 13.05 81.2395 14.33 81.4495C15.61 81.6695 16.47 82.8795 16.26 84.1595C15.28 89.9695 14.88 95.9295 15.09 101.86C15.14 103.17 14.12 104.31 12.82 104.36Z" fill="#B3BAC5"/>
13
+ <path opacity="0.3" d="M190 85.05C188.85 85.09 187.82 84.28 187.61 83.12C186.54 77.26 184.87 71.5 182.63 66C182.14 64.8 182.72 63.42 183.92 62.93C185.12 62.44 186.5 63.02 186.99 64.22C189.35 70.02 191.12 76.1 192.24 82.28C192.47 83.56 191.63 84.78 190.35 85.02C190.23 85.03 190.12 85.04 190 85.05Z" fill="#B3BAC5"/>
14
+ <path opacity="0.3" d="M17.07 73.6685C16.8 73.6785 16.53 73.6385 16.26 73.5585C15.02 73.1585 14.35 71.8285 14.75 70.5985C16.68 64.6385 19.23 58.8485 22.35 53.3985C22.99 52.2685 24.43 51.8785 25.56 52.5185C26.69 53.1585 27.08 54.5985 26.44 55.7285C23.49 60.8985 21.06 66.3885 19.23 72.0485C18.91 73.0085 18.03 73.6385 17.07 73.6685Z" fill="#B3BAC5"/>
15
+ <path opacity="0.3" d="M179.22 55.9797C178.38 56.0097 177.56 55.5897 177.11 54.8197C174.1 49.6997 170.55 44.8597 166.55 40.4397C165.68 39.4797 165.75 37.9897 166.72 37.1197C167.68 36.2497 169.17 36.3197 170.04 37.2897C174.26 41.9497 178 47.0397 181.17 52.4397C181.83 53.5597 181.45 54.9997 180.33 55.6597C179.98 55.8597 179.6 55.9597 179.22 55.9797Z" fill="#B3BAC5"/>
16
+ <path opacity="0.3" d="M31.61 46.2591C31.08 46.2791 30.54 46.1191 30.08 45.7591C29.06 44.9591 28.87 43.4791 29.67 42.4591C33.53 37.5091 37.9 32.9491 42.68 28.8891C43.67 28.0491 45.15 28.1691 46 29.1591C46.84 30.1491 46.72 31.6291 45.73 32.4791C41.2 36.3291 37.04 40.6691 33.38 45.3591C32.94 45.9291 32.28 46.2391 31.61 46.2591Z" fill="#B3BAC5"/>
17
+ <path opacity="0.3" d="M159.12 32.3496C158.56 32.3696 158 32.1896 157.54 31.8096C152.95 28.0096 147.97 24.6696 142.71 21.8796C141.56 21.2696 141.12 19.8496 141.73 18.6996C142.34 17.5496 143.76 17.1196 144.91 17.7196C150.44 20.6496 155.7 24.1696 160.53 28.1796C161.53 29.0096 161.67 30.4896 160.84 31.4896C160.4 32.0296 159.76 32.3196 159.12 32.3496Z" fill="#B3BAC5"/>
18
+ <path opacity="0.3" d="M54.62 25.4492C53.81 25.4792 53.01 25.0892 52.54 24.3492C51.85 23.2492 52.18 21.7992 53.28 21.1092C58.6 17.7692 64.27 14.9692 70.15 12.7892C71.37 12.3392 72.72 12.9592 73.17 14.1792C73.62 15.3992 73 16.7492 71.78 17.1992C66.21 19.2592 60.83 21.9192 55.78 25.0892C55.42 25.3192 55.02 25.4392 54.62 25.4492Z" fill="#B3BAC5"/>
19
+ <path opacity="0.3" d="M132.16 16.9787C131.87 16.9887 131.57 16.9487 131.29 16.8387C125.69 14.8387 119.86 13.4187 113.96 12.6087C112.67 12.4287 111.77 11.2487 111.95 9.9587C112.13 8.6687 113.32 7.7687 114.6 7.9487C120.82 8.7987 126.96 10.2987 132.87 12.4087C134.09 12.8487 134.73 14.1887 134.29 15.4187C133.96 16.3487 133.09 16.9487 132.16 16.9787Z" fill="#B3BAC5"/>
20
+ <path opacity="0.3" d="M83.36 13.7797C82.24 13.8197 81.22 13.0497 80.98 11.9197C80.71 10.6497 81.52 9.39968 82.79 9.12968C88.9 7.82968 95.24 7.14968 101.48 7.09968C102.78 7.08968 103.84 8.13968 103.85 9.43968C103.86 10.7197 102.85 11.7597 101.58 11.8097C101.56 11.8097 101.53 11.8097 101.51 11.8097C95.58 11.8397 89.56 12.4997 83.77 13.7297C83.63 13.7597 83.49 13.7697 83.36 13.7797Z" fill="#B3BAC5"/>
21
+ <path opacity="0.3" d="M190.8 34.8096C190.55 34.7396 190.38 34.5096 190.41 34.2496C190.43 34.0996 190.45 33.9496 190.47 33.7996C190.52 33.5096 190.58 33.1996 190.66 32.8796C190.96 31.7296 191.51 30.6996 192.3 29.7896C193.09 28.8796 194.23 28.1196 195.7 27.5296L198.18 26.5196C199.66 25.9296 200.57 24.9496 200.93 23.5996C201.06 23.1096 201.1 22.6096 201.05 22.0896C201 21.5696 200.85 21.0796 200.58 20.6296C200.31 20.1796 199.94 19.7696 199.45 19.4096C198.96 19.0496 198.36 18.7796 197.64 18.5896C196.86 18.3896 196.17 18.3596 195.55 18.4996C194.93 18.6396 194.38 18.8896 193.9 19.2396C193.42 19.5896 193.02 20.0396 192.7 20.5796C192.37 21.1196 192.13 21.6996 191.97 22.2996C191.92 22.4796 191.88 22.6596 191.85 22.8196C191.76 23.2896 191.29 23.5696 190.83 23.4296L187 22.2596C186.64 22.1496 186.39 21.7996 186.43 21.4296C186.44 21.3096 186.46 21.1896 186.48 21.0696C186.54 20.7296 186.61 20.4096 186.69 20.0896C186.99 18.9396 187.5 17.8696 188.22 16.8796C188.94 15.8896 189.83 15.0796 190.89 14.4496C191.95 13.8196 193.15 13.4096 194.51 13.2096C195.87 13.0096 197.35 13.1296 198.96 13.5496C200.63 13.9896 202.03 14.6196 203.16 15.4396C204.3 16.2596 205.19 17.1796 205.84 18.1896C206.49 19.2096 206.9 20.2896 207.06 21.4396C207.22 22.5896 207.16 23.7096 206.87 24.7996C206.42 26.5196 205.64 27.8896 204.55 28.9096C203.45 29.9296 202.14 30.7296 200.6 31.2996L198.51 32.0896C197.92 32.2796 197.04 32.6696 196.31 33.4696C196.24 33.5496 195.94 33.8796 195.64 34.3896C195.42 34.7696 195.26 35.1396 195.15 35.4596C195.06 35.7196 194.78 35.8596 194.52 35.7896L190.8 34.8096ZM187.74 40.6796C187.99 39.7296 188.53 39.0096 189.37 38.5096C190.21 38.0096 191.1 37.8796 192.05 38.1296C193 38.3796 193.72 38.9296 194.22 39.7796C194.72 40.6296 194.84 41.5296 194.59 42.4796C194.34 43.4296 193.79 44.1396 192.94 44.6296C192.09 45.1096 191.19 45.2296 190.25 44.9796C189.3 44.7296 188.58 44.1896 188.1 43.3596C187.61 42.5196 187.49 41.6296 187.74 40.6796Z" fill="#C1C7D0"/>
22
+ <path opacity="0.3" d="M18.51 21.9392C18.27 21.8592 18.11 21.6092 18.16 21.3592C18.19 21.2092 18.22 21.0592 18.25 20.9092C18.32 20.6192 18.4 20.3192 18.51 20.0092C18.89 18.8792 19.5 17.8892 20.36 17.0392C21.21 16.1792 22.39 15.5092 23.91 15.0092L26.45 14.1692C27.96 13.6792 28.94 12.7692 29.39 11.4392C29.55 10.9592 29.63 10.4592 29.61 9.93915C29.6 9.41915 29.47 8.91915 29.24 8.44915C29.01 7.97915 28.66 7.54915 28.19 7.15915C27.73 6.76915 27.14 6.45915 26.44 6.21915C25.68 5.95915 24.98 5.88915 24.36 5.98915C23.73 6.08915 23.17 6.29915 22.67 6.61915C22.17 6.93915 21.74 7.35915 21.38 7.87915C21 8.39915 20.72 8.95915 20.52 9.54915C20.46 9.72915 20.41 9.89915 20.37 10.0592C20.25 10.5192 19.76 10.7692 19.31 10.5992L15.57 9.17915C15.22 9.04915 15 8.67915 15.06 8.30915C15.08 8.18915 15.11 8.06915 15.14 7.94915C15.22 7.61915 15.31 7.29915 15.42 6.98915C15.8 5.85915 16.38 4.82915 17.17 3.88915C17.96 2.94915 18.9 2.19915 19.99 1.63915C21.09 1.07915 22.32 0.749152 23.68 0.649152C25.05 0.549152 26.52 0.759152 28.09 1.28915C29.72 1.83915 31.08 2.55915 32.16 3.45915C33.24 4.35915 34.07 5.32915 34.65 6.38915C35.23 7.44915 35.57 8.54915 35.65 9.70915C35.73 10.8692 35.59 11.9792 35.23 13.0492C34.66 14.7392 33.8 16.0492 32.63 16.9892C31.47 17.9292 30.1 18.6392 28.53 19.1092L26.39 19.7492C25.79 19.8992 24.88 20.2292 24.1 20.9792C24.02 21.0592 23.7 21.3692 23.37 21.8492C23.12 22.2192 22.94 22.5692 22.81 22.8792C22.71 23.1292 22.42 23.2592 22.16 23.1692L18.51 21.9392ZM15.06 27.5892C15.37 26.6592 15.96 25.9692 16.83 25.5292C17.7 25.0892 18.6 25.0192 19.53 25.3292C20.46 25.6392 21.14 26.2392 21.58 27.1192C22.02 27.9992 22.08 28.9092 21.77 29.8392C21.46 30.7692 20.86 31.4492 19.98 31.8692C19.1 32.2892 18.2 32.3492 17.27 32.0392C16.34 31.7292 15.66 31.1392 15.23 30.2692C14.81 29.4192 14.75 28.5192 15.06 27.5892Z" fill="#C1C7D0"/>
23
+ <path opacity="0.3" d="M12.39 180.998C12.15 181.088 11.87 180.998 11.75 180.768C11.68 180.638 11.61 180.498 11.54 180.358C11.41 180.088 11.29 179.798 11.17 179.498C10.76 178.388 10.61 177.228 10.74 176.028C10.87 174.828 11.36 173.558 12.23 172.218L13.68 169.968C14.55 168.638 14.74 167.308 14.25 165.998C14.07 165.528 13.82 165.088 13.48 164.688C13.14 164.288 12.74 163.978 12.26 163.758C11.78 163.538 11.24 163.428 10.63 163.408C10.02 163.398 9.37001 163.518 8.68001 163.778C7.93001 164.058 7.34001 164.428 6.91001 164.908C6.48001 165.378 6.18001 165.898 5.99001 166.458C5.80001 167.018 5.73001 167.618 5.77001 168.248C5.81001 168.878 5.94001 169.488 6.16001 170.078C6.23001 170.258 6.29001 170.418 6.36001 170.568C6.56001 170.998 6.33001 171.508 5.88001 171.658L2.08001 172.898C1.72001 173.018 1.32001 172.868 1.14001 172.538C1.08001 172.428 1.03001 172.318 0.970012 172.208C0.820012 171.898 0.690012 171.588 0.580012 171.288C0.170012 170.178 -0.029988 169.008 -0.00998796 167.778C0.010012 166.548 0.270012 165.378 0.780012 164.258C1.28001 163.138 2.03001 162.108 3.03001 161.168C4.03001 160.228 5.31001 159.468 6.87001 158.898C8.49001 158.298 9.99001 158.008 11.39 158.028C12.79 158.048 14.05 158.288 15.17 158.738C16.29 159.198 17.24 159.848 18.03 160.698C18.82 161.548 19.41 162.498 19.8 163.558C20.42 165.228 20.57 166.798 20.26 168.258C19.95 169.718 19.33 171.128 18.4 172.488L17.14 174.338C16.77 174.838 16.27 175.658 16.13 176.728C16.12 176.838 16.06 177.278 16.11 177.858C16.15 178.298 16.23 178.688 16.33 179.008C16.41 179.268 16.26 179.548 16 179.648L12.39 180.998ZM13.26 187.558C12.92 186.638 12.95 185.738 13.35 184.838C13.75 183.948 14.41 183.328 15.33 182.988C16.25 182.648 17.16 182.688 18.05 183.098C18.95 183.508 19.57 184.178 19.91 185.098C20.25 186.018 20.21 186.918 19.79 187.798C19.37 188.678 18.7 189.288 17.79 189.628C16.87 189.968 15.97 189.938 15.09 189.538C14.21 189.138 13.6 188.478 13.26 187.558Z" fill="#C1C7D0"/>
24
+ <path d="M149.36 134.209L142.21 127.279L132.58 137.229L139.73 144.159C141.56 145.929 142.84 148.179 143.44 150.649C144.04 153.119 145.33 155.369 147.15 157.139L176.18 185.239C180.58 189.499 187.59 189.379 191.85 184.989C196.11 180.589 195.99 173.579 191.6 169.319L162.57 141.219C160.74 139.449 158.45 138.239 155.96 137.719C153.48 137.189 151.19 135.969 149.36 134.209Z" fill="#CFD4DB"/>
25
+ <path d="M155.68 137.628C153.31 137.078 151.12 135.898 149.37 134.198L147.19 132.088C144.44 129.428 140.06 129.498 137.4 132.248C134.74 134.998 134.81 139.378 137.56 142.038L139.74 144.148C141.49 145.848 142.74 147.988 143.37 150.338C145.72 148.558 147.94 146.588 150.03 144.428C152.1 142.298 153.98 140.018 155.68 137.628Z" fill="#B3BAC5"/>
26
+ <path d="M101.95 156.619C86.48 156.869 71.84 151.079 60.73 140.319C37.78 118.109 37.19 81.369 59.4 58.419C70.16 47.309 84.61 41.049 100.07 40.789C115.54 40.539 130.18 46.329 141.29 57.089C152.41 67.849 158.66 82.299 158.92 97.759C159.17 113.229 153.38 127.869 142.62 138.979C131.87 150.109 117.42 156.369 101.95 156.619ZM100.3 54.619C88.52 54.809 77.53 59.579 69.33 68.039C52.42 85.509 52.87 113.479 70.34 130.389C78.8 138.579 89.95 142.989 101.73 142.799C113.51 142.609 124.5 137.839 132.7 129.379C140.89 120.919 145.3 109.769 145.11 97.989C144.92 86.209 140.15 75.219 131.69 67.019C123.22 58.839 112.08 54.429 100.3 54.619Z" fill="url(#paint0_linear_1442_1680)"/>
27
+ <path d="M118.92 85.8396L113.58 80.5896C112.79 79.8196 111.53 79.8296 110.75 80.6196L100.96 90.5896L90.9899 80.7996C90.1999 80.0296 88.9399 80.0396 88.1599 80.8296L82.9099 86.1696C82.1399 86.9596 82.1499 88.2196 82.9399 88.9996L92.9099 98.7896L83.1199 108.76C82.3499 109.55 82.3599 110.81 83.1499 111.59L88.4899 116.84C89.2799 117.61 90.5399 117.6 91.3199 116.81L101.11 106.84L111.08 116.63C111.87 117.4 113.13 117.39 113.91 116.6L119.16 111.26C119.93 110.47 119.92 109.21 119.13 108.43L109.16 98.6396L118.95 88.6696C119.72 87.8796 119.71 86.6096 118.92 85.8396Z" fill="#C1C7D0"/>
28
+ </g>
29
+ <defs>
30
+ <linearGradient id="paint0_linear_1442_1680" x1="60.0621" y1="139.664" x2="141.969" y2="57.757" gradientUnits="userSpaceOnUse">
31
+ <stop offset="0.5572" stop-color="#C1C7D0"/>
32
+ <stop offset="0.966" stop-color="#E9EBEF" stop-opacity="0.5"/>
33
+ </linearGradient>
34
+ <clipPath id="clip0_1442_1680">
35
+ <rect width="207.16" height="189.87" fill="white" transform="translate(0 0.619141)"/>
36
+ </clipPath>
37
+ </defs>
38
+ </svg>
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.0.0",
3
+ "version": "1.1.2",
4
4
  "sideEffects": false
5
5
  }
@@ -89,4 +89,14 @@ export declare const messages: {
89
89
  defaultMessage: string;
90
90
  description: string;
91
91
  };
92
+ noResults: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
97
+ noResultsDescription: {
98
+ id: string;
99
+ defaultMessage: string;
100
+ description: string;
101
+ };
92
102
  };
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { EmptyStateProps } from '@atlaskit/empty-state';
3
+ declare const NoResults: (props: EmptyStateProps) => JSX.Element;
4
+ export default NoResults;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.0.0",
3
+ "version": "1.1.2",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -25,8 +25,12 @@
25
25
  "af:exports": {
26
26
  ".": "./src/index.ts"
27
27
  },
28
+ "scripts": {
29
+ "ak-postbuild": "ls -d dist/* | grep -v dist/types | xargs -n 1 copyfiles -u 1 -V src/**/*.svg"
30
+ },
28
31
  "dependencies": {
29
32
  "@atlaskit/button": "^16.2.0",
33
+ "@atlaskit/empty-state": "^7.3.0",
30
34
  "@atlaskit/form": "^8.5.1",
31
35
  "@atlaskit/icon": "^21.10.0",
32
36
  "@atlaskit/spinner": "^15.1.0",
@@ -46,16 +50,14 @@
46
50
  },
47
51
  "devDependencies": {
48
52
  "@atlaskit/activity-provider": "^2.3.2",
49
- "@atlaskit/button": "^16.3.0",
50
53
  "@atlaskit/docs": "*",
51
- "@atlaskit/editor-test-helpers": "^17.0.0",
52
- "@atlaskit/media-test-helpers": "^30.0.0",
54
+ "@atlaskit/link-test-helpers": "^1.1.0",
53
55
  "@atlaskit/popup": "^1.3.5",
54
56
  "@atlaskit/ssr": "*",
55
57
  "@atlaskit/visual-regression": "*",
56
58
  "@atlaskit/webdriver-runner": "*",
57
59
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
58
- "@atlassian/link-picker-atlassian-plugin": "^10.0.0",
60
+ "@atlassian/link-picker-atlassian-plugin": "^11.0.0",
59
61
  "@atlassian/search-provider": "^2.3.0",
60
62
  "@testing-library/dom": "^7.7.3",
61
63
  "@testing-library/react": "^8.0.1",
package/report.api.md ADDED
@@ -0,0 +1,65 @@
1
+ ## API Report File for "@atlaskit/link-picker"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+ /// <reference types="react" />
7
+
8
+ import { MessageDescriptor } from 'react-intl-next';
9
+ import { default as React_2 } from 'react';
10
+ import { WithIntlProps } from 'react-intl-next';
11
+ import { WrappedComponentProps } from 'react-intl-next';
12
+
13
+ // @public (undocumented)
14
+ export type LinkInputType = 'manual' | 'typeAhead';
15
+
16
+ // @public (undocumented)
17
+ export const LinkPicker: React_2.FC<
18
+ WithIntlProps<WrappedComponentProps<'intl'> & LinkPickerProps>
19
+ > & {
20
+ WrappedComponent: React_2.ComponentType<
21
+ WrappedComponentProps<'intl'> & LinkPickerProps
22
+ >;
23
+ };
24
+
25
+ // @public (undocumented)
26
+ export interface LinkPickerPlugin {
27
+ // (undocumented)
28
+ resolve: (
29
+ state: LinkPickerState,
30
+ ) => Promise<ResolveResult> | AsyncGenerator<ResolveResult, ResolveResult>;
31
+ }
32
+
33
+ // @public (undocumented)
34
+ export interface LinkPickerProps {
35
+ displayText?: string | null;
36
+ onCancel: () => void;
37
+ onSubmit: (arg: OnSubmitParameter) => void;
38
+ plugins?: LinkPickerPlugin[];
39
+ url?: string;
40
+ }
41
+
42
+ // @public (undocumented)
43
+ export interface LinkPickerState {
44
+ query: string;
45
+ }
46
+
47
+ // @public (undocumented)
48
+ export interface LinkSearchListItemData {
49
+ container?: string;
50
+ icon:
51
+ | string
52
+ | React.ComponentType<{
53
+ alt: string;
54
+ }>;
55
+ iconAlt: string | MessageDescriptor;
56
+ lastUpdatedDate?: Date;
57
+ lastViewedDate?: Date;
58
+ name: string;
59
+ objectId: string;
60
+ prefetch?: boolean;
61
+ url: string;
62
+ }
63
+
64
+ // (No @packageDocumentation comment for this package)
65
+ ```
@@ -1,9 +0,0 @@
1
- {
2
- "name": "recent-work-service",
3
- "publishMetadata": {
4
- "metricTags": {}
5
- },
6
- "dimensions": {},
7
- "tagScheme": "v001-n_$name$",
8
- "frontend": true
9
- }
@@ -1,133 +0,0 @@
1
- {
2
- "hydrators": {
3
- "TownsquareGoal": {
4
- "hydratorPaths": {
5
- "id": [
6
- "id"
7
- ],
8
- "key": [
9
- "key"
10
- ],
11
- "name": [
12
- "name"
13
- ],
14
- "url": [
15
- "url"
16
- ],
17
- "icon": [
18
- "iconData"
19
- ]
20
- }
21
- },
22
- "TownsquareProject": {
23
- "hydratorPaths": {
24
- "id": [
25
- "id"
26
- ],
27
- "key": [
28
- "key"
29
- ],
30
- "name": [
31
- "name"
32
- ],
33
- "url": [
34
- "url"
35
- ],
36
- "icon": [
37
- "iconData"
38
- ]
39
- }
40
- },
41
- "TownsquareComment": {
42
- "hydratorPaths": {
43
- "id": [
44
- "id"
45
- ],
46
- "name": [
47
- "object.name"
48
- ],
49
- "url": [
50
- "object.url"
51
- ],
52
- "icon": [
53
- "object.iconData"
54
- ]
55
- }
56
- },
57
- "ConfluencePage": {
58
- "hydratorPaths": {
59
- "id": [
60
- "id"
61
- ],
62
- "name": [
63
- "title"
64
- ],
65
- "localResourceId": [
66
- "pageId"
67
- ],
68
- "url": [
69
- "links.base",
70
- "links.webUi"
71
- ],
72
- "containers": [
73
- "space.name"
74
- ],
75
- "icon": [
76
- "metadata.titleEmojiDraft",
77
- "metadata.titleEmojiPublished"
78
- ]
79
- },
80
- "staticFallbacks": {
81
- "icon": "https://home-static.us-east-1.staging.public.atl-paas.net/confluence-page-icon.svg"
82
- }
83
- },
84
- "ConfluenceBlogPost": {
85
- "hydratorPaths": {
86
- "id": [
87
- "id"
88
- ],
89
- "name": [
90
- "title"
91
- ],
92
- "localResourceId": [
93
- "blogPostId"
94
- ],
95
- "url": [
96
- "links.base",
97
- "links.webUi"
98
- ],
99
- "containers": [
100
- "space.name"
101
- ],
102
- "icon": [
103
- "metadata.titleEmojiDraft",
104
- "metadata.titleEmojiPublished"
105
- ]
106
- },
107
- "staticFallbacks": {
108
- "icon": "https://home-static.us-east-1.prod.public.atl-paas.net/confluence-blogpost-icon.svg"
109
- }
110
- },
111
- "ConfluenceComment": {
112
- "hydratorPaths": {
113
- "id": [
114
- "id"
115
- ],
116
- "name": [
117
- "container.title"
118
- ],
119
- "url": [
120
- "links.base",
121
- "links.webUi"
122
- ],
123
- "containers": [
124
- "container.space.name"
125
- ]
126
- },
127
- "staticFallbacks": {
128
- "icon": "https://home-static.us-east-1.staging.public.atl-paas.net/confluence-page-icon.svg"
129
- }
130
- }
131
- },
132
- "queryFragments": "\n\n fragment townsquareGoal on TownsquareGoal {\n id\n key\n name\n url\n iconData\n }\n\n\n fragment townsquareProject on TownsquareProject {\n id\n key\n name\n url\n iconData\n }\n\n\n fragment townsquareComment on TownsquareComment {\n id\n url\n object {\n name\n iconData\n url\n }\n }\n\n\n fragment confluencePage on ConfluencePage {\n id\n title\n pageId\n links {\n base\n webUi\n }\n space {\n name\n }\n }\n\n\n fragment confluenceBlogPost on ConfluenceBlogPost {\n id\n title\n blogPostId\n links {\n base\n webUi\n }\n space {\n name\n }\n }\n\n\n fragment confluenceComment on ConfluenceComment {\n id\n links {\n base\n webUi\n }\n container {\n __typename\n ...confluenceBlogPost\n ...confluencePage\n }\n }\n\nfragment activityItemEdge on ActivityItemEdge {\n cursor\n node {\n id\n object {\n id\n type\n product\n rootContainerId\n contributors {\n profile {\n name\n picture\n accountId\n }\n }\n data {\n __typename\n\t...townsquareGoal\n\t...townsquareProject\n\t...townsquareComment\n\t...confluencePage\n\t...confluenceBlogPost\n\t...confluenceComment\n }\n }\n event {\n id\n timestamp\n eventType\n }\n }\n}\nfragment activityItemConnection on ActivityConnection {\n edges {\n ...activityItemEdge\n }\n}\n\n"
133
- }
@@ -1,320 +0,0 @@
1
- // import sub from 'date-fns/sub';
2
-
3
- export interface MockDataV3 {
4
- ACTIVITIES_DATA: {
5
- data: {
6
- activity: {
7
- myActivity: {
8
- viewed: {
9
- edges: any[];
10
- };
11
- };
12
- };
13
- };
14
- extensions?: object;
15
- };
16
- }
17
-
18
- const MOCK_DATA_V3: MockDataV3 = {
19
- ACTIVITIES_DATA: {
20
- data: {
21
- activity: {
22
- myActivity: {
23
- viewed: {
24
- edges: [
25
- {
26
- cursor:
27
- 'WVhKcE9tTnNiM1ZrT21sa1pXNTBhWFI1T2pwMWMyVnlMell4TURFNU5tRmxZamN3TkdJME1EQTJPR0ZpTVRRek5udzNaVGRrT1dFMk5DMWpPRFZqTFRRM1pEVXRPR014TVMwNE5UVmhOelk1TURVeVlXWT18MA==',
28
- node: {
29
- id:
30
- 'YXJpOmNsb3VkOmFjdGl2aXR5OkRVTU1ZLWE1YTAxZDIxLTFjYzMtNGYyOS05NTY1LWYyYmI4Y2Q5NjlmNTppdFVtLzE3ZjA5YTQyMWRkOTg5YzFmODY2Njk1ODNkOTk3YmI4ZDNjYzEwMWRkZjc=',
31
- object: {
32
- id:
33
- 'ari:cloud:townsquare:a5a01d21-1cc3-4f29-9565-f2bb8cd969f5:project/cae6f0ae-bd95-439a-835f-d93907a63f23',
34
- type: 'project',
35
- product: 'townsquare',
36
- rootContainerId:
37
- 'ari:cloud:platform::site/9a257bbc-b7c6-47c8-b1dc-c3db3dc8914b',
38
- contributors: [
39
- {
40
- profile: {
41
- name: 'Ashley Hilt',
42
- picture: 'https://example.com/my-image/128',
43
- accountId: '60ef1ffcb9ef6f00691d644d',
44
- },
45
- },
46
- {
47
- profile: {
48
- name: 'Trevor Green',
49
- picture: 'https://example.com/my-image/128',
50
- accountId: '610196aeb704b40068ab1437',
51
- },
52
- },
53
- ],
54
- data: {
55
- __typename: 'TownsquareProject',
56
- key: 'ATL-1262',
57
- name: 'FAB-1520: Recent Work',
58
- url: 'https://example.com/project/ATL-1262',
59
- iconData:
60
- 'data:image/png;base64,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',
61
- id:
62
- 'ari:cloud:townsquare:a5a01d21-1cc3-4f29-9565-f2bb8cd969f5:project/cae6f0ae-bd95-439a-835f-d93907a63f23',
63
- },
64
- },
65
- event: {
66
- id: '17f09a421dd989c1f86669583d997bb8d3cc101ddf7',
67
- timestamp: '2022-02-17T21:43:45Z',
68
- eventType: 'viewed',
69
- },
70
- },
71
- },
72
- {
73
- cursor:
74
- 'WVhKcE9tTnNiM1ZrT21sa1pXNTBhWFI1T2pwMWMyVnlMelZrWmpCaFltUmpOMlJqTURNMk1HVmpaRFF5TXpkalludzBNVGc1WWpVek9DMHhPV1UwTFRSak16VXRPR00xWkMxaFl6ZzFPV1ppTWpGaU1qUT18MA==',
75
- node: {
76
- id:
77
- 'YXJpOmNsb3VkOmFjdGl2aXR5OjlhMjU3YmJjLWI3YzYtNDdjOC1iMFRjLWMzZGIzYWM4OTU0YjppdGVtLzE4MTAzNTRiYTRmMWQwNDQ1MzdhMWJjMWM5NDVmZTIwMWYwZGNkZjQyYTA=',
78
- object: {
79
- id:
80
- 'ari:cloud:confluence:9a257bbc-b7c6-47c8-b1dc-c3db3dc8954b:page/539197607',
81
- type: 'page',
82
- product: 'confluence',
83
- rootContainerId:
84
- 'ari:cloud:platform::site/9a257bbc-b7c6-47c8-b1dc-c3db3dc8954b',
85
- contributors: [
86
- {
87
- profile: {
88
- name: 'Joleen Roberson',
89
- picture: 'https://example.com/my-image/128',
90
- accountId: '61ce114bce3622006a7cd505',
91
- },
92
- },
93
- {
94
- profile: {
95
- name: 'Erika Cox',
96
- picture: 'https://example.com/my-image/128',
97
- accountId: '5df0abdc7dc0260ecd0237cb',
98
- },
99
- },
100
- ],
101
- data: {
102
- __typename: 'ConfluencePage',
103
- links: {
104
- webUi:
105
- '/spaces/~61ce114bce3652006a7cd505/pages/539197607/Decision',
106
- base: 'https://example.com/wiki',
107
- },
108
- id:
109
- 'ari:cloud:confluence:9a257bbc-b7c6-47c8-b1dc-c3db3ac8954b:page/539197607',
110
- title: 'FAB-1558 Decision',
111
- pageId: '539197607',
112
- space: { name: 'Joleen Roberson' },
113
- },
114
- },
115
- event: {
116
- id: '1810354ba4f1d044537a1bc1c945fe201f0dcdf42a0',
117
- timestamp: '2022-05-27T02:24:53.000Z',
118
- eventType: 'viewed',
119
- },
120
- },
121
- },
122
- {
123
- cursor:
124
- 'WVhKcE9tTnNiM1ZrT21sa1pXNTBhWFI1T2pwMWMyVnlMelZrWmpCaFltFmpOMlJqTURNMk1HVmpaREF5TXpkalludzBNVGc1WWpVek9DMHhPV1UwTFRSak16VXRPR00xWkMxaFl6ZzFPV1ppTWpGaT1qUT18MA==',
125
- node: {
126
- id:
127
- 'YXJpOmNsb3VkOmFjdGl2aXR5OjlhMjU3YmJjLWI3YzYtNDdjOC1iFWRjLWMzZGIzYWM4OTU0YjppdGVtLzE4MTAzNTRiYTRmMWQwNDQ1MzdhMWJjMWM5NDVmZTIwMWYwZGNkZjQyYTB=',
128
- object: {
129
- id:
130
- 'ari:cloud:confluence:9a357bbc-b7c6-47c8-b1dc-c3db3ac8954b:page/539197608',
131
- type: 'page',
132
- product: 'confluence',
133
- rootContainerId:
134
- 'ari:cloud:platform::site/9a357bbc-b7c6-47c8-b1dc-c3db3ac8954b',
135
- contributors: [
136
- {
137
- profile: {
138
- name: 'Carlos Dyer',
139
- picture: 'https://example.com/my-image/128',
140
- accountId: '61ce114bce3652006a7cd505',
141
- },
142
- },
143
- {
144
- profile: {
145
- name: 'Martha Sanders',
146
- picture: 'https://example.com/my-image/128',
147
- accountId: '5df0abdc7dc0360ecd0237cb',
148
- },
149
- },
150
- ],
151
- data: {
152
- __typename: 'ConfluencePage',
153
- links: {
154
- webUi:
155
- '/spaces/~61ce114bce3652006a7cd505/pages/539197607/Other',
156
- base: 'https://example.com/wiki',
157
- },
158
- id:
159
- 'ari:cloud:confluence:9a357bbc-b7c6-47c8-b1dc-c3db3ac8954b:page/539197608',
160
- title: 'FAB-996 Other one',
161
- pageId: '539197608',
162
- space: { name: 'Cool space' },
163
- },
164
- },
165
- event: {
166
- id: '1810354ba4f1d044537a1bc1c945fe201f0dcdf42a0',
167
- timestamp: '2022-05-27T02:24:53.000Z',
168
- eventType: 'viewed',
169
- },
170
- },
171
- },
172
- {
173
- cursor:
174
- 'WVhKcE9tTnNiM1ZrT21sa1pXNTBhWFI1T2pwMWMyVnlMell4TURFNU5tRmxZamF3TkdJME1EQTJPR0ZpTVRRek5ueGhPR1JqTnpCbU9TMWlNV05rTFRRNE1qWXRPVEUzT0MxbVltVTVNRGxrWldKaE1HST18MA==',
175
- node: {
176
- id:
177
- 'YXJpOmNsb3VkOmFjdGl2aXR5OkRVTU1ZLWE1YTAxZDIxLTFjYzMtNGYyOS05NFY1LWYyYmI4Y2Q5NjlmNTppdGVtLzE3ZjA1ZWFhM2ZjMGE3MWEwOWRjYjI4YTE2MTBiOWMyZmFmOWUxMjU1YjQ=',
178
- object: {
179
- id:
180
- 'ari:cloud:townsquare:a3a01d21-1cc3-4f29-9565-f2bb8cd969f5:project/cae6f0ae-bd95-439a-835f-d93907a63f53',
181
- type: 'project',
182
- product: 'townsquare',
183
- rootContainerId:
184
- 'ari:cloud:platform::site/9a257bbc-b7c6-47c8-b1dc-c3db3dc8914b',
185
- contributors: [
186
- {
187
- profile: {
188
- name: 'Marcelino King',
189
- picture: 'https://example.com/my-image/128',
190
- accountId: '60ef1ffcb9ef6f00691d633d',
191
- },
192
- },
193
- {
194
- profile: {
195
- name: 'Tonya Riley',
196
- picture: 'https://example.com/my-image/128',
197
- accountId: '610196aeb704b40068ab1436',
198
- },
199
- },
200
- ],
201
- data: {
202
- __typename: 'TownsquareProject',
203
- key: 'XD-1261',
204
- name:
205
- 'FAB-983 Woah woah this title is rather long I wonder what it will do!',
206
- url: 'https://example.com/project/XD-1261',
207
- iconData:
208
- 'data:image/png;base64,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',
209
- id:
210
- 'ari:cloud:townsquare:a3a01d21-1cc3-4f29-9565-f2bb8cd969f5:project/cae6f0ae-bd95-439a-835f-d93907a63f23',
211
- },
212
- },
213
- event: {
214
- id: '17f05eaa3fc0a71a09dcb28a1610b9c2faf9e1255b4',
215
- timestamp: '2022-02-17T04:22:17Z',
216
- eventType: 'updated',
217
- },
218
- },
219
- },
220
- {
221
- cursor:
222
- 'WVhKcE9tTnNiM1ZrT21sa1pXNTBhWFI1T2pwMFMyVnlMelZrWmpCaFltUmpOMlJqTURNMk1HVmpaREF5TXpkalludzBNVGc1WWpVek9DMHhPV1UwTFRSak16VXRPR00xWkMxaFl6ZzFPV1ppTWpGaU1qUT18Ng==',
223
- node: {
224
- id:
225
- 'YXJpOmNsb3VkOmFjdGl2aXR5OkRVTU1ZLWEFYTAxZDIxLTFjYzMtNGYyOS05NTY1LWYyYmI4Y2Q5NjlmNTppdGVtLzE4MGFiNThjZDdlYzJhOWRhZjAyMzU0ZTIzZTExYTY5OWQzZGNlZGZkNDk=',
226
- object: {
227
- id:
228
- 'ari:cloud:confluence:a4a01d21-1cc3-4f29-9565-f2bb8cd969f5:page/452269311391',
229
- type: 'page',
230
- product: 'confluence',
231
- rootContainerId:
232
- 'ari:cloud:platform::site/a4a01d21-1cc3-4f29-9565-f2bb8cd969f5',
233
- contributors: [
234
- {
235
- profile: {
236
- name: 'Sharon Haugen',
237
- picture: 'https://example.com/my-image/128',
238
- accountId:
239
- '655363:f87158bb-15fc-48a9-a396-744a9fbe9ed7',
240
- },
241
- },
242
- {
243
- profile: {
244
- name: 'Nicolette Espinosa',
245
- picture: 'https://example.com/my-image/128',
246
- accountId: '5c36c7dd13a8bb0b103988fe',
247
- },
248
- },
249
- {
250
- profile: {
251
- name: 'Suzanne Goldberg',
252
- picture: 'https://example.com/my-image/128',
253
- accountId: '6232212a62dc1e006802dea8',
254
- },
255
- },
256
- ],
257
- data: {
258
- __typename: 'ConfluencePage',
259
- links: {
260
- webUi:
261
- '/spaces/~655363f87158bb15fc48a9a396744a9fbe9ed7/pages/452269311391/Testtest',
262
- base: 'https://example.com/wiki',
263
- },
264
- id:
265
- 'ari:cloud:confluence:DUMMY-a5a01d21-1cc3-4f29-9565-f2bb8cd969f5:page/452269311391',
266
- title: 'FAB-1166 Testtest',
267
- pageId: '452269311391',
268
- space: { name: 'Sharon Haugen' },
269
- },
270
- },
271
- event: {
272
- id: '180ab58cd7ec2a9daf02354e23e11a699d3dcedfd49',
273
- timestamp: '2022-05-10T00:22:45.000Z',
274
- eventType: 'viewed',
275
- },
276
- },
277
- },
278
- ],
279
- },
280
- },
281
- },
282
- },
283
- extensions: {
284
- activity: {
285
- query_info: {
286
- methods: [
287
- {
288
- name: 'viewed',
289
- version: 'V3',
290
- },
291
- ],
292
- operationName: 'nadel_2_activity_sdfghd',
293
- isFetchingMyActivities: true,
294
- },
295
- },
296
- gateway: {
297
- request_id: '351fc075dbed201d',
298
- deprecatedFieldsUsed: [],
299
- schema: {
300
- schemaName: 'central',
301
- commitHash: 'dcaf893115bbeb69ae428cff33ce7beea0807343',
302
- schemaHash: '',
303
- snapshot: '1348',
304
- buildNumber: '10346',
305
- buildTimestamp: '2022-02-23T00:39:59.104715Z',
306
- },
307
- micros_env: 'stg-west',
308
- invokedServices: [
309
- 'activity',
310
- 'identity',
311
- 'townsquare',
312
- 'gira',
313
- 'cc_graphql',
314
- ],
315
- },
316
- },
317
- },
318
- };
319
-
320
- export default MOCK_DATA_V3;
@@ -1,39 +0,0 @@
1
- import fetchMock from 'fetch-mock/cjs/client';
2
- import mockRecentData from './mock-data';
3
- import MockFlightDeckManifest from './flight-deck/_manifest.json';
4
- import MockFlightDeckResponse from './flight-deck/mockFDResponse.json';
5
-
6
- import { createSearchProvider, Scope } from '@atlassian/search-provider';
7
-
8
- export const searchProvider = Promise.resolve(
9
- createSearchProvider(
10
- 'DUMMY-a5a01d21-1cc3-4f29-9565-f2bb8cd969f5',
11
- Scope.ConfluencePageBlog,
12
- 'https://pug.jira-dev.com/gateway/api/xpsearch-aggregator',
13
- 'link-picker-quick-search',
14
- true,
15
- ),
16
- );
17
-
18
- const activityUrlRegex = /\/gateway\/api\/graphql/;
19
- const fdUrlRegex = /\/recent-work-service/;
20
- const fdManifestRegex = /\/recent-work-service\/_manifest\.json/;
21
-
22
- export const mockRecentClient = (delay?: number) => {
23
- fetchMock.post(
24
- activityUrlRegex,
25
- (_: string, options: { body: string }) => mockRecentData.ACTIVITIES_DATA,
26
- { method: 'POST', overwriteRoutes: true, delay },
27
- );
28
-
29
- fetchMock.get(
30
- fdManifestRegex,
31
- (_: string, options: { body: string }) => MockFlightDeckManifest,
32
- { method: 'GET', overwriteRoutes: true, delay },
33
- );
34
- fetchMock.get(
35
- fdUrlRegex,
36
- (_: string, options: { body: string }) => MockFlightDeckResponse,
37
- { method: 'GET', overwriteRoutes: true, delay },
38
- );
39
- };