react-application-core
Version:
A react-based application core for the business applications.
69 lines • 2.51 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseRootContainer = void 0;
var generic_container_1 = require("../../component/base/generic.container");
var root_interface_1 = require("./root.interface");
var util_1 = require("../../util");
var BaseRootContainer = /** @class */ (function (_super) {
__extends(BaseRootContainer, _super);
/**
* @stable [16.11.2019]
* @param {IBaseRootContainerProps} props
*/
function BaseRootContainer(props) {
var _this = _super.call(this, props) || this;
if (util_1.TypeUtils.isFn(props.beforeEnter)) {
props.beforeEnter();
}
return _this;
}
/**
* @stable [16.11.2019]
*/
BaseRootContainer.prototype.componentDidMount = function () {
if (util_1.TypeUtils.isFn(this.props.afterEnter)) {
this.props.afterEnter();
}
};
Object.defineProperty(BaseRootContainer.prototype, "routeParams", {
/**
* @stable [16.11.2019]
* @returns {IKeyValue}
*/
get: function () {
return this.props.computedMatch.params;
},
enumerable: false,
configurable: true
});
Object.defineProperty(BaseRootContainer.prototype, "queryParams", {
/**
* @stable [16.11.2019]
* @returns {URLSearchParams}
*/
get: function () {
return util_1.getURLSearchParams(this.props.location.search);
},
enumerable: false,
configurable: true
});
BaseRootContainer.defaultProps = {
sectionName: root_interface_1.ROOT_SECTION,
};
return BaseRootContainer;
}(generic_container_1.GenericContainer));
exports.BaseRootContainer = BaseRootContainer;
//# sourceMappingURL=base-root.container.js.map