@atlaskit/link-picker 1.44.1 → 1.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/common/analytics/context.js +1 -1
  3. package/dist/cjs/common/analytics/input-field-tracking.js +1 -1
  4. package/dist/cjs/common/ui/min-height-container/index.js +1 -1
  5. package/dist/cjs/common/utils/errors.js +1 -1
  6. package/dist/cjs/controllers/session-provider/index.js +1 -1
  7. package/dist/cjs/i18n/cs.js +1 -1
  8. package/dist/cjs/i18n/da.js +1 -1
  9. package/dist/cjs/i18n/de.js +1 -1
  10. package/dist/cjs/i18n/en.js +1 -1
  11. package/dist/cjs/i18n/en_GB.js +1 -1
  12. package/dist/cjs/i18n/en_ZZ.js +1 -1
  13. package/dist/cjs/i18n/es.js +1 -1
  14. package/dist/cjs/i18n/fi.js +1 -1
  15. package/dist/cjs/i18n/fr.js +1 -1
  16. package/dist/cjs/i18n/hu.js +1 -1
  17. package/dist/cjs/i18n/index.js +1 -1
  18. package/dist/cjs/i18n/it.js +1 -1
  19. package/dist/cjs/i18n/ja.js +1 -1
  20. package/dist/cjs/i18n/ko.js +1 -1
  21. package/dist/cjs/i18n/nb.js +1 -1
  22. package/dist/cjs/i18n/nl.js +1 -1
  23. package/dist/cjs/i18n/pl.js +1 -1
  24. package/dist/cjs/i18n/pt_BR.js +1 -1
  25. package/dist/cjs/i18n/ru.js +1 -1
  26. package/dist/cjs/i18n/sv.js +1 -1
  27. package/dist/cjs/i18n/th.js +1 -1
  28. package/dist/cjs/i18n/tr.js +1 -1
  29. package/dist/cjs/i18n/uk.js +1 -1
  30. package/dist/cjs/i18n/vi.js +1 -1
  31. package/dist/cjs/i18n/zh.js +1 -1
  32. package/dist/cjs/i18n/zh_TW.js +1 -1
  33. package/dist/cjs/index.js +1 -1
  34. package/dist/cjs/services/use-plugins/utils.js +1 -1
  35. package/dist/cjs/ui/error-boundary/error-boundary-base/index.js +2 -2
  36. package/dist/cjs/ui/error-boundary/index.js +1 -1
  37. package/dist/cjs/ui/lazy.js +1 -1
  38. package/dist/cjs/ui/link-picker/announcer.js +1 -1
  39. package/dist/cjs/ui/link-picker/form-footer/feature-discovery/index.js +12 -2
  40. package/dist/cjs/ui/link-picker/form-footer/index.js +1 -1
  41. package/dist/cjs/ui/link-picker/search-results/index.js +2 -1
  42. package/dist/cjs/ui/link-picker/search-results/link-search-list/index.js +1 -0
  43. package/dist/cjs/ui/link-picker/search-results/scrolling-tabs/index.js +4 -4
  44. package/dist/cjs/ui/loader-fallback/index.js +1 -0
  45. package/dist/cjs/ui/main.js +2 -2
  46. package/dist/es2019/i18n/cs.js +1 -1
  47. package/dist/es2019/i18n/da.js +1 -1
  48. package/dist/es2019/i18n/de.js +1 -1
  49. package/dist/es2019/i18n/en.js +1 -1
  50. package/dist/es2019/i18n/en_GB.js +1 -1
  51. package/dist/es2019/i18n/en_ZZ.js +1 -1
  52. package/dist/es2019/i18n/es.js +1 -1
  53. package/dist/es2019/i18n/fi.js +1 -1
  54. package/dist/es2019/i18n/fr.js +1 -1
  55. package/dist/es2019/i18n/hu.js +1 -1
  56. package/dist/es2019/i18n/it.js +1 -1
  57. package/dist/es2019/i18n/ja.js +1 -1
  58. package/dist/es2019/i18n/ko.js +1 -1
  59. package/dist/es2019/i18n/nb.js +1 -1
  60. package/dist/es2019/i18n/nl.js +1 -1
  61. package/dist/es2019/i18n/pl.js +1 -1
  62. package/dist/es2019/i18n/pt_BR.js +1 -1
  63. package/dist/es2019/i18n/ru.js +1 -1
  64. package/dist/es2019/i18n/sv.js +1 -1
  65. package/dist/es2019/i18n/th.js +1 -1
  66. package/dist/es2019/i18n/tr.js +1 -1
  67. package/dist/es2019/i18n/uk.js +1 -1
  68. package/dist/es2019/i18n/vi.js +1 -1
  69. package/dist/es2019/i18n/zh.js +1 -1
  70. package/dist/es2019/i18n/zh_TW.js +1 -1
  71. package/dist/es2019/ui/link-picker/form-footer/feature-discovery/index.js +14 -2
  72. package/dist/es2019/ui/link-picker/search-results/index.js +1 -0
  73. package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +1 -0
  74. package/dist/es2019/ui/loader-fallback/index.js +1 -0
  75. package/dist/es2019/ui/main.js +1 -1
  76. package/dist/esm/common/utils/errors.js +1 -1
  77. package/dist/esm/i18n/cs.js +1 -1
  78. package/dist/esm/i18n/da.js +1 -1
  79. package/dist/esm/i18n/de.js +1 -1
  80. package/dist/esm/i18n/en.js +1 -1
  81. package/dist/esm/i18n/en_GB.js +1 -1
  82. package/dist/esm/i18n/en_ZZ.js +1 -1
  83. package/dist/esm/i18n/es.js +1 -1
  84. package/dist/esm/i18n/fi.js +1 -1
  85. package/dist/esm/i18n/fr.js +1 -1
  86. package/dist/esm/i18n/hu.js +1 -1
  87. package/dist/esm/i18n/it.js +1 -1
  88. package/dist/esm/i18n/ja.js +1 -1
  89. package/dist/esm/i18n/ko.js +1 -1
  90. package/dist/esm/i18n/nb.js +1 -1
  91. package/dist/esm/i18n/nl.js +1 -1
  92. package/dist/esm/i18n/pl.js +1 -1
  93. package/dist/esm/i18n/pt_BR.js +1 -1
  94. package/dist/esm/i18n/ru.js +1 -1
  95. package/dist/esm/i18n/sv.js +1 -1
  96. package/dist/esm/i18n/th.js +1 -1
  97. package/dist/esm/i18n/tr.js +1 -1
  98. package/dist/esm/i18n/uk.js +1 -1
  99. package/dist/esm/i18n/vi.js +1 -1
  100. package/dist/esm/i18n/zh.js +1 -1
  101. package/dist/esm/i18n/zh_TW.js +1 -1
  102. package/dist/esm/services/use-plugins/utils.js +1 -1
  103. package/dist/esm/ui/error-boundary/error-boundary-base/index.js +1 -1
  104. package/dist/esm/ui/link-picker/form-footer/feature-discovery/index.js +12 -2
  105. package/dist/esm/ui/link-picker/search-results/index.js +1 -0
  106. package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +1 -0
  107. package/dist/esm/ui/link-picker/search-results/scrolling-tabs/index.js +3 -3
  108. package/dist/esm/ui/loader-fallback/index.js +1 -0
  109. package/dist/esm/ui/main.js +1 -1
  110. package/dist/types/ui/loader-fallback/index.d.ts +1 -0
  111. package/dist/types-ts4.5/ui/loader-fallback/index.d.ts +1 -0
  112. package/package.json +7 -12
