@atlaskit/reactions 34.4.12 → 35.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/ConnectedReactionPicker/package.json +1 -8
  3. package/ConnectedReactionsView/package.json +1 -8
  4. package/MemoryReactionsStore/package.json +1 -8
  5. package/MockReactionsClient/package.json +1 -8
  6. package/Reaction/package.json +1 -8
  7. package/ReactionConsumer/package.json +1 -8
  8. package/ReactionPicker/package.json +1 -8
  9. package/ReactionServiceClient/package.json +1 -8
  10. package/Reactions/package.json +1 -8
  11. package/dist/cjs/analytics/index.js +1 -1
  12. package/dist/es2019/analytics/index.js +1 -1
  13. package/dist/esm/analytics/index.js +1 -1
  14. package/package.json +28 -36
  15. package/reaction/package.json +1 -8
  16. package/store/package.json +1 -8
  17. package/types/package.json +1 -8
  18. package/useCloseManager/package.json +1 -8
  19. package/dist/types-ts4.5/MockReactionsClient.d.ts +0 -27
  20. package/dist/types-ts4.5/analytics/index.d.ts +0 -121
  21. package/dist/types-ts4.5/client/ReactionServiceClient.d.ts +0 -35
  22. package/dist/types-ts4.5/client/index.d.ts +0 -1
  23. package/dist/types-ts4.5/components/Counter.d.ts +0 -51
  24. package/dist/types-ts4.5/components/EmojiButton.d.ts +0 -24
  25. package/dist/types-ts4.5/components/FlashAnimation.d.ts +0 -23
  26. package/dist/types-ts4.5/components/Reaction.d.ts +0 -67
  27. package/dist/types-ts4.5/components/ReactionButton.d.ts +0 -22
  28. package/dist/types-ts4.5/components/ReactionParticleEffect.d.ts +0 -22
  29. package/dist/types-ts4.5/components/ReactionPicker.d.ts +0 -119
  30. package/dist/types-ts4.5/components/ReactionSummaryButton.d.ts +0 -61
  31. package/dist/types-ts4.5/components/ReactionSummaryView.d.ts +0 -81
  32. package/dist/types-ts4.5/components/ReactionTooltip.d.ts +0 -43
  33. package/dist/types-ts4.5/components/ReactionView.d.ts +0 -12
  34. package/dist/types-ts4.5/components/Reactions.d.ts +0 -206
  35. package/dist/types-ts4.5/components/ReactionsDialog.d.ts +0 -32
  36. package/dist/types-ts4.5/components/ReactionsDialogHeader.d.ts +0 -15
  37. package/dist/types-ts4.5/components/ReactionsDialogTrigger.d.ts +0 -5
  38. package/dist/types-ts4.5/components/ReactionsList.d.ts +0 -20
  39. package/dist/types-ts4.5/components/RepositionOnUpdate.d.ts +0 -13
  40. package/dist/types-ts4.5/components/Selector.d.ts +0 -36
  41. package/dist/types-ts4.5/components/ShowMore.d.ts +0 -15
  42. package/dist/types-ts4.5/components/StaticReaction.d.ts +0 -11
  43. package/dist/types-ts4.5/components/Trigger.d.ts +0 -83
  44. package/dist/types-ts4.5/components/UfoErrorBoundary.d.ts +0 -17
  45. package/dist/types-ts4.5/components/index.d.ts +0 -9
  46. package/dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts +0 -23
  47. package/dist/types-ts4.5/containers/ConnectedReactionPicker/index.d.ts +0 -2
  48. package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +0 -56
  49. package/dist/types-ts4.5/containers/ConnectedReactionsView/index.d.ts +0 -2
  50. package/dist/types-ts4.5/containers/index.d.ts +0 -2
  51. package/dist/types-ts4.5/hooks/useCloseManager.d.ts +0 -20
  52. package/dist/types-ts4.5/hooks/useDelayedState.d.ts +0 -6
  53. package/dist/types-ts4.5/hooks/useFocusTrap.d.ts +0 -5
  54. package/dist/types-ts4.5/i18n/cs.d.ts +0 -27
  55. package/dist/types-ts4.5/i18n/da.d.ts +0 -27
  56. package/dist/types-ts4.5/i18n/de.d.ts +0 -26
  57. package/dist/types-ts4.5/i18n/en.d.ts +0 -27
  58. package/dist/types-ts4.5/i18n/en_GB.d.ts +0 -27
  59. package/dist/types-ts4.5/i18n/en_ZZ.d.ts +0 -27
  60. package/dist/types-ts4.5/i18n/es.d.ts +0 -27
  61. package/dist/types-ts4.5/i18n/et.d.ts +0 -11
  62. package/dist/types-ts4.5/i18n/fi.d.ts +0 -26
  63. package/dist/types-ts4.5/i18n/fr.d.ts +0 -27
  64. package/dist/types-ts4.5/i18n/hu.d.ts +0 -27
  65. package/dist/types-ts4.5/i18n/index.d.ts +0 -37
  66. package/dist/types-ts4.5/i18n/is.d.ts +0 -6
  67. package/dist/types-ts4.5/i18n/it.d.ts +0 -27
  68. package/dist/types-ts4.5/i18n/ja.d.ts +0 -27
  69. package/dist/types-ts4.5/i18n/ko.d.ts +0 -26
  70. package/dist/types-ts4.5/i18n/languages.d.ts +0 -28
  71. package/dist/types-ts4.5/i18n/nb.d.ts +0 -26
  72. package/dist/types-ts4.5/i18n/nl.d.ts +0 -27
  73. package/dist/types-ts4.5/i18n/pl.d.ts +0 -27
  74. package/dist/types-ts4.5/i18n/pt_BR.d.ts +0 -27
  75. package/dist/types-ts4.5/i18n/pt_PT.d.ts +0 -11
  76. package/dist/types-ts4.5/i18n/ro.d.ts +0 -6
  77. package/dist/types-ts4.5/i18n/ru.d.ts +0 -26
  78. package/dist/types-ts4.5/i18n/sk.d.ts +0 -11
  79. package/dist/types-ts4.5/i18n/sv.d.ts +0 -27
  80. package/dist/types-ts4.5/i18n/th.d.ts +0 -27
  81. package/dist/types-ts4.5/i18n/tr.d.ts +0 -27
  82. package/dist/types-ts4.5/i18n/uk.d.ts +0 -27
  83. package/dist/types-ts4.5/i18n/vi.d.ts +0 -27
  84. package/dist/types-ts4.5/i18n/zh.d.ts +0 -27
  85. package/dist/types-ts4.5/i18n/zh_TW.d.ts +0 -26
  86. package/dist/types-ts4.5/index.d.ts +0 -34
  87. package/dist/types-ts4.5/shared/constants.d.ts +0 -34
  88. package/dist/types-ts4.5/shared/i18n.d.ts +0 -87
  89. package/dist/types-ts4.5/shared/utils.d.ts +0 -18
  90. package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +0 -99
  91. package/dist/types-ts4.5/store/ReactionConsumer.d.ts +0 -57
  92. package/dist/types-ts4.5/store/batched.d.ts +0 -2
  93. package/dist/types-ts4.5/store/index.d.ts +0 -3
  94. package/dist/types-ts4.5/store/utils.d.ts +0 -11
  95. package/dist/types-ts4.5/types/Actions.d.ts +0 -28
  96. package/dist/types-ts4.5/types/Updater.d.ts +0 -2
  97. package/dist/types-ts4.5/types/User.d.ts +0 -21
  98. package/dist/types-ts4.5/types/client.d.ts +0 -38
  99. package/dist/types-ts4.5/types/index.d.ts +0 -25
  100. package/dist/types-ts4.5/types/reaction.d.ts +0 -117
  101. package/dist/types-ts4.5/types/store.d.ts +0 -71
  102. package/dist/types-ts4.5/ufo/index.d.ts +0 -54
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 35.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 34.4.13
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies
34
+
3
35
  ## 34.4.12
