![]() 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-form/js/components/DualComboBox.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _FCore = _interopRequireDefault(require("../core/FCore")); var _ScalableComponent = _interopRequireDefault(require("../core/ScalableComponent")); var _ComboBox = _interopRequireDefault(require("./ComboBox")); var _inheritComponentClass = _interopRequireDefault(require("../core/inheritComponentClass")); var _InputAttributeHandlers = _interopRequireWildcard(require("./handlers/InputAttributeHandlers")); var _Assembler = require("../core/Assembler"); var _DomSignal = _interopRequireDefault(require("absol/src/HTML5/DomSignal")); var _InputStyleHandlers = _interopRequireDefault(require("./handlers/InputStyleHandlers")); var _ = _FCore.default._; /*** * @extends ScalableComponent * @constructor */ function DualComboBox() { _ScalableComponent.default.call(this); } (0, _inheritComponentClass.default)(DualComboBox, _ScalableComponent.default); DualComboBox.prototype.tag = "DualComboBox"; DualComboBox.prototype.menuIcon = 'span.mdi.mdi-chevron-double-down'; Object.assign(DualComboBox.prototype.attributeHandlers, _InputAttributeHandlers.default); Object.assign(DualComboBox.prototype.styleHandlers, _InputStyleHandlers.default); DualComboBox.prototype.style.vAlign = 'center'; DualComboBox.prototype.style.display = 'inline-block'; DualComboBox.prototype.attributeHandlers.value = { set: function (value) { var prev = (this.domElt.value || [null, null]).join('/'); this.domElt.value = value; var cur = (this.domElt.value || [null, null]).join('/'); if (prev !== cur) { this.pinFire('value'); this.notifyChange(); } }, get: function () { return this.domElt.value; } }; DualComboBox.prototype.attributeHandlers.searchable = _ComboBox.default.prototype.attributeHandlers.searchable; DualComboBox.prototype.attributeHandlers.enableSearch = _ComboBox.default.prototype.attributeHandlers.enableSearch; DualComboBox.prototype.attributeHandlers.strictValue = _ComboBox.default.prototype.attributeHandlers.strictValue; DualComboBox.prototype.attributeHandlers.treeList = Object.assign({}, _ComboBox.default.prototype.attributeHandlers.list, { set: function (items) { var prev = (this.domElt.value || [null, null]).join('/'); this.domElt.items = items; var cur = (this.domElt.value || [null, null]).join('/'); if (prev !== cur) { this.pinFire('value'); this.notifyChange(); } }, descriptor: { type: 'SelectTreeList' }, export: function () { var treeList = this.domElt.items; return treeList.map(function copyItem(item) { var newItem = { value: item.value, text: item.text }; if (item.items && item.items.length) newItem.items = item.items.map(copyItem); return newItem; }); } }); DualComboBox.prototype.pinHandlers.treeList = { receives: function (value) { this.attributes.treeList = value; }, descriptor: { type: 'SelectTreeList' } }; DualComboBox.prototype.pinHandlers.value = _ComboBox.default.prototype.pinHandlers.value; DualComboBox.prototype.onCreate = function () { _ScalableComponent.default.prototype.onCreate.call(this); }; DualComboBox.prototype.onCreated = function () { _ScalableComponent.default.prototype.onCreated.call(this); var self = this; if (!this.domElt.domSignal) { this.domElt.$domSignal = _('attachhook').addTo(this.domElt); this.domElt.domSignal = new _DomSignal.default(this.domElt.$domSignal); } this.domSignal = this.domElt.domSignal; this.domSignal.on('pinFireAll', this.pinFireAll.bind(this)); this.view.on('change', function () { self.pinFire('value'); self.notifyChange(); }); }; DualComboBox.prototype.render = function () { return _('dualselectmenu'); }; DualComboBox.prototype.measureMinSize = function () { var minWidthStyle = this.domElt ? parseFloat(this.domElt.getComputedStyleValue('min-width').replace('px')) : 24; return { width: Math.max(minWidthStyle, 24), height: 25 }; }; DualComboBox.prototype.createDataBindingDescriptor = function () { var thisC = this; var subObj = {}; Object.defineProperties(subObj, { value: { configurable: true, enumerable: true, set: function (value) { thisC.setAttribute('value', value); }, get: function () { return thisC.getAttribute('value'); } }, treeList: { enumerable: false, configurable: true, get: function () { return thisC.getAttribute('treeList'); }, set: function (value) { thisC.setAttribute('treeList', value); } } }); return { set: function (value) { Object.assign(subObj, value); }, get: function () { return subObj; } }; }; _Assembler.AssemblerInstance.addClass(DualComboBox); var _default = DualComboBox; exports.default = _default;