geno/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/product-gallery-thumbnails.js

1 line
11 KiB
JavaScript
Raw Normal View History

2024-02-01 17:24:18 +05:30
(()=>{var e,t={498:(e,t,l)=>{"use strict";l.d(t,{M:()=>g});var r=l(9196),o=l(2175),i=l(5736),n=l(1984),a=l(4790),s=l(9915),c=l(3136),u=l(9818),m=l(5609),p=l(549);const d={[p.M.OFF]:(0,i.__)("No thumbnails will be displayed.","woocommerce"),[p.M.LEFT]:(0,i.__)("A strip of small images will appear to the left of the main gallery image.","woocommerce"),[p.M.BOTTOM]:(0,i.__)("A strip of small images will appear below the main gallery image.","woocommerce"),[p.M.RIGHT]:(0,i.__)("A strip of small images will appear to the right of the main gallery image.","woocommerce")},g=({context:e})=>{const{productGalleryClientId:t}=e,{updateBlockAttributes:l}=(0,u.useDispatch)(o.store);return(0,r.createElement)(r.Fragment,null,(0,r.createElement)(m.__experimentalToggleGroupControl,{className:"wc-block-editor-product-gallery-thumbnails__position-toggle",isBlock:!0,label:(0,i.__)("Thumbnails","woocommerce"),value:e.thumbnailsPosition,help:d[e.thumbnailsPosition],onChange:e=>l(t,{thumbnailsPosition:e})},(0,r.createElement)(m.__experimentalToggleGroupControlOption,{value:p.M.OFF,label:(0,i.__)("Off","woocommerce")}),(0,r.createElement)(m.__experimentalToggleGroupControlOption,{value:p.M.LEFT,label:(0,r.createElement)(n.Z,{size:32,icon:a.Z})}),(0,r.createElement)(m.__experimentalToggleGroupControlOption,{value:p.M.BOTTOM,label:(0,r.createElement)(n.Z,{size:32,icon:s.Z})}),(0,r.createElement)(m.__experimentalToggleGroupControlOption,{value:p.M.RIGHT,label:(0,r.createElement)(n.Z,{size:32,icon:c.Z})})),e.thumbnailsPosition!==p.M.OFF&&(0,r.createElement)(m.RangeControl,{label:(0,i.__)("Number of Thumbnails","woocommerce"),value:e.thumbnailsNumberOfThumbnails,onChange:e=>l(t,{thumbnailsNumberOfThumbnails:e}),help:(0,i.__)("Choose how many thumbnails (2-8) will display. If more images exist, a “View all” button will display.","woocommerce"),max:8,min:2}))}},549:(e,t,l)=>{"use strict";l.d(t,{M:()=>r});let r=function(e){return e.OFF="off",e.LEFT="left",e.BOTTOM="bottom",e.RIGHT="right",e}({})},9282:(e,t,l)=>{"use strict";l.r(t);var r=l(4981),o=l(5271),i=l(9196);var n=l(2175),a=l(5609),s=l(4184),c=l.n(s),u=(l(5770),l(498)),m=l(549);const p=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"woocommerce/product-gallery-thumbnails","version":"1.0.0","title":"Thumbnails","description":"Display the Thumbnails of a product.","category":"woocommerce","keywords":["WooCommerce"],"usesContext":["postId","thumbnailsPosition","thumbnailsNumberOfThumbnails","productGalleryClientId","mode"],"textdomain":"woocommerce","ancestor":["woocommerce/product-gallery"],"supports":{"spacing":{"margin":true,"__experimentalDefaultControls":{"margin":true}}}}');(0,o.EU)()&&(0,r.registerBlockType)(p,{icon:()=>(0,i.createElement)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.375 1.5H1.625C1.55596 1.5 1.5 1.55596 1.5 1.625V9.87895L4.35871 8.33965C4.5696 8.22609 4.82204 8.22009 5.03808 8.3235L7.42329 9.46513L10.3126 7.39076C10.574 7.20308 10.926 7.20308 11.1874 7.39076L13.5 9.05108V1.625C13.5 1.55596 13.444 1.5 13.375 1.5ZM13.5 10.8976L10.75 8.92328L7.93741 10.9426C7.71497 11.1023 7.42319 11.1281 7.1762 11.0098L4.73428 9.84105L1.5 11.5826V13.375C1.5 13.444 1.55596 13.5 1.625 13.5H13.375C13.444 13.5 13.5 13.444 13.5 13.375V10.8976ZM1.625 0C0.727537 0 0 0.727538 0 1.625V13.375C0 14.2725 0.727538 15 1.625 15H13.375C14.2725 15 15 14.2725 15 13.375V1.625C15 0.727537 14.2725 0 13.375 0H1.625ZM17.25 5V16C17.25 16.6909 16.6909 17.25 16.0011 17.25H3V18.75H16.0011C17.5204 18.75 18.75 17.5183 18.75 16V5H17.25Z",fill:"#1E1E1E"})),edit:({attributes:e,setAttributes:t,context:l})=>{const r=(0,n.useBlockProps)({className:"wc-block-product-gallery-thumbnails"});return(0,i.createElement)(i.Fragment,null,(0,i.createElement)("div",{...r},(0,i.createElement)(n.InspectorControls,null,(0,i.createElement)(a.PanelBody,null,(0,i.createElement)(u.M,{attributes:e,setAttributes:t,context:l}))),(0,i.createElement)(a.Disabled,null,(0,i.createElement