|
1 YUI.add('loader-base', function (Y, NAME) { |
|
2 |
|
3 /** |
|
4 * The YUI loader core |
|
5 * @module loader |
|
6 * @submodule loader-base |
|
7 */ |
|
8 |
|
9 (function() { |
|
10 var VERSION = Y.version, |
|
11 BUILD = '/build/', |
|
12 ROOT = VERSION + '/', |
|
13 CDN_BASE = Y.Env.base, |
|
14 GALLERY_VERSION = 'gallery-2014.02.20-23-55', |
|
15 TNT = '2in3', |
|
16 TNT_VERSION = '4', |
|
17 YUI2_VERSION = '2.9.0', |
|
18 COMBO_BASE = CDN_BASE + 'combo?', |
|
19 META = { |
|
20 version: VERSION, |
|
21 root: ROOT, |
|
22 base: Y.Env.base, |
|
23 comboBase: COMBO_BASE, |
|
24 skin: { |
|
25 defaultSkin: 'sam', |
|
26 base: 'assets/skins/', |
|
27 path: 'skin.css', |
|
28 after: [ |
|
29 'cssreset', |
|
30 'cssfonts', |
|
31 'cssgrids', |
|
32 'cssbase', |
|
33 'cssreset-context', |
|
34 'cssfonts-context' |
|
35 ] |
|
36 }, |
|
37 groups: {}, |
|
38 patterns: {} |
|
39 }, |
|
40 groups = META.groups, |
|
41 yui2Update = function(tnt, yui2, config) { |
|
42 var root = TNT + '.' + |
|
43 (tnt || TNT_VERSION) + '/' + |
|
44 (yui2 || YUI2_VERSION) + BUILD, |
|
45 base = (config && config.base) ? config.base : CDN_BASE, |
|
46 combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE; |
|
47 |
|
48 groups.yui2.base = base + root; |
|
49 groups.yui2.root = root; |
|
50 groups.yui2.comboBase = combo; |
|
51 }, |
|
52 galleryUpdate = function(tag, config) { |
|
53 var root = (tag || GALLERY_VERSION) + BUILD, |
|
54 base = (config && config.base) ? config.base : CDN_BASE, |
|
55 combo = (config && config.comboBase) ? config.comboBase : COMBO_BASE; |
|
56 |
|
57 groups.gallery.base = base + root; |
|
58 groups.gallery.root = root; |
|
59 groups.gallery.comboBase = combo; |
|
60 }; |
|
61 |
|
62 |
|
63 groups[VERSION] = {}; |
|
64 |
|
65 groups.gallery = { |
|
66 ext: false, |
|
67 combine: true, |
|
68 comboBase: COMBO_BASE, |
|
69 update: galleryUpdate, |
|
70 patterns: { |
|
71 'gallery-': {}, |
|
72 'lang/gallery-': {}, |
|
73 'gallerycss-': { |
|
74 type: 'css' |
|
75 } |
|
76 } |
|
77 }; |
|
78 |
|
79 groups.yui2 = { |
|
80 combine: true, |
|
81 ext: false, |
|
82 comboBase: COMBO_BASE, |
|
83 update: yui2Update, |
|
84 patterns: { |
|
85 'yui2-': { |
|
86 configFn: function(me) { |
|
87 if (/-skin|reset|fonts|grids|base/.test(me.name)) { |
|
88 me.type = 'css'; |
|
89 me.path = me.path.replace(/\.js/, '.css'); |
|
90 // this makes skins in builds earlier than |
|
91 // 2.6.0 work as long as combine is false |
|
92 me.path = me.path.replace(/\/yui2-skin/, |
|
93 '/assets/skins/sam/yui2-skin'); |
|
94 } |
|
95 } |
|
96 } |
|
97 } |
|
98 }; |
|
99 |
|
100 galleryUpdate(); |
|
101 yui2Update(); |
|
102 |
|
103 if (YUI.Env[VERSION]) { |
|
104 Y.mix(META, YUI.Env[VERSION], false, [ |
|
105 'modules', |
|
106 'groups', |
|
107 'skin' |
|
108 ], 0, true); |
|
109 } |
|
110 |
|
111 YUI.Env[VERSION] = META; |
|
112 }()); |
|
113 /*jslint forin: true, maxlen: 350 */ |
|
114 |
|
115 /** |
|
116 * Loader dynamically loads script and css files. It includes the dependency |
|
117 * information for the version of the library in use, and will automatically pull in |
|
118 * dependencies for the modules requested. It can also load the |
|
119 * files from the Yahoo! CDN, and it can utilize the combo service provided on |
|
120 * this network to reduce the number of http connections required to download |
|
121 * YUI files. |
|
122 * |
|
123 * @module loader |
|
124 * @main loader |
|
125 * @submodule loader-base |
|
126 */ |
|
127 |
|
128 var NOT_FOUND = {}, |
|
129 NO_REQUIREMENTS = [], |
|
130 MAX_URL_LENGTH = 1024, |
|
131 GLOBAL_ENV = YUI.Env, |
|
132 GLOBAL_LOADED = GLOBAL_ENV._loaded, |
|
133 CSS = 'css', |
|
134 JS = 'js', |
|
135 INTL = 'intl', |
|
136 DEFAULT_SKIN = 'sam', |
|
137 VERSION = Y.version, |
|
138 ROOT_LANG = '', |
|
139 YObject = Y.Object, |
|
140 oeach = YObject.each, |
|
141 yArray = Y.Array, |
|
142 _queue = GLOBAL_ENV._loaderQueue, |
|
143 META = GLOBAL_ENV[VERSION], |
|
144 SKIN_PREFIX = 'skin-', |
|
145 L = Y.Lang, |
|
146 ON_PAGE = GLOBAL_ENV.mods, |
|
147 modulekey, |
|
148 _path = function(dir, file, type, nomin) { |
|
149 var path = dir + '/' + file; |
|
150 if (!nomin) { |
|
151 path += '-min'; |
|
152 } |
|
153 path += '.' + (type || CSS); |
|
154 |
|
155 return path; |
|
156 }; |
|
157 |
|
158 |
|
159 if (!YUI.Env._cssLoaded) { |
|
160 YUI.Env._cssLoaded = {}; |
|
161 } |
|
162 |
|
163 |
|
164 /** |
|
165 * The component metadata is stored in Y.Env.meta. |
|
166 * Part of the loader module. |
|
167 * @property meta |
|
168 * @for YUI |
|
169 */ |
|
170 Y.Env.meta = META; |
|
171 |
|
172 /** |
|
173 * Loader dynamically loads script and css files. It includes the dependency |
|
174 * info for the version of the library in use, and will automatically pull in |
|
175 * dependencies for the modules requested. It can load the |
|
176 * files from the Yahoo! CDN, and it can utilize the combo service provided on |
|
177 * this network to reduce the number of http connections required to download |
|
178 * YUI files. You can also specify an external, custom combo service to host |
|
179 * your modules as well. |
|
180 |
|
181 var Y = YUI(); |
|
182 var loader = new Y.Loader({ |
|
183 filter: 'debug', |
|
184 base: '../../', |
|
185 root: 'build/', |
|
186 combine: true, |
|
187 require: ['node', 'dd', 'console'] |
|
188 }); |
|
189 var out = loader.resolve(true); |
|
190 |
|
191 * @constructor |
|
192 * @class Loader |
|
193 * @param {Object} config an optional set of configuration options. |
|
194 * @param {String} config.base The base dir which to fetch this module from |
|
195 * @param {String} config.comboBase The Combo service base path. Ex: `http://yui.yahooapis.com/combo?` |
|
196 * @param {String} config.root The root path to prepend to module names for the combo service. Ex: `2.5.2/build/` |
|
197 * @param {String|Object} config.filter A filter to apply to result urls. <a href="#property_filter">See filter property</a> |
|
198 * @param {Object} config.filters Per-component filter specification. If specified for a given component, this overrides the filter config. |
|
199 * @param {Boolean} config.combine Use a combo service to reduce the number of http connections required to load your dependencies |
|
200 * @param {Boolean} [config.async=true] Fetch files in async |
|
201 * @param {Array} config.ignore: A list of modules that should never be dynamically loaded |
|
202 * @param {Array} config.force A list of modules that should always be loaded when required, even if already present on the page |
|
203 * @param {HTMLElement|String} config.insertBefore Node or id for a node that should be used as the insertion point for new nodes |
|
204 * @param {Object} config.jsAttributes Object literal containing attributes to add to script nodes |
|
205 * @param {Object} config.cssAttributes Object literal containing attributes to add to link nodes |
|
206 * @param {Number} config.timeout The number of milliseconds before a timeout occurs when dynamically loading nodes. If not set, there is no timeout |
|
207 * @param {Object} config.context Execution context for all callbacks |
|
208 * @param {Function} config.onSuccess Callback for the 'success' event |
|
209 * @param {Function} config.onFailure Callback for the 'failure' event |
|
210 * @param {Function} config.onCSS Callback for the 'CSSComplete' event. When loading YUI components with CSS the CSS is loaded first, then the script. This provides a moment you can tie into to improve the presentation of the page while the script is loading. |
|
211 * @param {Function} config.onTimeout Callback for the 'timeout' event |
|
212 * @param {Function} config.onProgress Callback executed each time a script or css file is loaded |
|
213 * @param {Object} config.modules A list of module definitions. See <a href="#method_addModule">Loader.addModule</a> for the supported module metadata |
|
214 * @param {Object} config.groups A list of group definitions. Each group can contain specific definitions for `base`, `comboBase`, `combine`, and accepts a list of `modules`. |
|
215 * @param {String} config.2in3 The version of the YUI 2 in 3 wrapper to use. The intrinsic support for YUI 2 modules in YUI 3 relies on versions of the YUI 2 components inside YUI 3 module wrappers. These wrappers change over time to accomodate the issues that arise from running YUI 2 in a YUI 3 sandbox. |
|
216 * @param {String} config.yui2 When using the 2in3 project, you can select the version of YUI 2 to use. Valid values are `2.2.2`, `2.3.1`, `2.4.1`, `2.5.2`, `2.6.0`, `2.7.0`, `2.8.0`, `2.8.1` and `2.9.0` [default] -- plus all versions of YUI 2 going forward. |
|
217 */ |
|
218 Y.Loader = function(o) { |
|
219 |
|
220 var self = this; |
|
221 |
|
222 //Catch no config passed. |
|
223 o = o || {}; |
|
224 |
|
225 modulekey = META.md5; |
|
226 |
|
227 /** |
|
228 * Internal callback to handle multiple internal insert() calls |
|
229 * so that css is inserted prior to js |
|
230 * @property _internalCallback |
|
231 * @private |
|
232 */ |
|
233 // self._internalCallback = null; |
|
234 |
|
235 /** |
|
236 * Callback that will be executed when the loader is finished |
|
237 * with an insert |
|
238 * @method onSuccess |
|
239 * @type function |
|
240 */ |
|
241 // self.onSuccess = null; |
|
242 |
|
243 /** |
|
244 * Callback that will be executed if there is a failure |
|
245 * @method onFailure |
|
246 * @type function |
|
247 */ |
|
248 // self.onFailure = null; |
|
249 |
|
250 /** |
|
251 * Callback for the 'CSSComplete' event. When loading YUI components |
|
252 * with CSS the CSS is loaded first, then the script. This provides |
|
253 * a moment you can tie into to improve the presentation of the page |
|
254 * while the script is loading. |
|
255 * @method onCSS |
|
256 * @type function |
|
257 */ |
|
258 // self.onCSS = null; |
|
259 |
|
260 /** |
|
261 * Callback executed each time a script or css file is loaded |
|
262 * @method onProgress |
|
263 * @type function |
|
264 */ |
|
265 // self.onProgress = null; |
|
266 |
|
267 /** |
|
268 * Callback that will be executed if a timeout occurs |
|
269 * @method onTimeout |
|
270 * @type function |
|
271 */ |
|
272 // self.onTimeout = null; |
|
273 |
|
274 /** |
|
275 * The execution context for all callbacks |
|
276 * @property context |
|
277 * @default {YUI} the YUI instance |
|
278 */ |
|
279 self.context = Y; |
|
280 |
|
281 /** |
|
282 * Data that is passed to all callbacks |
|
283 * @property data |
|
284 */ |
|
285 // self.data = null; |
|
286 |
|
287 /** |
|
288 * Node reference or id where new nodes should be inserted before |
|
289 * @property insertBefore |
|
290 * @type string|HTMLElement |
|
291 */ |
|
292 // self.insertBefore = null; |
|
293 |
|
294 /** |
|
295 * The charset attribute for inserted nodes |
|
296 * @property charset |
|
297 * @type string |
|
298 * @deprecated , use cssAttributes or jsAttributes. |
|
299 */ |
|
300 // self.charset = null; |
|
301 |
|
302 /** |
|
303 * An object literal containing attributes to add to link nodes |
|
304 * @property cssAttributes |
|
305 * @type object |
|
306 */ |
|
307 // self.cssAttributes = null; |
|
308 |
|
309 /** |
|
310 * An object literal containing attributes to add to script nodes |
|
311 * @property jsAttributes |
|
312 * @type object |
|
313 */ |
|
314 // self.jsAttributes = null; |
|
315 |
|
316 /** |
|
317 * The base directory. |
|
318 * @property base |
|
319 * @type string |
|
320 * @default http://yui.yahooapis.com/[YUI VERSION]/build/ |
|
321 */ |
|
322 self.base = Y.Env.meta.base + Y.Env.meta.root; |
|
323 |
|
324 /** |
|
325 * Base path for the combo service |
|
326 * @property comboBase |
|
327 * @type string |
|
328 * @default http://yui.yahooapis.com/combo? |
|
329 */ |
|
330 self.comboBase = Y.Env.meta.comboBase; |
|
331 |
|
332 /* |
|
333 * Base path for language packs. |
|
334 */ |
|
335 // self.langBase = Y.Env.meta.langBase; |
|
336 // self.lang = ""; |
|
337 |
|
338 /** |
|
339 * If configured, the loader will attempt to use the combo |
|
340 * service for YUI resources and configured external resources. |
|
341 * @property combine |
|
342 * @type boolean |
|
343 * @default true if a base dir isn't in the config |
|
344 */ |
|
345 self.combine = o.base && |
|
346 (o.base.indexOf(self.comboBase.substr(0, 20)) > -1); |
|
347 |
|
348 /** |
|
349 * The default seperator to use between files in a combo URL |
|
350 * @property comboSep |
|
351 * @type {String} |
|
352 * @default Ampersand |
|
353 */ |
|
354 self.comboSep = '&'; |
|
355 /** |
|
356 * Max url length for combo urls. The default is 1024. This is the URL |
|
357 * limit for the Yahoo! hosted combo servers. If consuming |
|
358 * a different combo service that has a different URL limit |
|
359 * it is possible to override this default by supplying |
|
360 * the maxURLLength config option. The config option will |
|
361 * only take effect if lower than the default. |
|
362 * |
|
363 * @property maxURLLength |
|
364 * @type int |
|
365 */ |
|
366 self.maxURLLength = MAX_URL_LENGTH; |
|
367 |
|
368 /** |
|
369 * Ignore modules registered on the YUI global |
|
370 * @property ignoreRegistered |
|
371 * @default false |
|
372 */ |
|
373 self.ignoreRegistered = o.ignoreRegistered; |
|
374 |
|
375 /** |
|
376 * Root path to prepend to module path for the combo |
|
377 * service |
|
378 * @property root |
|
379 * @type string |
|
380 * @default [YUI VERSION]/build/ |
|
381 */ |
|
382 self.root = Y.Env.meta.root; |
|
383 |
|
384 /** |
|
385 * Timeout value in milliseconds. If set, self value will be used by |
|
386 * the get utility. the timeout event will fire if |
|
387 * a timeout occurs. |
|
388 * @property timeout |
|
389 * @type int |
|
390 */ |
|
391 self.timeout = 0; |
|
392 |
|
393 /** |
|
394 * A list of modules that should not be loaded, even if |
|
395 * they turn up in the dependency tree |
|
396 * @property ignore |
|
397 * @type string[] |
|
398 */ |
|
399 // self.ignore = null; |
|
400 |
|
401 /** |
|
402 * A list of modules that should always be loaded, even |
|
403 * if they have already been inserted into the page. |
|
404 * @property force |
|
405 * @type string[] |
|
406 */ |
|
407 // self.force = null; |
|
408 |
|
409 self.forceMap = {}; |
|
410 |
|
411 /** |
|
412 * Should we allow rollups |
|
413 * @property allowRollup |
|
414 * @type boolean |
|
415 * @default false |
|
416 */ |
|
417 self.allowRollup = false; |
|
418 |
|
419 /** |
|
420 * A filter to apply to result urls. This filter will modify the default |
|
421 * path for all modules. The default path for the YUI library is the |
|
422 * minified version of the files (e.g., event-min.js). The filter property |
|
423 * can be a predefined filter or a custom filter. The valid predefined |
|
424 * filters are: |
|
425 * <dl> |
|
426 * <dt>DEBUG</dt> |
|
427 * <dd>Selects the debug versions of the library (e.g., event-debug.js). |
|
428 * This option will automatically include the Logger widget</dd> |
|
429 * <dt>RAW</dt> |
|
430 * <dd>Selects the non-minified version of the library (e.g., event.js). |
|
431 * </dd> |
|
432 * </dl> |
|
433 * You can also define a custom filter, which must be an object literal |
|
434 * containing a search expression and a replace string: |
|
435 * |
|
436 * myFilter: { |
|
437 * 'searchExp': "-min\\.js", |
|
438 * 'replaceStr': "-debug.js" |
|
439 * } |
|
440 * |
|
441 * @property filter |
|
442 * @type string| {searchExp: string, replaceStr: string} |
|
443 */ |
|
444 // self.filter = null; |
|
445 |
|
446 /** |
|
447 * per-component filter specification. If specified for a given |
|
448 * component, this overrides the filter config. |
|
449 * @property filters |
|
450 * @type object |
|
451 */ |
|
452 self.filters = {}; |
|
453 |
|
454 /** |
|
455 * The list of requested modules |
|
456 * @property required |
|
457 * @type {string: boolean} |
|
458 */ |
|
459 self.required = {}; |
|
460 |
|
461 /** |
|
462 * If a module name is predefined when requested, it is checked againsts |
|
463 * the patterns provided in this property. If there is a match, the |
|
464 * module is added with the default configuration. |
|
465 * |
|
466 * At the moment only supporting module prefixes, but anticipate |
|
467 * supporting at least regular expressions. |
|
468 * @property patterns |
|
469 * @type Object |
|
470 */ |
|
471 // self.patterns = Y.merge(Y.Env.meta.patterns); |
|
472 self.patterns = {}; |
|
473 |
|
474 /** |
|
475 * The library metadata |
|
476 * @property moduleInfo |
|
477 */ |
|
478 // self.moduleInfo = Y.merge(Y.Env.meta.moduleInfo); |
|
479 self.moduleInfo = {}; |
|
480 |
|
481 self.groups = Y.merge(Y.Env.meta.groups); |
|
482 |
|
483 /** |
|
484 * Provides the information used to skin the skinnable components. |
|
485 * The following skin definition would result in 'skin1' and 'skin2' |
|
486 * being loaded for calendar (if calendar was requested), and |
|
487 * 'sam' for all other skinnable components: |
|
488 * |
|
489 * skin: { |
|
490 * // The default skin, which is automatically applied if not |
|
491 * // overriden by a component-specific skin definition. |
|
492 * // Change this in to apply a different skin globally |
|
493 * defaultSkin: 'sam', |
|
494 * |
|
495 * // This is combined with the loader base property to get |
|
496 * // the default root directory for a skin. ex: |
|
497 * // http://yui.yahooapis.com/2.3.0/build/assets/skins/sam/ |
|
498 * base: 'assets/skins/', |
|
499 * |
|
500 * // Any component-specific overrides can be specified here, |
|
501 * // making it possible to load different skins for different |
|
502 * // components. It is possible to load more than one skin |
|
503 * // for a given component as well. |
|
504 * overrides: { |
|
505 * calendar: ['skin1', 'skin2'] |
|
506 * } |
|
507 * } |
|
508 * @property skin |
|
509 * @type {Object} |
|
510 */ |
|
511 self.skin = Y.merge(Y.Env.meta.skin); |
|
512 |
|
513 /* |
|
514 * Map of conditional modules |
|
515 * @since 3.2.0 |
|
516 */ |
|
517 self.conditions = {}; |
|
518 |
|
519 // map of modules with a hash of modules that meet the requirement |
|
520 // self.provides = {}; |
|
521 |
|
522 self.config = o; |
|
523 self._internal = true; |
|
524 |
|
525 self._populateCache(); |
|
526 |
|
527 /** |
|
528 * Set when beginning to compute the dependency tree. |
|
529 * Composed of what YUI reports to be loaded combined |
|
530 * with what has been loaded by any instance on the page |
|
531 * with the version number specified in the metadata. |
|
532 * @property loaded |
|
533 * @type {string: boolean} |
|
534 */ |
|
535 self.loaded = GLOBAL_LOADED[VERSION]; |
|
536 |
|
537 |
|
538 /** |
|
539 * Should Loader fetch scripts in `async`, defaults to `true` |
|
540 * @property async |
|
541 */ |
|
542 |
|
543 self.async = true; |
|
544 |
|
545 self._inspectPage(); |
|
546 |
|
547 self._internal = false; |
|
548 |
|
549 self._config(o); |
|
550 |
|
551 self.forceMap = (self.force) ? Y.Array.hash(self.force) : {}; |
|
552 |
|
553 self.testresults = null; |
|
554 |
|
555 if (Y.config.tests) { |
|
556 self.testresults = Y.config.tests; |
|
557 } |
|
558 |
|
559 /** |
|
560 * List of rollup files found in the library metadata |
|
561 * @property rollups |
|
562 */ |
|
563 // self.rollups = null; |
|
564 |
|
565 /** |
|
566 * Whether or not to load optional dependencies for |
|
567 * the requested modules |
|
568 * @property loadOptional |
|
569 * @type boolean |
|
570 * @default false |
|
571 */ |
|
572 // self.loadOptional = false; |
|
573 |
|
574 /** |
|
575 * All of the derived dependencies in sorted order, which |
|
576 * will be populated when either calculate() or insert() |
|
577 * is called |
|
578 * @property sorted |
|
579 * @type string[] |
|
580 */ |
|
581 self.sorted = []; |
|
582 |
|
583 /* |
|
584 * A list of modules to attach to the YUI instance when complete. |
|
585 * If not supplied, the sorted list of dependencies are applied. |
|
586 * @property attaching |
|
587 */ |
|
588 // self.attaching = null; |
|
589 |
|
590 /** |
|
591 * Flag to indicate the dependency tree needs to be recomputed |
|
592 * if insert is called again. |
|
593 * @property dirty |
|
594 * @type boolean |
|
595 * @default true |
|
596 */ |
|
597 self.dirty = true; |
|
598 |
|
599 /** |
|
600 * List of modules inserted by the utility |
|
601 * @property inserted |
|
602 * @type {string: boolean} |
|
603 */ |
|
604 self.inserted = {}; |
|
605 |
|
606 /** |
|
607 * List of skipped modules during insert() because the module |
|
608 * was not defined |
|
609 * @property skipped |
|
610 */ |
|
611 self.skipped = {}; |
|
612 |
|
613 // Y.on('yui:load', self.loadNext, self); |
|
614 |
|
615 self.tested = {}; |
|
616 |
|
617 /* |
|
618 * Cached sorted calculate results |
|
619 * @property results |
|
620 * @since 3.2.0 |
|
621 */ |
|
622 //self.results = {}; |
|
623 |
|
624 if (self.ignoreRegistered) { |
|
625 //Clear inpage already processed modules. |
|
626 self._resetModules(); |
|
627 } |
|
628 |
|
629 }; |
|
630 |
|
631 Y.Loader.prototype = { |
|
632 /** |
|
633 * Checks the cache for modules and conditions, if they do not exist |
|
634 * process the default metadata and populate the local moduleInfo hash. |
|
635 * @method _populateCache |
|
636 * @private |
|
637 */ |
|
638 _populateCache: function() { |
|
639 var self = this, |
|
640 defaults = META.modules, |
|
641 cache = GLOBAL_ENV._renderedMods, |
|
642 i; |
|
643 |
|
644 if (cache && !self.ignoreRegistered) { |
|
645 for (i in cache) { |
|
646 if (cache.hasOwnProperty(i)) { |
|
647 self.moduleInfo[i] = Y.merge(cache[i]); |
|
648 } |
|
649 } |
|
650 |
|
651 cache = GLOBAL_ENV._conditions; |
|
652 for (i in cache) { |
|
653 if (cache.hasOwnProperty(i)) { |
|
654 self.conditions[i] = Y.merge(cache[i]); |
|
655 } |
|
656 } |
|
657 |
|
658 } else { |
|
659 for (i in defaults) { |
|
660 if (defaults.hasOwnProperty(i)) { |
|
661 self.addModule(defaults[i], i); |
|
662 } |
|
663 } |
|
664 } |
|
665 |
|
666 }, |
|
667 /** |
|
668 * Reset modules in the module cache to a pre-processed state so additional |
|
669 * computations with a different skin or language will work as expected. |
|
670 * @method _resetModules |
|
671 * @private |
|
672 */ |
|
673 _resetModules: function() { |
|
674 var self = this, i, o, |
|
675 mod, name, details; |
|
676 for (i in self.moduleInfo) { |
|
677 if (self.moduleInfo.hasOwnProperty(i)) { |
|
678 mod = self.moduleInfo[i]; |
|
679 name = mod.name; |
|
680 details = (YUI.Env.mods[name] ? YUI.Env.mods[name].details : null); |
|
681 |
|
682 if (details) { |
|
683 self.moduleInfo[name]._reset = true; |
|
684 self.moduleInfo[name].requires = details.requires || []; |
|
685 self.moduleInfo[name].optional = details.optional || []; |
|
686 self.moduleInfo[name].supersedes = details.supercedes || []; |
|
687 } |
|
688 |
|
689 if (mod.defaults) { |
|
690 for (o in mod.defaults) { |
|
691 if (mod.defaults.hasOwnProperty(o)) { |
|
692 if (mod[o]) { |
|
693 mod[o] = mod.defaults[o]; |
|
694 } |
|
695 } |
|
696 } |
|
697 } |
|
698 delete mod.langCache; |
|
699 delete mod.skinCache; |
|
700 if (mod.skinnable) { |
|
701 self._addSkin(self.skin.defaultSkin, mod.name); |
|
702 } |
|
703 } |
|
704 } |
|
705 }, |
|
706 /** |
|
707 Regex that matches a CSS URL. Used to guess the file type when it's not |
|
708 specified. |
|
709 |
|
710 @property REGEX_CSS |
|
711 @type RegExp |
|
712 @final |
|
713 @protected |
|
714 @since 3.5.0 |
|
715 **/ |
|
716 REGEX_CSS: /\.css(?:[?;].*)?$/i, |
|
717 |
|
718 /** |
|
719 * Default filters for raw and debug |
|
720 * @property FILTER_DEFS |
|
721 * @type Object |
|
722 * @final |
|
723 * @protected |
|
724 */ |
|
725 FILTER_DEFS: { |
|
726 RAW: { |
|
727 'searchExp': '-min\\.js', |
|
728 'replaceStr': '.js' |
|
729 }, |
|
730 DEBUG: { |
|
731 'searchExp': '-min\\.js', |
|
732 'replaceStr': '-debug.js' |
|
733 }, |
|
734 COVERAGE: { |
|
735 'searchExp': '-min\\.js', |
|
736 'replaceStr': '-coverage.js' |
|
737 } |
|
738 }, |
|
739 /* |
|
740 * Check the pages meta-data and cache the result. |
|
741 * @method _inspectPage |
|
742 * @private |
|
743 */ |
|
744 _inspectPage: function() { |
|
745 var self = this, v, m, req, mr, i; |
|
746 |
|
747 //Inspect the page for CSS only modules and mark them as loaded. |
|
748 for (i in self.moduleInfo) { |
|
749 if (self.moduleInfo.hasOwnProperty(i)) { |
|
750 v = self.moduleInfo[i]; |
|
751 if (v.type && v.type === CSS) { |
|
752 if (self.isCSSLoaded(v.name)) { |
|
753 self.loaded[i] = true; |
|
754 } |
|
755 } |
|
756 } |
|
757 } |
|
758 for (i in ON_PAGE) { |
|
759 if (ON_PAGE.hasOwnProperty(i)) { |
|
760 v = ON_PAGE[i]; |
|
761 if (v.details) { |
|
762 m = self.moduleInfo[v.name]; |
|
763 req = v.details.requires; |
|
764 mr = m && m.requires; |
|
765 |
|
766 if (m) { |
|
767 if (!m._inspected && req && mr.length !== req.length) { |
|
768 // console.log('deleting ' + m.name); |
|
769 delete m.expanded; |
|
770 } |
|
771 } else { |
|
772 m = self.addModule(v.details, i); |
|
773 } |
|
774 m._inspected = true; |
|
775 } |
|
776 } |
|
777 } |
|
778 }, |
|
779 /* |
|
780 * returns true if b is not loaded, and is required directly or by means of modules it supersedes. |
|
781 * @private |
|
782 * @method _requires |
|
783 * @param {String} mod1 The first module to compare |
|
784 * @param {String} mod2 The second module to compare |
|
785 */ |
|
786 _requires: function(mod1, mod2) { |
|
787 |
|
788 var i, rm, after_map, s, |
|
789 info = this.moduleInfo, |
|
790 m = info[mod1], |
|
791 other = info[mod2]; |
|
792 |
|
793 if (!m || !other) { |
|
794 return false; |
|
795 } |
|
796 |
|
797 rm = m.expanded_map; |
|
798 after_map = m.after_map; |
|
799 |
|
800 // check if this module should be sorted after the other |
|
801 // do this first to short circut circular deps |
|
802 if (after_map && (mod2 in after_map)) { |
|
803 return true; |
|
804 } |
|
805 |
|
806 after_map = other.after_map; |
|
807 |
|
808 // and vis-versa |
|
809 if (after_map && (mod1 in after_map)) { |
|
810 return false; |
|
811 } |
|
812 |
|
813 // check if this module requires one the other supersedes |
|
814 s = info[mod2] && info[mod2].supersedes; |
|
815 if (s) { |
|
816 for (i = 0; i < s.length; i++) { |
|
817 if (this._requires(mod1, s[i])) { |
|
818 return true; |
|
819 } |
|
820 } |
|
821 } |
|
822 |
|
823 s = info[mod1] && info[mod1].supersedes; |
|
824 if (s) { |
|
825 for (i = 0; i < s.length; i++) { |
|
826 if (this._requires(mod2, s[i])) { |
|
827 return false; |
|
828 } |
|
829 } |
|
830 } |
|
831 |
|
832 // check if this module requires the other directly |
|
833 // if (r && yArray.indexOf(r, mod2) > -1) { |
|
834 if (rm && (mod2 in rm)) { |
|
835 return true; |
|
836 } |
|
837 |
|
838 // external css files should be sorted below yui css |
|
839 if (m.ext && m.type === CSS && !other.ext && other.type === CSS) { |
|
840 return true; |
|
841 } |
|
842 |
|
843 return false; |
|
844 }, |
|
845 /** |
|
846 * Apply a new config to the Loader instance |
|
847 * @method _config |
|
848 * @private |
|
849 * @param {Object} o The new configuration |
|
850 */ |
|
851 _config: function(o) { |
|
852 var i, j, val, a, f, group, groupName, self = this, |
|
853 mods = [], mod; |
|
854 // apply config values |
|
855 if (o) { |
|
856 for (i in o) { |
|
857 if (o.hasOwnProperty(i)) { |
|
858 val = o[i]; |
|
859 //TODO This should be a case |
|
860 if (i === 'require') { |
|
861 self.require(val); |
|
862 } else if (i === 'skin') { |
|
863 //If the config.skin is a string, format to the expected object |
|
864 if (typeof val === 'string') { |
|
865 self.skin.defaultSkin = o.skin; |
|
866 val = { |
|
867 defaultSkin: val |
|
868 }; |
|
869 } |
|
870 |
|
871 Y.mix(self.skin, val, true); |
|
872 } else if (i === 'groups') { |
|
873 for (j in val) { |
|
874 if (val.hasOwnProperty(j)) { |
|
875 groupName = j; |
|
876 group = val[j]; |
|
877 self.addGroup(group, groupName); |
|
878 if (group.aliases) { |
|
879 for (a in group.aliases) { |
|
880 if (group.aliases.hasOwnProperty(a)) { |
|
881 self.addAlias(group.aliases[a], a); |
|
882 } |
|
883 } |
|
884 } |
|
885 } |
|
886 } |
|
887 |
|
888 } else if (i === 'modules') { |
|
889 // add a hash of module definitions |
|
890 for (j in val) { |
|
891 if (val.hasOwnProperty(j)) { |
|
892 self.addModule(val[j], j); |
|
893 } |
|
894 } |
|
895 } else if (i === 'aliases') { |
|
896 for (j in val) { |
|
897 if (val.hasOwnProperty(j)) { |
|
898 self.addAlias(val[j], j); |
|
899 } |
|
900 } |
|
901 } else if (i === 'gallery') { |
|
902 if (this.groups.gallery.update) { |
|
903 this.groups.gallery.update(val, o); |
|
904 } |
|
905 } else if (i === 'yui2' || i === '2in3') { |
|
906 if (this.groups.yui2.update) { |
|
907 this.groups.yui2.update(o['2in3'], o.yui2, o); |
|
908 } |
|
909 } else { |
|
910 self[i] = val; |
|
911 } |
|
912 } |
|
913 } |
|
914 } |
|
915 |
|
916 // fix filter |
|
917 f = self.filter; |
|
918 |
|
919 if (L.isString(f)) { |
|
920 f = f.toUpperCase(); |
|
921 self.filterName = f; |
|
922 self.filter = self.FILTER_DEFS[f]; |
|
923 if (f === 'DEBUG') { |
|
924 self.require('yui-log', 'dump'); |
|
925 } |
|
926 } |
|
927 |
|
928 if (self.filterName && self.coverage) { |
|
929 if (self.filterName === 'COVERAGE' && L.isArray(self.coverage) && self.coverage.length) { |
|
930 for (i = 0; i < self.coverage.length; i++) { |
|
931 mod = self.coverage[i]; |
|
932 if (self.moduleInfo[mod] && self.moduleInfo[mod].use) { |
|
933 mods = [].concat(mods, self.moduleInfo[mod].use); |
|
934 } else { |
|
935 mods.push(mod); |
|
936 } |
|
937 } |
|
938 self.filters = self.filters || {}; |
|
939 Y.Array.each(mods, function(mod) { |
|
940 self.filters[mod] = self.FILTER_DEFS.COVERAGE; |
|
941 }); |
|
942 self.filterName = 'RAW'; |
|
943 self.filter = self.FILTER_DEFS[self.filterName]; |
|
944 } |
|
945 } |
|
946 |
|
947 }, |
|
948 |
|
949 /** |
|
950 * Returns the skin module name for the specified skin name. If a |
|
951 * module name is supplied, the returned skin module name is |
|
952 * specific to the module passed in. |
|
953 * @method formatSkin |
|
954 * @param {string} skin the name of the skin. |
|
955 * @param {string} mod optional: the name of a module to skin. |
|
956 * @return {string} the full skin module name. |
|
957 */ |
|
958 formatSkin: function(skin, mod) { |
|
959 var s = SKIN_PREFIX + skin; |
|
960 if (mod) { |
|
961 s = s + '-' + mod; |
|
962 } |
|
963 |
|
964 return s; |
|
965 }, |
|
966 |
|
967 /** |
|
968 * Adds the skin def to the module info |
|
969 * @method _addSkin |
|
970 * @param {string} skin the name of the skin. |
|
971 * @param {string} mod the name of the module. |
|
972 * @param {string} parent parent module if this is a skin of a |
|
973 * submodule or plugin. |
|
974 * @return {string} the module name for the skin. |
|
975 * @private |
|
976 */ |
|
977 _addSkin: function(skin, mod, parent) { |
|
978 var mdef, pkg, name, nmod, |
|
979 info = this.moduleInfo, |
|
980 sinf = this.skin, |
|
981 ext = info[mod] && info[mod].ext; |
|
982 |
|
983 // Add a module definition for the module-specific skin css |
|
984 if (mod) { |
|
985 name = this.formatSkin(skin, mod); |
|
986 if (!info[name]) { |
|
987 mdef = info[mod]; |
|
988 pkg = mdef.pkg || mod; |
|
989 nmod = { |
|
990 skin: true, |
|
991 name: name, |
|
992 group: mdef.group, |
|
993 type: 'css', |
|
994 after: sinf.after, |
|
995 path: (parent || pkg) + '/' + sinf.base + skin + |
|
996 '/' + mod + '.css', |
|
997 ext: ext |
|
998 }; |
|
999 if (mdef.base) { |
|
1000 nmod.base = mdef.base; |
|
1001 } |
|
1002 if (mdef.configFn) { |
|
1003 nmod.configFn = mdef.configFn; |
|
1004 } |
|
1005 this.addModule(nmod, name); |
|
1006 |
|
1007 } |
|
1008 } |
|
1009 |
|
1010 return name; |
|
1011 }, |
|
1012 /** |
|
1013 * Adds an alias module to the system |
|
1014 * @method addAlias |
|
1015 * @param {Array} use An array of modules that makes up this alias |
|
1016 * @param {String} name The name of the alias |
|
1017 * @example |
|
1018 * var loader = new Y.Loader({}); |
|
1019 * loader.addAlias([ 'node', 'yql' ], 'davglass'); |
|
1020 * loader.require(['davglass']); |
|
1021 * var out = loader.resolve(true); |
|
1022 * |
|
1023 * //out.js will contain Node and YQL modules |
|
1024 */ |
|
1025 addAlias: function(use, name) { |
|
1026 YUI.Env.aliases[name] = use; |
|
1027 this.addModule({ |
|
1028 name: name, |
|
1029 use: use |
|
1030 }); |
|
1031 }, |
|
1032 /** |
|
1033 * Add a new module group |
|
1034 * @method addGroup |
|
1035 * @param {Object} config An object containing the group configuration data |
|
1036 * @param {String} config.name required, the group name |
|
1037 * @param {String} config.base The base directory for this module group |
|
1038 * @param {String} config.root The root path to add to each combo resource path |
|
1039 * @param {Boolean} config.combine Should the request be combined |
|
1040 * @param {String} config.comboBase Combo service base path |
|
1041 * @param {Object} config.modules The group of modules |
|
1042 * @param {String} name the group name. |
|
1043 * @example |
|
1044 * var loader = new Y.Loader({}); |
|
1045 * loader.addGroup({ |
|
1046 * name: 'davglass', |
|
1047 * combine: true, |
|
1048 * comboBase: '/combo?', |
|
1049 * root: '', |
|
1050 * modules: { |
|
1051 * //Module List here |
|
1052 * } |
|
1053 * }, 'davglass'); |
|
1054 */ |
|
1055 addGroup: function(o, name) { |
|
1056 var mods = o.modules, |
|
1057 self = this, i, v; |
|
1058 |
|
1059 name = name || o.name; |
|
1060 o.name = name; |
|
1061 self.groups[name] = o; |
|
1062 |
|
1063 if (o.patterns) { |
|
1064 for (i in o.patterns) { |
|
1065 if (o.patterns.hasOwnProperty(i)) { |
|
1066 o.patterns[i].group = name; |
|
1067 self.patterns[i] = o.patterns[i]; |
|
1068 } |
|
1069 } |
|
1070 } |
|
1071 |
|
1072 if (mods) { |
|
1073 for (i in mods) { |
|
1074 if (mods.hasOwnProperty(i)) { |
|
1075 v = mods[i]; |
|
1076 if (typeof v === 'string') { |
|
1077 v = { name: i, fullpath: v }; |
|
1078 } |
|
1079 v.group = name; |
|
1080 self.addModule(v, i); |
|
1081 } |
|
1082 } |
|
1083 } |
|
1084 }, |
|
1085 |
|
1086 /** |
|
1087 * Add a new module to the component metadata. |
|
1088 * @method addModule |
|
1089 * @param {Object} config An object containing the module data. |
|
1090 * @param {String} config.name Required, the component name |
|
1091 * @param {String} config.type Required, the component type (js or css) |
|
1092 * @param {String} config.path Required, the path to the script from `base` |
|
1093 * @param {Array} config.requires Array of modules required by this component |
|
1094 * @param {Array} [config.optional] Array of optional modules for this component |
|
1095 * @param {Array} [config.supersedes] Array of the modules this component replaces |
|
1096 * @param {Array} [config.after] Array of modules the components which, if present, should be sorted above this one |
|
1097 * @param {Object} [config.after_map] Faster alternative to 'after' -- supply a hash instead of an array |
|
1098 * @param {Number} [config.rollup] The number of superseded modules required for automatic rollup |
|
1099 * @param {String} [config.fullpath] If `fullpath` is specified, this is used instead of the configured `base + path` |
|
1100 * @param {Boolean} [config.skinnable] Flag to determine if skin assets should automatically be pulled in |
|
1101 * @param {Object} [config.submodules] Hash of submodules |
|
1102 * @param {String} [config.group] The group the module belongs to -- this is set automatically when it is added as part of a group configuration. |
|
1103 * @param {Array} [config.lang] Array of BCP 47 language tags of languages for which this module has localized resource bundles, e.g., `["en-GB", "zh-Hans-CN"]` |
|
1104 * @param {Object} [config.condition] Specifies that the module should be loaded automatically if a condition is met. This is an object with up to four fields: |
|
1105 * @param {String} [config.condition.trigger] The name of a module that can trigger the auto-load |
|
1106 * @param {Function} [config.condition.test] A function that returns true when the module is to be loaded. |
|
1107 * @param {String} [config.condition.ua] The UA name of <a href="UA.html">Y.UA</a> object that returns true when the module is to be loaded. e.g., `"ie"`, `"nodejs"`. |
|
1108 * @param {String} [config.condition.when] Specifies the load order of the conditional module |
|
1109 * with regard to the position of the trigger module. |
|
1110 * This should be one of three values: `before`, `after`, or `instead`. The default is `after`. |
|
1111 * @param {Object} [config.testresults] A hash of test results from `Y.Features.all()` |
|
1112 * @param {Function} [config.configFn] A function to exectute when configuring this module |
|
1113 * @param {Object} config.configFn.mod The module config, modifying this object will modify it's config. Returning false will delete the module's config. |
|
1114 * @param {String} [name] The module name, required if not in the module data. |
|
1115 * @return {Object} the module definition or null if the object passed in did not provide all required attributes. |
|
1116 */ |
|
1117 addModule: function(o, name) { |
|
1118 name = name || o.name; |
|
1119 |
|
1120 if (typeof o === 'string') { |
|
1121 o = { name: name, fullpath: o }; |
|
1122 } |
|
1123 |
|
1124 |
|
1125 var subs, i, l, t, sup, s, smod, plugins, plug, |
|
1126 j, langs, packName, supName, flatSup, flatLang, lang, ret, |
|
1127 overrides, skinname, when, g, p, |
|
1128 conditions = this.conditions, trigger; |
|
1129 |
|
1130 //Only merge this data if the temp flag is set |
|
1131 //from an earlier pass from a pattern or else |
|
1132 //an override module (YUI_config) can not be used to |
|
1133 //replace a default module. |
|
1134 if (this.moduleInfo[name] && this.moduleInfo[name].temp) { |
|
1135 //This catches temp modules loaded via a pattern |
|
1136 // The module will be added twice, once from the pattern and |
|
1137 // Once from the actual add call, this ensures that properties |
|
1138 // that were added to the module the first time around (group: gallery) |
|
1139 // are also added the second time around too. |
|
1140 o = Y.merge(this.moduleInfo[name], o); |
|
1141 } |
|
1142 |
|
1143 o.name = name; |
|
1144 |
|
1145 if (!o || !o.name) { |
|
1146 return null; |
|
1147 } |
|
1148 |
|
1149 if (!o.type) { |
|
1150 //Always assume it's javascript unless the CSS pattern is matched. |
|
1151 o.type = JS; |
|
1152 p = o.path || o.fullpath; |
|
1153 if (p && this.REGEX_CSS.test(p)) { |
|
1154 o.type = CSS; |
|
1155 } |
|
1156 } |
|
1157 |
|
1158 if (!o.path && !o.fullpath) { |
|
1159 o.path = _path(name, name, o.type); |
|
1160 } |
|
1161 o.supersedes = o.supersedes || o.use; |
|
1162 |
|
1163 o.ext = ('ext' in o) ? o.ext : (this._internal) ? false : true; |
|
1164 |
|
1165 // Handle submodule logic |
|
1166 subs = o.submodules; |
|
1167 |
|
1168 this.moduleInfo[name] = o; |
|
1169 |
|
1170 o.requires = o.requires || []; |
|
1171 |
|
1172 /* |
|
1173 Only allowing the cascade of requires information, since |
|
1174 optional and supersedes are far more fine grained than |
|
1175 a blanket requires is. |
|
1176 */ |
|
1177 if (this.requires) { |
|
1178 for (i = 0; i < this.requires.length; i++) { |
|
1179 o.requires.push(this.requires[i]); |
|
1180 } |
|
1181 } |
|
1182 if (o.group && this.groups && this.groups[o.group]) { |
|
1183 g = this.groups[o.group]; |
|
1184 if (g.requires) { |
|
1185 for (i = 0; i < g.requires.length; i++) { |
|
1186 o.requires.push(g.requires[i]); |
|
1187 } |
|
1188 } |
|
1189 } |
|
1190 |
|
1191 |
|
1192 if (!o.defaults) { |
|
1193 o.defaults = { |
|
1194 requires: o.requires ? [].concat(o.requires) : null, |
|
1195 supersedes: o.supersedes ? [].concat(o.supersedes) : null, |
|
1196 optional: o.optional ? [].concat(o.optional) : null |
|
1197 }; |
|
1198 } |
|
1199 |
|
1200 if (o.skinnable && o.ext && o.temp) { |
|
1201 skinname = this._addSkin(this.skin.defaultSkin, name); |
|
1202 o.requires.unshift(skinname); |
|
1203 } |
|
1204 |
|
1205 if (o.requires.length) { |
|
1206 o.requires = this.filterRequires(o.requires) || []; |
|
1207 } |
|
1208 |
|
1209 if (!o.langPack && o.lang) { |
|
1210 langs = yArray(o.lang); |
|
1211 for (j = 0; j < langs.length; j++) { |
|
1212 lang = langs[j]; |
|
1213 packName = this.getLangPackName(lang, name); |
|
1214 smod = this.moduleInfo[packName]; |
|
1215 if (!smod) { |
|
1216 smod = this._addLangPack(lang, o, packName); |
|
1217 } |
|
1218 } |
|
1219 } |
|
1220 |
|
1221 |
|
1222 if (subs) { |
|
1223 sup = o.supersedes || []; |
|
1224 l = 0; |
|
1225 |
|
1226 for (i in subs) { |
|
1227 if (subs.hasOwnProperty(i)) { |
|
1228 s = subs[i]; |
|
1229 |
|
1230 s.path = s.path || _path(name, i, o.type); |
|
1231 s.pkg = name; |
|
1232 s.group = o.group; |
|
1233 |
|
1234 if (s.supersedes) { |
|
1235 sup = sup.concat(s.supersedes); |
|
1236 } |
|
1237 |
|
1238 smod = this.addModule(s, i); |
|
1239 sup.push(i); |
|
1240 |
|
1241 if (smod.skinnable) { |
|
1242 o.skinnable = true; |
|
1243 overrides = this.skin.overrides; |
|
1244 if (overrides && overrides[i]) { |
|
1245 for (j = 0; j < overrides[i].length; j++) { |
|
1246 skinname = this._addSkin(overrides[i][j], |
|
1247 i, name); |
|
1248 sup.push(skinname); |
|
1249 } |
|
1250 } |
|
1251 skinname = this._addSkin(this.skin.defaultSkin, |
|
1252 i, name); |
|
1253 sup.push(skinname); |
|
1254 } |
|
1255 |
|
1256 // looks like we are expected to work out the metadata |
|
1257 // for the parent module language packs from what is |
|
1258 // specified in the child modules. |
|
1259 if (s.lang && s.lang.length) { |
|
1260 |
|
1261 langs = yArray(s.lang); |
|
1262 for (j = 0; j < langs.length; j++) { |
|
1263 lang = langs[j]; |
|
1264 packName = this.getLangPackName(lang, name); |
|
1265 supName = this.getLangPackName(lang, i); |
|
1266 smod = this.moduleInfo[packName]; |
|
1267 |
|
1268 if (!smod) { |
|
1269 smod = this._addLangPack(lang, o, packName); |
|
1270 } |
|
1271 |
|
1272 flatSup = flatSup || yArray.hash(smod.supersedes); |
|
1273 |
|
1274 if (!(supName in flatSup)) { |
|
1275 smod.supersedes.push(supName); |
|
1276 } |
|
1277 |
|
1278 o.lang = o.lang || []; |
|
1279 |
|
1280 flatLang = flatLang || yArray.hash(o.lang); |
|
1281 |
|
1282 if (!(lang in flatLang)) { |
|
1283 o.lang.push(lang); |
|
1284 } |
|
1285 |
|
1286 // Add rollup file, need to add to supersedes list too |
|
1287 |
|
1288 // default packages |
|
1289 packName = this.getLangPackName(ROOT_LANG, name); |
|
1290 supName = this.getLangPackName(ROOT_LANG, i); |
|
1291 |
|
1292 smod = this.moduleInfo[packName]; |
|
1293 |
|
1294 if (!smod) { |
|
1295 smod = this._addLangPack(lang, o, packName); |
|
1296 } |
|
1297 |
|
1298 if (!(supName in flatSup)) { |
|
1299 smod.supersedes.push(supName); |
|
1300 } |
|
1301 |
|
1302 // Add rollup file, need to add to supersedes list too |
|
1303 |
|
1304 } |
|
1305 } |
|
1306 |
|
1307 l++; |
|
1308 } |
|
1309 } |
|
1310 //o.supersedes = YObject.keys(yArray.hash(sup)); |
|
1311 o.supersedes = yArray.dedupe(sup); |
|
1312 if (this.allowRollup) { |
|
1313 o.rollup = (l < 4) ? l : Math.min(l - 1, 4); |
|
1314 } |
|
1315 } |
|
1316 |
|
1317 plugins = o.plugins; |
|
1318 if (plugins) { |
|
1319 for (i in plugins) { |
|
1320 if (plugins.hasOwnProperty(i)) { |
|
1321 plug = plugins[i]; |
|
1322 plug.pkg = name; |
|
1323 plug.path = plug.path || _path(name, i, o.type); |
|
1324 plug.requires = plug.requires || []; |
|
1325 plug.group = o.group; |
|
1326 this.addModule(plug, i); |
|
1327 if (o.skinnable) { |
|
1328 this._addSkin(this.skin.defaultSkin, i, name); |
|
1329 } |
|
1330 |
|
1331 } |
|
1332 } |
|
1333 } |
|
1334 |
|
1335 if (o.condition) { |
|
1336 t = o.condition.trigger; |
|
1337 if (YUI.Env.aliases[t]) { |
|
1338 t = YUI.Env.aliases[t]; |
|
1339 } |
|
1340 if (!Y.Lang.isArray(t)) { |
|
1341 t = [t]; |
|
1342 } |
|
1343 |
|
1344 for (i = 0; i < t.length; i++) { |
|
1345 trigger = t[i]; |
|
1346 when = o.condition.when; |
|
1347 conditions[trigger] = conditions[trigger] || {}; |
|
1348 conditions[trigger][name] = o.condition; |
|
1349 // the 'when' attribute can be 'before', 'after', or 'instead' |
|
1350 // the default is after. |
|
1351 if (when && when !== 'after') { |
|
1352 if (when === 'instead') { // replace the trigger |
|
1353 o.supersedes = o.supersedes || []; |
|
1354 o.supersedes.push(trigger); |
|
1355 } |
|
1356 // before the trigger |
|
1357 // the trigger requires the conditional mod, |
|
1358 // so it should appear before the conditional |
|
1359 // mod if we do not intersede. |
|
1360 } else { // after the trigger |
|
1361 o.after = o.after || []; |
|
1362 o.after.push(trigger); |
|
1363 } |
|
1364 } |
|
1365 } |
|
1366 |
|
1367 if (o.supersedes) { |
|
1368 o.supersedes = this.filterRequires(o.supersedes); |
|
1369 } |
|
1370 |
|
1371 if (o.after) { |
|
1372 o.after = this.filterRequires(o.after); |
|
1373 o.after_map = yArray.hash(o.after); |
|
1374 } |
|
1375 |
|
1376 // this.dirty = true; |
|
1377 |
|
1378 if (o.configFn) { |
|
1379 ret = o.configFn(o); |
|
1380 if (ret === false) { |
|
1381 delete this.moduleInfo[name]; |
|
1382 delete GLOBAL_ENV._renderedMods[name]; |
|
1383 o = null; |
|
1384 } |
|
1385 } |
|
1386 //Add to global cache |
|
1387 if (o) { |
|
1388 if (!GLOBAL_ENV._renderedMods) { |
|
1389 GLOBAL_ENV._renderedMods = {}; |
|
1390 } |
|
1391 GLOBAL_ENV._renderedMods[name] = Y.mix(GLOBAL_ENV._renderedMods[name] || {}, o); |
|
1392 GLOBAL_ENV._conditions = conditions; |
|
1393 } |
|
1394 |
|
1395 return o; |
|
1396 }, |
|
1397 |
|
1398 /** |
|
1399 * Add a requirement for one or more module |
|
1400 * @method require |
|
1401 * @param {string[] | string*} what the modules to load. |
|
1402 */ |
|
1403 require: function(what) { |
|
1404 var a = (typeof what === 'string') ? yArray(arguments) : what; |
|
1405 this.dirty = true; |
|
1406 this.required = Y.merge(this.required, yArray.hash(this.filterRequires(a))); |
|
1407 |
|
1408 this._explodeRollups(); |
|
1409 }, |
|
1410 /** |
|
1411 * Grab all the items that were asked for, check to see if the Loader |
|
1412 * meta-data contains a "use" array. If it doesm remove the asked item and replace it with |
|
1413 * the content of the "use". |
|
1414 * This will make asking for: "dd" |
|
1415 * Actually ask for: "dd-ddm-base,dd-ddm,dd-ddm-drop,dd-drag,dd-proxy,dd-constrain,dd-drop,dd-scroll,dd-drop-plugin" |
|
1416 * @private |
|
1417 * @method _explodeRollups |
|
1418 */ |
|
1419 _explodeRollups: function() { |
|
1420 var self = this, m, m2, i, a, v, len, len2, |
|
1421 r = self.required; |
|
1422 |
|
1423 if (!self.allowRollup) { |
|
1424 for (i in r) { |
|
1425 if (r.hasOwnProperty(i)) { |
|
1426 m = self.getModule(i); |
|
1427 if (m && m.use) { |
|
1428 len = m.use.length; |
|
1429 for (a = 0; a < len; a++) { |
|
1430 m2 = self.getModule(m.use[a]); |
|
1431 if (m2 && m2.use) { |
|
1432 len2 = m2.use.length; |
|
1433 for (v = 0; v < len2; v++) { |
|
1434 r[m2.use[v]] = true; |
|
1435 } |
|
1436 } else { |
|
1437 r[m.use[a]] = true; |
|
1438 } |
|
1439 } |
|
1440 } |
|
1441 } |
|
1442 } |
|
1443 self.required = r; |
|
1444 } |
|
1445 |
|
1446 }, |
|
1447 /** |
|
1448 * Explodes the required array to remove aliases and replace them with real modules |
|
1449 * @method filterRequires |
|
1450 * @param {Array} r The original requires array |
|
1451 * @return {Array} The new array of exploded requirements |
|
1452 */ |
|
1453 filterRequires: function(r) { |
|
1454 if (r) { |
|
1455 if (!Y.Lang.isArray(r)) { |
|
1456 r = [r]; |
|
1457 } |
|
1458 r = Y.Array(r); |
|
1459 var c = [], i, mod, o, m; |
|
1460 |
|
1461 for (i = 0; i < r.length; i++) { |
|
1462 mod = this.getModule(r[i]); |
|
1463 if (mod && mod.use) { |
|
1464 for (o = 0; o < mod.use.length; o++) { |
|
1465 //Must walk the other modules in case a module is a rollup of rollups (datatype) |
|
1466 m = this.getModule(mod.use[o]); |
|
1467 if (m && m.use && (m.name !== mod.name)) { |
|
1468 c = Y.Array.dedupe([].concat(c, this.filterRequires(m.use))); |
|
1469 } else { |
|
1470 c.push(mod.use[o]); |
|
1471 } |
|
1472 } |
|
1473 } else { |
|
1474 c.push(r[i]); |
|
1475 } |
|
1476 } |
|
1477 r = c; |
|
1478 } |
|
1479 return r; |
|
1480 }, |
|
1481 /** |
|
1482 * Returns an object containing properties for all modules required |
|
1483 * in order to load the requested module |
|
1484 * @method getRequires |
|
1485 * @param {object} mod The module definition from moduleInfo. |
|
1486 * @return {array} the expanded requirement list. |
|
1487 */ |
|
1488 getRequires: function(mod) { |
|
1489 |
|
1490 if (!mod) { |
|
1491 //console.log('returning no reqs for ' + mod.name); |
|
1492 return NO_REQUIREMENTS; |
|
1493 } |
|
1494 |
|
1495 if (mod._parsed) { |
|
1496 //console.log('returning requires for ' + mod.name, mod.requires); |
|
1497 return mod.expanded || NO_REQUIREMENTS; |
|
1498 } |
|
1499 |
|
1500 //TODO add modue cache here out of scope.. |
|
1501 |
|
1502 var i, m, j, add, packName, lang, testresults = this.testresults, |
|
1503 name = mod.name, cond, |
|
1504 adddef = ON_PAGE[name] && ON_PAGE[name].details, |
|
1505 d, go, def, |
|
1506 r, old_mod, |
|
1507 o, skinmod, skindef, skinpar, skinname, |
|
1508 intl = mod.lang || mod.intl, |
|
1509 info = this.moduleInfo, |
|
1510 ftests = Y.Features && Y.Features.tests.load, |
|
1511 hash, reparse; |
|
1512 |
|
1513 // console.log(name); |
|
1514 |
|
1515 // pattern match leaves module stub that needs to be filled out |
|
1516 if (mod.temp && adddef) { |
|
1517 old_mod = mod; |
|
1518 mod = this.addModule(adddef, name); |
|
1519 mod.group = old_mod.group; |
|
1520 mod.pkg = old_mod.pkg; |
|
1521 delete mod.expanded; |
|
1522 } |
|
1523 |
|
1524 // console.log('cache: ' + mod.langCache + ' == ' + this.lang); |
|
1525 |
|
1526 //If a skin or a lang is different, reparse.. |
|
1527 reparse = !((!this.lang || mod.langCache === this.lang) && (mod.skinCache === this.skin.defaultSkin)); |
|
1528 |
|
1529 if (mod.expanded && !reparse) { |
|
1530 return mod.expanded; |
|
1531 } |
|
1532 |
|
1533 |
|
1534 d = []; |
|
1535 hash = {}; |
|
1536 r = this.filterRequires(mod.requires); |
|
1537 if (mod.lang) { |
|
1538 //If a module has a lang attribute, auto add the intl requirement. |
|
1539 d.unshift('intl'); |
|
1540 r.unshift('intl'); |
|
1541 intl = true; |
|
1542 } |
|
1543 o = this.filterRequires(mod.optional); |
|
1544 |
|
1545 |
|
1546 mod._parsed = true; |
|
1547 mod.langCache = this.lang; |
|
1548 mod.skinCache = this.skin.defaultSkin; |
|
1549 |
|
1550 for (i = 0; i < r.length; i++) { |
|
1551 if (!hash[r[i]]) { |
|
1552 d.push(r[i]); |
|
1553 hash[r[i]] = true; |
|
1554 m = this.getModule(r[i]); |
|
1555 if (m) { |
|
1556 add = this.getRequires(m); |
|
1557 intl = intl || (m.expanded_map && |
|
1558 (INTL in m.expanded_map)); |
|
1559 for (j = 0; j < add.length; j++) { |
|
1560 d.push(add[j]); |
|
1561 } |
|
1562 } |
|
1563 } |
|
1564 } |
|
1565 |
|
1566 // get the requirements from superseded modules, if any |
|
1567 r = this.filterRequires(mod.supersedes); |
|
1568 if (r) { |
|
1569 for (i = 0; i < r.length; i++) { |
|
1570 if (!hash[r[i]]) { |
|
1571 // if this module has submodules, the requirements list is |
|
1572 // expanded to include the submodules. This is so we can |
|
1573 // prevent dups when a submodule is already loaded and the |
|
1574 // parent is requested. |
|
1575 if (mod.submodules) { |
|
1576 d.push(r[i]); |
|
1577 } |
|
1578 |
|
1579 hash[r[i]] = true; |
|
1580 m = this.getModule(r[i]); |
|
1581 |
|
1582 if (m) { |
|
1583 add = this.getRequires(m); |
|
1584 intl = intl || (m.expanded_map && |
|
1585 (INTL in m.expanded_map)); |
|
1586 for (j = 0; j < add.length; j++) { |
|
1587 d.push(add[j]); |
|
1588 } |
|
1589 } |
|
1590 } |
|
1591 } |
|
1592 } |
|
1593 |
|
1594 if (o && this.loadOptional) { |
|
1595 for (i = 0; i < o.length; i++) { |
|
1596 if (!hash[o[i]]) { |
|
1597 d.push(o[i]); |
|
1598 hash[o[i]] = true; |
|
1599 m = info[o[i]]; |
|
1600 if (m) { |
|
1601 add = this.getRequires(m); |
|
1602 intl = intl || (m.expanded_map && |
|
1603 (INTL in m.expanded_map)); |
|
1604 for (j = 0; j < add.length; j++) { |
|
1605 d.push(add[j]); |
|
1606 } |
|
1607 } |
|
1608 } |
|
1609 } |
|
1610 } |
|
1611 |
|
1612 cond = this.conditions[name]; |
|
1613 |
|
1614 if (cond) { |
|
1615 //Set the module to not parsed since we have conditionals and this could change the dependency tree. |
|
1616 mod._parsed = false; |
|
1617 if (testresults && ftests) { |
|
1618 oeach(testresults, function(result, id) { |
|
1619 var condmod = ftests[id].name; |
|
1620 if (!hash[condmod] && ftests[id].trigger === name) { |
|
1621 if (result && ftests[id]) { |
|
1622 hash[condmod] = true; |
|
1623 d.push(condmod); |
|
1624 } |
|
1625 } |
|
1626 }); |
|
1627 } else { |
|
1628 for (i in cond) { |
|
1629 if (cond.hasOwnProperty(i)) { |
|
1630 if (!hash[i]) { |
|
1631 def = cond[i]; |
|
1632 //first see if they've specfied a ua check |
|
1633 //then see if they've got a test fn & if it returns true |
|
1634 //otherwise just having a condition block is enough |
|
1635 go = def && ((!def.ua && !def.test) || (def.ua && Y.UA[def.ua]) || |
|
1636 (def.test && def.test(Y, r))); |
|
1637 |
|
1638 if (go) { |
|
1639 hash[i] = true; |
|
1640 d.push(i); |
|
1641 m = this.getModule(i); |
|
1642 if (m) { |
|
1643 add = this.getRequires(m); |
|
1644 for (j = 0; j < add.length; j++) { |
|
1645 d.push(add[j]); |
|
1646 } |
|
1647 |
|
1648 } |
|
1649 } |
|
1650 } |
|
1651 } |
|
1652 } |
|
1653 } |
|
1654 } |
|
1655 |
|
1656 // Create skin modules |
|
1657 if (mod.skinnable) { |
|
1658 skindef = this.skin.overrides; |
|
1659 for (i in YUI.Env.aliases) { |
|
1660 if (YUI.Env.aliases.hasOwnProperty(i)) { |
|
1661 if (Y.Array.indexOf(YUI.Env.aliases[i], name) > -1) { |
|
1662 skinpar = i; |
|
1663 } |
|
1664 } |
|
1665 } |
|
1666 if (skindef && (skindef[name] || (skinpar && skindef[skinpar]))) { |
|
1667 skinname = name; |
|
1668 if (skindef[skinpar]) { |
|
1669 skinname = skinpar; |
|
1670 } |
|
1671 for (i = 0; i < skindef[skinname].length; i++) { |
|
1672 skinmod = this._addSkin(skindef[skinname][i], name); |
|
1673 if (!this.isCSSLoaded(skinmod, this._boot)) { |
|
1674 d.push(skinmod); |
|
1675 } |
|
1676 } |
|
1677 } else { |
|
1678 skinmod = this._addSkin(this.skin.defaultSkin, name); |
|
1679 if (!this.isCSSLoaded(skinmod, this._boot)) { |
|
1680 d.push(skinmod); |
|
1681 } |
|
1682 } |
|
1683 } |
|
1684 |
|
1685 mod._parsed = false; |
|
1686 |
|
1687 if (intl) { |
|
1688 |
|
1689 if (mod.lang && !mod.langPack && Y.Intl) { |
|
1690 lang = Y.Intl.lookupBestLang(this.lang || ROOT_LANG, mod.lang); |
|
1691 packName = this.getLangPackName(lang, name); |
|
1692 if (packName) { |
|
1693 d.unshift(packName); |
|
1694 } |
|
1695 } |
|
1696 d.unshift(INTL); |
|
1697 } |
|
1698 |
|
1699 mod.expanded_map = yArray.hash(d); |
|
1700 |
|
1701 mod.expanded = YObject.keys(mod.expanded_map); |
|
1702 |
|
1703 return mod.expanded; |
|
1704 }, |
|
1705 /** |
|
1706 * Check to see if named css module is already loaded on the page |
|
1707 * @method isCSSLoaded |
|
1708 * @param {String} name The name of the css file |
|
1709 * @return Boolean |
|
1710 */ |
|
1711 isCSSLoaded: function(name, skip) { |
|
1712 //TODO - Make this call a batching call with name being an array |
|
1713 if (!name || !YUI.Env.cssStampEl || (!skip && this.ignoreRegistered)) { |
|
1714 return false; |
|
1715 } |
|
1716 var el = YUI.Env.cssStampEl, |
|
1717 ret = false, |
|
1718 mod = YUI.Env._cssLoaded[name], |
|
1719 style = el.currentStyle; //IE |
|
1720 |
|
1721 |
|
1722 if (mod !== undefined) { |
|
1723 return mod; |
|
1724 } |
|
1725 |
|
1726 //Add the classname to the element |
|
1727 el.className = name; |
|
1728 |
|
1729 if (!style) { |
|
1730 style = Y.config.doc.defaultView.getComputedStyle(el, null); |
|
1731 } |
|
1732 |
|
1733 if (style && style.display === 'none') { |
|
1734 ret = true; |
|
1735 } |
|
1736 |
|
1737 |
|
1738 el.className = ''; //Reset the classname to '' |
|
1739 |
|
1740 YUI.Env._cssLoaded[name] = ret; |
|
1741 |
|
1742 return ret; |
|
1743 }, |
|
1744 |
|
1745 /** |
|
1746 * Returns a hash of module names the supplied module satisfies. |
|
1747 * @method getProvides |
|
1748 * @param {string} name The name of the module. |
|
1749 * @return {object} what this module provides. |
|
1750 */ |
|
1751 getProvides: function(name) { |
|
1752 var m = this.getModule(name), o, s; |
|
1753 // supmap = this.provides; |
|
1754 |
|
1755 if (!m) { |
|
1756 return NOT_FOUND; |
|
1757 } |
|
1758 |
|
1759 if (m && !m.provides) { |
|
1760 o = {}; |
|
1761 s = m.supersedes; |
|
1762 |
|
1763 if (s) { |
|
1764 yArray.each(s, function(v) { |
|
1765 Y.mix(o, this.getProvides(v)); |
|
1766 }, this); |
|
1767 } |
|
1768 |
|
1769 o[name] = true; |
|
1770 m.provides = o; |
|
1771 |
|
1772 } |
|
1773 |
|
1774 return m.provides; |
|
1775 }, |
|
1776 |
|
1777 /** |
|
1778 * Calculates the dependency tree, the result is stored in the sorted |
|
1779 * property. |
|
1780 * @method calculate |
|
1781 * @param {object} o optional options object. |
|
1782 * @param {string} type optional argument to prune modules. |
|
1783 */ |
|
1784 calculate: function(o, type) { |
|
1785 if (o || type || this.dirty) { |
|
1786 |
|
1787 if (o) { |
|
1788 this._config(o); |
|
1789 } |
|
1790 |
|
1791 if (!this._init) { |
|
1792 this._setup(); |
|
1793 } |
|
1794 |
|
1795 this._explode(); |
|
1796 |
|
1797 if (this.allowRollup) { |
|
1798 this._rollup(); |
|
1799 } else { |
|
1800 this._explodeRollups(); |
|
1801 } |
|
1802 this._reduce(); |
|
1803 this._sort(); |
|
1804 } |
|
1805 }, |
|
1806 /** |
|
1807 * Creates a "psuedo" package for languages provided in the lang array |
|
1808 * @method _addLangPack |
|
1809 * @private |
|
1810 * @param {String} lang The language to create |
|
1811 * @param {Object} m The module definition to create the language pack around |
|
1812 * @param {String} packName The name of the package (e.g: lang/datatype-date-en-US) |
|
1813 * @return {Object} The module definition |
|
1814 */ |
|
1815 _addLangPack: function(lang, m, packName) { |
|
1816 var name = m.name, |
|
1817 packPath, conf, |
|
1818 existing = this.moduleInfo[packName]; |
|
1819 |
|
1820 if (!existing) { |
|
1821 |
|
1822 packPath = _path((m.pkg || name), packName, JS, true); |
|
1823 |
|
1824 conf = { |
|
1825 path: packPath, |
|
1826 intl: true, |
|
1827 langPack: true, |
|
1828 ext: m.ext, |
|
1829 group: m.group, |
|
1830 supersedes: [] |
|
1831 }; |
|
1832 if (m.root) { |
|
1833 conf.root = m.root; |
|
1834 } |
|
1835 if (m.base) { |
|
1836 conf.base = m.base; |
|
1837 } |
|
1838 |
|
1839 if (m.configFn) { |
|
1840 conf.configFn = m.configFn; |
|
1841 } |
|
1842 |
|
1843 this.addModule(conf, packName); |
|
1844 |
|
1845 if (lang) { |
|
1846 Y.Env.lang = Y.Env.lang || {}; |
|
1847 Y.Env.lang[lang] = Y.Env.lang[lang] || {}; |
|
1848 Y.Env.lang[lang][name] = true; |
|
1849 } |
|
1850 } |
|
1851 |
|
1852 return this.moduleInfo[packName]; |
|
1853 }, |
|
1854 |
|
1855 /** |
|
1856 * Investigates the current YUI configuration on the page. By default, |
|
1857 * modules already detected will not be loaded again unless a force |
|
1858 * option is encountered. Called by calculate() |
|
1859 * @method _setup |
|
1860 * @private |
|
1861 */ |
|
1862 _setup: function() { |
|
1863 var info = this.moduleInfo, name, i, j, m, l, |
|
1864 packName; |
|
1865 |
|
1866 for (name in info) { |
|
1867 if (info.hasOwnProperty(name)) { |
|
1868 m = info[name]; |
|
1869 if (m) { |
|
1870 |
|
1871 // remove dups |
|
1872 //m.requires = YObject.keys(yArray.hash(m.requires)); |
|
1873 m.requires = yArray.dedupe(m.requires); |
|
1874 |
|
1875 // Create lang pack modules |
|
1876 //if (m.lang && m.lang.length) { |
|
1877 if (m.lang) { |
|
1878 // Setup root package if the module has lang defined, |
|
1879 // it needs to provide a root language pack |
|
1880 packName = this.getLangPackName(ROOT_LANG, name); |
|
1881 this._addLangPack(null, m, packName); |
|
1882 } |
|
1883 |
|
1884 } |
|
1885 } |
|
1886 } |
|
1887 |
|
1888 |
|
1889 //l = Y.merge(this.inserted); |
|
1890 l = {}; |
|
1891 |
|
1892 // available modules |
|
1893 if (!this.ignoreRegistered) { |
|
1894 Y.mix(l, GLOBAL_ENV.mods); |
|
1895 } |
|
1896 |
|
1897 // add the ignore list to the list of loaded packages |
|
1898 if (this.ignore) { |
|
1899 Y.mix(l, yArray.hash(this.ignore)); |
|
1900 } |
|
1901 |
|
1902 // expand the list to include superseded modules |
|
1903 for (j in l) { |
|
1904 if (l.hasOwnProperty(j)) { |
|
1905 Y.mix(l, this.getProvides(j)); |
|
1906 } |
|
1907 } |
|
1908 |
|
1909 // remove modules on the force list from the loaded list |
|
1910 if (this.force) { |
|
1911 for (i = 0; i < this.force.length; i++) { |
|
1912 if (this.force[i] in l) { |
|
1913 delete l[this.force[i]]; |
|
1914 } |
|
1915 } |
|
1916 } |
|
1917 |
|
1918 Y.mix(this.loaded, l); |
|
1919 |
|
1920 this._init = true; |
|
1921 }, |
|
1922 |
|
1923 /** |
|
1924 * Builds a module name for a language pack |
|
1925 * @method getLangPackName |
|
1926 * @param {string} lang the language code. |
|
1927 * @param {string} mname the module to build it for. |
|
1928 * @return {string} the language pack module name. |
|
1929 */ |
|
1930 getLangPackName: function(lang, mname) { |
|
1931 return ('lang/' + mname + ((lang) ? '_' + lang : '')); |
|
1932 }, |
|
1933 /** |
|
1934 * Inspects the required modules list looking for additional |
|
1935 * dependencies. Expands the required list to include all |
|
1936 * required modules. Called by calculate() |
|
1937 * @method _explode |
|
1938 * @private |
|
1939 */ |
|
1940 _explode: function() { |
|
1941 //TODO Move done out of scope |
|
1942 var r = this.required, m, reqs, done = {}, |
|
1943 self = this, name, expound; |
|
1944 |
|
1945 // the setup phase is over, all modules have been created |
|
1946 self.dirty = false; |
|
1947 |
|
1948 self._explodeRollups(); |
|
1949 r = self.required; |
|
1950 |
|
1951 for (name in r) { |
|
1952 if (r.hasOwnProperty(name)) { |
|
1953 if (!done[name]) { |
|
1954 done[name] = true; |
|
1955 m = self.getModule(name); |
|
1956 if (m) { |
|
1957 expound = m.expound; |
|
1958 |
|
1959 if (expound) { |
|
1960 r[expound] = self.getModule(expound); |
|
1961 reqs = self.getRequires(r[expound]); |
|
1962 Y.mix(r, yArray.hash(reqs)); |
|
1963 } |
|
1964 |
|
1965 reqs = self.getRequires(m); |
|
1966 Y.mix(r, yArray.hash(reqs)); |
|
1967 } |
|
1968 } |
|
1969 } |
|
1970 } |
|
1971 |
|
1972 }, |
|
1973 /** |
|
1974 * The default method used to test a module against a pattern |
|
1975 * @method _patternTest |
|
1976 * @private |
|
1977 * @param {String} mname The module being tested |
|
1978 * @param {String} pname The pattern to match |
|
1979 */ |
|
1980 _patternTest: function(mname, pname) { |
|
1981 return (mname.indexOf(pname) > -1); |
|
1982 }, |
|
1983 /** |
|
1984 * Get's the loader meta data for the requested module |
|
1985 * @method getModule |
|
1986 * @param {String} mname The module name to get |
|
1987 * @return {Object} The module metadata |
|
1988 */ |
|
1989 getModule: function(mname) { |
|
1990 //TODO: Remove name check - it's a quick hack to fix pattern WIP |
|
1991 if (!mname) { |
|
1992 return null; |
|
1993 } |
|
1994 |
|
1995 var p, found, pname, |
|
1996 m = this.moduleInfo[mname], |
|
1997 patterns = this.patterns; |
|
1998 |
|
1999 // check the patterns library to see if we should automatically add |
|
2000 // the module with defaults |
|
2001 if (!m || (m && m.ext)) { |
|
2002 for (pname in patterns) { |
|
2003 if (patterns.hasOwnProperty(pname)) { |
|
2004 p = patterns[pname]; |
|
2005 |
|
2006 //There is no test method, create a default one that tests |
|
2007 // the pattern against the mod name |
|
2008 if (!p.test) { |
|
2009 p.test = this._patternTest; |
|
2010 } |
|
2011 |
|
2012 if (p.test(mname, pname)) { |
|
2013 // use the metadata supplied for the pattern |
|
2014 // as the module definition. |
|
2015 found = p; |
|
2016 break; |
|
2017 } |
|
2018 } |
|
2019 } |
|
2020 } |
|
2021 |
|
2022 if (!m) { |
|
2023 if (found) { |
|
2024 if (p.action) { |
|
2025 p.action.call(this, mname, pname); |
|
2026 } else { |
|
2027 // ext true or false? |
|
2028 m = this.addModule(Y.merge(found), mname); |
|
2029 if (found.configFn) { |
|
2030 m.configFn = found.configFn; |
|
2031 } |
|
2032 m.temp = true; |
|
2033 } |
|
2034 } |
|
2035 } else { |
|
2036 if (found && m && found.configFn && !m.configFn) { |
|
2037 m.configFn = found.configFn; |
|
2038 m.configFn(m); |
|
2039 } |
|
2040 } |
|
2041 |
|
2042 return m; |
|
2043 }, |
|
2044 |
|
2045 // impl in rollup submodule |
|
2046 _rollup: function() { }, |
|
2047 |
|
2048 /** |
|
2049 * Remove superceded modules and loaded modules. Called by |
|
2050 * calculate() after we have the mega list of all dependencies |
|
2051 * @method _reduce |
|
2052 * @return {object} the reduced dependency hash. |
|
2053 * @private |
|
2054 */ |
|
2055 _reduce: function(r) { |
|
2056 |
|
2057 r = r || this.required; |
|
2058 |
|
2059 var i, j, s, m, type = this.loadType, |
|
2060 ignore = this.ignore ? yArray.hash(this.ignore) : false; |
|
2061 |
|
2062 for (i in r) { |
|
2063 if (r.hasOwnProperty(i)) { |
|
2064 m = this.getModule(i); |
|
2065 // remove if already loaded |
|
2066 if (((this.loaded[i] || ON_PAGE[i]) && |
|
2067 !this.forceMap[i] && !this.ignoreRegistered) || |
|
2068 (type && m && m.type !== type)) { |
|
2069 delete r[i]; |
|
2070 } |
|
2071 if (ignore && ignore[i]) { |
|
2072 delete r[i]; |
|
2073 } |
|
2074 // remove anything this module supersedes |
|
2075 s = m && m.supersedes; |
|
2076 if (s) { |
|
2077 for (j = 0; j < s.length; j++) { |
|
2078 if (s[j] in r) { |
|
2079 delete r[s[j]]; |
|
2080 } |
|
2081 } |
|
2082 } |
|
2083 } |
|
2084 } |
|
2085 |
|
2086 return r; |
|
2087 }, |
|
2088 /** |
|
2089 * Handles the queue when a module has been loaded for all cases |
|
2090 * @method _finish |
|
2091 * @private |
|
2092 * @param {String} msg The message from Loader |
|
2093 * @param {Boolean} success A boolean denoting success or failure |
|
2094 */ |
|
2095 _finish: function(msg, success) { |
|
2096 |
|
2097 _queue.running = false; |
|
2098 |
|
2099 var onEnd = this.onEnd; |
|
2100 if (onEnd) { |
|
2101 onEnd.call(this.context, { |
|
2102 msg: msg, |
|
2103 data: this.data, |
|
2104 success: success |
|
2105 }); |
|
2106 } |
|
2107 this._continue(); |
|
2108 }, |
|
2109 /** |
|
2110 * The default Loader onSuccess handler, calls this.onSuccess with a payload |
|
2111 * @method _onSuccess |
|
2112 * @private |
|
2113 */ |
|
2114 _onSuccess: function() { |
|
2115 var self = this, skipped = Y.merge(self.skipped), fn, |
|
2116 failed = [], rreg = self.requireRegistration, |
|
2117 success, msg, i, mod; |
|
2118 |
|
2119 for (i in skipped) { |
|
2120 if (skipped.hasOwnProperty(i)) { |
|
2121 delete self.inserted[i]; |
|
2122 } |
|
2123 } |
|
2124 |
|
2125 self.skipped = {}; |
|
2126 |
|
2127 for (i in self.inserted) { |
|
2128 if (self.inserted.hasOwnProperty(i)) { |
|
2129 mod = self.getModule(i); |
|
2130 if (mod && rreg && mod.type === JS && !(i in YUI.Env.mods)) { |
|
2131 failed.push(i); |
|
2132 } else { |
|
2133 Y.mix(self.loaded, self.getProvides(i)); |
|
2134 } |
|
2135 } |
|
2136 } |
|
2137 |
|
2138 fn = self.onSuccess; |
|
2139 msg = (failed.length) ? 'notregistered' : 'success'; |
|
2140 success = !(failed.length); |
|
2141 if (fn) { |
|
2142 fn.call(self.context, { |
|
2143 msg: msg, |
|
2144 data: self.data, |
|
2145 success: success, |
|
2146 failed: failed, |
|
2147 skipped: skipped |
|
2148 }); |
|
2149 } |
|
2150 self._finish(msg, success); |
|
2151 }, |
|
2152 /** |
|
2153 * The default Loader onProgress handler, calls this.onProgress with a payload |
|
2154 * @method _onProgress |
|
2155 * @private |
|
2156 */ |
|
2157 _onProgress: function(e) { |
|
2158 var self = this, i; |
|
2159 //set the internal cache to what just came in. |
|
2160 if (e.data && e.data.length) { |
|
2161 for (i = 0; i < e.data.length; i++) { |
|
2162 e.data[i] = self.getModule(e.data[i].name); |
|
2163 } |
|
2164 } |
|
2165 if (self.onProgress) { |
|
2166 self.onProgress.call(self.context, { |
|
2167 name: e.url, |
|
2168 data: e.data |
|
2169 }); |
|
2170 } |
|
2171 }, |
|
2172 /** |
|
2173 * The default Loader onFailure handler, calls this.onFailure with a payload |
|
2174 * @method _onFailure |
|
2175 * @private |
|
2176 */ |
|
2177 _onFailure: function(o) { |
|
2178 var f = this.onFailure, msg = [], i = 0, len = o.errors.length; |
|
2179 |
|
2180 for (i; i < len; i++) { |
|
2181 msg.push(o.errors[i].error); |
|
2182 } |
|
2183 |
|
2184 msg = msg.join(','); |
|
2185 |
|
2186 |
|
2187 if (f) { |
|
2188 f.call(this.context, { |
|
2189 msg: msg, |
|
2190 data: this.data, |
|
2191 success: false |
|
2192 }); |
|
2193 } |
|
2194 |
|
2195 this._finish(msg, false); |
|
2196 |
|
2197 }, |
|
2198 |
|
2199 /** |
|
2200 * The default Loader onTimeout handler, calls this.onTimeout with a payload |
|
2201 * @method _onTimeout |
|
2202 * @param {Get.Transaction} transaction The Transaction object from `Y.Get` |
|
2203 * @private |
|
2204 */ |
|
2205 _onTimeout: function(transaction) { |
|
2206 var f = this.onTimeout; |
|
2207 if (f) { |
|
2208 f.call(this.context, { |
|
2209 msg: 'timeout', |
|
2210 data: this.data, |
|
2211 success: false, |
|
2212 transaction: transaction |
|
2213 }); |
|
2214 } |
|
2215 }, |
|
2216 |
|
2217 /** |
|
2218 * Sorts the dependency tree. The last step of calculate() |
|
2219 * @method _sort |
|
2220 * @private |
|
2221 */ |
|
2222 _sort: function() { |
|
2223 var name, |
|
2224 |
|
2225 // Object containing module names. |
|
2226 required = this.required, |
|
2227 |
|
2228 // Keep track of whether we've visited a module. |
|
2229 visited = {}; |
|
2230 |
|
2231 // Will contain modules names, in the correct order, |
|
2232 // according to dependencies. |
|
2233 this.sorted = []; |
|
2234 |
|
2235 for (name in required) { |
|
2236 if (!visited[name] && required.hasOwnProperty(name)) { |
|
2237 this._visit(name, visited); |
|
2238 } |
|
2239 } |
|
2240 }, |
|
2241 |
|
2242 /** |
|
2243 * Recursively visits the dependencies of the module name |
|
2244 * passed in, and appends each module name to the `sorted` property. |
|
2245 * @param {String} name The name of a module. |
|
2246 * @param {Object} visited Keeps track of whether a module was visited. |
|
2247 * @method _visit |
|
2248 * @private |
|
2249 */ |
|
2250 _visit: function (name, visited) { |
|
2251 var required, moduleInfo, dependency, dependencies, i, l; |
|
2252 |
|
2253 visited[name] = true; |
|
2254 required = this.required; |
|
2255 moduleInfo = this.moduleInfo[name]; |
|
2256 |
|
2257 if (moduleInfo) { |
|
2258 // Recurse on each dependency of this module, |
|
2259 // figuring out its dependencies, and so on. |
|
2260 dependencies = moduleInfo.requires; |
|
2261 for (i = 0, l = dependencies.length; i < l; ++i) { |
|
2262 dependency = dependencies[i]; |
|
2263 |
|
2264 // Is this module name in the required list of modules, |
|
2265 // and have we not already visited it? |
|
2266 if (required[dependency] && !visited[dependency]) { |
|
2267 this._visit(dependency, visited); |
|
2268 } |
|
2269 } |
|
2270 } |
|
2271 |
|
2272 this.sorted.push(name); |
|
2273 }, |
|
2274 |
|
2275 /** |
|
2276 * Handles the actual insertion of script/link tags |
|
2277 * @method _insert |
|
2278 * @private |
|
2279 * @param {Object} source The YUI instance the request came from |
|
2280 * @param {Object} o The metadata to include |
|
2281 * @param {String} type JS or CSS |
|
2282 * @param {Boolean} [skipcalc=false] Do a Loader.calculate on the meta |
|
2283 */ |
|
2284 _insert: function(source, o, type, skipcalc) { |
|
2285 |
|
2286 |
|
2287 // restore the state at the time of the request |
|
2288 if (source) { |
|
2289 this._config(source); |
|
2290 } |
|
2291 |
|
2292 // build the dependency list |
|
2293 // don't include type so we can process CSS and script in |
|
2294 // one pass when the type is not specified. |
|
2295 |
|
2296 var modules = this.resolve(!skipcalc), |
|
2297 self = this, comp = 0, actions = 0, |
|
2298 mods = {}, deps, complete; |
|
2299 |
|
2300 self._refetch = []; |
|
2301 |
|
2302 if (type) { |
|
2303 //Filter out the opposite type and reset the array so the checks later work |
|
2304 modules[((type === JS) ? CSS : JS)] = []; |
|
2305 } |
|
2306 if (!self.fetchCSS) { |
|
2307 modules.css = []; |
|
2308 } |
|
2309 if (modules.js.length) { |
|
2310 comp++; |
|
2311 } |
|
2312 if (modules.css.length) { |
|
2313 comp++; |
|
2314 } |
|
2315 |
|
2316 //console.log('Resolved Modules: ', modules); |
|
2317 |
|
2318 complete = function(d) { |
|
2319 actions++; |
|
2320 var errs = {}, i = 0, o = 0, u = '', fn, |
|
2321 modName, resMods; |
|
2322 |
|
2323 if (d && d.errors) { |
|
2324 for (i = 0; i < d.errors.length; i++) { |
|
2325 if (d.errors[i].request) { |
|
2326 u = d.errors[i].request.url; |
|
2327 } else { |
|
2328 u = d.errors[i]; |
|
2329 } |
|
2330 errs[u] = u; |
|
2331 } |
|
2332 } |
|
2333 |
|
2334 if (d && d.data && d.data.length && (d.type === 'success')) { |
|
2335 for (i = 0; i < d.data.length; i++) { |
|
2336 self.inserted[d.data[i].name] = true; |
|
2337 //If the external module has a skin or a lang, reprocess it |
|
2338 if (d.data[i].lang || d.data[i].skinnable) { |
|
2339 delete self.inserted[d.data[i].name]; |
|
2340 self._refetch.push(d.data[i].name); |
|
2341 } |
|
2342 } |
|
2343 } |
|
2344 |
|
2345 if (actions === comp) { |
|
2346 self._loading = null; |
|
2347 if (self._refetch.length) { |
|
2348 //Get the deps for the new meta-data and reprocess |
|
2349 for (i = 0; i < self._refetch.length; i++) { |
|
2350 deps = self.getRequires(self.getModule(self._refetch[i])); |
|
2351 for (o = 0; o < deps.length; o++) { |
|
2352 if (!self.inserted[deps[o]]) { |
|
2353 //We wouldn't be to this point without the module being here |
|
2354 mods[deps[o]] = deps[o]; |
|
2355 } |
|
2356 } |
|
2357 } |
|
2358 mods = Y.Object.keys(mods); |
|
2359 if (mods.length) { |
|
2360 self.require(mods); |
|
2361 resMods = self.resolve(true); |
|
2362 if (resMods.cssMods.length) { |
|
2363 for (i=0; i < resMods.cssMods.length; i++) { |
|
2364 modName = resMods.cssMods[i].name; |
|
2365 delete YUI.Env._cssLoaded[modName]; |
|
2366 if (self.isCSSLoaded(modName)) { |
|
2367 self.inserted[modName] = true; |
|
2368 delete self.required[modName]; |
|
2369 } |
|
2370 } |
|
2371 self.sorted = []; |
|
2372 self._sort(); |
|
2373 } |
|
2374 d = null; //bail |
|
2375 self._insert(); //insert the new deps |
|
2376 } |
|
2377 } |
|
2378 if (d && d.fn) { |
|
2379 fn = d.fn; |
|
2380 delete d.fn; |
|
2381 fn.call(self, d); |
|
2382 } |
|
2383 } |
|
2384 }; |
|
2385 |
|
2386 this._loading = true; |
|
2387 |
|
2388 if (!modules.js.length && !modules.css.length) { |
|
2389 actions = -1; |
|
2390 complete({ |
|
2391 fn: self._onSuccess |
|
2392 }); |
|
2393 return; |
|
2394 } |
|
2395 |
|
2396 |
|
2397 if (modules.css.length) { //Load CSS first |
|
2398 Y.Get.css(modules.css, { |
|
2399 data: modules.cssMods, |
|
2400 attributes: self.cssAttributes, |
|
2401 insertBefore: self.insertBefore, |
|
2402 charset: self.charset, |
|
2403 timeout: self.timeout, |
|
2404 context: self, |
|
2405 onProgress: function(e) { |
|
2406 self._onProgress.call(self, e); |
|
2407 }, |
|
2408 onTimeout: function(d) { |
|
2409 self._onTimeout.call(self, d); |
|
2410 }, |
|
2411 onSuccess: function(d) { |
|
2412 d.type = 'success'; |
|
2413 d.fn = self._onSuccess; |
|
2414 complete.call(self, d); |
|
2415 }, |
|
2416 onFailure: function(d) { |
|
2417 d.type = 'failure'; |
|
2418 d.fn = self._onFailure; |
|
2419 complete.call(self, d); |
|
2420 } |
|
2421 }); |
|
2422 } |
|
2423 |
|
2424 if (modules.js.length) { |
|
2425 Y.Get.js(modules.js, { |
|
2426 data: modules.jsMods, |
|
2427 insertBefore: self.insertBefore, |
|
2428 attributes: self.jsAttributes, |
|
2429 charset: self.charset, |
|
2430 timeout: self.timeout, |
|
2431 autopurge: false, |
|
2432 context: self, |
|
2433 async: self.async, |
|
2434 onProgress: function(e) { |
|
2435 self._onProgress.call(self, e); |
|
2436 }, |
|
2437 onTimeout: function(d) { |
|
2438 self._onTimeout.call(self, d); |
|
2439 }, |
|
2440 onSuccess: function(d) { |
|
2441 d.type = 'success'; |
|
2442 d.fn = self._onSuccess; |
|
2443 complete.call(self, d); |
|
2444 }, |
|
2445 onFailure: function(d) { |
|
2446 d.type = 'failure'; |
|
2447 d.fn = self._onFailure; |
|
2448 complete.call(self, d); |
|
2449 } |
|
2450 }); |
|
2451 } |
|
2452 }, |
|
2453 /** |
|
2454 * Once a loader operation is completely finished, process any additional queued items. |
|
2455 * @method _continue |
|
2456 * @private |
|
2457 */ |
|
2458 _continue: function() { |
|
2459 if (!(_queue.running) && _queue.size() > 0) { |
|
2460 _queue.running = true; |
|
2461 _queue.next()(); |
|
2462 } |
|
2463 }, |
|
2464 |
|
2465 /** |
|
2466 * inserts the requested modules and their dependencies. |
|
2467 * <code>type</code> can be "js" or "css". Both script and |
|
2468 * css are inserted if type is not provided. |
|
2469 * @method insert |
|
2470 * @param {object} o optional options object. |
|
2471 * @param {string} type the type of dependency to insert. |
|
2472 */ |
|
2473 insert: function(o, type, skipsort) { |
|
2474 var self = this, copy = Y.merge(this); |
|
2475 delete copy.require; |
|
2476 delete copy.dirty; |
|
2477 _queue.add(function() { |
|
2478 self._insert(copy, o, type, skipsort); |
|
2479 }); |
|
2480 this._continue(); |
|
2481 }, |
|
2482 |
|
2483 /** |
|
2484 * Executed every time a module is loaded, and if we are in a load |
|
2485 * cycle, we attempt to load the next script. Public so that it |
|
2486 * is possible to call this if using a method other than |
|
2487 * Y.register to determine when scripts are fully loaded |
|
2488 * @method loadNext |
|
2489 * @deprecated |
|
2490 * @param {string} mname optional the name of the module that has |
|
2491 * been loaded (which is usually why it is time to load the next |
|
2492 * one). |
|
2493 */ |
|
2494 loadNext: function() { |
|
2495 return; |
|
2496 }, |
|
2497 |
|
2498 /** |
|
2499 * Apply filter defined for this instance to a url/path |
|
2500 * @method _filter |
|
2501 * @param {string} u the string to filter. |
|
2502 * @param {string} name the name of the module, if we are processing |
|
2503 * a single module as opposed to a combined url. |
|
2504 * @return {string} the filtered string. |
|
2505 * @private |
|
2506 */ |
|
2507 _filter: function(u, name, group) { |
|
2508 var f = this.filter, |
|
2509 hasFilter = name && (name in this.filters), |
|
2510 modFilter = hasFilter && this.filters[name], |
|
2511 groupName = group || (this.moduleInfo[name] ? this.moduleInfo[name].group : null); |
|
2512 |
|
2513 if (groupName && this.groups[groupName] && this.groups[groupName].filter) { |
|
2514 modFilter = this.groups[groupName].filter; |
|
2515 hasFilter = true; |
|
2516 } |
|
2517 |
|
2518 if (u) { |
|
2519 if (hasFilter) { |
|
2520 f = (L.isString(modFilter)) ? this.FILTER_DEFS[modFilter.toUpperCase()] || null : modFilter; |
|
2521 } |
|
2522 if (f) { |
|
2523 u = u.replace(new RegExp(f.searchExp, 'g'), f.replaceStr); |
|
2524 } |
|
2525 } |
|
2526 return u; |
|
2527 }, |
|
2528 |
|
2529 /** |
|
2530 * Generates the full url for a module |
|
2531 * @method _url |
|
2532 * @param {string} path the path fragment. |
|
2533 * @param {String} name The name of the module |
|
2534 * @param {String} [base] The base url to use. Defaults to self.base |
|
2535 * @return {string} the full url. |
|
2536 * @private |
|
2537 */ |
|
2538 _url: function(path, name, base) { |
|
2539 return this._filter((base || this.base || '') + path, name); |
|
2540 }, |
|
2541 /** |
|
2542 * Returns an Object hash of file arrays built from `loader.sorted` or from an arbitrary list of sorted modules. |
|
2543 * @method resolve |
|
2544 * @param {Boolean} [calc=false] Perform a loader.calculate() before anything else |
|
2545 * @param {Array} [s] An override for the loader.sorted array. Defaults to |
|
2546 * `loader.sorted`. |
|
2547 * @return {Object} Object hash (js and css) of two arrays of file lists |
|
2548 * @example This method can be used as an off-line dep calculator |
|
2549 * |
|
2550 * var Y = YUI(); |
|
2551 * var loader = new Y.Loader({ |
|
2552 * filter: 'debug', |
|
2553 * base: '../../', |
|
2554 * root: 'build/', |
|
2555 * combine: true, |
|
2556 * require: ['node', 'dd', 'console'] |
|
2557 * }); |
|
2558 * var out = loader.resolve(true); |
|
2559 * |
|
2560 */ |
|
2561 resolve: function(calc, s) { |
|
2562 |
|
2563 var len, i, m, url, group, groupName, j, frag, |
|
2564 comboSource, comboSources, mods, comboBase, |
|
2565 base, urls, u = [], tmpBase, baseLen, resCombos = {}, |
|
2566 self = this, comboSep, maxURLLength, |
|
2567 inserted = (self.ignoreRegistered) ? {} : self.inserted, |
|
2568 resolved = { js: [], jsMods: [], css: [], cssMods: [] }, |
|
2569 type = self.loadType || 'js', addSingle; |
|
2570 |
|
2571 if (self.skin.overrides || self.skin.defaultSkin !== DEFAULT_SKIN || self.ignoreRegistered) { |
|
2572 self._resetModules(); |
|
2573 } |
|
2574 |
|
2575 if (calc) { |
|
2576 self.calculate(); |
|
2577 } |
|
2578 s = s || self.sorted; |
|
2579 |
|
2580 addSingle = function(m) { |
|
2581 |
|
2582 if (m) { |
|
2583 group = (m.group && self.groups[m.group]) || NOT_FOUND; |
|
2584 |
|
2585 //Always assume it's async |
|
2586 if (group.async === false) { |
|
2587 m.async = group.async; |
|
2588 } |
|
2589 |
|
2590 url = (m.fullpath) ? self._filter(m.fullpath, s[i]) : |
|
2591 self._url(m.path, s[i], group.base || m.base); |
|
2592 |
|
2593 if (m.attributes || m.async === false) { |
|
2594 url = { |
|
2595 url: url, |
|
2596 async: m.async |
|
2597 }; |
|
2598 if (m.attributes) { |
|
2599 url.attributes = m.attributes; |
|
2600 } |
|
2601 } |
|
2602 resolved[m.type].push(url); |
|
2603 resolved[m.type + 'Mods'].push(m); |
|
2604 } else { |
|
2605 } |
|
2606 |
|
2607 }; |
|
2608 |
|
2609 len = s.length; |
|
2610 |
|
2611 // the default combo base |
|
2612 comboBase = self.comboBase; |
|
2613 |
|
2614 url = comboBase; |
|
2615 |
|
2616 comboSources = {}; |
|
2617 |
|
2618 for (i = 0; i < len; i++) { |
|
2619 comboSource = comboBase; |
|
2620 m = self.getModule(s[i]); |
|
2621 groupName = m && m.group; |
|
2622 group = self.groups[groupName]; |
|
2623 if (groupName && group) { |
|
2624 |
|
2625 if (!group.combine || m.fullpath) { |
|
2626 //This is not a combo module, skip it and load it singly later. |
|
2627 addSingle(m); |
|
2628 continue; |
|
2629 } |
|
2630 m.combine = true; |
|
2631 if (group.comboBase) { |
|
2632 comboSource = group.comboBase; |
|
2633 } |
|
2634 |
|
2635 if ("root" in group && L.isValue(group.root)) { |
|
2636 m.root = group.root; |
|
2637 } |
|
2638 m.comboSep = group.comboSep || self.comboSep; |
|
2639 m.maxURLLength = group.maxURLLength || self.maxURLLength; |
|
2640 } else { |
|
2641 if (!self.combine) { |
|
2642 //This is not a combo module, skip it and load it singly later. |
|
2643 addSingle(m); |
|
2644 continue; |
|
2645 } |
|
2646 } |
|
2647 |
|
2648 comboSources[comboSource] = comboSources[comboSource] || []; |
|
2649 comboSources[comboSource].push(m); |
|
2650 } |
|
2651 |
|
2652 for (j in comboSources) { |
|
2653 if (comboSources.hasOwnProperty(j)) { |
|
2654 resCombos[j] = resCombos[j] || { js: [], jsMods: [], css: [], cssMods: [] }; |
|
2655 url = j; |
|
2656 mods = comboSources[j]; |
|
2657 len = mods.length; |
|
2658 |
|
2659 if (len) { |
|
2660 for (i = 0; i < len; i++) { |
|
2661 if (inserted[mods[i]]) { |
|
2662 continue; |
|
2663 } |
|
2664 m = mods[i]; |
|
2665 // Do not try to combine non-yui JS unless combo def |
|
2666 // is found |
|
2667 if (m && (m.combine || !m.ext)) { |
|
2668 resCombos[j].comboSep = m.comboSep; |
|
2669 resCombos[j].group = m.group; |
|
2670 resCombos[j].maxURLLength = m.maxURLLength; |
|
2671 frag = ((L.isValue(m.root)) ? m.root : self.root) + (m.path || m.fullpath); |
|
2672 frag = self._filter(frag, m.name); |
|
2673 resCombos[j][m.type].push(frag); |
|
2674 resCombos[j][m.type + 'Mods'].push(m); |
|
2675 } else { |
|
2676 //Add them to the next process.. |
|
2677 if (mods[i]) { |
|
2678 addSingle(mods[i]); |
|
2679 } |
|
2680 } |
|
2681 |
|
2682 } |
|
2683 } |
|
2684 } |
|
2685 } |
|
2686 |
|
2687 |
|
2688 for (j in resCombos) { |
|
2689 if (resCombos.hasOwnProperty(j)) { |
|
2690 base = j; |
|
2691 comboSep = resCombos[base].comboSep || self.comboSep; |
|
2692 maxURLLength = resCombos[base].maxURLLength || self.maxURLLength; |
|
2693 for (type in resCombos[base]) { |
|
2694 if (type === JS || type === CSS) { |
|
2695 urls = resCombos[base][type]; |
|
2696 mods = resCombos[base][type + 'Mods']; |
|
2697 len = urls.length; |
|
2698 tmpBase = base + urls.join(comboSep); |
|
2699 baseLen = tmpBase.length; |
|
2700 if (maxURLLength <= base.length) { |
|
2701 maxURLLength = MAX_URL_LENGTH; |
|
2702 } |
|
2703 |
|
2704 if (len) { |
|
2705 if (baseLen > maxURLLength) { |
|
2706 u = []; |
|
2707 for (s = 0; s < len; s++) { |
|
2708 u.push(urls[s]); |
|
2709 tmpBase = base + u.join(comboSep); |
|
2710 |
|
2711 if (tmpBase.length > maxURLLength) { |
|
2712 m = u.pop(); |
|
2713 tmpBase = base + u.join(comboSep); |
|
2714 resolved[type].push(self._filter(tmpBase, null, resCombos[base].group)); |
|
2715 u = []; |
|
2716 if (m) { |
|
2717 u.push(m); |
|
2718 } |
|
2719 } |
|
2720 } |
|
2721 if (u.length) { |
|
2722 tmpBase = base + u.join(comboSep); |
|
2723 resolved[type].push(self._filter(tmpBase, null, resCombos[base].group)); |
|
2724 } |
|
2725 } else { |
|
2726 resolved[type].push(self._filter(tmpBase, null, resCombos[base].group)); |
|
2727 } |
|
2728 } |
|
2729 resolved[type + 'Mods'] = resolved[type + 'Mods'].concat(mods); |
|
2730 } |
|
2731 } |
|
2732 } |
|
2733 } |
|
2734 |
|
2735 resCombos = null; |
|
2736 |
|
2737 return resolved; |
|
2738 }, |
|
2739 /** |
|
2740 Shortcut to calculate, resolve and load all modules. |
|
2741 |
|
2742 var loader = new Y.Loader({ |
|
2743 ignoreRegistered: true, |
|
2744 modules: { |
|
2745 mod: { |
|
2746 path: 'mod.js' |
|
2747 } |
|
2748 }, |
|
2749 requires: [ 'mod' ] |
|
2750 }); |
|
2751 loader.load(function() { |
|
2752 console.log('All modules have loaded..'); |
|
2753 }); |
|
2754 |
|
2755 |
|
2756 @method load |
|
2757 @param {Function} cb Executed after all load operations are complete |
|
2758 */ |
|
2759 load: function(cb) { |
|
2760 if (!cb) { |
|
2761 return; |
|
2762 } |
|
2763 var self = this, |
|
2764 out = self.resolve(true); |
|
2765 |
|
2766 self.data = out; |
|
2767 |
|
2768 self.onEnd = function() { |
|
2769 cb.apply(self.context || self, arguments); |
|
2770 }; |
|
2771 |
|
2772 self.insert(); |
|
2773 } |
|
2774 }; |
|
2775 |
|
2776 |
|
2777 |
|
2778 }, '@VERSION@', {"requires": ["get", "features"]}); |
|
2779 YUI.add('loader-rollup', function (Y, NAME) { |
|
2780 |
|
2781 /** |
|
2782 * Optional automatic rollup logic for reducing http connections |
|
2783 * when not using a combo service. |
|
2784 * @module loader |
|
2785 * @submodule rollup |
|
2786 */ |
|
2787 |
|
2788 /** |
|
2789 * Look for rollup packages to determine if all of the modules a |
|
2790 * rollup supersedes are required. If so, include the rollup to |
|
2791 * help reduce the total number of connections required. Called |
|
2792 * by calculate(). This is an optional feature, and requires the |
|
2793 * appropriate submodule to function. |
|
2794 * @method _rollup |
|
2795 * @for Loader |
|
2796 * @private |
|
2797 */ |
|
2798 Y.Loader.prototype._rollup = function() { |
|
2799 var i, j, m, s, r = this.required, roll, |
|
2800 info = this.moduleInfo, rolled, c, smod; |
|
2801 |
|
2802 // find and cache rollup modules |
|
2803 if (this.dirty || !this.rollups) { |
|
2804 this.rollups = {}; |
|
2805 for (i in info) { |
|
2806 if (info.hasOwnProperty(i)) { |
|
2807 m = this.getModule(i); |
|
2808 // if (m && m.rollup && m.supersedes) { |
|
2809 if (m && m.rollup) { |
|
2810 this.rollups[i] = m; |
|
2811 } |
|
2812 } |
|
2813 } |
|
2814 } |
|
2815 |
|
2816 // make as many passes as needed to pick up rollup rollups |
|
2817 for (;;) { |
|
2818 rolled = false; |
|
2819 |
|
2820 // go through the rollup candidates |
|
2821 for (i in this.rollups) { |
|
2822 if (this.rollups.hasOwnProperty(i)) { |
|
2823 // there can be only one, unless forced |
|
2824 if (!r[i] && ((!this.loaded[i]) || this.forceMap[i])) { |
|
2825 m = this.getModule(i); |
|
2826 s = m.supersedes || []; |
|
2827 roll = false; |
|
2828 |
|
2829 // @TODO remove continue |
|
2830 if (!m.rollup) { |
|
2831 continue; |
|
2832 } |
|
2833 |
|
2834 c = 0; |
|
2835 |
|
2836 // check the threshold |
|
2837 for (j = 0; j < s.length; j++) { |
|
2838 smod = info[s[j]]; |
|
2839 |
|
2840 // if the superseded module is loaded, we can't |
|
2841 // load the rollup unless it has been forced. |
|
2842 if (this.loaded[s[j]] && !this.forceMap[s[j]]) { |
|
2843 roll = false; |
|
2844 break; |
|
2845 // increment the counter if this module is required. |
|
2846 // if we are beyond the rollup threshold, we will |
|
2847 // use the rollup module |
|
2848 } else if (r[s[j]] && m.type === smod.type) { |
|
2849 c++; |
|
2850 roll = (c >= m.rollup); |
|
2851 if (roll) { |
|
2852 break; |
|
2853 } |
|
2854 } |
|
2855 } |
|
2856 |
|
2857 if (roll) { |
|
2858 // add the rollup |
|
2859 r[i] = true; |
|
2860 rolled = true; |
|
2861 |
|
2862 // expand the rollup's dependencies |
|
2863 this.getRequires(m); |
|
2864 } |
|
2865 } |
|
2866 } |
|
2867 } |
|
2868 |
|
2869 // if we made it here w/o rolling up something, we are done |
|
2870 if (!rolled) { |
|
2871 break; |
|
2872 } |
|
2873 } |
|
2874 }; |
|
2875 |
|
2876 |
|
2877 }, '@VERSION@', {"requires": ["loader-base"]}); |
|
2878 YUI.add('loader-yui3', function (Y, NAME) { |
|
2879 |
|
2880 /* This file is auto-generated by (yogi loader --yes --mix --start ../) */ |
|
2881 |
|
2882 /*jshint maxlen:900, eqeqeq: false */ |
|
2883 |
|
2884 /** |
|
2885 * YUI 3 module metadata |
|
2886 * @module loader |
|
2887 * @submodule loader-yui3 |
|
2888 */ |
|
2889 YUI.Env[Y.version].modules = YUI.Env[Y.version].modules || {}; |
|
2890 Y.mix(YUI.Env[Y.version].modules, { |
|
2891 "align-plugin": { |
|
2892 "requires": [ |
|
2893 "node-screen", |
|
2894 "node-pluginhost" |
|
2895 ] |
|
2896 }, |
|
2897 "anim": { |
|
2898 "use": [ |
|
2899 "anim-base", |
|
2900 "anim-color", |
|
2901 "anim-curve", |
|
2902 "anim-easing", |
|
2903 "anim-node-plugin", |
|
2904 "anim-scroll", |
|
2905 "anim-xy" |
|
2906 ] |
|
2907 }, |
|
2908 "anim-base": { |
|
2909 "requires": [ |
|
2910 "base-base", |
|
2911 "node-style" |
|
2912 ] |
|
2913 }, |
|
2914 "anim-color": { |
|
2915 "requires": [ |
|
2916 "anim-base" |
|
2917 ] |
|
2918 }, |
|
2919 "anim-curve": { |
|
2920 "requires": [ |
|
2921 "anim-xy" |
|
2922 ] |
|
2923 }, |
|
2924 "anim-easing": { |
|
2925 "requires": [ |
|
2926 "anim-base" |
|
2927 ] |
|
2928 }, |
|
2929 "anim-node-plugin": { |
|
2930 "requires": [ |
|
2931 "node-pluginhost", |
|
2932 "anim-base" |
|
2933 ] |
|
2934 }, |
|
2935 "anim-scroll": { |
|
2936 "requires": [ |
|
2937 "anim-base" |
|
2938 ] |
|
2939 }, |
|
2940 "anim-shape": { |
|
2941 "requires": [ |
|
2942 "anim-base", |
|
2943 "anim-easing", |
|
2944 "anim-color", |
|
2945 "matrix" |
|
2946 ] |
|
2947 }, |
|
2948 "anim-shape-transform": { |
|
2949 "use": [ |
|
2950 "anim-shape" |
|
2951 ] |
|
2952 }, |
|
2953 "anim-xy": { |
|
2954 "requires": [ |
|
2955 "anim-base", |
|
2956 "node-screen" |
|
2957 ] |
|
2958 }, |
|
2959 "app": { |
|
2960 "use": [ |
|
2961 "app-base", |
|
2962 "app-content", |
|
2963 "app-transitions", |
|
2964 "lazy-model-list", |
|
2965 "model", |
|
2966 "model-list", |
|
2967 "model-sync-rest", |
|
2968 "model-sync-local", |
|
2969 "router", |
|
2970 "view", |
|
2971 "view-node-map" |
|
2972 ] |
|
2973 }, |
|
2974 "app-base": { |
|
2975 "requires": [ |
|
2976 "classnamemanager", |
|
2977 "pjax-base", |
|
2978 "router", |
|
2979 "view" |
|
2980 ] |
|
2981 }, |
|
2982 "app-content": { |
|
2983 "requires": [ |
|
2984 "app-base", |
|
2985 "pjax-content" |
|
2986 ] |
|
2987 }, |
|
2988 "app-transitions": { |
|
2989 "requires": [ |
|
2990 "app-base" |
|
2991 ] |
|
2992 }, |
|
2993 "app-transitions-css": { |
|
2994 "type": "css" |
|
2995 }, |
|
2996 "app-transitions-native": { |
|
2997 "condition": { |
|
2998 "name": "app-transitions-native", |
|
2999 "test": function (Y) { |
|
3000 var doc = Y.config.doc, |
|
3001 node = doc ? doc.documentElement : null; |
|
3002 |
|
3003 if (node && node.style) { |
|
3004 return ('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style); |
|
3005 } |
|
3006 |
|
3007 return false; |
|
3008 }, |
|
3009 "trigger": "app-transitions" |
|
3010 }, |
|
3011 "requires": [ |
|
3012 "app-transitions", |
|
3013 "app-transitions-css", |
|
3014 "parallel", |
|
3015 "transition" |
|
3016 ] |
|
3017 }, |
|
3018 "array-extras": { |
|
3019 "requires": [ |
|
3020 "yui-base" |
|
3021 ] |
|
3022 }, |
|
3023 "array-invoke": { |
|
3024 "requires": [ |
|
3025 "yui-base" |
|
3026 ] |
|
3027 }, |
|
3028 "arraylist": { |
|
3029 "requires": [ |
|
3030 "yui-base" |
|
3031 ] |
|
3032 }, |
|
3033 "arraylist-add": { |
|
3034 "requires": [ |
|
3035 "arraylist" |
|
3036 ] |
|
3037 }, |
|
3038 "arraylist-filter": { |
|
3039 "requires": [ |
|
3040 "arraylist" |
|
3041 ] |
|
3042 }, |
|
3043 "arraysort": { |
|
3044 "requires": [ |
|
3045 "yui-base" |
|
3046 ] |
|
3047 }, |
|
3048 "async-queue": { |
|
3049 "requires": [ |
|
3050 "event-custom" |
|
3051 ] |
|
3052 }, |
|
3053 "attribute": { |
|
3054 "use": [ |
|
3055 "attribute-base", |
|
3056 "attribute-complex" |
|
3057 ] |
|
3058 }, |
|
3059 "attribute-base": { |
|
3060 "requires": [ |
|
3061 "attribute-core", |
|
3062 "attribute-observable", |
|
3063 "attribute-extras" |
|
3064 ] |
|
3065 }, |
|
3066 "attribute-complex": { |
|
3067 "requires": [ |
|
3068 "attribute-base" |
|
3069 ] |
|
3070 }, |
|
3071 "attribute-core": { |
|
3072 "requires": [ |
|
3073 "oop" |
|
3074 ] |
|
3075 }, |
|
3076 "attribute-events": { |
|
3077 "use": [ |
|
3078 "attribute-observable" |
|
3079 ] |
|
3080 }, |
|
3081 "attribute-extras": { |
|
3082 "requires": [ |
|
3083 "oop" |
|
3084 ] |
|
3085 }, |
|
3086 "attribute-observable": { |
|
3087 "requires": [ |
|
3088 "event-custom" |
|
3089 ] |
|
3090 }, |
|
3091 "autocomplete": { |
|
3092 "use": [ |
|
3093 "autocomplete-base", |
|
3094 "autocomplete-sources", |
|
3095 "autocomplete-list", |
|
3096 "autocomplete-plugin" |
|
3097 ] |
|
3098 }, |
|
3099 "autocomplete-base": { |
|
3100 "optional": [ |
|
3101 "autocomplete-sources" |
|
3102 ], |
|
3103 "requires": [ |
|
3104 "array-extras", |
|
3105 "base-build", |
|
3106 "escape", |
|
3107 "event-valuechange", |
|
3108 "node-base" |
|
3109 ] |
|
3110 }, |
|
3111 "autocomplete-filters": { |
|
3112 "requires": [ |
|
3113 "array-extras", |
|
3114 "text-wordbreak" |
|
3115 ] |
|
3116 }, |
|
3117 "autocomplete-filters-accentfold": { |
|
3118 "requires": [ |
|
3119 "array-extras", |
|
3120 "text-accentfold", |
|
3121 "text-wordbreak" |
|
3122 ] |
|
3123 }, |
|
3124 "autocomplete-highlighters": { |
|
3125 "requires": [ |
|
3126 "array-extras", |
|
3127 "highlight-base" |
|
3128 ] |
|
3129 }, |
|
3130 "autocomplete-highlighters-accentfold": { |
|
3131 "requires": [ |
|
3132 "array-extras", |
|
3133 "highlight-accentfold" |
|
3134 ] |
|
3135 }, |
|
3136 "autocomplete-list": { |
|
3137 "after": [ |
|
3138 "autocomplete-sources" |
|
3139 ], |
|
3140 "lang": [ |
|
3141 "en", |
|
3142 "es", |
|
3143 "hu", |
|
3144 "it" |
|
3145 ], |
|
3146 "requires": [ |
|
3147 "autocomplete-base", |
|
3148 "event-resize", |
|
3149 "node-screen", |
|
3150 "selector-css3", |
|
3151 "shim-plugin", |
|
3152 "widget", |
|
3153 "widget-position", |
|
3154 "widget-position-align" |
|
3155 ], |
|
3156 "skinnable": true |
|
3157 }, |
|
3158 "autocomplete-list-keys": { |
|
3159 "condition": { |
|
3160 "name": "autocomplete-list-keys", |
|
3161 "test": function (Y) { |
|
3162 // Only add keyboard support to autocomplete-list if this doesn't appear to |
|
3163 // be an iOS or Android-based mobile device. |
|
3164 // |
|
3165 // There's currently no feasible way to actually detect whether a device has |
|
3166 // a hardware keyboard, so this sniff will have to do. It can easily be |
|
3167 // overridden by manually loading the autocomplete-list-keys module. |
|
3168 // |
|
3169 // Worth noting: even though iOS supports bluetooth keyboards, Mobile Safari |
|
3170 // doesn't fire the keyboard events used by AutoCompleteList, so there's |
|
3171 // no point loading the -keys module even when a bluetooth keyboard may be |
|
3172 // available. |
|
3173 return !(Y.UA.ios || Y.UA.android); |
|
3174 }, |
|
3175 "trigger": "autocomplete-list" |
|
3176 }, |
|
3177 "requires": [ |
|
3178 "autocomplete-list", |
|
3179 "base-build" |
|
3180 ] |
|
3181 }, |
|
3182 "autocomplete-plugin": { |
|
3183 "requires": [ |
|
3184 "autocomplete-list", |
|
3185 "node-pluginhost" |
|
3186 ] |
|
3187 }, |
|
3188 "autocomplete-sources": { |
|
3189 "optional": [ |
|
3190 "io-base", |
|
3191 "json-parse", |
|
3192 "jsonp", |
|
3193 "yql" |
|
3194 ], |
|
3195 "requires": [ |
|
3196 "autocomplete-base" |
|
3197 ] |
|
3198 }, |
|
3199 "axes": { |
|
3200 "use": [ |
|
3201 "axis-numeric", |
|
3202 "axis-category", |
|
3203 "axis-time", |
|
3204 "axis-stacked" |
|
3205 ] |
|
3206 }, |
|
3207 "axes-base": { |
|
3208 "use": [ |
|
3209 "axis-numeric-base", |
|
3210 "axis-category-base", |
|
3211 "axis-time-base", |
|
3212 "axis-stacked-base" |
|
3213 ] |
|
3214 }, |
|
3215 "axis": { |
|
3216 "requires": [ |
|
3217 "dom", |
|
3218 "widget", |
|
3219 "widget-position", |
|
3220 "widget-stack", |
|
3221 "graphics", |
|
3222 "axis-base" |
|
3223 ] |
|
3224 }, |
|
3225 "axis-base": { |
|
3226 "requires": [ |
|
3227 "classnamemanager", |
|
3228 "datatype-number", |
|
3229 "datatype-date", |
|
3230 "base", |
|
3231 "event-custom" |
|
3232 ] |
|
3233 }, |
|
3234 "axis-category": { |
|
3235 "requires": [ |
|
3236 "axis", |
|
3237 "axis-category-base" |
|
3238 ] |
|
3239 }, |
|
3240 "axis-category-base": { |
|
3241 "requires": [ |
|
3242 "axis-base" |
|
3243 ] |
|
3244 }, |
|
3245 "axis-numeric": { |
|
3246 "requires": [ |
|
3247 "axis", |
|
3248 "axis-numeric-base" |
|
3249 ] |
|
3250 }, |
|
3251 "axis-numeric-base": { |
|
3252 "requires": [ |
|
3253 "axis-base" |
|
3254 ] |
|
3255 }, |
|
3256 "axis-stacked": { |
|
3257 "requires": [ |
|
3258 "axis-numeric", |
|
3259 "axis-stacked-base" |
|
3260 ] |
|
3261 }, |
|
3262 "axis-stacked-base": { |
|
3263 "requires": [ |
|
3264 "axis-numeric-base" |
|
3265 ] |
|
3266 }, |
|
3267 "axis-time": { |
|
3268 "requires": [ |
|
3269 "axis", |
|
3270 "axis-time-base" |
|
3271 ] |
|
3272 }, |
|
3273 "axis-time-base": { |
|
3274 "requires": [ |
|
3275 "axis-base" |
|
3276 ] |
|
3277 }, |
|
3278 "base": { |
|
3279 "use": [ |
|
3280 "base-base", |
|
3281 "base-pluginhost", |
|
3282 "base-build" |
|
3283 ] |
|
3284 }, |
|
3285 "base-base": { |
|
3286 "requires": [ |
|
3287 "attribute-base", |
|
3288 "base-core", |
|
3289 "base-observable" |
|
3290 ] |
|
3291 }, |
|
3292 "base-build": { |
|
3293 "requires": [ |
|
3294 "base-base" |
|
3295 ] |
|
3296 }, |
|
3297 "base-core": { |
|
3298 "requires": [ |
|
3299 "attribute-core" |
|
3300 ] |
|
3301 }, |
|
3302 "base-observable": { |
|
3303 "requires": [ |
|
3304 "attribute-observable", |
|
3305 "base-core" |
|
3306 ] |
|
3307 }, |
|
3308 "base-pluginhost": { |
|
3309 "requires": [ |
|
3310 "base-base", |
|
3311 "pluginhost" |
|
3312 ] |
|
3313 }, |
|
3314 "button": { |
|
3315 "requires": [ |
|
3316 "button-core", |
|
3317 "cssbutton", |
|
3318 "widget" |
|
3319 ] |
|
3320 }, |
|
3321 "button-core": { |
|
3322 "requires": [ |
|
3323 "attribute-core", |
|
3324 "classnamemanager", |
|
3325 "node-base", |
|
3326 "escape" |
|
3327 ] |
|
3328 }, |
|
3329 "button-group": { |
|
3330 "requires": [ |
|
3331 "button-plugin", |
|
3332 "cssbutton", |
|
3333 "widget" |
|
3334 ] |
|
3335 }, |
|
3336 "button-plugin": { |
|
3337 "requires": [ |
|
3338 "button-core", |
|
3339 "cssbutton", |
|
3340 "node-pluginhost" |
|
3341 ] |
|
3342 }, |
|
3343 "cache": { |
|
3344 "use": [ |
|
3345 "cache-base", |
|
3346 "cache-offline", |
|
3347 "cache-plugin" |
|
3348 ] |
|
3349 }, |
|
3350 "cache-base": { |
|
3351 "requires": [ |
|
3352 "base" |
|
3353 ] |
|
3354 }, |
|
3355 "cache-offline": { |
|
3356 "requires": [ |
|
3357 "cache-base", |
|
3358 "json" |
|
3359 ] |
|
3360 }, |
|
3361 "cache-plugin": { |
|
3362 "requires": [ |
|
3363 "plugin", |
|
3364 "cache-base" |
|
3365 ] |
|
3366 }, |
|
3367 "calendar": { |
|
3368 "requires": [ |
|
3369 "calendar-base", |
|
3370 "calendarnavigator" |
|
3371 ], |
|
3372 "skinnable": true |
|
3373 }, |
|
3374 "calendar-base": { |
|
3375 "lang": [ |
|
3376 "de", |
|
3377 "en", |
|
3378 "es", |
|
3379 "es-AR", |
|
3380 "fr", |
|
3381 "hu", |
|
3382 "it", |
|
3383 "ja", |
|
3384 "nb-NO", |
|
3385 "nl", |
|
3386 "pt-BR", |
|
3387 "ru", |
|
3388 "zh-Hans", |
|
3389 "zh-Hans-CN", |
|
3390 "zh-Hant", |
|
3391 "zh-Hant-HK", |
|
3392 "zh-HANT-TW" |
|
3393 ], |
|
3394 "requires": [ |
|
3395 "widget", |
|
3396 "datatype-date", |
|
3397 "datatype-date-math", |
|
3398 "cssgrids" |
|
3399 ], |
|
3400 "skinnable": true |
|
3401 }, |
|
3402 "calendarnavigator": { |
|
3403 "requires": [ |
|
3404 "plugin", |
|
3405 "classnamemanager", |
|
3406 "datatype-date", |
|
3407 "node" |
|
3408 ], |
|
3409 "skinnable": true |
|
3410 }, |
|
3411 "charts": { |
|
3412 "use": [ |
|
3413 "charts-base" |
|
3414 ] |
|
3415 }, |
|
3416 "charts-base": { |
|
3417 "requires": [ |
|
3418 "dom", |
|
3419 "event-mouseenter", |
|
3420 "event-touch", |
|
3421 "graphics-group", |
|
3422 "axes", |
|
3423 "series-pie", |
|
3424 "series-line", |
|
3425 "series-marker", |
|
3426 "series-area", |
|
3427 "series-spline", |
|
3428 "series-column", |
|
3429 "series-bar", |
|
3430 "series-areaspline", |
|
3431 "series-combo", |
|
3432 "series-combospline", |
|
3433 "series-line-stacked", |
|
3434 "series-marker-stacked", |
|
3435 "series-area-stacked", |
|
3436 "series-spline-stacked", |
|
3437 "series-column-stacked", |
|
3438 "series-bar-stacked", |
|
3439 "series-areaspline-stacked", |
|
3440 "series-combo-stacked", |
|
3441 "series-combospline-stacked" |
|
3442 ] |
|
3443 }, |
|
3444 "charts-legend": { |
|
3445 "requires": [ |
|
3446 "charts-base" |
|
3447 ] |
|
3448 }, |
|
3449 "classnamemanager": { |
|
3450 "requires": [ |
|
3451 "yui-base" |
|
3452 ] |
|
3453 }, |
|
3454 "clickable-rail": { |
|
3455 "requires": [ |
|
3456 "slider-base" |
|
3457 ] |
|
3458 }, |
|
3459 "collection": { |
|
3460 "use": [ |
|
3461 "array-extras", |
|
3462 "arraylist", |
|
3463 "arraylist-add", |
|
3464 "arraylist-filter", |
|
3465 "array-invoke" |
|
3466 ] |
|
3467 }, |
|
3468 "color": { |
|
3469 "use": [ |
|
3470 "color-base", |
|
3471 "color-hsl", |
|
3472 "color-harmony" |
|
3473 ] |
|
3474 }, |
|
3475 "color-base": { |
|
3476 "requires": [ |
|
3477 "yui-base" |
|
3478 ] |
|
3479 }, |
|
3480 "color-harmony": { |
|
3481 "requires": [ |
|
3482 "color-hsl" |
|
3483 ] |
|
3484 }, |
|
3485 "color-hsl": { |
|
3486 "requires": [ |
|
3487 "color-base" |
|
3488 ] |
|
3489 }, |
|
3490 "color-hsv": { |
|
3491 "requires": [ |
|
3492 "color-base" |
|
3493 ] |
|
3494 }, |
|
3495 "console": { |
|
3496 "lang": [ |
|
3497 "en", |
|
3498 "es", |
|
3499 "hu", |
|
3500 "it", |
|
3501 "ja" |
|
3502 ], |
|
3503 "requires": [ |
|
3504 "yui-log", |
|
3505 "widget" |
|
3506 ], |
|
3507 "skinnable": true |
|
3508 }, |
|
3509 "console-filters": { |
|
3510 "requires": [ |
|
3511 "plugin", |
|
3512 "console" |
|
3513 ], |
|
3514 "skinnable": true |
|
3515 }, |
|
3516 "content-editable": { |
|
3517 "requires": [ |
|
3518 "node-base", |
|
3519 "editor-selection", |
|
3520 "stylesheet", |
|
3521 "plugin" |
|
3522 ] |
|
3523 }, |
|
3524 "controller": { |
|
3525 "use": [ |
|
3526 "router" |
|
3527 ] |
|
3528 }, |
|
3529 "cookie": { |
|
3530 "requires": [ |
|
3531 "yui-base" |
|
3532 ] |
|
3533 }, |
|
3534 "createlink-base": { |
|
3535 "requires": [ |
|
3536 "editor-base" |
|
3537 ] |
|
3538 }, |
|
3539 "cssbase": { |
|
3540 "after": [ |
|
3541 "cssreset", |
|
3542 "cssfonts", |
|
3543 "cssgrids", |
|
3544 "cssreset-context", |
|
3545 "cssfonts-context", |
|
3546 "cssgrids-context" |
|
3547 ], |
|
3548 "type": "css" |
|
3549 }, |
|
3550 "cssbase-context": { |
|
3551 "after": [ |
|
3552 "cssreset", |
|
3553 "cssfonts", |
|
3554 "cssgrids", |
|
3555 "cssreset-context", |
|
3556 "cssfonts-context", |
|
3557 "cssgrids-context" |
|
3558 ], |
|
3559 "type": "css" |
|
3560 }, |
|
3561 "cssbutton": { |
|
3562 "type": "css" |
|
3563 }, |
|
3564 "cssfonts": { |
|
3565 "type": "css" |
|
3566 }, |
|
3567 "cssfonts-context": { |
|
3568 "type": "css" |
|
3569 }, |
|
3570 "cssgrids": { |
|
3571 "optional": [ |
|
3572 "cssnormalize" |
|
3573 ], |
|
3574 "type": "css" |
|
3575 }, |
|
3576 "cssgrids-base": { |
|
3577 "optional": [ |
|
3578 "cssnormalize" |
|
3579 ], |
|
3580 "type": "css" |
|
3581 }, |
|
3582 "cssgrids-responsive": { |
|
3583 "optional": [ |
|
3584 "cssnormalize" |
|
3585 ], |
|
3586 "requires": [ |
|
3587 "cssgrids", |
|
3588 "cssgrids-responsive-base" |
|
3589 ], |
|
3590 "type": "css" |
|
3591 }, |
|
3592 "cssgrids-units": { |
|
3593 "optional": [ |
|
3594 "cssnormalize" |
|
3595 ], |
|
3596 "requires": [ |
|
3597 "cssgrids-base" |
|
3598 ], |
|
3599 "type": "css" |
|
3600 }, |
|
3601 "cssnormalize": { |
|
3602 "type": "css" |
|
3603 }, |
|
3604 "cssnormalize-context": { |
|
3605 "type": "css" |
|
3606 }, |
|
3607 "cssreset": { |
|
3608 "type": "css" |
|
3609 }, |
|
3610 "cssreset-context": { |
|
3611 "type": "css" |
|
3612 }, |
|
3613 "dataschema": { |
|
3614 "use": [ |
|
3615 "dataschema-base", |
|
3616 "dataschema-json", |
|
3617 "dataschema-xml", |
|
3618 "dataschema-array", |
|
3619 "dataschema-text" |
|
3620 ] |
|
3621 }, |
|
3622 "dataschema-array": { |
|
3623 "requires": [ |
|
3624 "dataschema-base" |
|
3625 ] |
|
3626 }, |
|
3627 "dataschema-base": { |
|
3628 "requires": [ |
|
3629 "base" |
|
3630 ] |
|
3631 }, |
|
3632 "dataschema-json": { |
|
3633 "requires": [ |
|
3634 "dataschema-base", |
|
3635 "json" |
|
3636 ] |
|
3637 }, |
|
3638 "dataschema-text": { |
|
3639 "requires": [ |
|
3640 "dataschema-base" |
|
3641 ] |
|
3642 }, |
|
3643 "dataschema-xml": { |
|
3644 "requires": [ |
|
3645 "dataschema-base" |
|
3646 ] |
|
3647 }, |
|
3648 "datasource": { |
|
3649 "use": [ |
|
3650 "datasource-local", |
|
3651 "datasource-io", |
|
3652 "datasource-get", |
|
3653 "datasource-function", |
|
3654 "datasource-cache", |
|
3655 "datasource-jsonschema", |
|
3656 "datasource-xmlschema", |
|
3657 "datasource-arrayschema", |
|
3658 "datasource-textschema", |
|
3659 "datasource-polling" |
|
3660 ] |
|
3661 }, |
|
3662 "datasource-arrayschema": { |
|
3663 "requires": [ |
|
3664 "datasource-local", |
|
3665 "plugin", |
|
3666 "dataschema-array" |
|
3667 ] |
|
3668 }, |
|
3669 "datasource-cache": { |
|
3670 "requires": [ |
|
3671 "datasource-local", |
|
3672 "plugin", |
|
3673 "cache-base" |
|
3674 ] |
|
3675 }, |
|
3676 "datasource-function": { |
|
3677 "requires": [ |
|
3678 "datasource-local" |
|
3679 ] |
|
3680 }, |
|
3681 "datasource-get": { |
|
3682 "requires": [ |
|
3683 "datasource-local", |
|
3684 "get" |
|
3685 ] |
|
3686 }, |
|
3687 "datasource-io": { |
|
3688 "requires": [ |
|
3689 "datasource-local", |
|
3690 "io-base" |
|
3691 ] |
|
3692 }, |
|
3693 "datasource-jsonschema": { |
|
3694 "requires": [ |
|
3695 "datasource-local", |
|
3696 "plugin", |
|
3697 "dataschema-json" |
|
3698 ] |
|
3699 }, |
|
3700 "datasource-local": { |
|
3701 "requires": [ |
|
3702 "base" |
|
3703 ] |
|
3704 }, |
|
3705 "datasource-polling": { |
|
3706 "requires": [ |
|
3707 "datasource-local" |
|
3708 ] |
|
3709 }, |
|
3710 "datasource-textschema": { |
|
3711 "requires": [ |
|
3712 "datasource-local", |
|
3713 "plugin", |
|
3714 "dataschema-text" |
|
3715 ] |
|
3716 }, |
|
3717 "datasource-xmlschema": { |
|
3718 "requires": [ |
|
3719 "datasource-local", |
|
3720 "plugin", |
|
3721 "datatype-xml", |
|
3722 "dataschema-xml" |
|
3723 ] |
|
3724 }, |
|
3725 "datatable": { |
|
3726 "use": [ |
|
3727 "datatable-core", |
|
3728 "datatable-table", |
|
3729 "datatable-head", |
|
3730 "datatable-body", |
|
3731 "datatable-base", |
|
3732 "datatable-column-widths", |
|
3733 "datatable-message", |
|
3734 "datatable-mutable", |
|
3735 "datatable-sort", |
|
3736 "datatable-datasource" |
|
3737 ] |
|
3738 }, |
|
3739 "datatable-base": { |
|
3740 "requires": [ |
|
3741 "datatable-core", |
|
3742 "datatable-table", |
|
3743 "datatable-head", |
|
3744 "datatable-body", |
|
3745 "base-build", |
|
3746 "widget" |
|
3747 ], |
|
3748 "skinnable": true |
|
3749 }, |
|
3750 "datatable-body": { |
|
3751 "requires": [ |
|
3752 "datatable-core", |
|
3753 "view", |
|
3754 "classnamemanager" |
|
3755 ] |
|
3756 }, |
|
3757 "datatable-column-widths": { |
|
3758 "requires": [ |
|
3759 "datatable-base" |
|
3760 ] |
|
3761 }, |
|
3762 "datatable-core": { |
|
3763 "requires": [ |
|
3764 "escape", |
|
3765 "model-list", |
|
3766 "node-event-delegate" |
|
3767 ] |
|
3768 }, |
|
3769 "datatable-datasource": { |
|
3770 "requires": [ |
|
3771 "datatable-base", |
|
3772 "plugin", |
|
3773 "datasource-local" |
|
3774 ] |
|
3775 }, |
|
3776 "datatable-foot": { |
|
3777 "requires": [ |
|
3778 "datatable-core", |
|
3779 "view" |
|
3780 ] |
|
3781 }, |
|
3782 "datatable-formatters": { |
|
3783 "requires": [ |
|
3784 "datatable-body", |
|
3785 "datatype-number-format", |
|
3786 "datatype-date-format", |
|
3787 "escape" |
|
3788 ] |
|
3789 }, |
|
3790 "datatable-head": { |
|
3791 "requires": [ |
|
3792 "datatable-core", |
|
3793 "view", |
|
3794 "classnamemanager" |
|
3795 ] |
|
3796 }, |
|
3797 "datatable-highlight": { |
|
3798 "requires": [ |
|
3799 "datatable-base", |
|
3800 "event-hover" |
|
3801 ], |
|
3802 "skinnable": true |
|
3803 }, |
|
3804 "datatable-keynav": { |
|
3805 "requires": [ |
|
3806 "datatable-base" |
|
3807 ] |
|
3808 }, |
|
3809 "datatable-message": { |
|
3810 "lang": [ |
|
3811 "en", |
|
3812 "fr", |
|
3813 "es", |
|
3814 "hu", |
|
3815 "it" |
|
3816 ], |
|
3817 "requires": [ |
|
3818 "datatable-base" |
|
3819 ], |
|
3820 "skinnable": true |
|
3821 }, |
|
3822 "datatable-mutable": { |
|
3823 "requires": [ |
|
3824 "datatable-base" |
|
3825 ] |
|
3826 }, |
|
3827 "datatable-paginator": { |
|
3828 "lang": [ |
|
3829 "en", |
|
3830 "fr" |
|
3831 ], |
|
3832 "requires": [ |
|
3833 "model", |
|
3834 "view", |
|
3835 "paginator-core", |
|
3836 "datatable-foot", |
|
3837 "datatable-paginator-templates" |
|
3838 ], |
|
3839 "skinnable": true |
|
3840 }, |
|
3841 "datatable-paginator-templates": { |
|
3842 "requires": [ |
|
3843 "template" |
|
3844 ] |
|
3845 }, |
|
3846 "datatable-scroll": { |
|
3847 "requires": [ |
|
3848 "datatable-base", |
|
3849 "datatable-column-widths", |
|
3850 "dom-screen" |
|
3851 ], |
|
3852 "skinnable": true |
|
3853 }, |
|
3854 "datatable-sort": { |
|
3855 "lang": [ |
|
3856 "en", |
|
3857 "fr", |
|
3858 "es", |
|
3859 "hu" |
|
3860 ], |
|
3861 "requires": [ |
|
3862 "datatable-base" |
|
3863 ], |
|
3864 "skinnable": true |
|
3865 }, |
|
3866 "datatable-table": { |
|
3867 "requires": [ |
|
3868 "datatable-core", |
|
3869 "datatable-head", |
|
3870 "datatable-body", |
|
3871 "view", |
|
3872 "classnamemanager" |
|
3873 ] |
|
3874 }, |
|
3875 "datatype": { |
|
3876 "use": [ |
|
3877 "datatype-date", |
|
3878 "datatype-number", |
|
3879 "datatype-xml" |
|
3880 ] |
|
3881 }, |
|
3882 "datatype-date": { |
|
3883 "use": [ |
|
3884 "datatype-date-parse", |
|
3885 "datatype-date-format", |
|
3886 "datatype-date-math" |
|
3887 ] |
|
3888 }, |
|
3889 "datatype-date-format": { |
|
3890 "lang": [ |
|
3891 "ar", |
|
3892 "ar-JO", |
|
3893 "ca", |
|
3894 "ca-ES", |
|
3895 "da", |
|
3896 "da-DK", |
|
3897 "de", |
|
3898 "de-AT", |
|
3899 "de-DE", |
|
3900 "el", |
|
3901 "el-GR", |
|
3902 "en", |
|
3903 "en-AU", |
|
3904 "en-CA", |
|
3905 "en-GB", |
|
3906 "en-IE", |
|
3907 "en-IN", |
|
3908 "en-JO", |
|
3909 "en-MY", |
|
3910 "en-NZ", |
|
3911 "en-PH", |
|
3912 "en-SG", |
|
3913 "en-US", |
|
3914 "es", |
|
3915 "es-AR", |
|
3916 "es-BO", |
|
3917 "es-CL", |
|
3918 "es-CO", |
|
3919 "es-EC", |
|
3920 "es-ES", |
|
3921 "es-MX", |
|
3922 "es-PE", |
|
3923 "es-PY", |
|
3924 "es-US", |
|
3925 "es-UY", |
|
3926 "es-VE", |
|
3927 "fi", |
|
3928 "fi-FI", |
|
3929 "fr", |
|
3930 "fr-BE", |
|
3931 "fr-CA", |
|
3932 "fr-FR", |
|
3933 "hi", |
|
3934 "hi-IN", |
|
3935 "hu", |
|
3936 "id", |
|
3937 "id-ID", |
|
3938 "it", |
|
3939 "it-IT", |
|
3940 "ja", |
|
3941 "ja-JP", |
|
3942 "ko", |
|
3943 "ko-KR", |
|
3944 "ms", |
|
3945 "ms-MY", |
|
3946 "nb", |
|
3947 "nb-NO", |
|
3948 "nl", |
|
3949 "nl-BE", |
|
3950 "nl-NL", |
|
3951 "pl", |
|
3952 "pl-PL", |
|
3953 "pt", |
|
3954 "pt-BR", |
|
3955 "ro", |
|
3956 "ro-RO", |
|
3957 "ru", |
|
3958 "ru-RU", |
|
3959 "sv", |
|
3960 "sv-SE", |
|
3961 "th", |
|
3962 "th-TH", |
|
3963 "tr", |
|
3964 "tr-TR", |
|
3965 "vi", |
|
3966 "vi-VN", |
|
3967 "zh-Hans", |
|
3968 "zh-Hans-CN", |
|
3969 "zh-Hant", |
|
3970 "zh-Hant-HK", |
|
3971 "zh-Hant-TW" |
|
3972 ] |
|
3973 }, |
|
3974 "datatype-date-math": { |
|
3975 "requires": [ |
|
3976 "yui-base" |
|
3977 ] |
|
3978 }, |
|
3979 "datatype-date-parse": {}, |
|
3980 "datatype-number": { |
|
3981 "use": [ |
|
3982 "datatype-number-parse", |
|
3983 "datatype-number-format" |
|
3984 ] |
|
3985 }, |
|
3986 "datatype-number-format": {}, |
|
3987 "datatype-number-parse": { |
|
3988 "requires": [ |
|
3989 "escape" |
|
3990 ] |
|
3991 }, |
|
3992 "datatype-xml": { |
|
3993 "use": [ |
|
3994 "datatype-xml-parse", |
|
3995 "datatype-xml-format" |
|
3996 ] |
|
3997 }, |
|
3998 "datatype-xml-format": {}, |
|
3999 "datatype-xml-parse": {}, |
|
4000 "dd": { |
|
4001 "use": [ |
|
4002 "dd-ddm-base", |
|
4003 "dd-ddm", |
|
4004 "dd-ddm-drop", |
|
4005 "dd-drag", |
|
4006 "dd-proxy", |
|
4007 "dd-constrain", |
|
4008 "dd-drop", |
|
4009 "dd-scroll", |
|
4010 "dd-delegate" |
|
4011 ] |
|
4012 }, |
|
4013 "dd-constrain": { |
|
4014 "requires": [ |
|
4015 "dd-drag" |
|
4016 ] |
|
4017 }, |
|
4018 "dd-ddm": { |
|
4019 "requires": [ |
|
4020 "dd-ddm-base", |
|
4021 "event-resize" |
|
4022 ] |
|
4023 }, |
|
4024 "dd-ddm-base": { |
|
4025 "requires": [ |
|
4026 "node", |
|
4027 "base", |
|
4028 "yui-throttle", |
|
4029 "classnamemanager" |
|
4030 ] |
|
4031 }, |
|
4032 "dd-ddm-drop": { |
|
4033 "requires": [ |
|
4034 "dd-ddm" |
|
4035 ] |
|
4036 }, |
|
4037 "dd-delegate": { |
|
4038 "requires": [ |
|
4039 "dd-drag", |
|
4040 "dd-drop-plugin", |
|
4041 "event-mouseenter" |
|
4042 ] |
|
4043 }, |
|
4044 "dd-drag": { |
|
4045 "requires": [ |
|
4046 "dd-ddm-base" |
|
4047 ] |
|
4048 }, |
|
4049 "dd-drop": { |
|
4050 "requires": [ |
|
4051 "dd-drag", |
|
4052 "dd-ddm-drop" |
|
4053 ] |
|
4054 }, |
|
4055 "dd-drop-plugin": { |
|
4056 "requires": [ |
|
4057 "dd-drop" |
|
4058 ] |
|
4059 }, |
|
4060 "dd-gestures": { |
|
4061 "condition": { |
|
4062 "name": "dd-gestures", |
|
4063 "trigger": "dd-drag", |
|
4064 "ua": "touchEnabled" |
|
4065 }, |
|
4066 "requires": [ |
|
4067 "dd-drag", |
|
4068 "event-synthetic", |
|
4069 "event-gestures" |
|
4070 ] |
|
4071 }, |
|
4072 "dd-plugin": { |
|
4073 "optional": [ |
|
4074 "dd-constrain", |
|
4075 "dd-proxy" |
|
4076 ], |
|
4077 "requires": [ |
|
4078 "dd-drag" |
|
4079 ] |
|
4080 }, |
|
4081 "dd-proxy": { |
|
4082 "requires": [ |
|
4083 "dd-drag" |
|
4084 ] |
|
4085 }, |
|
4086 "dd-scroll": { |
|
4087 "requires": [ |
|
4088 "dd-drag" |
|
4089 ] |
|
4090 }, |
|
4091 "dial": { |
|
4092 "lang": [ |
|
4093 "en", |
|
4094 "es", |
|
4095 "hu" |
|
4096 ], |
|
4097 "requires": [ |
|
4098 "widget", |
|
4099 "dd-drag", |
|
4100 "event-mouseenter", |
|
4101 "event-move", |
|
4102 "event-key", |
|
4103 "transition", |
|
4104 "intl" |
|
4105 ], |
|
4106 "skinnable": true |
|
4107 }, |
|
4108 "dom": { |
|
4109 "use": [ |
|
4110 "dom-base", |
|
4111 "dom-screen", |
|
4112 "dom-style", |
|
4113 "selector-native", |
|
4114 "selector" |
|
4115 ] |
|
4116 }, |
|
4117 "dom-base": { |
|
4118 "requires": [ |
|
4119 "dom-core" |
|
4120 ] |
|
4121 }, |
|
4122 "dom-core": { |
|
4123 "requires": [ |
|
4124 "oop", |
|
4125 "features" |
|
4126 ] |
|
4127 }, |
|
4128 "dom-screen": { |
|
4129 "requires": [ |
|
4130 "dom-base", |
|
4131 "dom-style" |
|
4132 ] |
|
4133 }, |
|
4134 "dom-style": { |
|
4135 "requires": [ |
|
4136 "dom-base", |
|
4137 "color-base" |
|
4138 ] |
|
4139 }, |
|
4140 "dom-style-ie": { |
|
4141 "condition": { |
|
4142 "name": "dom-style-ie", |
|
4143 "test": function (Y) { |
|
4144 |
|
4145 var testFeature = Y.Features.test, |
|
4146 addFeature = Y.Features.add, |
|
4147 WINDOW = Y.config.win, |
|
4148 DOCUMENT = Y.config.doc, |
|
4149 DOCUMENT_ELEMENT = 'documentElement', |
|
4150 ret = false; |
|
4151 |
|
4152 addFeature('style', 'computedStyle', { |
|
4153 test: function() { |
|
4154 return WINDOW && 'getComputedStyle' in WINDOW; |
|
4155 } |
|
4156 }); |
|
4157 |
|
4158 addFeature('style', 'opacity', { |
|
4159 test: function() { |
|
4160 return DOCUMENT && 'opacity' in DOCUMENT[DOCUMENT_ELEMENT].style; |
|
4161 } |
|
4162 }); |
|
4163 |
|
4164 ret = (!testFeature('style', 'opacity') && |
|
4165 !testFeature('style', 'computedStyle')); |
|
4166 |
|
4167 return ret; |
|
4168 }, |
|
4169 "trigger": "dom-style" |
|
4170 }, |
|
4171 "requires": [ |
|
4172 "dom-style" |
|
4173 ] |
|
4174 }, |
|
4175 "dump": { |
|
4176 "requires": [ |
|
4177 "yui-base" |
|
4178 ] |
|
4179 }, |
|
4180 "editor": { |
|
4181 "use": [ |
|
4182 "frame", |
|
4183 "editor-selection", |
|
4184 "exec-command", |
|
4185 "editor-base", |
|
4186 "editor-para", |
|
4187 "editor-br", |
|
4188 "editor-bidi", |
|
4189 "editor-tab", |
|
4190 "createlink-base" |
|
4191 ] |
|
4192 }, |
|
4193 "editor-base": { |
|
4194 "requires": [ |
|
4195 "base", |
|
4196 "frame", |
|
4197 "node", |
|
4198 "exec-command", |
|
4199 "editor-selection" |
|
4200 ] |
|
4201 }, |
|
4202 "editor-bidi": { |
|
4203 "requires": [ |
|
4204 "editor-base" |
|
4205 ] |
|
4206 }, |
|
4207 "editor-br": { |
|
4208 "requires": [ |
|
4209 "editor-base" |
|
4210 ] |
|
4211 }, |
|
4212 "editor-inline": { |
|
4213 "requires": [ |
|
4214 "editor-base", |
|
4215 "content-editable" |
|
4216 ] |
|
4217 }, |
|
4218 "editor-lists": { |
|
4219 "requires": [ |
|
4220 "editor-base" |
|
4221 ] |
|
4222 }, |
|
4223 "editor-para": { |
|
4224 "requires": [ |
|
4225 "editor-para-base" |
|
4226 ] |
|
4227 }, |
|
4228 "editor-para-base": { |
|
4229 "requires": [ |
|
4230 "editor-base" |
|
4231 ] |
|
4232 }, |
|
4233 "editor-para-ie": { |
|
4234 "condition": { |
|
4235 "name": "editor-para-ie", |
|
4236 "trigger": "editor-para", |
|
4237 "ua": "ie", |
|
4238 "when": "instead" |
|
4239 }, |
|
4240 "requires": [ |
|
4241 "editor-para-base" |
|
4242 ] |
|
4243 }, |
|
4244 "editor-selection": { |
|
4245 "requires": [ |
|
4246 "node" |
|
4247 ] |
|
4248 }, |
|
4249 "editor-tab": { |
|
4250 "requires": [ |
|
4251 "editor-base" |
|
4252 ] |
|
4253 }, |
|
4254 "escape": { |
|
4255 "requires": [ |
|
4256 "yui-base" |
|
4257 ] |
|
4258 }, |
|
4259 "event": { |
|
4260 "after": [ |
|
4261 "node-base" |
|
4262 ], |
|
4263 "use": [ |
|
4264 "event-base", |
|
4265 "event-delegate", |
|
4266 "event-synthetic", |
|
4267 "event-mousewheel", |
|
4268 "event-mouseenter", |
|
4269 "event-key", |
|
4270 "event-focus", |
|
4271 "event-resize", |
|
4272 "event-hover", |
|
4273 "event-outside", |
|
4274 "event-touch", |
|
4275 "event-move", |
|
4276 "event-flick", |
|
4277 "event-valuechange", |
|
4278 "event-tap" |
|
4279 ] |
|
4280 }, |
|
4281 "event-base": { |
|
4282 "after": [ |
|
4283 "node-base" |
|
4284 ], |
|
4285 "requires": [ |
|
4286 "event-custom-base" |
|
4287 ] |
|
4288 }, |
|
4289 "event-base-ie": { |
|
4290 "after": [ |
|
4291 "event-base" |
|
4292 ], |
|
4293 "condition": { |
|
4294 "name": "event-base-ie", |
|
4295 "test": function(Y) { |
|
4296 var imp = Y.config.doc && Y.config.doc.implementation; |
|
4297 return (imp && (!imp.hasFeature('Events', '2.0'))); |
|
4298 }, |
|
4299 "trigger": "node-base" |
|
4300 }, |
|
4301 "requires": [ |
|
4302 "node-base" |
|
4303 ] |
|
4304 }, |
|
4305 "event-contextmenu": { |
|
4306 "requires": [ |
|
4307 "event-synthetic", |
|
4308 "dom-screen" |
|
4309 ] |
|
4310 }, |
|
4311 "event-custom": { |
|
4312 "use": [ |
|
4313 "event-custom-base", |
|
4314 "event-custom-complex" |
|
4315 ] |
|
4316 }, |
|
4317 "event-custom-base": { |
|
4318 "requires": [ |
|
4319 "oop" |
|
4320 ] |
|
4321 }, |
|
4322 "event-custom-complex": { |
|
4323 "requires": [ |
|
4324 "event-custom-base" |
|
4325 ] |
|
4326 }, |
|
4327 "event-delegate": { |
|
4328 "requires": [ |
|
4329 "node-base" |
|
4330 ] |
|
4331 }, |
|
4332 "event-flick": { |
|
4333 "requires": [ |
|
4334 "node-base", |
|
4335 "event-touch", |
|
4336 "event-synthetic" |
|
4337 ] |
|
4338 }, |
|
4339 "event-focus": { |
|
4340 "requires": [ |
|
4341 "event-synthetic" |
|
4342 ] |
|
4343 }, |
|
4344 "event-gestures": { |
|
4345 "use": [ |
|
4346 "event-flick", |
|
4347 "event-move" |
|
4348 ] |
|
4349 }, |
|
4350 "event-hover": { |
|
4351 "requires": [ |
|
4352 "event-mouseenter" |
|
4353 ] |
|
4354 }, |
|
4355 "event-key": { |
|
4356 "requires": [ |
|
4357 "event-synthetic" |
|
4358 ] |
|
4359 }, |
|
4360 "event-mouseenter": { |
|
4361 "requires": [ |
|
4362 "event-synthetic" |
|
4363 ] |
|
4364 }, |
|
4365 "event-mousewheel": { |
|
4366 "requires": [ |
|
4367 "node-base" |
|
4368 ] |
|
4369 }, |
|
4370 "event-move": { |
|
4371 "requires": [ |
|
4372 "node-base", |
|
4373 "event-touch", |
|
4374 "event-synthetic" |
|
4375 ] |
|
4376 }, |
|
4377 "event-outside": { |
|
4378 "requires": [ |
|
4379 "event-synthetic" |
|
4380 ] |
|
4381 }, |
|
4382 "event-resize": { |
|
4383 "requires": [ |
|
4384 "node-base", |
|
4385 "event-synthetic" |
|
4386 ] |
|
4387 }, |
|
4388 "event-simulate": { |
|
4389 "requires": [ |
|
4390 "event-base" |
|
4391 ] |
|
4392 }, |
|
4393 "event-synthetic": { |
|
4394 "requires": [ |
|
4395 "node-base", |
|
4396 "event-custom-complex" |
|
4397 ] |
|
4398 }, |
|
4399 "event-tap": { |
|
4400 "requires": [ |
|
4401 "node-base", |
|
4402 "event-base", |
|
4403 "event-touch", |
|
4404 "event-synthetic" |
|
4405 ] |
|
4406 }, |
|
4407 "event-touch": { |
|
4408 "requires": [ |
|
4409 "node-base" |
|
4410 ] |
|
4411 }, |
|
4412 "event-valuechange": { |
|
4413 "requires": [ |
|
4414 "event-focus", |
|
4415 "event-synthetic" |
|
4416 ] |
|
4417 }, |
|
4418 "exec-command": { |
|
4419 "requires": [ |
|
4420 "frame" |
|
4421 ] |
|
4422 }, |
|
4423 "features": { |
|
4424 "requires": [ |
|
4425 "yui-base" |
|
4426 ] |
|
4427 }, |
|
4428 "file": { |
|
4429 "requires": [ |
|
4430 "file-flash", |
|
4431 "file-html5" |
|
4432 ] |
|
4433 }, |
|
4434 "file-flash": { |
|
4435 "requires": [ |
|
4436 "base" |
|
4437 ] |
|
4438 }, |
|
4439 "file-html5": { |
|
4440 "requires": [ |
|
4441 "base" |
|
4442 ] |
|
4443 }, |
|
4444 "frame": { |
|
4445 "requires": [ |
|
4446 "base", |
|
4447 "node", |
|
4448 "plugin", |
|
4449 "selector-css3", |
|
4450 "yui-throttle" |
|
4451 ] |
|
4452 }, |
|
4453 "gesture-simulate": { |
|
4454 "requires": [ |
|
4455 "async-queue", |
|
4456 "event-simulate", |
|
4457 "node-screen" |
|
4458 ] |
|
4459 }, |
|
4460 "get": { |
|
4461 "requires": [ |
|
4462 "yui-base" |
|
4463 ] |
|
4464 }, |
|
4465 "graphics": { |
|
4466 "requires": [ |
|
4467 "node", |
|
4468 "event-custom", |
|
4469 "pluginhost", |
|
4470 "matrix", |
|
4471 "classnamemanager" |
|
4472 ] |
|
4473 }, |
|
4474 "graphics-canvas": { |
|
4475 "condition": { |
|
4476 "name": "graphics-canvas", |
|
4477 "test": function(Y) { |
|
4478 var DOCUMENT = Y.config.doc, |
|
4479 useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas", |
|
4480 canvas = DOCUMENT && DOCUMENT.createElement("canvas"), |
|
4481 svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); |
|
4482 return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d")); |
|
4483 }, |
|
4484 "trigger": "graphics" |
|
4485 }, |
|
4486 "requires": [ |
|
4487 "graphics" |
|
4488 ] |
|
4489 }, |
|
4490 "graphics-canvas-default": { |
|
4491 "condition": { |
|
4492 "name": "graphics-canvas-default", |
|
4493 "test": function(Y) { |
|
4494 var DOCUMENT = Y.config.doc, |
|
4495 useCanvas = Y.config.defaultGraphicEngine && Y.config.defaultGraphicEngine == "canvas", |
|
4496 canvas = DOCUMENT && DOCUMENT.createElement("canvas"), |
|
4497 svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); |
|
4498 return (!svg || useCanvas) && (canvas && canvas.getContext && canvas.getContext("2d")); |
|
4499 }, |
|
4500 "trigger": "graphics" |
|
4501 } |
|
4502 }, |
|
4503 "graphics-group": { |
|
4504 "requires": [ |
|
4505 "graphics" |
|
4506 ] |
|
4507 }, |
|
4508 "graphics-svg": { |
|
4509 "condition": { |
|
4510 "name": "graphics-svg", |
|
4511 "test": function(Y) { |
|
4512 var DOCUMENT = Y.config.doc, |
|
4513 useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas", |
|
4514 canvas = DOCUMENT && DOCUMENT.createElement("canvas"), |
|
4515 svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); |
|
4516 |
|
4517 return svg && (useSVG || !canvas); |
|
4518 }, |
|
4519 "trigger": "graphics" |
|
4520 }, |
|
4521 "requires": [ |
|
4522 "graphics" |
|
4523 ] |
|
4524 }, |
|
4525 "graphics-svg-default": { |
|
4526 "condition": { |
|
4527 "name": "graphics-svg-default", |
|
4528 "test": function(Y) { |
|
4529 var DOCUMENT = Y.config.doc, |
|
4530 useSVG = !Y.config.defaultGraphicEngine || Y.config.defaultGraphicEngine != "canvas", |
|
4531 canvas = DOCUMENT && DOCUMENT.createElement("canvas"), |
|
4532 svg = (DOCUMENT && DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1")); |
|
4533 |
|
4534 return svg && (useSVG || !canvas); |
|
4535 }, |
|
4536 "trigger": "graphics" |
|
4537 } |
|
4538 }, |
|
4539 "graphics-vml": { |
|
4540 "condition": { |
|
4541 "name": "graphics-vml", |
|
4542 "test": function(Y) { |
|
4543 var DOCUMENT = Y.config.doc, |
|
4544 canvas = DOCUMENT && DOCUMENT.createElement("canvas"); |
|
4545 return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); |
|
4546 }, |
|
4547 "trigger": "graphics" |
|
4548 }, |
|
4549 "requires": [ |
|
4550 "graphics" |
|
4551 ] |
|
4552 }, |
|
4553 "graphics-vml-default": { |
|
4554 "condition": { |
|
4555 "name": "graphics-vml-default", |
|
4556 "test": function(Y) { |
|
4557 var DOCUMENT = Y.config.doc, |
|
4558 canvas = DOCUMENT && DOCUMENT.createElement("canvas"); |
|
4559 return (DOCUMENT && !DOCUMENT.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") && (!canvas || !canvas.getContext || !canvas.getContext("2d"))); |
|
4560 }, |
|
4561 "trigger": "graphics" |
|
4562 } |
|
4563 }, |
|
4564 "handlebars": { |
|
4565 "use": [ |
|
4566 "handlebars-compiler" |
|
4567 ] |
|
4568 }, |
|
4569 "handlebars-base": { |
|
4570 "requires": [] |
|
4571 }, |
|
4572 "handlebars-compiler": { |
|
4573 "requires": [ |
|
4574 "handlebars-base" |
|
4575 ] |
|
4576 }, |
|
4577 "highlight": { |
|
4578 "use": [ |
|
4579 "highlight-base", |
|
4580 "highlight-accentfold" |
|
4581 ] |
|
4582 }, |
|
4583 "highlight-accentfold": { |
|
4584 "requires": [ |
|
4585 "highlight-base", |
|
4586 "text-accentfold" |
|
4587 ] |
|
4588 }, |
|
4589 "highlight-base": { |
|
4590 "requires": [ |
|
4591 "array-extras", |
|
4592 "classnamemanager", |
|
4593 "escape", |
|
4594 "text-wordbreak" |
|
4595 ] |
|
4596 }, |
|
4597 "history": { |
|
4598 "use": [ |
|
4599 "history-base", |
|
4600 "history-hash", |
|
4601 "history-html5" |
|
4602 ] |
|
4603 }, |
|
4604 "history-base": { |
|
4605 "requires": [ |
|
4606 "event-custom-complex" |
|
4607 ] |
|
4608 }, |
|
4609 "history-hash": { |
|
4610 "after": [ |
|
4611 "history-html5" |
|
4612 ], |
|
4613 "requires": [ |
|
4614 "event-synthetic", |
|
4615 "history-base", |
|
4616 "yui-later" |
|
4617 ] |
|
4618 }, |
|
4619 "history-hash-ie": { |
|
4620 "condition": { |
|
4621 "name": "history-hash-ie", |
|
4622 "test": function (Y) { |
|
4623 var docMode = Y.config.doc && Y.config.doc.documentMode; |
|
4624 |
|
4625 return Y.UA.ie && (!('onhashchange' in Y.config.win) || |
|
4626 !docMode || docMode < 8); |
|
4627 }, |
|
4628 "trigger": "history-hash" |
|
4629 }, |
|
4630 "requires": [ |
|
4631 "history-hash", |
|
4632 "node-base" |
|
4633 ] |
|
4634 }, |
|
4635 "history-html5": { |
|
4636 "optional": [ |
|
4637 "json" |
|
4638 ], |
|
4639 "requires": [ |
|
4640 "event-base", |
|
4641 "history-base", |
|
4642 "node-base" |
|
4643 ] |
|
4644 }, |
|
4645 "imageloader": { |
|
4646 "requires": [ |
|
4647 "base-base", |
|
4648 "node-style", |
|
4649 "node-screen" |
|
4650 ] |
|
4651 }, |
|
4652 "intl": { |
|
4653 "requires": [ |
|
4654 "intl-base", |
|
4655 "event-custom" |
|
4656 ] |
|
4657 }, |
|
4658 "intl-base": { |
|
4659 "requires": [ |
|
4660 "yui-base" |
|
4661 ] |
|
4662 }, |
|
4663 "io": { |
|
4664 "use": [ |
|
4665 "io-base", |
|
4666 "io-xdr", |
|
4667 "io-form", |
|
4668 "io-upload-iframe", |
|
4669 "io-queue" |
|
4670 ] |
|
4671 }, |
|
4672 "io-base": { |
|
4673 "requires": [ |
|
4674 "event-custom-base", |
|
4675 "querystring-stringify-simple" |
|
4676 ] |
|
4677 }, |
|
4678 "io-form": { |
|
4679 "requires": [ |
|
4680 "io-base", |
|
4681 "node-base" |
|
4682 ] |
|
4683 }, |
|
4684 "io-nodejs": { |
|
4685 "condition": { |
|
4686 "name": "io-nodejs", |
|
4687 "trigger": "io-base", |
|
4688 "ua": "nodejs" |
|
4689 }, |
|
4690 "requires": [ |
|
4691 "io-base" |
|
4692 ] |
|
4693 }, |
|
4694 "io-queue": { |
|
4695 "requires": [ |
|
4696 "io-base", |
|
4697 "queue-promote" |
|
4698 ] |
|
4699 }, |
|
4700 "io-upload-iframe": { |
|
4701 "requires": [ |
|
4702 "io-base", |
|
4703 "node-base" |
|
4704 ] |
|
4705 }, |
|
4706 "io-xdr": { |
|
4707 "requires": [ |
|
4708 "io-base", |
|
4709 "datatype-xml-parse" |
|
4710 ] |
|
4711 }, |
|
4712 "json": { |
|
4713 "use": [ |
|
4714 "json-parse", |
|
4715 "json-stringify" |
|
4716 ] |
|
4717 }, |
|
4718 "json-parse": { |
|
4719 "requires": [ |
|
4720 "yui-base" |
|
4721 ] |
|
4722 }, |
|
4723 "json-parse-shim": { |
|
4724 "condition": { |
|
4725 "name": "json-parse-shim", |
|
4726 "test": function (Y) { |
|
4727 var _JSON = Y.config.global.JSON, |
|
4728 Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON, |
|
4729 nativeSupport = Y.config.useNativeJSONParse !== false && !!Native; |
|
4730 |
|
4731 function workingNative( k, v ) { |
|
4732 return k === "ok" ? true : v; |
|
4733 } |
|
4734 |
|
4735 // Double check basic functionality. This is mainly to catch early broken |
|
4736 // implementations of the JSON API in Firefox 3.1 beta1 and beta2 |
|
4737 if ( nativeSupport ) { |
|
4738 try { |
|
4739 nativeSupport = ( Native.parse( '{"ok":false}', workingNative ) ).ok; |
|
4740 } |
|
4741 catch ( e ) { |
|
4742 nativeSupport = false; |
|
4743 } |
|
4744 } |
|
4745 |
|
4746 return !nativeSupport; |
|
4747 }, |
|
4748 "trigger": "json-parse" |
|
4749 }, |
|
4750 "requires": [ |
|
4751 "json-parse" |
|
4752 ] |
|
4753 }, |
|
4754 "json-stringify": { |
|
4755 "requires": [ |
|
4756 "yui-base" |
|
4757 ] |
|
4758 }, |
|
4759 "json-stringify-shim": { |
|
4760 "condition": { |
|
4761 "name": "json-stringify-shim", |
|
4762 "test": function (Y) { |
|
4763 var _JSON = Y.config.global.JSON, |
|
4764 Native = Object.prototype.toString.call(_JSON) === '[object JSON]' && _JSON, |
|
4765 nativeSupport = Y.config.useNativeJSONStringify !== false && !!Native; |
|
4766 |
|
4767 // Double check basic native functionality. This is primarily to catch broken |
|
4768 // early JSON API implementations in Firefox 3.1 beta1 and beta2. |
|
4769 if ( nativeSupport ) { |
|
4770 try { |
|
4771 nativeSupport = ( '0' === Native.stringify(0) ); |
|
4772 } catch ( e ) { |
|
4773 nativeSupport = false; |
|
4774 } |
|
4775 } |
|
4776 |
|
4777 |
|
4778 return !nativeSupport; |
|
4779 }, |
|
4780 "trigger": "json-stringify" |
|
4781 }, |
|
4782 "requires": [ |
|
4783 "json-stringify" |
|
4784 ] |
|
4785 }, |
|
4786 "jsonp": { |
|
4787 "requires": [ |
|
4788 "get", |
|
4789 "oop" |
|
4790 ] |
|
4791 }, |
|
4792 "jsonp-url": { |
|
4793 "requires": [ |
|
4794 "jsonp" |
|
4795 ] |
|
4796 }, |
|
4797 "lazy-model-list": { |
|
4798 "requires": [ |
|
4799 "model-list" |
|
4800 ] |
|
4801 }, |
|
4802 "loader": { |
|
4803 "use": [ |
|
4804 "loader-base", |
|
4805 "loader-rollup", |
|
4806 "loader-yui3" |
|
4807 ] |
|
4808 }, |
|
4809 "loader-base": { |
|
4810 "requires": [ |
|
4811 "get", |
|
4812 "features" |
|
4813 ] |
|
4814 }, |
|
4815 "loader-rollup": { |
|
4816 "requires": [ |
|
4817 "loader-base" |
|
4818 ] |
|
4819 }, |
|
4820 "loader-yui3": { |
|
4821 "requires": [ |
|
4822 "loader-base" |
|
4823 ] |
|
4824 }, |
|
4825 "matrix": { |
|
4826 "requires": [ |
|
4827 "yui-base" |
|
4828 ] |
|
4829 }, |
|
4830 "model": { |
|
4831 "requires": [ |
|
4832 "base-build", |
|
4833 "escape", |
|
4834 "json-parse" |
|
4835 ] |
|
4836 }, |
|
4837 "model-list": { |
|
4838 "requires": [ |
|
4839 "array-extras", |
|
4840 "array-invoke", |
|
4841 "arraylist", |
|
4842 "base-build", |
|
4843 "escape", |
|
4844 "json-parse", |
|
4845 "model" |
|
4846 ] |
|
4847 }, |
|
4848 "model-sync-local": { |
|
4849 "requires": [ |
|
4850 "model", |
|
4851 "json-stringify" |
|
4852 ] |
|
4853 }, |
|
4854 "model-sync-rest": { |
|
4855 "requires": [ |
|
4856 "model", |
|
4857 "io-base", |
|
4858 "json-stringify" |
|
4859 ] |
|
4860 }, |
|
4861 "node": { |
|
4862 "use": [ |
|
4863 "node-base", |
|
4864 "node-event-delegate", |
|
4865 "node-pluginhost", |
|
4866 "node-screen", |
|
4867 "node-style" |
|
4868 ] |
|
4869 }, |
|
4870 "node-base": { |
|
4871 "requires": [ |
|
4872 "event-base", |
|
4873 "node-core", |
|
4874 "dom-base", |
|
4875 "dom-style" |
|
4876 ] |
|
4877 }, |
|
4878 "node-core": { |
|
4879 "requires": [ |
|
4880 "dom-core", |
|
4881 "selector" |
|
4882 ] |
|
4883 }, |
|
4884 "node-event-delegate": { |
|
4885 "requires": [ |
|
4886 "node-base", |
|
4887 "event-delegate" |
|
4888 ] |
|
4889 }, |
|
4890 "node-event-html5": { |
|
4891 "requires": [ |
|
4892 "node-base" |
|
4893 ] |
|
4894 }, |
|
4895 "node-event-simulate": { |
|
4896 "requires": [ |
|
4897 "node-base", |
|
4898 "event-simulate", |
|
4899 "gesture-simulate" |
|
4900 ] |
|
4901 }, |
|
4902 "node-flick": { |
|
4903 "requires": [ |
|
4904 "classnamemanager", |
|
4905 "transition", |
|
4906 "event-flick", |
|
4907 "plugin" |
|
4908 ], |
|
4909 "skinnable": true |
|
4910 }, |
|
4911 "node-focusmanager": { |
|
4912 "requires": [ |
|
4913 "attribute", |
|
4914 "node", |
|
4915 "plugin", |
|
4916 "node-event-simulate", |
|
4917 "event-key", |
|
4918 "event-focus" |
|
4919 ] |
|
4920 }, |
|
4921 "node-load": { |
|
4922 "requires": [ |
|
4923 "node-base", |
|
4924 "io-base" |
|
4925 ] |
|
4926 }, |
|
4927 "node-menunav": { |
|
4928 "requires": [ |
|
4929 "node", |
|
4930 "classnamemanager", |
|
4931 "plugin", |
|
4932 "node-focusmanager" |
|
4933 ], |
|
4934 "skinnable": true |
|
4935 }, |
|
4936 "node-pluginhost": { |
|
4937 "requires": [ |
|
4938 "node-base", |
|
4939 "pluginhost" |
|
4940 ] |
|
4941 }, |
|
4942 "node-screen": { |
|
4943 "requires": [ |
|
4944 "dom-screen", |
|
4945 "node-base" |
|
4946 ] |
|
4947 }, |
|
4948 "node-scroll-info": { |
|
4949 "requires": [ |
|
4950 "array-extras", |
|
4951 "base-build", |
|
4952 "event-resize", |
|
4953 "node-pluginhost", |
|
4954 "plugin", |
|
4955 "selector" |
|
4956 ] |
|
4957 }, |
|
4958 "node-style": { |
|
4959 "requires": [ |
|
4960 "dom-style", |
|
4961 "node-base" |
|
4962 ] |
|
4963 }, |
|
4964 "oop": { |
|
4965 "requires": [ |
|
4966 "yui-base" |
|
4967 ] |
|
4968 }, |
|
4969 "overlay": { |
|
4970 "requires": [ |
|
4971 "widget", |
|
4972 "widget-stdmod", |
|
4973 "widget-position", |
|
4974 "widget-position-align", |
|
4975 "widget-stack", |
|
4976 "widget-position-constrain" |
|
4977 ], |
|
4978 "skinnable": true |
|
4979 }, |
|
4980 "paginator": { |
|
4981 "requires": [ |
|
4982 "paginator-core" |
|
4983 ] |
|
4984 }, |
|
4985 "paginator-core": { |
|
4986 "requires": [ |
|
4987 "base" |
|
4988 ] |
|
4989 }, |
|
4990 "paginator-url": { |
|
4991 "requires": [ |
|
4992 "paginator" |
|
4993 ] |
|
4994 }, |
|
4995 "panel": { |
|
4996 "requires": [ |
|
4997 "widget", |
|
4998 "widget-autohide", |
|
4999 "widget-buttons", |
|
5000 "widget-modality", |
|
5001 "widget-position", |
|
5002 "widget-position-align", |
|
5003 "widget-position-constrain", |
|
5004 "widget-stack", |
|
5005 "widget-stdmod" |
|
5006 ], |
|
5007 "skinnable": true |
|
5008 }, |
|
5009 "parallel": { |
|
5010 "requires": [ |
|
5011 "yui-base" |
|
5012 ] |
|
5013 }, |
|
5014 "pjax": { |
|
5015 "requires": [ |
|
5016 "pjax-base", |
|
5017 "pjax-content" |
|
5018 ] |
|
5019 }, |
|
5020 "pjax-base": { |
|
5021 "requires": [ |
|
5022 "classnamemanager", |
|
5023 "node-event-delegate", |
|
5024 "router" |
|
5025 ] |
|
5026 }, |
|
5027 "pjax-content": { |
|
5028 "requires": [ |
|
5029 "io-base", |
|
5030 "node-base", |
|
5031 "router" |
|
5032 ] |
|
5033 }, |
|
5034 "pjax-plugin": { |
|
5035 "requires": [ |
|
5036 "node-pluginhost", |
|
5037 "pjax", |
|
5038 "plugin" |
|
5039 ] |
|
5040 }, |
|
5041 "plugin": { |
|
5042 "requires": [ |
|
5043 "base-base" |
|
5044 ] |
|
5045 }, |
|
5046 "pluginhost": { |
|
5047 "use": [ |
|
5048 "pluginhost-base", |
|
5049 "pluginhost-config" |
|
5050 ] |
|
5051 }, |
|
5052 "pluginhost-base": { |
|
5053 "requires": [ |
|
5054 "yui-base" |
|
5055 ] |
|
5056 }, |
|
5057 "pluginhost-config": { |
|
5058 "requires": [ |
|
5059 "pluginhost-base" |
|
5060 ] |
|
5061 }, |
|
5062 "promise": { |
|
5063 "requires": [ |
|
5064 "timers" |
|
5065 ] |
|
5066 }, |
|
5067 "querystring": { |
|
5068 "use": [ |
|
5069 "querystring-parse", |
|
5070 "querystring-stringify" |
|
5071 ] |
|
5072 }, |
|
5073 "querystring-parse": { |
|
5074 "requires": [ |
|
5075 "yui-base", |
|
5076 "array-extras" |
|
5077 ] |
|
5078 }, |
|
5079 "querystring-parse-simple": { |
|
5080 "requires": [ |
|
5081 "yui-base" |
|
5082 ] |
|
5083 }, |
|
5084 "querystring-stringify": { |
|
5085 "requires": [ |
|
5086 "yui-base" |
|
5087 ] |
|
5088 }, |
|
5089 "querystring-stringify-simple": { |
|
5090 "requires": [ |
|
5091 "yui-base" |
|
5092 ] |
|
5093 }, |
|
5094 "queue-promote": { |
|
5095 "requires": [ |
|
5096 "yui-base" |
|
5097 ] |
|
5098 }, |
|
5099 "range-slider": { |
|
5100 "requires": [ |
|
5101 "slider-base", |
|
5102 "slider-value-range", |
|
5103 "clickable-rail" |
|
5104 ] |
|
5105 }, |
|
5106 "recordset": { |
|
5107 "use": [ |
|
5108 "recordset-base", |
|
5109 "recordset-sort", |
|
5110 "recordset-filter", |
|
5111 "recordset-indexer" |
|
5112 ] |
|
5113 }, |
|
5114 "recordset-base": { |
|
5115 "requires": [ |
|
5116 "base", |
|
5117 "arraylist" |
|
5118 ] |
|
5119 }, |
|
5120 "recordset-filter": { |
|
5121 "requires": [ |
|
5122 "recordset-base", |
|
5123 "array-extras", |
|
5124 "plugin" |
|
5125 ] |
|
5126 }, |
|
5127 "recordset-indexer": { |
|
5128 "requires": [ |
|
5129 "recordset-base", |
|
5130 "plugin" |
|
5131 ] |
|
5132 }, |
|
5133 "recordset-sort": { |
|
5134 "requires": [ |
|
5135 "arraysort", |
|
5136 "recordset-base", |
|
5137 "plugin" |
|
5138 ] |
|
5139 }, |
|
5140 "resize": { |
|
5141 "use": [ |
|
5142 "resize-base", |
|
5143 "resize-proxy", |
|
5144 "resize-constrain" |
|
5145 ] |
|
5146 }, |
|
5147 "resize-base": { |
|
5148 "requires": [ |
|
5149 "base", |
|
5150 "widget", |
|
5151 "event", |
|
5152 "oop", |
|
5153 "dd-drag", |
|
5154 "dd-delegate", |
|
5155 "dd-drop" |
|
5156 ], |
|
5157 "skinnable": true |
|
5158 }, |
|
5159 "resize-constrain": { |
|
5160 "requires": [ |
|
5161 "plugin", |
|
5162 "resize-base" |
|
5163 ] |
|
5164 }, |
|
5165 "resize-plugin": { |
|
5166 "optional": [ |
|
5167 "resize-constrain" |
|
5168 ], |
|
5169 "requires": [ |
|
5170 "resize-base", |
|
5171 "plugin" |
|
5172 ] |
|
5173 }, |
|
5174 "resize-proxy": { |
|
5175 "requires": [ |
|
5176 "plugin", |
|
5177 "resize-base" |
|
5178 ] |
|
5179 }, |
|
5180 "router": { |
|
5181 "optional": [ |
|
5182 "querystring-parse" |
|
5183 ], |
|
5184 "requires": [ |
|
5185 "array-extras", |
|
5186 "base-build", |
|
5187 "history" |
|
5188 ] |
|
5189 }, |
|
5190 "scrollview": { |
|
5191 "requires": [ |
|
5192 "scrollview-base", |
|
5193 "scrollview-scrollbars" |
|
5194 ] |
|
5195 }, |
|
5196 "scrollview-base": { |
|
5197 "requires": [ |
|
5198 "widget", |
|
5199 "event-gestures", |
|
5200 "event-mousewheel", |
|
5201 "transition" |
|
5202 ], |
|
5203 "skinnable": true |
|
5204 }, |
|
5205 "scrollview-base-ie": { |
|
5206 "condition": { |
|
5207 "name": "scrollview-base-ie", |
|
5208 "trigger": "scrollview-base", |
|
5209 "ua": "ie" |
|
5210 }, |
|
5211 "requires": [ |
|
5212 "scrollview-base" |
|
5213 ] |
|
5214 }, |
|
5215 "scrollview-list": { |
|
5216 "requires": [ |
|
5217 "plugin", |
|
5218 "classnamemanager" |
|
5219 ], |
|
5220 "skinnable": true |
|
5221 }, |
|
5222 "scrollview-paginator": { |
|
5223 "requires": [ |
|
5224 "plugin", |
|
5225 "classnamemanager" |
|
5226 ] |
|
5227 }, |
|
5228 "scrollview-scrollbars": { |
|
5229 "requires": [ |
|
5230 "classnamemanager", |
|
5231 "transition", |
|
5232 "plugin" |
|
5233 ], |
|
5234 "skinnable": true |
|
5235 }, |
|
5236 "selector": { |
|
5237 "requires": [ |
|
5238 "selector-native" |
|
5239 ] |
|
5240 }, |
|
5241 "selector-css2": { |
|
5242 "condition": { |
|
5243 "name": "selector-css2", |
|
5244 "test": function (Y) { |
|
5245 var DOCUMENT = Y.config.doc, |
|
5246 ret = DOCUMENT && !('querySelectorAll' in DOCUMENT); |
|
5247 |
|
5248 return ret; |
|
5249 }, |
|
5250 "trigger": "selector" |
|
5251 }, |
|
5252 "requires": [ |
|
5253 "selector-native" |
|
5254 ] |
|
5255 }, |
|
5256 "selector-css3": { |
|
5257 "requires": [ |
|
5258 "selector-native", |
|
5259 "selector-css2" |
|
5260 ] |
|
5261 }, |
|
5262 "selector-native": { |
|
5263 "requires": [ |
|
5264 "dom-base" |
|
5265 ] |
|
5266 }, |
|
5267 "series-area": { |
|
5268 "requires": [ |
|
5269 "series-cartesian", |
|
5270 "series-fill-util" |
|
5271 ] |
|
5272 }, |
|
5273 "series-area-stacked": { |
|
5274 "requires": [ |
|
5275 "series-stacked", |
|
5276 "series-area" |
|
5277 ] |
|
5278 }, |
|
5279 "series-areaspline": { |
|
5280 "requires": [ |
|
5281 "series-area", |
|
5282 "series-curve-util" |
|
5283 ] |
|
5284 }, |
|
5285 "series-areaspline-stacked": { |
|
5286 "requires": [ |
|
5287 "series-stacked", |
|
5288 "series-areaspline" |
|
5289 ] |
|
5290 }, |
|
5291 "series-bar": { |
|
5292 "requires": [ |
|
5293 "series-marker", |
|
5294 "series-histogram-base" |
|
5295 ] |
|
5296 }, |
|
5297 "series-bar-stacked": { |
|
5298 "requires": [ |
|
5299 "series-stacked", |
|
5300 "series-bar" |
|
5301 ] |
|
5302 }, |
|
5303 "series-base": { |
|
5304 "requires": [ |
|
5305 "graphics", |
|
5306 "axis-base" |
|
5307 ] |
|
5308 }, |
|
5309 "series-candlestick": { |
|
5310 "requires": [ |
|
5311 "series-range" |
|
5312 ] |
|
5313 }, |
|
5314 "series-cartesian": { |
|
5315 "requires": [ |
|
5316 "series-base" |
|
5317 ] |
|
5318 }, |
|
5319 "series-column": { |
|
5320 "requires": [ |
|
5321 "series-marker", |
|
5322 "series-histogram-base" |
|
5323 ] |
|
5324 }, |
|
5325 "series-column-stacked": { |
|
5326 "requires": [ |
|
5327 "series-stacked", |
|
5328 "series-column" |
|
5329 ] |
|
5330 }, |
|
5331 "series-combo": { |
|
5332 "requires": [ |
|
5333 "series-cartesian", |
|
5334 "series-line-util", |
|
5335 "series-plot-util", |
|
5336 "series-fill-util" |
|
5337 ] |
|
5338 }, |
|
5339 "series-combo-stacked": { |
|
5340 "requires": [ |
|
5341 "series-stacked", |
|
5342 "series-combo" |
|
5343 ] |
|
5344 }, |
|
5345 "series-combospline": { |
|
5346 "requires": [ |
|
5347 "series-combo", |
|
5348 "series-curve-util" |
|
5349 ] |
|
5350 }, |
|
5351 "series-combospline-stacked": { |
|
5352 "requires": [ |
|
5353 "series-combo-stacked", |
|
5354 "series-curve-util" |
|
5355 ] |
|
5356 }, |
|
5357 "series-curve-util": {}, |
|
5358 "series-fill-util": {}, |
|
5359 "series-histogram-base": { |
|
5360 "requires": [ |
|
5361 "series-cartesian", |
|
5362 "series-plot-util" |
|
5363 ] |
|
5364 }, |
|
5365 "series-line": { |
|
5366 "requires": [ |
|
5367 "series-cartesian", |
|
5368 "series-line-util" |
|
5369 ] |
|
5370 }, |
|
5371 "series-line-stacked": { |
|
5372 "requires": [ |
|
5373 "series-stacked", |
|
5374 "series-line" |
|
5375 ] |
|
5376 }, |
|
5377 "series-line-util": {}, |
|
5378 "series-marker": { |
|
5379 "requires": [ |
|
5380 "series-cartesian", |
|
5381 "series-plot-util" |
|
5382 ] |
|
5383 }, |
|
5384 "series-marker-stacked": { |
|
5385 "requires": [ |
|
5386 "series-stacked", |
|
5387 "series-marker" |
|
5388 ] |
|
5389 }, |
|
5390 "series-ohlc": { |
|
5391 "requires": [ |
|
5392 "series-range" |
|
5393 ] |
|
5394 }, |
|
5395 "series-pie": { |
|
5396 "requires": [ |
|
5397 "series-base", |
|
5398 "series-plot-util" |
|
5399 ] |
|
5400 }, |
|
5401 "series-plot-util": {}, |
|
5402 "series-range": { |
|
5403 "requires": [ |
|
5404 "series-cartesian" |
|
5405 ] |
|
5406 }, |
|
5407 "series-spline": { |
|
5408 "requires": [ |
|
5409 "series-line", |
|
5410 "series-curve-util" |
|
5411 ] |
|
5412 }, |
|
5413 "series-spline-stacked": { |
|
5414 "requires": [ |
|
5415 "series-stacked", |
|
5416 "series-spline" |
|
5417 ] |
|
5418 }, |
|
5419 "series-stacked": { |
|
5420 "requires": [ |
|
5421 "axis-stacked" |
|
5422 ] |
|
5423 }, |
|
5424 "shim-plugin": { |
|
5425 "requires": [ |
|
5426 "node-style", |
|
5427 "node-pluginhost" |
|
5428 ] |
|
5429 }, |
|
5430 "slider": { |
|
5431 "use": [ |
|
5432 "slider-base", |
|
5433 "slider-value-range", |
|
5434 "clickable-rail", |
|
5435 "range-slider" |
|
5436 ] |
|
5437 }, |
|
5438 "slider-base": { |
|
5439 "requires": [ |
|
5440 "widget", |
|
5441 "dd-constrain", |
|
5442 "event-key" |
|
5443 ], |
|
5444 "skinnable": true |
|
5445 }, |
|
5446 "slider-value-range": { |
|
5447 "requires": [ |
|
5448 "slider-base" |
|
5449 ] |
|
5450 }, |
|
5451 "sortable": { |
|
5452 "requires": [ |
|
5453 "dd-delegate", |
|
5454 "dd-drop-plugin", |
|
5455 "dd-proxy" |
|
5456 ] |
|
5457 }, |
|
5458 "sortable-scroll": { |
|
5459 "requires": [ |
|
5460 "dd-scroll", |
|
5461 "sortable" |
|
5462 ] |
|
5463 }, |
|
5464 "stylesheet": { |
|
5465 "requires": [ |
|
5466 "yui-base" |
|
5467 ] |
|
5468 }, |
|
5469 "substitute": { |
|
5470 "optional": [ |
|
5471 "dump" |
|
5472 ], |
|
5473 "requires": [ |
|
5474 "yui-base" |
|
5475 ] |
|
5476 }, |
|
5477 "swf": { |
|
5478 "requires": [ |
|
5479 "event-custom", |
|
5480 "node", |
|
5481 "swfdetect", |
|
5482 "escape" |
|
5483 ] |
|
5484 }, |
|
5485 "swfdetect": { |
|
5486 "requires": [ |
|
5487 "yui-base" |
|
5488 ] |
|
5489 }, |
|
5490 "tabview": { |
|
5491 "requires": [ |
|
5492 "widget", |
|
5493 "widget-parent", |
|
5494 "widget-child", |
|
5495 "tabview-base", |
|
5496 "node-pluginhost", |
|
5497 "node-focusmanager" |
|
5498 ], |
|
5499 "skinnable": true |
|
5500 }, |
|
5501 "tabview-base": { |
|
5502 "requires": [ |
|
5503 "node-event-delegate", |
|
5504 "classnamemanager" |
|
5505 ] |
|
5506 }, |
|
5507 "tabview-plugin": { |
|
5508 "requires": [ |
|
5509 "tabview-base" |
|
5510 ] |
|
5511 }, |
|
5512 "template": { |
|
5513 "use": [ |
|
5514 "template-base", |
|
5515 "template-micro" |
|
5516 ] |
|
5517 }, |
|
5518 "template-base": { |
|
5519 "requires": [ |
|
5520 "yui-base" |
|
5521 ] |
|
5522 }, |
|
5523 "template-micro": { |
|
5524 "requires": [ |
|
5525 "escape" |
|
5526 ] |
|
5527 }, |
|
5528 "test": { |
|
5529 "requires": [ |
|
5530 "event-simulate", |
|
5531 "event-custom", |
|
5532 "json-stringify" |
|
5533 ] |
|
5534 }, |
|
5535 "test-console": { |
|
5536 "requires": [ |
|
5537 "console-filters", |
|
5538 "test", |
|
5539 "array-extras" |
|
5540 ], |
|
5541 "skinnable": true |
|
5542 }, |
|
5543 "text": { |
|
5544 "use": [ |
|
5545 "text-accentfold", |
|
5546 "text-wordbreak" |
|
5547 ] |
|
5548 }, |
|
5549 "text-accentfold": { |
|
5550 "requires": [ |
|
5551 "array-extras", |
|
5552 "text-data-accentfold" |
|
5553 ] |
|
5554 }, |
|
5555 "text-data-accentfold": { |
|
5556 "requires": [ |
|
5557 "yui-base" |
|
5558 ] |
|
5559 }, |
|
5560 "text-data-wordbreak": { |
|
5561 "requires": [ |
|
5562 "yui-base" |
|
5563 ] |
|
5564 }, |
|
5565 "text-wordbreak": { |
|
5566 "requires": [ |
|
5567 "array-extras", |
|
5568 "text-data-wordbreak" |
|
5569 ] |
|
5570 }, |
|
5571 "timers": { |
|
5572 "requires": [ |
|
5573 "yui-base" |
|
5574 ] |
|
5575 }, |
|
5576 "transition": { |
|
5577 "requires": [ |
|
5578 "node-style" |
|
5579 ] |
|
5580 }, |
|
5581 "transition-timer": { |
|
5582 "condition": { |
|
5583 "name": "transition-timer", |
|
5584 "test": function (Y) { |
|
5585 var DOCUMENT = Y.config.doc, |
|
5586 node = (DOCUMENT) ? DOCUMENT.documentElement: null, |
|
5587 ret = true; |
|
5588 |
|
5589 if (node && node.style) { |
|
5590 ret = !('MozTransition' in node.style || 'WebkitTransition' in node.style || 'transition' in node.style); |
|
5591 } |
|
5592 |
|
5593 return ret; |
|
5594 }, |
|
5595 "trigger": "transition" |
|
5596 }, |
|
5597 "requires": [ |
|
5598 "transition" |
|
5599 ] |
|
5600 }, |
|
5601 "tree": { |
|
5602 "requires": [ |
|
5603 "base-build", |
|
5604 "tree-node" |
|
5605 ] |
|
5606 }, |
|
5607 "tree-labelable": { |
|
5608 "requires": [ |
|
5609 "tree" |
|
5610 ] |
|
5611 }, |
|
5612 "tree-lazy": { |
|
5613 "requires": [ |
|
5614 "base-pluginhost", |
|
5615 "plugin", |
|
5616 "tree" |
|
5617 ] |
|
5618 }, |
|
5619 "tree-node": {}, |
|
5620 "tree-openable": { |
|
5621 "requires": [ |
|
5622 "tree" |
|
5623 ] |
|
5624 }, |
|
5625 "tree-selectable": { |
|
5626 "requires": [ |
|
5627 "tree" |
|
5628 ] |
|
5629 }, |
|
5630 "tree-sortable": { |
|
5631 "requires": [ |
|
5632 "tree" |
|
5633 ] |
|
5634 }, |
|
5635 "uploader": { |
|
5636 "requires": [ |
|
5637 "uploader-html5", |
|
5638 "uploader-flash" |
|
5639 ] |
|
5640 }, |
|
5641 "uploader-flash": { |
|
5642 "requires": [ |
|
5643 "swfdetect", |
|
5644 "escape", |
|
5645 "widget", |
|
5646 "base", |
|
5647 "cssbutton", |
|
5648 "node", |
|
5649 "event-custom", |
|
5650 "uploader-queue" |
|
5651 ] |
|
5652 }, |
|
5653 "uploader-html5": { |
|
5654 "requires": [ |
|
5655 "widget", |
|
5656 "node-event-simulate", |
|
5657 "file-html5", |
|
5658 "uploader-queue" |
|
5659 ] |
|
5660 }, |
|
5661 "uploader-queue": { |
|
5662 "requires": [ |
|
5663 "base" |
|
5664 ] |
|
5665 }, |
|
5666 "view": { |
|
5667 "requires": [ |
|
5668 "base-build", |
|
5669 "node-event-delegate" |
|
5670 ] |
|
5671 }, |
|
5672 "view-node-map": { |
|
5673 "requires": [ |
|
5674 "view" |
|
5675 ] |
|
5676 }, |
|
5677 "widget": { |
|
5678 "use": [ |
|
5679 "widget-base", |
|
5680 "widget-htmlparser", |
|
5681 "widget-skin", |
|
5682 "widget-uievents" |
|
5683 ] |
|
5684 }, |
|
5685 "widget-anim": { |
|
5686 "requires": [ |
|
5687 "anim-base", |
|
5688 "plugin", |
|
5689 "widget" |
|
5690 ] |
|
5691 }, |
|
5692 "widget-autohide": { |
|
5693 "requires": [ |
|
5694 "base-build", |
|
5695 "event-key", |
|
5696 "event-outside", |
|
5697 "widget" |
|
5698 ] |
|
5699 }, |
|
5700 "widget-base": { |
|
5701 "requires": [ |
|
5702 "attribute", |
|
5703 "base-base", |
|
5704 "base-pluginhost", |
|
5705 "classnamemanager", |
|
5706 "event-focus", |
|
5707 "node-base", |
|
5708 "node-style" |
|
5709 ], |
|
5710 "skinnable": true |
|
5711 }, |
|
5712 "widget-base-ie": { |
|
5713 "condition": { |
|
5714 "name": "widget-base-ie", |
|
5715 "trigger": "widget-base", |
|
5716 "ua": "ie" |
|
5717 }, |
|
5718 "requires": [ |
|
5719 "widget-base" |
|
5720 ] |
|
5721 }, |
|
5722 "widget-buttons": { |
|
5723 "requires": [ |
|
5724 "button-plugin", |
|
5725 "cssbutton", |
|
5726 "widget-stdmod" |
|
5727 ] |
|
5728 }, |
|
5729 "widget-child": { |
|
5730 "requires": [ |
|
5731 "base-build", |
|
5732 "widget" |
|
5733 ] |
|
5734 }, |
|
5735 "widget-htmlparser": { |
|
5736 "requires": [ |
|
5737 "widget-base" |
|
5738 ] |
|
5739 }, |
|
5740 "widget-modality": { |
|
5741 "requires": [ |
|
5742 "base-build", |
|
5743 "event-outside", |
|
5744 "widget" |
|
5745 ], |
|
5746 "skinnable": true |
|
5747 }, |
|
5748 "widget-parent": { |
|
5749 "requires": [ |
|
5750 "arraylist", |
|
5751 "base-build", |
|
5752 "widget" |
|
5753 ] |
|
5754 }, |
|
5755 "widget-position": { |
|
5756 "requires": [ |
|
5757 "base-build", |
|
5758 "node-screen", |
|
5759 "widget" |
|
5760 ] |
|
5761 }, |
|
5762 "widget-position-align": { |
|
5763 "requires": [ |
|
5764 "widget-position" |
|
5765 ] |
|
5766 }, |
|
5767 "widget-position-constrain": { |
|
5768 "requires": [ |
|
5769 "widget-position" |
|
5770 ] |
|
5771 }, |
|
5772 "widget-skin": { |
|
5773 "requires": [ |
|
5774 "widget-base" |
|
5775 ] |
|
5776 }, |
|
5777 "widget-stack": { |
|
5778 "requires": [ |
|
5779 "base-build", |
|
5780 "widget" |
|
5781 ], |
|
5782 "skinnable": true |
|
5783 }, |
|
5784 "widget-stdmod": { |
|
5785 "requires": [ |
|
5786 "base-build", |
|
5787 "widget" |
|
5788 ] |
|
5789 }, |
|
5790 "widget-uievents": { |
|
5791 "requires": [ |
|
5792 "node-event-delegate", |
|
5793 "widget-base" |
|
5794 ] |
|
5795 }, |
|
5796 "yql": { |
|
5797 "requires": [ |
|
5798 "oop" |
|
5799 ] |
|
5800 }, |
|
5801 "yql-jsonp": { |
|
5802 "condition": { |
|
5803 "name": "yql-jsonp", |
|
5804 "test": function (Y) { |
|
5805 /* Only load the JSONP module when not in nodejs or winjs |
|
5806 TODO Make the winjs module a CORS module |
|
5807 */ |
|
5808 return (!Y.UA.nodejs && !Y.UA.winjs); |
|
5809 }, |
|
5810 "trigger": "yql", |
|
5811 "when": "after" |
|
5812 }, |
|
5813 "requires": [ |
|
5814 "jsonp", |
|
5815 "jsonp-url" |
|
5816 ] |
|
5817 }, |
|
5818 "yql-nodejs": { |
|
5819 "condition": { |
|
5820 "name": "yql-nodejs", |
|
5821 "trigger": "yql", |
|
5822 "ua": "nodejs", |
|
5823 "when": "after" |
|
5824 } |
|
5825 }, |
|
5826 "yql-winjs": { |
|
5827 "condition": { |
|
5828 "name": "yql-winjs", |
|
5829 "trigger": "yql", |
|
5830 "ua": "winjs", |
|
5831 "when": "after" |
|
5832 } |
|
5833 }, |
|
5834 "yui": {}, |
|
5835 "yui-base": {}, |
|
5836 "yui-later": { |
|
5837 "requires": [ |
|
5838 "yui-base" |
|
5839 ] |
|
5840 }, |
|
5841 "yui-log": { |
|
5842 "requires": [ |
|
5843 "yui-base" |
|
5844 ] |
|
5845 }, |
|
5846 "yui-throttle": { |
|
5847 "requires": [ |
|
5848 "yui-base" |
|
5849 ] |
|
5850 } |
|
5851 }); |
|
5852 YUI.Env[Y.version].md5 = '8e471689779fc84718f6dad481790b59'; |
|
5853 |
|
5854 |
|
5855 }, '@VERSION@', {"requires": ["loader-base"]}); |
|
5856 YUI.add('loader', function (Y, NAME) {}, '@VERSION@', {"use": ["loader-base", "loader-rollup", "loader-yui3"]}); |