1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- "use strict";
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _react = _interopRequireDefault(require("react"));
- var _Logger = _interopRequireDefault(require("./Logger"));
- var _Module = _interopRequireDefault(require("../modules/Module"));
- var _Service = _interopRequireDefault(require("../modules/Service"));
- var _Systems = _interopRequireDefault(require("./Systems"));
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
- function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
- var Import =
- /*#__PURE__*/
- function () {
- function Import() {
- _classCallCheck(this, Import);
- }
- _createClass(Import, [{
- key: "import",
- value: function _import(obj, namespace) {
- for (var i in obj) {
- if (obj[i].prototype instanceof _Service.default) {
- if (namespace) obj[i].Namespace = namespace;
- _Systems.default.addService(obj[i]);
- } else if (obj[i].prototype instanceof _Module.default) {
- if (namespace) obj[i].Namespace = namespace;
- _Systems.default.addModule(obj[i]);
- } else if (_typeof(obj[i]) === "object") {
- this.import(obj[i], namespace);
- }
- }
- }
- }]);
- return Import;
- }();
- var _default = new Import();
- exports.default = _default;
|