@atlaskit/link-picker 1.20.3 → 1.22.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 +12 -0
- package/dist/cjs/services/use-plugins/index.js +5 -0
- package/dist/cjs/ui/index.js +17 -2
- package/dist/cjs/ui/link-picker/conditional-spotlight-target-wrapper/index.js +17 -0
- package/dist/cjs/ui/link-picker/index.js +3 -17
- package/dist/cjs/ui/link-picker/text-input/index.js +7 -3
- package/dist/cjs/ui/link-picker/track-tab-viewed/index.js +5 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/services/use-plugins/index.js +6 -0
- package/dist/es2019/ui/index.js +26 -7
- package/dist/es2019/ui/link-picker/conditional-spotlight-target-wrapper/index.js +10 -0
- package/dist/es2019/ui/link-picker/index.js +3 -17
- package/dist/es2019/ui/link-picker/text-input/index.js +6 -2
- package/dist/es2019/ui/link-picker/track-tab-viewed/index.js +5 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/services/use-plugins/index.js +5 -0
- package/dist/esm/ui/index.js +15 -1
- package/dist/esm/ui/link-picker/conditional-spotlight-target-wrapper/index.js +9 -0
- package/dist/esm/ui/link-picker/index.js +3 -17
- package/dist/esm/ui/link-picker/text-input/index.js +7 -3
- package/dist/esm/ui/link-picker/track-tab-viewed/index.js +5 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/ui/index.d.ts +3 -0
- package/dist/types/ui/link-picker/conditional-spotlight-target-wrapper/index.d.ts +7 -0
- package/dist/types/ui/link-picker/text-input/index.d.ts +3 -2
- package/dist/types/ui/link-picker/track-tab-viewed/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/link-picker/conditional-spotlight-target-wrapper/index.d.ts +7 -0
- package/dist/types-ts4.5/ui/link-picker/text-input/index.d.ts +3 -2
- package/dist/types-ts4.5/ui/link-picker/track-tab-viewed/index.d.ts +3 -2
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 1.22.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`cd623c7a474`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cd623c7a474) - [ux] Wrap search input with conditional spotlight target for better onboarding
|
|
8
|
+
|
|
9
|
+
## 1.21.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`63a3923d4cd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/63a3923d4cd) - Fix tab attribute analytics to display correct product on initial load
|
|
14
|
+
|
|
3
15
|
## 1.20.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -16,7 +16,9 @@ var _analytics = _interopRequireDefault(require("../../analytics.codegen"));
|
|
|
16
16
|
var _constants = require("../../common/constants");
|
|
17
17
|
var _utils = require("./utils");
|
|
18
18
|
var _reducer = require("./reducer");
|
|
19
|
+
var _analytics2 = require("../../common/analytics");
|
|
19
20
|
function usePlugins(state, activeTab, plugins) {
|
|
21
|
+
var _activePlugin$tabKey;
|
|
20
22
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
21
23
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
22
24
|
var _useState = (0, _react.useState)(0),
|
|
@@ -27,7 +29,10 @@ function usePlugins(state, activeTab, plugins) {
|
|
|
27
29
|
_usePluginReducer2 = (0, _slicedToArray2.default)(_usePluginReducer, 2),
|
|
28
30
|
pluginState = _usePluginReducer2[0],
|
|
29
31
|
dispatch = _usePluginReducer2[1];
|
|
32
|
+
var _useLinkPickerAnalyti = (0, _analytics2.useLinkPickerAnalytics)(),
|
|
33
|
+
trackAttribute = _useLinkPickerAnalyti.trackAttribute;
|
|
30
34
|
var activePlugin = plugins === null || plugins === void 0 ? void 0 : plugins[activeTab];
|
|
35
|
+
trackAttribute('tab', (_activePlugin$tabKey = activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) !== null && _activePlugin$tabKey !== void 0 ? _activePlugin$tabKey : null);
|
|
31
36
|
|
|
32
37
|
// This useEffect block must be called before any other to ensure onActivation is fired at before resolve
|
|
33
38
|
(0, _react.useEffect)(function () {
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -4,8 +4,9 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.default = exports.PACKAGE_DATA = exports.ComposedLinkPicker = void 0;
|
|
7
|
+
exports.testIds = exports.default = exports.PACKAGE_DATA = exports.ComposedLinkPicker = void 0;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
10
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
10
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
12
|
var _reactLooselyLazy = require("react-loosely-lazy");
|
|
@@ -16,6 +17,10 @@ var _loaderFallback = require("./loader-fallback");
|
|
|
16
17
|
var _sessionProvider = require("../controllers/session-provider");
|
|
17
18
|
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); }
|
|
18
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || (0, _typeof2.default)(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; }
|
|
20
|
+
var testIds = {
|
|
21
|
+
linkPickerRoot: 'link-picker-root'
|
|
22
|
+
};
|
|
23
|
+
exports.testIds = testIds;
|
|
19
24
|
var PACKAGE_DATA = {
|
|
20
25
|
packageName: _version.name,
|
|
21
26
|
packageVersion: _version.version,
|
|
@@ -29,14 +34,24 @@ var LazyLinkPicker = (0, _reactLooselyLazy.lazyForPaint)(function () {
|
|
|
29
34
|
'./link-picker'));
|
|
30
35
|
});
|
|
31
36
|
});
|
|
37
|
+
var DefaultRootComponent = function DefaultRootComponent(_ref) {
|
|
38
|
+
var children = _ref.children;
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
40
|
+
"data-testid": testIds.linkPickerRoot
|
|
41
|
+
}, children);
|
|
42
|
+
};
|
|
32
43
|
var ComposedLinkPicker = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
44
|
+
var component = props.component;
|
|
45
|
+
var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
33
46
|
return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
|
|
34
47
|
data: PACKAGE_DATA
|
|
35
48
|
}, /*#__PURE__*/_react.default.createElement(_sessionProvider.LinkPickerSessionProvider, null, /*#__PURE__*/_react.default.createElement(_errorBoundary.default, null, /*#__PURE__*/_react.default.createElement(_reactLooselyLazy.LazySuspense, {
|
|
36
49
|
fallback: /*#__PURE__*/_react.default.createElement(_loaderFallback.LoaderFallback, {
|
|
37
50
|
hideDisplayText: props.hideDisplayText
|
|
38
51
|
})
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
52
|
+
}, /*#__PURE__*/_react.default.createElement(RootComponent, (0, _extends2.default)({}, props, {
|
|
53
|
+
"data-testid": testIds.linkPickerRoot
|
|
54
|
+
}), /*#__PURE__*/_react.default.createElement(LazyLinkPicker, props))))));
|
|
40
55
|
});
|
|
41
56
|
exports.ComposedLinkPicker = ComposedLinkPicker;
|
|
42
57
|
var _default = ComposedLinkPicker;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ConditionalSpotlightTargetWrapper = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _onboarding = require("@atlaskit/onboarding");
|
|
10
|
+
var ConditionalSpotlightTargetWrapper = function ConditionalSpotlightTargetWrapper(_ref) {
|
|
11
|
+
var spotlightTargetName = _ref.spotlightTargetName,
|
|
12
|
+
children = _ref.children;
|
|
13
|
+
return spotlightTargetName ? /*#__PURE__*/_react.default.createElement(_onboarding.SpotlightTarget, {
|
|
14
|
+
name: spotlightTargetName
|
|
15
|
+
}, children) : children;
|
|
16
|
+
};
|
|
17
|
+
exports.ConditionalSpotlightTargetWrapper = ConditionalSpotlightTargetWrapper;
|
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.testIds = exports.default = exports.RECENT_SEARCH_LIST_SIZE = void 0;
|
|
9
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
10
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
11
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -36,7 +35,6 @@ var _formFooter = _interopRequireWildcard(require("./form-footer"));
|
|
|
36
35
|
var _utils = require("./utils");
|
|
37
36
|
var _trackTabViewed = _interopRequireDefault(require("./track-tab-viewed"));
|
|
38
37
|
var _trackMount = _interopRequireDefault(require("./track-mount"));
|
|
39
|
-
var _excluded = ["component"];
|
|
40
38
|
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); }
|
|
41
39
|
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; }
|
|
42
40
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -334,6 +332,7 @@ function LinkPicker(_ref) {
|
|
|
334
332
|
"aria-activedescendant": ariaActiveDescendant,
|
|
335
333
|
"aria-describedby": screenReaderDescriptionId,
|
|
336
334
|
error: invalidUrl ? intl.formatMessage(_messages.formMessages.linkInvalid) : null,
|
|
335
|
+
spotlightTargetName: "link-picker-search-field-spotlight-target",
|
|
337
336
|
onClear: handleUrlClear,
|
|
338
337
|
onKeyDown: handleKeyDown,
|
|
339
338
|
onChange: handleChangeUrl
|
|
@@ -356,7 +355,7 @@ function LinkPicker(_ref) {
|
|
|
356
355
|
selected: activeTab,
|
|
357
356
|
onChange: handleTabChange
|
|
358
357
|
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? (0, _react2.jsx)(_scrollingTabs.default, null, tabList) : tabList), (0, _react2.jsx)(_trackTabViewed.default, {
|
|
359
|
-
|
|
358
|
+
activePlugin: activePlugin
|
|
360
359
|
})), (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
361
360
|
css: _styled.flexColumnStyles
|
|
362
361
|
}, fixListHeightProps), !error && (0, _react2.jsx)(_linkSearchList.default, {
|
|
@@ -381,18 +380,5 @@ function LinkPicker(_ref) {
|
|
|
381
380
|
css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? _styled.formFooterMargin : undefined
|
|
382
381
|
}));
|
|
383
382
|
}
|
|
384
|
-
var
|
|
385
|
-
var children = _ref2.children;
|
|
386
|
-
return (0, _react2.jsx)("div", {
|
|
387
|
-
"data-testid": testIds.linkPickerRoot
|
|
388
|
-
}, children);
|
|
389
|
-
};
|
|
390
|
-
var _default = (0, _analytics2.withLinkPickerAnalyticsContext)( /*#__PURE__*/(0, _react.memo)(function (_ref3) {
|
|
391
|
-
var component = _ref3.component,
|
|
392
|
-
props = (0, _objectWithoutProperties2.default)(_ref3, _excluded);
|
|
393
|
-
var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
394
|
-
return (0, _react2.jsx)(RootComponent, (0, _extends2.default)({}, props, {
|
|
395
|
-
"data-testid": testIds.linkPickerRoot
|
|
396
|
-
}), (0, _react2.jsx)(LinkPicker, props));
|
|
397
|
-
}));
|
|
383
|
+
var _default = (0, _analytics2.withLinkPickerAnalyticsContext)( /*#__PURE__*/(0, _react.memo)(LinkPicker));
|
|
398
384
|
exports.default = _default;
|
|
@@ -13,9 +13,10 @@ var _form = require("@atlaskit/form");
|
|
|
13
13
|
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
14
|
var _textfield = _interopRequireDefault(require("@atlaskit/textfield"));
|
|
15
15
|
var _selectClear = _interopRequireDefault(require("@atlaskit/icon/glyph/select-clear"));
|
|
16
|
+
var _conditionalSpotlightTargetWrapper = require("../conditional-spotlight-target-wrapper");
|
|
16
17
|
var _utils = require("../utils");
|
|
17
18
|
var _styled = require("./styled");
|
|
18
|
-
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error"];
|
|
19
|
+
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName"];
|
|
19
20
|
/** @jsx jsx */
|
|
20
21
|
var testIds = {
|
|
21
22
|
urlError: 'link-error',
|
|
@@ -32,6 +33,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
32
33
|
onClear = _ref.onClear,
|
|
33
34
|
clearLabel = _ref.clearLabel,
|
|
34
35
|
error = _ref.error,
|
|
36
|
+
spotlightTargetName = _ref.spotlightTargetName,
|
|
35
37
|
restProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
36
38
|
var inputRef = (0, _react.useRef)(null);
|
|
37
39
|
var handleRef = (0, _react.useCallback)(function (input) {
|
|
@@ -82,14 +84,16 @@ var TextInput = function TextInput(_ref) {
|
|
|
82
84
|
name: name
|
|
83
85
|
}, function (_ref2) {
|
|
84
86
|
var fieldProps = _ref2.fieldProps;
|
|
85
|
-
return (0, _react2.jsx)(
|
|
87
|
+
return (0, _react2.jsx)(_conditionalSpotlightTargetWrapper.ConditionalSpotlightTargetWrapper, {
|
|
88
|
+
spotlightTargetName: spotlightTargetName
|
|
89
|
+
}, (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_textfield.default, (0, _extends2.default)({}, fieldProps, restProps, {
|
|
86
90
|
onKeyDown: handleKeydown,
|
|
87
91
|
ref: handleRef,
|
|
88
92
|
elemAfterInput: clearText,
|
|
89
93
|
isInvalid: !!error
|
|
90
94
|
})), error && (0, _react2.jsx)(_form.ErrorMessage, {
|
|
91
95
|
testId: testIds.urlError
|
|
92
|
-
}, error));
|
|
96
|
+
}, error)));
|
|
93
97
|
}));
|
|
94
98
|
};
|
|
95
99
|
var _default = TextInput;
|
|
@@ -12,12 +12,14 @@ var _constants = require("../../../common/constants");
|
|
|
12
12
|
/** @jsx jsx */
|
|
13
13
|
|
|
14
14
|
function TrackTabViewed(_ref) {
|
|
15
|
-
var
|
|
15
|
+
var activePlugin = _ref.activePlugin;
|
|
16
16
|
var _useAnalyticsEvents = (0, _analyticsNext.useAnalyticsEvents)(),
|
|
17
17
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
18
18
|
(0, _react.useLayoutEffect)(function () {
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
if (activePlugin) {
|
|
20
|
+
createAnalyticsEvent((0, _analytics.default)('ui.tab.viewed', {})).fire(_constants.ANALYTICS_CHANNEL);
|
|
21
|
+
}
|
|
22
|
+
}, [activePlugin, createAnalyticsEvent]);
|
|
21
23
|
return null;
|
|
22
24
|
}
|
|
23
25
|
var _default = TrackTabViewed;
|
package/dist/cjs/version.json
CHANGED
|
@@ -6,13 +6,19 @@ import createEventPayload from '../../analytics.codegen';
|
|
|
6
6
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
7
7
|
import { CancellationError, resolvePluginUpdates } from './utils';
|
|
8
8
|
import { usePluginReducer } from './reducer';
|
|
9
|
+
import { useLinkPickerAnalytics } from '../../common/analytics';
|
|
9
10
|
export function usePlugins(state, activeTab, plugins) {
|
|
11
|
+
var _activePlugin$tabKey;
|
|
10
12
|
const {
|
|
11
13
|
createAnalyticsEvent
|
|
12
14
|
} = useAnalyticsEvents();
|
|
13
15
|
const [retries, setRetries] = useState(0);
|
|
14
16
|
const [pluginState, dispatch] = usePluginReducer();
|
|
17
|
+
const {
|
|
18
|
+
trackAttribute
|
|
19
|
+
} = useLinkPickerAnalytics();
|
|
15
20
|
const activePlugin = plugins === null || plugins === void 0 ? void 0 : plugins[activeTab];
|
|
21
|
+
trackAttribute('tab', (_activePlugin$tabKey = activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) !== null && _activePlugin$tabKey !== void 0 ? _activePlugin$tabKey : null);
|
|
16
22
|
|
|
17
23
|
// This useEffect block must be called before any other to ensure onActivation is fired at before resolve
|
|
18
24
|
useEffect(() => {
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
2
3
|
import React, { memo } from 'react';
|
|
3
4
|
import { LazySuspense, lazyForPaint } from 'react-loosely-lazy';
|
|
@@ -6,6 +7,9 @@ import { name as packageName, version as packageVersion } from '../version.json'
|
|
|
6
7
|
import ErrorBoundary from './error-boundary';
|
|
7
8
|
import { LoaderFallback } from './loader-fallback';
|
|
8
9
|
import { LinkPickerSessionProvider } from '../controllers/session-provider';
|
|
10
|
+
export const testIds = {
|
|
11
|
+
linkPickerRoot: 'link-picker-root'
|
|
12
|
+
};
|
|
9
13
|
export const PACKAGE_DATA = {
|
|
10
14
|
packageName,
|
|
11
15
|
packageVersion,
|
|
@@ -14,11 +18,26 @@ export const PACKAGE_DATA = {
|
|
|
14
18
|
};
|
|
15
19
|
const LazyLinkPicker = lazyForPaint(() => import( /* webpackChunkName: "@atlaskit-internal_link-picker" */
|
|
16
20
|
'./link-picker'));
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
})
|
|
23
|
-
}
|
|
21
|
+
const DefaultRootComponent = ({
|
|
22
|
+
children
|
|
23
|
+
}) => {
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
"data-testid": testIds.linkPickerRoot
|
|
26
|
+
}, children);
|
|
27
|
+
};
|
|
28
|
+
export const ComposedLinkPicker = /*#__PURE__*/memo(props => {
|
|
29
|
+
const {
|
|
30
|
+
component
|
|
31
|
+
} = props;
|
|
32
|
+
const RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
33
|
+
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
34
|
+
data: PACKAGE_DATA
|
|
35
|
+
}, /*#__PURE__*/React.createElement(LinkPickerSessionProvider, null, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(LazySuspense, {
|
|
36
|
+
fallback: /*#__PURE__*/React.createElement(LoaderFallback, {
|
|
37
|
+
hideDisplayText: props.hideDisplayText
|
|
38
|
+
})
|
|
39
|
+
}, /*#__PURE__*/React.createElement(RootComponent, _extends({}, props, {
|
|
40
|
+
"data-testid": testIds.linkPickerRoot
|
|
41
|
+
}), /*#__PURE__*/React.createElement(LazyLinkPicker, props))))));
|
|
42
|
+
});
|
|
24
43
|
export default ComposedLinkPicker;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpotlightTarget } from '@atlaskit/onboarding';
|
|
3
|
+
export const ConditionalSpotlightTargetWrapper = ({
|
|
4
|
+
spotlightTargetName,
|
|
5
|
+
children
|
|
6
|
+
}) => {
|
|
7
|
+
return spotlightTargetName ? /*#__PURE__*/React.createElement(SpotlightTarget, {
|
|
8
|
+
name: spotlightTargetName
|
|
9
|
+
}, children) : children;
|
|
10
|
+
};
|
|
@@ -326,6 +326,7 @@ function LinkPicker({
|
|
|
326
326
|
"aria-activedescendant": ariaActiveDescendant,
|
|
327
327
|
"aria-describedby": screenReaderDescriptionId,
|
|
328
328
|
error: invalidUrl ? intl.formatMessage(formMessages.linkInvalid) : null,
|
|
329
|
+
spotlightTargetName: "link-picker-search-field-spotlight-target",
|
|
329
330
|
onClear: handleUrlClear,
|
|
330
331
|
onKeyDown: handleKeyDown,
|
|
331
332
|
onChange: handleChangeUrl
|
|
@@ -348,7 +349,7 @@ function LinkPicker({
|
|
|
348
349
|
selected: activeTab,
|
|
349
350
|
onChange: handleTabChange
|
|
350
351
|
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? jsx(ScrollingTabList, null, tabList) : tabList), jsx(TrackTabViewed, {
|
|
351
|
-
|
|
352
|
+
activePlugin: activePlugin
|
|
352
353
|
})), jsx("div", _extends({
|
|
353
354
|
css: flexColumnStyles
|
|
354
355
|
}, fixListHeightProps), !error && jsx(LinkSearchList, {
|
|
@@ -373,19 +374,4 @@ function LinkPicker({
|
|
|
373
374
|
css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? formFooterMargin : undefined
|
|
374
375
|
}));
|
|
375
376
|
}
|
|
376
|
-
|
|
377
|
-
children
|
|
378
|
-
}) => {
|
|
379
|
-
return jsx("div", {
|
|
380
|
-
"data-testid": testIds.linkPickerRoot
|
|
381
|
-
}, children);
|
|
382
|
-
};
|
|
383
|
-
export default withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
384
|
-
component,
|
|
385
|
-
...props
|
|
386
|
-
}) => {
|
|
387
|
-
const RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
388
|
-
return jsx(RootComponent, _extends({}, props, {
|
|
389
|
-
"data-testid": testIds.linkPickerRoot
|
|
390
|
-
}), jsx(LinkPicker, props));
|
|
391
|
-
}));
|
|
377
|
+
export default withLinkPickerAnalyticsContext( /*#__PURE__*/memo(LinkPicker));
|
|
@@ -6,6 +6,7 @@ import { ErrorMessage, Field } from '@atlaskit/form';
|
|
|
6
6
|
import Tooltip from '@atlaskit/tooltip';
|
|
7
7
|
import Textfield from '@atlaskit/textfield';
|
|
8
8
|
import Selectclear from '@atlaskit/icon/glyph/select-clear';
|
|
9
|
+
import { ConditionalSpotlightTargetWrapper } from '../conditional-spotlight-target-wrapper';
|
|
9
10
|
import { isRedoEvent, isUndoEvent } from '../utils';
|
|
10
11
|
import { clearTextButtonStyles, fieldStyles } from './styled';
|
|
11
12
|
export const testIds = {
|
|
@@ -22,6 +23,7 @@ const TextInput = ({
|
|
|
22
23
|
onClear,
|
|
23
24
|
clearLabel,
|
|
24
25
|
error,
|
|
26
|
+
spotlightTargetName,
|
|
25
27
|
...restProps
|
|
26
28
|
}) => {
|
|
27
29
|
const inputRef = useRef(null);
|
|
@@ -74,14 +76,16 @@ const TextInput = ({
|
|
|
74
76
|
}, ({
|
|
75
77
|
fieldProps
|
|
76
78
|
}) => {
|
|
77
|
-
return jsx(
|
|
79
|
+
return jsx(ConditionalSpotlightTargetWrapper, {
|
|
80
|
+
spotlightTargetName: spotlightTargetName
|
|
81
|
+
}, jsx(Fragment, null, jsx(Textfield, _extends({}, fieldProps, restProps, {
|
|
78
82
|
onKeyDown: handleKeydown,
|
|
79
83
|
ref: handleRef,
|
|
80
84
|
elemAfterInput: clearText,
|
|
81
85
|
isInvalid: !!error
|
|
82
86
|
})), error && jsx(ErrorMessage, {
|
|
83
87
|
testId: testIds.urlError
|
|
84
|
-
}, error));
|
|
88
|
+
}, error)));
|
|
85
89
|
}));
|
|
86
90
|
};
|
|
87
91
|
export default TextInput;
|
|
@@ -4,14 +4,16 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
4
4
|
import createEventPayload from '../../../analytics.codegen';
|
|
5
5
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
6
6
|
function TrackTabViewed({
|
|
7
|
-
|
|
7
|
+
activePlugin
|
|
8
8
|
}) {
|
|
9
9
|
const {
|
|
10
10
|
createAnalyticsEvent
|
|
11
11
|
} = useAnalyticsEvents();
|
|
12
12
|
useLayoutEffect(() => {
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
if (activePlugin) {
|
|
14
|
+
createAnalyticsEvent(createEventPayload('ui.tab.viewed', {})).fire(ANALYTICS_CHANNEL);
|
|
15
|
+
}
|
|
16
|
+
}, [activePlugin, createAnalyticsEvent]);
|
|
15
17
|
return null;
|
|
16
18
|
}
|
|
17
19
|
export default TrackTabViewed;
|
package/dist/es2019/version.json
CHANGED
|
@@ -9,7 +9,9 @@ import createEventPayload from '../../analytics.codegen';
|
|
|
9
9
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
10
10
|
import { CancellationError, resolvePluginUpdates } from './utils';
|
|
11
11
|
import { usePluginReducer } from './reducer';
|
|
12
|
+
import { useLinkPickerAnalytics } from '../../common/analytics';
|
|
12
13
|
export function usePlugins(state, activeTab, plugins) {
|
|
14
|
+
var _activePlugin$tabKey;
|
|
13
15
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
14
16
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
15
17
|
var _useState = useState(0),
|
|
@@ -20,7 +22,10 @@ export function usePlugins(state, activeTab, plugins) {
|
|
|
20
22
|
_usePluginReducer2 = _slicedToArray(_usePluginReducer, 2),
|
|
21
23
|
pluginState = _usePluginReducer2[0],
|
|
22
24
|
dispatch = _usePluginReducer2[1];
|
|
25
|
+
var _useLinkPickerAnalyti = useLinkPickerAnalytics(),
|
|
26
|
+
trackAttribute = _useLinkPickerAnalyti.trackAttribute;
|
|
23
27
|
var activePlugin = plugins === null || plugins === void 0 ? void 0 : plugins[activeTab];
|
|
28
|
+
trackAttribute('tab', (_activePlugin$tabKey = activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) !== null && _activePlugin$tabKey !== void 0 ? _activePlugin$tabKey : null);
|
|
24
29
|
|
|
25
30
|
// This useEffect block must be called before any other to ensure onActivation is fired at before resolve
|
|
26
31
|
useEffect(function () {
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
1
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
2
3
|
import React, { memo } from 'react';
|
|
3
4
|
import { LazySuspense, lazyForPaint } from 'react-loosely-lazy';
|
|
@@ -6,6 +7,9 @@ import { name as packageName, version as packageVersion } from '../version.json'
|
|
|
6
7
|
import ErrorBoundary from './error-boundary';
|
|
7
8
|
import { LoaderFallback } from './loader-fallback';
|
|
8
9
|
import { LinkPickerSessionProvider } from '../controllers/session-provider';
|
|
10
|
+
export var testIds = {
|
|
11
|
+
linkPickerRoot: 'link-picker-root'
|
|
12
|
+
};
|
|
9
13
|
export var PACKAGE_DATA = {
|
|
10
14
|
packageName: packageName,
|
|
11
15
|
packageVersion: packageVersion,
|
|
@@ -16,13 +20,23 @@ var LazyLinkPicker = lazyForPaint(function () {
|
|
|
16
20
|
return import( /* webpackChunkName: "@atlaskit-internal_link-picker" */
|
|
17
21
|
'./link-picker');
|
|
18
22
|
});
|
|
23
|
+
var DefaultRootComponent = function DefaultRootComponent(_ref) {
|
|
24
|
+
var children = _ref.children;
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
"data-testid": testIds.linkPickerRoot
|
|
27
|
+
}, children);
|
|
28
|
+
};
|
|
19
29
|
export var ComposedLinkPicker = /*#__PURE__*/memo(function (props) {
|
|
30
|
+
var component = props.component;
|
|
31
|
+
var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
20
32
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
21
33
|
data: PACKAGE_DATA
|
|
22
34
|
}, /*#__PURE__*/React.createElement(LinkPickerSessionProvider, null, /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(LazySuspense, {
|
|
23
35
|
fallback: /*#__PURE__*/React.createElement(LoaderFallback, {
|
|
24
36
|
hideDisplayText: props.hideDisplayText
|
|
25
37
|
})
|
|
26
|
-
}, /*#__PURE__*/React.createElement(
|
|
38
|
+
}, /*#__PURE__*/React.createElement(RootComponent, _extends({}, props, {
|
|
39
|
+
"data-testid": testIds.linkPickerRoot
|
|
40
|
+
}), /*#__PURE__*/React.createElement(LazyLinkPicker, props))))));
|
|
27
41
|
});
|
|
28
42
|
export default ComposedLinkPicker;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SpotlightTarget } from '@atlaskit/onboarding';
|
|
3
|
+
export var ConditionalSpotlightTargetWrapper = function ConditionalSpotlightTargetWrapper(_ref) {
|
|
4
|
+
var spotlightTargetName = _ref.spotlightTargetName,
|
|
5
|
+
children = _ref.children;
|
|
6
|
+
return spotlightTargetName ? /*#__PURE__*/React.createElement(SpotlightTarget, {
|
|
7
|
+
name: spotlightTargetName
|
|
8
|
+
}, children) : children;
|
|
9
|
+
};
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
-
var _excluded = ["component"];
|
|
6
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
5
|
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; }
|
|
8
6
|
/** @jsx jsx */
|
|
@@ -323,6 +321,7 @@ function LinkPicker(_ref) {
|
|
|
323
321
|
"aria-activedescendant": ariaActiveDescendant,
|
|
324
322
|
"aria-describedby": screenReaderDescriptionId,
|
|
325
323
|
error: invalidUrl ? intl.formatMessage(formMessages.linkInvalid) : null,
|
|
324
|
+
spotlightTargetName: "link-picker-search-field-spotlight-target",
|
|
326
325
|
onClear: handleUrlClear,
|
|
327
326
|
onKeyDown: handleKeyDown,
|
|
328
327
|
onChange: handleChangeUrl
|
|
@@ -345,7 +344,7 @@ function LinkPicker(_ref) {
|
|
|
345
344
|
selected: activeTab,
|
|
346
345
|
onChange: handleTabChange
|
|
347
346
|
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? jsx(ScrollingTabList, null, tabList) : tabList), jsx(TrackTabViewed, {
|
|
348
|
-
|
|
347
|
+
activePlugin: activePlugin
|
|
349
348
|
})), jsx("div", _extends({
|
|
350
349
|
css: flexColumnStyles
|
|
351
350
|
}, fixListHeightProps), !error && jsx(LinkSearchList, {
|
|
@@ -370,17 +369,4 @@ function LinkPicker(_ref) {
|
|
|
370
369
|
css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? formFooterMargin : undefined
|
|
371
370
|
}));
|
|
372
371
|
}
|
|
373
|
-
|
|
374
|
-
var children = _ref2.children;
|
|
375
|
-
return jsx("div", {
|
|
376
|
-
"data-testid": testIds.linkPickerRoot
|
|
377
|
-
}, children);
|
|
378
|
-
};
|
|
379
|
-
export default withLinkPickerAnalyticsContext( /*#__PURE__*/memo(function (_ref3) {
|
|
380
|
-
var component = _ref3.component,
|
|
381
|
-
props = _objectWithoutProperties(_ref3, _excluded);
|
|
382
|
-
var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
383
|
-
return jsx(RootComponent, _extends({}, props, {
|
|
384
|
-
"data-testid": testIds.linkPickerRoot
|
|
385
|
-
}), jsx(LinkPicker, props));
|
|
386
|
-
}));
|
|
372
|
+
export default withLinkPickerAnalyticsContext( /*#__PURE__*/memo(LinkPicker));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
-
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error"];
|
|
3
|
+
var _excluded = ["name", "label", "autoFocus", "onRedo", "onUndo", "onKeyDown", "onClear", "clearLabel", "error", "spotlightTargetName"];
|
|
4
4
|
/** @jsx jsx */
|
|
5
5
|
import { useCallback, useRef, Fragment } from 'react';
|
|
6
6
|
import { jsx } from '@emotion/react';
|
|
@@ -8,6 +8,7 @@ import { ErrorMessage, Field } from '@atlaskit/form';
|
|
|
8
8
|
import Tooltip from '@atlaskit/tooltip';
|
|
9
9
|
import Textfield from '@atlaskit/textfield';
|
|
10
10
|
import Selectclear from '@atlaskit/icon/glyph/select-clear';
|
|
11
|
+
import { ConditionalSpotlightTargetWrapper } from '../conditional-spotlight-target-wrapper';
|
|
11
12
|
import { isRedoEvent, isUndoEvent } from '../utils';
|
|
12
13
|
import { clearTextButtonStyles, fieldStyles } from './styled';
|
|
13
14
|
export var testIds = {
|
|
@@ -24,6 +25,7 @@ var TextInput = function TextInput(_ref) {
|
|
|
24
25
|
onClear = _ref.onClear,
|
|
25
26
|
clearLabel = _ref.clearLabel,
|
|
26
27
|
error = _ref.error,
|
|
28
|
+
spotlightTargetName = _ref.spotlightTargetName,
|
|
27
29
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
28
30
|
var inputRef = useRef(null);
|
|
29
31
|
var handleRef = useCallback(function (input) {
|
|
@@ -74,14 +76,16 @@ var TextInput = function TextInput(_ref) {
|
|
|
74
76
|
name: name
|
|
75
77
|
}, function (_ref2) {
|
|
76
78
|
var fieldProps = _ref2.fieldProps;
|
|
77
|
-
return jsx(
|
|
79
|
+
return jsx(ConditionalSpotlightTargetWrapper, {
|
|
80
|
+
spotlightTargetName: spotlightTargetName
|
|
81
|
+
}, jsx(Fragment, null, jsx(Textfield, _extends({}, fieldProps, restProps, {
|
|
78
82
|
onKeyDown: handleKeydown,
|
|
79
83
|
ref: handleRef,
|
|
80
84
|
elemAfterInput: clearText,
|
|
81
85
|
isInvalid: !!error
|
|
82
86
|
})), error && jsx(ErrorMessage, {
|
|
83
87
|
testId: testIds.urlError
|
|
84
|
-
}, error));
|
|
88
|
+
}, error)));
|
|
85
89
|
}));
|
|
86
90
|
};
|
|
87
91
|
export default TextInput;
|
|
@@ -4,12 +4,14 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
4
4
|
import createEventPayload from '../../../analytics.codegen';
|
|
5
5
|
import { ANALYTICS_CHANNEL } from '../../../common/constants';
|
|
6
6
|
function TrackTabViewed(_ref) {
|
|
7
|
-
var
|
|
7
|
+
var activePlugin = _ref.activePlugin;
|
|
8
8
|
var _useAnalyticsEvents = useAnalyticsEvents(),
|
|
9
9
|
createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
|
|
10
10
|
useLayoutEffect(function () {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
if (activePlugin) {
|
|
12
|
+
createAnalyticsEvent(createEventPayload('ui.tab.viewed', {})).fire(ANALYTICS_CHANNEL);
|
|
13
|
+
}
|
|
14
|
+
}, [activePlugin, createAnalyticsEvent]);
|
|
13
15
|
return null;
|
|
14
16
|
}
|
|
15
17
|
export default TrackTabViewed;
|
package/dist/esm/version.json
CHANGED
package/dist/types/ui/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PackageMetaDataType } from '../analytics.codegen';
|
|
3
3
|
import { LinkPickerProps } from './link-picker';
|
|
4
|
+
export declare const testIds: {
|
|
5
|
+
linkPickerRoot: string;
|
|
6
|
+
};
|
|
4
7
|
export declare const PACKAGE_DATA: PackageMetaDataType;
|
|
5
8
|
export declare const ComposedLinkPicker: React.MemoExoticComponent<(props: LinkPickerProps) => JSX.Element>;
|
|
6
9
|
export default ComposedLinkPicker;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FunctionComponent } from 'react';
|
|
3
|
+
export interface ConditionalSpotlightTargetWrapperProps {
|
|
4
|
+
spotlightTargetName?: string;
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConditionalSpotlightTargetWrapper: FunctionComponent<ConditionalSpotlightTargetWrapperProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { TextFieldProps } from '@atlaskit/textfield';
|
|
3
|
-
|
|
3
|
+
import { ConditionalSpotlightTargetWrapperProps } from '../conditional-spotlight-target-wrapper';
|
|
4
|
+
export type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & Pick<ConditionalSpotlightTargetWrapperProps, 'spotlightTargetName'> & {
|
|
4
5
|
name: string;
|
|
5
6
|
value: string;
|
|
6
7
|
label?: string;
|
|
@@ -14,5 +15,5 @@ export declare const testIds: {
|
|
|
14
15
|
urlError: string;
|
|
15
16
|
clearUrlButton: string;
|
|
16
17
|
};
|
|
17
|
-
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
18
|
+
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, spotlightTargetName, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
18
19
|
export default TextInput;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { LinkPickerPlugin } from '../../../index';
|
|
2
|
+
declare function TrackTabViewed({ activePlugin, }: {
|
|
3
|
+
activePlugin: LinkPickerPlugin | undefined;
|
|
3
4
|
}): null;
|
|
4
5
|
export default TrackTabViewed;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PackageMetaDataType } from '../analytics.codegen';
|
|
3
3
|
import { LinkPickerProps } from './link-picker';
|
|
4
|
+
export declare const testIds: {
|
|
5
|
+
linkPickerRoot: string;
|
|
6
|
+
};
|
|
4
7
|
export declare const PACKAGE_DATA: PackageMetaDataType;
|
|
5
8
|
export declare const ComposedLinkPicker: React.MemoExoticComponent<(props: LinkPickerProps) => JSX.Element>;
|
|
6
9
|
export default ComposedLinkPicker;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FunctionComponent } from 'react';
|
|
3
|
+
export interface ConditionalSpotlightTargetWrapperProps {
|
|
4
|
+
spotlightTargetName?: string;
|
|
5
|
+
children: React.ReactElement;
|
|
6
|
+
}
|
|
7
|
+
export declare const ConditionalSpotlightTargetWrapper: FunctionComponent<ConditionalSpotlightTargetWrapperProps>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from '@emotion/react';
|
|
2
2
|
import { TextFieldProps } from '@atlaskit/textfield';
|
|
3
|
-
|
|
3
|
+
import { ConditionalSpotlightTargetWrapperProps } from '../conditional-spotlight-target-wrapper';
|
|
4
|
+
export type TextInputProps = Omit<TextFieldProps, 'name' | 'value'> & Pick<ConditionalSpotlightTargetWrapperProps, 'spotlightTargetName'> & {
|
|
4
5
|
name: string;
|
|
5
6
|
value: string;
|
|
6
7
|
label?: string;
|
|
@@ -14,5 +15,5 @@ export declare const testIds: {
|
|
|
14
15
|
urlError: string;
|
|
15
16
|
clearUrlButton: string;
|
|
16
17
|
};
|
|
17
|
-
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
18
|
+
declare const TextInput: ({ name, label, autoFocus, onRedo, onUndo, onKeyDown, onClear, clearLabel, error, spotlightTargetName, ...restProps }: TextInputProps) => jsx.JSX.Element;
|
|
18
19
|
export default TextInput;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { LinkPickerPlugin } from '../../../index';
|
|
2
|
+
declare function TrackTabViewed({ activePlugin, }: {
|
|
3
|
+
activePlugin: LinkPickerPlugin | undefined;
|
|
3
4
|
}): null;
|
|
4
5
|
export default TrackTabViewed;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-picker",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -45,9 +45,10 @@
|
|
|
45
45
|
"@atlaskit/frontend-utilities": "^2.6.0",
|
|
46
46
|
"@atlaskit/icon": "^21.12.0",
|
|
47
47
|
"@atlaskit/linking-common": "^2.12.0",
|
|
48
|
+
"@atlaskit/onboarding": "^10.8.2",
|
|
48
49
|
"@atlaskit/spinner": "^15.5.0",
|
|
49
50
|
"@atlaskit/tabs": "^13.4.0",
|
|
50
|
-
"@atlaskit/textfield": "^5.
|
|
51
|
+
"@atlaskit/textfield": "^5.5.0",
|
|
51
52
|
"@atlaskit/theme": "^12.5.0",
|
|
52
53
|
"@atlaskit/tokens": "^1.4.0",
|
|
53
54
|
"@atlaskit/tooltip": "^17.8.0",
|
|
@@ -79,8 +80,8 @@
|
|
|
79
80
|
"@atlaskit/webdriver-runner": "*",
|
|
80
81
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
81
82
|
"@atlassian/codegen": "^0.1.0",
|
|
82
|
-
"@atlassian/link-picker-atlassian-plugin": "^
|
|
83
|
-
"@atlassian/link-picker-plugins": "^
|
|
83
|
+
"@atlassian/link-picker-atlassian-plugin": "^32.0.0",
|
|
84
|
+
"@atlassian/link-picker-plugins": "^22.0.0",
|
|
84
85
|
"@atlassian/recent-work-client": "^1.8.0",
|
|
85
86
|
"@atlassian/search-provider": "^2.4.0",
|
|
86
87
|
"@testing-library/dom": "^8.17.1",
|