UNPKG

coreui

Version:

Platform Core UI

51 lines (47 loc) 1.98 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _base = require("coreui/lib/base"); var C = _base.ResizableBase.C; var D = _base.ResizableBase.D; var E = _base.ResizableBase.E; var Mh = _base.ResizableBase.Mh; var Q = _base.ResizableBase.Q; var React = _base.ResizableBase.React; var V = _base.ResizableBase.V; var Yl = _base.ResizableBase.Yl; var Z = _base.ResizableBase.Z; var Zi = _base.ResizableBase.Zi; var ia = _base.ResizableBase.ia; var ki = _base.ResizableBase.ki; var mm = _base.ResizableBase.mm; var window = _base.ResizableBase.window; var xi = _base.ResizableBase.xi; var yh = _base.ResizableBase.yh; var z = _base.ResizableBase.z; var zk = _base.ResizableBase.zk; var Fq = React.createClass({ displayName: "CoreUIResizable", _isMounted: null, componentWillMount: function componentWillMount() { this._isMounted = !0;return window.addEventListener("resize", Z(this, Mh)); }, componentWillUnmount: function componentWillUnmount() { this._isMounted = !1;return window.removeEventListener("resize", Z(this, Mh)); }, handleResize: function handleResize() { return this.forceUpdate(); }, render: function render() { var a = Z(this, Yl), b = Z(a, Zi), b = null != b && (b.m & 64 || b.B) ? Q(V, b) : b;z(b, zk);a = Z(a, yh);a = React.Children.only(a);b = { maxWidth: Z(window, xi), maxHeight: Z(window, ki) }; return React.cloneElement(a, b); } }), Gq = function Gq(b) { for (var c = [], d = arguments.length, e = 0;;) { if (e < d) c.push(arguments[e]), e += 1;else break; }return Gq.o(arguments[0], 1 < c.length ? new C(c.slice(1), 0) : null); };Gq.o = function (a, b) { return mm(Fq, { iProps: a }, b); };Gq.F = 1;Gq.D = function (a) { var b = D(a);a = E(a);return Gq.o(b, a); };ia("coreui.components.Resizable", Fq);ia("coreui.components.createResizable", Gq); var Resizable = coreui.components.Resizable; exports.default = Resizable; module.exports = exports['default'];