UNPKG

react-application-core

Version:

A react-based application core for the business applications.

87 lines 3.6 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.SearchToolbarContainer = void 0; var React = require("react"); var action_1 = require("../../../action"); var generic_container_1 = require("../../base/generic.container"); var util_1 = require("../../../util"); var search_toolbar_component_1 = require("./search-toolbar.component"); /** * @component-container-impl * @stable [31.07.2020] * * Please use the "Mappers.searchToolbarContainerProps" */ var SearchToolbarContainer = /** @class */ (function (_super) { __extends(SearchToolbarContainer, _super); /** * @stable [31.07.2020] * @param props */ function SearchToolbarContainer(props) { var _this = _super.call(this, props) || this; _this.onActivate = _this.onActivate.bind(_this); _this.onApply = _this.onApply.bind(_this); _this.onChange = _this.onChange.bind(_this); _this.onDeactivate = _this.onDeactivate.bind(_this); return _this; } /** * @stable [31.07.2020] */ SearchToolbarContainer.prototype.render = function () { return (React.createElement(search_toolbar_component_1.SearchToolbar, __assign({}, util_1.Mappers.searchToolbarContainerPropsAsSearchToolbarProps(this.originalProps), { onActivate: this.onActivate, onApply: this.onApply, onChange: this.onChange, onDeactivate: this.onDeactivate }))); }; /** * @stable [31.07.2020] */ SearchToolbarContainer.prototype.onApply = function () { this.dispatchPlainAction(action_1.FilterActionBuilder.buildApplyPlainAction(this.sectionName)); }; /** * @stable [31.07.2020] */ SearchToolbarContainer.prototype.onActivate = function () { this.dispatchPlainAction(action_1.FilterActionBuilder.buildActivatePlainAction(this.sectionName)); }; /** * @stable [31.07.2020] */ SearchToolbarContainer.prototype.onDeactivate = function () { this.dispatchPlainAction(action_1.FilterActionBuilder.buildDeactivatePlainAction(this.sectionName)); }; /** * @stable [31.07.2020] * @param {string} query */ SearchToolbarContainer.prototype.onChange = function (query) { this.dispatchPlainAction(action_1.FilterActionBuilder.buildChangePlainAction(this.sectionName, query)); }; return SearchToolbarContainer; }(generic_container_1.GenericContainer)); exports.SearchToolbarContainer = SearchToolbarContainer; //# sourceMappingURL=search-toolbar.container.js.map