@atlaskit/reactions 33.8.20 → 33.8.22
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 +14 -0
- package/dist/cjs/analytics/index.js +2 -2
- package/dist/cjs/components/Reactions.compiled.css +1 -5
- package/dist/cjs/components/Reactions.js +2 -34
- package/dist/es2019/analytics/index.js +2 -1
- package/dist/es2019/components/Reactions.compiled.css +1 -5
- package/dist/es2019/components/Reactions.js +1 -33
- package/dist/es2019/store/MemoryReactionsStore.js +0 -1
- package/dist/esm/analytics/index.js +2 -1
- package/dist/esm/components/Reactions.compiled.css +1 -5
- package/dist/esm/components/Reactions.js +2 -34
- package/dist/esm/store/MemoryReactionsStore.js +0 -1
- package/dist/types/analytics/index.d.ts +2 -2
- package/dist/types/components/ReactionParticleEffect.d.ts +1 -1
- package/dist/types/components/ReactionSummaryButton.d.ts +6 -1
- package/dist/types/components/Reactions.d.ts +3 -2
- package/dist/types/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +2 -2
- package/dist/types/index.d.ts +14 -12
- package/dist/types/store/MemoryReactionsStore.d.ts +6 -4
- package/dist/types/ufo/index.d.ts +2 -1
- package/dist/types-ts4.5/analytics/index.d.ts +2 -2
- package/dist/types-ts4.5/components/ReactionParticleEffect.d.ts +1 -1
- package/dist/types-ts4.5/components/ReactionSummaryButton.d.ts +6 -1
- package/dist/types-ts4.5/components/Reactions.d.ts +3 -2
- package/dist/types-ts4.5/containers/ConnectedReactionsView/ConnectedReactionsView.d.ts +2 -2
- package/dist/types-ts4.5/index.d.ts +14 -12
- package/dist/types-ts4.5/store/MemoryReactionsStore.d.ts +6 -4
- package/dist/types-ts4.5/ufo/index.d.ts +2 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 33.8.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 33.8.21
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`1973bfd3d96db`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1973bfd3d96db) -
|
|
14
|
+
Feature gate cleanup
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 33.8.20
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -9,9 +9,9 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
10
10
|
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
|
-
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; }
|
|
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 = "
|
|
14
|
+
var packageVersion = "0.0.0-development";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
._qtt8glyw{list-style:none}
|
|
3
|
-
._18zrze3t{padding-inline:var(--ds-space-0,0)}
|
|
4
|
-
._195gze3t{margin-inline:var(--ds-space-0,0)}
|
|
5
|
-
._1rjcze3t{padding-block:var(--ds-space-0,0)}._18u0idpf{margin-left:0}
|
|
2
|
+
._qtt8glyw{list-style:none}._18u0idpf{margin-left:0}
|
|
6
3
|
._19bvidpf{padding-left:0}
|
|
7
4
|
._19pkidpf{margin-top:0}
|
|
8
5
|
._1e0c1o8l{display:inline-block}
|
|
@@ -14,7 +11,6 @@
|
|
|
14
11
|
._1pfhr5cr{margin-block-start:var(--ds-space-negative-050,-4px)}
|
|
15
12
|
._2hwxidpf{margin-right:0}
|
|
16
13
|
._4cvr1h6o{align-items:center}
|
|
17
|
-
._6rthze3t{margin-block-end:var(--ds-space-0,0)}
|
|
18
14
|
._ca0qidpf{padding-top:0}
|
|
19
15
|
._kqswh2mm{position:relative}
|
|
20
16
|
._kqswpfqs{position:static}
|
|
@@ -19,7 +19,6 @@ var _analyticsNext = require("@atlaskit/analytics-next");
|
|
|
19
19
|
var _modalDialog = require("@atlaskit/modal-dialog");
|
|
20
20
|
var _segment = _interopRequireDefault(require("@atlaskit/react-ufo/segment"));
|
|
21
21
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
22
|
-
var _compiled = require("@atlaskit/primitives/compiled");
|
|
23
22
|
var _analytics = require("../analytics");
|
|
24
23
|
var _constants = require("../shared/constants");
|
|
25
24
|
var _i18n = require("../shared/i18n");
|
|
@@ -35,9 +34,6 @@ var noFlexWrapStyles = null;
|
|
|
35
34
|
var noContainerPositionStyles = null;
|
|
36
35
|
var reactionPickerStyle = null;
|
|
37
36
|
var listContainerStyles = null;
|
|
38
|
-
var pickerListItemStyles = {
|
|
39
|
-
picker: "_195gze3t _18zrze3t _1rjcze3t _1e0c1o8l _1pfh1b66 _6rthze3t"
|
|
40
|
-
};
|
|
41
37
|
|
|
42
38
|
/**
|
|
43
39
|
* Set of all available UFO experiences relating to Reactions Dialog
|
|
@@ -307,9 +303,6 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
307
303
|
return reaction.count >= 5;
|
|
308
304
|
});
|
|
309
305
|
var shouldShowPicker = !isViewOnly && !(!onlyRenderPicker && shouldShowSummaryView && allowSelectFromSummaryView);
|
|
310
|
-
var semanticListEnabled = (0, _platformFeatureFlags.fg)('jfp_a11y_team_comment_actions_semantic');
|
|
311
|
-
var addReactionButtonAsListItem = (0, _platformFeatureFlags.fg)('platform-a11y-add-reactions-button-ul-item');
|
|
312
|
-
var pickerInsideList = semanticListEnabled && addReactionButtonAsListItem && shouldShowPicker;
|
|
313
306
|
var sortedReactions = (0, _react.useMemo)(function () {
|
|
314
307
|
return (0, _toConsumableArray2.default)(memorizedReactions).sort(function (a, b) {
|
|
315
308
|
return (b === null || b === void 0 ? void 0 : b.count) - (a === null || a === void 0 ? void 0 : a.count);
|
|
@@ -397,32 +390,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
397
390
|
isViewOnly: isViewOnly,
|
|
398
391
|
showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
|
|
399
392
|
});
|
|
400
|
-
})
|
|
401
|
-
as: "li",
|
|
402
|
-
xcss: pickerListItemStyles.picker
|
|
403
|
-
}, /*#__PURE__*/_react.default.createElement(_ReactionPicker.ReactionPicker, {
|
|
404
|
-
emojiProvider: emojiProvider,
|
|
405
|
-
allowAllEmojis: allowAllEmojis,
|
|
406
|
-
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
407
|
-
disabled: status !== _types.ReactionStatus.ready,
|
|
408
|
-
onSelection: handleOnSelection,
|
|
409
|
-
onOpen: handlePickerOpen,
|
|
410
|
-
onCancel: handleOnCancel,
|
|
411
|
-
onShowMore: handleOnMore,
|
|
412
|
-
tooltipContent: hoverableSummaryView ? null : getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
|
|
413
|
-
emojiPickerSize: emojiPickerSize,
|
|
414
|
-
miniMode: miniMode,
|
|
415
|
-
showOpaqueBackground: showOpaqueBackground,
|
|
416
|
-
showAddReactionText: showAddReactionText,
|
|
417
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
418
|
-
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
419
|
-
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
420
|
-
isListItem: isListItem,
|
|
421
|
-
hoverableReactionPicker: hoverableSummaryView,
|
|
422
|
-
hoverableReactionPickerDelay: hoverableSummaryView ? 300 : 0,
|
|
423
|
-
reactionPickerPlacement: reactionPickerPlacement,
|
|
424
|
-
reactionPickerPopperZIndex: reactionPickerPopperZIndex
|
|
425
|
-
}))) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, memorizedReactions.map(function (reaction) {
|
|
393
|
+
})) : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, memorizedReactions.map(function (reaction) {
|
|
426
394
|
return /*#__PURE__*/_react.default.createElement(_Reaction.Reaction, {
|
|
427
395
|
key: reaction.emojiId,
|
|
428
396
|
reaction: reaction,
|
|
@@ -438,7 +406,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
438
406
|
isViewOnly: isViewOnly,
|
|
439
407
|
showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
|
|
440
408
|
});
|
|
441
|
-
}))), shouldShowPicker &&
|
|
409
|
+
}))), shouldShowPicker && /*#__PURE__*/_react.default.createElement(_ReactionPicker.ReactionPicker, {
|
|
442
410
|
emojiProvider: emojiProvider,
|
|
443
411
|
allowAllEmojis: allowAllEmojis,
|
|
444
412
|
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
1
2
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
2
3
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
3
4
|
const packageName = "@atlaskit/reactions";
|
|
4
|
-
const packageVersion = "
|
|
5
|
+
const packageVersion = "0.0.0-development";
|
|
5
6
|
/**
|
|
6
7
|
* TODO: move to utility package?
|
|
7
8
|
* A random sampling function
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
._qtt8glyw{list-style:none}
|
|
3
|
-
._18zrze3t{padding-inline:var(--ds-space-0,0)}
|
|
4
|
-
._195gze3t{margin-inline:var(--ds-space-0,0)}
|
|
5
|
-
._1rjcze3t{padding-block:var(--ds-space-0,0)}._18u0idpf{margin-left:0}
|
|
2
|
+
._qtt8glyw{list-style:none}._18u0idpf{margin-left:0}
|
|
6
3
|
._19bvidpf{padding-left:0}
|
|
7
4
|
._19pkidpf{margin-top:0}
|
|
8
5
|
._1e0c1o8l{display:inline-block}
|
|
@@ -14,7 +11,6 @@
|
|
|
14
11
|
._1pfhr5cr{margin-block-start:var(--ds-space-negative-050,-4px)}
|
|
15
12
|
._2hwxidpf{margin-right:0}
|
|
16
13
|
._4cvr1h6o{align-items:center}
|
|
17
|
-
._6rthze3t{margin-block-end:var(--ds-space-0,0)}
|
|
18
14
|
._ca0qidpf{padding-top:0}
|
|
19
15
|
._kqswh2mm{position:relative}
|
|
20
16
|
._kqswpfqs{position:static}
|
|
@@ -7,7 +7,6 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
7
7
|
import { ModalTransition } from '@atlaskit/modal-dialog';
|
|
8
8
|
import UFOSegment from '@atlaskit/react-ufo/segment';
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
11
10
|
import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../analytics';
|
|
12
11
|
import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../shared/constants';
|
|
13
12
|
import { messages } from '../shared/i18n';
|
|
@@ -22,9 +21,6 @@ const noFlexWrapStyles = null;
|
|
|
22
21
|
const noContainerPositionStyles = null;
|
|
23
22
|
const reactionPickerStyle = null;
|
|
24
23
|
const listContainerStyles = null;
|
|
25
|
-
const pickerListItemStyles = {
|
|
26
|
-
picker: "_195gze3t _18zrze3t _1rjcze3t _1e0c1o8l _1pfh1b66 _6rthze3t"
|
|
27
|
-
};
|
|
28
24
|
|
|
29
25
|
/**
|
|
30
26
|
* Set of all available UFO experiences relating to Reactions Dialog
|
|
@@ -257,9 +253,6 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
257
253
|
// criteria to show Reactions Dialog
|
|
258
254
|
const hasEmojiWithFivePlusReactions = reactions.some(reaction => reaction.count >= 5);
|
|
259
255
|
const shouldShowPicker = !isViewOnly && !(!onlyRenderPicker && shouldShowSummaryView && allowSelectFromSummaryView);
|
|
260
|
-
const semanticListEnabled = fg('jfp_a11y_team_comment_actions_semantic');
|
|
261
|
-
const addReactionButtonAsListItem = fg('platform-a11y-add-reactions-button-ul-item');
|
|
262
|
-
const pickerInsideList = semanticListEnabled && addReactionButtonAsListItem && shouldShowPicker;
|
|
263
256
|
const sortedReactions = useMemo(() => {
|
|
264
257
|
return [...memorizedReactions].sort((a, b) => (b === null || b === void 0 ? void 0 : b.count) - (a === null || a === void 0 ? void 0 : a.count));
|
|
265
258
|
}, [memorizedReactions]);
|
|
@@ -339,31 +332,6 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
339
332
|
handleOpenReactionsDialog: handleOpenReactionsDialog,
|
|
340
333
|
isViewOnly: isViewOnly,
|
|
341
334
|
showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
|
|
342
|
-
})), pickerInsideList && /*#__PURE__*/React.createElement(Box, {
|
|
343
|
-
as: "li",
|
|
344
|
-
xcss: pickerListItemStyles.picker
|
|
345
|
-
}, /*#__PURE__*/React.createElement(ReactionPicker, {
|
|
346
|
-
emojiProvider: emojiProvider,
|
|
347
|
-
allowAllEmojis: allowAllEmojis,
|
|
348
|
-
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
349
|
-
disabled: status !== ReactionStatus.ready,
|
|
350
|
-
onSelection: handleOnSelection,
|
|
351
|
-
onOpen: handlePickerOpen,
|
|
352
|
-
onCancel: handleOnCancel,
|
|
353
|
-
onShowMore: handleOnMore,
|
|
354
|
-
tooltipContent: hoverableSummaryView ? null : getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
|
|
355
|
-
emojiPickerSize: emojiPickerSize,
|
|
356
|
-
miniMode: miniMode,
|
|
357
|
-
showOpaqueBackground: showOpaqueBackground,
|
|
358
|
-
showAddReactionText: showAddReactionText,
|
|
359
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
360
|
-
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
361
|
-
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
362
|
-
isListItem: isListItem,
|
|
363
|
-
hoverableReactionPicker: hoverableSummaryView,
|
|
364
|
-
hoverableReactionPickerDelay: hoverableSummaryView ? 300 : 0,
|
|
365
|
-
reactionPickerPlacement: reactionPickerPlacement,
|
|
366
|
-
reactionPickerPopperZIndex: reactionPickerPopperZIndex
|
|
367
335
|
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, memorizedReactions.map(reaction => /*#__PURE__*/React.createElement(Reaction, {
|
|
368
336
|
key: reaction.emojiId,
|
|
369
337
|
reaction: reaction,
|
|
@@ -378,7 +346,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
|
|
|
378
346
|
handleOpenReactionsDialog: handleOpenReactionsDialog,
|
|
379
347
|
isViewOnly: isViewOnly,
|
|
380
348
|
showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
|
|
381
|
-
})))), shouldShowPicker &&
|
|
349
|
+
})))), shouldShowPicker && /*#__PURE__*/React.createElement(ReactionPicker, {
|
|
382
350
|
emojiProvider: emojiProvider,
|
|
383
351
|
allowAllEmojis: allowAllEmojis,
|
|
384
352
|
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
@@ -6,7 +6,6 @@ import { addOne, byEmojiId, flattenAris, getReactionsSortFunction, isRealErrorFr
|
|
|
6
6
|
import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../shared/constants';
|
|
7
7
|
import { ReactionsAdd, ReactionDetailsFetch, ReactionsRemove, sampledReactionsRendered } from '../ufo';
|
|
8
8
|
import { ReactionUpdateType } from '../types/reaction';
|
|
9
|
-
|
|
10
9
|
/**
|
|
11
10
|
* Set of all available UFO experiences relating to reaction element
|
|
12
11
|
*/
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
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; }
|
|
3
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
4
5
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
5
6
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
6
7
|
var packageName = "@atlaskit/reactions";
|
|
7
|
-
var packageVersion = "
|
|
8
|
+
var packageVersion = "0.0.0-development";
|
|
8
9
|
/**
|
|
9
10
|
* TODO: move to utility package?
|
|
10
11
|
* A random sampling function
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
._qtt8glyw{list-style:none}
|
|
3
|
-
._18zrze3t{padding-inline:var(--ds-space-0,0)}
|
|
4
|
-
._195gze3t{margin-inline:var(--ds-space-0,0)}
|
|
5
|
-
._1rjcze3t{padding-block:var(--ds-space-0,0)}._18u0idpf{margin-left:0}
|
|
2
|
+
._qtt8glyw{list-style:none}._18u0idpf{margin-left:0}
|
|
6
3
|
._19bvidpf{padding-left:0}
|
|
7
4
|
._19pkidpf{margin-top:0}
|
|
8
5
|
._1e0c1o8l{display:inline-block}
|
|
@@ -14,7 +11,6 @@
|
|
|
14
11
|
._1pfhr5cr{margin-block-start:var(--ds-space-negative-050,-4px)}
|
|
15
12
|
._2hwxidpf{margin-right:0}
|
|
16
13
|
._4cvr1h6o{align-items:center}
|
|
17
|
-
._6rthze3t{margin-block-end:var(--ds-space-0,0)}
|
|
18
14
|
._ca0qidpf{padding-top:0}
|
|
19
15
|
._kqswh2mm{position:relative}
|
|
20
16
|
._kqswpfqs{position:static}
|
|
@@ -9,7 +9,6 @@ import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
|
9
9
|
import { ModalTransition } from '@atlaskit/modal-dialog';
|
|
10
10
|
import UFOSegment from '@atlaskit/react-ufo/segment';
|
|
11
11
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
12
|
-
import { Box } from '@atlaskit/primitives/compiled';
|
|
13
12
|
import { createAndFireSafe, createPickerButtonClickedEvent, createPickerCancelledEvent, createPickerMoreClickedEvent, createReactionsRenderedEvent, createReactionSelectionEvent, isSampled } from '../analytics';
|
|
14
13
|
import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../shared/constants';
|
|
15
14
|
import { messages } from '../shared/i18n';
|
|
@@ -24,9 +23,6 @@ var noFlexWrapStyles = null;
|
|
|
24
23
|
var noContainerPositionStyles = null;
|
|
25
24
|
var reactionPickerStyle = null;
|
|
26
25
|
var listContainerStyles = null;
|
|
27
|
-
var pickerListItemStyles = {
|
|
28
|
-
picker: "_195gze3t _18zrze3t _1rjcze3t _1e0c1o8l _1pfh1b66 _6rthze3t"
|
|
29
|
-
};
|
|
30
26
|
|
|
31
27
|
/**
|
|
32
28
|
* Set of all available UFO experiences relating to Reactions Dialog
|
|
@@ -296,9 +292,6 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
296
292
|
return reaction.count >= 5;
|
|
297
293
|
});
|
|
298
294
|
var shouldShowPicker = !isViewOnly && !(!onlyRenderPicker && shouldShowSummaryView && allowSelectFromSummaryView);
|
|
299
|
-
var semanticListEnabled = fg('jfp_a11y_team_comment_actions_semantic');
|
|
300
|
-
var addReactionButtonAsListItem = fg('platform-a11y-add-reactions-button-ul-item');
|
|
301
|
-
var pickerInsideList = semanticListEnabled && addReactionButtonAsListItem && shouldShowPicker;
|
|
302
295
|
var sortedReactions = useMemo(function () {
|
|
303
296
|
return _toConsumableArray(memorizedReactions).sort(function (a, b) {
|
|
304
297
|
return (b === null || b === void 0 ? void 0 : b.count) - (a === null || a === void 0 ? void 0 : a.count);
|
|
@@ -386,32 +379,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
386
379
|
isViewOnly: isViewOnly,
|
|
387
380
|
showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
|
|
388
381
|
});
|
|
389
|
-
})
|
|
390
|
-
as: "li",
|
|
391
|
-
xcss: pickerListItemStyles.picker
|
|
392
|
-
}, /*#__PURE__*/React.createElement(ReactionPicker, {
|
|
393
|
-
emojiProvider: emojiProvider,
|
|
394
|
-
allowAllEmojis: allowAllEmojis,
|
|
395
|
-
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
396
|
-
disabled: status !== ReactionStatus.ready,
|
|
397
|
-
onSelection: handleOnSelection,
|
|
398
|
-
onOpen: handlePickerOpen,
|
|
399
|
-
onCancel: handleOnCancel,
|
|
400
|
-
onShowMore: handleOnMore,
|
|
401
|
-
tooltipContent: hoverableSummaryView ? null : getTooltip(status, errorMessage, reactionPickerTriggerTooltipContent),
|
|
402
|
-
emojiPickerSize: emojiPickerSize,
|
|
403
|
-
miniMode: miniMode,
|
|
404
|
-
showOpaqueBackground: showOpaqueBackground,
|
|
405
|
-
showAddReactionText: showAddReactionText,
|
|
406
|
-
subtleReactionsSummaryAndPicker: subtleReactionsSummaryAndPicker,
|
|
407
|
-
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
408
|
-
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
409
|
-
isListItem: isListItem,
|
|
410
|
-
hoverableReactionPicker: hoverableSummaryView,
|
|
411
|
-
hoverableReactionPickerDelay: hoverableSummaryView ? 300 : 0,
|
|
412
|
-
reactionPickerPlacement: reactionPickerPlacement,
|
|
413
|
-
reactionPickerPopperZIndex: reactionPickerPopperZIndex
|
|
414
|
-
}))) : /*#__PURE__*/React.createElement(React.Fragment, null, memorizedReactions.map(function (reaction) {
|
|
382
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, memorizedReactions.map(function (reaction) {
|
|
415
383
|
return /*#__PURE__*/React.createElement(Reaction, {
|
|
416
384
|
key: reaction.emojiId,
|
|
417
385
|
reaction: reaction,
|
|
@@ -427,7 +395,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
|
|
|
427
395
|
isViewOnly: isViewOnly,
|
|
428
396
|
showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
|
|
429
397
|
});
|
|
430
|
-
}))), shouldShowPicker &&
|
|
398
|
+
}))), shouldShowPicker && /*#__PURE__*/React.createElement(ReactionPicker, {
|
|
431
399
|
emojiProvider: emojiProvider,
|
|
432
400
|
allowAllEmojis: allowAllEmojis,
|
|
433
401
|
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
@@ -10,7 +10,6 @@ import { addOne, byEmojiId, flattenAris, getReactionsSortFunction, isRealErrorFr
|
|
|
10
10
|
import { SAMPLING_RATE_REACTIONS_RENDERED_EXP } from '../shared/constants';
|
|
11
11
|
import { ReactionsAdd, ReactionDetailsFetch, ReactionsRemove, sampledReactionsRendered } from '../ufo';
|
|
12
12
|
import { ReactionUpdateType } from '../types/reaction';
|
|
13
|
-
|
|
14
13
|
/**
|
|
15
14
|
* Set of all available UFO experiences relating to reaction element
|
|
16
15
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
1
|
+
import { UIAnalyticsEvent, type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { type EventType } from '@atlaskit/analytics-gas-types';
|
|
3
3
|
import { type ReactionSummary, type ReactionSource } from '../types';
|
|
4
4
|
export type PreviousState = 'new' | 'existingNotReacted' | 'existingReacted';
|
|
@@ -11,7 +11,7 @@ export type PreviousState = 'new' | 'existingNotReacted' | 'existingReacted';
|
|
|
11
11
|
* @returns bool, if it passes or not
|
|
12
12
|
*/
|
|
13
13
|
export declare const isSampled: (rate: number) => boolean;
|
|
14
|
-
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) =>
|
|
14
|
+
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
|
|
15
15
|
export declare const createAndFireSafe: <U extends any[], T extends (...args: U) => AnalyticsEventPayload>(createAnalyticsEvent: CreateUIAnalyticsEvent | void, creator: T, ...args: U) => void;
|
|
16
16
|
export declare const createRestSucceededEvent: (actionSubject: string) => {
|
|
17
17
|
action: string;
|
|
@@ -14,5 +14,5 @@ interface ReactionParticleEffectProps {
|
|
|
14
14
|
*/
|
|
15
15
|
emojiProvider: Promise<EmojiProvider>;
|
|
16
16
|
}
|
|
17
|
-
export declare const ReactionParticleEffect: ({ emojiProvider, emojiId }: ReactionParticleEffectProps) => JSX.Element;
|
|
17
|
+
export declare const ReactionParticleEffect: ({ emojiProvider, emojiId, }: ReactionParticleEffectProps) => JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
1
6
|
import { type ReactionsProps } from './Reactions';
|
|
2
7
|
interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'useButtonAlignmentStyling'> {
|
|
3
8
|
/**
|
|
@@ -48,5 +53,5 @@ export declare const RENDER_SUMMARY_BUTTON_TESTID = "reaction-summary-button";
|
|
|
48
53
|
* Test id for emojis displayed inside summary button. All emoji's in the summary button will have this test id
|
|
49
54
|
*/
|
|
50
55
|
export declare const RENDER_SUMMARY_EMOJI_TESTID = "summary-emoji-display";
|
|
51
|
-
export declare const ReactionSummaryButton:
|
|
56
|
+
export declare const ReactionSummaryButton: ForwardRefExoticComponent<ReactionSummaryButtonProps & RefAttributes<HTMLDivElement>>;
|
|
52
57
|
export {};
|
|
@@ -9,6 +9,7 @@ import { type Placement } from '@atlaskit/popper';
|
|
|
9
9
|
import { ReactionStatus, type ReactionClick, type ReactionSummary, type QuickReactionEmojiSummary, type ProfileCardWrapper } from '../types';
|
|
10
10
|
import { type ReactionPickerProps } from './ReactionPicker';
|
|
11
11
|
import { type SelectorProps } from './Selector';
|
|
12
|
+
import type { UFOExperience } from '@atlaskit/ufo';
|
|
12
13
|
/**
|
|
13
14
|
* Set of all available UFO experiences relating to Reactions Dialog
|
|
14
15
|
*/
|
|
@@ -16,11 +17,11 @@ export declare const ufoExperiences: {
|
|
|
16
17
|
/**
|
|
17
18
|
* Experience when a reaction dialog is opened
|
|
18
19
|
*/
|
|
19
|
-
openDialog:
|
|
20
|
+
openDialog: UFOExperience;
|
|
20
21
|
/**
|
|
21
22
|
* Experience when a reaction changed/fetched from inside the modal dialog
|
|
22
23
|
*/
|
|
23
|
-
selectedReactionChangeInsideDialog:
|
|
24
|
+
selectedReactionChangeInsideDialog: UFOExperience;
|
|
24
25
|
};
|
|
25
26
|
/**
|
|
26
27
|
* Test id for wrapper Reactions div
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ReactionsProps, type ReactionPickerProps } from '../../components';
|
|
3
3
|
import { ReactionStatus, type Actions, type State, type StorePropInput } from '../../types';
|
|
4
|
-
import { type ReactionUpdateSuccess } from '../../types/reaction';
|
|
4
|
+
import { type ReactionSummary, type ReactionUpdateSuccess } from '../../types/reaction';
|
|
5
5
|
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'isViewOnly' | 'allowSelectFromSummaryView' | 'reactionPickerPopperZIndex'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
6
6
|
/**
|
|
7
7
|
* Individual id for a reaction
|
|
@@ -35,7 +35,7 @@ export declare const mapStateToPropsHelper: (containerAri: string, ari: string,
|
|
|
35
35
|
flash?: undefined;
|
|
36
36
|
particleEffectByEmoji?: undefined;
|
|
37
37
|
} | {
|
|
38
|
-
reactions:
|
|
38
|
+
reactions: ReactionSummary[];
|
|
39
39
|
status: ReactionStatus.ready;
|
|
40
40
|
flash: {
|
|
41
41
|
[emojiId: string]: boolean;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ComponentName, ExperienceName } from './ufo';
|
|
2
2
|
import { ReactionPicker } from './components/ReactionPicker';
|
|
3
|
+
import type { EmojiId, WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
4
|
+
import type { UFOExperience, ConcurrentExperience } from '@atlaskit/ufo';
|
|
3
5
|
export { ReactionServiceClient } from './client';
|
|
4
6
|
export { Reaction } from './components/Reaction';
|
|
5
7
|
export { ReactionPicker };
|
|
@@ -10,10 +12,10 @@ export { MemoryReactionsStore, ReactionConsumer } from './store';
|
|
|
10
12
|
export type { Client as ReactionClient, Request as ReactionRequest, Store as ReactionsStore, Reactions as ReactionsType, StorePropInput, State, } from './types';
|
|
11
13
|
export { ReactionUpdateType, ReactionStatus, type ReactionSummary } from './types';
|
|
12
14
|
export declare const constants: {
|
|
13
|
-
DefaultReactions:
|
|
14
|
-
DefaultReactionsByShortName: Map<string,
|
|
15
|
-
ExtendedReactions:
|
|
16
|
-
ExtendedReactionsByShortName: Map<string,
|
|
15
|
+
DefaultReactions: EmojiId[];
|
|
16
|
+
DefaultReactionsByShortName: Map<string, EmojiId>;
|
|
17
|
+
ExtendedReactions: EmojiId[];
|
|
18
|
+
ExtendedReactionsByShortName: Map<string, EmojiId>;
|
|
17
19
|
NUMBER_OF_REACTIONS_TO_DISPLAY: number;
|
|
18
20
|
SAMPLING_RATE_REACTIONS_RENDERED_EXP: number;
|
|
19
21
|
TOOLTIP_USERS_LIMIT: number;
|
|
@@ -21,12 +23,12 @@ export declare const constants: {
|
|
|
21
23
|
export declare const UFO: {
|
|
22
24
|
ComponentName: typeof ComponentName;
|
|
23
25
|
ExperienceName: typeof ExperienceName;
|
|
24
|
-
PickerRender:
|
|
25
|
-
ReactionsAdd:
|
|
26
|
-
ReactionDetailsFetch:
|
|
27
|
-
ReactionDialogOpened:
|
|
28
|
-
ReactionDialogSelectedReactionChanged:
|
|
29
|
-
ReactionsRemove:
|
|
30
|
-
ReactionsRendered:
|
|
31
|
-
sampledReactionsRendered: (instanceId: string) =>
|
|
26
|
+
PickerRender: UFOExperience;
|
|
27
|
+
ReactionsAdd: ConcurrentExperience;
|
|
28
|
+
ReactionDetailsFetch: ConcurrentExperience;
|
|
29
|
+
ReactionDialogOpened: UFOExperience;
|
|
30
|
+
ReactionDialogSelectedReactionChanged: UFOExperience;
|
|
31
|
+
ReactionsRemove: ConcurrentExperience;
|
|
32
|
+
ReactionsRendered: ConcurrentExperience;
|
|
33
|
+
sampledReactionsRendered: (instanceId: string) => WithSamplingUFOExperience;
|
|
32
34
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { type Client, type OnChangeCallback, type State, type Store } from '../types';
|
|
3
3
|
import { type ReactionUpdateSuccess } from '../types/reaction';
|
|
4
|
+
import type { WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
5
|
+
import type { ConcurrentExperience } from '@atlaskit/ufo';
|
|
4
6
|
/**
|
|
5
7
|
* Set of all available UFO experiences relating to reaction element
|
|
6
8
|
*/
|
|
@@ -8,19 +10,19 @@ export declare const ufoExperiences: {
|
|
|
8
10
|
/**
|
|
9
11
|
* Experience when a reaction emoji gets added
|
|
10
12
|
*/
|
|
11
|
-
add:
|
|
13
|
+
add: ConcurrentExperience;
|
|
12
14
|
/**
|
|
13
15
|
* Experience when a reaction emoji gets removed/decrement
|
|
14
16
|
*/
|
|
15
|
-
remove:
|
|
17
|
+
remove: ConcurrentExperience;
|
|
16
18
|
/**
|
|
17
19
|
* Experience when the list of reactions gets rendered with sampling
|
|
18
20
|
*/
|
|
19
|
-
render: (instanceId: string) =>
|
|
21
|
+
render: (instanceId: string) => WithSamplingUFOExperience;
|
|
20
22
|
/**
|
|
21
23
|
* Experience when a reaction details gets fetched
|
|
22
24
|
*/
|
|
23
|
-
fetchDetails:
|
|
25
|
+
fetchDetails: ConcurrentExperience;
|
|
24
26
|
};
|
|
25
27
|
/**
|
|
26
28
|
* Optional metadata information in the store used in sending the API client requests
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConcurrentExperience, UFOExperience } from '@atlaskit/ufo';
|
|
2
|
+
import { type WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
2
3
|
/**
|
|
3
4
|
* Types of experiences
|
|
4
5
|
*/
|
|
@@ -50,4 +51,4 @@ export declare const ReactionDetailsFetch: ConcurrentExperience;
|
|
|
50
51
|
* Experience when a reaction emoji gets removed/decrement
|
|
51
52
|
*/
|
|
52
53
|
export declare const ReactionsRemove: ConcurrentExperience;
|
|
53
|
-
export declare const sampledReactionsRendered: (instanceId: string) =>
|
|
54
|
+
export declare const sampledReactionsRendered: (instanceId: string) => WithSamplingUFOExperience;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
1
|
+
import { UIAnalyticsEvent, type AnalyticsEventPayload, type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { type EventType } from '@atlaskit/analytics-gas-types';
|
|
3
3
|
import { type ReactionSummary, type ReactionSource } from '../types';
|
|
4
4
|
export type PreviousState = 'new' | 'existingNotReacted' | 'existingReacted';
|
|
@@ -11,7 +11,7 @@ export type PreviousState = 'new' | 'existingNotReacted' | 'existingReacted';
|
|
|
11
11
|
* @returns bool, if it passes or not
|
|
12
12
|
*/
|
|
13
13
|
export declare const isSampled: (rate: number) => boolean;
|
|
14
|
-
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) =>
|
|
14
|
+
export declare const createAndFireEventInElementsChannel: (payload: AnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent;
|
|
15
15
|
export declare const createAndFireSafe: <U extends any[], T extends (...args: U) => AnalyticsEventPayload>(createAnalyticsEvent: CreateUIAnalyticsEvent | void, creator: T, ...args: U) => void;
|
|
16
16
|
export declare const createRestSucceededEvent: (actionSubject: string) => {
|
|
17
17
|
action: string;
|
|
@@ -14,5 +14,5 @@ interface ReactionParticleEffectProps {
|
|
|
14
14
|
*/
|
|
15
15
|
emojiProvider: Promise<EmojiProvider>;
|
|
16
16
|
}
|
|
17
|
-
export declare const ReactionParticleEffect: ({ emojiProvider, emojiId }: ReactionParticleEffectProps) => JSX.Element;
|
|
17
|
+
export declare const ReactionParticleEffect: ({ emojiProvider, emojiId, }: ReactionParticleEffectProps) => JSX.Element;
|
|
18
18
|
export {};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import { type ForwardRefExoticComponent, type RefAttributes } from 'react';
|
|
1
6
|
import { type ReactionsProps } from './Reactions';
|
|
2
7
|
interface ReactionSummaryButtonProps extends Pick<ReactionsProps, 'emojiProvider' | 'reactions' | 'useButtonAlignmentStyling'> {
|
|
3
8
|
/**
|
|
@@ -48,5 +53,5 @@ export declare const RENDER_SUMMARY_BUTTON_TESTID = "reaction-summary-button";
|
|
|
48
53
|
* Test id for emojis displayed inside summary button. All emoji's in the summary button will have this test id
|
|
49
54
|
*/
|
|
50
55
|
export declare const RENDER_SUMMARY_EMOJI_TESTID = "summary-emoji-display";
|
|
51
|
-
export declare const ReactionSummaryButton:
|
|
56
|
+
export declare const ReactionSummaryButton: ForwardRefExoticComponent<ReactionSummaryButtonProps & RefAttributes<HTMLDivElement>>;
|
|
52
57
|
export {};
|
|
@@ -9,6 +9,7 @@ import { type Placement } from '@atlaskit/popper';
|
|
|
9
9
|
import { ReactionStatus, type ReactionClick, type ReactionSummary, type QuickReactionEmojiSummary, type ProfileCardWrapper } from '../types';
|
|
10
10
|
import { type ReactionPickerProps } from './ReactionPicker';
|
|
11
11
|
import { type SelectorProps } from './Selector';
|
|
12
|
+
import type { UFOExperience } from '@atlaskit/ufo';
|
|
12
13
|
/**
|
|
13
14
|
* Set of all available UFO experiences relating to Reactions Dialog
|
|
14
15
|
*/
|
|
@@ -16,11 +17,11 @@ export declare const ufoExperiences: {
|
|
|
16
17
|
/**
|
|
17
18
|
* Experience when a reaction dialog is opened
|
|
18
19
|
*/
|
|
19
|
-
openDialog:
|
|
20
|
+
openDialog: UFOExperience;
|
|
20
21
|
/**
|
|
21
22
|
* Experience when a reaction changed/fetched from inside the modal dialog
|
|
22
23
|
*/
|
|
23
|
-
selectedReactionChangeInsideDialog:
|
|
24
|
+
selectedReactionChangeInsideDialog: UFOExperience;
|
|
24
25
|
};
|
|
25
26
|
/**
|
|
26
27
|
* Test id for wrapper Reactions div
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type ReactionsProps, type ReactionPickerProps } from '../../components';
|
|
3
3
|
import { ReactionStatus, type Actions, type State, type StorePropInput } from '../../types';
|
|
4
|
-
import { type ReactionUpdateSuccess } from '../../types/reaction';
|
|
4
|
+
import { type ReactionSummary, type ReactionUpdateSuccess } from '../../types/reaction';
|
|
5
5
|
export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'isViewOnly' | 'allowSelectFromSummaryView' | 'reactionPickerPopperZIndex'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
|
|
6
6
|
/**
|
|
7
7
|
* Individual id for a reaction
|
|
@@ -35,7 +35,7 @@ export declare const mapStateToPropsHelper: (containerAri: string, ari: string,
|
|
|
35
35
|
flash?: undefined;
|
|
36
36
|
particleEffectByEmoji?: undefined;
|
|
37
37
|
} | {
|
|
38
|
-
reactions:
|
|
38
|
+
reactions: ReactionSummary[];
|
|
39
39
|
status: ReactionStatus.ready;
|
|
40
40
|
flash: {
|
|
41
41
|
[emojiId: string]: boolean;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ComponentName, ExperienceName } from './ufo';
|
|
2
2
|
import { ReactionPicker } from './components/ReactionPicker';
|
|
3
|
+
import type { EmojiId, WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
4
|
+
import type { UFOExperience, ConcurrentExperience } from '@atlaskit/ufo';
|
|
3
5
|
export { ReactionServiceClient } from './client';
|
|
4
6
|
export { Reaction } from './components/Reaction';
|
|
5
7
|
export { ReactionPicker };
|
|
@@ -10,10 +12,10 @@ export { MemoryReactionsStore, ReactionConsumer } from './store';
|
|
|
10
12
|
export type { Client as ReactionClient, Request as ReactionRequest, Store as ReactionsStore, Reactions as ReactionsType, StorePropInput, State, } from './types';
|
|
11
13
|
export { ReactionUpdateType, ReactionStatus, type ReactionSummary } from './types';
|
|
12
14
|
export declare const constants: {
|
|
13
|
-
DefaultReactions:
|
|
14
|
-
DefaultReactionsByShortName: Map<string,
|
|
15
|
-
ExtendedReactions:
|
|
16
|
-
ExtendedReactionsByShortName: Map<string,
|
|
15
|
+
DefaultReactions: EmojiId[];
|
|
16
|
+
DefaultReactionsByShortName: Map<string, EmojiId>;
|
|
17
|
+
ExtendedReactions: EmojiId[];
|
|
18
|
+
ExtendedReactionsByShortName: Map<string, EmojiId>;
|
|
17
19
|
NUMBER_OF_REACTIONS_TO_DISPLAY: number;
|
|
18
20
|
SAMPLING_RATE_REACTIONS_RENDERED_EXP: number;
|
|
19
21
|
TOOLTIP_USERS_LIMIT: number;
|
|
@@ -21,12 +23,12 @@ export declare const constants: {
|
|
|
21
23
|
export declare const UFO: {
|
|
22
24
|
ComponentName: typeof ComponentName;
|
|
23
25
|
ExperienceName: typeof ExperienceName;
|
|
24
|
-
PickerRender:
|
|
25
|
-
ReactionsAdd:
|
|
26
|
-
ReactionDetailsFetch:
|
|
27
|
-
ReactionDialogOpened:
|
|
28
|
-
ReactionDialogSelectedReactionChanged:
|
|
29
|
-
ReactionsRemove:
|
|
30
|
-
ReactionsRendered:
|
|
31
|
-
sampledReactionsRendered: (instanceId: string) =>
|
|
26
|
+
PickerRender: UFOExperience;
|
|
27
|
+
ReactionsAdd: ConcurrentExperience;
|
|
28
|
+
ReactionDetailsFetch: ConcurrentExperience;
|
|
29
|
+
ReactionDialogOpened: UFOExperience;
|
|
30
|
+
ReactionDialogSelectedReactionChanged: UFOExperience;
|
|
31
|
+
ReactionsRemove: ConcurrentExperience;
|
|
32
|
+
ReactionsRendered: ConcurrentExperience;
|
|
33
|
+
sampledReactionsRendered: (instanceId: string) => WithSamplingUFOExperience;
|
|
32
34
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { type Client, type OnChangeCallback, type State, type Store } from '../types';
|
|
3
3
|
import { type ReactionUpdateSuccess } from '../types/reaction';
|
|
4
|
+
import type { WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
5
|
+
import type { ConcurrentExperience } from '@atlaskit/ufo';
|
|
4
6
|
/**
|
|
5
7
|
* Set of all available UFO experiences relating to reaction element
|
|
6
8
|
*/
|
|
@@ -8,19 +10,19 @@ export declare const ufoExperiences: {
|
|
|
8
10
|
/**
|
|
9
11
|
* Experience when a reaction emoji gets added
|
|
10
12
|
*/
|
|
11
|
-
add:
|
|
13
|
+
add: ConcurrentExperience;
|
|
12
14
|
/**
|
|
13
15
|
* Experience when a reaction emoji gets removed/decrement
|
|
14
16
|
*/
|
|
15
|
-
remove:
|
|
17
|
+
remove: ConcurrentExperience;
|
|
16
18
|
/**
|
|
17
19
|
* Experience when the list of reactions gets rendered with sampling
|
|
18
20
|
*/
|
|
19
|
-
render: (instanceId: string) =>
|
|
21
|
+
render: (instanceId: string) => WithSamplingUFOExperience;
|
|
20
22
|
/**
|
|
21
23
|
* Experience when a reaction details gets fetched
|
|
22
24
|
*/
|
|
23
|
-
fetchDetails:
|
|
25
|
+
fetchDetails: ConcurrentExperience;
|
|
24
26
|
};
|
|
25
27
|
/**
|
|
26
28
|
* Optional metadata information in the store used in sending the API client requests
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConcurrentExperience, UFOExperience } from '@atlaskit/ufo';
|
|
2
|
+
import { type WithSamplingUFOExperience } from '@atlaskit/emoji';
|
|
2
3
|
/**
|
|
3
4
|
* Types of experiences
|
|
4
5
|
*/
|
|
@@ -50,4 +51,4 @@ export declare const ReactionDetailsFetch: ConcurrentExperience;
|
|
|
50
51
|
* Experience when a reaction emoji gets removed/decrement
|
|
51
52
|
*/
|
|
52
53
|
export declare const ReactionsRemove: ConcurrentExperience;
|
|
53
|
-
export declare const sampledReactionsRendered: (instanceId: string) =>
|
|
54
|
+
export declare const sampledReactionsRendered: (instanceId: string) => WithSamplingUFOExperience;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "33.8.
|
|
3
|
+
"version": "33.8.22",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"@atlaskit/analytics-gas-types": "^5.1.0",
|
|
36
36
|
"@atlaskit/analytics-namespaced-context": "^7.2.0",
|
|
37
37
|
"@atlaskit/analytics-next": "^11.1.0",
|
|
38
|
-
"@atlaskit/avatar": "^25.
|
|
38
|
+
"@atlaskit/avatar": "^25.9.0",
|
|
39
39
|
"@atlaskit/button": "^23.10.0",
|
|
40
40
|
"@atlaskit/css": "^0.19.0",
|
|
41
41
|
"@atlaskit/emoji": "^69.10.0",
|
|
42
42
|
"@atlaskit/heading": "^5.3.0",
|
|
43
|
-
"@atlaskit/icon": "^
|
|
43
|
+
"@atlaskit/icon": "^33.0.0",
|
|
44
44
|
"@atlaskit/link": "^3.3.0",
|
|
45
45
|
"@atlaskit/modal-dialog": "^14.11.0",
|
|
46
46
|
"@atlaskit/motion": "^5.4.0",
|
|
@@ -126,9 +126,6 @@
|
|
|
126
126
|
"jfp_a11y_team_comment_actions_semantic": {
|
|
127
127
|
"type": "boolean"
|
|
128
128
|
},
|
|
129
|
-
"platform-a11y-add-reactions-button-ul-item": {
|
|
130
|
-
"type": "boolean"
|
|
131
|
-
},
|
|
132
129
|
"platform_suppression_removal_fix_reactions": {
|
|
133
130
|
"type": "boolean"
|
|
134
131
|
}
|