@atlaskit/reactions 25.3.0 → 25.4.1

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 25.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 25.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#115405](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115405)
14
+ [`8f77c2c8c5307`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8f77c2c8c5307) -
15
+ [ux] Adds the isViewOnly prop to the reactions component, making the picker disabled and
16
+ preventing addition of new reactions
17
+
3
18
  ## 25.3.0
4
19
 
5
20
  ### Minor Changes
@@ -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; }
13
13
  var packageName = "@atlaskit/reactions";
14
- var packageVersion = "25.3.0";
14
+ var packageVersion = "25.4.1";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -150,7 +150,9 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
150
150
  _ref$onlyRenderPicker = _ref.onlyRenderPicker,
151
151
  onlyRenderPicker = _ref$onlyRenderPicker === void 0 ? false : _ref$onlyRenderPicker,
152
152
  _ref$showRoundTrigger = _ref.showRoundTrigger,
153
- showRoundTrigger = _ref$showRoundTrigger === void 0 ? false : _ref$showRoundTrigger;
153
+ showRoundTrigger = _ref$showRoundTrigger === void 0 ? false : _ref$showRoundTrigger,
154
+ _ref$isViewOnly = _ref.isViewOnly,
155
+ isViewOnly = _ref$isViewOnly === void 0 ? false : _ref$isViewOnly;
154
156
  var _useState = (0, _react.useState)(),
155
157
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
156
158
  selectedEmojiId = _useState2[0],
@@ -366,7 +368,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
366
368
  }, (0, _react2.jsx)(_showMoreHorizontal.default, {
367
369
  label: intl.formatMessage(_i18n.messages.seeWhoReacted)
368
370
  })));
