PageSourceSearch

https://www.eselo.lv/static/frontend/scandipwa/theme/en_US/Magento…/js/widget-new-product.f0b33084.chunk.js

js eselo.lv collected 2026-10-06 16:15:50 UTC 6,034 bytes, 1 lines download raw bytes

1(this.webpackJsonpscandipwa=this.webpackJsonpscandipwa||[]).push([[31],{1075:function(e,t,n){"use strict";(function(e,r,i){n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return O}));var a,o,c=n(3),s=n(6),u=n(4),d=n(5),p=n(0),l=n(12),f=n(90),b=n(29),h=n(30),g=n(9),P=n(24),v=n(1189),w=e.middleware((function(e){return{timezone:e.ConfigReducer.timezone}}),"Component/NewProducts/Container/mapStateToProps"),m=e.middleware((function(e){return{showNotification:function(t,n,r){return e(Object(b.d)(t,n,r))}}}),"Component/NewProducts/Container/mapDispatchToProps"),C=n(11).checkBEMProps,O=e.middleware((o=a=function(t){Object(u.a)(a,t);var n=Object(d.a)(a);function a(){var e;Object(c.a)(this,a);for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return(e=n.call.apply(n,[this].concat(r))).state={products:void 0,siblingsHaveBrands:!1,siblingsHavePriceBadge:!1,siblingsHaveTierPrice:!1,siblingsHaveConfigurableOptions:!1},e}return Object(s.a)(a,[{key:"componentDidMount",value:function(){this.requestProducts()}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.category,r=t.productsCount,i=t.cacheLifetime,a=t.timezone,o=e.category,c=e.productsCount,s=e.cacheLifetime,u=e.timezone;n===o&&a===u&&r===c&&i===s||this.requestProducts()}},{key:"containerProps",value:function(){var e=this,t=this.state;return{productCardFunctions:{setSiblingsHaveBrands:function(){return e.setState({siblingsHaveBrands:!0})},setSiblingsHavePriceBadge:function(){return e.setState({siblingsHavePriceBadge:!0})},setSiblingsHaveTierPrice:function(){return e.setState({siblingsHaveTierPrice:!0})},setSiblingsHaveConfigurableOptions:function(){return e.setState({siblingsHaveConfigurableOptions:!0})}},productCardProps:{siblingsHaveBrands:t.siblingsHaveBrands,siblingsHavePriceBadge:t.siblingsHavePriceBadge,siblingsHaveTierPrice:t.siblingsHaveTierPrice,siblingsHaveConfigurableOptions:t.siblingsHaveConfigurableOptions}}}},{key:"getRequestDate",value:function(){var e=this.props,t=e.cacheLifetime,n=e.timezone,r=new Date,i=new Date(r.toLocaleString("en",{timeZone:n})).getTime();return new Date(i-i%(1e3*t)).toISOString().slice(0,10)}},{key:"requestProducts",value:function(){var t=this,n=this.props,i=n.timezone,a=n.category,o=n.productsCount,c=n.cacheLifetime,s=n.showNotification;if(i){var u={args:{filter:{categoryUrlPath:a,newToDate:this.getRequestDate()},currentPage:1,pageSize:o}},d=[f.b.getQuery(u)];Object(P.c)(Object(g.d)(d),"NewProducts",c).then(e.middleware((function(e){var n=e.products.items;return t.setState({products:Object(h.l)(n)})}),"Component/NewProducts/Container/executeGetThen")).catch(e.middleware((function(e){return s("error",r("Error fetching NewProducts!"),e)}),"Component/NewProducts/Container/executeGetThenCatch"))}}},{key:"render",value:function(){return C(i,v.a,Object.assign({},this.props,this.state,this.containerProps()))}}]),a}(e.Extensible(p.PureComponent)),a.defaultProps={category:"",productsCount:10,cacheLifetime:86400},o),"Component/NewProducts/Container");Object(l.b)(w,m)(O)}).call(this,n(7).default,n(16).default,n(0))},1104:function(e,t,n){"use strict";(function(e,r){var i=n(21),a=n.n(i),o=n(33),c=n(3),s=n(6),u=n(4),d=n(5),p=n(12),l=n(90),f=n(1075),b=n(73),h=n(30),g=n(9),P=n(99),v=n(288),w=e.middleware(function(t){Object(u.a)(i,t);var n=Object(d.a)(i);function i(){return Object(c.a)(this,i),n.apply(this,arguments)}return Object(s.a)(i,[{key:"requestProducts",value:function(){var t=this,n=this.props,i=n.timezone,c=n.category,s=n.productsCount,u=n.cacheLifetime,d=n.showNotification;if(i){var p={args:{filter:{categoryUrlPath:c,newToDate:this.getRequestDate()},currentPage:1,pageSize:s}},f=[l.b.getQuery(p)];Object(P.b)(Object(g.d)(f),"NewProducts",u).then(e.middleware(function(){var e=Object(o.a)(a.a.mark((function e(n){var r,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.products.items,!Object(b.e)()){e.next=5;break}return e.next=4,Object(v.a)(r);case 4:i=e.sent;case 5:t.setState({products:Object(h.l)(i||r)});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}
1(),"Scandipwa/Component/NewProducts/Container/executeGet/then")).catch(e.middleware((function(e){return d("error",r("Error fetching NewProducts!"),e)}),"Scandipwa/Component/NewProducts/Container/executeGet/then/catch"))}}}]),i}(e.Extensible(f.a)),"Scandipwa/Component/NewProducts/Container/NewProductsContainer");t.a=Object(p.b)(f.c,f.b)(w)}).call(this,n(7).default,n(16).default)},1189:function(e,t,n){"use strict";(function(e,r,i){var a,o,c=n(3),s=n(6),u=n(8),d=n(4),p=n(5),l=n(0),f=n(79),b=(n(62),n(58)),h=(n(1190),n(11).checkBEMProps),g=e.middleware((o=a=function(e){Object(d.a)(n,e);var t=Object(p.a)(n);function n(){var e;Object(c.a)(this,n);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return(e=t.call.apply(t,[this].concat(i))).newProductsRef=Object(l.createRef)(),e.renderProductCard=e.renderProductCard.bind(Object(u.a)(e)),e}return Object(s.a)(n,[{key:"componentDidMount",value:function(){this.setStyles()}},{key:"componentDidUpdate",value:function(){this.setStyles()}},{key:"setStyles",value:function(){var e=this.props.productsPerPage;b.a.setVariable(this.newProductsRef,"new-products-per-page-count",e)}},{key:"renderProductCard",value:function(e,t){var n=this.props,i=n.productCardProps,a=n.productCardFunctions;return h(r,f.a,Object.assign({key:e.id||t,product:e},i,a))}},{key:"render",value:function(){var e=this.props.products;return h(r,"section",{block:"NewProducts",ref:this.newProductsRef},h(r,"h2",null,i("New Products")),h(r,"ul",{block:"NewProducts",elem:"Products"},e.map(this.renderProductCard)))}}]),n}(e.Extensible(l.PureComponent)),a.defaultProps={products:Array.from({length:4},(function(){return{}})),productsPerPage:6},o),"Component/NewProducts/Component");t.a=g}).call(this,n(7).default,n(0),n(16).default)},1190:function(e,t,n){},752:function(e,t,n){"use strict";n.r(t);var r=n(1104);n.d(t,"default",(function(){return r.a}))}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.