Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions site/jekyll/getting-started/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Replace the contents of the new view file with the following:
</head>
<body>
<div id="content"></div>
<script src="http://fb.me/react-0.12.1.js"></script>
<script src="http://fb.me/react-0.12.2.js"></script>
<script src="@Url.Content("~/Scripts/Tutorial.jsx")"></script>
</body>
</html>
Expand Down Expand Up @@ -235,7 +235,7 @@ Markdown is a simple way to format your text inline. For example, surrounding te
First, add the third-party **Showdown** library to your application. This is a JavaScript library which takes Markdown text and converts it to raw HTML. We will add it via NuGet (search for "Showdown" and install it, similar to how you installed ReactJS.NET earlier) and reference the script tag in your view:

```html{2}
<script src="http://fb.me/react-0.12.1.js"></script>
<script src="http://fb.me/react-0.12.2.js"></script>
<script src="@Url.Content("~/Scripts/showdown.min.js")"></script>
<script src="@Url.Content("~/Scripts/Tutorial.jsx")"></script>
```
Expand Down Expand Up @@ -848,7 +848,7 @@ Now that the bundle has been registered, we need to reference it from the view:
</head>
<body>
<div id="content"></div>
<script src="http://fb.me/react-0.12.1.js"></script>
<script src="http://fb.me/react-0.12.2.js"></script>
@Scripts.Render("~/bundles/main")
@Html.ReactInitJavaScript()
</body>
Expand Down Expand Up @@ -934,7 +934,7 @@ In the view, we will accept the list of comments as the model, and use `Html.Rea
submitUrl = Url.Action("AddComment"),
pollInterval = 2000,
})
<script src="http://fb.me/react-0.12.1.js"></script>
<script src="http://fb.me/react-0.12.2.js"></script>
<script src="@Url.Content("~/Scripts/showdown.min.js")"></script>
<script src="@Url.Content("~/Scripts/Tutorial.jsx")"></script>
@Html.ReactInitJavaScript()
Expand Down
2 changes: 1 addition & 1 deletion site/jekyll/guides/cassette.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ render from your view using Cassette:
</head>
<body>
...
<script src="http://fb.me/react-0.12.1.min.js"></script>
<script src="http://fb.me/react-0.12.2.min.js"></script>
@Bundles.RenderScripts()
</body>
```
Expand Down
4 changes: 2 additions & 2 deletions site/jekyll/guides/server-side-rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ code.
```html
<!-- Load all your scripts normally before calling ReactInitJavaScript -->
<!-- Assumes minification/combination is configured as per previous section -->
<script src="http://fb.me/react-0.12.1.min.js"></script>
<script src="http://fb.me/react-0.12.2.min.js"></script>
@Scripts.Render("~/bundles/main")
@Html.ReactInitJavaScript()
```
Expand All @@ -62,7 +62,7 @@ code.
</div>
</div>

<script src="http://fb.me/react-0.12.1.min.js"></script>
<script src="http://fb.me/react-0.12.2.min.js"></script>
<script src="/Scripts/HelloWorld.js"></script>
<script>React.render(HelloWorld({"name":"Daniel"}), document.getElementById("react1"));</script>
```
Expand Down
2 changes: 1 addition & 1 deletion site/jekyll/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ bundles.Add(new JsxBundle("~/bundles/main").Include(
})

<!-- Initialise the component in JavaScript too -->
<script src="http://fb.me/react-0.12.1.min.js"></script>
<script src="http://fb.me/react-0.12.2.min.js"></script>
@Scripts.Render("~/bundles/main")
@Html.ReactInitJavaScript()
```
Expand Down
2 changes: 1 addition & 1 deletion src/React.Sample.Cassette/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@Html.React("CommentsBox", new { initialComments = Model.Comments })

