@atlaskit/emoji 70.10.10 → 70.10.12

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 (31) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/api/EmojiResource.js +75 -74
  3. package/dist/cjs/api/media/SiteEmojiResource.js +12 -12
  4. package/dist/cjs/components/common/EmojiRadioButton.js +11 -0
  5. package/dist/cjs/components/common/EmojiUploadPicker.js +11 -10
  6. package/dist/cjs/components/common/ResourcedEmojiComponent.js +2 -2
  7. package/dist/cjs/components/common/ToneSelector.js +29 -5
  8. package/dist/cjs/components/picker/EmojiPickerComponent.js +7 -7
  9. package/dist/cjs/components/uploader/EmojiUploadComponent.js +14 -14
  10. package/dist/cjs/context/EmojiContextProvider.js +12 -11
  11. package/dist/cjs/hooks/useEmoji.js +9 -9
  12. package/dist/cjs/util/analytics/analytics.js +1 -1
  13. package/dist/cjs/util/analytics/samplingUfo.js +18 -18
  14. package/dist/es2019/components/common/EmojiRadioButton.js +9 -0
  15. package/dist/es2019/components/common/ToneSelector.js +26 -4
  16. package/dist/es2019/util/analytics/analytics.js +1 -1
  17. package/dist/esm/api/EmojiResource.js +75 -74
  18. package/dist/esm/api/media/SiteEmojiResource.js +12 -12
  19. package/dist/esm/components/common/EmojiRadioButton.js +11 -0
  20. package/dist/esm/components/common/EmojiUploadPicker.js +10 -9
  21. package/dist/esm/components/common/ResourcedEmojiComponent.js +2 -2
  22. package/dist/esm/components/common/ToneSelector.js +28 -4
  23. package/dist/esm/components/picker/EmojiPickerComponent.js +7 -7
  24. package/dist/esm/components/uploader/EmojiUploadComponent.js +13 -13
  25. package/dist/esm/context/EmojiContextProvider.js +11 -10
  26. package/dist/esm/hooks/useEmoji.js +9 -9
  27. package/dist/esm/util/analytics/analytics.js +1 -1
  28. package/dist/esm/util/analytics/samplingUfo.js +18 -18
  29. package/dist/types/components/common/EmojiRadioButton.d.ts +1 -0
  30. package/dist/types-ts4.5/components/common/EmojiRadioButton.d.ts +1 -0
  31. package/package.json +2 -3
@@ -23,26 +23,26 @@ export var useEmoji = function useEmoji() {
23
23
  if (supportsUploadFeature(emojiProvider)) {
24
24
  var checkIfUploadIsSupported = /*#__PURE__*/function () {
25
25
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
26
- var supported;
27
- return _regeneratorRuntime.wrap(function _callee$(_context) {
26
+ var supported, _t;
27
+ return _regeneratorRuntime.wrap(function (_context) {
28
28
  while (1) switch (_context.prev = _context.next) {
29
29
  case 0:
30
30
  _context.prev = 0;
31
- _context.next = 3;
31
+ _context.next = 1;
32
32
  return emojiProvider.isUploadSupported();
33
- case 3:
33
+ case 1:
34
34
  supported = _context.sent;
35
35
  setIsUploadSupported(supported);
36
36
  return _context.abrupt("return", true);
37
- case 8:
38
- _context.prev = 8;
39
- _context.t0 = _context["catch"](0);
37
+ case 2:
38
+ _context.prev = 2;
39
+ _t = _context["catch"](0);
40
40
  return _context.abrupt("return", false);
41
- case 11:
41
+ case 3:
42
42
  case "end":
43
43
  return _context.stop();
44
44
  }
45
- }, _callee, null, [[0, 8]]);
45
+ }, _callee, null, [[0, 2]]);
46
46
  }));
47
47
  return function checkIfUploadIsSupported() {
48
48
  return _ref.apply(this, arguments);
@@ -14,7 +14,7 @@ var createEvent = function createEvent(eventType, action, actionSubject, actionS
14
14
  actionSubjectId: actionSubjectId,
15
15
  attributes: _objectSpread({
16
16
  packageName: "@atlaskit/emoji",
17
- packageVersion: "70.10.9"
17
+ packageVersion: "70.10.11"
18
18
  }, attributes)
19
19
  };
20
20
  };
