UNPKG

@true-directive/base

Version:

The set of base classes for the TrueDirective Grid

40 lines (39 loc) 1.32 kB
/** * Copyright (c) 2018-2019 Aleksey Melnikov, True Directive Company. * @link https://truedirective.com/ * @license MIT */ /** * Custom injection consumer */ var AxInjectConsumer = /** @class */ (function () { function AxInjectConsumer() { } AxInjectConsumer.prototype.updateInjections = function () { var _this = this; var registeredHandlers = this['handlers']; var hs = this.__ax_hta; Object.keys(hs).forEach(function (key) { var h = registeredHandlers[key]; var prop = hs[key]; if (h && !_this[prop]) { _this[prop] = new h(); } }); Object.keys(hs).forEach(function (key) { var prop = hs[key]; // Это детки текущего var h = _this[prop]; if (h && h['__ax_hta']) { Object.keys(h['__ax_hta']).forEach(function (childKey) { // Это детки этого дитятки var prop2 = h['__ax_hta'][childKey]; var prop3 = _this['__ax_hta'][childKey]; h[prop2] = _this[prop3]; }); } }); }; return AxInjectConsumer; }()); export { AxInjectConsumer };