369
- }))), (0, _react2.jsx)(_ReactionPicker.ReactionPicker
371
+ }))), !isViewOnly && (0, _react2.jsx)(_ReactionPicker.ReactionPicker
370
372
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
371
373
  , {
372
374
  css: _styles.reactionPickerStyle,
@@ -46,18 +46,12 @@ var separatorStyles = (0, _primitives.xcss)({
46
46
  });
47
47
  var Reveal = function Reveal(_ref) {
48
48
  var children = _ref.children,
49
- delay = _ref.delay,
50
49
  testId = _ref.testId;
51
50
  return (0, _react2.jsx)("div", {
52
51
  "data-testid": testId
53
52
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
54
53
  ,
55
54
  css: _styles.revealStyle
56
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
57
- ,
58
- style: delay ? {
59
- animationDelay: "".concat(delay, "ms")
60
- } : undefined
61
55
  }, children);
62
56
  };
63
57
 
@@ -1,7 +1,7 @@
1
1
  import { createAndFireEvent } from '@atlaskit/analytics-next';
2
2
  import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
3
3
  const packageName = "@atlaskit/reactions";
4
- const packageVersion = "25.3.0";
4
+ const packageVersion = "25.4.1";
5
5
  /**
6
6
  * TODO: move to utility package?
7
7
  * A random sampling function
@@ -116,7 +116,8 @@ export const Reactions = /*#__PURE__*/React.memo(({
116
116
  hideDefaultReactions = false,
117
117
  ProfileCardWrapper,
118
118
  onlyRenderPicker = false,
119
- showRoundTrigger = false
119
+ showRoundTrigger = false,
120
+ isViewOnly = false
120
121
  }) => {
121
122
  const [selectedEmojiId, setSelectedEmojiId] = useState();
122
123
  const {
@@ -317,7 +318,7 @@ export const Reactions = /*#__PURE__*/React.memo(({
317
318
  xcss: iconStyle
318
319
  }, jsx(ShowMoreHorizontalIcon, {
319
320
  label: intl.formatMessage(messages.seeWhoReacted)
320
- })))))), jsx(ReactionPicker
321
+ })))))), !isViewOnly && jsx(ReactionPicker
321
322
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
322
323
  , {
323
324
  css: reactionPickerStyle,
@@ -35,7 +35,6 @@ const separatorStyles = xcss({
35
35
  });
36
36
  const Reveal = ({
37
37
  children,
38
- delay,
39
38
  testId
40
39
  }) => {
41
40
  return jsx("div", {
@@ -43,11 +42,6 @@ const Reveal = ({
43
42
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
44
43
  ,
45
44
  css: revealStyle
46
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
47
- ,
48
- style: delay ? {
49
- animationDelay: `${delay}ms`
50
- } : undefined
51
45
  }, children);
52
46
  };
53
47
 
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { createAndFireEvent } from '@atlaskit/analytics-next';
5
5
  import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
6
6
  var packageName = "@atlaskit/reactions";
7
- var packageVersion = "25.3.0";
7
+ var packageVersion = "25.4.1";
8
8
  /**
9
9
  * TODO: move to utility package?
10
10
  * A random sampling function
@@ -137,7 +137,9 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
137
137
  _ref$onlyRenderPicker = _ref.onlyRenderPicker,
138
138
  onlyRenderPicker = _ref$onlyRenderPicker === void 0 ? false : _ref$onlyRenderPicker,
139
139
  _ref$showRoundTrigger = _ref.showRoundTrigger,
140
- showRoundTrigger = _ref$showRoundTrigger === void 0 ? false : _ref$showRoundTrigger;
140
+ showRoundTrigger = _ref$showRoundTrigger === void 0 ? false : _ref$showRoundTrigger,
141
+ _ref$isViewOnly = _ref.isViewOnly,
142
+ isViewOnly = _ref$isViewOnly === void 0 ? false : _ref$isViewOnly;
141
143
  var _useState = useState(),
142
144
  _useState2 = _slicedToArray(_useState, 2),
143
145
  selectedEmojiId = _useState2[0],
@@ -353,7 +355,7 @@ export var Reactions = /*#__PURE__*/React.memo(function (_ref) {
353
355
  }, jsx(ShowMoreHorizontalIcon, {
354
356
  label: intl.formatMessage(messages.seeWhoReacted)
355
357
  })));
356
- }))), jsx(ReactionPicker
358
+ }))), !isViewOnly && jsx(ReactionPicker
357
359
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
358
360
  , {
359
361
  css: reactionPickerStyle,
@@ -35,18 +35,12 @@ var separatorStyles = xcss({
35
35
  });
36
36
  var Reveal = function Reveal(_ref) {
37
37
  var children = _ref.children,
38
- delay = _ref.delay,
39
38
  testId = _ref.testId;
40
39
  return jsx("div", {
41
40
  "data-testid": testId
42
41
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
43
42
  ,
44
43
  css: revealStyle
45
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
46
- ,
47
- style: delay ? {
48
- animationDelay: "".concat(delay, "ms")
49
- } : undefined
50
44
  }, children);
51
45
  };
52
46
 
@@ -147,6 +147,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
147
147
  * Optional prop for controlling if the picker hover border will be rounded
148
148
  */
149
149
  showRoundTrigger?: boolean;
150
+ /**
151
+ * Optional prop for controlling if the reactions component is view only, disabling adding reactions
152
+ */
153
+ isViewOnly?: boolean;
150
154
  }
151
155
  /**
152
156
  * Get content of the tooltip
@@ -155,4 +159,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
155
159
  /**
156
160
  * Renders list of reactions
157
161
  */
158
- export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, }: ReactionsProps) => jsx.JSX.Element>;
162
+ export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, }: ReactionsProps) => jsx.JSX.Element>;
@@ -2,7 +2,7 @@ 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
4
  import { type ReactionUpdateSuccess } from '../../types/reaction';
5
- export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'showRoundTrigger'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
5
+ export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'showRoundTrigger' | 'isViewOnly'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
6
6
  /**
7
7
  * Wrapper id for reactions list
8
8
  */
@@ -147,6 +147,10 @@ export interface ReactionsProps extends Pick<ReactionPickerProps, 'allowAllEmoji
147
147
  * Optional prop for controlling if the picker hover border will be rounded
