@atlaskit/link-picker 3.1.0 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/common/generic-error-svg-v2/index.compiled.css +3 -0
- package/dist/cjs/common/generic-error-svg-v2/index.js +54 -0
- package/dist/cjs/common/ui/empty-state/index.compiled.css +4 -0
- package/dist/cjs/common/ui/empty-state/index.js +19 -1
- package/dist/cjs/ui/error-boundary/error-boundary-fallback/index.js +4 -1
- package/dist/cjs/ui/link-picker/form-footer/index.compiled.css +2 -1
- package/dist/cjs/ui/link-picker/form-footer/index.js +4 -1
- package/dist/cjs/ui/link-picker/index.compiled.css +3 -0
- package/dist/cjs/ui/link-picker/index.js +11 -4
- package/dist/cjs/ui/link-picker/messages.js +10 -0
- package/dist/cjs/ui/link-picker/search-results/index.js +4 -1
- package/dist/cjs/ui/link-picker/search-results/link-search-error/index.js +16 -2
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +5 -1
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg-v2/index.compiled.css +3 -0
- package/dist/cjs/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg-v2/index.js +49 -0
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/index.compiled.css +1 -0
- package/dist/cjs/ui/link-picker/search-results/link-search-list/list-item/index.js +7 -1
- package/dist/cjs/ui/link-picker/search-results/search-results-container/index.js +2 -1
- package/dist/cjs/ui/main.js +1 -1
- package/dist/es2019/common/generic-error-svg-v2/index.compiled.css +3 -0
- package/dist/es2019/common/generic-error-svg-v2/index.js +41 -0
- package/dist/es2019/common/ui/empty-state/index.compiled.css +4 -0
- package/dist/es2019/common/ui/empty-state/index.js +19 -1
- package/dist/es2019/ui/error-boundary/error-boundary-fallback/index.js +2 -1
- package/dist/es2019/ui/link-picker/form-footer/index.compiled.css +2 -1
- package/dist/es2019/ui/link-picker/form-footer/index.js +4 -1
- package/dist/es2019/ui/link-picker/index.compiled.css +3 -0
- package/dist/es2019/ui/link-picker/index.js +10 -3
- package/dist/es2019/ui/link-picker/messages.js +10 -0
- package/dist/es2019/ui/link-picker/search-results/index.js +4 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-error/index.js +15 -2
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +3 -1
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg-v2/index.compiled.css +3 -0
- package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg-v2/index.js +37 -0
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/index.compiled.css +1 -0
- package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/index.js +5 -2
- package/dist/es2019/ui/link-picker/search-results/search-results-container/index.js +2 -1
- package/dist/es2019/ui/main.js +1 -1
- package/dist/esm/common/generic-error-svg-v2/index.compiled.css +3 -0
- package/dist/esm/common/generic-error-svg-v2/index.js +44 -0
- package/dist/esm/common/ui/empty-state/index.compiled.css +4 -0
- package/dist/esm/common/ui/empty-state/index.js +19 -1
- package/dist/esm/ui/error-boundary/error-boundary-fallback/index.js +4 -1
- package/dist/esm/ui/link-picker/form-footer/index.compiled.css +2 -1
- package/dist/esm/ui/link-picker/form-footer/index.js +4 -1
- package/dist/esm/ui/link-picker/index.compiled.css +3 -0
- package/dist/esm/ui/link-picker/index.js +11 -4
- package/dist/esm/ui/link-picker/messages.js +10 -0
- package/dist/esm/ui/link-picker/search-results/index.js +4 -1
- package/dist/esm/ui/link-picker/search-results/link-search-error/index.js +16 -2
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js +5 -1
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg-v2/index.compiled.css +3 -0
- package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg-v2/index.js +40 -0
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/index.compiled.css +1 -0
- package/dist/esm/ui/link-picker/search-results/link-search-list/list-item/index.js +8 -2
- package/dist/esm/ui/link-picker/search-results/search-results-container/index.js +2 -1
- package/dist/esm/ui/main.js +1 -1
- package/dist/types/common/generic-error-svg-v2/index.d.ts +2 -0
- package/dist/types/common/types.d.ts +4 -0
- package/dist/types/common/ui/empty-state/index.d.ts +3 -1
- package/dist/types/ui/link-picker/index.d.ts +1 -0
- package/dist/types/ui/link-picker/messages.d.ts +10 -0
- package/dist/types/ui/link-picker/search-results/link-search-error/index.d.ts +11 -1
- package/dist/types/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg-v2/index.d.ts +2 -0
- package/dist/types-ts4.5/common/generic-error-svg-v2/index.d.ts +2 -0
- package/dist/types-ts4.5/common/types.d.ts +4 -0
- package/dist/types-ts4.5/common/ui/empty-state/index.d.ts +3 -1
- package/dist/types-ts4.5/ui/link-picker/index.d.ts +1 -0
- package/dist/types-ts4.5/ui/link-picker/messages.d.ts +10 -0
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-error/index.d.ts +11 -1
- package/dist/types-ts4.5/ui/link-picker/search-results/link-search-list/link-search-no-results/no-results-svg-v2/index.d.ts +2 -0
- package/package.json +7 -4
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
1
2
|
._19bv164s{padding-left:var(--link-picker-padding-left)}
|
|
3
|
+
._19pk1b66{margin-top:var(--ds-space-050,4px)}
|
|
2
4
|
._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
|
|
3
5
|
._1e0c1txw{display:flex}
|
|
4
6
|
._1e0ctcjq{display:block!important}
|
|
5
7
|
._2lx21bp4{flex-direction:column}
|
|
6
8
|
._ca0q1k79{padding-top:var(--link-picker-padding-top)}
|
|
7
9
|
._n3td1t3k{padding-bottom:var(--link-picker-padding-bottom)}
|
|
10
|
+
._syaz1be1{color:var(--ds-text-subtlest,#253858)}
|
|
8
11
|
._u5f31pah{padding-right:var(--link-picker-padding-right)}
|
|
9
12
|
._vchhusvi{box-sizing:border-box}
|
|
10
13
|
._vwz44jg8{line-height:normal}
|
|
@@ -7,10 +7,12 @@ import { Fragment, memo, useCallback, useLayoutEffect, useMemo, useReducer } fro
|
|
|
7
7
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
8
8
|
import uuid from 'uuid';
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
|
+
import { HelperMessage } from '@atlaskit/form';
|
|
10
11
|
import { isSafeUrl, normalizeUrl } from '@atlaskit/linking-common/url';
|
|
11
12
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
12
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
15
|
+
import { N700 } from '@atlaskit/theme/colors';
|
|
14
16
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
15
17
|
import { useLinkPickerAnalytics, withInputFieldTracking, withLinkPickerAnalyticsContext } from '../../common/analytics';
|
|
16
18
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
@@ -27,7 +29,9 @@ import { testIds as textFieldTestIds, TextInput } from './text-input';
|
|
|
27
29
|
import { TrackMount } from './track-mount';
|
|
28
30
|
import { getDataSource, getScreenReaderText } from './utils';
|
|
29
31
|
const styles = {
|
|
30
|
-
fullWidthSubmitButton: "_19pkpxbi _1e0c1txw _2lx21bp4"
|
|
32
|
+
fullWidthSubmitButton: "_19pkpxbi _1e0c1txw _2lx21bp4",
|
|
33
|
+
linkDisplayHelperTextContainer: "_19pk1b66 _syaz1be1",
|
|
34
|
+
linkDisplayHelperText: "_11c81o8v"
|
|
31
35
|
};
|
|
32
36
|
const baseRootContainerStyles = null;
|
|
33
37
|
// To be removed when platform-linking-visual-refresh-v1 is removed
|
|
@@ -38,6 +42,7 @@ export const testIds = {
|
|
|
38
42
|
linkPicker: 'link-picker',
|
|
39
43
|
urlInputField: 'link-url',
|
|
40
44
|
textInputField: 'link-text',
|
|
45
|
+
linkHelperText: 'link-helper-text',
|
|
41
46
|
...searchTestIds,
|
|
42
47
|
...formFooterTestIds,
|
|
43
48
|
...textFieldTestIds
|
|
@@ -354,7 +359,7 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
|
354
359
|
onClear: handleUrlClear,
|
|
355
360
|
onKeyDown: handleKeyDown,
|
|
356
361
|
onChange: handleChangeUrl
|
|
357
|
-
})), !hideDisplayText && /*#__PURE__*/React.createElement(DisplayTextInputField, {
|
|
362
|
+
})), !hideDisplayText && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(DisplayTextInputField, {
|
|
358
363
|
autoComplete: "off",
|
|
359
364
|
name: "displayText",
|
|
360
365
|
testId: testIds.textInputField,
|
|
@@ -365,7 +370,9 @@ export const LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(({
|
|
|
365
370
|
readOnly: isSubmitting,
|
|
366
371
|
onClear: handleClear,
|
|
367
372
|
onChange: handleChangeText
|
|
368
|
-
}),
|
|
373
|
+
}), fg('platform-linking-visual-refresh-link-picker') && /*#__PURE__*/React.createElement(HelperMessage, {
|
|
374
|
+
testId: testIds.linkHelperText
|
|
375
|
+
}, customMessages !== null && customMessages !== void 0 && customMessages.linkHelperTextLabel ? intl.formatMessage(customMessages === null || customMessages === void 0 ? void 0 : customMessages.linkHelperTextLabel) : intl.formatMessage(linkTextMessages.linkHelperTextLabel))), moveSubmitButton && /*#__PURE__*/React.createElement(Box, {
|
|
369
376
|
xcss: styles.fullWidthSubmitButton
|
|
370
377
|
}, /*#__PURE__*/React.createElement(LinkPickerSubmitButton, {
|
|
371
378
|
isEditing: isEditing,
|
|
@@ -65,6 +65,16 @@ export const linkTextMessages = defineMessages({
|
|
|
65
65
|
id: 'fabric.linkPicker.clearLinkText',
|
|
66
66
|
defaultMessage: 'Clear text',
|
|
67
67
|
description: 'Tooltip message for link input clear button'
|
|
68
|
+
},
|
|
69
|
+
linkHelperTextLabel: {
|
|
70
|
+
id: 'fabric.linkPicker.linkHelperTextLabel',
|
|
71
|
+
defaultMessage: 'Give this link a title or description',
|
|
72
|
+
description: 'Helper text for the link display input'
|
|
73
|
+
},
|
|
74
|
+
linkHelperTextAriaLabel: {
|
|
75
|
+
id: 'fabric.linkPicker.linkHelperTextAriaLabel',
|
|
76
|
+
defaultMessage: 'Link display helper text',
|
|
77
|
+
description: 'Aria label for the helper text of the link display input'
|
|
68
78
|
}
|
|
69
79
|
});
|
|
70
80
|
export const timeMessages = defineMessages({
|
|
@@ -3,6 +3,7 @@ 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';
|
|
6
7
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
7
8
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
8
9
|
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
@@ -83,5 +84,7 @@ export const SearchResults = ({
|
|
|
83
84
|
activePlugin: activePlugin,
|
|
84
85
|
adaptiveHeight: adaptiveHeight,
|
|
85
86
|
tabPanelId: `${testIds.tabList}-${activeTab}-tab`
|
|
86
|
-
}), 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,
|
|
87
|
+
}), 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, {
|
|
88
|
+
onRetry: fg('platform-linking-visual-refresh-link-picker') ? retry : undefined
|
|
89
|
+
}) : null));
|
|
87
90
|
};
|
|
@@ -3,7 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import { isFedRamp } from '@atlaskit/atlassian-context';
|
|
5
5
|
import Button from '@atlaskit/button';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { GenericErrorSVG } from '../../../../common/generic-error-svg';
|
|
8
|
+
import { GenericErrorSVGV2 } from '../../../../common/generic-error-svg-v2';
|
|
7
9
|
import { EmptyState } from '../../../../common/ui/empty-state';
|
|
8
10
|
export const CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
|
|
9
11
|
export const CONTACT_SUPPORT_LINK_FEDRAMP = 'https://gcs.atlassian-us-gov-mod.net/servicedesk/customer/portals';
|
|
@@ -17,12 +19,19 @@ export const messages = defineMessages({
|
|
|
17
19
|
id: 'fabric.linkPicker.search.error.description',
|
|
18
20
|
defaultMessage: 'Refresh the page, or contact <a>Atlassian Support</a> if this keeps happening.',
|
|
19
21
|
description: 'Describes possible actions when search throws an error'
|
|
22
|
+
},
|
|
23
|
+
searchErrorAction: {
|
|
24
|
+
id: 'fabric.linkPicker.search.error.retry',
|
|
25
|
+
defaultMessage: 'Refresh',
|
|
26
|
+
description: 'Describe the action user can take to retry the search'
|
|
20
27
|
}
|
|
21
28
|
});
|
|
22
29
|
export const testIds = {
|
|
23
30
|
searchError: 'link-search-error'
|
|
24
31
|
};
|
|
25
|
-
export const LinkSearchError = (
|
|
32
|
+
export const LinkSearchError = ({
|
|
33
|
+
onRetry
|
|
34
|
+
}) => {
|
|
26
35
|
const intl = useIntl();
|
|
27
36
|
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
28
37
|
testId: testIds.searchError,
|
|
@@ -38,6 +47,10 @@ export const LinkSearchError = () => {
|
|
|
38
47
|
}, label)
|
|
39
48
|
}
|
|
40
49
|
})),
|
|
41
|
-
|
|
50
|
+
action: onRetry && fg('platform-linking-visual-refresh-link-picker') ? /*#__PURE__*/React.createElement(Button, {
|
|
51
|
+
appearance: "primary",
|
|
52
|
+
onClick: onRetry
|
|
53
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.searchErrorAction)) : null,
|
|
54
|
+
renderImage: fg('platform-linking-visual-refresh-link-picker') ? () => /*#__PURE__*/React.createElement(GenericErrorSVGV2, null) : () => /*#__PURE__*/React.createElement(GenericErrorSVG, null)
|
|
42
55
|
});
|
|
43
56
|
};
|
package/dist/es2019/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { EmptyState } from '../../../../../common/ui/empty-state';
|
|
4
5
|
import { NoResultsSVG } from './no-results-svg';
|
|
6
|
+
import { NoResultsV2SVG } from './no-results-svg-v2';
|
|
5
7
|
export const messages = defineMessages({
|
|
6
8
|
noResults: {
|
|
7
9
|
id: 'fabric.linkPicker.search.noResults.heading',
|
|
@@ -23,6 +25,6 @@ export const NoResults = () => {
|
|
|
23
25
|
testId: testIds.emptyResultPage,
|
|
24
26
|
header: intl.formatMessage(messages.noResults),
|
|
25
27
|
description: intl.formatMessage(messages.noResultsDescription),
|
|
26
|
-
renderImage: () => /*#__PURE__*/React.createElement(NoResultsSVG, null)
|
|
28
|
+
renderImage: fg('platform-linking-visual-refresh-link-picker') ? () => /*#__PURE__*/React.createElement(NoResultsV2SVG, null) : () => /*#__PURE__*/React.createElement(NoResultsSVG, null)
|
|
27
29
|
});
|
|
28
30
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
const SIZE = 96;
|
|
6
|
+
const noResultsSVGStyles = null;
|
|
7
|
+
export const NoResultsV2SVG = () => {
|
|
8
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
9
|
+
viewBox: "0 0 96 96",
|
|
10
|
+
fill: "none",
|
|
11
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
+
className: ax(["_1bsb16xz _4t3i16xz _1e0c1ule"])
|
|
13
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
14
|
+
fill: "#fff",
|
|
15
|
+
d: "M64.861 32.06a27.747 27.747 0 0 0-2.667-4.133 28.188 28.188 0 0 0-3.376-3.669c-6.985-6.311-15.57-6.89-23.609-2.53a30.246 30.246 0 0 0-4.056 2.656 30.624 30.624 0 0 0-3.735 3.4c-6.225 6.717-7.82 15.154-3.505 23.463a28.103 28.103 0 0 0 2.698 4.192 27.67 27.67 0 0 0 3.33 3.62c6.94 6.267 15.518 6.85 23.596 2.507a30.502 30.502 0 0 0 4.23-2.758 30.071 30.071 0 0 0 3.593-3.257c6.252-6.692 7.847-15.161 3.494-23.49h.007Z"
|
|
16
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
17
|
+
fill: "#DDDEE1",
|
|
18
|
+
d: "M43.092 66.774c-5.306 0-10.382-1.997-14.75-5.938a30.405 30.405 0 0 1-3.62-3.93 30.222 30.222 0 0 1-2.928-4.553c-4.657-8.96-3.247-18.509 3.871-26.192a33.27 33.27 0 0 1 4.025-3.669 32.825 32.825 0 0 1 4.378-2.87c9.209-4.995 18.816-3.951 26.353 2.86a30.96 30.96 0 0 1 3.665 3.98 30.302 30.302 0 0 1 2.898 4.489c4.706 9.003 3.295 18.564-3.868 26.23a32.157 32.157 0 0 1-3.879 3.516 33.436 33.436 0 0 1-4.562 2.974c-3.858 2.073-7.781 3.1-11.583 3.1v.003Zm2.53-45.486c-3.019 0-6.147.841-9.274 2.541a28.43 28.43 0 0 0-3.736 2.447 28.058 28.058 0 0 0-3.442 3.135c-5.746 6.203-6.86 13.566-3.135 20.736a25.4 25.4 0 0 0 2.472 3.83 25.297 25.297 0 0 0 3.044 3.309c5.99 5.41 13.398 6.182 20.862 2.175a28.01 28.01 0 0 0 3.9-2.545 28.04 28.04 0 0 0 3.308-2.999c5.778-6.182 6.885-13.552 3.125-20.75a25.545 25.545 0 0 0-2.44-3.777 25.854 25.854 0 0 0-3.086-3.358c-3.491-3.152-7.443-4.744-11.59-4.744h-.007Z"
|
|
19
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
20
|
+
fill: "#DDDEE1",
|
|
21
|
+
d: "M62.822 59.695c-1.235-1.721-2.562-1.71-3.857-.709-1.215.939-1.54 2.21-.244 3.882l1.48 1.913 4.102-3.173-1.48-1.913Z"
|
|
22
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
23
|
+
fill: "#DDDEE1",
|
|
24
|
+
d: "m65.334 60.811-6.158 4.762 11.573 14.969 6.159-4.762L65.334 60.81Z"
|
|
25
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
26
|
+
fill: "#B7B9BE",
|
|
27
|
+
d: "m64.344 61.577-4.178 3.23 3.925 5.076 4.178-3.23-3.925-5.076Z"
|
|
28
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
29
|
+
fill: "#DDDEE1",
|
|
30
|
+
d: "M46.496 47.476h-3.492v-.221c-.119-2.484 1.29-5.174 3.295-6.274l.038-.02c.054-.028.107-.061.157-.095 1.094-.705 1.717-1.92 1.678-3.257-.038-1.326-.722-2.49-1.829-3.117a4.596 4.596 0 0 0-2.256-.605c-2.365 0-4.289 1.938-4.289 4.319h-3.492c0-4.32 3.49-7.835 7.78-7.835 1.375 0 2.747.365 3.967 1.055 2.186 1.237 3.536 3.51 3.61 6.082.074 2.583-1.15 4.943-3.272 6.312-.143.093-.289.18-.433.256-.832.468-1.529 1.907-1.465 3.033l.003.367Z"
|
|
31
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
32
|
+
fill: "#DDDEE1",
|
|
33
|
+
fillRule: "evenodd",
|
|
34
|
+
d: "M44.413 49.492a3.465 3.465 0 0 1 1.119-.003c1.138.187 2.064.985 2.289 2.229l.002.009.001.01a3.419 3.419 0 0 1-.001 1.126v.004c-.22 1.256-1.161 2.052-2.295 2.236a3.5 3.5 0 0 1-1.108-.003h-.001c-1.14-.184-2.07-.981-2.296-2.224l-.002-.01-.001-.01a3.37 3.37 0 0 1 0-1.12l.001-.01.002-.01c.227-1.249 1.161-2.034 2.288-2.223h.002Z",
|
|
35
|
+
clipRule: "evenodd"
|
|
36
|
+
}));
|
|
37
|
+
};
|
package/dist/es2019/ui/link-picker/search-results/link-search-list/list-item/index.compiled.css
CHANGED
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
._syaz14xw{color:var(--ds-text,#5e6c84)}
|
|
24
24
|
._syaz1a45{color:var(--ds-text-subtle,#505f79)}
|
|
25
25
|
._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
|
|
26
|
+
._syazxs3e{color:var(--ds-border,rgba(9,30,66,.13))}
|
|
26
27
|
._u5f3fxbg{padding-right:clamp(var(--ds-space-100,8px),var(--link-picker-padding-right),100%)}
|
|
27
28
|
._1a3b1r31:focus{text-decoration-color:currentColor}
|
|
28
29
|
._1hvw1o36:focus{outline-width:medium}
|
|
@@ -6,7 +6,7 @@ import { forwardRef, Fragment } from 'react';
|
|
|
6
6
|
import { useIntl } from 'react-intl-next';
|
|
7
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
8
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
9
|
-
import { B100, B400, B50, N20, N200, N300, N400 } from '@atlaskit/theme/colors';
|
|
9
|
+
import { B100, B400, B50, N20, N200, N300, N400, N40A } from '@atlaskit/theme/colors';
|
|
10
10
|
/* eslint-disable-next-line @atlassian/tangerine/import/no-parent-imports */
|
|
11
11
|
import { transformTimeStamp } from '../../../transformTimeStamp';
|
|
12
12
|
export const testIds = {
|
|
@@ -20,6 +20,7 @@ const listItemContextStyles = null;
|
|
|
20
20
|
const listItemContainerStyles = null;
|
|
21
21
|
const listItemContainerInnerStyles = null;
|
|
22
22
|
const listItemContainerInnerStylesA11yRefresh = null;
|
|
23
|
+
const listItemContainerInnerStylesSeparatorLinkPickerRefresh = null;
|
|
23
24
|
const itemNameStyles = null;
|
|
24
25
|
const imgStyles = null;
|
|
25
26
|
const listItemBaseStyles = null;
|
|
@@ -66,7 +67,9 @@ const ListItemSubtitle = ({
|
|
|
66
67
|
className: ax([fg('bandicoots-a11y-link-picker-styling') ? "_syaz1a45 _o5721q9c" : "_syaz1wmz _o5721q9c"])
|
|
67
68
|
}, firstItem)), secondItem && /*#__PURE__*/React.createElement("div", {
|
|
68
69
|
className: ax([fg('bandicoots-a11y-link-picker-styling') ? "_syaz1a45 _o5721q9c" : "_syaz1wmz _o5721q9c"])
|
|
69
|
-
},
|
|
70
|
+
}, fg('platform-linking-visual-refresh-link-picker') ? /*#__PURE__*/React.createElement("span", {
|
|
71
|
+
className: ax(["_syazxs3e"])
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Fragment, null, "\xA0 \u2022\xA0 ")) : /*#__PURE__*/React.createElement(Fragment, null, "\xA0 \u2022\xA0 "), /*#__PURE__*/React.createElement(Fragment, null, secondItem)));
|
|
70
73
|
};
|
|
71
74
|
const getDefaultSubtitleItems = (item, intl) => {
|
|
72
75
|
const container = item.container;
|
|
@@ -3,6 +3,7 @@ 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';
|
|
6
7
|
import { MinHeightContainer } from '../../../../common/ui/min-height-container';
|
|
7
8
|
const flexColumn = null;
|
|
8
9
|
export const SearchResultsContainer = ({
|
|
@@ -13,7 +14,7 @@ export const SearchResultsContainer = ({
|
|
|
13
14
|
}) => {
|
|
14
15
|
const ref = useRef(null);
|
|
15
16
|
const currentHeight = useRef(null);
|
|
16
|
-
const fixedMinHeight = hasTabs ? '347px' : '302px';
|
|
17
|
+
const fixedMinHeight = fg('platform-linking-visual-refresh-link-picker') ? hasTabs ? '296px' : '251px' : hasTabs ? '347px' : '302px';
|
|
17
18
|
const adaptiveMinHeight = isLoadingResults && !!currentHeight.current ? `${currentHeight.current}px` : 'auto';
|
|
18
19
|
const minheight = adaptiveHeight ? adaptiveMinHeight : fixedMinHeight;
|
|
19
20
|
useLayoutEffect(() => {
|
package/dist/es2019/ui/main.js
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./index.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
var SIZE = 96;
|
|
7
|
+
var genericErrorStyles = null;
|
|
8
|
+
export var GenericErrorSVGV2 = function GenericErrorSVGV2(props) {
|
|
9
|
+
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
10
|
+
viewBox: "0 0 96 96",
|
|
11
|
+
fill: "none",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, props, {
|
|
14
|
+
className: ax(["_1bsbwdok _4t3iwdok _1e0c1ule"]),
|
|
15
|
+
style: {
|
|
16
|
+
"--_cjikvn": ix("".concat(SIZE, "px"))
|
|
17
|
+
}
|
|
18
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
19
|
+
fill: "#fff",
|
|
20
|
+
d: "M64.861 32.06a27.753 27.753 0 0 0-2.667-4.133 28.187 28.187 0 0 0-3.376-3.669c-6.985-6.311-15.57-6.89-23.609-2.53a30.226 30.226 0 0 0-4.056 2.656 30.624 30.624 0 0 0-3.735 3.4c-6.225 6.717-7.82 15.154-3.505 23.462a28.108 28.108 0 0 0 2.698 4.193 27.67 27.67 0 0 0 3.33 3.62c6.94 6.266 15.518 6.85 23.596 2.507a30.492 30.492 0 0 0 4.23-2.758 30.07 30.07 0 0 0 3.593-3.257c6.252-6.692 7.847-15.161 3.494-23.49h.007Z"
|
|
21
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
22
|
+
fill: "#DDDEE1",
|
|
23
|
+
d: "M43.092 66.774c-5.306 0-10.382-1.997-14.75-5.938a30.405 30.405 0 0 1-3.62-3.93 30.243 30.243 0 0 1-2.928-4.553c-4.657-8.961-3.247-18.509 3.871-26.192a33.271 33.271 0 0 1 4.025-3.67 32.834 32.834 0 0 1 4.378-2.869c9.209-4.995 18.816-3.951 26.353 2.86a30.945 30.945 0 0 1 3.665 3.98 30.303 30.303 0 0 1 2.898 4.488c4.705 9.003 3.295 18.565-3.868 26.231a32.148 32.148 0 0 1-3.879 3.515 33.415 33.415 0 0 1-4.562 2.975c-3.858 2.073-7.782 3.1-11.583 3.1v.003Zm2.53-45.486c-3.019 0-6.147.84-9.275 2.54a28.433 28.433 0 0 0-3.735 2.448 28.059 28.059 0 0 0-3.442 3.135c-5.746 6.203-6.86 13.566-3.135 20.736a25.395 25.395 0 0 0 2.472 3.83 25.304 25.304 0 0 0 3.044 3.309c5.99 5.41 13.398 6.182 20.862 2.175a28.02 28.02 0 0 0 3.899-2.545 28.03 28.03 0 0 0 3.31-2.999c5.777-6.182 6.883-13.552 3.124-20.75a25.553 25.553 0 0 0-2.44-3.777 25.848 25.848 0 0 0-3.087-3.358c-3.49-3.153-7.442-4.744-11.59-4.744h-.006Z"
|
|
24
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
25
|
+
fill: "#DDDEE1",
|
|
26
|
+
d: "M62.822 59.694c-1.235-1.72-2.562-1.71-3.857-.708-1.215.939-1.54 2.21-.244 3.882l1.48 1.913 4.102-3.174-1.48-1.913Z"
|
|
27
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
28
|
+
fill: "#DDDEE1",
|
|
29
|
+
d: "m65.334 60.811-6.159 4.762L70.748 80.54l6.16-4.761L65.333 60.81Z"
|
|
30
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
31
|
+
fill: "#B7B9BE",
|
|
32
|
+
d: "m64.344 61.577-4.178 3.23 3.925 5.076 4.178-3.23-3.925-5.076Z"
|
|
33
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
34
|
+
fill: "#DDDEE1",
|
|
35
|
+
fillRule: "evenodd",
|
|
36
|
+
d: "M55.057 33.452 36.213 52.296l-2.468-2.469 18.844-18.844 2.468 2.469Z",
|
|
37
|
+
clipRule: "evenodd"
|
|
38
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
39
|
+
fill: "#DDDEE1",
|
|
40
|
+
fillRule: "evenodd",
|
|
41
|
+
d: "M52.589 52.296 33.745 33.452l2.468-2.469 18.844 18.844-2.468 2.469Z",
|
|
42
|
+
clipRule: "evenodd"
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
._19bvoahv{padding-left:var(--ds-space-600,3pc)}
|
|
1
2
|
._1pfhoahv{margin-block-start:var(--ds-space-600,3pc)}
|
|
2
3
|
._6rthoahv{margin-block-end:var(--ds-space-600,3pc)}
|
|
4
|
+
._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
|
|
5
|
+
._n3td1jfw{padding-bottom:var(--ds-space-500,40px)}
|
|
6
|
+
._u5f3oahv{padding-right:var(--ds-space-600,3pc)}
|
|
3
7
|
._y3gn1h6o{text-align:center}
|
|
@@ -3,15 +3,33 @@ 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';
|
|
6
7
|
import { Flex, Text } from '@atlaskit/primitives/compiled';
|
|
7
8
|
var styles = {
|
|
8
|
-
container: "_1pfhoahv _6rthoahv _y3gn1h6o"
|
|
9
|
+
container: "_1pfhoahv _6rthoahv _y3gn1h6o",
|
|
10
|
+
containerV2: "_ca0q1ejb _u5f3oahv _19bvoahv _n3td1jfw _y3gn1h6o"
|
|
9
11
|
};
|
|
10
12
|
export var EmptyState = function EmptyState(_ref) {
|
|
11
13
|
var testId = _ref.testId,
|
|
12
14
|
header = _ref.header,
|
|
13
15
|
description = _ref.description,
|
|
16
|
+
action = _ref.action,
|
|
14
17
|
renderImage = _ref.renderImage;
|
|
18
|
+
if (fg('platform-linking-visual-refresh-link-picker')) {
|
|
19
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
20
|
+
xcss: styles.containerV2,
|
|
21
|
+
testId: testId,
|
|
22
|
+
direction: "column",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
gap: "space.200"
|
|
25
|
+
}, renderImage === null || renderImage === void 0 ? void 0 : renderImage(), /*#__PURE__*/React.createElement(Heading, {
|
|
26
|
+
size: "small",
|
|
27
|
+
as: "h2"
|
|
28
|
+
}, header), description && /*#__PURE__*/React.createElement(Text, {
|
|
29
|
+
as: "p",
|
|
30
|
+
color: "color.text"
|
|
31
|
+
}, description), action && action);
|
|
32
|
+
}
|
|
15
33
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
16
34
|
xcss: styles.container,
|
|
17
35
|
testId: testId,
|
|
@@ -6,6 +6,7 @@ import { defineMessages, useIntl } from 'react-intl-next';
|
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { LINK_PICKER_MIN_HEIGHT_IN_PX_FALLBACK } from '../../../common/constants';
|
|
8
8
|
import { GenericErrorSVG } from '../../../common/generic-error-svg';
|
|
9
|
+
import { GenericErrorSVGV2 } from '../../../common/generic-error-svg-v2';
|
|
9
10
|
import { EmptyState } from '../../../common/ui/empty-state';
|
|
10
11
|
import { MinHeightContainer } from '../../../common/ui/min-height-container';
|
|
11
12
|
var errorBoundaryFallbackStyles = null;
|
|
@@ -32,7 +33,9 @@ export var ErrorBoundaryFallback = function ErrorBoundaryFallback() {
|
|
|
32
33
|
className: ax([fg('platform-linking-visual-refresh-v1') ? "_11c81vhk" : "_vwz44jg8"])
|
|
33
34
|
}, /*#__PURE__*/React.createElement(EmptyState, {
|
|
34
35
|
header: header,
|
|
35
|
-
renderImage: function
|
|
36
|
+
renderImage: fg('platform-linking-visual-refresh-link-picker') ? function () {
|
|
37
|
+
return /*#__PURE__*/React.createElement(GenericErrorSVGV2, null);
|
|
38
|
+
} : function () {
|
|
36
39
|
return /*#__PURE__*/React.createElement(GenericErrorSVG, null);
|
|
37
40
|
},
|
|
38
41
|
description: description
|
|
@@ -10,10 +10,12 @@ 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';
|
|
13
14
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
14
15
|
import { UnauthenticatedError } from '../../../common/utils/errors';
|
|
15
16
|
import { LinkPickerSubmitButton } from './link-picker-submit-button';
|
|
16
17
|
var formFooterStyles = null;
|
|
18
|
+
var formFooterV2Styles = null;
|
|
17
19
|
var formFooterActionStyles = null;
|
|
18
20
|
export var messages = defineMessages({
|
|
19
21
|
cancelButton: {
|
|
@@ -69,7 +71,8 @@ export var FormFooter = /*#__PURE__*/memo(function (_ref) {
|
|
|
69
71
|
}, typeof pluginAction.label === 'string' ? pluginAction.label : intl.formatMessage(pluginAction.label));
|
|
70
72
|
};
|
|
71
73
|
return /*#__PURE__*/React.createElement("footer", _extends({
|
|
72
|
-
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
75
|
+
className: ax([fg('platform-linking-visual-refresh-link-picker') ? "_1e0c1txw _1bahesu3 _ca0qpxbi" : "_1e0c1txw _1bahesu3", className])
|
|
73
76
|
}, restProps), isSubmitting && /*#__PURE__*/React.createElement(VisuallyHidden, {
|
|
74
77
|
role: "status",
|
|
75
78
|
id: submitMessageId,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
1
2
|
._19bv164s{padding-left:var(--link-picker-padding-left)}
|
|
3
|
+
._19pk1b66{margin-top:var(--ds-space-050,4px)}
|
|
2
4
|
._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
|
|
3
5
|
._1e0c1txw{display:flex}
|
|
4
6
|
._1e0ctcjq{display:block!important}
|
|
5
7
|
._2lx21bp4{flex-direction:column}
|
|
6
8
|
._ca0q1k79{padding-top:var(--link-picker-padding-top)}
|
|
7
9
|
._n3td1t3k{padding-bottom:var(--link-picker-padding-bottom)}
|
|
10
|
+
._syaz1be1{color:var(--ds-text-subtlest,#253858)}
|
|
8
11
|
._u5f31pah{padding-right:var(--link-picker-padding-right)}
|
|
9
12
|
._vchhusvi{box-sizing:border-box}
|
|
10
13
|
._vwz44jg8{line-height:normal}
|
|
@@ -11,10 +11,12 @@ import { Fragment, memo, useCallback, useLayoutEffect, useMemo, useReducer } fro
|
|
|
11
11
|
import { FormattedMessage, useIntl } from 'react-intl-next';
|
|
12
12
|
import uuid from 'uuid';
|
|
13
13
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
14
|
+
import { HelperMessage } from '@atlaskit/form';
|
|
14
15
|
import { isSafeUrl, normalizeUrl } from '@atlaskit/linking-common/url';
|
|
15
16
|
import { browser } from '@atlaskit/linking-common/user-agent';
|
|
16
17
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
18
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
19
|
+
import { N700 } from '@atlaskit/theme/colors';
|
|
18
20
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
19
21
|
import { useLinkPickerAnalytics, withInputFieldTracking, withLinkPickerAnalyticsContext } from '../../common/analytics';
|
|
20
22
|
import { ANALYTICS_CHANNEL } from '../../common/constants';
|
|
@@ -31,7 +33,9 @@ import { testIds as textFieldTestIds, TextInput } from './text-input';
|
|
|
31
33
|
import { TrackMount } from './track-mount';
|
|
32
34
|
import { getDataSource, getScreenReaderText } from './utils';
|
|
33
35
|
var styles = {
|
|
34
|
-
fullWidthSubmitButton: "_19pkpxbi _1e0c1txw _2lx21bp4"
|
|
36
|
+
fullWidthSubmitButton: "_19pkpxbi _1e0c1txw _2lx21bp4",
|
|
37
|
+
linkDisplayHelperTextContainer: "_19pk1b66 _syaz1be1",
|
|
38
|
+
linkDisplayHelperText: "_11c81o8v"
|
|
35
39
|
};
|
|
36
40
|
var baseRootContainerStyles = null;
|
|
37
41
|
// To be removed when platform-linking-visual-refresh-v1 is removed
|
|
@@ -41,7 +45,8 @@ export var testIds = _objectSpread(_objectSpread(_objectSpread({
|
|
|
41
45
|
linkPickerRoot: 'link-picker-root',
|
|
42
46
|
linkPicker: 'link-picker',
|
|
43
47
|
urlInputField: 'link-url',
|
|
44
|
-
textInputField: 'link-text'
|
|
48
|
+
textInputField: 'link-text',
|
|
49
|
+
linkHelperText: 'link-helper-text'
|
|
45
50
|
}, searchTestIds), formFooterTestIds), textFieldTestIds);
|
|
46
51
|
var initState = {
|
|
47
52
|
url: '',
|
|
@@ -350,7 +355,7 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
|
|
|
350
355
|
onClear: handleUrlClear,
|
|
351
356
|
onKeyDown: handleKeyDown,
|
|
352
357
|
onChange: handleChangeUrl
|
|
353
|
-
})), !hideDisplayText && /*#__PURE__*/React.createElement(DisplayTextInputField, {
|
|
358
|
+
})), !hideDisplayText && /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(DisplayTextInputField, {
|
|
354
359
|
autoComplete: "off",
|
|
355
360
|
name: "displayText",
|
|
356
361
|
testId: testIds.textInputField,
|
|
@@ -361,7 +366,9 @@ export var LinkPicker = withLinkPickerAnalyticsContext( /*#__PURE__*/memo(functi
|
|
|
361
366
|
readOnly: isSubmitting,
|
|
362
367
|
onClear: handleClear,
|
|
363
368
|
onChange: handleChangeText
|
|
364
|
-
}),
|
|
369
|
+
}), fg('platform-linking-visual-refresh-link-picker') && /*#__PURE__*/React.createElement(HelperMessage, {
|
|
370
|
+
testId: testIds.linkHelperText
|
|
371
|
+
}, customMessages !== null && customMessages !== void 0 && customMessages.linkHelperTextLabel ? intl.formatMessage(customMessages === null || customMessages === void 0 ? void 0 : customMessages.linkHelperTextLabel) : intl.formatMessage(linkTextMessages.linkHelperTextLabel))), moveSubmitButton && /*#__PURE__*/React.createElement(Box, {
|
|
365
372
|
xcss: styles.fullWidthSubmitButton
|
|
366
373
|
}, /*#__PURE__*/React.createElement(LinkPickerSubmitButton, {
|
|
367
374
|
isEditing: isEditing,
|
|
@@ -65,6 +65,16 @@ export var linkTextMessages = defineMessages({
|
|
|
65
65
|
id: 'fabric.linkPicker.clearLinkText',
|
|
66
66
|
defaultMessage: 'Clear text',
|
|
67
67
|
description: 'Tooltip message for link input clear button'
|
|
68
|
+
},
|
|
69
|
+
linkHelperTextLabel: {
|
|
70
|
+
id: 'fabric.linkPicker.linkHelperTextLabel',
|
|
71
|
+
defaultMessage: 'Give this link a title or description',
|
|
72
|
+
description: 'Helper text for the link display input'
|
|
73
|
+
},
|
|
74
|
+
linkHelperTextAriaLabel: {
|
|
75
|
+
id: 'fabric.linkPicker.linkHelperTextAriaLabel',
|
|
76
|
+
defaultMessage: 'Link display helper text',
|
|
77
|
+
description: 'Aria label for the helper text of the link display input'
|
|
68
78
|
}
|
|
69
79
|
});
|
|
70
80
|
export var timeMessages = defineMessages({
|
|
@@ -6,6 +6,7 @@ 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';
|
|
9
10
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
11
|
import Spinner from '@atlaskit/spinner/spinner';
|
|
11
12
|
import Tabs, { Tab, TabList } from '@atlaskit/tabs';
|
|
@@ -85,5 +86,7 @@ export var SearchResults = function SearchResults(_ref) {
|
|
|
85
86
|
activePlugin: activePlugin,
|
|
86
87
|
adaptiveHeight: adaptiveHeight,
|
|
87
88
|
tabPanelId: "".concat(testIds.tabList, "-").concat(activeTab, "-tab")
|
|
88
|
-
}), 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,
|
|
89
|
+
}), 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, {
|
|
90
|
+
onRetry: fg('platform-linking-visual-refresh-link-picker') ? retry : undefined
|
|
91
|
+
}) : null));
|
|
89
92
|
};
|
|
@@ -3,7 +3,9 @@ import React from 'react';
|
|
|
3
3
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl-next';
|
|
4
4
|
import { isFedRamp } from '@atlaskit/atlassian-context';
|
|
5
5
|
import Button from '@atlaskit/button';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
7
|
import { GenericErrorSVG } from '../../../../common/generic-error-svg';
|
|
8
|
+
import { GenericErrorSVGV2 } from '../../../../common/generic-error-svg-v2';
|
|
7
9
|
import { EmptyState } from '../../../../common/ui/empty-state';
|
|
8
10
|
export var CONTACT_SUPPORT_LINK = 'https://support.atlassian.com/contact/';
|
|
9
11
|
export var CONTACT_SUPPORT_LINK_FEDRAMP = 'https://gcs.atlassian-us-gov-mod.net/servicedesk/customer/portals';
|
|
@@ -17,12 +19,18 @@ export var messages = defineMessages({
|
|
|
17
19
|
id: 'fabric.linkPicker.search.error.description',
|
|
18
20
|
defaultMessage: 'Refresh the page, or contact <a>Atlassian Support</a> if this keeps happening.',
|
|
19
21
|
description: 'Describes possible actions when search throws an error'
|
|
22
|
+
},
|
|
23
|
+
searchErrorAction: {
|
|
24
|
+
id: 'fabric.linkPicker.search.error.retry',
|
|
25
|
+
defaultMessage: 'Refresh',
|
|
26
|
+
description: 'Describe the action user can take to retry the search'
|
|
20
27
|
}
|
|
21
28
|
});
|
|
22
29
|
export var testIds = {
|
|
23
30
|
searchError: 'link-search-error'
|
|
24
31
|
};
|
|
25
|
-
export var LinkSearchError = function LinkSearchError() {
|
|
32
|
+
export var LinkSearchError = function LinkSearchError(_ref) {
|
|
33
|
+
var onRetry = _ref.onRetry;
|
|
26
34
|
var intl = useIntl();
|
|
27
35
|
return /*#__PURE__*/React.createElement(EmptyState, {
|
|
28
36
|
testId: testIds.searchError,
|
|
@@ -40,7 +48,13 @@ export var LinkSearchError = function LinkSearchError() {
|
|
|
40
48
|
}
|
|
41
49
|
}
|
|
42
50
|
})),
|
|
43
|
-
|
|
51
|
+
action: onRetry && fg('platform-linking-visual-refresh-link-picker') ? /*#__PURE__*/React.createElement(Button, {
|
|
52
|
+
appearance: "primary",
|
|
53
|
+
onClick: onRetry
|
|
54
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, messages.searchErrorAction)) : null,
|
|
55
|
+
renderImage: fg('platform-linking-visual-refresh-link-picker') ? function () {
|
|
56
|
+
return /*#__PURE__*/React.createElement(GenericErrorSVGV2, null);
|
|
57
|
+
} : function () {
|
|
44
58
|
return /*#__PURE__*/React.createElement(GenericErrorSVG, null);
|
|
45
59
|
}
|
|
46
60
|
});
|
package/dist/esm/ui/link-picker/search-results/link-search-list/link-search-no-results/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { defineMessages, useIntl } from 'react-intl-next';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
4
|
import { EmptyState } from '../../../../../common/ui/empty-state';
|
|
4
5
|
import { NoResultsSVG } from './no-results-svg';
|
|
6
|
+
import { NoResultsV2SVG } from './no-results-svg-v2';
|
|
5
7
|
export var messages = defineMessages({
|
|
6
8
|
noResults: {
|
|
7
9
|
id: 'fabric.linkPicker.search.noResults.heading',
|
|
@@ -23,7 +25,9 @@ export var NoResults = function NoResults() {
|
|
|
23
25
|
testId: testIds.emptyResultPage,
|
|
24
26
|
header: intl.formatMessage(messages.noResults),
|
|
25
27
|
description: intl.formatMessage(messages.noResultsDescription),
|
|
26
|
-
renderImage: function
|
|
28
|
+
renderImage: fg('platform-linking-visual-refresh-link-picker') ? function () {
|
|
29
|
+
return /*#__PURE__*/React.createElement(NoResultsV2SVG, null);
|
|
30
|
+
} : function () {
|
|
27
31
|
return /*#__PURE__*/React.createElement(NoResultsSVG, null);
|
|
28
32
|
}
|
|
29
33
|
});
|