@samitouri / QOS-React / commits / 9604d26aec

Rename ReactDOMFiber* to ReactDOM* (#13540)

Dan Abramov committed Sep 3, 2018 at 01:45 UTC 9604d26aec9f6e0ab38b63fc4a92f48b639ee1f3
8 files changed +40 -40
packages/react-dom/src/client/ReactDOM.js
+1 -1
@@ -36,7 +36,7 @@ import lowPriorityWarning from 'shared/lowPriorityWarning';
36 import warningWithoutStack from 'shared/warningWithoutStack';
37
38 import * as ReactDOMComponentTree from './ReactDOMComponentTree';
39 -import {restoreControlledState} from './ReactDOMFiberComponent';
39 +import {restoreControlledState} from './ReactDOMComponent';
40 import * as ReactDOMEventListener from '../events/ReactDOMEventListener';
41 import {
42 ELEMENT_NODE,
packages/react-dom/src/client/ReactDOMComponent.js renamed
+37 -37
@@ -14,10 +14,10 @@ import warning from 'shared/warning';
14 import warningWithoutStack from 'shared/warningWithoutStack';
15
16 import * as DOMPropertyOperations from './DOMPropertyOperations';
17 -import * as ReactDOMFiberInput from './ReactDOMFiberInput';
18 -import * as ReactDOMFiberOption from './ReactDOMFiberOption';
19 -import * as ReactDOMFiberSelect from './ReactDOMFiberSelect';
20 -import * as ReactDOMFiberTextarea from './ReactDOMFiberTextarea';
17 +import * as ReactDOMInput from './ReactDOMInput';
18 +import * as ReactDOMOption from './ReactDOMOption';
19 +import * as ReactDOMSelect from './ReactDOMSelect';
20 +import * as ReactDOMTextarea from './ReactDOMTextarea';
21 import * as inputValueTracking from './inputValueTracking';
22 import setInnerHTML from './setInnerHTML';
23 import setTextContent from './setTextContent';
@@ -491,28 +491,28 @@ export function setInitialProperties(
491 props = rawProps;
492 break;
493 case 'input':
494 - ReactDOMFiberInput.initWrapperState(domElement, rawProps);
495 - props = ReactDOMFiberInput.getHostProps(domElement, rawProps);
494 + ReactDOMInput.initWrapperState(domElement, rawProps);
495 + props = ReactDOMInput.getHostProps(domElement, rawProps);
496 trapBubbledEvent(TOP_INVALID, domElement);
497 // For controlled components we always need to ensure we're listening
498 // to onChange. Even if there is no listener.
499 ensureListeningTo(rootContainerElement, 'onChange');
500 break;
501 case 'option':
502 - ReactDOMFiberOption.validateProps(domElement, rawProps);
503 - props = ReactDOMFiberOption.getHostProps(domElement, rawProps);
502 + ReactDOMOption.validateProps(domElement, rawProps);
503 + props = ReactDOMOption.getHostProps(domElement, rawProps);
504 break;
505 case 'select':
506 - ReactDOMFiberSelect.initWrapperState(domElement, rawProps);
507 - props = ReactDOMFiberSelect.getHostProps(domElement, rawProps);
506 + ReactDOMSelect.initWrapperState(domElement, rawProps);
507 + props = ReactDOMSelect.getHostProps(domElement, rawProps);
508 trapBubbledEvent(TOP_INVALID, domElement);
509 // For controlled components we always need to ensure we're listening
510 // to onChange. Even if there is no listener.
511 ensureListeningTo(rootContainerElement, 'onChange');
512 break;
513 case 'textarea':
514 - ReactDOMFiberTextarea.initWrapperState(domElement, rawProps);
515 - props = ReactDOMFiberTextarea.getHostProps(domElement, rawProps);
514 + ReactDOMTextarea.initWrapperState(domElement, rawProps);
515 + props = ReactDOMTextarea.getHostProps(domElement, rawProps);
516 trapBubbledEvent(TOP_INVALID, domElement);
517 // For controlled components we always need to ensure we're listening
518 // to onChange. Even if there is no listener.
@@ -537,19 +537,19 @@ export function setInitialProperties(
537 // TODO: Make sure we check if this is still unmounted or do any clean
538 // up necessary since we never stop tracking anymore.
539 inputValueTracking.track((domElement: any));
540 - ReactDOMFiberInput.postMountWrapper(domElement, rawProps, false);
540 + ReactDOMInput.postMountWrapper(domElement, rawProps, false);
541 break;
542 case 'textarea':
543 // TODO: Make sure we check if this is still unmounted or do any clean
544 // up necessary since we never stop tracking anymore.
545 inputValueTracking.track((domElement: any));
546 - ReactDOMFiberTextarea.postMountWrapper(domElement, rawProps);
546 + ReactDOMTextarea.postMountWrapper(domElement, rawProps);
547 break;
548 case 'option':
549 - ReactDOMFiberOption.postMountWrapper(domElement, rawProps);
549 + ReactDOMOption.postMountWrapper(domElement, rawProps);
550 break;
551 case 'select':
552 - ReactDOMFiberSelect.postMountWrapper(domElement, rawProps);
552 + ReactDOMSelect.postMountWrapper(domElement, rawProps);
553 break;
554 default:
555 if (typeof props.onClick === 'function') {
@@ -578,23 +578,23 @@ export function diffProperties(
578 let nextProps: Object;
579 switch (tag) {
580 case 'input':
581 - lastProps = ReactDOMFiberInput.getHostProps(domElement, lastRawProps);
582 - nextProps = ReactDOMFiberInput.getHostProps(domElement, nextRawProps);
581 + lastProps = ReactDOMInput.getHostProps(domElement, lastRawProps);
582 + nextProps = ReactDOMInput.getHostProps(domElement, nextRawProps);
583 updatePayload = [];
584 break;
585 case 'option':
586 - lastProps = ReactDOMFiberOption.getHostProps(domElement, lastRawProps);
587 - nextProps = ReactDOMFiberOption.getHostProps(domElement, nextRawProps);
586 + lastProps = ReactDOMOption.getHostProps(domElement, lastRawProps);
587 + nextProps = ReactDOMOption.getHostProps(domElement, nextRawProps);
588 updatePayload = [];
589 break;
590 case 'select':
591 - lastProps = ReactDOMFiberSelect.getHostProps(domElement, lastRawProps);
592 - nextProps = ReactDOMFiberSelect.getHostProps(domElement, nextRawProps);
591 + lastProps = ReactDOMSelect.getHostProps(domElement, lastRawProps);
592 + nextProps = ReactDOMSelect.getHostProps(domElement, nextRawProps);
593 updatePayload = [];
594 break;
595 case 'textarea':
596 - lastProps = ReactDOMFiberTextarea.getHostProps(domElement, lastRawProps);
597 - nextProps = ReactDOMFiberTextarea.getHostProps(domElement, nextRawProps);
596 + lastProps = ReactDOMTextarea.getHostProps(domElement, lastRawProps);
597 + nextProps = ReactDOMTextarea.getHostProps(domElement, nextRawProps);
598 updatePayload = [];
599 break;
600 default:
@@ -773,7 +773,7 @@ export function updateProperties(
773 nextRawProps.type === 'radio' &&
774 nextRawProps.name != null
775 ) {
776 - ReactDOMFiberInput.updateChecked(domElement, nextRawProps);
776 + ReactDOMInput.updateChecked(domElement, nextRawProps);
777 }
778
779 const wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
@@ -793,15 +793,15 @@ export function updateProperties(
793 // Update the wrapper around inputs *after* updating props. This has to
794 // happen after `updateDOMProperties`. Otherwise HTML5 input validations
795 // raise warnings and prevent the new value from being assigned.
796 - ReactDOMFiberInput.updateWrapper(domElement, nextRawProps);
796 + ReactDOMInput.updateWrapper(domElement, nextRawProps);
797 break;
798 case 'textarea':
799 - ReactDOMFiberTextarea.updateWrapper(domElement, nextRawProps);
799 + ReactDOMTextarea.updateWrapper(domElement, nextRawProps);
800 break;
801 case 'select':
802 // <select> value update needs to occur after <option> children
803 // reconciliation
804 - ReactDOMFiberSelect.postUpdateWrapper(domElement, nextRawProps);
804 + ReactDOMSelect.postUpdateWrapper(domElement, nextRawProps);
805 break;
806 }
807 }
@@ -876,24 +876,24 @@ export function diffHydratedProperties(
876 trapBubbledEvent(TOP_TOGGLE, domElement);
877 break;
878 case 'input':
879 - ReactDOMFiberInput.initWrapperState(domElement, rawProps);
879 + ReactDOMInput.initWrapperState(domElement, rawProps);
880 trapBubbledEvent(TOP_INVALID, domElement);
881 // For controlled components we always need to ensure we're listening
882 // to onChange. Even if there is no listener.
883 ensureListeningTo(rootContainerElement, 'onChange');
884 break;
885 case 'option':
886 - ReactDOMFiberOption.validateProps(domElement, rawProps);
886 + ReactDOMOption.validateProps(domElement, rawProps);
887 break;
888 case 'select':
889 - ReactDOMFiberSelect.initWrapperState(domElement, rawProps);
889 + ReactDOMSelect.initWrapperState(domElement, rawProps);
890 trapBubbledEvent(TOP_INVALID, domElement);
891 // For controlled components we always need to ensure we're listening
892 // to onChange. Even if there is no listener.
893 ensureListeningTo(rootContainerElement, 'onChange');
894 break;
895 case 'textarea':
896 - ReactDOMFiberTextarea.initWrapperState(domElement, rawProps);
896 + ReactDOMTextarea.initWrapperState(domElement, rawProps);
897 trapBubbledEvent(TOP_INVALID, domElement);
898 // For controlled components we always need to ensure we're listening
899 // to onChange. Even if there is no listener.
@@ -1087,13 +1087,13 @@ export function diffHydratedProperties(
1087 // TODO: Make sure we check if this is still unmounted or do any clean
1088 // up necessary since we never stop tracking anymore.
1089 inputValueTracking.track((domElement: any));
1090 - ReactDOMFiberInput.postMountWrapper(domElement, rawProps, true);
1090 + ReactDOMInput.postMountWrapper(domElement, rawProps, true);
1091 break;
1092 case 'textarea':
1093 // TODO: Make sure we check if this is still unmounted or do any clean
1094 // up necessary since we never stop tracking anymore.
1095 inputValueTracking.track((domElement: any));
1096 - ReactDOMFiberTextarea.postMountWrapper(domElement, rawProps);
1096 + ReactDOMTextarea.postMountWrapper(domElement, rawProps);
1097 break;
1098 case 'select':
1099 case 'option':
@@ -1212,13 +1212,13 @@ export function restoreControlledState(
1212 ): void {
1213 switch (tag) {
1214 case 'input':
1215 - ReactDOMFiberInput.restoreControlledState(domElement, props);
1215 + ReactDOMInput.restoreControlledState(domElement, props);
1216 return;
1217 case 'textarea':
1218 - ReactDOMFiberTextarea.restoreControlledState(domElement, props);
1218 + ReactDOMTextarea.restoreControlledState(domElement, props);
1219 return;
1220 case 'select':
1221 - ReactDOMFiberSelect.restoreControlledState(domElement, props);
1221 + ReactDOMSelect.restoreControlledState(domElement, props);
1222 return;
1223 }
1224 }
packages/react-dom/src/client/ReactDOMHostConfig.js
+1 -1
@@ -22,7 +22,7 @@ import {
22 warnForDeletedHydratableText,
23 warnForInsertedHydratedElement,
24 warnForInsertedHydratedText,
25 -} from './ReactDOMFiberComponent';
25 +} from './ReactDOMComponent';
26 import * as ReactInputSelection from './ReactInputSelection';
27 import setTextContent from './setTextContent';
28 import {validateDOMNesting, updatedAncestorInfo} from './validateDOMNesting';
packages/react-dom/src/client/ReactDOMInput.js renamed
packages/react-dom/src/client/ReactDOMOption.js renamed
packages/react-dom/src/client/ReactDOMSelect.js renamed
packages/react-dom/src/client/ReactDOMTextarea.js renamed
packages/react-dom/src/events/ChangeEventPlugin.js
+1 -1
@@ -27,7 +27,7 @@ import getEventTarget from './getEventTarget';
27 import isEventSupported from './isEventSupported';
28 import {getNodeFromInstance} from '../client/ReactDOMComponentTree';
29 import * as inputValueTracking from '../client/inputValueTracking';
30 -import {setDefaultValue} from '../client/ReactDOMFiberInput';
30 +import {setDefaultValue} from '../client/ReactDOMInput';
31
32 const eventTypes = {
33 change: {