Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SyntheticAnimationEvent / SyntheticTransitionEvent #327

Merged
merged 3 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/over_react.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ library over_react;

export 'package:react/react.dart' show
SyntheticEvent,
SyntheticAnimationEvent,
SyntheticClipboardEvent,
SyntheticKeyboardEvent,
SyntheticFocusEvent,
SyntheticFormEvent,
SyntheticDataTransfer,
SyntheticMouseEvent,
SyntheticTouchEvent,
SyntheticTransitionEvent,
SyntheticUIEvent,
SyntheticWheelEvent;

Expand Down
2 changes: 2 additions & 0 deletions lib/src/component/callback_typedefs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ import 'package:react/react.dart' as react;

// Callbacks for React's DOM event system
typedef DomEventCallback(react.SyntheticEvent event);
typedef AnimationEventCallback(react.SyntheticAnimationEvent event);
typedef ClipboardEventCallback(react.SyntheticClipboardEvent event);
typedef KeyboardEventCallback(react.SyntheticKeyboardEvent event);
typedef FocusEventCallback(react.SyntheticFocusEvent event);
typedef FormEventCallback(react.SyntheticFormEvent event);
typedef MouseEventCallback(react.SyntheticMouseEvent event);
typedef TouchEventCallback(react.SyntheticTouchEvent event);
typedef TransitionEventCallback(react.SyntheticTransitionEvent event);
typedef UIEventCallback(react.SyntheticUIEvent event);
typedef WheelEventCallback(react.SyntheticWheelEvent event);

Expand Down
22 changes: 22 additions & 0 deletions lib/src/component/prop_mixins.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ abstract class _$DomPropsMixin {
poster, preload, radioGroup, rel, role, rowSpan, sandbox, scope, scrolling, shape, sizes, spellCheck, src, srcDoc,
srcSet, step, tabIndex, target, type, useMap, value, width, wmode;

AnimationEventCallback onAnimationEnd, onAnimationIteration, onAnimationStart;
ClipboardEventCallback onCopy, onCut, onPaste;
KeyboardEventCallback onKeyDown, onKeyPress, onKeyUp;
FocusEventCallback onFocus, onBlur;
Expand All @@ -94,6 +95,7 @@ abstract class _$DomPropsMixin {
onClick, onContextMenu, onDoubleClick, onDrag, onDragEnd, onDragEnter, onDragExit, onDragLeave, onDragOver,
onDragStart, onDrop, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp;
TouchEventCallback onTouchCancel, onTouchEnd, onTouchMove, onTouchStart;
TransitionEventCallback onTransitionEnd;
UIEventCallback onScroll;
WheelEventCallback onWheel;

Expand Down Expand Up @@ -196,6 +198,21 @@ abstract class _$UbiquitousDomPropsMixin {
/// See: <https://facebook.github.io/react/tips/inline-styles.html>
Map<String, dynamic> style;

/// Callback for when a CSS Animation has completed.
///
/// > Related: [onAnimationIteration], [onAnimationStart], [onTransitionEnd]
AnimationEventCallback onAnimationEnd;

/// Callback for when an iteration of a CSS Animation ends, and another one begins.
///
/// > Related: [onAnimationEnd], [onAnimationStart]
AnimationEventCallback onAnimationIteration;

/// Callback for when a CSS animation has started.
///
/// > Related: [onAnimationEnd], [onAnimationIteration]
AnimationEventCallback onAnimationStart;

/// Callback for when the user copies the content of an element
ClipboardEventCallback onCopy;

Expand Down Expand Up @@ -299,6 +316,11 @@ abstract class _$UbiquitousDomPropsMixin {
/// Callback for when a finger is placed on a touch screen
TouchEventCallback onTouchStart;

/// Callback for when a CSS transition has completed.
///
/// > Related: [onAnimationEnd]
TransitionEventCallback onTransitionEnd;

/// Callback for when an element's scrollbar is being scrolled
UIEventCallback onScroll;

Expand Down
164 changes: 164 additions & 0 deletions lib/src/component/prop_mixins.over_react.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading