From 8ff0380dc485292343ebc3028d77af60db8550e9 Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Mon, 12 Sep 2016 10:58:28 +0800 Subject: [PATCH] Updates --- examples/common.css | 14 +- examples/common.css.map | 2 +- examples/common.js | 4175 +++++++++++++++++--------------- examples/common.js.map | 2 +- examples/custom-handles.html | 4 +- examples/custom-handles.js | 4 +- examples/custom-handles.js.map | 2 +- examples/marks.html | 4 +- examples/marks.js | 8 +- examples/marks.js.map | 2 +- examples/range.html | 4 +- examples/range.js | 8 +- examples/range.js.map | 2 +- examples/slider.html | 4 +- examples/slider.js | 8 +- examples/slider.js.map | 2 +- examples/v-marks.html | 4 +- examples/v-marks.js | 8 +- examples/v-marks.js.map | 2 +- examples/v-range.html | 4 +- examples/v-range.js | 8 +- examples/v-range.js.map | 2 +- examples/v-slider.html | 4 +- examples/v-slider.js | 8 +- examples/v-slider.js.map | 2 +- index.html | 4 +- 26 files changed, 2223 insertions(+), 2068 deletions(-) diff --git a/examples/common.css b/examples/common.css index c51dfae..1f391a6 100644 --- a/examples/common.css +++ b/examples/common.css @@ -232,7 +232,7 @@ transform: scale(0, 0); } } -.rc-tooltip { +.rc-slider-tooltip { position: absolute; left: -9999px; top: -9999px; @@ -240,17 +240,17 @@ box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } -.rc-tooltip * { +.rc-slider-tooltip * { box-sizing: border-box; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } -.rc-tooltip-hidden { +.rc-slider-tooltip-hidden { display: none; } -.rc-tooltip-placement-top { +.rc-slider-tooltip-placement-top { padding: 4px 0 8px 0; } -.rc-tooltip-inner { +.rc-slider-tooltip-inner { padding: 6px 2px; min-width: 24px; height: 24px; @@ -263,14 +263,14 @@ border-radius: 6px; box-shadow: 0 0 4px #d9d9d9; } -.rc-tooltip-arrow { +.rc-slider-tooltip-arrow { position: absolute; width: 0; height: 0; border-color: transparent; border-style: solid; } -.rc-tooltip-placement-top .rc-tooltip-arrow { +.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow { bottom: 4px; left: 50%; margin-left: -4px; diff --git a/examples/common.css.map b/examples/common.css.map index f2609ed..cfce05d 100644 --- a/examples/common.css.map +++ b/examples/common.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///./assets/index.less","webpack:///index.less"],"names":[],"mappings":"AAuBA;EACE;EACA;EACA;EACA;EACA;EAdA;EACA;CCPD;ADeD;EALI;EACA;CCPH;ADoBC;EACE;EACA;EACA;EACA;EACA;CClBH;ADqBC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CCnBH;ADqBG;EACE;CCnBL;ADsBK;EACE;EACA;CCpBP;ADyBC;EACE;EACA;EACA;EACA;EACA;CCvBH;AD0BC;EACE;EACA;EACA;EACA;EACA;EACA;CCxBH;AD0BG;EACE;CCxBL;AD4BC;EACE;EACA;EACA;EACA;CC1BH;AD6BC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CC3BH;AD4BG;EACE;CC1BL;AD4BG;EACE;CC1BL;AD4BG;EACE;CC1BL;AD8BC;EACE;CC5BH;AD2BC;EAII;CC5BL;ADwBC;;EAQI;EACA;EACA;CC5BL;ADkBC;;EAcI;CC5BL;ADiCD;EACE;EACA;CC/BD;ADiCG;EACE;EACA;CC/BL;ADkCG;EACE;EACA;EACA;CChCL;ADmCG;EACE;EACA;EACA;CCjCL;ADoCG;EACE;EACA;CClCL;ADqCG;EACE;EACA;CCnCL;ADoCK;EACE;CClCP;ADoCK;EACE;CClCP;AD+CC;;EANA;UAAA;EACA;UAAA;EACA;EAME;UAAA;CC1CH;AD4CC;EAVA;UAAA;EACA;UAAA;EACA;EAUE;UAAA;CCxCH;AD0CC;;EACE;UAAA;EACA;UAAA;CCvCH;ADyCC;EACE;UAAA;EACA;UAAA;CCvCH;AD4CC;;EACE;UAAA;EACA;UAAA;CCzCH;AD2CC;EACE;UAAA;CCzCH;AD8CD;EACE;IACE;IACA;YAAA;IACA;YAAA;GC5CD;ED8CD;IACE;YAAA;IACA;YAAA;GC5CD;CACF;ADmCD;EACE;IACE;IACA;YAAA;IACA;YAAA;GC5CD;ED8CD;IACE;YAAA;IACA;YAAA;GC5CD;CACF;AD+CD;EACE;IACE;YAAA;IACA;YAAA;GC7CD;ED+CD;IACE;IACA;YAAA;IACA;YAAA;GC7CD;CACF;ADoCD;EACE;IACE;YAAA;IACA;YAAA;GC7CD;ED+CD;IACE;IACA;YAAA;IACA;YAAA;GC7CD;CACF;ADgDD;EACE;EACA;EACA;EACA;EA5NA;EACA;CC+KD;ADwCD;EApNI;EACA;CC+KH;AD4CC;EACE;CC1CH;AD6CC;EACE;CC3CH;AD8CC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CC5CH;AD+CC;EACE;EACA;EACA;EACA;EACA;CC7CH;ADgDC;EACE;EACA;EACA;EACA;EACA;CC9CH","file":"common.css","sourcesContent":["@prefixClass: rc-slider;\n\n@disabledColor: #ccc;\n@border-radius-base: 6px;\n@primary-color: #2db7f5;\n@tooltip-color: #fff;\n@tooltip-bg: tint(#666, 4%);\n@tooltip-arrow-width: 4px;\n@tooltip-distance: @tooltip-arrow-width+4;\n@tooltip-arrow-color: @tooltip-bg;\n@ease-out-quint : cubic-bezier(0.23, 1, 0.32, 1);\n@ease-in-quint : cubic-bezier(0.755, 0.05, 0.855, 0.06);\n\n.borderBox() {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // remove tap highlight color for mobile safari\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // remove tap highlight color for mobile safari\n }\n}\n\n.@{prefixClass} {\n position: relative;\n height: 4px;\n width: 100%;\n border-radius: @border-radius-base;\n background-color: #e9e9e9;\n\n .borderBox();\n\n &-track {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: @border-radius-base;\n background-color: tint(@primary-color, 60%);\n }\n\n &-handle {\n position: absolute;\n margin-left: -7px;\n margin-top: -5px;\n width: 14px;\n height: 14px;\n cursor: pointer;\n border-radius: 50%;\n border: solid 2px tint(@primary-color, 50%);\n background-color: #fff;\n\n &:hover {\n border-color: tint(@primary-color, 20%);\n }\n &-active {\n &:active {\n border-color: tint(@primary-color, 20%);\n box-shadow: 0 0 5px tint(@primary-color, 20%);\n }\n }\n }\n\n &-mark {\n position: absolute;\n top: 10px;\n left: 0;\n width: 100%;\n font-size: 12px;\n }\n\n &-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: #999;\n\n &-active {\n color: #666;\n }\n }\n\n &-step {\n position: absolute;\n width: 100%;\n height: 4px;\n background: transparent;\n }\n\n &-dot {\n position: absolute;\n bottom: -2px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: 2px solid #e9e9e9;\n background-color: #fff;\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n &:first-child {\n margin-left: -4px;\n }\n &:last-child {\n margin-left: -4px;\n }\n &-active {\n border-color: tint(@primary-color, 50%);\n }\n }\n\n &-disabled {\n background-color: #e9e9e9;\n\n .@{prefixClass}-track {\n background-color: @disabledColor;\n }\n\n .@{prefixClass}-handle, .@{prefixClass}-dot {\n border-color: @disabledColor;\n background-color: #fff;\n cursor: not-allowed;\n }\n\n .@{prefixClass}-mark-text, .@{prefixClass}-dot {\n cursor: not-allowed!important;\n }\n }\n}\n\n.@{prefixClass}-vertical {\n width: 4px;\n height: 100%;\n .@{prefixClass} {\n &-track {\n bottom: 0;\n width: 4px;\n }\n\n &-handle {\n position: absolute;\n margin-left: -5px;\n margin-bottom: -7px;\n }\n\n &-mark {\n top: 0;\n left: 10px;\n height: 100%;\n }\n\n &-step {\n height: 100%;\n width: 4px;\n }\n\n &-dot {\n left: 2px;\n margin-bottom: -4px;\n &:first-child {\n margin-bottom: -4px;\n }\n &:last-child {\n margin-bottom: -4px;\n }\n }\n }\n}\n\n.motion-common() {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n}\n\n.make-motion(@className, @keyframeName) {\n .@{className}-enter, .@{className}-appear {\n .motion-common();\n animation-play-state: paused;\n }\n .@{className}-leave {\n .motion-common();\n animation-play-state: paused;\n }\n .@{className}-enter.@{className}-enter-active, .@{className}-appear.@{className}-appear-active {\n animation-name: ~\"@{keyframeName}In\";\n animation-play-state: running;\n }\n .@{className}-leave.@{className}-leave-active {\n animation-name: ~\"@{keyframeName}Out\";\n animation-play-state: running;\n }\n}\n.zoom-motion(@className, @keyframeName) {\n .make-motion(@className, @keyframeName);\n .@{className}-enter, .@{className}-appear {\n transform: scale(0, 0); // need this by yiminghe\n animation-timing-function: @ease-out-quint;\n }\n .@{className}-leave {\n animation-timing-function: @ease-in-quint;\n }\n}\n.zoom-motion(rc-slider-tooltip-zoom-down, rcSliderTooltipZoomDown);\n\n@keyframes rcSliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n}\n\n@keyframes rcSliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n}\n\n.rc-tooltip {\n position: absolute;\n left: -9999px;\n top: -9999px;\n visibility: visible;\n\n .borderBox();\n\n &-hidden {\n display: none;\n }\n\n &-placement-top {\n padding: @tooltip-arrow-width 0 @tooltip-distance 0;\n }\n\n &-inner {\n padding: 6px 2px;\n min-width: 24px;\n height: 24px;\n font-size: 12px;\n line-height: 1;\n color: @tooltip-color;\n text-align: center;\n text-decoration: none;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n box-shadow: 0 0 4px #d9d9d9;\n }\n\n &-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n\n &-placement-top &-arrow {\n bottom: @tooltip-distance - @tooltip-arrow-width;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./assets/index.less\n **/",".rc-slider {\n position: relative;\n height: 4px;\n width: 100%;\n border-radius: 6px;\n background-color: #e9e9e9;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-track {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: 6px;\n background-color: #abe2fb;\n}\n.rc-slider-handle {\n position: absolute;\n margin-left: -7px;\n margin-top: -5px;\n width: 14px;\n height: 14px;\n cursor: pointer;\n border-radius: 50%;\n border: solid 2px #96dbfa;\n background-color: #fff;\n}\n.rc-slider-handle:hover {\n border-color: #57c5f7;\n}\n.rc-slider-handle-active:active {\n border-color: #57c5f7;\n box-shadow: 0 0 5px #57c5f7;\n}\n.rc-slider-mark {\n position: absolute;\n top: 10px;\n left: 0;\n width: 100%;\n font-size: 12px;\n}\n.rc-slider-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: #999;\n}\n.rc-slider-mark-text-active {\n color: #666;\n}\n.rc-slider-step {\n position: absolute;\n width: 100%;\n height: 4px;\n background: transparent;\n}\n.rc-slider-dot {\n position: absolute;\n bottom: -2px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: 2px solid #e9e9e9;\n background-color: #fff;\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n}\n.rc-slider-dot:first-child {\n margin-left: -4px;\n}\n.rc-slider-dot:last-child {\n margin-left: -4px;\n}\n.rc-slider-dot-active {\n border-color: #96dbfa;\n}\n.rc-slider-disabled {\n background-color: #e9e9e9;\n}\n.rc-slider-disabled .rc-slider-track {\n background-color: #ccc;\n}\n.rc-slider-disabled .rc-slider-handle,\n.rc-slider-disabled .rc-slider-dot {\n border-color: #ccc;\n background-color: #fff;\n cursor: not-allowed;\n}\n.rc-slider-disabled .rc-slider-mark-text,\n.rc-slider-disabled .rc-slider-dot {\n cursor: not-allowed !important;\n}\n.rc-slider-vertical {\n width: 4px;\n height: 100%;\n}\n.rc-slider-vertical .rc-slider-track {\n bottom: 0;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-handle {\n position: absolute;\n margin-left: -5px;\n margin-bottom: -7px;\n}\n.rc-slider-vertical .rc-slider-mark {\n top: 0;\n left: 10px;\n height: 100%;\n}\n.rc-slider-vertical .rc-slider-step {\n height: 100%;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-dot {\n left: 2px;\n margin-bottom: -4px;\n}\n.rc-slider-vertical .rc-slider-dot:first-child {\n margin-bottom: -4px;\n}\n.rc-slider-vertical .rc-slider-dot:last-child {\n margin-bottom: -4px;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-leave {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,\n.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {\n animation-name: rcSliderTooltipZoomDownIn;\n animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {\n animation-name: rcSliderTooltipZoomDownOut;\n animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n transform: scale(0, 0);\n animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\n}\n.rc-slider-tooltip-zoom-down-leave {\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n}\n@keyframes rcSliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n}\n@keyframes rcSliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n}\n.rc-tooltip {\n position: absolute;\n left: -9999px;\n top: -9999px;\n visibility: visible;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-tooltip * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-tooltip-hidden {\n display: none;\n}\n.rc-tooltip-placement-top {\n padding: 4px 0 8px 0;\n}\n.rc-tooltip-inner {\n padding: 6px 2px;\n min-width: 24px;\n height: 24px;\n font-size: 12px;\n line-height: 1;\n color: #fff;\n text-align: center;\n text-decoration: none;\n background-color: #6c6c6c;\n border-radius: 6px;\n box-shadow: 0 0 4px #d9d9d9;\n}\n.rc-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.rc-tooltip-placement-top .rc-tooltip-arrow {\n bottom: 4px;\n left: 50%;\n margin-left: -4px;\n border-width: 4px 4px 0;\n border-top-color: #6c6c6c;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** index.less\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///./assets/index.less","webpack:///index.less"],"names":[],"mappings":"AAuBA;EACE;EACA;EACA;EACA;EACA;EAdA;EACA;CCPD;ADeD;EALI;EACA;CCPH;ADoBC;EACE;EACA;EACA;EACA;EACA;CClBH;ADqBC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CCnBH;ADqBG;EACE;CCnBL;ADsBK;EACE;EACA;CCpBP;ADyBC;EACE;EACA;EACA;EACA;EACA;CCvBH;AD0BC;EACE;EACA;EACA;EACA;EACA;EACA;CCxBH;AD0BG;EACE;CCxBL;AD4BC;EACE;EACA;EACA;EACA;CC1BH;AD6BC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CC3BH;AD4BG;EACE;CC1BL;AD4BG;EACE;CC1BL;AD4BG;EACE;CC1BL;AD8BC;EACE;CC5BH;AD2BC;EAII;CC5BL;ADwBC;;EAQI;EACA;EACA;CC5BL;ADkBC;;EAcI;CC5BL;ADiCD;EACE;EACA;CC/BD;ADiCG;EACE;EACA;CC/BL;ADkCG;EACE;EACA;EACA;CChCL;ADmCG;EACE;EACA;EACA;CCjCL;ADoCG;EACE;EACA;CClCL;ADqCG;EACE;EACA;CCnCL;ADoCK;EACE;CClCP;ADoCK;EACE;CClCP;AD+CC;;EANA;UAAA;EACA;UAAA;EACA;EAME;UAAA;CC1CH;AD4CC;EAVA;UAAA;EACA;UAAA;EACA;EAUE;UAAA;CCxCH;AD0CC;;EACE;UAAA;EACA;UAAA;CCvCH;ADyCC;EACE;UAAA;EACA;UAAA;CCvCH;AD4CC;;EACE;UAAA;EACA;UAAA;CCzCH;AD2CC;EACE;UAAA;CCzCH;AD8CD;EACE;IACE;IACA;YAAA;IACA;YAAA;GC5CD;ED8CD;IACE;YAAA;IACA;YAAA;GC5CD;CACF;ADmCD;EACE;IACE;IACA;YAAA;IACA;YAAA;GC5CD;ED8CD;IACE;YAAA;IACA;YAAA;GC5CD;CACF;AD+CD;EACE;IACE;YAAA;IACA;YAAA;GC7CD;ED+CD;IACE;IACA;YAAA;IACA;YAAA;GC7CD;CACF;ADoCD;EACE;IACE;YAAA;IACA;YAAA;GC7CD;ED+CD;IACE;IACA;YAAA;IACA;YAAA;GC7CD;CACF;ADgDD;EACE;EACA;EACA;EACA;EA5NA;EACA;CC+KD;ADwCD;EApNI;EACA;CC+KH;AD4CC;EACE;CC1CH;AD6CC;EACE;CC3CH;AD8CC;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CC5CH;AD+CC;EACE;EACA;EACA;EACA;EACA;CC7CH;ADgDC;EACE;EACA;EACA;EACA;EACA;CC9CH","file":"common.css","sourcesContent":["@prefixClass: rc-slider;\n\n@disabledColor: #ccc;\n@border-radius-base: 6px;\n@primary-color: #2db7f5;\n@tooltip-color: #fff;\n@tooltip-bg: tint(#666, 4%);\n@tooltip-arrow-width: 4px;\n@tooltip-distance: @tooltip-arrow-width+4;\n@tooltip-arrow-color: @tooltip-bg;\n@ease-out-quint : cubic-bezier(0.23, 1, 0.32, 1);\n@ease-in-quint : cubic-bezier(0.755, 0.05, 0.855, 0.06);\n\n.borderBox() {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // remove tap highlight color for mobile safari\n\n * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0); // remove tap highlight color for mobile safari\n }\n}\n\n.@{prefixClass} {\n position: relative;\n height: 4px;\n width: 100%;\n border-radius: @border-radius-base;\n background-color: #e9e9e9;\n\n .borderBox();\n\n &-track {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: @border-radius-base;\n background-color: tint(@primary-color, 60%);\n }\n\n &-handle {\n position: absolute;\n margin-left: -7px;\n margin-top: -5px;\n width: 14px;\n height: 14px;\n cursor: pointer;\n border-radius: 50%;\n border: solid 2px tint(@primary-color, 50%);\n background-color: #fff;\n\n &:hover {\n border-color: tint(@primary-color, 20%);\n }\n &-active {\n &:active {\n border-color: tint(@primary-color, 20%);\n box-shadow: 0 0 5px tint(@primary-color, 20%);\n }\n }\n }\n\n &-mark {\n position: absolute;\n top: 10px;\n left: 0;\n width: 100%;\n font-size: 12px;\n }\n\n &-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: #999;\n\n &-active {\n color: #666;\n }\n }\n\n &-step {\n position: absolute;\n width: 100%;\n height: 4px;\n background: transparent;\n }\n\n &-dot {\n position: absolute;\n bottom: -2px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: 2px solid #e9e9e9;\n background-color: #fff;\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n &:first-child {\n margin-left: -4px;\n }\n &:last-child {\n margin-left: -4px;\n }\n &-active {\n border-color: tint(@primary-color, 50%);\n }\n }\n\n &-disabled {\n background-color: #e9e9e9;\n\n .@{prefixClass}-track {\n background-color: @disabledColor;\n }\n\n .@{prefixClass}-handle, .@{prefixClass}-dot {\n border-color: @disabledColor;\n background-color: #fff;\n cursor: not-allowed;\n }\n\n .@{prefixClass}-mark-text, .@{prefixClass}-dot {\n cursor: not-allowed!important;\n }\n }\n}\n\n.@{prefixClass}-vertical {\n width: 4px;\n height: 100%;\n .@{prefixClass} {\n &-track {\n bottom: 0;\n width: 4px;\n }\n\n &-handle {\n position: absolute;\n margin-left: -5px;\n margin-bottom: -7px;\n }\n\n &-mark {\n top: 0;\n left: 10px;\n height: 100%;\n }\n\n &-step {\n height: 100%;\n width: 4px;\n }\n\n &-dot {\n left: 2px;\n margin-bottom: -4px;\n &:first-child {\n margin-bottom: -4px;\n }\n &:last-child {\n margin-bottom: -4px;\n }\n }\n }\n}\n\n.motion-common() {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n}\n\n.make-motion(@className, @keyframeName) {\n .@{className}-enter, .@{className}-appear {\n .motion-common();\n animation-play-state: paused;\n }\n .@{className}-leave {\n .motion-common();\n animation-play-state: paused;\n }\n .@{className}-enter.@{className}-enter-active, .@{className}-appear.@{className}-appear-active {\n animation-name: ~\"@{keyframeName}In\";\n animation-play-state: running;\n }\n .@{className}-leave.@{className}-leave-active {\n animation-name: ~\"@{keyframeName}Out\";\n animation-play-state: running;\n }\n}\n.zoom-motion(@className, @keyframeName) {\n .make-motion(@className, @keyframeName);\n .@{className}-enter, .@{className}-appear {\n transform: scale(0, 0); // need this by yiminghe\n animation-timing-function: @ease-out-quint;\n }\n .@{className}-leave {\n animation-timing-function: @ease-in-quint;\n }\n}\n.zoom-motion(rc-slider-tooltip-zoom-down, rcSliderTooltipZoomDown);\n\n@keyframes rcSliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n}\n\n@keyframes rcSliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n}\n\n.@{prefixClass}-tooltip {\n position: absolute;\n left: -9999px;\n top: -9999px;\n visibility: visible;\n\n .borderBox();\n\n &-hidden {\n display: none;\n }\n\n &-placement-top {\n padding: @tooltip-arrow-width 0 @tooltip-distance 0;\n }\n\n &-inner {\n padding: 6px 2px;\n min-width: 24px;\n height: 24px;\n font-size: 12px;\n line-height: 1;\n color: @tooltip-color;\n text-align: center;\n text-decoration: none;\n background-color: @tooltip-bg;\n border-radius: @border-radius-base;\n box-shadow: 0 0 4px #d9d9d9;\n }\n\n &-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n }\n\n &-placement-top &-arrow {\n bottom: @tooltip-distance - @tooltip-arrow-width;\n left: 50%;\n margin-left: -@tooltip-arrow-width;\n border-width: @tooltip-arrow-width @tooltip-arrow-width 0;\n border-top-color: @tooltip-arrow-color;\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./assets/index.less\n **/",".rc-slider {\n position: relative;\n height: 4px;\n width: 100%;\n border-radius: 6px;\n background-color: #e9e9e9;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-track {\n position: absolute;\n left: 0;\n height: 4px;\n border-radius: 6px;\n background-color: #abe2fb;\n}\n.rc-slider-handle {\n position: absolute;\n margin-left: -7px;\n margin-top: -5px;\n width: 14px;\n height: 14px;\n cursor: pointer;\n border-radius: 50%;\n border: solid 2px #96dbfa;\n background-color: #fff;\n}\n.rc-slider-handle:hover {\n border-color: #57c5f7;\n}\n.rc-slider-handle-active:active {\n border-color: #57c5f7;\n box-shadow: 0 0 5px #57c5f7;\n}\n.rc-slider-mark {\n position: absolute;\n top: 10px;\n left: 0;\n width: 100%;\n font-size: 12px;\n}\n.rc-slider-mark-text {\n position: absolute;\n display: inline-block;\n vertical-align: middle;\n text-align: center;\n cursor: pointer;\n color: #999;\n}\n.rc-slider-mark-text-active {\n color: #666;\n}\n.rc-slider-step {\n position: absolute;\n width: 100%;\n height: 4px;\n background: transparent;\n}\n.rc-slider-dot {\n position: absolute;\n bottom: -2px;\n margin-left: -4px;\n width: 8px;\n height: 8px;\n border: 2px solid #e9e9e9;\n background-color: #fff;\n cursor: pointer;\n border-radius: 50%;\n vertical-align: middle;\n}\n.rc-slider-dot:first-child {\n margin-left: -4px;\n}\n.rc-slider-dot:last-child {\n margin-left: -4px;\n}\n.rc-slider-dot-active {\n border-color: #96dbfa;\n}\n.rc-slider-disabled {\n background-color: #e9e9e9;\n}\n.rc-slider-disabled .rc-slider-track {\n background-color: #ccc;\n}\n.rc-slider-disabled .rc-slider-handle,\n.rc-slider-disabled .rc-slider-dot {\n border-color: #ccc;\n background-color: #fff;\n cursor: not-allowed;\n}\n.rc-slider-disabled .rc-slider-mark-text,\n.rc-slider-disabled .rc-slider-dot {\n cursor: not-allowed !important;\n}\n.rc-slider-vertical {\n width: 4px;\n height: 100%;\n}\n.rc-slider-vertical .rc-slider-track {\n bottom: 0;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-handle {\n position: absolute;\n margin-left: -5px;\n margin-bottom: -7px;\n}\n.rc-slider-vertical .rc-slider-mark {\n top: 0;\n left: 10px;\n height: 100%;\n}\n.rc-slider-vertical .rc-slider-step {\n height: 100%;\n width: 4px;\n}\n.rc-slider-vertical .rc-slider-dot {\n left: 2px;\n margin-bottom: -4px;\n}\n.rc-slider-vertical .rc-slider-dot:first-child {\n margin-bottom: -4px;\n}\n.rc-slider-vertical .rc-slider-dot:last-child {\n margin-bottom: -4px;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-leave {\n animation-duration: .3s;\n animation-fill-mode: both;\n display: block !important;\n animation-play-state: paused;\n}\n.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,\n.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {\n animation-name: rcSliderTooltipZoomDownIn;\n animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {\n animation-name: rcSliderTooltipZoomDownOut;\n animation-play-state: running;\n}\n.rc-slider-tooltip-zoom-down-enter,\n.rc-slider-tooltip-zoom-down-appear {\n transform: scale(0, 0);\n animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);\n}\n.rc-slider-tooltip-zoom-down-leave {\n animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);\n}\n@keyframes rcSliderTooltipZoomDownIn {\n 0% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n 100% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n}\n@keyframes rcSliderTooltipZoomDownOut {\n 0% {\n transform-origin: 50% 100%;\n transform: scale(1, 1);\n }\n 100% {\n opacity: 0;\n transform-origin: 50% 100%;\n transform: scale(0, 0);\n }\n}\n.rc-slider-tooltip {\n position: absolute;\n left: -9999px;\n top: -9999px;\n visibility: visible;\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-tooltip * {\n box-sizing: border-box;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n.rc-slider-tooltip-hidden {\n display: none;\n}\n.rc-slider-tooltip-placement-top {\n padding: 4px 0 8px 0;\n}\n.rc-slider-tooltip-inner {\n padding: 6px 2px;\n min-width: 24px;\n height: 24px;\n font-size: 12px;\n line-height: 1;\n color: #fff;\n text-align: center;\n text-decoration: none;\n background-color: #6c6c6c;\n border-radius: 6px;\n box-shadow: 0 0 4px #d9d9d9;\n}\n.rc-slider-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {\n bottom: 4px;\n left: 50%;\n margin-left: -4px;\n border-width: 4px 4px 0;\n border-top-color: #6c6c6c;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** index.less\n **/"],"sourceRoot":""} \ No newline at end of file diff --git a/examples/common.js b/examples/common.js index 936c753..184b1c0 100644 --- a/examples/common.js +++ b/examples/common.js @@ -133,10 +133,10 @@ var ReactClass = __webpack_require__(23); var ReactDOMFactories = __webpack_require__(28); var ReactElement = __webpack_require__(11); - var ReactPropTypes = __webpack_require__(34); - var ReactVersion = __webpack_require__(35); + var ReactPropTypes = __webpack_require__(33); + var ReactVersion = __webpack_require__(34); - var onlyChild = __webpack_require__(36); + var onlyChild = __webpack_require__(35); var warning = __webpack_require__(13); var createElement = ReactElement.createElement; @@ -144,7 +144,7 @@ var cloneElement = ReactElement.cloneElement; if (process.env.NODE_ENV !== 'production') { - var ReactElementValidator = __webpack_require__(30); + var ReactElementValidator = __webpack_require__(29); createElement = ReactElementValidator.createElement; createFactory = ReactElementValidator.createFactory; cloneElement = ReactElementValidator.cloneElement; @@ -218,20 +218,30 @@ var cachedSetTimeout; var cachedClearTimeout; + function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); + } + function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); + } (function () { try { - cachedSetTimeout = setTimeout; - } catch (e) { - cachedSetTimeout = function () { - throw new Error('setTimeout is not defined'); + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; } + } catch (e) { + cachedSetTimeout = defaultSetTimout; } try { - cachedClearTimeout = clearTimeout; - } catch (e) { - cachedClearTimeout = function () { - throw new Error('clearTimeout is not defined'); + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { @@ -239,6 +249,11 @@ //normal enviroments in sane situations return setTimeout(fun, 0); } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); @@ -259,6 +274,11 @@ //normal enviroments in sane situations return clearTimeout(marker); } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); @@ -942,6 +962,34 @@ return config.key !== undefined; } + function defineKeyPropWarningGetter(props, displayName) { + var warnAboutAccessingKey = function () { + if (!specialPropKeyWarningShown) { + specialPropKeyWarningShown = true; + process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; + } + }; + warnAboutAccessingKey.isReactWarning = true; + Object.defineProperty(props, 'key', { + get: warnAboutAccessingKey, + configurable: true + }); + } + + function defineRefPropWarningGetter(props, displayName) { + var warnAboutAccessingRef = function () { + if (!specialPropRefWarningShown) { + specialPropRefWarningShown = true; + process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; + } + }; + warnAboutAccessingRef.isReactWarning = true; + Object.defineProperty(props, 'ref', { + get: warnAboutAccessingRef, + configurable: true + }); + } + /** * Factory method to create a new React element. This no longer adheres to * the class pattern, so do not use new to call it. Also, no instanceof check @@ -1096,39 +1144,15 @@ } } if (process.env.NODE_ENV !== 'production') { - var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; - - // Create dummy `key` and `ref` property to `props` to warn users against its use - var warnAboutAccessingKey = function () { - if (!specialPropKeyWarningShown) { - specialPropKeyWarningShown = true; - process.env.NODE_ENV !== 'production' ? warning(false, '%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - return undefined; - }; - warnAboutAccessingKey.isReactWarning = true; - - var warnAboutAccessingRef = function () { - if (!specialPropRefWarningShown) { - specialPropRefWarningShown = true; - process.env.NODE_ENV !== 'production' ? warning(false, '%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://fb.me/react-special-props)', displayName) : void 0; - } - return undefined; - }; - warnAboutAccessingRef.isReactWarning = true; - - if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { - if (!props.hasOwnProperty('key')) { - Object.defineProperty(props, 'key', { - get: warnAboutAccessingKey, - configurable: true - }); - } - if (!props.hasOwnProperty('ref')) { - Object.defineProperty(props, 'ref', { - get: warnAboutAccessingRef, - configurable: true - }); + if (key || ref) { + if (typeof props.$$typeof === 'undefined' || props.$$typeof !== REACT_ELEMENT_TYPE) { + var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type; + if (key) { + defineKeyPropWarningGetter(props, displayName); + } + if (ref) { + defineRefPropWarningGetter(props, displayName); + } } } } @@ -1310,20 +1334,12 @@ var warning = emptyFunction; if (process.env.NODE_ENV !== 'production') { - warning = function warning(condition, format) { - for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { - args[_key - 2] = arguments[_key]; - } + (function () { + var printWarning = function printWarning(format) { + for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + args[_key - 1] = arguments[_key]; + } - if (format === undefined) { - throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); - } - - if (format.indexOf('Failed Composite propType: ') === 0) { - return; // Ignore CompositeComponent proptype check. - } - - if (!condition) { var argIndex = 0; var message = 'Warning: ' + format.replace(/%s/g, function () { return args[argIndex++]; @@ -1337,8 +1353,26 @@ // to find the callsite that caused this warning to fire. throw new Error(message); } catch (x) {} - } - }; + }; + + warning = function warning(condition, format) { + if (format === undefined) { + throw new Error('`warning(condition, format, ...args)` requires a warning ' + 'message argument'); + } + + if (format.indexOf('Failed Composite propType: ') === 0) { + return; // Ignore CompositeComponent proptype check. + } + + if (!condition) { + for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) { + args[_key2 - 2] = arguments[_key2]; + } + + printWarning.apply(undefined, [format].concat(args)); + } + }; + })(); } module.exports = warning; @@ -2904,20 +2938,15 @@ var ReactElement = __webpack_require__(11); - var mapObject = __webpack_require__(29); - /** * Create a factory that creates HTML tag elements. * - * @param {string} tag Tag name (e.g. `div`). * @private */ - function createDOMFactory(tag) { - if (process.env.NODE_ENV !== 'production') { - var ReactElementValidator = __webpack_require__(30); - return ReactElementValidator.createFactory(tag); - } - return ReactElement.createFactory(tag); + var createDOMFactory = ReactElement.createFactory; + if (process.env.NODE_ENV !== 'production') { + var ReactElementValidator = __webpack_require__(29); + createDOMFactory = ReactElementValidator.createFactory; } /** @@ -2926,204 +2955,148 @@ * * @public */ - var ReactDOMFactories = mapObject({ - a: 'a', - abbr: 'abbr', - address: 'address', - area: 'area', - article: 'article', - aside: 'aside', - audio: 'audio', - b: 'b', - base: 'base', - bdi: 'bdi', - bdo: 'bdo', - big: 'big', - blockquote: 'blockquote', - body: 'body', - br: 'br', - button: 'button', - canvas: 'canvas', - caption: 'caption', - cite: 'cite', - code: 'code', - col: 'col', - colgroup: 'colgroup', - data: 'data', - datalist: 'datalist', - dd: 'dd', - del: 'del', - details: 'details', - dfn: 'dfn', - dialog: 'dialog', - div: 'div', - dl: 'dl', - dt: 'dt', - em: 'em', - embed: 'embed', - fieldset: 'fieldset', - figcaption: 'figcaption', - figure: 'figure', - footer: 'footer', - form: 'form', - h1: 'h1', - h2: 'h2', - h3: 'h3', - h4: 'h4', - h5: 'h5', - h6: 'h6', - head: 'head', - header: 'header', - hgroup: 'hgroup', - hr: 'hr', - html: 'html', - i: 'i', - iframe: 'iframe', - img: 'img', - input: 'input', - ins: 'ins', - kbd: 'kbd', - keygen: 'keygen', - label: 'label', - legend: 'legend', - li: 'li', - link: 'link', - main: 'main', - map: 'map', - mark: 'mark', - menu: 'menu', - menuitem: 'menuitem', - meta: 'meta', - meter: 'meter', - nav: 'nav', - noscript: 'noscript', - object: 'object', - ol: 'ol', - optgroup: 'optgroup', - option: 'option', - output: 'output', - p: 'p', - param: 'param', - picture: 'picture', - pre: 'pre', - progress: 'progress', - q: 'q', - rp: 'rp', - rt: 'rt', - ruby: 'ruby', - s: 's', - samp: 'samp', - script: 'script', - section: 'section', - select: 'select', - small: 'small', - source: 'source', - span: 'span', - strong: 'strong', - style: 'style', - sub: 'sub', - summary: 'summary', - sup: 'sup', - table: 'table', - tbody: 'tbody', - td: 'td', - textarea: 'textarea', - tfoot: 'tfoot', - th: 'th', - thead: 'thead', - time: 'time', - title: 'title', - tr: 'tr', - track: 'track', - u: 'u', - ul: 'ul', - 'var': 'var', - video: 'video', - wbr: 'wbr', + var ReactDOMFactories = { + a: createDOMFactory('a'), + abbr: createDOMFactory('abbr'), + address: createDOMFactory('address'), + area: createDOMFactory('area'), + article: createDOMFactory('article'), + aside: createDOMFactory('aside'), + audio: createDOMFactory('audio'), + b: createDOMFactory('b'), + base: createDOMFactory('base'), + bdi: createDOMFactory('bdi'), + bdo: createDOMFactory('bdo'), + big: createDOMFactory('big'), + blockquote: createDOMFactory('blockquote'), + body: createDOMFactory('body'), + br: createDOMFactory('br'), + button: createDOMFactory('button'), + canvas: createDOMFactory('canvas'), + caption: createDOMFactory('caption'), + cite: createDOMFactory('cite'), + code: createDOMFactory('code'), + col: createDOMFactory('col'), + colgroup: createDOMFactory('colgroup'), + data: createDOMFactory('data'), + datalist: createDOMFactory('datalist'), + dd: createDOMFactory('dd'), + del: createDOMFactory('del'), + details: createDOMFactory('details'), + dfn: createDOMFactory('dfn'), + dialog: createDOMFactory('dialog'), + div: createDOMFactory('div'), + dl: createDOMFactory('dl'), + dt: createDOMFactory('dt'), + em: createDOMFactory('em'), + embed: createDOMFactory('embed'), + fieldset: createDOMFactory('fieldset'), + figcaption: createDOMFactory('figcaption'), + figure: createDOMFactory('figure'), + footer: createDOMFactory('footer'), + form: createDOMFactory('form'), + h1: createDOMFactory('h1'), + h2: createDOMFactory('h2'), + h3: createDOMFactory('h3'), + h4: createDOMFactory('h4'), + h5: createDOMFactory('h5'), + h6: createDOMFactory('h6'), + head: createDOMFactory('head'), + header: createDOMFactory('header'), + hgroup: createDOMFactory('hgroup'), + hr: createDOMFactory('hr'), + html: createDOMFactory('html'), + i: createDOMFactory('i'), + iframe: createDOMFactory('iframe'), + img: createDOMFactory('img'), + input: createDOMFactory('input'), + ins: createDOMFactory('ins'), + kbd: createDOMFactory('kbd'), + keygen: createDOMFactory('keygen'), + label: createDOMFactory('label'), + legend: createDOMFactory('legend'), + li: createDOMFactory('li'), + link: createDOMFactory('link'), + main: createDOMFactory('main'), + map: createDOMFactory('map'), + mark: createDOMFactory('mark'), + menu: createDOMFactory('menu'), + menuitem: createDOMFactory('menuitem'), + meta: createDOMFactory('meta'), + meter: createDOMFactory('meter'), + nav: createDOMFactory('nav'), + noscript: createDOMFactory('noscript'), + object: createDOMFactory('object'), + ol: createDOMFactory('ol'), + optgroup: createDOMFactory('optgroup'), + option: createDOMFactory('option'), + output: createDOMFactory('output'), + p: createDOMFactory('p'), + param: createDOMFactory('param'), + picture: createDOMFactory('picture'), + pre: createDOMFactory('pre'), + progress: createDOMFactory('progress'), + q: createDOMFactory('q'), + rp: createDOMFactory('rp'), + rt: createDOMFactory('rt'), + ruby: createDOMFactory('ruby'), + s: createDOMFactory('s'), + samp: createDOMFactory('samp'), + script: createDOMFactory('script'), + section: createDOMFactory('section'), + select: createDOMFactory('select'), + small: createDOMFactory('small'), + source: createDOMFactory('source'), + span: createDOMFactory('span'), + strong: createDOMFactory('strong'), + style: createDOMFactory('style'), + sub: createDOMFactory('sub'), + summary: createDOMFactory('summary'), + sup: createDOMFactory('sup'), + table: createDOMFactory('table'), + tbody: createDOMFactory('tbody'), + td: createDOMFactory('td'), + textarea: createDOMFactory('textarea'), + tfoot: createDOMFactory('tfoot'), + th: createDOMFactory('th'), + thead: createDOMFactory('thead'), + time: createDOMFactory('time'), + title: createDOMFactory('title'), + tr: createDOMFactory('tr'), + track: createDOMFactory('track'), + u: createDOMFactory('u'), + ul: createDOMFactory('ul'), + 'var': createDOMFactory('var'), + video: createDOMFactory('video'), + wbr: createDOMFactory('wbr'), // SVG - circle: 'circle', - clipPath: 'clipPath', - defs: 'defs', - ellipse: 'ellipse', - g: 'g', - image: 'image', - line: 'line', - linearGradient: 'linearGradient', - mask: 'mask', - path: 'path', - pattern: 'pattern', - polygon: 'polygon', - polyline: 'polyline', - radialGradient: 'radialGradient', - rect: 'rect', - stop: 'stop', - svg: 'svg', - text: 'text', - tspan: 'tspan' - - }, createDOMFactory); + circle: createDOMFactory('circle'), + clipPath: createDOMFactory('clipPath'), + defs: createDOMFactory('defs'), + ellipse: createDOMFactory('ellipse'), + g: createDOMFactory('g'), + image: createDOMFactory('image'), + line: createDOMFactory('line'), + linearGradient: createDOMFactory('linearGradient'), + mask: createDOMFactory('mask'), + path: createDOMFactory('path'), + pattern: createDOMFactory('pattern'), + polygon: createDOMFactory('polygon'), + polyline: createDOMFactory('polyline'), + radialGradient: createDOMFactory('radialGradient'), + rect: createDOMFactory('rect'), + stop: createDOMFactory('stop'), + svg: createDOMFactory('svg'), + text: createDOMFactory('text'), + tspan: createDOMFactory('tspan') + }; module.exports = ReactDOMFactories; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, /* 29 */ -/***/ function(module, exports) { - - /** - * Copyright (c) 2013-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - - 'use strict'; - - var hasOwnProperty = Object.prototype.hasOwnProperty; - - /** - * Executes the provided `callback` once for each enumerable own property in the - * object and constructs a new object from the results. The `callback` is - * invoked with three arguments: - * - * - the property value - * - the property name - * - the object being traversed - * - * Properties that are added after the call to `mapObject` will not be visited - * by `callback`. If the values of existing properties are changed, the value - * passed to `callback` will be the value at the time `mapObject` visits them. - * Properties that are deleted before being visited are not visited. - * - * @grep function objectMap() - * @grep function objMap() - * - * @param {?object} object - * @param {function} callback - * @param {*} context - * @return {?object} - */ - function mapObject(object, callback, context) { - if (!object) { - return null; - } - var result = {}; - for (var name in object) { - if (hasOwnProperty.call(object, name)) { - result[name] = callback.call(context, object[name], name, object); - } - } - return result; - } - - module.exports = mapObject; - -/***/ }, -/* 30 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -3147,11 +3120,11 @@ 'use strict'; var ReactCurrentOwner = __webpack_require__(12); - var ReactComponentTreeDevtool = __webpack_require__(31); + var ReactComponentTreeHook = __webpack_require__(30); var ReactElement = __webpack_require__(11); var ReactPropTypeLocations = __webpack_require__(24); - var checkReactTypeSpec = __webpack_require__(32); + var checkReactTypeSpec = __webpack_require__(31); var canDefineProperty = __webpack_require__(15); var getIteratorFn = __webpack_require__(17); @@ -3220,7 +3193,7 @@ childOwner = ' It was passed a child from ' + element._owner.getName() + '.'; } - process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeDevtool.getCurrentStackAddendum(element)) : void 0; + process.env.NODE_ENV !== 'production' ? warning(false, 'Each child in an array or iterator should have a unique "key" prop.' + '%s%s See https://fb.me/react-warning-keys for more information.%s', currentComponentErrorInfo, childOwner, ReactComponentTreeHook.getCurrentStackAddendum(element)) : void 0; } /** @@ -3291,7 +3264,9 @@ var validType = typeof type === 'string' || typeof type === 'function'; // We warn in this case but don't throw. We expect the element creation to // succeed and there will likely be errors in render. - process.env.NODE_ENV !== 'production' ? warning(validType, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0; + if (!validType) { + process.env.NODE_ENV !== 'production' ? warning(false, 'React.createElement: type should not be null, undefined, boolean, or ' + 'number. It should be a string (for DOM elements) or a ReactClass ' + '(for composite components).%s', getDeclarationErrorAddendum()) : void 0; + } var element = ReactElement.createElement.apply(this, arguments); @@ -3355,7 +3330,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 31 */ +/* 30 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -3366,7 +3341,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactComponentTreeDevtool + * @providesModule ReactComponentTreeHook */ 'use strict'; @@ -3378,32 +3353,138 @@ var invariant = __webpack_require__(10); var warning = __webpack_require__(13); - var tree = {}; - var unmountedIDs = {}; - var rootIDs = {}; - - function updateTree(id, update) { - if (!tree[id]) { - tree[id] = { - element: null, - parentID: null, - ownerID: null, - text: null, - childIDs: [], - displayName: 'Unknown', - isMounted: false, - updateCount: 0 - }; + function isNative(fn) { + // Based on isNative() from Lodash + var funcToString = Function.prototype.toString; + var hasOwnProperty = Object.prototype.hasOwnProperty; + var reIsNative = RegExp('^' + funcToString + // Take an example native function source for comparison + .call(hasOwnProperty) + // Strip regex characters so we can use it for regex + .replace(/[\\^$.*+?()[\]{}|]/g, '\\$&') + // Remove hasOwnProperty from the template to make it generic + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'); + try { + var source = funcToString.call(fn); + return reIsNative.test(source); + } catch (err) { + return false; + } + } + + var canUseCollections = + // Array.from + typeof Array.from === 'function' && + // Map + typeof Map === 'function' && isNative(Map) && + // Map.prototype.keys + Map.prototype != null && typeof Map.prototype.keys === 'function' && isNative(Map.prototype.keys) && + // Set + typeof Set === 'function' && isNative(Set) && + // Set.prototype.keys + Set.prototype != null && typeof Set.prototype.keys === 'function' && isNative(Set.prototype.keys); + + var itemMap; + var rootIDSet; + + var itemByKey; + var rootByKey; + + if (canUseCollections) { + itemMap = new Map(); + rootIDSet = new Set(); + } else { + itemByKey = {}; + rootByKey = {}; + } + + var unmountedIDs = []; + + // Use non-numeric keys to prevent V8 performance issues: + // https://github.com/facebook/react/pull/7232 + function getKeyFromID(id) { + return '.' + id; + } + function getIDFromKey(key) { + return parseInt(key.substr(1), 10); + } + + function get(id) { + if (canUseCollections) { + return itemMap.get(id); + } else { + var key = getKeyFromID(id); + return itemByKey[key]; + } + } + + function remove(id) { + if (canUseCollections) { + itemMap['delete'](id); + } else { + var key = getKeyFromID(id); + delete itemByKey[key]; + } + } + + function create(id, element, parentID) { + var item = { + element: element, + parentID: parentID, + text: null, + childIDs: [], + isMounted: false, + updateCount: 0 + }; + + if (canUseCollections) { + itemMap.set(id, item); + } else { + var key = getKeyFromID(id); + itemByKey[key] = item; + } + } + + function addRoot(id) { + if (canUseCollections) { + rootIDSet.add(id); + } else { + var key = getKeyFromID(id); + rootByKey[key] = true; + } + } + + function removeRoot(id) { + if (canUseCollections) { + rootIDSet['delete'](id); + } else { + var key = getKeyFromID(id); + delete rootByKey[key]; + } + } + + function getRegisteredIDs() { + if (canUseCollections) { + return Array.from(itemMap.keys()); + } else { + return Object.keys(itemByKey).map(getIDFromKey); + } + } + + function getRootIDs() { + if (canUseCollections) { + return Array.from(rootIDSet.keys()); + } else { + return Object.keys(rootByKey).map(getIDFromKey); } - update(tree[id]); } function purgeDeep(id) { - var item = tree[id]; + var item = get(id); if (item) { var childIDs = item.childIDs; - delete tree[id]; + remove(id); childIDs.forEach(purgeDeep); } } @@ -3412,102 +3493,109 @@ return '\n in ' + name + (source ? ' (at ' + source.fileName.replace(/^.*[\\\/]/, '') + ':' + source.lineNumber + ')' : ownerName ? ' (created by ' + ownerName + ')' : ''); } + function getDisplayName(element) { + if (element == null) { + return '#empty'; + } else if (typeof element === 'string' || typeof element === 'number') { + return '#text'; + } else if (typeof element.type === 'string') { + return element.type; + } else { + return element.type.displayName || element.type.name || 'Unknown'; + } + } + function describeID(id) { - var name = ReactComponentTreeDevtool.getDisplayName(id); - var element = ReactComponentTreeDevtool.getElement(id); - var ownerID = ReactComponentTreeDevtool.getOwnerID(id); + var name = ReactComponentTreeHook.getDisplayName(id); + var element = ReactComponentTreeHook.getElement(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); var ownerName; if (ownerID) { - ownerName = ReactComponentTreeDevtool.getDisplayName(ownerID); + ownerName = ReactComponentTreeHook.getDisplayName(ownerID); } - process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeDevtool: Missing React element for debugID %s when ' + 'building stack', id) : void 0; + process.env.NODE_ENV !== 'production' ? warning(element, 'ReactComponentTreeHook: Missing React element for debugID %s when ' + 'building stack', id) : void 0; return describeComponentFrame(name, element && element._source, ownerName); } - var ReactComponentTreeDevtool = { - onSetDisplayName: function (id, displayName) { - updateTree(id, function (item) { - return item.displayName = displayName; - }); - }, + var ReactComponentTreeHook = { onSetChildren: function (id, nextChildIDs) { - updateTree(id, function (item) { - item.childIDs = nextChildIDs; + var item = get(id); + item.childIDs = nextChildIDs; - nextChildIDs.forEach(function (nextChildID) { - var nextChild = tree[nextChildID]; - !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected devtool events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('68') : void 0; - !(nextChild.displayName != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetDisplayName() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('69') : void 0; - !(nextChild.childIDs != null || nextChild.text != null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() or onSetText() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('70') : void 0; - !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; - if (nextChild.parentID == null) { - nextChild.parentID = id; - // TODO: This shouldn't be necessary but mounting a new root during in - // componentWillMount currently causes not-yet-mounted components to - // be purged from our tree data so their parent ID is missing. - } - !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetParent() and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('72', nextChildID, nextChild.parentID, id) : void 0; - }); - }); + for (var i = 0; i < nextChildIDs.length; i++) { + var nextChildID = nextChildIDs[i]; + var nextChild = get(nextChildID); + !nextChild ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected hook events to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('140') : void 0; + !(nextChild.childIDs != null || typeof nextChild.element !== 'object' || nextChild.element == null) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onSetChildren() to fire for a container child before its parent includes it in onSetChildren().') : _prodInvariant('141') : void 0; + !nextChild.isMounted ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onMountComponent() to fire for the child before its parent includes it in onSetChildren().') : _prodInvariant('71') : void 0; + if (nextChild.parentID == null) { + nextChild.parentID = id; + // TODO: This shouldn't be necessary but mounting a new root during in + // componentWillMount currently causes not-yet-mounted components to + // be purged from our tree data so their parent ID is missing. + } + !(nextChild.parentID === id) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'Expected onBeforeMountComponent() parent and onSetChildren() to be consistent (%s has parents %s and %s).', nextChildID, nextChild.parentID, id) : _prodInvariant('142', nextChildID, nextChild.parentID, id) : void 0; + } }, - onSetOwner: function (id, ownerID) { - updateTree(id, function (item) { - return item.ownerID = ownerID; - }); - }, - onSetParent: function (id, parentID) { - updateTree(id, function (item) { - return item.parentID = parentID; - }); - }, - onSetText: function (id, text) { - updateTree(id, function (item) { - return item.text = text; - }); - }, - onBeforeMountComponent: function (id, element) { - updateTree(id, function (item) { - return item.element = element; - }); + onBeforeMountComponent: function (id, element, parentID) { + create(id, element, parentID); }, onBeforeUpdateComponent: function (id, element) { - updateTree(id, function (item) { - return item.element = element; - }); + var item = get(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.element = element; }, onMountComponent: function (id) { - updateTree(id, function (item) { - return item.isMounted = true; - }); - }, - onMountRootComponent: function (id) { - rootIDs[id] = true; + var item = get(id); + item.isMounted = true; + var isRoot = item.parentID === 0; + if (isRoot) { + addRoot(id); + } }, onUpdateComponent: function (id) { - updateTree(id, function (item) { - return item.updateCount++; - }); + var item = get(id); + if (!item || !item.isMounted) { + // We may end up here as a result of setState() in componentWillUnmount(). + // In this case, ignore the element. + return; + } + item.updateCount++; }, onUnmountComponent: function (id) { - updateTree(id, function (item) { - return item.isMounted = false; - }); - unmountedIDs[id] = true; - delete rootIDs[id]; + var item = get(id); + if (item) { + // We need to check if it exists. + // `item` might not exist if it is inside an error boundary, and a sibling + // error boundary child threw while mounting. Then this instance never + // got a chance to mount, but it still gets an unmounting event during + // the error boundary cleanup. + item.isMounted = false; + var isRoot = item.parentID === 0; + if (isRoot) { + removeRoot(id); + } + } + unmountedIDs.push(id); }, purgeUnmountedComponents: function () { - if (ReactComponentTreeDevtool._preventPurging) { + if (ReactComponentTreeHook._preventPurging) { // Should only be used for testing. return; } - for (var id in unmountedIDs) { + for (var i = 0; i < unmountedIDs.length; i++) { + var id = unmountedIDs[i]; purgeDeep(id); } - unmountedIDs = {}; + unmountedIDs.length = 0; }, isMounted: function (id) { - var item = tree[id]; + var item = get(id); return item ? item.isMounted : false; }, getCurrentStackAddendum: function (topElement) { @@ -3522,64 +3610,75 @@ var currentOwner = ReactCurrentOwner.current; var id = currentOwner && currentOwner._debugID; - info += ReactComponentTreeDevtool.getStackAddendumByID(id); + info += ReactComponentTreeHook.getStackAddendumByID(id); return info; }, getStackAddendumByID: function (id) { var info = ''; while (id) { info += describeID(id); - id = ReactComponentTreeDevtool.getParentID(id); + id = ReactComponentTreeHook.getParentID(id); } return info; }, getChildIDs: function (id) { - var item = tree[id]; + var item = get(id); return item ? item.childIDs : []; }, getDisplayName: function (id) { - var item = tree[id]; - return item ? item.displayName : 'Unknown'; + var element = ReactComponentTreeHook.getElement(id); + if (!element) { + return null; + } + return getDisplayName(element); }, getElement: function (id) { - var item = tree[id]; + var item = get(id); return item ? item.element : null; }, getOwnerID: function (id) { - var item = tree[id]; - return item ? item.ownerID : null; + var element = ReactComponentTreeHook.getElement(id); + if (!element || !element._owner) { + return null; + } + return element._owner._debugID; }, getParentID: function (id) { - var item = tree[id]; + var item = get(id); return item ? item.parentID : null; }, getSource: function (id) { - var item = tree[id]; + var item = get(id); var element = item ? item.element : null; var source = element != null ? element._source : null; return source; }, getText: function (id) { - var item = tree[id]; - return item ? item.text : null; + var element = ReactComponentTreeHook.getElement(id); + if (typeof element === 'string') { + return element; + } else if (typeof element === 'number') { + return '' + element; + } else { + return null; + } }, getUpdateCount: function (id) { - var item = tree[id]; + var item = get(id); return item ? item.updateCount : 0; }, - getRootIDs: function () { - return Object.keys(rootIDs); - }, - getRegisteredIDs: function () { - return Object.keys(tree); - } + + + getRegisteredIDs: getRegisteredIDs, + + getRootIDs: getRootIDs }; - module.exports = ReactComponentTreeDevtool; + module.exports = ReactComponentTreeHook; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 32 */ +/* 31 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -3598,12 +3697,12 @@ var _prodInvariant = __webpack_require__(9); var ReactPropTypeLocationNames = __webpack_require__(26); - var ReactPropTypesSecret = __webpack_require__(33); + var ReactPropTypesSecret = __webpack_require__(32); var invariant = __webpack_require__(10); var warning = __webpack_require__(13); - var ReactComponentTreeDevtool; + var ReactComponentTreeHook; if (typeof process !== 'undefined' && process.env && process.env.NODE_ENV === 'test') { // Temporary hack. @@ -3611,7 +3710,7 @@ // https://github.com/facebook/react/issues/7240 // Remove the inline requires when we don't need them anymore: // https://github.com/facebook/react/pull/7178 - ReactComponentTreeDevtool = __webpack_require__(31); + ReactComponentTreeHook = __webpack_require__(30); } var loggedTypeFailures = {}; @@ -3652,13 +3751,13 @@ var componentStackInfo = ''; if (process.env.NODE_ENV !== 'production') { - if (!ReactComponentTreeDevtool) { - ReactComponentTreeDevtool = __webpack_require__(31); + if (!ReactComponentTreeHook) { + ReactComponentTreeHook = __webpack_require__(30); } if (debugID !== null) { - componentStackInfo = ReactComponentTreeDevtool.getStackAddendumByID(debugID); + componentStackInfo = ReactComponentTreeHook.getStackAddendumByID(debugID); } else if (element !== null) { - componentStackInfo = ReactComponentTreeDevtool.getCurrentStackAddendum(element); + componentStackInfo = ReactComponentTreeHook.getCurrentStackAddendum(element); } } @@ -3672,7 +3771,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 33 */ +/* 32 */ /***/ function(module, exports) { /** @@ -3693,7 +3792,7 @@ module.exports = ReactPropTypesSecret; /***/ }, -/* 34 */ +/* 33 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -3711,7 +3810,7 @@ var ReactElement = __webpack_require__(11); var ReactPropTypeLocationNames = __webpack_require__(26); - var ReactPropTypesSecret = __webpack_require__(33); + var ReactPropTypesSecret = __webpack_require__(32); var emptyFunction = __webpack_require__(14); var getIteratorFn = __webpack_require__(17); @@ -3804,6 +3903,20 @@ } /*eslint-enable no-self-compare*/ + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + function createChainableTypeChecker(validate) { if (process.env.NODE_ENV !== 'production') { var manualPropTypeCallCache = {}; @@ -3823,7 +3936,7 @@ if (props[propName] == null) { var locationName = ReactPropTypeLocationNames[location]; if (isRequired) { - return new Error('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.')); + return new PropTypeError('Required ' + locationName + ' `' + propFullName + '` was not specified in ' + ('`' + componentName + '`.')); } return null; } else { @@ -3848,7 +3961,7 @@ // 'of type `object`'. var preciseType = getPreciseType(propValue); - return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); } return null; } @@ -3862,13 +3975,13 @@ function createArrayOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { - return new Error('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); } var propValue = props[propName]; if (!Array.isArray(propValue)) { var locationName = ReactPropTypeLocationNames[location]; var propType = getPropType(propValue); - return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); } for (var i = 0; i < propValue.length; i++) { var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); @@ -3887,7 +4000,7 @@ if (!ReactElement.isValidElement(propValue)) { var locationName = ReactPropTypeLocationNames[location]; var propType = getPropType(propValue); - return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); } return null; } @@ -3900,7 +4013,7 @@ var locationName = ReactPropTypeLocationNames[location]; var expectedClassName = expectedClass.name || ANONYMOUS; var actualClassName = getClassName(props[propName]); - return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); } return null; } @@ -3923,7 +4036,7 @@ var locationName = ReactPropTypeLocationNames[location]; var valuesString = JSON.stringify(expectedValues); - return new Error('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of value `' + propValue + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); } return createChainableTypeChecker(validate); } @@ -3931,13 +4044,13 @@ function createObjectOfTypeChecker(typeChecker) { function validate(props, propName, componentName, location, propFullName) { if (typeof typeChecker !== 'function') { - return new Error('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); } var propValue = props[propName]; var propType = getPropType(propValue); if (propType !== 'object') { var locationName = ReactPropTypeLocationNames[location]; - return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); } for (var key in propValue) { if (propValue.hasOwnProperty(key)) { @@ -3967,7 +4080,7 @@ } var locationName = ReactPropTypeLocationNames[location]; - return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); } return createChainableTypeChecker(validate); } @@ -3976,7 +4089,7 @@ function validate(props, propName, componentName, location, propFullName) { if (!isNode(props[propName])) { var locationName = ReactPropTypeLocationNames[location]; - return new Error('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); } return null; } @@ -3989,7 +4102,7 @@ var propType = getPropType(propValue); if (propType !== 'object') { var locationName = ReactPropTypeLocationNames[location]; - return new Error('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + return new PropTypeError('Invalid ' + locationName + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); } for (var key in shapeTypes) { var checker = shapeTypes[key]; @@ -4116,7 +4229,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 35 */ +/* 34 */ /***/ function(module, exports) { /** @@ -4132,10 +4245,10 @@ 'use strict'; - module.exports = '15.3.0'; + module.exports = '15.3.1'; /***/ }, -/* 36 */ +/* 35 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -4171,7 +4284,7 @@ * structure. */ function onlyChild(children) { - !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'onlyChild must be passed a children with exactly one child.') : _prodInvariant('23') : void 0; + !ReactElement.isValidElement(children) ? process.env.NODE_ENV !== 'production' ? invariant(false, 'React.Children.only expected to receive a single React element child.') : _prodInvariant('143') : void 0; return children; } @@ -4179,16 +4292,16 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 37 */ +/* 36 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; - module.exports = __webpack_require__(38); + module.exports = __webpack_require__(37); /***/ }, -/* 38 */ +/* 37 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -4206,16 +4319,16 @@ 'use strict'; - var ReactDOMComponentTree = __webpack_require__(39); - var ReactDefaultInjection = __webpack_require__(42); - var ReactMount = __webpack_require__(169); - var ReactReconciler = __webpack_require__(62); - var ReactUpdates = __webpack_require__(59); - var ReactVersion = __webpack_require__(35); + var ReactDOMComponentTree = __webpack_require__(38); + var ReactDefaultInjection = __webpack_require__(41); + var ReactMount = __webpack_require__(164); + var ReactReconciler = __webpack_require__(61); + var ReactUpdates = __webpack_require__(58); + var ReactVersion = __webpack_require__(34); - var findDOMNode = __webpack_require__(174); - var getHostComponentFromComposite = __webpack_require__(175); - var renderSubtreeIntoContainer = __webpack_require__(176); + var findDOMNode = __webpack_require__(169); + var getHostComponentFromComposite = __webpack_require__(170); + var renderSubtreeIntoContainer = __webpack_require__(171); var warning = __webpack_require__(13); ReactDefaultInjection.inject(); @@ -4256,7 +4369,7 @@ } if (process.env.NODE_ENV !== 'production') { - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(51); if (ExecutionEnvironment.canUseDOM && window.top === window.self) { // First check if devtools is not installed @@ -4291,11 +4404,20 @@ } } + if (process.env.NODE_ENV !== 'production') { + var ReactInstrumentation = __webpack_require__(64); + var ReactDOMUnknownPropertyHook = __webpack_require__(172); + var ReactDOMNullInputValuePropHook = __webpack_require__(173); + + ReactInstrumentation.debugTool.addHook(ReactDOMUnknownPropertyHook); + ReactInstrumentation.debugTool.addHook(ReactDOMNullInputValuePropHook); + } + module.exports = ReactDOM; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 39 */ +/* 38 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -4313,8 +4435,8 @@ var _prodInvariant = __webpack_require__(9); - var DOMProperty = __webpack_require__(40); - var ReactDOMComponentFlags = __webpack_require__(41); + var DOMProperty = __webpack_require__(39); + var ReactDOMComponentFlags = __webpack_require__(40); var invariant = __webpack_require__(10); @@ -4382,7 +4504,7 @@ } var childInst = children[name]; var childID = getRenderedHostOrTextFromComponent(childInst)._domID; - if (childID == null) { + if (childID === 0) { // We're currently unmounting this child in ReactMultiChild; skip it. continue; } @@ -4489,7 +4611,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 40 */ +/* 39 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -4701,7 +4823,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 41 */ +/* 40 */ /***/ function(module, exports) { /** @@ -4724,7 +4846,7 @@ module.exports = ReactDOMComponentFlags; /***/ }, -/* 42 */ +/* 41 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4740,24 +4862,24 @@ 'use strict'; - var BeforeInputEventPlugin = __webpack_require__(43); - var ChangeEventPlugin = __webpack_require__(58); - var DefaultEventPluginOrder = __webpack_require__(76); - var EnterLeaveEventPlugin = __webpack_require__(77); - var HTMLDOMPropertyConfig = __webpack_require__(82); - var ReactComponentBrowserEnvironment = __webpack_require__(83); - var ReactDOMComponent = __webpack_require__(97); - var ReactDOMComponentTree = __webpack_require__(39); - var ReactDOMEmptyComponent = __webpack_require__(140); - var ReactDOMTreeTraversal = __webpack_require__(141); - var ReactDOMTextComponent = __webpack_require__(142); - var ReactDefaultBatchingStrategy = __webpack_require__(143); - var ReactEventListener = __webpack_require__(144); - var ReactInjection = __webpack_require__(147); - var ReactReconcileTransaction = __webpack_require__(148); - var SVGDOMPropertyConfig = __webpack_require__(156); - var SelectEventPlugin = __webpack_require__(157); - var SimpleEventPlugin = __webpack_require__(158); + var BeforeInputEventPlugin = __webpack_require__(42); + var ChangeEventPlugin = __webpack_require__(57); + var DefaultEventPluginOrder = __webpack_require__(75); + var EnterLeaveEventPlugin = __webpack_require__(76); + var HTMLDOMPropertyConfig = __webpack_require__(81); + var ReactComponentBrowserEnvironment = __webpack_require__(82); + var ReactDOMComponent = __webpack_require__(96); + var ReactDOMComponentTree = __webpack_require__(38); + var ReactDOMEmptyComponent = __webpack_require__(135); + var ReactDOMTreeTraversal = __webpack_require__(136); + var ReactDOMTextComponent = __webpack_require__(137); + var ReactDefaultBatchingStrategy = __webpack_require__(138); + var ReactEventListener = __webpack_require__(139); + var ReactInjection = __webpack_require__(142); + var ReactReconcileTransaction = __webpack_require__(143); + var SVGDOMPropertyConfig = __webpack_require__(151); + var SelectEventPlugin = __webpack_require__(152); + var SimpleEventPlugin = __webpack_require__(153); var alreadyInjected = false; @@ -4813,7 +4935,7 @@ }; /***/ }, -/* 43 */ +/* 42 */ /***/ function(module, exports, __webpack_require__) { /** @@ -4829,12 +4951,12 @@ 'use strict'; - var EventConstants = __webpack_require__(44); - var EventPropagators = __webpack_require__(45); - var ExecutionEnvironment = __webpack_require__(52); - var FallbackCompositionState = __webpack_require__(53); - var SyntheticCompositionEvent = __webpack_require__(55); - var SyntheticInputEvent = __webpack_require__(57); + var EventConstants = __webpack_require__(43); + var EventPropagators = __webpack_require__(44); + var ExecutionEnvironment = __webpack_require__(51); + var FallbackCompositionState = __webpack_require__(52); + var SyntheticCompositionEvent = __webpack_require__(54); + var SyntheticInputEvent = __webpack_require__(56); var keyOf = __webpack_require__(27); @@ -5206,7 +5328,7 @@ module.exports = BeforeInputEventPlugin; /***/ }, -/* 44 */ +/* 43 */ /***/ function(module, exports, __webpack_require__) { /** @@ -5308,7 +5430,7 @@ module.exports = EventConstants; /***/ }, -/* 45 */ +/* 44 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -5324,12 +5446,12 @@ 'use strict'; - var EventConstants = __webpack_require__(44); - var EventPluginHub = __webpack_require__(46); - var EventPluginUtils = __webpack_require__(48); + var EventConstants = __webpack_require__(43); + var EventPluginHub = __webpack_require__(45); + var EventPluginUtils = __webpack_require__(47); - var accumulateInto = __webpack_require__(50); - var forEachAccumulated = __webpack_require__(51); + var accumulateInto = __webpack_require__(49); + var forEachAccumulated = __webpack_require__(50); var warning = __webpack_require__(13); var PropagationPhases = EventConstants.PropagationPhases; @@ -5451,7 +5573,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 46 */ +/* 45 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -5469,12 +5591,12 @@ var _prodInvariant = __webpack_require__(9); - var EventPluginRegistry = __webpack_require__(47); - var EventPluginUtils = __webpack_require__(48); - var ReactErrorUtils = __webpack_require__(49); + var EventPluginRegistry = __webpack_require__(46); + var EventPluginUtils = __webpack_require__(47); + var ReactErrorUtils = __webpack_require__(48); - var accumulateInto = __webpack_require__(50); - var forEachAccumulated = __webpack_require__(51); + var accumulateInto = __webpack_require__(49); + var forEachAccumulated = __webpack_require__(50); var invariant = __webpack_require__(10); /** @@ -5512,6 +5634,8 @@ }; var getDictionaryKey = function (inst) { + // Prevents V8 performance issue: + // https://github.com/facebook/react/pull/7232 return '.' + inst._rootNodeID; }; @@ -5706,7 +5830,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 47 */ +/* 46 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -5959,7 +6083,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 48 */ +/* 47 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -5977,8 +6101,8 @@ var _prodInvariant = __webpack_require__(9); - var EventConstants = __webpack_require__(44); - var ReactErrorUtils = __webpack_require__(49); + var EventConstants = __webpack_require__(43); + var ReactErrorUtils = __webpack_require__(48); var invariant = __webpack_require__(10); var warning = __webpack_require__(13); @@ -6194,7 +6318,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 49 */ +/* 48 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -6276,7 +6400,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 50 */ +/* 49 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -6340,7 +6464,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 51 */ +/* 50 */ /***/ function(module, exports) { /** @@ -6376,7 +6500,7 @@ module.exports = forEachAccumulated; /***/ }, -/* 52 */ +/* 51 */ /***/ function(module, exports) { /** @@ -6416,7 +6540,7 @@ module.exports = ExecutionEnvironment; /***/ }, -/* 53 */ +/* 52 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6436,7 +6560,7 @@ var PooledClass = __webpack_require__(8); - var getTextContentAccessor = __webpack_require__(54); + var getTextContentAccessor = __webpack_require__(53); /** * This helper class stores information about text content of a target node, @@ -6516,7 +6640,7 @@ module.exports = FallbackCompositionState; /***/ }, -/* 54 */ +/* 53 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6532,7 +6656,7 @@ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(51); var contentKey = null; @@ -6554,7 +6678,7 @@ module.exports = getTextContentAccessor; /***/ }, -/* 55 */ +/* 54 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6570,7 +6694,7 @@ 'use strict'; - var SyntheticEvent = __webpack_require__(56); + var SyntheticEvent = __webpack_require__(55); /** * @interface Event @@ -6595,7 +6719,7 @@ module.exports = SyntheticCompositionEvent; /***/ }, -/* 56 */ +/* 55 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -6727,9 +6851,16 @@ if (event.stopPropagation) { event.stopPropagation(); - } else { + } else if (typeof event.cancelBubble !== 'unknown') { + // eslint-disable-line valid-typeof + // The ChangeEventPlugin registers a "propertychange" event for + // IE. This event does not support bubbling or cancelling, and + // any references to cancelBubble throw "Member not found". A + // typeof check of "unknown" circumvents this issue (and is also + // IE specific). event.cancelBubble = true; } + this.isPropagationStopped = emptyFunction.thatReturnsTrue; }, @@ -6861,7 +6992,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 57 */ +/* 56 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6877,7 +7008,7 @@ 'use strict'; - var SyntheticEvent = __webpack_require__(56); + var SyntheticEvent = __webpack_require__(55); /** * @interface Event @@ -6903,7 +7034,7 @@ module.exports = SyntheticInputEvent; /***/ }, -/* 58 */ +/* 57 */ /***/ function(module, exports, __webpack_require__) { /** @@ -6919,17 +7050,17 @@ 'use strict'; - var EventConstants = __webpack_require__(44); - var EventPluginHub = __webpack_require__(46); - var EventPropagators = __webpack_require__(45); - var ExecutionEnvironment = __webpack_require__(52); - var ReactDOMComponentTree = __webpack_require__(39); - var ReactUpdates = __webpack_require__(59); - var SyntheticEvent = __webpack_require__(56); + var EventConstants = __webpack_require__(43); + var EventPluginHub = __webpack_require__(45); + var EventPropagators = __webpack_require__(44); + var ExecutionEnvironment = __webpack_require__(51); + var ReactDOMComponentTree = __webpack_require__(38); + var ReactUpdates = __webpack_require__(58); + var SyntheticEvent = __webpack_require__(55); - var getEventTarget = __webpack_require__(73); - var isEventSupported = __webpack_require__(74); - var isTextInputElement = __webpack_require__(75); + var getEventTarget = __webpack_require__(72); + var isEventSupported = __webpack_require__(73); + var isTextInputElement = __webpack_require__(74); var keyOf = __webpack_require__(27); var topLevelTypes = EventConstants.topLevelTypes; @@ -7233,7 +7364,7 @@ module.exports = ChangeEventPlugin; /***/ }, -/* 59 */ +/* 58 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -7252,11 +7383,11 @@ var _prodInvariant = __webpack_require__(9), _assign = __webpack_require__(6); - var CallbackQueue = __webpack_require__(60); + var CallbackQueue = __webpack_require__(59); var PooledClass = __webpack_require__(8); - var ReactFeatureFlags = __webpack_require__(61); - var ReactReconciler = __webpack_require__(62); - var Transaction = __webpack_require__(72); + var ReactFeatureFlags = __webpack_require__(60); + var ReactReconciler = __webpack_require__(61); + var Transaction = __webpack_require__(71); var invariant = __webpack_require__(10); @@ -7490,7 +7621,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 60 */ +/* 59 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -7602,7 +7733,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 61 */ +/* 60 */ /***/ function(module, exports) { /** @@ -7629,7 +7760,7 @@ module.exports = ReactFeatureFlags; /***/ }, -/* 62 */ +/* 61 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -7645,8 +7776,8 @@ 'use strict'; - var ReactRef = __webpack_require__(63); - var ReactInstrumentation = __webpack_require__(65); + var ReactRef = __webpack_require__(62); + var ReactInstrumentation = __webpack_require__(64); var warning = __webpack_require__(13); @@ -7671,20 +7802,19 @@ * @final * @internal */ - mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context) { + mountComponent: function (internalInstance, transaction, hostParent, hostContainerInfo, context, parentDebugID // 0 in production and for roots + ) { if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement); - ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'mountComponent'); + ReactInstrumentation.debugTool.onBeforeMountComponent(internalInstance._debugID, internalInstance._currentElement, parentDebugID); } } - var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context); + var markup = internalInstance.mountComponent(transaction, hostParent, hostContainerInfo, context, parentDebugID); if (internalInstance._currentElement && internalInstance._currentElement.ref != null) { transaction.getReactMountReady().enqueue(attachRefs, internalInstance); } if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'mountComponent'); ReactInstrumentation.debugTool.onMountComponent(internalInstance._debugID); } } @@ -7708,14 +7838,13 @@ unmountComponent: function (internalInstance, safely) { if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'unmountComponent'); + ReactInstrumentation.debugTool.onBeforeUnmountComponent(internalInstance._debugID); } } ReactRef.detachRefs(internalInstance, internalInstance._currentElement); internalInstance.unmountComponent(safely); if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'unmountComponent'); ReactInstrumentation.debugTool.onUnmountComponent(internalInstance._debugID); } } @@ -7750,7 +7879,6 @@ if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, nextElement); - ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'receiveComponent'); } } @@ -7768,7 +7896,6 @@ if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'receiveComponent'); ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); } } @@ -7790,14 +7917,12 @@ } if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onBeginReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary'); ReactInstrumentation.debugTool.onBeforeUpdateComponent(internalInstance._debugID, internalInstance._currentElement); } } internalInstance.performUpdateIfNecessary(transaction); if (process.env.NODE_ENV !== 'production') { if (internalInstance._debugID !== 0) { - ReactInstrumentation.debugTool.onEndReconcilerTimer(internalInstance._debugID, 'performUpdateIfNecessary'); ReactInstrumentation.debugTool.onUpdateComponent(internalInstance._debugID); } } @@ -7809,7 +7934,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 63 */ +/* 62 */ /***/ function(module, exports, __webpack_require__) { /** @@ -7825,7 +7950,7 @@ 'use strict'; - var ReactOwner = __webpack_require__(64); + var ReactOwner = __webpack_require__(63); var ReactRef = {}; @@ -7873,7 +7998,7 @@ var prevEmpty = prevElement === null || prevElement === false; var nextEmpty = nextElement === null || nextElement === false; - return( + return ( // This has a few false positives w/r/t empty components. prevEmpty || nextEmpty || nextElement.ref !== prevElement.ref || // If owner changes but we have an unchanged function ref, don't update refs @@ -7894,7 +8019,7 @@ module.exports = ReactRef; /***/ }, -/* 64 */ +/* 63 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -7994,7 +8119,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 65 */ +/* 64 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8013,7 +8138,7 @@ var debugTool = null; if (process.env.NODE_ENV !== 'production') { - var ReactDebugTool = __webpack_require__(66); + var ReactDebugTool = __webpack_require__(65); debugTool = ReactDebugTool; } @@ -8021,7 +8146,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 66 */ +/* 65 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8037,29 +8162,35 @@ 'use strict'; - var ReactInvalidSetStateWarningDevTool = __webpack_require__(67); - var ReactHostOperationHistoryDevtool = __webpack_require__(68); - var ReactComponentTreeDevtool = __webpack_require__(31); - var ReactChildrenMutationWarningDevtool = __webpack_require__(69); - var ExecutionEnvironment = __webpack_require__(52); + var ReactInvalidSetStateWarningHook = __webpack_require__(66); + var ReactHostOperationHistoryHook = __webpack_require__(67); + var ReactComponentTreeHook = __webpack_require__(30); + var ReactChildrenMutationWarningHook = __webpack_require__(68); + var ExecutionEnvironment = __webpack_require__(51); - var performanceNow = __webpack_require__(70); + var performanceNow = __webpack_require__(69); var warning = __webpack_require__(13); - var eventHandlers = []; - var handlerDoesThrowForEvent = {}; + var hooks = []; + var didHookThrowForEvent = {}; - function emitEvent(handlerFunctionName, arg1, arg2, arg3, arg4, arg5) { - eventHandlers.forEach(function (handler) { - try { - if (handler[handlerFunctionName]) { - handler[handlerFunctionName](arg1, arg2, arg3, arg4, arg5); - } - } catch (e) { - process.env.NODE_ENV !== 'production' ? warning(handlerDoesThrowForEvent[handlerFunctionName], 'exception thrown by devtool while handling %s: %s', handlerFunctionName, e + '\n' + e.stack) : void 0; - handlerDoesThrowForEvent[handlerFunctionName] = true; + function callHook(event, fn, context, arg1, arg2, arg3, arg4, arg5) { + try { + fn.call(context, arg1, arg2, arg3, arg4, arg5); + } catch (e) { + process.env.NODE_ENV !== 'production' ? warning(didHookThrowForEvent[event], 'Exception thrown by hook while handling %s: %s', event, e + '\n' + e.stack) : void 0; + didHookThrowForEvent[event] = true; + } + } + + function emitEvent(event, arg1, arg2, arg3, arg4, arg5) { + for (var i = 0; i < hooks.length; i++) { + var hook = hooks[i]; + var fn = hook[event]; + if (fn) { + callHook(event, fn, hook, arg1, arg2, arg3, arg4, arg5); } - }); + } } var isProfiling = false; @@ -8076,21 +8207,21 @@ var lifeCycleTimerHasWarned = false; function clearHistory() { - ReactComponentTreeDevtool.purgeUnmountedComponents(); - ReactHostOperationHistoryDevtool.clearHistory(); + ReactComponentTreeHook.purgeUnmountedComponents(); + ReactHostOperationHistoryHook.clearHistory(); } function getTreeSnapshot(registeredIDs) { return registeredIDs.reduce(function (tree, id) { - var ownerID = ReactComponentTreeDevtool.getOwnerID(id); - var parentID = ReactComponentTreeDevtool.getParentID(id); + var ownerID = ReactComponentTreeHook.getOwnerID(id); + var parentID = ReactComponentTreeHook.getParentID(id); tree[id] = { - displayName: ReactComponentTreeDevtool.getDisplayName(id), - text: ReactComponentTreeDevtool.getText(id), - updateCount: ReactComponentTreeDevtool.getUpdateCount(id), - childIDs: ReactComponentTreeDevtool.getChildIDs(id), + displayName: ReactComponentTreeHook.getDisplayName(id), + text: ReactComponentTreeHook.getText(id), + updateCount: ReactComponentTreeHook.getUpdateCount(id), + childIDs: ReactComponentTreeHook.getChildIDs(id), // Text nodes don't have owners but this is close enough. - ownerID: ownerID || ReactComponentTreeDevtool.getOwnerID(parentID), + ownerID: ownerID || ReactComponentTreeHook.getOwnerID(parentID), parentID: parentID }; return tree; @@ -8100,7 +8231,7 @@ function resetMeasurements() { var previousStartTime = currentFlushStartTime; var previousMeasurements = currentFlushMeasurements || []; - var previousOperations = ReactHostOperationHistoryDevtool.getHistory(); + var previousOperations = ReactHostOperationHistoryHook.getHistory(); if (currentFlushNesting === 0) { currentFlushStartTime = null; @@ -8110,7 +8241,7 @@ } if (previousMeasurements.length || previousOperations.length) { - var registeredIDs = ReactComponentTreeDevtool.getRegisteredIDs(); + var registeredIDs = ReactComponentTreeHook.getRegisteredIDs(); flushHistory.push({ duration: performanceNow() - previousStartTime, measurements: previousMeasurements || [], @@ -8125,7 +8256,14 @@ } function checkDebugID(debugID) { - process.env.NODE_ENV !== 'production' ? warning(debugID, 'ReactDebugTool: debugID may not be empty.') : void 0; + var allowRoot = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; + + if (allowRoot && debugID === 0) { + return; + } + if (!debugID) { + process.env.NODE_ENV !== 'production' ? warning(false, 'ReactDebugTool: debugID may not be empty.') : void 0; + } } function beginLifeCycleTimer(debugID, timerType) { @@ -8193,13 +8331,13 @@ } var ReactDebugTool = { - addDevtool: function (devtool) { - eventHandlers.push(devtool); + addHook: function (hook) { + hooks.push(hook); }, - removeDevtool: function (devtool) { - for (var i = 0; i < eventHandlers.length; i++) { - if (eventHandlers[i] === devtool) { - eventHandlers.splice(i, 1); + removeHook: function (hook) { + for (var i = 0; i < hooks.length; i++) { + if (hooks[i] === hook) { + hooks.splice(i, 1); i--; } } @@ -8215,7 +8353,7 @@ isProfiling = true; flushHistory.length = 0; resetMeasurements(); - ReactDebugTool.addDevtool(ReactHostOperationHistoryDevtool); + ReactDebugTool.addHook(ReactHostOperationHistoryHook); }, endProfiling: function () { if (!isProfiling) { @@ -8224,7 +8362,7 @@ isProfiling = false; resetMeasurements(); - ReactDebugTool.removeDevtool(ReactHostOperationHistoryDevtool); + ReactDebugTool.removeHook(ReactHostOperationHistoryHook); }, getFlushHistory: function () { return flushHistory; @@ -8251,14 +8389,6 @@ endLifeCycleTimer(debugID, timerType); emitEvent('onEndLifeCycleTimer', debugID, timerType); }, - onBeginReconcilerTimer: function (debugID, timerType) { - checkDebugID(debugID); - emitEvent('onBeginReconcilerTimer', debugID, timerType); - }, - onEndReconcilerTimer: function (debugID, timerType) { - checkDebugID(debugID); - emitEvent('onEndReconcilerTimer', debugID, timerType); - }, onError: function (debugID) { if (currentTimerDebugID != null) { endLifeCycleTimer(currentTimerDebugID, currentTimerType); @@ -8275,45 +8405,18 @@ checkDebugID(debugID); emitEvent('onHostOperation', debugID, type, payload); }, - onComponentHasMounted: function (debugID) { - checkDebugID(debugID); - emitEvent('onComponentHasMounted', debugID); - }, - onComponentHasUpdated: function (debugID) { - checkDebugID(debugID); - emitEvent('onComponentHasUpdated', debugID); - }, onSetState: function () { emitEvent('onSetState'); }, - onSetDisplayName: function (debugID, displayName) { - checkDebugID(debugID); - emitEvent('onSetDisplayName', debugID, displayName); - }, onSetChildren: function (debugID, childDebugIDs) { checkDebugID(debugID); childDebugIDs.forEach(checkDebugID); emitEvent('onSetChildren', debugID, childDebugIDs); }, - onSetOwner: function (debugID, ownerDebugID) { + onBeforeMountComponent: function (debugID, element, parentDebugID) { checkDebugID(debugID); - emitEvent('onSetOwner', debugID, ownerDebugID); - }, - onSetParent: function (debugID, parentDebugID) { - checkDebugID(debugID); - emitEvent('onSetParent', debugID, parentDebugID); - }, - onSetText: function (debugID, text) { - checkDebugID(debugID); - emitEvent('onSetText', debugID, text); - }, - onMountRootComponent: function (debugID) { - checkDebugID(debugID); - emitEvent('onMountRootComponent', debugID); - }, - onBeforeMountComponent: function (debugID, element) { - checkDebugID(debugID); - emitEvent('onBeforeMountComponent', debugID, element); + checkDebugID(parentDebugID, true); + emitEvent('onBeforeMountComponent', debugID, element, parentDebugID); }, onMountComponent: function (debugID) { checkDebugID(debugID); @@ -8327,6 +8430,10 @@ checkDebugID(debugID); emitEvent('onUpdateComponent', debugID); }, + onBeforeUnmountComponent: function (debugID) { + checkDebugID(debugID); + emitEvent('onBeforeUnmountComponent', debugID); + }, onUnmountComponent: function (debugID) { checkDebugID(debugID); emitEvent('onUnmountComponent', debugID); @@ -8336,9 +8443,13 @@ } }; - ReactDebugTool.addDevtool(ReactInvalidSetStateWarningDevTool); - ReactDebugTool.addDevtool(ReactComponentTreeDevtool); - ReactDebugTool.addDevtool(ReactChildrenMutationWarningDevtool); + // TODO remove these when RN/www gets updated + ReactDebugTool.addDevtool = ReactDebugTool.addHook; + ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; + + ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); + ReactDebugTool.addHook(ReactComponentTreeHook); + ReactDebugTool.addHook(ReactChildrenMutationWarningHook); var url = ExecutionEnvironment.canUseDOM && window.location.href || ''; if (/[?&]react_perf\b/.test(url)) { ReactDebugTool.beginProfiling(); @@ -8348,7 +8459,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 67 */ +/* 66 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8359,7 +8470,7 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactInvalidSetStateWarningDevTool + * @providesModule ReactInvalidSetStateWarningHook */ 'use strict'; @@ -8374,7 +8485,7 @@ }; } - var ReactInvalidSetStateWarningDevTool = { + var ReactInvalidSetStateWarningHook = { onBeginProcessingChildContext: function () { processingChildContext = true; }, @@ -8386,11 +8497,11 @@ } }; - module.exports = ReactInvalidSetStateWarningDevTool; + module.exports = ReactInvalidSetStateWarningHook; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 68 */ +/* 67 */ /***/ function(module, exports) { /** @@ -8401,14 +8512,14 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactHostOperationHistoryDevtool + * @providesModule ReactHostOperationHistoryHook */ 'use strict'; var history = []; - var ReactHostOperationHistoryDevtool = { + var ReactHostOperationHistoryHook = { onHostOperation: function (debugID, type, payload) { history.push({ instanceID: debugID, @@ -8417,7 +8528,7 @@ }); }, clearHistory: function () { - if (ReactHostOperationHistoryDevtool._preventClearing) { + if (ReactHostOperationHistoryHook._preventClearing) { // Should only be used for tests. return; } @@ -8429,10 +8540,10 @@ } }; - module.exports = ReactHostOperationHistoryDevtool; + module.exports = ReactHostOperationHistoryHook; /***/ }, -/* 69 */ +/* 68 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8443,17 +8554,15 @@ * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * - * @providesModule ReactChildrenMutationWarningDevtool + * @providesModule ReactChildrenMutationWarningHook */ 'use strict'; - var ReactComponentTreeDevtool = __webpack_require__(31); + var ReactComponentTreeHook = __webpack_require__(30); var warning = __webpack_require__(13); - var elements = {}; - function handleElement(debugID, element) { if (element == null) { return; @@ -8476,31 +8585,25 @@ isMutated = true; } } - process.env.NODE_ENV !== 'production' ? warning(Array.isArray(element._shadowChildren) && !isMutated, 'Component\'s children should not be mutated.%s', ReactComponentTreeDevtool.getStackAddendumByID(debugID)) : void 0; + if (!Array.isArray(element._shadowChildren) || isMutated) { + process.env.NODE_ENV !== 'production' ? warning(false, 'Component\'s children should not be mutated.%s', ReactComponentTreeHook.getStackAddendumByID(debugID)) : void 0; + } } - var ReactDOMUnknownPropertyDevtool = { - onBeforeMountComponent: function (debugID, element) { - elements[debugID] = element; + var ReactChildrenMutationWarningHook = { + onMountComponent: function (debugID) { + handleElement(debugID, ReactComponentTreeHook.getElement(debugID)); }, - onBeforeUpdateComponent: function (debugID, element) { - elements[debugID] = element; - }, - onComponentHasMounted: function (debugID) { - handleElement(debugID, elements[debugID]); - delete elements[debugID]; - }, - onComponentHasUpdated: function (debugID) { - handleElement(debugID, elements[debugID]); - delete elements[debugID]; + onUpdateComponent: function (debugID) { + handleElement(debugID, ReactComponentTreeHook.getElement(debugID)); } }; - module.exports = ReactDOMUnknownPropertyDevtool; + module.exports = ReactChildrenMutationWarningHook; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 70 */ +/* 69 */ /***/ function(module, exports, __webpack_require__) { 'use strict'; @@ -8516,7 +8619,7 @@ * @typechecks */ - var performance = __webpack_require__(71); + var performance = __webpack_require__(70); var performanceNow; @@ -8538,7 +8641,7 @@ module.exports = performanceNow; /***/ }, -/* 71 */ +/* 70 */ /***/ function(module, exports, __webpack_require__) { /** @@ -8554,7 +8657,7 @@ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(51); var performance; @@ -8565,7 +8668,7 @@ module.exports = performance || {}; /***/ }, -/* 72 */ +/* 71 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -8804,7 +8907,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 73 */ +/* 72 */ /***/ function(module, exports) { /** @@ -8844,7 +8947,7 @@ module.exports = getEventTarget; /***/ }, -/* 74 */ +/* 73 */ /***/ function(module, exports, __webpack_require__) { /** @@ -8860,7 +8963,7 @@ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(51); var useHasFeature; if (ExecutionEnvironment.canUseDOM) { @@ -8909,7 +9012,7 @@ module.exports = isEventSupported; /***/ }, -/* 75 */ +/* 74 */ /***/ function(module, exports) { /** @@ -8965,7 +9068,7 @@ module.exports = isTextInputElement; /***/ }, -/* 76 */ +/* 75 */ /***/ function(module, exports, __webpack_require__) { /** @@ -8997,7 +9100,7 @@ module.exports = DefaultEventPluginOrder; /***/ }, -/* 77 */ +/* 76 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9013,10 +9116,10 @@ 'use strict'; - var EventConstants = __webpack_require__(44); - var EventPropagators = __webpack_require__(45); - var ReactDOMComponentTree = __webpack_require__(39); - var SyntheticMouseEvent = __webpack_require__(78); + var EventConstants = __webpack_require__(43); + var EventPropagators = __webpack_require__(44); + var ReactDOMComponentTree = __webpack_require__(38); + var SyntheticMouseEvent = __webpack_require__(77); var keyOf = __webpack_require__(27); @@ -9107,7 +9210,7 @@ module.exports = EnterLeaveEventPlugin; /***/ }, -/* 78 */ +/* 77 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9123,10 +9226,10 @@ 'use strict'; - var SyntheticUIEvent = __webpack_require__(79); - var ViewportMetrics = __webpack_require__(80); + var SyntheticUIEvent = __webpack_require__(78); + var ViewportMetrics = __webpack_require__(79); - var getEventModifierState = __webpack_require__(81); + var getEventModifierState = __webpack_require__(80); /** * @interface MouseEvent @@ -9184,7 +9287,7 @@ module.exports = SyntheticMouseEvent; /***/ }, -/* 79 */ +/* 78 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9200,9 +9303,9 @@ 'use strict'; - var SyntheticEvent = __webpack_require__(56); + var SyntheticEvent = __webpack_require__(55); - var getEventTarget = __webpack_require__(73); + var getEventTarget = __webpack_require__(72); /** * @interface UIEvent @@ -9248,7 +9351,7 @@ module.exports = SyntheticUIEvent; /***/ }, -/* 80 */ +/* 79 */ /***/ function(module, exports) { /** @@ -9280,7 +9383,7 @@ module.exports = ViewportMetrics; /***/ }, -/* 81 */ +/* 80 */ /***/ function(module, exports) { /** @@ -9328,7 +9431,7 @@ module.exports = getEventModifierState; /***/ }, -/* 82 */ +/* 81 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9344,7 +9447,7 @@ 'use strict'; - var DOMProperty = __webpack_require__(40); + var DOMProperty = __webpack_require__(39); var MUST_USE_PROPERTY = DOMProperty.injection.MUST_USE_PROPERTY; var HAS_BOOLEAN_VALUE = DOMProperty.injection.HAS_BOOLEAN_VALUE; @@ -9542,7 +9645,7 @@ module.exports = HTMLDOMPropertyConfig; /***/ }, -/* 83 */ +/* 82 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9558,8 +9661,8 @@ 'use strict'; - var DOMChildrenOperations = __webpack_require__(84); - var ReactDOMIDOperations = __webpack_require__(96); + var DOMChildrenOperations = __webpack_require__(83); + var ReactDOMIDOperations = __webpack_require__(95); /** * Abstracts away all functionality of the reconciler that requires knowledge of @@ -9570,23 +9673,14 @@ processChildrenUpdates: ReactDOMIDOperations.dangerouslyProcessChildrenUpdates, - replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup, - - /** - * If a particular environment requires that some resources be cleaned up, - * specify this in the injected Mixin. In the DOM, we would likely want to - * purge any cached node ID lookups. - * - * @private - */ - unmountIDFromEnvironment: function (rootNodeID) {} + replaceNodeWithMarkup: DOMChildrenOperations.dangerouslyReplaceNodeWithMarkup }; module.exports = ReactComponentBrowserEnvironment; /***/ }, -/* 84 */ +/* 83 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -9602,15 +9696,15 @@ 'use strict'; - var DOMLazyTree = __webpack_require__(85); - var Danger = __webpack_require__(91); - var ReactMultiChildUpdateTypes = __webpack_require__(95); - var ReactDOMComponentTree = __webpack_require__(39); - var ReactInstrumentation = __webpack_require__(65); + var DOMLazyTree = __webpack_require__(84); + var Danger = __webpack_require__(90); + var ReactMultiChildUpdateTypes = __webpack_require__(94); + var ReactDOMComponentTree = __webpack_require__(38); + var ReactInstrumentation = __webpack_require__(64); - var createMicrosoftUnsafeLocalFunction = __webpack_require__(88); - var setInnerHTML = __webpack_require__(87); - var setTextContent = __webpack_require__(89); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(87); + var setInnerHTML = __webpack_require__(86); + var setTextContent = __webpack_require__(88); function getNodeAfter(parentNode, node) { // Special case for text components, which return [open, close] comments @@ -9786,7 +9880,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 85 */ +/* 84 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9802,11 +9896,11 @@ 'use strict'; - var DOMNamespaces = __webpack_require__(86); - var setInnerHTML = __webpack_require__(87); + var DOMNamespaces = __webpack_require__(85); + var setInnerHTML = __webpack_require__(86); - var createMicrosoftUnsafeLocalFunction = __webpack_require__(88); - var setTextContent = __webpack_require__(89); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(87); + var setTextContent = __webpack_require__(88); var ELEMENT_NODE_TYPE = 1; var DOCUMENT_FRAGMENT_NODE_TYPE = 11; @@ -9909,7 +10003,7 @@ module.exports = DOMLazyTree; /***/ }, -/* 86 */ +/* 85 */ /***/ function(module, exports) { /** @@ -9934,7 +10028,7 @@ module.exports = DOMNamespaces; /***/ }, -/* 87 */ +/* 86 */ /***/ function(module, exports, __webpack_require__) { /** @@ -9950,13 +10044,13 @@ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); - var DOMNamespaces = __webpack_require__(86); + var ExecutionEnvironment = __webpack_require__(51); + var DOMNamespaces = __webpack_require__(85); var WHITESPACE_TEST = /^[ \r\n\t\f]/; var NONVISIBLE_TEST = /<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/; - var createMicrosoftUnsafeLocalFunction = __webpack_require__(88); + var createMicrosoftUnsafeLocalFunction = __webpack_require__(87); // SVG temp container for IE lacking innerHTML var reusableSVGContainer; @@ -10037,7 +10131,7 @@ module.exports = setInnerHTML; /***/ }, -/* 88 */ +/* 87 */ /***/ function(module, exports) { /** @@ -10074,7 +10168,7 @@ module.exports = createMicrosoftUnsafeLocalFunction; /***/ }, -/* 89 */ +/* 88 */ /***/ function(module, exports, __webpack_require__) { /** @@ -10090,9 +10184,9 @@ 'use strict'; - var ExecutionEnvironment = __webpack_require__(52); - var escapeTextContentForBrowser = __webpack_require__(90); - var setInnerHTML = __webpack_require__(87); + var ExecutionEnvironment = __webpack_require__(51); + var escapeTextContentForBrowser = __webpack_require__(89); + var setInnerHTML = __webpack_require__(86); /** * Set the textContent property of a node, ensuring that whitespace is preserved @@ -10127,7 +10221,7 @@ module.exports = setTextContent; /***/ }, -/* 90 */ +/* 89 */ /***/ function(module, exports) { /** @@ -10235,6 +10329,7 @@ } // end code copied and modified from escape-html + /** * Escapes text to prevent scripting attacks. * @@ -10254,7 +10349,7 @@ module.exports = escapeTextContentForBrowser; /***/ }, -/* 91 */ +/* 90 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -10272,10 +10367,10 @@ var _prodInvariant = __webpack_require__(9); - var DOMLazyTree = __webpack_require__(85); - var ExecutionEnvironment = __webpack_require__(52); + var DOMLazyTree = __webpack_require__(84); + var ExecutionEnvironment = __webpack_require__(51); - var createNodesFromMarkup = __webpack_require__(92); + var createNodesFromMarkup = __webpack_require__(91); var emptyFunction = __webpack_require__(14); var invariant = __webpack_require__(10); @@ -10308,7 +10403,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 92 */ +/* 91 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; @@ -10326,10 +10421,10 @@ /*eslint-disable fb-www/unsafe-html*/ - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(51); - var createArrayFromMixed = __webpack_require__(93); - var getMarkupWrap = __webpack_require__(94); + var createArrayFromMixed = __webpack_require__(92); + var getMarkupWrap = __webpack_require__(93); var invariant = __webpack_require__(10); /** @@ -10397,7 +10492,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 93 */ +/* 92 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; @@ -10473,7 +10568,7 @@ * @return {boolean} */ function hasArrayNature(obj) { - return( + return ( // not null/false !!obj && ( // arrays are objects, NodeLists are functions in Safari @@ -10529,7 +10624,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 94 */ +/* 93 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {'use strict'; @@ -10546,7 +10641,7 @@ /*eslint-disable fb-www/unsafe-html */ - var ExecutionEnvironment = __webpack_require__(52); + var ExecutionEnvironment = __webpack_require__(51); var invariant = __webpack_require__(10); @@ -10629,7 +10724,7 @@ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(5))) /***/ }, -/* 95 */ +/* 94 */ /***/ function(module, exports, __webpack_require__) { /** @@ -10666,7 +10761,7 @@ module.exports = ReactMultiChildUpdateTypes; /***/ }, -/* 96 */ +/* 95 */ /***/ function(module, exports, __webpack_require__) { /** @@ -10682,8 +10777,8 @@ 'use strict'; - var DOMChildrenOperations = __webpack_require__(84); - var ReactDOMComponentTree = __webpack_require__(39); + var DOMChildrenOperations = __webpack_require__(83); + var ReactDOMComponentTree = __webpack_require__(38); /** * Operations used to process updates to DOM nodes. @@ -10705,7 +10800,7 @@ module.exports = ReactDOMIDOperations; /***/ }, -/* 97 */ +/* 96 */ /***/ function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -10726,35 +10821,34 @@ var _prodInvariant = __webpack_require__(9), _assign = __webpack_require__(6); - var AutoFocusUtils = __webpack_require__(98); - var CSSPropertyOperations = __webpack_require__(100); - var DOMLazyTree = __webpack_require__(85); - var DOMNamespaces = __webpack_require__(86); - var DOMProperty = __webpack_require__(40); - var DOMPropertyOperations = __webpack_require__(108); - var EventConstants = __webpack_require__(44); - var EventPluginHub = __webpack_require__(46); - var EventPluginRegistry = __webpack_require__(47); - var ReactBrowserEventEmitter = __webpack_require__(114); - var ReactComponentBrowserEnvironment = __webpack_require__(83); - var ReactDOMButton = __webpack_require__(117); - var ReactDOMComponentFlags = __webpack_require__(41); - var ReactDOMComponentTree = __webpack_require__(39); - var ReactDOMInput = __webpack_require__(119); - var ReactDOMOption = __webpack_require__(121); - var ReactDOMSelect = __webpack_require__(122); - var ReactDOMTextarea = __webpack_require__(123); - var ReactInstrumentation = __webpack_require__(65); - var ReactMultiChild = __webpack_require__(124); - var ReactServerRenderingTransaction = __webpack_require__(136); + var AutoFocusUtils = __webpack_require__(97); + var CSSPropertyOperations = __webpack_require__(99); + var DOMLazyTree = __webpack_require__(84); + var DOMNamespaces = __webpack_require__(85); + var DOMProperty = __webpack_require__(39); + var DOMPropertyOperations = __webpack_require__(107); + var EventConstants = __webpack_require__(43); + var EventPluginHub = __webpack_require__(45); + var EventPluginRegistry = __webpack_require__(46); + var ReactBrowserEventEmitter = __webpack_require__(109); + var ReactDOMButton = __webpack_require__(112); + var ReactDOMComponentFlags = __webpack_require__(40); + var ReactDOMComponentTree = __webpack_require__(38); + var ReactDOMInput = __webpack_require__(114); + var ReactDOMOption = __webpack_require__(116); + var ReactDOMSelect = __webpack_require__(117); + var ReactDOMTextarea = __webpack_require__(118); + var ReactInstrumentation = __webpack_require__(64); + var ReactMultiChild = __webpack_require__(119); + var ReactServerRenderingTransaction = __webpack_require__(131); var emptyFunction = __webpack_require__(14); - var escapeTextContentForBrowser = __webpack_require__(90); + var escapeTextContentForBrowser = __webpack_require__(89); var invariant = __webpack_require__(10); - var isEventSupported = __webpack_require__(74); + var isEventSupported = __webpack_require__(73); var keyOf = __webpack_require__(27); - var shallowEqual = __webpack_require__(131); - var validateDOMNesting = __webpack_require__(139); + var shallowEqual = __webpack_require__(126); + var validateDOMNesting = __webpack_require__(134); var warning = __webpack_require__(13); var Flags = ReactDOMComponentFlags; @@ -10911,7 +11005,8 @@ setContentChildForInstrumentation = function (content) { var hasExistingContent = this._contentDebugID != null; var debugID = this._debugID; - var contentDebugID = debugID + '#text'; + // This ID represents the inlined child that has no backing instance: + var contentDebugID = -debugID; if (content == null) { if (hasExistingContent) { @@ -10922,17 +11017,11 @@ } this._contentDebugID = contentDebugID; - var text = '' + content; - - ReactInstrumentation.debugTool.onSetDisplayName(contentDebugID, '#text'); - ReactInstrumentation.debugTool.onSetParent(contentDebugID, debugID); - ReactInstrumentation.debugTool.onSetText(contentDebugID, text); - if (hasExistingContent) { ReactInstrumentation.debugTool.onBeforeUpdateComponent(contentDebugID, content); ReactInstrumentation.debugTool.onUpdateComponent(contentDebugID); } else { - ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content); + ReactInstrumentation.debugTool.onBeforeMountComponent(contentDebugID, content, debugID); ReactInstrumentation.debugTool.onMountComponent(contentDebugID); ReactInstrumentation.debugTool.onSetChildren(debugID, [contentDebugID]); } @@ -11093,8 +11182,8 @@ this._previousStyleCopy = null; this._hostNode = null; this._hostParent = null; - this._rootNodeID = null; - this._domID = null; + this._rootNodeID = 0; + this._domID = 0; this._hostContainerInfo = null; this._wrapperState = null; this._topLevelWrapper = null; @@ -11115,14 +11204,12 @@ * * @internal * @param {ReactReconcileTransaction|ReactServerRenderingTransaction} transaction - * @param {?ReactDOMComponent} the containing DOM component instance + * @param {?ReactDOMComponent} the parent component instance * @param {?object} info about the host container * @param {object} context * @return {string} The computed markup. */ mountComponent: function (transaction, hostParent, hostContainerInfo, context) { - var _this = this; - this._rootNodeID = globalIdCounter++; this._domID = hostContainerInfo._idCounter++; this._hostParent = hostParent; @@ -11278,15 +11365,6 @@ break; } - if (process.env.NODE_ENV !== 'production') { - if (this._debugID) { - var callback = function () { - return ReactInstrumentation.debugTool.onComponentHasMounted(_this._debugID); - }; - transaction.getReactMountReady().enqueue(callback, this); - } - } - return mountImage; }, @@ -11455,8 +11533,6 @@ * @overridable */ updateComponent: function (transaction, prevElement, nextElement, context) { - var _this2 = this; - var lastProps = prevElement.props; var nextProps = this._currentElement.props; @@ -11466,7 +11542,6 @@ nextProps = ReactDOMButton.getHostProps(this, nextProps); break; case 'input': - ReactDOMInput.updateWrapper(this); lastProps = ReactDOMInput.getHostProps(this, lastProps); nextProps = ReactDOMInput.getHostProps(this, nextProps); break; @@ -11479,7 +11554,6 @@ nextProps = ReactDOMSelect.getHostProps(this, nextProps); break; case 'textarea': - ReactDOMTextarea.updateWrapper(this); lastProps = ReactDOMTextarea.getHostProps(this, lastProps); nextProps = ReactDOMTextarea.getHostProps(this, nextProps); break; @@ -11489,19 +11563,21 @@ this._updateDOMProperties(lastProps, nextProps, transaction); this._updateDOMChildren(lastProps, nextProps, transaction, context); - if (this._tag === 'select') { - // value update needs to occur after