@atlaskit/link-picker 2.1.0 → 3.0.1
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 +14 -0
- package/dist/cjs/common/generic-error-svg/index.js +2 -10
- package/dist/cjs/common/ui/empty-state/index.js +2 -10
- package/dist/cjs/common/ui/min-height-container/index.js +2 -14
- package/dist/cjs/ui/error-boundary/error-boundary-fallback/index.js +2 -9
- package/dist/cjs/ui/link-picker/form-footer/index.js +3 -11
- package/dist/cjs/ui/link-picker/index.js +3 -10
- package/dist/cjs/ui/link-picker/search-results/index.js +2 -10
- package/dist/cjs/ui/link-picker/search-results/link-search-list/index.js +2 -13
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +2 -10
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/index.js +2 -15
- package/dist/cjs/ui/link-picker/search-results/scrolling-tabs/index.js +2 -10
- package/dist/cjs/ui/link-picker/search-results/search-results-container/index.js +2 -10
- package/dist/cjs/ui/link-picker/text-input/index.js +2 -9
- package/dist/cjs/ui/loader-fallback/index.js +2 -10
- package/dist/cjs/ui/main.js +3 -11
- package/dist/es2019/common/generic-error-svg/index.js +1 -9
- package/dist/es2019/common/ui/empty-state/index.js +1 -9
- package/dist/es2019/common/ui/min-height-container/index.js +1 -13
- package/dist/es2019/ui/error-boundary/error-boundary-fallback/index.js +1 -8
- package/dist/es2019/ui/link-picker/form-footer/index.js +2 -10
- package/dist/es2019/ui/link-picker/index.js +2 -9
- package/dist/es2019/ui/link-picker/search-results/index.js +1 -9
- package/dist/es2019/ui/link-picker/search-results/link-search-list/index.js +1 -12
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +1 -9
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/index.js +1 -14
- package/dist/es2019/ui/link-picker/search-results/scrolling-tabs/index.js +1 -9
- package/dist/es2019/ui/link-picker/search-results/search-results-container/index.js +1 -9
- package/dist/es2019/ui/link-picker/text-input/index.js +1 -8
- package/dist/es2019/ui/loader-fallback/index.js +1 -9
- package/dist/es2019/ui/main.js +2 -10
- package/dist/esm/common/generic-error-svg/index.js +1 -9
- package/dist/esm/common/ui/empty-state/index.js +1 -9
- package/dist/esm/common/ui/min-height-container/index.js +1 -13
- package/dist/esm/ui/error-boundary/error-boundary-fallback/index.js +1 -8
- package/dist/esm/ui/link-picker/form-footer/index.js +2 -10
- package/dist/esm/ui/link-picker/index.js +2 -9
- package/dist/esm/ui/link-picker/search-results/index.js +1 -9
- package/dist/esm/ui/link-picker/search-results/link-search-list/index.js +1 -12
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.js +1 -9
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/index.js +1 -14
- package/dist/esm/ui/link-picker/search-results/scrolling-tabs/index.js +1 -9
- package/dist/esm/ui/link-picker/search-results/search-results-container/index.js +1 -9
- package/dist/esm/ui/link-picker/text-input/index.js +1 -8
- package/dist/esm/ui/loader-fallback/index.js +1 -9
- package/dist/esm/ui/main.js +2 -10
- package/dist/types/common/generic-error-svg/index.d.ts +0 -1
- package/dist/types/common/ui/empty-state/index.d.ts +1 -2
- package/dist/types/common/ui/min-height-container/index.d.ts +0 -3
- package/dist/types/ui/error-boundary/error-boundary-fallback/index.d.ts +0 -1
- package/dist/types/ui/index.d.ts +2 -2
- package/dist/types/ui/lazy.d.ts +1 -1
- package/dist/types/ui/link-picker/form-footer/index.d.ts +1 -2
- package/dist/types/ui/link-picker/index.d.ts +1 -2
- package/dist/types/ui/link-picker/search-results/index.d.ts +1 -2
- package/dist/types/ui/link-picker/search-results/link-search-list/index.d.ts +0 -1
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.d.ts +1 -2
- package/dist/types/ui/link-picker/search-results/link-search-list/list-item/index.d.ts +0 -1
- package/dist/types/ui/link-picker/search-results/scrolling-tabs/index.d.ts +0 -1
- package/dist/types/ui/link-picker/search-results/search-results-container/index.d.ts +1 -2
- package/dist/types/ui/link-picker/text-input/index.d.ts +1 -2
- package/dist/types/ui/loader-fallback/index.d.ts +0 -1
- package/dist/types/ui/main.d.ts +1 -2
- package/dist/types-ts4.5/common/generic-error-svg/index.d.ts +0 -1
- package/dist/types-ts4.5/common/ui/empty-state/index.d.ts +1 -2
- package/dist/types-ts4.5/common/ui/min-height-container/index.d.ts +0 -3
- package/dist/types-ts4.5/ui/error-boundary/error-boundary-fallback/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/lazy.d.ts +1 -1
- package/dist/types-ts4.5/ui/link-picker/form-footer/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/search-results/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/list-item/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/scrolling-tabs/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/search-results-container/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/link-picker/text-input/index.d.ts +1 -2
- package/dist/types-ts4.5/ui/loader-fallback/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/main.d.ts +1 -2
- package/package.json +3 -7
- package/report.api.md +1 -1
- package/dist/cjs/common/generic-error-svg/old/index.js +0 -66
- package/dist/cjs/common/ui/empty-state/old/index.js +0 -38
- package/dist/cjs/common/ui/min-height-container/old/index.js +0 -34
- package/dist/cjs/common/ui/min-height-container/old/styled.js +0 -16
- package/dist/cjs/ui/error-boundary/error-boundary-fallback/old/index.js +0 -50
- package/dist/cjs/ui/link-picker/form-footer/old/index.js +0 -116
- package/dist/cjs/ui/link-picker/old/index.js +0 -435
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.js +0 -70
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/old/index.js +0 -145
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/old/styled.js +0 -91
- package/dist/cjs/ui/link-picker/search-results/link-search-list/old/index.js +0 -188
- package/dist/cjs/ui/link-picker/search-results/link-search-list/old/styled.js +0 -45
- package/dist/cjs/ui/link-picker/search-results/old/index.js +0 -105
- package/dist/cjs/ui/link-picker/search-results/scrolling-tabs/old/index.js +0 -163
- package/dist/cjs/ui/link-picker/search-results/scrolling-tabs/old/styles.js +0 -74
- package/dist/cjs/ui/link-picker/search-results/search-results-container/old/index.js +0 -43
- package/dist/cjs/ui/link-picker/text-input/old/index.js +0 -125
- package/dist/cjs/ui/loader-fallback/old/index.js +0 -67
- package/dist/cjs/ui/old/main.js +0 -75
- package/dist/es2019/common/generic-error-svg/old/index.js +0 -58
- package/dist/es2019/common/ui/empty-state/old/index.js +0 -32
- package/dist/es2019/common/ui/min-height-container/old/index.js +0 -25
- package/dist/es2019/common/ui/min-height-container/old/styled.js +0 -10
- package/dist/es2019/ui/error-boundary/error-boundary-fallback/old/index.js +0 -41
- package/dist/es2019/ui/link-picker/form-footer/old/index.js +0 -104
- package/dist/es2019/ui/link-picker/old/index.js +0 -436
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.js +0 -63
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/old/index.js +0 -132
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/old/styled.js +0 -83
- package/dist/es2019/ui/link-picker/search-results/link-search-list/old/index.js +0 -178
- package/dist/es2019/ui/link-picker/search-results/link-search-list/old/styled.js +0 -38
- package/dist/es2019/ui/link-picker/search-results/old/index.js +0 -98
- package/dist/es2019/ui/link-picker/search-results/scrolling-tabs/old/index.js +0 -130
- package/dist/es2019/ui/link-picker/search-results/scrolling-tabs/old/styles.js +0 -67
- package/dist/es2019/ui/link-picker/search-results/search-results-container/old/index.js +0 -37
- package/dist/es2019/ui/link-picker/text-input/old/index.js +0 -121
- package/dist/es2019/ui/loader-fallback/old/index.js +0 -60
- package/dist/es2019/ui/old/main.js +0 -73
- package/dist/esm/common/generic-error-svg/old/index.js +0 -58
- package/dist/esm/common/ui/empty-state/old/index.js +0 -31
- package/dist/esm/common/ui/min-height-container/old/index.js +0 -25
- package/dist/esm/common/ui/min-height-container/old/styled.js +0 -10
- package/dist/esm/ui/error-boundary/error-boundary-fallback/old/index.js +0 -43
- package/dist/esm/ui/link-picker/form-footer/old/index.js +0 -108
- package/dist/esm/ui/link-picker/old/index.js +0 -432
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.js +0 -63
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/old/index.js +0 -136
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/old/styled.js +0 -84
- package/dist/esm/ui/link-picker/search-results/link-search-list/old/index.js +0 -186
- package/dist/esm/ui/link-picker/search-results/link-search-list/old/styled.js +0 -38
- package/dist/esm/ui/link-picker/search-results/old/index.js +0 -100
- package/dist/esm/ui/link-picker/search-results/scrolling-tabs/old/index.js +0 -158
- package/dist/esm/ui/link-picker/search-results/scrolling-tabs/old/styles.js +0 -67
- package/dist/esm/ui/link-picker/search-results/search-results-container/old/index.js +0 -36
- package/dist/esm/ui/link-picker/text-input/old/index.js +0 -121
- package/dist/esm/ui/loader-fallback/old/index.js +0 -59
- package/dist/esm/ui/old/main.js +0 -64
- package/dist/types/common/generic-error-svg/old/index.d.ts +0 -6
- package/dist/types/common/ui/empty-state/old/index.d.ts +0 -9
- package/dist/types/common/ui/min-height-container/old/index.d.ts +0 -8
- package/dist/types/common/ui/min-height-container/old/styled.d.ts +0 -1
- package/dist/types/ui/error-boundary/error-boundary-fallback/old/index.d.ts +0 -6
- package/dist/types/ui/link-picker/form-footer/old/index.d.ts +0 -42
- package/dist/types/ui/link-picker/old/index.d.ts +0 -25
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.d.ts +0 -6
- package/dist/types/ui/link-picker/search-results/link-search-list/list-item/old/index.d.ts +0 -23
- package/dist/types/ui/link-picker/search-results/link-search-list/list-item/old/styled.d.ts +0 -7
- package/dist/types/ui/link-picker/search-results/link-search-list/old/index.d.ts +0 -52
- package/dist/types/ui/link-picker/search-results/link-search-list/old/styled.d.ts +0 -4
- package/dist/types/ui/link-picker/search-results/old/index.d.ts +0 -45
- package/dist/types/ui/link-picker/search-results/scrolling-tabs/old/index.d.ts +0 -7
- package/dist/types/ui/link-picker/search-results/scrolling-tabs/old/styles.d.ts +0 -6
- package/dist/types/ui/link-picker/search-results/search-results-container/old/index.d.ts +0 -10
- package/dist/types/ui/link-picker/text-input/old/index.d.ts +0 -18
- package/dist/types/ui/loader-fallback/old/index.d.ts +0 -17
- package/dist/types/ui/old/main.d.ts +0 -13
- package/dist/types-ts4.5/common/generic-error-svg/old/index.d.ts +0 -6
- package/dist/types-ts4.5/common/ui/empty-state/old/index.d.ts +0 -9
- package/dist/types-ts4.5/common/ui/min-height-container/old/index.d.ts +0 -8
- package/dist/types-ts4.5/common/ui/min-height-container/old/styled.d.ts +0 -1
- package/dist/types-ts4.5/ui/error-boundary/error-boundary-fallback/old/index.d.ts +0 -6
- package/dist/types-ts4.5/ui/link-picker/form-footer/old/index.d.ts +0 -42
- package/dist/types-ts4.5/ui/link-picker/old/index.d.ts +0 -25
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg/old/index.d.ts +0 -6
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/list-item/old/index.d.ts +0 -23
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/list-item/old/styled.d.ts +0 -7
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/old/index.d.ts +0 -52
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/old/styled.d.ts +0 -4
- package/dist/types-ts4.5/ui/link-picker/search-results/old/index.d.ts +0 -45
- package/dist/types-ts4.5/ui/link-picker/search-results/scrolling-tabs/old/index.d.ts +0 -7
- package/dist/types-ts4.5/ui/link-picker/search-results/scrolling-tabs/old/styles.d.ts +0 -6
- package/dist/types-ts4.5/ui/link-picker/search-results/search-results-container/old/index.d.ts +0 -10
- package/dist/types-ts4.5/ui/link-picker/text-input/old/index.d.ts +0 -18
- package/dist/types-ts4.5/ui/loader-fallback/old/index.d.ts +0 -17
- package/dist/types-ts4.5/ui/old/main.d.ts +0 -13
|
@@ -3,13 +3,11 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import Heading from '@atlaskit/heading';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { Flex, Text } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { EmptyStateOld } from './old';
|
|
9
7
|
const styles = {
|
|
10
8
|
container: "_1pfhoahv _6rthoahv _y3gn1h6o"
|
|
11
9
|
};
|
|
12
|
-
export const
|
|
10
|
+
export const EmptyState = ({
|
|
13
11
|
testId,
|
|
14
12
|
header,
|
|
15
13
|
description,
|
|
@@ -32,10 +30,4 @@ export const EmptyStateNew = ({
|
|
|
32
30
|
as: "p",
|
|
33
31
|
color: "color.text"
|
|
34
32
|
}, description)));
|
|
35
|
-
};
|
|
36
|
-
export const EmptyState = props => {
|
|
37
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
38
|
-
return /*#__PURE__*/React.createElement(EmptyStateNew, props);
|
|
39
|
-
}
|
|
40
|
-
return /*#__PURE__*/React.createElement(EmptyStateOld, props);
|
|
41
33
|
};
|
|
@@ -3,10 +3,8 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { forwardRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { MinHeightContainerOld } from './old';
|
|
8
6
|
const minHeightComponentStyles = null;
|
|
9
|
-
export const
|
|
7
|
+
export const MinHeightContainer = /*#__PURE__*/forwardRef(({
|
|
10
8
|
className,
|
|
11
9
|
minHeight,
|
|
12
10
|
...props
|
|
@@ -21,14 +19,4 @@ export const MinHeightContainerNew = /*#__PURE__*/forwardRef(({
|
|
|
21
19
|
['--link-picker-min-height']: minHeight
|
|
22
20
|
}
|
|
23
21
|
}));
|
|
24
|
-
});
|
|
25
|
-
export const MinHeightContainer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
26
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
27
|
-
return /*#__PURE__*/React.createElement(MinHeightContainerNew, _extends({
|
|
28
|
-
ref: ref
|
|
29
|
-
}, props));
|
|
30
|
-
}
|
|
31
|
-
return /*#__PURE__*/React.createElement(MinHeightContainerOld, _extends({
|
|
32
|
-
ref: ref
|
|
33
|
-
}, props));
|
|
34
22
|
});
|
|
@@ -8,7 +8,6 @@ import { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants
|
|
|
8
8
|
import { GenericErrorSVG } from '../../../common/generic-error-svg';
|
|
9
9
|
import { EmptyState } from '../../../common/ui/empty-state';
|
|
10
10
|
import { MinHeightContainer } from '../../../common/ui/min-height-container';
|
|
11
|
-
import { ErrorBoundaryFallbackOld } from './old';
|
|
12
11
|
const errorBoundaryFallbackStyles = null;
|
|
13
12
|
const oldErrorBoundaryFallbackStyles = null;
|
|
14
13
|
const messages = defineMessages({
|
|
@@ -23,7 +22,7 @@ const messages = defineMessages({
|
|
|
23
22
|
id: 'fabric.linkPicker.unhandledError.description'
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
|
-
export const
|
|
25
|
+
export const ErrorBoundaryFallback = () => {
|
|
27
26
|
const intl = useIntl();
|
|
28
27
|
const header = intl.formatMessage(messages.heading);
|
|
29
28
|
const description = intl.formatMessage(messages.description);
|
|
@@ -36,10 +35,4 @@ export const ErrorBoundaryFallbackNew = () => {
|
|
|
36
35
|
renderImage: () => /*#__PURE__*/React.createElement(GenericErrorSVG, null),
|
|
37
36
|
description: description
|
|
38
37
|
}));
|
|
39
|
-
};
|
|
40
|
-
export const ErrorBoundaryFallback = () => {
|
|
41
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
42
|
-
return /*#__PURE__*/React.createElement(ErrorBoundaryFallbackNew, null);
|
|
43
|
-
}
|
|
44
|
-
return /*#__PURE__*/React.createElement(ErrorBoundaryFallbackOld, null);
|
|
45
38
|
};
|
|
@@ -8,11 +8,9 @@ import { defineMessages, useIntl } from 'react-intl-next';
|
|
|
8
8
|
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
9
9
|
import EditorAddIconLegacy from '@atlaskit/icon/glyph/editor/add';
|
|
10
10
|
import EditorAddIcon from '@atlaskit/icon/utility/add';
|
|
11
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
11
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
13
12
|
import { UnauthenticatedError } from '../../../common/utils/errors';
|
|
14
13
|
import { LinkPickerSubmitButton } from './link-picker-submit-button';
|
|
15
|
-
import { FormFooterOld } from './old';
|
|
16
14
|
const formFooterStyles = null;
|
|
17
15
|
const formFooterActionStyles = null;
|
|
18
16
|
export const messages = defineMessages({
|
|
@@ -33,7 +31,7 @@ export const testIds = {
|
|
|
33
31
|
actionButton: 'link-picker-action-button',
|
|
34
32
|
submitStatusA11yIndicator: 'link-picker-submit-status-a11y-indicator'
|
|
35
33
|
};
|
|
36
|
-
export const
|
|
34
|
+
export const FormFooter = /*#__PURE__*/memo(({
|
|
37
35
|
isLoading,
|
|
38
36
|
isSubmitting = false,
|
|
39
37
|
error,
|
|
@@ -92,10 +90,4 @@ export const FormFooterNew = /*#__PURE__*/memo(({
|
|
|
92
90
|
testId: testIds.insertButton,
|
|
93
91
|
url: url
|
|
94
92
|
})));
|
|
95
|
-
});
|
|
96
|
-
export const FormFooter = props => {
|
|
97
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
98
|
-
return /*#__PURE__*/React.createElement(FormFooterNew, props);
|
|
99
|
-
}
|
|
100
|
-
return /*#__PURE__*/React.createElement(FormFooterOld, props);
|
|
101
|
-
};
|
|
93
|
+
});
|
|
@@ -22,7 +22,6 @@ import { Announcer } from './announcer';
|
|
|
22
22
|
import { FormFooter, testIds as formFooterTestIds } from './form-footer';
|
|
23
23
|
import { LinkPickerSubmitButton } from './form-footer/link-picker-submit-button';
|
|
24
24
|
import { formMessages, linkMessages, linkTextMessages, searchMessages } from './messages';
|
|
25
|
-
import { LinkPickerOld } from './old';
|
|
26
25
|
import { SearchResults, testIds as searchTestIds } from './search-results';
|
|
27
26
|
import { testIds as textFieldTestIds, TextInput } from './text-input';
|
|
28
27
|
import { TrackMount } from './track-mount';
|
|
@@ -81,7 +80,7 @@ const LinkInputField = withInputFieldTracking(TextInput, 'link', (event, attribu
|
|
|
81
80
|
linkFieldContent: getLinkFieldContent(event.currentTarget.value)
|
|
82
81
|
}));
|
|
83
82
|
const DisplayTextInputField = withInputFieldTracking(TextInput, 'displayText');
|
|
84
|
-
export const
|
|
83
|
+
export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
85
84
|
onSubmit,
|
|
86
85
|
onCancel,
|
|
87
86
|
onContentResize,
|
|
@@ -415,10 +414,4 @@ export const LinkPickerNew = withLinkPickerAnalyticsContext( /*#__PURE__*/memo((
|
|
|
415
414
|
hideSubmitButton: moveSubmitButton,
|
|
416
415
|
className: ax([(!queryState || !(plugins !== null && plugins !== void 0 && plugins.length)) && "_19pkpxbi"])
|
|
417
416
|
}));
|
|
418
|
-
}));
|
|
419
|
-
export const LinkPicker = props => {
|
|
420
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
421
|
-
return /*#__PURE__*/React.createElement(LinkPickerNew, props);
|
|
422
|
-
}
|
|
423
|
-
return /*#__PURE__*/React.createElement(LinkPickerOld, props);
|
|
424
|
-
};
|
|
417
|
+
}));
|
|
@@ -3,13 +3,11 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { Fragment } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
7
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
9
8
|
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
10
9
|
import { LinkSearchError, testIds as searchErrorTestIds } from './link-search-error';
|
|
11
10
|
import { LinkSearchList, testIds as listTestIds } from './link-search-list';
|
|
12
|
-
import { SearchResultsOld } from './old';
|
|
13
11
|
import { ScrollingTabList } from './scrolling-tabs';
|
|
14
12
|
import { SearchResultsContainer } from './search-results-container';
|
|
15
13
|
import { TrackTabViewed } from './track-tab-viewed';
|
|
@@ -24,7 +22,7 @@ export const testIds = {
|
|
|
24
22
|
tabList: 'link-picker-tabs',
|
|
25
23
|
tabItem: 'link-picker-tab'
|
|
26
24
|
};
|
|
27
|
-
export const
|
|
25
|
+
export const SearchResults = ({
|
|
28
26
|
tabs,
|
|
29
27
|
activeTab,
|
|
30
28
|
activePlugin,
|
|
@@ -85,10 +83,4 @@ export const SearchResultsNew = ({
|
|
|
85
83
|
activePlugin: activePlugin,
|
|
86
84
|
adaptiveHeight: adaptiveHeight
|
|
87
85
|
}), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 ? void 0 : (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(LinkSearchError, null) : null));
|
|
88
|
-
};
|
|
89
|
-
export const SearchResults = props => {
|
|
90
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
91
|
-
return /*#__PURE__*/React.createElement(SearchResultsNew, props);
|
|
92
|
-
}
|
|
93
|
-
return /*#__PURE__*/React.createElement(SearchResultsOld, props);
|
|
94
86
|
};
|
|
@@ -12,7 +12,6 @@ import { MinHeightContainer } from '../../../../common/ui/min-height-container';
|
|
|
12
12
|
import { handleNavKeyDown } from '../../../../common/utils/handleNavKeyDown';
|
|
13
13
|
import { NoResults, testIds as noResultsTestIds } from './link-search-no-results';
|
|
14
14
|
import { LinkSearchListItem, testIds as searchResultItemTestIds } from './list-item';
|
|
15
|
-
import { LinkSearchListOld } from './old';
|
|
16
15
|
import { useTrackResultsShown } from './use-track-results-shown';
|
|
17
16
|
const styles = {
|
|
18
17
|
emptyStateNoResultsWrapper: "_1tkepxbi"
|
|
@@ -48,7 +47,7 @@ export const testIds = {
|
|
|
48
47
|
searchResultLoadingIndicator: 'link-picker.results-loading-indicator',
|
|
49
48
|
tabsLoadingIndicator: 'link-picker.tabs-loading-indicator'
|
|
50
49
|
};
|
|
51
|
-
export const
|
|
50
|
+
export const LinkSearchList = /*#__PURE__*/forwardRef(({
|
|
52
51
|
onChange,
|
|
53
52
|
onSelect,
|
|
54
53
|
onKeyDown,
|
|
@@ -169,14 +168,4 @@ export const LinkSearchListNew = /*#__PURE__*/forwardRef(({
|
|
|
169
168
|
ref: ref,
|
|
170
169
|
className: ax(["_1bsb1osq _ca0qidpf _1tkeys9h _19pkpxbi _otyrpxbi _16jlkb7n _1e0c1txw _2lx21bp4", className])
|
|
171
170
|
}, restProps), itemsContent, loadingContent);
|
|
172
|
-
});
|
|
173
|
-
export const LinkSearchList = /*#__PURE__*/forwardRef((props, ref) => {
|
|
174
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
175
|
-
return /*#__PURE__*/React.createElement(LinkSearchListNew, _extends({}, props, {
|
|
176
|
-
ref: ref
|
|
177
|
-
}));
|
|
178
|
-
}
|
|
179
|
-
return /*#__PURE__*/React.createElement(LinkSearchListOld, _extends({}, props, {
|
|
180
|
-
ref: ref
|
|
181
|
-
}));
|
|
182
171
|
});
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
-
import { NoResultsSVGOld } from './old';
|
|
7
5
|
const HEIGHT = 120;
|
|
8
6
|
const noResultsSVGStyles = null;
|
|
9
|
-
export const
|
|
7
|
+
export const NoResultsSVG = () => {
|
|
10
8
|
const id = 'link-picker-ui-no-results-svg';
|
|
11
9
|
return /*#__PURE__*/React.createElement("svg", {
|
|
12
10
|
height: "120",
|
|
@@ -57,10 +55,4 @@ export const NoResultsSVGNew = () => {
|
|
|
57
55
|
transform: "translate(0 .62)",
|
|
58
56
|
d: "M0 0h207.16v189.87H0z"
|
|
59
57
|
}))));
|
|
60
|
-
};
|
|
61
|
-
export const NoResultsSVG = props => {
|
|
62
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
63
|
-
return /*#__PURE__*/React.createElement(NoResultsSVGNew, props);
|
|
64
|
-
}
|
|
65
|
-
return /*#__PURE__*/React.createElement(NoResultsSVGOld, props);
|
|
66
58
|
};
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
3
2
|
import "./index.compiled.css";
|
|
4
3
|
import * as React from 'react';
|
|
5
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
5
|
import { forwardRef, Fragment } from 'react';
|
|
7
6
|
import { useIntl } from 'react-intl-next';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
7
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
10
8
|
import { B100, B400, B50, N20, N200, N300 } from '@atlaskit/theme/colors';
|
|
11
9
|
/* eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports */
|
|
12
10
|
import { transformTimeStamp } from '../../../transformTimeStamp';
|
|
13
|
-
import { LinkSearchListItemOld } from './old';
|
|
14
11
|
export const testIds = {
|
|
15
12
|
searchResultItem: 'link-search-list-item',
|
|
16
13
|
searchResultIcon: 'link-search-list-item-icon'
|
|
@@ -86,7 +83,7 @@ const getDefaultSubtitleItems = (item, intl) => {
|
|
|
86
83
|
const listItemActive = null;
|
|
87
84
|
const listItemSelected = null;
|
|
88
85
|
const listItemFocusStyles = null;
|
|
89
|
-
export const
|
|
86
|
+
export const LinkSearchListItem = /*#__PURE__*/forwardRef(({
|
|
90
87
|
item,
|
|
91
88
|
selected,
|
|
92
89
|
id,
|
|
@@ -124,14 +121,4 @@ export const LinkSearchListItemNew = /*#__PURE__*/forwardRef(({
|
|
|
124
121
|
}, item.name)), subtitleItems && /*#__PURE__*/React.createElement(ListItemSubtitle, {
|
|
125
122
|
items: subtitleItems
|
|
126
123
|
})));
|
|
127
|
-
});
|
|
128
|
-
export const LinkSearchListItem = /*#__PURE__*/forwardRef((props, ref) => {
|
|
129
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
130
|
-
return /*#__PURE__*/React.createElement(LinkSearchListItemNew, _extends({}, props, {
|
|
131
|
-
ref: ref
|
|
132
|
-
}));
|
|
133
|
-
}
|
|
134
|
-
return /*#__PURE__*/React.createElement(LinkSearchListItemOld, _extends({}, props, {
|
|
135
|
-
ref: ref
|
|
136
|
-
}));
|
|
137
124
|
});
|
|
@@ -6,9 +6,7 @@ import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
|
6
6
|
import { IconButton } from '@atlaskit/button/new';
|
|
7
7
|
import ChevronLeftIcon from '@atlaskit/icon/utility/migration/chevron-left';
|
|
8
8
|
import ChevronRightIcon from '@atlaskit/icon/utility/migration/chevron-right';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { N0, N30 } from '@atlaskit/theme/colors';
|
|
11
|
-
import { ScrollingTabListOld } from './old';
|
|
12
10
|
import { calculateConditionalButtons, createGhost, getTabList, scrollBack, scrollForward } from './scrolling-tabs';
|
|
13
11
|
function isTouchDevice() {
|
|
14
12
|
return 'ontouchstart' in window ||
|
|
@@ -25,7 +23,7 @@ const backButtonStyles = null;
|
|
|
25
23
|
const nextButtonStyles = null;
|
|
26
24
|
|
|
27
25
|
/* eslint-disable @repo/internal/dom-events/no-unsafe-event-listeners */
|
|
28
|
-
export const
|
|
26
|
+
export const ScrollingTabList = props => {
|
|
29
27
|
const ref = useRef(null);
|
|
30
28
|
const [conditionalButtons, setConditionalButtons] = useState(initialConditionalButtonsState);
|
|
31
29
|
const ghost = useMemo(() => createGhost(), []);
|
|
@@ -119,10 +117,4 @@ export const ScrollingTabListNew = props => {
|
|
|
119
117
|
label: "forward",
|
|
120
118
|
icon: ChevronRightIcon
|
|
121
119
|
}))));
|
|
122
|
-
};
|
|
123
|
-
export const ScrollingTabList = props => {
|
|
124
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
125
|
-
return /*#__PURE__*/React.createElement(ScrollingTabListNew, props);
|
|
126
|
-
}
|
|
127
|
-
return /*#__PURE__*/React.createElement(ScrollingTabListOld, props);
|
|
128
120
|
};
|
|
@@ -3,11 +3,9 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useLayoutEffect, useRef } from 'react';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { MinHeightContainer } from '../../../../common/ui/min-height-container';
|
|
8
|
-
import { SearchResultsContainerOld } from './old';
|
|
9
7
|
const flexColumn = null;
|
|
10
|
-
export const
|
|
8
|
+
export const SearchResultsContainer = ({
|
|
11
9
|
hasTabs,
|
|
12
10
|
adaptiveHeight,
|
|
13
11
|
isLoadingResults,
|
|
@@ -28,10 +26,4 @@ export const SearchResultsContainerNew = ({
|
|
|
28
26
|
minHeight: minheight,
|
|
29
27
|
className: ax(["_1e0c1txw _2lx21bp4 _1bah1y6m _1bsb1osq"])
|
|
30
28
|
}, children);
|
|
31
|
-
};
|
|
32
|
-
export const SearchResultsContainer = props => {
|
|
33
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
34
|
-
return /*#__PURE__*/React.createElement(SearchResultsContainerNew, props);
|
|
35
|
-
}
|
|
36
|
-
return /*#__PURE__*/React.createElement(SearchResultsContainerOld, props);
|
|
37
29
|
};
|
|
@@ -11,7 +11,6 @@ import { Pressable } from '@atlaskit/primitives/compiled';
|
|
|
11
11
|
import Textfield from '@atlaskit/textfield';
|
|
12
12
|
import Tooltip from '@atlaskit/tooltip';
|
|
13
13
|
import { ConditionalSpotlightTargetWrapper } from './conditional-spotlight-target-wrapper';
|
|
14
|
-
import { TextInputOld } from './old';
|
|
15
14
|
import { isRedoEvent, isUndoEvent } from './utils';
|
|
16
15
|
const styles = {
|
|
17
16
|
clearTextButton: "_19itglyw _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t _2hwx1b66 _bfhksm61 _s7n4nkob"
|
|
@@ -27,7 +26,7 @@ export const testIds = {
|
|
|
27
26
|
urlError: 'link-error',
|
|
28
27
|
clearUrlButton: 'clear-text'
|
|
29
28
|
};
|
|
30
|
-
export const
|
|
29
|
+
export const TextInput = ({
|
|
31
30
|
name,
|
|
32
31
|
label,
|
|
33
32
|
autoFocus,
|
|
@@ -102,10 +101,4 @@ export const TextInputNew = ({
|
|
|
102
101
|
testId: testIds.urlError
|
|
103
102
|
}, error)));
|
|
104
103
|
}));
|
|
105
|
-
};
|
|
106
|
-
export const TextInput = props => {
|
|
107
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
108
|
-
return /*#__PURE__*/React.createElement(TextInputNew, props);
|
|
109
|
-
}
|
|
110
|
-
return /*#__PURE__*/React.createElement(TextInputOld, props);
|
|
111
104
|
};
|
|
@@ -2,10 +2,8 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
5
|
import Spinner from '@atlaskit/spinner';
|
|
7
6
|
import { MinHeightContainer } from '../../common/ui/min-height-container';
|
|
8
|
-
import { LoaderFallbackOld } from './old';
|
|
9
7
|
const styles = null;
|
|
10
8
|
const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITHOUT_DISPLAYTEXT = '472px';
|
|
11
9
|
const LINK_PICKER_MIN_HEIGHT_IN_PX_WITH_TABS_WITH_DISPLAYTEXT = '550px';
|
|
@@ -44,7 +42,7 @@ const getEstimatedMinHeight = ({
|
|
|
44
42
|
* Loader / skeleton for the Link Picker. Takes LoaderFallbackProps (hideDisplayText, isLoadingPlugins, plugins)
|
|
45
43
|
* to determine the height to prevent jumps in height when loading
|
|
46
44
|
*/
|
|
47
|
-
export const
|
|
45
|
+
export const LoaderFallback = props => {
|
|
48
46
|
const minHeight = getEstimatedMinHeight(props);
|
|
49
47
|
return /*#__PURE__*/React.createElement(MinHeightContainer, {
|
|
50
48
|
minHeight: minHeight,
|
|
@@ -55,10 +53,4 @@ export const LoaderFallbackNew = props => {
|
|
|
55
53
|
interactionName: props.name || 'link-picker-loading',
|
|
56
54
|
size: "medium"
|
|
57
55
|
}));
|
|
58
|
-
};
|
|
59
|
-
export const LoaderFallback = props => {
|
|
60
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
61
|
-
return /*#__PURE__*/React.createElement(LoaderFallbackNew, props);
|
|
62
|
-
}
|
|
63
|
-
return /*#__PURE__*/React.createElement(LoaderFallbackOld, props);
|
|
64
56
|
};
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -5,19 +5,17 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
5
5
|
import React, { memo } from 'react';
|
|
6
6
|
import { LazySuspense } from 'react-loosely-lazy';
|
|
7
7
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
8
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
8
|
import { COMPONENT_NAME, LINK_PICKER_WIDTH_IN_PX } from '../common/constants';
|
|
10
9
|
import { LinkPickerSessionProvider } from '../controllers/session-provider';
|
|
11
10
|
import { ErrorBoundary } from './error-boundary';
|
|
12
11
|
import { LoaderFallback } from './loader-fallback';
|
|
13
12
|
import { MessagesProvider } from './messages-provider';
|
|
14
|
-
import { composeLinkPickerOld } from './old/main';
|
|
15
13
|
export const testIds = {
|
|
16
14
|
linkPickerRoot: 'link-picker-root'
|
|
17
15
|
};
|
|
18
16
|
export const PACKAGE_DATA = {
|
|
19
17
|
packageName: "@atlaskit/link-picker" || '',
|
|
20
|
-
packageVersion: "
|
|
18
|
+
packageVersion: "3.0.1" || '',
|
|
21
19
|
componentName: COMPONENT_NAME,
|
|
22
20
|
source: COMPONENT_NAME
|
|
23
21
|
};
|
|
@@ -34,7 +32,7 @@ const FixedWidthContainer = props => {
|
|
|
34
32
|
className: ax(["_1bsb1ubl"])
|
|
35
33
|
}));
|
|
36
34
|
};
|
|
37
|
-
export const
|
|
35
|
+
export const composeLinkPicker = Component => {
|
|
38
36
|
return /*#__PURE__*/memo(props => {
|
|
39
37
|
var _props$paddingLeft, _props$paddingRight, _props$paddingTop, _props$paddingBottom;
|
|
40
38
|
const {
|
|
@@ -64,10 +62,4 @@ export const composeLinkPickerNew = Component => {
|
|
|
64
62
|
"data-testid": testIds.linkPickerRoot
|
|
65
63
|
}), /*#__PURE__*/React.createElement(Component, props)))))))));
|
|
66
64
|
});
|
|
67
|
-
};
|
|
68
|
-
export const composeLinkPicker = Component => {
|
|
69
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
70
|
-
return composeLinkPickerNew(Component);
|
|
71
|
-
}
|
|
72
|
-
return composeLinkPickerOld(Component);
|
|
73
65
|
};
|
|
@@ -3,11 +3,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
3
3
|
import "./index.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
-
import { GenericErrorSVGOld } from './old';
|
|
8
6
|
var HEIGHT = 90;
|
|
9
7
|
var genericErrorStyles = null;
|
|
10
|
-
export var
|
|
8
|
+
export var GenericErrorSVG = function GenericErrorSVG(props) {
|
|
11
9
|
var id = 'link-picker-ui-generic-error-svg';
|
|
12
10
|
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
13
11
|
height: "90",
|
|
@@ -56,10 +54,4 @@ export var GenericErrorSVGNew = function GenericErrorSVGNew(props) {
|
|
|
56
54
|
stopColor: "#EBECF0",
|
|
57
55
|
stopOpacity: ".6"
|
|
58
56
|
}))));
|
|
59
|
-
};
|
|
60
|
-
export var GenericErrorSVG = function GenericErrorSVG(props) {
|
|
61
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
62
|
-
return /*#__PURE__*/React.createElement(GenericErrorSVGNew, props);
|
|
63
|
-
}
|
|
64
|
-
return /*#__PURE__*/React.createElement(GenericErrorSVGOld, props);
|
|
65
57
|
};
|
|
@@ -3,13 +3,11 @@ import "./index.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import Heading from '@atlaskit/heading';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { Flex, Text } from '@atlaskit/primitives/compiled';
|
|
8
|
-
import { EmptyStateOld } from './old';
|
|
9
7
|
var styles = {
|
|
10
8
|
container: "_1pfhoahv _6rthoahv _y3gn1h6o"
|
|
11
9
|
};
|
|
12
|
-
export var
|
|
10
|
+
export var EmptyState = function EmptyState(_ref) {
|
|
13
11
|
var testId = _ref.testId,
|
|
14
12
|
header = _ref.header,
|
|
15
13
|
description = _ref.description,
|
|
@@ -31,10 +29,4 @@ export var EmptyStateNew = function EmptyStateNew(_ref) {
|
|
|
31
29
|
as: "p",
|
|
32
30
|
color: "color.text"
|
|
33
31
|
}, description)));
|
|
34
|
-
};
|
|
35
|
-
export var EmptyState = function EmptyState(props) {
|
|
36
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
37
|
-
return /*#__PURE__*/React.createElement(EmptyStateNew, props);
|
|
38
|
-
}
|
|
39
|
-
return /*#__PURE__*/React.createElement(EmptyStateOld, props);
|
|
40
32
|
};
|
|
@@ -6,10 +6,8 @@ var _excluded = ["className", "minHeight"];
|
|
|
6
6
|
import "./index.compiled.css";
|
|
7
7
|
import { ax, ix } from "@compiled/react/runtime";
|
|
8
8
|
import React, { forwardRef } from 'react';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { MinHeightContainerOld } from './old';
|
|
11
9
|
var minHeightComponentStyles = null;
|
|
12
|
-
export var
|
|
10
|
+
export var MinHeightContainer = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
13
11
|
var className = _ref.className,
|
|
14
12
|
minHeight = _ref.minHeight,
|
|
15
13
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -21,14 +19,4 @@ export var MinHeightContainerNew = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
21
19
|
}, props, {
|
|
22
20
|
style: _defineProperty({}, '--link-picker-min-height', minHeight)
|
|
23
21
|
}));
|
|
24
|
-
});
|
|
25
|
-
export var MinHeightContainer = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
26
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
27
|
-
return /*#__PURE__*/React.createElement(MinHeightContainerNew, _extends({
|
|
28
|
-
ref: ref
|
|
29
|
-
}, props));
|
|
30
|
-
}
|
|
31
|
-
return /*#__PURE__*/React.createElement(MinHeightContainerOld, _extends({
|
|
32
|
-
ref: ref
|
|
33
|
-
}, props));
|
|
34
22
|
});
|
|
@@ -8,7 +8,6 @@ import { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants
|
|
|
8
8
|
import { GenericErrorSVG } from '../../../common/generic-error-svg';
|
|
9
9
|
import { EmptyState } from '../../../common/ui/empty-state';
|
|
10
10
|
import { MinHeightContainer } from '../../../common/ui/min-height-container';
|
|
11
|
-
import { ErrorBoundaryFallbackOld } from './old';
|
|
12
11
|
var errorBoundaryFallbackStyles = null;
|
|
13
12
|
var oldErrorBoundaryFallbackStyles = null;
|
|
14
13
|
var messages = defineMessages({
|
|
@@ -23,7 +22,7 @@ var messages = defineMessages({
|
|
|
23
22
|
id: 'fabric.linkPicker.unhandledError.description'
|
|
24
23
|
}
|
|
25
24
|
});
|
|
26
|
-
export var
|
|
25
|
+
export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
|
|
27
26
|
var intl = useIntl();
|
|
28
27
|
var header = intl.formatMessage(messages.heading);
|
|
29
28
|
var description = intl.formatMessage(messages.description);
|
|
@@ -38,10 +37,4 @@ export var ErrorBoundaryFallbackNew = function ErrorBoundaryFallbackNew() {
|
|
|
38
37
|
},
|
|
39
38
|
description: description
|
|
40
39
|
}));
|
|
41
|
-
};
|
|
42
|
-
export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
|
|
43
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
44
|
-
return /*#__PURE__*/React.createElement(ErrorBoundaryFallbackNew, null);
|
|
45
|
-
}
|
|
46
|
-
return /*#__PURE__*/React.createElement(ErrorBoundaryFallbackOld, null);
|
|
47
40
|
};
|
|
@@ -10,11 +10,9 @@ import { defineMessages, useIntl } from 'react-intl-next';
|
|
|
10
10
|
import Button, { ButtonGroup } from '@atlaskit/button';
|
|
11
11
|
import EditorAddIconLegacy from '@atlaskit/icon/glyph/editor/add';
|
|
12
12
|
import EditorAddIcon from '@atlaskit/icon/utility/add';
|
|
13
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
13
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
15
14
|
import { UnauthenticatedError } from '../../../common/utils/errors';
|
|
16
15
|
import { LinkPickerSubmitButton } from './link-picker-submit-button';
|
|
17
|
-
import { FormFooterOld } from './old';
|
|
18
16
|
var formFooterStyles = null;
|
|
19
17
|
var formFooterActionStyles = null;
|
|
20
18
|
export var messages = defineMessages({
|
|
@@ -35,7 +33,7 @@ export var testIds = {
|
|
|
35
33
|
actionButton: 'link-picker-action-button',
|
|
36
34
|
submitStatusA11yIndicator: 'link-picker-submit-status-a11y-indicator'
|
|
37
35
|
};
|
|
38
|
-
export var
|
|
36
|
+
export var FormFooter = /*#__PURE__*/memo(function (_ref) {
|
|
39
37
|
var isLoading = _ref.isLoading,
|
|
40
38
|
_ref$isSubmitting = _ref.isSubmitting,
|
|
41
39
|
isSubmitting = _ref$isSubmitting === void 0 ? false : _ref$isSubmitting,
|
|
@@ -96,10 +94,4 @@ export var FormFooterNew = /*#__PURE__*/memo(function (_ref) {
|
|
|
96
94
|
testId: testIds.insertButton,
|
|
97
95
|
url: url
|
|
98
96
|
})));
|
|
99
|
-
});
|
|
100
|
-
export var FormFooter = function FormFooter(props) {
|
|
101
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
102
|
-
return /*#__PURE__*/React.createElement(FormFooterNew, props);
|
|
103
|
-
}
|
|
104
|
-
return /*#__PURE__*/React.createElement(FormFooterOld, props);
|
|
105
|
-
};
|
|
97
|
+
});
|
|
@@ -26,7 +26,6 @@ import { Announcer } from './announcer';
|
|
|
26
26
|
import { FormFooter, testIds as formFooterTestIds } from './form-footer';
|
|
27
27
|
import { LinkPickerSubmitButton } from './form-footer/link-picker-submit-button';
|
|
28
28
|
import { formMessages, linkMessages, linkTextMessages, searchMessages } from './messages';
|
|
29
|
-
import { LinkPickerOld } from './old';
|
|
30
29
|
import { SearchResults, testIds as searchTestIds } from './search-results';
|
|
31
30
|
import { testIds as textFieldTestIds, TextInput } from './text-input';
|
|
32
31
|
import { TrackMount } from './track-mount';
|
|
@@ -78,7 +77,7 @@ var LinkInputField = withInputFieldTracking(TextInput, 'link', function (event,
|
|
|
78
77
|
});
|
|
79
78
|
});
|
|
80
79
|
var DisplayTextInputField = withInputFieldTracking(TextInput, 'displayText');
|
|
81
|
-
export var
|
|
80
|
+
export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(function (_ref) {
|
|
82
81
|
var onSubmit = _ref.onSubmit,
|
|
83
82
|
onCancel = _ref.onCancel,
|
|
84
83
|
onContentResize = _ref.onContentResize,
|
|
@@ -411,10 +410,4 @@ export var LinkPickerNew = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(fun
|
|
|
411
410
|
hideSubmitButton: moveSubmitButton,
|
|
412
411
|
className: ax([(!queryState || !(plugins !== null && plugins !== void 0 && plugins.length)) && "_19pkpxbi"])
|
|
413
412
|
}));
|
|
414
|
-
}));
|
|
415
|
-
export var LinkPicker = function LinkPicker(props) {
|
|
416
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
417
|
-
return /*#__PURE__*/React.createElement(LinkPickerNew, props);
|
|
418
|
-
}
|
|
419
|
-
return /*#__PURE__*/React.createElement(LinkPickerOld, props);
|
|
420
|
-
};
|
|
413
|
+
}));
|
|
@@ -6,13 +6,11 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
6
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
import { Fragment } from 'react';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
12
11
|
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
13
12
|
import { LinkSearchError, testIds as searchErrorTestIds } from './link-search-error';
|
|
14
13
|
import { LinkSearchList, testIds as listTestIds } from './link-search-list';
|
|
15
|
-
import { SearchResultsOld } from './old';
|
|
16
14
|
import { ScrollingTabList } from './scrolling-tabs';
|
|
17
15
|
import { SearchResultsContainer } from './search-results-container';
|
|
18
16
|
import { TrackTabViewed } from './track-tab-viewed';
|
|
@@ -25,7 +23,7 @@ export var testIds = _objectSpread(_objectSpread(_objectSpread({}, searchErrorTe
|
|
|
25
23
|
tabList: 'link-picker-tabs',
|
|
26
24
|
tabItem: 'link-picker-tab'
|
|
27
25
|
});
|
|
28
|
-
export var
|
|
26
|
+
export var SearchResults = function SearchResults(_ref) {
|
|
29
27
|
var _activePlugin$errorFa, _activePlugin$errorFa2;
|
|
30
28
|
var tabs = _ref.tabs,
|
|
31
29
|
activeTab = _ref.activeTab,
|
|
@@ -87,10 +85,4 @@ export var SearchResultsNew = function SearchResultsNew(_ref) {
|
|
|
87
85
|
activePlugin: activePlugin,
|
|
88
86
|
adaptiveHeight: adaptiveHeight
|
|
89
87
|
}), error ? (_activePlugin$errorFa = activePlugin === null || activePlugin === void 0 || (_activePlugin$errorFa2 = activePlugin.errorFallback) === null || _activePlugin$errorFa2 === void 0 ? void 0 : _activePlugin$errorFa2.call(activePlugin, error, retry)) !== null && _activePlugin$errorFa !== void 0 ? _activePlugin$errorFa : /*#__PURE__*/React.createElement(LinkSearchError, null) : null));
|
|
90
|
-
};
|
|
91
|
-
export var SearchResults = function SearchResults(props) {
|
|
92
|
-
if (fg('platform_bandicoots-link-picker-css')) {
|
|
93
|
-
return /*#__PURE__*/React.createElement(SearchResultsNew, props);
|
|
94
|
-
}
|
|
95
|
-
return /*#__PURE__*/React.createElement(SearchResultsOld, props);
|
|
96
88
|
};
|