<!-- Load all required scripts (React + the site's scripts) -->
<script src="http://fb.me/react-0.12.1.min.js"></script>
<script src="http://fb.me/react-0.12.2.min.js"></script>
@Bundles.RenderScripts()
<!-- Render the code to initialise the component -->
@Html.ReactInitJavaScript()
Expand Down
2 changes: 1 addition & 1 deletion src/React.Sample.Mvc4/Views/Home/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
@Html.React("CommentsBox", new { initialComments = Model.Comments })

<!-- Load all required scripts (React + the site's scripts) -->
<script src="http://fb.me/react-0.12.1.js"></script>
<script src="http://fb.me/react-0.12.2.js"></script>
@Scripts.Render("~/bundles/main")
<!-- Render the code to initialise the component -->
@Html.ReactInitJavaScript()
Expand Down
6 changes: 3 additions & 3 deletions src/React/Resources/JSXTransformer.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* JSXTransformer v0.12.1
* JSXTransformer v0.12.2
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSXTransformer=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/**
Expand Down Expand Up @@ -14779,7 +14779,7 @@ function addDisplayName(displayName, object, state) {

if (safe) {
utils.catchup(object['arguments'][0].range[0] + 1, state);
utils.append("displayName: '" + displayName + "',", state);
utils.append('displayName: "' + displayName + '",', state);
}
}
}
Expand Down Expand Up @@ -15072,7 +15072,7 @@ function renderXJSExpressionContainer(traverse, object, isLast, path, state) {
function quoteAttrName(attr) {
// Quote invalid JS identifiers.
if (!/^[a-z_$][a-z\d_$]*$/i.test(attr)) {
return "'" + attr + "'";
return '"' + attr + '"';
}
return attr;
}
Expand Down
67 changes: 44 additions & 23 deletions src/React/Resources/react-with-addons.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* React (with addons) v0.12.1
* React (with addons) v0.12.2
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.React=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
/**
Expand Down Expand Up @@ -431,7 +431,6 @@ module.exports = CSSCore;
*/
var isUnitlessNumber = {
columnCount: true,
fillOpacity: true,
flex: true,
flexGrow: true,
flexShrink: true,
Expand All @@ -443,7 +442,11 @@ var isUnitlessNumber = {
orphans: true,
widows: true,
zIndex: true,
zoom: true
zoom: true,

// SVG-related properties
fillOpacity: true,
strokeOpacity: true
};

/**
Expand Down Expand Up @@ -3661,7 +3664,11 @@ var HTMLDOMPropertyConfig = {
draggable: null,
encType: null,
form: MUST_USE_ATTRIBUTE,
formAction: MUST_USE_ATTRIBUTE,
formEncType: MUST_USE_ATTRIBUTE,
formMethod: MUST_USE_ATTRIBUTE,
formNoValidate: HAS_BOOLEAN_VALUE,
formTarget: MUST_USE_ATTRIBUTE,
frameBorder: MUST_USE_ATTRIBUTE,
height: MUST_USE_ATTRIBUTE,
hidden: MUST_USE_ATTRIBUTE | HAS_BOOLEAN_VALUE,
Expand All @@ -3676,6 +3683,8 @@ var HTMLDOMPropertyConfig = {
list: MUST_USE_ATTRIBUTE,
loop: MUST_USE_PROPERTY | HAS_BOOLEAN_VALUE,
manifest: MUST_USE_ATTRIBUTE,
marginHeight: null,
marginWidth: null,
max: null,
maxLength: MUST_USE_ATTRIBUTE,
media: MUST_USE_ATTRIBUTE,
Expand Down Expand Up @@ -4400,7 +4409,7 @@ if ("production" !== "development") {

// Version exists only in the open-source version of React, not in Facebook's
// internal version.
React.version = '0.12.1';
React.version = '0.12.2';

module.exports = React;

Expand Down Expand Up @@ -9907,7 +9916,7 @@ ReactElement.createElement = function(type, config, children) {
}

// Resolve default props
if (type.defaultProps) {
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) {
if (typeof props[propName] === 'undefined') {
Expand Down Expand Up @@ -10000,6 +10009,7 @@ var ReactPropTypeLocations = _dereq_("./ReactPropTypeLocations");
var ReactCurrentOwner = _dereq_("./ReactCurrentOwner");

var monitorCodeUse = _dereq_("./monitorCodeUse");
var warning = _dereq_("./warning");

/**
* Warn if there's no key explicitly set on dynamic arrays of children or
Expand Down Expand Up @@ -10197,6 +10207,15 @@ function checkPropTypes(componentName, propTypes, props, location) {
var ReactElementValidator = {

createElement: function(type, props, children) {
// We warn in this case but don't throw. We expect the element creation to
// succeed and there will likely be errors in render.
("production" !== "development" ? warning(
type != null,
'React.createElement: type should not be null or undefined. It should ' +
'be a string (for DOM elements) or a ReactClass (for composite ' +
'components).'
) : null);

var element = ReactElement.createElement.apply(this, arguments);

// The result can be nullish if a mock or a custom function is used.
Expand All @@ -10209,22 +10228,24 @@ var ReactElementValidator = {
validateChildKeys(arguments[i], type);
}

var name = type.displayName;
if (type.propTypes) {
checkPropTypes(
name,
type.propTypes,
element.props,
ReactPropTypeLocations.prop
);
}
if (type.contextTypes) {
checkPropTypes(
name,
type.contextTypes,
element._context,
ReactPropTypeLocations.context
);
if (type) {
var name = type.displayName;
if (type.propTypes) {
checkPropTypes(
name,
type.propTypes,
element.props,
ReactPropTypeLocations.prop
);
}
if (type.contextTypes) {
checkPropTypes(
name,
type.contextTypes,
element._context,
ReactPropTypeLocations.context
);
}
}
return element;
},
Expand All @@ -10242,7 +10263,7 @@ var ReactElementValidator = {

module.exports = ReactElementValidator;

},{"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactPropTypeLocations":78,"./monitorCodeUse":150}],60:[function(_dereq_,module,exports){
},{"./ReactCurrentOwner":42,"./ReactElement":58,"./ReactPropTypeLocations":78,"./monitorCodeUse":150,"./warning":160}],60:[function(_dereq_,module,exports){
/**
* Copyright 2014, Facebook, Inc.
* All rights reserved.
Expand Down Expand Up @@ -14285,7 +14306,7 @@ var ReactTestUtils = {
mockComponent: function(module, mockTagName) {
mockTagName = mockTagName || module.mockTagName || "div";

var ConvenienceConstructor = React.createClass({displayName: 'ConvenienceConstructor',
var ConvenienceConstructor = React.createClass({displayName: "ConvenienceConstructor",
render: function() {
return React.createElement(
mockTagName,
Expand Down