148
148
  */
149
149
  showRoundTrigger?: boolean;
150
+ /**
151
+ * Optional prop for controlling if the reactions component is view only, disabling adding reactions
152
+ */
153
+ isViewOnly?: boolean;
150
154
  }
151
155
  /**
152
156
  * Get content of the tooltip
@@ -155,4 +159,4 @@ export declare function getTooltip(status: ReactionStatus, errorMessage?: string
155
159
  /**
156
160
  * Renders list of reactions
157
161
  */
158
- export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, }: ReactionsProps) => jsx.JSX.Element>;
162
+ export declare const Reactions: React.MemoExoticComponent<({ flash, particleEffectByEmoji, status, errorMessage, loadReaction, quickReactionEmojis, pickerQuickReactionEmojiIds, getReactionDetails, onReactionHover, onSelection, reactions, emojiProvider, allowAllEmojis, onReactionClick, allowUserDialog, onDialogOpenCallback, onDialogCloseCallback, onDialogSelectReactionCallback, onDialogPageChangeCallback, emojiPickerSize, miniMode, summaryViewEnabled, summaryViewThreshold, summaryViewPlacement, showOpaqueBackground, subtleReactionsSummaryAndPicker, showAddReactionText, hideDefaultReactions, ProfileCardWrapper, onlyRenderPicker, showRoundTrigger, isViewOnly, }: ReactionsProps) => jsx.JSX.Element>;
@@ -2,7 +2,7 @@ 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
4
  import { type ReactionUpdateSuccess } from '../../types/reaction';
5
- export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'showRoundTrigger'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
5
+ export interface ConnectedReactionsViewProps extends Pick<ReactionsProps, 'quickReactionEmojis' | 'onDialogOpenCallback' | 'onDialogCloseCallback' | 'onDialogSelectReactionCallback' | 'allowUserDialog' | 'allowAllEmojis' | 'emojiProvider' | 'emojiPickerSize' | 'miniMode' | 'summaryViewEnabled' | 'subtleReactionsSummaryAndPicker' | 'onlyRenderPicker' | 'showRoundTrigger' | 'isViewOnly'>, Pick<ReactionPickerProps, 'pickerQuickReactionEmojiIds'> {
6
6
  /**
7
7
  * Wrapper id for reactions list
8
8
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "25.3.0",
3
+ "version": "25.4.1",
4
4
  "description": "Reactions component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@atlaskit/analytics-gas-types": "^5.1.0",
36
- "@atlaskit/analytics-namespaced-context": "^6.13.0",
36
+ "@atlaskit/analytics-namespaced-context": "^6.14.0",
37
37
  "@atlaskit/analytics-next": "^10.3.0",
38
38
  "@atlaskit/avatar": "^21.18.0",
39
39
  "@atlaskit/button": "^20.5.0",
@@ -42,13 +42,13 @@
42
42
  "@atlaskit/icon": "^23.9.0",
43
43
  "@atlaskit/modal-dialog": "^12.20.0",
44
44
  "@atlaskit/motion": "^3.0.0",
45
- "@atlaskit/platform-feature-flags": "^1.0.0",
45
+ "@atlaskit/platform-feature-flags": "^1.1.0",
46
46
  "@atlaskit/popper": "^6.4.0",
47
- "@atlaskit/popup": "1.31.2",
47
+ "@atlaskit/popup": "1.31.3",
48
48
  "@atlaskit/primitives": "^13.5.0",
49
49
  "@atlaskit/spinner": "^17.1.0",
50
50
  "@atlaskit/tabs": "^17.2.0",
51
- "@atlaskit/theme": "^15.0.0",
51
+ "@atlaskit/theme": "^16.0.0",
52
52
  "@atlaskit/tokens": "^3.3.0",
53
53
  "@atlaskit/tooltip": "^19.1.0",
54
54
  "@atlaskit/ufo": "^0.3.0",