1 | 'use strict';
|
---|
2 |
|
---|
3 | Object.defineProperty(exports, "__esModule", {
|
---|
4 | value: true
|
---|
5 | });
|
---|
6 | exports.eventHandlersByType = undefined;
|
---|
7 |
|
---|
8 | var _arrayPrototype = require('array.prototype.flat');
|
---|
9 |
|
---|
10 | var _arrayPrototype2 = _interopRequireDefault(_arrayPrototype);
|
---|
11 |
|
---|
12 | var _object = require('object.values');
|
---|
13 |
|
---|
14 | var _object2 = _interopRequireDefault(_object);
|
---|
15 |
|
---|
16 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
---|
17 |
|
---|
18 | /**
|
---|
19 | * Common event handlers for JSX element event binding.
|
---|
20 | */
|
---|
21 |
|
---|
22 | var eventHandlersByType = {
|
---|
23 | clipboard: ['onCopy', 'onCut', 'onPaste'],
|
---|
24 | composition: ['onCompositionEnd', 'onCompositionStart', 'onCompositionUpdate'],
|
---|
25 | keyboard: ['onKeyDown', 'onKeyPress', 'onKeyUp'],
|
---|
26 | focus: ['onFocus', 'onBlur'],
|
---|
27 | form: ['onChange', 'onInput', 'onSubmit'],
|
---|
28 | mouse: ['onClick', 'onContextMenu', 'onDblClick', 'onDoubleClick', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragExit', 'onDragLeave', 'onDragOver', 'onDragStart', 'onDrop', 'onMouseDown', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseOut', 'onMouseOver', 'onMouseUp'],
|
---|
29 | selection: ['onSelect'],
|
---|
30 | touch: ['onTouchCancel', 'onTouchEnd', 'onTouchMove', 'onTouchStart'],
|
---|
31 | ui: ['onScroll'],
|
---|
32 | wheel: ['onWheel'],
|
---|
33 | media: ['onAbort', 'onCanPlay', 'onCanPlayThrough', 'onDurationChange', 'onEmptied', 'onEncrypted', 'onEnded', 'onError', 'onLoadedData', 'onLoadedMetadata', 'onLoadStart', 'onPause', 'onPlay', 'onPlaying', 'onProgress', 'onRateChange', 'onSeeked', 'onSeeking', 'onStalled', 'onSuspend', 'onTimeUpdate', 'onVolumeChange', 'onWaiting'],
|
---|
34 | image: ['onLoad', 'onError'],
|
---|
35 | animation: ['onAnimationStart', 'onAnimationEnd', 'onAnimationIteration'],
|
---|
36 | transition: ['onTransitionEnd']
|
---|
37 | };
|
---|
38 |
|
---|
39 | exports.default = (0, _arrayPrototype2.default)((0, _object2.default)(eventHandlersByType));
|
---|
40 | exports.eventHandlersByType = eventHandlersByType; |
---|