@atlaskit/link-datasource 1.28.0 → 1.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/services/mocks.js +152 -1
- package/dist/cjs/services/useBasicFilterAGG.js +9 -2
- package/dist/cjs/services/utils.js +3 -2
- package/dist/cjs/ui/common/modal/popup-select/formatOptionLabel.js +7 -10
- package/dist/cjs/ui/common/modal/popup-select/index.js +2 -1
- package/dist/cjs/ui/common/modal/popup-select/trigger.js +1 -2
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.js +110 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/messages.js +14 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.js +48 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +120 -0
- package/dist/cjs/ui/confluence-search-modal/basic-filters/index.js +12 -3
- package/dist/cjs/ui/confluence-search-modal/confluence-search-container/index.js +15 -6
- package/dist/cjs/ui/confluence-search-modal/modal/index.js +35 -17
- package/dist/es2019/services/mocks.js +151 -0
- package/dist/es2019/services/useBasicFilterAGG.js +8 -3
- package/dist/es2019/services/utils.js +8 -0
- package/dist/es2019/ui/common/modal/popup-select/formatOptionLabel.js +7 -7
- package/dist/es2019/ui/common/modal/popup-select/index.js +1 -1
- package/dist/es2019/ui/common/modal/popup-select/trigger.js +1 -2
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.js +82 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/messages.js +8 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.js +25 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +74 -0
- package/dist/es2019/ui/confluence-search-modal/basic-filters/index.js +13 -3
- package/dist/es2019/ui/confluence-search-modal/confluence-search-container/index.js +16 -9
- package/dist/es2019/ui/confluence-search-modal/modal/index.js +22 -6
- package/dist/esm/services/mocks.js +151 -0
- package/dist/esm/services/useBasicFilterAGG.js +10 -3
- package/dist/esm/services/utils.js +2 -1
- package/dist/esm/ui/common/modal/popup-select/formatOptionLabel.js +7 -7
- package/dist/esm/ui/common/modal/popup-select/index.js +2 -1
- package/dist/esm/ui/common/modal/popup-select/trigger.js +1 -2
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.js +100 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/messages.js +8 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.js +41 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.js +113 -0
- package/dist/esm/ui/confluence-search-modal/basic-filters/index.js +12 -3
- package/dist/esm/ui/confluence-search-modal/confluence-search-container/index.js +15 -6
- package/dist/esm/ui/confluence-search-modal/modal/index.js +35 -17
- package/dist/types/services/mocks.d.ts +51 -0
- package/dist/types/services/useBasicFilterAGG.d.ts +2 -0
- package/dist/types/services/utils.d.ts +1 -0
- package/dist/types/ui/common/modal/popup-select/index.d.ts +1 -1
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.d.ts +10 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/messages.d.ts +7 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.d.ts +7 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.d.ts +16 -0
- package/dist/types/ui/confluence-search-modal/basic-filters/index.d.ts +4 -2
- package/dist/types-ts4.5/services/mocks.d.ts +51 -0
- package/dist/types-ts4.5/services/useBasicFilterAGG.d.ts +2 -0
- package/dist/types-ts4.5/services/utils.d.ts +1 -0
- package/dist/types-ts4.5/ui/common/modal/popup-select/index.d.ts +1 -1
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.d.ts +10 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/messages.d.ts +7 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/hooks/useCurrentUserInfo.d.ts +7 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.d.ts +16 -0
- package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/index.d.ts +4 -2
- package/package.json +3 -2
|
@@ -3,9 +3,11 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
import { useDebouncedCallback } from 'use-debounce';
|
|
6
7
|
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { Flex, xcss } from '@atlaskit/primitives';
|
|
8
9
|
import { BasicSearchInput } from '../../common/modal/basic-search-input';
|
|
10
|
+
import { FILTER_SELECTION_DEBOUNCE_MS } from '../../common/modal/popup-select/constants';
|
|
9
11
|
import BasicFilters from '../basic-filters';
|
|
10
12
|
import { searchMessages } from './messages';
|
|
11
13
|
var basicSearchInputContainerStyles = xcss({
|
|
@@ -29,21 +31,26 @@ var ConfluenceSearchContainer = function ConfluenceSearchContainer(_ref) {
|
|
|
29
31
|
var rawSearch = e.currentTarget.value;
|
|
30
32
|
setSearchBarSearchString(rawSearch);
|
|
31
33
|
}, []);
|
|
34
|
+
var _useDebouncedCallback = useDebouncedCallback(function (filterValues) {
|
|
35
|
+
onSearch(searchBarSearchString, filterValues);
|
|
36
|
+
}, FILTER_SELECTION_DEBOUNCE_MS),
|
|
37
|
+
_useDebouncedCallback2 = _slicedToArray(_useDebouncedCallback, 1),
|
|
38
|
+
debouncedBasicFilterSelectionChange = _useDebouncedCallback2[0];
|
|
39
|
+
var handleBasicFilterSelectionChange = useCallback(function (filterType, options) {
|
|
40
|
+
var updatedSelection = _objectSpread(_objectSpread({}, filterSelections), {}, _defineProperty({}, filterType, options));
|
|
41
|
+
setFilterSelections(updatedSelection);
|
|
42
|
+
debouncedBasicFilterSelectionChange(updatedSelection);
|
|
43
|
+
}, [debouncedBasicFilterSelectionChange, filterSelections]);
|
|
32
44
|
|
|
33
45
|
// TODO: further refactoring in EDM-9573
|
|
34
46
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6827913
|
|
35
47
|
useEffect(function () {
|
|
36
48
|
if (currentCloudId.current !== cloudId) {
|
|
37
49
|
setSearchBarSearchString('');
|
|
50
|
+
setFilterSelections({});
|
|
38
51
|
currentCloudId.current = cloudId;
|
|
39
52
|
}
|
|
40
53
|
}, [cloudId]);
|
|
41
|
-
var handleBasicFilterSelectionChange = useCallback(function (filterType, options) {
|
|
42
|
-
var updatedSelection = _objectSpread(_objectSpread({}, filterSelections), {}, _defineProperty({}, filterType, options));
|
|
43
|
-
setFilterSelections(updatedSelection);
|
|
44
|
-
//TODO: move to debounce fn in https://product-fabric.atlassian.net/browse/EDM-9485
|
|
45
|
-
onSearch(searchBarSearchString, updatedSelection);
|
|
46
|
-
}, [filterSelections, onSearch, searchBarSearchString]);
|
|
47
54
|
var showBasicFilters = useMemo(function () {
|
|
48
55
|
if (getBooleanFF('platform.linking-platform.datasource.show-clol-basic-filters')) {
|
|
49
56
|
return true;
|
|
@@ -62,6 +69,8 @@ var ConfluenceSearchContainer = function ConfluenceSearchContainer(_ref) {
|
|
|
62
69
|
placeholder: searchMessages.searchLabel,
|
|
63
70
|
fullWidth: !showBasicFilters
|
|
64
71
|
}), showBasicFilters && /*#__PURE__*/React.createElement(BasicFilters, {
|
|
72
|
+
cloudId: cloudId,
|
|
73
|
+
selections: filterSelections,
|
|
65
74
|
onChange: handleBasicFilterSelectionChange
|
|
66
75
|
}));
|
|
67
76
|
};
|
|
@@ -99,10 +99,14 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
99
99
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
100
100
|
visibleColumnKeys = _useState10[0],
|
|
101
101
|
setVisibleColumnKeys = _useState10[1];
|
|
102
|
-
var _useState11 = useState(),
|
|
102
|
+
var _useState11 = useState(initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.lastModified),
|
|
103
103
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
104
104
|
lastModified = _useState12[0],
|
|
105
105
|
setLastModified = _useState12[1];
|
|
106
|
+
var _useState13 = useState((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.contributorAccountIds) || []),
|
|
107
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
108
|
+
contributorAccountIds = _useState14[0],
|
|
109
|
+
setContributorAccountIds = _useState14[1];
|
|
106
110
|
|
|
107
111
|
// analytics related parameters
|
|
108
112
|
var searchCount = useRef(0);
|
|
@@ -112,13 +116,15 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
112
116
|
// TODO: further refactoring in EDM-9573
|
|
113
117
|
// https://stash.atlassian.com/projects/ATLASSIAN/repos/atlassian-frontend-monorepo/pull-requests/82725/overview?commentId=6829210
|
|
114
118
|
var parameters = useMemo(function () {
|
|
115
|
-
return _objectSpread(_objectSpread({}, initialParameters), {}, {
|
|
119
|
+
return _objectSpread(_objectSpread(_objectSpread({}, initialParameters), {}, {
|
|
116
120
|
cloudId: cloudId,
|
|
117
121
|
searchString: searchString
|
|
118
|
-
}, lastModified && {
|
|
122
|
+
}, ((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.lastModified) || lastModified) && {
|
|
119
123
|
lastModified: lastModified
|
|
124
|
+
}), ((initialParameters === null || initialParameters === void 0 ? void 0 : initialParameters.contributorAccountIds) || (contributorAccountIds === null || contributorAccountIds === void 0 ? void 0 : contributorAccountIds.length) > 0) && {
|
|
125
|
+
contributorAccountIds: contributorAccountIds
|
|
120
126
|
});
|
|
121
|
-
}, [cloudId, lastModified, initialParameters, searchString /** Add more parameters when more filters are added */]);
|
|
127
|
+
}, [cloudId, lastModified, contributorAccountIds, initialParameters, searchString /** Add more parameters when more filters are added */]);
|
|
122
128
|
var isParametersSet = useMemo(function () {
|
|
123
129
|
return !!cloudId && Object.values(parameters !== null && parameters !== void 0 ? parameters : {}).filter(function (v) {
|
|
124
130
|
return v !== undefined;
|
|
@@ -182,6 +188,8 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
182
188
|
var onSiteSelection = useCallback(function (site) {
|
|
183
189
|
userInteractionActions.current.add(DatasourceAction.INSTANCE_UPDATED);
|
|
184
190
|
setSearchString(undefined);
|
|
191
|
+
setLastModified(undefined);
|
|
192
|
+
setContributorAccountIds([]);
|
|
185
193
|
setCloudId(site.cloudId);
|
|
186
194
|
reset({
|
|
187
195
|
shouldForceRequest: true
|
|
@@ -224,17 +232,17 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
224
232
|
setVisibleColumnKeys(newVisibleColumnKeys);
|
|
225
233
|
}, [initialVisibleColumnKeys, defaultVisibleColumnKeys]);
|
|
226
234
|
var siteSelectorLabel = availableSites && availableSites.length > 1 ? confluenceSearchModalMessages.insertIssuesTitleManySites : confluenceSearchModalMessages.insertIssuesTitle;
|
|
227
|
-
var
|
|
228
|
-
|
|
229
|
-
columnCustomSizes =
|
|
230
|
-
setColumnCustomSizes =
|
|
235
|
+
var _useState15 = useState(initialColumnCustomSizes),
|
|
236
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
237
|
+
columnCustomSizes = _useState16[0],
|
|
238
|
+
setColumnCustomSizes = _useState16[1];
|
|
231
239
|
var onColumnResize = useCallback(function (key, width) {
|
|
232
240
|
setColumnCustomSizes(_objectSpread(_objectSpread({}, columnCustomSizes), {}, _defineProperty({}, key, width)));
|
|
233
241
|
}, [columnCustomSizes]);
|
|
234
|
-
var
|
|
235
|
-
|
|
236
|
-
wrappedColumnKeys =
|
|
237
|
-
setWrappedColumnKeys =
|
|
242
|
+
var _useState17 = useState(initialWrappedColumnKeys),
|
|
243
|
+
_useState18 = _slicedToArray(_useState17, 2),
|
|
244
|
+
wrappedColumnKeys = _useState18[0],
|
|
245
|
+
setWrappedColumnKeys = _useState18[1];
|
|
238
246
|
var onWrappedColumnChange = useCallback(function (key, isWrapped) {
|
|
239
247
|
var set = new Set(wrappedColumnKeys);
|
|
240
248
|
if (isWrapped) {
|
|
@@ -416,11 +424,21 @@ export var PlainConfluenceSearchConfigModal = function PlainConfluenceSearchConf
|
|
|
416
424
|
var onSearch = useCallback(function (newSearchString, filters) {
|
|
417
425
|
searchCount.current++;
|
|
418
426
|
userInteractionActions.current.add(DatasourceAction.QUERY_UPDATED);
|
|
419
|
-
if (filters
|
|
420
|
-
var
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
427
|
+
if (filters) {
|
|
428
|
+
var editedOrCreatedBy = filters.editedOrCreatedBy,
|
|
429
|
+
_lastModified = filters.lastModified;
|
|
430
|
+
if (_lastModified) {
|
|
431
|
+
var lastModifiedValue = _lastModified.find(function (range) {
|
|
432
|
+
return range.value;
|
|
433
|
+
});
|
|
434
|
+
setLastModified(lastModifiedValue === null || lastModifiedValue === void 0 ? void 0 : lastModifiedValue.value);
|
|
435
|
+
}
|
|
436
|
+
if (editedOrCreatedBy) {
|
|
437
|
+
var accountIds = editedOrCreatedBy.map(function (user) {
|
|
438
|
+
return user.value;
|
|
439
|
+
});
|
|
440
|
+
setContributorAccountIds(accountIds);
|
|
441
|
+
}
|
|
424
442
|
}
|
|
425
443
|
setSearchString(newSearchString);
|
|
426
444
|
reset({
|
|
@@ -1,3 +1,54 @@
|
|
|
1
1
|
import { FieldValuesResponse, HydrateResponse } from '../ui/jira-issues-modal/basic-filters/types';
|
|
2
2
|
export declare const mockHydrateJqlResponse: HydrateResponse;
|
|
3
3
|
export declare const mockFieldValuesResponse: FieldValuesResponse;
|
|
4
|
+
export declare const mockUserRecommendationsResponse: {
|
|
5
|
+
recommendedUsers: ({
|
|
6
|
+
entityType: string;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
avatarUrl: string;
|
|
10
|
+
nickname: string;
|
|
11
|
+
matchPositions: {};
|
|
12
|
+
accessLevel: string;
|
|
13
|
+
accountStatus: string;
|
|
14
|
+
notMentionable: boolean;
|
|
15
|
+
userType: string;
|
|
16
|
+
attributes: {
|
|
17
|
+
isConfluenceExternalCollaborator: boolean;
|
|
18
|
+
};
|
|
19
|
+
email?: undefined;
|
|
20
|
+
locale?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
entityType: string;
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
email: string;
|
|
26
|
+
avatarUrl: string;
|
|
27
|
+
nickname: string;
|
|
28
|
+
matchPositions: {};
|
|
29
|
+
accessLevel: string;
|
|
30
|
+
accountStatus: string;
|
|
31
|
+
notMentionable: boolean;
|
|
32
|
+
locale: string;
|
|
33
|
+
userType: string;
|
|
34
|
+
attributes: {
|
|
35
|
+
isConfluenceExternalCollaborator: boolean;
|
|
36
|
+
};
|
|
37
|
+
} | {
|
|
38
|
+
entityType: string;
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
avatarUrl: string;
|
|
42
|
+
nickname: string;
|
|
43
|
+
matchPositions: {};
|
|
44
|
+
accessLevel: string;
|
|
45
|
+
accountStatus: string;
|
|
46
|
+
notMentionable: boolean;
|
|
47
|
+
locale: string;
|
|
48
|
+
userType: string;
|
|
49
|
+
attributes: {
|
|
50
|
+
isConfluenceExternalCollaborator: boolean;
|
|
51
|
+
};
|
|
52
|
+
email?: undefined;
|
|
53
|
+
})[];
|
|
54
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UserInfoAGGResponse } from '../ui/confluence-search-modal/basic-filters/types';
|
|
1
2
|
import { BasicFilterFieldType, FieldValuesResponse, HydrateResponse } from '../ui/jira-issues-modal/basic-filters/types';
|
|
2
3
|
interface GetFieldValuesProps {
|
|
3
4
|
cloudId: string;
|
|
@@ -9,5 +10,6 @@ interface GetFieldValuesProps {
|
|
|
9
10
|
export declare const useBasicFilterAGG: () => {
|
|
10
11
|
getHydratedJQL: (cloudId: string, jql: string) => Promise<HydrateResponse>;
|
|
11
12
|
getFieldValues: ({ cloudId, jql, jqlTerm, searchString, pageCursor, }: GetFieldValuesProps) => Promise<FieldValuesResponse>;
|
|
13
|
+
getCurrentUserInfo: () => Promise<UserInfoAGGResponse>;
|
|
12
14
|
};
|
|
13
15
|
export {};
|
|
@@ -6,3 +6,4 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const hydrateJQLQuery = "query hydrate($cloudId: ID!, $jql: String!) {\n jira {\n jqlBuilder(cloudId: $cloudId) {\n hydrateJqlQuery(query: $jql) {\n ... on JiraJqlHydratedQuery {\n fields {\n ... on JiraJqlQueryHydratedField {\n jqlTerm\n values {\n ... on JiraJqlQueryHydratedValue {\n values {\n ... on JiraJqlProjectFieldValue {\n jqlTerm\n displayName\n project {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlStatusFieldValue {\n jqlTerm\n displayName\n statusCategory {\n colorName\n }\n }\n ... on JiraJqlIssueTypeFieldValue {\n jqlTerm\n displayName\n issueTypes {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlUserFieldValue {\n jqlTerm\n displayName\n user {\n picture\n }\n }\n ... on JiraJqlGroupFieldValue {\n jqlTerm\n displayName\n group {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}";
|
|
8
8
|
export declare const fieldValuesQuery = "query fieldValues($cloudId: ID!, $first: Int = 10, $jqlTerm: String!, $jql: String!, $searchString: String!, $after: String) {\n jira {\n jqlBuilder(cloudId: $cloudId) {\n fieldValues(\n first: $first\n jqlTerm: $jqlTerm\n jqlContext: $jql\n searchString: $searchString\n after: $after\n ) {\n totalCount\n pageInfo {\n endCursor\n }\n edges {\n node {\n jqlTerm\n displayName\n ... on JiraJqlProjectFieldValue {\n project {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlIssueTypeFieldValue {\n issueTypes {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlStatusFieldValue {\n statusCategory {\n colorName\n }\n }\n ... on JiraJqlUserFieldValue {\n user {\n picture\n }\n }\n ... on JiraJqlGroupFieldValue {\n group {\n name\n }\n }\n }\n }\n }\n }\n }\n}";
|
|
9
|
+
export declare const userQuery = "query userQuery {\n me {\n user {\n id\n accountId\n }\n }\n}";
|
|
@@ -4,7 +4,7 @@ import { CustomMenuListProps } from './menu-list';
|
|
|
4
4
|
import { SelectOption } from './types';
|
|
5
5
|
export interface FilterPopupSelectProps {
|
|
6
6
|
buttonLabel: string;
|
|
7
|
-
totalCount
|
|
7
|
+
totalCount?: number;
|
|
8
8
|
filterName: string;
|
|
9
9
|
isDisabled: boolean;
|
|
10
10
|
showLoading: boolean;
|
package/dist/types/ui/confluence-search-modal/basic-filters/filters/edited-or-created-by/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectOption } from '../../../../common/modal/popup-select/types';
|
|
3
|
+
import { CLOLBasicFilters } from '../../types';
|
|
4
|
+
interface EditedOrCreatedByFilterProps {
|
|
5
|
+
cloudId?: string;
|
|
6
|
+
selection: SelectOption[];
|
|
7
|
+
onSelectionChange: (filterType: CLOLBasicFilters, selection: SelectOption[]) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const EditedOrCreatedByFilter: ({ cloudId, onSelectionChange, selection, }: EditedOrCreatedByFilterProps) => JSX.Element;
|
|
10
|
+
export default EditedOrCreatedByFilter;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterPopupSelectProps } from '../../../common/modal/popup-select';
|
|
2
|
+
import { SelectOption } from '../../../common/modal/popup-select/types';
|
|
3
|
+
interface FetchFilterOptionsProps {
|
|
4
|
+
cloudId: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
searchTerm: string;
|
|
7
|
+
}
|
|
8
|
+
interface UserRecommendationState {
|
|
9
|
+
filterOptions: SelectOption[];
|
|
10
|
+
reset: () => void;
|
|
11
|
+
status: FilterPopupSelectProps['status'];
|
|
12
|
+
errors: unknown[];
|
|
13
|
+
fetchFilterOptions: (prop: FetchFilterOptionsProps) => Promise<any>;
|
|
14
|
+
}
|
|
15
|
+
declare const useRecommendation: () => UserRecommendationState;
|
|
16
|
+
export default useRecommendation;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SelectOption } from '../../common/modal/popup-select/types';
|
|
3
|
-
import { CLOLBasicFilters } from './types';
|
|
3
|
+
import { CLOLBasicFilters, SelectedOptionsMap } from './types';
|
|
4
4
|
export interface BasicFilterContainerProps {
|
|
5
|
+
cloudId?: string;
|
|
6
|
+
selections: SelectedOptionsMap;
|
|
5
7
|
onChange: (filterType: CLOLBasicFilters, options: SelectOption[]) => void;
|
|
6
8
|
}
|
|
7
|
-
declare const BasicFilterContainer: ({ onChange }: BasicFilterContainerProps) => JSX.Element;
|
|
9
|
+
declare const BasicFilterContainer: ({ cloudId, onChange, selections, }: BasicFilterContainerProps) => JSX.Element;
|
|
8
10
|
export default BasicFilterContainer;
|
|
@@ -1,3 +1,54 @@
|
|
|
1
1
|
import { FieldValuesResponse, HydrateResponse } from '../ui/jira-issues-modal/basic-filters/types';
|
|
2
2
|
export declare const mockHydrateJqlResponse: HydrateResponse;
|
|
3
3
|
export declare const mockFieldValuesResponse: FieldValuesResponse;
|
|
4
|
+
export declare const mockUserRecommendationsResponse: {
|
|
5
|
+
recommendedUsers: ({
|
|
6
|
+
entityType: string;
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
avatarUrl: string;
|
|
10
|
+
nickname: string;
|
|
11
|
+
matchPositions: {};
|
|
12
|
+
accessLevel: string;
|
|
13
|
+
accountStatus: string;
|
|
14
|
+
notMentionable: boolean;
|
|
15
|
+
userType: string;
|
|
16
|
+
attributes: {
|
|
17
|
+
isConfluenceExternalCollaborator: boolean;
|
|
18
|
+
};
|
|
19
|
+
email?: undefined;
|
|
20
|
+
locale?: undefined;
|
|
21
|
+
} | {
|
|
22
|
+
entityType: string;
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
email: string;
|
|
26
|
+
avatarUrl: string;
|
|
27
|
+
nickname: string;
|
|
28
|
+
matchPositions: {};
|
|
29
|
+
accessLevel: string;
|
|
30
|
+
accountStatus: string;
|
|
31
|
+
notMentionable: boolean;
|
|
32
|
+
locale: string;
|
|
33
|
+
userType: string;
|
|
34
|
+
attributes: {
|
|
35
|
+
isConfluenceExternalCollaborator: boolean;
|
|
36
|
+
};
|
|
37
|
+
} | {
|
|
38
|
+
entityType: string;
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
avatarUrl: string;
|
|
42
|
+
nickname: string;
|
|
43
|
+
matchPositions: {};
|
|
44
|
+
accessLevel: string;
|
|
45
|
+
accountStatus: string;
|
|
46
|
+
notMentionable: boolean;
|
|
47
|
+
locale: string;
|
|
48
|
+
userType: string;
|
|
49
|
+
attributes: {
|
|
50
|
+
isConfluenceExternalCollaborator: boolean;
|
|
51
|
+
};
|
|
52
|
+
email?: undefined;
|
|
53
|
+
})[];
|
|
54
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UserInfoAGGResponse } from '../ui/confluence-search-modal/basic-filters/types';
|
|
1
2
|
import { BasicFilterFieldType, FieldValuesResponse, HydrateResponse } from '../ui/jira-issues-modal/basic-filters/types';
|
|
2
3
|
interface GetFieldValuesProps {
|
|
3
4
|
cloudId: string;
|
|
@@ -9,5 +10,6 @@ interface GetFieldValuesProps {
|
|
|
9
10
|
export declare const useBasicFilterAGG: () => {
|
|
10
11
|
getHydratedJQL: (cloudId: string, jql: string) => Promise<HydrateResponse>;
|
|
11
12
|
getFieldValues: ({ cloudId, jql, jqlTerm, searchString, pageCursor, }: GetFieldValuesProps) => Promise<FieldValuesResponse>;
|
|
13
|
+
getCurrentUserInfo: () => Promise<UserInfoAGGResponse>;
|
|
12
14
|
};
|
|
13
15
|
export {};
|
|
@@ -6,3 +6,4 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const hydrateJQLQuery = "query hydrate($cloudId: ID!, $jql: String!) {\n jira {\n jqlBuilder(cloudId: $cloudId) {\n hydrateJqlQuery(query: $jql) {\n ... on JiraJqlHydratedQuery {\n fields {\n ... on JiraJqlQueryHydratedField {\n jqlTerm\n values {\n ... on JiraJqlQueryHydratedValue {\n values {\n ... on JiraJqlProjectFieldValue {\n jqlTerm\n displayName\n project {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlStatusFieldValue {\n jqlTerm\n displayName\n statusCategory {\n colorName\n }\n }\n ... on JiraJqlIssueTypeFieldValue {\n jqlTerm\n displayName\n issueTypes {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlUserFieldValue {\n jqlTerm\n displayName\n user {\n picture\n }\n }\n ... on JiraJqlGroupFieldValue {\n jqlTerm\n displayName\n group {\n name\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}";
|
|
8
8
|
export declare const fieldValuesQuery = "query fieldValues($cloudId: ID!, $first: Int = 10, $jqlTerm: String!, $jql: String!, $searchString: String!, $after: String) {\n jira {\n jqlBuilder(cloudId: $cloudId) {\n fieldValues(\n first: $first\n jqlTerm: $jqlTerm\n jqlContext: $jql\n searchString: $searchString\n after: $after\n ) {\n totalCount\n pageInfo {\n endCursor\n }\n edges {\n node {\n jqlTerm\n displayName\n ... on JiraJqlProjectFieldValue {\n project {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlIssueTypeFieldValue {\n issueTypes {\n avatar {\n small\n }\n }\n }\n ... on JiraJqlStatusFieldValue {\n statusCategory {\n colorName\n }\n }\n ... on JiraJqlUserFieldValue {\n user {\n picture\n }\n }\n ... on JiraJqlGroupFieldValue {\n group {\n name\n }\n }\n }\n }\n }\n }\n }\n}";
|
|
9
|
+
export declare const userQuery = "query userQuery {\n me {\n user {\n id\n accountId\n }\n }\n}";
|
|
@@ -4,7 +4,7 @@ import { CustomMenuListProps } from './menu-list';
|
|
|
4
4
|
import { SelectOption } from './types';
|
|
5
5
|
export interface FilterPopupSelectProps {
|
|
6
6
|
buttonLabel: string;
|
|
7
|
-
totalCount
|
|
7
|
+
totalCount?: number;
|
|
8
8
|
filterName: string;
|
|
9
9
|
isDisabled: boolean;
|
|
10
10
|
showLoading: boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SelectOption } from '../../../../common/modal/popup-select/types';
|
|
3
|
+
import { CLOLBasicFilters } from '../../types';
|
|
4
|
+
interface EditedOrCreatedByFilterProps {
|
|
5
|
+
cloudId?: string;
|
|
6
|
+
selection: SelectOption[];
|
|
7
|
+
onSelectionChange: (filterType: CLOLBasicFilters, selection: SelectOption[]) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const EditedOrCreatedByFilter: ({ cloudId, onSelectionChange, selection, }: EditedOrCreatedByFilterProps) => JSX.Element;
|
|
10
|
+
export default EditedOrCreatedByFilter;
|
package/dist/types-ts4.5/ui/confluence-search-modal/basic-filters/hooks/useRecommendation.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FilterPopupSelectProps } from '../../../common/modal/popup-select';
|
|
2
|
+
import { SelectOption } from '../../../common/modal/popup-select/types';
|
|
3
|
+
interface FetchFilterOptionsProps {
|
|
4
|
+
cloudId: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
searchTerm: string;
|
|
7
|
+
}
|
|
8
|
+
interface UserRecommendationState {
|
|
9
|
+
filterOptions: SelectOption[];
|
|
10
|
+
reset: () => void;
|
|
11
|
+
status: FilterPopupSelectProps['status'];
|
|
12
|
+
errors: unknown[];
|
|
13
|
+
fetchFilterOptions: (prop: FetchFilterOptionsProps) => Promise<any>;
|
|
14
|
+
}
|
|
15
|
+
declare const useRecommendation: () => UserRecommendationState;
|
|
16
|
+
export default useRecommendation;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SelectOption } from '../../common/modal/popup-select/types';
|
|
3
|
-
import { CLOLBasicFilters } from './types';
|
|
3
|
+
import { CLOLBasicFilters, SelectedOptionsMap } from './types';
|
|
4
4
|
export interface BasicFilterContainerProps {
|
|
5
|
+
cloudId?: string;
|
|
6
|
+
selections: SelectedOptionsMap;
|
|
5
7
|
onChange: (filterType: CLOLBasicFilters, options: SelectOption[]) => void;
|
|
6
8
|
}
|
|
7
|
-
declare const BasicFilterContainer: ({ onChange }: BasicFilterContainerProps) => JSX.Element;
|
|
9
|
+
declare const BasicFilterContainer: ({ cloudId, onChange, selections, }: BasicFilterContainerProps) => JSX.Element;
|
|
8
10
|
export default BasicFilterContainer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/link-datasource",
|
|
3
|
-
"version": "1.28.
|
|
3
|
+
"version": "1.28.1",
|
|
4
4
|
"description": "UI Components to support linking platform dataset feature",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@atlaskit/editor-prosemirror": "3.0.0",
|
|
42
42
|
"@atlaskit/empty-state": "^7.8.0",
|
|
43
43
|
"@atlaskit/form": "^9.2.0",
|
|
44
|
-
"@atlaskit/heading": "^2.
|
|
44
|
+
"@atlaskit/heading": "^2.2.0",
|
|
45
45
|
"@atlaskit/icon": "^22.1.0",
|
|
46
46
|
"@atlaskit/icon-object": "^6.3.0",
|
|
47
47
|
"@atlaskit/image": "^1.1.0",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"@atlaskit/primitives": "^5.5.0",
|
|
66
66
|
"@atlaskit/select": "^17.6.0",
|
|
67
67
|
"@atlaskit/smart-card": "^26.56.0",
|
|
68
|
+
"@atlaskit/smart-user-picker": "6.9.2",
|
|
68
69
|
"@atlaskit/spinner": "^16.0.0",
|
|
69
70
|
"@atlaskit/tag": "^12.0.0",
|
|
70
71
|
"@atlaskit/textfield": "6.1.3",
|