forked from Romeo-Rosete/awesome
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
2743-72f5888ae44d74b3.js.download
2 lines (2 loc) · 17.2 KB
/
2743-72f5888ae44d74b3.js.download
1
2
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2743],{87063:function(n,e,r){r.d(e,{CT:function(){return u},hw:function(){return s},qq:function(){return c}});var t=r(92228),o=r(60138);function a(){var n=(0,t.Z)(["\n fragment PrimaryLegacyZap on LegacyZap {\n accountId\n id\n isTrashed\n kind\n title\n nodes\n isEnabled\n folderId\n ownerId\n sourceUrl\n updatedAt\n }\n"]);return a=function(){return n},n}function i(){var n=(0,t.Z)(["\n fragment SecondaryLegacyZap on LegacyZap {\n authentications {\n description\n id\n isStale\n serviceSlug\n selectedApi\n title\n }\n id\n isInstant\n isShared\n heldTasks {\n total\n }\n owner {\n email\n id\n imageUrl\n name\n }\n steps {\n app {\n actions {\n bulkReads {\n key\n }\n }\n images {\n url32X32\n }\n name\n id\n }\n id\n }\n }\n"]);return i=function(){return n},n}function d(){var n=(0,t.Z)(["\n fragment FullLegacyZap on LegacyZap {\n accountId\n id\n isTrashed\n kind\n title\n nodes\n isEnabled\n folderId\n ownerId\n sourceUrl\n updatedAt\n authentications {\n description\n id\n isStale\n serviceSlug\n selectedApi\n title\n }\n isInstant\n isShared\n heldTasks {\n total\n }\n owner {\n email\n id\n imageUrl\n name\n }\n steps {\n app {\n actions {\n bulkReads {\n key\n }\n }\n images {\n url32X32\n }\n name\n id\n }\n id\n }\n }\n"]);return d=function(){return n},n}var u=(0,o.Ps)(a()),c=(0,o.Ps)(i()),s=(0,o.Ps)(d())},39386:function(n,e,r){var t=r(70865),o=r(56675),a=r(2784),i=r(76635),d=r(21815),u=r(73223),c=r(37490),s=r(16181);e.Z=function(n){var e=n.folderId,r=(0,o.x)(),f=(0,s.gn)().userId,l=r.readFragment({fragment:c.FD,id:function(n){var e=Number(n)===u.ZJ,r=(0,t.Z)({id:null===n||void 0===n?void 0:n.toString()},e&&{ownerId:String(f)});return"Folder:".concat(JSON.stringify(r))}(e)}),I=r.readFragment({fragment:d.ET,id:"FolderTreeItem:".concat(null===e||void 0===e?void 0:e.toString())}),m=r.readFragment({fragment:d.ZB,fragmentName:"FullLightBranchFolder",id:"FolderTreeItem:".concat(null===e||void 0===e?void 0:e.toString())}),p=(0,a.useMemo)((function(){return m||I||l}),[l,I,m]);if(!(0,i.isNull)(e)&&!(0,i.isUndefined)(e))return p}},37490:function(n,e,r){r.d(e,{FD:function(){return c},Jb:function(){return f}});var t=r(92228),o=r(60138);function a(){var n=(0,t.Z)(["\n fragment LightFolder on Folder {\n accountId\n counts {\n workflow\n transfer\n }\n id\n isShared\n isVirtual\n owner {\n id\n }\n # Temporary workaround with flat and nested folders having different folder structure but\n # this variable being critical for caching\n ownerId\n title\n zapCount\n }\n"]);return a=function(){return n},n}function i(){var n=(0,t.Z)(["\n fragment Folder on Folder {\n accountId\n counts {\n workflow\n transfer\n }\n id\n isShared\n isVirtual\n owner {\n email\n id\n imageUrl\n name\n }\n ownerId\n title\n zapCount\n }\n"]);return i=function(){return n},n}function d(){var n=(0,t.Z)(["\n ","\n\n query Folder($folderId: ID!, $swr: Boolean) {\n account(swr: $swr) {\n id\n folder(id: $folderId) {\n ...Folder\n }\n }\n }\n"]);return d=function(){return n},n}function u(){var n=(0,t.Z)(["\n query FolderDiscovery($folderId: ID!) {\n folderDiscovery(folderId: $folderId) {\n accountId\n account {\n id\n normalizedImageUrl\n normalizedName\n }\n }\n }\n"]);return u=function(){return n},n}var c=(0,o.Ps)(a()),s=(0,o.Ps)(i()),f=(0,o.Ps)(d(),s);(0,o.Ps)(u())},99603:function(n,e,r){var t=r(2784),o=r(76635),a=r(52008),i=r(57504),d=r(37490),u=r(39386),c=r(35591),s=r(78493);e.Z=function(n){var e=n.folderId,r=n.findCachedFolder,f=void 0!==r&&r,l=(0,a.Z)(e),I=(0,t.useState)(void 0),m=I[0],p=I[1],h=(0,u.Z)({folderId:l}),g=(0,s.Z)(d.Jb,{notifyOnNetworkStatusChange:!0,skip:(0,i.Z)(l)||(0,o.isUndefined)(l),onError:function(n){(0,c.Z)("FolderQuery",n)},variables:{folderId:l}}),$=g.data,v=g.loading;return(0,t.useEffect)((function(){!(null===$||void 0===$?void 0:$.account)||f?p(h):p($.account.folder)}),[$,f,h]),{folder:m,isLoading:v}}},12954:function(n,e,r){r.d(e,{Z:function(){return D}});var t=r(98788),o=r(66383),a=r(5163),i=r(33379),d=r(40794),u=r(92228),c=r(60138);function s(){var n=(0,u.Z)(["\n query FolderMembers($accountId: Int!, $id: ID!) {\n account(id: $accountId) {\n id\n folder(id: $id) {\n id\n isShared\n\n owner {\n email\n id\n imageUrl\n name\n }\n\n title\n }\n }\n }\n"]);return s=function(){return n},n}function f(){var n=(0,u.Z)(["\n mutation CreateFolderMembership($accountId: Int!, $id: Int!, $memberId: ID!) {\n createFolderMembership(\n accountId: $accountId\n id: $id\n memberId: $memberId\n ) {\n id\n }\n }\n"]);return f=function(){return n},n}function l(){var n=(0,u.Z)(["\n mutation DeleteFolderMembership($accountId: Int!, $id: Int!, $memberId: ID!) {\n deleteFolderMembership(accountId: $accountId, id: $id, memberId: $memberId)\n }\n"]);return l=function(){return n},n}function I(){var n=(0,u.Z)(["\n mutation CreateFolderTeamship($accountId: Int!, $id: Int!, $teamId: ID!) {\n createFolderTeamship(accountId: $accountId, id: $id, teamId: $teamId) {\n id\n }\n }\n"]);return I=function(){return n},n}function m(){var n=(0,u.Z)(["\n mutation DeleteFolderTeamship($accountId: Int!, $id: Int!, $teamId: ID!) {\n deleteFolderTeamship(accountId: $accountId, id: $id, teamId: $teamId)\n }\n"]);return m=function(){return n},n}function p(){var n=(0,u.Z)(["\n fragment ShareTeam on ShareTeam {\n id\n name\n imageUrl\n memberCount\n type\n }\n"]);return p=function(){return n},n}function h(){var n=(0,u.Z)(["\n fragment ShareMember on ShareMember {\n id\n name\n email\n imageUrl\n isOwner\n type\n }\n"]);return h=function(){return n},n}function g(){var n=(0,u.Z)(["\n ","\n ","\n query FolderShares($folderId: ID!) {\n sharedWith(folderId: $folderId) {\n ... on ShareTeam {\n ...ShareTeam\n }\n ... on ShareMember {\n ...ShareMember\n }\n }\n }\n"]);return g=function(){return n},n}(0,c.Ps)(s());var $=(0,c.Ps)(f()),v=(0,c.Ps)(l()),Z=(0,c.Ps)(I()),b=(0,c.Ps)(m()),y=(0,c.Ps)(p()),S=(0,c.Ps)(h()),w=(0,c.Ps)(g(),y,S),F=r(53736),P=r(38716),k=function(n){var e=n.folderId;return[{query:w,variables:{folderId:e}}]},T=r(35591),D=function(n){var e=n.folderId,r=(0,P.X8)(),u=(0,F.l)().createNotification,c=(0,o.Z)((0,i.D)($,{onError:function(n){(0,T.Z)("CreateFolderMembershipMutation",n),u({message:"Couldn't create folder membership.",type:"error"})},refetchQueries:k({folderId:e})}),1)[0],s=function(){var n=(0,t.Z)((function(n){var t;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return t=n.memberId,[4,c({variables:{accountId:r,id:e,memberId:t}})];case 1:return[2,o.sent()]}}))}));return function(e){return n.apply(this,arguments)}}(),f=(0,o.Z)((0,i.D)(v,{onError:function(n){(0,T.Z)("DeleteFolderMembershipMutation",n),u({message:"Couldn't delete folder membership.",type:"error"})},refetchQueries:k({folderId:e})}),1)[0],l=function(){var n=(0,t.Z)((function(n){var t;return(0,a.__generator)(this,(function(o){switch(o.label){case 0:return t=n.memberId,[4,f({variables:{accountId:r,id:e,memberId:t}})];case 1:return[2,o.sent()]}}))}));return function(e){return n.apply(this,arguments)}}(),I=(0,o.Z)((0,i.D)(Z,{onError:function(n){(0,T.Z)("CreateFolderTeamshipMutation",n),u({message:"Couldn't create folder teamship.",type:"error"})},refetchQueries:k({folderId:e})}),1)[0],m=function(){var n=(0,t.Z)((function(n){return(0,a.__generator)(this,(function(t){switch(t.label){case 0:return[4,I({variables:{accountId:r,id:e,teamId:n||"all"}})];case 1:return[2,t.sent()]}}))}));return function(e){return n.apply(this,arguments)}}(),p=(0,o.Z)((0,i.D)(b,{onError:function(n){(0,T.Z)("DeleteFolderTeamshipMutation",n),u({message:"Couldn't delete folder teamship.",type:"error"})},refetchQueries:k({folderId:e})}),1)[0],h=function(){var n=(0,t.Z)((function(n){return(0,a.__generator)(this,(function(t){return[2,p({variables:{accountId:r,id:e,teamId:n||"all"}})]}))}));return function(e){return n.apply(this,arguments)}}(),g=(0,d.a)(w,{variables:{folderId:e},skip:!e}),y=g.data,S=g.loading;return{createFolderMembership:s,createFolderTeamship:m,deleteFolderMembership:l,deleteFolderTeamship:h,folderShares:null===y||void 0===y?void 0:y.sharedWith,folderSharesIsLoading:S}}},21815:function(n,e,r){r.d(e,{ET:function(){return c},Qj:function(){return s},ZB:function(){return l},cW:function(){return f}});var t=r(92228),o=r(60138);function a(){var n=(0,t.Z)(["\n fragment LightBranchFolder on FolderTreeItem {\n accountId\n id\n isShared\n name\n ownerId\n parentId\n rootId\n zapCount\n }\n"]);return a=function(){return n},n}function i(){var n=(0,t.Z)(["\n fragment RootBranchFolder on FolderTreeItem {\n accountId\n id\n isShared\n name\n ownerId\n zapCount\n }\n"]);return i=function(){return n},n}function d(){var n=(0,t.Z)(["\n fragment LightBranchFolderChildren on FolderTreeItem {\n id\n children {\n ...LightBranchFolder\n children {\n ...LightBranchFolder\n children {\n ...LightBranchFolder\n children {\n ...LightBranchFolder\n children {\n ...LightBranchFolder\n }\n }\n }\n }\n }\n }\n"]);return d=function(){return n},n}function u(){var n=(0,t.Z)(["\n ","\n ","\n fragment FullLightBranchFolder on FolderTreeItem {\n ...LightBranchFolder\n ...LightBranchFolderChildren\n }\n"]);return u=function(){return n},n}var c=(0,o.Ps)(a()),s=(0,o.Ps)(i()),f=(0,o.Ps)(d()),l=(0,o.Ps)(u(),c,f)},87786:function(n,e,r){r.d(e,{_n:function(){return f},cq:function(){return s},oN:function(){return c}});var t=r(92228),o=r(60138),a=r(87063);function i(){var n=(0,t.Z)(["\n ","\n\n query PrimaryLegacyZaps(\n $accountId: ID\n $apps: String\n $connection: String\n $folderId: Int\n $offset: Int\n $order: String\n $ownedBy: String\n $search: String\n $webhookUrl: String\n ) {\n legacyZaps(\n accountId: $accountId\n apps: $apps\n connection: $connection\n folderId: $folderId\n offset: $offset\n order: $order\n ownedBy: $ownedBy\n search: $search\n webhookUrl: $webhookUrl\n ) {\n edges {\n ...PrimaryLegacyZap\n }\n totalCount\n pageInfo {\n offset\n hasNextPage\n }\n }\n }\n"]);return i=function(){return n},n}function d(){var n=(0,t.Z)(["\n ","\n\n query SecondaryLegacyZaps(\n $accountId: ID\n $apps: String\n $connection: String\n $folderId: Int\n $offset: Int\n $order: String\n $ownedBy: String\n $search: String\n $webhookUrl: String\n ) {\n legacyZaps(\n accountId: $accountId\n apps: $apps\n connection: $connection\n folderId: $folderId\n offset: $offset\n order: $order\n ownedBy: $ownedBy\n search: $search\n webhookUrl: $webhookUrl\n ) {\n edges {\n ...SecondaryLegacyZap\n }\n totalCount\n pageInfo {\n offset\n hasNextPage\n }\n }\n }\n"]);return d=function(){return n},n}function u(){var n=(0,t.Z)(["\n ","\n ","\n\n query LegacyZaps(\n $accountId: ID\n $apps: String\n $connection: String\n $folderId: Int\n $offset: Int\n $order: String\n $ownedBy: String\n $search: String\n $webhookUrl: String\n ) {\n legacyZaps(\n accountId: $accountId\n apps: $apps\n connection: $connection\n folderId: $folderId\n offset: $offset\n order: $order\n ownedBy: $ownedBy\n search: $search\n webhookUrl: $webhookUrl\n ) {\n edges {\n ...PrimaryLegacyZap\n ...SecondaryLegacyZap\n }\n totalCount\n pageInfo {\n offset\n hasNextPage\n }\n }\n }\n"]);return u=function(){return n},n}var c=(0,o.Ps)(i(),a.CT),s=(0,o.Ps)(d(),a.qq),f=(0,o.Ps)(u(),a.CT,a.qq)},50668:function(n,e,r){r.d(e,{PB:function(){return f},U7:function(){return s},yF:function(){return c}});var t=r(92228),o=r(60138),a=r(961);function i(){var n=(0,t.Z)(["\n ","\n\n query PrimaryZaps(\n $folderId: Int\n $offset: Int\n $limit: Int\n $ownerId: ID\n $swr: Boolean\n ) {\n zaps(\n folderId: $folderId\n offset: $offset\n limit: $limit\n ownerId: $ownerId\n swr: $swr\n ) {\n pageInfo {\n count\n cursor\n hasNextPage\n }\n orgPageInfo {\n count\n offset\n limit\n next\n prev\n }\n totalCount\n edges {\n ...PrimaryZap\n }\n }\n }\n"]);return i=function(){return n},n}function d(){var n=(0,t.Z)(["\n ","\n\n query SecondaryZaps(\n $folderId: Int\n $offset: Int\n $limit: Int\n $ownerId: ID\n $swr: Boolean\n ) {\n zaps(\n folderId: $folderId\n offset: $offset\n limit: $limit\n ownerId: $ownerId\n swr: $swr\n ) {\n pageInfo {\n count\n cursor\n hasNextPage\n }\n orgPageInfo {\n count\n offset\n limit\n next\n prev\n }\n totalCount\n edges {\n ...SecondaryZap\n }\n }\n }\n"]);return d=function(){return n},n}function u(){var n=(0,t.Z)(["\n ","\n ","\n\n query FullZaps($folderId: Int, $offset: Int, $limit: Int, $ownerId: ID) {\n zaps(\n folderId: $folderId\n offset: $offset\n limit: $limit\n ownerId: $ownerId\n ) {\n pageInfo {\n count\n cursor\n hasNextPage\n }\n orgPageInfo {\n count\n offset\n limit\n next\n prev\n }\n totalCount\n edges {\n ...PrimaryZap\n ...SecondaryZap\n }\n }\n }\n"]);return u=function(){return n},n}var c=(0,o.Ps)(i(),a.AO),s=(0,o.Ps)(d(),a.bG),f=(0,o.Ps)(u(),a.AO,a.bG)},961:function(n,e,r){r.d(e,{AO:function(){return u},bG:function(){return c}});var t=r(92228),o=r(60138);function a(){var n=(0,t.Z)(["\n fragment PrimaryZap on Zap {\n accountId\n createdAt\n description\n folderId\n hasDraft\n currentVersionId\n hasPublishedVersion\n id\n isEnabled\n isShared\n isTrashed\n kind\n lastDisabledAt\n note\n publishedAt\n sourceUrl\n title\n updatedAt\n zdl\n }\n"]);return a=function(){return n},n}function i(){var n=(0,t.Z)(["\n fragment SecondaryZap on Zap {\n authentications {\n description\n id\n isPrivate\n isShared\n isStale\n serviceSlug\n selectedApi\n sharedWithAll\n title\n }\n heldTasks {\n total\n }\n id\n isInstant\n owner {\n email\n id\n imageUrl\n name\n }\n steps {\n app {\n actions {\n bulkReads {\n key\n }\n }\n images {\n url32X32\n }\n name\n id\n }\n id\n }\n triggerSupportsTransfer\n }\n"]);return i=function(){return n},n}function d(){var n=(0,t.Z)(["\n ","\n ","\n fragment FullZap on Zap {\n ...PrimaryZap\n ...SecondaryZap\n }\n"]);return d=function(){return n},n}var u=(0,o.Ps)(a()),c=(0,o.Ps)(i());(0,o.Ps)(d(),u,c)},57504:function(n,e,r){var t=r(76635),o=r(73223);e.Z=function(n){return!((0,t.isUndefined)(n)||(0,t.isString)(n)&&!n.length)&&(!!o.Ru.includes(Number(n))||!(0,t.isUndefined)(o.gR[String(n)]))}},52008:function(n,e,r){var t=r(76635),o=r(73223);e.Z=function(n){return(0,t.isUndefined)(n)||(0,t.isNull)(n)||(0,t.isString)(n)&&!n.length?o.ZJ:o.Ru.includes(Number(n))?Number(n):(0,t.isUndefined)(o.gR[String(n)])?Number(n)?Number(n):o.ZJ:o.gR[String(n)]}},18911:function(n,e,r){r.d(e,{D:function(){return i},NS:function(){return m},Ye:function(){return c},Z9:function(){return u},do:function(){return d},oP:function(){return f},uP:function(){return I},ud:function(){return s},wv:function(){return l}});var t=r(73223),o=r(52008),a=r(57504),i=function(){return"/app/zaps"},d=function(n,e){var r=(0,o.Z)(n);return(0,a.Z)(r)?function(n,e){if(t.hb[String(n)]){var r=t.hb[String(n)].href;return e?"".concat(r,"?memberId=").concat(e):r}return"/app/zaps"}(r,e):e?"/app/zaps/folder/".concat(n,"?memberId=").concat(e):"/app/zaps/folder/".concat(n)},u=function(n){return"/webintent/edit-zap/".concat(n)},c=function(n){return"/app/history?root_id=".concat(n)},s=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.slug,r=n.linkHash;return e&&r?"/shared/".concat(e,"/").concat(r):void 0},f=function(n){return"".concat(t.Oe,"/records/").concat(n,"?utm_source=zapier&utm_medium=referral&utm_campaign=zapier-gbl-nua-link-zaps_manager_transfer_data&utm_content=").concat(n)},l=function(n){var e=i();return n.includes(e)},I=function(n,e){var r="/app/zap/".concat(n),t=i();return e.includes(r)&&!e.includes(t)},m=function(n){return"/app/connections/".concat(n)}}}]);
//# sourceMappingURL=2743-72f5888ae44d74b3.js.map