![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/libs/absol-full/dist/js/ |
Upload File : |
/*** module: node_modules/absol-acomp/js/dynamictable/DTHeadRow.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _ACore = require("../../ACore"); var _DTHeadCell = _interopRequireDefault(require("./DTHeadCell")); /**** * table layer: copyElt * fixY layer : copyElt1 - elt * fixXY layer: elt * */ /*** * * @param {DTHead} head * @param data * @constructor */ function DTHeadRow(head, data) { this.head = head; this.data = data; this.cells = this.data.cells.map(cellData => new _DTHeadCell.default(this, cellData)); this._elt = null; this._copyElt = null; this._fixedXYElt = null; this._fixedXElt = null; } DTHeadRow.prototype.updateCopyEltSize = function () { if (!this._fixedXElt) return; var bound = this._copyElt.getBoundingClientRect(); if (this._fixedXElt) this._fixedXElt.addStyle('height', bound.height + 'px'); if (this._fixedXYElt) this._fixedXYElt.addStyle('height', bound.height + 'px'); this._elt.addStyle('height', bound.height + 'px'); this.cells.forEach(c => c.updateCopyEltSize()); }; Object.defineProperty(DTHeadRow.prototype, 'elt', { get: function () { if (this._elt) return this._elt; var fixedCol = this.adapter.fixedCol || 0; var child = this.cells.filter(c => c.idx < fixedCol).map(c => c.copyElt1); var child1 = this.cells.filter(c => c.idx >= fixedCol).map(c => c.elt); this._elt = (0, _ACore._)({ tag: 'tr', class: 'as-dt-head-row', child: child.concat(child1) }); if (this.data.attr) { this.elt.attr(this.data.attr); } if (this.data.style) { this.elt.addStyle(this.data.style); } return this._elt; } }); Object.defineProperty(DTHeadRow.prototype, 'fixedXYElt', { get: function () { if (this._fixedXYElt) return this._fixedXYElt; var fixedCol = this.adapter.fixedCol || 0; this._fixedXYElt = (0, _ACore._)({ elt: this.elt.cloneNode(false), class: 'as-dt-fixed-xy', child: this.cells.filter(c => c.idx < fixedCol).map(c => c.elt) }); return this._fixedXYElt; } }); Object.defineProperty(DTHeadRow.prototype, 'fixedXElt', { get: function () { if (this._fixedXElt) return this._fixedXElt; var fixedCol = this.adapter.fixedCol || 0; this._fixedXElt = (0, _ACore._)({ elt: this.elt.cloneNode(false), class: 'as-dt-fixed-x', child: this.cells.filter(c => c.idx < fixedCol).map(c => c.copyElt2) }); return this._fixedXElt; } }); Object.defineProperty(DTHeadRow.prototype, 'copyElt', { get: function () { if (this._copyElt) return this.copyElt; var adapter = this.adapter; this._copyElt = (0, _ACore._)({ elt: this.elt.cloneNode(false), child: this.cells.map(c => c.copyElt) }); return this._copyElt; } }); Object.defineProperty(DTHeadRow.prototype, 'adapter', { get: function () { return this.head.adapter; } }); var _default = DTHeadRow; exports.default = _default;