UNPKG

react-application-core

Version:

A react-based application core for the business applications.

56 lines 3.72 kB
"use strict"; 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 __()); }; })(); var __assign = (this && this.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; Object.defineProperty(exports, "__esModule", { value: true }); exports.FlexLayout = void 0; var React = require("react"); var enhanced_generic_component_1 = require("../../base/enhanced-generic.component"); var util_1 = require("../../../util"); var definition_1 = require("../../../definition"); var FlexLayout = /** @class */ (function (_super) { __extends(FlexLayout, _super); function FlexLayout() { return _super !== null && _super.apply(this, arguments) || this; } /** * @stable [11.09.2019] * @returns {JSX.Element} */ FlexLayout.prototype.render = function () { var _a = this.originalProps, alignItemsCenter = _a.alignItemsCenter, alignItemsEnd = _a.alignItemsEnd, alignItemsStart = _a.alignItemsStart, alignItemsStretch = _a.alignItemsStretch, className = _a.className, disabled = _a.disabled, fullSize = _a.fullSize, justifyContentCenter = _a.justifyContentCenter, justifyContentEnd = _a.justifyContentEnd, justifyContentSpaceBetween = _a.justifyContentSpaceBetween, onClick = _a.onClick, style = _a.style, title = _a.title; var _b = this.mergedProps, noShrink = _b.noShrink, row = _b.row, touched = _b.touched, wrap = _b.wrap; return (React.createElement("div", __assign({ ref: this.actualRef, className: util_1.ClsUtils.joinClassName(util_1.CalcUtils.calc(className), definition_1.FlexLayoutClassesEnum.FLEX, /**/ alignItemsCenter && definition_1.FlexLayoutClassesEnum.FLEX_ALIGN_ITEMS_CENTER, alignItemsEnd && definition_1.FlexLayoutClassesEnum.FLEX_ALIGN_ITEMS_END, alignItemsStart && definition_1.FlexLayoutClassesEnum.FLEX_ALIGN_ITEMS_START, alignItemsStretch && definition_1.FlexLayoutClassesEnum.FLEX_ALIGN_ITEMS_STRETCH, fullSize && definition_1.ComponentClassesEnum.FULL_SIZE, justifyContentCenter && definition_1.FlexLayoutClassesEnum.FLEX_JUSTIFY_CONTENT_CENTER, justifyContentEnd && definition_1.FlexLayoutClassesEnum.FLEX_JUSTIFY_CONTENT_END, justifyContentSpaceBetween && definition_1.FlexLayoutClassesEnum.FLEX_JUSTIFY_CONTENT_SPACE_BETWEEN, noShrink && definition_1.FlexLayoutClassesEnum.FLEX_NO_SHRINK, wrap && definition_1.FlexLayoutClassesEnum.FLEX_WRAP, /**/ row ? 'rac-flex-row' : 'rac-flex-column', /**/ util_1.fullFlexClassName(this.props) // TODO ), title: title, style: style }, util_1.PropsUtils.buildClickHandlerProps(onClick, !util_1.CalcUtils.calc(disabled), touched)), this.originalChildren)); }; return FlexLayout; }(enhanced_generic_component_1.EnhancedGenericComponent)); exports.FlexLayout = FlexLayout; //# sourceMappingURL=flex-layout.component.js.map