![]() 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/TimeRange24Input.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _FCore = require("../core/FCore"); var _inheritComponentClass = _interopRequireDefault(require("../core/inheritComponentClass")); var _ScalableComponent = _interopRequireDefault(require("../core/ScalableComponent")); var _Assembler = require("../core/Assembler"); var _datetime = require("absol/src/Time/datetime"); var _InputStyleHandlers = _interopRequireDefault(require("./handlers/InputStyleHandlers")); var _InputAttributeHandlers = _interopRequireDefault(require("./handlers/InputAttributeHandlers")); /*** * @extends ScalableComponent * @constructor */ function TimeRange24Input() { _ScalableComponent.default.apply(this, arguments); } (0, _inheritComponentClass.default)(TimeRange24Input, _ScalableComponent.default); TimeRange24Input.prototype.tag = 'TimeRange24Input'; TimeRange24Input.prototype.menuIcon = 'span.mdi.mdi-timelapse'; TimeRange24Input.prototype.style.vAlign = 'center'; TimeRange24Input.prototype.style.display = 'inline-block'; TimeRange24Input.prototype.render = function () { return (0, _FCore._)('timerange24input'); }; TimeRange24Input.prototype.measureMinSize = function () { return { height: 30, width: 318 }; }; TimeRange24Input.prototype.onCreated = function () { _ScalableComponent.default.prototype.onCreated.apply(this, arguments); var self = this; this.domElt.on('change', function (event) { if (self.pinHandlers[event.property]) self.pinFire(event.property); self.pinFire('value'); self.notifyChange(); }); }; Object.assign(TimeRange24Input.prototype.styleHandlers, _InputStyleHandlers.default); Object.assign(TimeRange24Input.prototype.attributeHandlers, _InputAttributeHandlers.default); TimeRange24Input.prototype.attributeHandlers.dayOffset = { set: function (value) { var prev = this.domElt.dayOffset; this.domElt.dayOffset = value; if (prev !== this.domElt.dayOffset) { this.pinFire('dayOffset'); this.pinFire('value'); } }, get: function () { return this.domElt.dayOffset; }, descriptor: { type: 'number', min: 0, max: _datetime.MILLIS_PER_DAY } }; TimeRange24Input.prototype.attributeHandlers.duration = { set: function (value) { var prev = this.domElt.duration; this.domElt.duration = value; if (prev !== this.domElt.duration) { this.pinFire('duration'); this.pinFire('value'); this.notifyChange(); } }, get: function () { return this.domElt.duration; }, descriptor: { type: 'number', min: 0, max: _datetime.MILLIS_PER_DAY } }; TimeRange24Input.prototype.attributeHandlers.notNull = { set: function (value) { this.domElt.notNull = !!value; }, get: function () { return this.domElt.notNull; }, export: function () { if (this.domElt.notNull) return undefined; return this.domElt.notNull; }, descriptor: { type: 'bool' } }; TimeRange24Input.prototype.pinHandlers.duration = { get: function () { return this.attributes.duration; }, receives: function (value) { this.attributes.duration = value; }, descriptor: { type: 'number' } }; TimeRange24Input.prototype.pinHandlers.dayOffset = { get: function () { return this.attributes.dayOffset; }, receives: function (value) { this.attributes.dayOffset = value; }, descriptor: { type: 'number' } }; TimeRange24Input.prototype.pinHandlers.value = { get: function () { return { dayOffset: this.attributes.dayOffset, duration: this.attributes.duration }; }, receives: function (value) { value = value || {}; if ('dayOffset' in value) { this.attributes.dayOffset = value.dayOffset; } if ('duration' in value) { this.attributes.duration = value.duration; } }, descriptor: { type: 'object' } }; //mock attribute ['minStart', 'maxStart', 'minEnd', 'maxEnd', 'minDuration', 'maxDuration'].forEach(name => { TimeRange24Input.prototype.attributeHandlers[name] = { descriptor: { type: 'number' } }; TimeRange24Input.prototype.pinHandlers[name] = { receives: function (value) { this.attributes[name] = value; } }; }); TimeRange24Input.prototype.createDataBindingDescriptor = function () { var self = this; var subObj = {}; Object.defineProperties(subObj, { dayOffset: { set: function (value) { self.attributes.dayOffset = value; }, get: function () { return self.attributes.dayOffset; }, configurable: true, enumerable: true }, duration: { set: function (value) { self.attributes.duration = value; }, get: function () { return self.attributes.duration; }, configurable: true, enumerable: true } }); return { set: function (props) { props = props || {}; if ('dayOffset' in props) subObj.dayOffset = props.dayOffset; if ('duration' in props) subObj.duration = props.duration; }, get: function () { return subObj; } }; }; _Assembler.AssemblerInstance.addClass(TimeRange24Input); var _default = TimeRange24Input; exports.default = _default;