Skip to content

Commit d4de1a3

Browse files
committed
- fix bug on system method
1 parent 2444904 commit d4de1a3

File tree

6 files changed

+145
-146
lines changed

6 files changed

+145
-146
lines changed

build/monoco-min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.js

Lines changed: 52 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/monoco.json

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -737,167 +737,167 @@
737737
"action": "function ready() { 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]; this.load(system.href, false); } } }",
738738
"core": true
739739
},
740-
"14cf31b6ed1470a": {
741-
"_id": "14cf31b6ed1470a",
740+
"104b31ed59108e8": {
741+
"_id": "104b31ed59108e8",
742742
"component": "Monoco",
743743
"state": "error",
744744
"action": "function error(data) { console.error('monoco: ' + data.message, data.error); }",
745745
"core": true
746746
},
747-
"1cda91b4c51c924": {
748-
"_id": "1cda91b4c51c924",
747+
"1dc931fa931225a": {
748+
"_id": "1dc931fa931225a",
749749
"component": "Monoco",
750750
"state": "find",
751751
"action": "function find(Class, query) { return $component.find(Class, query);}",
752752
"core": true,
753753
"useCoreAPI": true
754754
},
755-
"1815c1b1311be0b": {
756-
"_id": "1815c1b1311be0b",
755+
"11c4a183561612e": {
756+
"_id": "11c4a183561612e",
757757
"component": "Monoco",
758758
"state": "system",
759-
"action": "function system(name) { var System = null, system = {}, result = [], conf = {}; if (name) { conf.master = true; conf.name = name; System = monoco.require('MonocoSystem'); system = new System(conf); } else { result = monoco.find('MonocoSystem', {'master': true}); if (result.length) { system = result[0]; } } return system; }",
759+
"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; }",
760760
"core": true
761761
},
762-
"1b4e81f84c1d6f1": {
763-
"_id": "1b4e81f84c1d6f1",
762+
"143851b2e414fd8": {
763+
"_id": "143851b2e414fd8",
764764
"component": "Monoco",
765765
"state": "warning",
766766
"action": "function warning(message) { console.warn('monoco: ' + message); }",
767767
"core": true
768768
},
769-
"1bbb615c1315840": {
770-
"_id": "1bbb615c1315840",
769+
"1566f1061b10f32": {
770+
"_id": "1566f1061b10f32",
771771
"component": "MonocoChannel",
772772
"state": "listen",
773773
"action": "function listen(event, action) { $channel.listen(event, action); }",
774774
"core": true,
775775
"useCoreAPI": true
776776
},
777-
"169511374b1efa2": {
778-
"_id": "169511374b1efa2",
777+
"16c1f190b4152ae": {
778+
"_id": "16c1f190b4152ae",
779779
"component": "MonocoChannel",
780780
"state": "send",
781781
"action": "function send(message) { return $channel.send(message); }",
782782
"core": true,
783783
"useCoreAPI": true
784784
},
785-
"19ebb1a0fd112d6": {
786-
"_id": "19ebb1a0fd112d6",
785+
"113341c9c215054": {
786+
"_id": "113341c9c215054",
787787
"component": "MonocoClassInfo",
788788
"state": "event",
789789
"action": "function event(name) { var result = {}; if (this.metamodel()[name] === 'event') { result = this.model()[name]; } return result; }",
790790
"core": true
791791
},
792-
"1095e1b5ba1e86d": {
793-
"_id": "1095e1b5ba1e86d",
792+
"17e8f19d721b3f3": {
793+
"_id": "17e8f19d721b3f3",
794794
"component": "MonocoClassInfo",
795795
"state": "events",
796796
"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; }",
797797
"core": true
798798
},
799-
"1faad11e241b3b8": {
800-
"_id": "1faad11e241b3b8",
799+
"1d4ea12eb516e7f": {
800+
"_id": "1d4ea12eb516e7f",
801801
"component": "MonocoClassInfo",
802802
"state": "method",
803803
"action": "function method(name) { var result = {}; if (this.metamodel()[name] === 'method') { result = this.model()[name]; } return result; }",
804804
"core": true
805805
},
806-
"1e4d41bce910b1b": {
807-
"_id": "1e4d41bce910b1b",
806+
"1f5fe1892514c2a": {
807+
"_id": "1f5fe1892514c2a",
808808
"component": "MonocoClassInfo",
809809
"state": "methods",
810810
"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; }",
811811
"core": true
812812
},
813-
"1c3371348f1823c": {
814-
"_id": "1c3371348f1823c",
813+
"1eb3f1508310217": {
814+
"_id": "1eb3f1508310217",
815815
"component": "MonocoClassInfo",
816816
"state": "properties",
817817
"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; }",
818818
"core": true
819819
},
820-
"1798b16d241bba0": {
821-
"_id": "1798b16d241bba0",
820+
"130511c6491d7fe": {
821+
"_id": "130511c6491d7fe",
822822
"component": "MonocoClassInfo",
823823
"state": "property",
824824
"action": "function property(name) { var result = {}; if (this.metamodel()[name] === 'property') { result = this.model()[name]; } return result; }",
825825
"core": true
826826
},
827-
"1639c19d3311b93": {
828-
"_id": "1639c19d3311b93",
827+
"1c08718727198c5": {
828+
"_id": "1c08718727198c5",
829829
"component": "MonocoComponent",
830830
"state": "destroy",
831831
"action": "function destroy() { $component.destroy(this.id()); }",
832832
"core": true,
833833
"useCoreAPI": true
834834
},
835-
"169b61c0e41687f": {
836-
"_id": "169b61c0e41687f",
835+
"1f5cc1c7ac163cb": {
836+
"_id": "1f5cc1c7ac163cb",
837837
"component": "MonocoComponent",
838838
"state": "off",
839839
"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 + \"'\"}); } } }",
840840
"core": true,
841841
"useCoreAPI": true
842842
},
843-
"1bb3b1eb7d1240c": {
844-
"_id": "1bb3b1eb7d1240c",
843+
"1cd3710571158a8": {
844+
"_id": "1cd3710571158a8",
845845
"component": "MonocoComponent",
846846
"state": "require",
847847
"action": "function require(id) { return $component.get(id); }",
848848
"core": true,
849849
"useCoreAPI": true
850850
},
851-
"10eda1b595180eb": {
852-
"_id": "10eda1b595180eb",
851+
"1df55131b61b818": {
852+
"_id": "1df55131b61b818",
853853
"component": "MonocoDatabase",
854854
"state": "subsystem",
855855
"action": "function subsystem(params) { return $db.subsystem(params); }",
856856
"core": true,
857857
"useCoreAPI": true
858858
},
859-
"1beda1dbca157b0": {
860-
"_id": "1beda1dbca157b0",
859+
"1e51d1adba11db3": {
860+
"_id": "1e51d1adba11db3",
861861
"component": "MonocoDatabase",
862862
"state": "system",
863863
"action": "function system(system) { return $db.system(system); }",
864864
"core": true,
865865
"useCoreAPI": true
866866
},
867-
"1783614d1218496": {
868-
"_id": "1783614d1218496",
867+
"1f8c015df616e81": {
868+
"_id": "1f8c015df616e81",
869869
"component": "MonocoMetamodel",
870870
"state": "create",
871871
"action": "function create() { $metamodel.create(); }",
872872
"core": true,
873873
"useCoreAPI": true
874874
},
875-
"1ef6c1171212871": {
876-
"_id": "1ef6c1171212871",
875+
"1032c1d40910576": {
876+
"_id": "1032c1d40910576",
877877
"component": "MonocoMetamodel",
878878
"state": "schema",
879879
"action": "function schema(schema) { $metamodel.schema(schema); }",
880880
"core": true,
881881
"useCoreAPI": true
882882
},
883-
"1570715cb71d2a2": {
884-
"_id": "1570715cb71d2a2",
883+
"1d778151ad1c5f3": {
884+
"_id": "1d778151ad1c5f3",
885885
"component": "MonocoMetamodel",
886886
"state": "type",
887887
"action": "function type(type) { $metamodel.type(type); }",
888888
"core": true,
889889
"useCoreAPI": true
890890
},
891-
"1411911749123d1": {
892-
"_id": "1411911749123d1",
891+
"1f88f1e35011256": {
892+
"_id": "1f88f1e35011256",
893893
"component": "MonocoSystem",
894894
"state": "sync",
895895
"action": "function sync() { var dump = $db.dump(); this.schemas(dump.schemas); this.types(dump.types); this.behaviors(dump.behaviors); this.components(dump.components); }",
896896
"core": true,
897897
"useCoreAPI": true
898898
},
899-
"112c61db7d10eef": {
900-
"_id": "112c61db7d10eef",
899+
"1ee76171d716cbb": {
900+
"_id": "1ee76171d716cbb",
901901
"component": "e89c617b6b15d24",
902902
"state": "main",
903903
"action": "function main() { var monoco = $component.get('monoco'); monoco.ready(); }",

0 commit comments

Comments
 (0)