react-input-emoji 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.es.js +106 -56
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +315 -265
- package/dist/index.js.map +1 -1
- package/package.json +1 -2
package/dist/index.js
CHANGED
@@ -163,6 +163,7 @@ function handlePasteHtmlAtCaret(html) {
|
|
163
163
|
if (window.getSelection) {
|
164
164
|
// IE9 and non-IE
|
165
165
|
sel = window.getSelection();
|
166
|
+
if (sel === null) return;
|
166
167
|
|
167
168
|
if (sel.getRangeAt && sel.rangeCount) {
|
168
169
|
range = sel.getRangeAt(0);
|
@@ -258,7 +259,7 @@ function replaceAllHtmlToString(html) {
|
|
258
259
|
/**
|
259
260
|
* @typedef {Object} Props
|
260
261
|
* @property {React.Ref<any>} ref
|
261
|
-
* @property {React.MutableRefObject<import('../text-input').Ref>} textInputRef
|
262
|
+
* @property {React.MutableRefObject<import('../text-input').Ref | null>} textInputRef
|
262
263
|
* @property {(value: string) => void} setValue
|
263
264
|
* @property {() => void} emitChange
|
264
265
|
*/
|
@@ -288,10 +289,14 @@ function useExpose({
|
|
288
289
|
},
|
289
290
|
|
290
291
|
focus: () => {
|
292
|
+
if (textInputRef.current === null) return;
|
291
293
|
textInputRef.current.focus();
|
292
294
|
},
|
293
295
|
blur: () => {
|
294
|
-
|
296
|
+
if (textInputRef.current !== null) {
|
297
|
+
sanitize(textInputRef.current.html);
|
298
|
+
}
|
299
|
+
|
295
300
|
emitChange();
|
296
301
|
}
|
297
302
|
}));
|
@@ -301,16 +306,17 @@ function useExpose({
|
|
301
306
|
|
302
307
|
/**
|
303
308
|
* useEmit
|
304
|
-
* @param {React.MutableRefObject<import('../text-input').Ref>} textInputRef
|
309
|
+
* @param {React.MutableRefObject<import('../text-input').Ref | null>} textInputRef
|
305
310
|
* @param {(size: {width: number, height: number}) => void} onResize
|
306
311
|
* @param {(text: string) => void} onChange
|
307
312
|
*/
|
308
313
|
|
309
314
|
function useEmit(textInputRef, onResize, onChange) {
|
315
|
+
/** @type {React.MutableRefObject<{width: number; height: number} | null>} */
|
310
316
|
const currentSizeRef = React.useRef(null);
|
311
317
|
const onChangeFn = React.useRef(onChange);
|
312
318
|
const checkAndEmitResize = React.useCallback(() => {
|
313
|
-
if (textInputRef.current) {
|
319
|
+
if (textInputRef.current !== null) {
|
314
320
|
const currentSize = currentSizeRef.current;
|
315
321
|
const nextSize = textInputRef.current.size;
|
316
322
|
|
@@ -344,7 +350,7 @@ function useEmit(textInputRef, onResize, onChange) {
|
|
344
350
|
* @property {(event: React.KeyboardEvent) => void} onKeyDown
|
345
351
|
* @property {(event: React.KeyboardEvent) => void} onKeyUp
|
346
352
|
* @property {() => void} onFocus
|
347
|
-
* @property {() => void
|
353
|
+
* @property {() => void} onBlur
|
348
354
|
* @property {(sanitizedText: string) => void=} onChange
|
349
355
|
* @property {(event: React.KeyboardEvent) => void} onArrowUp
|
350
356
|
* @property {(event: React.KeyboardEvent) => void} onArrowDown
|
@@ -381,40 +387,63 @@ const TextInput = ({
|
|
381
387
|
}, ref) => {
|
382
388
|
React.useImperativeHandle(ref, () => ({
|
383
389
|
appendContent: html => {
|
384
|
-
textInputRef.current
|
390
|
+
if (textInputRef.current) {
|
391
|
+
textInputRef.current.focus();
|
392
|
+
}
|
393
|
+
|
385
394
|
handlePasteHtmlAtCaret(html);
|
386
|
-
textInputRef.current.focus();
|
387
395
|
|
388
|
-
if (textInputRef.current
|
396
|
+
if (textInputRef.current) {
|
397
|
+
textInputRef.current.focus();
|
398
|
+
}
|
399
|
+
|
400
|
+
if (textInputRef.current && placeholderRef.current && textInputRef.current.innerHTML.trim() === "") {
|
389
401
|
placeholderRef.current.style.visibility = "visible";
|
390
|
-
} else {
|
402
|
+
} else if (placeholderRef.current) {
|
391
403
|
placeholderRef.current.style.visibility = "hidden";
|
392
404
|
}
|
393
405
|
|
394
|
-
|
406
|
+
if (textInputRef.current && typeof onChange === 'function') {
|
407
|
+
onChange(textInputRef.current.innerHTML);
|
408
|
+
}
|
395
409
|
},
|
396
410
|
|
397
411
|
set html(value) {
|
398
|
-
textInputRef.current
|
412
|
+
if (textInputRef.current) {
|
413
|
+
textInputRef.current.innerHTML = value;
|
414
|
+
}
|
399
415
|
|
400
|
-
if (
|
401
|
-
|
402
|
-
|
403
|
-
|
416
|
+
if (placeholderRef.current) {
|
417
|
+
if (value.trim() === "") {
|
418
|
+
placeholderRef.current.style.visibility = "visible";
|
419
|
+
} else {
|
420
|
+
placeholderRef.current.style.visibility = "hidden";
|
421
|
+
}
|
404
422
|
}
|
405
423
|
|
406
|
-
onChange
|
424
|
+
if (typeof onChange === 'function' && textInputRef.current) {
|
425
|
+
onChange(textInputRef.current.innerHTML);
|
426
|
+
}
|
407
427
|
},
|
408
428
|
|
409
429
|
get html() {
|
430
|
+
if (!textInputRef.current) return '';
|
410
431
|
return textInputRef.current.innerHTML;
|
411
432
|
},
|
412
433
|
|
413
434
|
get text() {
|
435
|
+
if (!textInputRef.current) return '';
|
414
436
|
return textInputRef.current.innerText;
|
415
437
|
},
|
416
438
|
|
417
439
|
get size() {
|
440
|
+
if (!textInputRef.current) {
|
441
|
+
return {
|
442
|
+
width: 0,
|
443
|
+
height: 0
|
444
|
+
};
|
445
|
+
}
|
446
|
+
|
418
447
|
return {
|
419
448
|
width: textInputRef.current.offsetWidth,
|
420
449
|
height: textInputRef.current.offsetHeight
|
@@ -422,14 +451,15 @@ const TextInput = ({
|
|
422
451
|
},
|
423
452
|
|
424
453
|
focus() {
|
454
|
+
if (!textInputRef.current) return;
|
425
455
|
textInputRef.current.focus();
|
426
456
|
}
|
427
457
|
|
428
458
|
}));
|
429
|
-
/** @type {React.MutableRefObject<HTMLDivElement>} */
|
459
|
+
/** @type {React.MutableRefObject<HTMLDivElement | null>} */
|
430
460
|
|
431
461
|
const placeholderRef = React.useRef(null);
|
432
|
-
/** @type {React.MutableRefObject<HTMLDivElement>} */
|
462
|
+
/** @type {React.MutableRefObject<HTMLDivElement | null>} */
|
433
463
|
|
434
464
|
const textInputRef = React.useRef(null);
|
435
465
|
/**
|
@@ -445,7 +475,7 @@ const TextInput = ({
|
|
445
475
|
} else if (event.key === "ArrowDown") {
|
446
476
|
props.onArrowDown(event);
|
447
477
|
} else {
|
448
|
-
if (event.key.length === 1) {
|
478
|
+
if (event.key.length === 1 && placeholderRef.current) {
|
449
479
|
placeholderRef.current.style.visibility = "hidden";
|
450
480
|
}
|
451
481
|
}
|
@@ -465,30 +495,32 @@ const TextInput = ({
|
|
465
495
|
|
466
496
|
|
467
497
|
function handleKeyUp(event) {
|
468
|
-
var _input$innerText;
|
469
|
-
|
470
498
|
props.onKeyUp(event);
|
471
499
|
const input = textInputRef.current;
|
472
500
|
|
473
|
-
if (
|
474
|
-
|
475
|
-
|
476
|
-
|
501
|
+
if (placeholderRef.current) {
|
502
|
+
if (input?.innerText?.trim() === "") {
|
503
|
+
placeholderRef.current.style.visibility = "visible";
|
504
|
+
} else {
|
505
|
+
placeholderRef.current.style.visibility = "hidden";
|
506
|
+
}
|
477
507
|
}
|
478
508
|
|
479
|
-
onChange
|
509
|
+
if (typeof onChange === 'function' && textInputRef.current) {
|
510
|
+
onChange(textInputRef.current.innerHTML);
|
511
|
+
}
|
480
512
|
}
|
481
513
|
|
482
|
-
return /*#__PURE__*/React__default[
|
514
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
483
515
|
className: "react-input-emoji--container",
|
484
516
|
style: style
|
485
|
-
}, /*#__PURE__*/React__default[
|
517
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
486
518
|
className: "react-input-emoji--wrapper",
|
487
519
|
onClick: handleClick
|
488
|
-
}, /*#__PURE__*/React__default[
|
520
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
489
521
|
ref: placeholderRef,
|
490
522
|
className: "react-input-emoji--placeholder"
|
491
|
-
}, placeholder), /*#__PURE__*/React__default[
|
523
|
+
}, placeholder), /*#__PURE__*/React__default["default"].createElement("div", {
|
492
524
|
ref: textInputRef,
|
493
525
|
onKeyDown: handleKeyDown,
|
494
526
|
onKeyUp: handleKeyUp,
|
@@ -49308,23 +49340,20 @@ function _defineProperties(target, props) {
|
|
49308
49340
|
function _createClass(Constructor, protoProps, staticProps) {
|
49309
49341
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
49310
49342
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
49343
|
+
Object.defineProperty(Constructor, "prototype", {
|
49344
|
+
writable: false
|
49345
|
+
});
|
49311
49346
|
return Constructor;
|
49312
49347
|
}
|
49313
49348
|
|
49314
49349
|
function _typeof(obj) {
|
49315
49350
|
"@babel/helpers - typeof";
|
49316
49351
|
|
49317
|
-
|
49318
|
-
|
49319
|
-
|
49320
|
-
|
49321
|
-
}
|
49322
|
-
_typeof = function _typeof(obj) {
|
49323
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
49324
|
-
};
|
49325
|
-
}
|
49326
|
-
|
49327
|
-
return _typeof(obj);
|
49352
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
49353
|
+
return typeof obj;
|
49354
|
+
} : function (obj) {
|
49355
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
49356
|
+
}, _typeof(obj);
|
49328
49357
|
}
|
49329
49358
|
|
49330
49359
|
var mapping = {
|
@@ -49414,8 +49443,8 @@ var stringFromCodePoint = _String.fromCodePoint || function stringFromCodePoint(
|
|
49414
49443
|
codePoint > 0x10ffff || // not a valid Unicode code point
|
49415
49444
|
Math.floor(codePoint) != codePoint // not an integer
|
49416
49445
|
) {
|
49417
|
-
|
49418
|
-
|
49446
|
+
throw RangeError('Invalid code point: ' + codePoint);
|
49447
|
+
}
|
49419
49448
|
|
49420
49449
|
if (codePoint <= 0xffff) {
|
49421
49450
|
// BMP code point
|
@@ -50018,7 +50047,7 @@ function _defineProperty(obj, key, value) {
|
|
50018
50047
|
}
|
50019
50048
|
|
50020
50049
|
function _extends() {
|
50021
|
-
_extends = Object.assign
|
50050
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
50022
50051
|
for (var i = 1; i < arguments.length; i++) {
|
50023
50052
|
var source = arguments[i];
|
50024
50053
|
|
@@ -50031,7 +50060,6 @@ function _extends() {
|
|
50031
50060
|
|
50032
50061
|
return target;
|
50033
50062
|
};
|
50034
|
-
|
50035
50063
|
return _extends.apply(this, arguments);
|
50036
50064
|
}
|
50037
50065
|
|
@@ -50046,24 +50074,25 @@ function _assertThisInitialized(self) {
|
|
50046
50074
|
function _possibleConstructorReturn(self, call) {
|
50047
50075
|
if (call && (_typeof(call) === "object" || typeof call === "function")) {
|
50048
50076
|
return call;
|
50077
|
+
} else if (call !== void 0) {
|
50078
|
+
throw new TypeError("Derived constructors may only return object or undefined");
|
50049
50079
|
}
|
50050
50080
|
|
50051
50081
|
return _assertThisInitialized(self);
|
50052
50082
|
}
|
50053
50083
|
|
50054
50084
|
function _getPrototypeOf(o) {
|
50055
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
50085
|
+
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
50056
50086
|
return o.__proto__ || Object.getPrototypeOf(o);
|
50057
50087
|
};
|
50058
50088
|
return _getPrototypeOf(o);
|
50059
50089
|
}
|
50060
50090
|
|
50061
50091
|
function _setPrototypeOf(o, p) {
|
50062
|
-
_setPrototypeOf = Object.setPrototypeOf
|
50092
|
+
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
50063
50093
|
o.__proto__ = p;
|
50064
50094
|
return o;
|
50065
50095
|
};
|
50066
|
-
|
50067
50096
|
return _setPrototypeOf(o, p);
|
50068
50097
|
}
|
50069
50098
|
|
@@ -50079,36 +50108,39 @@ function _inherits(subClass, superClass) {
|
|
50079
50108
|
configurable: true
|
50080
50109
|
}
|
50081
50110
|
});
|
50111
|
+
Object.defineProperty(subClass, "prototype", {
|
50112
|
+
writable: false
|
50113
|
+
});
|
50082
50114
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
50083
50115
|
}
|
50084
50116
|
|
50085
50117
|
var categories = {
|
50086
50118
|
activity: function activity() {
|
50087
|
-
return React__default[
|
50119
|
+
return React__default["default"].createElement("svg", {
|
50088
50120
|
xmlns: "http://www.w3.org/2000/svg",
|
50089
50121
|
viewBox: "0 0 24 24",
|
50090
50122
|
width: "24",
|
50091
50123
|
height: "24"
|
50092
|
-
}, React__default[
|
50124
|
+
}, React__default["default"].createElement("path", {
|
50093
50125
|
d: "M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"
|
50094
50126
|
}));
|
50095
50127
|
},
|
50096
50128
|
custom: function custom() {
|
50097
|
-
return React__default[
|
50129
|
+
return React__default["default"].createElement("svg", {
|
50098
50130
|
xmlns: "http://www.w3.org/2000/svg",
|
50099
50131
|
viewBox: "0 0 24 24",
|
50100
50132
|
width: "24",
|
50101
50133
|
height: "24"
|
50102
|
-
}, React__default[
|
50134
|
+
}, React__default["default"].createElement("g", {
|
50103
50135
|
transform: "translate(2.000000, 1.000000)"
|
50104
|
-
}, React__default[
|
50136
|
+
}, React__default["default"].createElement("rect", {
|
50105
50137
|
id: "Rectangle",
|
50106
50138
|
x: "8",
|
50107
50139
|
y: "0",
|
50108
50140
|
width: "3",
|
50109
50141
|
height: "21",
|
50110
50142
|
rx: "1.5"
|
50111
|
-
}), React__default[
|
50143
|
+
}), React__default["default"].createElement("rect", {
|
50112
50144
|
id: "Rectangle",
|
50113
50145
|
transform: "translate(9.843, 10.549) rotate(60) translate(-9.843, -10.549) ",
|
50114
50146
|
x: "8.343",
|
@@ -50116,7 +50148,7 @@ var categories = {
|
|
50116
50148
|
width: "3",
|
50117
50149
|
height: "21",
|
50118
50150
|
rx: "1.5"
|
50119
|
-
}), React__default[
|
50151
|
+
}), React__default["default"].createElement("rect", {
|
50120
50152
|
id: "Rectangle",
|
50121
50153
|
transform: "translate(9.843, 10.549) rotate(-60) translate(-9.843, -10.549) ",
|
50122
50154
|
x: "8.343",
|
@@ -50127,116 +50159,116 @@ var categories = {
|
|
50127
50159
|
})));
|
50128
50160
|
},
|
50129
50161
|
flags: function flags() {
|
50130
|
-
return React__default[
|
50162
|
+
return React__default["default"].createElement("svg", {
|
50131
50163
|
xmlns: "http://www.w3.org/2000/svg",
|
50132
50164
|
viewBox: "0 0 24 24",
|
50133
50165
|
width: "24",
|
50134
50166
|
height: "24"
|
50135
|
-
}, React__default[
|
50167
|
+
}, React__default["default"].createElement("path", {
|
50136
50168
|
d: "M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"
|
50137
50169
|
}));
|
50138
50170
|
},
|
50139
50171
|
foods: function foods() {
|
50140
|
-
return React__default[
|
50172
|
+
return React__default["default"].createElement("svg", {
|
50141
50173
|
xmlns: "http://www.w3.org/2000/svg",
|
50142
50174
|
viewBox: "0 0 24 24",
|
50143
50175
|
width: "24",
|
50144
50176
|
height: "24"
|
50145
|
-
}, React__default[
|
50177
|
+
}, React__default["default"].createElement("path", {
|
50146
50178
|
d: "M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"
|
50147
50179
|
}));
|
50148
50180
|
},
|
50149
50181
|
nature: function nature() {
|
50150
|
-
return React__default[
|
50182
|
+
return React__default["default"].createElement("svg", {
|
50151
50183
|
xmlns: "http://www.w3.org/2000/svg",
|
50152
50184
|
viewBox: "0 0 24 24",
|
50153
50185
|
width: "24",
|
50154
50186
|
height: "24"
|
50155
|
-
}, React__default[
|
50187
|
+
}, React__default["default"].createElement("path", {
|
50156
50188
|
d: "M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"
|
50157
|
-
}), React__default[
|
50189
|
+
}), React__default["default"].createElement("path", {
|
50158
50190
|
d: "M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"
|
50159
50191
|
}));
|
50160
50192
|
},
|
50161
50193
|
objects: function objects() {
|
50162
|
-
return React__default[
|
50194
|
+
return React__default["default"].createElement("svg", {
|
50163
50195
|
xmlns: "http://www.w3.org/2000/svg",
|
50164
50196
|
viewBox: "0 0 24 24",
|
50165
50197
|
width: "24",
|
50166
50198
|
height: "24"
|
50167
|
-
}, React__default[
|
50199
|
+
}, React__default["default"].createElement("path", {
|
50168
50200
|
d: "M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"
|
50169
|
-
}), React__default[
|
50201
|
+
}), React__default["default"].createElement("path", {
|
50170
50202
|
d: "M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"
|
50171
50203
|
}));
|
50172
50204
|
},
|
50173
50205
|
people: function people() {
|
50174
|
-
return React__default[
|
50206
|
+
return React__default["default"].createElement("svg", {
|
50175
50207
|
xmlns: "http://www.w3.org/2000/svg",
|
50176
50208
|
viewBox: "0 0 24 24",
|
50177
50209
|
width: "24",
|
50178
50210
|
height: "24"
|
50179
|
-
}, React__default[
|
50211
|
+
}, React__default["default"].createElement("path", {
|
50180
50212
|
d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"
|
50181
|
-
}), React__default[
|
50213
|
+
}), React__default["default"].createElement("path", {
|
50182
50214
|
d: "M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"
|
50183
50215
|
}));
|
50184
50216
|
},
|
50185
50217
|
places: function places() {
|
50186
|
-
return React__default[
|
50218
|
+
return React__default["default"].createElement("svg", {
|
50187
50219
|
xmlns: "http://www.w3.org/2000/svg",
|
50188
50220
|
viewBox: "0 0 24 24",
|
50189
50221
|
width: "24",
|
50190
50222
|
height: "24"
|
50191
|
-
}, React__default[
|
50223
|
+
}, React__default["default"].createElement("path", {
|
50192
50224
|
d: "M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"
|
50193
|
-
}), React__default[
|
50225
|
+
}), React__default["default"].createElement("path", {
|
50194
50226
|
d: "M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"
|
50195
50227
|
}));
|
50196
50228
|
},
|
50197
50229
|
recent: function recent() {
|
50198
|
-
return React__default[
|
50230
|
+
return React__default["default"].createElement("svg", {
|
50199
50231
|
xmlns: "http://www.w3.org/2000/svg",
|
50200
50232
|
viewBox: "0 0 24 24",
|
50201
50233
|
width: "24",
|
50202
50234
|
height: "24"
|
50203
|
-
}, React__default[
|
50235
|
+
}, React__default["default"].createElement("path", {
|
50204
50236
|
d: "M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"
|
50205
|
-
}), React__default[
|
50237
|
+
}), React__default["default"].createElement("path", {
|
50206
50238
|
d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"
|
50207
50239
|
}));
|
50208
50240
|
},
|
50209
50241
|
symbols: function symbols() {
|
50210
|
-
return React__default[
|
50242
|
+
return React__default["default"].createElement("svg", {
|
50211
50243
|
xmlns: "http://www.w3.org/2000/svg",
|
50212
50244
|
viewBox: "0 0 24 24",
|
50213
50245
|
width: "24",
|
50214
50246
|
height: "24"
|
50215
|
-
}, React__default[
|
50247
|
+
}, React__default["default"].createElement("path", {
|
50216
50248
|
d: "M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"
|
50217
50249
|
}));
|
50218
50250
|
}
|
50219
50251
|
};
|
50220
50252
|
var search = {
|
50221
50253
|
search: function search() {
|
50222
|
-
return React__default[
|
50254
|
+
return React__default["default"].createElement("svg", {
|
50223
50255
|
xmlns: "http://www.w3.org/2000/svg",
|
50224
50256
|
width: "13",
|
50225
50257
|
height: "13",
|
50226
50258
|
viewBox: "0 0 20 20",
|
50227
50259
|
opacity: "0.5"
|
50228
|
-
}, React__default[
|
50260
|
+
}, React__default["default"].createElement("path", {
|
50229
50261
|
d: "M12.9 14.32a8 8 0 1 1 1.41-1.41l5.35 5.33-1.42 1.42-5.33-5.34zM8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"
|
50230
50262
|
}));
|
50231
50263
|
},
|
50232
50264
|
"delete": function _delete() {
|
50233
|
-
return React__default[
|
50265
|
+
return React__default["default"].createElement("svg", {
|
50234
50266
|
xmlns: "http://www.w3.org/2000/svg",
|
50235
50267
|
width: "13",
|
50236
50268
|
height: "13",
|
50237
50269
|
viewBox: "0 0 20 20",
|
50238
50270
|
opacity: "0.5"
|
50239
|
-
}, React__default[
|
50271
|
+
}, React__default["default"].createElement("path", {
|
50240
50272
|
d: "M10 8.586L2.929 1.515 1.515 2.929 8.586 10l-7.071 7.071 1.414 1.414L10 11.414l7.071 7.071 1.414-1.414L11.414 10l7.071-7.071-1.414-1.414L10 8.586z"
|
50241
50273
|
}));
|
50242
50274
|
}
|
@@ -50249,68 +50281,68 @@ var icons = /*#__PURE__*/Object.freeze({
|
|
50249
50281
|
});
|
50250
50282
|
|
50251
50283
|
var EmojiPropTypes = {
|
50252
|
-
data: PropTypes__default[
|
50253
|
-
onOver: PropTypes__default[
|
50254
|
-
onLeave: PropTypes__default[
|
50255
|
-
onClick: PropTypes__default[
|
50256
|
-
fallback: PropTypes__default[
|
50257
|
-
backgroundImageFn: PropTypes__default[
|
50258
|
-
"native": PropTypes__default[
|
50259
|
-
forceSize: PropTypes__default[
|
50260
|
-
tooltip: PropTypes__default[
|
50261
|
-
useButton: PropTypes__default[
|
50262
|
-
skin: PropTypes__default[
|
50263
|
-
sheetSize: PropTypes__default[
|
50264
|
-
sheetColumns: PropTypes__default[
|
50265
|
-
sheetRows: PropTypes__default[
|
50266
|
-
set: PropTypes__default[
|
50267
|
-
size: PropTypes__default[
|
50268
|
-
emoji: PropTypes__default[
|
50284
|
+
data: PropTypes__default["default"].object.isRequired,
|
50285
|
+
onOver: PropTypes__default["default"].func,
|
50286
|
+
onLeave: PropTypes__default["default"].func,
|
50287
|
+
onClick: PropTypes__default["default"].func,
|
50288
|
+
fallback: PropTypes__default["default"].func,
|
50289
|
+
backgroundImageFn: PropTypes__default["default"].func,
|
50290
|
+
"native": PropTypes__default["default"].bool,
|
50291
|
+
forceSize: PropTypes__default["default"].bool,
|
50292
|
+
tooltip: PropTypes__default["default"].bool,
|
50293
|
+
useButton: PropTypes__default["default"].bool,
|
50294
|
+
skin: PropTypes__default["default"].oneOf([1, 2, 3, 4, 5, 6]),
|
50295
|
+
sheetSize: PropTypes__default["default"].oneOf([16, 20, 32, 64]),
|
50296
|
+
sheetColumns: PropTypes__default["default"].number,
|
50297
|
+
sheetRows: PropTypes__default["default"].number,
|
50298
|
+
set: PropTypes__default["default"].oneOf(['apple', 'google', 'twitter', 'facebook']),
|
50299
|
+
size: PropTypes__default["default"].number.isRequired,
|
50300
|
+
emoji: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].object]).isRequired
|
50269
50301
|
};
|
50270
50302
|
var PickerPropTypes = {
|
50271
|
-
onClick: PropTypes__default[
|
50272
|
-
onSelect: PropTypes__default[
|
50273
|
-
onSkinChange: PropTypes__default[
|
50274
|
-
perLine: PropTypes__default[
|
50275
|
-
emojiSize: PropTypes__default[
|
50276
|
-
i18n: PropTypes__default[
|
50277
|
-
style: PropTypes__default[
|
50278
|
-
title: PropTypes__default[
|
50279
|
-
emoji: PropTypes__default[
|
50280
|
-
color: PropTypes__default[
|
50303
|
+
onClick: PropTypes__default["default"].func,
|
50304
|
+
onSelect: PropTypes__default["default"].func,
|
50305
|
+
onSkinChange: PropTypes__default["default"].func,
|
50306
|
+
perLine: PropTypes__default["default"].number,
|
50307
|
+
emojiSize: PropTypes__default["default"].number,
|
50308
|
+
i18n: PropTypes__default["default"].object,
|
50309
|
+
style: PropTypes__default["default"].object,
|
50310
|
+
title: PropTypes__default["default"].string,
|
50311
|
+
emoji: PropTypes__default["default"].string,
|
50312
|
+
color: PropTypes__default["default"].string,
|
50281
50313
|
set: EmojiPropTypes.set,
|
50282
50314
|
skin: EmojiPropTypes.skin,
|
50283
|
-
"native": PropTypes__default[
|
50315
|
+
"native": PropTypes__default["default"].bool,
|
50284
50316
|
backgroundImageFn: EmojiPropTypes.backgroundImageFn,
|
50285
50317
|
sheetSize: EmojiPropTypes.sheetSize,
|
50286
|
-
emojisToShowFilter: PropTypes__default[
|
50287
|
-
showPreview: PropTypes__default[
|
50288
|
-
showSkinTones: PropTypes__default[
|
50318
|
+
emojisToShowFilter: PropTypes__default["default"].func,
|
50319
|
+
showPreview: PropTypes__default["default"].bool,
|
50320
|
+
showSkinTones: PropTypes__default["default"].bool,
|
50289
50321
|
emojiTooltip: EmojiPropTypes.tooltip,
|
50290
50322
|
useButton: EmojiPropTypes.useButton,
|
50291
|
-
theme: PropTypes__default[
|
50292
|
-
include: PropTypes__default[
|
50293
|
-
exclude: PropTypes__default[
|
50294
|
-
recent: PropTypes__default[
|
50295
|
-
autoFocus: PropTypes__default[
|
50296
|
-
enableFrequentEmojiSort: PropTypes__default[
|
50297
|
-
custom: PropTypes__default[
|
50298
|
-
name: PropTypes__default[
|
50299
|
-
short_names: PropTypes__default[
|
50300
|
-
emoticons: PropTypes__default[
|
50301
|
-
keywords: PropTypes__default[
|
50302
|
-
imageUrl: PropTypes__default[
|
50303
|
-
spriteUrl: PropTypes__default[
|
50304
|
-
sheet_x: PropTypes__default[
|
50305
|
-
sheet_y: PropTypes__default[
|
50306
|
-
size: PropTypes__default[
|
50307
|
-
sheetColumns: PropTypes__default[
|
50308
|
-
sheetRows: PropTypes__default[
|
50323
|
+
theme: PropTypes__default["default"].oneOf(['auto', 'light', 'dark']),
|
50324
|
+
include: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
50325
|
+
exclude: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
50326
|
+
recent: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
50327
|
+
autoFocus: PropTypes__default["default"].bool,
|
50328
|
+
enableFrequentEmojiSort: PropTypes__default["default"].bool,
|
50329
|
+
custom: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
50330
|
+
name: PropTypes__default["default"].string.isRequired,
|
50331
|
+
short_names: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string).isRequired,
|
50332
|
+
emoticons: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
50333
|
+
keywords: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
50334
|
+
imageUrl: PropTypes__default["default"].string,
|
50335
|
+
spriteUrl: PropTypes__default["default"].string,
|
50336
|
+
sheet_x: PropTypes__default["default"].number,
|
50337
|
+
sheet_y: PropTypes__default["default"].number,
|
50338
|
+
size: PropTypes__default["default"].number,
|
50339
|
+
sheetColumns: PropTypes__default["default"].number,
|
50340
|
+
sheetRows: PropTypes__default["default"].number
|
50309
50341
|
})),
|
50310
|
-
skinEmoji: PropTypes__default[
|
50311
|
-
notFound: PropTypes__default[
|
50312
|
-
notFoundEmoji: PropTypes__default[
|
50313
|
-
icons: PropTypes__default[
|
50342
|
+
skinEmoji: PropTypes__default["default"].string,
|
50343
|
+
notFound: PropTypes__default["default"].func,
|
50344
|
+
notFoundEmoji: PropTypes__default["default"].string,
|
50345
|
+
icons: PropTypes__default["default"].object
|
50314
50346
|
};
|
50315
50347
|
|
50316
50348
|
var Anchors = /*#__PURE__*/function (_React$PureComponent) {
|
@@ -50352,7 +50384,7 @@ var Anchors = /*#__PURE__*/function (_React$PureComponent) {
|
|
50352
50384
|
i18n = _this$props2.i18n,
|
50353
50385
|
icons = _this$props2.icons,
|
50354
50386
|
selected = this.state.selected;
|
50355
|
-
return React__default[
|
50387
|
+
return React__default["default"].createElement("nav", {
|
50356
50388
|
className: "emoji-mart-anchors",
|
50357
50389
|
"aria-label": i18n.categorieslabel
|
50358
50390
|
}, categories.map(function (category, i) {
|
@@ -50366,7 +50398,7 @@ var Anchors = /*#__PURE__*/function (_React$PureComponent) {
|
|
50366
50398
|
}
|
50367
50399
|
|
50368
50400
|
var iconId = id.startsWith('custom-') ? 'custom' : id;
|
50369
|
-
return React__default[
|
50401
|
+
return React__default["default"].createElement("button", {
|
50370
50402
|
key: id,
|
50371
50403
|
"aria-label": i18n.categories[iconId],
|
50372
50404
|
title: i18n.categories[iconId],
|
@@ -50377,9 +50409,9 @@ var Anchors = /*#__PURE__*/function (_React$PureComponent) {
|
|
50377
50409
|
style: {
|
50378
50410
|
color: isSelected ? color : null
|
50379
50411
|
}
|
50380
|
-
}, React__default[
|
50412
|
+
}, React__default["default"].createElement("div", {
|
50381
50413
|
className: "emoji-mart-anchor-icon"
|
50382
|
-
}, icons.categories[iconId]()), React__default[
|
50414
|
+
}, icons.categories[iconId]()), React__default["default"].createElement("span", {
|
50383
50415
|
className: "emoji-mart-anchor-bar",
|
50384
50416
|
style: {
|
50385
50417
|
backgroundColor: color
|
@@ -50390,13 +50422,13 @@ var Anchors = /*#__PURE__*/function (_React$PureComponent) {
|
|
50390
50422
|
}]);
|
50391
50423
|
|
50392
50424
|
return Anchors;
|
50393
|
-
}(React__default[
|
50425
|
+
}(React__default["default"].PureComponent);
|
50394
50426
|
Anchors.propTypes
|
50395
50427
|
/* remove-proptypes */
|
50396
50428
|
= {
|
50397
|
-
categories: PropTypes__default[
|
50398
|
-
onAnchorClick: PropTypes__default[
|
50399
|
-
icons: PropTypes__default[
|
50429
|
+
categories: PropTypes__default["default"].array,
|
50430
|
+
onAnchorClick: PropTypes__default["default"].func,
|
50431
|
+
icons: PropTypes__default["default"].object
|
50400
50432
|
};
|
50401
50433
|
Anchors.defaultProps = {
|
50402
50434
|
categories: [],
|
@@ -50679,7 +50711,7 @@ var NimbleEmoji = function NimbleEmoji(props) {
|
|
50679
50711
|
style = _convertStyleToCSS(style);
|
50680
50712
|
return "<".concat(Tag.name, " style='").concat(style, "' aria-label='").concat(label, "' ").concat(title ? "title='".concat(title, "'") : '', " class='").concat(className, "'>").concat(children || '', "</").concat(Tag.name, ">");
|
50681
50713
|
} else {
|
50682
|
-
return React__default[
|
50714
|
+
return React__default["default"].createElement(Tag.name, _extends({
|
50683
50715
|
onClick: function onClick(e) {
|
50684
50716
|
return _handleClick(e, props);
|
50685
50717
|
},
|
@@ -50692,7 +50724,7 @@ var NimbleEmoji = function NimbleEmoji(props) {
|
|
50692
50724
|
"aria-label": label,
|
50693
50725
|
title: title,
|
50694
50726
|
className: className
|
50695
|
-
}, Tag.props), React__default[
|
50727
|
+
}, Tag.props), React__default["default"].createElement("span", {
|
50696
50728
|
style: style
|
50697
50729
|
}, children));
|
50698
50730
|
}
|
@@ -50701,7 +50733,7 @@ var NimbleEmoji = function NimbleEmoji(props) {
|
|
50701
50733
|
NimbleEmoji.propTypes
|
50702
50734
|
/* remove-proptypes */
|
50703
50735
|
= _objectSpread$6({}, EmojiPropTypes, {
|
50704
|
-
data: PropTypes__default[
|
50736
|
+
data: PropTypes__default["default"].object.isRequired
|
50705
50737
|
});
|
50706
50738
|
NimbleEmoji.defaultProps = EmojiDefaultProps;
|
50707
50739
|
|
@@ -50757,7 +50789,7 @@ var NotFound = /*#__PURE__*/function (_React$PureComponent) {
|
|
50757
50789
|
i18n = _this$props.i18n,
|
50758
50790
|
notFound = _this$props.notFound,
|
50759
50791
|
notFoundEmoji = _this$props.notFoundEmoji;
|
50760
|
-
var component = notFound && notFound() || React__default[
|
50792
|
+
var component = notFound && notFound() || React__default["default"].createElement("div", {
|
50761
50793
|
className: "emoji-mart-no-results"
|
50762
50794
|
}, NimbleEmoji(_objectSpread$5({
|
50763
50795
|
data: data
|
@@ -50767,7 +50799,7 @@ var NotFound = /*#__PURE__*/function (_React$PureComponent) {
|
|
50767
50799
|
onOver: null,
|
50768
50800
|
onLeave: null,
|
50769
50801
|
onClick: null
|
50770
|
-
})), React__default[
|
50802
|
+
})), React__default["default"].createElement("div", {
|
50771
50803
|
className: "emoji-mart-no-results-label"
|
50772
50804
|
}, i18n.notfound));
|
50773
50805
|
return component;
|
@@ -50775,12 +50807,12 @@ var NotFound = /*#__PURE__*/function (_React$PureComponent) {
|
|
50775
50807
|
}]);
|
50776
50808
|
|
50777
50809
|
return NotFound;
|
50778
|
-
}(React__default[
|
50810
|
+
}(React__default["default"].PureComponent);
|
50779
50811
|
NotFound.propTypes
|
50780
50812
|
/* remove-proptypes */
|
50781
50813
|
= {
|
50782
|
-
notFound: PropTypes__default[
|
50783
|
-
emojiProps: PropTypes__default[
|
50814
|
+
notFound: PropTypes__default["default"].func.isRequired,
|
50815
|
+
emojiProps: PropTypes__default["default"].object.isRequired
|
50784
50816
|
};
|
50785
50817
|
|
50786
50818
|
function ownKeys$4(object, enumerableOnly) {
|
@@ -51018,31 +51050,31 @@ var Category = /*#__PURE__*/function (_React$Component) {
|
|
51018
51050
|
}
|
51019
51051
|
|
51020
51052
|
var label = i18n.categories[id] || name;
|
51021
|
-
return React__default[
|
51053
|
+
return React__default["default"].createElement("section", {
|
51022
51054
|
ref: this.setContainerRef,
|
51023
51055
|
className: "emoji-mart-category",
|
51024
51056
|
"aria-label": label,
|
51025
51057
|
style: containerStyles
|
51026
|
-
}, React__default[
|
51058
|
+
}, React__default["default"].createElement("div", {
|
51027
51059
|
style: labelStyles,
|
51028
51060
|
"data-name": name,
|
51029
51061
|
className: "emoji-mart-category-label"
|
51030
|
-
}, React__default[
|
51062
|
+
}, React__default["default"].createElement("span", {
|
51031
51063
|
style: labelSpanStyles,
|
51032
51064
|
ref: this.setLabelRef,
|
51033
51065
|
"aria-hidden": true
|
51034
51066
|
/* already labeled by the section aria-label */
|
51035
51067
|
|
51036
|
-
}, label)), React__default[
|
51068
|
+
}, label)), React__default["default"].createElement("ul", {
|
51037
51069
|
className: "emoji-mart-category-list"
|
51038
51070
|
}, emojis && emojis.map(function (emoji) {
|
51039
|
-
return React__default[
|
51071
|
+
return React__default["default"].createElement("li", {
|
51040
51072
|
key: emoji.short_names && emoji.short_names.join('_') || emoji
|
51041
51073
|
}, NimbleEmoji(_objectSpread$4({
|
51042
51074
|
emoji: emoji,
|
51043
51075
|
data: _this3.data
|
51044
51076
|
}, emojiProps)));
|
51045
|
-
})), emojis && !emojis.length && React__default[
|
51077
|
+
})), emojis && !emojis.length && React__default["default"].createElement(NotFound, {
|
51046
51078
|
i18n: i18n,
|
51047
51079
|
notFound: notFound,
|
51048
51080
|
notFoundEmoji: notFoundEmoji,
|
@@ -51053,19 +51085,19 @@ var Category = /*#__PURE__*/function (_React$Component) {
|
|
51053
51085
|
}]);
|
51054
51086
|
|
51055
51087
|
return Category;
|
51056
|
-
}(React__default[
|
51088
|
+
}(React__default["default"].Component);
|
51057
51089
|
Category.propTypes
|
51058
51090
|
/* remove-proptypes */
|
51059
51091
|
= {
|
51060
|
-
emojis: PropTypes__default[
|
51061
|
-
hasStickyPosition: PropTypes__default[
|
51062
|
-
name: PropTypes__default[
|
51063
|
-
"native": PropTypes__default[
|
51064
|
-
perLine: PropTypes__default[
|
51065
|
-
emojiProps: PropTypes__default[
|
51066
|
-
recent: PropTypes__default[
|
51067
|
-
notFound: PropTypes__default[
|
51068
|
-
notFoundEmoji: PropTypes__default[
|
51092
|
+
emojis: PropTypes__default["default"].array,
|
51093
|
+
hasStickyPosition: PropTypes__default["default"].bool,
|
51094
|
+
name: PropTypes__default["default"].string.isRequired,
|
51095
|
+
"native": PropTypes__default["default"].bool.isRequired,
|
51096
|
+
perLine: PropTypes__default["default"].number.isRequired,
|
51097
|
+
emojiProps: PropTypes__default["default"].object.isRequired,
|
51098
|
+
recent: PropTypes__default["default"].arrayOf(PropTypes__default["default"].string),
|
51099
|
+
notFound: PropTypes__default["default"].func,
|
51100
|
+
notFoundEmoji: PropTypes__default["default"].string.isRequired
|
51069
51101
|
};
|
51070
51102
|
Category.defaultProps = {
|
51071
51103
|
emojis: [],
|
@@ -51115,12 +51147,12 @@ var Skins = /*#__PURE__*/function (_React$PureComponent) {
|
|
51115
51147
|
}]);
|
51116
51148
|
|
51117
51149
|
return Skins;
|
51118
|
-
}(React__default[
|
51150
|
+
}(React__default["default"].PureComponent);
|
51119
51151
|
Skins.propTypes
|
51120
51152
|
/* remove-proptypes */
|
51121
51153
|
= {
|
51122
|
-
onChange: PropTypes__default[
|
51123
|
-
skin: PropTypes__default[
|
51154
|
+
onChange: PropTypes__default["default"].func,
|
51155
|
+
skin: PropTypes__default["default"].number.isRequired
|
51124
51156
|
};
|
51125
51157
|
Skins.defaultProps = {
|
51126
51158
|
onChange: function onChange() {}
|
@@ -51153,10 +51185,10 @@ var SkinsEmoji = /*#__PURE__*/function (_Skins) {
|
|
51153
51185
|
|
51154
51186
|
for (var skinTone = 1; skinTone <= 6; skinTone++) {
|
51155
51187
|
var selected = skinTone === skin;
|
51156
|
-
skinToneNodes.push(React__default[
|
51188
|
+
skinToneNodes.push(React__default["default"].createElement("span", {
|
51157
51189
|
key: "skin-tone-".concat(skinTone),
|
51158
51190
|
className: "emoji-mart-skin-swatch custom".concat(selected ? ' selected' : '')
|
51159
|
-
}, React__default[
|
51191
|
+
}, React__default["default"].createElement("span", {
|
51160
51192
|
onClick: this.handleClick,
|
51161
51193
|
"data-skin": skinTone,
|
51162
51194
|
className: "emoji-mart-skin-tone-".concat(skinTone)
|
@@ -51172,9 +51204,9 @@ var SkinsEmoji = /*#__PURE__*/function (_Skins) {
|
|
51172
51204
|
}))));
|
51173
51205
|
}
|
51174
51206
|
|
51175
|
-
return React__default[
|
51207
|
+
return React__default["default"].createElement("div", {
|
51176
51208
|
className: "emoji-mart-skin-swatches custom".concat(opened ? ' opened' : '')
|
51177
|
-
}, React__default[
|
51209
|
+
}, React__default["default"].createElement("div", {
|
51178
51210
|
className: "emoji-mart-skin-text".concat(opened ? ' opened' : '')
|
51179
51211
|
}, i18n.skintext), skinToneNodes);
|
51180
51212
|
}
|
@@ -51185,12 +51217,12 @@ var SkinsEmoji = /*#__PURE__*/function (_Skins) {
|
|
51185
51217
|
SkinsEmoji.propTypes
|
51186
51218
|
/* remove-proptypes */
|
51187
51219
|
= {
|
51188
|
-
onChange: PropTypes__default[
|
51189
|
-
skin: PropTypes__default[
|
51190
|
-
emojiProps: PropTypes__default[
|
51191
|
-
skinTone: PropTypes__default[
|
51192
|
-
skinEmoji: PropTypes__default[
|
51193
|
-
i18n: PropTypes__default[
|
51220
|
+
onChange: PropTypes__default["default"].func,
|
51221
|
+
skin: PropTypes__default["default"].number.isRequired,
|
51222
|
+
emojiProps: PropTypes__default["default"].object.isRequired,
|
51223
|
+
skinTone: PropTypes__default["default"].number,
|
51224
|
+
skinEmoji: PropTypes__default["default"].string.isRequired,
|
51225
|
+
i18n: PropTypes__default["default"].object
|
51194
51226
|
};
|
51195
51227
|
SkinsEmoji.defaultProps = {
|
51196
51228
|
onChange: function onChange() {},
|
@@ -51232,14 +51264,14 @@ var SkinsDot = /*#__PURE__*/function (_Skins) {
|
|
51232
51264
|
for (var skinTone = 1; skinTone <= 6; skinTone++) {
|
51233
51265
|
var selected = skinTone === skin;
|
51234
51266
|
var visible = opened || selected;
|
51235
|
-
skinToneNodes.push(React__default[
|
51267
|
+
skinToneNodes.push(React__default["default"].createElement("span", _extends({
|
51236
51268
|
key: "skin-tone-".concat(skinTone),
|
51237
51269
|
className: "emoji-mart-skin-swatch".concat(selected ? ' selected' : ''),
|
51238
51270
|
"aria-label": i18n.skintones[skinTone],
|
51239
51271
|
"aria-hidden": !visible
|
51240
51272
|
}, opened ? {
|
51241
51273
|
role: 'menuitem'
|
51242
|
-
} : {}), React__default[
|
51274
|
+
} : {}), React__default["default"].createElement("span", _extends({
|
51243
51275
|
onClick: this.handleClick,
|
51244
51276
|
onKeyDown: this.handleKeyDown,
|
51245
51277
|
role: "button"
|
@@ -51257,10 +51289,10 @@ var SkinsDot = /*#__PURE__*/function (_Skins) {
|
|
51257
51289
|
}))));
|
51258
51290
|
}
|
51259
51291
|
|
51260
|
-
return React__default[
|
51292
|
+
return React__default["default"].createElement("section", {
|
51261
51293
|
className: "emoji-mart-skin-swatches".concat(opened ? ' opened' : ''),
|
51262
51294
|
"aria-label": i18n.skintext
|
51263
|
-
}, React__default[
|
51295
|
+
}, React__default["default"].createElement("div", opened ? {
|
51264
51296
|
role: 'menubar'
|
51265
51297
|
} : {}, skinToneNodes));
|
51266
51298
|
}
|
@@ -51271,9 +51303,9 @@ var SkinsDot = /*#__PURE__*/function (_Skins) {
|
|
51271
51303
|
SkinsDot.propTypes
|
51272
51304
|
/* remove-proptypes */
|
51273
51305
|
= {
|
51274
|
-
onChange: PropTypes__default[
|
51275
|
-
skin: PropTypes__default[
|
51276
|
-
i18n: PropTypes__default[
|
51306
|
+
onChange: PropTypes__default["default"].func,
|
51307
|
+
skin: PropTypes__default["default"].number.isRequired,
|
51308
|
+
i18n: PropTypes__default["default"].object
|
51277
51309
|
};
|
51278
51310
|
SkinsDot.defaultProps = {
|
51279
51311
|
onChange: function onChange() {}
|
@@ -51356,59 +51388,59 @@ var Preview = /*#__PURE__*/function (_React$PureComponent) {
|
|
51356
51388
|
knownEmoticons.push(emoticon.toLowerCase());
|
51357
51389
|
listedEmoticons.push(emoticon);
|
51358
51390
|
});
|
51359
|
-
return React__default[
|
51391
|
+
return React__default["default"].createElement("div", {
|
51360
51392
|
className: "emoji-mart-preview"
|
51361
|
-
}, React__default[
|
51393
|
+
}, React__default["default"].createElement("div", {
|
51362
51394
|
className: "emoji-mart-preview-emoji",
|
51363
51395
|
"aria-hidden": "true"
|
51364
51396
|
}, NimbleEmoji(_objectSpread$3({
|
51365
51397
|
key: emoji.id,
|
51366
51398
|
emoji: emoji,
|
51367
51399
|
data: this.data
|
51368
|
-
}, emojiProps))), React__default[
|
51400
|
+
}, emojiProps))), React__default["default"].createElement("div", {
|
51369
51401
|
className: "emoji-mart-preview-data",
|
51370
51402
|
"aria-hidden": "true"
|
51371
|
-
}, React__default[
|
51403
|
+
}, React__default["default"].createElement("div", {
|
51372
51404
|
className: "emoji-mart-preview-name"
|
51373
|
-
}, emoji.name), React__default[
|
51405
|
+
}, emoji.name), React__default["default"].createElement("div", {
|
51374
51406
|
className: "emoji-mart-preview-shortnames"
|
51375
51407
|
}, emojiData.short_names.map(function (short_name) {
|
51376
|
-
return React__default[
|
51408
|
+
return React__default["default"].createElement("span", {
|
51377
51409
|
key: short_name,
|
51378
51410
|
className: "emoji-mart-preview-shortname"
|
51379
51411
|
}, ":", short_name, ":");
|
51380
|
-
})), React__default[
|
51412
|
+
})), React__default["default"].createElement("div", {
|
51381
51413
|
className: "emoji-mart-preview-emoticons"
|
51382
51414
|
}, listedEmoticons.map(function (emoticon) {
|
51383
|
-
return React__default[
|
51415
|
+
return React__default["default"].createElement("span", {
|
51384
51416
|
key: emoticon,
|
51385
51417
|
className: "emoji-mart-preview-emoticon"
|
51386
51418
|
}, emoticon);
|
51387
51419
|
}))));
|
51388
51420
|
} else {
|
51389
|
-
return React__default[
|
51421
|
+
return React__default["default"].createElement("div", {
|
51390
51422
|
className: "emoji-mart-preview"
|
51391
|
-
}, React__default[
|
51423
|
+
}, React__default["default"].createElement("div", {
|
51392
51424
|
className: "emoji-mart-preview-emoji",
|
51393
51425
|
"aria-hidden": "true"
|
51394
51426
|
}, idleEmoji && idleEmoji.length && NimbleEmoji(_objectSpread$3({
|
51395
51427
|
emoji: idleEmoji,
|
51396
51428
|
data: this.data
|
51397
|
-
}, emojiProps))), React__default[
|
51429
|
+
}, emojiProps))), React__default["default"].createElement("div", {
|
51398
51430
|
className: "emoji-mart-preview-data",
|
51399
51431
|
"aria-hidden": "true"
|
51400
|
-
}, React__default[
|
51432
|
+
}, React__default["default"].createElement("span", {
|
51401
51433
|
className: "emoji-mart-title-label"
|
51402
|
-
}, title)), showSkinTones && React__default[
|
51434
|
+
}, title)), showSkinTones && React__default["default"].createElement("div", {
|
51403
51435
|
className: "emoji-mart-preview-skins".concat(skinsProps.skinEmoji ? ' custom' : '')
|
51404
|
-
}, skinsProps.skinEmoji ? React__default[
|
51436
|
+
}, skinsProps.skinEmoji ? React__default["default"].createElement(SkinsEmoji, {
|
51405
51437
|
skin: skinsProps.skin,
|
51406
51438
|
emojiProps: emojiProps,
|
51407
51439
|
data: this.data,
|
51408
51440
|
skinEmoji: skinsProps.skinEmoji,
|
51409
51441
|
i18n: i18n,
|
51410
51442
|
onChange: skinsProps.onChange
|
51411
|
-
}) : React__default[
|
51443
|
+
}) : React__default["default"].createElement(SkinsDot, {
|
51412
51444
|
skin: skinsProps.skin,
|
51413
51445
|
i18n: i18n,
|
51414
51446
|
onChange: skinsProps.onChange
|
@@ -51418,15 +51450,15 @@ var Preview = /*#__PURE__*/function (_React$PureComponent) {
|
|
51418
51450
|
}]);
|
51419
51451
|
|
51420
51452
|
return Preview;
|
51421
|
-
}(React__default[
|
51453
|
+
}(React__default["default"].PureComponent);
|
51422
51454
|
Preview.propTypes
|
51423
51455
|
/* remove-proptypes */
|
51424
51456
|
= {
|
51425
|
-
showSkinTones: PropTypes__default[
|
51426
|
-
title: PropTypes__default[
|
51427
|
-
emoji: PropTypes__default[
|
51428
|
-
emojiProps: PropTypes__default[
|
51429
|
-
skinsProps: PropTypes__default[
|
51457
|
+
showSkinTones: PropTypes__default["default"].bool,
|
51458
|
+
title: PropTypes__default["default"].string.isRequired,
|
51459
|
+
emoji: PropTypes__default["default"].string.isRequired,
|
51460
|
+
emojiProps: PropTypes__default["default"].object.isRequired,
|
51461
|
+
skinsProps: PropTypes__default["default"].object.isRequired
|
51430
51462
|
};
|
51431
51463
|
Preview.defaultProps = {
|
51432
51464
|
showSkinTones: true,
|
@@ -51524,20 +51556,20 @@ var Search = /*#__PURE__*/function (_React$PureComponent) {
|
|
51524
51556
|
isSearching = _this$state.isSearching,
|
51525
51557
|
id = _this$state.id;
|
51526
51558
|
var inputId = "emoji-mart-search-".concat(id);
|
51527
|
-
return React__default[
|
51559
|
+
return React__default["default"].createElement("section", {
|
51528
51560
|
className: "emoji-mart-search",
|
51529
51561
|
"aria-label": i18n.search
|
51530
|
-
}, React__default[
|
51562
|
+
}, React__default["default"].createElement("input", {
|
51531
51563
|
id: inputId,
|
51532
51564
|
ref: this.setRef,
|
51533
51565
|
type: "search",
|
51534
51566
|
onChange: this.handleChange,
|
51535
51567
|
placeholder: i18n.search,
|
51536
51568
|
autoFocus: autoFocus
|
51537
|
-
}), React__default[
|
51569
|
+
}), React__default["default"].createElement("label", {
|
51538
51570
|
className: "emoji-mart-sr-only",
|
51539
51571
|
htmlFor: inputId
|
51540
|
-
}, i18n.search), React__default[
|
51572
|
+
}, i18n.search), React__default["default"].createElement("button", {
|
51541
51573
|
className: "emoji-mart-search-icon",
|
51542
51574
|
onClick: this.clear,
|
51543
51575
|
onKeyUp: this.handleKeyUp,
|
@@ -51548,14 +51580,14 @@ var Search = /*#__PURE__*/function (_React$PureComponent) {
|
|
51548
51580
|
}]);
|
51549
51581
|
|
51550
51582
|
return Search;
|
51551
|
-
}(React__default[
|
51583
|
+
}(React__default["default"].PureComponent);
|
51552
51584
|
Search.propTypes
|
51553
51585
|
/* remove-proptypes */
|
51554
51586
|
= {
|
51555
|
-
onSearch: PropTypes__default[
|
51556
|
-
maxResults: PropTypes__default[
|
51557
|
-
emojisToShowFilter: PropTypes__default[
|
51558
|
-
autoFocus: PropTypes__default[
|
51587
|
+
onSearch: PropTypes__default["default"].func,
|
51588
|
+
maxResults: PropTypes__default["default"].number,
|
51589
|
+
emojisToShowFilter: PropTypes__default["default"].func,
|
51590
|
+
autoFocus: PropTypes__default["default"].bool
|
51559
51591
|
};
|
51560
51592
|
Search.defaultProps = {
|
51561
51593
|
onSearch: function onSearch() {},
|
@@ -52149,16 +52181,16 @@ var NimblePicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
52149
52181
|
var width = perLine * (emojiSize + 12) + 12 + 2 + measureScrollbar();
|
52150
52182
|
var theme = this.getPreferredTheme();
|
52151
52183
|
var skin = this.props.skin || this.state.skin || store.get('skin') || this.props.defaultSkin;
|
52152
|
-
return React__default[
|
52184
|
+
return React__default["default"].createElement("section", {
|
52153
52185
|
style: _objectSpread$2({
|
52154
52186
|
width: width
|
52155
52187
|
}, style),
|
52156
52188
|
className: "emoji-mart emoji-mart-".concat(theme),
|
52157
52189
|
"aria-label": title,
|
52158
52190
|
onKeyDown: this.handleKeyDown
|
52159
|
-
}, React__default[
|
52191
|
+
}, React__default["default"].createElement("div", {
|
52160
52192
|
className: "emoji-mart-bar"
|
52161
|
-
}, React__default[
|
52193
|
+
}, React__default["default"].createElement(Anchors, {
|
52162
52194
|
ref: this.setAnchorsRef,
|
52163
52195
|
data: this.data,
|
52164
52196
|
i18n: this.i18n,
|
@@ -52166,7 +52198,7 @@ var NimblePicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
52166
52198
|
categories: this.categories,
|
52167
52199
|
onAnchorClick: this.handleAnchorClick,
|
52168
52200
|
icons: this.icons
|
52169
|
-
})), React__default[
|
52201
|
+
})), React__default["default"].createElement(Search, {
|
52170
52202
|
ref: this.setSearchRef,
|
52171
52203
|
onSearch: this.handleSearch,
|
52172
52204
|
data: this.data,
|
@@ -52176,12 +52208,12 @@ var NimblePicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
52176
52208
|
exclude: exclude,
|
52177
52209
|
custom: this.CUSTOM,
|
52178
52210
|
autoFocus: autoFocus
|
52179
|
-
}), React__default[
|
52211
|
+
}), React__default["default"].createElement("div", {
|
52180
52212
|
ref: this.setScrollRef,
|
52181
52213
|
className: "emoji-mart-scroll",
|
52182
52214
|
onScroll: this.handleScroll
|
52183
52215
|
}, this.getCategories().map(function (category, i) {
|
52184
|
-
return React__default[
|
52216
|
+
return React__default["default"].createElement(Category, {
|
52185
52217
|
ref: _this4.setCategoryRef.bind(_this4, "category-".concat(i)),
|
52186
52218
|
key: category.name,
|
52187
52219
|
id: category.id,
|
@@ -52213,9 +52245,9 @@ var NimblePicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
52213
52245
|
notFound: notFound,
|
52214
52246
|
notFoundEmoji: notFoundEmoji
|
52215
52247
|
});
|
52216
|
-
})), (showPreview || showSkinTones) && React__default[
|
52248
|
+
})), (showPreview || showSkinTones) && React__default["default"].createElement("div", {
|
52217
52249
|
className: "emoji-mart-bar"
|
52218
|
-
}, React__default[
|
52250
|
+
}, React__default["default"].createElement(Preview, {
|
52219
52251
|
ref: this.setPreviewRef,
|
52220
52252
|
data: this.data,
|
52221
52253
|
title: title,
|
@@ -52243,11 +52275,11 @@ var NimblePicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
52243
52275
|
}]);
|
52244
52276
|
|
52245
52277
|
return NimblePicker;
|
52246
|
-
}(React__default[
|
52278
|
+
}(React__default["default"].PureComponent);
|
52247
52279
|
NimblePicker.propTypes
|
52248
52280
|
/* remove-proptypes */
|
52249
52281
|
= _objectSpread$2({}, PickerPropTypes, {
|
52250
|
-
data: PropTypes__default[
|
52282
|
+
data: PropTypes__default["default"].object.isRequired
|
52251
52283
|
});
|
52252
52284
|
NimblePicker.defaultProps = _objectSpread$2({}, PickerDefaultProps);
|
52253
52285
|
|
@@ -52297,12 +52329,12 @@ var Picker = /*#__PURE__*/function (_React$PureComponent) {
|
|
52297
52329
|
_createClass(Picker, [{
|
52298
52330
|
key: "render",
|
52299
52331
|
value: function render() {
|
52300
|
-
return React__default[
|
52332
|
+
return React__default["default"].createElement(NimblePicker, _extends({}, this.props, this.state));
|
52301
52333
|
}
|
52302
52334
|
}]);
|
52303
52335
|
|
52304
52336
|
return Picker;
|
52305
|
-
}(React__default[
|
52337
|
+
}(React__default["default"].PureComponent);
|
52306
52338
|
Picker.propTypes
|
52307
52339
|
/* remove-proptypes */
|
52308
52340
|
= PickerPropTypes;
|
@@ -52382,7 +52414,7 @@ function EmojiPicker(props) {
|
|
52382
52414
|
|
52383
52415
|
return exclude;
|
52384
52416
|
}, [disableRecent]);
|
52385
|
-
return /*#__PURE__*/React__default[
|
52417
|
+
return /*#__PURE__*/React__default["default"].createElement(Picker, {
|
52386
52418
|
theme: theme,
|
52387
52419
|
set: "apple",
|
52388
52420
|
showPreview: false,
|
@@ -52394,10 +52426,10 @@ function EmojiPicker(props) {
|
|
52394
52426
|
}
|
52395
52427
|
|
52396
52428
|
EmojiPicker.propTypes = {
|
52397
|
-
theme: PropTypes__default[
|
52398
|
-
onSelectEmoji: PropTypes__default[
|
52399
|
-
disableRecent: PropTypes__default[
|
52400
|
-
customEmojis: PropTypes__default[
|
52429
|
+
theme: PropTypes__default["default"].oneOf(['light', 'dark', 'auto']),
|
52430
|
+
onSelectEmoji: PropTypes__default["default"].func,
|
52431
|
+
disableRecent: PropTypes__default["default"].bool,
|
52432
|
+
customEmojis: PropTypes__default["default"].array
|
52401
52433
|
};
|
52402
52434
|
var EmojiPicker$1 = /*#__PURE__*/React.memo(EmojiPicker);
|
52403
52435
|
|
@@ -52488,31 +52520,31 @@ const EmojiPickerWrapper = props => {
|
|
52488
52520
|
}
|
52489
52521
|
}
|
52490
52522
|
|
52491
|
-
return /*#__PURE__*/React__default[
|
52523
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("div", {
|
52492
52524
|
className: "react-emoji-picker--container"
|
52493
|
-
}, showPicker && /*#__PURE__*/React__default[
|
52525
|
+
}, showPicker && /*#__PURE__*/React__default["default"].createElement("div", {
|
52494
52526
|
className: "react-emoji-picker--wrapper",
|
52495
52527
|
onClick: evt => evt.stopPropagation()
|
52496
|
-
}, /*#__PURE__*/React__default[
|
52528
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
52497
52529
|
className: "react-emoji-picker"
|
52498
|
-
}, /*#__PURE__*/React__default[
|
52530
|
+
}, /*#__PURE__*/React__default["default"].createElement(EmojiPicker$1, {
|
52499
52531
|
theme: theme,
|
52500
52532
|
onSelectEmoji: handleSelectEmoji,
|
52501
52533
|
disableRecent: disableRecent,
|
52502
52534
|
customEmojis: customEmojis
|
52503
|
-
})))), /*#__PURE__*/React__default[
|
52535
|
+
})))), /*#__PURE__*/React__default["default"].createElement("button", {
|
52504
52536
|
type: "button",
|
52505
52537
|
className: `react-input-emoji--button${showPicker ? " react-input-emoji--button__show" : ""}`,
|
52506
52538
|
onClick: toggleShowPicker
|
52507
|
-
}, /*#__PURE__*/React__default[
|
52539
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
52508
52540
|
xmlns: "http://www.w3.org/2000/svg",
|
52509
52541
|
viewBox: "0 0 24 24",
|
52510
52542
|
width: "24",
|
52511
52543
|
height: "24",
|
52512
52544
|
className: "react-input-emoji--button--icon"
|
52513
|
-
}, /*#__PURE__*/React__default[
|
52545
|
+
}, /*#__PURE__*/React__default["default"].createElement("path", {
|
52514
52546
|
d: "M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"
|
52515
|
-
}), /*#__PURE__*/React__default[
|
52547
|
+
}), /*#__PURE__*/React__default["default"].createElement("path", {
|
52516
52548
|
d: "M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"
|
52517
52549
|
}))));
|
52518
52550
|
};
|
@@ -52613,7 +52645,7 @@ function getElementWithFocus() {
|
|
52613
52645
|
|
52614
52646
|
function getSelectionStart() {
|
52615
52647
|
const node = document.getSelection().anchorNode;
|
52616
|
-
return
|
52648
|
+
return node?.nodeType == 3 ? node : null;
|
52617
52649
|
}
|
52618
52650
|
|
52619
52651
|
// @ts-check
|
@@ -52658,11 +52690,9 @@ function useMention(searchMention) {
|
|
52658
52690
|
/** @type {(event: React.KeyboardEvent) => void} */
|
52659
52691
|
|
52660
52692
|
const onKeyUp = React.useCallback(async event => {
|
52661
|
-
var _getElementWithFocus;
|
52662
|
-
|
52663
52693
|
if (typeof searchMention !== "function") return;
|
52664
52694
|
|
52665
|
-
if (event.key === "Backspace" &&
|
52695
|
+
if (event.key === "Backspace" && getElementWithFocus()?.element.parentElement.hasAttribute("data-mention-id")) {
|
52666
52696
|
const elementWithFocus = getElementWithFocus();
|
52667
52697
|
elementWithFocus.element.parentElement.remove();
|
52668
52698
|
} else if (!["ArrowUp", "ArrowDown", "Esc", "Escape"].includes(event.key)) {
|
@@ -52799,20 +52829,20 @@ const MentionUserList = ({
|
|
52799
52829
|
unsubscribe();
|
52800
52830
|
};
|
52801
52831
|
}, [addEventListener, onSelect, selectedUser, usersFiltered]);
|
52802
|
-
return /*#__PURE__*/React__default[
|
52832
|
+
return /*#__PURE__*/React__default["default"].createElement("ul", {
|
52803
52833
|
className: "react-input-emoji--mention--list",
|
52804
52834
|
"data-testid": "mention-user-list"
|
52805
|
-
}, usersFiltered.map((user, index) => /*#__PURE__*/React__default[
|
52835
|
+
}, usersFiltered.map((user, index) => /*#__PURE__*/React__default["default"].createElement("li", {
|
52806
52836
|
key: user.id
|
52807
|
-
}, /*#__PURE__*/React__default[
|
52837
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
52808
52838
|
type: "button",
|
52809
52839
|
onClick: handleClick(user),
|
52810
52840
|
className: `react-input-emoji--mention--item${selectedUser === index ? " react-input-emoji--mention--item__selected" : ""}`,
|
52811
52841
|
onMouseOver: () => setSelectedUser(index)
|
52812
|
-
}, /*#__PURE__*/React__default[
|
52842
|
+
}, /*#__PURE__*/React__default["default"].createElement("img", {
|
52813
52843
|
className: "react-input-emoji--mention--item--img",
|
52814
52844
|
src: user.image
|
52815
|
-
}), /*#__PURE__*/React__default[
|
52845
|
+
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
52816
52846
|
className: "react-input-emoji--mention--item--name",
|
52817
52847
|
dangerouslySetInnerHTML: {
|
52818
52848
|
__html: user.nameHtml
|
@@ -52822,7 +52852,7 @@ const MentionUserList = ({
|
|
52822
52852
|
|
52823
52853
|
const MentionUserListWithRef = /*#__PURE__*/React.forwardRef(MentionUserList);
|
52824
52854
|
MentionUserListWithRef.propTypes = {
|
52825
|
-
users: PropTypes__default[
|
52855
|
+
users: PropTypes__default["default"].array.isRequired
|
52826
52856
|
};
|
52827
52857
|
|
52828
52858
|
// @ts-check
|
@@ -52951,16 +52981,16 @@ const MentionWrapper = ({
|
|
52951
52981
|
appendContent(`<span class="react-input-emoji--mention--text" data-mention-id="${user.id}" data-mention-name="${user.name}">@${user.name}</span> `);
|
52952
52982
|
}
|
52953
52983
|
|
52954
|
-
return /*#__PURE__*/React__default[
|
52984
|
+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, loading ? /*#__PURE__*/React__default["default"].createElement("div", {
|
52955
52985
|
className: "react-input-emoji--mention--container"
|
52956
|
-
}, /*#__PURE__*/React__default[
|
52986
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
52957
52987
|
className: "react-input-emoji--mention--loading"
|
52958
|
-
}, /*#__PURE__*/React__default[
|
52988
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
52959
52989
|
className: "react-input-emoji--mention--loading--spinner"
|
52960
|
-
}, "Loading..."))) : showUserList && /*#__PURE__*/React__default[
|
52990
|
+
}, "Loading..."))) : showUserList && /*#__PURE__*/React__default["default"].createElement("div", {
|
52961
52991
|
className: "react-input-emoji--mention--container",
|
52962
52992
|
onClick: evt => evt.stopPropagation()
|
52963
|
-
}, /*#__PURE__*/React__default[
|
52993
|
+
}, /*#__PURE__*/React__default["default"].createElement(MentionUserListWithRef, {
|
52964
52994
|
ref: metionUserListRef,
|
52965
52995
|
mentionSearchText: mentionSearchText,
|
52966
52996
|
users: mentionUsers,
|
@@ -53013,7 +53043,8 @@ function useEventListeners() {
|
|
53013
53043
|
arrowUp: createObserver(),
|
53014
53044
|
arrowDown: createObserver(),
|
53015
53045
|
enter: createObserver(),
|
53016
|
-
focus: createObserver()
|
53046
|
+
focus: createObserver(),
|
53047
|
+
blur: createObserver()
|
53017
53048
|
}), []);
|
53018
53049
|
/**
|
53019
53050
|
* @template {keyof TextInputListeners} T, K
|
@@ -53079,6 +53110,7 @@ function usePollute() {
|
|
53079
53110
|
* @property {(size: {width: number, height: number}) => void} onResize
|
53080
53111
|
* @property {() => void} onClick
|
53081
53112
|
* @property {() => void} onFocus
|
53113
|
+
* @property {() => void=} onBlur
|
53082
53114
|
* @property {number} maxLength
|
53083
53115
|
* @property {boolean} keepOpened
|
53084
53116
|
* @property {(event: KeyboardEvent) => void} onKeyDown
|
@@ -53108,6 +53140,7 @@ function InputEmoji(props, ref) {
|
|
53108
53140
|
onResize,
|
53109
53141
|
onClick,
|
53110
53142
|
onFocus,
|
53143
|
+
onBlur,
|
53111
53144
|
onKeyDown,
|
53112
53145
|
theme,
|
53113
53146
|
cleanOnEnter,
|
@@ -53126,7 +53159,7 @@ function InputEmoji(props, ref) {
|
|
53126
53159
|
fontSize,
|
53127
53160
|
fontFamily
|
53128
53161
|
} = props;
|
53129
|
-
/** @type {React.MutableRefObject<import('./text-input').Ref>} */
|
53162
|
+
/** @type {React.MutableRefObject<import('./text-input').Ref | null>} */
|
53130
53163
|
|
53131
53164
|
const textInputRef = React.useRef(null);
|
53132
53165
|
const {
|
@@ -53143,6 +53176,7 @@ function InputEmoji(props, ref) {
|
|
53143
53176
|
pollute
|
53144
53177
|
} = usePollute();
|
53145
53178
|
const updateHTML = React.useCallback((nextValue = "") => {
|
53179
|
+
if (textInputRef.current === null) return;
|
53146
53180
|
textInputRef.current.html = replaceAllTextEmojis(nextValue);
|
53147
53181
|
sanitizedTextRef.current = nextValue;
|
53148
53182
|
}, [sanitizedTextRef]);
|
@@ -53171,11 +53205,11 @@ function InputEmoji(props, ref) {
|
|
53171
53205
|
* @return {boolean}
|
53172
53206
|
*/
|
53173
53207
|
function handleKeydown(event) {
|
53174
|
-
if (typeof maxLength !== "undefined" && event.key !== "Backspace" && totalCharacters(textInputRef.current) >= maxLength) {
|
53208
|
+
if (typeof maxLength !== "undefined" && event.key !== "Backspace" && textInputRef.current !== null && totalCharacters(textInputRef.current) >= maxLength) {
|
53175
53209
|
event.preventDefault();
|
53176
53210
|
}
|
53177
53211
|
|
53178
|
-
if (event.key === "Enter") {
|
53212
|
+
if (event.key === "Enter" && textInputRef.current) {
|
53179
53213
|
event.preventDefault();
|
53180
53214
|
const text = sanitize(textInputRef.current.html);
|
53181
53215
|
emitChange(sanitizedTextRef.current);
|
@@ -53224,6 +53258,19 @@ function InputEmoji(props, ref) {
|
|
53224
53258
|
unsubscribe();
|
53225
53259
|
};
|
53226
53260
|
}, [addEventListener, onClick, onFocus]);
|
53261
|
+
React.useEffect(() => {
|
53262
|
+
/** */
|
53263
|
+
function handleBlur() {
|
53264
|
+
if (typeof onBlur === 'function') {
|
53265
|
+
onBlur();
|
53266
|
+
}
|
53267
|
+
}
|
53268
|
+
|
53269
|
+
const unsubscribe = addEventListener('blur', handleBlur);
|
53270
|
+
return () => {
|
53271
|
+
unsubscribe();
|
53272
|
+
};
|
53273
|
+
}, [addEventListener, onBlur]);
|
53227
53274
|
/**
|
53228
53275
|
*
|
53229
53276
|
* @param {string} html
|
@@ -53240,11 +53287,13 @@ function InputEmoji(props, ref) {
|
|
53240
53287
|
|
53241
53288
|
|
53242
53289
|
function appendContent(html) {
|
53243
|
-
if (typeof maxLength !== "undefined" && totalCharacters(textInputRef.current) >= maxLength) {
|
53290
|
+
if (typeof maxLength !== "undefined" && textInputRef.current !== null && totalCharacters(textInputRef.current) >= maxLength) {
|
53244
53291
|
return;
|
53245
53292
|
}
|
53246
53293
|
|
53247
|
-
textInputRef.current
|
53294
|
+
if (textInputRef.current !== null) {
|
53295
|
+
textInputRef.current.appendContent(html);
|
53296
|
+
}
|
53248
53297
|
}
|
53249
53298
|
/**
|
53250
53299
|
* Handle copy of current selected text
|
@@ -53273,17 +53322,18 @@ function InputEmoji(props, ref) {
|
|
53273
53322
|
}
|
53274
53323
|
}
|
53275
53324
|
|
53276
|
-
return /*#__PURE__*/React__default[
|
53325
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
53277
53326
|
className: "react-emoji"
|
53278
|
-
}, /*#__PURE__*/React__default[
|
53327
|
+
}, /*#__PURE__*/React__default["default"].createElement(MentionWrapper, {
|
53279
53328
|
searchMention: searchMention,
|
53280
53329
|
addEventListener: addEventListener,
|
53281
53330
|
appendContent: appendContent,
|
53282
53331
|
addSanitizeFn: addSanitizeFn
|
53283
|
-
}), /*#__PURE__*/React__default[
|
53332
|
+
}), /*#__PURE__*/React__default["default"].createElement(TextInputWithRef, {
|
53284
53333
|
ref: textInputRef,
|
53285
53334
|
onCopy: handleCopy,
|
53286
53335
|
onPaste: handlePaste,
|
53336
|
+
onBlur: listeners.blur.publish,
|
53287
53337
|
onFocus: listeners.focus.publish,
|
53288
53338
|
onArrowUp: listeners.arrowUp.publish,
|
53289
53339
|
onArrowDown: listeners.arrowDown.publish,
|
@@ -53300,7 +53350,7 @@ function InputEmoji(props, ref) {
|
|
53300
53350
|
tabIndex: tabIndex,
|
53301
53351
|
className: inputClass,
|
53302
53352
|
onChange: handleTextInputChange
|
53303
|
-
}), /*#__PURE__*/React__default[
|
53353
|
+
}), /*#__PURE__*/React__default["default"].createElement(EmojiPickerWrapper, {
|
53304
53354
|
theme: theme,
|
53305
53355
|
keepOpened: keepOpened,
|
53306
53356
|
disableRecent: disableRecent,
|