@@ -6,7 +6,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  import _wrapNativeSuper from "@babel/runtime/helpers/wrapNativeSuper";
8
8
  import _regeneratorRuntime from "@babel/runtime/regenerator";
9
- 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); }; }
9
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  export var CancellationError = /*#__PURE__*/function (_Error) {
12
12
  _inherits(CancellationError, _Error);
@@ -3,7 +3,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/inherits";
4
4
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
5
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
6
- 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); }; }
6
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
7
7
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
8
  import React, { Component } from 'react';
9
9
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -26,15 +26,25 @@ var FeatureDiscovery = function FeatureDiscovery(_ref) {
26
26
  var storageClient = useMemo(function () {
27
27
  return new StorageClient(LOCAL_STORAGE_CLIENT_KEY);
28
28
  }, []);
29
+
29
30
  // Set this to `false` if you want to always show the feature discovery pulse.
30
31
  // (or open Application tab in your devtools and delete the relevent row)
31
32
  var discovered = useMemo(function () {
32
- return storageClient.getItem(LOCAL_STORAGE_DISCOVERY_KEY) === LOCAL_STORAGE_DISCOVERY_VALUE;
33
+ try {
34
+ return storageClient.getItem(LOCAL_STORAGE_DISCOVERY_KEY) === LOCAL_STORAGE_DISCOVERY_VALUE;
35
+ } catch (_unused) {
36
+ // If localStorage is not available, don't show feature discovery component. Treat it as 'discovered'.
37
+ return true;
38
+ }
33
39
  }, [storageClient]);
34
40
  useEffect(function () {
35
41
  return function () {
36
42
  if (!discovered) {
37
- storageClient.setItemWithExpiry(LOCAL_STORAGE_DISCOVERY_KEY, LOCAL_STORAGE_DISCOVERY_VALUE, LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS);
43
+ try {
44
+ storageClient.setItemWithExpiry(LOCAL_STORAGE_DISCOVERY_KEY, LOCAL_STORAGE_DISCOVERY_VALUE, LOCAL_STORAGE_DISCOVERY_EXPIRY_IN_MS);
45
+ } catch (_unused2) {
46
+ // silent error
47
+ }
38
48
  }
39
49
  };
40
50
  }, [storageClient, discovered]);
@@ -71,6 +71,7 @@ export var SearchResults = function SearchResults(_ref) {
71
71
  css: spinnerContainerStyles
72
72
  }, jsx(Spinner, {
73
73
  testId: testIds.tabsLoadingIndicator,
74
+ interactionName: "link-picker-tabs-loading",
74
75
  size: "medium"
75
76
  })), !isLoadingPlugins && isActivePlugin && !!queryState && jsx(Fragment, null, tabs.length > 0 && jsx(Box, {
76
77
  xcss: tabsWrapperStyles
@@ -172,6 +172,7 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
172
172
  css: spinnerContainerStyles
173
173
  }, jsx(Spinner, {
174
174
  testId: testIds.searchResultLoadingIndicator,
175
+ interactionName: "link-picker-search-list-loading",
175
176
  size: "medium"
176
177
  }));
177
178
  }
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
4
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
3
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
4
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
5
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
6
6
  /**
7
7
  * @jsxRuntime classic
8
8
  * @jsx jsx
@@ -60,6 +60,7 @@ export var LoaderFallback = function LoaderFallback(props) {
60
60
  css: styles
61
61
  }, jsx(Spinner, {
62
62
  testId: "link-picker.component-loading-indicator",
63
+ interactionName: props.name || 'link-picker-loading',
63
64
  size: "medium"
64
65
  }));
65
66
  };
@@ -21,7 +21,7 @@ export var testIds = {
21
21
  };
22
22
  export var PACKAGE_DATA = {
23
23
  packageName: "@atlaskit/link-picker" || '',
24
- packageVersion: "1.44.1" || '',
24
+ packageVersion: "1.45.1" || '',
25
25
  componentName: COMPONENT_NAME,
26
26
  source: COMPONENT_NAME
27
27
  };
@@ -8,6 +8,7 @@ export type LoaderFallbackProps = {
8
8
  hideDisplayText?: boolean;
9
9
  isLoadingPlugins?: boolean;
10
10
  plugins?: unknown[];
11
+ name?: string;
11
12
  };
12
13
  /**
13
14
  * Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
@@ -8,6 +8,7 @@ export type LoaderFallbackProps = {
8
8
  hideDisplayText?: boolean;
9
9
  isLoadingPlugins?: boolean;
10
10
  plugins?: unknown[];
11
+ name?: string;
11
12
  };
12
13
  /**
13
14
  * Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "1.44.1",
3
+ "version": "1.45.1",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -9,12 +9,7 @@
9
9
  "license": "Apache-2.0",
10
10
  "atlassian": {
11
11
  "team": "Linking Platform",
12
- "inPublicMirror": false,
13
- "releaseModel": "continuous",
14
12
  "i18n": true,
15
- "productPushConsumption": [
16
- "jira"
17
- ],
18
13
  "website": {
19
14
  "name": "Link Picker"
20
15
  },
@@ -60,17 +55,17 @@
60
55
  "@atlaskit/form": "^10.5.0",
61
56
  "@atlaskit/frontend-utilities": "^2.7.0",
62
57
  "@atlaskit/heading": "^2.4.0",
63
- "@atlaskit/icon": "^22.15.0",
58
+ "@atlaskit/icon": "^22.18.0",
64
59
  "@atlaskit/intl-messages-provider": "^1.0.2",
65
60
  "@atlaskit/linking-common": "^5.11.0",
66
- "@atlaskit/onboarding": "^11.12.0",
61
+ "@atlaskit/onboarding": "^11.14.0",
67
62
  "@atlaskit/platform-feature-flags": "^0.3.0",
68
- "@atlaskit/primitives": "^12.0.0",
63
+ "@atlaskit/primitives": "^12.1.0",
69
64
  "@atlaskit/spinner": "^16.3.0",
70
65
  "@atlaskit/tabs": "^16.4.0",
71
66
  "@atlaskit/textfield": "^6.5.0",
72
67
  "@atlaskit/theme": "^13.0.0",
73
- "@atlaskit/tokens": "^1.59.0",
68
+ "@atlaskit/tokens": "^1.60.0",
74
69
  "@atlaskit/tooltip": "^18.7.0",
75
70
  "@atlaskit/ufo": "^0.3.0",
76
71
  "@atlaskit/visually-hidden": "^1.5.0",
@@ -90,8 +85,8 @@
90
85
  "@af/analytics-codegen": "^0.1.0",
91
86
  "@af/integration-testing": "*",
92
87
  "@af/visual-regression": "*",
93
- "@atlaskit/dropdown-menu": "^12.17.0",
94
- "@atlaskit/link-provider": "^1.14.0",
88
+ "@atlaskit/dropdown-menu": "^12.18.0",
89
+ "@atlaskit/link-provider": "^1.16.0",
95
90
  "@atlaskit/link-test-helpers": "^7.5.0",
96
91
  "@atlaskit/visual-regression": "*",
97
92
  "@atlassian/feature-flags-test-utils": "*",