UNPKG

react-application-core

Version:

A react-based application core for the business applications.

33 lines 1.21 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TabUtils = void 0; var select_1 = require("./select"); var cond_1 = require("./cond"); /** * @stable [29.07.2020] * @param activeValueHolderEntity * @param tabEntity */ var isTabActive = function (activeValueHolderEntity, tabEntity) { return cond_1.ConditionUtils.ifNotNilThanValue(activeValueHolderEntity, function () { return (cond_1.ConditionUtils.ifNotNilThanValue(activeValueHolderEntity.activeValue, function (activeValue) { return activeValue === tabEntity.value; }, !!tabEntity.active)); }, false); }; /** * @stable [29.07.2020] * @param tabPanelHolderEntity * @param tabEntity */ var isTabHolderActive = function (tabPanelHolderEntity, tabEntity) { return isTabActive(select_1.Selectors.tabPanel(tabPanelHolderEntity), tabEntity); }; /** * @stable [17.05.2020] */ var TabUtils = /** @class */ (function () { function TabUtils() { } TabUtils.isActive = isTabActive; /* @stable [17.05.2020] */ TabUtils.isHolderActive = isTabHolderActive; /* @stable [17.05.2020] */ return TabUtils; }()); exports.TabUtils = TabUtils; //# sourceMappingURL=tab.js.map