@atlaskit/smart-hooks 0.1.6 → 0.1.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/version.json +1 -1
  3. package/dist/es2019/version.json +1 -1
  4. package/dist/esm/version.json +1 -1
  5. package/example-helpers/mock-urs-data.ts +1 -2
  6. package/package.json +7 -13
  7. package/report.api.md +27 -8
  8. package/tmp/api-report-tmp.d.ts +54 -0
  9. package/dist/types-ts4.0/i18n/cs.d.ts +0 -18
  10. package/dist/types-ts4.0/i18n/da.d.ts +0 -18
  11. package/dist/types-ts4.0/i18n/de.d.ts +0 -18
  12. package/dist/types-ts4.0/i18n/en.d.ts +0 -7
  13. package/dist/types-ts4.0/i18n/en_GB.d.ts +0 -7
  14. package/dist/types-ts4.0/i18n/en_ZZ.d.ts +0 -18
  15. package/dist/types-ts4.0/i18n/es.d.ts +0 -18
  16. package/dist/types-ts4.0/i18n/et.d.ts +0 -8
  17. package/dist/types-ts4.0/i18n/fi.d.ts +0 -18
  18. package/dist/types-ts4.0/i18n/fr.d.ts +0 -18
  19. package/dist/types-ts4.0/i18n/hu.d.ts +0 -18
  20. package/dist/types-ts4.0/i18n/index.d.ts +0 -36
  21. package/dist/types-ts4.0/i18n/is.d.ts +0 -7
  22. package/dist/types-ts4.0/i18n/it.d.ts +0 -18
  23. package/dist/types-ts4.0/i18n/ja.d.ts +0 -18
  24. package/dist/types-ts4.0/i18n/ko.d.ts +0 -18
  25. package/dist/types-ts4.0/i18n/languages.d.ts +0 -27
  26. package/dist/types-ts4.0/i18n/nb.d.ts +0 -18
  27. package/dist/types-ts4.0/i18n/nl.d.ts +0 -18
  28. package/dist/types-ts4.0/i18n/pl.d.ts +0 -18
  29. package/dist/types-ts4.0/i18n/pt_BR.d.ts +0 -18
  30. package/dist/types-ts4.0/i18n/pt_PT.d.ts +0 -8
  31. package/dist/types-ts4.0/i18n/ro.d.ts +0 -7
  32. package/dist/types-ts4.0/i18n/ru.d.ts +0 -18
  33. package/dist/types-ts4.0/i18n/sk.d.ts +0 -8
  34. package/dist/types-ts4.0/i18n/sv.d.ts +0 -18
  35. package/dist/types-ts4.0/i18n/th.d.ts +0 -18
  36. package/dist/types-ts4.0/i18n/tr.d.ts +0 -18
  37. package/dist/types-ts4.0/i18n/uk.d.ts +0 -18
  38. package/dist/types-ts4.0/i18n/vi.d.ts +0 -18
  39. package/dist/types-ts4.0/i18n/zh.d.ts +0 -18
  40. package/dist/types-ts4.0/i18n/zh_TW.d.ts +0 -18
  41. package/dist/types-ts4.0/index.d.ts +0 -3
  42. package/dist/types-ts4.0/messages.d.ts +0 -47
  43. package/dist/types-ts4.0/services/use-function-usage-tracking/index.d.ts +0 -5
  44. package/dist/types-ts4.0/services/use-user-recommendations/analytics.d.ts +0 -20
  45. package/dist/types-ts4.0/services/use-user-recommendations/index.d.ts +0 -21
  46. package/dist/types-ts4.0/services/use-user-recommendations/ufoExperiences.d.ts +0 -2
  47. package/dist/types-ts4.0/types.d.ts +0 -91
  48. package/dist/types-ts4.0/utils/transform-recommendations-to-options/index.d.ts +0 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/smart-hooks
2
2
 
3
+ ## 0.1.7
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 0.1.6
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-hooks",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-hooks",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-hooks",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "sideEffects": false
5
5
  }
@@ -38,8 +38,7 @@ export const mockUserSearchData = [
38
38
  },
