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-form__js__components__TreeTable.js
/*** module: node_modules/absol-form/js/components/TreeTable.js ***/
"use strict";

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

var _ScalableComponent = _interopRequireDefault(require("../core/ScalableComponent"));

var _FCore = require("../core/FCore");

var _DomSignal = _interopRequireDefault(require("absol/src/HTML5/DomSignal"));

var _inheritComponentClass = _interopRequireDefault(require("../core/inheritComponentClass"));

var _Assembler = require("../core/Assembler");

var _TreeTable = _interopRequireDefault(require("absol-acomp/js/treetable/TreeTable"));


/***
 * @extends ScalableComponent
 * @constructor
 */
function TreeTable() {
  _ScalableComponent.default.call(this);

  this._adapter = {};
}

(0, _inheritComponentClass.default)(TreeTable, _ScalableComponent.default);
TreeTable.prototype.tag = 'TreeTable';
TreeTable.prototype.menuIcon = 'span.mdi.mdi-table';

TreeTable.prototype.render = function () {
  return (0, _FCore._)({
    tag: _TreeTable.default
  });
};

TreeTable.prototype.attributes.propertyNames = ['sample_data'];
TreeTable.prototype.attributes.propertyDescriptors = {
  'sample_data': {
    type: 'text',
    text: 'Dữ liệu mẫu'
  }
};
TreeTable.prototype.attributes.records = [{}, {}];
TreeTable.prototype.attributeHandlers.propertyNames = {
  set: function (value, ref) {
    ref.set(value);

    this._updateContent();

    return value;
  }
};
TreeTable.prototype.attributeHandlers.propertyDescriptors = {
  set: function (value, ref) {
    ref.set(value);

    this._updateContent();

    return value;
  }
};
TreeTable.prototype.attributeHandlers.records = {
  set: function (value, ref) {
    value = value || [];
    ref.set(value);

    this._updateContent();

    return value;
  }
};
TreeTable.prototype.pinHandlers.records = {
  receives: function (value) {
    this.attributes.records = value;
  },
  descriptor: {
    type: 'object[]'
  }
};

TreeTable.prototype._updateContent = function () {
  var propertyDescriptors = this.attributes.propertyDescriptors;
  var propertyNames = this.attributes.propertyNames;
  var records = this.attributes.records;

  if (propertyDescriptors && propertyNames && records) {
    this.domElt.adapter = {
      type: 'struct',
      treeBy: this.attributes.treeBy || propertyNames[0],
      propertyNames: propertyNames,
      propertyDescriptors: propertyDescriptors,
      records: records
    };
  }
};

TreeTable.prototype.createDataBindingDescriptor = function () {
  var thisTI = this;
  var props = {};
  Object.defineProperties(props, {
    propertyNames: {
      enumerable: true,
      set: function (pnA) {
        thisTI.setAttribute('propertyNames', pnA);
      },
      get: function () {
        return thisTI.getAttribute('propertyNames');
      }
    },
    propertyDescriptors: {
      enumerable: true,
      set: function (pdO) {
        thisTI.setAttribute('propertyDescriptors', pdO);
      },
      get: function () {
        return thisTI.getAttribute('propertyDescriptors');
      }
    },
    records: {
      enumerable: true,
      set: function (records) {
        thisTI.setAttribute('records', records);
      },
      get: function () {
        return thisTI.getAttribute('records');
      }
    }
  });
  return {
    enumerable: true,
    set: function (value) {
      Object.assign(props, value);
    },
    get: function () {
      return props;
    }
  };
};

_Assembler.AssemblerInstance.addClass(TreeTable);

var _default = TreeTable;
exports.default = _default;

VaKeR 2022