@atlaskit/link-picker 4.0.3 → 4.1.0

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,17 @@
1
1
  # @atlaskit/link-picker
2
2
 
3
+ ## 4.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`7117e5c06e992`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7117e5c06e992) -
8
+ [ux] ENGHEALTH-45703 fixing a11y violation aria-valid-attr-value for plugin search results error
9
+ screen
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 4.0.3
4
16
 
5
17
  ### Patch Changes
@@ -12,6 +12,7 @@ var _react = _interopRequireWildcard(require("react"));
12
12
  var React = _react;
13
13
  var _runtime = require("@compiled/react/runtime");
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _compiled = require("@atlaskit/primitives/compiled");
16
17
  var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
17
18
  var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
@@ -61,6 +62,12 @@ var SearchResults = exports.SearchResults = function SearchResults(_ref) {
61
62
  testId: testIds.tabItem
62
63
  }, tab.tabTitle);
63
64
  }));
65
+ var ErrorWrapper = function ErrorWrapper(_ref2) {
66
+ var children = _ref2.children;
67
+ return !!tabs.length && (0, _platformFeatureFlags.fg)('fix_invalid_aria_attr_in_link_picker_search_error') ? /*#__PURE__*/React.createElement("div", {
68
+ id: "".concat(testIds.tabList, "-").concat(activeTab, "-tab")
69
+ }, children) : children;
70
+ };
64
71
  return /*#__PURE__*/React.createElement(_searchResultsContainer.SearchResultsContainer, {
65
72
  hasTabs: !!tabs.length || isLoadingPlugins,
66
73
  adaptiveHeight: adaptiveHeight,
@@ -96,7 +103,7 @@ var SearchResults = exports.SearchResults = function SearchResults(_ref) {
96
103
  adaptiveHeight: adaptiveHeight,
97
104
  tabPanelId: "".concat(testIds.tabList, "-").concat(activeTab, "-tab"),
98
105
  shouldRenderNoResultsImage: shouldRenderNoResultsImage
99
- }), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 || (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(_linkSearchError.LinkSearchError, {
106
+ }), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 || (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(ErrorWrapper, null, /*#__PURE__*/React.createElement(_linkSearchError.LinkSearchError, {
100
107
  onRetry: retry
101
- }) : null));
108
+ })) : null));
102
109
  };
@@ -25,7 +25,7 @@ var testIds = exports.testIds = {
25
25
  };
26
26
  var PACKAGE_DATA = exports.PACKAGE_DATA = {
27
27
  packageName: "@atlaskit/link-picker" || '',
28
- packageVersion: "4.0.2" || '',
28
+ packageVersion: "4.0.3" || '',
29
29
  componentName: _constants.COMPONENT_NAME,
30
30
  source: _constants.COMPONENT_NAME
31
31
  };
@@ -3,6 +3,7 @@ import "./index.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { Fragment } from 'react';
6
+ import { fg } from '@atlaskit/platform-feature-flags';
6
7
  import { Box } from '@atlaskit/primitives/compiled';
7
8
  import Spinner from '@atlaskit/spinner/spinner';
8
9
  import Tabs, { Tab, TabList } from '@atlaskit/tabs';
@@ -50,6 +51,11 @@ export const SearchResults = ({
50
51
  key: tab.tabTitle,
51
52
  testId: testIds.tabItem
52
53
  }, tab.tabTitle)));
54
+ const ErrorWrapper = ({
55
+ children
56
+ }) => !!tabs.length && fg('fix_invalid_aria_attr_in_link_picker_search_error') ? /*#__PURE__*/React.createElement("div", {
57
+ id: `${testIds.tabList}-${activeTab}-tab`
58
+ }, children) : children;
53
59
  return /*#__PURE__*/React.createElement(SearchResultsContainer, {
54
60
  hasTabs: !!tabs.length || isLoadingPlugins,
55
61
  adaptiveHeight: adaptiveHeight,
@@ -85,7 +91,7 @@ export const SearchResults = ({
85
91
  adaptiveHeight: adaptiveHeight,
86
92
  tabPanelId: `${testIds.tabList}-${activeTab}-tab`,
87
93
  shouldRenderNoResultsImage: shouldRenderNoResultsImage
88
- }), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(LinkSearchError, {
94
+ }), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(ErrorWrapper, null, /*#__PURE__*/React.createElement(LinkSearchError, {
89
95
  onRetry: retry
90
- }) : null));
96
+ })) : null));
91
97
  };
@@ -15,7 +15,7 @@ export const testIds = {
15
15
  };
16
16
  export const PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/link-picker" || '',
18
- packageVersion: "4.0.2" || '',
18
+ packageVersion: "4.0.3" || '',
19
19
  componentName: COMPONENT_NAME,
20
20
  source: COMPONENT_NAME
21
21
  };
