????

Your IP : 3.15.235.171


Current Path : /home/multihiv/www/store/wp-content/plugins/woocommerce/assets/client/admin/chunks/
Upload File :
Current File : /home/multihiv/www/store/wp-content/plugins/woocommerce/assets/client/admin/chunks/7726.js

"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[7726],{33002:(e,o,t)=>{t.d(o,{Z:()=>i});var n=t(70444),r=t(81514);const i=(0,r.jsx)(n.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,r.jsx)(n.Path,{d:"M12 3.2c-4.8 0-8.8 3.9-8.8 8.8 0 4.8 3.9 8.8 8.8 8.8 4.8 0 8.8-3.9 8.8-8.8 0-4.8-4-8.8-8.8-8.8zm0 16c-4 0-7.2-3.3-7.2-7.2C4.8 8 8 4.8 12 4.8s7.2 3.3 7.2 7.2c0 4-3.2 7.2-7.2 7.2zM11 17h2v-6h-2v6zm0-8h2V7h-2v2z"})})},17869:(e,o,t)=>{t.d(o,{_$:()=>b,U_:()=>g,XG:()=>T,b:()=>m});var n=t(65736),r=t(55609),i=t(69307),c=t(9818),s=t(75606),a=t(46530),d=t(51393),l=t(68388),u=t(81514);const m=({onClick:e})=>{const{showCesModal:o}=(0,c.useDispatch)(s.STORE_KEY),{isDescendantOf:t}=(0,a.useLayoutContext)();return(0,u.jsx)(r.MenuItem,{onClick:()=>{o({action:"new_product",showDescription:!1,title:(0,n.__)("What do you think of the new product form?","woocommerce"),firstQuestion:(0,n.__)("The product editing screen is easy to use","woocommerce"),secondQuestion:(0,n.__)("The product editing screen's functionality meets my needs","woocommerce"),onsubmitLabel:(0,n.__)("Thanks for the feedback — we'll put it to good use!","woocommerce"),getExtraFieldsToBeShown:(e,o,t)=>(0,u.jsxs)(i.Fragment,{children:[(0,u.jsx)(r.BaseControl,{id:"feedback_additional_thoughts",className:"woocommerce-product-feedback__additional-thoughts",label:(0,i.createInterpolateElement)((0,n.__)("ADDITIONAL THOUGHTS <optional />","woocommerce"),{optional:(0,u.jsx)("span",{className:"woocommerce-product-feedback__optional-input",children:(0,n.__)("(OPTIONAL)","woocommerce")})}),children:(0,u.jsx)(r.TextareaControl,{value:e.additional_thoughts||"",onChange:t=>o({...e,additional_thoughts:t}),help:t?.additional_thoughts||""})}),(0,u.jsxs)(r.BaseControl,{id:"feedback_email",className:"woocommerce-product-feedback__email",label:(0,i.createInterpolateElement)((0,n.__)("YOUR EMAIL ADDRESS <optional />","woocommerce"),{optional:(0,u.jsx)("span",{className:"woocommerce-product-feedback__optional-input",children:(0,n.__)("(OPTIONAL)","woocommerce")})}),children:[(0,u.jsx)(r.TextControl,{value:e.email||"",onChange:t=>o({...e,email:t}),help:t?.email||""}),(0,u.jsx)("span",{children:(0,n.__)("In case you want to participate in further discussion and future user research.","woocommerce")})]})]}),validateExtraFields:({email:e="",additional_thoughts:o=""})=>{const t={};return e.length>0&&!(0,d.isValidEmail)(e)&&(t.email=(0,n.__)("Please enter a valid email address.","woocommerce")),o?.length>500&&(t.additional_thoughts=(0,n.__)("Please enter no more than 500 characters.","woocommerce")),t}},{shouldShowComments:()=>!1},{type:"snackbar"},{block_editor:t("product-block-editor")}),e()},icon:(0,u.jsx)(l.A,{}),iconPosition:"right",children:(0,n.__)("Share feedback","woocommerce")})};var _=t(74617),p=t(67221),h=t(91978);const g=({onClick:e,productId:o})=>{const{showProductMVPFeedbackModal:t}=(0,c.useDispatch)(s.STORE_KEY),{allowTracking:i,resolving:a}=(0,c.useSelect)((e=>{const{getOption:o,hasFinishedResolution:t}=e(p.OPTIONS_STORE_NAME);return{allowTracking:"yes"===(o(s.ALLOW_TRACKING_OPTION_NAME)||"no"),resolving:!t("getOption",[s.ALLOW_TRACKING_OPTION_NAME])}}),[]),d=(0,h.O3)("_feature_nonce"),l=o?(0,_.getAdminLink)(`post.php?post=${o}&action=edit&product_block_editor=0&_feature_nonce=${d}`):(0,_.getAdminLink)(`post-new.php?post_type=product&product_block_editor=0&_feature_nonce=${d}`);return a?null:(0,u.jsx)(r.MenuItem,{onClick:function(){i?t():window.location.href=l,e()},info:(0,n.__)("Save changes and go back to the classic product editing screen.","woocommerce"),children:(0,n.__)("Turn off the new product form","woocommerce")})};var w=t(59550),f=t(33002),x=t(25970),v=t(93085);const b=({onClick:e=(()=>null),onCloseGuide:o})=>{const[t,c]=(0,i.useState)(!1),{isNewUser:s}=(0,v.E)();return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.MenuItem,{onClick:()=>{c(!0),e()},icon:(0,u.jsx)(w.Z,{icon:f.Z}),iconPosition:"right",children:(0,n.__)("About the form…","woocommerce")}),t&&(0,u.jsx)(x.Z,{isNewUser:s,onCloseGuide:()=>{c(!1),o()}})]})};var k=t(70147),j=t(10431),C=t(14599),y=t(37798);const T=({onClose:e})=>{const[o,t]=(0,i.useState)(!1),{productId:s}=(0,k.UO)(),a=(0,y.useEntityId)("postType","product_variation"),{invalidateVariationList:l,goToNextVariation:m,goToPreviousVariation:_,numberOfVariations:h}=(0,d.__experimentalUseVariationSwitcher)({parentId:s?parseInt(s,10):void 0,variationId:a}),[g]=(0,y.useEntityProp)("postType","product_variation","name"),[w]=(0,y.useEntityProp)("postType","product_variation","status"),{deleteProductVariation:f}=(0,c.useDispatch)(p.EXPERIMENTAL_PRODUCT_VARIATIONS_STORE_NAME),{createSuccessNotice:x,createErrorNotice:v}=(0,c.useDispatch)("core/notices");return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.MenuGroup,{children:(0,u.jsx)(r.MenuItem,{isDestructive:!0,onClick:function(){(0,C.recordEvent)("product_dropdown_option_click",{selected_option:"delete_variation",product_id:s,variation_id:a,product_status:w}),t(!0)},children:(0,n.__)("Delete variation","woocommerce")})}),o&&(0,u.jsx)(d.RemoveConfirmationModal,{title:(0,n.sprintf)((0,n.__)("Delete %s?","woocommerce"),g),description:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("p",{children:(0,n.__)("If you continue, this variation with all of its information will be deleted and customers will no longer be able to purchase it.","woocommerce")}),(0,u.jsx)("strong",{children:(0,n.__)("Deleted variations cannot be restored.","woocommerce")})]}),onRemove:async function(){return(0,C.recordEvent)("product_delete_variation_modal",{action:"delete",product_id:s,variation_id:a,product_status:w}),f({product_id:s,id:a}).then((()=>{x((0,n.sprintf)((0,n.__)("%s deleted.","woocommerce"),g)),t(!1),e(),l(),h&&h>1?m()||_():(0,j.navigateTo)({url:(0,j.getNewPath)({},`/product/${s}`)})})).catch((()=>{v((0,n.__)("Failed to delete the variation.","woocommerce"))}))},onCancel:function(){(0,C.recordEvent)("product_delete_variation_modal",{action:"close",product_id:s,variation_id:a,product_status:w}),t(!1)}})]})}},57726:(e,o,t)=>{t.d(o,{e:()=>l});var n=t(55609),r=t(65736),i=t(14599),c=t(9818),s=t(37798),a=t(17869),d=t(81514);const l=({productType:e="product",onClose:o})=>{var t;const[l]=(0,s.useEntityProp)("postType",e,"id"),u=(0,c.useSelect)((o=>{const{getEntityRecord:t}=o(s.store);return t("postType",e,l)}),[l,e]),m=e=>{(0,i.recordEvent)("product_dropdown_option_click",{selected_option:e,product_type:u.type,product_status:u.status})};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(n.MenuGroup,{label:(0,r.__)("New product form (Beta)","woocommerce"),children:[(0,d.jsx)(a._$,{onClick:()=>{m("about")},onCloseGuide:()=>{o()}}),(0,d.jsx)(a.b,{onClick:()=>{m("feedback"),o()}})]}),(0,d.jsx)(n.MenuGroup,{children:(0,d.jsx)(a.U_,{productId:null!==(t=u.parent_id)&&void 0!==t?t:u.id,onClick:()=>{m("classic_editor"),o()}})})]})}},25970:(e,o,t)=>{t.d(o,{Z:()=>p});var n=t(65736),r=t(80225),i=t(69307),c=t(55609),s=t(70444),a=t(81514);const d=({isSelected:e})=>(0,a.jsx)(s.SVG,{width:"8",height:"8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)(s.Circle,{cx:"4",cy:"4",r:"4",fill:e?"#419ECD":"#E1E3E6"})});function l({currentPage:e,numberOfPages:o,setCurrentPage:t}){return(0,a.jsx)("ul",{className:"components-guide__page-control","aria-label":(0,n.__)("Guide controls","woocommerce"),children:Array.from({length:o}).map(((r,i)=>(0,a.jsx)("li",{"aria-current":i===e?"step":void 0,children:(0,a.jsx)(c.Button,{icon:(0,a.jsx)(d,{isSelected:i===e}),"aria-label":(0,n.sprintf)((0,n.__)("Page %1$d of %2$d","woocommerce"),i+1,o),onClick:()=>t(i)},i)},i)))})}const u=function({className:e,contentLabel:o,finishButtonText:t=(0,n.__)("Finish","woocommerce"),finishButtonLink:s,onFinish:d,pages:u=[]}){const m=(0,i.useRef)(null),[_,p]=(0,i.useState)(0),h=_>0,g=_<u.length-1,w=()=>{h&&p(_-1)},f=()=>{g&&p(_+1)};return 0===u.length?null:(0,a.jsx)(c.Modal,{className:(0,r.Z)("components-guide",e),title:o,onRequestClose:()=>{d(_,"close")},onKeyDown:e=>{"ArrowLeft"===e.code?(w(),e.preventDefault()):"ArrowRight"===e.code&&(f(),e.preventDefault())},ref:m,children:(0,a.jsxs)("div",{className:"components-guide__container",children:[(0,a.jsxs)("div",{className:"components-guide__page",children:[u[_].image,u.length>1&&(0,a.jsx)(l,{currentPage:_,numberOfPages:u.length,setCurrentPage:p}),u[_].content]}),(0,a.jsxs)("div",{className:"components-guide__footer",children:[h&&(0,a.jsx)(c.Button,{className:"components-guide__back-button",variant:"tertiary",onClick:w,children:(0,n.__)("Previous","woocommerce")}),g&&(0,a.jsx)(c.Button,{className:"components-guide__forward-button",variant:"primary",onClick:f,children:(0,n.__)("Next","woocommerce")}),!g&&(0,a.jsx)(c.Button,{className:"components-guide__finish-button",variant:"primary",href:s,target:s?"_blank":void 0,rel:s?"noopener":void 0,onClick:()=>d(_,"finish"),children:t})]})]})})},m=({page:e})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h1",{className:"woocommerce-block-editor-guide__heading",children:e.heading}),(0,a.jsx)("p",{className:"woocommerce-block-editor-guide__text",children:e.text})]}),_=({page:e})=>(0,a.jsx)("div",{className:`woocommerce-block-editor-guide__header woocommerce-block-editor-guide__header-${e.index+1}`}),p=({onCloseGuide:e})=>{const o=[{heading:(0,n.__)("Fresh and modern interface","woocommerce"),text:(0,n.__)("Everything you need to create and sell your products, all in one place. From photos and descriptions to pricing and inventory, all of your product settings can be found here.","woocommerce")},{heading:(0,n.__)("Content-rich product descriptions","woocommerce"),text:(0,n.__)("Show off what's great about your products and engage your customers with content-rich product descriptions. Add images, videos, and any other content they might need to make a purchase.","woocommerce")},{heading:(0,n.__)("Lightning fast performance ","woocommerce"),text:(0,n.__)("Get your products listed and available for purchase in no time! Our modern technology ensures a reliable and streamlined experience.","woocommerce")},{heading:(0,n.__)("More features are on the way","woocommerce"),text:(0,n.__)("We're actively working on adding more features to the product form, including the ability to add digital products, variations, and more. Watch this space!","woocommerce")}].map(((e,o)=>({content:(0,a.jsx)(m,{page:e}),image:(0,a.jsx)(_,{page:{...e,index:o}})})));return(0,a.jsx)(u,{className:"woocommerce-block-editor-guide",contentLabel:"",finishButtonText:(0,n.__)("Tell me more","woocommerce"),finishButtonLink:"https://woocommerce.com/product-form-beta",onFinish:e,pages:o})}},93085:(e,o,t)=>{t.d(o,{E:()=>c});var n=t(67221),r=t(9818);const i={status:"publish",_fields:["id"]},c=()=>(0,r.useSelect)((e=>{const{getProductsTotalCount:o,hasFinishedResolution:t}=e(n.PRODUCTS_STORE_NAME),r=o(i,0);return{publishedProductsCount:r,loadingPublishedProductsCount:!t("getProductsTotalCount",[i,0]),isNewUser:r<1}}),[])}}]);