39
39
  {
40
40
  id: '12312412',
41
- name:
42
- "Dude with long name and time that doesn't seem to stop and should overflow",
41
+ name: "Dude with long name and time that doesn't seem to stop and should overflow",
43
42
  mentionName:
44
43
  "Dudewithlongnamethatdoesn'tseemtostopandshouldoverflowwithtime",
45
44
  presence: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-hooks",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
@@ -10,13 +10,6 @@
10
10
  "module": "dist/esm/index.js",
11
11
  "module:es2019": "dist/es2019/index.js",
12
12
  "types": "dist/types/index.d.ts",
13
- "typesVersions": {
14
- ">=4.0 <4.5": {
15
- "*": [
16
- "dist/types-ts4.0/*"
17
- ]
18
- }
19
- },
20
13
  "sideEffects": false,
21
14
  "atlaskit:src": "src/index.ts",
22
15
  "atlassian": {
@@ -30,7 +23,7 @@
30
23
  "@atlaskit/analytics-next": "^8.0.0",
31
24
  "@atlaskit/smart-common": "^0.1.0",
32
25
  "@atlaskit/ufo": "^0.1.0",
33
- "@atlaskit/user-picker": "^9.4.0",
26
+ "@atlaskit/user-picker": "^10.0.0",
34
27
  "@babel/runtime": "^7.0.0",
35
28
  "lodash": "^4.17.21",
36
29
  "memoize-one": "^6.0.0",
@@ -42,16 +35,16 @@
42
35
  },
43
36
  "devDependencies": {
44
37
  "@atlaskit/analytics-viewer": "^0.4.5",
45
- "@atlaskit/button": "^16.3.0",
38
+ "@atlaskit/button": "^16.5.0",
46
39
  "@atlaskit/docs": "*",
47
40
  "@atlaskit/smart-hooks": "*",
48
41
  "@atlaskit/ssr": "*",
49
- "@atlaskit/textfield": "^5.2.0",
42
+ "@atlaskit/textfield": "^5.3.0",
50
43
  "@atlaskit/visual-regression": "*",
51
44
  "@atlaskit/webdriver-runner": "*",
52
45
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
53
46
  "@atlassian/ufo": "^0.1.0",
54
- "@atlassiansox/analytics-web-client": "^4.7.0",
47
+ "@atlassiansox/analytics-web-client": "^4.9.0",
55
48
  "@storybook/addon-knobs": "^5.3.18",
56
49
  "@testing-library/react": "^12.1.5",
57
50
  "@testing-library/react-hooks": "^8.0.1",
@@ -76,7 +69,8 @@
76
69
  "analytics-next"
77
70
  ],
78
71
  "theming": [
79
- "react-context"
72
+ "react-context",
73
+ "tokens"
80
74
  ],
81
75
  "ui-components": [
82
76
  "lite-mode"
package/report.api.md CHANGED
@@ -1,12 +1,18 @@
1
+ <!-- API Report Version: 2.3 -->
2
+
1
3
  ## API Report File for "@atlaskit/smart-hooks"
2
4
 
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
7
+
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+ - [Peer Dependencies](#peer-dependencies)
4
12
 
5
- <!--
6
- Generated API Report version: 2.0
7
- -->
13
+ ### Main Entry Types
8
14
 
9
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
15
+ <!--SECTION START: Main Entry Types-->
10
16
 
11
17
  ```ts
12
18
  import { EntityType } from '@atlaskit/smart-common';
@@ -24,9 +30,7 @@ export const transformRecommendationsToOptions: (
24
30
  ) => OptionData[];
25
31
 
26
32
  // @public (undocumented)
27
- export const useUserRecommendations: (
28
- props: UseUserRecommendationsProps,
29
- ) => {
33
+ export const useUserRecommendations: (props: UseUserRecommendationsProps) => {
30
34
  recommendations:
31
35
  | UserSearchItem[]
32
36
  | {
@@ -63,3 +67,18 @@ type UseUserRecommendationsProps = {
63
67
 
64
68
  // (No @packageDocumentation comment for this package)
65
69
  ```
70
+
71
+ <!--SECTION END: Main Entry Types-->
72
+
73
+ ### Peer Dependencies
74
+
75
+ <!--SECTION START: Peer Dependencies-->
76
+
77
+ ```json
78
+ {
79
+ "react": "^16.8.0",
80
+ "react-intl-next": "npm:react-intl@^5.18.1"
81
+ }
82
+ ```
83
+
84
+ <!--SECTION END: Peer Dependencies-->
@@ -0,0 +1,54 @@
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 | undefined) => 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
+ ```
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,7 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.placeholder': string;
3
- 'smart-experiences.smart-hooks.placeholder.add-more': string;
4
- 'smart-experiences.smart-hooks.multi.remove-item': string;
5
- 'smart-experiences.smart-hooks.single.clear': string;
6
- };
7
- export default _default;
@@ -1,7 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.placeholder': string;
3
- 'smart-experiences.smart-hooks.placeholder.add-more': string;
4
- 'smart-experiences.smart-hooks.multi.remove-item': string;
5
- 'smart-experiences.smart-hooks.single.clear': string;
6
- };
7
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,8 +0,0 @@
1
- declare const _default: {};
2
- /**
3
- * NOTE:
4
- *
5
- * This file is automatically generated by i18n-tools.
6
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
7
- */
8
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,36 +0,0 @@
1
- /**
2
- * NOTE:
3
- *
4
- * This file is automatically generated by i18n-tools.
5
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
6
- */
7
- export { default as zh } from './zh';
8
- export { default as zh_TW } from './zh_TW';
9
- export { default as cs } from './cs';
10
- export { default as da } from './da';
11
- export { default as nl } from './nl';
12
- export { default as et } from './et';
13
- export { default as fi } from './fi';
14
- export { default as fr } from './fr';
15
- export { default as de } from './de';
16
- export { default as hu } from './hu';
17
- export { default as it } from './it';
18
- export { default as ja } from './ja';
19
- export { default as ko } from './ko';
20
- export { default as nb } from './nb';
21
- export { default as pl } from './pl';
22
- export { default as pt_BR } from './pt_BR';
23
- export { default as pt_PT } from './pt_PT';
24
- export { default as ru } from './ru';
25
- export { default as sk } from './sk';
26
- export { default as es } from './es';
27
- export { default as sv } from './sv';
28
- export { default as th } from './th';
29
- export { default as tr } from './tr';
30
- export { default as uk } from './uk';
31
- export { default as vi } from './vi';
32
- export { default as en_ZZ } from './en_ZZ';
33
- export { default as en } from './en';
34
- export { default as en_GB } from './en_GB';
35
- export { default as is } from './is';
36
- export { default as ro } from './ro';
@@ -1,7 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.placeholder': string;
3
- 'smart-experiences.smart-hooks.placeholder.add-more': string;
4
- 'smart-experiences.smart-hooks.multi.remove-item': string;
5
- 'smart-experiences.smart-hooks.single.clear': string;
6
- };
7
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,27 +0,0 @@
1
- declare const _default: {
2
- zh: string;
3
- cs: string;
4
- da: string;
5
- nl: string;
6
- en: string;
7
- en_GB: string;
8
- et: string;
9
- fi: string;
10
- fr: string;
11
- de: string;
12
- hu: string;
13
- is: string;
14
- it: string;
15
- ja: string;
16
- ko: string;
17
- nb: string;
18
- pl: string;
19
- pt_BR: string;
20
- pt_PT: string;
21
- ro: string;
22
- ru: string;
23
- sk: string;
24
- es: string;
25
- sv: string;
26
- };
27
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,8 +0,0 @@
1
- declare const _default: {};
2
- /**
3
- * NOTE:
4
- *
5
- * This file is automatically generated by i18n-tools.
6
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
7
- */
8
- export default _default;
@@ -1,7 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.placeholder': string;
3
- 'smart-experiences.smart-hooks.placeholder.add-more': string;
4
- 'smart-experiences.smart-hooks.multi.remove-item': string;
5
- 'smart-experiences.smart-hooks.single.clear': string;
6
- };
7
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,8 +0,0 @@
1
- declare const _default: {};
2
- /**
3
- * NOTE:
4
- *
5
- * This file is automatically generated by i18n-tools.
6
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
7
- */
8
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,18 +0,0 @@
1
- declare const _default: {
2
- 'smart-experiences.smart-hooks.external.sourced.from': string;
3
- 'smart-experiences.smart-hooks.github.provider': string;
4
- 'smart-experiences.smart-hooks.google.provider': string;
5
- 'smart-experiences.smart-hooks.guest.lozenge.text': string;
6
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.group': string;
7
- 'smart-experiences.smart-hooks.guest.lozenge.tooltip.user': string;
8
- 'smart-experiences.smart-hooks.member.lozenge.text': string;
9
- 'smart-experiences.smart-hooks.microsoft.provider': string;
10
- 'smart-experiences.smart-hooks.slack.provider': string;
11
- };
12
- /**
13
- * NOTE:
14
- *
15
- * This file is automatically generated by i18n-tools.
16
- * DO NOT CHANGE IT BY HAND or your changes will be lost.
17
- */
18
- export default _default;
@@ -1,3 +0,0 @@
1
- import useUserRecommendations from './services/use-user-recommendations';
2
- import transformRecommendationsToOptions from './utils/transform-recommendations-to-options';
3
- export { useUserRecommendations, transformRecommendationsToOptions };
@@ -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 | undefined) => void>;
17
- selectUserFactory: import("memoize-one").MemoizedFn<() => (userId: string) => void>;
18
- isLoading: boolean;
19
- error: any;
20
- };
21
- export default useUserRecommendations;
@@ -1,2 +0,0 @@
1
- import { ConcurrentExperience } from '@atlaskit/ufo';
2
- export declare const UsersFetchedUfoExperience: ConcurrentExperience;
@@ -1,91 +0,0 @@
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
- };
@@ -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;