4
36
 
5
37
  ### Patch Changes
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/containers/ConnectedReactionPicker/ConnectedReactionPicker.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/store/MemoryReactionsStore.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/store/MemoryReactionsStore.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/store/MemoryReactionsStore.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/MockReactionsClient.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/MockReactionsClient.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/MockReactionsClient.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/components/Reaction.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/components/Reaction.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/components/Reaction.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/store/ReactionConsumer.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/store/ReactionConsumer.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/store/ReactionConsumer.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/components/ReactionPicker.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/components/ReactionPicker.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/components/ReactionPicker.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/client/ReactionServiceClient.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/client/ReactionServiceClient.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/client/ReactionServiceClient.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/components/Reactions.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/components/Reactions.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/components/Reactions.d.ts"
17
10
  }
@@ -11,7 +11,7 @@ var _analyticsGasTypes = require("@atlaskit/analytics-gas-types");
11
11
  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; }
12
12
  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) { (0, _defineProperty2.default)(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; } // eslint-disable-next-line @typescript-eslint/consistent-type-imports
13
13
  var packageName = "@atlaskit/reactions";
14
- var packageVersion = "34.4.11";
14
+ var packageVersion = "34.4.13";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -2,7 +2,7 @@
2
2
  import { createAndFireEvent } from '@atlaskit/analytics-next';
3
3
  import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
4
4
  const packageName = "@atlaskit/reactions";
5
- const packageVersion = "34.4.11";
5
+ const packageVersion = "34.4.13";
6
6
  /**
7
7
  * TODO: move to utility package?
8
8
  * A random sampling function
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
5
5
  import { createAndFireEvent } from '@atlaskit/analytics-next';
6
6
  import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
7
7
  var packageName = "@atlaskit/reactions";
8
- var packageVersion = "34.4.11";
8
+ var packageVersion = "34.4.13";
9
9
  /**
10
10
  * TODO: move to utility package?
11
11
  * A random sampling function
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "34.4.12",
3
+ "version": "35.0.0",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,14 +12,6 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
- "typesVersions": {
16
- ">=4.5 <4.9": {
17
- "*": [
18
- "dist/types-ts4.5/*",
19
- "dist/types-ts4.5/index.d.ts"
20
- ]
21
- }
22
- },
23
15
  "atlaskit:src": "src/index.ts",
24
16
  "atlassian": {
25
17
  "react-compiler": {
@@ -39,32 +31,32 @@
39
31
  },
40
32
  "dependencies": {
41
33
  "@atlaskit/afm-i18n-platform-elements-reactions": "2.7.0",
42
- "@atlaskit/analytics-gas-types": "^5.1.0",
43
- "@atlaskit/analytics-namespaced-context": "^7.3.0",
44
- "@atlaskit/analytics-next": "^11.3.0",
45
- "@atlaskit/avatar": "^25.15.0",
46
- "@atlaskit/button": "^23.11.0",
47
- "@atlaskit/css": "^0.19.0",
48
- "@atlaskit/emoji": "^70.17.0",
49
- "@atlaskit/heading": "^5.4.0",
50
- "@atlaskit/icon": "^35.4.0",
51
- "@atlaskit/link": "^3.4.0",
52
- "@atlaskit/modal-dialog": "^15.3.0",
53
- "@atlaskit/motion": "^6.2.0",
54
- "@atlaskit/platform-feature-flags": "^1.1.0",
55
- "@atlaskit/popper": "^7.2.0",
56
- "@atlaskit/popup": "^4.25.0",
57
- "@atlaskit/portal": "^5.5.0",
58
- "@atlaskit/primitives": "^19.0.0",
59
- "@atlaskit/react-ufo": "^6.7.0",
60
- "@atlaskit/spinner": "^19.1.0",
61
- "@atlaskit/tabs": "^19.1.0",
62
- "@atlaskit/theme": "^25.0.0",
63
- "@atlaskit/tmp-editor-statsig": "^102.0.0",
64
- "@atlaskit/tokens": "^13.4.0",
65
- "@atlaskit/tooltip": "^22.6.0",
66
- "@atlaskit/ufo": "^0.5.0",
67
- "@atlaskit/util-service-support": "^6.4.0",
34
+ "@atlaskit/analytics-gas-types": "^6.0.0",
35
+ "@atlaskit/analytics-namespaced-context": "^8.0.0",
36
+ "@atlaskit/analytics-next": "^12.0.0",
37
+ "@atlaskit/avatar": "^26.0.0",
38
+ "@atlaskit/button": "^24.0.0",
39
+ "@atlaskit/css": "^1.0.0",
40
+ "@atlaskit/emoji": "^71.0.0",
41
+ "@atlaskit/heading": "^6.0.0",
42
+ "@atlaskit/icon": "^36.0.0",
43
+ "@atlaskit/link": "^4.0.0",
44
+ "@atlaskit/modal-dialog": "^16.0.0",
45
+ "@atlaskit/motion": "^7.0.0",
46
+ "@atlaskit/platform-feature-flags": "^2.0.0",
47
+ "@atlaskit/popper": "^8.0.0",
48
+ "@atlaskit/popup": "^5.0.0",
49
+ "@atlaskit/portal": "^6.0.0",
50
+ "@atlaskit/primitives": "^20.0.0",
51
+ "@atlaskit/react-ufo": "^7.0.0",
52
+ "@atlaskit/spinner": "^20.0.0",
53
+ "@atlaskit/tabs": "^20.0.0",
54
+ "@atlaskit/theme": "^26.0.0",
55
+ "@atlaskit/tmp-editor-statsig": "^104.0.0",
56
+ "@atlaskit/tokens": "^14.0.0",
57
+ "@atlaskit/tooltip": "^23.0.0",
58
+ "@atlaskit/ufo": "^1.0.0",
59
+ "@atlaskit/util-service-support": "^7.0.0",
68
60
  "@babel/runtime": "^7.0.0",
69
61
  "@compiled/react": "^0.20.0",
70
62
  "focus-trap": "^2.4.5"
@@ -77,7 +69,7 @@
77
69
  "devDependencies": {
78
70
  "@af/visual-regression": "workspace:^",
79
71
  "@atlaskit/editor-test-helpers": "workspace:^",
80
- "@atlaskit/util-data-test": "^18.6.0",
72
+ "@atlaskit/util-data-test": "^19.0.0",
81
73
  "@atlassian/a11y-jest-testing": "^0.12.0",
82
74
  "@atlassian/feature-flags-test-utils": "^1.1.0",
83
75
  "@atlassian/react-compiler-gating": "workspace:^",
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/types/reaction.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/types/reaction.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/types/reaction.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/types/store.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/types/store.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/types/store.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/types/index.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/types/index.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/types/index.d.ts"
17
10
  }
@@ -6,12 +6,5 @@
6
6
  "sideEffects": [
7
7
  "*.compiled.css"
8
8
  ],
9
- "types": "../dist/types/hooks/useCloseManager.d.ts",
10
- "typesVersions": {
11
- ">=4.5 <5.9": {
12
- "*": [
13
- "../dist/types-ts4.5/hooks/useCloseManager.d.ts"
14
- ]
15
- }
16
- }
9
+ "types": "../dist/types/hooks/useCloseManager.d.ts"
17
10
  }
@@ -1,27 +0,0 @@
1
- import { type Reactions, type Client, type ReactionSummary } from './types';
2
- export declare const containerAri = "ari:cloud:owner:demo-cloud-id:container/1";
3
- export declare const ari = "ari:cloud:owner:demo-cloud-id:item/1";
4
- export declare const getReactionSummary: (shortName: string, count: number, reacted: boolean, extendedReactions?: boolean) => ReactionSummary;
5
- export declare const getUser: (id: string, displayName: string) => {
6
- displayName: string;
7
- id: string;
8
- profilePicture: {
9
- path: string;
10
- };
11
- };
12
- export declare const simpleMockData: {
13
- [key: string]: ReactionSummary[];
14
- };
15
- /**
16
- * Mocked version of the client to fetch user information
17
- */
18
- export declare class MockReactionsClient implements Client {
19
- private delay;
20
- private mockData;
21
- constructor(delay?: number, showExtendedReactions?: boolean);
22
- private delayPromise;
23
- getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
24
- getDetailedReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary>;
25
- addReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary[]>;
26
- deleteReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary[]>;
27
- }
@@ -1,121 +0,0 @@
1
- import { UIAnalyticsEvent, type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
2
- import { type EventType } from '@atlaskit/analytics-gas-types';
3
- import { type ReactionSummary, type ReactionSource } from '../types';
4
- export type PreviousState = 'new' | 'existingNotReacted' | 'existingReacted';
5
- /**
6
- * TODO: move to utility package?
7
- * A random sampling function
8
- * sampling algorithm is from @atlassian/jira-coinflip at https://stash.atlassian.com/projects/JIRACLOUD/repos/jira-frontend/browse/src/packages/platform/app-framework/coinflip/src/index.tsx
9
- * E.g. isSampled(2) will pass 50% of the time
10
- * @param rate The chance that it will pass (1 in <rate> times)
11
- * @returns bool, if it passes or not
12
- */
13
- export declare const isSampled: (rate: number) => boolean;
14
- export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
15
- export declare const createAndFireSafe: <U extends any[], T extends (...args: U) => AnalyticsEventPayload>(createAnalyticsEvent: CreateUIAnalyticsEvent | void, creator: T, ...args: U) => void;
16
- export declare const createRestSucceededEvent: (actionSubject: string) => {
17
- action: string;
18
- actionSubject: string;
19
- eventType: EventType;
20
- actionSubjectId: string | undefined;
21
- attributes: {
22
- packageName: string;
23
- packageVersion: string;
24
- };
25
- };
26
- export declare const createRestFailedEvent: (actionSubject: string, errorCode?: number) => {
27
- action: string;
28
- actionSubject: string;
29
- eventType: EventType;
30
- actionSubjectId: string | undefined;
31
- attributes: {
32
- packageName: string;
33
- packageVersion: string;
34
- };
35
- };
36
- export declare const createReactionsRenderedEvent: (startTime: number) => {
37
- action: string;
38
- actionSubject: string;
39
- eventType: EventType;
40
- actionSubjectId: string | undefined;
41
- attributes: {
42
- packageName: string;
43
- packageVersion: string;
44
- };
45
- };
46
- export declare const createPickerButtonClickedEvent: (reactionEmojiCount: number) => {
47
- action: string;
48
- actionSubject: string;
49
- eventType: EventType;
50
- actionSubjectId: string | undefined;
51
- attributes: {
52
- packageName: string;
53
- packageVersion: string;
54
- };
55
- };
56
- export declare const createPickerCancelledEvent: (startTime?: number) => {
57
- action: string;
58
- actionSubject: string;
59
- eventType: EventType;
60
- actionSubjectId: string | undefined;
61
- attributes: {
62
- packageName: string;
63
- packageVersion: string;
64
- };
65
- };
66
- export declare const createPickerMoreClickedEvent: (startTime?: number) => {
67
- action: string;
68
- actionSubject: string;
69
- eventType: EventType;
70
- actionSubjectId: string | undefined;
71
- attributes: {
72
- packageName: string;
73
- packageVersion: string;
74
- };
75
- };
76
- export declare const createReactionSelectionEvent: (source: ReactionSource, emojiId: string, reaction?: ReactionSummary, startTime?: number) => {
77
- action: string;
78
- actionSubject: string;
79
- eventType: EventType;
80
- actionSubjectId: string | undefined;
81
- attributes: {
82
- packageName: string;
83
- packageVersion: string;
84
- };
85
- };
86
- export declare const createReactionHoveredEvent: (startTime?: number) => {
87
- action: string;
88
- actionSubject: string;
89
- eventType: EventType;
90
- actionSubjectId: string | undefined;
91
- attributes: {
92
- packageName: string;
93
- packageVersion: string;
94
- };
95
- };
96
- export declare const createReactionFocusedEvent: (startTime?: number) => {
97
- action: string;
98
- actionSubject: string;
99
- eventType: EventType;
100
- actionSubjectId: string | undefined;
101
- attributes: {
102
- packageName: string;
103
- packageVersion: string;
104
- };
105
- };
106
- export declare const createReactionClickedEvent: (added: boolean, emojiId: string) => {
107
- action: string;
108
- actionSubject: string;
109
- eventType: EventType;
110
- actionSubjectId: string | undefined;
111
- attributes: {
112
- packageName: string;
113
- packageVersion: string;
114
- };
115
- };
116
- /**
117
- * Used for store failure metadata for analytics
118
- * @param error The error could be a service error with {code, reason} or an Error
119
- * @returns any
120
- */
121
- export declare const extractErrorInfo: (error: any) => any;
@@ -1,35 +0,0 @@
1
- import { type Reactions, type ReactionSummary, type Client } from '../types';
2
- /**
3
- * Utility class to retrieve/modify all actions on reactions collection
4
- */
5
- export declare class ReactionServiceClient implements Client {
6
- /**
7
- * oAuth token
8
- */
9
- private sessionToken?;
10
- /**
11
- * API config
12
- */
13
- private serviceConfig;
14
- /**
15
- *
16
- * @param baseUrl base domain url
17
- * @param sessionToken oAuth token for reactions emoji services
18
- */
19
- constructor(baseUrl: string, sessionToken?: string);
20
- /**
21
- * Get http headers for the "fetch" request
22
- * @param hasBody
23
- */
24
- private getHeaders;
25
- /**
26
- * Send a request to remote service
27
- * @param path endpoint api url
28
- * @param options Optional custom params
29
- */
30
- private requestService;
31
- getReactions(containerAri: string, aris: string[]): Promise<Reactions>;
32
- getDetailedReaction(containerAri: string, ari: string, emojiId: string): Promise<ReactionSummary>;
33
- addReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
34
- deleteReaction(containerAri: string, ari: string, emojiId: string, metadata?: Record<string, any>): Promise<ReactionSummary[]>;
35
- }
@@ -1 +0,0 @@
1
- export { ReactionServiceClient } from './ReactionServiceClient';
@@ -1,51 +0,0 @@
1
- import { type Durations } from '@atlaskit/motion';
2
- /**
3
- * Test id for component top level div
4
- */
5
- export declare const RENDER_COMPONENT_WRAPPER = "counter-wrapper";
6
- /**
7
- * Test id for wrapper div of the counter inside the slider
8
- */
9
- export declare const RENDER_COUNTER_TESTID = "counter-container";
10
- /**
11
- * Counter label value wrapper div
12
- */
13
- export declare const RENDER_LABEL_TESTID = "counter_label_wrapper";
14
- export interface CounterProps {
15
- /**
16
- * Duration of how long the motion will take (defaults to "medium" from '@atlaskit/motion')
17
- */
18
- animationDuration?: Durations;
19
- /**
20
- * Optional wrapper class name
21
- */
22
- className?: string;
23
- /**
24
- * Has the emoji been selected by given user (defaults to false)
25
- */
26
- highlight?: boolean;
27
- /**
28
- * Max threshold of selections to show before having a label (defaults to 1000)
29
- */
30
- limit?: number;
31
- /**
32
- * Label to show when the value surpasses the limit value (defaults to "1k+")
33
- */
34
- overLimitLabel?: string;
35
- /**
36
- * Optional prop to use a darker text color for the counter
37
- */
38
- useDarkerFont?: boolean;
39
- /**
40
- * Optional prop to show updated styling for counter
41
- */
42
- useUpdatedStyles?: boolean;
43
- /**
44
- * Count of emoji been selected
45
- */
46
- value: number;
47
- }
48
- /**
49
- * Display reaction count next to the emoji button
50
- */
51
- export declare const Counter: ({ highlight, limit, overLimitLabel, className, value, animationDuration, useDarkerFont, useUpdatedStyles, }: CounterProps) => JSX.Element;
@@ -1,24 +0,0 @@
1
- import { type EmojiId, type OnEmojiEvent, type EmojiProvider } from '@atlaskit/emoji';
2
- export declare const RENDER_BUTTON_TESTID = "button-emoji-id";
3
- export interface EmojiButtonProps {
4
- /**
5
- * identifier info for a given emoji
6
- */
7
- emojiId: EmojiId;
8
- /**
9
- * Async provider to fetch the emoji
10
- */
11
- emojiProvider: Promise<EmojiProvider>;
12
- /**
13
- * Optional prop for hoverable reaction picker selector emoji
14
- */
15
- hoverableReactionPickerSelectorEmoji?: boolean;
16
- /**
17
- * Event handler when a new emoji is selected
18
- */
19
- onClick: OnEmojiEvent;
20
- }
21
- /**
22
- * custom button to render the custom emoji selector inside the reaction picker
23
- */
24
- export declare const EmojiButton: ({ emojiId, onClick, emojiProvider, hoverableReactionPickerSelectorEmoji, }: EmojiButtonProps) => JSX.Element;
@@ -1,23 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type PropsWithChildren } from 'react';
6
- export type FlashAnimationProps = PropsWithChildren<{
7
- /**
8
- * Optional wrapper div class anme
9
- */
10
- className?: string;
11
- /**
12
- * Show custom animation or render as standard without animation (defaults to false)
13
- */
14
- flash?: boolean;
15
- }>;
16
- /**
17
- * Test id for wrapper FlashAnimation div
18
- */
19
- export declare const RENDER_FLASHANIMATION_TESTID = "flash-animation";
20
- /**
21
- * Flash animation background component. See Reaction component for usage.
22
- */
23
- export declare const FlashAnimation: (props: FlashAnimationProps) => JSX.Element;