@atlaskit/link-picker 1.20.2 → 1.21.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/i18n/en_ZZ.js +44 -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/index.js +2 -17
- package/dist/cjs/ui/link-picker/list-item/styled.js +2 -0
- package/dist/cjs/ui/link-picker/track-tab-viewed/index.js +5 -3
- package/dist/cjs/ui/scrolling-tabs/styles.js +3 -3
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/i18n/en_ZZ.js +37 -0
- package/dist/es2019/services/use-plugins/index.js +6 -0
- package/dist/es2019/ui/index.js +26 -7
- package/dist/es2019/ui/link-picker/index.js +2 -17
- package/dist/es2019/ui/link-picker/list-item/styled.js +2 -0
- package/dist/es2019/ui/link-picker/track-tab-viewed/index.js +5 -3
- package/dist/es2019/ui/scrolling-tabs/styles.js +3 -3
- package/dist/es2019/version.json +1 -1
- package/dist/esm/i18n/en_ZZ.js +37 -0
- package/dist/esm/services/use-plugins/index.js +5 -0
- package/dist/esm/ui/index.js +15 -1
- package/dist/esm/ui/link-picker/index.js +2 -17
- package/dist/esm/ui/link-picker/list-item/styled.js +2 -0
- package/dist/esm/ui/link-picker/track-tab-viewed/index.js +5 -3
- package/dist/esm/ui/scrolling-tabs/styles.js +3 -3
- package/dist/esm/version.json +1 -1
- package/dist/types/i18n/en_ZZ.d.ts +36 -0
- package/dist/types/ui/index.d.ts +3 -0
- package/dist/types/ui/link-picker/track-tab-viewed/index.d.ts +3 -2
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +36 -0
- package/dist/types-ts4.5/ui/index.d.ts +3 -0
- package/dist/types-ts4.5/ui/link-picker/track-tab-viewed/index.d.ts +3 -2
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 1.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`63a3923d4cd`](https://bitbucket.org/atlassian/atlassian-frontend/commits/63a3923d4cd) - Fix tab attribute analytics to display correct product on initial load
|
|
8
|
+
|
|
9
|
+
## 1.20.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d86bc75af82`](https://bitbucket.org/atlassian/atlassian-frontend/commits/d86bc75af82) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
|
|
14
|
+
|
|
3
15
|
## 1.20.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/* prettier-ignore */
|
|
8
|
+
/**
|
|
9
|
+
* NOTE:
|
|
10
|
+
*
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
|
+
*/
|
|
14
|
+
//
|
|
15
|
+
var _default = {
|
|
16
|
+
'fabric.linkPicker.button.cancel': 'Cancel',
|
|
17
|
+
'fabric.linkPicker.button.insert': 'Insert',
|
|
18
|
+
'fabric.linkPicker.button.save': 'Save',
|
|
19
|
+
'fabric.linkPicker.clearLink': 'Clear link',
|
|
20
|
+
'fabric.linkPicker.clearLinkText': 'Clear text',
|
|
21
|
+
'fabric.linkPicker.hyperlink.searchLinkResults': '{count, plural, =0 {no results found} one {{count,number} result found} other {{count,number} results found}}',
|
|
22
|
+
'fabric.linkPicker.linkAriaLabel': 'Type or paste a link into the field',
|
|
23
|
+
'fabric.linkPicker.linkInvalid': 'Enter a valid URL.',
|
|
24
|
+
'fabric.linkPicker.linkLabel': 'Link',
|
|
25
|
+
'fabric.linkPicker.linkPlaceholder': 'Paste a link',
|
|
26
|
+
'fabric.linkPicker.linkTextAriaLabel': 'Link display text',
|
|
27
|
+
'fabric.linkPicker.linkTextLabel': 'Display text (optional)',
|
|
28
|
+
'fabric.linkPicker.linkTextPlaceholder': 'Text to display',
|
|
29
|
+
'fabric.linkPicker.listTitle.recentlyViewed': 'Recently Viewed',
|
|
30
|
+
'fabric.linkPicker.listTitle.results': 'Results',
|
|
31
|
+
'fabric.linkPicker.search.error.description': 'Refresh the page, or contact <a>Atlassian Support</a> if this keeps happening.',
|
|
32
|
+
'fabric.linkPicker.search.error.heading': 'We’re having trouble loading data.',
|
|
33
|
+
'fabric.linkPicker.search.linkAriaLabel': 'Suggestions will appear below as you type into the field',
|
|
34
|
+
'fabric.linkPicker.search.linkLabel': 'Search or paste a link',
|
|
35
|
+
'fabric.linkPicker.search.linkPlaceholder': 'Find recent links or paste a new link',
|
|
36
|
+
'fabric.linkPicker.search.noResults.description': 'Try again with a different term.',
|
|
37
|
+
'fabric.linkPicker.search.noResults.heading': 'We couldn’t find anything matching your search.',
|
|
38
|
+
'fabric.linkPicker.time.ago': 'ago',
|
|
39
|
+
'fabric.linkPicker.time.updated': 'Updated',
|
|
40
|
+
'fabric.linkPicker.time.viewed': 'Viewed',
|
|
41
|
+
'fabric.linkPicker.unhandledError.description': 'Try reloading the page.',
|
|
42
|
+
'fabric.linkPicker.unhandledError.heading': 'Something went wrong!'
|
|
43
|
+
};
|
|
44
|
+
exports.default = _default;
|
|
@@ -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;
|
|
@@ -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; }
|
|
@@ -356,7 +354,7 @@ function LinkPicker(_ref) {
|
|
|
356
354
|
selected: activeTab,
|
|
357
355
|
onChange: handleTabChange
|
|
358
356
|
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? (0, _react2.jsx)(_scrollingTabs.default, null, tabList) : tabList), (0, _react2.jsx)(_trackTabViewed.default, {
|
|
359
|
-
|
|
357
|
+
activePlugin: activePlugin
|
|
360
358
|
})), (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
361
359
|
css: _styled.flexColumnStyles
|
|
362
360
|
}, fixListHeightProps), !error && (0, _react2.jsx)(_linkSearchList.default, {
|
|
@@ -381,18 +379,5 @@ function LinkPicker(_ref) {
|
|
|
381
379
|
css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? _styled.formFooterMargin : undefined
|
|
382
380
|
}));
|
|
383
381
|
}
|
|
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
|
-
}));
|
|
382
|
+
var _default = (0, _analytics2.withLinkPickerAnalyticsContext)( /*#__PURE__*/(0, _react.memo)(LinkPicker));
|
|
398
383
|
exports.default = _default;
|
|
@@ -40,6 +40,8 @@ exports.listItemContextStyles = listItemContextStyles;
|
|
|
40
40
|
var listItemContainerStyles = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
41
41
|
exports.listItemContainerStyles = listItemContainerStyles;
|
|
42
42
|
var listItemContainerInnerStyles = (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n white-space: nowrap;\n"])));
|
|
43
|
+
|
|
44
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
43
45
|
exports.listItemContainerInnerStyles = listItemContainerInnerStyles;
|
|
44
46
|
var itemIconStyles = (0, _react.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n min-width: ", ";\n margin-top: 3px;\n margin-right: ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-150, 12px)");
|
|
45
47
|
exports.itemIconStyles = itemIconStyles;
|
|
@@ -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;
|
|
@@ -21,8 +21,8 @@ var scrollingContainerStyles = (0, _react.css)({
|
|
|
21
21
|
margin: 0,
|
|
22
22
|
position: 'absolute',
|
|
23
23
|
width: 'inherit',
|
|
24
|
-
left:
|
|
25
|
-
right:
|
|
24
|
+
left: "var(--ds-space-100, 8px)",
|
|
25
|
+
right: "var(--ds-space-100, 8px)",
|
|
26
26
|
height: 2,
|
|
27
27
|
backgroundColor: "var(--ds-border, ".concat(_colors.N30, ")")
|
|
28
28
|
}
|
|
@@ -44,7 +44,7 @@ var containerStyles = (0, _react.css)({
|
|
|
44
44
|
exports.containerStyles = containerStyles;
|
|
45
45
|
var buttonContainerStyles = (0, _react.css)({
|
|
46
46
|
position: 'absolute',
|
|
47
|
-
top:
|
|
47
|
+
top: "var(--ds-space-050, 4px)",
|
|
48
48
|
zIndex: 999,
|
|
49
49
|
backgroundColor: "var(--ds-surface, ".concat(_colors.N0, ")")
|
|
50
50
|
});
|
package/dist/cjs/version.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* prettier-ignore */
|
|
2
|
+
/**
|
|
3
|
+
* NOTE:
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically generated by Traduki 2.0.
|
|
6
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
7
|
+
*/
|
|
8
|
+
//
|
|
9
|
+
export default {
|
|
10
|
+
'fabric.linkPicker.button.cancel': 'Cancel',
|
|
11
|
+
'fabric.linkPicker.button.insert': 'Insert',
|
|
12
|
+
'fabric.linkPicker.button.save': 'Save',
|
|
13
|
+
'fabric.linkPicker.clearLink': 'Clear link',
|
|
14
|
+
'fabric.linkPicker.clearLinkText': 'Clear text',
|
|
15
|
+
'fabric.linkPicker.hyperlink.searchLinkResults': '{count, plural, =0 {no results found} one {{count,number} result found} other {{count,number} results found}}',
|
|
16
|
+
'fabric.linkPicker.linkAriaLabel': 'Type or paste a link into the field',
|
|
17
|
+
'fabric.linkPicker.linkInvalid': 'Enter a valid URL.',
|
|
18
|
+
'fabric.linkPicker.linkLabel': 'Link',
|
|
19
|
+
'fabric.linkPicker.linkPlaceholder': 'Paste a link',
|
|
20
|
+
'fabric.linkPicker.linkTextAriaLabel': 'Link display text',
|
|
21
|
+
'fabric.linkPicker.linkTextLabel': 'Display text (optional)',
|
|
22
|
+
'fabric.linkPicker.linkTextPlaceholder': 'Text to display',
|
|
23
|
+
'fabric.linkPicker.listTitle.recentlyViewed': 'Recently Viewed',
|
|
24
|
+
'fabric.linkPicker.listTitle.results': 'Results',
|
|
25
|
+
'fabric.linkPicker.search.error.description': 'Refresh the page, or contact <a>Atlassian Support</a> if this keeps happening.',
|
|
26
|
+
'fabric.linkPicker.search.error.heading': 'We’re having trouble loading data.',
|
|
27
|
+
'fabric.linkPicker.search.linkAriaLabel': 'Suggestions will appear below as you type into the field',
|
|
28
|
+
'fabric.linkPicker.search.linkLabel': 'Search or paste a link',
|
|
29
|
+
'fabric.linkPicker.search.linkPlaceholder': 'Find recent links or paste a new link',
|
|
30
|
+
'fabric.linkPicker.search.noResults.description': 'Try again with a different term.',
|
|
31
|
+
'fabric.linkPicker.search.noResults.heading': 'We couldn’t find anything matching your search.',
|
|
32
|
+
'fabric.linkPicker.time.ago': 'ago',
|
|
33
|
+
'fabric.linkPicker.time.updated': 'Updated',
|
|
34
|
+
'fabric.linkPicker.time.viewed': 'Viewed',
|
|
35
|
+
'fabric.linkPicker.unhandledError.description': 'Try reloading the page.',
|
|
36
|
+
'fabric.linkPicker.unhandledError.heading': 'Something went wrong!'
|
|
37
|
+
};
|
|
@@ -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;
|
|
@@ -348,7 +348,7 @@ function LinkPicker({
|
|
|
348
348
|
selected: activeTab,
|
|
349
349
|
onChange: handleTabChange
|
|
350
350
|
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? jsx(ScrollingTabList, null, tabList) : tabList), jsx(TrackTabViewed, {
|
|
351
|
-
|
|
351
|
+
activePlugin: activePlugin
|
|
352
352
|
})), jsx("div", _extends({
|
|
353
353
|
css: flexColumnStyles
|
|
354
354
|
}, fixListHeightProps), !error && jsx(LinkSearchList, {
|
|
@@ -373,19 +373,4 @@ function LinkPicker({
|
|
|
373
373
|
css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? formFooterMargin : undefined
|
|
374
374
|
}));
|
|
375
375
|
}
|
|
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
|
-
}));
|
|
376
|
+
export default withLinkPickerAnalyticsContext( /*#__PURE__*/memo(LinkPicker));
|
|
@@ -69,6 +69,8 @@ export const listItemContainerStyles = css`
|
|
|
69
69
|
export const listItemContainerInnerStyles = css`
|
|
70
70
|
white-space: nowrap;
|
|
71
71
|
`;
|
|
72
|
+
|
|
73
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
72
74
|
export const itemIconStyles = css`
|
|
73
75
|
min-width: ${"var(--ds-space-200, 16px)"};
|
|
74
76
|
margin-top: 3px;
|
|
@@ -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;
|
|
@@ -15,8 +15,8 @@ export const scrollingContainerStyles = css({
|
|
|
15
15
|
margin: 0,
|
|
16
16
|
position: 'absolute',
|
|
17
17
|
width: 'inherit',
|
|
18
|
-
left:
|
|
19
|
-
right:
|
|
18
|
+
left: "var(--ds-space-100, 8px)",
|
|
19
|
+
right: "var(--ds-space-100, 8px)",
|
|
20
20
|
height: 2,
|
|
21
21
|
backgroundColor: `var(--ds-border, ${N30})`
|
|
22
22
|
}
|
|
@@ -36,7 +36,7 @@ export const containerStyles = css({
|
|
|
36
36
|
});
|
|
37
37
|
export const buttonContainerStyles = css({
|
|
38
38
|
position: 'absolute',
|
|
39
|
-
top:
|
|
39
|
+
top: "var(--ds-space-050, 4px)",
|
|
40
40
|
zIndex: 999,
|
|
41
41
|
backgroundColor: `var(--ds-surface, ${N0})`
|
|
42
42
|
});
|
package/dist/es2019/version.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* prettier-ignore */
|
|
2
|
+
/**
|
|
3
|
+
* NOTE:
|
|
4
|
+
*
|
|
5
|
+
* This file is automatically generated by Traduki 2.0.
|
|
6
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
7
|
+
*/
|
|
8
|
+
//
|
|
9
|
+
export default {
|
|
10
|
+
'fabric.linkPicker.button.cancel': 'Cancel',
|
|
11
|
+
'fabric.linkPicker.button.insert': 'Insert',
|
|
12
|
+
'fabric.linkPicker.button.save': 'Save',
|
|
13
|
+
'fabric.linkPicker.clearLink': 'Clear link',
|
|
14
|
+
'fabric.linkPicker.clearLinkText': 'Clear text',
|
|
15
|
+
'fabric.linkPicker.hyperlink.searchLinkResults': '{count, plural, =0 {no results found} one {{count,number} result found} other {{count,number} results found}}',
|
|
16
|
+
'fabric.linkPicker.linkAriaLabel': 'Type or paste a link into the field',
|
|
17
|
+
'fabric.linkPicker.linkInvalid': 'Enter a valid URL.',
|
|
18
|
+
'fabric.linkPicker.linkLabel': 'Link',
|
|
19
|
+
'fabric.linkPicker.linkPlaceholder': 'Paste a link',
|
|
20
|
+
'fabric.linkPicker.linkTextAriaLabel': 'Link display text',
|
|
21
|
+
'fabric.linkPicker.linkTextLabel': 'Display text (optional)',
|
|
22
|
+
'fabric.linkPicker.linkTextPlaceholder': 'Text to display',
|
|
23
|
+
'fabric.linkPicker.listTitle.recentlyViewed': 'Recently Viewed',
|
|
24
|
+
'fabric.linkPicker.listTitle.results': 'Results',
|
|
25
|
+
'fabric.linkPicker.search.error.description': 'Refresh the page, or contact <a>Atlassian Support</a> if this keeps happening.',
|
|
26
|
+
'fabric.linkPicker.search.error.heading': 'We’re having trouble loading data.',
|
|
27
|
+
'fabric.linkPicker.search.linkAriaLabel': 'Suggestions will appear below as you type into the field',
|
|
28
|
+
'fabric.linkPicker.search.linkLabel': 'Search or paste a link',
|
|
29
|
+
'fabric.linkPicker.search.linkPlaceholder': 'Find recent links or paste a new link',
|
|
30
|
+
'fabric.linkPicker.search.noResults.description': 'Try again with a different term.',
|
|
31
|
+
'fabric.linkPicker.search.noResults.heading': 'We couldn’t find anything matching your search.',
|
|
32
|
+
'fabric.linkPicker.time.ago': 'ago',
|
|
33
|
+
'fabric.linkPicker.time.updated': 'Updated',
|
|
34
|
+
'fabric.linkPicker.time.viewed': 'Viewed',
|
|
35
|
+
'fabric.linkPicker.unhandledError.description': 'Try reloading the page.',
|
|
36
|
+
'fabric.linkPicker.unhandledError.heading': 'Something went wrong!'
|
|
37
|
+
};
|
|
@@ -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;
|
|
@@ -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 */
|
|
@@ -345,7 +343,7 @@ function LinkPicker(_ref) {
|
|
|
345
343
|
selected: activeTab,
|
|
346
344
|
onChange: handleTabChange
|
|
347
345
|
}, featureFlags !== null && featureFlags !== void 0 && featureFlags.scrollingTabs ? jsx(ScrollingTabList, null, tabList) : tabList), jsx(TrackTabViewed, {
|
|
348
|
-
|
|
346
|
+
activePlugin: activePlugin
|
|
349
347
|
})), jsx("div", _extends({
|
|
350
348
|
css: flexColumnStyles
|
|
351
349
|
}, fixListHeightProps), !error && jsx(LinkSearchList, {
|
|
@@ -370,17 +368,4 @@ function LinkPicker(_ref) {
|
|
|
370
368
|
css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? formFooterMargin : undefined
|
|
371
369
|
}));
|
|
372
370
|
}
|
|
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
|
-
}));
|
|
371
|
+
export default withLinkPickerAnalyticsContext( /*#__PURE__*/memo(LinkPicker));
|
|
@@ -28,5 +28,7 @@ export var listItemNameStyles = css(_templateObject8 || (_templateObject8 = _tag
|
|
|
28
28
|
export var listItemContextStyles = css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", ";\n line-height: ", "px;\n display: flex;\n"])), "var(--ds-text, ".concat(N300, ")"), relativeFontSizeToBase16(fontSizeSmall()), fontSize());
|
|
29
29
|
export var listItemContainerStyles = css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
30
30
|
export var listItemContainerInnerStyles = css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n white-space: nowrap;\n"])));
|
|
31
|
+
|
|
32
|
+
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage-spacing
|
|
31
33
|
export var itemIconStyles = css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n min-width: ", ";\n margin-top: 3px;\n margin-right: ", ";\n"])), "var(--ds-space-200, 16px)", "var(--ds-space-150, 12px)");
|
|
32
34
|
export var imgStyles = css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n max-width: ", ";\n"])), "var(--ds-space-200, 16px)");
|
|
@@ -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;
|
|
@@ -15,8 +15,8 @@ export var scrollingContainerStyles = css({
|
|
|
15
15
|
margin: 0,
|
|
16
16
|
position: 'absolute',
|
|
17
17
|
width: 'inherit',
|
|
18
|
-
left:
|
|
19
|
-
right:
|
|
18
|
+
left: "var(--ds-space-100, 8px)",
|
|
19
|
+
right: "var(--ds-space-100, 8px)",
|
|
20
20
|
height: 2,
|
|
21
21
|
backgroundColor: "var(--ds-border, ".concat(N30, ")")
|
|
22
22
|
}
|
|
@@ -36,7 +36,7 @@ export var containerStyles = css({
|
|
|
36
36
|
});
|
|
37
37
|
export var buttonContainerStyles = css({
|
|
38
38
|
position: 'absolute',
|
|
39
|
-
top:
|
|
39
|
+
top: "var(--ds-space-050, 4px)",
|
|
40
40
|
zIndex: 999,
|
|
41
41
|
backgroundColor: "var(--ds-surface, ".concat(N0, ")")
|
|
42
42
|
});
|
package/dist/esm/version.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
'fabric.linkPicker.button.cancel': string;
|
|
9
|
+
'fabric.linkPicker.button.insert': string;
|
|
10
|
+
'fabric.linkPicker.button.save': string;
|
|
11
|
+
'fabric.linkPicker.clearLink': string;
|
|
12
|
+
'fabric.linkPicker.clearLinkText': string;
|
|
13
|
+
'fabric.linkPicker.hyperlink.searchLinkResults': string;
|
|
14
|
+
'fabric.linkPicker.linkAriaLabel': string;
|
|
15
|
+
'fabric.linkPicker.linkInvalid': string;
|
|
16
|
+
'fabric.linkPicker.linkLabel': string;
|
|
17
|
+
'fabric.linkPicker.linkPlaceholder': string;
|
|
18
|
+
'fabric.linkPicker.linkTextAriaLabel': string;
|
|
19
|
+
'fabric.linkPicker.linkTextLabel': string;
|
|
20
|
+
'fabric.linkPicker.linkTextPlaceholder': string;
|
|
21
|
+
'fabric.linkPicker.listTitle.recentlyViewed': string;
|
|
22
|
+
'fabric.linkPicker.listTitle.results': string;
|
|
23
|
+
'fabric.linkPicker.search.error.description': string;
|
|
24
|
+
'fabric.linkPicker.search.error.heading': string;
|
|
25
|
+
'fabric.linkPicker.search.linkAriaLabel': string;
|
|
26
|
+
'fabric.linkPicker.search.linkLabel': string;
|
|
27
|
+
'fabric.linkPicker.search.linkPlaceholder': string;
|
|
28
|
+
'fabric.linkPicker.search.noResults.description': string;
|
|
29
|
+
'fabric.linkPicker.search.noResults.heading': string;
|
|
30
|
+
'fabric.linkPicker.time.ago': string;
|
|
31
|
+
'fabric.linkPicker.time.updated': string;
|
|
32
|
+
'fabric.linkPicker.time.viewed': string;
|
|
33
|
+
'fabric.linkPicker.unhandledError.description': string;
|
|
34
|
+
'fabric.linkPicker.unhandledError.heading': string;
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
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;
|
|
@@ -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;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NOTE:
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated by Traduki 2.0.
|
|
5
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
'fabric.linkPicker.button.cancel': string;
|
|
9
|
+
'fabric.linkPicker.button.insert': string;
|
|
10
|
+
'fabric.linkPicker.button.save': string;
|
|
11
|
+
'fabric.linkPicker.clearLink': string;
|
|
12
|
+
'fabric.linkPicker.clearLinkText': string;
|
|
13
|
+
'fabric.linkPicker.hyperlink.searchLinkResults': string;
|
|
14
|
+
'fabric.linkPicker.linkAriaLabel': string;
|
|
15
|
+
'fabric.linkPicker.linkInvalid': string;
|
|
16
|
+
'fabric.linkPicker.linkLabel': string;
|
|
17
|
+
'fabric.linkPicker.linkPlaceholder': string;
|
|
18
|
+
'fabric.linkPicker.linkTextAriaLabel': string;
|
|
19
|
+
'fabric.linkPicker.linkTextLabel': string;
|
|
20
|
+
'fabric.linkPicker.linkTextPlaceholder': string;
|
|
21
|
+
'fabric.linkPicker.listTitle.recentlyViewed': string;
|
|
22
|
+
'fabric.linkPicker.listTitle.results': string;
|
|
23
|
+
'fabric.linkPicker.search.error.description': string;
|
|
24
|
+
'fabric.linkPicker.search.error.heading': string;
|
|
25
|
+
'fabric.linkPicker.search.linkAriaLabel': string;
|
|
26
|
+
'fabric.linkPicker.search.linkLabel': string;
|
|
27
|
+
'fabric.linkPicker.search.linkPlaceholder': string;
|
|
28
|
+
'fabric.linkPicker.search.noResults.description': string;
|
|
29
|
+
'fabric.linkPicker.search.noResults.heading': string;
|
|
30
|
+
'fabric.linkPicker.time.ago': string;
|
|
31
|
+
'fabric.linkPicker.time.updated': string;
|
|
32
|
+
'fabric.linkPicker.time.viewed': string;
|
|
33
|
+
'fabric.linkPicker.unhandledError.description': string;
|
|
34
|
+
'fabric.linkPicker.unhandledError.heading': string;
|
|
35
|
+
};
|
|
36
|
+
export default _default;
|
|
@@ -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;
|
|
@@ -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.21.0",
|
|
4
4
|
"description": "Standalone link picker",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"publishConfig": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@atlaskit/form": "^8.11.0",
|
|
45
45
|
"@atlaskit/frontend-utilities": "^2.6.0",
|
|
46
46
|
"@atlaskit/icon": "^21.12.0",
|
|
47
|
-
"@atlaskit/linking-common": "^2.
|
|
47
|
+
"@atlaskit/linking-common": "^2.12.0",
|
|
48
48
|
"@atlaskit/spinner": "^15.5.0",
|
|
49
49
|
"@atlaskit/tabs": "^13.4.0",
|
|
50
50
|
"@atlaskit/textfield": "^5.4.0",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@af/analytics-codegen": "^0.0.
|
|
69
|
+
"@af/analytics-codegen": "^0.0.7",
|
|
70
70
|
"@atlaskit/activity-provider": "^2.4.0",
|
|
71
71
|
"@atlaskit/docs": "*",
|
|
72
72
|
"@atlaskit/link-analytics": "^8.0.0",
|
|
73
73
|
"@atlaskit/link-provider": "^1.6.0",
|
|
74
|
-
"@atlaskit/link-test-helpers": "^
|
|
74
|
+
"@atlaskit/link-test-helpers": "^4.0.0",
|
|
75
75
|
"@atlaskit/popup": "^1.6.0",
|
|
76
76
|
"@atlaskit/ssr": "*",
|
|
77
77
|
"@atlaskit/toggle": "^12.6.0",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@atlaskit/webdriver-runner": "*",
|
|
80
80
|
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
81
81
|
"@atlassian/codegen": "^0.1.0",
|
|
82
|
-
"@atlassian/link-picker-atlassian-plugin": "^
|
|
83
|
-
"@atlassian/link-picker-plugins": "^
|
|
82
|
+
"@atlassian/link-picker-atlassian-plugin": "^31.0.0",
|
|
83
|
+
"@atlassian/link-picker-plugins": "^21.0.0",
|
|
84
84
|
"@atlassian/recent-work-client": "^1.8.0",
|
|
85
85
|
"@atlassian/search-provider": "^2.4.0",
|
|
86
86
|
"@testing-library/dom": "^8.17.1",
|
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
"techstack": {
|
|
102
102
|
"@repo/internal": {
|
|
103
103
|
"design-tokens": [
|
|
104
|
-
"color"
|
|
104
|
+
"color",
|
|
105
|
+
"spacing"
|
|
105
106
|
]
|
|
106
107
|
}
|
|
107
108
|
},
|