PATH:
home
/
niazsaze
/
public_html
/
wp-content
/
plugins
/
woocommerce
/
assets
/
client
/
admin
/
chunks
"use strict";(globalThis.webpackChunk_wcAdmin_webpackJsonp=globalThis.webpackChunk_wcAdmin_webpackJsonp||[]).push([[8597],{93098:(e,t,o)=>{o.r(t),o.d(t,{StoreAlerts:()=>A,default:()=>L});var a=o(69307),s=o(65736),r=o(55609),n=o(7829),l=o(76357),c=o(9818),i=o(76292),m=o.n(i),d=o(23374),u=o(70048),_=o(83619),p=o(70261),g=o(67221),h=o(14599),w=o(10431),E=o(346),N=o(7862),b=o.n(N);class f extends a.Component{render(){const{hasMultipleAlerts:e,className:t}=this.props;return(0,a.createElement)(r.Card,{className:(0,n.Z)("woocommerce-store-alerts is-loading",t),"aria-hidden":!0,size:null},(0,a.createElement)(r.CardHeader,{isBorderless:!0},(0,a.createElement)("span",{className:"is-placeholder"}),e&&(0,a.createElement)("span",{className:"is-placeholder"})),(0,a.createElement)(r.CardBody,null,(0,a.createElement)("div",{className:"woocommerce-store-alerts__message"},(0,a.createElement)("span",{className:"is-placeholder"}),(0,a.createElement)("span",{className:"is-placeholder"}))),(0,a.createElement)(r.CardFooter,{isBorderless:!0},(0,a.createElement)("span",{className:"is-placeholder"})))}}const v=f;f.propTypes={hasMultipleAlerts:b().bool},f.defaultProps={hasMultipleAlerts:!1};var C=o(17062),T=o(53736),k=o(53332);const S={page:1,per_page:g.QUERY_DEFAULTS.pageSize,type:"error,update",status:"unactioned"};function y(e){return(e||[]).filter((e=>"unactioned"===e.status&&!0!==e.is_deleted))}const A=()=>{const[e,t]=(0,a.useState)(0),{alerts:o=[],isLoading:i,defaultHomescreenLayout:N,taskListComplete:b,isTaskListHidden:f,isLoadingTaskLists:A}=(0,c.useSelect)((e=>{const{getNotes:t,hasFinishedResolution:o}=e(g.NOTES_STORE_NAME),{getOption:a}=e(g.OPTIONS_STORE_NAME),{getTaskList:s,hasFinishedResolution:r}=e(g.ONBOARDING_STORE_NAME);return{alerts:y(t(S)),isLoading:!o("getNotes",[S]),defaultHomescreenLayout:a("woocommerce_default_homepage_layout")||"single_column",taskListComplete:s("setup")?.isComplete,isTaskListHidden:s("setup")?.isHidden,isLoadingTaskLists:!r("getTaskLists")}})),{triggerNoteAction:L,updateNote:M,removeNote:O}=(0,c.useDispatch)(g.NOTES_STORE_NAME),{createNotice:B}=(0,c.useDispatch)("core/notices"),Z=(0,g.useUserPreferences)();function x(o){o?.stopPropagation(),e>0&&t(e-1)}if(A)return null;const z=(0,C.O3)("alertCount",0,(e=>parseInt(e,10))),R=(0,w.isWCAdmin)(),F=R&&"homescreen"===(0,w.getScreenFromPath)(),H=(0,k.tv)(Z.homepage_layout,N,b,f);if(z>0&&i)return(0,a.createElement)(v,{className:(0,n.Z)({"is-wc-admin-page":R,"is-homescreen":F,"two-columns":H&&F}),hasMultipleAlerts:z>1});if(0===o.length)return null;const P=o.length,D=o[e],I=D.type,U=(0,n.Z)("woocommerce-store-alerts",{"is-alert-error":"error"===I,"is-alert-update":"update"===I,"is-wc-admin-page":R,"is-homescreen":F,"two-columns":H&&F});return(0,a.createElement)(r.Card,{className:U,size:null},(0,a.createElement)(r.CardHeader,{className:"woocommerce-store-alerts__header",isBorderless:!0},(0,a.createElement)("span",{className:"woocommerce-store-alerts__title"},D.title),P>1&&(0,a.createElement)("div",{className:"woocommerce-store-alerts__pagination"},(0,a.createElement)("span",{className:"woocommerce-store-alerts__pagination-label",role:"status","aria-live":"polite"},(0,l.Z)({mixedString:(0,s.__)("{{current /}} of {{total /}}","woocommerce"),components:{current:(0,a.createElement)(a.Fragment,null,e+1),total:(0,a.createElement)(a.Fragment,null,P)}})),(0,a.createElement)(r.Button,{onClick:x,disabled:0===e,label:(0,s.__)("Previous Alert","woocommerce")},(0,a.createElement)(d.Z,{icon:u.Z,className:"arrow-left-icon"})),(0,a.createElement)(r.Button,{onClick:function(a){a.stopPropagation(),e<o.length-1&&t(e+1)},disabled:P-1===e,label:(0,s.__)("Next Alert","woocommerce")},(0,a.createElement)(d.Z,{icon:_.Z,className:"arrow-right-icon"}))),(0,a.createElement)(r.Button,{className:"woocommerce-store-alerts__close",onClick:()=>(async e=>{const t=(0,T.GG)();(0,h.recordEvent)("inbox_action_dismiss",{note_name:e.name,note_title:e.title,note_name_dismiss_all:!1,note_name_dismiss_confirmation:!0,screen:t});const o=e.id;try{await O(o),B("success",(0,s.__)("Message dismissed","woocommerce"))}catch(e){B("error",(0,s._n)("Message could not be dismissed","Messages could not be dismissed",1,"woocommerce"))}})(D)},(0,a.createElement)(d.Z,{width:"18",height:"18",icon:p.Z}))),(0,a.createElement)(r.CardBody,null,(0,a.createElement)("div",{className:"woocommerce-store-alerts__message",dangerouslySetInnerHTML:(0,E.ZP)(D.content)})),(0,a.createElement)(r.CardFooter,{isBorderless:!0},function(e){const t=e.actions.map(((t,o)=>{const n=0===o?"secondary":"tertiary";return(0,a.createElement)(r.Button,{key:`${e.id}-${t.label}-${t.name}`,variant:n,href:t.url||void 0,onClick:async o=>{const a=o.currentTarget.getAttribute("href");o.preventDefault(),x();try{await L(e.id,t.id),a&&"#"!==a&&(0,w.parseAdminUrl)(a).href!==window.location.href&&(0,w.navigateTo)({url:a})}catch(e){throw B("error",(0,s.__)("Something went wrong while triggering this note's action.","woocommerce")),e}}},t.label)})),o=[{value:m()().add(4,"hours").unix().toString(),label:(0,s.__)("Later Today","woocommerce")},{value:m()().add(1,"day").hour(9).minute(0).second(0).millisecond(0).unix().toString(),label:(0,s.__)("Tomorrow","woocommerce")},{value:m()().add(1,"week").hour(9).minute(0).second(0).millisecond(0).unix().toString(),label:(0,s.__)("Next Week","woocommerce")},{value:m()().add(1,"month").hour(9).minute(0).second(0).millisecond(0).unix().toString(),label:(0,s.__)("Next Month","woocommerce")}],n=e.is_snoozable&&(0,a.createElement)(r.SelectControl,{className:"woocommerce-store-alerts__snooze",options:[{label:(0,s.__)("Remind Me Later","woocommerce"),value:"0"},...o],onChange:t=>{if("0"===t)return;const a=o.find((e=>e.value===t));(t=>{M(e.id,{status:"snoozed",date_reminder:t.value});const o={alert_name:e.name,alert_title:e.title,snooze_duration:t.value,snooze_label:t.label};(0,h.recordEvent)("store_alert_snooze",o)})({value:t,label:a&&a.label})}});if(t||n)return(0,a.createElement)("div",{className:"woocommerce-store-alerts__actions"},t,n)}(D)))},L=A}}]);
[-] 0.style.css
[edit]
[-] edit-product-page.js
[edit]
[-] analytics-report-orders.js
[edit]
[-] 8544.style.css
[edit]
[-] 5691.js
[edit]
[-] 6083.js
[edit]
[-] 2953.style.css
[edit]
[-] core-profiler.js
[edit]
[-] 9941.js
[edit]
[-] 7872.js
[edit]
[-] 3963.js
[edit]
[-] 4272.js
[edit]
[-] 1878.js
[edit]
[-] 5292.js
[edit]
[-] analytics-report-taxes.js
[edit]
[-] 4396.js.LICENSE.txt
[edit]
[-] launch-store.js
[edit]
[-] 185.style.css
[edit]
[-] 6732.style.css
[edit]
[-] 5292.style.css
[edit]
[-] 6125.style.css
[edit]
[-] dashboard-charts.js
[edit]
[-] 9360.style.css
[edit]
[-] analytics-report-categories.js
[edit]
[-] leaderboards.js
[edit]
[-] wcpay-payment-welcome-page.js
[edit]
[-] analytics-report-products.js
[edit]
[-] 1878.js.LICENSE.txt
[edit]
[-] analytics-report.js
[edit]
[-] 5771.js
[edit]
[-] 6824.style.css
[edit]
[-] 9456.style.css
[edit]
[-] 7387.style.css
[edit]
[-] 3307.style.css
[edit]
[-] store-alerts.js
[edit]
[-] 9792.style.css
[edit]
[-] customizable-dashboard.js
[edit]
[-] homescreen.js
[edit]
[-] store-performance.js
[edit]
[-] shipping-recommendations.js
[edit]
[-] analytics-report-variations.js
[edit]
[-] 6224.js
[edit]
[-] 8219.style.css
[edit]
[-] analytics-report-downloads.js
[edit]
[-] 9669.style.css
[edit]
[-] 3994.style.css
[edit]
[-] 727.style.css
[edit]
[-] settings-payments-offline.js
[edit]
[-] 0.js
[edit]
[-] 9966.style.css
[edit]
[-] 2106.js
[edit]
[-] analytics-report-customers.js
[edit]
[-] multichannel-marketing.js
[edit]
[-] analytics-report-revenue.js
[edit]
[-] 2397.style.css
[edit]
[-] 9850.js
[edit]
[-] 4882.style.css
[edit]
[-] 925.style.css
[edit]
[-] settings-payments-main.js
[edit]
[-] 2624.style.css
[edit]
[-] 8597.style.css
[edit]
[-] 6802.js
[edit]
[-] 3963.js.LICENSE.txt
[edit]
[-] profile-wizard.js
[edit]
[-] 4940.js
[edit]
[-] 1850.js
[edit]
[-] 2502.style.css
[edit]
[-] 318.style.css
[edit]
[-] analytics-report-coupons.js
[edit]
[-] 997.style.css
[edit]
[-] 6802.js.LICENSE.txt
[edit]
[-] 8534.style.css
[edit]
[-] 7872.js.LICENSE.txt
[edit]
[-] 1828.style.css
[edit]
[-] marketplace.js
[edit]
[-] analytics-report-stock.js
[edit]
[-] 8851.style.css
[edit]
[-] 1910.js
[edit]
[-] product-page.js
[edit]
[-] activity-panels-setup.js
[edit]
[-] 7708.style.css
[edit]
[-] 997.js
[edit]
[-] dashboard.js
[edit]
[-] 3576.style.css
[edit]
[-] payment-recommendations.js
[edit]
[-] core-profiler.js.LICENSE.txt
[edit]
[-] 4396.js
[edit]
[-] 9488.js
[edit]
[-] settings-payments-woocommerce-payments.js
[edit]
[-] 5712.style.css
[edit]
[-] 6290.js
[edit]
[-] customize-store.js
[edit]
[-] 4098.js
[edit]
[-] 3700.style.css
[edit]
[-] activity-panels-help.js
[edit]
[+]
..
[-] activity-panels-inbox.js
[edit]
[-] category-metabox.js
[edit]
[-] 4854.style.css
[edit]
[-] analytics-settings.js
[edit]
[-] 4940.js.LICENSE.txt
[edit]
[-] 9488.js.LICENSE.txt
[edit]
[-] 4011.style.css
[edit]
[-] 1910.style.css
[edit]