woocommerce/packages/woocommerce-blocks/build/cart-blocks/filled-cart-frontend.js

1 line
1.6 KiB
JavaScript
Raw Normal View History

2021-12-10 12:03:04 +00:00
(window.webpackWcBlocksJsonp=window.webpackWcBlocksJsonp||[]).push([[25],{189:function(e,t){},201:function(e,t,a){"use strict";a.d(t,"b",(function(){return u})),a.d(t,"a",(function(){return m}));var i=a(5),n=a.n(i),s=(a(10),a(0)),c=a(24),r=a(6),o=a.n(r),l=Object(s.createContext)({hasContainerWidth:!1,containerClassName:"",isMobile:!1,isSmall:!1,isMedium:!1,isLarge:!1}),u=function(){return Object(s.useContext)(l)},m=function(e){var t=e.children,a=e.className,i=void 0===a?"":a,s=function(){var e=Object(c.useResizeObserver)(),t=n()(e,2),a=t[0],i=t[1].width,s="";return i>700?s="is-large":i>520?s="is-medium":i>400?s="is-small":i&&(s="is-mobile"),[a,s]}(),r=n()(s,2),u=r[0],m=r[1],d={hasContainerWidth:""!==m,containerClassName:m,isMobile:"is-mobile"===m,isSmall:"is-small"===m,isMedium:"is-medium"===m,isLarge:"is-large"===m};return React.createElement(l.Provider,{value:d},React.createElement("div",{className:o()(i,m)},u,t))}},277:function(e,t,a){"use strict";var i=a(6),n=a.n(i),s=(a(10),a(201));a(189),t.a=function(e){var t=e.children,a=e.className;return React.createElement(s.a,{className:n()("wc-block-components-sidebar-layout",a)},t)}},397:function(e,t,a){"use strict";a.r(t);var i=a(6),n=a.n(i),s=a(277),c=a(32),r=a(54),o=a(0),l=a(28);t.default=function(e){var t=e.children,a=Object(c.a)(),i=a.cartItems,u=a.cartIsLoading,m=a.cartItemErrors,d=Object(r.a)().addErrorNotice;return Object(o.useEffect)((function(){m.forEach((function(e){d(Object(l.decodeEntities)(e.message),{isDismissible:!0,id:e.code})}))}),[d,m]),u||i.length>=1?React.createElement(s.a,{className:n()("wc-block-cart",{"has-dark-controls":!1})},t):null}}}]);