@@ -6,6 +6,7 @@ import { ax, ix } from "@compiled/react/runtime";
6
6
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7
7
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
8
8
  import { Fragment } from 'react';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
9
10
  import { Box } from '@atlaskit/primitives/compiled';
10
11
  import Spinner from '@atlaskit/spinner/spinner';
11
12
  import Tabs, { Tab, TabList } from '@atlaskit/tabs';
@@ -52,6 +53,12 @@ export var SearchResults = function SearchResults(_ref) {
52
53
  testId: testIds.tabItem
53
54
  }, tab.tabTitle);
54
55
  }));
56
+ var ErrorWrapper = function ErrorWrapper(_ref2) {
57
+ var children = _ref2.children;
58
+ return !!tabs.length && fg('fix_invalid_aria_attr_in_link_picker_search_error') ? /*#__PURE__*/React.createElement("div", {
59
+ id: "".concat(testIds.tabList, "-").concat(activeTab, "-tab")
60
+ }, children) : children;
61
+ };
55
62
  return /*#__PURE__*/React.createElement(SearchResultsContainer, {
56
63
  hasTabs: !!tabs.length || isLoadingPlugins,
57
64
  adaptiveHeight: adaptiveHeight,
@@ -87,7 +94,7 @@ export var SearchResults = function SearchResults(_ref) {
87
94
  adaptiveHeight: adaptiveHeight,
88
95
  tabPanelId: "".concat(testIds.tabList, "-").concat(activeTab, "-tab"),
89
96
  shouldRenderNoResultsImage: shouldRenderNoResultsImage
90
- }), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 || (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(LinkSearchError, {
97
+ }), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 || (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(ErrorWrapper, null, /*#__PURE__*/React.createElement(LinkSearchError, {
91
98
  onRetry: retry
92
- }) : null));
99
+ })) : null));
93
100
  };
@@ -16,7 +16,7 @@ export var testIds = {
16
16
  };
17
17
  export var PACKAGE_DATA = {
18
18
  packageName: "@atlaskit/link-picker" || '',
19
- packageVersion: "4.0.2" || '',
19
+ packageVersion: "4.0.3" || '',
20
20
  componentName: COMPONENT_NAME,
21
21
  source: COMPONENT_NAME
22
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/link-picker",
3
- "version": "4.0.3",
3
+ "version": "4.1.0",
4
4
  "description": "Standalone link picker",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "publishConfig": {
@@ -40,6 +40,9 @@
40
40
  },
41
41
  "aifc_create_enabled": {
42
42
  "type": "boolean"
43
+ },
44
+ "fix_invalid_aria_attr_in_link_picker_search_error": {
45
+ "type": "boolean"
43
46
  }
44
47
  },
45
48
  "scripts": {
@@ -51,7 +54,6 @@
51
54
  "@atlaskit/atlassian-context": "^0.6.0",
52
55
  "@atlaskit/button": "^23.6.0",
53
56
  "@atlaskit/css": "^0.17.0",
54
- "@atlaskit/feature-gate-js-client": "^5.5.0",
55
57
  "@atlaskit/form": "^14.3.0",
56
58
  "@atlaskit/frontend-utilities": "^3.2.0",
57
59
  "@atlaskit/heading": "^5.2.0",
@@ -63,13 +65,13 @@
63
65
  "@atlaskit/onboarding": "^14.4.0",
64
66
  "@atlaskit/platform-feature-flags": "^1.1.0",
65
67
  "@atlaskit/primitives": "^16.4.0",
66
- "@atlaskit/smart-card": "^43.11.0",
68
+ "@atlaskit/smart-card": "^43.14.0",
67
69
  "@atlaskit/spinner": "^19.0.0",
68
70
  "@atlaskit/tabs": "^18.2.0",
69
71
  "@atlaskit/textfield": "^8.1.0",
70
72
  "@atlaskit/theme": "^21.0.0",
71
73
  "@atlaskit/tokens": "^8.4.0",
72
- "@atlaskit/tooltip": "^20.10.0",
74
+ "@atlaskit/tooltip": "^20.11.0",
73
75
  "@atlaskit/ufo": "^0.4.0",
74
76
  "@atlaskit/visually-hidden": "^3.0.0",
75
77
  "@babel/runtime": "^7.0.0",
@@ -90,7 +92,7 @@
90
92
  "@af/integration-testing": "workspace:^",
91
93
  "@af/visual-regression": "workspace:^",
92
94
  "@atlaskit/dropdown-menu": "^16.3.0",
93
- "@atlaskit/link-test-helpers": "^8.5.0",
95
+ "@atlaskit/link-test-helpers": "^9.0.0",
94
96
  "@atlassian/feature-flags-test-utils": "^1.0.0",
95
97
  "@testing-library/dom": "^10.1.0",
96
98
  "@testing-library/jest-dom": "^6.4.5",