PageSourceSearch

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

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

1(this.webpackJsonpscandipwa=this.webpackJsonpscandipwa||[]).push([[32],{1074:function(t,e,a){"use strict";(function(t,n,r){a.d(e,"a",(function(){return k}));var i,s,o=a(13),c=a(1),u=a(3),d=a(6),p=a(8),g=a(4),b=a(5),h=a(2),l=a.n(h),f=a(12),P=a(327),v=a(90),O=a(174),j=a(29),m=a(30),L=a(64),w=(a(1188),t.middleware((function(t){return{updateNoMatch:O.c,showNotification:j.d}}),"Component/ProductListWidget/Container/mapDispatchToProps")),y=a(11).checkBEMProps,k=t.middleware((s=i=function(t){Object(g.a)(a,t);var e=Object(b.a)(a);function a(){var t;Object(u.a)(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))).state={pages:{},totalItems:0,totalPages:0,isLoading:!0},t.containerFunctions={requestProductList:t.requestProductList.bind(Object(p.a)(t)),updateLoadStatus:t.updateLoadStatus.bind(Object(p.a)(t)),getIsNewCategory:t.getIsNewCategory.bind(Object(p.a)(t))},t.onError=t.onError.bind(Object(p.a)(t)),t.appendPage=t.appendPage.bind(Object(p.a)(t)),t.updateProductListItems=t.updateProductListItems.bind(Object(p.a)(t)),t.dataModelName="ProductListWidget",t}return Object(d.a)(a,[{key:"onError",value:function(t){var e=this.props,a=e.showNotification,r=e.updateNoMatch;a("error",n("Error fetching Product List!"),t),r(!0)}},{key:"getIsNewCategory",value:function(){return!0}},{key:"appendPage",value:function(t){var e=this.props.showPager,a=this.state.pages,n=t.products,r=(n=void 0===n?{}:n).items,i=n.page_info,s=(i=void 0===i?{}:i).current_page;0!==e&&this.setState({pages:Object(c.a)(Object(c.a)({},a),{},Object(o.a)({},s,Object(m.l)(r)))})}},{key:"updateProductListItems",value:function(t){var e=this.props,a=e.productsCount,n=e.productsPerPage,r=t.products,i=(r=void 0===r?{}:r).items,s=r.total_count,c=r.page_info,u=(c=void 0===c?{}:c).current_page,d=Math.ceil(a/n);this.setState({isLoading:!1,totalItems:s,totalPages:d,pages:Object(o.a)({},u,Object(m.l)(i))})}},{key:"updateLoadStatus",value:function(t){this.setState({isLoading:t})}},{key:"requestProductList",value:function(t){var e=t.isNext;e||this.updateLoadStatus(!0),this.fetchData([v.b.getQuery(t)],e?this.appendPage:this.updateProductListItems,this.onError)}},{key:"adaptProps",value:function(){var t=this.props,e=t.showPager,a=t.productsCount,n=t.productsPerPage;return{filter:{conditions:t.conditionsEncoded},pageSize:e?n:a,isPaginationEnabled:!!e}}},{key:"render",value:function(){var t=this.adaptProps();return y(r,P.a,Object.assign({},this.props,this.state,t,this.containerFunctions,{isInfiniteLoaderEnabled:!1,numberOfPlaceholders:6,mix:{block:"ProductListWidget"},isWidget:!0}))}}]),a}(t.Extensible(L.a)),i.propTypes={showPager:l.a.number,productsCount:l.a.number,productsPerPage:l.a.number,conditionsEncoded:l.a.string,updateNoMatch:l.a.func.isRequired,showNotification:l.a.func.isRequired},i.defaultProps={showPager:0,productsCount:10,productsPerPage:5,conditionsEncoded:null},s),"Component/ProductListWidget/Container"),C=t.middleware((function(t){return{}}),"Component/ProductListWidget/Container/mapStateToProps");Object(f.b)(C,w)(k)}).call(this,a(7).default,a(16).default,a(0))},1103:function(t,e,a){"use strict";(function(t){var n=a(21),r=a.n(n),i=a(13),s=a(1),o=a(33),c=a(3),u=a(6),d=a(8),p=a(4),g=a(5),b=a(12),h=a(90),l=a(1074),f=a(23),P=a(30),v=a(288),O=t.middleware((function(t){return{isSignedIn:t.MyAccountReducer.isSignedIn}}),"Scandipwa/Component/ProductListWidget/Container/mapStateToProps"),j=t.middleware((function(){return{}}),"Scandipwa/Component/ProductListWidget/Container/mapDispatchToProps"),m=t.middleware(function(t){Object(p.a)(a,t);var e=Object(g.a)(a);function a(){var t;Object(c.a)(this,a);for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return(t=e.call.apply(e,[this].concat(r))).state={data:{},pages:{},totalItems:0,totalPages:0,isLoading:!0},t.containerFunctions={requestProductList:t.requestProductList.bind(Object(d.a)(t)),updateLoadStatus:t.updateLoadStatus.bind(Object(d.a)(t)),getIsNewCategory:t.getIsNewCategory.bind(Object(d.a)(t))},t}return Object(u.a)(a,[{key:"appendPage",value:function(){var t=Object(o.a)(r.a.mark((function t(e){var a,n,o,c,u,d,p;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=this.props.showPager,n=this.state.pages,o=e.products,c=(o=void 0===o?{}:o).items,u=o.page_info,d=(u=void 0===u?{}:u).current_page,!Object(f.d)()){t.next=11;break}return t.next=10,Object(v.a)(c);case 10:p=t.sent;case 11:if(0!==a){t.next=13;break}return t.abrupt("return");case 13:this.setState({pages:Object(s.a)(Object(s.a)({},n),{},Object(i.a)({},d,Object(P.l)(p||c)))});case 14:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"updateProductListItems",value:function(){var t=Object(o.a)(r.a.mark((function t(e){var a,n,s,o,c,u,d,p,g,b;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(a=this.props,n=a.productsCount,s=a.productsPerPage,o=e.products,c=(o=void 0===o?{}:o).items,u=o.total_count,d=o.page_info,p=(d=void 0===d?{}:d).current_page,!Object(f.d)()){t.next=10;break}return t.next=9,Object(v.a)(c);
1case 9:g=t.sent;case 10:b=Math.ceil(n/s),this.setState({isLoading:!1,totalItems:u,totalPages:b,pages:Object(i.a)({},p,Object(P.l)(g||c))});case 12:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"requestProductList",value:function(){var t=Object(o.a)(r.a.mark((function t(e){var a;return r.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((a=e.isNext)||this.updateLoadStatus(!0),t.t0=this,t.t1=[h.b.getQuery(e)],!a){t.next=10;break}return t.next=7,this.appendPage;case 7:t.t2=t.sent,t.next=13;break;case 10:return t.next=12,this.updateProductListItems;case 12:t.t2=t.sent;case 13:t.t3=t.t2,t.t4=this.onError,t.t0.fetchData.call(t.t0,t.t1,t.t3,t.t4);case 16:case"end":return t.stop()}}),t,this)})));return function(e){return t.apply(this,arguments)}}()}]),a}(t.Extensible(l.a)),"Scandipwa/Component/ProductListWidget/Container/ProductListWidgetContainer");e.a=Object(b.b)(O,j)(m)}).call(this,a(7).default)},1188:function(t,e,a){},751:function(t,e,a){"use strict";a.r(e);var n=a(1103);a.d(e,"default",(function(){return n.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.