PageSourceSearch

https://www.oscainc.org/_next/static/chunks/pages/admin/webflow-integration-4d8e8f398207a3c2.js

js oscainc.org collected 2026-10-04 13:29:29 UTC 14,727 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[77153,57026],{57026:function(e,n,i){"use strict";i.d(n,{Ph:function(){return o}});var t=i(67294),r=i(83234),a=i(38655),l=i(54520),cx=(...e)=>e.filter(Boolean).join(" "),dataAttr=e=>e?"":void 0,s=(0,a.Gp)(function(e,n){let{children:i,placeholder:r,className:l,...s}=e;return t.createElement(a.m$.select,{...s,ref:n,className:cx("chakra-select",l)},r&&t.createElement("option",{value:""},r),i)});s.displayName="SelectField";var o=(0,a.Gp)((e,n)=>{var i;let o=(0,a.jC)("Select",e),{rootProps:d,placeholder:c,icon:u,color:g,height:h,h:v,minH:m,minHeight:x,iconColor:f,iconSize:p,...w}=(0,l.Lr)(e),[j,E]=function(e,n){let i={},t={};for(let[r,a]of Object.entries(e))n.includes(r)?i[r]=a:t[r]=a;return[i,t]}(w,l.oE),b=(0,r.Yp)(E),I={paddingEnd:"2rem",...o.field,_focus:{zIndex:"unset",...null==(i=o.field)?void 0:i._focus}};return t.createElement(a.m$.div,{className:"chakra-select__wrapper",__css:{width:"100%",height:"fit-content",position:"relative",color:g},...j,...d},t.createElement(s,{ref:n,height:v??h,minH:m??x,placeholder:c,...b,__css:I},e.children),t.createElement(SelectIcon,{"data-disabled":dataAttr(b.disabled),...(f||g)&&{color:f||g},__css:o.icon,...p&&{fontSize:p}},u))});o.displayName="Select";var DefaultIcon=e=>t.createElement("svg",{viewBox:"0 0 24 24",...e},t.createElement("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})),d=(0,a.m$)("div",{baseStyle:{position:"absolute",display:"inline-flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",top:"50%",transform:"translateY(-50%)"}}),SelectIcon=e=>{let{children:n=t.createElement(DefaultIcon,null),...i}=e,r=(0,t.cloneElement)(n,{role:"presentation",className:"chakra-select__icon",focusable:!1,"aria-hidden":!0,style:{width:"1em",height:"1em",color:"currentColor"}});return t.createElement(d,{...i,className:"chakra-select__icon-wrapper"},(0,t.isValidElement)(n)?r:null)};SelectIcon.displayName="SelectIcon"},46023:function(e,n,i){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/webflow-integration",function(){return i(34387)}])},85200:function(e,n,i){"use strict";i.d(n,{DY:function(){return AdminPage},hb:function(){return l},lm:function(){return AdminPageHeading},yG:function(){return AdminPageHeader}});var t=i(85893),r=i(48641),a=i(38655);i(67294);let AdminPage=e=>{let{children:n,...i}=e;return(0,t.jsx)(r.xu,{...i,children:n})},AdminPageHeader=e=>{let{children:n,...i}=e;return(0,t.jsx)(r.Kq,{direction:"row",spacing:"4",alignItems:"flex-start",...i,children:n})},AdminPageHeading=e=>{let{children:n,...i}=e;return(0,t.jsx)(r.X6,{size:"md",...i,children:n})},l=(0,a.Gp)((e,n)=>{let{children:i,...a}=e;return(0,t.jsx)(r.xu,{marginY:"5",...a,ref:n,children:i})})},39174:function(e,n,i){"use strict";i.d(n,{A:function(){return NoMatchPage}});var t=i(85893),r=i(48641),a=i(23887),l=i(47741),s=i(11163);i(67294);let NoMatchPage=()=>{let e=(0,s.useRouter)();return(0,t.jsxs)(r.gC,{p:"12",spacing:"4",textAlign:"center",children:[(0,t.jsx)(a.Ee,{src:"https://tradewing-public.s3.us-east-2.amazonaws.com/tradewing-logo.png",alt:"Tradewing",width:"50px",height:"50px"}),(0,t.jsx)(r.xv,{textStyle:"xlBodyStrong",children:"Page Not Found"}),(0,t.jsx)(r.xv,{children:"Please check that you have the correct URL and try again. If you need help finding and accessing your community, please contact [email protected]."}),(0,t.jsx)(l.zx,{onClick:()=>e.push("/"),children:"Return to Site"})]})}},67133:function(e,n,i){"use strict";i.d(n,{Z:function(){return WebflowIntegrationAdminPage}});var t=i(82729),r=i(85893),a=i(50456),l=i(37887),s=i(50319),o=i(80419),d=i(48641),c=i(83234),u=i(20979),g=i(47741),h=i(57026),v=i(11163),m=i(67294),x=i(52176),f=i(45893),p=i(6491);function _templateObject(){let e=(0,t._)(['\n  query AdminWebflowIntegrationPage_Query {\n    webflowIntegrationGetExternalOAuthURL\n    webflowIntegrationGetOAuthRedirectURL(identifier: "admin")\n    webflowIntegrationGetStatus {\n      status\n    }\n    webflowIntegrationGetPublicConfig {\n      result {\n        enabled\n        siteId\n        publishOrigin\n        designerUrl\n        navigationChrome\n      }\n    }\n    webflowIntegrationListSites {\n      sites {\n        id\n        displayName\n        shortName\n      }\n    }\n  }\n']);
1return _templateObject=function(){return e},e}let w=(0,a.Ps)(_templateObject()),WebflowIntegrationAdminPage=()=>{var e,n,i,t;let a=(0,v.useRouter)(),j=(0,o.pm)(),E=(0,f.x)(),b=(null===(n=E.tenant)||void 0===n?void 0:null===(e=n.featureFlags)||void 0===e?void 0:e.webflow)===!0,[I,A]=m.useState(""),[C,S]=m.useState(""),[_,O]=m.useState(""),[y,R]=m.useState(""),{data:N,loading:D,refetch:P,error:W}=(0,l.a)(w,{skip:E.loading||!b,fetchPolicy:"cache-and-network",errorPolicy:"all"}),[L,{loading:T}]=(0,s.D)(x.Vx),[U,{loading:M}]=(0,s.D)(x.Mv),[G,{loading:q}]=(0,s.D)(x.DI),[z,{loading:F}]=(0,s.D)(x.K$),[B,{loading:k}]=(0,s.D)(x.w4);if(m.useEffect(()=>{a.isReady&&"1"===a.query.webflowUpdated&&P()},[a.isReady,a.query.webflowUpdated,P]),!E.loading&&!b)return(0,r.jsx)(d.xv,{color:"gray.600",children:"Webflow integration is not enabled for this community."});if(E.loading||D||!N)return(0,r.jsx)(d.xu,{textAlign:"center",p:"8",children:(0,r.jsx)(p.c0O,{})});let H=N.webflowIntegrationGetStatus.status,Y=N.webflowIntegrationGetPublicConfig.result,K=N.webflowIntegrationGetOAuthRedirectURL,X=N.webflowIntegrationGetExternalOAuthURL,Z=null!==(t=null===(i=N.webflowIntegrationListSites)||void 0===i?void 0:i.sites)&&void 0!==t?t:[],$="TRADEWING"===Y.navigationChrome?"TRADEWING":"WEBFLOW",handleBindSite=async()=>{I&&(await L({variables:{input:{siteId:I}}}),await P())},handleManualUpsert=async()=>{C.trim()&&_.trim()&&(await U({variables:{input:{siteId:C.trim(),publishOrigin:_.trim(),designerUrl:y.trim()||null}}}),await P())},handleNavigationChromeChange=async e=>{try{await G({variables:{input:{navigationChrome:e}}}),await P(),j({status:"success",description:"WEBFLOW"===e?"Static pages will use Webflow navigation":"Static pages will use Tradewing navigation"})}catch(e){j({status:"error",description:"Failed to update navigation setting"})}};return(0,r.jsxs)(d.Kq,{spacing:"6",p:"4",children:[(0,r.jsx)(d.xv,{children:"Connect your Webflow site to Tradewing. Marketing / static pages are designed in Webflow and rendered on your Tradewing domain. Choose whether those pages use Webflow's navigation or Tradewing's."}),(0,r.jsxs)(d.xv,{fontSize:"sm",color:"gray.600",children:["OAuth redirect URI (register in Webflow app settings): ",K]}),"UNINITIALIZED"===H&&(0,r.jsxs)(d.Kq,{spacing:"4",children:[X?(0,r.jsxs)(d.rU,{href:X,isExternal:!0,children:["Connect Webflow account",(0,r.jsx)(p.h0n,{mx:"2px"})]}):(0,r.jsx)(d.xv,{color:"red.500",children:"Webflow OAuth is not configured on the server (WEBFLOW_CLIENT_ID / WEBFLOW_CLIENT_SECRET)."}),(0,r.jsxs)(d.xu,{borderTopWidth:"1px",pt:"4",children:[(0,r.jsx)(d.xv,{fontWeight:"semibold",mb:"3",children:"Manual site binding (pilot / staging)"}),(0,r.jsxs)(d.Kq,{spacing:"3",maxW:"lg",children:[(0,r.jsxs)(c.NI,{isRequired:!0,children:[(0,r.jsx)(c.lX,{children:"Site ID"}),(0,r.jsx)(u.II,{value:C,onChange:e=>S(e.target.value),placeholder:"6a4e3cdcdc0361e86b2eed93"})]}),(0,r.jsxs)(c.NI,{isRequired:!0,children:[(0,r.jsx)(c.lX,{children:"Publish origin"}),(0,r.jsx)(u.II,{value:_,onChange:e=>O(e.target.value),placeholder:"https://demo-site-027374.webflow.io"})]}),(0,r.jsxs)(c.NI,{children:[(0,r.jsx)(c.lX,{children:"Designer URL"}),(0,r.jsx)(u.II,{value:y,onChange:e=>R(e.target.value),placeholder:"https://demo-site-027374.design.webflow.com/?siteId=..."})]}),(0,r.jsx)(g.zx,{onClick:handleManualUpsert,isLoading:M,alignSelf:"flex-start",children:"Save site config"})]})]})]}),"CONNECTED"===H&&(0,r.jsxs)(d.Kq,{spacing:"4",children:[(0,r.jsx)(d.xv,{children:"Webflow is connected. Select which site to use for this tenant."}),W&&(0,r.jsx)(d.xv,{color:"red.500",fontSize:"sm",children:"Could not list sites. Re-authorize or use manual binding below."}),Z.length>0?(0,r.jsxs)(d.Kq,{direction:"row",alignItems:"flex-end",maxW:"lg",children:[(0,r.jsxs)(c.NI,{children:[(0,r.jsx)(c.lX,{children:"Authorized site"}),(0,r.jsx)(h.Ph,{value:I,onChange:e=>A(e.target.value),placeholder:"Select a site",children:Z.map(e=>(0,r.jsxs)("option",{value:e.id,children:[e.displayName," (",e.shortName,")"]},e.id))})]}),(0,r.jsx)(g.zx,{onClick:handleBindSite,isLoading:T,isDisabled:!I,children:"Bind site"})]}):null]}),"INITIALIZED"===H&&(0,r.jsxs)(d.Kq,{spacing:"4",children:[(0,r.jsx)(d.xv,{fontWeight:"semibold",children:"Connected"}),(0,r.jsxs)(d.xv,{fontSize:"sm",children:["Site ID: ",Y.siteId]}),(0,r.jsxs)(d.xv,{fontSize:"sm",children:["Publish origin: ",Y.publishOrigin]}),Y.designerUrl?(0,r.jsxs)(d.rU,{href:Y.designerUrl,isExternal:!0,children:["Open Webflow Designer",(0,r.jsx)(p.h0n,{mx:"2px"})]}):null,(0,r.jsxs)(c.NI,{maxW:"lg",children:[(0,r.jsx)(c.lX,{children:"Static page navigation"}),(0,r.jsxs)(h.Ph,{value:$,onChange:e=>handleNavigationChromeChange(e.target.value),isDisabled:q,children:[(0,r.jsx)("option",{value:"WEBFLOW",children:"Webflow navigation (full page)"}),(0,r.jsx)("option",{value:"TRADEWING",children:"Tradewing navigation (content only)"})]}),(0,r.jsx)(c.Q6,{children:"WEBFLOW"===$?"Renders the full published Webflow page, including Webflow's header and footer.":"Ren
1ders only the [data-tradewing-content] region inside the Tradewing header and footer."})]}),(0,r.jsxs)(d.Kq,{direction:"row",spacing:"3",children:[(0,r.jsx)(g.zx,{variant:"outline",onClick:async()=>{await z(),await P()},isLoading:F,children:"Reset OAuth connection"}),(0,r.jsx)(g.zx,{variant:"outline",colorScheme:"red",onClick:async()=>{await B(),await P()},isLoading:k,children:"Remove integration"})]})]})]})}},34387:function(e,n,i){"use strict";i.r(n);var t=i(85893),r=i(50319),a=i(48641),l=i(11163),s=i(67294),o=i(85200),d=i(96317),c=i(67133),u=i(52176),g=i(6491),h=i(93064),v=i(52609);n.default=(0,v.z)(()=>{let e=(0,l.useRouter)(),n="string"==typeof e.query.code?e.query.code:void 0,[i]=(0,r.D)(u.oR);return(s.useEffect(()=>{n&&(async()=>{await i({variables:{input:{code:n}}});let{code:t,...r}=e.query;await e.replace({pathname:e.pathname,query:{...r,webflowUpdated:"1"}},void 0,{shallow:!0})})()},[n,i,e]),n)?(0,t.jsx)(d.C,{children:(0,t.jsxs)(o.DY,{maxWidth:"full",mx:"auto",children:[(0,t.jsx)(o.yG,{mb:"4",children:(0,t.jsx)(o.lm,{children:"Webflow Integration"})}),(0,t.jsx)(o.hb,{children:(0,t.jsx)(a.xu,{textAlign:"center",p:"8",children:(0,t.jsx)(g.c0O,{})})})]})}):(0,t.jsx)(d.C,{children:(0,t.jsxs)(o.DY,{maxWidth:"full",mx:"auto",children:[(0,t.jsx)(o.yG,{mb:"4",children:(0,t.jsx)(o.lm,{children:"Webflow Integration"})}),(0,t.jsx)(o.hb,{children:(0,t.jsx)(c.Z,{})})]})})},{requiresEvery:[h.lj.ADMIN_ROLE,h.lj.FEATURE_FLAG_WEBFLOW]})},52609:function(e,n,i){"use strict";i.d(n,{z:function(){return restrictedRoute}});var t=i(85893),r=i(11163),a=i(67294),l=i(39174),s=i(63205),o=i(62893),d=i(69171),c=i(47503),u=i(45893),g=i(93064);let h=new Map([[g.lj.AUTHENTICATION,e=>{var n;return!!(null===(n=e.user)||void 0===n?void 0:n._id)}],[g.lj.ADMIN_ROLE,e=>{var n,i;return(null===(n=e.user)||void 0===n?void 0:n.role)===c.uA.ADMIN||(null===(i=e.user)||void 0===i?void 0:i.role)===c.uA.MORGOTH}],[g.lj.MORGOTH_ROLE,e=>{var n;return(null===(n=e.user)||void 0===n?void 0:n.role)===c.uA.MORGOTH}],[g.lj.COMMUNITY_ACCESS,e=>{var n;return(null==e?void 0:null===(n=e.tenant)||void 0===n?void 0:n.communityAccessConfig)===c.iX.PUBLIC?!e.user||e.user.canAccessCommunity:!!e.user&&e.user.canAccessCommunity}],[g.lj.COMMUNITY_READ_ONLY_ACCESS,e=>{var n;return!!(null===(n=e.user)||void 0===n?void 0:n.canAccessCommunityReadOnly)}],[g.lj.SPONSOR_DASHBOARD_ACCESS,e=>{var n,i;return!!(null===(i=e.user)||void 0===i?void 0:null===(n=i.rosterOrganization)||void 0===n?void 0:n.currentUserOrganizationPermission.canManageOrganizationSponsorship)}],[g.lj.SPONSOR_DIRECTORY_ACCESS,e=>{var n,i,t;switch(null===(n=e.tenant)||void 0===n?void 0:n.sponsorDirectoryAccessConfig){case c.pZ.PUBLIC:return!0;case c.pZ.LOGGED_IN_USERS:return!!(null===(i=e.user)||void 0===i?void 0:i._id);case c.pZ.HIDDEN:return!1;default:throw Error("unknown sponsorDirectoryAccessConfig: ".concat(null===(t=e.tenant)||void 0===t?void 0:t.sponsorDirectoryAccessConfig))}}],[g.lj.MEMBER_DIRECTORY_ACCESS,e=>{var n;return!!(null===(n=e.tenant)||void 0===n?void 0:n.currentUserPermissions.canAccessMemberDirectory)}],[g.lj.EVENTS_FEED_ACCESS,e=>{var n;return!!(null===(n=e.tenant)||void 0===n?void 0:n.currentUserPermissions.canAccessEventsFeed)}],[g.lj.ORGANIZATION_DASHBOARD_ACCESS,e=>{var n,i;return!!(null===(i=e.user)||void 0===i?void 0:null===(n=i.rosterOrganization)||void 0===n?void 0:n.currentUserOrganizationPermission.canManageOrganizationProfile)}],[g.lj.DM_PAGE_ACCESS,e=>{var n;return!!(null===(n=e.user)||void 0===n?void 0:n.canAccessDMPage)}],[g.lj.ORGANIZATION_MEMBERSHIP_ACCESS,e=>{var n,i;return!!(null===(i=e.user)||void 0===i?void 0:null===(n=i.rosterOrganization)||void 0===n?void 0:n.currentUserOrganizationPermission.canManageOrganizationMembership)}],[g.lj.FEATURE_FLAG_CMS,e=>{var n,i;return!!(null===(i=e.tenant)||void 0===i?void 0:null===(n=i.featureFlags)||void 0===n?void 0:n.cms)}],[g.lj.FEATURE_FLAG_CONFERENCES,e=>{var n,i;return!!(null===(i=e.tenant)||void 0===i?void 0:null===(n=i.featureFlags)||void 0===n?void 0:n.conferences)}],[g.lj.FEATURE_FLAG_WEBFLOW,e=>{var n,i;return!!(null===(i=e.tenant)||void 0===i?void 0:null===(n=i.featureFlags)||void 0===n?void 0:n.webflow)}],[g.lj.PAID_MODULE_WEBSITE_BUILDER,e=>{var n,i;return!!(null===(i=e.tenant)||void 0===i?void 0:null===(n=i.paidModules)||void 0===n?void 0:n.websiteBuilder)}]]),useRequiredPermission=e=>{let n=(0,u.x)();if(!e.requiresEvery&&!e.requiresSome)return{hasPermission:!0,loading:!1};if(n.loading)return{hasPermission:!1,loading:!0};let i=null==e||!e.requiresEvery||(null==e?void 0:e.requiresEvery.map(e=>h.get(e)).every(e=>!e||e(n))),t=null==e||!e.requiresSome||(null==e?void 0:e.requiresSome.map(e=>h.get(e)).some(e=>!!e&&e(n)));return{hasPermission:i&&t,loading:!1}},restrictedRoute=(e,n,i)=>c=>{let u=(0,r.useRouter)(),g=useRequiredPermission(n),h=(0,o.T)(),v=(0,s.U)(),m=g.loading||h.isLoading||v.loading,x=!!i&&!!i.requiresMemberManagement&&!v.isActive;return(a.useEffect(()=>{m||g.hasPermission&&!x||h.isAuthenticated||!u.isReady||u.replace({pathname:"/login",query:{redirect:u.asPath}})},[m,u,x,h.isAuthenticated,g.hasPermission]),m)?(0,t.jsx)(d.g,{}):!g.hasPermission||x?h.isAuthenticated?(0,t.jsx)(l.A,{}):(0,t.jsx)(d.g,{}):(0,t.jsx)(e,{...c})}}},function(e){e.O(0,[78428,64986,52176,96317,49774,92888,40179],function(){return e(e.s=46023)}),_N_E=e.O()}]);
2//# sourceMappingURL=webflow-integration-4d8e8f398207a3c2.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.