← Back
Editing: widget.min.js
(globalThis.itsecWebpackJsonP=globalThis.itsecWebpackJsonP||[]).push([[5145],{3075:e=>{e.exports=function(){return this.wp.i18n}()},8601:e=>{e.exports=function(){return this.wp.element}()},10424:e=>{e.exports=function(){return this.itsec.dashboard.dashboard}()},17232:e=>{e.exports=function(){return this.wp.domReady}()},24740:e=>{e.exports=function(){return this.itsec.dashboard.api}()},29672:e=>{e.exports=function(){return this.wp.notices}()},31987:e=>{e.exports=function(){return this.wp.data}()},38125:e=>{e.exports=function(){return this.wp.plugins}()},39959:e=>{e.exports=function(){return this.wp.components}()},46627:e=>{e.exports=function(){return this.itsec.packages.data}()},51609:e=>{"use strict";e.exports=window.React},55933:e=>{e.exports=function(){return this.wp.primitives}()},56688:(e,t,s)=>{"use strict";var o=s(51609),r=s(3075),i=s(8601),n=s(17232),a=s.n(n),c=s(79487),d=s(89897),u=s(31987),l=s(39959),h=s(38125),p=(s(29672),s(53390)),m=(s(46627),s(24740),s(10424)),w=s(46942),b=s.n(w),f=s(22618),g=s(56488),x=s(98883),y=s(52238);const E=(0,d.compose)([x.xl])((function({dashboardId:e,width:t}){const{cards:s,layout:r}=(0,u.useSelect)((t=>({cards:e?t("ithemes-security/dashboard").getDashboardCards(e):[],layout:e?t("ithemes-security/dashboard").getDashboardLayout(e):void 0})),[e]),n=s.length>0&&void 0!==r,a={width:t-(t<400?100:140)+"px",height:"400px"},c=(0,i.useRef)(null),d=(0,i.useMemo)((()=>new Map),[]);return(0,o.createElement)("div",{className:b()("itsec-dashboard-widget-carousel",{"itsec-dashboard-widget-carousel--loaded":n})},(0,o.createElement)(f.A,{component:null},!n&&(0,o.createElement)(g.A,{key:"loader",nodeRef:c,timeout:300,classNames:"itsec-carousel-load-cards-"},(0,o.createElement)("div",{ref:c,className:"itsec-dashboard-widget-carousel__loader",style:a},(0,o.createElement)(y.aH,null)))),(0,o.createElement)(f.A,{component:null},n&&(0,m.sortCardsToMatchApiLayout)(s,r).map((t=>{const s=(r=t.id,d.get(r)||d.set(r,(0,i.createRef)()),d.get(r));var r;return(0,o.createElement)(g.A,{key:t.id,nodeRef:s,timeout:500,classNames:"itsec-carousel-load-cards-"},(0,o.createElement)("div",{ref:s},(0,o.createElement)(m.Card,{id:t.id,dashboardId:e,style:a})))}))))})),v=(0,d.compose)([(0,u.withSelect)((e=>({dashboardId:e("ithemes-security/dashboard").getPrimaryDashboard(),notices:e("core/notices").getNotices("ithemes-security")}))),(0,u.withDispatch)((e=>({removeNotice:t=>e("core/notices").removeNotice(t,"ithemes-security")})))])((function({dashboardId:e,notices:t,removeNotice:s}){return(0,m.useRegisterCards)(),(0,o.createElement)(c.b,{theme:p.$f},(0,o.createElement)("div",{className:"itsec-dashboard"},(0,o.createElement)(l.NoticeList,{notices:t,onRemove:s}),(0,o.createElement)(E,{dashboardId:e}),(0,o.createElement)(h.PluginArea,null)))}));s.p=window.itsecWebpackPublicPath,(0,r.setLocaleData)({"":{}},"it-l10n-ithemes-security-pro");const N=()=>{const e=document.getElementById("itsec-widget-root");e&&(0,i.createRoot)(e).render((0,o.createElement)(v,null))};if(window.MutationObserver){const e=new window.MutationObserver((()=>{document.getElementById("itsec-widget-root")&&(N(),e.disconnect())}));e.observe(document,{childList:!0,subtree:!0})}else a()(N)},62247:e=>{e.exports=function(){return this.wp.isShallowEqual}()},66087:e=>{"use strict";e.exports=window.lodash},75795:e=>{"use strict";e.exports=window.ReactDOM},77172:e=>{e.exports=function(){return this.wp.url}()},79860:e=>{e.exports=function(){return this.wp.keycodes}()},89897:e=>{e.exports=function(){return this.wp.compose}()},89959:e=>{e.exports=function(){return this.wp.date}()}},e=>{e.O(0,[9427,3390,2038,3733,6054,2932,3520,2238],(()=>e(e.s=56688)));var t=e.O();((window.itsec=window.itsec||{})["dashboard-widget"]=window.itsec["dashboard-widget"]||{}).widget=t}]);
Save File
Cancel