line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package YUI::Loader::Catalog; |
2
|
|
|
|
|
|
|
|
3
|
4
|
|
|
4
|
|
263417
|
use strict; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
159
|
|
4
|
4
|
|
|
4
|
|
23
|
use warnings; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
124
|
|
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
8889
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use JSON; |
8
|
|
|
|
|
|
|
use Scalar::Util qw/blessed/; |
9
|
|
|
|
|
|
|
use YUI::Loader::Entry; |
10
|
|
|
|
|
|
|
use YUI::Loader::Item; |
11
|
|
|
|
|
|
|
use YUI::Loader::Carp; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
BEGIN { |
14
|
|
|
|
|
|
|
my $json = JSON->new->relaxed(1); |
15
|
|
|
|
|
|
|
my $catalog = $json->decode(map { local $_ = $_; s/'/"/g; $_ } (<<_END_)); |
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
'animation': { |
18
|
|
|
|
|
|
|
'type': 'js', |
19
|
|
|
|
|
|
|
'path': 'animation/animation-min.js', |
20
|
|
|
|
|
|
|
'requires': ['dom', 'event'] |
21
|
|
|
|
|
|
|
}, |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
'autocomplete': { |
24
|
|
|
|
|
|
|
'type': 'js', |
25
|
|
|
|
|
|
|
'path': 'autocomplete/autocomplete-min.js', |
26
|
|
|
|
|
|
|
'requires': ['dom', 'event', 'datasource'], |
27
|
|
|
|
|
|
|
'optional': ['connection', 'animation'], |
28
|
|
|
|
|
|
|
'skinnable': true |
29
|
|
|
|
|
|
|
}, |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
'base': { |
32
|
|
|
|
|
|
|
'type': 'css', |
33
|
|
|
|
|
|
|
'path': 'base/base-min.css', |
34
|
|
|
|
|
|
|
'after': ['reset', 'fonts', 'grids'] |
35
|
|
|
|
|
|
|
}, |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
'button': { |
38
|
|
|
|
|
|
|
'type': 'js', |
39
|
|
|
|
|
|
|
'path': 'button/button-min.js', |
40
|
|
|
|
|
|
|
'requires': ['element'], |
41
|
|
|
|
|
|
|
'optional': ['menu'], |
42
|
|
|
|
|
|
|
'skinnable': true |
43
|
|
|
|
|
|
|
}, |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
'calendar': { |
46
|
|
|
|
|
|
|
'type': 'js', |
47
|
|
|
|
|
|
|
'path': 'calendar/calendar-min.js', |
48
|
|
|
|
|
|
|
'requires': ['event', 'dom'], |
49
|
|
|
|
|
|
|
'skinnable': true |
50
|
|
|
|
|
|
|
}, |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
'charts': { |
53
|
|
|
|
|
|
|
'type': 'js', |
54
|
|
|
|
|
|
|
'path': 'charts/charts-min.js', |
55
|
|
|
|
|
|
|
'requires': ['element', 'json', 'datasource'] |
56
|
|
|
|
|
|
|
}, |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
'colorpicker': { |
59
|
|
|
|
|
|
|
'type': 'js', |
60
|
|
|
|
|
|
|
'path': 'colorpicker/colorpicker-min.js', |
61
|
|
|
|
|
|
|
'requires': ['slider', 'element'], |
62
|
|
|
|
|
|
|
'optional': ['animation'], |
63
|
|
|
|
|
|
|
'skinnable': true |
64
|
|
|
|
|
|
|
}, |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
'connection': { |
67
|
|
|
|
|
|
|
'type': 'js', |
68
|
|
|
|
|
|
|
'path': 'connection/connection-min.js', |
69
|
|
|
|
|
|
|
'requires': ['event'] |
70
|
|
|
|
|
|
|
}, |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
'container': { |
73
|
|
|
|
|
|
|
'type': 'js', |
74
|
|
|
|
|
|
|
'path': 'container/container-min.js', |
75
|
|
|
|
|
|
|
'requires': ['dom', 'event'], |
76
|
|
|
|
|
|
|
'optional': ['dragdrop', 'animation', 'connection'], |
77
|
|
|
|
|
|
|
'supersedes': ['containercore'], |
78
|
|
|
|
|
|
|
'skinnable': true |
79
|
|
|
|
|
|
|
}, |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
'containercore': { |
82
|
|
|
|
|
|
|
'type': 'js', |
83
|
|
|
|
|
|
|
'path': 'container/container_core-min.js', |
84
|
|
|
|
|
|
|
'requires': ['dom', 'event'], |
85
|
|
|
|
|
|
|
'pkg': 'container' |
86
|
|
|
|
|
|
|
}, |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
'cookie': { |
89
|
|
|
|
|
|
|
'type': 'js', |
90
|
|
|
|
|
|
|
'path': 'cookie/cookie-min.js', |
91
|
|
|
|
|
|
|
'requires': ['yahoo'] |
92
|
|
|
|
|
|
|
}, |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
'datasource': { |
95
|
|
|
|
|
|
|
'type': 'js', |
96
|
|
|
|
|
|
|
'path': 'datasource/datasource-min.js', |
97
|
|
|
|
|
|
|
'requires': ['event'], |
98
|
|
|
|
|
|
|
'optional': ['connection'] |
99
|
|
|
|
|
|
|
}, |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
'datatable': { |
102
|
|
|
|
|
|
|
'type': 'js', |
103
|
|
|
|
|
|
|
'path': 'datatable/datatable-min.js', |
104
|
|
|
|
|
|
|
'requires': ['element', 'datasource'], |
105
|
|
|
|
|
|
|
'optional': ['calendar', 'dragdrop'], |
106
|
|
|
|
|
|
|
'skinnable': true |
107
|
|
|
|
|
|
|
}, |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
'dom': { |
110
|
|
|
|
|
|
|
'type': 'js', |
111
|
|
|
|
|
|
|
'path': 'dom/dom-min.js', |
112
|
|
|
|
|
|
|
'requires': ['yahoo'] |
113
|
|
|
|
|
|
|
}, |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
'dragdrop': { |
116
|
|
|
|
|
|
|
'type': 'js', |
117
|
|
|
|
|
|
|
'path': 'dragdrop/dragdrop-min.js', |
118
|
|
|
|
|
|
|
'requires': ['dom', 'event'] |
119
|
|
|
|
|
|
|
}, |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
'editor': { |
122
|
|
|
|
|
|
|
'type': 'js', |
123
|
|
|
|
|
|
|
'path': 'editor/editor-min.js', |
124
|
|
|
|
|
|
|
'requires': ['menu', 'element', 'button'], |
125
|
|
|
|
|
|
|
'optional': ['animation', 'dragdrop'], |
126
|
|
|
|
|
|
|
'skinnable': true |
127
|
|
|
|
|
|
|
}, |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
'element': { |
130
|
|
|
|
|
|
|
'type': 'js', |
131
|
|
|
|
|
|
|
'path': 'element/element-min.js', |
132
|
|
|
|
|
|
|
'requires': ['dom', 'event'] |
133
|
|
|
|
|
|
|
}, |
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
'event': { |
136
|
|
|
|
|
|
|
'type': 'js', |
137
|
|
|
|
|
|
|
'path': 'event/event-min.js', |
138
|
|
|
|
|
|
|
'requires': ['yahoo'] |
139
|
|
|
|
|
|
|
}, |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
'fonts': { |
142
|
|
|
|
|
|
|
'type': 'css', |
143
|
|
|
|
|
|
|
'path': 'fonts/fonts-min.css' |
144
|
|
|
|
|
|
|
}, |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
'get': { |
147
|
|
|
|
|
|
|
'type': 'js', |
148
|
|
|
|
|
|
|
'path': 'get/get-min.js', |
149
|
|
|
|
|
|
|
'requires': ['yahoo'] |
150
|
|
|
|
|
|
|
}, |
151
|
|
|
|
|
|
|
|
152
|
|
|
|
|
|
|
'grids': { |
153
|
|
|
|
|
|
|
'type': 'css', |
154
|
|
|
|
|
|
|
'path': 'grids/grids-min.css', |
155
|
|
|
|
|
|
|
'requires': ['fonts'], |
156
|
|
|
|
|
|
|
'optional': ['reset'] |
157
|
|
|
|
|
|
|
}, |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
'history': { |
160
|
|
|
|
|
|
|
'type': 'js', |
161
|
|
|
|
|
|
|
'path': 'history/history-min.js', |
162
|
|
|
|
|
|
|
'requires': ['event'] |
163
|
|
|
|
|
|
|
}, |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
'imagecropper': { |
166
|
|
|
|
|
|
|
'type': 'js', |
167
|
|
|
|
|
|
|
'path': 'imagecropper/imagecropper-min.js', |
168
|
|
|
|
|
|
|
'requires': ['dom', 'event', 'dragdrop', 'element', 'resize'], |
169
|
|
|
|
|
|
|
'skinnable': true |
170
|
|
|
|
|
|
|
}, |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
'imageloader': { |
173
|
|
|
|
|
|
|
'type': 'js', |
174
|
|
|
|
|
|
|
'path': 'imageloader/imageloader-min.js', |
175
|
|
|
|
|
|
|
'requires': ['event', 'dom'] |
176
|
|
|
|
|
|
|
}, |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
'json': { |
179
|
|
|
|
|
|
|
'type': 'js', |
180
|
|
|
|
|
|
|
'path': 'json/json-min.js', |
181
|
|
|
|
|
|
|
'requires': ['yahoo'] |
182
|
|
|
|
|
|
|
}, |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
'layout': { |
185
|
|
|
|
|
|
|
'type': 'js', |
186
|
|
|
|
|
|
|
'path': 'layout/layout-min.js', |
187
|
|
|
|
|
|
|
'requires': ['dom', 'event', 'element'], |
188
|
|
|
|
|
|
|
'optional': ['animation', 'dragdrop', 'resize', 'selector'], |
189
|
|
|
|
|
|
|
'skinnable': true |
190
|
|
|
|
|
|
|
}, |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
'logger': { |
193
|
|
|
|
|
|
|
'type': 'js', |
194
|
|
|
|
|
|
|
'path': 'logger/logger-min.js', |
195
|
|
|
|
|
|
|
'requires': ['event', 'dom'], |
196
|
|
|
|
|
|
|
'optional': ['dragdrop'], |
197
|
|
|
|
|
|
|
'skinnable': true |
198
|
|
|
|
|
|
|
}, |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
'menu': { |
201
|
|
|
|
|
|
|
'type': 'js', |
202
|
|
|
|
|
|
|
'path': 'menu/menu-min.js', |
203
|
|
|
|
|
|
|
'requires': ['containercore'], |
204
|
|
|
|
|
|
|
'skinnable': true |
205
|
|
|
|
|
|
|
}, |
206
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
'profiler': { |
208
|
|
|
|
|
|
|
'type': 'js', |
209
|
|
|
|
|
|
|
'path': 'profiler/profiler-min.js', |
210
|
|
|
|
|
|
|
'requires': ['yahoo'] |
211
|
|
|
|
|
|
|
}, |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
'profilerviewer': { |
215
|
|
|
|
|
|
|
'type': 'js', |
216
|
|
|
|
|
|
|
'path': 'profilerviewer/profilerviewer-min.js', |
217
|
|
|
|
|
|
|
'requires': ['profiler', 'yuiloader', 'element'], |
218
|
|
|
|
|
|
|
'skinnable': true |
219
|
|
|
|
|
|
|
}, |
220
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
'reset': { |
222
|
|
|
|
|
|
|
'type': 'css', |
223
|
|
|
|
|
|
|
'path': 'reset/reset-min.css' |
224
|
|
|
|
|
|
|
}, |
225
|
|
|
|
|
|
|
|
226
|
|
|
|
|
|
|
'reset-fonts-grids': { |
227
|
|
|
|
|
|
|
'type': 'css', |
228
|
|
|
|
|
|
|
'path': 'reset-fonts-grids/reset-fonts-grids.css', |
229
|
|
|
|
|
|
|
'supersedes': ['reset', 'fonts', 'grids', 'reset-fonts'], |
230
|
|
|
|
|
|
|
'rollup': 4 |
231
|
|
|
|
|
|
|
}, |
232
|
|
|
|
|
|
|
|
233
|
|
|
|
|
|
|
'reset-fonts': { |
234
|
|
|
|
|
|
|
'type': 'css', |
235
|
|
|
|
|
|
|
'path': 'reset-fonts/reset-fonts.css', |
236
|
|
|
|
|
|
|
'supersedes': ['reset', 'fonts'], |
237
|
|
|
|
|
|
|
'rollup': 2 |
238
|
|
|
|
|
|
|
}, |
239
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
'resize': { |
241
|
|
|
|
|
|
|
'type': 'js', |
242
|
|
|
|
|
|
|
'path': 'resize/resize-min.js', |
243
|
|
|
|
|
|
|
'requires': ['dom', 'event', 'dragdrop', 'element'], |
244
|
|
|
|
|
|
|
'optional': ['animation'], |
245
|
|
|
|
|
|
|
'skinnable': true |
246
|
|
|
|
|
|
|
}, |
247
|
|
|
|
|
|
|
|
248
|
|
|
|
|
|
|
'selector': { |
249
|
|
|
|
|
|
|
'type': 'js', |
250
|
|
|
|
|
|
|
'path': 'selector/selector-min.js', |
251
|
|
|
|
|
|
|
'requires': ['yahoo', 'dom'] |
252
|
|
|
|
|
|
|
}, |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
'simpleeditor': { |
255
|
|
|
|
|
|
|
'type': 'js', |
256
|
|
|
|
|
|
|
'path': 'editor/simpleeditor-min.js', |
257
|
|
|
|
|
|
|
'requires': ['element'], |
258
|
|
|
|
|
|
|
'optional': ['containercore', 'menu', 'button', 'animation', 'dragdrop'], |
259
|
|
|
|
|
|
|
'skinnable': true, |
260
|
|
|
|
|
|
|
'pkg': 'editor' |
261
|
|
|
|
|
|
|
}, |
262
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
'slider': { |
264
|
|
|
|
|
|
|
'type': 'js', |
265
|
|
|
|
|
|
|
'path': 'slider/slider-min.js', |
266
|
|
|
|
|
|
|
'requires': ['dragdrop'], |
267
|
|
|
|
|
|
|
'optional': ['animation'] |
268
|
|
|
|
|
|
|
}, |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
'tabview': { |
271
|
|
|
|
|
|
|
'type': 'js', |
272
|
|
|
|
|
|
|
'path': 'tabview/tabview-min.js', |
273
|
|
|
|
|
|
|
'requires': ['element'], |
274
|
|
|
|
|
|
|
'optional': ['connection'], |
275
|
|
|
|
|
|
|
'skinnable': true |
276
|
|
|
|
|
|
|
}, |
277
|
|
|
|
|
|
|
|
278
|
|
|
|
|
|
|
'treeview': { |
279
|
|
|
|
|
|
|
'type': 'js', |
280
|
|
|
|
|
|
|
'path': 'treeview/treeview-min.js', |
281
|
|
|
|
|
|
|
'requires': ['event'], |
282
|
|
|
|
|
|
|
'skinnable': true |
283
|
|
|
|
|
|
|
}, |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
'uploader': { |
286
|
|
|
|
|
|
|
'type': 'js', |
287
|
|
|
|
|
|
|
'path': 'uploader/uploader.js', |
288
|
|
|
|
|
|
|
'requires': ['yahoo', 'dom', 'event', 'element'] |
289
|
|
|
|
|
|
|
}, |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
'utilities': { |
292
|
|
|
|
|
|
|
'type': 'js', |
293
|
|
|
|
|
|
|
'path': 'utilities/utilities.js', |
294
|
|
|
|
|
|
|
'supersedes': ['yahoo', 'event', 'dragdrop', 'animation', 'dom', 'connection', 'element', 'yahoo-dom-event', 'get', 'yuiloader', 'yuiloader-dom-event'], |
295
|
|
|
|
|
|
|
'rollup': 8 |
296
|
|
|
|
|
|
|
}, |
297
|
|
|
|
|
|
|
|
298
|
|
|
|
|
|
|
'yahoo': { |
299
|
|
|
|
|
|
|
'type': 'js', |
300
|
|
|
|
|
|
|
'path': 'yahoo/yahoo-min.js' |
301
|
|
|
|
|
|
|
}, |
302
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
'yahoo-dom-event': { |
304
|
|
|
|
|
|
|
'type': 'js', |
305
|
|
|
|
|
|
|
'path': 'yahoo-dom-event/yahoo-dom-event.js', |
306
|
|
|
|
|
|
|
'supersedes': ['yahoo', 'event', 'dom'], |
307
|
|
|
|
|
|
|
'rollup': 3 |
308
|
|
|
|
|
|
|
}, |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
'yuiloader': { |
311
|
|
|
|
|
|
|
'type': 'js', |
312
|
|
|
|
|
|
|
'path': 'yuiloader/yuiloader-min.js', |
313
|
|
|
|
|
|
|
'supersedes': ['yahoo', 'get'] |
314
|
|
|
|
|
|
|
}, |
315
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
'yuiloader-dom-event': { |
317
|
|
|
|
|
|
|
'type': 'js', |
318
|
|
|
|
|
|
|
'path': 'yuiloader-dom-event/yuiloader-dom-event.js', |
319
|
|
|
|
|
|
|
'supersedes': ['yahoo', 'dom', 'event', 'get', 'yuiloader', 'yahoo-dom-event'], |
320
|
|
|
|
|
|
|
'rollup': 5 |
321
|
|
|
|
|
|
|
}, |
322
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
'yuitest': { |
324
|
|
|
|
|
|
|
'type': 'js', |
325
|
|
|
|
|
|
|
'path': 'yuitest/yuitest-min.js', |
326
|
|
|
|
|
|
|
'requires': ['logger'], |
327
|
|
|
|
|
|
|
'skinnable': true |
328
|
|
|
|
|
|
|
}, |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
'paginator': { |
331
|
|
|
|
|
|
|
'type': 'js', |
332
|
|
|
|
|
|
|
'path': 'paginator/paginator-min.js', |
333
|
|
|
|
|
|
|
'requires': ['event', 'element'], |
334
|
|
|
|
|
|
|
'optional': ['selector'], |
335
|
|
|
|
|
|
|
'skinnable': true |
336
|
|
|
|
|
|
|
} |
337
|
|
|
|
|
|
|
} |
338
|
|
|
|
|
|
|
_END_ |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
my $catalog_meta = $json->decode(map { local $_ = $_; s/\b(name|type)\b/"$1"/g; s/'/"/g; $_ } (<<_END_)); |
341
|
|
|
|
|
|
|
{ |
342
|
|
|
|
|
|
|
"animation": {name: "Animation Utility", type: "utility"}, |
343
|
|
|
|
|
|
|
"autocomplete": {name: "AutoComplete Control", type: "widget"}, |
344
|
|
|
|
|
|
|
"base":{name: "Base CSS Package", type: "css"}, |
345
|
|
|
|
|
|
|
"button":{name: "Button Control", type: "widget"}, |
346
|
|
|
|
|
|
|
"calendar":{name:"Calendar Control", type: "widget"}, |
347
|
|
|
|
|
|
|
"charts":{name:"Charts Control", type: "widget"}, |
348
|
|
|
|
|
|
|
"colorpicker":{name:"Color Picker Control", type: "widget"}, |
349
|
|
|
|
|
|
|
"connection":{name:"Connection Manager", type: "utility"}, |
350
|
|
|
|
|
|
|
"container":{name:"Container Family", type: "widget"}, |
351
|
|
|
|
|
|
|
"containercore":{name:"Container Core (Module, Overlay)", type: "widget"}, |
352
|
|
|
|
|
|
|
"cookie":{name:"Cookie Utility", type: "utility"}, |
353
|
|
|
|
|
|
|
"datasource":{name:"DataSource Utility", type: "utility"}, |
354
|
|
|
|
|
|
|
"datatable":{name:"DataTable Control", type: "widget"}, |
355
|
|
|
|
|
|
|
"dom":{name:"Dom Collection", type: "core"}, |
356
|
|
|
|
|
|
|
"dragdrop":{name:"Drag & Drop Utility", type: "utility"}, |
357
|
|
|
|
|
|
|
"editor":{name:"Rich Text Editor", type: "widget"}, |
358
|
|
|
|
|
|
|
"element":{name:"Element Utility", type: "utility"}, |
359
|
|
|
|
|
|
|
"event":{name:"Event Utility", type: "core"}, |
360
|
|
|
|
|
|
|
"fonts":{name:"Fonts CSS Package", type: "css"}, |
361
|
|
|
|
|
|
|
"get":{name:"Get Utility", type: "utility"}, |
362
|
|
|
|
|
|
|
"grids":{name:"Grids CSS Package", type: "css"}, |
363
|
|
|
|
|
|
|
"history":{name:"Browser History Manager", type: "utility"}, |
364
|
|
|
|
|
|
|
"imagecropper":{name:"ImageCropper Control", type: "widget"}, |
365
|
|
|
|
|
|
|
"imageloader":{name:"ImageLoader Utility", type: "utility"}, |
366
|
|
|
|
|
|
|
"json":{name:"JSON Utility", type: "utility"}, |
367
|
|
|
|
|
|
|
"layout":{name:"Layout Manager", type: "widget"}, |
368
|
|
|
|
|
|
|
"logger":{name:"Logger Control", type: "tool"}, |
369
|
|
|
|
|
|
|
"menu":{name:"Menu Control", type: "widget"}, |
370
|
|
|
|
|
|
|
"profiler":{name:"Profiler", type: "tool"}, |
371
|
|
|
|
|
|
|
"profilerviewer":{name:"ProfilerViewer Control", type: "tool"}, |
372
|
|
|
|
|
|
|
"reset":{name:"Reset CSS Package", type: "css"}, |
373
|
|
|
|
|
|
|
"resize":{name:"Resize Utility", type: "utility"}, |
374
|
|
|
|
|
|
|
"selector":{name:"Selector Utility", type: "utility"}, |
375
|
|
|
|
|
|
|
"simpleeditor":{name:"Simple Editor", type: "widget"}, |
376
|
|
|
|
|
|
|
"slider":{name:"Slider Control", type: "widget"}, |
377
|
|
|
|
|
|
|
"tabview":{name:"TabView Control", type: "widget"}, |
378
|
|
|
|
|
|
|
"treeview":{name:"TreeView Control", type: "widget"}, |
379
|
|
|
|
|
|
|
"uploader":{name:"Uploader", type: "widget"}, |
380
|
|
|
|
|
|
|
"yahoo":{name:"Yahoo Global Object", type: "core"}, |
381
|
|
|
|
|
|
|
"yuiloader":{name:"Loader Utility", type: "utility"}, |
382
|
|
|
|
|
|
|
"yuitest":{name:"YUI Test Utility", type: "tool"}, |
383
|
|
|
|
|
|
|
"reset-fonts":{name:"reset-fonts.css", type: "rollup"}, |
384
|
|
|
|
|
|
|
"reset-fonts-grids":{name:"reset-fonts-grids.css", type: "rollup"}, |
385
|
|
|
|
|
|
|
"utilities":{name:"utilities.js", type: "rollup"}, |
386
|
|
|
|
|
|
|
"yahoo-dom-event":{name:"yahoo-dom-event.js", type: "rollup"}, |
387
|
|
|
|
|
|
|
"yuiloader-dom-event":{name:"yuiloader-dom-event.js", type: "rollup"}, |
388
|
|
|
|
|
|
|
"paginator":{name:"Paginator Control", type: "widget"} |
389
|
|
|
|
|
|
|
} |
390
|
|
|
|
|
|
|
_END_ |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
while (my ($name, $value) = each %$catalog) { |
393
|
|
|
|
|
|
|
next unless $value->{skinnable}; |
394
|
|
|
|
|
|
|
$catalog->{"$name-skin"} = { |
395
|
|
|
|
|
|
|
type => "css", |
396
|
|
|
|
|
|
|
path => "$name/assets/skins/sam/$name.css", |
397
|
|
|
|
|
|
|
}; |
398
|
|
|
|
|
|
|
$catalog_meta->{"$name-skin"} = { |
399
|
|
|
|
|
|
|
type => "css", |
400
|
|
|
|
|
|
|
name => "Sam Skin for $name", |
401
|
|
|
|
|
|
|
}; |
402
|
|
|
|
|
|
|
} |
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
my %catalog; |
405
|
|
|
|
|
|
|
my %dependency_graph; |
406
|
|
|
|
|
|
|
for my $entry (keys %$catalog) { |
407
|
|
|
|
|
|
|
$dependency_graph{$entry} = [ @{ $catalog->{$entry}->{requires} || [] } ]; |
408
|
|
|
|
|
|
|
$catalog{$entry} = YUI::Loader::Entry->parse($entry => $catalog->{$entry}); |
409
|
|
|
|
|
|
|
$catalog{$entry}->kind($catalog_meta->{$entry}->{type}); |
410
|
|
|
|
|
|
|
$catalog{$entry}->description($catalog_meta->{$entry}->{name}); |
411
|
|
|
|
|
|
|
} |
412
|
|
|
|
|
|
|
$catalog{'reset'}->rank(-300); |
413
|
|
|
|
|
|
|
$catalog{'reset-fonts'}->rank(-20); |
414
|
|
|
|
|
|
|
$catalog{'reset-fonts-grids'}->rank(-10); |
415
|
|
|
|
|
|
|
$catalog{'fonts'}->rank(-200); |
416
|
|
|
|
|
|
|
$catalog{'grids'}->rank(-100); |
417
|
|
|
|
|
|
|
$catalog{'base'}->rank(0); |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
sub catalog { |
420
|
|
|
|
|
|
|
return \%catalog; |
421
|
|
|
|
|
|
|
} |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
sub dependency_graph { |
424
|
|
|
|
|
|
|
return \%dependency_graph; |
425
|
|
|
|
|
|
|
} |
426
|
|
|
|
|
|
|
} |
427
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
sub name_list { |
429
|
|
|
|
|
|
|
my $self = shift; |
430
|
|
|
|
|
|
|
return keys %{ $self->catalog }; |
431
|
|
|
|
|
|
|
} |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
sub entry_list { |
434
|
|
|
|
|
|
|
my $self = shift; |
435
|
|
|
|
|
|
|
return values %{ $self->catalog }; |
436
|
|
|
|
|
|
|
} |
437
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
sub entry { |
439
|
|
|
|
|
|
|
my $self = shift; |
440
|
|
|
|
|
|
|
my $name = shift; |
441
|
|
|
|
|
|
|
|
442
|
|
|
|
|
|
|
croak "Can't look up an entry without a name" unless $name; |
443
|
|
|
|
|
|
|
return $name if blessed $name && $name->isa("YUI::Loader::Entry"); |
444
|
|
|
|
|
|
|
croak "Couldn't find entry for name \"$name\"" unless my $entry = $self->catalog->{$name}; |
445
|
|
|
|
|
|
|
return $entry; |
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
} |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
sub item { |
450
|
|
|
|
|
|
|
my $self = shift; |
451
|
|
|
|
|
|
|
my $name = shift; |
452
|
|
|
|
|
|
|
croak "Can't make an item without a name" unless $name; |
453
|
|
|
|
|
|
|
return $name if blessed $name && $name->isa("YUI::Loader::Item"); |
454
|
|
|
|
|
|
|
my $filter; |
455
|
|
|
|
|
|
|
if (ref $name eq "ARRAY") { |
456
|
|
|
|
|
|
|
($name, $filter) = @$name; |
457
|
|
|
|
|
|
|
} |
458
|
|
|
|
|
|
|
else { |
459
|
|
|
|
|
|
|
if ($name =~ s/-min$//i) { $filter = "min" } |
460
|
|
|
|
|
|
|
elsif ($name =~ s/-debug$//i) { $filter = "debug" } |
461
|
|
|
|
|
|
|
} |
462
|
|
|
|
|
|
|
my $entry = $self->entry($name); |
463
|
|
|
|
|
|
|
my $item = YUI::Loader::Item->new(entry => $entry, filter => $filter); |
464
|
|
|
|
|
|
|
return $item; |
465
|
|
|
|
|
|
|
} |
466
|
|
|
|
|
|
|
|
467
|
|
|
|
|
|
|
1; |