VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/html/libs/absol-full/dist/js/mdls__absol-acomp__js__dynamictable__DTHead.js
/*** module: node_modules/absol-acomp/js/dynamictable/DTHead.js ***/
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _DTHeadRow = _interopRequireDefault(require("./DTHeadRow"));

var _ACore = require("../../ACore");


/***
 *
 * @param {DTTable} table
 * @param {} data
 * @constructor
 */
function DTHead(table, data) {
  if (!data) data = {};
  if (!data.rows) data.rows = [];
  this.table = table;
  this._elt = null;
  this._copyElt = null;
  this._fixedXYElt = null;
  this._fixedXElt = null;
  this.data = data;
  this.rows = this.data.rows.map(rowData => new _DTHeadRow.default(this, rowData));
  this.makeCellIdx();
}

DTHead.prototype.makeCellIdx = function () {
  var height = Array(200).fill(0);
  var i, j, k, row, cells, colIdx, cell, colspan, rowspan;

  for (i = 0; i < this.rows.length; ++i) {
    row = this.rows[i];
    cells = row.cells;
    colIdx = 0;

    for (j = 0; j < cells.length; ++j) {
      while (height[colIdx] > i) ++colIdx;

      cell = cells[j];
      cell.idx = colIdx;
      colspan = cell.colspan;
      rowspan = cell.rowspan;

      if (rowspan === this.rows.length) {
        cell.elt.addClass('as-matched-head-height');
      }

      for (k = 0; k < colspan; ++k) {
        height[colIdx] = i + rowspan;
        ++colIdx;
      }
    }
  }
};

DTHead.prototype.lockWidth = function () {
  this.rows.forEach(r => r.lockWidth());
};

DTHead.prototype.updateCopyEltSize = function () {
  if (!this._copyElt) return;
  this.rows.forEach(r => r.updateCopyEltSize());
};

Object.defineProperty(DTHead.prototype, 'elt', {
  get: function () {
    if (this._elt) return this._elt;
    this._elt = (0, _ACore._)({
      tag: 'thead',
      class: 'as-dt-header',
      child: this.rows.map(r => r.elt)
    });
    if (this.data.style) this._elt.addStyle(this.data.style);
    return this._elt;
  }
});
Object.defineProperty(DTHead.prototype, 'copyElt', {
  get: function () {
    if (this._copyElt) return this._copyElt;
    this._copyElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      child: this.rows.map(r => r.copyElt)
    });
    return this._copyElt;
  }
});
Object.defineProperty(DTHead.prototype, 'fixedXYElt', {
  get: function () {
    if (this._fixedXYElt) return this._fixedXYElt;
    this._fixedXYElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      class: 'as-dt-fixed-xy',
      child: this.rows.map(r => r.fixedXYElt)
    });
    return this._fixedXYElt;
  }
});
Object.defineProperty(DTHead.prototype, 'fixedXElt', {
  get: function () {
    if (this._fixedXElt) return this._fixedXElt;
    this._fixedXElt = (0, _ACore._)({
      elt: this.elt.cloneNode(false),
      class: 'as-dt-fixed-x',
      child: this.rows.map(r => r.fixedXElt)
    });
    return this._fixedXElt;
  }
});
Object.defineProperty(DTHead.prototype, 'adapter', {
  get: function () {
    return this.table.wrapper.adapter;
  }
});
var _default = DTHead;
exports.default = _default;

VaKeR 2022