@@ -69,18 +69,18 @@ export var withSampling = function withSampling(ufoExperience) {
69
69
  var start = /*#__PURE__*/function () {
70
70
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
71
71
  var isSampled;
72
- return _regeneratorRuntime.wrap(function _callee$(_context) {
72
+ return _regeneratorRuntime.wrap(function (_context) {
73
73
  while (1) switch (_context.prev = _context.next) {
74
74
  case 0:
75
75
  if (!hasSampledFromStart(ufoExperience)) {
76
- _context.next = 2;
76
+ _context.next = 1;
77
77
  break;
78
78
  }
79
79
  return _context.abrupt("return");
80
- case 2:
80
+ case 1:
81
81
  isSampled = options.samplingFunc || isExperienceSampled;
82
82
  if (isSampled(options.samplingRate)) {
83
- _context.next = 7;
83
+ _context.next = 2;
84
84
  break;
85
85
  }
86
86
  if (ufoExperience.instanceId) {
@@ -88,14 +88,14 @@ export var withSampling = function withSampling(ufoExperience) {
88
88
  }
89
89
  ufoExperiencesSampled[ufoExperience.id].sampled = false;
90
90
  return _context.abrupt("return");
91
- case 7:
91
+ case 2:
92
92
  // update sampled records
93
93
  if (ufoExperience.instanceId) {
94
94
  ufoExperiencesSampled[ufoExperience.id].sampledInstance[ufoExperience.instanceId] = true;
95
95
  ufoExperiencesSampled[ufoExperience.id].sampled = true;
96
96
  }
97
97
  return _context.abrupt("return", ufoExperience.start(options.startTime));
98
- case 9:
98
+ case 3:
99
99
  case "end":
100
100
  return _context.stop();
101
101
  }
@@ -107,17 +107,17 @@ export var withSampling = function withSampling(ufoExperience) {
107
107
  }();
108
108
  var success = /*#__PURE__*/function () {
109
109
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(config) {
110
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
110
+ return _regeneratorRuntime.wrap(function (_context2) {
111
111
  while (1) switch (_context2.prev = _context2.next) {
112
112
  case 0:
113
113
  if (hasSampledFromStart(ufoExperience)) {
114
- _context2.next = 2;
114
+ _context2.next = 1;
115
115
  break;
116
116
  }
117
117
  return _context2.abrupt("return", null);
118
- case 2:
118
+ case 1:
119
119
  return _context2.abrupt("return", ufoExperience.success(config));
120
- case 3:
120
+ case 2:
121
121
  case "end":
122
122
  return _context2.stop();
123
123
  }
@@ -129,17 +129,17 @@ export var withSampling = function withSampling(ufoExperience) {
129
129
  }();
130
130
  var failure = /*#__PURE__*/function () {
131
131
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(config) {
132
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
132
+ return _regeneratorRuntime.wrap(function (_context3) {
133
133
  while (1) switch (_context3.prev = _context3.next) {
134
134
  case 0:
135
135
  if (hasSampledFromStart(ufoExperience)) {
136
- _context3.next = 2;
136
+ _context3.next = 1;
137
137
  break;
138
138
  }
139
139
  return _context3.abrupt("return", null);
140
- case 2:
140
+ case 1:
141
141
  return _context3.abrupt("return", ufoExperience.failure(config));
142
- case 3:
142
+ case 2:
143
143
  case "end":
144
144
  return _context3.stop();
145
145
  }
@@ -151,17 +151,17 @@ export var withSampling = function withSampling(ufoExperience) {
151
151
  }();
152
152
  var abort = /*#__PURE__*/function () {
153
153
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(config) {
154
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
154
+ return _regeneratorRuntime.wrap(function (_context4) {
155
155
  while (1) switch (_context4.prev = _context4.next) {
156
156
  case 0:
157
157
  if (hasSampledFromStart(ufoExperience)) {
158
- _context4.next = 2;
158
+ _context4.next = 1;
159
159
  break;
160
160
  }
161
161
  return _context4.abrupt("return", null);
162
- case 2:
162
+ case 1:
163
163
  return _context4.abrupt("return", ufoExperience.abort(config));
164
- case 3:
164
+ case 2:
165
165
  case "end":
166
166
  return _context4.stop();
167
167
  }
@@ -10,6 +10,7 @@ export interface Props {
10
10
  emoji: EmojiDescription;
11
11
  onSelected?: () => void;
12
12
  selectOnHover?: boolean;
13
+ onArrowKey?: (direction: -1 | 1) => void;
13
14
  }
14
15
  export declare const EmojiRadioButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>;
15
16
  declare const _default_1: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>>;
@@ -10,6 +10,7 @@ export interface Props {
10
10
  emoji: EmojiDescription;
11
11
  onSelected?: () => void;
12
12
  selectOnHover?: boolean;
13
+ onArrowKey?: (direction: -1 | 1) => void;
13
14
  }
14
15
  export declare const EmojiRadioButton: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>;
15
16
  declare const _default_1: React.MemoExoticComponent<React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/emoji",
3
- "version": "70.10.10",
3
+ "version": "70.10.12",
4
4
  "description": "Fabric emoji React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/primitives": "^19.0.0",
53
53
  "@atlaskit/spinner": "^19.1.0",
54
54
  "@atlaskit/textfield": "^8.3.0",
55
- "@atlaskit/tmp-editor-statsig": "^84.0.0",
55
+ "@atlaskit/tmp-editor-statsig": "^84.3.0",
56
56
  "@atlaskit/tokens": "^13.0.0",
57
57
  "@atlaskit/tooltip": "^22.3.0",
58
58
  "@atlaskit/ufo": "^0.5.0",
@@ -77,7 +77,6 @@
77
77
  "devDependencies": {
78
78
  "@af/integration-testing": "workspace:^",
79
79
  "@af/visual-regression": "workspace:^",
80
- "@atlaskit/elements-test-helpers": "workspace:^",
81
80
  "@atlaskit/media-core": "^37.1.0",
82
81
  "@atlaskit/ssr": "workspace:^",
83
82
  "@atlaskit/theme": "^25.0.0",