mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
RN: Remove fbjs/{keyMirror,keyOf} Dependencies
Summary: Removes `fbjs/keyMirror` and `fbjs/keyOf` call sites from React Native. Changelog: [Internal] Reviewed By: cpojer Differential Revision: D22438238 fbshipit-source-id: 0f84b6e9d81811f95a2a24886f38ad16b8e6e74f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
1930039261
commit
ae193942fe
@@ -21,7 +21,6 @@ const UIManager = require('../../ReactNative/UIManager');
|
||||
const View = require('../View/View');
|
||||
const SoundManager = require('../Sound/SoundManager');
|
||||
|
||||
const keyMirror = require('fbjs/lib/keyMirror');
|
||||
const normalizeColor = require('../../StyleSheet/normalizeColor');
|
||||
|
||||
import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
|
||||
@@ -129,16 +128,16 @@ const extractSingleTouch = nativeEvent => {
|
||||
* Touchable states.
|
||||
*/
|
||||
|
||||
const States = keyMirror({
|
||||
NOT_RESPONDER: null, // Not the responder
|
||||
RESPONDER_INACTIVE_PRESS_IN: null, // Responder, inactive, in the `PressRect`
|
||||
RESPONDER_INACTIVE_PRESS_OUT: null, // Responder, inactive, out of `PressRect`
|
||||
RESPONDER_ACTIVE_PRESS_IN: null, // Responder, active, in the `PressRect`
|
||||
RESPONDER_ACTIVE_PRESS_OUT: null, // Responder, active, out of `PressRect`
|
||||
RESPONDER_ACTIVE_LONG_PRESS_IN: null, // Responder, active, in the `PressRect`, after long press threshold
|
||||
RESPONDER_ACTIVE_LONG_PRESS_OUT: null, // Responder, active, out of `PressRect`, after long press threshold
|
||||
ERROR: null,
|
||||
});
|
||||
const States = {
|
||||
NOT_RESPONDER: 'NOT_RESPONDER', // Not the responder
|
||||
RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN', // Responder, inactive, in the `PressRect`
|
||||
RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT', // Responder, inactive, out of `PressRect`
|
||||
RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN', // Responder, active, in the `PressRect`
|
||||
RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT', // Responder, active, out of `PressRect`
|
||||
RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN', // Responder, active, in the `PressRect`, after long press threshold
|
||||
RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT', // Responder, active, out of `PressRect`, after long press threshold
|
||||
ERROR: 'ERROR',
|
||||
};
|
||||
|
||||
type State =
|
||||
| typeof States.NOT_RESPONDER
|
||||
@@ -190,15 +189,15 @@ const IsLongPressingIn = {
|
||||
/**
|
||||
* Inputs to the state machine.
|
||||
*/
|
||||
const Signals = keyMirror({
|
||||
DELAY: null,
|
||||
RESPONDER_GRANT: null,
|
||||
RESPONDER_RELEASE: null,
|
||||
RESPONDER_TERMINATED: null,
|
||||
ENTER_PRESS_RECT: null,
|
||||
LEAVE_PRESS_RECT: null,
|
||||
LONG_PRESS_DETECTED: null,
|
||||
});
|
||||
const Signals = {
|
||||
DELAY: 'DELAY',
|
||||
RESPONDER_GRANT: 'RESPONDER_GRANT',
|
||||
RESPONDER_RELEASE: 'RESPONDER_RELEASE',
|
||||
RESPONDER_TERMINATED: 'RESPONDER_TERMINATED',
|
||||
ENTER_PRESS_RECT: 'ENTER_PRESS_RECT',
|
||||
LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT',
|
||||
LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED',
|
||||
};
|
||||
|
||||
type Signal =
|
||||
| typeof Signals.DELAY
|
||||
|
||||
@@ -15,7 +15,6 @@ const TaskQueue = require('./TaskQueue');
|
||||
|
||||
const infoLog = require('../Utilities/infoLog');
|
||||
const invariant = require('invariant');
|
||||
const keyMirror = require('fbjs/lib/keyMirror');
|
||||
|
||||
import EventEmitter from '../vendor/emitter/EventEmitter';
|
||||
|
||||
@@ -77,10 +76,10 @@ const DEBUG: false = false;
|
||||
* from executing, making apps more responsive.
|
||||
*/
|
||||
const InteractionManager = {
|
||||
Events: keyMirror({
|
||||
interactionStart: true,
|
||||
interactionComplete: true,
|
||||
}),
|
||||
Events: {
|
||||
interactionStart: 'interactionStart',
|
||||
interactionComplete: 'interactionComplete',
|
||||
},
|
||||
|
||||
/**
|
||||
* Schedule a function to run after all interactions have completed. Returns a cancellable
|
||||
|
||||
@@ -9,11 +9,9 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const keyOf = require('fbjs/lib/keyOf');
|
||||
|
||||
const X_DIM = keyOf({x: null});
|
||||
const Y_DIM = keyOf({y: null});
|
||||
const Z_DIM = keyOf({z: null});
|
||||
const X_DIM = 'x';
|
||||
const Y_DIM = 'y';
|
||||
const Z_DIM = 'z';
|
||||
|
||||
const InitialOperationField = {
|
||||
transformTranslate: [0, 0, 0],
|
||||
|
||||
Reference in New Issue
Block a user