@enact/ui 4.1.2 → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnnounceDecorator/tests/Announce-specs.js +13 -5
- package/AnnounceDecorator/tests/AnnounceDecorator-specs.js +9 -7
- package/AnnounceDecorator/tests/useAnnounce-specs.js +25 -17
- package/BodyText/BodyText.d.ts +1 -1
- package/BodyText/tests/BodyText-specs.js +49 -35
- package/Button/Button.d.ts +6 -6
- package/Button/tests/Button-specs.js +104 -3
- package/CHANGELOG.md +4 -0
- package/Cancelable/Cancelable.js +1 -1
- package/Cancelable/tests/Cancelable-specs.js +131 -70
- package/Changeable/tests/Changeable-specs.js +162 -110
- package/FloatingLayer/FloatingLayer.js +5 -17
- package/FloatingLayer/tests/FloatingLayer-specs.js +83 -8
- package/FloatingLayer/tests/Scrim-specs.js +20 -11
- package/FloatingLayer/tests/useFloatingLayerDecorator-specs.js +15 -9
- package/GridListImageItem/GridListImageItem.d.ts +1 -1
- package/Group/Group.d.ts +2 -2
- package/Group/tests/Group-specs.js +71 -41
- package/Heading/Heading.d.ts +2 -1
- package/Heading/tests/Heading-specs.js +27 -20
- package/Icon/Icon.d.ts +4 -4
- package/Icon/tests/Icon-specs.js +52 -31
- package/IconButton/IconButton.d.ts +4 -4
- package/IconButton/tests/IconButton-specs.js +2 -2
- package/Image/tests/Image-specs.js +39 -29
- package/ImageItem/tests/ImageItem-specs.js +71 -68
- package/Item/tests/Item-specs.js +59 -35
- package/LabeledIcon/LabeledIcon.d.ts +4 -4
- package/LabeledIcon/tests/LabeledIcon-specs.js +30 -19
- package/Layout/Layout.d.ts +16 -16
- package/Layout/tests/Layout-specs.js +37 -25
- package/Marquee/MarqueeBase.js +1 -5
- package/Marquee/tests/Marquee-specs.js +221 -116
- package/Media/Media.js +1 -3
- package/ProgressBar/tests/ProgressBar-specs.js +60 -42
- package/README.md +1 -1
- package/RadioDecorator/RadioDecorator.js +3 -5
- package/RadioDecorator/tests/RadioDecorator-specs.js +179 -65
- package/Repeater/Repeater.d.ts +2 -1
- package/Repeater/tests/Repeater-specs.js +86 -45
- package/Routable/Routable.d.ts +2 -2
- package/Routable/tests/Routable-specs.js +26 -17
- package/Routable/tests/Router-specs.js +65 -41
- package/Scrollable/Scrollable.js +1 -0
- package/Scrollable/ScrollableNative.js +1 -0
- package/Scroller/Scroller.d.ts +2 -2
- package/Skinnable/tests/Skinnable-specs.js +102 -54
- package/Skinnable/tests/useSkins-specs.js +37 -42
- package/Slider/Slider.d.ts +3 -3
- package/Slider/tests/Slider-specs.js +4 -4
- package/SlotItem/SlotItem.d.ts +2 -2
- package/SlotItem/tests/SlotItem-specs.js +4 -4
- package/Slottable/tests/Slottable-specs.js +67 -36
- package/Slottable/tests/useSlots-specs.js +68 -35
- package/Spinner/Spinner.d.ts +1 -1
- package/Spinner/tests/Spinner-specs.js +46 -31
- package/ToggleIcon/tests/ToggleIcon-specs.js +32 -20
- package/ToggleItem/ToggleItem.d.ts +13 -11
- package/ToggleItem/tests/ToggleItem-specs.js +51 -34
- package/Toggleable/Toggle.js +6 -6
- package/Toggleable/Toggleable.js +6 -12
- package/Toggleable/tests/Toggleable-specs.js +428 -324
- package/Touchable/Drag.js +13 -17
- package/Touchable/Flick.js +20 -16
- package/Touchable/Hold.js +14 -19
- package/Touchable/Touchable.d.ts +3 -3
- package/Touchable/tests/Touchable-specs.js +223 -109
- package/Touchable/tests/useTouch-specs.js +159 -84
- package/Transition/Transition.d.ts +29 -27
- package/Transition/Transition.js +5 -9
- package/Transition/tests/Transition-specs.js +135 -31
- package/ViewManager/TransitionGroup.js +6 -5
- package/ViewManager/View.js +1 -1
- package/ViewManager/ViewManager.d.ts +4 -4
- package/ViewManager/ViewManager.js +10 -10
- package/ViewManager/tests/View-specs.js +109 -81
- package/ViewManager/tests/ViewManager-specs.js +471 -185
- package/VirtualList/VirtualList.d.ts +11 -9
- package/VirtualList/tests/VirtualList-specs.js +44 -31
- package/internal/IdProvider/tests/useId-specs.js +35 -18
- package/package.json +11 -11
- package/resolution/tests/ResolutionDecorator-specs.js +17 -8
- package/styles/mixins.less +14 -2
- package/useControlledState/tests/useControlledState-specs.js +67 -42
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
require("@testing-library/jest-dom");
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _react = require("@testing-library/react");
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _Transition = _interopRequireWildcard(require("../Transition"));
|
|
8
8
|
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
10
|
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
-
|
|
13
11
|
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
14
12
|
|
|
15
13
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -43,13 +41,15 @@ describe('Transition Specs', function () {
|
|
|
43
41
|
}));
|
|
44
42
|
};
|
|
45
43
|
|
|
46
|
-
|
|
44
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition["default"], {
|
|
47
45
|
className: className,
|
|
48
46
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildNode, {})
|
|
49
47
|
}));
|
|
50
48
|
var expected = className;
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
|
|
50
|
+
var actual = _react.screen.getByText('Body');
|
|
51
|
+
|
|
52
|
+
expect(actual).toHaveClass(expected);
|
|
53
53
|
}); // NOTE: Feature not yet implemented
|
|
54
54
|
|
|
55
55
|
test.skip('should apply author styles', function () {
|
|
@@ -64,49 +64,150 @@ describe('Transition Specs', function () {
|
|
|
64
64
|
}));
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition["default"], {
|
|
68
68
|
style: styles,
|
|
69
69
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildNode, {})
|
|
70
70
|
}));
|
|
71
71
|
var expected = styles;
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
|
|
73
|
+
var actual = _react.screen.getByText('Body');
|
|
74
|
+
|
|
75
|
+
expect(actual).toHaveStyle(expected);
|
|
74
76
|
});
|
|
75
77
|
test('should apply \'shown\' class when visible', function () {
|
|
76
|
-
|
|
78
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition.TransitionBase, {
|
|
79
|
+
"data-testid": "transition"
|
|
80
|
+
}));
|
|
77
81
|
var expected = 'shown';
|
|
78
|
-
|
|
79
|
-
|
|
82
|
+
|
|
83
|
+
var actual = _react.screen.getByTestId('transition');
|
|
84
|
+
|
|
85
|
+
expect(actual).toHaveClass(expected);
|
|
80
86
|
});
|
|
81
87
|
test('should apply \'hidden\' class when not visible', function () {
|
|
82
|
-
|
|
88
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition.TransitionBase, {
|
|
89
|
+
"data-testid": "transition",
|
|
83
90
|
visible: false
|
|
84
91
|
}));
|
|
85
92
|
var expected = 'hidden';
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
|
|
94
|
+
var actual = _react.screen.getByTestId('transition');
|
|
95
|
+
|
|
96
|
+
expect(actual).toHaveClass(expected);
|
|
88
97
|
});
|
|
89
98
|
test('should apply \'shown\' class when visible with noAnimation', function () {
|
|
90
|
-
|
|
99
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition.TransitionBase, {
|
|
100
|
+
"data-testid": "transition",
|
|
91
101
|
noAnimation: true
|
|
92
102
|
}));
|
|
93
103
|
var expected = 'shown';
|
|
94
|
-
|
|
95
|
-
|
|
104
|
+
|
|
105
|
+
var actual = _react.screen.getByTestId('transition');
|
|
106
|
+
|
|
107
|
+
expect(actual).toHaveClass(expected);
|
|
96
108
|
});
|
|
97
109
|
test('should apply \'hidden\' class when not visible with noAnimation', function () {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
noAnimation: true
|
|
110
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition.TransitionBase, {
|
|
111
|
+
"data-testid": "transition",
|
|
112
|
+
noAnimation: true,
|
|
113
|
+
visible: false
|
|
101
114
|
}));
|
|
102
115
|
var expected = 'hidden';
|
|
103
|
-
|
|
104
|
-
|
|
116
|
+
|
|
117
|
+
var actual = _react.screen.getByTestId('transition');
|
|
118
|
+
|
|
119
|
+
expect(actual).toHaveClass(expected);
|
|
120
|
+
});
|
|
121
|
+
test('should fire \'onShow\' event with type when \'visible\' prop bacomes true ', function () {
|
|
122
|
+
var handleShow = jest.fn();
|
|
123
|
+
|
|
124
|
+
var ChildNode = function ChildNode(props) {
|
|
125
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, props), {}, {
|
|
126
|
+
children: "Body"
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
var _render = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition["default"], {
|
|
131
|
+
noAnimation: true,
|
|
132
|
+
onShow: handleShow,
|
|
133
|
+
visible: false,
|
|
134
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildNode, {})
|
|
135
|
+
})),
|
|
136
|
+
rerender = _render.rerender;
|
|
137
|
+
|
|
138
|
+
rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition["default"], {
|
|
139
|
+
noAnimation: true,
|
|
140
|
+
onShow: handleShow,
|
|
141
|
+
visible: true,
|
|
142
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildNode, {})
|
|
143
|
+
}));
|
|
144
|
+
var expected = 1;
|
|
145
|
+
var expectedType = {
|
|
146
|
+
type: 'onShow'
|
|
147
|
+
};
|
|
148
|
+
var actual = handleShow.mock.calls.length && handleShow.mock.calls[0][0];
|
|
149
|
+
expect(handleShow).toBeCalledTimes(expected);
|
|
150
|
+
expect(actual).toMatchObject(expectedType);
|
|
151
|
+
});
|
|
152
|
+
test('should fire \'onHide\' event with type when \'visible\' prop bacomes false ', function () {
|
|
153
|
+
var handleHide = jest.fn();
|
|
154
|
+
|
|
155
|
+
var ChildNode = function ChildNode(props) {
|
|
156
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, props), {}, {
|
|
157
|
+
children: "Body"
|
|
158
|
+
}));
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
var _render2 = (0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition["default"], {
|
|
162
|
+
noAnimation: true,
|
|
163
|
+
onHide: handleHide,
|
|
164
|
+
visible: true,
|
|
165
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildNode, {})
|
|
166
|
+
})),
|
|
167
|
+
rerender = _render2.rerender;
|
|
168
|
+
|
|
169
|
+
rerender( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition["default"], {
|
|
170
|
+
noAnimation: true,
|
|
171
|
+
onHide: handleHide,
|
|
172
|
+
visible: false,
|
|
173
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildNode, {})
|
|
174
|
+
}));
|
|
175
|
+
var expected = 1;
|
|
176
|
+
var expectedType = {
|
|
177
|
+
type: 'onHide'
|
|
178
|
+
};
|
|
179
|
+
var actual = handleHide.mock.calls.length && handleHide.mock.calls[0][0];
|
|
180
|
+
expect(handleHide).toBeCalledTimes(expected);
|
|
181
|
+
expect(actual).toMatchObject(expectedType);
|
|
182
|
+
});
|
|
183
|
+
test('should fire \'onTransitionEnd\' event with type', function () {
|
|
184
|
+
var handleTransitionEnd = jest.fn();
|
|
185
|
+
|
|
186
|
+
var ChildNode = function ChildNode(props) {
|
|
187
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _objectSpread(_objectSpread({}, props), {}, {
|
|
188
|
+
children: "Body"
|
|
189
|
+
}));
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition["default"], {
|
|
193
|
+
onTransitionEnd: handleTransitionEnd,
|
|
194
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChildNode, {})
|
|
195
|
+
}));
|
|
196
|
+
|
|
197
|
+
_react.fireEvent.transitionEnd(_react.screen.getByText('Body'));
|
|
198
|
+
|
|
199
|
+
var expected = 1;
|
|
200
|
+
var expectedType = {
|
|
201
|
+
type: 'onTransitionEnd'
|
|
202
|
+
};
|
|
203
|
+
var actual = handleTransitionEnd.mock.calls.length && handleTransitionEnd.mock.calls[0][0];
|
|
204
|
+
expect(handleTransitionEnd).toBeCalledTimes(expected);
|
|
205
|
+
expect(actual).toMatchObject(expectedType);
|
|
105
206
|
}); // Tests for prop and className combinations
|
|
106
207
|
|
|
107
|
-
var directionCombination = [[
|
|
108
|
-
var durationCombination = [[
|
|
109
|
-
var timingFunctionCombination = [[
|
|
208
|
+
var directionCombination = [['up', 'up'], ['right', 'right'], ['down', 'down'], ['left', 'left']];
|
|
209
|
+
var durationCombination = [['short', 'short'], ['medium', 'medium'], ['long', 'long']];
|
|
210
|
+
var timingFunctionCombination = [['ease', 'ease'], ['ease-in', 'ease-in'], ['ease-out', 'ease-out'], ['ease-in-out', 'ease-in-out'], ['ease-in-quart', 'ease-in-quart'], ['ease-out-quart', 'ease-out-quart'], ['linear', 'linear']];
|
|
110
211
|
var propStyleCombination = [['duration', durationCombination], ['direction', directionCombination], ['timingFunction', timingFunctionCombination]];
|
|
111
212
|
propStyleCombination.forEach(function (_ref) {
|
|
112
213
|
var _ref2 = _slicedToArray(_ref, 2),
|
|
@@ -121,13 +222,16 @@ describe('Transition Specs', function () {
|
|
|
121
222
|
test("should apply classes for ".concat(prop, "=\"").concat(value, "\""), function () {
|
|
122
223
|
var propValue = _defineProperty({}, prop, value);
|
|
123
224
|
|
|
124
|
-
|
|
225
|
+
(0, _react.render)( /*#__PURE__*/(0, _jsxRuntime.jsx)(_Transition["default"], _objectSpread(_objectSpread({}, propValue), {}, {
|
|
226
|
+
"data-testid": "transition",
|
|
125
227
|
visible: true,
|
|
126
228
|
children: "Body"
|
|
127
229
|
})));
|
|
128
230
|
var expected = key;
|
|
129
|
-
|
|
130
|
-
|
|
231
|
+
|
|
232
|
+
var actual = _react.screen.getByTestId('transition');
|
|
233
|
+
|
|
234
|
+
expect(actual).toHaveClass(expected);
|
|
131
235
|
});
|
|
132
236
|
});
|
|
133
237
|
});
|
|
@@ -95,8 +95,6 @@ var forwardOnAppear = (0, _handle.forward)('onAppear');
|
|
|
95
95
|
var forwardOnEnter = (0, _handle.forward)('onEnter');
|
|
96
96
|
var forwardOnLeave = (0, _handle.forward)('onLeave');
|
|
97
97
|
var forwardOnStay = (0, _handle.forward)('onStay');
|
|
98
|
-
var forwardOnTransition = (0, _handle.forward)('onTransition');
|
|
99
|
-
var forwardOnWillTransition = (0, _handle.forward)('onWillTransition');
|
|
100
98
|
/**
|
|
101
99
|
* Manages the transition of added and removed child components. Children that are added are
|
|
102
100
|
* transitioned in and those removed are transition out via optional callbacks on the child.
|
|
@@ -141,6 +139,7 @@ var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
forwardOnAppear({
|
|
142
|
+
type: 'onAppear',
|
|
144
143
|
view: component
|
|
145
144
|
}, _this.props);
|
|
146
145
|
|
|
@@ -178,6 +177,7 @@ var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
|
178
177
|
}
|
|
179
178
|
|
|
180
179
|
forwardOnEnter({
|
|
180
|
+
type: 'onEnter',
|
|
181
181
|
view: component
|
|
182
182
|
}, _this.props);
|
|
183
183
|
|
|
@@ -204,6 +204,7 @@ var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
|
204
204
|
}
|
|
205
205
|
|
|
206
206
|
forwardOnStay({
|
|
207
|
+
type: 'onStay',
|
|
207
208
|
view: component
|
|
208
209
|
}, _this.props);
|
|
209
210
|
};
|
|
@@ -230,6 +231,7 @@ var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
|
230
231
|
}
|
|
231
232
|
|
|
232
233
|
forwardOnLeave({
|
|
234
|
+
type: 'onLeave',
|
|
233
235
|
view: component
|
|
234
236
|
}, _this.props);
|
|
235
237
|
|
|
@@ -358,7 +360,7 @@ var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
|
358
360
|
});
|
|
359
361
|
|
|
360
362
|
if (this.keysToEnter.length || this.keysToLeave.length) {
|
|
361
|
-
|
|
363
|
+
(0, _handle.forwardCustom)('onWillTransition')(null, this.props);
|
|
362
364
|
} // once the component has been updated, start the enter transition for new children,
|
|
363
365
|
|
|
364
366
|
|
|
@@ -385,7 +387,7 @@ var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
|
385
387
|
delete this.currentlyTransitioningKeys[key];
|
|
386
388
|
|
|
387
389
|
if (!noForwarding && Object.keys(this.currentlyTransitioningKeys).length === 0) {
|
|
388
|
-
|
|
390
|
+
(0, _handle.forwardCustom)('onTransition')(null, this.props);
|
|
389
391
|
}
|
|
390
392
|
}
|
|
391
393
|
}
|
|
@@ -413,7 +415,6 @@ var TransitionGroup = /*#__PURE__*/function (_Component) {
|
|
|
413
415
|
delete props.componentRef;
|
|
414
416
|
delete props.currentIndex;
|
|
415
417
|
delete props.onAppear;
|
|
416
|
-
delete props.onAppear;
|
|
417
418
|
delete props.onEnter;
|
|
418
419
|
delete props.onLeave;
|
|
419
420
|
delete props.onStay;
|
package/ViewManager/View.js
CHANGED
|
@@ -111,7 +111,7 @@ horizontal direction).
|
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
* The base `ViewManager` component, without
|
|
114
|
-
|
|
114
|
+
[ViewManagerDecorator] applied.
|
|
115
115
|
*/
|
|
116
116
|
|
|
117
117
|
export class ViewManagerBase extends React.Component<
|
|
@@ -135,15 +135,15 @@ export interface ArrangerCallback {
|
|
|
135
135
|
export interface Arranger {
|
|
136
136
|
/**
|
|
137
137
|
* Returns an array of keyframes describing the animation when
|
|
138
|
-
|
|
138
|
+
a view is entering the viewport.
|
|
139
139
|
*/
|
|
140
140
|
enter: ArrangerCallback /**
|
|
141
141
|
* Returns an array of keyframes describing the animation when
|
|
142
|
-
|
|
142
|
+
a view is leaving the viewport.
|
|
143
143
|
*/;
|
|
144
144
|
leave: ArrangerCallback /**
|
|
145
145
|
* Returns an array of keyframes describing the animation when
|
|
146
|
-
|
|
146
|
+
a view is remaining in the viewport.
|
|
147
147
|
*/;
|
|
148
148
|
stay?: ArrangerCallback;
|
|
149
149
|
}
|
|
@@ -98,8 +98,16 @@ var ViewManagerBase = (_temp = _class = /*#__PURE__*/function (_Component) {
|
|
|
98
98
|
_classCallCheck(this, ViewManagerBase);
|
|
99
99
|
|
|
100
100
|
_this = _super.call(this, props);
|
|
101
|
-
|
|
102
|
-
_this.
|
|
101
|
+
|
|
102
|
+
_this.makeTransitionEvent = function () {
|
|
103
|
+
return {
|
|
104
|
+
index: _this.props.index,
|
|
105
|
+
previousIndex: _this.state.prevIndex
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
_this.handleTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onTransition', _this.makeTransitionEvent)).bindAs(_assertThisInitialized(_this), 'handleTransition');
|
|
110
|
+
_this.handleWillTransition = (0, _handle["default"])((0, _handle.forwardCustom)('onWillTransition', _this.makeTransitionEvent)).bindAs(_assertThisInitialized(_this), 'handleWillTransition');
|
|
103
111
|
_this.state = {
|
|
104
112
|
prevIndex: null,
|
|
105
113
|
reverseTransition: null
|
|
@@ -108,14 +116,6 @@ var ViewManagerBase = (_temp = _class = /*#__PURE__*/function (_Component) {
|
|
|
108
116
|
}
|
|
109
117
|
|
|
110
118
|
_createClass(ViewManagerBase, [{
|
|
111
|
-
key: "makeTransitionEvent",
|
|
112
|
-
value: function makeTransitionEvent() {
|
|
113
|
-
return {
|
|
114
|
-
index: this.props.index,
|
|
115
|
-
previousIndex: this.state.prevIndex
|
|
116
|
-
};
|
|
117
|
-
}
|
|
118
|
-
}, {
|
|
119
119
|
key: "render",
|
|
120
120
|
value: function render() {
|
|
121
121
|
var _this$props = this.props,
|