@atlaskit/link-datasource 4.5.0 → 4.7.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 +33 -0
- package/dist/cjs/common/ui/spot/error-state/error/assets/dark.svg +7 -4
- package/dist/cjs/common/ui/spot/error-state/error/assets/light.svg +7 -4
- package/dist/cjs/common/ui/spot/error-state/error-old/assets/dark.svg +5 -0
- package/dist/cjs/common/ui/spot/error-state/error-old/assets/light.svg +5 -0
- package/dist/cjs/common/ui/spot/error-state/error-old/index.js +18 -0
- package/dist/cjs/common/utils/withFeatureFlaggedComponent.js +23 -0
- package/dist/cjs/ui/assets-modal/search-container/object-schema-select/index.js +7 -2
- package/dist/cjs/ui/common/modal/basic-search-input/index.compiled.css +1 -0
- package/dist/cjs/ui/common/modal/basic-search-input/index.js +6 -4
- package/dist/cjs/ui/common/modal/display-view-dropdown/display-view-drop-down.js +46 -6
- package/dist/cjs/ui/common/modal/mode-switcher/index.compiled.css +16 -0
- package/dist/cjs/ui/common/modal/mode-switcher/index.js +24 -2
- package/dist/cjs/ui/common/modal/popup-select/checkbox-option-visual-refresh-sllv.compiled.css +15 -0
- package/dist/cjs/ui/common/modal/popup-select/checkbox-option-visual-refresh-sllv.js +30 -0
- package/dist/cjs/ui/common/modal/popup-select/control.compiled.css +4 -0
- package/dist/cjs/ui/common/modal/popup-select/control.js +34 -7
- package/dist/cjs/ui/common/modal/popup-select/dropdownIndicator.js +19 -10
- package/dist/cjs/ui/common/modal/popup-select/footer.compiled.css +4 -0
- package/dist/cjs/ui/common/modal/popup-select/footer.js +8 -4
- package/dist/cjs/ui/common/modal/popup-select/index.js +25 -3
- package/dist/cjs/ui/common/modal/popup-select/menu-list/errorMessage.js +8 -3
- package/dist/cjs/ui/common/modal/popup-select/menu-list/index.compiled.css +4 -1
- package/dist/cjs/ui/common/modal/popup-select/menu-list/index.js +5 -2
- package/dist/cjs/ui/common/modal/popup-select/menu-list/messages.js +21 -1
- package/dist/cjs/ui/common/modal/popup-select/menu-list/noOptionsMessage.js +4 -3
- package/dist/cjs/ui/common/modal/popup-select/menu-list/selectMessage.compiled.css +8 -1
- package/dist/cjs/ui/common/modal/popup-select/menu-list/selectMessage.js +23 -4
- package/dist/cjs/ui/common/modal/popup-select/menu-list/showMoreButton.js +10 -0
- package/dist/cjs/ui/common/modal/popup-select/trigger.compiled.css +1 -0
- package/dist/cjs/ui/common/modal/popup-select/trigger.js +26 -5
- package/dist/cjs/ui/common/modal/search-count/index.js +9 -3
- package/dist/cjs/ui/common/modal/site-selector/index.js +7 -2
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +18 -2
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/index.compiled.css +2 -1
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/index.js +14 -2
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +5 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +3 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.js +25 -0
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.compiled.css +4 -1
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +49 -2
- package/dist/cjs/ui/jira-issues-modal/modal/index.js +5 -1
- package/dist/es2019/common/ui/spot/error-state/error/assets/dark.svg +7 -4
- package/dist/es2019/common/ui/spot/error-state/error/assets/light.svg +7 -4
- package/dist/es2019/common/ui/spot/error-state/error-old/assets/dark.svg +5 -0
- package/dist/es2019/common/ui/spot/error-state/error-old/assets/light.svg +5 -0
- package/dist/es2019/common/ui/spot/error-state/error-old/index.js +11 -0
- package/dist/es2019/common/utils/withFeatureFlaggedComponent.js +17 -0
- package/dist/es2019/ui/assets-modal/search-container/object-schema-select/index.js +5 -2
- package/dist/es2019/ui/common/modal/basic-search-input/index.compiled.css +1 -0
- package/dist/es2019/ui/common/modal/basic-search-input/index.js +6 -4
- package/dist/es2019/ui/common/modal/display-view-dropdown/display-view-drop-down.js +37 -6
- package/dist/es2019/ui/common/modal/mode-switcher/index.compiled.css +16 -0
- package/dist/es2019/ui/common/modal/mode-switcher/index.js +19 -2
- package/dist/es2019/ui/common/modal/popup-select/checkbox-option-visual-refresh-sllv.compiled.css +15 -0
- package/dist/es2019/ui/common/modal/popup-select/checkbox-option-visual-refresh-sllv.js +19 -0
- package/dist/es2019/ui/common/modal/popup-select/control.compiled.css +4 -0
- package/dist/es2019/ui/common/modal/popup-select/control.js +26 -5
- package/dist/es2019/ui/common/modal/popup-select/dropdownIndicator.js +20 -11
- package/dist/es2019/ui/common/modal/popup-select/footer.compiled.css +4 -0
- package/dist/es2019/ui/common/modal/popup-select/footer.js +8 -4
- package/dist/es2019/ui/common/modal/popup-select/index.js +20 -3
- package/dist/es2019/ui/common/modal/popup-select/menu-list/errorMessage.js +8 -3
- package/dist/es2019/ui/common/modal/popup-select/menu-list/index.compiled.css +4 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/index.js +5 -2
- package/dist/es2019/ui/common/modal/popup-select/menu-list/messages.js +21 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/noOptionsMessage.js +4 -3
- package/dist/es2019/ui/common/modal/popup-select/menu-list/selectMessage.compiled.css +8 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/selectMessage.js +24 -5
- package/dist/es2019/ui/common/modal/popup-select/menu-list/showMoreButton.js +12 -2
- package/dist/es2019/ui/common/modal/popup-select/trigger.compiled.css +1 -0
- package/dist/es2019/ui/common/modal/popup-select/trigger.js +24 -5
- package/dist/es2019/ui/common/modal/search-count/index.js +7 -2
- package/dist/es2019/ui/common/modal/site-selector/index.js +5 -2
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +16 -2
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.compiled.css +2 -1
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.js +16 -3
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +5 -1
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +3 -1
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.js +25 -0
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.compiled.css +4 -1
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +50 -3
- package/dist/es2019/ui/jira-issues-modal/modal/index.js +5 -1
- package/dist/esm/common/ui/spot/error-state/error/assets/dark.svg +7 -4
- package/dist/esm/common/ui/spot/error-state/error/assets/light.svg +7 -4
- package/dist/esm/common/ui/spot/error-state/error-old/assets/dark.svg +5 -0
- package/dist/esm/common/ui/spot/error-state/error-old/assets/light.svg +5 -0
- package/dist/esm/common/ui/spot/error-state/error-old/index.js +11 -0
- package/dist/esm/common/utils/withFeatureFlaggedComponent.js +17 -0
- package/dist/esm/ui/assets-modal/search-container/object-schema-select/index.js +7 -2
- package/dist/esm/ui/common/modal/basic-search-input/index.compiled.css +1 -0
- package/dist/esm/ui/common/modal/basic-search-input/index.js +6 -4
- package/dist/esm/ui/common/modal/display-view-dropdown/display-view-drop-down.js +46 -6
- package/dist/esm/ui/common/modal/mode-switcher/index.compiled.css +16 -0
- package/dist/esm/ui/common/modal/mode-switcher/index.js +24 -2
- package/dist/esm/ui/common/modal/popup-select/checkbox-option-visual-refresh-sllv.compiled.css +15 -0
- package/dist/esm/ui/common/modal/popup-select/checkbox-option-visual-refresh-sllv.js +20 -0
- package/dist/esm/ui/common/modal/popup-select/control.compiled.css +4 -0
- package/dist/esm/ui/common/modal/popup-select/control.js +33 -6
- package/dist/esm/ui/common/modal/popup-select/dropdownIndicator.js +20 -11
- package/dist/esm/ui/common/modal/popup-select/footer.compiled.css +4 -0
- package/dist/esm/ui/common/modal/popup-select/footer.js +8 -4
- package/dist/esm/ui/common/modal/popup-select/index.js +25 -3
- package/dist/esm/ui/common/modal/popup-select/menu-list/errorMessage.js +8 -3
- package/dist/esm/ui/common/modal/popup-select/menu-list/index.compiled.css +4 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/index.js +5 -2
- package/dist/esm/ui/common/modal/popup-select/menu-list/messages.js +21 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/noOptionsMessage.js +4 -3
- package/dist/esm/ui/common/modal/popup-select/menu-list/selectMessage.compiled.css +8 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/selectMessage.js +24 -5
- package/dist/esm/ui/common/modal/popup-select/menu-list/showMoreButton.js +12 -2
- package/dist/esm/ui/common/modal/popup-select/trigger.compiled.css +1 -0
- package/dist/esm/ui/common/modal/popup-select/trigger.js +26 -5
- package/dist/esm/ui/common/modal/search-count/index.js +9 -3
- package/dist/esm/ui/common/modal/site-selector/index.js +7 -2
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js +18 -2
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/index.compiled.css +2 -1
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/index.js +15 -3
- package/dist/esm/ui/confluence-search-modal/modal/index.js +5 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +3 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.js +25 -0
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.compiled.css +4 -1
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +50 -3
- package/dist/esm/ui/jira-issues-modal/modal/index.js +5 -1
- package/dist/types/common/ui/spot/error-state/error-old/index.d.ts +3 -0
- package/dist/types/common/utils/withFeatureFlaggedComponent.d.ts +9 -0
- package/dist/types/ui/common/modal/basic-search-input/index.d.ts +6 -1
- package/dist/types/ui/common/modal/popup-select/checkbox-option-visual-refresh-sllv.d.ts +4 -0
- package/dist/types/ui/common/modal/popup-select/control.d.ts +3 -1
- package/dist/types/ui/common/modal/popup-select/index.d.ts +6 -1
- package/dist/types/ui/common/modal/popup-select/menu-list/messages.d.ts +20 -0
- package/dist/types/ui/common/modal/popup-select/menu-list/selectMessage.d.ts +6 -1
- package/dist/types/ui/common/modal/search-count/index.d.ts +6 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.d.ts +25 -0
- package/dist/types-ts4.5/common/ui/spot/error-state/error-old/index.d.ts +3 -0
- package/dist/types-ts4.5/common/utils/withFeatureFlaggedComponent.d.ts +9 -0
- package/dist/types-ts4.5/ui/common/modal/basic-search-input/index.d.ts +6 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/checkbox-option-visual-refresh-sllv.d.ts +4 -0
- package/dist/types-ts4.5/ui/common/modal/popup-select/control.d.ts +3 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/index.d.ts +6 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/messages.d.ts +20 -0
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/selectMessage.d.ts +6 -1
- package/dist/types-ts4.5/ui/common/modal/search-count/index.d.ts +6 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/messages.d.ts +25 -0
- package/package.json +5 -5
|
@@ -2,8 +2,10 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
import isEqual from 'lodash/isEqual';
|
|
4
4
|
import { useIntl } from 'react-intl-next';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { CheckboxOption, PopupSelect } from '@atlaskit/select';
|
|
6
7
|
import { useDatasourceAnalyticsEvents } from '../../../../analytics';
|
|
8
|
+
import { CheckboxOptionVisualRefreshSllv } from './checkbox-option-visual-refresh-sllv';
|
|
7
9
|
import CustomControl from './control';
|
|
8
10
|
import CustomDropdownIndicator from './dropdownIndicator';
|
|
9
11
|
import PopupFooter from './footer';
|
|
@@ -18,6 +20,7 @@ export const FilterPopupSelect = ({
|
|
|
18
20
|
totalCount = 0,
|
|
19
21
|
status,
|
|
20
22
|
buttonLabel,
|
|
23
|
+
searchPlaceholder,
|
|
21
24
|
showLoading = false,
|
|
22
25
|
isDisabled = false,
|
|
23
26
|
showHydrating = false,
|
|
@@ -137,17 +140,31 @@ export const FilterPopupSelect = ({
|
|
|
137
140
|
shouldCloseMenuOnTab: false,
|
|
138
141
|
hideSelectedOptions: false,
|
|
139
142
|
isLoading: showLoading,
|
|
140
|
-
placeholder: formatMessage(asyncPopupSelectMessages.selectPlaceholder)
|
|
143
|
+
placeholder: searchPlaceholder && fg('platform-linking-visual-refresh-sllv') ? searchPlaceholder : formatMessage(asyncPopupSelectMessages.selectPlaceholder)
|
|
141
144
|
// @ts-ignore - https://product-fabric.atlassian.net/browse/DSP-21000
|
|
142
145
|
,
|
|
143
146
|
menuListProps: menuListProps,
|
|
144
147
|
components: {
|
|
145
|
-
Option: CheckboxOption,
|
|
148
|
+
Option: fg('platform-linking-visual-refresh-sllv') ? CheckboxOptionVisualRefreshSllv : CheckboxOption,
|
|
146
149
|
Control: CustomControl,
|
|
147
150
|
MenuList: CustomMenuList,
|
|
148
151
|
DropdownIndicator: CustomDropdownIndicator,
|
|
149
152
|
LoadingIndicator: undefined // disables the three ... indicator in the searchbox when picker is loading
|
|
150
|
-
}
|
|
153
|
+
}
|
|
154
|
+
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
|
|
155
|
+
,
|
|
156
|
+
styles: fg('platform-linking-visual-refresh-sllv') ? {
|
|
157
|
+
container: base => ({
|
|
158
|
+
...base,
|
|
159
|
+
paddingTop: "var(--ds-space-075, 6px)",
|
|
160
|
+
paddingBottom: 0
|
|
161
|
+
}),
|
|
162
|
+
menuList: base => ({
|
|
163
|
+
...base,
|
|
164
|
+
paddingTop: "var(--ds-space-050, 4px)",
|
|
165
|
+
paddingBottom: 0
|
|
166
|
+
})
|
|
167
|
+
} : undefined,
|
|
151
168
|
options: sortedOptions,
|
|
152
169
|
value: selectedOptions,
|
|
153
170
|
filterOption: noFilterOptions,
|
|
@@ -6,6 +6,7 @@ import { fg } from '@atlaskit/platform-feature-flags';
|
|
|
6
6
|
import { N500 } from '@atlaskit/theme/colors';
|
|
7
7
|
import { useDatasourceAnalyticsEvents } from '../../../../../analytics';
|
|
8
8
|
import { SpotError } from '../../../../../common/ui/spot/error-state/error';
|
|
9
|
+
import { SpotErrorOld } from '../../../../../common/ui/spot/error-state/error-old';
|
|
9
10
|
import { SEARCH_DEBOUNCE_MS } from '../constants';
|
|
10
11
|
import { asyncPopupSelectMessages } from './messages';
|
|
11
12
|
import CustomSelectMessage from './selectMessage';
|
|
@@ -47,15 +48,19 @@ const CustomErrorMessage = ({
|
|
|
47
48
|
formatMessage: noop
|
|
48
49
|
};
|
|
49
50
|
return /*#__PURE__*/React.createElement(CustomSelectMessage, {
|
|
50
|
-
icon: fg('
|
|
51
|
-
size:
|
|
51
|
+
icon: fg('platform-linking-visual-refresh-sllv') ? /*#__PURE__*/React.createElement(SpotError, {
|
|
52
|
+
size: "large",
|
|
52
53
|
alt: formatMessage(asyncPopupSelectMessages.errorMessage)
|
|
54
|
+
}) : fg('bandicoots-update-sllv-icons') ? /*#__PURE__*/React.createElement(SpotErrorOld, {
|
|
55
|
+
size: 'medium',
|
|
56
|
+
alt: formatMessage(asyncPopupSelectMessages.errorMessageOld)
|
|
53
57
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ErrorIcon, {
|
|
54
58
|
primaryColor: `var(--ds-icon, ${N500})`,
|
|
55
59
|
label: "",
|
|
56
60
|
size: "xlarge"
|
|
57
61
|
})),
|
|
58
|
-
message: asyncPopupSelectMessages.errorMessage,
|
|
62
|
+
message: fg('platform-linking-visual-refresh-sllv') ? asyncPopupSelectMessages.errorMessage : asyncPopupSelectMessages.errorMessageOld,
|
|
63
|
+
description: fg('platform-linking-visual-refresh-sllv') ? asyncPopupSelectMessages.errorDescription : undefined,
|
|
59
64
|
testId: `${filterName}--error-message`
|
|
60
65
|
});
|
|
61
66
|
};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
2
|
+
._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
|
|
2
3
|
._ca0q12x7{padding-top:var(--ds-space-075,6px)}
|
|
3
|
-
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
4
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
5
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
6
|
+
._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
+
import { cx } from '@compiled/react';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
7
|
import { Box, Flex } from '@atlaskit/primitives/compiled';
|
|
6
8
|
import { components } from '@atlaskit/select';
|
|
7
9
|
import Spinner from '@atlaskit/spinner';
|
|
@@ -11,7 +13,8 @@ import CustomNoOptionsMessage from './noOptionsMessage';
|
|
|
11
13
|
import ShowMoreButton from './showMoreButton';
|
|
12
14
|
const styles = {
|
|
13
15
|
inlineSpinnerStyles: "_ca0q12x7",
|
|
14
|
-
|
|
16
|
+
showMoreButtonBoxStylesOld: "_19bv12x7 _ca0qu2gc",
|
|
17
|
+
showMoreButtonBoxStyles: "_ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvpxbi"
|
|
15
18
|
};
|
|
16
19
|
const CustomMenuList = ({
|
|
17
20
|
children,
|
|
@@ -55,7 +58,7 @@ const CustomMenuList = ({
|
|
|
55
58
|
});
|
|
56
59
|
}
|
|
57
60
|
return /*#__PURE__*/React.createElement(React.Fragment, null, children, shouldDisplayShowMore && handleShowMore && /*#__PURE__*/React.createElement(Box, {
|
|
58
|
-
xcss: styles.showMoreButtonBoxStyles
|
|
61
|
+
xcss: cx(fg('platform-linking-visual-refresh-sllv') ? styles.showMoreButtonBoxStyles : styles.showMoreButtonBoxStylesOld)
|
|
59
62
|
}, /*#__PURE__*/React.createElement(ShowMoreButton, {
|
|
60
63
|
onShowMore: handleShowMore,
|
|
61
64
|
filterName: filterName
|
|
@@ -7,14 +7,34 @@ export const asyncPopupSelectMessages = defineMessages({
|
|
|
7
7
|
},
|
|
8
8
|
noOptionsMessage: {
|
|
9
9
|
id: 'linkDataSource.basic-filter.no-options-message',
|
|
10
|
+
defaultMessage: "We couldn't find anything matching your search",
|
|
11
|
+
description: 'The text for when no matches are found in dropdown'
|
|
12
|
+
},
|
|
13
|
+
noOptionsMessageOld: {
|
|
14
|
+
id: 'linkDataSource.basic-filter.no-options-message-old',
|
|
10
15
|
defaultMessage: 'No matches found',
|
|
11
16
|
description: 'The text for when no matches are found in dropdown'
|
|
12
17
|
},
|
|
18
|
+
noOptionsDescription: {
|
|
19
|
+
id: 'linkDataSource.basic-filter.no-options-description',
|
|
20
|
+
defaultMessage: 'Try again with a different term.',
|
|
21
|
+
description: 'The helper text for when no matches are found in dropdown'
|
|
22
|
+
},
|
|
13
23
|
errorMessage: {
|
|
14
|
-
id: 'linkDataSource.basic-filter.
|
|
24
|
+
id: 'linkDataSource.basic-filter.errorMessage',
|
|
25
|
+
defaultMessage: 'We ran into an issue trying to load results',
|
|
26
|
+
description: 'The text for when an error occurs when loading options'
|
|
27
|
+
},
|
|
28
|
+
errorMessageOld: {
|
|
29
|
+
id: 'linkDataSource.basic-filter.errorMessageOld',
|
|
15
30
|
defaultMessage: 'Something went wrong',
|
|
16
31
|
description: 'The text for when an error occurs when loading options'
|
|
17
32
|
},
|
|
33
|
+
errorDescription: {
|
|
34
|
+
id: 'linkDataSource.basic-filter.error-description',
|
|
35
|
+
defaultMessage: 'Check your connection and refresh',
|
|
36
|
+
description: 'The helper text for when no matches are found in dropdown'
|
|
37
|
+
},
|
|
18
38
|
showMoreMessage: {
|
|
19
39
|
id: 'linkDataSource.basic-filter.showMoreButton',
|
|
20
40
|
defaultMessage: 'Show more',
|
|
@@ -38,14 +38,15 @@ const CustomNoOptionsMessage = ({
|
|
|
38
38
|
};
|
|
39
39
|
return /*#__PURE__*/React.createElement(CustomSelectMessage, {
|
|
40
40
|
icon: fg('bandicoots-update-sllv-icons') ? /*#__PURE__*/React.createElement(SpotSearchNoResult, {
|
|
41
|
-
size: 'medium',
|
|
42
|
-
alt: formatMessage(asyncPopupSelectMessages.noOptionsMessage)
|
|
41
|
+
size: fg('platform-linking-visual-refresh-sllv') ? 'large' : 'medium',
|
|
42
|
+
alt: formatMessage(fg('platform-linking-visual-refresh-sllv') ? asyncPopupSelectMessages.noOptionsMessage : asyncPopupSelectMessages.noOptionsMessageOld)
|
|
43
43
|
}) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(QuestionCircleIcon, {
|
|
44
44
|
primaryColor: `var(--ds-icon, ${N500})`,
|
|
45
45
|
size: "xlarge",
|
|
46
46
|
label: ""
|
|
47
47
|
})),
|
|
48
|
-
message: asyncPopupSelectMessages.noOptionsMessage,
|
|
48
|
+
message: fg('platform-linking-visual-refresh-sllv') ? asyncPopupSelectMessages.noOptionsMessage : asyncPopupSelectMessages.noOptionsMessageOld,
|
|
49
|
+
description: fg('platform-linking-visual-refresh-sllv') ? asyncPopupSelectMessages.noOptionsDescription : undefined,
|
|
49
50
|
testId: `${filterName}--no-options-message`
|
|
50
51
|
});
|
|
51
52
|
};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
._zulppxbi{gap:var(--ds-space-200,1pc)}._19bvoahv{padding-left:var(--ds-space-600,3pc)}
|
|
1
3
|
._19bvutpp{padding-left:var(--ds-space-150,9pt)}
|
|
4
|
+
._4t3i16xz{height:6pc}
|
|
2
5
|
._4t3ivbgk{height:4pc}
|
|
6
|
+
._ca0q1jfw{padding-top:var(--ds-space-500,40px)}
|
|
3
7
|
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
8
|
+
._n3td1jfw{padding-bottom:var(--ds-space-500,40px)}
|
|
4
9
|
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
5
10
|
._otyrpxbi{margin-bottom:var(--ds-space-200,1pc)}
|
|
6
|
-
.
|
|
11
|
+
._u5f3oahv{padding-right:var(--ds-space-600,3pc)}
|
|
12
|
+
._u5f3utpp{padding-right:var(--ds-space-150,9pt)}
|
|
13
|
+
._y3gn1h6o{text-align:center}
|
|
@@ -4,22 +4,41 @@ import { ax, ix } from "@compiled/react/runtime";
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { FormattedMessage } from 'react-intl-next';
|
|
6
6
|
import Heading from '@atlaskit/heading';
|
|
7
|
-
import {
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { Flex, Stack, Text } from '@atlaskit/primitives/compiled';
|
|
8
9
|
const styles = {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
boxStylesOld: "_4t3ivbgk _otyrpxbi",
|
|
11
|
+
boxStyles: "_4t3i16xz",
|
|
12
|
+
stackStylesOld: "_ca0qu2gc _n3tdu2gc _19bvutpp _u5f3utpp",
|
|
13
|
+
stackStyles: "_zulppxbi _ca0q1jfw _n3td1jfw _19bvoahv _u5f3oahv _y3gn1h6o"
|
|
11
14
|
};
|
|
12
15
|
const CustomSelectMessage = ({
|
|
13
16
|
icon,
|
|
14
17
|
message,
|
|
18
|
+
description,
|
|
15
19
|
testId
|
|
16
20
|
}) => {
|
|
21
|
+
if (fg('platform-linking-visual-refresh-sllv')) {
|
|
22
|
+
return /*#__PURE__*/React.createElement(Stack, {
|
|
23
|
+
xcss: styles.stackStyles,
|
|
24
|
+
testId: testId,
|
|
25
|
+
alignInline: "center"
|
|
26
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
27
|
+
xcss: styles.boxStyles,
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
justifyContent: "center"
|
|
30
|
+
}, icon), /*#__PURE__*/React.createElement(Heading, {
|
|
31
|
+
size: "small"
|
|
32
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, message)), description && /*#__PURE__*/React.createElement(Text, {
|
|
33
|
+
size: "medium"
|
|
34
|
+
}, /*#__PURE__*/React.createElement(FormattedMessage, description)));
|
|
35
|
+
}
|
|
17
36
|
return /*#__PURE__*/React.createElement(Stack, {
|
|
18
|
-
xcss: styles.
|
|
37
|
+
xcss: styles.stackStylesOld,
|
|
19
38
|
testId: testId,
|
|
20
39
|
alignInline: "center"
|
|
21
40
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
22
|
-
xcss: styles.
|
|
41
|
+
xcss: styles.boxStylesOld,
|
|
23
42
|
alignItems: "center",
|
|
24
43
|
justifyContent: "center"
|
|
25
44
|
}, icon), /*#__PURE__*/React.createElement(Heading, {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl-next';
|
|
3
|
-
import
|
|
3
|
+
import ButtonOld from '@atlaskit/button';
|
|
4
|
+
import Button from '@atlaskit/button/new';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
6
|
import { useDatasourceAnalyticsEvents } from '../../../../../analytics';
|
|
5
7
|
import { asyncPopupSelectMessages } from './messages';
|
|
6
8
|
const ShowMoreButton = ({
|
|
@@ -20,7 +22,15 @@ const ShowMoreButton = ({
|
|
|
20
22
|
});
|
|
21
23
|
onShowMore();
|
|
22
24
|
}, [filterName, fireEvent, onShowMore]);
|
|
23
|
-
|
|
25
|
+
if (fg('platform-linking-visual-refresh-sllv')) {
|
|
26
|
+
return /*#__PURE__*/React.createElement(Button, {
|
|
27
|
+
onClick: handleShowMore,
|
|
28
|
+
appearance: "subtle",
|
|
29
|
+
testId: `${filterName}--show-more-button`,
|
|
30
|
+
spacing: "compact"
|
|
31
|
+
}, formatMessage(asyncPopupSelectMessages.showMoreMessage));
|
|
32
|
+
}
|
|
33
|
+
return /*#__PURE__*/React.createElement(ButtonOld, {
|
|
24
34
|
onClick: handleShowMore,
|
|
25
35
|
appearance: "link",
|
|
26
36
|
testId: `${filterName}--show-more-button`
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
._y44vkmg5{animation:flickerAnimation 2s infinite}._18m915vq{overflow-y:hidden}
|
|
3
3
|
._18u01b66{margin-left:var(--ds-space-050,4px)}
|
|
4
|
+
._18u0utpp{margin-left:var(--ds-space-150,9pt)}
|
|
4
5
|
._1bto1l2s{text-overflow:ellipsis}
|
|
5
6
|
._1reo15vq{overflow-x:hidden}
|
|
6
7
|
._kqswh2mm{position:relative}
|
|
@@ -4,13 +4,17 @@ import "./trigger.compiled.css";
|
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import React, { forwardRef, useCallback } from 'react';
|
|
6
6
|
import Badge from '@atlaskit/badge';
|
|
7
|
+
import NewButton from '@atlaskit/button/new';
|
|
7
8
|
import Button from '@atlaskit/button/standard-button';
|
|
8
|
-
import ChevronDownIcon from '@atlaskit/icon/utility/
|
|
9
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
|
|
10
|
+
import ChevronDownIconOld from '@atlaskit/icon/utility/migration/chevron-down';
|
|
11
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
12
|
import { Box, Flex } from '@atlaskit/primitives/compiled';
|
|
10
13
|
import Spinner from '@atlaskit/spinner';
|
|
11
14
|
const styles = {
|
|
12
15
|
triggerButtonLabelStyles: "_1reo15vq _18m915vq _1bto1l2s",
|
|
13
|
-
|
|
16
|
+
badgeStylesOld: "_18u01b66",
|
|
17
|
+
badgeStyles: "_18u0utpp"
|
|
14
18
|
};
|
|
15
19
|
|
|
16
20
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled
|
|
@@ -46,11 +50,10 @@ const PopupTrigger = /*#__PURE__*/forwardRef(({
|
|
|
46
50
|
}),
|
|
47
51
|
testId: `${triggerButtonTestId}--loading-button`
|
|
48
52
|
}, label)), [label, triggerButtonTestId]);
|
|
49
|
-
const DefaultButton = useCallback(() => /*#__PURE__*/React.createElement(
|
|
50
|
-
appearance: "default",
|
|
53
|
+
const DefaultButton = useCallback(() => fg('platform-linking-visual-refresh-sllv') ? /*#__PURE__*/React.createElement(NewButton, {
|
|
51
54
|
isSelected: isSelected || hasOptions,
|
|
52
55
|
isDisabled: isDisabled,
|
|
53
|
-
iconAfter: /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
56
|
+
iconAfter: () => /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
54
57
|
label: "",
|
|
55
58
|
color: "currentColor"
|
|
56
59
|
}),
|
|
@@ -62,6 +65,22 @@ const PopupTrigger = /*#__PURE__*/forwardRef(({
|
|
|
62
65
|
alignItems: "center"
|
|
63
66
|
}, /*#__PURE__*/React.createElement(Badge, {
|
|
64
67
|
appearance: "primary"
|
|
68
|
+
}, "+", selectedOptions.length - 1)))) : /*#__PURE__*/React.createElement(Button, {
|
|
69
|
+
appearance: "default",
|
|
70
|
+
isSelected: isSelected || hasOptions,
|
|
71
|
+
isDisabled: isDisabled,
|
|
72
|
+
iconAfter: /*#__PURE__*/React.createElement(ChevronDownIconOld, {
|
|
73
|
+
label: "",
|
|
74
|
+
color: "currentColor"
|
|
75
|
+
}),
|
|
76
|
+
testId: `${triggerButtonTestId}--button`
|
|
77
|
+
}, /*#__PURE__*/React.createElement(Flex, null, /*#__PURE__*/React.createElement(Box, {
|
|
78
|
+
xcss: styles.triggerButtonLabelStyles
|
|
79
|
+
}, label, firstOption && /*#__PURE__*/React.createElement(React.Fragment, null, ": ", firstOption.label)), selectedOptions && selectedOptions.length > 1 && /*#__PURE__*/React.createElement(Flex, {
|
|
80
|
+
xcss: styles.badgeStylesOld,
|
|
81
|
+
alignItems: "center"
|
|
82
|
+
}, /*#__PURE__*/React.createElement(Badge, {
|
|
83
|
+
appearance: "primary"
|
|
65
84
|
}, "+", selectedOptions.length - 1)))), [firstOption, hasOptions, isDisabled, isSelected, label, selectedOptions, triggerButtonTestId]);
|
|
66
85
|
|
|
67
86
|
/**
|
|
@@ -16,6 +16,7 @@ const styles = {
|
|
|
16
16
|
};
|
|
17
17
|
const ItemCountWrapper = ({
|
|
18
18
|
url,
|
|
19
|
+
styles: additionalStyles,
|
|
19
20
|
children,
|
|
20
21
|
testId
|
|
21
22
|
}) => /*#__PURE__*/React.createElement(Flex, {
|
|
@@ -30,7 +31,9 @@ const ItemCountWrapper = ({
|
|
|
30
31
|
,
|
|
31
32
|
style: {
|
|
32
33
|
color: fg('platform-linking-visual-refresh-sllv') ? "var(--ds-text-subtlest, #626F86)" : `var(--ds-text-accent-gray, ${N800})`,
|
|
33
|
-
textDecoration: !url ? 'none' : ''
|
|
34
|
+
textDecoration: !url ? 'none' : '',
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
36
|
+
...(fg('platform-linking-visual-refresh-sllv') && additionalStyles)
|
|
34
37
|
}
|
|
35
38
|
}, fg('platform-linking-visual-refresh-sllv') ? children : /*#__PURE__*/React.createElement(Heading, {
|
|
36
39
|
size: "xxsmall"
|
|
@@ -57,6 +60,7 @@ export const AssetsItemCount = ({
|
|
|
57
60
|
const TableSearchCount = ({
|
|
58
61
|
url,
|
|
59
62
|
searchCount,
|
|
63
|
+
styles: additionalStyles,
|
|
60
64
|
testId = 'datasource-table-total-results-count',
|
|
61
65
|
prefixTextType = 'issue'
|
|
62
66
|
}) => {
|
|
@@ -64,7 +68,8 @@ const TableSearchCount = ({
|
|
|
64
68
|
const messageKey = isIssue && fg('confluence-issue-terminology-refresh') ? 'issueCountTextIssueTermRefresh' : `${prefixTextType}CountText`;
|
|
65
69
|
return /*#__PURE__*/React.createElement(ItemCountWrapper, {
|
|
66
70
|
testId: testId,
|
|
67
|
-
url: url
|
|
71
|
+
url: url,
|
|
72
|
+
styles: additionalStyles
|
|
68
73
|
}, /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, searchCountMessages[messageKey], {
|
|
69
74
|
values: {
|
|
70
75
|
searchCount
|
|
@@ -7,7 +7,7 @@ import { useMemo } from 'react';
|
|
|
7
7
|
import { useIntl } from 'react-intl-next';
|
|
8
8
|
import Button from '@atlaskit/button/new';
|
|
9
9
|
import Heading from '@atlaskit/heading';
|
|
10
|
-
import ChevronDownIcon from '@atlaskit/icon/utility/
|
|
10
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
12
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
13
13
|
import Select, { PopupSelect } from '@atlaskit/select';
|
|
@@ -63,7 +63,10 @@ export const SiteSelector = props => {
|
|
|
63
63
|
...triggerProps
|
|
64
64
|
}) => /*#__PURE__*/React.createElement(Button, _extends({}, triggerProps, {
|
|
65
65
|
isSelected: isOpen,
|
|
66
|
-
iconAfter: ChevronDownIcon,
|
|
66
|
+
iconAfter: () => /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
67
|
+
label: "",
|
|
68
|
+
color: "currentColor"
|
|
69
|
+
}),
|
|
67
70
|
testId: `${testId}__control`
|
|
68
71
|
}), (selectedSiteOption === null || selectedSiteOption === void 0 ? void 0 : selectedSiteOption.label) || formatMessage(siteSelectorMessages.chooseSite))
|
|
69
72
|
}) : /*#__PURE__*/React.createElement(Select, {
|
package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/date-range-picker/trigger.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import NewButton from '@atlaskit/button/new';
|
|
3
4
|
import Button from '@atlaskit/button/standard-button';
|
|
4
|
-
import ChevronDownIcon from '@atlaskit/icon/utility/
|
|
5
|
+
import ChevronDownIcon from '@atlaskit/icon/utility/chevron-down';
|
|
6
|
+
import ChevronDownIconOld from '@atlaskit/icon/utility/migration/chevron-down';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
8
|
export const PopupTrigger = ({
|
|
6
9
|
triggerProps,
|
|
7
10
|
isSelected,
|
|
@@ -9,6 +12,17 @@ export const PopupTrigger = ({
|
|
|
9
12
|
selectedLabel,
|
|
10
13
|
onClick
|
|
11
14
|
}) => {
|
|
15
|
+
if (fg('platform-linking-visual-refresh-sllv')) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(NewButton, _extends({}, triggerProps, {
|
|
17
|
+
testId: 'confluence-search-modal--date-range-button',
|
|
18
|
+
onClick: onClick,
|
|
19
|
+
isSelected: isSelected,
|
|
20
|
+
iconAfter: () => /*#__PURE__*/React.createElement(ChevronDownIcon, {
|
|
21
|
+
label: "",
|
|
22
|
+
color: "currentColor"
|
|
23
|
+
})
|
|
24
|
+
}), labelPrefix, selectedLabel ? `: ${selectedLabel}` : '');
|
|
25
|
+
}
|
|
12
26
|
return /*#__PURE__*/React.createElement(Button, _extends({}, triggerProps, {
|
|
13
27
|
testId: 'confluence-search-modal--date-range-button',
|
|
14
28
|
onClick: onClick,
|
|
@@ -21,7 +35,7 @@ export const PopupTrigger = ({
|
|
|
21
35
|
display: 'flex',
|
|
22
36
|
alignItems: 'center'
|
|
23
37
|
}
|
|
24
|
-
}, /*#__PURE__*/React.createElement(
|
|
38
|
+
}, /*#__PURE__*/React.createElement(ChevronDownIconOld, {
|
|
25
39
|
LEGACY_size: "medium",
|
|
26
40
|
label: "",
|
|
27
41
|
color: "currentColor"
|
package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.compiled.css
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
._16jlkb7n{flex-grow:1}
|
|
1
|
+
._16jlkb7n{flex-grow:1}
|
|
2
|
+
._1bsb1osq{width:100%}
|
|
@@ -2,8 +2,10 @@
|
|
|
2
2
|
import "./index.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
|
+
import { useIntl } from 'react-intl-next';
|
|
5
6
|
import { useDebouncedCallback } from 'use-debounce';
|
|
6
|
-
import {
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
|
+
import { Box, Flex, Text } from '@atlaskit/primitives/compiled';
|
|
7
9
|
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
8
10
|
import { FILTER_SELECTION_DEBOUNCE_MS } from '../../common/modal/popup-select/constants';
|
|
9
11
|
import BasicFilters from '../basic-filters';
|
|
@@ -11,6 +13,7 @@ import { useBasicFilterHydration } from '../basic-filters/hooks/useBasicFilterHy
|
|
|
11
13
|
import { CLOLBasicFilters } from '../basic-filters/types';
|
|
12
14
|
import { searchMessages } from './messages';
|
|
13
15
|
const styles = {
|
|
16
|
+
basicSearchInputBoxStyles: "_1bsb1osq",
|
|
14
17
|
basicSearchInputContainerStyles: "_16jlkb7n"
|
|
15
18
|
};
|
|
16
19
|
const ConfluenceSearchContainer = ({
|
|
@@ -43,6 +46,9 @@ const ConfluenceSearchContainer = ({
|
|
|
43
46
|
to: lastModifiedTo
|
|
44
47
|
}]
|
|
45
48
|
} : {});
|
|
49
|
+
const {
|
|
50
|
+
formatMessage
|
|
51
|
+
} = useIntl();
|
|
46
52
|
const handleSearchChange = useCallback(e => {
|
|
47
53
|
const rawSearch = e.currentTarget.value;
|
|
48
54
|
setSearchBarSearchString(rawSearch);
|
|
@@ -88,7 +94,9 @@ const ConfluenceSearchContainer = ({
|
|
|
88
94
|
});
|
|
89
95
|
}
|
|
90
96
|
}, [users, status, filterSelections.lastModified]);
|
|
91
|
-
return /*#__PURE__*/React.createElement(
|
|
97
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
98
|
+
xcss: styles.basicSearchInputBoxStyles
|
|
99
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
92
100
|
alignItems: "center",
|
|
93
101
|
xcss: styles.basicSearchInputContainerStyles
|
|
94
102
|
}, /*#__PURE__*/React.createElement(BasicSearchInput, {
|
|
@@ -98,12 +106,17 @@ const ConfluenceSearchContainer = ({
|
|
|
98
106
|
onSearch: onSearch,
|
|
99
107
|
searchTerm: searchBarSearchString,
|
|
100
108
|
placeholder: searchMessages.searchLabel,
|
|
109
|
+
ariaLabel: searchMessages.searchLabel,
|
|
101
110
|
fullWidth: false
|
|
102
111
|
}), /*#__PURE__*/React.createElement(BasicFilters, {
|
|
103
112
|
cloudId: cloudId,
|
|
104
113
|
selections: filterSelections,
|
|
105
114
|
onChange: handleBasicFilterSelectionChange,
|
|
106
115
|
isHydrating: status === 'loading'
|
|
107
|
-
}))
|
|
116
|
+
})), fg('platform-linking-visual-refresh-sllv') && /*#__PURE__*/React.createElement(Text, {
|
|
117
|
+
size: "small",
|
|
118
|
+
color: "color.text.subtlest",
|
|
119
|
+
testId: "confluence-search-placeholder"
|
|
120
|
+
}, formatMessage(searchMessages.searchLabel)));
|
|
108
121
|
};
|
|
109
122
|
export default ConfluenceSearchContainer;
|
|
@@ -343,7 +343,11 @@ export const PlainConfluenceSearchConfigModal = props => {
|
|
|
343
343
|
searchCount: totalCount,
|
|
344
344
|
url: confluenceSearchUrl,
|
|
345
345
|
prefixTextType: "result",
|
|
346
|
-
testId: "confluence-search-datasource-modal-total-results-count"
|
|
346
|
+
testId: "confluence-search-datasource-modal-total-results-count",
|
|
347
|
+
styles: fg('platform-linking-visual-refresh-sllv') ? {
|
|
348
|
+
color: "var(--ds-text, #172B4D)",
|
|
349
|
+
font: "var(--ds-font-heading-xxsmall, normal 600 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)"
|
|
350
|
+
} : undefined
|
|
347
351
|
}), /*#__PURE__*/React.createElement(CancelButton, {
|
|
348
352
|
onCancel: onCancel,
|
|
349
353
|
getAnalyticsPayload: getButtonAnalyticsPayload,
|
|
@@ -2,6 +2,7 @@ import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import isEqual from 'lodash/isEqual';
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import { useDebouncedCallback } from 'use-debounce';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { FilterPopupSelect } from '../../../../common/modal/popup-select';
|
|
6
7
|
import { SEARCH_DEBOUNCE_MS } from '../../../../common/modal/popup-select/constants';
|
|
7
8
|
import { useFilterOptions } from '../../hooks/useFilterOptions';
|
|
@@ -85,7 +86,7 @@ const AsyncPopupSelect = ({
|
|
|
85
86
|
const filterName = `jlol-basic-filter-${filterType}`;
|
|
86
87
|
const shouldShowFooter = (status === 'resolved' || isLoadingMore) && filterOptionsLength > 0; // footer should not disappear when there is an inline spinner for loading more data
|
|
87
88
|
const shouldDisplayShowMoreButton = status === 'resolved' && !!pageCursor && !areAllResultsLoaded;
|
|
88
|
-
const triggerButtonLabel = formatMessage(asyncPopupSelectMessages[`${filterType}Label`]);
|
|
89
|
+
const triggerButtonLabel = formatMessage(!fg('platform-linking-visual-refresh-sllv') && filterType === 'type' ? asyncPopupSelectMessages.typeLabelOld : asyncPopupSelectMessages[`${filterType}Label`]);
|
|
89
90
|
return /*#__PURE__*/React.createElement(FilterPopupSelect, {
|
|
90
91
|
filterName: filterName,
|
|
91
92
|
status: status,
|
|
@@ -97,6 +98,7 @@ const AsyncPopupSelect = ({
|
|
|
97
98
|
selectedOptions: selectedOptions,
|
|
98
99
|
options: popupSelectOptions,
|
|
99
100
|
buttonLabel: triggerButtonLabel,
|
|
101
|
+
searchPlaceholder: fg('platform-linking-visual-refresh-sllv') ? formatMessage(asyncPopupSelectMessages[`${filterType}SearchPlaceholder`]) : undefined,
|
|
100
102
|
onInputChange: handleInputChange,
|
|
101
103
|
onSelectionChange: handleOptionSelection,
|
|
102
104
|
onMenuOpen: handleMenuOpen,
|
|
@@ -13,11 +13,36 @@ export const asyncPopupSelectMessages = defineMessages({
|
|
|
13
13
|
typeLabel: {
|
|
14
14
|
id: 'linkDataSource.basic-filter.type.label',
|
|
15
15
|
description: 'Label to be displayed for type filter dropdown button.',
|
|
16
|
+
defaultMessage: 'Work type'
|
|
17
|
+
},
|
|
18
|
+
typeLabelOld: {
|
|
19
|
+
id: 'linkDataSource.basic-filter.type.labelOld',
|
|
20
|
+
description: 'Label to be displayed for type filter dropdown button.',
|
|
16
21
|
defaultMessage: 'Type'
|
|
17
22
|
},
|
|
18
23
|
assigneeLabel: {
|
|
19
24
|
id: 'linkDataSource.basic-filter.assignee.label',
|
|
20
25
|
description: 'Label to be displayed for assignee filter dropdown button.',
|
|
21
26
|
defaultMessage: 'Assignee'
|
|
27
|
+
},
|
|
28
|
+
projectSearchPlaceholder: {
|
|
29
|
+
id: 'linkDataSource.basic-filter.project.searchPlaceholder',
|
|
30
|
+
description: 'Placeholder to be displayed for project filter dropdown search input.',
|
|
31
|
+
defaultMessage: 'Search for projects'
|
|
32
|
+
},
|
|
33
|
+
statusSearchPlaceholder: {
|
|
34
|
+
id: 'linkDataSource.basic-filter.status.searchPlaceholder',
|
|
35
|
+
description: 'Placeholder to be displayed for status filter dropdown search input.',
|
|
36
|
+
defaultMessage: 'Search for status'
|
|
37
|
+
},
|
|
38
|
+
typeSearchPlaceholder: {
|
|
39
|
+
id: 'linkDataSource.basic-filter.type.searchPlaceholder',
|
|
40
|
+
description: 'Placeholder to be displayed for work type filter dropdown search input.',
|
|
41
|
+
defaultMessage: 'Search for work type'
|
|
42
|
+
},
|
|
43
|
+
assigneeSearchPlaceholder: {
|
|
44
|
+
id: 'linkDataSource.basic-filter.assignee.searchPlaceholder',
|
|
45
|
+
description: 'Placeholder to be displayed for assignee filter dropdown search input.',
|
|
46
|
+
defaultMessage: 'Search for assignee'
|
|
22
47
|
}
|
|
23
48
|
});
|