diff --git a/9455-9455bd3e78c76f53.js.download b/9455-9455bd3e78c76f53.js.download new file mode 100644 index 00000000000..315e7bd7d69 --- /dev/null +++ b/9455-9455bd3e78c76f53.js.download @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9455],{23360:function(e,t,n){n.d(t,{Z:function(){return AutoReplaySwitch_AutoReplaySwitch}});var a,r,i=n(2784),o=n(55414),l=n(26215),s=n(87593),c=n(1795),u=n(28952),d=n(66266),p=n(20110),h=n(38716),m=n(25760),g=n(44546),f=n(581),b=n(52522),y=n(81333),w=n(7328),R=n(60138),v=n(40794),x=n(33379),Z=["admin","owner","super_admin"],S=n(53861),k=(0,R.Ps)(a||(a=(0,w.Z)(["\n query AutoReplay($accountId: ID!) {\n account(id: $accountId) {\n currentUserRole\n id\n isAutoReplayEnabled\n isUnlimited\n plan {\n id\n hasAutoReplay\n }\n }\n }\n"]))),A=(0,R.Ps)(r||(r=(0,w.Z)(["\n mutation UpdateAutoReplay($accountId: ID!, $isAutoReplayEnabled: Boolean!) {\n updateAccountAutoReplay(\n id: $accountId\n isAutoReplayEnabled: $isAutoReplayEnabled\n ) {\n id\n isAutoReplayEnabled\n }\n }\n"]))),useAutoReplay_useAutoReplay=function(e){var t,n,a,r=e.accountId,i=(0,v.a)(k,{skip:!r,variables:{accountId:r}}),o=(0,x.D)(A),l=(0,y.Z)(o,2),s=l[0],c=l[1],u=null===(n=i.data)||void 0===n?void 0:n.account;return{canAutoReplay:(null==u?void 0:u.isUnlimited)||(null==u?void 0:null===(a=u.plan)||void 0===a?void 0:a.hasAutoReplay)||!1,canChangeAutoReplay:!!((t=null==u?void 0:u.currentUserRole)&&Z.includes(t)),error:(0,S.e$)(i.error||c.error),isAutoReplayEnabled:(null==u?void 0:u.isAutoReplayEnabled)||!1,isBusy:c.loading,isLoading:i.loading,onChange:function(e){s({variables:{isAutoReplayEnabled:e,accountId:r}})}}},L=n(52903),_={name:"1v4ilmy-AutoReplaySwitch--modalStyle",styles:"display:grid;grid-gap:20px;label:AutoReplaySwitch--modalStyle;"},D={name:"1w15ujc-AutoReplaySwitch--rootStyle",styles:"align-items:center;display:grid;grid-auto-flow:column;grid-gap:10px;justify-content:flex-end;label:AutoReplaySwitch--rootStyle;"},O=(0,b.uq)({desktop:{name:"1rd3h4y-AutoReplaySwitch--desktop",styles:"width:230px;label:AutoReplaySwitch--desktop;"},mobile:{name:"12tmk5m-AutoReplaySwitch--mobile",styles:"display:grid;grid-gap:5px;label:AutoReplaySwitch--mobile;"}}),AutoReplaySwitch_AutoReplaySwitch=function(){var e=(0,i.useState)(!1),t=e[0],n=e[1],a=(0,h.X8)(),r=(0,g.a)(),b=useAutoReplay_useAutoReplay({accountId:a}),y=b.canAutoReplay,w=b.canChangeAutoReplay,R=b.error,v=b.isAutoReplayEnabled,x=b.isBusy,Z=b.isLoading,S=b.onChange,k=(0,f.i)().emitEvent;if(R)return(0,L.tZ)(o.x,{color:"error",type:"smallPrint3",children:R});function handleChange(e){w&&(y||v?(S(e.currentTarget.checked),k({eventName:m.rw,meta:{event_action:"click",interaction_goal:"manage_autoplay_setting",interaction_name:"zap_runs_interaction",interaction_raw_text:"Autoreplay ".concat(v?"Off":"On"),option_selected:v?"off":"on"}})):n(!0))}var A=(0,L.BX)("div",{css:O,children:[(0,L.tZ)("p",{children:v?"Enabled":"Disabled"}),(0,L.BX)(o.x,{color:"neutral100",type:"smallPrint1",children:[(0,L.tZ)("p",{children:w?"Press to toggle Autoreplay ".concat(v?"off":"on"):"Only account admins can change Autoreplay"}),(0,L.tZ)("br",{}),(0,L.BX)("p",{children:[(0,L.tZ)("strong",{children:"New!"})," You can now override Autoreplay settings per Zap."]})]}),(0,L.tZ)(l.r,{color:"secondary",href:"/help/manage/tasks/replay-failed-tasks-in-zaps",children:"Learn more"})]});return(0,L.BX)(i.Fragment,{children:[(0,L.tZ)(s.p,{allowMultilineTooltip:!0,content:A,isTooltipInteractive:!0,children:function(e){var t=e.childProps;return(0,L.BX)("div",{"aria-describedby":t.ariaDescribedBy,css:D,children:[(0,L.tZ)(o.x,{color:"neutral800",type:"smallPrint1Semibold",children:"Autoreplay"}),(0,L.tZ)(c.Z,{ariaLabel:"Autoreplay ".concat(v?"enabled":"disabled"),checked:v,disabled:!w||x,id:"autoreplay",isLoading:Z||!r,onChange:handleChange})]})}}),t&&(0,L.tZ)(u.u,{onClosed:function(){return n(!1)},children:(0,L.tZ)(d.hz,{children:(0,L.BX)("div",{css:_,children:[(0,L.tZ)(o.x,{tag:"h1",type:"sectionHeader1",children:"Autoreplay"}),(0,L.tZ)(o.x,{tag:"h2",type:"paragraph3Bold",children:"Upgrade to Activate"}),(0,L.BX)(o.x,{tag:"p",type:"smallPrint1",children:["Occasionally, your Zaps may fail due to unexpected API outages or accidental changes. When ",(0,L.tZ)("strong",{children:"Autoreplay"})," is turned on, Zapier will re-run failed tasks in the background so you don’t have to worry."]}),(0,L.tZ)(p.z,{href:"/app/billing/plans",children:"Upgrade"})]})})})]})}},93716:function(e,t,n){var a=n(26215),r=n(31783),i=n(52903),o={root:{name:"11vg012-ExternalEditLink--root",styles:"display:grid;align-items:center;font-weight:bold;grid-auto-flow:column;grid-gap:5px;justify-content:flex-start;label:ExternalEditLink--root;"}},stopPropagation=function(e){return e.stopPropagation(),!1};t.Z=function(e){return(0,i.BX)("div",{css:o.root,children:[(0,i.tZ)(r.A,{serviceName:e.logoClass,size:20},e.logoClass),(0,i.BX)(a.r,{href:e.sourceUrl||void 0,onClick:stopPropagation,target:"_blank",children:["Edit in ",e.serviceName]})]})}},29455:function(e,t,n){n.d(t,{y:function(){return RunLog}});var a,r=n(12741),i=n(95235),o=n(82269),l=n(5632),s=n(2784),c=n(79102),u=n(26404),d=n(17712),p=n(48469),h=n(87234),m=n(44546),g=n(11606),f=n(81055),b=n(53092),y=n(52522),w=n(44779),R=n(25522),v=n(23360),x=n(95030),Z=n(81305),S=n(93332),k=n(81692),A=n(52903),EmbedDateFilter=function(e){var t,n,a=e.onChange,r=(0,h.g)().currentBillingPeriod,i=(0,s.useMemo)(function(){return(0,S.by)({from:null!=r&&r.from?new Date(null==r?void 0:r.from):void 0,to:null!=r&&r.to?new Date(null==r?void 0:r.to):void 0})},[r.from]),o=(0,s.useCallback)(function(e){var t=e.from,n=e.to,r=t?(0,x.Z)(t,"yyyy-MM-dd"):void 0,i=n?(0,x.Z)(n,"yyyy-MM-dd"):void 0;a((0,k.G)({from:r,to:i,hasChange:!0},function(e){return void 0===e}))},[a]),l=null===(t=e.value)||void 0===t?void 0:t.from,c=null===(n=e.value)||void 0===n?void 0:n.to,u=(0,s.useMemo)(function(){var e=l&&new Date(l),t=c&&new Date(c);return(0,k.G)({from:e,to:t},function(e){return void 0===e})},[l,c]);return(0,A.tZ)(Z.D,{ariaLabel:"Date Filter",closeText:"Apply",id:e.id,menuAriaLabel:"Choice of date ranges",onChange:o,options:i,placeholder:"Past 30 days",size:e.size,value:u})},L=n(81901),_=n(23273),D=n(35080),O=n(25760);function ownKeys(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function _objectSpread(e){for(var t=1;t10,a=e.isLoading?1:Math.ceil(e.runCount/10),r=(0,s.useMemo)(function(){return Array.from({length:a},function(t,n){return(0,d.aE)(e.url,{page:n+1})})},[a,e.url]);return(0,A.tZ)("div",{css:ej,"data-testid":"TaskList",children:e.isLoading?(0,A.tZ)(Loader,{}):(0,A.BX)(s.Fragment,{children:[(0,A.tZ)(B.Z,{gap:20,id:"TaskList_List",itemRenderer:function(n,a){return(0,A.tZ)(RunRow_RunRow,{isSelected:e.selectedIds.includes(n.id)||t&&10*e.page+a0?"shown":"none",passSelection:Q.length>0})}),(0,A.tZ)("span",{css:eI,children:Q.length>0||en&&B>0?(0,A.tZ)(RunActions_RunActions,{count:en?t:Q.length,getCachedRuns:function(){return a(Q)},isDisabled:!1,onDelete:function(){x(handleDelete,!0)},onDownload:function(){S(t,en,Q)},onReplay:function(){Z(handleReplay,!0,K)},size:Y}):(0,A.BX)("div",{css:eC,children:[void 0!==k&&k?(0,A.tZ)("div",{}):(0,A.tZ)(ez.Z,{onChange:function(e){return i("status",e)},size:Y,value:n.status||[]}),_&&(0,A.tZ)(EmbedDateFilter,{id:"EmbedDateFilter",onChange:function(e){return i("dateFilter",e)},size:"large"===Y?"medium":Y,value:n.dateFilter})]})}),(0,A.tZ)("span",{css:eT,children:C||(0,A.tZ)("div",{css:eM,children:(0,A.tZ)(v.Z,{})})})]}),(0,A.tZ)(RunList_RunList,{isLoading:V,onPageChange:function(e){i("page",e)},onSelect:function(e,t){en?(H.selected&&j((0,d.aE)(N,RunLog_objectSpread(RunLog_objectSpread({},H),{},{selected:void 0}))),ea(!1),ee([])):t?ee([].concat((0,r.Z)(Q),[e])):ee(Q.filter(function(t){return t!==e}))},page:n.page||1,selectedAll:en,selectedIds:Q,showOwner:void 0!==M?M:!!J,showZapDetails:T,size:Y,runCount:B,runs:X,url:U,isEmbed:_}),!V&&0===B&&(0,A.tZ)(R.I,{handleFilterReset:y,hasError:!!F,isFilterEmpty:es,isOutOfRetentionPeriod:er,size:Y})]})}},13441:function(e,t,n){var a=n(90550),r=n(25760),i=n(63615),o=n(63951),l=n(52903);t.Z=function(e){var t=(0,i.V)().flags,n=null!=t&&t.editor_custom_error_handling_phase_1?r.wv:r.HJ;return(0,l.tZ)(a.Z,{ariaLabel:"Run Status Filter",getKeyForItem:function(e){return e.value},inputId:e.id,items:n,menuAlign:e.menuAlign,menuAriaLabel:"Status options",onChange:function(t){return e.onChange((t||[]).map(function(e){return e.value}))},placeholder:e.placeholder||"All statuses",renderIcon:function(e){return(0,l.tZ)(o.Z,{status:e.status[0],size:24})},selectedItems:n.filter(function(t){return e.value.includes(t.value)}),visibleItems:n.length})}},63951:function(e,t,n){var a=n(28165),r=n(23273),i=n(25760),o=n(52903);t.Z=function(e){var t,n=e.size,l=void 0===n?30:n,s=e.status,c=e.color;if(!s)return null;var u=i.Jb[s];return u?(0,o.tZ)("div",{css:[(t=c||u.color,(0,a.iv)("align-items:center;background-color:",t,";border-radius:50%;display:flex;height:",l,"px;justify-content:center;width:",l,"px;;label:RunStatusIcon--root;")),";label:RunStatusIcon--RunStatusIcon;"],children:(0,o.tZ)(r.J,{color:u.iconColor||"neutral100",name:u.icon,size:l/2+3+(u.iconSize||0)})}):null}},53092:function(e,t,n){n.d(t,{t:function(){return useDeepEqualEffect}});var a=n(2784),r=n(18149),i=n.n(r),useDeepEqualCompareMemoize=function(e){var t=(0,a.useRef)();return i()(e,t.current)||(t.current=e),t.current},useDeepEqualEffect=function(e,t){(0,a.useEffect)(e,useDeepEqualCompareMemoize(t))}},81055:function(e,t,n){n.d(t,{p:function(){return useIFrameResize}});var a=n(2784),r=n(79411);function useIFrameResize(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;(0,a.useEffect)(function(){var t=document.documentElement.scrollHeight;window.parent.postMessage({height:"".concat(t+e,"px"),type:r.Vm.sizeChange},"*")})}},44779:function(e,t,n){function areFiltersEmpty(e){var t=["app","folderId","nodeId","ownerId"];return Object.keys(e).filter(function(e){return t.includes(e)}).every(function(t){return void 0===e[t]})&&""===e.search&&0===Object.keys(e.dateFilter||{}).length&&0===Object.keys(e.status||[]).length}function getActiveFilterNames(e){return Object.keys(e).filter(function(t){var n=e[t];return"dateFilter"!==t&&"page"!==t&&(Array.isArray(n)?n.length>0:!!n)}).sort(function(e,t){return e.localeCompare(t)}).join(",")}n.d(t,{g:function(){return areFiltersEmpty},v:function(){return getActiveFilterNames}})},79102:function(e,t,n){n.d(t,{R:function(){return useClock}});var a=n(2784),r=n(23356);function useClock(e,t,n){var i=(0,a.useRef)();(0,a.useEffect)(function(){if((0,r.M)()){var a="".concat(e,"_start");if(t){window.performance.mark(a),i.current=!0;return}var o=window.performance.getEntriesByName(a,"mark").length>0;if(i.current&&o){var l=window.performance.measure(e,{detail:n,start:a});i.current=!1,console.debug("⏱️ ".concat(e," measured ").concat(l.duration,"ms"))}}},[e,t])}},26404:function(e,t,n){n.d(t,{u:function(){return useTimeSinceNavigation}});var a=n(2784),r=n(23356);function useTimeSinceNavigation(e,t,n){var i=(0,a.useRef)(!1);(0,a.useEffect)(function(){if((0,r.M)()&&t&&!i.current){i.current=!0;var a,o=(a="routeChangeStart",window.performance.getEntriesByName(a,"mark").length>0?a:"navigationStart"),l=window.performance.measure(e,{detail:n,start:o});console.debug("⏱️ ".concat(e," measured ").concat(l.duration,"ms since navigationStart"))}},[e,t])}},23356:function(e,t,n){n.d(t,{M:function(){return isPerformanceApiAvailable}});var a,isPerformanceApiAvailable=function(){if(void 0!==a)return a;try{performance.measure("isPerformanceApiAvailableTest",{detail:{foo:"bar"},start:"navigationStart"}),a=!0}catch(e){a=!1}return a}}}]); \ No newline at end of file