navasena/wp-content/plugins/woocommerce/assets/client/admin/chunks/5771.js

1 line
11 KiB
JavaScript
Raw Normal View History

2024-07-31 13:12:38 +07:00
"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[5771],{84560:(e,t,o)=>{o.d(t,{Z:()=>c});var n=o(69307),r=o(70444);const c=(0,n.createElement)(r.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,n.createElement)(r.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"}))},36018:(e,t,o)=>{o.d(t,{_$:()=>v,U_:()=>h,XG:()=>T,b:()=>m});var n=o(69307),r=o(65736),c=o(55609),a=o(9818),i=o(75606),l=o(46530),s=o(51393),d=o(3188);const m=({onClick:e})=>{const{showCesModal:t}=(0,a.useDispatch)(i.STORE_KEY),{isDescendantOf:o}=(0,l.useLayoutContext)();return(0,n.createElement)(c.MenuItem,{onClick:()=>{t({action:"new_product",showDescription:!1,title:(0,r.__)("What do you think of the new product form?","woocommerce"),firstQuestion:(0,r.__)("The product editing screen is easy to use","woocommerce"),secondQuestion:(0,r.__)("The product editing screen's functionality meets my needs","woocommerce"),onsubmitLabel:(0,r.__)("Thanks for the feedback — we'll put it to good use!","woocommerce"),getExtraFieldsToBeShown:(e,t,o)=>(0,n.createElement)(n.Fragment,null,(0,n.createElement)(c.BaseControl,{id:"feedback_additional_thoughts",className:"woocommerce-product-feedback__additional-thoughts",label:(0,n.createInterpolateElement)((0,r.__)("ADDITIONAL THOUGHTS <optional />","woocommerce"),{optional:(0,n.createElement)("span",{className:"woocommerce-product-feedback__optional-input"},(0,r.__)("(OPTIONAL)","woocommerce"))})},(0,n.createElement)(c.TextareaControl,{value:e.additional_thoughts||"",onChange:o=>t({...e,additional_thoughts:o}),help:o?.additional_thoughts||""})),(0,n.createElement)(c.BaseControl,{id:"feedback_email",className:"woocommerce-product-feedback__email",label:(0,n.createInterpolateElement)((0,r.__)("YOUR EMAIL ADDRESS <optional />","woocommerce"),{optional:(0,n.createElement)("span",{className:"woocommerce-product-feedback__optional-input"},(0,r.__)("(OPTIONAL)","woocommerce"))})},(0,n.createElement)(c.TextControl,{value:e.email||"",onChange:o=>t({...e,email:o}),help:o?.email||""}),(0,n.createElement)("span",null,(0,r.__)("In case you want to participate in further discussion and future user research.","woocommerce")))),validateExtraFields:({email:e="",additional_thoughts:t=""})=>{const o={};return e.length>0&&!(0,s.isValidEmail)(e)&&(o.email=(0,r.__)("Please enter a valid email address.","woocommerce")),t?.length>500&&(o.additional_thoughts=(0,r.__)("Please enter no more than 500 characters.","woocommerce")),o}},{shouldShowComments:()=>!1},{type:"snackbar"},{block_editor:o("product-block-editor")}),e()},icon:(0,n.createElement)(d.A,null),iconPosition:"right"},(0,r.__)("Share feedback","woocommerce"))};var u=o(74617),_=o(67221),p=o(17062);const h=({onClick:e,productId:t})=>{const{showProductMVPFeedbackModal:o}=(0,a.useDispatch)(i.STORE_KEY),{allowTracking:l,resolving:s}=(0,a.useSelect)((e=>{const{getOption:t,hasFinishedResolution:o}=e(_.OPTIONS_STORE_NAME);return{allowTracking:"yes"===(t(i.ALLOW_TRACKING_OPTION_NAME)||"no"),resolving:!o("getOption",[i.ALLOW_TRACKING_OPTION_NAME])}})),d=(0,p.O3)("_feature_nonce"),m=t?(0,u.getAdminLink)(`post.php?post=${t}&action=edit&product_block_editor=0&_feature_nonce=${d}`):(0,u.getAdminLink)(`post-new.php?post_type=product&product_block_editor=0&_feature_nonce=${d}`);return s?null:(0,n.createElement)(c.MenuItem,{onClick:function(){l?o():window.location.href=m,e()},info:(0,r.__)("Save changes and go back to the classic product editing screen.","woocommerce")},(0,r.__)("Turn off the new product form","woocommerce"))};var g=o(23374),w=o(84560),E=o(10153),f=o(42960);const v=({onClick:e=(()=>null),onCloseGuide:t})=>{const[o,a]=(0,n.useState)(!1),{isNewUser:i}=(0,f.E)();return(0,n.createElement)(n.Fragment,null,(0,n.createElement)(c.MenuItem,{onClick:()=>{a(!0),e()},icon:(0,n.createElement)(g.Z,{icon:w.Z}),iconPosition:"right"},(0,r.__)("About the form…"