@hiver/connector-admin 4.2.0-beta.0 → 4.2.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.es.js +2 -2
- package/index.umd.js +1 -1
- package/package.json +1 -1
package/index.es.js
CHANGED
|
@@ -34092,10 +34092,10 @@ const pH = T(H)`
|
|
|
34092
34092
|
console.log("connector connectorType +++ ", s, a);
|
|
34093
34093
|
const l = Object.values(o || {}).find((p) => p.type === a);
|
|
34094
34094
|
console.log("matchedConnector +++ ", l);
|
|
34095
|
-
const c = l ? null : Object.values(i || {}).find((p) => p.
|
|
34095
|
+
const c = l ? null : Object.values(i || {}).find((p) => p.type === a);
|
|
34096
34096
|
console.log("matchedTemplate +++ ", c);
|
|
34097
34097
|
let g = null;
|
|
34098
|
-
l ? (g =
|
|
34098
|
+
l ? (g = `/app/custom-connectors/connector/settings/${l.id}?isEdit=true&tabIndex=0`, console.log("depricateBannerRedirectUrl +++ ", g)) : c && (g = `/app/custom-connectors/connector/settings/${c.id}`, console.log("depricateBannerRedirectUrl +++ ", g));
|
|
34099
34099
|
const E = () => {
|
|
34100
34100
|
A(nt.BASEPATH);
|
|
34101
34101
|
};
|
package/index.umd.js
CHANGED
|
@@ -3123,7 +3123,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
3123
3123
|
width: 100vw;
|
|
3124
3124
|
height: 100vh;
|
|
3125
3125
|
padding: 20px;
|
|
3126
|
-
`,GH=()=>{const e=wr(),t=Ge(MH),n=Ge(FH);return y.useEffect(()=>{const r=new URLSearchParams(window.location.search),A=r.get(vV),o=r.get(xV);window.opener&&o&&A&&e(wc({data:{token:A},connectorId:o}))},[e]),y.useEffect(()=>{window.opener&&t&&window.opener.postMessage(n===Be.FAILED?y0:EC,window.location.origin)},[t,n]),u.jsxs(jH,{children:[u.jsx("h1",{children:"Authentication Complete"}),u.jsx("p",{children:"Redirecting..."})]})},VH=()=>{const{nativeIntegrations:e}=y.useContext(Vt),{id:t=""}=TA(),[n]=io(),r=n.get("deprecated")==="true",A=on(),o=Ge(Ua),s=Ge(Va);console.log("connectors +++ ",o),console.log("connectorTemplates +++ ",s);const i=e.filter(h=>h.id===t)[0],a=i.id;console.log("connector connectorType +++ ",i,a);const l=Object.values(o||{}).find(h=>h.type===a);console.log("matchedConnector +++ ",l);const c=l?null:Object.values(s||{}).find(h=>h.
|
|
3126
|
+
`,GH=()=>{const e=wr(),t=Ge(MH),n=Ge(FH);return y.useEffect(()=>{const r=new URLSearchParams(window.location.search),A=r.get(vV),o=r.get(xV);window.opener&&o&&A&&e(wc({data:{token:A},connectorId:o}))},[e]),y.useEffect(()=>{window.opener&&t&&window.opener.postMessage(n===Be.FAILED?y0:EC,window.location.origin)},[t,n]),u.jsxs(jH,{children:[u.jsx("h1",{children:"Authentication Complete"}),u.jsx("p",{children:"Redirecting..."})]})},VH=()=>{const{nativeIntegrations:e}=y.useContext(Vt),{id:t=""}=TA(),[n]=io(),r=n.get("deprecated")==="true",A=on(),o=Ge(Ua),s=Ge(Va);console.log("connectors +++ ",o),console.log("connectorTemplates +++ ",s);const i=e.filter(h=>h.id===t)[0],a=i.id;console.log("connector connectorType +++ ",i,a);const l=Object.values(o||{}).find(h=>h.type===a);console.log("matchedConnector +++ ",l);const c=l?null:Object.values(s||{}).find(h=>h.type===a);console.log("matchedTemplate +++ ",c);let d=null;l?(d=`/app/custom-connectors/connector/settings/${l.id}?isEdit=true&tabIndex=0`,console.log("depricateBannerRedirectUrl +++ ",d)):c&&(d=`/app/custom-connectors/connector/settings/${c.id}`,console.log("depricateBannerRedirectUrl +++ ",d));const I=()=>{A(Ye.BASEPATH)};return u.jsxs("div",{className:"**:[.h-zapierConnectorContainer]:pt-0! **:[.h-app-titlebar]:hidden! **:[.h-native-connector-body]:ml-0!",children:[u.jsxs("div",{className:"flex justify-between shadow-[0_1px_1px_rgba(0,0,0,0.08)] pb-5 mb-7.5",children:[u.jsxs("div",{className:"inline-flex items-center -ml-[10px]",children:[u.jsx(g.IconButton,{onClick:I,children:u.jsx("img",{src:Q0})}),u.jsx("span",{className:"text-h2",children:"Back"})]}),r?u.jsx(Lc,{connectorName:i.name,status:"deprecated",id:i.id}):null]}),i?u.jsx(i.Component,{depricateBannerRedirectUrl:d||null}):u.jsx("div",{children:"No App"})]})},HH="Select inbox(es)",WH="Select Shared Mailbox(es)",zH="Select the roles",YH="Select role",M0="inbox",JH="roles",XH=e=>{const{selectedEmailInboxes:t,setSelectedEmailInboxes:n,selectedRoles:r,setSelectedRoles:A,roles:o,inboxes:s}=e;return[{type:M0,options:s,label:WH,isSingleSelect:!1},{type:JH,options:o,label:zH,isSingleSelect:!0}].map(({type:a,options:l,label:c,isSingleSelect:d})=>{const I=a===M0,h=I?t:r;return u.jsxs("div",{className:"mb-5",children:[u.jsx(g.Typography,{className:"pb-2",variant:"h4",children:c}),u.jsx(E0,{isSingleSelect:d,currentSelectedOptions:d?[h]:h,options:l,type:a,placeholder:I?HH:YH,onChangeFunc:(f,C)=>I?n(C):A(C??{}),valueKey:"id",labelKey:I?"name":"displayName",inputVariant:"outlined"})]},a)})},UH=()=>{const{sendTrackingEvent:e}=y.useContext(Vt),t=on(),n=wr(),r=Ge(sC)??[],A=Ge(Nc)??[],o=r.find(x=>x.name===za.MEMBER),s=Ge(Va),i=Ge(Ij)===Be.LOADING,[a,l]=y.useState([]),[c,d]=y.useState(o),[I,h]=y.useState(!1),{id:f=""}=TA(),[C]=io(),E=C.get("connectorId"),B=(s==null?void 0:s[f])||null,p=i||!a.length||!c.name,Q=[{name:Ic,route:`${Ye.BASEPATH}${Ye.DASHBOARD}`},{name:(B==null?void 0:B.name)||"",route:`${Ye.BASEPATH}${Ye.API_VIEW}/${f}`},{name:pV}],m=()=>{if(i)return;const x=c!=null&&c.name?[c.name]:[],w=a.map(j=>j.id),b=a.map(j=>j.name);E&&n(xc({connectorId:E,data:{roles:x,inboxes:{email:w,chat:[]}}})).unwrap().finally(()=>{e(et.APP_ACTIVATION_VISIBILITY_SAVED,{sm_names:b,roles:x}),h(!0)})},v=()=>{t(Ye.BASEPATH)};return u.jsxs("div",{className:"w-135 h-full flex flex-col",children:[B!=null&&B.name?u.jsx(gC,{shown:I,setShown:h,connectorName:B==null?void 0:B.name,onClose:v}):null,u.jsx("div",{className:"mb-9",children:u.jsx(m0,{options:Q})}),u.jsxs(g.Typography,{className:"!mb-6",variant:"h2",children:["Configure ",B==null?void 0:B.name," across Shared Mailboxes and roles"]}),u.jsxs("div",{className:"grow overflow-auto",children:[u.jsx(XH,{selectedEmailInboxes:a,setSelectedEmailInboxes:l,selectedRoles:c,setSelectedRoles:d,roles:r,inboxes:A}),u.jsx(g.Button,{className:"!mt-4",onClick:m,disabled:p,children:"Save and enable"})]})]})},qH=e=>zf([{path:Ye.BASEPATH,element:u.jsx(g0,{})},{path:Ye.DASHBOARD,element:u.jsx(g0,{})},{path:Ye.AUTH_SUCCESS,element:u.jsx(GH,{})},{path:`${Ye.API_VIEW}/:id`,element:u.jsx(CV,{})},{path:`${Ye.CONNECTOR_SETTINGS}/:id`,element:u.jsx(PH,{})},{path:`${Ye.NATIVE_INTEGRATION}/:id`,element:u.jsx(VH,{})},{path:`${Ye.CONNECTOR_INITIAL_SETUP}/:id`,element:u.jsx(UH,{})}],{basename:e}),ZH=({basename:e="/",metaData:t,userId:n})=>{var A;const r=y.useMemo(()=>qH(e),[e]);return(A=t==null?void 0:t.templateUpdates)!=null&&A.version&&n&&(_G(t.templateUpdates.version),RG(n)),u.jsx(Uf,{router:r})},KH="internal-chat",$H=g.styled(g.Box)`
|
|
3127
3127
|
padding: 43px 0px 0 35px;
|
|
3128
3128
|
box-sizing: border-box;
|
|
3129
3129
|
width: 100%;
|