2 YUI 3.13.0 (build 508226d)
3 Copyright 2013 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
8 YUI.add('attribute-complex', function (Y, NAME) {
11 * Adds support for attribute providers to handle complex attributes in the constructor
14 * @submodule attribute-complex
16 * @deprecated AttributeComplex's overrides are now part of AttributeCore.
19 var Attribute = Y.Attribute;
21 Attribute.Complex = function() {};
22 Attribute.Complex.prototype = {
25 * Utility method to split out simple attribute name/value pairs ("x")
26 * from complex attribute name/value pairs ("x.y.z"), so that complex
27 * attributes can be keyed by the top level attribute name.
29 * @method _normAttrVals
30 * @param {Object} valueHash An object with attribute name/value pairs
32 * @return {Object} An object literal with 2 properties - "simple" and "complex",
33 * containing simple and complex attribute values respectively keyed
34 * by the top level attribute name, or null, if valueHash is falsey.
38 _normAttrVals : Attribute.prototype._normAttrVals,
41 * Returns the initial value of the given attribute from
42 * either the default configuration provided, or the
43 * over-ridden value if it exists in the set of initValues
44 * provided and the attribute is not read-only.
46 * @param {String} attr The name of the attribute
47 * @param {Object} cfg The attribute configuration object
48 * @param {Object} initValues The object with simple and complex attribute name/value pairs returned from _normAttrVals
50 * @return {Any} The initial value of the attribute.
52 * @method _getAttrInitVal
55 _getAttrInitVal : Attribute.prototype._getAttrInitVal
59 // Consistency with the rest of the Attribute addons for now.
60 Y.AttributeComplex = Attribute.Complex;
63 }, '3.13.0', {"requires": ["attribute-base"]});