@atlaskit/smart-hooks 0.0.2
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 +8 -0
- package/dist/cjs/i18n/cs.js +26 -0
- package/dist/cjs/i18n/da.js +26 -0
- package/dist/cjs/i18n/de.js +26 -0
- package/dist/cjs/i18n/en.js +14 -0
- package/dist/cjs/i18n/en_GB.js +14 -0
- package/dist/cjs/i18n/en_ZZ.js +26 -0
- package/dist/cjs/i18n/es.js +26 -0
- package/dist/cjs/i18n/et.js +16 -0
- package/dist/cjs/i18n/fi.js +26 -0
- package/dist/cjs/i18n/fr.js +26 -0
- package/dist/cjs/i18n/hu.js +26 -0
- package/dist/cjs/i18n/index.js +247 -0
- package/dist/cjs/i18n/is.js +14 -0
- package/dist/cjs/i18n/it.js +26 -0
- package/dist/cjs/i18n/ja.js +26 -0
- package/dist/cjs/i18n/ko.js +26 -0
- package/dist/cjs/i18n/languages.js +33 -0
- package/dist/cjs/i18n/nb.js +26 -0
- package/dist/cjs/i18n/nl.js +26 -0
- package/dist/cjs/i18n/pl.js +26 -0
- package/dist/cjs/i18n/pt_BR.js +26 -0
- package/dist/cjs/i18n/pt_PT.js +16 -0
- package/dist/cjs/i18n/ro.js +14 -0
- package/dist/cjs/i18n/ru.js +26 -0
- package/dist/cjs/i18n/sk.js +16 -0
- package/dist/cjs/i18n/sv.js +26 -0
- package/dist/cjs/i18n/th.js +26 -0
- package/dist/cjs/i18n/tr.js +26 -0
- package/dist/cjs/i18n/uk.js +26 -0
- package/dist/cjs/i18n/vi.js +26 -0
- package/dist/cjs/i18n/zh.js +26 -0
- package/dist/cjs/i18n/zh_TW.js +26 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/messages.js +57 -0
- package/dist/cjs/services/use-function-usage-tracking/index.js +36 -0
- package/dist/cjs/services/use-user-recommendations/index.js +170 -0
- package/dist/cjs/types.js +5 -0
- package/dist/cjs/utils/transform-recommendations-to-options/index.js +88 -0
- package/dist/cjs/version.json +5 -0
- package/dist/es2019/i18n/cs.js +18 -0
- package/dist/es2019/i18n/da.js +18 -0
- package/dist/es2019/i18n/de.js +18 -0
- package/dist/es2019/i18n/en.js +7 -0
- package/dist/es2019/i18n/en_GB.js +7 -0
- package/dist/es2019/i18n/en_ZZ.js +18 -0
- package/dist/es2019/i18n/es.js +18 -0
- package/dist/es2019/i18n/et.js +8 -0
- package/dist/es2019/i18n/fi.js +18 -0
- package/dist/es2019/i18n/fr.js +18 -0
- package/dist/es2019/i18n/hu.js +18 -0
- package/dist/es2019/i18n/index.js +36 -0
- package/dist/es2019/i18n/is.js +7 -0
- package/dist/es2019/i18n/it.js +18 -0
- package/dist/es2019/i18n/ja.js +18 -0
- package/dist/es2019/i18n/ko.js +18 -0
- package/dist/es2019/i18n/languages.js +26 -0
- package/dist/es2019/i18n/nb.js +18 -0
- package/dist/es2019/i18n/nl.js +18 -0
- package/dist/es2019/i18n/pl.js +18 -0
- package/dist/es2019/i18n/pt_BR.js +18 -0
- package/dist/es2019/i18n/pt_PT.js +8 -0
- package/dist/es2019/i18n/ro.js +7 -0
- package/dist/es2019/i18n/ru.js +18 -0
- package/dist/es2019/i18n/sk.js +8 -0
- package/dist/es2019/i18n/sv.js +18 -0
- package/dist/es2019/i18n/th.js +18 -0
- package/dist/es2019/i18n/tr.js +18 -0
- package/dist/es2019/i18n/uk.js +18 -0
- package/dist/es2019/i18n/vi.js +18 -0
- package/dist/es2019/i18n/zh.js +18 -0
- package/dist/es2019/i18n/zh_TW.js +18 -0
- package/dist/es2019/index.js +3 -0
- package/dist/es2019/messages.js +48 -0
- package/dist/es2019/services/use-function-usage-tracking/index.js +18 -0
- package/dist/es2019/services/use-user-recommendations/index.js +104 -0
- package/dist/es2019/types.js +1 -0
- package/dist/es2019/utils/transform-recommendations-to-options/index.js +67 -0
- package/dist/es2019/version.json +5 -0
- package/dist/esm/i18n/cs.js +18 -0
- package/dist/esm/i18n/da.js +18 -0
- package/dist/esm/i18n/de.js +18 -0
- package/dist/esm/i18n/en.js +7 -0
- package/dist/esm/i18n/en_GB.js +7 -0
- package/dist/esm/i18n/en_ZZ.js +18 -0
- package/dist/esm/i18n/es.js +18 -0
- package/dist/esm/i18n/et.js +8 -0
- package/dist/esm/i18n/fi.js +18 -0
- package/dist/esm/i18n/fr.js +18 -0
- package/dist/esm/i18n/hu.js +18 -0
- package/dist/esm/i18n/index.js +36 -0
- package/dist/esm/i18n/is.js +7 -0
- package/dist/esm/i18n/it.js +18 -0
- package/dist/esm/i18n/ja.js +18 -0
- package/dist/esm/i18n/ko.js +18 -0
- package/dist/esm/i18n/languages.js +26 -0
- package/dist/esm/i18n/nb.js +18 -0
- package/dist/esm/i18n/nl.js +18 -0
- package/dist/esm/i18n/pl.js +18 -0
- package/dist/esm/i18n/pt_BR.js +18 -0
- package/dist/esm/i18n/pt_PT.js +8 -0
- package/dist/esm/i18n/ro.js +7 -0
- package/dist/esm/i18n/ru.js +18 -0
- package/dist/esm/i18n/sk.js +8 -0
- package/dist/esm/i18n/sv.js +18 -0
- package/dist/esm/i18n/th.js +18 -0
- package/dist/esm/i18n/tr.js +18 -0
- package/dist/esm/i18n/uk.js +18 -0
- package/dist/esm/i18n/vi.js +18 -0
- package/dist/esm/i18n/zh.js +18 -0
- package/dist/esm/i18n/zh_TW.js +18 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/messages.js +48 -0
- package/dist/esm/services/use-function-usage-tracking/index.js +25 -0
- package/dist/esm/services/use-user-recommendations/index.js +152 -0
- package/dist/esm/types.js +1 -0
- package/dist/esm/utils/transform-recommendations-to-options/index.js +77 -0
- package/dist/esm/version.json +5 -0
- package/dist/types/i18n/cs.d.ts +18 -0
- package/dist/types/i18n/da.d.ts +18 -0
- package/dist/types/i18n/de.d.ts +18 -0
- package/dist/types/i18n/en.d.ts +7 -0
- package/dist/types/i18n/en_GB.d.ts +7 -0
- package/dist/types/i18n/en_ZZ.d.ts +18 -0
- package/dist/types/i18n/es.d.ts +18 -0
- package/dist/types/i18n/et.d.ts +8 -0
- package/dist/types/i18n/fi.d.ts +18 -0
- package/dist/types/i18n/fr.d.ts +18 -0
- package/dist/types/i18n/hu.d.ts +18 -0
- package/dist/types/i18n/index.d.ts +36 -0
- package/dist/types/i18n/is.d.ts +7 -0
- package/dist/types/i18n/it.d.ts +18 -0
- package/dist/types/i18n/ja.d.ts +18 -0
- package/dist/types/i18n/ko.d.ts +18 -0
- package/dist/types/i18n/languages.d.ts +27 -0
- package/dist/types/i18n/nb.d.ts +18 -0
- package/dist/types/i18n/nl.d.ts +18 -0
- package/dist/types/i18n/pl.d.ts +18 -0
- package/dist/types/i18n/pt_BR.d.ts +18 -0
- package/dist/types/i18n/pt_PT.d.ts +8 -0
- package/dist/types/i18n/ro.d.ts +7 -0
- package/dist/types/i18n/ru.d.ts +18 -0
- package/dist/types/i18n/sk.d.ts +8 -0
- package/dist/types/i18n/sv.d.ts +18 -0
- package/dist/types/i18n/th.d.ts +18 -0
- package/dist/types/i18n/tr.d.ts +18 -0
- package/dist/types/i18n/uk.d.ts +18 -0
- package/dist/types/i18n/vi.d.ts +18 -0
- package/dist/types/i18n/zh.d.ts +18 -0
- package/dist/types/i18n/zh_TW.d.ts +18 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/messages.d.ts +47 -0
- package/dist/types/services/use-function-usage-tracking/index.d.ts +5 -0
- package/dist/types/services/use-user-recommendations/index.d.ts +22 -0
- package/dist/types/types.d.ts +91 -0
- package/dist/types/utils/transform-recommendations-to-options/index.d.ts +5 -0
- package/example-helpers/mock-urs-data.ts +82 -0
- package/example-helpers/use-endpoint-mocks.ts +47 -0
- package/package.json +81 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { UserSearchProductAttributes, UserSearchQuery } from '@atlaskit/smart-common';
|
|
2
|
+
export declare 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
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
export const userSampleAvatarUrl =
|
|
2
|
+
'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/2wCEAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRQBAwQEBQQFCQUFCRQNCw0UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFP/AABEIACAAIAMBIgACEQEDEQH/xAB1AAEAAwEAAAAAAAAAAAAAAAAHAgUGCBAAAQMCBQMDAgcAAAAAAAAAAQIDBAURAAYSIUEHEzEUImEVcSMyQlGBweEBAAMBAAAAAAAAAAAAAAAAAAMEBwURAAICAgMBAQEAAAAAAAAAAAECAxEABBIhIkExgf/aAAwDAQACEQMRAD8AxWVci1ipwmJdT7seKFbIMgLKrGxTYkkH4NsMH1D0UFwsqsAACom1zbxvje9QMoU6BVnnFPswkqBX71JQkj7nnBFmwNx6JJmw5zUtkKUlCmFhaCAkG+21/IxCZ2keQ2KA6/uWzyF5X2cs1T1To62n3jYoWUuDfyLf3gUzhl/MuUI06fDLjdMBGh5EtCyQogBOm2q9+L+MJ1Ep0p1SFd5lptwqSe6sJCRpBvvySQP4xoqZlFt6QluQ4iSUL1eQQP8AcG1pHieqsHFHcVyv8xB6l0hnNOUrzGPUKlsBBXYa0FJ/MkkEbEA253GB/I/SeH0wy1PocFtoU6pOeqbbUjthp3TY8nyPngbADHT1ejCi02LGaShx6GlJKFH2rPlV/ub4H85yI+bSqPGdRSZjThdbYeSUNlRFlAnwQfixGNTZn4zSRq3hjdYprRK0cbyD2ABeBHULpiOo8ymrluBNMpai4lgoU5+MFg6zpULWtbkEXww5Ey/EpFOhoYQtllsDVqPudI5V9/OI0ZNMyahuI4tqsy/euykak90nlXgC9hsNv3xd0xuTMImylLaSE3S3+kE8cYHJslwsQbyvzADXRHaSuz9z/9k=';
|
|
3
|
+
|
|
4
|
+
export const mockUserSearchData = [
|
|
5
|
+
{
|
|
6
|
+
id: '2234',
|
|
7
|
+
avatarUrl: userSampleAvatarUrl,
|
|
8
|
+
name: 'Jack Sparrow',
|
|
9
|
+
mentionName: 'captainjack',
|
|
10
|
+
lozenge: 'teammate',
|
|
11
|
+
accessLevel: 'SITE',
|
|
12
|
+
presence: {
|
|
13
|
+
status: 'offline',
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: '27',
|
|
18
|
+
avatarUrl: userSampleAvatarUrl,
|
|
19
|
+
name: 'Jean Luc Picard',
|
|
20
|
+
mentionName: 'makeitso',
|
|
21
|
+
lozenge: 'teammate',
|
|
22
|
+
accessLevel: 'APPLICATION',
|
|
23
|
+
presence: {
|
|
24
|
+
status: 'none',
|
|
25
|
+
time: '1:57am',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
id: '1701',
|
|
30
|
+
avatarUrl: userSampleAvatarUrl,
|
|
31
|
+
name: 'James T. Kirk',
|
|
32
|
+
mentionName: 'wheresmyshirt',
|
|
33
|
+
nickname: 'jim',
|
|
34
|
+
accessLevel: 'NONE',
|
|
35
|
+
presence: {
|
|
36
|
+
status: 'focus',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
id: '12312412',
|
|
41
|
+
name:
|
|
42
|
+
"Dude with long name and time that doesn't seem to stop and should overflow",
|
|
43
|
+
mentionName:
|
|
44
|
+
"Dudewithlongnamethatdoesn'tseemtostopandshouldoverflowwithtime",
|
|
45
|
+
presence: {
|
|
46
|
+
time: '1:57pm',
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: '12312428',
|
|
51
|
+
avatarUrl: userSampleAvatarUrl,
|
|
52
|
+
name: 'Monkey Trousers',
|
|
53
|
+
lozenge: 'TEAM',
|
|
54
|
+
mentionName: 'Monkey Trousers',
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: '12312594',
|
|
58
|
+
avatarUrl:
|
|
59
|
+
'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/teams/avatars/0.svg',
|
|
60
|
+
name: 'The Cool Cats',
|
|
61
|
+
userType: 'TEAM',
|
|
62
|
+
context: {
|
|
63
|
+
members: [],
|
|
64
|
+
includesYou: false,
|
|
65
|
+
memberCount: 10,
|
|
66
|
+
teamLink: 'someLink',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: '12312597',
|
|
71
|
+
avatarUrl:
|
|
72
|
+
'https://ptc-directory-sited-static.us-east-1.prod.public.atl-paas.net/teams/avatars/3.svg',
|
|
73
|
+
name: 'The whole company',
|
|
74
|
+
userType: 'TEAM',
|
|
75
|
+
context: {
|
|
76
|
+
members: [],
|
|
77
|
+
includesYou: true,
|
|
78
|
+
memberCount: 80,
|
|
79
|
+
teamLink: 'someLink',
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
];
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
import fetchMock from 'fetch-mock/cjs/client';
|
|
4
|
+
|
|
5
|
+
import { EntityType, UserSearchResponse } from '@atlaskit/smart-common';
|
|
6
|
+
|
|
7
|
+
import { mockUserSearchData } from './mock-urs-data';
|
|
8
|
+
|
|
9
|
+
const mockEndpoints = () => {
|
|
10
|
+
// http://www.wheresrhys.co.uk/fetch-mock/#usageconfiguration
|
|
11
|
+
// Unmatched routes will fallback to the network
|
|
12
|
+
fetchMock.config.fallbackToNetwork = true;
|
|
13
|
+
|
|
14
|
+
const userRecommendationsResponse = (): UserSearchResponse => {
|
|
15
|
+
return {
|
|
16
|
+
recommendedUsers: mockUserSearchData
|
|
17
|
+
.filter(() => Math.random() < 0.7)
|
|
18
|
+
.map(({ id, name, avatarUrl = '', nickname }) => ({
|
|
19
|
+
entityType: EntityType.USER,
|
|
20
|
+
id,
|
|
21
|
+
name,
|
|
22
|
+
avatarUrl,
|
|
23
|
+
nickname,
|
|
24
|
+
})),
|
|
25
|
+
errors: [],
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
fetchMock.mock(
|
|
30
|
+
{
|
|
31
|
+
functionMatcher: (url: string) => {
|
|
32
|
+
return url === '/gateway/api/v1/recommendations';
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
() => userRecommendationsResponse(),
|
|
36
|
+
{ method: 'POST', overwriteRoutes: false },
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Simple hook for using inside example pages, which sets up the mock API responses, and then
|
|
41
|
+
// un-sets the mock API responses when the example is exited.
|
|
42
|
+
export const useEndpointMocks = () => {
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
mockEndpoints();
|
|
45
|
+
return () => fetchMock.reset();
|
|
46
|
+
}, []);
|
|
47
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atlaskit/smart-hooks",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"registry": "https://registry.npmjs.org/"
|
|
6
|
+
},
|
|
7
|
+
"repository": "https://bitbucket.org/atlassian/atlassian-frontend",
|
|
8
|
+
"author": "Atlassian Pty Ltd",
|
|
9
|
+
"main": "dist/cjs/index.js",
|
|
10
|
+
"module": "dist/esm/index.js",
|
|
11
|
+
"module:es2019": "dist/es2019/index.js",
|
|
12
|
+
"types": "dist/types/index.d.ts",
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"atlaskit:src": "src/index.ts",
|
|
15
|
+
"atlassian": {
|
|
16
|
+
"team": "Search & Smarts: Smart Experience",
|
|
17
|
+
"inPublicMirror": false,
|
|
18
|
+
"releaseModel": "continuous"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@atlaskit/smart-common": "^0.0.2",
|
|
22
|
+
"@atlaskit/user-picker": "^8.3.0",
|
|
23
|
+
"@babel/runtime": "^7.0.0",
|
|
24
|
+
"lodash": "^4.17.21"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "^16.8.0",
|
|
28
|
+
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@atlaskit/analytics-gas-types": "^5.0.0",
|
|
32
|
+
"@atlaskit/analytics-listeners": "^8.0.0",
|
|
33
|
+
"@atlaskit/analytics-next": "^8.2.0",
|
|
34
|
+
"@atlaskit/analytics-viewer": "^0.4.5",
|
|
35
|
+
"@atlaskit/button": "^16.0.0",
|
|
36
|
+
"@atlaskit/docs": "*",
|
|
37
|
+
"@atlaskit/smart-hooks": "*",
|
|
38
|
+
"@atlaskit/ssr": "*",
|
|
39
|
+
"@atlaskit/textfield": "^5.0.5",
|
|
40
|
+
"@atlaskit/visual-regression": "*",
|
|
41
|
+
"@atlaskit/webdriver-runner": "*",
|
|
42
|
+
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
43
|
+
"@atlassiansox/analytics-web-client": "^4.2.0",
|
|
44
|
+
"@storybook/addon-knobs": "^5.3.18",
|
|
45
|
+
"@testing-library/react": "^8.0.1",
|
|
46
|
+
"@testing-library/react-hooks": "^1.0.4",
|
|
47
|
+
"enzyme": "^3.10.0",
|
|
48
|
+
"fetch-mock": "^8.0.0",
|
|
49
|
+
"react-dom": "^16.8.0",
|
|
50
|
+
"typescript": "3.9.6",
|
|
51
|
+
"wait-for-expect": "^1.2.0"
|
|
52
|
+
},
|
|
53
|
+
"techstack": {
|
|
54
|
+
"@atlassian/frontend": {
|
|
55
|
+
"import-structure": [
|
|
56
|
+
"atlassian-conventions"
|
|
57
|
+
],
|
|
58
|
+
"circular-dependencies": [
|
|
59
|
+
"file-and-folder-level"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"@repo/internal": {
|
|
63
|
+
"analytics": [
|
|
64
|
+
"analytics-next"
|
|
65
|
+
],
|
|
66
|
+
"theming": [
|
|
67
|
+
"react-context"
|
|
68
|
+
],
|
|
69
|
+
"ui-components": [
|
|
70
|
+
"lite-mode"
|
|
71
|
+
],
|
|
72
|
+
"deprecation": [
|
|
73
|
+
"no-deprecated-imports"
|
|
74
|
+
]
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"af:exports": {
|
|
78
|
+
".": "./src/index.ts"
|
|
79
|
+
},
|
|
80
|
+
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"
|
|
81
|
+
}
|