@atlaskit/smart-hooks 0.2.6 → 0.2.7
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 +20 -14
- package/dist/cjs/i18n/cs.js +2 -3
- package/dist/cjs/i18n/da.js +2 -3
- package/dist/cjs/i18n/de.js +2 -3
- package/dist/cjs/i18n/en.js +2 -3
- package/dist/cjs/i18n/en_GB.js +2 -3
- package/dist/cjs/i18n/en_ZZ.js +2 -3
- package/dist/cjs/i18n/es.js +2 -3
- package/dist/cjs/i18n/et.js +1 -2
- package/dist/cjs/i18n/fi.js +2 -3
- package/dist/cjs/i18n/fr.js +2 -3
- package/dist/cjs/i18n/hu.js +2 -3
- package/dist/cjs/i18n/is.js +2 -3
- package/dist/cjs/i18n/it.js +2 -3
- package/dist/cjs/i18n/ja.js +2 -3
- package/dist/cjs/i18n/ko.js +2 -3
- package/dist/cjs/i18n/languages.js +2 -3
- package/dist/cjs/i18n/nb.js +2 -3
- package/dist/cjs/i18n/nl.js +2 -3
- package/dist/cjs/i18n/pl.js +2 -3
- package/dist/cjs/i18n/pt_BR.js +2 -3
- package/dist/cjs/i18n/pt_PT.js +1 -2
- package/dist/cjs/i18n/ro.js +2 -3
- package/dist/cjs/i18n/ru.js +2 -3
- package/dist/cjs/i18n/sk.js +1 -2
- package/dist/cjs/i18n/sv.js +2 -3
- package/dist/cjs/i18n/th.js +2 -3
- package/dist/cjs/i18n/tr.js +2 -3
- package/dist/cjs/i18n/uk.js +2 -3
- package/dist/cjs/i18n/vi.js +2 -3
- package/dist/cjs/i18n/zh.js +2 -3
- package/dist/cjs/i18n/zh_TW.js +2 -3
- package/dist/cjs/messages.js +2 -3
- package/dist/cjs/services/use-function-usage-tracking/index.js +1 -2
- package/dist/cjs/services/use-user-recommendations/analytics.js +7 -10
- package/dist/cjs/services/use-user-recommendations/index.js +5 -7
- package/dist/cjs/services/use-user-recommendations/ufoExperiences.js +2 -3
- package/dist/cjs/utils/transform-recommendations-to-options/index.js +2 -3
- package/dist/es2019/services/use-user-recommendations/analytics.js +1 -1
- package/dist/esm/services/use-user-recommendations/analytics.js +3 -3
- package/dist/esm/services/use-user-recommendations/index.js +3 -3
- package/package.json +2 -3
- package/dist/types-ts4.5/i18n/cs.d.ts +0 -18
- package/dist/types-ts4.5/i18n/da.d.ts +0 -18
- package/dist/types-ts4.5/i18n/de.d.ts +0 -18
- package/dist/types-ts4.5/i18n/en.d.ts +0 -18
- package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -18
- package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -18
- package/dist/types-ts4.5/i18n/es.d.ts +0 -18
- package/dist/types-ts4.5/i18n/et.d.ts +0 -8
- package/dist/types-ts4.5/i18n/fi.d.ts +0 -18
- package/dist/types-ts4.5/i18n/fr.d.ts +0 -18
- package/dist/types-ts4.5/i18n/hu.d.ts +0 -18
- package/dist/types-ts4.5/i18n/index.d.ts +0 -36
- package/dist/types-ts4.5/i18n/is.d.ts +0 -7
- package/dist/types-ts4.5/i18n/it.d.ts +0 -18
- package/dist/types-ts4.5/i18n/ja.d.ts +0 -18
- package/dist/types-ts4.5/i18n/ko.d.ts +0 -18
- package/dist/types-ts4.5/i18n/languages.d.ts +0 -27
- package/dist/types-ts4.5/i18n/nb.d.ts +0 -18
- package/dist/types-ts4.5/i18n/nl.d.ts +0 -18
- package/dist/types-ts4.5/i18n/pl.d.ts +0 -18
- package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -18
- package/dist/types-ts4.5/i18n/pt_PT.d.ts +0 -8
- package/dist/types-ts4.5/i18n/ro.d.ts +0 -7
- package/dist/types-ts4.5/i18n/ru.d.ts +0 -18
- package/dist/types-ts4.5/i18n/sk.d.ts +0 -8
- package/dist/types-ts4.5/i18n/sv.d.ts +0 -18
- package/dist/types-ts4.5/i18n/th.d.ts +0 -18
- package/dist/types-ts4.5/i18n/tr.d.ts +0 -18
- package/dist/types-ts4.5/i18n/uk.d.ts +0 -18
- package/dist/types-ts4.5/i18n/vi.d.ts +0 -18
- package/dist/types-ts4.5/i18n/zh.d.ts +0 -18
- package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -18
- package/dist/types-ts4.5/index.d.ts +0 -3
- package/dist/types-ts4.5/messages.d.ts +0 -47
- package/dist/types-ts4.5/services/use-function-usage-tracking/index.d.ts +0 -5
- package/dist/types-ts4.5/services/use-user-recommendations/analytics.d.ts +0 -20
- package/dist/types-ts4.5/services/use-user-recommendations/index.d.ts +0 -21
- package/dist/types-ts4.5/services/use-user-recommendations/ufoExperiences.d.ts +0 -2
- package/dist/types-ts4.5/types.d.ts +0 -91
- package/dist/types-ts4.5/utils/transform-recommendations-to-options/index.d.ts +0 -5
- package/tmp/api-report-tmp.d.ts +0 -54
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'smart-experiences.smart-hooks.external.sourced.from': string;
|
|
9
|
-
'smart-experiences.smart-hooks.github.provider': string;
|
|
10
|
-
'smart-experiences.smart-hooks.google.provider': string;
|
|
11
|
-
'smart-experiences.smart-hooks.guest.lozenge.text': string;
|
|
12
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
|
|
13
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
|
|
14
|
-
'smart-experiences.smart-hooks.member.lozenge.text': string;
|
|
15
|
-
'smart-experiences.smart-hooks.microsoft.provider': string;
|
|
16
|
-
'smart-experiences.smart-hooks.slack.provider': string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'smart-experiences.smart-hooks.external.sourced.from': string;
|
|
9
|
-
'smart-experiences.smart-hooks.github.provider': string;
|
|
10
|
-
'smart-experiences.smart-hooks.google.provider': string;
|
|
11
|
-
'smart-experiences.smart-hooks.guest.lozenge.text': string;
|
|
12
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
|
|
13
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
|
|
14
|
-
'smart-experiences.smart-hooks.member.lozenge.text': string;
|
|
15
|
-
'smart-experiences.smart-hooks.microsoft.provider': string;
|
|
16
|
-
'smart-experiences.smart-hooks.slack.provider': string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'smart-experiences.smart-hooks.external.sourced.from': string;
|
|
9
|
-
'smart-experiences.smart-hooks.github.provider': string;
|
|
10
|
-
'smart-experiences.smart-hooks.google.provider': string;
|
|
11
|
-
'smart-experiences.smart-hooks.guest.lozenge.text': string;
|
|
12
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
|
|
13
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
|
|
14
|
-
'smart-experiences.smart-hooks.member.lozenge.text': string;
|
|
15
|
-
'smart-experiences.smart-hooks.microsoft.provider': string;
|
|
16
|
-
'smart-experiences.smart-hooks.slack.provider': string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'smart-experiences.smart-hooks.external.sourced.from': string;
|
|
9
|
-
'smart-experiences.smart-hooks.github.provider': string;
|
|
10
|
-
'smart-experiences.smart-hooks.google.provider': string;
|
|
11
|
-
'smart-experiences.smart-hooks.guest.lozenge.text': string;
|
|
12
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
|
|
13
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
|
|
14
|
-
'smart-experiences.smart-hooks.member.lozenge.text': string;
|
|
15
|
-
'smart-experiences.smart-hooks.microsoft.provider': string;
|
|
16
|
-
'smart-experiences.smart-hooks.slack.provider': string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'smart-experiences.smart-hooks.external.sourced.from': string;
|
|
9
|
-
'smart-experiences.smart-hooks.github.provider': string;
|
|
10
|
-
'smart-experiences.smart-hooks.google.provider': string;
|
|
11
|
-
'smart-experiences.smart-hooks.guest.lozenge.text': string;
|
|
12
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
|
|
13
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
|
|
14
|
-
'smart-experiences.smart-hooks.member.lozenge.text': string;
|
|
15
|
-
'smart-experiences.smart-hooks.microsoft.provider': string;
|
|
16
|
-
'smart-experiences.smart-hooks.slack.provider': string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'smart-experiences.smart-hooks.external.sourced.from': string;
|
|
9
|
-
'smart-experiences.smart-hooks.github.provider': string;
|
|
10
|
-
'smart-experiences.smart-hooks.google.provider': string;
|
|
11
|
-
'smart-experiences.smart-hooks.guest.lozenge.text': string;
|
|
12
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
|
|
13
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
|
|
14
|
-
'smart-experiences.smart-hooks.member.lozenge.text': string;
|
|
15
|
-
'smart-experiences.smart-hooks.microsoft.provider': string;
|
|
16
|
-
'smart-experiences.smart-hooks.slack.provider': string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'smart-experiences.smart-hooks.external.sourced.from': string;
|
|
9
|
-
'smart-experiences.smart-hooks.github.provider': string;
|
|
10
|
-
'smart-experiences.smart-hooks.google.provider': string;
|
|
11
|
-
'smart-experiences.smart-hooks.guest.lozenge.text': string;
|
|
12
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
|
|
13
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
|
|
14
|
-
'smart-experiences.smart-hooks.member.lozenge.text': string;
|
|
15
|
-
'smart-experiences.smart-hooks.microsoft.provider': string;
|
|
16
|
-
'smart-experiences.smart-hooks.slack.provider': string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* NOTE:
|
|
3
|
-
*
|
|
4
|
-
* This file is automatically generated by Traduki 2.0.
|
|
5
|
-
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
6
|
-
*/
|
|
7
|
-
declare const _default: {
|
|
8
|
-
'smart-experiences.smart-hooks.external.sourced.from': string;
|
|
9
|
-
'smart-experiences.smart-hooks.github.provider': string;
|
|
10
|
-
'smart-experiences.smart-hooks.google.provider': string;
|
|
11
|
-
'smart-experiences.smart-hooks.guest.lozenge.text': string;
|
|
12
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
|
|
13
|
-
'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
|
|
14
|
-
'smart-experiences.smart-hooks.member.lozenge.text': string;
|
|
15
|
-
'smart-experiences.smart-hooks.microsoft.provider': string;
|
|
16
|
-
'smart-experiences.smart-hooks.slack.provider': string;
|
|
17
|
-
};
|
|
18
|
-
export default _default;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
export declare const messages: {
|
|
2
|
-
externalUserSourcesHeading: {
|
|
3
|
-
id: string;
|
|
4
|
-
defaultMessage: string;
|
|
5
|
-
description: string;
|
|
6
|
-
};
|
|
7
|
-
slackProvider: {
|
|
8
|
-
id: string;
|
|
9
|
-
defaultMessage: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
googleProvider: {
|
|
13
|
-
id: string;
|
|
14
|
-
defaultMessage: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
microsoftProvider: {
|
|
18
|
-
id: string;
|
|
19
|
-
defaultMessage: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
gitHubProvider: {
|
|
23
|
-
id: string;
|
|
24
|
-
defaultMessage: string;
|
|
25
|
-
description: string;
|
|
26
|
-
};
|
|
27
|
-
memberLozengeText: {
|
|
28
|
-
id: string;
|
|
29
|
-
defaultMessage: string;
|
|
30
|
-
description: string;
|
|
31
|
-
};
|
|
32
|
-
guestLozengeText: {
|
|
33
|
-
id: string;
|
|
34
|
-
defaultMessage: string;
|
|
35
|
-
description: string;
|
|
36
|
-
};
|
|
37
|
-
guestUserLozengeTooltip: {
|
|
38
|
-
id: string;
|
|
39
|
-
defaultMessage: string;
|
|
40
|
-
description: string;
|
|
41
|
-
};
|
|
42
|
-
guestGroupLozengeTooltip: {
|
|
43
|
-
id: string;
|
|
44
|
-
defaultMessage: string;
|
|
45
|
-
description: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
declare function useFunctionUsageTracking<InputFunctionType extends (...any: any) => any>(trackedFunction: InputFunctionType): {
|
|
2
|
-
isUsed: boolean;
|
|
3
|
-
trackingFunction: import("memoize-one").MemoizedFn<() => InputFunctionType>;
|
|
4
|
-
};
|
|
5
|
-
export default useFunctionUsageTracking;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { AnalyticsEventPayload, CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import { UserSearchItem } from '@atlaskit/smart-common';
|
|
3
|
-
import { UseUserRecommendationsProps } from '../../types';
|
|
4
|
-
export declare const findUserPosition: (loadedUsers: UserSearchItem[], userId: string) => number;
|
|
5
|
-
export declare const createDefaultAttributes: (props: UseUserRecommendationsProps, renderId: string, sessionId: string, query: string) => {
|
|
6
|
-
context: string;
|
|
7
|
-
childObjectId: string | undefined;
|
|
8
|
-
containerId: string | undefined;
|
|
9
|
-
includeTeams: boolean | undefined;
|
|
10
|
-
maxNumberOfResults: number | undefined;
|
|
11
|
-
objectId: string | undefined;
|
|
12
|
-
preload: boolean | undefined;
|
|
13
|
-
principalId: string | undefined;
|
|
14
|
-
productKey: string;
|
|
15
|
-
queryLength: number;
|
|
16
|
-
renderId: string;
|
|
17
|
-
sessionId: string;
|
|
18
|
-
tenantId: string;
|
|
19
|
-
};
|
|
20
|
-
export declare const fireUserSelectedEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, payloadAttributes: AnalyticsEventPayload) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { EntityType, UserSearchItem } from '@atlaskit/smart-common';
|
|
2
|
-
import type { UseUserRecommendationsProps } from '../../types';
|
|
3
|
-
export declare const instrumentFailureOption: {
|
|
4
|
-
id: string;
|
|
5
|
-
name: string;
|
|
6
|
-
entityType: EntityType;
|
|
7
|
-
avatarUrl: string;
|
|
8
|
-
}[];
|
|
9
|
-
declare const useUserRecommendations: (props: UseUserRecommendationsProps) => {
|
|
10
|
-
recommendations: UserSearchItem[] | {
|
|
11
|
-
id: string;
|
|
12
|
-
name: string;
|
|
13
|
-
entityType: EntityType;
|
|
14
|
-
avatarUrl: string;
|
|
15
|
-
}[];
|
|
16
|
-
triggerSearchFactory: import("memoize-one").MemoizedFn<() => (query?: string) => void>;
|
|
17
|
-
selectUserFactory: import("memoize-one").MemoizedFn<() => (userId: string) => void>;
|
|
18
|
-
isLoading: boolean;
|
|
19
|
-
error: any;
|
|
20
|
-
};
|
|
21
|
-
export default useUserRecommendations;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type { UserSearchProductAttributes, UserSearchQuery } from '@atlaskit/smart-common';
|
|
2
|
-
export type UseUserRecommendationsProps = {
|
|
3
|
-
/**
|
|
4
|
-
* Base url override for downstream APIs.
|
|
5
|
-
* Note: there is a trend for browsers blocking cookies for cross-site resources.
|
|
6
|
-
* This prop is added for legacy reasons and will likely be removed in the future.
|
|
7
|
-
* https://webkit.org/blog/10218/full-third-party-cookie-blocking-and-more/
|
|
8
|
-
*/
|
|
9
|
-
baseUrl?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Context information for analytics. Eg: if the hook was consumed inside a ticket's comment, the childObjectId would be
|
|
12
|
-
* the ID of the comment and the ticket would be the objectId. Optional, but please provide if available.
|
|
13
|
-
*/
|
|
14
|
-
childObjectId?: string;
|
|
15
|
-
/**
|
|
16
|
-
* The container Id to identify context. e.g. Jira: projectId. Confluence: spaceId. Bitbucket: repositoryId.
|
|
17
|
-
*/
|
|
18
|
-
containerId?: string;
|
|
19
|
-
/**
|
|
20
|
-
* Time to debounce the suggestions fetching (in milliseconds). Defaults to 150ms.
|
|
21
|
-
*/
|
|
22
|
-
debounceTimeMs?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Identifier for informing the server on what experience the hook is powering.
|
|
25
|
-
* The server uses the fieldId to determine which model to utilize when
|
|
26
|
-
* generating suggestions.
|
|
27
|
-
* All fieldId's will be bucketed into a model that provides generic smart results,
|
|
28
|
-
* except "assignee", "mentions" which are specifically trained for Jira Assignee and
|
|
29
|
-
* @Mentions. For specifically trained models, please contact #help-smart-experiences.
|
|
30
|
-
*/
|
|
31
|
-
fieldId: string;
|
|
32
|
-
/**
|
|
33
|
-
* Whether to include users in the result set (@default: true).
|
|
34
|
-
*/
|
|
35
|
-
includeUsers?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Whether to include groups in the resultset (@default: false).
|
|
38
|
-
*/
|
|
39
|
-
includeGroups?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* Whether to include teams in the resultset (@default: false).
|
|
42
|
-
*/
|
|
43
|
-
includeTeams?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* (@default: 25)
|
|
46
|
-
*/
|
|
47
|
-
maxNumberOfResults?: number;
|
|
48
|
-
/**
|
|
49
|
-
* An identifier of the closest context object, e.g. issueId, pageId, pullRequestId.
|
|
50
|
-
* Used for analytics. Optional, but please include if available.
|
|
51
|
-
*/
|
|
52
|
-
objectId?: string;
|
|
53
|
-
/**
|
|
54
|
-
* Preload the list of suggested users with an empty-query ('') search as soon as
|
|
55
|
-
* the hook is used.
|
|
56
|
-
* WARNING: please consider carefully before deciding to preload your suggestions
|
|
57
|
-
* as this will increase the load on the recommendations services (has caused HOTs).
|
|
58
|
-
* Please give #help-smart-experiences a ballpark on the expected request volume.
|
|
59
|
-
* (@default: false)
|
|
60
|
-
*/
|
|
61
|
-
preload?: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* AAID of the user interacting with the component.
|
|
64
|
-
* If not provided, server will extract principalId from the context header, assuming that the user is logged in
|
|
65
|
-
* when making the request. (@default: “context”)
|
|
66
|
-
*/
|
|
67
|
-
principalId?: string;
|
|
68
|
-
/**
|
|
69
|
-
* Product-specific Attributes - you should pass in the attribute type that matches your current SupportedProduct.
|
|
70
|
-
* Currently we support additional attributes (BitbucketAttributes) for bitbucket and (ConfluenceAttributes) for Confluence.
|
|
71
|
-
*/
|
|
72
|
-
productAttributes?: UserSearchProductAttributes;
|
|
73
|
-
/**
|
|
74
|
-
* Product identifier. If you are an NPF, please ensure your product has been onboarded with
|
|
75
|
-
* Cross-product user-search @see https://developer.atlassian.com/cloud/cross-product-user-search/
|
|
76
|
-
* If you are still waiting for CPUS, you can use the `people` productKey in the interim.
|
|
77
|
-
*/
|
|
78
|
-
productKey: string;
|
|
79
|
-
/**
|
|
80
|
-
* Pass-through for CPUS. Refer to @see https://developer.atlassian.com/cloud/cross-product-user-search/rest/api-group-search/#api-group-search
|
|
81
|
-
* for detailed docs on parameters.
|
|
82
|
-
*/
|
|
83
|
-
cpusSearchQuery?: UserSearchQuery;
|
|
84
|
-
/**
|
|
85
|
-
* Identifier for the product's tenant, also known as siteId or cloudId.
|
|
86
|
-
* If product is not tenanted, the convention is to provide the productKey
|
|
87
|
-
* as the tenantId (e.g. "bitbucket") but this may vary across products.
|
|
88
|
-
* Check with #help-smart-experiences.
|
|
89
|
-
*/
|
|
90
|
-
tenantId: string;
|
|
91
|
-
};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IntlShape } from 'react-intl-next';
|
|
2
|
-
import { UserSearchItem } from '@atlaskit/smart-common';
|
|
3
|
-
import { OptionData } from '@atlaskit/user-picker';
|
|
4
|
-
declare const _default: (recommendations: UserSearchItem[], intl: IntlShape) => OptionData[];
|
|
5
|
-
export default _default;
|
package/tmp/api-report-tmp.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/smart-hooks"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import { EntityType } from '@atlaskit/smart-common';
|
|
8
|
-
import { IntlShape } from 'react-intl-next';
|
|
9
|
-
import { MemoizedFn } from 'memoize-one';
|
|
10
|
-
import { OptionData } from '@atlaskit/user-picker';
|
|
11
|
-
import { UserSearchItem } from '@atlaskit/smart-common';
|
|
12
|
-
import type { UserSearchProductAttributes } from '@atlaskit/smart-common';
|
|
13
|
-
import type { UserSearchQuery } from '@atlaskit/smart-common';
|
|
14
|
-
|
|
15
|
-
// @public (undocumented)
|
|
16
|
-
export const transformRecommendationsToOptions: (recommendations: UserSearchItem[], intl: IntlShape) => OptionData[];
|
|
17
|
-
|
|
18
|
-
// @public (undocumented)
|
|
19
|
-
export const useUserRecommendations: (props: UseUserRecommendationsProps) => {
|
|
20
|
-
recommendations: UserSearchItem[] | {
|
|
21
|
-
id: string;
|
|
22
|
-
name: string;
|
|
23
|
-
entityType: EntityType;
|
|
24
|
-
avatarUrl: string;
|
|
25
|
-
}[];
|
|
26
|
-
triggerSearchFactory: MemoizedFn<() => (query?: string) => void>;
|
|
27
|
-
selectUserFactory: MemoizedFn<() => (userId: string) => void>;
|
|
28
|
-
isLoading: boolean;
|
|
29
|
-
error: any;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
// @public (undocumented)
|
|
33
|
-
type UseUserRecommendationsProps = {
|
|
34
|
-
baseUrl?: string;
|
|
35
|
-
childObjectId?: string;
|
|
36
|
-
containerId?: string;
|
|
37
|
-
debounceTimeMs?: number;
|
|
38
|
-
fieldId: string;
|
|
39
|
-
includeUsers?: boolean;
|
|
40
|
-
includeGroups?: boolean;
|
|
41
|
-
includeTeams?: boolean;
|
|
42
|
-
maxNumberOfResults?: number;
|
|
43
|
-
objectId?: string;
|
|
44
|
-
preload?: boolean;
|
|
45
|
-
principalId?: string;
|
|
46
|
-
productAttributes?: UserSearchProductAttributes;
|
|
47
|
-
productKey: string;
|
|
48
|
-
cpusSearchQuery?: UserSearchQuery;
|
|
49
|
-
tenantId: string;
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
// (No @packageDocumentation comment for this package)
|
|
53
|
-
|
|
54
|
-
```
|