event-map.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.eventAliasMap = exports.eventMap = void 0;
  6. const eventMap = {
  7. // Clipboard Events
  8. copy: {
  9. EventType: 'ClipboardEvent',
  10. defaultInit: {
  11. bubbles: true,
  12. cancelable: true,
  13. composed: true
  14. }
  15. },
  16. cut: {
  17. EventType: 'ClipboardEvent',
  18. defaultInit: {
  19. bubbles: true,
  20. cancelable: true,
  21. composed: true
  22. }
  23. },
  24. paste: {
  25. EventType: 'ClipboardEvent',
  26. defaultInit: {
  27. bubbles: true,
  28. cancelable: true,
  29. composed: true
  30. }
  31. },
  32. // Composition Events
  33. compositionEnd: {
  34. EventType: 'CompositionEvent',
  35. defaultInit: {
  36. bubbles: true,
  37. cancelable: true,
  38. composed: true
  39. }
  40. },
  41. compositionStart: {
  42. EventType: 'CompositionEvent',
  43. defaultInit: {
  44. bubbles: true,
  45. cancelable: true,
  46. composed: true
  47. }
  48. },
  49. compositionUpdate: {
  50. EventType: 'CompositionEvent',
  51. defaultInit: {
  52. bubbles: true,
  53. cancelable: true,
  54. composed: true
  55. }
  56. },
  57. // Keyboard Events
  58. keyDown: {
  59. EventType: 'KeyboardEvent',
  60. defaultInit: {
  61. bubbles: true,
  62. cancelable: true,
  63. charCode: 0,
  64. composed: true
  65. }
  66. },
  67. keyPress: {
  68. EventType: 'KeyboardEvent',
  69. defaultInit: {
  70. bubbles: true,
  71. cancelable: true,
  72. charCode: 0,
  73. composed: true
  74. }
  75. },
  76. keyUp: {
  77. EventType: 'KeyboardEvent',
  78. defaultInit: {
  79. bubbles: true,
  80. cancelable: true,
  81. charCode: 0,
  82. composed: true
  83. }
  84. },
  85. // Focus Events
  86. focus: {
  87. EventType: 'FocusEvent',
  88. defaultInit: {
  89. bubbles: false,
  90. cancelable: false,
  91. composed: true
  92. }
  93. },
  94. blur: {
  95. EventType: 'FocusEvent',
  96. defaultInit: {
  97. bubbles: false,
  98. cancelable: false,
  99. composed: true
  100. }
  101. },
  102. focusIn: {
  103. EventType: 'FocusEvent',
  104. defaultInit: {
  105. bubbles: true,
  106. cancelable: false,
  107. composed: true
  108. }
  109. },
  110. focusOut: {
  111. EventType: 'FocusEvent',
  112. defaultInit: {
  113. bubbles: true,
  114. cancelable: false,
  115. composed: true
  116. }
  117. },
  118. // Form Events
  119. change: {
  120. EventType: 'Event',
  121. defaultInit: {
  122. bubbles: true,
  123. cancelable: false
  124. }
  125. },
  126. input: {
  127. EventType: 'InputEvent',
  128. defaultInit: {
  129. bubbles: true,
  130. cancelable: false,
  131. composed: true
  132. }
  133. },
  134. invalid: {
  135. EventType: 'Event',
  136. defaultInit: {
  137. bubbles: false,
  138. cancelable: true
  139. }
  140. },
  141. submit: {
  142. EventType: 'Event',
  143. defaultInit: {
  144. bubbles: true,
  145. cancelable: true
  146. }
  147. },
  148. reset: {
  149. EventType: 'Event',
  150. defaultInit: {
  151. bubbles: true,
  152. cancelable: true
  153. }
  154. },
  155. // Mouse Events
  156. click: {
  157. EventType: 'MouseEvent',
  158. defaultInit: {
  159. bubbles: true,
  160. cancelable: true,
  161. button: 0,
  162. composed: true
  163. }
  164. },
  165. contextMenu: {
  166. EventType: 'MouseEvent',
  167. defaultInit: {
  168. bubbles: true,
  169. cancelable: true,
  170. composed: true
  171. }
  172. },
  173. dblClick: {
  174. EventType: 'MouseEvent',
  175. defaultInit: {
  176. bubbles: true,
  177. cancelable: true,
  178. composed: true
  179. }
  180. },
  181. drag: {
  182. EventType: 'DragEvent',
  183. defaultInit: {
  184. bubbles: true,
  185. cancelable: true,
  186. composed: true
  187. }
  188. },
  189. dragEnd: {
  190. EventType: 'DragEvent',
  191. defaultInit: {
  192. bubbles: true,
  193. cancelable: false,
  194. composed: true
  195. }
  196. },
  197. dragEnter: {
  198. EventType: 'DragEvent',
  199. defaultInit: {
  200. bubbles: true,
  201. cancelable: true,
  202. composed: true
  203. }
  204. },
  205. dragExit: {
  206. EventType: 'DragEvent',
  207. defaultInit: {
  208. bubbles: true,
  209. cancelable: false,
  210. composed: true
  211. }
  212. },
  213. dragLeave: {
  214. EventType: 'DragEvent',
  215. defaultInit: {
  216. bubbles: true,
  217. cancelable: false,
  218. composed: true
  219. }
  220. },
  221. dragOver: {
  222. EventType: 'DragEvent',
  223. defaultInit: {
  224. bubbles: true,
  225. cancelable: true,
  226. composed: true
  227. }
  228. },
  229. dragStart: {
  230. EventType: 'DragEvent',
  231. defaultInit: {
  232. bubbles: true,
  233. cancelable: true,
  234. composed: true
  235. }
  236. },
  237. drop: {
  238. EventType: 'DragEvent',
  239. defaultInit: {
  240. bubbles: true,
  241. cancelable: true,
  242. composed: true
  243. }
  244. },
  245. mouseDown: {
  246. EventType: 'MouseEvent',
  247. defaultInit: {
  248. bubbles: true,
  249. cancelable: true,
  250. composed: true
  251. }
  252. },
  253. mouseEnter: {
  254. EventType: 'MouseEvent',
  255. defaultInit: {
  256. bubbles: false,
  257. cancelable: false,
  258. composed: true
  259. }
  260. },
  261. mouseLeave: {
  262. EventType: 'MouseEvent',
  263. defaultInit: {
  264. bubbles: false,
  265. cancelable: false,
  266. composed: true
  267. }
  268. },
  269. mouseMove: {
  270. EventType: 'MouseEvent',
  271. defaultInit: {
  272. bubbles: true,
  273. cancelable: true,
  274. composed: true
  275. }
  276. },
  277. mouseOut: {
  278. EventType: 'MouseEvent',
  279. defaultInit: {
  280. bubbles: true,
  281. cancelable: true,
  282. composed: true
  283. }
  284. },
  285. mouseOver: {
  286. EventType: 'MouseEvent',
  287. defaultInit: {
  288. bubbles: true,
  289. cancelable: true,
  290. composed: true
  291. }
  292. },
  293. mouseUp: {
  294. EventType: 'MouseEvent',
  295. defaultInit: {
  296. bubbles: true,
  297. cancelable: true,
  298. composed: true
  299. }
  300. },
  301. // Selection Events
  302. select: {
  303. EventType: 'Event',
  304. defaultInit: {
  305. bubbles: true,
  306. cancelable: false
  307. }
  308. },
  309. // Touch Events
  310. touchCancel: {
  311. EventType: 'TouchEvent',
  312. defaultInit: {
  313. bubbles: true,
  314. cancelable: false,
  315. composed: true
  316. }
  317. },
  318. touchEnd: {
  319. EventType: 'TouchEvent',
  320. defaultInit: {
  321. bubbles: true,
  322. cancelable: true,
  323. composed: true
  324. }
  325. },
  326. touchMove: {
  327. EventType: 'TouchEvent',
  328. defaultInit: {
  329. bubbles: true,
  330. cancelable: true,
  331. composed: true
  332. }
  333. },
  334. touchStart: {
  335. EventType: 'TouchEvent',
  336. defaultInit: {
  337. bubbles: true,
  338. cancelable: true,
  339. composed: true
  340. }
  341. },
  342. // UI Events
  343. scroll: {
  344. EventType: 'UIEvent',
  345. defaultInit: {
  346. bubbles: false,
  347. cancelable: false
  348. }
  349. },
  350. // Wheel Events
  351. wheel: {
  352. EventType: 'WheelEvent',
  353. defaultInit: {
  354. bubbles: true,
  355. cancelable: true,
  356. composed: true
  357. }
  358. },
  359. // Media Events
  360. abort: {
  361. EventType: 'Event',
  362. defaultInit: {
  363. bubbles: false,
  364. cancelable: false
  365. }
  366. },
  367. canPlay: {
  368. EventType: 'Event',
  369. defaultInit: {
  370. bubbles: false,
  371. cancelable: false
  372. }
  373. },
  374. canPlayThrough: {
  375. EventType: 'Event',
  376. defaultInit: {
  377. bubbles: false,
  378. cancelable: false
  379. }
  380. },
  381. durationChange: {
  382. EventType: 'Event',
  383. defaultInit: {
  384. bubbles: false,
  385. cancelable: false
  386. }
  387. },
  388. emptied: {
  389. EventType: 'Event',
  390. defaultInit: {
  391. bubbles: false,
  392. cancelable: false
  393. }
  394. },
  395. encrypted: {
  396. EventType: 'Event',
  397. defaultInit: {
  398. bubbles: false,
  399. cancelable: false
  400. }
  401. },
  402. ended: {
  403. EventType: 'Event',
  404. defaultInit: {
  405. bubbles: false,
  406. cancelable: false
  407. }
  408. },
  409. loadedData: {
  410. EventType: 'Event',
  411. defaultInit: {
  412. bubbles: false,
  413. cancelable: false
  414. }
  415. },
  416. loadedMetadata: {
  417. EventType: 'Event',
  418. defaultInit: {
  419. bubbles: false,
  420. cancelable: false
  421. }
  422. },
  423. loadStart: {
  424. EventType: 'ProgressEvent',
  425. defaultInit: {
  426. bubbles: false,
  427. cancelable: false
  428. }
  429. },
  430. pause: {
  431. EventType: 'Event',
  432. defaultInit: {
  433. bubbles: false,
  434. cancelable: false
  435. }
  436. },
  437. play: {
  438. EventType: 'Event',
  439. defaultInit: {
  440. bubbles: false,
  441. cancelable: false
  442. }
  443. },
  444. playing: {
  445. EventType: 'Event',
  446. defaultInit: {
  447. bubbles: false,
  448. cancelable: false
  449. }
  450. },
  451. progress: {
  452. EventType: 'ProgressEvent',
  453. defaultInit: {
  454. bubbles: false,
  455. cancelable: false
  456. }
  457. },
  458. rateChange: {
  459. EventType: 'Event',
  460. defaultInit: {
  461. bubbles: false,
  462. cancelable: false
  463. }
  464. },
  465. seeked: {
  466. EventType: 'Event',
  467. defaultInit: {
  468. bubbles: false,
  469. cancelable: false
  470. }
  471. },
  472. seeking: {
  473. EventType: 'Event',
  474. defaultInit: {
  475. bubbles: false,
  476. cancelable: false
  477. }
  478. },
  479. stalled: {
  480. EventType: 'Event',
  481. defaultInit: {
  482. bubbles: false,
  483. cancelable: false
  484. }
  485. },
  486. suspend: {
  487. EventType: 'Event',
  488. defaultInit: {
  489. bubbles: false,
  490. cancelable: false
  491. }
  492. },
  493. timeUpdate: {
  494. EventType: 'Event',
  495. defaultInit: {
  496. bubbles: false,
  497. cancelable: false
  498. }
  499. },
  500. volumeChange: {
  501. EventType: 'Event',
  502. defaultInit: {
  503. bubbles: false,
  504. cancelable: false
  505. }
  506. },
  507. waiting: {
  508. EventType: 'Event',
  509. defaultInit: {
  510. bubbles: false,
  511. cancelable: false
  512. }
  513. },
  514. // Image Events
  515. load: {
  516. EventType: 'UIEvent',
  517. defaultInit: {
  518. bubbles: false,
  519. cancelable: false
  520. }
  521. },
  522. error: {
  523. EventType: 'Event',
  524. defaultInit: {
  525. bubbles: false,
  526. cancelable: false
  527. }
  528. },
  529. // Animation Events
  530. animationStart: {
  531. EventType: 'AnimationEvent',
  532. defaultInit: {
  533. bubbles: true,
  534. cancelable: false
  535. }
  536. },
  537. animationEnd: {
  538. EventType: 'AnimationEvent',
  539. defaultInit: {
  540. bubbles: true,
  541. cancelable: false
  542. }
  543. },
  544. animationIteration: {
  545. EventType: 'AnimationEvent',
  546. defaultInit: {
  547. bubbles: true,
  548. cancelable: false
  549. }
  550. },
  551. // Transition Events
  552. transitionEnd: {
  553. EventType: 'TransitionEvent',
  554. defaultInit: {
  555. bubbles: true,
  556. cancelable: true
  557. }
  558. },
  559. // pointer events
  560. pointerOver: {
  561. EventType: 'PointerEvent',
  562. defaultInit: {
  563. bubbles: true,
  564. cancelable: true,
  565. composed: true
  566. }
  567. },
  568. pointerEnter: {
  569. EventType: 'PointerEvent',
  570. defaultInit: {
  571. bubbles: false,
  572. cancelable: false
  573. }
  574. },
  575. pointerDown: {
  576. EventType: 'PointerEvent',
  577. defaultInit: {
  578. bubbles: true,
  579. cancelable: true,
  580. composed: true
  581. }
  582. },
  583. pointerMove: {
  584. EventType: 'PointerEvent',
  585. defaultInit: {
  586. bubbles: true,
  587. cancelable: true,
  588. composed: true
  589. }
  590. },
  591. pointerUp: {
  592. EventType: 'PointerEvent',
  593. defaultInit: {
  594. bubbles: true,
  595. cancelable: true,
  596. composed: true
  597. }
  598. },
  599. pointerCancel: {
  600. EventType: 'PointerEvent',
  601. defaultInit: {
  602. bubbles: true,
  603. cancelable: false,
  604. composed: true
  605. }
  606. },
  607. pointerOut: {
  608. EventType: 'PointerEvent',
  609. defaultInit: {
  610. bubbles: true,
  611. cancelable: true,
  612. composed: true
  613. }
  614. },
  615. pointerLeave: {
  616. EventType: 'PointerEvent',
  617. defaultInit: {
  618. bubbles: false,
  619. cancelable: false
  620. }
  621. },
  622. gotPointerCapture: {
  623. EventType: 'PointerEvent',
  624. defaultInit: {
  625. bubbles: true,
  626. cancelable: false,
  627. composed: true
  628. }
  629. },
  630. lostPointerCapture: {
  631. EventType: 'PointerEvent',
  632. defaultInit: {
  633. bubbles: true,
  634. cancelable: false,
  635. composed: true
  636. }
  637. },
  638. // history events
  639. popState: {
  640. EventType: 'PopStateEvent',
  641. defaultInit: {
  642. bubbles: true,
  643. cancelable: false
  644. }
  645. }
  646. };
  647. exports.eventMap = eventMap;
  648. const eventAliasMap = {
  649. doubleClick: 'dblClick'
  650. };
  651. exports.eventAliasMap = eventAliasMap;