@atlaskit/link-picker 1.40.0 → 1.41.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 +20 -0
- package/dist/cjs/index.js +12 -4
- package/dist/cjs/lazy.js +13 -0
- package/dist/cjs/ui/index.js +17 -81
- package/dist/cjs/ui/lazy.js +27 -0
- package/dist/cjs/ui/link-picker/index.js +1 -1
- package/dist/cjs/ui/main.js +81 -0
- package/dist/es2019/index.js +2 -1
- package/dist/es2019/lazy.js +1 -0
- package/dist/es2019/ui/index.js +15 -82
- package/dist/es2019/ui/lazy.js +12 -0
- package/dist/es2019/ui/link-picker/index.js +2 -2
- package/dist/es2019/ui/main.js +79 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/lazy.js +1 -0
- package/dist/esm/ui/index.js +15 -76
- package/dist/esm/ui/lazy.js +15 -0
- package/dist/esm/ui/link-picker/index.js +2 -2
- package/dist/esm/ui/main.js +70 -0
- package/dist/types/common/analytics/context.d.ts +2 -2
- package/dist/types/common/types.d.ts +83 -2
- package/dist/types/index.d.ts +3 -2
- package/dist/types/lazy.d.ts +1 -0
- package/dist/types/ui/index.d.ts +13 -12
- package/dist/types/ui/lazy.d.ts +3 -0
- package/dist/types/ui/link-picker/index.d.ts +1 -83
- package/dist/types/ui/main.d.ts +13 -0
- package/dist/types-ts4.5/common/analytics/context.d.ts +2 -2
- package/dist/types-ts4.5/common/types.d.ts +83 -2
- package/dist/types-ts4.5/index.d.ts +3 -2
- package/dist/types-ts4.5/lazy.d.ts +1 -0
- package/dist/types-ts4.5/ui/index.d.ts +13 -12
- package/dist/types-ts4.5/ui/lazy.d.ts +3 -0
- package/dist/types-ts4.5/ui/link-picker/index.d.ts +1 -83
- package/dist/types-ts4.5/ui/main.d.ts +13 -0
- package/lazy/package.json +15 -0
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/link-picker
|
|
2
2
|
|
|
3
|
+
## 1.41.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#124114](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/124114)
|
|
8
|
+
[`0add97fe66134`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0add97fe66134) -
|
|
9
|
+
A `/lazy` entrypoint has been added.
|
|
10
|
+
|
|
11
|
+
Prefer the default export from the default entrypoint if you do not want a lazy-loaded version.
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import LinkPicker from '@atlaskit/link-picker';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Prefer the `LazyLinkPicker` export from the `/lazy` entrypoint if you want a lazy-loaded version.
|
|
18
|
+
|
|
19
|
+
```tsx
|
|
20
|
+
import { LazyLinkPicker } from '@atlaskit/link-picker/lazy';
|
|
21
|
+
```
|
|
22
|
+
|
|
3
23
|
## 1.40.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/cjs/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
Object.defineProperty(exports, "LinkPicker", {
|
|
8
8
|
enumerable: true,
|
|
9
9
|
get: function get() {
|
|
10
|
-
return _ui.
|
|
10
|
+
return _ui.DeprecatedLazyLinkPickerExport;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "LoaderFallback", {
|
|
@@ -22,6 +22,14 @@ Object.defineProperty(exports, "UnauthenticatedError", {
|
|
|
22
22
|
return _errors.UnauthenticatedError;
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
Object.defineProperty(exports, "default", {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function get() {
|
|
28
|
+
return _ui.default;
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
var _ui = _interopRequireWildcard(require("./ui"));
|
|
26
32
|
var _errors = require("./common/utils/errors");
|
|
27
|
-
var _loaderFallback = require("./ui/loader-fallback");
|
|
33
|
+
var _loaderFallback = require("./ui/loader-fallback");
|
|
34
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
35
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
package/dist/cjs/lazy.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "LazyLinkPicker", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _lazy.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _lazy = _interopRequireDefault(require("./ui/lazy"));
|
package/dist/cjs/ui/index.js
CHANGED
|
@@ -4,87 +4,23 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /**
|
|
24
|
-
* @jsxRuntime classic
|
|
25
|
-
* @jsx jsx
|
|
26
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
27
|
-
var testIds = exports.testIds = {
|
|
28
|
-
linkPickerRoot: 'link-picker-root'
|
|
29
|
-
};
|
|
30
|
-
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
31
|
-
packageName: "@atlaskit/link-picker" || '',
|
|
32
|
-
packageVersion: "1.40.0" || '',
|
|
33
|
-
componentName: _constants.COMPONENT_NAME,
|
|
34
|
-
source: _constants.COMPONENT_NAME
|
|
35
|
-
};
|
|
36
|
-
var LazyLinkPicker = (0, _reactLooselyLazy.lazyForPaint)(function () {
|
|
37
|
-
return Promise.resolve().then(function () {
|
|
38
|
-
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_link-picker" */
|
|
39
|
-
'./link-picker'));
|
|
40
|
-
}).then(function (_ref) {
|
|
41
|
-
var LinkPicker = _ref.LinkPicker;
|
|
42
|
-
return {
|
|
43
|
-
default: LinkPicker
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
});
|
|
47
|
-
var DefaultRootComponent = function DefaultRootComponent(_ref2) {
|
|
48
|
-
var children = _ref2.children;
|
|
49
|
-
return (0, _react2.jsx)("div", {
|
|
50
|
-
"data-testid": testIds.linkPickerRoot
|
|
51
|
-
}, children);
|
|
52
|
-
};
|
|
53
|
-
var FixedWidthContainer = function FixedWidthContainer(props) {
|
|
54
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
55
|
-
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
56
|
-
css: _styled.fixedWidthContainerStyles
|
|
57
|
-
}, props));
|
|
58
|
-
};
|
|
59
|
-
var ComposedLinkPicker = /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
60
|
-
var _props$paddingLeft, _props$paddingRight, _props$paddingTop, _props$paddingBottom, _ref3;
|
|
61
|
-
var component = props.component;
|
|
62
|
-
var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* When ff enabled: root container will provide width to component + loader + error boundary
|
|
66
|
-
* When ff disabled: component + loader + error boundary each providing their own width
|
|
67
|
-
* Cannot make this change easier at risk of regression as external adopters may have css override on the form element
|
|
68
|
-
*/
|
|
69
|
-
var RootFixedWidthContainer = (0, _platformFeatureFlags.fg)('platform.linking-platform.link-picker.fixed-height-search-results') ? FixedWidthContainer : _react.Fragment;
|
|
70
|
-
var LoaderFallbackContainer = (0, _platformFeatureFlags.fg)('platform.linking-platform.link-picker.fixed-height-search-results') ? _react.Fragment : FixedWidthContainer;
|
|
71
|
-
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
72
|
-
data: PACKAGE_DATA
|
|
73
|
-
}, (0, _react2.jsx)(_sessionProvider.LinkPickerSessionProvider, null, (0, _react2.jsx)(_messagesProvider.MessagesProvider, null, (0, _react2.jsx)("div", {
|
|
74
|
-
style: (_ref3 = {}, (0, _defineProperty2.default)(_ref3, '--link-picker-width', props.disableWidth ? '100%' : // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
75
|
-
"".concat(_constants.LINK_PICKER_WIDTH_IN_PX, "px")), (0, _defineProperty2.default)(_ref3, '--link-picker-padding-left', (_props$paddingLeft = props.paddingLeft) !== null && _props$paddingLeft !== void 0 ? _props$paddingLeft : "var(--ds-space-200, 16px)"), (0, _defineProperty2.default)(_ref3, '--link-picker-padding-right', (_props$paddingRight = props.paddingRight) !== null && _props$paddingRight !== void 0 ? _props$paddingRight : "var(--ds-space-200, 16px)"), (0, _defineProperty2.default)(_ref3, '--link-picker-padding-top', (_props$paddingTop = props.paddingTop) !== null && _props$paddingTop !== void 0 ? _props$paddingTop : "var(--ds-space-200, 16px)"), (0, _defineProperty2.default)(_ref3, '--link-picker-padding-bottom', (_props$paddingBottom = props.paddingBottom) !== null && _props$paddingBottom !== void 0 ? _props$paddingBottom : "var(--ds-space-200, 16px)"), _ref3)
|
|
76
|
-
}, (0, _react2.jsx)(RootFixedWidthContainer, null, (0, _react2.jsx)(_errorBoundary.ErrorBoundary, null, (0, _react2.jsx)(_reactLooselyLazy.LazySuspense, {
|
|
77
|
-
fallback: (0, _react2.jsx)(LoaderFallbackContainer, null, (0, _react2.jsx)(_loaderFallback.LoaderFallback, {
|
|
78
|
-
url: props.url,
|
|
79
|
-
hideDisplayText: props.hideDisplayText,
|
|
80
|
-
isLoadingPlugins: props.isLoadingPlugins,
|
|
81
|
-
plugins: props.plugins
|
|
82
|
-
}))
|
|
83
|
-
}, (0, _react2.jsx)(RootComponent, (0, _extends2.default)({}, props, {
|
|
84
|
-
"data-testid": testIds.linkPickerRoot
|
|
85
|
-
}), (0, _react2.jsx)(LazyLinkPicker, props)))))))));
|
|
86
|
-
});
|
|
7
|
+
exports.default = exports.DeprecatedLazyLinkPickerExport = void 0;
|
|
8
|
+
var _lazy = _interopRequireDefault(require("./lazy"));
|
|
9
|
+
var _linkPicker = require("./link-picker");
|
|
10
|
+
var _main = require("./main");
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated A `/lazy` entrypoint has been added.
|
|
13
|
+
* @example Prefer the default export from the default entrypoint if you do not want a lazy-loaded version.
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import LinkPicker from '@atlaskit/link-picker';
|
|
16
|
+
* ```
|
|
17
|
+
* @example Prefer the `LazyLinkPicker` export from the `/lazy` entrypoint if you want a lazy-loaded version.
|
|
18
|
+
* ```tsx
|
|
19
|
+
* import { LazyLinkPicker } from '@atlaskit/link-picker/lazy';
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
var DeprecatedLazyLinkPickerExport = exports.DeprecatedLazyLinkPickerExport = _lazy.default;
|
|
87
23
|
|
|
88
24
|
// Must be a default export to be able to support prop docs
|
|
89
25
|
// eslint-disable-next-line import/no-default-export
|
|
90
|
-
var _default = exports.default =
|
|
26
|
+
var _default = exports.default = (0, _main.composeLinkPicker)(_linkPicker.LinkPicker);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
|
+
var _reactLooselyLazy = require("react-loosely-lazy");
|
|
10
|
+
var _main = require("./main");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
var LazyLinkPickerComponent = (0, _reactLooselyLazy.lazyForPaint)(function () {
|
|
14
|
+
return Promise.resolve().then(function () {
|
|
15
|
+
return _interopRequireWildcard(require( /* webpackChunkName: "@atlaskit-internal_link-picker" */
|
|
16
|
+
'./link-picker'));
|
|
17
|
+
}).then(function (_ref) {
|
|
18
|
+
var LinkPicker = _ref.LinkPicker;
|
|
19
|
+
return {
|
|
20
|
+
default: LinkPicker
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// Must be a default export to be able to support prop docs
|
|
26
|
+
// eslint-disable-next-line import/no-default-export
|
|
27
|
+
var _default = exports.default = (0, _main.composeLinkPicker)(LazyLinkPickerComponent);
|
|
@@ -393,7 +393,7 @@ var LinkPicker = exports.LinkPicker = (0, _analytics.withLinkPickerAnalyticsCont
|
|
|
393
393
|
css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? _styled.formFooterMargin : undefined
|
|
394
394
|
/* Show the feature discovery pulse when we're on the Jira tab, we haven't started typing a url and
|
|
395
395
|
the feature flag is enabled */,
|
|
396
|
-
createFeatureDiscovery: (activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) === 'jira' && allowCreateFeatureDiscovery && (0, _platformFeatureFlags.
|
|
396
|
+
createFeatureDiscovery: (activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) === 'jira' && allowCreateFeatureDiscovery && (0, _platformFeatureFlags.fg)('platform.linking-platform.link-picker.enable-jira-create'),
|
|
397
397
|
customSubmitButtonLabel: customMessages !== null && customMessages !== void 0 && customMessages.submitButtonLabel ? customMessages.submitButtonLabel : undefined
|
|
398
398
|
}));
|
|
399
399
|
}));
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.testIds = exports.composeLinkPicker = exports.PACKAGE_DATA = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
var _reactLooselyLazy = require("react-loosely-lazy");
|
|
14
|
+
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _constants = require("../common/constants");
|
|
17
|
+
var _sessionProvider = require("../controllers/session-provider");
|
|
18
|
+
var _errorBoundary = require("./error-boundary");
|
|
19
|
+
var _loaderFallback = require("./loader-fallback");
|
|
20
|
+
var _messagesProvider = require("./messages-provider");
|
|
21
|
+
var _styled = require("./styled");
|
|
22
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
23
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
24
|
+
/**
|
|
25
|
+
* @jsxRuntime classic
|
|
26
|
+
* @jsx jsx
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
30
|
+
|
|
31
|
+
var testIds = exports.testIds = {
|
|
32
|
+
linkPickerRoot: 'link-picker-root'
|
|
33
|
+
};
|
|
34
|
+
var PACKAGE_DATA = exports.PACKAGE_DATA = {
|
|
35
|
+
packageName: "@atlaskit/link-picker" || '',
|
|
36
|
+
packageVersion: "1.41.0" || '',
|
|
37
|
+
componentName: _constants.COMPONENT_NAME,
|
|
38
|
+
source: _constants.COMPONENT_NAME
|
|
39
|
+
};
|
|
40
|
+
var DefaultRootComponent = function DefaultRootComponent(_ref) {
|
|
41
|
+
var children = _ref.children;
|
|
42
|
+
return (0, _react2.jsx)("div", {
|
|
43
|
+
"data-testid": testIds.linkPickerRoot
|
|
44
|
+
}, children);
|
|
45
|
+
};
|
|
46
|
+
var FixedWidthContainer = function FixedWidthContainer(props) {
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
48
|
+
return (0, _react2.jsx)("div", (0, _extends2.default)({
|
|
49
|
+
css: _styled.fixedWidthContainerStyles
|
|
50
|
+
}, props));
|
|
51
|
+
};
|
|
52
|
+
var composeLinkPicker = exports.composeLinkPicker = function composeLinkPicker(Component) {
|
|
53
|
+
return /*#__PURE__*/(0, _react.memo)(function (props) {
|
|
54
|
+
var _props$paddingLeft, _props$paddingRight, _props$paddingTop, _props$paddingBottom, _ref2;
|
|
55
|
+
var component = props.component;
|
|
56
|
+
var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* When ff enabled: root container will provide width to component + loader + error boundary
|
|
60
|
+
* When ff disabled: component + loader + error boundary each providing their own width
|
|
61
|
+
* Cannot make this change easier at risk of regression as external adopters may have css override on the form element
|
|
62
|
+
*/
|
|
63
|
+
var RootFixedWidthContainer = (0, _platformFeatureFlags.fg)('platform.linking-platform.link-picker.fixed-height-search-results') ? FixedWidthContainer : _react.Fragment;
|
|
64
|
+
var LoaderFallbackContainer = (0, _platformFeatureFlags.fg)('platform.linking-platform.link-picker.fixed-height-search-results') ? _react.Fragment : FixedWidthContainer;
|
|
65
|
+
return (0, _react2.jsx)(_analyticsNext.AnalyticsContext, {
|
|
66
|
+
data: PACKAGE_DATA
|
|
67
|
+
}, (0, _react2.jsx)(_sessionProvider.LinkPickerSessionProvider, null, (0, _react2.jsx)(_messagesProvider.MessagesProvider, null, (0, _react2.jsx)("div", {
|
|
68
|
+
style: (_ref2 = {}, (0, _defineProperty2.default)(_ref2, '--link-picker-width', props.disableWidth ? '100%' : // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
69
|
+
"".concat(_constants.LINK_PICKER_WIDTH_IN_PX, "px")), (0, _defineProperty2.default)(_ref2, '--link-picker-padding-left', (_props$paddingLeft = props.paddingLeft) !== null && _props$paddingLeft !== void 0 ? _props$paddingLeft : "var(--ds-space-200, 16px)"), (0, _defineProperty2.default)(_ref2, '--link-picker-padding-right', (_props$paddingRight = props.paddingRight) !== null && _props$paddingRight !== void 0 ? _props$paddingRight : "var(--ds-space-200, 16px)"), (0, _defineProperty2.default)(_ref2, '--link-picker-padding-top', (_props$paddingTop = props.paddingTop) !== null && _props$paddingTop !== void 0 ? _props$paddingTop : "var(--ds-space-200, 16px)"), (0, _defineProperty2.default)(_ref2, '--link-picker-padding-bottom', (_props$paddingBottom = props.paddingBottom) !== null && _props$paddingBottom !== void 0 ? _props$paddingBottom : "var(--ds-space-200, 16px)"), _ref2)
|
|
70
|
+
}, (0, _react2.jsx)(RootFixedWidthContainer, null, (0, _react2.jsx)(_errorBoundary.ErrorBoundary, null, (0, _react2.jsx)(_reactLooselyLazy.LazySuspense, {
|
|
71
|
+
fallback: (0, _react2.jsx)(LoaderFallbackContainer, null, (0, _react2.jsx)(_loaderFallback.LoaderFallback, {
|
|
72
|
+
url: props.url,
|
|
73
|
+
hideDisplayText: props.hideDisplayText,
|
|
74
|
+
isLoadingPlugins: props.isLoadingPlugins,
|
|
75
|
+
plugins: props.plugins
|
|
76
|
+
}))
|
|
77
|
+
}, (0, _react2.jsx)(RootComponent, (0, _extends2.default)({}, props, {
|
|
78
|
+
"data-testid": testIds.linkPickerRoot
|
|
79
|
+
}), (0, _react2.jsx)(Component, props)))))))));
|
|
80
|
+
});
|
|
81
|
+
};
|
package/dist/es2019/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LazyLinkPicker } from './ui/lazy';
|
package/dist/es2019/ui/index.js
CHANGED
|
@@ -1,87 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { default as LazyLinkPicker } from './lazy';
|
|
2
|
+
import { LinkPicker } from './link-picker';
|
|
3
|
+
import { composeLinkPicker } from './main';
|
|
4
|
+
|
|
2
5
|
/**
|
|
3
|
-
* @
|
|
4
|
-
* @
|
|
6
|
+
* @deprecated A `/lazy` entrypoint has been added.
|
|
7
|
+
* @example Prefer the default export from the default entrypoint if you do not want a lazy-loaded version.
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import LinkPicker from '@atlaskit/link-picker';
|
|
10
|
+
* ```
|
|
11
|
+
* @example Prefer the `LazyLinkPicker` export from the `/lazy` entrypoint if you want a lazy-loaded version.
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { LazyLinkPicker } from '@atlaskit/link-picker/lazy';
|
|
14
|
+
* ```
|
|
5
15
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
10
|
-
import { lazyForPaint, LazySuspense } from 'react-loosely-lazy';
|
|
11
|
-
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
12
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
-
import { COMPONENT_NAME, LINK_PICKER_WIDTH_IN_PX } from '../common/constants';
|
|
14
|
-
import { LinkPickerSessionProvider } from '../controllers/session-provider';
|
|
15
|
-
import { ErrorBoundary } from './error-boundary';
|
|
16
|
-
import { LoaderFallback } from './loader-fallback';
|
|
17
|
-
import { MessagesProvider } from './messages-provider';
|
|
18
|
-
import { fixedWidthContainerStyles } from './styled';
|
|
19
|
-
export const testIds = {
|
|
20
|
-
linkPickerRoot: 'link-picker-root'
|
|
21
|
-
};
|
|
22
|
-
export const PACKAGE_DATA = {
|
|
23
|
-
packageName: "@atlaskit/link-picker" || '',
|
|
24
|
-
packageVersion: "1.40.0" || '',
|
|
25
|
-
componentName: COMPONENT_NAME,
|
|
26
|
-
source: COMPONENT_NAME
|
|
27
|
-
};
|
|
28
|
-
const LazyLinkPicker = lazyForPaint(() => import( /* webpackChunkName: "@atlaskit-internal_link-picker" */
|
|
29
|
-
'./link-picker').then(({
|
|
30
|
-
LinkPicker
|
|
31
|
-
}) => ({
|
|
32
|
-
default: LinkPicker
|
|
33
|
-
})));
|
|
34
|
-
const DefaultRootComponent = ({
|
|
35
|
-
children
|
|
36
|
-
}) => {
|
|
37
|
-
return jsx("div", {
|
|
38
|
-
"data-testid": testIds.linkPickerRoot
|
|
39
|
-
}, children);
|
|
40
|
-
};
|
|
41
|
-
const FixedWidthContainer = props => {
|
|
42
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
43
|
-
return jsx("div", _extends({
|
|
44
|
-
css: fixedWidthContainerStyles
|
|
45
|
-
}, props));
|
|
46
|
-
};
|
|
47
|
-
const ComposedLinkPicker = /*#__PURE__*/memo(props => {
|
|
48
|
-
var _props$paddingLeft, _props$paddingRight, _props$paddingTop, _props$paddingBottom;
|
|
49
|
-
const {
|
|
50
|
-
component
|
|
51
|
-
} = props;
|
|
52
|
-
const RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* When ff enabled: root container will provide width to component + loader + error boundary
|
|
56
|
-
* When ff disabled: component + loader + error boundary each providing their own width
|
|
57
|
-
* Cannot make this change easier at risk of regression as external adopters may have css override on the form element
|
|
58
|
-
*/
|
|
59
|
-
const RootFixedWidthContainer = fg('platform.linking-platform.link-picker.fixed-height-search-results') ? FixedWidthContainer : Fragment;
|
|
60
|
-
const LoaderFallbackContainer = fg('platform.linking-platform.link-picker.fixed-height-search-results') ? Fragment : FixedWidthContainer;
|
|
61
|
-
return jsx(AnalyticsContext, {
|
|
62
|
-
data: PACKAGE_DATA
|
|
63
|
-
}, jsx(LinkPickerSessionProvider, null, jsx(MessagesProvider, null, jsx("div", {
|
|
64
|
-
style: {
|
|
65
|
-
['--link-picker-width']: props.disableWidth ? '100%' :
|
|
66
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
67
|
-
`${LINK_PICKER_WIDTH_IN_PX}px`,
|
|
68
|
-
['--link-picker-padding-left']: (_props$paddingLeft = props.paddingLeft) !== null && _props$paddingLeft !== void 0 ? _props$paddingLeft : "var(--ds-space-200, 16px)",
|
|
69
|
-
['--link-picker-padding-right']: (_props$paddingRight = props.paddingRight) !== null && _props$paddingRight !== void 0 ? _props$paddingRight : "var(--ds-space-200, 16px)",
|
|
70
|
-
['--link-picker-padding-top']: (_props$paddingTop = props.paddingTop) !== null && _props$paddingTop !== void 0 ? _props$paddingTop : "var(--ds-space-200, 16px)",
|
|
71
|
-
['--link-picker-padding-bottom']: (_props$paddingBottom = props.paddingBottom) !== null && _props$paddingBottom !== void 0 ? _props$paddingBottom : "var(--ds-space-200, 16px)"
|
|
72
|
-
}
|
|
73
|
-
}, jsx(RootFixedWidthContainer, null, jsx(ErrorBoundary, null, jsx(LazySuspense, {
|
|
74
|
-
fallback: jsx(LoaderFallbackContainer, null, jsx(LoaderFallback, {
|
|
75
|
-
url: props.url,
|
|
76
|
-
hideDisplayText: props.hideDisplayText,
|
|
77
|
-
isLoadingPlugins: props.isLoadingPlugins,
|
|
78
|
-
plugins: props.plugins
|
|
79
|
-
}))
|
|
80
|
-
}, jsx(RootComponent, _extends({}, props, {
|
|
81
|
-
"data-testid": testIds.linkPickerRoot
|
|
82
|
-
}), jsx(LazyLinkPicker, props)))))))));
|
|
83
|
-
});
|
|
16
|
+
export const DeprecatedLazyLinkPickerExport = LazyLinkPicker;
|
|
84
17
|
|
|
85
18
|
// Must be a default export to be able to support prop docs
|
|
86
19
|
// eslint-disable-next-line import/no-default-export
|
|
87
|
-
export default
|
|
20
|
+
export default composeLinkPicker(LinkPicker);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { lazyForPaint } from 'react-loosely-lazy';
|
|
2
|
+
import { composeLinkPicker } from './main';
|
|
3
|
+
const LazyLinkPickerComponent = lazyForPaint(() => import( /* webpackChunkName: "@atlaskit-internal_link-picker" */
|
|
4
|
+
'./link-picker').then(({
|
|
5
|
+
LinkPicker
|
|
6
|
+
}) => ({
|
|
7
|
+
default: LinkPicker
|
|
8
|
+
})));
|
|
9
|
+
|
|
10
|
+
// Must be a default export to be able to support prop docs
|
|
11
|
+
// eslint-disable-next-line import/no-default-export
|
|
12
|
+
export default composeLinkPicker(LazyLinkPickerComponent);
|
|
@@ -11,7 +11,7 @@ import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
12
|
import { isSafeUrl, normalizeUrl } from '@atlaskit/linking-common/url';
|
|
13
13
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
14
|
-
import {
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
16
16
|
import { useLinkPickerAnalytics, withInputFieldTracking, withLinkPickerAnalyticsContext } from '../../common/analytics';
|
|
17
17
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
@@ -397,7 +397,7 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
|
397
397
|
css: !queryState || !(plugins !== null && plugins !== void 0 && plugins.length) ? formFooterMargin : undefined
|
|
398
398
|
/* Show the feature discovery pulse when we're on the Jira tab, we haven't started typing a url and
|
|
399
399
|
the feature flag is enabled */,
|
|
400
|
-
createFeatureDiscovery: (activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) === 'jira' && allowCreateFeatureDiscovery &&
|
|
400
|
+
createFeatureDiscovery: (activePlugin === null || activePlugin === void 0 ? void 0 : activePlugin.tabKey) === 'jira' && allowCreateFeatureDiscovery && fg('platform.linking-platform.link-picker.enable-jira-create'),
|
|
401
401
|
customSubmitButtonLabel: customMessages !== null && customMessages !== void 0 && customMessages.submitButtonLabel ? customMessages.submitButtonLabel : undefined
|
|
402
402
|
}));
|
|
403
403
|
}));
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
import React, { Fragment, memo } from 'react';
|
|
7
|
+
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
+
import { jsx } from '@emotion/react';
|
|
10
|
+
import { LazySuspense } from 'react-loosely-lazy';
|
|
11
|
+
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { COMPONENT_NAME, LINK_PICKER_WIDTH_IN_PX } from '../common/constants';
|
|
14
|
+
import { LinkPickerSessionProvider } from '../controllers/session-provider';
|
|
15
|
+
import { ErrorBoundary } from './error-boundary';
|
|
16
|
+
import { LoaderFallback } from './loader-fallback';
|
|
17
|
+
import { MessagesProvider } from './messages-provider';
|
|
18
|
+
import { fixedWidthContainerStyles } from './styled';
|
|
19
|
+
export const testIds = {
|
|
20
|
+
linkPickerRoot: 'link-picker-root'
|
|
21
|
+
};
|
|
22
|
+
export const PACKAGE_DATA = {
|
|
23
|
+
packageName: "@atlaskit/link-picker" || '',
|
|
24
|
+
packageVersion: "1.41.0" || '',
|
|
25
|
+
componentName: COMPONENT_NAME,
|
|
26
|
+
source: COMPONENT_NAME
|
|
27
|
+
};
|
|
28
|
+
const DefaultRootComponent = ({
|
|
29
|
+
children
|
|
30
|
+
}) => {
|
|
31
|
+
return jsx("div", {
|
|
32
|
+
"data-testid": testIds.linkPickerRoot
|
|
33
|
+
}, children);
|
|
34
|
+
};
|
|
35
|
+
const FixedWidthContainer = props => {
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
37
|
+
return jsx("div", _extends({
|
|
38
|
+
css: fixedWidthContainerStyles
|
|
39
|
+
}, props));
|
|
40
|
+
};
|
|
41
|
+
export const composeLinkPicker = Component => {
|
|
42
|
+
return /*#__PURE__*/memo(props => {
|
|
43
|
+
var _props$paddingLeft, _props$paddingRight, _props$paddingTop, _props$paddingBottom;
|
|
44
|
+
const {
|
|
45
|
+
component
|
|
46
|
+
} = props;
|
|
47
|
+
const RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* When ff enabled: root container will provide width to component + loader + error boundary
|
|
51
|
+
* When ff disabled: component + loader + error boundary each providing their own width
|
|
52
|
+
* Cannot make this change easier at risk of regression as external adopters may have css override on the form element
|
|
53
|
+
*/
|
|
54
|
+
const RootFixedWidthContainer = fg('platform.linking-platform.link-picker.fixed-height-search-results') ? FixedWidthContainer : Fragment;
|
|
55
|
+
const LoaderFallbackContainer = fg('platform.linking-platform.link-picker.fixed-height-search-results') ? Fragment : FixedWidthContainer;
|
|
56
|
+
return jsx(AnalyticsContext, {
|
|
57
|
+
data: PACKAGE_DATA
|
|
58
|
+
}, jsx(LinkPickerSessionProvider, null, jsx(MessagesProvider, null, jsx("div", {
|
|
59
|
+
style: {
|
|
60
|
+
['--link-picker-width']: props.disableWidth ? '100%' :
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
62
|
+
`${LINK_PICKER_WIDTH_IN_PX}px`,
|
|
63
|
+
['--link-picker-padding-left']: (_props$paddingLeft = props.paddingLeft) !== null && _props$paddingLeft !== void 0 ? _props$paddingLeft : "var(--ds-space-200, 16px)",
|
|
64
|
+
['--link-picker-padding-right']: (_props$paddingRight = props.paddingRight) !== null && _props$paddingRight !== void 0 ? _props$paddingRight : "var(--ds-space-200, 16px)",
|
|
65
|
+
['--link-picker-padding-top']: (_props$paddingTop = props.paddingTop) !== null && _props$paddingTop !== void 0 ? _props$paddingTop : "var(--ds-space-200, 16px)",
|
|
66
|
+
['--link-picker-padding-bottom']: (_props$paddingBottom = props.paddingBottom) !== null && _props$paddingBottom !== void 0 ? _props$paddingBottom : "var(--ds-space-200, 16px)"
|
|
67
|
+
}
|
|
68
|
+
}, jsx(RootFixedWidthContainer, null, jsx(ErrorBoundary, null, jsx(LazySuspense, {
|
|
69
|
+
fallback: jsx(LoaderFallbackContainer, null, jsx(LoaderFallback, {
|
|
70
|
+
url: props.url,
|
|
71
|
+
hideDisplayText: props.hideDisplayText,
|
|
72
|
+
isLoadingPlugins: props.isLoadingPlugins,
|
|
73
|
+
plugins: props.plugins
|
|
74
|
+
}))
|
|
75
|
+
}, jsx(RootComponent, _extends({}, props, {
|
|
76
|
+
"data-testid": testIds.linkPickerRoot
|
|
77
|
+
}), jsx(Component, props)))))))));
|
|
78
|
+
});
|
|
79
|
+
};
|
package/dist/esm/index.js
CHANGED
package/dist/esm/lazy.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as LazyLinkPicker } from './ui/lazy';
|
package/dist/esm/ui/index.js
CHANGED
|
@@ -1,81 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import { default as LazyLinkPicker } from './lazy';
|
|
2
|
+
import { LinkPicker } from './link-picker';
|
|
3
|
+
import { composeLinkPicker } from './main';
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
|
-
* @
|
|
5
|
-
* @
|
|
6
|
+
* @deprecated A `/lazy` entrypoint has been added.
|
|
7
|
+
* @example Prefer the default export from the default entrypoint if you do not want a lazy-loaded version.
|
|
8
|
+
* ```tsx
|
|
9
|
+
* import LinkPicker from '@atlaskit/link-picker';
|
|
10
|
+
* ```
|
|
11
|
+
* @example Prefer the `LazyLinkPicker` export from the `/lazy` entrypoint if you want a lazy-loaded version.
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { LazyLinkPicker } from '@atlaskit/link-picker/lazy';
|
|
14
|
+
* ```
|
|
6
15
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
|
-
import { jsx } from '@emotion/react';
|
|
11
|
-
import { lazyForPaint, LazySuspense } from 'react-loosely-lazy';
|
|
12
|
-
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
-
import { COMPONENT_NAME, LINK_PICKER_WIDTH_IN_PX } from '../common/constants';
|
|
15
|
-
import { LinkPickerSessionProvider } from '../controllers/session-provider';
|
|
16
|
-
import { ErrorBoundary } from './error-boundary';
|
|
17
|
-
import { LoaderFallback } from './loader-fallback';
|
|
18
|
-
import { MessagesProvider } from './messages-provider';
|
|
19
|
-
import { fixedWidthContainerStyles } from './styled';
|
|
20
|
-
export var testIds = {
|
|
21
|
-
linkPickerRoot: 'link-picker-root'
|
|
22
|
-
};
|
|
23
|
-
export var PACKAGE_DATA = {
|
|
24
|
-
packageName: "@atlaskit/link-picker" || '',
|
|
25
|
-
packageVersion: "1.40.0" || '',
|
|
26
|
-
componentName: COMPONENT_NAME,
|
|
27
|
-
source: COMPONENT_NAME
|
|
28
|
-
};
|
|
29
|
-
var LazyLinkPicker = lazyForPaint(function () {
|
|
30
|
-
return import( /* webpackChunkName: "@atlaskit-internal_link-picker" */
|
|
31
|
-
'./link-picker').then(function (_ref) {
|
|
32
|
-
var LinkPicker = _ref.LinkPicker;
|
|
33
|
-
return {
|
|
34
|
-
default: LinkPicker
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
});
|
|
38
|
-
var DefaultRootComponent = function DefaultRootComponent(_ref2) {
|
|
39
|
-
var children = _ref2.children;
|
|
40
|
-
return jsx("div", {
|
|
41
|
-
"data-testid": testIds.linkPickerRoot
|
|
42
|
-
}, children);
|
|
43
|
-
};
|
|
44
|
-
var FixedWidthContainer = function FixedWidthContainer(props) {
|
|
45
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
46
|
-
return jsx("div", _extends({
|
|
47
|
-
css: fixedWidthContainerStyles
|
|
48
|
-
}, props));
|
|
49
|
-
};
|
|
50
|
-
var ComposedLinkPicker = /*#__PURE__*/memo(function (props) {
|
|
51
|
-
var _props$paddingLeft, _props$paddingRight, _props$paddingTop, _props$paddingBottom, _ref3;
|
|
52
|
-
var component = props.component;
|
|
53
|
-
var RootComponent = component !== null && component !== void 0 ? component : DefaultRootComponent;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* When ff enabled: root container will provide width to component + loader + error boundary
|
|
57
|
-
* When ff disabled: component + loader + error boundary each providing their own width
|
|
58
|
-
* Cannot make this change easier at risk of regression as external adopters may have css override on the form element
|
|
59
|
-
*/
|
|
60
|
-
var RootFixedWidthContainer = fg('platform.linking-platform.link-picker.fixed-height-search-results') ? FixedWidthContainer : Fragment;
|
|
61
|
-
var LoaderFallbackContainer = fg('platform.linking-platform.link-picker.fixed-height-search-results') ? Fragment : FixedWidthContainer;
|
|
62
|
-
return jsx(AnalyticsContext, {
|
|
63
|
-
data: PACKAGE_DATA
|
|
64
|
-
}, jsx(LinkPickerSessionProvider, null, jsx(MessagesProvider, null, jsx("div", {
|
|
65
|
-
style: (_ref3 = {}, _defineProperty(_ref3, '--link-picker-width', props.disableWidth ? '100%' : // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
66
|
-
"".concat(LINK_PICKER_WIDTH_IN_PX, "px")), _defineProperty(_ref3, '--link-picker-padding-left', (_props$paddingLeft = props.paddingLeft) !== null && _props$paddingLeft !== void 0 ? _props$paddingLeft : "var(--ds-space-200, 16px)"), _defineProperty(_ref3, '--link-picker-padding-right', (_props$paddingRight = props.paddingRight) !== null && _props$paddingRight !== void 0 ? _props$paddingRight : "var(--ds-space-200, 16px)"), _defineProperty(_ref3, '--link-picker-padding-top', (_props$paddingTop = props.paddingTop) !== null && _props$paddingTop !== void 0 ? _props$paddingTop : "var(--ds-space-200, 16px)"), _defineProperty(_ref3, '--link-picker-padding-bottom', (_props$paddingBottom = props.paddingBottom) !== null && _props$paddingBottom !== void 0 ? _props$paddingBottom : "var(--ds-space-200, 16px)"), _ref3)
|
|
67
|
-
}, jsx(RootFixedWidthContainer, null, jsx(ErrorBoundary, null, jsx(LazySuspense, {
|
|
68
|
-
fallback: jsx(LoaderFallbackContainer, null, jsx(LoaderFallback, {
|
|
69
|
-
url: props.url,
|
|
70
|
-
hideDisplayText: props.hideDisplayText,
|
|
71
|
-
isLoadingPlugins: props.isLoadingPlugins,
|
|
72
|
-
plugins: props.plugins
|
|
73
|
-
}))
|
|
74
|
-
}, jsx(RootComponent, _extends({}, props, {
|
|
75
|
-
"data-testid": testIds.linkPickerRoot
|
|
76
|
-
}), jsx(LazyLinkPicker, props)))))))));
|
|
77
|
-
});
|
|
16
|
+
export var DeprecatedLazyLinkPickerExport = LazyLinkPicker;
|
|
78
17
|
|
|
79
18
|
// Must be a default export to be able to support prop docs
|
|
80
19
|
// eslint-disable-next-line import/no-default-export
|
|
81
|
-
export default
|
|
20
|
+
export default composeLinkPicker(LinkPicker);
|