@atlaskit/link-datasource 7.12.3 → 7.13.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 +59 -0
- package/dist/cjs/ui/common/modal/basic-search-input/index.js +8 -3
- package/dist/cjs/ui/common/modal/mode-switcher/ModeSwitcher.compiled.css +1 -0
- package/dist/cjs/ui/common/modal/mode-switcher/ModeSwitcher.js +3 -1
- package/dist/cjs/ui/common/modal/popup-select/index.js +34 -5
- package/dist/cjs/ui/common/modal/popup-select/useInlinePopupLayout.js +123 -0
- package/dist/cjs/ui/datasource-table-view/datasourceTableView.js +9 -3
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +4 -1
- package/dist/cjs/ui/jira-issues-modal/basic-filters/ui/index.js +5 -1
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/JiraSearchContainerWithWrappers.js +19 -0
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/buildJQL.js +12 -2
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/embedded.compiled.css +11 -0
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/embedded.js +321 -0
- package/dist/cjs/ui/jira-issues-modal/jira-search-container/index.js +12 -0
- package/dist/cjs/ui/jira-issues-modal/jql-editor/index.js +9 -1
- package/dist/cjs/ui/jira-search-state/index.compiled.css +12 -0
- package/dist/cjs/ui/jira-search-state/index.js +90 -0
- package/dist/es2019/ui/common/modal/basic-search-input/index.js +5 -2
- package/dist/es2019/ui/common/modal/mode-switcher/ModeSwitcher.compiled.css +1 -0
- package/dist/es2019/ui/common/modal/mode-switcher/ModeSwitcher.js +3 -1
- package/dist/es2019/ui/common/modal/popup-select/index.js +34 -4
- package/dist/es2019/ui/common/modal/popup-select/useInlinePopupLayout.js +103 -0
- package/dist/es2019/ui/datasource-table-view/datasourceTableView.js +8 -3
- 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/index.js +4 -1
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/JiraSearchContainerWithWrappers.js +11 -0
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/buildJQL.js +10 -2
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/embedded.compiled.css +11 -0
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/embedded.js +283 -0
- package/dist/es2019/ui/jira-issues-modal/jira-search-container/index.js +12 -0
- package/dist/es2019/ui/jira-issues-modal/jql-editor/index.js +7 -1
- package/dist/es2019/ui/jira-search-state/index.compiled.css +12 -0
- package/dist/es2019/ui/jira-search-state/index.js +82 -0
- package/dist/esm/ui/common/modal/basic-search-input/index.js +8 -3
- package/dist/esm/ui/common/modal/mode-switcher/ModeSwitcher.compiled.css +1 -0
- package/dist/esm/ui/common/modal/mode-switcher/ModeSwitcher.js +3 -1
- package/dist/esm/ui/common/modal/popup-select/index.js +35 -5
- package/dist/esm/ui/common/modal/popup-select/useInlinePopupLayout.js +116 -0
- package/dist/esm/ui/datasource-table-view/datasourceTableView.js +9 -3
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.js +4 -1
- package/dist/esm/ui/jira-issues-modal/basic-filters/ui/index.js +5 -1
- package/dist/esm/ui/jira-issues-modal/jira-search-container/JiraSearchContainerWithWrappers.js +13 -0
- package/dist/esm/ui/jira-issues-modal/jira-search-container/buildJQL.js +12 -2
- package/dist/esm/ui/jira-issues-modal/jira-search-container/embedded.compiled.css +11 -0
- package/dist/esm/ui/jira-issues-modal/jira-search-container/embedded.js +312 -0
- package/dist/esm/ui/jira-issues-modal/jira-search-container/index.js +12 -0
- package/dist/esm/ui/jira-issues-modal/jql-editor/index.js +9 -1
- package/dist/esm/ui/jira-search-state/index.compiled.css +12 -0
- package/dist/esm/ui/jira-search-state/index.js +83 -0
- package/dist/types/ui/common/modal/basic-search-input/index.d.ts +5 -1
- package/dist/types/ui/common/modal/mode-switcher/ModeSwitcher.d.ts +1 -0
- package/dist/types/ui/common/modal/popup-select/index.d.ts +2 -1
- package/dist/types/ui/common/modal/popup-select/useInlinePopupLayout.d.ts +9 -0
- package/dist/types/ui/datasource-table-view/datasourceTableView.d.ts +5 -1
- package/dist/types/ui/datasource-table-view/types.d.ts +5 -0
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/async-popup-select/index.d.ts +2 -1
- package/dist/types/ui/jira-issues-modal/basic-filters/ui/index.d.ts +2 -1
- package/dist/types/ui/jira-issues-modal/jira-search-container/JiraSearchContainerWithWrappers.d.ts +4 -0
- package/dist/types/ui/jira-issues-modal/jira-search-container/buildJQL.d.ts +1 -0
- package/dist/types/ui/jira-issues-modal/jira-search-container/embedded.d.ts +9 -0
- package/dist/types/ui/jira-issues-modal/jira-search-container/index.d.ts +11 -0
- package/dist/types/ui/jira-issues-modal/jql-editor/index.d.ts +4 -1
- package/dist/types/ui/jira-search-state/index.d.ts +9 -0
- package/jira-search-container/package.json +10 -0
- package/jira-search-state/package.json +10 -0
- package/package.json +3 -3
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
/* embedded.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
var _excluded = ["basicInputTextValue"];
|
|
6
|
+
import "./embedded.compiled.css";
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
11
|
+
import { useIntl } from 'react-intl';
|
|
12
|
+
import { useDebouncedCallback } from 'use-debounce';
|
|
13
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
14
|
+
import { Flex } from '@atlaskit/primitives/compiled/flex';
|
|
15
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
16
|
+
import { useDatasourceAnalyticsEvents } from '../../../analytics';
|
|
17
|
+
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
18
|
+
import { basicSearchInputMessages } from '../../common/modal/basic-search-input/messages';
|
|
19
|
+
import { ModeSwitcher } from '../../common/modal/mode-switcher/ModeSwitcher';
|
|
20
|
+
import { FILTER_SELECTION_DEBOUNCE_MS } from '../../common/modal/popup-select/constants';
|
|
21
|
+
import { useHydrateJqlQuery } from '../basic-filters/hooks/useHydrateJqlQuery';
|
|
22
|
+
import { default as BasicFilters } from '../basic-filters/ui/index';
|
|
23
|
+
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
24
|
+
import { JiraJQLEditor } from '../jql-editor';
|
|
25
|
+
import { buildJQL } from './buildJQL';
|
|
26
|
+
import { modeSwitcherMessages } from './messages';
|
|
27
|
+
var styles = {
|
|
28
|
+
inlineSearch: "_16jlkb7n _i0dlghg7 _1ul9idpf",
|
|
29
|
+
inlineSwitcher: "_1o9zidpf",
|
|
30
|
+
basicSearchInputBoxStyles: "_1bsb1osq",
|
|
31
|
+
basicSearchInputContainerStyles: "_16jlkb7n _1n261g80 _1p57u2gc",
|
|
32
|
+
inputContainerStyles: "_4cvr1y6m _1e0c1txw _1tket9kd",
|
|
33
|
+
modeSwitcherContainerStyles: "_19pk1b66"
|
|
34
|
+
};
|
|
35
|
+
export var EmbeddedJiraSearchContainer = function EmbeddedJiraSearchContainer(props) {
|
|
36
|
+
var DEFAULT_JQL_QUERY = props.defaultJql,
|
|
37
|
+
ALLOWED_ORDER_BY_KEYS = props.allowedOrderByKeys,
|
|
38
|
+
isSearching = props.isSearching,
|
|
39
|
+
parameters = props.parameters,
|
|
40
|
+
onSearch = props.onSearch,
|
|
41
|
+
onSearchMethodChangeCallback = props.onSearchMethodChange,
|
|
42
|
+
initialSearchMethod = props.initialSearchMethod,
|
|
43
|
+
setSearchBarJql = props.setSearchBarJql,
|
|
44
|
+
_props$searchBarJql = props.searchBarJql,
|
|
45
|
+
searchBarJql = _props$searchBarJql === void 0 ? DEFAULT_JQL_QUERY : _props$searchBarJql,
|
|
46
|
+
site = props.site,
|
|
47
|
+
setHasJqlSyntaxErrors = props.setHasJqlSyntaxErrors,
|
|
48
|
+
_props$layout = props.layout,
|
|
49
|
+
layout = _props$layout === void 0 ? 'modal' : _props$layout,
|
|
50
|
+
_props$initialBasicSe = props.initialBasicSearchTerm,
|
|
51
|
+
initialBasicSearchTerm = _props$initialBasicSe === void 0 ? '' : _props$initialBasicSe,
|
|
52
|
+
_props$allowBasicMode = props.allowBasicModeReset,
|
|
53
|
+
allowBasicModeReset = _props$allowBasicMode === void 0 ? false : _props$allowBasicMode,
|
|
54
|
+
_props$showBasicSearc = props.showBasicSearchButton,
|
|
55
|
+
showBasicSearchButton = _props$showBasicSearc === void 0 ? true : _props$showBasicSearc,
|
|
56
|
+
textSearchField = props.textSearchField;
|
|
57
|
+
var _ref = parameters || {},
|
|
58
|
+
currentCloudId = _ref.cloudId;
|
|
59
|
+
var _useIntl = useIntl(),
|
|
60
|
+
formatMessage = _useIntl.formatMessage;
|
|
61
|
+
var _useDatasourceAnalyti = useDatasourceAnalyticsEvents(),
|
|
62
|
+
fireEvent = _useDatasourceAnalyti.fireEvent;
|
|
63
|
+
var _useState = useState(initialBasicSearchTerm),
|
|
64
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
+
basicSearchTerm = _useState2[0],
|
|
66
|
+
setBasicSearchTerm = _useState2[1];
|
|
67
|
+
var _useState3 = useState(initialSearchMethod),
|
|
68
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
69
|
+
currentSearchMethod = _useState4[0],
|
|
70
|
+
setCurrentSearchMethod = _useState4[1];
|
|
71
|
+
var _useState5 = useState(currentCloudId),
|
|
72
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
73
|
+
cloudId = _useState6[0],
|
|
74
|
+
setCloudId = _useState6[1];
|
|
75
|
+
var _useState7 = useState(false),
|
|
76
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
77
|
+
isComplexQuery = _useState8[0],
|
|
78
|
+
setIsComplexQuery = _useState8[1];
|
|
79
|
+
var _useState9 = useState(),
|
|
80
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
81
|
+
orderKey = _useState0[0],
|
|
82
|
+
setOrderKey = _useState0[1];
|
|
83
|
+
var _useState1 = useState(),
|
|
84
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
85
|
+
orderDirection = _useState10[0],
|
|
86
|
+
setOrderDirection = _useState10[1];
|
|
87
|
+
var _useState11 = useState({}),
|
|
88
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
89
|
+
filterSelections = _useState12[0],
|
|
90
|
+
setFilterSelections = _useState12[1];
|
|
91
|
+
var basicDraft = useRef({
|
|
92
|
+
jql: initialSearchMethod === 'basic' ? searchBarJql : buildJQL({
|
|
93
|
+
rawSearch: initialBasicSearchTerm,
|
|
94
|
+
textSearchField: textSearchField
|
|
95
|
+
}),
|
|
96
|
+
term: initialBasicSearchTerm,
|
|
97
|
+
selections: {}
|
|
98
|
+
});
|
|
99
|
+
var advancedDraft = useRef();
|
|
100
|
+
var modeSwitcherOptionsMap = useMemo(function () {
|
|
101
|
+
return {
|
|
102
|
+
jql: {
|
|
103
|
+
label: 'JQL',
|
|
104
|
+
value: 'jql'
|
|
105
|
+
},
|
|
106
|
+
basic: {
|
|
107
|
+
label: formatMessage(modeSwitcherMessages.basicTextSearchLabel),
|
|
108
|
+
value: 'basic',
|
|
109
|
+
disabled: isComplexQuery && !allowBasicModeReset,
|
|
110
|
+
tooltipText: isComplexQuery && !allowBasicModeReset ? formatMessage(modeSwitcherMessages.basicModeSwitchDisabledTooltipText) : ''
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
}, [formatMessage, isComplexQuery, allowBasicModeReset]);
|
|
114
|
+
var modeSwitcherOptions = useMemo(function () {
|
|
115
|
+
return [modeSwitcherOptionsMap.basic, modeSwitcherOptionsMap.jql];
|
|
116
|
+
}, [modeSwitcherOptionsMap]);
|
|
117
|
+
var _useHydrateJqlQuery = useHydrateJqlQuery(cloudId || '', searchBarJql),
|
|
118
|
+
hydratedOptions = _useHydrateJqlQuery.hydratedOptions,
|
|
119
|
+
fetchHydratedJqlOptions = _useHydrateJqlQuery.fetchHydratedJqlOptions,
|
|
120
|
+
basicFilterHydrationStatus = _useHydrateJqlQuery.status;
|
|
121
|
+
var onSearchMethodChange = useCallback(function (searchMethod) {
|
|
122
|
+
if (allowBasicModeReset) {
|
|
123
|
+
if (searchMethod === 'jql') {
|
|
124
|
+
var _advancedDraft$curren;
|
|
125
|
+
basicDraft.current = {
|
|
126
|
+
jql: searchBarJql,
|
|
127
|
+
term: basicSearchTerm,
|
|
128
|
+
selections: filterSelections
|
|
129
|
+
};
|
|
130
|
+
setSearchBarJql((_advancedDraft$curren = advancedDraft.current) !== null && _advancedDraft$curren !== void 0 ? _advancedDraft$curren : searchBarJql);
|
|
131
|
+
} else if (isQueryTooComplex(searchBarJql)) {
|
|
132
|
+
advancedDraft.current = searchBarJql;
|
|
133
|
+
setSearchBarJql(basicDraft.current.jql);
|
|
134
|
+
setBasicSearchTerm(basicDraft.current.term);
|
|
135
|
+
setFilterSelections(basicDraft.current.selections);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
onSearchMethodChangeCallback(searchMethod);
|
|
139
|
+
setCurrentSearchMethod(searchMethod);
|
|
140
|
+
}, [onSearchMethodChangeCallback, allowBasicModeReset, searchBarJql, basicSearchTerm, filterSelections, setSearchBarJql]);
|
|
141
|
+
var handleBasicSearchChange = useCallback(function (e) {
|
|
142
|
+
var rawSearch = e.currentTarget.value;
|
|
143
|
+
setBasicSearchTerm(rawSearch);
|
|
144
|
+
setSearchBarJql(buildJQL({
|
|
145
|
+
rawSearch: rawSearch,
|
|
146
|
+
textSearchField: textSearchField,
|
|
147
|
+
filterValues: filterSelections,
|
|
148
|
+
orderDirection: orderDirection,
|
|
149
|
+
orderKey: orderKey
|
|
150
|
+
}));
|
|
151
|
+
}, [setSearchBarJql, filterSelections, orderDirection, orderKey, textSearchField]);
|
|
152
|
+
var onQueryChange = useCallback(function (query, jast) {
|
|
153
|
+
var _query$split$map$filt, _fragments$at, _fragments$at2, _fragments$at3;
|
|
154
|
+
setHasJqlSyntaxErrors === null || setHasJqlSyntaxErrors === void 0 || setHasJqlSyntaxErrors(jast.errors.length > 0);
|
|
155
|
+
// determine if order keys have been set so they can be saved and persisted when changes occur in basic search
|
|
156
|
+
var fragments = (_query$split$map$filt = query === null || query === void 0 ? void 0 : query.split(/(^| )(order by)( |$)/i).map(function (item) {
|
|
157
|
+
return item.trim();
|
|
158
|
+
}).filter(Boolean)) !== null && _query$split$map$filt !== void 0 ? _query$split$map$filt : [];
|
|
159
|
+
var hasOrder = ((_fragments$at = fragments.at(-2)) === null || _fragments$at === void 0 ? void 0 : _fragments$at.toLowerCase()) === 'order by';
|
|
160
|
+
var key = hasOrder ? (_fragments$at2 = fragments.at(-1)) === null || _fragments$at2 === void 0 ? void 0 : _fragments$at2.split(' ').at(-2) : undefined;
|
|
161
|
+
var order = hasOrder ? (_fragments$at3 = fragments.at(-1)) === null || _fragments$at3 === void 0 ? void 0 : _fragments$at3.split(' ').at(-1) : undefined;
|
|
162
|
+
|
|
163
|
+
// TODO: confirm if these are the only order keys we want to preserve - existing whiteboard logic
|
|
164
|
+
if (key && ALLOWED_ORDER_BY_KEYS.includes(key)) {
|
|
165
|
+
setOrderKey(key);
|
|
166
|
+
setOrderDirection(order);
|
|
167
|
+
}
|
|
168
|
+
setSearchBarJql(query);
|
|
169
|
+
}, [setSearchBarJql, setHasJqlSyntaxErrors]);
|
|
170
|
+
var handleSearch = useCallback(function () {
|
|
171
|
+
var isCurrentQueryComplex = isQueryTooComplex(searchBarJql);
|
|
172
|
+
if (currentSearchMethod === 'basic') {
|
|
173
|
+
advancedDraft.current = undefined;
|
|
174
|
+
}
|
|
175
|
+
onSearch({
|
|
176
|
+
jql: searchBarJql
|
|
177
|
+
}, {
|
|
178
|
+
searchMethod: currentSearchMethod,
|
|
179
|
+
basicFilterSelections: filterSelections,
|
|
180
|
+
isQueryComplex: isCurrentQueryComplex
|
|
181
|
+
});
|
|
182
|
+
if (currentSearchMethod === 'jql') {
|
|
183
|
+
fireEvent('ui.jqlEditor.searched', {
|
|
184
|
+
isQueryComplex: isCurrentQueryComplex
|
|
185
|
+
});
|
|
186
|
+
setIsComplexQuery(isCurrentQueryComplex);
|
|
187
|
+
if (!isCurrentQueryComplex) {
|
|
188
|
+
fetchHydratedJqlOptions();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}, [currentSearchMethod, fetchHydratedJqlOptions, filterSelections, fireEvent, searchBarJql, onSearch]);
|
|
192
|
+
var _useDebouncedCallback = useDebouncedCallback(function (filterValues) {
|
|
193
|
+
var jqlWithFilterValues = buildJQL({
|
|
194
|
+
rawSearch: basicSearchTerm,
|
|
195
|
+
textSearchField: textSearchField,
|
|
196
|
+
filterValues: filterValues,
|
|
197
|
+
orderDirection: orderDirection,
|
|
198
|
+
orderKey: orderKey
|
|
199
|
+
});
|
|
200
|
+
advancedDraft.current = undefined;
|
|
201
|
+
setSearchBarJql(jqlWithFilterValues);
|
|
202
|
+
var isCurrentQueryComplex = isQueryTooComplex(jqlWithFilterValues);
|
|
203
|
+
onSearch({
|
|
204
|
+
jql: jqlWithFilterValues
|
|
205
|
+
}, {
|
|
206
|
+
searchMethod: currentSearchMethod,
|
|
207
|
+
basicFilterSelections: filterValues,
|
|
208
|
+
isQueryComplex: isCurrentQueryComplex
|
|
209
|
+
});
|
|
210
|
+
}, FILTER_SELECTION_DEBOUNCE_MS),
|
|
211
|
+
_useDebouncedCallback2 = _slicedToArray(_useDebouncedCallback, 1),
|
|
212
|
+
debouncedBasicFilterSelectionChange = _useDebouncedCallback2[0];
|
|
213
|
+
var handleBasicFilterSelectionChange = useCallback(function (filterType, options) {
|
|
214
|
+
var updatedSelection = _objectSpread(_objectSpread({}, filterSelections), {}, _defineProperty({}, filterType, options));
|
|
215
|
+
setFilterSelections(updatedSelection);
|
|
216
|
+
debouncedBasicFilterSelectionChange(updatedSelection);
|
|
217
|
+
}, [debouncedBasicFilterSelectionChange, filterSelections]);
|
|
218
|
+
useEffect(function () {
|
|
219
|
+
var isCurrentQueryComplex = isQueryTooComplex(searchBarJql);
|
|
220
|
+
setIsComplexQuery(isCurrentQueryComplex);
|
|
221
|
+
if (!isCurrentQueryComplex && searchBarJql !== DEFAULT_JQL_QUERY) {
|
|
222
|
+
fetchHydratedJqlOptions();
|
|
223
|
+
}
|
|
224
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
225
|
+
}, []);
|
|
226
|
+
useEffect(function () {
|
|
227
|
+
if (basicFilterHydrationStatus === 'resolved') {
|
|
228
|
+
var basicInputTextValue = hydratedOptions.basicInputTextValue,
|
|
229
|
+
hydratedFilterOptions = _objectWithoutProperties(hydratedOptions, _excluded);
|
|
230
|
+
setFilterSelections(hydratedFilterOptions);
|
|
231
|
+
if (basicInputTextValue) {
|
|
232
|
+
setBasicSearchTerm(basicInputTextValue);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}, [hydratedOptions, basicFilterHydrationStatus]);
|
|
236
|
+
useEffect(function () {
|
|
237
|
+
if (currentCloudId !== cloudId) {
|
|
238
|
+
basicDraft.current = {
|
|
239
|
+
jql: DEFAULT_JQL_QUERY,
|
|
240
|
+
term: '',
|
|
241
|
+
selections: {}
|
|
242
|
+
};
|
|
243
|
+
advancedDraft.current = undefined;
|
|
244
|
+
setBasicSearchTerm('');
|
|
245
|
+
setSearchBarJql(DEFAULT_JQL_QUERY);
|
|
246
|
+
setIsComplexQuery(false);
|
|
247
|
+
setOrderKey(undefined);
|
|
248
|
+
setOrderDirection(undefined);
|
|
249
|
+
setFilterSelections({});
|
|
250
|
+
setCloudId(currentCloudId);
|
|
251
|
+
}
|
|
252
|
+
}, [currentCloudId, cloudId, setSearchBarJql]);
|
|
253
|
+
var searchInput = currentSearchMethod === 'basic' ? /*#__PURE__*/React.createElement(Box, {
|
|
254
|
+
xcss: layout === 'inline' ? styles.inlineSearch : styles.basicSearchInputBoxStyles
|
|
255
|
+
}, /*#__PURE__*/React.createElement(Flex, {
|
|
256
|
+
alignItems: "center",
|
|
257
|
+
xcss: styles.basicSearchInputContainerStyles
|
|
258
|
+
}, /*#__PURE__*/React.createElement(BasicSearchInput, {
|
|
259
|
+
isCompact: layout === 'inline',
|
|
260
|
+
isSearching: isSearching,
|
|
261
|
+
onChange: handleBasicSearchChange,
|
|
262
|
+
onSearch: handleSearch,
|
|
263
|
+
searchTerm: basicSearchTerm,
|
|
264
|
+
showSearchButton: showBasicSearchButton,
|
|
265
|
+
ariaLabel: basicSearchInputMessages.basicTextSearchLabel,
|
|
266
|
+
testId: "jira-datasource-modal",
|
|
267
|
+
fullWidth: false
|
|
268
|
+
}), /*#__PURE__*/React.createElement(BasicFilters, {
|
|
269
|
+
jql: searchBarJql,
|
|
270
|
+
site: site,
|
|
271
|
+
onChange: handleBasicFilterSelectionChange,
|
|
272
|
+
selections: filterSelections,
|
|
273
|
+
isJQLHydrating: basicFilterHydrationStatus === 'loading',
|
|
274
|
+
isInline: layout === 'inline'
|
|
275
|
+
})), layout !== 'inline' && /*#__PURE__*/React.createElement(Text, {
|
|
276
|
+
size: "small",
|
|
277
|
+
color: "color.text.subtlest",
|
|
278
|
+
testId: "jira-search-placeholder"
|
|
279
|
+
}, formatMessage(basicSearchInputMessages.basicTextSearchLabel))) : /*#__PURE__*/React.createElement(JiraJQLEditor, {
|
|
280
|
+
isCompact: layout === 'inline',
|
|
281
|
+
cloudId: cloudId || '',
|
|
282
|
+
autoFocus: layout !== 'inline',
|
|
283
|
+
isSearching: isSearching,
|
|
284
|
+
onChange: onQueryChange,
|
|
285
|
+
onSearch: handleSearch,
|
|
286
|
+
query: searchBarJql
|
|
287
|
+
});
|
|
288
|
+
var modeSwitcher = /*#__PURE__*/React.createElement(ModeSwitcher, {
|
|
289
|
+
isInline: layout === 'inline',
|
|
290
|
+
onOptionValueChange: onSearchMethodChange,
|
|
291
|
+
selectedOptionValue: currentSearchMethod,
|
|
292
|
+
options: modeSwitcherOptions
|
|
293
|
+
});
|
|
294
|
+
if (layout === 'inline') {
|
|
295
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
296
|
+
alignItems: "start",
|
|
297
|
+
gap: "space.100",
|
|
298
|
+
wrap: "wrap",
|
|
299
|
+
testId: "jira-search-container"
|
|
300
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
301
|
+
xcss: styles.inlineSwitcher
|
|
302
|
+
}, modeSwitcher), currentSearchMethod === 'basic' ? searchInput : /*#__PURE__*/React.createElement(Box, {
|
|
303
|
+
xcss: styles.inlineSearch
|
|
304
|
+
}, searchInput));
|
|
305
|
+
}
|
|
306
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
307
|
+
"data-testid": "jira-search-container",
|
|
308
|
+
className: ax([styles.inputContainerStyles])
|
|
309
|
+
}, searchInput, /*#__PURE__*/React.createElement(Box, {
|
|
310
|
+
xcss: styles.modeSwitcherContainerStyles
|
|
311
|
+
}, modeSwitcher));
|
|
312
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
5
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
5
6
|
var _excluded = ["basicInputTextValue"];
|
|
6
7
|
import "./index.compiled.css";
|
|
7
8
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -23,6 +24,7 @@ import { default as BasicFilters } from '../basic-filters/ui/index';
|
|
|
23
24
|
import { isQueryTooComplex } from '../basic-filters/utils/isQueryTooComplex';
|
|
24
25
|
import { JiraJQLEditor } from '../jql-editor';
|
|
25
26
|
import { buildJQL } from './buildJQL';
|
|
27
|
+
import { EmbeddedJiraSearchContainer } from './embedded';
|
|
26
28
|
import { modeSwitcherMessages } from './messages';
|
|
27
29
|
var styles = {
|
|
28
30
|
basicSearchInputBoxStyles: "_1bsb1osq",
|
|
@@ -32,7 +34,17 @@ var styles = {
|
|
|
32
34
|
};
|
|
33
35
|
export var DEFAULT_JQL_QUERY = 'ORDER BY created DESC';
|
|
34
36
|
export var ALLOWED_ORDER_BY_KEYS = ['key', 'summary', 'assignee', 'status', 'created'];
|
|
37
|
+
/** Opt-in consumers use a separate component; the configuration modal retains its existing path. */
|
|
35
38
|
export var JiraSearchContainer = function JiraSearchContainer(props) {
|
|
39
|
+
if (props.layout === 'inline' || props.allowBasicModeReset || props.initialBasicSearchTerm !== undefined || props.showBasicSearchButton === false || props.textSearchField !== undefined) {
|
|
40
|
+
return /*#__PURE__*/React.createElement(EmbeddedJiraSearchContainer, _extends({}, props, {
|
|
41
|
+
defaultJql: DEFAULT_JQL_QUERY,
|
|
42
|
+
allowedOrderByKeys: ALLOWED_ORDER_BY_KEYS
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
return /*#__PURE__*/React.createElement(ModalJiraSearchContainer, props);
|
|
46
|
+
};
|
|
47
|
+
var ModalJiraSearchContainer = function ModalJiraSearchContainer(props) {
|
|
36
48
|
var isSearching = props.isSearching,
|
|
37
49
|
parameters = props.parameters,
|
|
38
50
|
onSearch = props.onSearch,
|
|
@@ -6,6 +6,10 @@ import { makeGetJqlAutocompleteData } from '../../../services/makeGetJqlAutocomp
|
|
|
6
6
|
import { makeGetJqlSuggestionsData } from '../../../services/makeGetJqlSuggestionsData';
|
|
7
7
|
export var JiraJQLEditor = function JiraJQLEditor(_ref) {
|
|
8
8
|
var cloudId = _ref.cloudId,
|
|
9
|
+
_ref$autoFocus = _ref.autoFocus,
|
|
10
|
+
autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
|
|
11
|
+
_ref$isCompact = _ref.isCompact,
|
|
12
|
+
isCompact = _ref$isCompact === void 0 ? false : _ref$isCompact,
|
|
9
13
|
isSearching = _ref.isSearching,
|
|
10
14
|
onChange = _ref.onChange,
|
|
11
15
|
onSearch = _ref.onSearch,
|
|
@@ -17,11 +21,14 @@ export var JiraJQLEditor = function JiraJQLEditor(_ref) {
|
|
|
17
21
|
focus: function focus() {}
|
|
18
22
|
});
|
|
19
23
|
useEffect(function () {
|
|
24
|
+
if (!autoFocus) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
20
27
|
requestAnimationFrame(function () {
|
|
21
28
|
var _inputRef$current;
|
|
22
29
|
(_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
|
|
23
30
|
});
|
|
24
|
-
}, []);
|
|
31
|
+
}, [autoFocus]);
|
|
25
32
|
var searchIfValidJql = function searchIfValidJql(_, jast) {
|
|
26
33
|
if (jast.errors.length === 0) {
|
|
27
34
|
onSearch();
|
|
@@ -33,6 +40,7 @@ export var JiraJQLEditor = function JiraJQLEditor(_ref) {
|
|
|
33
40
|
onSearch: searchIfValidJql,
|
|
34
41
|
onUpdate: onChange,
|
|
35
42
|
isSearching: isSearching,
|
|
43
|
+
isCompact: isCompact,
|
|
36
44
|
inputRef: inputRef,
|
|
37
45
|
query: query,
|
|
38
46
|
"aria-label": /*#__PURE__*/React.createElement(FormattedMessage, {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._18zrpxbi{padding-inline:var(--ds-space-200,1pc)}
|
|
2
|
+
._1rjcpxbi{padding-block:var(--ds-space-200,1pc)}._18m915vq{overflow-y:hidden}
|
|
3
|
+
._1pglindk{animation-timing-function:var(--ds-easing-out-practical,cubic-bezier(.4,1,.6,1))}
|
|
4
|
+
._1reo15vq{overflow-x:hidden}
|
|
5
|
+
._1tke194s{min-height:14pc}
|
|
6
|
+
._1tkeva7c{min-height:281px}
|
|
7
|
+
._4t3i1osq{height:100%}
|
|
8
|
+
._5sag1ign{animation-duration:var(--ds-duration-short,.15s)}
|
|
9
|
+
._j7hq1bym{animation-name:var(--ds-keyframe-fade-in,FadeIn0to100)}
|
|
10
|
+
._p12f1gwv{max-width:360px}
|
|
11
|
+
._y3gn1h6o{text-align:center}
|
|
12
|
+
@media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* index.tsx generated by @compiled/babel-plugin v3.0.2 */
|
|
2
|
+
import "./index.compiled.css";
|
|
3
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { defineMessages, useIntl } from 'react-intl';
|
|
6
|
+
import { cx } from '@atlaskit/css';
|
|
7
|
+
import Heading from '@atlaskit/heading/heading';
|
|
8
|
+
import IntlMessagesProvider from '@atlaskit/intl-messages-provider/main';
|
|
9
|
+
import { Box } from '@atlaskit/primitives/compiled/box';
|
|
10
|
+
import { Flex } from '@atlaskit/primitives/compiled/flex';
|
|
11
|
+
import { Text } from '@atlaskit/primitives/compiled/text';
|
|
12
|
+
import VisuallyHidden from '@atlaskit/visually-hidden/visually-hidden';
|
|
13
|
+
import { RichIconSearch } from '../../common/ui/rich-icon/search';
|
|
14
|
+
import { SpotSearchNoResult } from '../../common/ui/spot/error-state/search-no-result';
|
|
15
|
+
import { fetchMessagesForLocale } from '../../common/utils/locale/fetch-messages-for-locale';
|
|
16
|
+
import i18nEN from '../../i18n/en';
|
|
17
|
+
import { loadingErrorMessages } from '../common/error-state/messages';
|
|
18
|
+
import { initialStateViewMessages } from '../common/initial-state-view/messages';
|
|
19
|
+
import EmptyState from '../issue-like-table/empty-state';
|
|
20
|
+
var messages = defineMessages({
|
|
21
|
+
loading: {
|
|
22
|
+
id: 'link-datasource.jira-search-state.loading',
|
|
23
|
+
defaultMessage: 'Searching for work items…',
|
|
24
|
+
description: 'Loading label while an embedded Jira work-item search is running.'
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
var styles = {
|
|
28
|
+
loading: "_1reo15vq _18m915vq _4t3i1osq",
|
|
29
|
+
canvas: "_1rjcpxbi _18zrpxbi _1tkeva7c",
|
|
30
|
+
compactCanvas: "_1tke194s",
|
|
31
|
+
resolvedEmpty: "_j7hq1bym _5sag1ign _1pglindk _bl8aglyw",
|
|
32
|
+
content: "_p12f1gwv _y3gn1h6o"
|
|
33
|
+
};
|
|
34
|
+
var SearchState = function SearchState(_ref) {
|
|
35
|
+
var variant = _ref.variant,
|
|
36
|
+
_ref$isCompact = _ref.isCompact,
|
|
37
|
+
isCompact = _ref$isCompact === void 0 ? false : _ref$isCompact;
|
|
38
|
+
var _useIntl = useIntl(),
|
|
39
|
+
formatMessage = _useIntl.formatMessage;
|
|
40
|
+
var isEmpty = variant === 'empty';
|
|
41
|
+
if (variant === 'loading') {
|
|
42
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
43
|
+
xcss: styles.loading,
|
|
44
|
+
testId: "jira-search-state-loading"
|
|
45
|
+
}, /*#__PURE__*/React.createElement(VisuallyHidden, null, formatMessage(messages.loading)), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
"aria-hidden": "true"
|
|
47
|
+
}, /*#__PURE__*/React.createElement(EmptyState, {
|
|
48
|
+
isCompact: true,
|
|
49
|
+
testId: "jira-search-table-skeleton"
|
|
50
|
+
})));
|
|
51
|
+
}
|
|
52
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
53
|
+
direction: "column",
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
justifyContent: "center",
|
|
56
|
+
gap: isCompact ? 'space.100' : 'space.200',
|
|
57
|
+
xcss: cx(styles.canvas, isCompact && styles.compactCanvas, isEmpty && styles.resolvedEmpty),
|
|
58
|
+
testId: "jira-search-state-".concat(variant)
|
|
59
|
+
}, isEmpty ? /*#__PURE__*/React.createElement(SpotSearchNoResult, {
|
|
60
|
+
size: isCompact ? 'large' : 'xlarge',
|
|
61
|
+
alt: ""
|
|
62
|
+
}) : /*#__PURE__*/React.createElement(RichIconSearch, {
|
|
63
|
+
size: isCompact ? 'large' : 'xlarge',
|
|
64
|
+
alt: ""
|
|
65
|
+
}), /*#__PURE__*/React.createElement(Box, {
|
|
66
|
+
xcss: styles.content
|
|
67
|
+
}, /*#__PURE__*/React.createElement(Heading, {
|
|
68
|
+
as: "h3",
|
|
69
|
+
size: "small"
|
|
70
|
+
}, formatMessage(isEmpty ? loadingErrorMessages.noResultsFound : initialStateViewMessages.jiraSearchTitle))), /*#__PURE__*/React.createElement(Box, {
|
|
71
|
+
xcss: styles.content
|
|
72
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
|
73
|
+
color: "color.text.subtle"
|
|
74
|
+
}, formatMessage(isEmpty ? loadingErrorMessages.noResultsFoundDescription : initialStateViewMessages.searchDescriptionForBasicSearchSllv))));
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/** Reuses the work-item picker's illustrations and copy without emitting datasource analytics. */
|
|
78
|
+
export var JiraSearchState = function JiraSearchState(props) {
|
|
79
|
+
return /*#__PURE__*/React.createElement(IntlMessagesProvider, {
|
|
80
|
+
defaultMessages: i18nEN,
|
|
81
|
+
loaderFn: fetchMessagesForLocale
|
|
82
|
+
}, /*#__PURE__*/React.createElement(SearchState, props));
|
|
83
|
+
};
|
|
@@ -6,11 +6,15 @@ import { type MessageDescriptor } from 'react-intl';
|
|
|
6
6
|
export interface BasicSearchInputProps {
|
|
7
7
|
ariaLabel: MessageDescriptor;
|
|
8
8
|
fullWidth?: boolean;
|
|
9
|
+
/** Match compact toolbar controls without changing the default input size. */
|
|
10
|
+
isCompact?: boolean;
|
|
9
11
|
isDisabled?: boolean;
|
|
10
12
|
isSearching?: boolean;
|
|
11
13
|
onChange: React.FormEventHandler<HTMLInputElement>;
|
|
12
14
|
onSearch: (searchTerm: string) => void;
|
|
13
15
|
searchTerm: string;
|
|
16
|
+
/** Hide the submit button for consumers that use Enter to search. */
|
|
17
|
+
showSearchButton?: boolean;
|
|
14
18
|
testId: string;
|
|
15
19
|
}
|
|
16
|
-
export declare const BasicSearchInput: ({ isDisabled, isSearching, onChange, onSearch, searchTerm, fullWidth, testId, ariaLabel, }: BasicSearchInputProps) => JSX.Element;
|
|
20
|
+
export declare const BasicSearchInput: ({ isCompact, isDisabled, isSearching, onChange, onSearch, searchTerm, showSearchButton, fullWidth, testId, ariaLabel, }: BasicSearchInputProps) => JSX.Element;
|
|
@@ -12,6 +12,7 @@ export interface ModeSwitcherPropsOption<T extends string = string> {
|
|
|
12
12
|
export interface ModeSwitcherProps<T extends string = string> {
|
|
13
13
|
isCompact?: boolean;
|
|
14
14
|
isDisabled?: boolean;
|
|
15
|
+
isInline?: boolean;
|
|
15
16
|
onOptionValueChange: (selectedOptionValue: T) => void;
|
|
16
17
|
options: ModeSwitcherPropsOption<T>[];
|
|
17
18
|
selectedOptionValue?: string;
|
|
@@ -6,6 +6,7 @@ export interface FilterPopupSelectProps {
|
|
|
6
6
|
buttonLabel: string;
|
|
7
7
|
filterName: string;
|
|
8
8
|
isDisabled: boolean;
|
|
9
|
+
isInline?: boolean;
|
|
9
10
|
menuListProps: CustomMenuListProps;
|
|
10
11
|
onInputChange: (newValue: string, actionMeta: InputActionMeta) => void;
|
|
11
12
|
onMenuClose?: () => void;
|
|
@@ -20,4 +21,4 @@ export interface FilterPopupSelectProps {
|
|
|
20
21
|
status: 'empty' | 'loading' | 'resolved' | 'rejected' | 'loadingMore';
|
|
21
22
|
totalCount?: number;
|
|
22
23
|
}
|
|
23
|
-
export declare const FilterPopupSelect: (
|
|
24
|
+
export declare const FilterPopupSelect: (props: FilterPopupSelectProps) => React.JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import type { PopupSelect } from '@atlaskit/select/popup-select';
|
|
3
|
+
import type { SelectOption } from './types';
|
|
4
|
+
export declare function useInlinePopupLayout(isInline: boolean, popupRef: RefObject<PopupSelect<SelectOption, true>>): {
|
|
5
|
+
maxMenuHeight?: number;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onOpen: () => void;
|
|
8
|
+
popperProps?: PopupSelect<SelectOption, true>['props']['popperProps'];
|
|
9
|
+
};
|
|
@@ -6,16 +6,20 @@ import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
|
6
6
|
import { type WithContextProps } from '@atlaskit/analytics-next/withAnalyticsContext';
|
|
7
7
|
import type { DatasourceParameters } from '@atlaskit/linking-types/datasource';
|
|
8
8
|
import type { IssueLikeDataTableViewProps } from '../issue-like-table/types';
|
|
9
|
-
import { type DatasourceTableRequestSettledResult } from './types';
|
|
9
|
+
import { type DatasourceTableRequestSettledResult, type DatasourceTableViewProps } from './types';
|
|
10
10
|
export declare const DatasourceTableView: ForwardRefExoticComponent<{
|
|
11
11
|
datasourceId: string;
|
|
12
|
+
enableRequestSettled?: boolean;
|
|
12
13
|
onRequestSettled?: (result: DatasourceTableRequestSettledResult) => void;
|
|
13
14
|
parameters: DatasourceParameters;
|
|
15
|
+
renderEmptyState?: DatasourceTableViewProps['renderEmptyState'];
|
|
14
16
|
url?: string;
|
|
15
17
|
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onWrappedColumnsChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>> & WithContextProps & RefAttributes<any>>;
|
|
16
18
|
export declare const DataSourceTableViewNoSuspense: ForwardRefExoticComponent<{
|
|
17
19
|
datasourceId: string;
|
|
20
|
+
enableRequestSettled?: boolean;
|
|
18
21
|
onRequestSettled?: (result: DatasourceTableRequestSettledResult) => void;
|
|
19
22
|
parameters: DatasourceParameters;
|
|
23
|
+
renderEmptyState?: DatasourceTableViewProps['renderEmptyState'];
|
|
20
24
|
url?: string;
|
|
21
25
|
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onWrappedColumnsChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>> & WithContextProps & RefAttributes<any>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
1
2
|
import type { DatasourceParameters } from '@atlaskit/linking-types/datasource';
|
|
2
3
|
import { type IssueLikeDataTableViewProps } from '../issue-like-table/types';
|
|
3
4
|
/** Outcome of a datasource data request, reported to hosts via `onRequestSettled`. */
|
|
@@ -11,6 +12,8 @@ export type DatasourceTableRequestSettledResult = {
|
|
|
11
12
|
export type DatasourceTableViewProps = {
|
|
12
13
|
/** Unique identifier for which type of datasource is being rendered and for making its requests */
|
|
13
14
|
datasourceId: string;
|
|
15
|
+
/** Explicitly enable completion reporting for embedded hosts; otherwise use the existing gate. */
|
|
16
|
+
enableRequestSettled?: boolean;
|
|
14
17
|
/**
|
|
15
18
|
* Called each time a data request settles (including next-page loads and refreshes), so hosts can
|
|
16
19
|
* react to the outcome, e.g. replace the table with their own empty state when `itemCount` is 0.
|
|
@@ -18,6 +21,8 @@ export type DatasourceTableViewProps = {
|
|
|
18
21
|
onRequestSettled?: (result: DatasourceTableRequestSettledResult) => void;
|
|
19
22
|
/** Parameters for making the data requests necessary to render data within the table */
|
|
20
23
|
parameters: DatasourceParameters;
|
|
24
|
+
/** Replace the entire resolved empty table, including headers and footer, without stopping requests. */
|
|
25
|
+
renderEmptyState?: () => ReactElement | null;
|
|
21
26
|
/** Url for an existing datasource, initially used for displaying to a user unauthorized to query that site */
|
|
22
27
|
url?: string;
|
|
23
28
|
} & Partial<Pick<IssueLikeDataTableViewProps, 'visibleColumnKeys' | 'onVisibleColumnKeysChange' | 'wrappedColumnKeys' | 'onWrappedColumnChange' | 'onWrappedColumnsChange' | 'onColumnResize' | 'onColumnSort' | 'sortState' | 'columnCustomSizes' | 'scrollableContainerHeight'>>;
|
|
@@ -5,10 +5,11 @@ import { type BasicFilterFieldType } from '../../types';
|
|
|
5
5
|
export interface AsyncPopupSelectProps {
|
|
6
6
|
filterType: BasicFilterFieldType;
|
|
7
7
|
isDisabled?: boolean;
|
|
8
|
+
isInline?: boolean;
|
|
8
9
|
isJQLHydrating: boolean;
|
|
9
10
|
onSelectionChange?: (filterType: BasicFilterFieldType, options: SelectOption[]) => void;
|
|
10
11
|
selection: SelectOption[];
|
|
11
12
|
site?: Site;
|
|
12
13
|
}
|
|
13
|
-
declare const AsyncPopupSelect: ({ filterType, site, selection, isJQLHydrating, onSelectionChange, isDisabled, }: AsyncPopupSelectProps) => React.JSX.Element;
|
|
14
|
+
declare const AsyncPopupSelect: ({ filterType, site, selection, isJQLHydrating, onSelectionChange, isDisabled, isInline, }: AsyncPopupSelectProps) => React.JSX.Element;
|
|
14
15
|
export default AsyncPopupSelect;
|
|
@@ -4,11 +4,12 @@ import { type SelectOption } from '../../../common/modal/popup-select/types';
|
|
|
4
4
|
import type { BasicFilterFieldType, SelectedOptionsMap } from '../types';
|
|
5
5
|
export declare const availableBasicFilterTypes: BasicFilterFieldType[];
|
|
6
6
|
export interface BasicFilterContainerProps {
|
|
7
|
+
isInline?: boolean;
|
|
7
8
|
isJQLHydrating: boolean;
|
|
8
9
|
jql: string;
|
|
9
10
|
onChange: (filterType: BasicFilterFieldType, options: SelectOption[]) => void;
|
|
10
11
|
selections: SelectedOptionsMap;
|
|
11
12
|
site?: Site;
|
|
12
13
|
}
|
|
13
|
-
declare const BasicFilterContainer: ({ jql, site, onChange, selections, isJQLHydrating, }: BasicFilterContainerProps) => React.JSX.Element;
|
|
14
|
+
declare const BasicFilterContainer: ({ jql, site, onChange, selections, isJQLHydrating, isInline, }: BasicFilterContainerProps) => React.JSX.Element;
|
|
14
15
|
export default BasicFilterContainer;
|
package/dist/types/ui/jira-issues-modal/jira-search-container/JiraSearchContainerWithWrappers.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SearchContainerProps } from './index';
|
|
3
|
+
/** Embedded consumers need the same translated search controls as the configuration modal. */
|
|
4
|
+
export declare const JiraSearchContainer: (props: SearchContainerProps) => React.JSX.Element;
|