@atlaskit/reactions 33.2.19 → 33.2.21
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 +1 -1
- package/dist/cjs/components/Counter.js +1 -1
- package/dist/cjs/components/EmojiButton.js +1 -1
- package/dist/cjs/components/FlashAnimation.js +1 -1
- package/dist/cjs/components/Reaction.js +1 -1
- package/dist/cjs/components/ReactionButton.js +1 -1
- package/dist/cjs/components/ReactionParticleEffect.js +1 -1
- package/dist/cjs/components/ReactionPicker.js +31 -20
- package/dist/cjs/components/ReactionSummaryButton.js +1 -1
- package/dist/cjs/components/ReactionSummaryView.js +1 -1
- package/dist/cjs/components/ReactionTooltip.js +1 -1
- package/dist/cjs/components/ReactionView.js +1 -1
- package/dist/cjs/components/Reactions.js +2 -8
- package/dist/cjs/components/ReactionsDialog.js +1 -1
- package/dist/cjs/components/ReactionsDialogHeader.compiled.css +1 -1
- package/dist/cjs/components/ReactionsDialogHeader.js +2 -5
- package/dist/cjs/components/ReactionsDialogTrigger.js +1 -1
- package/dist/cjs/components/Selector.js +1 -1
- package/dist/cjs/components/StaticReaction.js +1 -1
- package/dist/cjs/components/Trigger.js +1 -1
- package/dist/cjs/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +1 -7
- package/dist/cjs/index.js +6 -8
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/Counter.js +1 -1
- package/dist/es2019/components/EmojiButton.js +1 -1
- package/dist/es2019/components/FlashAnimation.js +1 -1
- package/dist/es2019/components/Reaction.js +1 -1
- package/dist/es2019/components/ReactionButton.js +1 -1
- package/dist/es2019/components/ReactionParticleEffect.js +1 -1
- package/dist/es2019/components/ReactionPicker.js +29 -18
- package/dist/es2019/components/ReactionSummaryButton.js +1 -1
- package/dist/es2019/components/ReactionSummaryView.js +1 -1
- package/dist/es2019/components/ReactionTooltip.js +1 -1
- package/dist/es2019/components/ReactionView.js +1 -1
- package/dist/es2019/components/Reactions.js +2 -8
- package/dist/es2019/components/ReactionsDialog.js +1 -1
- package/dist/es2019/components/ReactionsDialogHeader.js +1 -1
- package/dist/es2019/components/ReactionsDialogTrigger.js +1 -1
- package/dist/es2019/components/Selector.js +1 -1
- package/dist/es2019/components/StaticReaction.js +1 -1
- package/dist/es2019/components/Trigger.js +1 -1
- package/dist/es2019/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +1 -7
- package/dist/es2019/index.js +1 -7
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/Counter.js +1 -1
- package/dist/esm/components/EmojiButton.js +1 -1
- package/dist/esm/components/FlashAnimation.js +1 -1
- package/dist/esm/components/Reaction.js +1 -1
- package/dist/esm/components/ReactionButton.js +1 -1
- package/dist/esm/components/ReactionParticleEffect.js +1 -1
- package/dist/esm/components/ReactionPicker.js +32 -21
- package/dist/esm/components/ReactionSummaryButton.js +1 -1
- package/dist/esm/components/ReactionSummaryView.js +1 -1
- package/dist/esm/components/ReactionTooltip.js +1 -1
- package/dist/esm/components/ReactionView.js +1 -1
- package/dist/esm/components/Reactions.js +2 -8
- package/dist/esm/components/ReactionsDialog.js +1 -1
- package/dist/esm/components/ReactionsDialogHeader.compiled.css +1 -1
- package/dist/esm/components/ReactionsDialogHeader.js +2 -5
- package/dist/esm/components/ReactionsDialogTrigger.js +1 -1
- package/dist/esm/components/Selector.js +1 -1
- package/dist/esm/components/StaticReaction.js +1 -1
- package/dist/esm/components/Trigger.js +1 -1
- package/dist/esm/containers/ConnectedReactionPicker/ConnectedReactionPicker.js +1 -7
- package/dist/esm/index.js +1 -7
- package/dist/types/components/ReactionPicker.d.ts +7 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types-ts4.5/components/ReactionPicker.d.ts +7 -0
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/package.json +4 -10
- package/dist/cjs/components/ReactionPickerNew.compiled.css +0 -11
- package/dist/cjs/components/ReactionPickerNew.js +0 -421
- package/dist/es2019/components/ReactionPickerNew.compiled.css +0 -11
- package/dist/es2019/components/ReactionPickerNew.js +0 -374
- package/dist/esm/components/ReactionPickerNew.compiled.css +0 -11
- package/dist/esm/components/ReactionPickerNew.js +0 -412
- package/dist/types/components/ReactionPickerNew.d.ts +0 -114
- package/dist/types-ts4.5/components/ReactionPickerNew.d.ts +0 -114
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 33.2.21
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`2ca8e1156c6f5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2ca8e1156c6f5) -
|
|
8
|
+
tidy up FF for reactions picker
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 33.2.20
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 33.2.19
|
|
4
18
|
|
|
5
19
|
### Patch 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 = "33.2.
|
|
14
|
+
var packageVersion = "33.2.20";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionPicker.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionPicker.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -27,6 +27,7 @@ var _Selector = require("./Selector");
|
|
|
27
27
|
var _Trigger = require("./Trigger");
|
|
28
28
|
var _RepositionOnUpdate = require("./RepositionOnUpdate");
|
|
29
29
|
var _colors = require("@atlaskit/theme/colors");
|
|
30
|
+
var _portal = _interopRequireDefault(require("@atlaskit/portal"));
|
|
30
31
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
31
32
|
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; }
|
|
32
33
|
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; }
|
|
@@ -156,19 +157,6 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
156
157
|
settings = _useState10[0],
|
|
157
158
|
setSettings = _useState10[1];
|
|
158
159
|
|
|
159
|
-
/**
|
|
160
|
-
* Custom hook triggers when user clicks outside the reactions picker
|
|
161
|
-
*/
|
|
162
|
-
(0, _useCloseManager.useCloseManager)(wrapperRef, function (callbackType) {
|
|
163
|
-
close();
|
|
164
|
-
onCancel();
|
|
165
|
-
if (triggerRef && callbackType === 'ESCAPE') {
|
|
166
|
-
requestAnimationFrame(function () {
|
|
167
|
-
return triggerRef.focus();
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
}, true, isPopupTrayOpen);
|
|
171
|
-
|
|
172
160
|
/**
|
|
173
161
|
* Event callback when the picker is closed
|
|
174
162
|
* @param _id Optional id if an emoji button was selected or undefineed if was clicked outside the picker
|
|
@@ -287,6 +275,10 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
287
275
|
var _updatePopper$current;
|
|
288
276
|
(_updatePopper$current = updatePopper.current) === null || _updatePopper$current === void 0 || _updatePopper$current.call(updatePopper);
|
|
289
277
|
}, [settings]);
|
|
278
|
+
var onClose = function onClose() {
|
|
279
|
+
close();
|
|
280
|
+
onCancel();
|
|
281
|
+
};
|
|
290
282
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
291
283
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
292
284
|
className: (0, _runtime.ax)(["_s7n4nkob _1pra1o8l", wrapperClassName]),
|
|
@@ -328,9 +320,14 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
328
320
|
isListItem: isListItem
|
|
329
321
|
}))
|
|
330
322
|
);
|
|
331
|
-
}), isPopupTrayOpen && /*#__PURE__*/_react.default.createElement(
|
|
323
|
+
}), isPopupTrayOpen && /*#__PURE__*/_react.default.createElement(_portal.default, {
|
|
324
|
+
zIndex: _constants.layers.flag()
|
|
325
|
+
}, /*#__PURE__*/_react.default.createElement(PopperWrapper, {
|
|
332
326
|
settings: settings,
|
|
333
|
-
popperModifiers: popperModifiers
|
|
327
|
+
popperModifiers: popperModifiers,
|
|
328
|
+
isOpen: isPopupTrayOpen,
|
|
329
|
+
onClose: onClose,
|
|
330
|
+
triggerRef: triggerRef
|
|
334
331
|
}, settings.showFullPicker || hoverableReactionPicker && isHoverableReactionPickerEmojiPickerOpen ? /*#__PURE__*/_react.default.createElement(_picker.EmojiPicker, {
|
|
335
332
|
emojiProvider: emojiProvider,
|
|
336
333
|
onSelection: onEmojiSelected,
|
|
@@ -346,10 +343,13 @@ var ReactionPicker = exports.ReactionPicker = /*#__PURE__*/_react.default.memo(f
|
|
|
346
343
|
onMoreClick: onSelectMoreClick,
|
|
347
344
|
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
348
345
|
hoverableReactionPickerSelector: hoverableReactionPicker
|
|
349
|
-
})))));
|
|
346
|
+
}))))));
|
|
350
347
|
});
|
|
351
348
|
var PopperWrapper = exports.PopperWrapper = function PopperWrapper(props) {
|
|
352
|
-
var
|
|
349
|
+
var triggerRef = props.triggerRef,
|
|
350
|
+
settings = props.settings,
|
|
351
|
+
isOpen = props.isOpen,
|
|
352
|
+
onClose = props.onClose,
|
|
353
353
|
children = props.children,
|
|
354
354
|
popperModifiers = props.popperModifiers;
|
|
355
355
|
var _useState11 = (0, _react.useState)(null),
|
|
@@ -365,10 +365,21 @@ var PopperWrapper = exports.PopperWrapper = function PopperWrapper(props) {
|
|
|
365
365
|
initialFocusRef: null,
|
|
366
366
|
targetRef: popupRef
|
|
367
367
|
});
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Custom hook triggers when user clicks outside the reactions picker
|
|
371
|
+
*/
|
|
372
|
+
(0, _useCloseManager.useCloseManagerV2)(popupRef, triggerRef, function (callbackType) {
|
|
373
|
+
onClose();
|
|
374
|
+
if (popupRef && callbackType === 'ESCAPE') {
|
|
375
|
+
requestAnimationFrame(function () {
|
|
376
|
+
return triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.focus();
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}, true, isOpen);
|
|
368
380
|
return /*#__PURE__*/_react.default.createElement(_popper.Popper, {
|
|
369
381
|
placement: settings.popperPlacement,
|
|
370
|
-
modifiers: popperModifiers
|
|
371
|
-
strategy: "absolute"
|
|
382
|
+
modifiers: popperModifiers
|
|
372
383
|
}, function (_ref3) {
|
|
373
384
|
var _ref4 = _ref3.ref,
|
|
374
385
|
style = _ref3.style,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Reactions.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* Reactions.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -26,14 +26,8 @@ var _ufo = require("../ufo");
|
|
|
26
26
|
var _Reaction = require("./Reaction");
|
|
27
27
|
var _ReactionsDialog = require("./ReactionsDialog");
|
|
28
28
|
var _ReactionPicker = require("./ReactionPicker");
|
|
29
|
-
var _ReactionPickerNew = require("./ReactionPickerNew");
|
|
30
29
|
var _ReactionSummaryView = require("./ReactionSummaryView");
|
|
31
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
32
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
33
30
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
34
|
-
var ReactionPicker = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
35
|
-
return (0, _platformFeatureFlags.fg)('platform_editor_reactions_picker_fix') || (0, _platformFeatureFlags.fg)('platform_editor_reactions_picker_fix_jira');
|
|
36
|
-
}, _ReactionPickerNew.ReactionPicker, _ReactionPicker.ReactionPicker);
|
|
37
31
|
var wrapperStyle = null;
|
|
38
32
|
var noFlexWrapStyles = null;
|
|
39
33
|
var noContainerPositionStyles = null;
|
|
@@ -390,7 +384,7 @@ var Reactions = exports.Reactions = /*#__PURE__*/_react.default.memo(function (_
|
|
|
390
384
|
isViewOnly: isViewOnly,
|
|
391
385
|
showSubtleStyle: showSubtleDefaultReactions && reactions.length === 0
|
|
392
386
|
});
|
|
393
|
-
})), isViewOnly || !onlyRenderPicker && shouldShowSummaryView && allowSelectFromSummaryView ? null : /*#__PURE__*/_react.default.createElement(ReactionPicker, {
|
|
387
|
+
})), isViewOnly || !onlyRenderPicker && shouldShowSummaryView && allowSelectFromSummaryView ? null : /*#__PURE__*/_react.default.createElement(_ReactionPicker.ReactionPicker, {
|
|
394
388
|
emojiProvider: emojiProvider,
|
|
395
389
|
allowAllEmojis: allowAllEmojis,
|
|
396
390
|
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
._nhktlyvf.disabled:after{background:linear-gradient(270deg,hsla(0,0%,100%,.95) 40.23%,hsla(0,0%,100%,.55) 58.33%,hsla(0,0%,100%,0) 77.49%)}
|
|
6
6
|
._1rjc1b66{padding-block:var(--ds-space-050,4px)}
|
|
7
7
|
._80wau2gc div[role=tablist]{padding-inline:var(--ds-space-100,8px)}
|
|
8
|
-
.
|
|
8
|
+
._n7zl1l7n{border-bottom:1px solid var(--ds-border,#ebecf0)}._10d67vkz>span{min-height:1pc}
|
|
9
9
|
._141m1j28 div[role=tablist]:before{background-color:transparent}
|
|
10
10
|
._18m91wug{overflow-y:auto}
|
|
11
11
|
._18u01wug{margin-left:auto}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionsDialogHeader.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionsDialogHeader.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -154,10 +154,7 @@ var ReactionsDialogHeader = exports.ReactionsDialogHeader = function ReactionsDi
|
|
|
154
154
|
onClick: handleCloseReactionsDialog
|
|
155
155
|
})), /*#__PURE__*/React.createElement(_compiled.Inline, null, /*#__PURE__*/React.createElement("div", {
|
|
156
156
|
id: "reactions-dialog-tabs-list",
|
|
157
|
-
className: (0, _runtime.ax)(["_1reo1wug _18m91wug
|
|
158
|
-
style: {
|
|
159
|
-
"--_1wtzbnt": (0, _runtime.ix)("1px solid ".concat("var(--ds-border, #EBECF0)"))
|
|
160
|
-
}
|
|
157
|
+
className: (0, _runtime.ax)(["_1reo1wug _18m91wug _n7zl1l7n _1e0c1txw _1bsb1osq _4cvr1y6m _80wau2gc _s2c4kb7n _141m1j28"])
|
|
161
158
|
}, !isSinglePage && !isOnFirstPage && /*#__PURE__*/React.createElement(LeftNavigationButton, {
|
|
162
159
|
handlePreviousPage: handlePreviousPage
|
|
163
160
|
}), /*#__PURE__*/React.createElement(_tabs.TabList, null, currentReactions.map(function (reaction, index) {
|
|
@@ -12,12 +12,6 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
12
12
|
var _components = require("../../components");
|
|
13
13
|
var _ufo = require("../../ufo");
|
|
14
14
|
var _ReactionPicker = require("../../components/ReactionPicker");
|
|
15
|
-
var _ReactionPickerNew = require("../../components/ReactionPickerNew");
|
|
16
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
|
-
var ReactionPicker = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
19
|
-
return (0, _platformFeatureFlags.fg)('platform_editor_reactions_picker_fix') || (0, _platformFeatureFlags.fg)('platform_editor_reactions_picker_fix_jira');
|
|
20
|
-
}, _ReactionPickerNew.ReactionPicker, _ReactionPicker.ReactionPicker);
|
|
21
15
|
/**
|
|
22
16
|
* Reaction Picker component
|
|
23
17
|
*/
|
|
@@ -49,7 +43,7 @@ var ConnectedReactionPicker = exports.ConnectedReactionPicker = function Connect
|
|
|
49
43
|
};
|
|
50
44
|
return /*#__PURE__*/_react.default.createElement(_components.UfoErrorBoundary, {
|
|
51
45
|
experiences: [_ufo.PickerRender]
|
|
52
|
-
}, /*#__PURE__*/_react.default.createElement(ReactionPicker, (0, _extends2.default)({}, props, {
|
|
46
|
+
}, /*#__PURE__*/_react.default.createElement(_ReactionPicker.ReactionPicker, (0, _extends2.default)({}, props, {
|
|
53
47
|
onSelection: onSelection
|
|
54
48
|
})));
|
|
55
49
|
};
|
package/dist/cjs/index.js
CHANGED
|
@@ -33,7 +33,12 @@ Object.defineProperty(exports, "ReactionConsumer", {
|
|
|
33
33
|
return _store.ReactionConsumer;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
|
-
exports
|
|
36
|
+
Object.defineProperty(exports, "ReactionPicker", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _ReactionPicker.ReactionPicker;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
37
42
|
Object.defineProperty(exports, "ReactionServiceClient", {
|
|
38
43
|
enumerable: true,
|
|
39
44
|
get: function get() {
|
|
@@ -68,9 +73,6 @@ Object.defineProperty(exports, "useCloseManager", {
|
|
|
68
73
|
var _constants = require("./shared/constants");
|
|
69
74
|
var _ufo = require("./ufo");
|
|
70
75
|
var _ReactionPicker = require("./components/ReactionPicker");
|
|
71
|
-
var _ReactionPickerNew = require("./components/ReactionPickerNew");
|
|
72
|
-
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
73
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
74
76
|
var _client = require("./client");
|
|
75
77
|
var _Reaction = require("./components/Reaction");
|
|
76
78
|
var _Reactions = require("./components/Reactions");
|
|
@@ -78,10 +80,6 @@ var _useCloseManager = require("./hooks/useCloseManager");
|
|
|
78
80
|
var _containers = require("./containers");
|
|
79
81
|
var _store = require("./store");
|
|
80
82
|
var _types = require("./types");
|
|
81
|
-
var ReactionPicker = exports.ReactionPicker = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
82
|
-
return (0, _platformFeatureFlags.fg)('platform_editor_reactions_picker_fix') || (0, _platformFeatureFlags.fg)('platform_editor_reactions_picker_fix_jira');
|
|
83
|
-
}, _ReactionPickerNew.ReactionPicker, _ReactionPicker.ReactionPicker);
|
|
84
|
-
|
|
85
83
|
// TODO: Convert all calls for ReactionRequest to Request, RequestClient to Client and ReactionsStore to Store
|
|
86
84
|
|
|
87
85
|
var constants = exports.constants = {
|
|
@@ -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 = "33.2.
|
|
4
|
+
const packageVersion = "33.2.20";
|
|
5
5
|
/**
|
|
6
6
|
* TODO: move to utility package?
|
|
7
7
|
* A random sampling function
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionButton.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionButton.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./ReactionButton.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionParticleEffect.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionParticleEffect.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import "./ReactionParticleEffect.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionPicker.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionPicker.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import "./ReactionPicker.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useLayoutEffect, useRef, useState } from 'react';
|
|
@@ -8,7 +8,7 @@ import { Manager, Popper, Reference } from '@atlaskit/popper';
|
|
|
8
8
|
import { layers } from '@atlaskit/theme/constants';
|
|
9
9
|
import { Box } from '@atlaskit/primitives/compiled';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
-
import {
|
|
11
|
+
import { useCloseManagerV2 } from '../hooks/useCloseManager';
|
|
12
12
|
import { useDelayedState } from '../hooks/useDelayedState';
|
|
13
13
|
import { useFocusTrap } from '../hooks/useFocusTrap';
|
|
14
14
|
import { messages } from '../shared/i18n';
|
|
@@ -17,6 +17,7 @@ import { Selector } from './Selector';
|
|
|
17
17
|
import { Trigger } from './Trigger';
|
|
18
18
|
import { RepositionOnUpdate } from './RepositionOnUpdate';
|
|
19
19
|
import { N0, N50A, N60A } from '@atlaskit/theme/colors';
|
|
20
|
+
import Portal from '@atlaskit/portal';
|
|
20
21
|
const pickerStyle = null;
|
|
21
22
|
const popupWrapperStyle = null;
|
|
22
23
|
const popupStyle = null;
|
|
@@ -114,17 +115,6 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
114
115
|
popperPlacement
|
|
115
116
|
});
|
|
116
117
|
|
|
117
|
-
/**
|
|
118
|
-
* Custom hook triggers when user clicks outside the reactions picker
|
|
119
|
-
*/
|
|
120
|
-
useCloseManager(wrapperRef, callbackType => {
|
|
121
|
-
close();
|
|
122
|
-
onCancel();
|
|
123
|
-
if (triggerRef && callbackType === 'ESCAPE') {
|
|
124
|
-
requestAnimationFrame(() => triggerRef.focus());
|
|
125
|
-
}
|
|
126
|
-
}, true, isPopupTrayOpen);
|
|
127
|
-
|
|
128
118
|
/**
|
|
129
119
|
* Event callback when the picker is closed
|
|
130
120
|
* @param _id Optional id if an emoji button was selected or undefineed if was clicked outside the picker
|
|
@@ -244,6 +234,10 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
244
234
|
var _updatePopper$current;
|
|
245
235
|
(_updatePopper$current = updatePopper.current) === null || _updatePopper$current === void 0 ? void 0 : _updatePopper$current.call(updatePopper);
|
|
246
236
|
}, [settings]);
|
|
237
|
+
const onClose = () => {
|
|
238
|
+
close();
|
|
239
|
+
onCancel();
|
|
240
|
+
};
|
|
247
241
|
return /*#__PURE__*/React.createElement("div", {
|
|
248
242
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
249
243
|
className: ax(["_s7n4nkob _1pra1o8l", wrapperClassName]),
|
|
@@ -283,9 +277,14 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
283
277
|
reactionPickerTriggerIcon: reactionPickerTriggerIcon,
|
|
284
278
|
reactionPickerTriggerText: reactionPickerTriggerText,
|
|
285
279
|
isListItem: isListItem
|
|
286
|
-
}))), isPopupTrayOpen && /*#__PURE__*/React.createElement(
|
|
280
|
+
}))), isPopupTrayOpen && /*#__PURE__*/React.createElement(Portal, {
|
|
281
|
+
zIndex: layers.flag()
|
|
282
|
+
}, /*#__PURE__*/React.createElement(PopperWrapper, {
|
|
287
283
|
settings: settings,
|
|
288
|
-
popperModifiers: popperModifiers
|
|
284
|
+
popperModifiers: popperModifiers,
|
|
285
|
+
isOpen: isPopupTrayOpen,
|
|
286
|
+
onClose: onClose,
|
|
287
|
+
triggerRef: triggerRef
|
|
289
288
|
}, settings.showFullPicker || hoverableReactionPicker && isHoverableReactionPickerEmojiPickerOpen ? /*#__PURE__*/React.createElement(EmojiPicker, {
|
|
290
289
|
emojiProvider: emojiProvider,
|
|
291
290
|
onSelection: onEmojiSelected,
|
|
@@ -301,11 +300,14 @@ export const ReactionPicker = /*#__PURE__*/React.memo(props => {
|
|
|
301
300
|
onMoreClick: onSelectMoreClick,
|
|
302
301
|
pickerQuickReactionEmojiIds: pickerQuickReactionEmojiIds,
|
|
303
302
|
hoverableReactionPickerSelector: hoverableReactionPicker
|
|
304
|
-
})))));
|
|
303
|
+
}))))));
|
|
305
304
|
});
|
|
306
305
|
export const PopperWrapper = props => {
|
|
307
306
|
const {
|
|
307
|
+
triggerRef,
|
|
308
308
|
settings,
|
|
309
|
+
isOpen,
|
|
310
|
+
onClose,
|
|
309
311
|
children,
|
|
310
312
|
popperModifiers
|
|
311
313
|
} = props;
|
|
@@ -320,10 +322,19 @@ export const PopperWrapper = props => {
|
|
|
320
322
|
initialFocusRef: null,
|
|
321
323
|
targetRef: popupRef
|
|
322
324
|
});
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Custom hook triggers when user clicks outside the reactions picker
|
|
328
|
+
*/
|
|
329
|
+
useCloseManagerV2(popupRef, triggerRef, callbackType => {
|
|
330
|
+
onClose();
|
|
331
|
+
if (popupRef && callbackType === 'ESCAPE') {
|
|
332
|
+
requestAnimationFrame(() => triggerRef === null || triggerRef === void 0 ? void 0 : triggerRef.focus());
|
|
333
|
+
}
|
|
334
|
+
}, true, isOpen);
|
|
323
335
|
return /*#__PURE__*/React.createElement(Popper, {
|
|
324
336
|
placement: settings.popperPlacement,
|
|
325
|
-
modifiers: popperModifiers
|
|
326
|
-
strategy: "absolute"
|
|
337
|
+
modifiers: popperModifiers
|
|
327
338
|
}, ({
|
|
328
339
|
ref,
|
|
329
340
|
style,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionSummaryButton.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionSummaryButton.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import "./ReactionSummaryButton.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionSummaryView.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionSummaryView.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./ReactionSummaryView.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionTooltip.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionTooltip.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./ReactionTooltip.compiled.css";
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Reactions.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* Reactions.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import "./Reactions.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
@@ -13,14 +13,8 @@ import { ReactionStatus } from '../types';
|
|
|
13
13
|
import { ReactionDialogOpened, ReactionDialogSelectedReactionChanged } from '../ufo';
|
|
14
14
|
import { Reaction } from './Reaction';
|
|
15
15
|
import { ReactionsDialog } from './ReactionsDialog';
|
|
16
|
-
import { ReactionPicker
|
|
17
|
-
import { ReactionPicker as ReactionPickerNew } from './ReactionPickerNew';
|
|
16
|
+
import { ReactionPicker } from './ReactionPicker';
|
|
18
17
|
import { ReactionSummaryView } from './ReactionSummaryView';
|
|
19
|
-
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
21
|
-
const ReactionPicker = componentWithCondition(() => {
|
|
22
|
-
return fg('platform_editor_reactions_picker_fix') || fg('platform_editor_reactions_picker_fix_jira');
|
|
23
|
-
}, ReactionPickerNew, ReactionPickerOld);
|
|
24
18
|
const wrapperStyle = null;
|
|
25
19
|
const noFlexWrapStyles = null;
|
|
26
20
|
const noContainerPositionStyles = null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionsDialogHeader.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionsDialogHeader.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./ReactionsDialogHeader.compiled.css";
|
|
4
4
|
import * as React from 'react';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* ReactionsDialogTrigger.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* ReactionsDialogTrigger.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import "./ReactionsDialogTrigger.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* StaticReaction.tsx generated by @compiled/babel-plugin v0.
|
|
1
|
+
/* StaticReaction.tsx generated by @compiled/babel-plugin v0.38.1 */
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import "./StaticReaction.compiled.css";
|
|
4
4
|
import * as React from 'react';
|