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-mobile__js__dom__MMatMenuButton.js
/*** module: node_modules/absol-mobile/js/dom/MMatMenuButton.js ***/
"use strict";

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

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

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

var _MMdiRect = _interopRequireDefault(require("./MMdiRect"));


var _ = _Core.default._;
var $ = _Core.default.$;

function MMatMenuButton() {
  this.$toggleIcon = $('.am-mat-menu-button-toggle-icon-ctn span.mdi.mdi-chevron-right', this);
  this.$icon = null;
  this.$iconCtn = $('.am-mat-menu-button-icon-ctn', this);
  this.$text = $('.am-mat-menu-button-text', this);
  this.icon = {
    tag: 'mmdirect',
    props: {
      iconName: "home"
    }
  };
  this._status = 'none';
  this._level = 0;
  this.$level = $('.am-mat-menu-button-level', this);
}

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

MMatMenuButton.render = function () {
  return _({
    tag: 'button',
    class: 'am-mat-menu-button',
    child: [{
      class: 'am-mat-menu-button-level'
    }, {
      class: 'am-mat-menu-button-icon-ctn'
    }, {
      tag: 'span',
      class: 'am-mat-menu-button-text',
      child: {
        text: 'Trang chá»§'
      }
    }, {
      class: 'am-mat-menu-button-toggle-icon-ctn',
      child: 'span.mdi.mdi-chevron-right'
    }]
  });
};

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

MMatMenuButton.property.level = {
  set: function (value) {
    value = Math.max(0, value || 0);
    this.$level.innerHTML = ' '.repeat(value * 4);
    this.attr('data-level', value);
  },
  get: function () {
    return this._level;
  }
};
/**
 * @type {MMatMenuButton}
*/

MMatMenuButton.property.status = {
  set: function (value) {
    this.removeClass('am-status-open').removeClass('am-status-close');

    if (value == 'open') {
      this.$toggleIcon.addClass('mdi-rotate-90');
      this.addClass('am-status-open');
    } else if (value == 'close') {
      this.$toggleIcon.removeClass('mdi-rotate-90');
      this.addClass('am-status-close');
    } else {
      value = 'none';
    }

    this._status = value;
  },
  get: function () {
    return this._status;
  }
};
/**
 * @type {MMatMenuButton}
*/

MMatMenuButton.property.icon = {
  set: function (value) {
    value = value || null;

    if (this.$icon) {
      this.$icon.remove();
    }

    if (value) {
      this.$icon = _(value).addTo(this.$iconCtn);
    }
  },
  get: function () {
    return this._icon;
  }
};
/**
 * @type {MMatMenuButton}
*/

MMatMenuButton.property.text = {
  set: function (value) {
    this.$text.firstChild.data = value;
  },
  get: function () {
    return this.$text.firstChild.data;
  }
};

_Core.default.install(MMatMenuButton);

var _default = MMatMenuButton;
exports.default = _default;

VaKeR 2022