@atlaskit/link-datasource 1.27.3 → 1.27.4
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 +6 -0
- package/dist/cjs/ui/common/modal/popup-select/constants.js +8 -0
- package/dist/cjs/ui/common/modal/popup-select/footer.js +3 -2
- package/dist/cjs/ui/common/modal/popup-select/formatOptionLabel.js +4 -5
- package/dist/cjs/ui/common/modal/popup-select/index.js +2 -1
- package/dist/cjs/ui/common/modal/popup-select/menu-list/errorMessage.js +3 -3
- package/dist/cjs/ui/common/modal/popup-select/menu-list/index.js +4 -2
- package/dist/cjs/ui/common/modal/popup-select/menu-list/loadingMessage.js +3 -2
- package/dist/cjs/ui/common/modal/popup-select/menu-list/noOptionsMessage.js +3 -3
- package/dist/cjs/ui/common/modal/popup-select/menu-list/showMoreButton.js +1 -1
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +14 -5
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +6 -5
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +3 -3
- package/dist/es2019/ui/common/modal/popup-select/constants.js +2 -0
- package/dist/es2019/ui/common/modal/popup-select/footer.js +3 -2
- package/dist/es2019/ui/common/modal/popup-select/formatOptionLabel.js +4 -5
- package/dist/es2019/ui/common/modal/popup-select/index.js +2 -1
- package/dist/es2019/ui/common/modal/popup-select/menu-list/errorMessage.js +2 -2
- package/dist/es2019/ui/common/modal/popup-select/menu-list/index.js +4 -2
- package/dist/es2019/ui/common/modal/popup-select/menu-list/loadingMessage.js +4 -2
- package/dist/es2019/ui/common/modal/popup-select/menu-list/noOptionsMessage.js +2 -2
- package/dist/es2019/ui/common/modal/popup-select/menu-list/showMoreButton.js +1 -1
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +16 -5
- package/dist/es2019/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +4 -3
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +1 -1
- package/dist/esm/ui/common/modal/popup-select/constants.js +2 -0
- package/dist/esm/ui/common/modal/popup-select/footer.js +3 -2
- package/dist/esm/ui/common/modal/popup-select/formatOptionLabel.js +4 -5
- package/dist/esm/ui/common/modal/popup-select/index.js +2 -1
- package/dist/esm/ui/common/modal/popup-select/menu-list/errorMessage.js +2 -2
- package/dist/esm/ui/common/modal/popup-select/menu-list/index.js +4 -2
- package/dist/esm/ui/common/modal/popup-select/menu-list/loadingMessage.js +3 -2
- package/dist/esm/ui/common/modal/popup-select/menu-list/noOptionsMessage.js +2 -2
- package/dist/esm/ui/common/modal/popup-select/menu-list/showMoreButton.js +1 -1
- package/dist/esm/ui/confluence-search-modal/modal/index.js +14 -5
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +4 -3
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +1 -1
- package/dist/types/ui/common/modal/popup-select/constants.d.ts +2 -0
- package/dist/types/ui/common/modal/popup-select/footer.d.ts +2 -1
- package/dist/types/ui/common/modal/popup-select/index.d.ts +5 -4
- package/dist/types/ui/common/modal/popup-select/menu-list/index.d.ts +1 -1
- package/dist/types/ui/common/modal/popup-select/menu-list/loadingMessage.d.ts +3 -1
- package/dist/types/ui/confluence-search-modal/types.d.ts +2 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.d.ts +2 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/types.d.ts +1 -20
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +2 -2
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/index.d.ts +2 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +2 -1
- package/dist/types/ui/jira-issues-modal/jira-search-container/index.d.ts +0 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/constants.d.ts +2 -0
- package/dist/types-ts4.5/ui/common/modal/popup-select/footer.d.ts +2 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/index.d.ts +5 -4
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/common/modal/popup-select/menu-list/loadingMessage.d.ts +3 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/types.d.ts +2 -0
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/hooks/useFilterOptions.d.ts +2 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/types.d.ts +1 -20
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +2 -2
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/index.d.ts +2 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/utils/transformers.d.ts +2 -1
- package/dist/types-ts4.5/ui/jira-issues-modal/jira-search-container/index.d.ts +0 -1
- package/package.json +5 -5
|
@@ -29,14 +29,14 @@ var IconOptionLabel = function IconOptionLabel(_ref) {
|
|
|
29
29
|
};
|
|
30
30
|
return /*#__PURE__*/React.createElement(AvatarOptionLabel, {
|
|
31
31
|
data: avatarOptionLabelData,
|
|
32
|
-
testId: "
|
|
32
|
+
testId: "basic-filter-popup-select-option--icon-label"
|
|
33
33
|
});
|
|
34
34
|
};
|
|
35
35
|
var LozengeOptionLabel = function LozengeOptionLabel(_ref2) {
|
|
36
36
|
var data = _ref2.data;
|
|
37
37
|
return /*#__PURE__*/React.createElement(Lozenge, {
|
|
38
38
|
appearance: data.appearance,
|
|
39
|
-
testId: "
|
|
39
|
+
testId: "basic-filter-popup-select-option--lozenge"
|
|
40
40
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
41
41
|
xcss: [commonLabelStyles]
|
|
42
42
|
}, data.label));
|
|
@@ -46,7 +46,7 @@ var AvatarOptionLabel = function AvatarOptionLabel(_ref3) {
|
|
|
46
46
|
testId = _ref3.testId;
|
|
47
47
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
48
48
|
alignItems: "center",
|
|
49
|
-
testId: testId || '
|
|
49
|
+
testId: testId || 'basic-filter-popup-select-option--avatar'
|
|
50
50
|
}, data.isGroup ? /*#__PURE__*/React.createElement(Flex, {
|
|
51
51
|
alignItems: "center",
|
|
52
52
|
justifyContent: "center",
|
|
@@ -59,8 +59,7 @@ var AvatarOptionLabel = function AvatarOptionLabel(_ref3) {
|
|
|
59
59
|
src: data.avatar,
|
|
60
60
|
size: "xsmall"
|
|
61
61
|
}), /*#__PURE__*/React.createElement(Box, {
|
|
62
|
-
xcss: [commonLabelStyles, avatarOptionLabelStyles]
|
|
63
|
-
testId: "nidhin"
|
|
62
|
+
xcss: [commonLabelStyles, avatarOptionLabelStyles]
|
|
64
63
|
}, data.label));
|
|
65
64
|
};
|
|
66
65
|
var formatOptionLabel = function formatOptionLabel(data) {
|
|
@@ -205,7 +205,8 @@ export var FilterPopupSelect = function FilterPopupSelect(_ref) {
|
|
|
205
205
|
},
|
|
206
206
|
footer: shouldShowFooter && /*#__PURE__*/React.createElement(PopupFooter, {
|
|
207
207
|
currentDisplayCount: options.length,
|
|
208
|
-
totalCount: totalCount
|
|
208
|
+
totalCount: totalCount,
|
|
209
|
+
filterName: filterName
|
|
209
210
|
})
|
|
210
211
|
});
|
|
211
212
|
};
|
|
@@ -4,7 +4,7 @@ import { useDebouncedCallback } from 'use-debounce';
|
|
|
4
4
|
import ErrorIcon from '@atlaskit/icon/glyph/error';
|
|
5
5
|
import { N500 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { useDatasourceAnalyticsEvents } from '../../../../../analytics';
|
|
7
|
-
import { SEARCH_DEBOUNCE_MS } from '
|
|
7
|
+
import { SEARCH_DEBOUNCE_MS } from '../constants';
|
|
8
8
|
import { asyncPopupSelectMessages } from './messages';
|
|
9
9
|
import CustomSelectMessage from './selectMessage';
|
|
10
10
|
var getErrorReasonType = function getErrorReasonType(errors) {
|
|
@@ -45,7 +45,7 @@ var CustomErrorMessage = function CustomErrorMessage(_ref3) {
|
|
|
45
45
|
size: "xlarge"
|
|
46
46
|
}),
|
|
47
47
|
message: asyncPopupSelectMessages.errorMessage,
|
|
48
|
-
testId: "
|
|
48
|
+
testId: "".concat(filterName, "--error-message")
|
|
49
49
|
});
|
|
50
50
|
};
|
|
51
51
|
export default CustomErrorMessage;
|
|
@@ -39,7 +39,9 @@ var CustomMenuList = function CustomMenuList(_ref) {
|
|
|
39
39
|
};
|
|
40
40
|
var renderChildren = function renderChildren() {
|
|
41
41
|
if (isLoading) {
|
|
42
|
-
return /*#__PURE__*/React.createElement(CustomDropdownLoadingMessage,
|
|
42
|
+
return /*#__PURE__*/React.createElement(CustomDropdownLoadingMessage, {
|
|
43
|
+
filterName: filterName
|
|
44
|
+
});
|
|
43
45
|
}
|
|
44
46
|
if (isError) {
|
|
45
47
|
return /*#__PURE__*/React.createElement(CustomErrorMessage, {
|
|
@@ -52,7 +54,7 @@ var CustomMenuList = function CustomMenuList(_ref) {
|
|
|
52
54
|
filterName: filterName
|
|
53
55
|
});
|
|
54
56
|
}
|
|
55
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, children, shouldDisplayShowMore && /*#__PURE__*/React.createElement(Box, {
|
|
57
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, children, shouldDisplayShowMore && handleShowMore && /*#__PURE__*/React.createElement(Box, {
|
|
56
58
|
xcss: showMoreButtonBoxStyles
|
|
57
59
|
}, /*#__PURE__*/React.createElement(ShowMoreButton, {
|
|
58
60
|
onShowMore: handleShowMore,
|
|
@@ -2,13 +2,14 @@ import React from 'react';
|
|
|
2
2
|
import Spinner from '@atlaskit/spinner';
|
|
3
3
|
import { asyncPopupSelectMessages } from './messages';
|
|
4
4
|
import CustomSelectMessage from './selectMessage';
|
|
5
|
-
var CustomDropdownLoadingMessage = function CustomDropdownLoadingMessage() {
|
|
5
|
+
var CustomDropdownLoadingMessage = function CustomDropdownLoadingMessage(_ref) {
|
|
6
|
+
var filterName = _ref.filterName;
|
|
6
7
|
return /*#__PURE__*/React.createElement(CustomSelectMessage, {
|
|
7
8
|
icon: /*#__PURE__*/React.createElement(Spinner, {
|
|
8
9
|
size: "large"
|
|
9
10
|
}),
|
|
10
11
|
message: asyncPopupSelectMessages.loadingMessage,
|
|
11
|
-
testId: "
|
|
12
|
+
testId: "".concat(filterName, "--loading-message")
|
|
12
13
|
});
|
|
13
14
|
};
|
|
14
15
|
export default CustomDropdownLoadingMessage;
|
|
@@ -4,7 +4,7 @@ import { useDebouncedCallback } from 'use-debounce';
|
|
|
4
4
|
import QuestionCircleIcon from '@atlaskit/icon/glyph/question-circle';
|
|
5
5
|
import { N500 } from '@atlaskit/theme/colors';
|
|
6
6
|
import { useDatasourceAnalyticsEvents } from '../../../../../analytics';
|
|
7
|
-
import { SEARCH_DEBOUNCE_MS } from '
|
|
7
|
+
import { SEARCH_DEBOUNCE_MS } from '../constants';
|
|
8
8
|
import { asyncPopupSelectMessages } from './messages';
|
|
9
9
|
import CustomSelectMessage from './selectMessage';
|
|
10
10
|
var CustomNoOptionsMessage = function CustomNoOptionsMessage(_ref) {
|
|
@@ -33,7 +33,7 @@ var CustomNoOptionsMessage = function CustomNoOptionsMessage(_ref) {
|
|
|
33
33
|
label: ""
|
|
34
34
|
}),
|
|
35
35
|
message: asyncPopupSelectMessages.noOptionsMessage,
|
|
36
|
-
testId: "
|
|
36
|
+
testId: "".concat(filterName, "--no-options-message")
|
|
37
37
|
});
|
|
38
38
|
};
|
|
39
39
|
export default CustomNoOptionsMessage;
|
|
@@ -20,7 +20,7 @@ var ShowMoreButton = function ShowMoreButton(_ref) {
|
|
|
20
20
|
return /*#__PURE__*/React.createElement(Button, {
|
|
21
21
|
onClick: handleShowMore,
|
|
22
22
|
appearance: "link",
|
|
23
|
-
testId: "
|
|
23
|
+
testId: "".concat(filterName, "--show-more-button")
|
|
24
24
|
}, formatMessage(asyncPopupSelectMessages.showMoreMessage));
|
|
25
25
|
};
|
|
26
26
|
export default ShowMoreButton;
|
|
@@ -75,7 +75,10 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
75
75
|
viewMode = _props$viewMode === void 0 ? 'table' : _props$viewMode,
|
|
76
76
|
initialParameters = props.parameters,
|
|
77
77
|
urlBeingEdited = props.url,
|
|
78
|
-
initialVisibleColumnKeys = props.visibleColumnKeys
|
|
78
|
+
initialVisibleColumnKeys = props.visibleColumnKeys,
|
|
79
|
+
_props$disableDisplay = props.disableDisplayDropdown,
|
|
80
|
+
disableDisplayDropdown = _props$disableDisplay === void 0 ? false : _props$disableDisplay,
|
|
81
|
+
overrideParameters = props.overrideParameters;
|
|
79
82
|
var _useState = useState(undefined),
|
|
80
83
|
_useState2 = _slicedToArray(_useState, 2),
|
|
81
84
|
availableSites = _useState2[0],
|
|
@@ -115,9 +118,15 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
115
118
|
return v !== undefined;
|
|
116
119
|
}).length > 1;
|
|
117
120
|
}, [cloudId, parameters]);
|
|
121
|
+
var parametersToSend = useMemo(function () {
|
|
122
|
+
if (!isParametersSet) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
return _objectSpread(_objectSpread({}, parameters), overrideParameters !== null && overrideParameters !== void 0 ? overrideParameters : {});
|
|
126
|
+
}, [parameters, overrideParameters, isParametersSet]);
|
|
118
127
|
var _useDatasourceTableSt = useDatasourceTableState({
|
|
119
128
|
datasourceId: datasourceId,
|
|
120
|
-
parameters:
|
|
129
|
+
parameters: parametersToSend,
|
|
121
130
|
fieldKeys: visibleColumnKeys
|
|
122
131
|
}),
|
|
123
132
|
reset = _useDatasourceTableSt.reset,
|
|
@@ -372,7 +381,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
372
381
|
} else {
|
|
373
382
|
onInsert(buildDatasourceAdf({
|
|
374
383
|
id: datasourceId,
|
|
375
|
-
parameters: _objectSpread(_objectSpread({},
|
|
384
|
+
parameters: _objectSpread(_objectSpread({}, parametersToSend), {}, {
|
|
376
385
|
cloudId: cloudId
|
|
377
386
|
}),
|
|
378
387
|
views: [{
|
|
@@ -393,7 +402,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
393
402
|
}]
|
|
394
403
|
}, confluenceSearchUrl), consumerEvent);
|
|
395
404
|
}
|
|
396
|
-
}, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId,
|
|
405
|
+
}, [isParametersSet, cloudId, analyticsPayload, totalCount, currentViewMode, onInsert, confluenceSearchUrl, datasourceId, parametersToSend, visibleColumnKeys, columnCustomSizes, wrappedColumnKeys]);
|
|
397
406
|
var handleViewModeChange = function handleViewModeChange(selectedMode) {
|
|
398
407
|
userInteractionActions.current.add(DatasourceAction.DISPLAY_VIEW_CHANGED);
|
|
399
408
|
setCurrentViewMode(selectedMode);
|
|
@@ -429,7 +438,7 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
429
438
|
selectedSite: selectedConfluenceSite,
|
|
430
439
|
testId: "confluence-search-datasource-modal--site-selector",
|
|
431
440
|
label: siteSelectorLabel
|
|
432
|
-
})), !hasNoConfluenceSites && jsx(DisplayViewDropDown, {
|
|
441
|
+
})), !hasNoConfluenceSites && !disableDisplayDropdown && jsx(DisplayViewDropDown, {
|
|
433
442
|
onViewModeChange: handleViewModeChange,
|
|
434
443
|
viewMode: currentViewMode
|
|
435
444
|
})), jsx(ModalBody, null, !hasNoConfluenceSites ? jsx(Fragment, null, jsx(Box, {
|
|
@@ -6,9 +6,9 @@ import isEqual from 'lodash/isEqual';
|
|
|
6
6
|
import { useIntl } from 'react-intl-next';
|
|
7
7
|
import { useDebouncedCallback } from 'use-debounce';
|
|
8
8
|
import { FilterPopupSelect } from '../../../../common/modal/popup-select';
|
|
9
|
+
import { SEARCH_DEBOUNCE_MS } from '../../../../common/modal/popup-select/constants';
|
|
9
10
|
import { useFilterOptions } from '../../hooks/useFilterOptions';
|
|
10
11
|
import { asyncPopupSelectMessages } from './messages';
|
|
11
|
-
export var SEARCH_DEBOUNCE_MS = 350;
|
|
12
12
|
var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
13
13
|
var filterType = _ref.filterType,
|
|
14
14
|
site = _ref.site,
|
|
@@ -104,11 +104,12 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
104
104
|
var isEmpty = status === 'resolved' && filterOptionsLength === 0;
|
|
105
105
|
var popupSelectOptions = isLoading || isError ? [] : filterOptions; // if not set to [], then on loading, no loading UI will be shown
|
|
106
106
|
var areAllResultsLoaded = filterOptionsLength === totalCount;
|
|
107
|
+
var filterName = "jlol-basic-filter-".concat(filterType);
|
|
107
108
|
var shouldShowFooter = (status === 'resolved' || isLoadingMore) && filterOptionsLength > 0; // footer should not disappear when there is an inline spinner for loading more data
|
|
108
109
|
var shouldDisplayShowMoreButton = status === 'resolved' && !!pageCursor && !areAllResultsLoaded;
|
|
109
110
|
var triggerButtonLabel = formatMessage(asyncPopupSelectMessages["".concat(filterType, "Label")]);
|
|
110
111
|
return /*#__PURE__*/React.createElement(FilterPopupSelect, {
|
|
111
|
-
filterName:
|
|
112
|
+
filterName: filterName,
|
|
112
113
|
status: status,
|
|
113
114
|
showLoading: isLoading,
|
|
114
115
|
showHydrating: isJQLHydrating,
|
|
@@ -122,7 +123,7 @@ var AsyncPopupSelect = function AsyncPopupSelect(_ref) {
|
|
|
122
123
|
onSelectionChange: handleOptionSelection,
|
|
123
124
|
onMenuOpen: handleMenuOpen,
|
|
124
125
|
menuListProps: {
|
|
125
|
-
filterName:
|
|
126
|
+
filterName: filterName,
|
|
126
127
|
isError: isError,
|
|
127
128
|
isEmpty: isEmpty,
|
|
128
129
|
isLoading: isLoading,
|
|
@@ -14,6 +14,7 @@ import { Flex, xcss } from '@atlaskit/primitives';
|
|
|
14
14
|
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
15
15
|
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
16
16
|
import { basicSearchInputMessages } from '../../common/modal/basic-search-input/messages';
|
|
17
|
+
import { FILTER_SELECTION_DEBOUNCE_MS } from '../../common/modal/popup-select/constants';
|
|
17
18
|
import { BasicFilters } from '../basic-filters';
|
|
18
19
|
import { useHydrateJqlQuery } from '../basic-filters/hooks/useHydrateJqlQuery';
|
|
19
20
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
@@ -31,7 +32,6 @@ var basicSearchInputContainerStyles = xcss({
|
|
|
31
32
|
});
|
|
32
33
|
export var DEFAULT_JQL_QUERY = 'ORDER BY created DESC';
|
|
33
34
|
export var ALLOWED_ORDER_BY_KEYS = ['key', 'summary', 'assignee', 'status', 'created'];
|
|
34
|
-
export var FILTER_SELECTION_DEBOUNCE_MS = 500;
|
|
35
35
|
export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
36
36
|
var isSearching = props.isSearching,
|
|
37
37
|
parameters = props.parameters,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export interface PopupFooterProps {
|
|
3
3
|
currentDisplayCount: number;
|
|
4
4
|
totalCount: number;
|
|
5
|
+
filterName: string;
|
|
5
6
|
}
|
|
6
|
-
declare const PopupFooter: ({ currentDisplayCount, totalCount }: PopupFooterProps) => JSX.Element;
|
|
7
|
+
declare const PopupFooter: ({ currentDisplayCount, totalCount, filterName, }: PopupFooterProps) => JSX.Element;
|
|
7
8
|
export default PopupFooter;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { InputActionMeta, ValueType } from '@atlaskit/select';
|
|
3
3
|
import { CustomMenuListProps } from './menu-list';
|
|
4
4
|
import { SelectOption } from './types';
|
|
5
|
-
export
|
|
5
|
+
export interface FilterPopupSelectProps {
|
|
6
6
|
buttonLabel: string;
|
|
7
7
|
totalCount: number;
|
|
8
8
|
filterName: string;
|
|
@@ -16,6 +16,7 @@ export declare const FilterPopupSelect: ({ filterName, totalCount, status, butto
|
|
|
16
16
|
selectedOptions: ValueType<SelectOption, true>;
|
|
17
17
|
onSelectionChange: (newValue: ValueType<SelectOption, true>) => void;
|
|
18
18
|
onInputChange: (newValue: string, actionMeta: InputActionMeta) => void;
|
|
19
|
-
onMenuOpen?: (
|
|
20
|
-
onMenuClose?: (
|
|
21
|
-
}
|
|
19
|
+
onMenuOpen?: () => void;
|
|
20
|
+
onMenuClose?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const FilterPopupSelect: ({ filterName, totalCount, status, buttonLabel, showLoading, isDisabled, showHydrating, shouldShowFooter, menuListProps, options, selectedOptions, onSelectionChange, onInputChange, onMenuClose, onMenuOpen, }: FilterPopupSelectProps) => JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
2
|
import { ConfigModalProps } from '../../common/types';
|
|
3
3
|
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<InlineCardAdf | ConfluenceSearchDatasourceAdf, ConfluenceSearchDatasourceParameters> {
|
|
4
|
+
disableDisplayDropdown?: boolean;
|
|
5
|
+
overrideParameters?: Pick<ConfluenceSearchDatasourceParameters, 'entityTypes'>;
|
|
4
6
|
}
|
|
5
7
|
export type ConfluenceSearchDatasourceParameters = {
|
|
6
8
|
cloudId: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { Site } from '../../../../common/types';
|
|
3
|
-
import { AvatarLabelOption,
|
|
3
|
+
import { AvatarLabelOption, SelectOption } from '../../../common/modal/popup-select/types';
|
|
4
|
+
import { BasicFilterFieldType } from '../types';
|
|
4
5
|
interface FilterOptionsProps {
|
|
5
6
|
filterType: BasicFilterFieldType;
|
|
6
7
|
site?: Site;
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
+
import { SelectOption } from '../../common/modal/popup-select/types';
|
|
1
2
|
export type BasicFilterFieldType = 'project' | 'assignee' | 'type' | 'status';
|
|
2
|
-
export interface OptionBase {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
}
|
|
6
|
-
export type IconLabelOption = OptionBase & {
|
|
7
|
-
optionType: 'iconLabel';
|
|
8
|
-
icon: string;
|
|
9
|
-
};
|
|
10
|
-
export type LozengeLabelOption = OptionBase & {
|
|
11
|
-
optionType: 'lozengeLabel';
|
|
12
|
-
appearance?: LozengeAppearance;
|
|
13
|
-
};
|
|
14
|
-
export type LozengeAppearance = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
15
|
-
export type AvatarLabelOption = OptionBase & {
|
|
16
|
-
optionType: 'avatarLabel';
|
|
17
|
-
avatar?: string;
|
|
18
|
-
isSquare?: boolean;
|
|
19
|
-
isGroup?: boolean;
|
|
20
|
-
};
|
|
21
|
-
export type SelectOption = IconLabelOption | LozengeLabelOption | AvatarLabelOption;
|
|
22
3
|
export type SelectedOptionsMap = {
|
|
23
4
|
[key in BasicFilterFieldType]?: SelectOption[];
|
|
24
5
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Site } from '../../../../../common/types';
|
|
3
|
-
import {
|
|
3
|
+
import { SelectOption } from '../../../../common/modal/popup-select/types';
|
|
4
|
+
import { BasicFilterFieldType } from '../../types';
|
|
4
5
|
export interface AsyncPopupSelectProps {
|
|
5
6
|
filterType: BasicFilterFieldType;
|
|
6
7
|
selection: SelectOption[];
|
|
@@ -9,6 +10,5 @@ export interface AsyncPopupSelectProps {
|
|
|
9
10
|
isDisabled?: boolean;
|
|
10
11
|
site?: Site;
|
|
11
12
|
}
|
|
12
|
-
export declare const SEARCH_DEBOUNCE_MS = 350;
|
|
13
13
|
declare const AsyncPopupSelect: ({ filterType, site, selection, isJQLHydrating, onSelectionChange, isDisabled, }: AsyncPopupSelectProps) => JSX.Element;
|
|
14
14
|
export default AsyncPopupSelect;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Site } from '../../../../common/types';
|
|
3
|
-
import
|
|
3
|
+
import { SelectOption } from '../../../common/modal/popup-select/types';
|
|
4
|
+
import type { BasicFilterFieldType, SelectedOptionsMap } from '../types';
|
|
4
5
|
export declare const availableBasicFilterTypes: BasicFilterFieldType[];
|
|
5
6
|
export interface BasicFilterContainerProps {
|
|
6
7
|
jql: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SelectOption } from '../../../common/modal/popup-select/types';
|
|
2
|
+
import { FieldValuesResponse, HydrateResponse, SelectedOptionsMap } from '../types';
|
|
2
3
|
export declare function mapHydrateResponseData({ data }: HydrateResponse): SelectedOptionsMap;
|
|
3
4
|
export declare function mapFieldValuesToFilterOptions({ data, siteUrl, }: FieldValuesResponse & {
|
|
4
5
|
siteUrl?: string;
|
|
@@ -4,7 +4,6 @@ import { SelectedOptionsMap } from '../basic-filters/types';
|
|
|
4
4
|
import { JiraIssueDatasourceParameters, JiraIssueDatasourceParametersQuery } from '../types';
|
|
5
5
|
export declare const DEFAULT_JQL_QUERY = "ORDER BY created DESC";
|
|
6
6
|
export declare const ALLOWED_ORDER_BY_KEYS: string[];
|
|
7
|
-
export declare const FILTER_SELECTION_DEBOUNCE_MS = 500;
|
|
8
7
|
export interface SearchContainerProps {
|
|
9
8
|
isSearching?: boolean;
|
|
10
9
|
onSearch: (query: JiraIssueDatasourceParametersQuery, { searchMethod, basicFilterSelections, }: {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export interface PopupFooterProps {
|
|
3
3
|
currentDisplayCount: number;
|
|
4
4
|
totalCount: number;
|
|
5
|
+
filterName: string;
|
|
5
6
|
}
|
|
6
|
-
declare const PopupFooter: ({ currentDisplayCount, totalCount }: PopupFooterProps) => JSX.Element;
|
|
7
|
+
declare const PopupFooter: ({ currentDisplayCount, totalCount, filterName, }: PopupFooterProps) => JSX.Element;
|
|
7
8
|
export default PopupFooter;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { InputActionMeta, ValueType } from '@atlaskit/select';
|
|
3
3
|
import { CustomMenuListProps } from './menu-list';
|
|
4
4
|
import { SelectOption } from './types';
|
|
5
|
-
export
|
|
5
|
+
export interface FilterPopupSelectProps {
|
|
6
6
|
buttonLabel: string;
|
|
7
7
|
totalCount: number;
|
|
8
8
|
filterName: string;
|
|
@@ -16,6 +16,7 @@ export declare const FilterPopupSelect: ({ filterName, totalCount, status, butto
|
|
|
16
16
|
selectedOptions: ValueType<SelectOption, true>;
|
|
17
17
|
onSelectionChange: (newValue: ValueType<SelectOption, true>) => void;
|
|
18
18
|
onInputChange: (newValue: string, actionMeta: InputActionMeta) => void;
|
|
19
|
-
onMenuOpen?: (
|
|
20
|
-
onMenuClose?: (
|
|
21
|
-
}
|
|
19
|
+
onMenuOpen?: () => void;
|
|
20
|
+
onMenuClose?: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const FilterPopupSelect: ({ filterName, totalCount, status, buttonLabel, showLoading, isDisabled, showHydrating, shouldShowFooter, menuListProps, options, selectedOptions, onSelectionChange, onInputChange, onMenuClose, onMenuOpen, }: FilterPopupSelectProps) => JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { DatasourceAdf, InlineCardAdf } from '@atlaskit/linking-common/types';
|
|
2
2
|
import { ConfigModalProps } from '../../common/types';
|
|
3
3
|
export interface ConfluenceSearchConfigModalProps extends ConfigModalProps<InlineCardAdf | ConfluenceSearchDatasourceAdf, ConfluenceSearchDatasourceParameters> {
|
|
4
|
+
disableDisplayDropdown?: boolean;
|
|
5
|
+
overrideParameters?: Pick<ConfluenceSearchDatasourceParameters, 'entityTypes'>;
|
|
4
6
|
}
|
|
5
7
|
export type ConfluenceSearchDatasourceParameters = {
|
|
6
8
|
cloudId: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { IntlShape } from 'react-intl-next';
|
|
2
2
|
import type { Site } from '../../../../common/types';
|
|
3
|
-
import { AvatarLabelOption,
|
|
3
|
+
import { AvatarLabelOption, SelectOption } from '../../../common/modal/popup-select/types';
|
|
4
|
+
import { BasicFilterFieldType } from '../types';
|
|
4
5
|
interface FilterOptionsProps {
|
|
5
6
|
filterType: BasicFilterFieldType;
|
|
6
7
|
site?: Site;
|
|
@@ -1,24 +1,5 @@
|
|
|
1
|
+
import { SelectOption } from '../../common/modal/popup-select/types';
|
|
1
2
|
export type BasicFilterFieldType = 'project' | 'assignee' | 'type' | 'status';
|
|
2
|
-
export interface OptionBase {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
}
|
|
6
|
-
export type IconLabelOption = OptionBase & {
|
|
7
|
-
optionType: 'iconLabel';
|
|
8
|
-
icon: string;
|
|
9
|
-
};
|
|
10
|
-
export type LozengeLabelOption = OptionBase & {
|
|
11
|
-
optionType: 'lozengeLabel';
|
|
12
|
-
appearance?: LozengeAppearance;
|
|
13
|
-
};
|
|
14
|
-
export type LozengeAppearance = 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
|
|
15
|
-
export type AvatarLabelOption = OptionBase & {
|
|
16
|
-
optionType: 'avatarLabel';
|
|
17
|
-
avatar?: string;
|
|
18
|
-
isSquare?: boolean;
|
|
19
|
-
isGroup?: boolean;
|
|
20
|
-
};
|
|
21
|
-
export type SelectOption = IconLabelOption | LozengeLabelOption | AvatarLabelOption;
|
|
22
3
|
export type SelectedOptionsMap = {
|
|
23
4
|
[key in BasicFilterFieldType]?: SelectOption[];
|
|
24
5
|
};
|
package/dist/types-ts4.5/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Site } from '../../../../../common/types';
|
|
3
|
-
import {
|
|
3
|
+
import { SelectOption } from '../../../../common/modal/popup-select/types';
|
|
4
|
+
import { BasicFilterFieldType } from '../../types';
|
|
4
5
|
export interface AsyncPopupSelectProps {
|
|
5
6
|
filterType: BasicFilterFieldType;
|
|
6
7
|
selection: SelectOption[];
|
|
@@ -9,6 +10,5 @@ export interface AsyncPopupSelectProps {
|
|
|
9
10
|
isDisabled?: boolean;
|
|
10
11
|
site?: Site;
|
|
11
12
|
}
|
|
12
|
-
export declare const SEARCH_DEBOUNCE_MS = 350;
|
|
13
13
|
declare const AsyncPopupSelect: ({ filterType, site, selection, isJQLHydrating, onSelectionChange, isDisabled, }: AsyncPopupSelectProps) => JSX.Element;
|
|
14
14
|
export default AsyncPopupSelect;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { Site } from '../../../../common/types';
|
|
3
|
-
import
|
|
3
|
+
import { SelectOption } from '../../../common/modal/popup-select/types';
|
|
4
|
+
import type { BasicFilterFieldType, SelectedOptionsMap } from '../types';
|
|
4
5
|
export declare const availableBasicFilterTypes: BasicFilterFieldType[];
|
|
5
6
|
export interface BasicFilterContainerProps {
|
|
6
7
|
jql: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SelectOption } from '../../../common/modal/popup-select/types';
|
|
2
|
+
import { FieldValuesResponse, HydrateResponse, SelectedOptionsMap } from '../types';
|
|
2
3
|
export declare function mapHydrateResponseData({ data }: HydrateResponse): SelectedOptionsMap;
|
|
3
4
|
export declare function mapFieldValuesToFilterOptions({ data, siteUrl, }: FieldValuesResponse & {
|
|
4
5
|
siteUrl?: string;
|
|
@@ -4,7 +4,6 @@ import { SelectedOptionsMap } from '../basic-filters/types';
|
|
|
4
4
|
import { JiraIssueDatasourceParameters, JiraIssueDatasourceParametersQuery } from '../types';
|
|
5
5
|
export declare const DEFAULT_JQL_QUERY = "ORDER BY created DESC";
|
|
6
6
|
export declare const ALLOWED_ORDER_BY_KEYS: string[];
|
|
7
|
-
export declare const FILTER_SELECTION_DEBOUNCE_MS = 500;
|
|
8
7
|
export interface SearchContainerProps {
|
|
9
8
|
isSearching?: boolean;
|
|
10
9
|
onSearch: (query: JiraIssueDatasourceParametersQuery, { searchMethod, basicFilterSelections, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.4",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
38
38
|
"@atlaskit/badge": "^16.0.0",
|
|
39
39
|
"@atlaskit/button": "^17.12.0",
|
|
40
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
40
|
+
"@atlaskit/dropdown-menu": "^12.9.0",
|
|
41
41
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
42
|
-
"@atlaskit/empty-state": "^7.
|
|
42
|
+
"@atlaskit/empty-state": "^7.8.0",
|
|
43
43
|
"@atlaskit/form": "^9.2.0",
|
|
44
44
|
"@atlaskit/heading": "^2.1.0",
|
|
45
45
|
"@atlaskit/icon": "^22.1.0",
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
"@atlaskit/image": "^1.1.0",
|
|
48
48
|
"@atlaskit/intl-messages-provider": "^1.0.0",
|
|
49
49
|
"@atlaskit/jql-ast": "^3.2.0",
|
|
50
|
-
"@atlaskit/jql-editor": "^4.
|
|
50
|
+
"@atlaskit/jql-editor": "^4.1.0",
|
|
51
51
|
"@atlaskit/jql-editor-autocomplete-rest": "^2.0.0",
|
|
52
52
|
"@atlaskit/link-client-extension": "^1.8.0",
|
|
53
53
|
"@atlaskit/linking-common": "^5.6.0",
|
|
54
54
|
"@atlaskit/linking-types": "^8.8.0",
|
|
55
55
|
"@atlaskit/lozenge": "^11.6.0",
|
|
56
|
-
"@atlaskit/modal-dialog": "^12.
|
|
56
|
+
"@atlaskit/modal-dialog": "^12.11.0",
|
|
57
57
|
"@atlaskit/outbound-auth-flow-client": "^3.4.5",
|
|
58
58
|
"@atlaskit/platform-feature-flags": "^0.2.4",
|
|
59
59
|
"@atlaskit/pragmatic-drag-and-drop": "^1.1.0",
|