![]() 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-acomp/js/dualselectmenu/DSMPropsHandlers.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _utils = require("../utils"); var _VarScope = _interopRequireDefault(require("absol/src/AppPattern/VarScope")); var DSMPropsHandlers = {}; DSMPropsHandlers.isFocus = { set: function (value) { if (this.disabled || this.readOnly) value = false; value = !!value; if (value === this.hasClass('as-focus')) return; if (value) { this.savedValue = this.$box.value; this.addClass('as-focus'); this.boxCtrl.onFocus(); } else { this.removeClass('as-focus'); this.boxCtrl.onBlur(); this.updateText(); if ((0, _utils.keyStringOf)(this.savedValue) !== (0, _utils.keyStringOf)(this.$box.value)) { delete this.savedValue; this.notifyChange(); } } }, get: function () { return this.hasClass('as-focus'); } }; DSMPropsHandlers.items = { set: function (items) { this.$box.items = items; if ('pendingValue' in this) { this.$box.value = this.pendingValue; } this.updateText(); }, get: function () { return this.$box.items; } }; DSMPropsHandlers.value = { set: function (value) { this.pendingValue = value; this.$box.value = value; this.updateText(); }, get: function () { if (!this.strictValue && 'pendingValue' in this) { return this.pendingValue; } var value = this.$box.value; var selectedItem = this.$box.selectedItem; if (!selectedItem || !selectedItem[0] || !selectedItem[1]) return null; return value; } }; DSMPropsHandlers.format = { set: function (value) { this.attr('data-format', value); this.updateText(); }, get: function () { return this.attr('data-format') || '$0, $1'; } }; DSMPropsHandlers.strictValue = { set: function (value) { this.$box.strictValue = value; if (value) { this.addClass('as-strict-value'); } else { this.removeClass('as-strict-value'); } }, get: function () { return this.$box.strictValue; } }; DSMPropsHandlers.disabled = { set: function (value) { if (value) { this.addClass('as-disabled'); } else { this.removeClass('as-disabled'); } }, get: function () { return this.hasClass('as-disabled'); } }; DSMPropsHandlers.readOnly = { set: function (value) { if (value) { this.addClass('as-read-only'); } else { this.removeClass('as-read-only'); } }, get: function () { return this.hasClass('as-read-only'); } }; var _default = DSMPropsHandlers; exports.default = _default;