@hiver/connector-admin 3.1.2-unifiedView2-beta.9 → 3.1.2-unifiedView2-beta.10

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 CHANGED
@@ -30343,6 +30343,7 @@ const ha = {
30343
30343
  {
30344
30344
  "data-testid": "modal",
30345
30345
  open: e,
30346
+ className: "connectorAdmin-portal",
30346
30347
  onClose: i,
30347
30348
  PaperProps: {
30348
30349
  style: {
package/index.umd.js CHANGED
@@ -2253,7 +2253,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
2253
2253
  height: 20px;
2254
2254
  background: linear-gradient(to right, #ffe250, #ffc350);
2255
2255
  color: ${g.palette.gray.gray1};
2256
- `,_m=e=>_.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{clipPath:"url(#clip0_9869_28517)"},_.createElement("path",{d:"M10 16.6666C6.32502 16.6666 3.33335 13.675 3.33335 9.99996C3.33335 6.32496 6.32502 3.33329 10 3.33329C13.675 3.33329 16.6667 6.32496 16.6667 9.99996C16.6667 13.675 13.675 16.6666 10 16.6666ZM10 18.3333C14.6 18.3333 18.3334 14.6 18.3334 9.99996C18.3334 5.39996 14.6 1.66663 10 1.66663C5.40002 1.66663 1.66669 5.39996 1.66669 9.99996C1.66669 14.6 5.40002 18.3333 10 18.3333ZM9.16669 9.99996V13.3333H10.8334V9.99996H13.3334L10 6.66663L6.66669 9.99996H9.16669Z",fill:"#506DFF"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_9869_28517"},_.createElement("rect",{width:20,height:20,fill:"white"})))),Dm=e=>_.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{clipPath:"url(#clip0_9681_423226)"},_.createElement("path",{d:"M9.99996 1.66663C5.39996 1.66663 1.66663 5.39996 1.66663 9.99996C1.66663 14.6 5.39996 18.3333 9.99996 18.3333C14.6 18.3333 18.3333 14.6 18.3333 9.99996C18.3333 5.39996 14.6 1.66663 9.99996 1.66663ZM9.99996 16.6666C6.31663 16.6666 3.33329 13.6833 3.33329 9.99996C3.33329 8.45829 3.85829 7.04163 4.74163 5.91663L14.0833 15.2583C12.9583 16.1416 11.5416 16.6666 9.99996 16.6666ZM15.2583 14.0833L5.91663 4.74163C7.04163 3.85829 8.45829 3.33329 9.99996 3.33329C13.6833 3.33329 16.6666 6.31663 16.6666 9.99996C16.6666 11.5416 16.1416 12.9583 15.2583 14.0833Z",fill:"#6F7C90"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_9681_423226"},_.createElement("rect",{width:20,height:20,fill:"white"})))),Vd=({id:e,logo:t,name:n,isEnabled:r,isAuthenticated:A,showUpgradeButton:o,isDeprecated:s,showIcons:a,showTooltip:i,showNewChip:l,onClick:c})=>{const d=()=>{if(!a)return null;switch(!0){case!r:return u.jsx(g.icons.InfoOutlined,{sx:{fontSize:"20px"}});case!A:return u.jsx(g.icons.ErrorOutline,{sx:{fontSize:"20px"},color:"error"});case o:return u.jsx(_m,{});case s:return u.jsx(Dm,{});default:return u.jsx(g.icons.CheckCircle,{sx:{fontSize:"20px"},color:"success"})}},f=()=>{if(!i)return null;switch(!0){case!r:return qF;case!A:return XF;case o:return UF;case s:return ZF;default:return""}};return u.jsx(g.Tooltip,{title:f(),placement:"bottom",arrow:!0,classes:{tooltip:"max-w-[252px]!"},children:u.jsxs("li",{className:`w-65 h-15 flex border-gray-6 border rounded-lg items-center p-3 justify-between cursor-pointer ${r?"":"opacity-70 bg-gray-6a"}`,onClick:()=>c(e),children:[u.jsxs("div",{className:"flex items-center gap-3",children:[t?u.jsx("div",{className:"w-8.75 h-8.75 shadow-icon rounded-md overflow-hidden",children:u.jsx("img",{src:t,alt:`${n} logo`,className:"w-full h-full"})}):null,u.jsx("div",{className:"text-body1",children:n})]}),d(),u.jsx(Fa,{hidden:!l,label:Gd})]},e)})},u7=()=>{const{sendTrackingEvent:e,availableFeatures:t}=y.useContext(Vt),n=on(),r=Ge(dm),A=Ge(nc),o=Ge(gM),s=a=>{var c;const i=gm({isTemplate:!0}),l=(c=A==null?void 0:A[a])==null?void 0:c.name;e(Ze.LIBRARY_CARD_CLICKED,{connector_name:l}),e(Ze.INTEGRATION_APP_CARD_CLICK,{app_name:l,app_state:i}),n(`${ze.BASEPATH}${ze.API_VIEW}/${a}`)};return u.jsx("ul",{className:"flex gap-5 flex-wrap","data-testid":"connector-library",children:o===Be.LOADING?u.jsx(Ic,{}):u.jsx(u.Fragment,{children:r.map(a=>{const i=A==null?void 0:A[a];if(!i)return null;const{isTemplateNew:l}=i,c=Oa(t)&&l;return u.jsx(Vd,{id:i.id,name:i.name,logo:i.logo,isDeprecated:i.isDeprecated,onClick:s,showNewChip:c,isEnabled:!0},a)})})})},Om=e=>e.connectorLirary.connectorList,fc=e=>e.connectorLirary.connectors,Hd=e=>e.connectorLirary.connectorsApiStatus,Lm=e=>e.connectorLirary.currentUpdatingConnectors,Bc=e=>e.connectorLirary.connectorDetailApiStatus,Wd=e=>e.connectorLirary.rolesAndPermissions,g7=e=>e.connectorLirary.updateEnableConnectorsApiStatus,d7=e=>e.connectorLirary.cardCustomFields,C7=e=>e.connectorLirary.cardCustomFieldsApiStatus,E7=e=>e.connectorLirary.notAuthenticatedConnectors,I7=e=>e.connectorLirary.requireUpgradeConnectors,f7=e=>e.connectorLirary.enableCustomCardApiStatus,B7=e=>e.connectorLirary.updateConnectorByIdApiStatus,pc=({id:e,status:t,connectorName:n,hideCta:r=!1})=>{const A=on(),o=()=>{A(`${ze.BASEPATH}${ze.CONNECTOR_SETTINGS}/${e}?isEdit=true`)},s=()=>r?null:u.jsx(g.Button,{size:"small",variant:"outlined",className:"ml-2.5! hover:bg-[#e3e9ff]! hover:text-[#506dff]! hover:border-[#506dff]!",onClick:o,children:"Re-Authenticate"});switch(t){case"upgrade":return u.jsxs(g.Alert,{severity:"info",icon:u.jsx(_m,{}),className:"bg-[#F0F3FF]! w-fit h-auto!",children:[Gs(KF,{connectorName:n}),s()]});case"notAuthenticated":return u.jsxs(g.Alert,{severity:"error",icon:u.jsx(g.icons.ErrorOutline,{sx:{fontSize:"20px"},color:"error"}),className:"bg-[#FFE6E6]! w-fit h-auto!",children:[Gs($F,{connectorName:n}),s()]});case"deprecated":return u.jsx(g.Alert,{severity:"error",icon:u.jsx(Dm,{className:"**:[path]:fill-red-hover"}),className:"bg-[#FFE0E3]! w-fit h-auto!",children:u.jsx("span",{className:"text-red-hover",children:Gs(eM,{connectorName:n})})});default:return null}},p7=()=>{const{sendTrackingEvent:e}=y.useContext(Vt),t=Ge(Om),n=Ge(fc),r=Ge(E7),A=Ge(I7),o=on(),s=a=>{const{id:i,name:l}=a,c=gm({connector:a});e(Ze.INTEGRATION_APP_CARD_CLICK,{app_name:l,app_state:c}),o(`${ze.BASEPATH}${ze.CONNECTOR_SETTINGS}/${i}?isEdit=true`)};return u.jsxs(u.Fragment,{children:[r.length||A.length?u.jsxs("div",{className:"flex gap-4 flex-col mb-4",children:[r.map(a=>{const i=n==null?void 0:n[a];return i?u.jsx(pc,{id:i.id,status:"notAuthenticated",connectorName:i.name},i.id):null}),A.map(a=>{const i=n==null?void 0:n[a];return i?u.jsx(pc,{id:i.id,status:"upgrade",connectorName:i.name},i.id):null})]}):null,u.jsx("ul",{className:"flex gap-5 flex-wrap","data-testid":"connector-custom-card",children:t.map(a=>{var i;return(i=n==null?void 0:n[a])!=null&&i.id?u.jsx(Vd,{id:n[a].id,name:n[a].name,logo:n[a].logo,isEnabled:n[a].isEnabled,isAuthenticated:n[a].isAuthenticated,showUpgradeButton:n[a].showUpgradeButton,isDeprecated:n[a].isDeprecated,showIcons:!0,showTooltip:!0,onClick:()=>s(n[a])},a):null})})]})},Q7="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_73646)'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_73646'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",zd=({shown:e,setShown:t,children:n,showCloseButton:r=!1,customPaperProps:A={},onClose:o})=>{const s=()=>{t(!1),o==null||o()};return u.jsx(g.Dialog,{"data-testid":"modal",open:e,onClose:s,PaperProps:{style:{borderRadius:12,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none",...A}},children:u.jsxs(g.Stack,{direction:"row",children:[r&&u.jsx(g.Box,{position:"absolute",right:10,top:10,children:u.jsx(g.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(g.IconButton,{onClick:s,"data-testid":"close-modal",children:u.jsx("img",{src:Q7})})})}),n]})})},Rm=e=>e.requestConnectorApi.connectorRequestsApiStatus,h7=e=>e.requestConnectorApi.requestableConnectors,m7=e=>e.requestConnectorApi.requestableApis,y7=({connectors:e,canSubmit:t,setSelectedConnectors:n,selectedConnectors:r,setOptionalDetails:A,handleSubmit:o,isApiText:s})=>{const{sendTrackingEvent:a}=y.useContext(Vt),l=Ge(Rm)===Be.LOADING,c=r.length===0?s?f8:B8:"";return y.useEffect(()=>{a(s?Ze.REQUEST_NEW_FEATURE_SHOWN:Ze.REQUEST_NEW_CONNECTOR_SHOWN)},[a,s]),u.jsx(g.Stack,{"data-testid":"request-panel",children:u.jsxs(g.Stack,{padding:"30px",height:"100%",children:[u.jsx(g.Stack,{width:"440px",height:"100%",children:u.jsxs(g.Stack,{gap:"14px",children:[u.jsxs(g.Stack,{gap:"4px",marginBottom:"36px",children:[u.jsx(g.Typography,{variant:"h2",children:s?C8:E8}),u.jsx(g.Typography,{variant:"body2",children:s?hm:I8})]}),u.jsx(g.Autocomplete,{"data-testid":"request-dropdown",disablePortal:!0,multiple:!0,disableCloseOnSelect:!0,limitTags:2,options:e,disabled:l,isOptionEqualToValue:(d,f)=>d.id===f.id,renderOption:(d,f,{selected:h})=>{const{key:B,...C}=d;return u.jsxs(g.Box,{component:"li",...C,minHeight:"36px",children:[u.jsx(g.Checkbox,{style:{marginRight:8},checked:h}),f.label]},B)},renderInput:d=>u.jsx(jd,{...d,variant:"outlined",placeholder:c}),ListboxProps:{style:{maxHeight:250}},onChange:(d,f)=>{n(f)}}),u.jsx(ym,{multiline:!0,fullWidth:!0,minRows:8,variant:"outlined",disabled:l,placeholder:p8,onChange:d=>{A(d.target.value)}})]})}),u.jsx(g.Stack,{alignItems:"flex-end",children:u.jsx(g.Button,{"data-testid":"submit-request-button",onClick:o,color:"tertiary",size:"medium",sx:{height:"32px",width:"140.25px"},disabled:!t||l,children:l?u.jsx(g.CircularProgress,{sx:{color:"#97A3B7"},size:20}):u.jsx("div",{children:Q8})})})]})})},Nm="data:image/svg+xml,%3csvg%20width='92'%20height='92'%20viewBox='0%200%2092%2092'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='46'%20cy='46'%20r='23'%20fill='%2336A40F'/%3e%3ccircle%20opacity='0.1'%20cx='45.5'%20cy='45.5'%20r='34.5'%20fill='%235AAA3D'/%3e%3ccircle%20opacity='0.1'%20cx='46'%20cy='46'%20r='46'%20fill='%232CAA00'/%3e%3cpath%20d='M37%2046L44%2053L58%2039'%20stroke='white'%20stroke-width='3'/%3e%3c/svg%3e",b7=g.styled(g.Box)`
2256
+ `,_m=e=>_.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{clipPath:"url(#clip0_9869_28517)"},_.createElement("path",{d:"M10 16.6666C6.32502 16.6666 3.33335 13.675 3.33335 9.99996C3.33335 6.32496 6.32502 3.33329 10 3.33329C13.675 3.33329 16.6667 6.32496 16.6667 9.99996C16.6667 13.675 13.675 16.6666 10 16.6666ZM10 18.3333C14.6 18.3333 18.3334 14.6 18.3334 9.99996C18.3334 5.39996 14.6 1.66663 10 1.66663C5.40002 1.66663 1.66669 5.39996 1.66669 9.99996C1.66669 14.6 5.40002 18.3333 10 18.3333ZM9.16669 9.99996V13.3333H10.8334V9.99996H13.3334L10 6.66663L6.66669 9.99996H9.16669Z",fill:"#506DFF"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_9869_28517"},_.createElement("rect",{width:20,height:20,fill:"white"})))),Dm=e=>_.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},_.createElement("g",{clipPath:"url(#clip0_9681_423226)"},_.createElement("path",{d:"M9.99996 1.66663C5.39996 1.66663 1.66663 5.39996 1.66663 9.99996C1.66663 14.6 5.39996 18.3333 9.99996 18.3333C14.6 18.3333 18.3333 14.6 18.3333 9.99996C18.3333 5.39996 14.6 1.66663 9.99996 1.66663ZM9.99996 16.6666C6.31663 16.6666 3.33329 13.6833 3.33329 9.99996C3.33329 8.45829 3.85829 7.04163 4.74163 5.91663L14.0833 15.2583C12.9583 16.1416 11.5416 16.6666 9.99996 16.6666ZM15.2583 14.0833L5.91663 4.74163C7.04163 3.85829 8.45829 3.33329 9.99996 3.33329C13.6833 3.33329 16.6666 6.31663 16.6666 9.99996C16.6666 11.5416 16.1416 12.9583 15.2583 14.0833Z",fill:"#6F7C90"})),_.createElement("defs",null,_.createElement("clipPath",{id:"clip0_9681_423226"},_.createElement("rect",{width:20,height:20,fill:"white"})))),Vd=({id:e,logo:t,name:n,isEnabled:r,isAuthenticated:A,showUpgradeButton:o,isDeprecated:s,showIcons:a,showTooltip:i,showNewChip:l,onClick:c})=>{const d=()=>{if(!a)return null;switch(!0){case!r:return u.jsx(g.icons.InfoOutlined,{sx:{fontSize:"20px"}});case!A:return u.jsx(g.icons.ErrorOutline,{sx:{fontSize:"20px"},color:"error"});case o:return u.jsx(_m,{});case s:return u.jsx(Dm,{});default:return u.jsx(g.icons.CheckCircle,{sx:{fontSize:"20px"},color:"success"})}},f=()=>{if(!i)return null;switch(!0){case!r:return qF;case!A:return XF;case o:return UF;case s:return ZF;default:return""}};return u.jsx(g.Tooltip,{title:f(),placement:"bottom",arrow:!0,classes:{tooltip:"max-w-[252px]!"},children:u.jsxs("li",{className:`w-65 h-15 flex border-gray-6 border rounded-lg items-center p-3 justify-between cursor-pointer ${r?"":"opacity-70 bg-gray-6a"}`,onClick:()=>c(e),children:[u.jsxs("div",{className:"flex items-center gap-3",children:[t?u.jsx("div",{className:"w-8.75 h-8.75 shadow-icon rounded-md overflow-hidden",children:u.jsx("img",{src:t,alt:`${n} logo`,className:"w-full h-full"})}):null,u.jsx("div",{className:"text-body1",children:n})]}),d(),u.jsx(Fa,{hidden:!l,label:Gd})]},e)})},u7=()=>{const{sendTrackingEvent:e,availableFeatures:t}=y.useContext(Vt),n=on(),r=Ge(dm),A=Ge(nc),o=Ge(gM),s=a=>{var c;const i=gm({isTemplate:!0}),l=(c=A==null?void 0:A[a])==null?void 0:c.name;e(Ze.LIBRARY_CARD_CLICKED,{connector_name:l}),e(Ze.INTEGRATION_APP_CARD_CLICK,{app_name:l,app_state:i}),n(`${ze.BASEPATH}${ze.API_VIEW}/${a}`)};return u.jsx("ul",{className:"flex gap-5 flex-wrap","data-testid":"connector-library",children:o===Be.LOADING?u.jsx(Ic,{}):u.jsx(u.Fragment,{children:r.map(a=>{const i=A==null?void 0:A[a];if(!i)return null;const{isTemplateNew:l}=i,c=Oa(t)&&l;return u.jsx(Vd,{id:i.id,name:i.name,logo:i.logo,isDeprecated:i.isDeprecated,onClick:s,showNewChip:c,isEnabled:!0},a)})})})},Om=e=>e.connectorLirary.connectorList,fc=e=>e.connectorLirary.connectors,Hd=e=>e.connectorLirary.connectorsApiStatus,Lm=e=>e.connectorLirary.currentUpdatingConnectors,Bc=e=>e.connectorLirary.connectorDetailApiStatus,Wd=e=>e.connectorLirary.rolesAndPermissions,g7=e=>e.connectorLirary.updateEnableConnectorsApiStatus,d7=e=>e.connectorLirary.cardCustomFields,C7=e=>e.connectorLirary.cardCustomFieldsApiStatus,E7=e=>e.connectorLirary.notAuthenticatedConnectors,I7=e=>e.connectorLirary.requireUpgradeConnectors,f7=e=>e.connectorLirary.enableCustomCardApiStatus,B7=e=>e.connectorLirary.updateConnectorByIdApiStatus,pc=({id:e,status:t,connectorName:n,hideCta:r=!1})=>{const A=on(),o=()=>{A(`${ze.BASEPATH}${ze.CONNECTOR_SETTINGS}/${e}?isEdit=true`)},s=()=>r?null:u.jsx(g.Button,{size:"small",variant:"outlined",className:"ml-2.5! hover:bg-[#e3e9ff]! hover:text-[#506dff]! hover:border-[#506dff]!",onClick:o,children:"Re-Authenticate"});switch(t){case"upgrade":return u.jsxs(g.Alert,{severity:"info",icon:u.jsx(_m,{}),className:"bg-[#F0F3FF]! w-fit h-auto!",children:[Gs(KF,{connectorName:n}),s()]});case"notAuthenticated":return u.jsxs(g.Alert,{severity:"error",icon:u.jsx(g.icons.ErrorOutline,{sx:{fontSize:"20px"},color:"error"}),className:"bg-[#FFE6E6]! w-fit h-auto!",children:[Gs($F,{connectorName:n}),s()]});case"deprecated":return u.jsx(g.Alert,{severity:"error",icon:u.jsx(Dm,{className:"**:[path]:fill-red-hover"}),className:"bg-[#FFE0E3]! w-fit h-auto!",children:u.jsx("span",{className:"text-red-hover",children:Gs(eM,{connectorName:n})})});default:return null}},p7=()=>{const{sendTrackingEvent:e}=y.useContext(Vt),t=Ge(Om),n=Ge(fc),r=Ge(E7),A=Ge(I7),o=on(),s=a=>{const{id:i,name:l}=a,c=gm({connector:a});e(Ze.INTEGRATION_APP_CARD_CLICK,{app_name:l,app_state:c}),o(`${ze.BASEPATH}${ze.CONNECTOR_SETTINGS}/${i}?isEdit=true`)};return u.jsxs(u.Fragment,{children:[r.length||A.length?u.jsxs("div",{className:"flex gap-4 flex-col mb-4",children:[r.map(a=>{const i=n==null?void 0:n[a];return i?u.jsx(pc,{id:i.id,status:"notAuthenticated",connectorName:i.name},i.id):null}),A.map(a=>{const i=n==null?void 0:n[a];return i?u.jsx(pc,{id:i.id,status:"upgrade",connectorName:i.name},i.id):null})]}):null,u.jsx("ul",{className:"flex gap-5 flex-wrap","data-testid":"connector-custom-card",children:t.map(a=>{var i;return(i=n==null?void 0:n[a])!=null&&i.id?u.jsx(Vd,{id:n[a].id,name:n[a].name,logo:n[a].logo,isEnabled:n[a].isEnabled,isAuthenticated:n[a].isAuthenticated,showUpgradeButton:n[a].showUpgradeButton,isDeprecated:n[a].isDeprecated,showIcons:!0,showTooltip:!0,onClick:()=>s(n[a])},a):null})})]})},Q7="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_825_73646)'%3e%3cpath%20d='M19%206.41L17.59%205L12%2010.59L6.41%205L5%206.41L10.59%2012L5%2017.59L6.41%2019L12%2013.41L17.59%2019L19%2017.59L13.41%2012L19%206.41Z'%20fill='%236F7C90'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_825_73646'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",zd=({shown:e,setShown:t,children:n,showCloseButton:r=!1,customPaperProps:A={},onClose:o})=>{const s=()=>{t(!1),o==null||o()};return u.jsx(g.Dialog,{"data-testid":"modal",open:e,className:"connectorAdmin-portal",onClose:s,PaperProps:{style:{borderRadius:12,padding:0,height:"fit-content",width:"fit-content",maxWidth:"none",...A}},children:u.jsxs(g.Stack,{direction:"row",children:[r&&u.jsx(g.Box,{position:"absolute",right:10,top:10,children:u.jsx(g.Tooltip,{title:"Close",placement:"bottom",children:u.jsx(g.IconButton,{onClick:s,"data-testid":"close-modal",children:u.jsx("img",{src:Q7})})})}),n]})})},Rm=e=>e.requestConnectorApi.connectorRequestsApiStatus,h7=e=>e.requestConnectorApi.requestableConnectors,m7=e=>e.requestConnectorApi.requestableApis,y7=({connectors:e,canSubmit:t,setSelectedConnectors:n,selectedConnectors:r,setOptionalDetails:A,handleSubmit:o,isApiText:s})=>{const{sendTrackingEvent:a}=y.useContext(Vt),l=Ge(Rm)===Be.LOADING,c=r.length===0?s?f8:B8:"";return y.useEffect(()=>{a(s?Ze.REQUEST_NEW_FEATURE_SHOWN:Ze.REQUEST_NEW_CONNECTOR_SHOWN)},[a,s]),u.jsx(g.Stack,{"data-testid":"request-panel",children:u.jsxs(g.Stack,{padding:"30px",height:"100%",children:[u.jsx(g.Stack,{width:"440px",height:"100%",children:u.jsxs(g.Stack,{gap:"14px",children:[u.jsxs(g.Stack,{gap:"4px",marginBottom:"36px",children:[u.jsx(g.Typography,{variant:"h2",children:s?C8:E8}),u.jsx(g.Typography,{variant:"body2",children:s?hm:I8})]}),u.jsx(g.Autocomplete,{"data-testid":"request-dropdown",disablePortal:!0,multiple:!0,disableCloseOnSelect:!0,limitTags:2,options:e,disabled:l,isOptionEqualToValue:(d,f)=>d.id===f.id,renderOption:(d,f,{selected:h})=>{const{key:B,...C}=d;return u.jsxs(g.Box,{component:"li",...C,minHeight:"36px",children:[u.jsx(g.Checkbox,{style:{marginRight:8},checked:h}),f.label]},B)},renderInput:d=>u.jsx(jd,{...d,variant:"outlined",placeholder:c}),ListboxProps:{style:{maxHeight:250}},onChange:(d,f)=>{n(f)}}),u.jsx(ym,{multiline:!0,fullWidth:!0,minRows:8,variant:"outlined",disabled:l,placeholder:p8,onChange:d=>{A(d.target.value)}})]})}),u.jsx(g.Stack,{alignItems:"flex-end",children:u.jsx(g.Button,{"data-testid":"submit-request-button",onClick:o,color:"tertiary",size:"medium",sx:{height:"32px",width:"140.25px"},disabled:!t||l,children:l?u.jsx(g.CircularProgress,{sx:{color:"#97A3B7"},size:20}):u.jsx("div",{children:Q8})})})]})})},Nm="data:image/svg+xml,%3csvg%20width='92'%20height='92'%20viewBox='0%200%2092%2092'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='46'%20cy='46'%20r='23'%20fill='%2336A40F'/%3e%3ccircle%20opacity='0.1'%20cx='45.5'%20cy='45.5'%20r='34.5'%20fill='%235AAA3D'/%3e%3ccircle%20opacity='0.1'%20cx='46'%20cy='46'%20r='46'%20fill='%232CAA00'/%3e%3cpath%20d='M37%2046L44%2053L58%2039'%20stroke='white'%20stroke-width='3'/%3e%3c/svg%3e",b7=g.styled(g.Box)`
2257
2257
  .request-new-connector-img {
2258
2258
  width: 500px;
2259
2259
  height: 500px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiver/connector-admin",
3
- "version": "3.1.2-unifiedView2-beta.9",
3
+ "version": "3.1.2-unifiedView2-beta.10",
4
4
  "main": "index.es.js",
5
5
  "module": "index.es.js",
6
6
  "types": "index.d.ts",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/v2/components/ui/modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,UAAU,WAAW;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0CvC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/v2/components/ui/modal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,UAAU,WAAW;IACnB,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAC7C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA2CvC,CAAC"}