|
1 | 1 | { |
2 | 2 | "name": "monoco", |
3 | | - "version": "0.5.6", |
| 3 | + "version": "0.6.0", |
4 | 4 | "description": "A Model and a NoSQL Database for Components", |
5 | 5 | "_id": "e89c617b6b15d24", |
6 | 6 | "types": { |
|
160 | 160 | "_id": "1aaee1e6311ff39", |
161 | 161 | "component": "monoco", |
162 | 162 | "state": "load", |
163 | | - "action": "function load(url, async) { var xhr = null, callbackLoad = null; xhr = new XMLHttpRequest(); callbackLoad = function callbackLoad(system) { var sysId = $db.system(system); var sys = $component.get(sysId); var systems = document.querySelectorAll('link[rel=system]'); if (sys) { sys.main(); } if (systems.length + 1 === $db.MonocoSystem.count() ) { $component.get('monoco').ready(); } }; if (async) { xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (xhr.status === 200) { callbackLoad(JSON.parse(xhr.response)); } } }; xhr.send(null); } else { xhr.open('GET', url, false); xhr.send(null); if (xhr.status === 200) { callbackLoad(JSON.parse(xhr.response)); } }}", |
| 163 | + "action": "function load(url, async) { var xhr = null, callbackLoad = null; xhr = new XMLHttpRequest(); callbackLoad = function callbackLoad(system) { var sysId = $db.system(system); var sys = $component.get(sysId); var systems = document.querySelectorAll('link[rel=system]'); if (sys) { sys.main(); } if (systems.length + 1 === $db.MonocoSystem.count() ) { $component.get('monoco').ready(); } }; if (async) { xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (xhr.readyState === 4) { if (xhr.status === 200) { callbackLoad(JSON.parse(xhr.response)); } } }; xhr.send(null); } else { xhr.open('GET', url, false); xhr.send(null); if (xhr.status === 200) { callbackLoad(JSON.parse(xhr.response)); } }}", |
164 | 164 | "core": true, |
165 | 165 | "useCoreAPI": true |
166 | 166 | }, |
167 | 167 | "1f6001773a18791": { |
168 | 168 | "_id": "1f6001773a18791", |
169 | 169 | "component": "e89c617b6b15d24", |
170 | 170 | "state": "main", |
171 | | - "action": "function main() { var systems = [], system = null, i = 0, length = 0; if (typeof document !== 'undefined') { systems = document.querySelectorAll('link[rel=system]'); length = systems.length; for (i = 0; i < length; i++) { system = systems[i]; if (system.getAttribute('async') === 'true') { this.require('monoco').load(system.href, true); } else { this.require('monoco').load(system.href, false); } } }}", |
| 171 | + "action": "function main() { var systems = [], system = null, i = 0, length = 0; if (typeof document !== 'undefined') { systems = document.querySelectorAll('link[rel=system]'); length = systems.length; for (i = 0; i < length; i++) { system = systems[i]; if (system.getAttribute('async') === 'true') { this.require('monoco').load(system.href, true); } else { this.require('monoco').load(system.href, false); } } if (length === 0) { this.require('monoco').ready(); } }}", |
172 | 172 | "core": true |
173 | 173 | }, |
174 | | - "1844f1170f10a93": { |
175 | | - "_id": "1844f1170f10a93", |
| 174 | + "15e971f11b1f29a": { |
| 175 | + "_id": "15e971f11b1f29a", |
176 | 176 | "component": "Monoco", |
177 | 177 | "state": "error", |
178 | 178 | "action": "function error(data) { console.error('monoco: ' + data.message, data.error); }", |
179 | 179 | "core": true |
180 | 180 | }, |
181 | | - "1cd211e37314cc4": { |
182 | | - "_id": "1cd211e37314cc4", |
| 181 | + "1e59310557166fa": { |
| 182 | + "_id": "1e59310557166fa", |
183 | 183 | "component": "Monoco", |
184 | 184 | "state": "find", |
185 | 185 | "action": "function find(Class, query) { return $component.find(Class, query);}", |
186 | 186 | "core": true, |
187 | 187 | "useCoreAPI": true |
188 | 188 | }, |
189 | | - "1b1af1f1b614180": { |
190 | | - "_id": "1b1af1f1b614180", |
| 189 | + "15c3714e8d1f823": { |
| 190 | + "_id": "15c3714e8d1f823", |
191 | 191 | "component": "Monoco", |
192 | 192 | "state": "system", |
193 | 193 | "action": "function system(name) { var System = null, system = {}, result = [], conf = {}; if (name) { conf.master = true; conf.name = name; System = this.require('MonocoSystem'); system = new System(conf); } else { result = this.find('MonocoSystem', {'master': true}); if (result.length) { system = result[0]; } } return system; }", |
194 | 194 | "core": true |
195 | 195 | }, |
196 | | - "194e5100081648c": { |
197 | | - "_id": "194e5100081648c", |
| 196 | + "1d029183b812ac2": { |
| 197 | + "_id": "1d029183b812ac2", |
198 | 198 | "component": "Monoco", |
199 | 199 | "state": "warning", |
200 | 200 | "action": "function warning(message) { console.warn('monoco: ' + message); }", |
201 | 201 | "core": true |
202 | 202 | }, |
203 | | - "1ed0e1d05610cae": { |
204 | | - "_id": "1ed0e1d05610cae", |
| 203 | + "1263c12ca818e51": { |
| 204 | + "_id": "1263c12ca818e51", |
205 | 205 | "component": "MonocoChannel", |
206 | 206 | "state": "listen", |
207 | 207 | "action": "function listen(event, action) { $channel.listen(event, action); }", |
208 | 208 | "core": true, |
209 | 209 | "useCoreAPI": true |
210 | 210 | }, |
211 | | - "14a051726e1f251": { |
212 | | - "_id": "14a051726e1f251", |
| 211 | + "170241a1521fd56": { |
| 212 | + "_id": "170241a1521fd56", |
213 | 213 | "component": "MonocoChannel", |
214 | 214 | "state": "send", |
215 | 215 | "action": "function send(message) { return $channel.send(message); }", |
216 | 216 | "core": true, |
217 | 217 | "useCoreAPI": true |
218 | 218 | }, |
219 | | - "167981ac281700a": { |
220 | | - "_id": "167981ac281700a", |
| 219 | + "104901f13318a98": { |
| 220 | + "_id": "104901f13318a98", |
221 | 221 | "component": "MonocoClassInfo", |
222 | 222 | "state": "collection", |
223 | 223 | "action": "function collection(name) { var result = {}; if (this.metamodel()[name] === 'collection') { result = this.model()[name]; } return result; }", |
224 | 224 | "core": true |
225 | 225 | }, |
226 | | - "169ca13ac7193e6": { |
227 | | - "_id": "169ca13ac7193e6", |
| 226 | + "1eed818e7c1a394": { |
| 227 | + "_id": "1eed818e7c1a394", |
228 | 228 | "component": "MonocoClassInfo", |
229 | 229 | "state": "collections", |
230 | 230 | "action": "function collections() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'collection') { result.push(item); } } return result; }", |
231 | 231 | "core": true |
232 | 232 | }, |
233 | | - "1e4891c025150bd": { |
234 | | - "_id": "1e4891c025150bd", |
| 233 | + "12ece10baa19e77": { |
| 234 | + "_id": "12ece10baa19e77", |
235 | 235 | "component": "MonocoClassInfo", |
236 | 236 | "state": "event", |
237 | 237 | "action": "function event(name) { var result = {}; if (this.metamodel()[name] === 'event') { result = this.model()[name]; } return result; }", |
238 | 238 | "core": true |
239 | 239 | }, |
240 | | - "138301b0b31a87d": { |
241 | | - "_id": "138301b0b31a87d", |
| 240 | + "10f5711d26199ad": { |
| 241 | + "_id": "10f5711d26199ad", |
242 | 242 | "component": "MonocoClassInfo", |
243 | 243 | "state": "events", |
244 | 244 | "action": "function events() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'event') { result.push(item); } } return result; }", |
245 | 245 | "core": true |
246 | 246 | }, |
247 | | - "1b3a11e5fb1f330": { |
248 | | - "_id": "1b3a11e5fb1f330", |
| 247 | + "13dad18466185d8": { |
| 248 | + "_id": "13dad18466185d8", |
249 | 249 | "component": "MonocoClassInfo", |
250 | 250 | "state": "method", |
251 | 251 | "action": "function method(name) { var result = {}; if (this.metamodel()[name] === 'method') { result = this.model()[name]; } return result; }", |
252 | 252 | "core": true |
253 | 253 | }, |
254 | | - "1b54f1dfbd1642a": { |
255 | | - "_id": "1b54f1dfbd1642a", |
| 254 | + "1c3c211fd31ca88": { |
| 255 | + "_id": "1c3c211fd31ca88", |
256 | 256 | "component": "MonocoClassInfo", |
257 | 257 | "state": "methods", |
258 | 258 | "action": "function methods() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'method') { result.push(item); } } return result; }", |
259 | 259 | "core": true |
260 | 260 | }, |
261 | | - "1d84c124b917568": { |
262 | | - "_id": "1d84c124b917568", |
| 261 | + "17e671ae7f17a5d": { |
| 262 | + "_id": "17e671ae7f17a5d", |
263 | 263 | "component": "MonocoClassInfo", |
264 | 264 | "state": "properties", |
265 | 265 | "action": "function properties() { var keys = Object.keys(this.metamodel()), item = '', result = [], i = 0, length = 0; length = keys.length; for (i = 0; i < length; i++) { item = keys[i]; if (this.metamodel()[item] === 'property') { result.push(item); } } return result; }", |
266 | 266 | "core": true |
267 | 267 | }, |
268 | | - "15ea51c0411fa04": { |
269 | | - "_id": "15ea51c0411fa04", |
| 268 | + "158e410c821e40b": { |
| 269 | + "_id": "158e410c821e40b", |
270 | 270 | "component": "MonocoClassInfo", |
271 | 271 | "state": "property", |
272 | 272 | "action": "function property(name) { var result = {}; if (this.metamodel()[name] === 'property') { result = this.model()[name]; } return result; }", |
273 | 273 | "core": true |
274 | 274 | }, |
275 | | - "10d1e190141273c": { |
276 | | - "_id": "10d1e190141273c", |
| 275 | + "178a7147dc16000": { |
| 276 | + "_id": "178a7147dc16000", |
277 | 277 | "component": "MonocoComponent", |
278 | 278 | "state": "destroy", |
279 | 279 | "action": "function destroy() { $component.destroy(this.id()); }", |
280 | 280 | "core": true, |
281 | 281 | "useCoreAPI": true |
282 | 282 | }, |
283 | | - "1a9e81c3d814c37": { |
284 | | - "_id": "1a9e81c3d814c37", |
| 283 | + "174091912d19d67": { |
| 284 | + "_id": "174091912d19d67", |
285 | 285 | "component": "MonocoComponent", |
286 | 286 | "state": "off", |
287 | 287 | "action": "function off(state, behaviorId) { var args = [], i = 0, length = 0; length = arguments.length; for (i = 0; i < length - 7; i++) { args.push(arguments[i]); } if ($workflow.checkParams({\"component\": this, \"methodName\": \"off\", \"args\": args})) { if ($metamodel.isValidState(state, this.constructor.name)) {$behavior.remove({\"behaviorId\": behaviorId, \"componentId\": this.id(), \"state\": state}); } else { $helper.getMonoco().warning({ \"message\":\"invoke 'off' method of component '\" + this.id() + \"' with an invalid state '\" + state + \"'\"}); } } }", |
288 | 288 | "core": true, |
289 | 289 | "useCoreAPI": true |
290 | 290 | }, |
291 | | - "1587213672157db": { |
292 | | - "_id": "1587213672157db", |
| 291 | + "15d81160c412056": { |
| 292 | + "_id": "15d81160c412056", |
293 | 293 | "component": "MonocoComponent", |
294 | 294 | "state": "require", |
295 | 295 | "action": "function require(id) { return $component.get(id); }", |
296 | 296 | "core": true, |
297 | 297 | "useCoreAPI": true |
298 | 298 | }, |
299 | | - "116291dd081fe35": { |
300 | | - "_id": "116291dd081fe35", |
| 299 | + "1359118bf5109c4": { |
| 300 | + "_id": "1359118bf5109c4", |
301 | 301 | "component": "MonocoDatabase", |
302 | 302 | "state": "subsystem", |
303 | 303 | "action": "function subsystem(params) { return $db.subsystem(params); }", |
304 | 304 | "core": true, |
305 | 305 | "useCoreAPI": true |
306 | 306 | }, |
307 | | - "142b51c0761b94f": { |
308 | | - "_id": "142b51c0761b94f", |
| 307 | + "1364a11ac314806": { |
| 308 | + "_id": "1364a11ac314806", |
309 | 309 | "component": "MonocoDatabase", |
310 | 310 | "state": "system", |
311 | 311 | "action": "function system(system) { return $db.system(system); }", |
312 | 312 | "core": true, |
313 | 313 | "useCoreAPI": true |
314 | 314 | }, |
315 | | - "155981ca4315040": { |
316 | | - "_id": "155981ca4315040", |
| 315 | + "1fbbc19a501ee80": { |
| 316 | + "_id": "1fbbc19a501ee80", |
317 | 317 | "component": "MonocoMetamodel", |
318 | 318 | "state": "create", |
319 | 319 | "action": "function create() { $metamodel.create(); }", |
320 | 320 | "core": true, |
321 | 321 | "useCoreAPI": true |
322 | 322 | }, |
323 | | - "160a5177e510bb7": { |
324 | | - "_id": "160a5177e510bb7", |
| 323 | + "109861084618f2e": { |
| 324 | + "_id": "109861084618f2e", |
325 | 325 | "component": "MonocoMetamodel", |
326 | 326 | "state": "schema", |
327 | 327 | "action": "function schema(schema) { $metamodel.schema(schema); }", |
328 | 328 | "core": true, |
329 | 329 | "useCoreAPI": true |
330 | 330 | }, |
331 | | - "152c5102e91d05d": { |
332 | | - "_id": "152c5102e91d05d", |
| 331 | + "104bc117281df7a": { |
| 332 | + "_id": "104bc117281df7a", |
333 | 333 | "component": "MonocoMetamodel", |
334 | 334 | "state": "type", |
335 | 335 | "action": "function type(type) { $metamodel.type(type); }", |
336 | 336 | "core": true, |
337 | 337 | "useCoreAPI": true |
338 | 338 | }, |
339 | | - "1bf0c1f1a414068": { |
340 | | - "_id": "1bf0c1f1a414068", |
| 339 | + "189ae1ab3d1f380": { |
| 340 | + "_id": "189ae1ab3d1f380", |
341 | 341 | "component": "MonocoSystem", |
342 | 342 | "state": "sync", |
343 | 343 | "action": "function sync() { var dump = $db.dump(); this.schemas(dump.schemas); this.types(dump.types); this.behaviors(dump.behaviors); this.components(dump.components); }", |
|
349 | 349 | "Monoco": { |
350 | 350 | "monoco": { |
351 | 351 | "_id": "monoco", |
352 | | - "version": "0.5.6" |
| 352 | + "version": "0.6.0" |
353 | 353 | } |
354 | 354 | }, |
355 | 355 | "MonocoChannel": { |
|
873 | 873 | "readOnly": false, |
874 | 874 | "mandatory": true, |
875 | 875 | "default": "" |
| 876 | + }, |
| 877 | + "parameters": { |
| 878 | + "type": "object", |
| 879 | + "readOnly": false, |
| 880 | + "mandatory": false, |
| 881 | + "default": {} |
876 | 882 | } |
877 | 883 | }, |
878 | 884 | "MonocoStateSchema": { |
879 | 885 | "_id": "MonocoStateSchema", |
880 | 886 | "_name": "MonocoStateSchema", |
881 | 887 | "_core": true, |
882 | | - "name": "property" |
| 888 | + "name": "property", |
| 889 | + "parameters": "property" |
883 | 890 | }, |
884 | 891 | "MonocoSystem": { |
885 | 892 | "_id": "MonocoSystem", |
|
0 commit comments