Comparing version 1.12.3 to 1.13.0
@@ -93,3 +93,3 @@ define(["./kernel", "../has", "./lang"], function(dojo, has, lang){ | ||
function inherited(args, a, f){ | ||
function inherited(args, a, f, g){ | ||
var name, chains, bases, caller, meta, base, proto, opf, pos, | ||
@@ -99,10 +99,27 @@ cache = this._inherited = this._inherited || {}; | ||
// crack arguments | ||
if(typeof args == "string"){ | ||
if(typeof args === "string"){ | ||
name = args; | ||
args = a; | ||
a = f; | ||
f = g; | ||
} | ||
f = 0; | ||
caller = args.callee; | ||
if(typeof args === "function"){ | ||
// support strict mode | ||
caller = args; | ||
args = a; | ||
a = f; | ||
}else{ | ||
try{ | ||
caller = args.callee; | ||
}catch (e){ | ||
if(e instanceof TypeError){ | ||
// caller was defined in a strict-mode context | ||
err("strict mode inherited() requires the caller function to be passed before arguments", this.declaredClass); | ||
}else{ | ||
throw e; | ||
} | ||
} | ||
} | ||
name = name || caller.nom; | ||
@@ -112,2 +129,3 @@ if(!name){ | ||
} | ||
f = g = 0; | ||
@@ -204,12 +222,20 @@ meta = this.constructor._meta; | ||
function getInherited(name, args){ | ||
if(typeof name == "string"){ | ||
function getInherited(name, args, a){ | ||
if(typeof name === "string"){ | ||
if (typeof args === "function") { | ||
return this.__inherited(name, args, a, true); | ||
} | ||
return this.__inherited(name, args, true); | ||
} | ||
else if (typeof name === "function") { | ||
return this.__inherited(name, args, true); | ||
} | ||
return this.__inherited(name, true); | ||
} | ||
function inherited__debug(args, a1, a2){ | ||
var f = this.getInherited(args, a1); | ||
if(f){ return f.apply(this, a2 || a1 || args); } | ||
function inherited__debug(args, a1, a2, a3){ | ||
var f = this.getInherited(args, a1, a2); | ||
if(f){ | ||
return f.apply(this, a3 || a2 || a1 || args); | ||
} | ||
// intentionally no return if a super method was not found | ||
@@ -340,14 +366,14 @@ } | ||
function createSubclass(mixins, props){ | ||
// crack parameters | ||
if(!(mixins instanceof Array || typeof mixins == 'function')){ | ||
props = mixins; | ||
mixins = undefined; | ||
} | ||
function createSubclass(mixins, props){ | ||
// crack parameters | ||
if(!(mixins instanceof Array || typeof mixins === 'function')){ | ||
props = mixins; | ||
mixins = undefined; | ||
} | ||
props = props || {}; | ||
mixins = mixins || []; | ||
props = props || {}; | ||
mixins = mixins || []; | ||
return declare([this].concat(mixins), props); | ||
} | ||
return declare([this].concat(mixins), props); | ||
} | ||
@@ -874,3 +900,3 @@ // chained constructor compatible with the legacy declare() | ||
inherited: function(name, args, newArgs){ | ||
inherited: function(name, caller, args, newArgs){ | ||
// summary: | ||
@@ -883,2 +909,14 @@ // Calls a super method. | ||
// declare(), and it cannot be determined. | ||
// caller: Function? | ||
// The reference to the calling function. Required only if the | ||
// call to "this.inherited" occurs from within strict-mode code. | ||
// If the caller is omitted within strict-mode code, an error will | ||
// be thrown. | ||
// The best way to obtain a reference to the calling function is to | ||
// use a named function expression (i.e. place a function name | ||
// after the "function" keyword and before the open paren, as in | ||
// "function fn(a, b)"). If the function is parsed as an expression | ||
// and not a statement (i.e. it's not by itself on its own line), | ||
// the function name will only be accessible as an identifier from | ||
// within the body of the function. | ||
// args: Arguments | ||
@@ -947,6 +985,16 @@ // The caller supply this argument, which should be the original | ||
// | }); | ||
// example: | ||
// | "use strict"; | ||
// | // class is defined in strict-mode code, | ||
// | // so caller must be passed before arguments. | ||
// | var B = declare(A, { | ||
// | // using a named function expression with "fn" as the name. | ||
// | method: function fn(a, b) { | ||
// | this.inherited(fn, arguments); | ||
// | } | ||
// | }); | ||
return {}; // Object | ||
}, | ||
getInherited: function(name, args){ | ||
getInherited: function(name, caller, args){ | ||
// summary: | ||
@@ -959,2 +1007,7 @@ // Returns a super method. | ||
// declare(), and it cannot be determined. | ||
// caller: Function? | ||
// The caller function. This is required when running in | ||
// strict-mode code. A reference to the caller function | ||
// can be obtained by using a named function expression | ||
// (e.g. function fn(a,b) {...}). | ||
// args: Arguments | ||
@@ -982,2 +1035,15 @@ // The caller supply this argument, which should be the original | ||
// | }); | ||
// example: | ||
// | "use strict;" // first line of function or file | ||
// | //... | ||
// | var B = declare(A, { | ||
// | // Using a named function expression with "fn" as the name, | ||
// | // since we're in strict mode. | ||
// | method: function fn(a, b){ | ||
// | var super = this.getInherited(fn, arguments); | ||
// | if(super){ | ||
// | return super.apply(this, arguments); | ||
// | } | ||
// | } | ||
// | }); | ||
return {}; // Object | ||
@@ -984,0 +1050,0 @@ }, |
@@ -82,3 +82,3 @@ define(["../global", "../has", "./config", "require", "module"], function(global, has, config, require, module){ | ||
var rev = "$Rev: 82d5dd3 $".match(/[0-9a-f]{7,}/); | ||
var rev = "$Rev: aaa6750 $".match(/[0-9a-f]{7,}/); | ||
dojo.version = { | ||
@@ -96,3 +96,3 @@ // summary: | ||
major: 1, minor: 12, patch: 3, flag: "", | ||
major: 1, minor: 13, patch: 0, flag: "", | ||
revision: rev ? rev[0] : NaN, | ||
@@ -99,0 +99,0 @@ toString: function(){ |
{ | ||
"name": "dojo", | ||
"version": "1.12.3", | ||
"version": "1.13.0", | ||
"directories": { | ||
@@ -14,3 +14,3 @@ "lib": "." | ||
"sinon": "1.12.2", | ||
"dojo": "1.12.3" | ||
"dojo": "1.13.0" | ||
}, | ||
@@ -17,0 +17,0 @@ "main": "main", |
@@ -107,2 +107,13 @@ define([ | ||
"catch": function(errback){ | ||
// summary: | ||
// Add new errbacks to the promise. Follows ECMA specification naming. | ||
// errback: Function? | ||
// Callback to be invoked when the promise is rejected. | ||
// returns: dojo/promise/Promise | ||
// Returns a new promise for the result of the errback. | ||
return this.then(null, errback); | ||
}, | ||
otherwise: function(errback){ | ||
@@ -109,0 +120,0 @@ // summary: |
@@ -1,31 +0,80 @@ | ||
# dojo | ||
dojo | ||
==== | ||
**dojo** is the foundation package of the Dojo Toolkit. Sometimes referred to as the “core”, it contains the most | ||
generally applicable sub-packages and modules. The dojo package covers a wide range of functionality like AJAX, DOM | ||
manipulation, class-type programming, events, promises, data stores, drag-and-drop and internationalization libraries. | ||
This is the foundation package for the Dojo 1 Toolkit. While still being maintained, new development is focused on Dojo 2. | ||
## Installing | ||
Checkout the [Dojo 2 website](https://dojo.io/) or if you want a more detailed technical status and overview, checkout [`dojo/meta`](https://github.com/dojo/meta). | ||
Installation instructions are available at [dojotoolkit.org/download][download]. | ||
This package is sometimes | ||
referred to as the “core”, it contains the most generally applicable sub-packages | ||
and modules. The dojo package covers a wide range of functionality like Ajax, DOM | ||
manipulation, class-type programming, events, promises, data stores, | ||
drag-and-drop and internationalization libraries. | ||
## Getting Started | ||
Installing | ||
---------- | ||
Installation instructions are available at | ||
[dojotoolkit.org/download](<http://dojotoolkit.org/download/>). | ||
Getting Started | ||
--------------- | ||
If you are starting out with Dojo, the following resources are available to you: | ||
* [Tutorials][] | ||
* [Reference Guide][] | ||
* [API Documentation][] | ||
* [Community Forum][] | ||
- [Tutorials](<http://dojotoolkit.org/documentation/>) | ||
## License and Copyright | ||
- [Reference Guide](<http://dojotoolkit.org/reference-guide/>) | ||
The Dojo Toolkit (including this package) is dual licensed under BSD 3-Clause and AFL. For more information on the | ||
license please see the [License Information][]. The Dojo Toolkit is Copyright (c) 2005-2016, The JS Foundation. All | ||
rights reserved. | ||
- [API Documentation](<http://dojotoolkit.org/api/>) | ||
[download]: http://dojotoolkit.org/download/ | ||
[Tutorials]: http://dojotoolkit.org/documentation/ | ||
[Reference Guide]: http://dojotoolkit.org/reference-guide/ | ||
[API Documentation]: http://dojotoolkit.org/api/ | ||
[Community Forum]: http://dojotoolkit.org/community/ | ||
[License Information]: http://dojotoolkit.org/license | ||
- [Community Forum](<http://dojotoolkit.org/community/>) | ||
What to Use Dojo For and When to Use It | ||
--------------------------------------- | ||
The following is a brief sampling of some of the areas where Dojo may prove to | ||
be the right tool for your next project: | ||
- For keeping your code fast and maintainable, Dojo offers an asynchronous | ||
module definition (AMD) loader -- encapsulating pieces of code into useful | ||
units, loading small JavaScript files only when they are needed, and loading | ||
files separately even when they are dependent on one another. | ||
- When you want to easily extend existing classes, share functionality among a | ||
number of classes, and maximize code reuse, Dojo provides class-like | ||
inheritance and “mixins.” | ||
- For creating advanced and customizable user interfaces out of refined, | ||
efficient, and modular pieces, Dojo’s Dijit framework offers several dozen | ||
enterprise-ready widgets -- including buttons, textboxes, form widgets with | ||
built-in validation, layout elements, and much more -- along with themes to | ||
lend them a consistent look. All of this is available for mobile | ||
environments as well. | ||
- For working with advanced vector graphics, Dojo’s GFX API can render | ||
graphics in a wide variety of formats, with support for seamless | ||
manipulation (skewing, rotating, resizing), gradients, responding to mouse | ||
events, and more. | ||
- The `dojox/charting` library supports powerful data visualization and | ||
dynamic charting, including a variety of 2D plots and animated charting | ||
elements. | ||
- When you need feature-rich, lightweight, and mobile-friendly grids/tables, | ||
Dojo offers the `dgrid` widget, along with customizable default themes and | ||
accompanying features such as in-cell editing, row/cell selection, column | ||
resizing/reordering, keyboard handling, pagination, and more. | ||
- Dojo is the officially supported framework for the ArcGIS API for | ||
JavaScript, one of the most widely used enterprise-grade APIs for web | ||
mapping and spatial analysis -- learning to use Dojo will open doors to | ||
creating richer web mapping applications using that API. | ||
License and Copyright | ||
--------------------- | ||
The Dojo Toolkit (including this package) is dual licensed under BSD 3-Clause | ||
and AFL. For more information on the license please see the [License | ||
Information](<http://dojotoolkit.org/license>). The Dojo Toolkit is Copyright | ||
(c) 2005-2017, JS Foundation. All rights reserved. |
@@ -18,3 +18,7 @@ define([ | ||
if(tval && typeof tval === 'object' && sval && typeof sval === 'object'){ | ||
exports.deepCopy(tval, sval); | ||
if(sval instanceof Date){ | ||
target[name] = new Date(sval); | ||
}else{ | ||
exports.deepCopy(tval, sval); | ||
} | ||
}else{ | ||
@@ -21,0 +25,0 @@ target[name] = sval; |
@@ -97,3 +97,4 @@ define(["../_base/xhr", "../_base/lang", "../json", "../_base/declare", "./util/QueryResults" /*=====, "./api/Store" =====*/ | ||
handleAs: "json", | ||
headers: headers | ||
headers: headers, | ||
timeout: options && options.timeout | ||
}); | ||
@@ -137,3 +138,4 @@ }, | ||
"If-None-Match": options.overwrite === false ? "*" : null | ||
}, this.headers, options.headers) | ||
}, this.headers, options.headers), | ||
timeout: options && options.timeout | ||
}); | ||
@@ -166,3 +168,4 @@ }, | ||
url: this._getTarget(id), | ||
headers: lang.mixin({}, this.headers, options.headers) | ||
headers: lang.mixin({}, this.headers, options.headers), | ||
timeout: options && options.timeout | ||
}); | ||
@@ -216,3 +219,4 @@ }, | ||
handleAs: "json", | ||
headers: headers | ||
headers: headers, | ||
timeout: options && options.timeout | ||
}); | ||
@@ -219,0 +223,0 @@ results.total = results.then(function(){ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3646162
113745
81