@atlaskit/link-picker 3.14.0 → 3.16.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 +15 -0
- package/dist/cjs/ui/link-picker/search-results/index.js +1 -9
- package/dist/cjs/ui/link-picker/search-results/link-search-list/index.js +8 -1
- package/dist/cjs/ui/main.js +1 -1
- package/dist/es2019/ui/link-picker/search-results/index.js +1 -9
- package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +8 -1
- package/dist/es2019/ui/main.js +1 -1
- package/dist/esm/ui/link-picker/search-results/index.js +1 -9
- package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +8 -1
- package/dist/esm/ui/main.js +1 -1
- package/dist/types/ui/link-picker/search-results/link-search-list/index.d.ts +5 -0
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/index.d.ts +5 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 3.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c3387bfdeaf1d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c3387bfdeaf1d) -
|
|
8
|
+
[ux] Copy change for link picker plugins header "Recently Viewed" changed to "Recently viewed"
|
|
9
|
+
|
|
10
|
+
## 3.15.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- [`df69392511ed8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/df69392511ed8) -
|
|
15
|
+
[ux] Renamed Google Drive tab to GDrive for link picker experiment and also removed scrolling tab
|
|
16
|
+
list as that is no longer needed for the experiment
|
|
17
|
+
|
|
3
18
|
## 3.14.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
|
@@ -12,7 +12,6 @@ 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 _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
|
|
16
15
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
16
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner/spinner"));
|
|
18
17
|
var _tabs = _interopRequireWildcard(require("@atlaskit/tabs"));
|
|
@@ -56,13 +55,6 @@ var SearchResults = exports.SearchResults = function SearchResults(_ref) {
|
|
|
56
55
|
retry = _ref.retry,
|
|
57
56
|
shouldRenderNoResultsImage = _ref.shouldRenderNoResultsImage;
|
|
58
57
|
var isActivePlugin = !!activePlugin;
|
|
59
|
-
// Experiment with new 3P tabs in link picker. For more info, please see: go/link-picker-3p-drive-one-pager.
|
|
60
|
-
var linkPicker3pDriveExperimentCohort = _featureGateJsClient.default.initializeCalled() ? _featureGateJsClient.default.getExperimentValue('link_picker_3p_drive_experiment', 'cohort', 'control') : 'control';
|
|
61
|
-
var googleDriveTabExperimentEnabled = linkPicker3pDriveExperimentCohort === 'show_google_drive_tab';
|
|
62
|
-
var linkPicker3pOneDriveExperimentCohort = _featureGateJsClient.default.initializeCalled() ? _featureGateJsClient.default.getExperimentValue('link_picker_3p_onedrive_experiment', 'cohort', 'control') : 'control';
|
|
63
|
-
var oneDriveTabExperimentEnabled = linkPicker3pOneDriveExperimentCohort === 'show_onedrive_tab';
|
|
64
|
-
var thirdPartyTabExperimentEnabled = googleDriveTabExperimentEnabled || oneDriveTabExperimentEnabled;
|
|
65
|
-
var showScrollingTabList = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.scrollingTabs) || thirdPartyTabExperimentEnabled;
|
|
66
58
|
var tabList = /*#__PURE__*/React.createElement(_tabs.TabList, null, tabs.map(function (tab) {
|
|
67
59
|
return /*#__PURE__*/React.createElement(_tabs.Tab, {
|
|
68
60
|
key: tab.tabTitle,
|
|
@@ -86,7 +78,7 @@ var SearchResults = exports.SearchResults = function SearchResults(_ref) {
|
|
|
86
78
|
testId: testIds.tabList,
|
|
87
79
|
selected: activeTab,
|
|
88
80
|
onChange: handleTabChange
|
|
89
|
-
},
|
|
81
|
+
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? /*#__PURE__*/React.createElement(_scrollingTabs.ScrollingTabList, null, tabList) : tabList), /*#__PURE__*/React.createElement(_trackTabViewed.TrackTabViewed, {
|
|
90
82
|
activePlugin: activePlugin
|
|
91
83
|
})), !error && /*#__PURE__*/React.createElement(_linkSearchList.LinkSearchList, {
|
|
92
84
|
id: linkSearchListId,
|
|
@@ -15,6 +15,7 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
15
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _reactIntlNext = require("react-intl-next");
|
|
18
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
19
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
19
20
|
var _visuallyHidden = _interopRequireDefault(require("@atlaskit/visually-hidden"));
|
|
20
21
|
var _minHeightContainer = require("../../../../common/ui/min-height-container");
|
|
@@ -40,6 +41,11 @@ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
|
|
|
40
41
|
defaultMessage: 'Recently Viewed',
|
|
41
42
|
description: 'Describes type of items shown in the list for screen-reader users'
|
|
42
43
|
},
|
|
44
|
+
titleRecentlyViewedFormatted: {
|
|
45
|
+
id: 'fabric.linkPicker.listTitle.recentlyViewedFormatted',
|
|
46
|
+
defaultMessage: 'Recently viewed',
|
|
47
|
+
description: 'Describes type of items shown in the list for screen-reader users'
|
|
48
|
+
},
|
|
43
49
|
titleResults: {
|
|
44
50
|
id: 'fabric.linkPicker.listTitle.results',
|
|
45
51
|
defaultMessage: 'Results',
|
|
@@ -80,7 +86,8 @@ var LinkSearchList = exports.LinkSearchList = /*#__PURE__*/(0, _react.forwardRef
|
|
|
80
86
|
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
81
87
|
var itemsContent;
|
|
82
88
|
var loadingContent;
|
|
83
|
-
var
|
|
89
|
+
var recentlyViewedMessage = (0, _platformFeatureFlags.fg)('platform-linking-link-picker-previewable-only') ? messages.titleRecentlyViewedFormatted : messages.titleRecentlyViewed;
|
|
90
|
+
var linkListTitle = hasSearchTerm ? messages.titleResults : recentlyViewedMessage;
|
|
84
91
|
(0, _useTrackResultsShown.useTrackResultsShown)(isLoading, items, hasSearchTerm);
|
|
85
92
|
var itemRefs = (0, _react.useRef)({});
|
|
86
93
|
var itemRefCallback = (0, _react.useCallback)(function (el, id) {
|
package/dist/cjs/ui/main.js
CHANGED
|
@@ -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: "
|
|
28
|
+
packageVersion: "3.15.0" || '',
|
|
29
29
|
componentName: _constants.COMPONENT_NAME,
|
|
30
30
|
source: _constants.COMPONENT_NAME
|
|
31
31
|
};
|
|
@@ -3,7 +3,6 @@ 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 FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
7
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
7
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
9
8
|
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
@@ -47,13 +46,6 @@ export const SearchResults = ({
|
|
|
47
46
|
}) => {
|
|
48
47
|
var _activePlugin$errorFa, _activePlugin$errorFa2;
|
|
49
48
|
const isActivePlugin = !!activePlugin;
|
|
50
|
-
// Experiment with new 3P tabs in link picker. For more info, please see: go/link-picker-3p-drive-one-pager.
|
|
51
|
-
const linkPicker3pDriveExperimentCohort = FeatureGates.initializeCalled() ? FeatureGates.getExperimentValue('link_picker_3p_drive_experiment', 'cohort', 'control') : 'control';
|
|
52
|
-
const googleDriveTabExperimentEnabled = linkPicker3pDriveExperimentCohort === 'show_google_drive_tab';
|
|
53
|
-
const linkPicker3pOneDriveExperimentCohort = FeatureGates.initializeCalled() ? FeatureGates.getExperimentValue('link_picker_3p_onedrive_experiment', 'cohort', 'control') : 'control';
|
|
54
|
-
const oneDriveTabExperimentEnabled = linkPicker3pOneDriveExperimentCohort === 'show_onedrive_tab';
|
|
55
|
-
const thirdPartyTabExperimentEnabled = googleDriveTabExperimentEnabled || oneDriveTabExperimentEnabled;
|
|
56
|
-
const showScrollingTabList = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.scrollingTabs) || thirdPartyTabExperimentEnabled;
|
|
57
49
|
const tabList = /*#__PURE__*/React.createElement(TabList, null, tabs.map(tab => /*#__PURE__*/React.createElement(Tab, {
|
|
58
50
|
key: tab.tabTitle,
|
|
59
51
|
testId: testIds.tabItem
|
|
@@ -75,7 +67,7 @@ export const SearchResults = ({
|
|
|
75
67
|
testId: testIds.tabList,
|
|
76
68
|
selected: activeTab,
|
|
77
69
|
onChange: handleTabChange
|
|
78
|
-
},
|
|
70
|
+
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? /*#__PURE__*/React.createElement(ScrollingTabList, null, tabList) : tabList), /*#__PURE__*/React.createElement(TrackTabViewed, {
|
|
79
71
|
activePlugin: activePlugin
|
|
80
72
|
})), !error && /*#__PURE__*/React.createElement(LinkSearchList, {
|
|
81
73
|
id: linkSearchListId,
|
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { forwardRef, Fragment, useCallback, useRef } from 'react';
|
|
7
7
|
import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
8
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
9
|
import Spinner from '@atlaskit/spinner';
|
|
9
10
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
10
11
|
import { MinHeightContainer } from '../../../../common/ui/min-height-container';
|
|
@@ -26,6 +27,11 @@ export const messages = defineMessages({
|
|
|
26
27
|
defaultMessage: 'Recently Viewed',
|
|
27
28
|
description: 'Describes type of items shown in the list for screen-reader users'
|
|
28
29
|
},
|
|
30
|
+
titleRecentlyViewedFormatted: {
|
|
31
|
+
id: 'fabric.linkPicker.listTitle.recentlyViewedFormatted',
|
|
32
|
+
defaultMessage: 'Recently viewed',
|
|
33
|
+
description: 'Describes type of items shown in the list for screen-reader users'
|
|
34
|
+
},
|
|
29
35
|
titleResults: {
|
|
30
36
|
id: 'fabric.linkPicker.listTitle.results',
|
|
31
37
|
defaultMessage: 'Results',
|
|
@@ -69,7 +75,8 @@ export const LinkSearchList = /*#__PURE__*/forwardRef(({
|
|
|
69
75
|
var _activePlugin$uiOptio;
|
|
70
76
|
let itemsContent;
|
|
71
77
|
let loadingContent;
|
|
72
|
-
const
|
|
78
|
+
const recentlyViewedMessage = fg('platform-linking-link-picker-previewable-only') ? messages.titleRecentlyViewedFormatted : messages.titleRecentlyViewed;
|
|
79
|
+
const linkListTitle = hasSearchTerm ? messages.titleResults : recentlyViewedMessage;
|
|
73
80
|
useTrackResultsShown(isLoading, items, hasSearchTerm);
|
|
74
81
|
const itemRefs = useRef({});
|
|
75
82
|
const itemRefCallback = useCallback((el, id) => {
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -6,7 +6,6 @@ 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 FeatureGates from '@atlaskit/feature-gate-js-client';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
12
11
|
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
@@ -47,13 +46,6 @@ export var SearchResults = function SearchResults(_ref) {
|
|
|
47
46
|
retry = _ref.retry,
|
|
48
47
|
shouldRenderNoResultsImage = _ref.shouldRenderNoResultsImage;
|
|
49
48
|
var isActivePlugin = !!activePlugin;
|
|
50
|
-
// Experiment with new 3P tabs in link picker. For more info, please see: go/link-picker-3p-drive-one-pager.
|
|
51
|
-
var linkPicker3pDriveExperimentCohort = FeatureGates.initializeCalled() ? FeatureGates.getExperimentValue('link_picker_3p_drive_experiment', 'cohort', 'control') : 'control';
|
|
52
|
-
var googleDriveTabExperimentEnabled = linkPicker3pDriveExperimentCohort === 'show_google_drive_tab';
|
|
53
|
-
var linkPicker3pOneDriveExperimentCohort = FeatureGates.initializeCalled() ? FeatureGates.getExperimentValue('link_picker_3p_onedrive_experiment', 'cohort', 'control') : 'control';
|
|
54
|
-
var oneDriveTabExperimentEnabled = linkPicker3pOneDriveExperimentCohort === 'show_onedrive_tab';
|
|
55
|
-
var thirdPartyTabExperimentEnabled = googleDriveTabExperimentEnabled || oneDriveTabExperimentEnabled;
|
|
56
|
-
var showScrollingTabList = (featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.scrollingTabs) || thirdPartyTabExperimentEnabled;
|
|
57
49
|
var tabList = /*#__PURE__*/React.createElement(TabList, null, tabs.map(function (tab) {
|
|
58
50
|
return /*#__PURE__*/React.createElement(Tab, {
|
|
59
51
|
key: tab.tabTitle,
|
|
@@ -77,7 +69,7 @@ export var SearchResults = function SearchResults(_ref) {
|
|
|
77
69
|
testId: testIds.tabList,
|
|
78
70
|
selected: activeTab,
|
|
79
71
|
onChange: handleTabChange
|
|
80
|
-
},
|
|
72
|
+
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? /*#__PURE__*/React.createElement(ScrollingTabList, null, tabList) : tabList), /*#__PURE__*/React.createElement(TrackTabViewed, {
|
|
81
73
|
activePlugin: activePlugin
|
|
82
74
|
})), !error && /*#__PURE__*/React.createElement(LinkSearchList, {
|
|
83
75
|
id: linkSearchListId,
|
|
@@ -10,6 +10,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
10
10
|
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; }
|
|
11
11
|
import { forwardRef, Fragment, useCallback, useRef } from 'react';
|
|
12
12
|
import { defineMessages, FormattedMessage } from 'react-intl-next';
|
|
13
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import Spinner from '@atlaskit/spinner';
|
|
14
15
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
15
16
|
import { MinHeightContainer } from '../../../../common/ui/min-height-container';
|
|
@@ -31,6 +32,11 @@ export var messages = defineMessages({
|
|
|
31
32
|
defaultMessage: 'Recently Viewed',
|
|
32
33
|
description: 'Describes type of items shown in the list for screen-reader users'
|
|
33
34
|
},
|
|
35
|
+
titleRecentlyViewedFormatted: {
|
|
36
|
+
id: 'fabric.linkPicker.listTitle.recentlyViewedFormatted',
|
|
37
|
+
defaultMessage: 'Recently viewed',
|
|
38
|
+
description: 'Describes type of items shown in the list for screen-reader users'
|
|
39
|
+
},
|
|
34
40
|
titleResults: {
|
|
35
41
|
id: 'fabric.linkPicker.listTitle.results',
|
|
36
42
|
defaultMessage: 'Results',
|
|
@@ -71,7 +77,8 @@ export var LinkSearchList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
71
77
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
72
78
|
var itemsContent;
|
|
73
79
|
var loadingContent;
|
|
74
|
-
var
|
|
80
|
+
var recentlyViewedMessage = fg('platform-linking-link-picker-previewable-only') ? messages.titleRecentlyViewedFormatted : messages.titleRecentlyViewed;
|
|
81
|
+
var linkListTitle = hasSearchTerm ? messages.titleResults : recentlyViewedMessage;
|
|
75
82
|
useTrackResultsShown(isLoading, items, hasSearchTerm);
|
|
76
83
|
var itemRefs = useRef({});
|
|
77
84
|
var itemRefCallback = useCallback(function (el, id) {
|
package/dist/esm/ui/main.js
CHANGED
|
@@ -10,6 +10,11 @@ export declare const messages: {
|
|
|
10
10
|
defaultMessage: string;
|
|
11
11
|
description: string;
|
|
12
12
|
};
|
|
13
|
+
titleRecentlyViewedFormatted: {
|
|
14
|
+
id: string;
|
|
15
|
+
defaultMessage: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
13
18
|
titleResults: {
|
|
14
19
|
id: string;
|
|
15
20
|
defaultMessage: string;
|
|
@@ -10,6 +10,11 @@ export declare const messages: {
|
|
|
10
10
|
defaultMessage: string;
|
|
11
11
|
description: string;
|
|
12
12
|
};
|
|
13
|
+
titleRecentlyViewedFormatted: {
|
|
14
|
+
id: string;
|
|
15
|
+
defaultMessage: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
13
18
|
titleResults: {
|
|
14
19
|
id: string;
|
|
15
20
|
defaultMessage: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.16.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@atlaskit/form": "^14.2.0",
|
|
62
62
|
"@atlaskit/frontend-utilities": "^3.2.0",
|
|
63
63
|
"@atlaskit/heading": "^5.2.0",
|
|
64
|
-
"@atlaskit/icon": "^28.
|
|
64
|
+
"@atlaskit/icon": "^28.5.0",
|
|
65
65
|
"@atlaskit/intl-messages-provider": "^2.0.0",
|
|
66
66
|
"@atlaskit/link": "^3.2.0",
|
|
67
67
|
"@atlaskit/link-provider": "^4.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@atlaskit/onboarding": "^14.4.0",
|
|
70
70
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
71
71
|
"@atlaskit/primitives": "^14.15.0",
|
|
72
|
-
"@atlaskit/smart-card": "^43.
|
|
72
|
+
"@atlaskit/smart-card": "^43.1.0",
|
|
73
73
|
"@atlaskit/spinner": "^19.0.0",
|
|
74
74
|
"@atlaskit/tabs": "^18.2.0",
|
|
75
75
|
"@atlaskit/textfield": "^8.0.0",
|