aiware-js 1.0.0-master.1237 → 1.0.0-master.1239
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/js-core.esm.js +2 -2
- package/js-core.esm.js.gz +0 -0
- package/js-core.esm18.js +1 -1
- package/js-core.esm18.js.gz +0 -0
- package/js-core.esm2.js +2 -2
- package/js-core.esm2.js.gz +0 -0
- package/js-core.esm5.js +1 -1
- package/js-core.esm5.js.gz +0 -0
- package/js-core.esm57.js +94 -19
- package/js-core.esm57.js.gz +0 -0
- package/js-core.esm62.js +127 -4
- package/js-core.esm62.js.gz +0 -0
- package/js-core.esm64.js +1 -1
- package/js-core.esm64.js.gz +0 -0
- package/js-core.esm66.js +1 -1
- package/js-core.esm66.js.gz +0 -0
- package/js-core.esm68.js +1 -1
- package/js-core.esm68.js.gz +0 -0
- package/js-core.esm70.js +2 -2
- package/js-core.esm70.js.gz +0 -0
- package/js-core.esm71.js +1 -1
- package/js-core.esm71.js.gz +0 -0
- package/js-core.esm72.js +1 -1
- package/js-core.esm72.js.gz +0 -0
- package/js-core.esm74.js +1 -1
- package/js-core.esm74.js.gz +0 -0
- package/js-core.esm75.js +3 -2
- package/js-core.esm75.js.gz +0 -0
- package/js-core.esm84.js +1 -1
- package/js-core.esm84.js.gz +0 -0
- package/js-core.esm85.js +1 -1
- package/js-core.esm85.js.gz +0 -0
- package/js-core.umd.js +379 -182
- package/js-core.umd.js.gz +0 -0
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -4
package/js-core.esm66.js.gz
CHANGED
|
Binary file
|
package/js-core.esm68.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{X as createSlice,Y as combineReducers,ao as unmountPanel,j as jsxRuntime,bW as AIWareCacheProvider,aJ as AIWareThemeProvider,U as createSelector,Z as useSelector,K as userSelector,a0 as selectApiConfigs,r as react,bX as selectIsFullscreenEnabled,ap as mountPanel,V as Box,am as CircularProgress,bK as img$l,z as all,A as takeLatest$1,cc as useInterval,C as select,a4 as preferredLanguageSelector,a7 as AIWareFormatMessage,F as call,G as put,a5 as showMessage,a6 as MessageSeverity,a2 as lodash,a3 as baseGraphQLApiWithError}from"./js-core.esm.js";import{m as makeStyles,o as DynamicModuleLoader,A as AIWareIntlProvider,r as classNames,T as Typography,Z as Hide,g as Button,D as Divider,ah as Grid,F as FormattedMessage,bp as ArrowDown,bo as ArrowUp,cY as Iam,P as Popover,cv as MenuList,V as MenuItem,z as Dialog,C as DialogTitle,G as DialogContent,J as DialogContentText,K as DialogActions,I as Icon,bL as Upload,j as FormHelperText$2}from"./js-core.esm4.js";import{g as Tooltip,I as IconButton,G as Stepper,H as Step,J as StepLabel,f as CheckCircle,T as TextField,m as devErrorLogger,aA as default_1}from"./js-core.esm5.js";import{n as navSectionStyles,t as tableStyles,h as selectOrgIsUsersCurrentOrg,s as selectAdminCenterOrgId,S as Switch,i as safeFormatMessage,j as selectAdminCenterOrgIdString,k as contextMenuStyles}from"./js-core.esm2.js";import{C as ContentCopy}from"./js-core.esm60.js";import{M as MoreVert}from"./js-core.esm63.js";import{P as Public}from"./js-core.esm69.js";import{u as useDispatch}from"./js-core.esm6.js";import"./js-core.esm3.js";var useStyles$1=makeStyles()(e=>({root:{width:"560px",height:"auto"},configurationContainer:{minHeight:"650px"},spacer:{minHeight:e.spacing(2)},header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,backgroundColor:"#FAFAFA !important",display:"flex",height:64,padding:e.spacing(2)},headerTitle:{paddingLeft:e.spacing(4)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)},stepsContent:{overflowY:"scroll","&::-webkit-scrollbar":{width:"0"},height:"calc(100vh - 280px)"},stepper:{width:"80%",height:"75px",paddingLeft:"30px"},step:{".Sdk-MuiStepIcon-root.Sdk-Mui-active":{fill:e.palette.secondary.main},".Sdk-MuiStepIcon-root.Sdk-Mui-completed":{fill:e.palette.secondary.main}},sectionsButton:{paddingBottom:e.spacing(3)},sections:{paddingTop:e.spacing(3),paddingBottom:e.spacing(2.8)},container:{paddingTop:e.spacing(3),paddingLeft:e.spacing(3),paddingRight:e.spacing(3)},clientDivider:{paddingBottom:e.spacing(3)},previewButtonContainer:{marginTop:e.spacing(3),padding:e.spacing(3),background:"#FAFAFA"},previewButtonImage:{width:"30px",height:"30px",objectFit:"contain",marginRight:e.spacing(2)},previewButton:{height:"55px",marginBottom:e.spacing(4),textTransform:"none"},designContainer:{display:"flex",width:"100%",marginTop:e.spacing(3)},colorBlocksContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},colorBlock:{width:"30px",height:"30px",borderRadius:"4px"},colorValuesContainer:{display:"flex",justifyContent:"space-between",width:"100%"},buttonDesignErrorContainer:{marginTop:"10px",display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",color:"#E53935"},buttonDesignContainer:{display:"flex",flexDirection:"column",height:"137px",width:"100%",justifyContent:"space-between"},buttonPreviewLabel:{position:"absolute",fontSize:"12px",fontWeight:300,width:"75px",backgroundColor:"#fff",transform:"translate(2px, 0px) scale(.98)",color:"#5C6269",textAlign:"center",top:"-8px",left:"5px"},logo:{width:"100%",objectFit:"fill",borderRadius:"4px"},logoContainer:{height:"138px",width:"138px",position:"relative",borderRadius:"4px",marginRight:e.spacing(2)},buttonGroup:{position:"fixed",bottom:"20px",right:"80px",display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"flex-end",marginTop:e.spacing(3),marginRight:e.spacing(3)},button:{marginRight:e.spacing(1)},instructions:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},textField:{width:"100%"},textFieldButtonDesign:{marginLeft:0,marginRight:0,marginTop:0,width:"100%"},textFieldHexButtonDesign:{marginLeft:0,marginRight:0,marginTop:0,width:"48%"},inputBase:{fontWeight:400,fontSize:"14px"},inputContainer:{position:"relative"},fileInput:{position:"absolute",height:1,width:1,overflow:"hidden",clip:"rect(1px, 1px, 1px, 1px)"},imageWrapper:{position:"relative",alignItems:"center",borderRadius:4,border:"1px solid #ccc",boxSizing:"border-box",cursor:"pointer",display:"flex",width:137,height:137,justifyContent:"center",overflow:"hidden"},inputLogo:{position:"relative",height:138,width:138,objectFit:"contain"},removeBtn:{backgroundColor:"rgba(255, 255, 255, .7)",color:"#000",borderRadius:"25px",padding:8,position:"absolute",right:4,top:92},loadingCreate:{marginTop:"50px",display:"flex",width:"100%",height:"400px",justifyContent:"space-around",alignItems:"center",flexDirection:"column"},errorImage:{width:"235px",height:"235px"},retryButton:{marginTop:"10px"},isGlobalContainer:{borderRadius:4,backgroundColor:"#FAFAFA",padding:"10px",display:"flex",flexDirection:"row"},isGlobalTitle:{marginBottom:"5px"},isGlobalDescription:{width:"90%"}}));const visuallyHidden={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var visuallyHidden$1=visuallyHidden;const SHARED_TEXT={panelHeaderTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.ciRSCG",defaultMessage:"Login Connector",description:"Login Connector"}),closePanel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"}),loginStepsProviderConfiguration:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.6+P+4t",defaultMessage:"Provider Configuration",description:"Provider Configuration"}),loginStepsButtonDesign:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.pgJQ+P",defaultMessage:"Button Design",description:"Button Design"}),loginStepsNextButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.6V6DQY",defaultMessage:"Next",description:"Next Button"}),loginStepsBackButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.nsJ82A",defaultMessage:"Back",description:"Back Button"}),loginStepsCreateButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.DOAMwO",defaultMessage:"Create",description:"Create Button"}),loginStepsUpdateButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.aW7Qtx",defaultMessage:"Update",description:"Button that allows users to update their open id provider"}),loginStepsCloseButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.q5zf7S",defaultMessage:"Close",description:"Create Button"}),loginStepsErrorRequired:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.vjutlG",defaultMessage:"This field is required.",description:"required field"}),loginStepsErrorIssuerUrl:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.2VJeNw",defaultMessage:"This field is required. OpenID connect metaData document",description:"OPenId Metadata Document Required"}),loginStepsErrorBtnText:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.JuCywi",defaultMessage:"This field is required",description:"Button Text Required"}),loginStepsErrorBtnColor:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.lQChal",defaultMessage:'Needs Valid Six Digit Hex color ie.. "#FFFFFF"',description:"Valid Button Text Color Required"}),loginStepsErrorBtnLogo:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.8vQBmc",defaultMessage:"Please use a valid JPEG, PNG or SVG file smaller than 300KB",description:"Valid Button Logo Type File Size"}),providerInstructions:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.rpVpIA",defaultMessage:"Configure your new authentication option for users of this organization. This will be displayed on login.",description:"Provider Instructions"}),providerUpdateInstructions:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.i1Yvqc",defaultMessage:"Update your authentication options for users of this organization. This will be displayed on login. You will need to re-enter your Client Secret and Issuer URL for this connector",description:"Text to describe Instructions for this step of Login Connector Updating"}),providerSectionBasic:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.3nxOek",defaultMessage:"Basic Info",description:"Basic Info"}),providerInputName:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.+fYwFL",defaultMessage:"Name",description:"Name"}),providerInputDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.3T09+Q",defaultMessage:"Description",description:"Description"}),providerInputWebsiteUrl:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.pnHn3q",defaultMessage:"Website URL",description:"Website URL"}),providerSectionClient:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.EcoPxV",defaultMessage:"Client Info",description:"Client Info"}),providerInputClientId:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.uWdwr0",defaultMessage:"Client ID",description:"Client ID"}),providerInputClientSecret:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.6OgfIg",defaultMessage:"Client Secret",description:"Client Secret "}),providerInputIssuerUrl:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.mXH+F+",defaultMessage:"Issuer URL",description:"Issuer URL"}),providerGlobalTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.+k+hp1",defaultMessage:"Global Authentication",description:"Global Authentication"}),providerGlobalDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.fxc8x4",defaultMessage:"When enabled, this login provider will be available for all organizations within this environment. Please use with caution!",description:"Global description"}),buttonInstructions:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.gQIG1D",defaultMessage:"Set the look and feel of your login button for your users.",description:"Button Instructions"}),buttonPreview:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.dtsZya",defaultMessage:"Button Preview",description:"Button Preview"}),buttonLogo:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.XtAWcG",defaultMessage:"Button Logo",description:"Button Logo"}),buttonText:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.w2NwY1",defaultMessage:"Button Text Label",description:"Button Text"}),buttonColor:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.J2U6tX",defaultMessage:"Button Color",description:"Button Color"}),buttonTextColor:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.3GdHqA",defaultMessage:"Button Text Color",description:"Button Text Color"}),providerCreationCreated:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.q+GZ9g",defaultMessage:"Your Login Connector is being created!",description:"connector being created"}),providerCreationFailed:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.DVnePp",defaultMessage:"There was an error while creating your Open ID connector:",description:"connector creation failed"}),providerCreationRetryButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.muMXB+",defaultMessage:"Retry",description:"retry button"}),getProviderFailed:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.Iuo8e2",defaultMessage:"There was an error retrieving your existing Open ID connector",description:"Message to let user know that we could not retrieve thier Login Connector"})},Header=({onPanelClose:e})=>{var t=useStyles$1()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.header,"data-test":"admin-center-header"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:t.headerTitle,variant:"h1",color:"secondary","data-test":"admin-center-title"},{children:SHARED_TEXT.panelHeaderTitle()})),jsxRuntime.exports.jsxs("div",Object.assign({className:t.headerActionContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({style:visuallyHidden$1,id:"admin-center-close-panel"},{children:SHARED_TEXT.closePanel()})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.closePanel()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"admin-center-close-panel","data-test":"admin-center-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))},SLICE_NAME$1="adminCenterOpenIdDetail",LoginPrefix="Log in with ";function isImage(e){e=e.type;return["image/jpeg","image/png","image/svg+xml"].includes(e)}const ImageInput=({logoUrl:e,onChangeFormItem:t})=>{var s=useStyles$1()["classes"];const r=react.exports.useRef(null),[n,i]=react.exports.useState(e),[a,o]=react.exports.useState(!1);react.exports.useEffect(()=>{t("btnLogo",n)},[n,t]);return jsxRuntime.exports.jsxs("div",Object.assign({className:s.inputContainer},{children:[jsxRuntime.exports.jsx("input",{ref:r,id:"logo-input",name:"logo-input",type:"file",accept:"image/*",onChange:e=>{e=lodash.exports.get(e,"target.files[0]",null);if(null!==r.current&&(r.current.value=""),isImage(e)&&e.size<=3e5){var t=e=>{"string"==typeof e&&i(e),o(!1)};const s=new FileReader;s.readAsDataURL(e),s.onload=function(){t(s.result)},s.onerror=function(e){o(!0),console.log("Error: ",e)}}else o(!0)},className:s.fileInput,"aria-label":"Upload Logo"}),jsxRuntime.exports.jsx("div",Object.assign({className:s.imageWrapper,role:"button"},{children:n?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("img",{"data-test":"admin-center-image-loaded",src:n,alt:"logo",className:s.inputLogo}),jsxRuntime.exports.jsx(Icon,{"data-test":"admin-center-remove-image","aria-label":"Remove Image",fontSize:"large",className:s.removeBtn,onClick:()=>{o(!1),i("")},component:default_1})]}):jsxRuntime.exports.jsx(Icon,{onClick:()=>{null!==r.current&&r.current.click()},"data-test":"upload-icon",fontSize:"large",component:Upload})})),jsxRuntime.exports.jsx(FormHelperText$2,Object.assign({"data-test":"admin-center-logo-upload-error",error:a},{children:a?SHARED_TEXT.loginStepsErrorBtnLogo():""}))]}))},ButtonDesign=({formData:e,errorForm:t,onChangeFormItem:s,handleChangeForm:r})=>{const n=useStyles$1()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:n.configurationContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:n.container},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"admin-center-button-instructions",variant:"body2",color:"textPrimary"},{children:SHARED_TEXT.buttonInstructions()}))})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.previewButtonContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:n.sectionsButton,variant:"h6",color:"textPrimary"},{children:SHARED_TEXT.buttonPreview()})),jsxRuntime.exports.jsxs(Button,Object.assign({style:{color:""+e.btnTextColor,backgroundColor:""+e.btnColor},"data-test":"admin-center-input-previewButton",variant:"outlined",color:"primary",fullWidth:!0,className:n.previewButton},{children:[e.btnLogo?jsxRuntime.exports.jsx("img",{"data-test":"admin-center-preview-logo",alt:"previewLogo",className:n.previewButtonImage,src:e.btnLogo}):null,null!=e&&e.btnText?""+LoginPrefix+(null==e?void 0:e.btnText):LoginPrefix+"<open id connect name>"]}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.container},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:n.designContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-logo",className:n.logoContainer},{children:[jsxRuntime.exports.jsx(ImageInput,{onChangeFormItem:s,logoUrl:null!=e&&e.btnLogo?null==e?void 0:e.btnLogo:""}),jsxRuntime.exports.jsx("div",Object.assign({className:n.buttonPreviewLabel},{children:SHARED_TEXT.buttonLogo()}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.buttonDesignContainer},{children:[jsxRuntime.exports.jsx(TextField,{required:!0,id:"btnText","data-test":"admin-center-input-btnText",autoComplete:"off",label:SHARED_TEXT.buttonText(),variant:"outlined",className:n.textFieldButtonDesign,value:null==e?void 0:e.btnText,onChange:r("btnText"),error:""!==t.btnText}),jsxRuntime.exports.jsx("div",Object.assign({className:n.colorBlocksContainer},{children:["#FB8C00","#FFB300","#00897B","#43A047","#039BE5","#1E88E5","#ADB8C2","#E53935","#D81B60","#8E24AA"].map(e=>jsxRuntime.exports.jsx("div",{className:n.colorBlock,style:{backgroundColor:e},onClick:()=>s("btnColor",""+e)},e))})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.colorValuesContainer},{children:[jsxRuntime.exports.jsx(TextField,{required:!0,id:"btnColor","data-test":"admin-center-input-btnColor",autoComplete:"off",label:SHARED_TEXT.buttonColor(),variant:"outlined",className:n.textFieldHexButtonDesign,value:null==e?void 0:e.btnColor,onChange:r("btnColor"),error:""!==t.btnColor,InputProps:{classes:{input:n.inputBase}},size:"small"}),jsxRuntime.exports.jsx(TextField,{required:!0,id:"btnTextColor","data-test":"admin-center-input-btnTextColor",autoComplete:"off",label:SHARED_TEXT.buttonTextColor(),variant:"outlined",className:n.textFieldHexButtonDesign,value:null==e?void 0:e.btnTextColor,onChange:r("btnTextColor"),error:""!==t.btnTextColor,InputProps:{classes:{input:n.inputBase}},size:"small"})]}))]}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.buttonDesignErrorContainer},{children:[t.btnText?jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-text-error"},{children:[SHARED_TEXT.buttonText(),": ",t.btnText]})):null,t.btnColor?jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-color-error"},{children:[SHARED_TEXT.buttonColor(),": ",t.btnColor]})):null,t.btnTextColor?jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-text-color-error"},{children:[SHARED_TEXT.buttonTextColor(),": ",t.btnTextColor]})):null]}))]}))]}))};function roleHelper(e){var t={isSuperAdmin:!1,isAdmin:!1};return e&&(0<=e.indexOf("superadmin")&&(t.isSuperAdmin=!0),0<=e.indexOf("admin"))&&(t.isAdmin=!0),t}const SLICE_NAME="adminCenterIam",namespace$1="uiState",initialState$1={status:"pending",openIdProvider:{name:"",description:"",websiteUrl:"",clientId:"",clientSecret:"",issuerUrl:"",btnText:"",btnLogo:"",btnColor:"#FFFFFF",btnTextColor:"#000000",isGlobal:!1},appId:{id:""},existingOpenIdProvider:{id:""},newProvider:{status:"idle",errorMessage:""}},slice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{init(e,{payload:t}){e.status="pending",e.existingOpenIdProvider.id=t.connectorId,e.appId.id=t.appId},initDone(e){e.status="idle"},initFailed(e){e.status="failure"},updateAppId(e,{payload:t}){e.appId=t},updateOpenIdConnector(e,{payload:t}){e.openIdProvider=t},startCreateNewProvider(e){e.newProvider.status="pending"},createNewProviderSuccess(e){e.newProvider.status="idle",e.openIdProvider=initialState$1.openIdProvider},createNewProviderFailed(e,{payload:t}){e.newProvider={status:t.status,errorMessage:t.errorMessage}}}}),actions$2=slice.actions;var uiState$1=slice.reducer;const namespace=SLICE_NAME$1,actions$1={[namespace$1]:actions$2},rootReducer=combineReducers({[namespace$1]:uiState$1}),selectUIStateStatus=e=>e[namespace].uiState.status,selectAppId=e=>e[namespace].uiState.appId,selectOpenIdProvider=e=>e[namespace].uiState.openIdProvider,selectCreateNewProvider=e=>e[namespace].uiState.newProvider,selectExistingProvider=e=>e[namespace].uiState.existingOpenIdProvider;var uiState=Object.freeze({__proto__:null,selectUIStateStatus:selectUIStateStatus,selectAppId:selectAppId,selectOpenIdProvider:selectOpenIdProvider,selectCreateNewProvider:selectCreateNewProvider,selectExistingProvider:selectExistingProvider});const VERITONE_ORG=7682,ProviderConfiguration=({formData:e,errorForm:t,handleChangeForm:s})=>{var r=useStyles$1()["classes"],n=roleHelper(useSelector(userSelector).roles||null),i=useSelector(selectExistingProvider),a=useSelector(selectAdminCenterOrgId);return jsxRuntime.exports.jsx("div",Object.assign({className:r.configurationContainer},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.container},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"admin-center-provider-instructions",variant:"body2",color:"textPrimary"},{children:i.id?SHARED_TEXT.providerUpdateInstructions():SHARED_TEXT.providerInstructions()})),jsxRuntime.exports.jsx(Typography,Object.assign({className:r.sections,variant:"h6",color:"textPrimary"},{children:SHARED_TEXT.providerSectionBasic()})),jsxRuntime.exports.jsx(TextField,{required:!0,id:"name","data-test":"admin-center-input-name",autoComplete:"off",label:SHARED_TEXT.providerInputName(),variant:"outlined",className:r.textField,value:null==e?void 0:e.name,onChange:s("name"),error:""!==t.name,helperText:t.name}),jsxRuntime.exports.jsx("div",{className:r.spacer}),jsxRuntime.exports.jsx(TextField,{id:"description","data-test":"admin-center-input-description",autoComplete:"off",label:SHARED_TEXT.providerInputDescription(),variant:"outlined",multiline:!0,rows:3,className:r.textField,value:null==e?void 0:e.description,onChange:s("description"),error:""!==t.description,helperText:t.description,inputProps:{maxLength:100}}),jsxRuntime.exports.jsx("div",{className:r.spacer}),jsxRuntime.exports.jsx(TextField,{id:"websiteUrl","data-test":"admin-center-input-websiteUrl",autoComplete:"off",label:SHARED_TEXT.providerInputWebsiteUrl(),variant:"outlined",className:r.textField,value:null==e?void 0:e.websiteUrl,onChange:s("websiteUrl"),error:""!==t.websiteUrl,helperText:t.websiteUrl}),jsxRuntime.exports.jsx(Divider,{variant:"fullWidth"}),jsxRuntime.exports.jsx(Typography,Object.assign({className:r.sections,variant:"h6",color:"textPrimary"},{children:SHARED_TEXT.providerSectionClient()})),!i.id&&jsxRuntime.exports.jsx(TextField,{required:!0,id:"clientId","data-test":"admin-center-input-clientId",autoComplete:"off",label:SHARED_TEXT.providerInputClientId(),variant:"outlined",className:r.textField,value:null==e?void 0:e.clientId,onChange:s("clientId"),error:""!==t.clientId,helperText:t.clientId}),jsxRuntime.exports.jsx("div",{className:r.spacer}),jsxRuntime.exports.jsx(TextField,{required:!0,id:"clientSecret","data-test":"admin-center-input-clientSecret",autoComplete:"off",label:SHARED_TEXT.providerInputClientSecret(),variant:"outlined",className:r.textField,value:null==e?void 0:e.clientSecret,onChange:s("clientSecret"),error:""!==t.clientSecret,helperText:t.clientSecret}),jsxRuntime.exports.jsx("div",{className:r.spacer}),jsxRuntime.exports.jsx(TextField,{required:!0,id:"issuerUrl","data-test":"admin-center-input-issuerUrl",autoComplete:"off",label:SHARED_TEXT.providerInputIssuerUrl(),variant:"outlined",className:r.textField,value:null==e?void 0:e.issuerUrl,onChange:s("issuerUrl"),error:""!==t.issuerUrl,helperText:t.issuerUrl}),jsxRuntime.exports.jsx("div",{className:r.spacer}),!i.id&&n.isSuperAdmin&&a===VERITONE_ORG&&jsxRuntime.exports.jsxs("div",Object.assign({className:r.isGlobalContainer},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:r.isGlobalTitle,variant:"h6"},{children:SHARED_TEXT.providerGlobalTitle()})),jsxRuntime.exports.jsx(Typography,Object.assign({className:r.isGlobalDescription,variant:"body2"},{children:SHARED_TEXT.providerGlobalDescription()}))]}),jsxRuntime.exports.jsx(Switch,{"data-test":"admin-center-isglobal-switch",value:e.isGlobal,onChange:s("isGlobal")})]}))]}))}))},ProviderCreation=({handlePanelClose:e})=>{const t=useStyles$1()["classes"],s=useDispatch(),r=useSelector(selectCreateNewProvider),n=react.exports.useRef(!1);react.exports.useEffect(()=>{n.current&&"idle"===r.status&&e(),n.current=!0},[r,e]);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.configurationContainer},{children:[jsxRuntime.exports.jsx(Divider,{variant:"fullWidth"}),"idle"===r.status?null:"pending"===r.status?jsxRuntime.exports.jsxs("div",Object.assign({className:t.loadingCreate},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2"},{children:SHARED_TEXT.providerCreationCreated()})),jsxRuntime.exports.jsx(CircularProgress,{"data-test":"admin-center-provider-creation-loader"})]})):"failure"===r.status?jsxRuntime.exports.jsxs("div",Object.assign({className:t.loadingCreate},{children:[jsxRuntime.exports.jsx("img",{"data-test":"admin-center-error-image",alt:"error",className:t.errorImage,src:img$l}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:SHARED_TEXT.providerCreationFailed()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:r.errorMessage})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>s(actions$1.uiState.startCreateNewProvider()),className:t.retryButton,variant:"outlined",color:"primary","data-test":"admin-center-retry-button"},{children:SHARED_TEXT.providerCreationRetryButton()}))]})):void 0]}))},LoginConnectorSteps=({handlePanelClose:e})=>{const s=useStyles$1()["classes"],t=useDispatch(),r=useSelector(selectExistingProvider);var n=useSelector(selectOpenIdProvider);const[i,a]=react.exports.useState(0),[o,l]=react.exports.useState(n),[d,c]=react.exports.useState({name:"",description:"",websiteUrl:"",clientId:"",clientSecret:"",issuerUrl:"",btnText:"",btnLogo:"",btnColor:"",btnTextColor:"",isGlobal:!1});react.exports.useEffect(()=>{t(actions$1.uiState.updateOpenIdConnector(o))},[o,t]);const p=[SHARED_TEXT.loginStepsProviderConfiguration(),SHARED_TEXT.loginStepsButtonDesign()];var n=()=>{0===i&&!(()=>{let e=!0;var t={};return o.name||(t.name=SHARED_TEXT.loginStepsErrorRequired(),e=!1),o.clientId||r.id||(t.clientId=SHARED_TEXT.loginStepsErrorRequired(),e=!1),o.clientSecret||(t.clientSecret=SHARED_TEXT.loginStepsErrorRequired(),e=!1),o.issuerUrl||(t.issuerUrl=SHARED_TEXT.loginStepsErrorIssuerUrl(),e=!1),c(Object.assign(Object.assign({},d),t)),e})()||1===i&&!(()=>{let e=!0;var t={},s="^#[A-Fa-f0-9]{6}$";return o.btnText||(t.btnText=SHARED_TEXT.loginStepsErrorBtnText(),e=!1),o.btnColor&&o.btnColor.match(s)||(t.btnColor=SHARED_TEXT.loginStepsErrorBtnColor(),e=!1),o.btnTextColor&&o.btnTextColor.match(s)||(t.btnTextColor=SHARED_TEXT.loginStepsErrorBtnColor(),e=!1),c(Object.assign(Object.assign({},d),t)),e})()||(a(e=>e+1),i!==p.length-1)||t(actions$1.uiState.startCreateNewProvider())},u=()=>{a(e=>e-1)};const x=react.exports.useCallback((t,s)=>{l(e=>Object.assign(Object.assign({},e),{[t]:s})),c(e=>Object.assign(Object.assign({},e),{[t]:""}))},[l,c]),m=t=>e=>{e="isGlobal"===t?e.target.checked:e.target.value;x(t,e)};return jsxRuntime.exports.jsxs("div",Object.assign({className:s.root,"data-test":"os-admin-center.open-id.login-connector"},{children:[jsxRuntime.exports.jsx(Stepper,Object.assign({className:s.stepper,activeStep:i,"data-test":"os-admin-center.open-id.login-stepper"},{children:p.map((e,t)=>{return jsxRuntime.exports.jsx(Step,Object.assign({className:s.step},{},{children:jsxRuntime.exports.jsx(StepLabel,Object.assign({},{},{children:e}))}),t)})})),jsxRuntime.exports.jsxs("div",{children:[i===p.length&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(ProviderCreation,{handlePanelClose:e}),jsxRuntime.exports.jsxs("div",Object.assign({className:s.buttonGroup},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"admin-center-steps-btn-back",disabled:0===i,onClick:u,className:s.button},{children:SHARED_TEXT.loginStepsBackButton()})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:e,className:s.button,"data-test":"admin-center-steps-btn-close"},{children:SHARED_TEXT.loginStepsCloseButton()}))]}))]}),i!==p.length&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx("div",Object.assign({className:s.stepsContent},{children:function(e){switch(e){case 0:return jsxRuntime.exports.jsx(ProviderConfiguration,{errorForm:d,formData:o,handleChangeForm:m});case 1:return jsxRuntime.exports.jsx(ButtonDesign,{errorForm:d,formData:o,handleChangeForm:m,onChangeFormItem:x});default:return}}(i)})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.buttonGroup},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"admin-center-steps-btn-back",disabled:0===i,onClick:u,className:s.button},{children:SHARED_TEXT.loginStepsBackButton()})),i===p.length-1?jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:n,className:s.button,"data-test":"admin-center-steps-btn-create"},{children:r.id?SHARED_TEXT.loginStepsUpdateButton():SHARED_TEXT.loginStepsCreateButton()})):jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:n,className:s.button,"data-test":"admin-center-steps-btn-next"},{children:SHARED_TEXT.loginStepsNextButton()}))]}))]})]})]}))},ConnectorError=()=>{var e=useStyles$1()["classes"];const t=useDispatch(),s=useSelector(selectExistingProvider),r=useSelector(selectAppId);return jsxRuntime.exports.jsxs("div",Object.assign({className:e.loadingCreate},{children:[jsxRuntime.exports.jsx("img",{"data-test":"admin-center-error-image",alt:"error",className:e.errorImage,src:img$l}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:SHARED_TEXT.getProviderFailed()})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>t(actions$1.uiState.init({connectorId:s.id,appId:r.id})),className:e.retryButton,variant:"outlined",color:"primary","data-test":"admin-center-retry-button"},{children:SHARED_TEXT.providerCreationRetryButton()}))]}))},MainLayout=({dataId:e,appId:t,connectorId:s,panelRendered:r})=>{var n=useStyles$1()["classes"];const i=useSelector(selectUIStateStatus),a=useDispatch(),o=useSelector(userSelector),{apiRoot:l,graphQLEndpoint:d,token:c}=useSelector(selectApiConfigs);react.exports.useEffect(()=>{"pending"===i&&l&&d&&c&&o&&a(actions$1.uiState.init({connectorId:s,appId:t}))},[i,l,d,c,t,s,o,a]);var p=react.exports.useCallback(()=>{a(unmountPanel(e))},[a,e]);return!(l&&d&&c&&r&&o&&null!==o&&void 0!==o&&o.roles&&roleHelper(o.roles).isAdmin&&"pending"!==i)?null:jsxRuntime.exports.jsxs("div",Object.assign({id:e,role:"presentation","data-test":"admin-center-widget",className:classNames(n.root)},{children:[jsxRuntime.exports.jsx(Header,{onPanelClose:p}),"failure"===i&&jsxRuntime.exports.jsx(ConnectorError,{"data-test":"admin-center-widget.error"}),"idle"===i&&jsxRuntime.exports.jsx(LoginConnectorSteps,{handlePanelClose:p})]}))},OPEN_ID_PANEL="ADMIN_CENTER_OPEN_ID",initialState={status:"idle",providers:[],selectedProviderId:null},iamSlice=createSlice({name:SLICE_NAME,initialState:initialState,reducers:{fetchProvidersStart(e){e.status="pending"},fetchProvidersSuccess(e,t){e.status="success",e.providers=t.payload},fetchProvidersFailure(e){e.status="failure"},setCreatePanelSelected(e){e.selectedProviderId=""},openProviderDetailPanel(e,t){e.selectedProviderId=t.payload},closeProviderDetailPanel(e){e.selectedProviderId=null},deleteProviderStart(e,t){e.status="pending"},deleteProviderSuccess(e){e.status="success"},deleteProviderFailure(e){e.status="failure"}},extraReducers:e=>{e.addCase(unmountPanel,(e,t)=>(t.payload===OPEN_ID_PANEL&&(e.selectedProviderId=null),e))}}),actions=iamSlice.actions;var _path,_path2,_path3,_path4,_path5,_path6,_path7,_path8,_path9,_path10,_path11,_path12,_path13,_path14,_path15,_path16,_path17,_path18,_path19,_path20,_path21,_path22,_path23,_path24,_g,_path25,_path26,_path27,_defs,iamRootReducer=iamSlice.reducer;function __awaiter(e,a,o,l){return new(o=o||Promise)(function(s,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?s(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(r,n)}i((l=l.apply(e,a||[])).next())})}function createOpenIdProvider(t,s){return __awaiter(this,void 0,void 0,function*(){var e=yield baseGraphQLApiWithError(Object.assign({query:`
|
|
1
|
+
import{X as createSlice,Y as combineReducers,ao as unmountPanel,j as jsxRuntime,bW as AIWareCacheProvider,aJ as AIWareThemeProvider,U as createSelector,Z as useSelector,K as userSelector,a0 as selectApiConfigs,r as react,bX as selectIsFullscreenEnabled,ap as mountPanel,V as Box,am as CircularProgress,bK as img$l,z as all,A as takeLatest$1,cc as useInterval,C as select,a4 as preferredLanguageSelector,a7 as AIWareFormatMessage,F as call,G as put,a5 as showMessage,a6 as MessageSeverity,a2 as lodash,a3 as baseGraphQLApiWithError}from"./js-core.esm.js";import{m as makeStyles,o as DynamicModuleLoader,A as AIWareIntlProvider,r as classNames,T as Typography,Z as Hide,g as Button,D as Divider,ah as Grid,F as FormattedMessage,bp as ArrowDown,bo as ArrowUp,cY as Iam,P as Popover,cv as MenuList,V as MenuItem,z as Dialog,C as DialogTitle,G as DialogContent,J as DialogContentText,K as DialogActions,I as Icon,bL as Upload,j as FormHelperText$2}from"./js-core.esm4.js";import{g as Tooltip,I as IconButton,G as Stepper,H as Step,J as StepLabel,f as CheckCircle,T as TextField,m as devErrorLogger,aA as default_1}from"./js-core.esm5.js";import{n as navSectionStyles,t as tableStyles,j as selectOrgIsUsersCurrentOrg,s as selectAdminCenterOrgId,S as Switch,k as safeFormatMessage,l as selectAdminCenterOrgIdString,m as contextMenuStyles}from"./js-core.esm2.js";import{C as ContentCopy}from"./js-core.esm60.js";import{M as MoreVert}from"./js-core.esm63.js";import{P as Public}from"./js-core.esm69.js";import{u as useDispatch}from"./js-core.esm6.js";import"./js-core.esm3.js";var useStyles$1=makeStyles()(e=>({root:{width:"560px",height:"auto"},configurationContainer:{minHeight:"650px"},spacer:{minHeight:e.spacing(2)},header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,backgroundColor:"#FAFAFA !important",display:"flex",height:64,padding:e.spacing(2)},headerTitle:{paddingLeft:e.spacing(4)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)},stepsContent:{overflowY:"scroll","&::-webkit-scrollbar":{width:"0"},height:"calc(100vh - 280px)"},stepper:{width:"80%",height:"75px",paddingLeft:"30px"},step:{".Sdk-MuiStepIcon-root.Sdk-Mui-active":{fill:e.palette.secondary.main},".Sdk-MuiStepIcon-root.Sdk-Mui-completed":{fill:e.palette.secondary.main}},sectionsButton:{paddingBottom:e.spacing(3)},sections:{paddingTop:e.spacing(3),paddingBottom:e.spacing(2.8)},container:{paddingTop:e.spacing(3),paddingLeft:e.spacing(3),paddingRight:e.spacing(3)},clientDivider:{paddingBottom:e.spacing(3)},previewButtonContainer:{marginTop:e.spacing(3),padding:e.spacing(3),background:"#FAFAFA"},previewButtonImage:{width:"30px",height:"30px",objectFit:"contain",marginRight:e.spacing(2)},previewButton:{height:"55px",marginBottom:e.spacing(4),textTransform:"none"},designContainer:{display:"flex",width:"100%",marginTop:e.spacing(3)},colorBlocksContainer:{display:"flex",flexDirection:"row",justifyContent:"space-between",width:"100%"},colorBlock:{width:"30px",height:"30px",borderRadius:"4px"},colorValuesContainer:{display:"flex",justifyContent:"space-between",width:"100%"},buttonDesignErrorContainer:{marginTop:"10px",display:"flex",flexDirection:"column",width:"100%",alignItems:"center",justifyContent:"center",color:"#E53935"},buttonDesignContainer:{display:"flex",flexDirection:"column",height:"137px",width:"100%",justifyContent:"space-between"},buttonPreviewLabel:{position:"absolute",fontSize:"12px",fontWeight:300,width:"75px",backgroundColor:"#fff",transform:"translate(2px, 0px) scale(.98)",color:"#5C6269",textAlign:"center",top:"-8px",left:"5px"},logo:{width:"100%",objectFit:"fill",borderRadius:"4px"},logoContainer:{height:"138px",width:"138px",position:"relative",borderRadius:"4px",marginRight:e.spacing(2)},buttonGroup:{position:"fixed",bottom:"20px",right:"80px",display:"flex",flexDirection:"row",justifyContent:"flex-end",alignItems:"flex-end",marginTop:e.spacing(3),marginRight:e.spacing(3)},button:{marginRight:e.spacing(1)},instructions:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},textField:{width:"100%"},textFieldButtonDesign:{marginLeft:0,marginRight:0,marginTop:0,width:"100%"},textFieldHexButtonDesign:{marginLeft:0,marginRight:0,marginTop:0,width:"48%"},inputBase:{fontWeight:400,fontSize:"14px"},inputContainer:{position:"relative"},fileInput:{position:"absolute",height:1,width:1,overflow:"hidden",clip:"rect(1px, 1px, 1px, 1px)"},imageWrapper:{position:"relative",alignItems:"center",borderRadius:4,border:"1px solid #ccc",boxSizing:"border-box",cursor:"pointer",display:"flex",width:137,height:137,justifyContent:"center",overflow:"hidden"},inputLogo:{position:"relative",height:138,width:138,objectFit:"contain"},removeBtn:{backgroundColor:"rgba(255, 255, 255, .7)",color:"#000",borderRadius:"25px",padding:8,position:"absolute",right:4,top:92},loadingCreate:{marginTop:"50px",display:"flex",width:"100%",height:"400px",justifyContent:"space-around",alignItems:"center",flexDirection:"column"},errorImage:{width:"235px",height:"235px"},retryButton:{marginTop:"10px"},isGlobalContainer:{borderRadius:4,backgroundColor:"#FAFAFA",padding:"10px",display:"flex",flexDirection:"row"},isGlobalTitle:{marginBottom:"5px"},isGlobalDescription:{width:"90%"}}));const visuallyHidden={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var visuallyHidden$1=visuallyHidden;const SHARED_TEXT={panelHeaderTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.ciRSCG",defaultMessage:"Login Connector",description:"Login Connector"}),closePanel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"}),loginStepsProviderConfiguration:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.6+P+4t",defaultMessage:"Provider Configuration",description:"Provider Configuration"}),loginStepsButtonDesign:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.pgJQ+P",defaultMessage:"Button Design",description:"Button Design"}),loginStepsNextButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.6V6DQY",defaultMessage:"Next",description:"Next Button"}),loginStepsBackButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.nsJ82A",defaultMessage:"Back",description:"Back Button"}),loginStepsCreateButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.DOAMwO",defaultMessage:"Create",description:"Create Button"}),loginStepsUpdateButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.aW7Qtx",defaultMessage:"Update",description:"Button that allows users to update their open id provider"}),loginStepsCloseButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.q5zf7S",defaultMessage:"Close",description:"Create Button"}),loginStepsErrorRequired:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.vjutlG",defaultMessage:"This field is required.",description:"required field"}),loginStepsErrorIssuerUrl:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.2VJeNw",defaultMessage:"This field is required. OpenID connect metaData document",description:"OPenId Metadata Document Required"}),loginStepsErrorBtnText:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.JuCywi",defaultMessage:"This field is required",description:"Button Text Required"}),loginStepsErrorBtnColor:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.lQChal",defaultMessage:'Needs Valid Six Digit Hex color ie.. "#FFFFFF"',description:"Valid Button Text Color Required"}),loginStepsErrorBtnLogo:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.8vQBmc",defaultMessage:"Please use a valid JPEG, PNG or SVG file smaller than 300KB",description:"Valid Button Logo Type File Size"}),providerInstructions:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.rpVpIA",defaultMessage:"Configure your new authentication option for users of this organization. This will be displayed on login.",description:"Provider Instructions"}),providerUpdateInstructions:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.i1Yvqc",defaultMessage:"Update your authentication options for users of this organization. This will be displayed on login. You will need to re-enter your Client Secret and Issuer URL for this connector",description:"Text to describe Instructions for this step of Login Connector Updating"}),providerSectionBasic:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.3nxOek",defaultMessage:"Basic Info",description:"Basic Info"}),providerInputName:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.+fYwFL",defaultMessage:"Name",description:"Name"}),providerInputDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.3T09+Q",defaultMessage:"Description",description:"Description"}),providerInputWebsiteUrl:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.pnHn3q",defaultMessage:"Website URL",description:"Website URL"}),providerSectionClient:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.EcoPxV",defaultMessage:"Client Info",description:"Client Info"}),providerInputClientId:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.uWdwr0",defaultMessage:"Client ID",description:"Client ID"}),providerInputClientSecret:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.6OgfIg",defaultMessage:"Client Secret",description:"Client Secret "}),providerInputIssuerUrl:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.mXH+F+",defaultMessage:"Issuer URL",description:"Issuer URL"}),providerGlobalTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.+k+hp1",defaultMessage:"Global Authentication",description:"Global Authentication"}),providerGlobalDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.fxc8x4",defaultMessage:"When enabled, this login provider will be available for all organizations within this environment. Please use with caution!",description:"Global description"}),buttonInstructions:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.gQIG1D",defaultMessage:"Set the look and feel of your login button for your users.",description:"Button Instructions"}),buttonPreview:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.dtsZya",defaultMessage:"Button Preview",description:"Button Preview"}),buttonLogo:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.XtAWcG",defaultMessage:"Button Logo",description:"Button Logo"}),buttonText:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.w2NwY1",defaultMessage:"Button Text Label",description:"Button Text"}),buttonColor:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.J2U6tX",defaultMessage:"Button Color",description:"Button Color"}),buttonTextColor:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.3GdHqA",defaultMessage:"Button Text Color",description:"Button Text Color"}),providerCreationCreated:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.q+GZ9g",defaultMessage:"Your Login Connector is being created!",description:"connector being created"}),providerCreationFailed:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.DVnePp",defaultMessage:"There was an error while creating your Open ID connector:",description:"connector creation failed"}),providerCreationRetryButton:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.muMXB+",defaultMessage:"Retry",description:"retry button"}),getProviderFailed:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-open-id.Iuo8e2",defaultMessage:"There was an error retrieving your existing Open ID connector",description:"Message to let user know that we could not retrieve thier Login Connector"})},Header=({onPanelClose:e})=>{var t=useStyles$1()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.header,"data-test":"admin-center-header"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:t.headerTitle,variant:"h1",color:"secondary","data-test":"admin-center-title"},{children:SHARED_TEXT.panelHeaderTitle()})),jsxRuntime.exports.jsxs("div",Object.assign({className:t.headerActionContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({style:visuallyHidden$1,id:"admin-center-close-panel"},{children:SHARED_TEXT.closePanel()})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.closePanel()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"admin-center-close-panel","data-test":"admin-center-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))},SLICE_NAME$1="adminCenterOpenIdDetail",LoginPrefix="Log in with ";function isImage(e){e=e.type;return["image/jpeg","image/png","image/svg+xml"].includes(e)}const ImageInput=({logoUrl:e,onChangeFormItem:t})=>{var s=useStyles$1()["classes"];const r=react.exports.useRef(null),[n,i]=react.exports.useState(e),[a,o]=react.exports.useState(!1);react.exports.useEffect(()=>{t("btnLogo",n)},[n,t]);return jsxRuntime.exports.jsxs("div",Object.assign({className:s.inputContainer},{children:[jsxRuntime.exports.jsx("input",{ref:r,id:"logo-input",name:"logo-input",type:"file",accept:"image/*",onChange:e=>{e=lodash.exports.get(e,"target.files[0]",null);if(null!==r.current&&(r.current.value=""),isImage(e)&&e.size<=3e5){var t=e=>{"string"==typeof e&&i(e),o(!1)};const s=new FileReader;s.readAsDataURL(e),s.onload=function(){t(s.result)},s.onerror=function(e){o(!0),console.log("Error: ",e)}}else o(!0)},className:s.fileInput,"aria-label":"Upload Logo"}),jsxRuntime.exports.jsx("div",Object.assign({className:s.imageWrapper,role:"button"},{children:n?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("img",{"data-test":"admin-center-image-loaded",src:n,alt:"logo",className:s.inputLogo}),jsxRuntime.exports.jsx(Icon,{"data-test":"admin-center-remove-image","aria-label":"Remove Image",fontSize:"large",className:s.removeBtn,onClick:()=>{o(!1),i("")},component:default_1})]}):jsxRuntime.exports.jsx(Icon,{onClick:()=>{null!==r.current&&r.current.click()},"data-test":"upload-icon",fontSize:"large",component:Upload})})),jsxRuntime.exports.jsx(FormHelperText$2,Object.assign({"data-test":"admin-center-logo-upload-error",error:a},{children:a?SHARED_TEXT.loginStepsErrorBtnLogo():""}))]}))},ButtonDesign=({formData:e,errorForm:t,onChangeFormItem:s,handleChangeForm:r})=>{const n=useStyles$1()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:n.configurationContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:n.container},{children:jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"admin-center-button-instructions",variant:"body2",color:"textPrimary"},{children:SHARED_TEXT.buttonInstructions()}))})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.previewButtonContainer},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:n.sectionsButton,variant:"h6",color:"textPrimary"},{children:SHARED_TEXT.buttonPreview()})),jsxRuntime.exports.jsxs(Button,Object.assign({style:{color:""+e.btnTextColor,backgroundColor:""+e.btnColor},"data-test":"admin-center-input-previewButton",variant:"outlined",color:"primary",fullWidth:!0,className:n.previewButton},{children:[e.btnLogo?jsxRuntime.exports.jsx("img",{"data-test":"admin-center-preview-logo",alt:"previewLogo",className:n.previewButtonImage,src:e.btnLogo}):null,null!=e&&e.btnText?""+LoginPrefix+(null==e?void 0:e.btnText):LoginPrefix+"<open id connect name>"]}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.container},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:n.designContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-logo",className:n.logoContainer},{children:[jsxRuntime.exports.jsx(ImageInput,{onChangeFormItem:s,logoUrl:null!=e&&e.btnLogo?null==e?void 0:e.btnLogo:""}),jsxRuntime.exports.jsx("div",Object.assign({className:n.buttonPreviewLabel},{children:SHARED_TEXT.buttonLogo()}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.buttonDesignContainer},{children:[jsxRuntime.exports.jsx(TextField,{required:!0,id:"btnText","data-test":"admin-center-input-btnText",autoComplete:"off",label:SHARED_TEXT.buttonText(),variant:"outlined",className:n.textFieldButtonDesign,value:null==e?void 0:e.btnText,onChange:r("btnText"),error:""!==t.btnText}),jsxRuntime.exports.jsx("div",Object.assign({className:n.colorBlocksContainer},{children:["#FB8C00","#FFB300","#00897B","#43A047","#039BE5","#1E88E5","#ADB8C2","#E53935","#D81B60","#8E24AA"].map(e=>jsxRuntime.exports.jsx("div",{className:n.colorBlock,style:{backgroundColor:e},onClick:()=>s("btnColor",""+e)},e))})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.colorValuesContainer},{children:[jsxRuntime.exports.jsx(TextField,{required:!0,id:"btnColor","data-test":"admin-center-input-btnColor",autoComplete:"off",label:SHARED_TEXT.buttonColor(),variant:"outlined",className:n.textFieldHexButtonDesign,value:null==e?void 0:e.btnColor,onChange:r("btnColor"),error:""!==t.btnColor,InputProps:{classes:{input:n.inputBase}},size:"small"}),jsxRuntime.exports.jsx(TextField,{required:!0,id:"btnTextColor","data-test":"admin-center-input-btnTextColor",autoComplete:"off",label:SHARED_TEXT.buttonTextColor(),variant:"outlined",className:n.textFieldHexButtonDesign,value:null==e?void 0:e.btnTextColor,onChange:r("btnTextColor"),error:""!==t.btnTextColor,InputProps:{classes:{input:n.inputBase}},size:"small"})]}))]}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.buttonDesignErrorContainer},{children:[t.btnText?jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-text-error"},{children:[SHARED_TEXT.buttonText(),": ",t.btnText]})):null,t.btnColor?jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-color-error"},{children:[SHARED_TEXT.buttonColor(),": ",t.btnColor]})):null,t.btnTextColor?jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-text-color-error"},{children:[SHARED_TEXT.buttonTextColor(),": ",t.btnTextColor]})):null]}))]}))]}))};function roleHelper(e){var t={isSuperAdmin:!1,isAdmin:!1};return e&&(0<=e.indexOf("superadmin")&&(t.isSuperAdmin=!0),0<=e.indexOf("admin"))&&(t.isAdmin=!0),t}const SLICE_NAME="adminCenterIam",namespace$1="uiState",initialState$1={status:"pending",openIdProvider:{name:"",description:"",websiteUrl:"",clientId:"",clientSecret:"",issuerUrl:"",btnText:"",btnLogo:"",btnColor:"#FFFFFF",btnTextColor:"#000000",isGlobal:!1},appId:{id:""},existingOpenIdProvider:{id:""},newProvider:{status:"idle",errorMessage:""}},slice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{init(e,{payload:t}){e.status="pending",e.existingOpenIdProvider.id=t.connectorId,e.appId.id=t.appId},initDone(e){e.status="idle"},initFailed(e){e.status="failure"},updateAppId(e,{payload:t}){e.appId=t},updateOpenIdConnector(e,{payload:t}){e.openIdProvider=t},startCreateNewProvider(e){e.newProvider.status="pending"},createNewProviderSuccess(e){e.newProvider.status="idle",e.openIdProvider=initialState$1.openIdProvider},createNewProviderFailed(e,{payload:t}){e.newProvider={status:t.status,errorMessage:t.errorMessage}}}}),actions$2=slice.actions;var uiState$1=slice.reducer;const namespace=SLICE_NAME$1,actions$1={[namespace$1]:actions$2},rootReducer=combineReducers({[namespace$1]:uiState$1}),selectUIStateStatus=e=>e[namespace].uiState.status,selectAppId=e=>e[namespace].uiState.appId,selectOpenIdProvider=e=>e[namespace].uiState.openIdProvider,selectCreateNewProvider=e=>e[namespace].uiState.newProvider,selectExistingProvider=e=>e[namespace].uiState.existingOpenIdProvider;var uiState=Object.freeze({__proto__:null,selectUIStateStatus:selectUIStateStatus,selectAppId:selectAppId,selectOpenIdProvider:selectOpenIdProvider,selectCreateNewProvider:selectCreateNewProvider,selectExistingProvider:selectExistingProvider});const VERITONE_ORG=7682,ProviderConfiguration=({formData:e,errorForm:t,handleChangeForm:s})=>{var r=useStyles$1()["classes"],n=roleHelper(useSelector(userSelector).roles||null),i=useSelector(selectExistingProvider),a=useSelector(selectAdminCenterOrgId);return jsxRuntime.exports.jsx("div",Object.assign({className:r.configurationContainer},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:r.container},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({"data-test":"admin-center-provider-instructions",variant:"body2",color:"textPrimary"},{children:i.id?SHARED_TEXT.providerUpdateInstructions():SHARED_TEXT.providerInstructions()})),jsxRuntime.exports.jsx(Typography,Object.assign({className:r.sections,variant:"h6",color:"textPrimary"},{children:SHARED_TEXT.providerSectionBasic()})),jsxRuntime.exports.jsx(TextField,{required:!0,id:"name","data-test":"admin-center-input-name",autoComplete:"off",label:SHARED_TEXT.providerInputName(),variant:"outlined",className:r.textField,value:null==e?void 0:e.name,onChange:s("name"),error:""!==t.name,helperText:t.name}),jsxRuntime.exports.jsx("div",{className:r.spacer}),jsxRuntime.exports.jsx(TextField,{id:"description","data-test":"admin-center-input-description",autoComplete:"off",label:SHARED_TEXT.providerInputDescription(),variant:"outlined",multiline:!0,rows:3,className:r.textField,value:null==e?void 0:e.description,onChange:s("description"),error:""!==t.description,helperText:t.description,inputProps:{maxLength:100}}),jsxRuntime.exports.jsx("div",{className:r.spacer}),jsxRuntime.exports.jsx(TextField,{id:"websiteUrl","data-test":"admin-center-input-websiteUrl",autoComplete:"off",label:SHARED_TEXT.providerInputWebsiteUrl(),variant:"outlined",className:r.textField,value:null==e?void 0:e.websiteUrl,onChange:s("websiteUrl"),error:""!==t.websiteUrl,helperText:t.websiteUrl}),jsxRuntime.exports.jsx(Divider,{variant:"fullWidth"}),jsxRuntime.exports.jsx(Typography,Object.assign({className:r.sections,variant:"h6",color:"textPrimary"},{children:SHARED_TEXT.providerSectionClient()})),!i.id&&jsxRuntime.exports.jsx(TextField,{required:!0,id:"clientId","data-test":"admin-center-input-clientId",autoComplete:"off",label:SHARED_TEXT.providerInputClientId(),variant:"outlined",className:r.textField,value:null==e?void 0:e.clientId,onChange:s("clientId"),error:""!==t.clientId,helperText:t.clientId}),jsxRuntime.exports.jsx("div",{className:r.spacer}),jsxRuntime.exports.jsx(TextField,{required:!0,id:"clientSecret","data-test":"admin-center-input-clientSecret",autoComplete:"off",label:SHARED_TEXT.providerInputClientSecret(),variant:"outlined",className:r.textField,value:null==e?void 0:e.clientSecret,onChange:s("clientSecret"),error:""!==t.clientSecret,helperText:t.clientSecret}),jsxRuntime.exports.jsx("div",{className:r.spacer}),jsxRuntime.exports.jsx(TextField,{required:!0,id:"issuerUrl","data-test":"admin-center-input-issuerUrl",autoComplete:"off",label:SHARED_TEXT.providerInputIssuerUrl(),variant:"outlined",className:r.textField,value:null==e?void 0:e.issuerUrl,onChange:s("issuerUrl"),error:""!==t.issuerUrl,helperText:t.issuerUrl}),jsxRuntime.exports.jsx("div",{className:r.spacer}),!i.id&&n.isSuperAdmin&&a===VERITONE_ORG&&jsxRuntime.exports.jsxs("div",Object.assign({className:r.isGlobalContainer},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography,Object.assign({className:r.isGlobalTitle,variant:"h6"},{children:SHARED_TEXT.providerGlobalTitle()})),jsxRuntime.exports.jsx(Typography,Object.assign({className:r.isGlobalDescription,variant:"body2"},{children:SHARED_TEXT.providerGlobalDescription()}))]}),jsxRuntime.exports.jsx(Switch,{"data-test":"admin-center-isglobal-switch",value:e.isGlobal,onChange:s("isGlobal")})]}))]}))}))},ProviderCreation=({handlePanelClose:e})=>{const t=useStyles$1()["classes"],s=useDispatch(),r=useSelector(selectCreateNewProvider),n=react.exports.useRef(!1);react.exports.useEffect(()=>{n.current&&"idle"===r.status&&e(),n.current=!0},[r,e]);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.configurationContainer},{children:[jsxRuntime.exports.jsx(Divider,{variant:"fullWidth"}),"idle"===r.status?null:"pending"===r.status?jsxRuntime.exports.jsxs("div",Object.assign({className:t.loadingCreate},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h2"},{children:SHARED_TEXT.providerCreationCreated()})),jsxRuntime.exports.jsx(CircularProgress,{"data-test":"admin-center-provider-creation-loader"})]})):"failure"===r.status?jsxRuntime.exports.jsxs("div",Object.assign({className:t.loadingCreate},{children:[jsxRuntime.exports.jsx("img",{"data-test":"admin-center-error-image",alt:"error",className:t.errorImage,src:img$l}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:SHARED_TEXT.providerCreationFailed()})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:r.errorMessage})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>s(actions$1.uiState.startCreateNewProvider()),className:t.retryButton,variant:"outlined",color:"primary","data-test":"admin-center-retry-button"},{children:SHARED_TEXT.providerCreationRetryButton()}))]})):void 0]}))},LoginConnectorSteps=({handlePanelClose:e})=>{const s=useStyles$1()["classes"],t=useDispatch(),r=useSelector(selectExistingProvider);var n=useSelector(selectOpenIdProvider);const[i,a]=react.exports.useState(0),[o,l]=react.exports.useState(n),[d,c]=react.exports.useState({name:"",description:"",websiteUrl:"",clientId:"",clientSecret:"",issuerUrl:"",btnText:"",btnLogo:"",btnColor:"",btnTextColor:"",isGlobal:!1});react.exports.useEffect(()=>{t(actions$1.uiState.updateOpenIdConnector(o))},[o,t]);const p=[SHARED_TEXT.loginStepsProviderConfiguration(),SHARED_TEXT.loginStepsButtonDesign()];var n=()=>{0===i&&!(()=>{let e=!0;var t={};return o.name||(t.name=SHARED_TEXT.loginStepsErrorRequired(),e=!1),o.clientId||r.id||(t.clientId=SHARED_TEXT.loginStepsErrorRequired(),e=!1),o.clientSecret||(t.clientSecret=SHARED_TEXT.loginStepsErrorRequired(),e=!1),o.issuerUrl||(t.issuerUrl=SHARED_TEXT.loginStepsErrorIssuerUrl(),e=!1),c(Object.assign(Object.assign({},d),t)),e})()||1===i&&!(()=>{let e=!0;var t={},s="^#[A-Fa-f0-9]{6}$";return o.btnText||(t.btnText=SHARED_TEXT.loginStepsErrorBtnText(),e=!1),o.btnColor&&o.btnColor.match(s)||(t.btnColor=SHARED_TEXT.loginStepsErrorBtnColor(),e=!1),o.btnTextColor&&o.btnTextColor.match(s)||(t.btnTextColor=SHARED_TEXT.loginStepsErrorBtnColor(),e=!1),c(Object.assign(Object.assign({},d),t)),e})()||(a(e=>e+1),i!==p.length-1)||t(actions$1.uiState.startCreateNewProvider())},u=()=>{a(e=>e-1)};const x=react.exports.useCallback((t,s)=>{l(e=>Object.assign(Object.assign({},e),{[t]:s})),c(e=>Object.assign(Object.assign({},e),{[t]:""}))},[l,c]),m=t=>e=>{e="isGlobal"===t?e.target.checked:e.target.value;x(t,e)};return jsxRuntime.exports.jsxs("div",Object.assign({className:s.root,"data-test":"os-admin-center.open-id.login-connector"},{children:[jsxRuntime.exports.jsx(Stepper,Object.assign({className:s.stepper,activeStep:i,"data-test":"os-admin-center.open-id.login-stepper"},{children:p.map((e,t)=>{return jsxRuntime.exports.jsx(Step,Object.assign({className:s.step},{},{children:jsxRuntime.exports.jsx(StepLabel,Object.assign({},{},{children:e}))}),t)})})),jsxRuntime.exports.jsxs("div",{children:[i===p.length&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(ProviderCreation,{handlePanelClose:e}),jsxRuntime.exports.jsxs("div",Object.assign({className:s.buttonGroup},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"admin-center-steps-btn-back",disabled:0===i,onClick:u,className:s.button},{children:SHARED_TEXT.loginStepsBackButton()})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:e,className:s.button,"data-test":"admin-center-steps-btn-close"},{children:SHARED_TEXT.loginStepsCloseButton()}))]}))]}),i!==p.length&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx("div",Object.assign({className:s.stepsContent},{children:function(e){switch(e){case 0:return jsxRuntime.exports.jsx(ProviderConfiguration,{errorForm:d,formData:o,handleChangeForm:m});case 1:return jsxRuntime.exports.jsx(ButtonDesign,{errorForm:d,formData:o,handleChangeForm:m,onChangeFormItem:x});default:return}}(i)})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.buttonGroup},{children:[jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"admin-center-steps-btn-back",disabled:0===i,onClick:u,className:s.button},{children:SHARED_TEXT.loginStepsBackButton()})),i===p.length-1?jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:n,className:s.button,"data-test":"admin-center-steps-btn-create"},{children:r.id?SHARED_TEXT.loginStepsUpdateButton():SHARED_TEXT.loginStepsCreateButton()})):jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:n,className:s.button,"data-test":"admin-center-steps-btn-next"},{children:SHARED_TEXT.loginStepsNextButton()}))]}))]})]})]}))},ConnectorError=()=>{var e=useStyles$1()["classes"];const t=useDispatch(),s=useSelector(selectExistingProvider),r=useSelector(selectAppId);return jsxRuntime.exports.jsxs("div",Object.assign({className:e.loadingCreate},{children:[jsxRuntime.exports.jsx("img",{"data-test":"admin-center-error-image",alt:"error",className:e.errorImage,src:img$l}),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1"},{children:SHARED_TEXT.getProviderFailed()})),jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>t(actions$1.uiState.init({connectorId:s.id,appId:r.id})),className:e.retryButton,variant:"outlined",color:"primary","data-test":"admin-center-retry-button"},{children:SHARED_TEXT.providerCreationRetryButton()}))]}))},MainLayout=({dataId:e,appId:t,connectorId:s,panelRendered:r})=>{var n=useStyles$1()["classes"];const i=useSelector(selectUIStateStatus),a=useDispatch(),o=useSelector(userSelector),{apiRoot:l,graphQLEndpoint:d,token:c}=useSelector(selectApiConfigs);react.exports.useEffect(()=>{"pending"===i&&l&&d&&c&&o&&a(actions$1.uiState.init({connectorId:s,appId:t}))},[i,l,d,c,t,s,o,a]);var p=react.exports.useCallback(()=>{a(unmountPanel(e))},[a,e]);return!(l&&d&&c&&r&&o&&null!==o&&void 0!==o&&o.roles&&roleHelper(o.roles).isAdmin&&"pending"!==i)?null:jsxRuntime.exports.jsxs("div",Object.assign({id:e,role:"presentation","data-test":"admin-center-widget",className:classNames(n.root)},{children:[jsxRuntime.exports.jsx(Header,{onPanelClose:p}),"failure"===i&&jsxRuntime.exports.jsx(ConnectorError,{"data-test":"admin-center-widget.error"}),"idle"===i&&jsxRuntime.exports.jsx(LoginConnectorSteps,{handlePanelClose:p})]}))},OPEN_ID_PANEL="ADMIN_CENTER_OPEN_ID",initialState={status:"idle",providers:[],selectedProviderId:null},iamSlice=createSlice({name:SLICE_NAME,initialState:initialState,reducers:{fetchProvidersStart(e){e.status="pending"},fetchProvidersSuccess(e,t){e.status="success",e.providers=t.payload},fetchProvidersFailure(e){e.status="failure"},setCreatePanelSelected(e){e.selectedProviderId=""},openProviderDetailPanel(e,t){e.selectedProviderId=t.payload},closeProviderDetailPanel(e){e.selectedProviderId=null},deleteProviderStart(e,t){e.status="pending"},deleteProviderSuccess(e){e.status="success"},deleteProviderFailure(e){e.status="failure"}},extraReducers:e=>{e.addCase(unmountPanel,(e,t)=>(t.payload===OPEN_ID_PANEL&&(e.selectedProviderId=null),e))}}),actions=iamSlice.actions;var _path,_path2,_path3,_path4,_path5,_path6,_path7,_path8,_path9,_path10,_path11,_path12,_path13,_path14,_path15,_path16,_path17,_path18,_path19,_path20,_path21,_path22,_path23,_path24,_g,_path25,_path26,_path27,_defs,iamRootReducer=iamSlice.reducer;function __awaiter(e,a,o,l){return new(o=o||Promise)(function(s,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?s(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(r,n)}i((l=l.apply(e,a||[])).next())})}function createOpenIdProvider(t,s){return __awaiter(this,void 0,void 0,function*(){var e=yield baseGraphQLApiWithError(Object.assign({query:`
|
|
2
2
|
mutation createNewOpenIdProvider($input: CreateOpenIdProvider!){
|
|
3
3
|
createOpenIdProvider(input: $input){
|
|
4
4
|
name
|
package/js-core.esm68.js.gz
CHANGED
|
Binary file
|
package/js-core.esm70.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as jsxRuntime,X as createSlice,Y as combineReducers,Z as useSelector,r as react,z as all,B as takeEvery$1,aE as betaFeaturesSelector,bX as selectIsFullscreenEnabled,C as select,a4 as preferredLanguageSelector,a0 as selectApiConfigs,F as call$7,G as put,a5 as showMessage,W as isEqual_1,a6 as MessageSeverity,ap as mountPanel,a7 as AIWareFormatMessage,T as gqlIntrospection,S as baseGraphQLApi,U as createSelector,aJ as AIWareThemeProvider,V as Box$1,K as userSelector,am as CircularProgress,bR as ReactExports,bG as selectIsSuperAdmin,bv as panelsSelector,A as takeLatest$1,J as delay,ao as unmountPanel,bP as AvailableComponents,fC as setIsFullscreenEnabled,fV as selectUserOrganizationBusinessUnit,a3 as baseGraphQLApiWithError}from"./js-core.esm.js";import{c as createSvgIcon,m as makeStyles,F as FormattedMessage,T as Typography,bd as get_1,ah as Grid,bo as ArrowUp,bp as ArrowDown,D as Divider,g as Button,cZ as Users,c_ as OrgSettings,c$ as RetentionPolicy,d0 as Verified,cl as Information,cQ as Lock,d1 as SecurityGroup,cP as Group,d2 as Lock2,cY as Iam,o as DynamicModuleLoader,A as AIWareIntlProvider,bl as Edit,U as Select,V as MenuItem,b1 as Tabs,b3 as Tab,cz as Hamburger,b7 as FullscreenExit,b6 as Fullscreen,Z as Hide,r as classNames,d3 as OpenWindow,as as Collapse}from"./js-core.esm4.js";import{GroupsPanel,getAdminCenterGroupsModule}from"./js-core.esm62.js";import{PermissionSets,AccessControl,getAdminCenterPermissionsModule}from"./js-core.esm57.js";import{getAdminCenterApplicationsModule}from"./js-core.esm71.js";import{l as getOrganizationPanelModule,S as Switch,F as FirstLoadApplicationModal,n as navSectionStyles,s as selectAdminCenterOrgId$1}from"./js-core.esm2.js";import{UsersPanel,getAdminCenterUsersModule}from"./js-core.esm72.js";import{ApiTokensTab}from"./js-core.esm73.js";import{N as index,m as devErrorLogger,ax as PlaceholderElement,b as Stack,g as Tooltip,I as IconButton,T as TextField,ao as EditOutlined,aC as ConfirmDialog,i as LoadingButton,w as imageUpload,p as panelComponents,aq as FullscreenPortal,aD as ExpandLess,aE as ExpandMore}from"./js-core.esm5.js";import{B as Box}from"./js-core.esm27.js";import{u as useDispatch}from"./js-core.esm6.js";import{Approvals,getApprovalsModule}from"./js-core.esm74.js";import{S as SHARED_TEXT,R as RowSetting}from"./js-core.esm75.js";import{IamTab}from"./js-core.esm68.js";import{C as CustomLoginTab}from"./js-core.esm76.js";import{m as AuditLogWidget}from"./js-core.esm3.js";import{useOrganizationPermissions,EAuthResourceType}from"./js-core.esm8.js";import{H as HelpOutline}from"./js-core.esm61.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm16.js";import"./js-core.esm13.js";import"./js-core.esm77.js";import"./js-core.esm42.js";import"./js-core.esm49.js";import"./js-core.esm28.js";import"./js-core.esm41.js";import"./js-core.esm44.js";import"./js-core.esm45.js";import"./js-core.esm37.js";import"./js-core.esm78.js";import"./js-core.esm48.js";import"./js-core.esm36.js";import"./js-core.esm63.js";import"./js-core.esm79.js";import"./js-core.esm52.js";import"./js-core.esm60.js";import"./js-core.esm69.js";var match,version,set,get,store,STATE,AddPhotoAlternateOutlined=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M18 20H4V6h9V4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2v9zm-7.79-3.17-1.96-2.36L5.5 18h11l-3.54-4.71zM20 4V1h-2v3h-3c.01.01 0 2 0 2h3v2.99c.01.01 2 0 2 0V6h3V4h-3z"}),"AddPhotoAlternateOutlined"),CreditCard=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}),"CreditCard"),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math===Math&&e},global$b=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$d=function(e){try{return!!e()}catch(e){return!0}},fails$c=fails$d,descriptors=!fails$d(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$b=fails$d,functionBindNative=!fails$d(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,call$5=FunctionPrototype$1.call,uncurryThisWithBind=NATIVE_BIND&&FunctionPrototype$1.bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?uncurryThisWithBind:function(e){return function(){return call$5.apply(e,arguments)}},uncurryThis$c=functionUncurryThis,toString$3=uncurryThis$c({}.toString),stringSlice$1=uncurryThis$c("".slice),classofRaw$1=function(e){return stringSlice$1(toString$3(e),8,-1)},uncurryThis$b=functionUncurryThis,fails$a=fails$d,classof$2=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$a(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"===classof$2(e)?split(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$2=function(e){return null==e},isNullOrUndefined$1=isNullOrUndefined$2,$TypeError$7=TypeError,requireObjectCoercible$3=function(e){if(isNullOrUndefined$1(e))throw new $TypeError$7("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$2=requireObjectCoercible$3,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$2(e))},documentAll="object"==typeof document&&document.all,isCallable$e=void 0===documentAll&&void 0!==documentAll?function(e){return"function"==typeof e||e===documentAll}:function(e){return"function"==typeof e},isCallable$d=isCallable$e,isObject$8=function(e){return"object"==typeof e?null!==e:isCallable$d(e)},global$a=global$b,isCallable$c=isCallable$e,aFunction=function(e){return isCallable$c(e)?e:void 0},getBuiltIn$3=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$a=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$9=global$b,userAgent$2=engineUserAgent,process=global$9.process,Deno=global$9.Deno,versions=process&&process.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent$2&&(!(match=userAgent$2.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent$2.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=engineV8Version,fails$9=fails$d,global$8=global$b,$String$5=global$b.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$9(function(){var e=Symbol("symbol detection");return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=symbolConstructorDetection,useSymbolAsUid=symbolConstructorDetection&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$3,isCallable$b=isCallable$e,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$b(t)&&isPrototypeOf(t.prototype,$Object$3(e))},$String$4=String,tryToString$2=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$a=isCallable$e,tryToString$1=tryToString$2,$TypeError$6=TypeError,aCallable$3=function(e){if(isCallable$a(e))return e;throw new $TypeError$6(tryToString$1(e)+" is not a function")},aCallable$2=aCallable$3,isNullOrUndefined=isNullOrUndefined$2,getMethod$1=function(e,t){e=e[t];return isNullOrUndefined(e)?void 0:aCallable$2(e)},call$4=functionCall,isCallable$9=isCallable$e,isObject$7=isObject$8,$TypeError$5=TypeError,ordinaryToPrimitive$1=function(e,t){var n,i;if("string"===t&&isCallable$9(n=e.toString)&&!isObject$7(i=call$4(n,e)))return i;if(isCallable$9(n=e.valueOf)&&!isObject$7(i=call$4(n,e)))return i;if("string"!==t&&isCallable$9(n=e.toString)&&!isObject$7(i=call$4(n,e)))return i;throw new $TypeError$5("Can't convert object to primitive value")},sharedStore={exports:{}},global$7=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$5(global$7,t,{value:n,configurable:!0,writable:!0})}catch(e){global$7[t]=n}return n},globalThis$1=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=sharedStore.exports=globalThis$1[SHARED]||defineGlobalProperty$2(SHARED,{}),store$2=((store$3.versions||(store$3.versions=[])).push({version:"3.37.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports),shared$3=function(e,t){return store$2[e]||(store$2[e]=t||{})},requireObjectCoercible$1=requireObjectCoercible$3,$Object$2=Object,toObject$4=function(e){return $Object$2(requireObjectCoercible$1(e))},uncurryThis$9=functionUncurryThis,toObject$3=toObject$4,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$3(e),t)},uncurryThis$8=functionUncurryThis,id=0,postfix=Math.random(),toString$2=uncurryThis$8(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$2(++id+postfix,36)},global$6=global$b,shared$2=shared$3,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$1=global$b.Symbol,WellKnownSymbolsStore=shared$2("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1.for||Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$8=function(e){return hasOwn$8(WellKnownSymbolsStore,e)||(WellKnownSymbolsStore[e]=NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?Symbol$1[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$6=isObject$8,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$7=wellKnownSymbol$8,$TypeError$4=TypeError,TO_PRIMITIVE=wellKnownSymbol$8("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$6(e)||isSymbol$1(e))return e;var n=getMethod(e,TO_PRIMITIVE);if(n){if(n=call$3(n,e,t=void 0===t?"default":t),!isObject$6(n)||isSymbol$1(n))return n;throw new $TypeError$4("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$5=isObject$8,document$1=global$b.document,EXISTS$1=isObject$5(document$1)&&isObject$5(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$8=fails$d,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$d(function(){return 7!==Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$7=fails$d,v8PrototypeDefineBug=descriptors&&fails$d(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$4=isObject$8,$String$3=String,$TypeError$3=TypeError,anObject$4=function(e){if(isObject$4(e))return e;throw new $TypeError$3($String$3(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$3=anObject$4,toPropertyKey=toPropertyKey$2,$TypeError$2=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var i;return anObject$3(e),t=toPropertyKey(t),anObject$3(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&(i=$getOwnPropertyDescriptor(e,t))&&i[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:i)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:i)[ENUMERABLE],writable:!1}),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$3(e),t=toPropertyKey(t),anObject$3(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new $TypeError$2("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,n){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$7=functionUncurryThis,isCallable$8=isCallable$e,store$1=sharedStore.exports,functionToString=uncurryThis$7(Function.toString),inspectSource$1=(isCallable$8(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$7=isCallable$e,WeakMap$1=global$b.WeakMap,weakMapBasicDetection=isCallable$7(WeakMap$1)&&/native code/.test(String(WeakMap$1)),shared$1=shared$3,uid=uid$2,keys=shared$3("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=weakMapBasicDetection,global$3=global$b,isObject$3=isObject$8,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore.exports,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject$3(e)&&(e=get(e)).type===t)return e;throw new TypeError$1("Incompatible receiver, "+t+" required")}},has=NATIVE_WEAK_MAP||shared.state?((store=shared.state||(shared.state=new WeakMap)).get=store.get,store.has=store.has,store.set=store.set,set=function(e,t){if(store.has(e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get=function(e){return store.get(e)||{}},function(e){return store.has(e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),internalState={set:set,get:get,has:has,enforce:enforce,getterFor:getterFor},uncurryThis$6=functionUncurryThis,fails$6=fails$d,isCallable$6=isCallable$e,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$1,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,$String$2=String,defineProperty$4=Object.defineProperty,stringSlice=uncurryThis$6("".slice),replace=uncurryThis$6("".replace),join=uncurryThis$6([].join),CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$6(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===stringSlice($String$2(t),0,7)&&(t="["+replace($String$2(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$4(n,"arity")&&e.length!==n.arity&&defineProperty$4(e,"length",{value:n.arity});try{n&&hasOwn$4(n,"constructor")&&n.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$4(n,"source")||(n.source=join(TEMPLATE,"string"==typeof t?t:"")),e},isCallable$5=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$6(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$e),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,n,i){var r=(i=i||{}).enumerable,s=void 0!==i.name?i.name:t;if(isCallable$5(n)&&makeBuiltIn(n,s,i),i.global)r?e[t]=n:defineGlobalProperty$1(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch(e){}r?e[t]=n:definePropertyModule$2.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$1=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor$1:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max=Math.max,min$1=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){e=toIntegerOrInfinity(e);return 0<e?min(e,9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$2=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike$1=lengthOfArrayLike$2,createMethod=function(a){return function(e,t,n){var i=toIndexedObject$3(e),r=lengthOfArrayLike$1(i);if(0!==r){var s,o=toAbsoluteIndex(n,r);if(a&&t!=t){for(;o<r;)if((s=i[o++])!=s)return!0}else for(;o<r;o++)if((a||o in i)&&i[o]===t)return a||o||0}return!a&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$5=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$5([].push),objectKeysInternal=function(e,t){var n,i=toIndexedObject$2(e),r=0,s=[];for(n in i)!hasOwn$3(hiddenKeys$2,n)&&hasOwn$3(i,n)&&push$1(s,n);for(;t.length>r;)!hasOwn$3(i,n=t[r++])||~indexOf(s,n)||push$1(s,n);return s},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$3),uncurryThis$4=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$2=anObject$4,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$2(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,n){for(var i=ownKeys(t),r=definePropertyModule$1.f,s=getOwnPropertyDescriptorModule.f,o=0;o<i.length;o++){var a=i[o];hasOwn$2(e,a)||n&&hasOwn$2(n,a)||r(e,a,s(t,a))}},fails$5=fails$d,isCallable$4=isCallable$e,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e===POLYFILL||e!==NATIVE&&(isCallable$4(t)?fails$5(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var n,i,r,s=e.target,o=e.global,a=e.stat,l=o?global$2:a?global$2[s]||defineGlobalProperty(s,{}):global$2[s]&&global$2[s].prototype;if(l)for(n in t){if(i=t[n],r=e.dontCallGetSet?(r=getOwnPropertyDescriptor(l,n))&&r.value:l[n],!isForced(o?n:s+(a?".":"#")+n,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;copyConstructorProperties(i,r)}(e.sham||r&&r.sham)&&createNonEnumerableProperty$2(i,"sham",!0),defineBuiltIn$2(l,n,i,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$3=functionUncurryThis,call$1=functionCall,fails$4=fails$d,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$2=toObject$4,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$3([].concat),objectAssign=!$assign||fails$4(function(){var e,t,n,i;return!(!DESCRIPTORS$2||1===$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},i="abcdefghijklmnopqrst",(e={})[n=Symbol("assign detection")]=7,i.split("").forEach(function(e){t[e]=e}),7!==$assign({},e)[n])||objectKeys$1($assign({},t)).join("")!==i})?function(e,t){for(var n=toObject$2(e),i=arguments.length,r=1,s=getOwnPropertySymbolsModule.f,o=propertyIsEnumerableModule.f;r<i;)for(var a,l=IndexedObject(arguments[r++]),c=s?concat(objectKeys$1(l),s(l)):objectKeys$1(l),d=c.length,u=0;u<d;)a=c[u++],DESCRIPTORS$2&&!call$1(o,l,a)||(n[a]=l[a]);return n}:$assign,$$2=_export,assign=objectAssign;_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign});const useStyles$1$1=makeStyles()(()=>({headerContainer:{padding:"20px 15px",borderBottom:".5px solid #D9E2EB"}})),SystemInfoHeader=()=>{var e=useStyles$1$1()["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({className:e.headerContainer,"data-test":"os-admin-center.system-info.tab-header"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3","data-testid":"os-admin-center.system-info.tab-title","data-test":"os-admin-center.system-info.tab-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.tab-title",defaultMessage:"System Information",description:"System Information label"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.tab-description",defaultMessage:"View Instance information and historical version updates for this environment.",description:"System Information description text"})}))]}))},useStyles$3=makeStyles()(()=>({tile:{marginRight:"12px",width:"257px",height:"96px",borderRadius:"4px",border:"1px solid #DADFE8",background:"rgba(255, 253, 249, 0.80)",display:"flex",justifyContent:"center",alignItems:"center"}})),SystemInfoTile=({title:e,content:t})=>{var n=useStyles$3()["classes"];return jsxRuntime.exports.jsx(Box,Object.assign({className:n.tile,"data-test":"os-admin-center.system-info"},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{textAlign:"center"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontWeight:700}},{children:e})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2","data-testid":"os-admin-center.system-info."+t,"data-test":"os-admin-center.system-info."+t},{children:t}))]}))}))},SLICE_NAME$1="adminCenterSystemInfo",namespace$1="systemInfo",initialState$1={status:"idle",versionInfo:null,versionList:null},adminCenterSystemInfoSlice=createSlice({name:SLICE_NAME$1+"/"+namespace$1,initialState:initialState$1,reducers:{fetchVersionInfoStart(e){e.status="pending"},fetchVersionInfoSuccess(e,t){e.status="success";var{platformInfo:t,versionList:n}=t.payload;e.versionInfo=t,e.versionList=n},fetchVersionInfoFailure(e){e.status="failure",e.versionInfo=null}}}),actions$1=adminCenterSystemInfoSlice.actions;var systemInfo_state=adminCenterSystemInfoSlice.reducer;const rootReducer$1=combineReducers({[namespace$1]:systemInfo_state});function __awaiter$1(e,o,a,l){return new(a=a||Promise)(function(n,t){function i(e){try{s(l.next(e))}catch(e){t(e)}}function r(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,r)}s((l=l.apply(e,o||[])).next())})}const fetchPlatformInfo=(s,o)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="systemPlatformInfo",t=`query ${e} {
|
|
1
|
+
import{j as jsxRuntime,X as createSlice,Y as combineReducers,Z as useSelector,r as react,z as all,B as takeEvery$1,aE as betaFeaturesSelector,bX as selectIsFullscreenEnabled,C as select,a4 as preferredLanguageSelector,a0 as selectApiConfigs,F as call$7,G as put,a5 as showMessage,W as isEqual_1,a6 as MessageSeverity,ap as mountPanel,a7 as AIWareFormatMessage,T as gqlIntrospection,S as baseGraphQLApi,U as createSelector,aJ as AIWareThemeProvider,V as Box$1,K as userSelector,am as CircularProgress,bR as ReactExports,bG as selectIsSuperAdmin,bv as panelsSelector,A as takeLatest$1,J as delay,ao as unmountPanel,bP as AvailableComponents,fC as setIsFullscreenEnabled,fV as selectUserOrganizationBusinessUnit,a3 as baseGraphQLApiWithError}from"./js-core.esm.js";import{c as createSvgIcon,m as makeStyles,F as FormattedMessage,T as Typography,bd as get_1,ah as Grid,bo as ArrowUp,bp as ArrowDown,D as Divider,g as Button,cZ as Users,c_ as OrgSettings,c$ as RetentionPolicy,d0 as Verified,cl as Information,cQ as Lock,d1 as SecurityGroup,cP as Group,d2 as Lock2,cY as Iam,o as DynamicModuleLoader,A as AIWareIntlProvider,bl as Edit,U as Select,V as MenuItem,b1 as Tabs,b3 as Tab,cz as Hamburger,b7 as FullscreenExit,b6 as Fullscreen,Z as Hide,r as classNames,d3 as OpenWindow,as as Collapse}from"./js-core.esm4.js";import{GroupsPanel,getAdminCenterGroupsModule}from"./js-core.esm62.js";import{PermissionSets,AccessControl,getAdminCenterPermissionsModule}from"./js-core.esm57.js";import{getAdminCenterApplicationsModule}from"./js-core.esm71.js";import{o as getOrganizationPanelModule,S as Switch,F as FirstLoadApplicationModal,n as navSectionStyles,s as selectAdminCenterOrgId$1}from"./js-core.esm2.js";import{UsersPanel,getAdminCenterUsersModule}from"./js-core.esm72.js";import{ApiTokensTab}from"./js-core.esm73.js";import{N as index,m as devErrorLogger,ax as PlaceholderElement,b as Stack,g as Tooltip,I as IconButton,T as TextField,ao as EditOutlined,aC as ConfirmDialog,i as LoadingButton,w as imageUpload,p as panelComponents,aq as FullscreenPortal,aD as ExpandLess,aE as ExpandMore}from"./js-core.esm5.js";import{B as Box}from"./js-core.esm27.js";import{u as useDispatch}from"./js-core.esm6.js";import{Approvals,getApprovalsModule}from"./js-core.esm74.js";import{S as SHARED_TEXT,R as RowSetting}from"./js-core.esm75.js";import{IamTab}from"./js-core.esm68.js";import{C as CustomLoginTab}from"./js-core.esm76.js";import{m as AuditLogWidget}from"./js-core.esm3.js";import{useOrganizationPermissions,EAuthResourceType}from"./js-core.esm8.js";import{H as HelpOutline}from"./js-core.esm61.js";import"./js-core.esm33.js";import"./js-core.esm29.js";import"./js-core.esm16.js";import"./js-core.esm13.js";import"./js-core.esm77.js";import"./js-core.esm42.js";import"./js-core.esm49.js";import"./js-core.esm28.js";import"./js-core.esm41.js";import"./js-core.esm44.js";import"./js-core.esm45.js";import"./js-core.esm37.js";import"./js-core.esm78.js";import"./js-core.esm48.js";import"./js-core.esm36.js";import"./js-core.esm63.js";import"./js-core.esm79.js";import"./js-core.esm52.js";import"./js-core.esm60.js";import"./js-core.esm69.js";var match,version,set,get,store,STATE,AddPhotoAlternateOutlined=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M18 20H4V6h9V4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2v9zm-7.79-3.17-1.96-2.36L5.5 18h11l-3.54-4.71zM20 4V1h-2v3h-3c.01.01 0 2 0 2h3v2.99c.01.01 2 0 2 0V6h3V4h-3z"}),"AddPhotoAlternateOutlined"),CreditCard=createSvgIcon(jsxRuntime.exports.jsx("path",{d:"M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"}),"CreditCard"),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},check=function(e){return e&&e.Math===Math&&e},global$b=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$d=function(e){try{return!!e()}catch(e){return!0}},fails$c=fails$d,descriptors=!fails$d(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$b=fails$d,functionBindNative=!fails$d(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$1=functionBindNative,call$6=Function.prototype.call,functionCall=NATIVE_BIND$1?call$6.bind(call$6):function(){return call$6.apply(call$6,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$1&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$3=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$1(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND=functionBindNative,FunctionPrototype$1=Function.prototype,call$5=FunctionPrototype$1.call,uncurryThisWithBind=NATIVE_BIND&&FunctionPrototype$1.bind.bind(call$5,call$5),functionUncurryThis=NATIVE_BIND?uncurryThisWithBind:function(e){return function(){return call$5.apply(e,arguments)}},uncurryThis$c=functionUncurryThis,toString$3=uncurryThis$c({}.toString),stringSlice$1=uncurryThis$c("".slice),classofRaw$1=function(e){return stringSlice$1(toString$3(e),8,-1)},uncurryThis$b=functionUncurryThis,fails$a=fails$d,classof$2=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$a(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"===classof$2(e)?split(e,""):$Object$4(e)}:$Object$4,isNullOrUndefined$2=function(e){return null==e},isNullOrUndefined$1=isNullOrUndefined$2,$TypeError$7=TypeError,requireObjectCoercible$3=function(e){if(isNullOrUndefined$1(e))throw new $TypeError$7("Can't call method on "+e);return e},IndexedObject$1=indexedObject,requireObjectCoercible$2=requireObjectCoercible$3,toIndexedObject$5=function(e){return IndexedObject$1(requireObjectCoercible$2(e))},documentAll="object"==typeof document&&document.all,isCallable$e=void 0===documentAll&&void 0!==documentAll?function(e){return"function"==typeof e||e===documentAll}:function(e){return"function"==typeof e},isCallable$d=isCallable$e,isObject$8=function(e){return"object"==typeof e?null!==e:isCallable$d(e)},global$a=global$b,isCallable$c=isCallable$e,aFunction=function(e){return isCallable$c(e)?e:void 0},getBuiltIn$3=function(e,t){return arguments.length<2?aFunction(global$a[e]):global$a[e]&&global$a[e][t]},uncurryThis$a=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),engineUserAgent="undefined"!=typeof navigator&&String(navigator.userAgent)||"",global$9=global$b,userAgent$2=engineUserAgent,process=global$9.process,Deno=global$9.Deno,versions=process&&process.versions||Deno&&Deno.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent$2&&(!(match=userAgent$2.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent$2.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION=engineV8Version,fails$9=fails$d,global$8=global$b,$String$5=global$b.String,symbolConstructorDetection=!!Object.getOwnPropertySymbols&&!fails$9(function(){var e=Symbol("symbol detection");return!$String$5(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION&&V8_VERSION<41}),NATIVE_SYMBOL$1=symbolConstructorDetection,useSymbolAsUid=symbolConstructorDetection&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$2=getBuiltIn$3,isCallable$b=isCallable$e,isPrototypeOf=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$2("Symbol");return isCallable$b(t)&&isPrototypeOf(t.prototype,$Object$3(e))},$String$4=String,tryToString$2=function(e){try{return $String$4(e)}catch(e){return"Object"}},isCallable$a=isCallable$e,tryToString$1=tryToString$2,$TypeError$6=TypeError,aCallable$3=function(e){if(isCallable$a(e))return e;throw new $TypeError$6(tryToString$1(e)+" is not a function")},aCallable$2=aCallable$3,isNullOrUndefined=isNullOrUndefined$2,getMethod$1=function(e,t){e=e[t];return isNullOrUndefined(e)?void 0:aCallable$2(e)},call$4=functionCall,isCallable$9=isCallable$e,isObject$7=isObject$8,$TypeError$5=TypeError,ordinaryToPrimitive$1=function(e,t){var n,i;if("string"===t&&isCallable$9(n=e.toString)&&!isObject$7(i=call$4(n,e)))return i;if(isCallable$9(n=e.valueOf)&&!isObject$7(i=call$4(n,e)))return i;if("string"!==t&&isCallable$9(n=e.toString)&&!isObject$7(i=call$4(n,e)))return i;throw new $TypeError$5("Can't convert object to primitive value")},sharedStore={exports:{}},global$7=global$b,defineProperty$5=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$5(global$7,t,{value:n,configurable:!0,writable:!0})}catch(e){global$7[t]=n}return n},globalThis$1=global$b,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=sharedStore.exports=globalThis$1[SHARED]||defineGlobalProperty$2(SHARED,{}),store$2=((store$3.versions||(store$3.versions=[])).push({version:"3.37.0",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.0/LICENSE",source:"https://github.com/zloirock/core-js"}),sharedStore.exports),shared$3=function(e,t){return store$2[e]||(store$2[e]=t||{})},requireObjectCoercible$1=requireObjectCoercible$3,$Object$2=Object,toObject$4=function(e){return $Object$2(requireObjectCoercible$1(e))},uncurryThis$9=functionUncurryThis,toObject$3=toObject$4,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$3(e),t)},uncurryThis$8=functionUncurryThis,id=0,postfix=Math.random(),toString$2=uncurryThis$8(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$2(++id+postfix,36)},global$6=global$b,shared$2=shared$3,hasOwn$8=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL=symbolConstructorDetection,USE_SYMBOL_AS_UID=useSymbolAsUid,Symbol$1=global$b.Symbol,WellKnownSymbolsStore=shared$2("wks"),createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1.for||Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$8=function(e){return hasOwn$8(WellKnownSymbolsStore,e)||(WellKnownSymbolsStore[e]=NATIVE_SYMBOL&&hasOwn$8(Symbol$1,e)?Symbol$1[e]:createWellKnownSymbol("Symbol."+e)),WellKnownSymbolsStore[e]},call$3=functionCall,isObject$6=isObject$8,isSymbol$1=isSymbol$2,getMethod=getMethod$1,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$7=wellKnownSymbol$8,$TypeError$4=TypeError,TO_PRIMITIVE=wellKnownSymbol$8("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$6(e)||isSymbol$1(e))return e;var n=getMethod(e,TO_PRIMITIVE);if(n){if(n=call$3(n,e,t=void 0===t?"default":t),!isObject$6(n)||isSymbol$1(n))return n;throw new $TypeError$4("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$2=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$5=global$b,isObject$5=isObject$8,document$1=global$b.document,EXISTS$1=isObject$5(document$1)&&isObject$5(document$1.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$1.createElement(e):{}},DESCRIPTORS$9=descriptors,fails$8=fails$d,createElement=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$d(function(){return 7!==Object.defineProperty(createElement("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$8=descriptors,call$2=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$2=createPropertyDescriptor$3,toIndexedObject$4=toIndexedObject$5,toPropertyKey$1=toPropertyKey$2,hasOwn$7=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$8?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$1(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$7(e,t))return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$7=descriptors,fails$7=fails$d,v8PrototypeDefineBug=descriptors&&fails$d(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$4=isObject$8,$String$3=String,$TypeError$3=TypeError,anObject$4=function(e){if(isObject$4(e))return e;throw new $TypeError$3($String$3(e)+" is not an object")},DESCRIPTORS$6=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$3=anObject$4,toPropertyKey=toPropertyKey$2,$TypeError$2=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$5=(objectDefineProperty.f=DESCRIPTORS$6?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var i;return anObject$3(e),t=toPropertyKey(t),anObject$3(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&(i=$getOwnPropertyDescriptor(e,t))&&i[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:i)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:i)[ENUMERABLE],writable:!1}),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$3(e),t=toPropertyKey(t),anObject$3(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new $TypeError$2("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$3=objectDefineProperty,createPropertyDescriptor$1=createPropertyDescriptor$3,createNonEnumerableProperty$4=DESCRIPTORS$5?function(e,t,n){return definePropertyModule$3.f(e,t,createPropertyDescriptor$1(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$4=descriptors,hasOwn$6=hasOwnProperty_1,FunctionPrototype=Function.prototype,getDescriptor=DESCRIPTORS$4&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$6(FunctionPrototype,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$4||getDescriptor(FunctionPrototype,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$7=functionUncurryThis,isCallable$8=isCallable$e,store$1=sharedStore.exports,functionToString=uncurryThis$7(Function.toString),inspectSource$1=(isCallable$8(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$4=global$b,isCallable$7=isCallable$e,WeakMap$1=global$b.WeakMap,weakMapBasicDetection=isCallable$7(WeakMap$1)&&/native code/.test(String(WeakMap$1)),shared$1=shared$3,uid=uid$2,keys=shared$3("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=weakMapBasicDetection,global$3=global$b,isObject$3=isObject$8,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$5=hasOwnProperty_1,shared=sharedStore.exports,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$1=global$3.TypeError,WeakMap=global$3.WeakMap,enforce=function(e){return has(e)?get(e):set(e,{})},getterFor=function(t){return function(e){if(isObject$3(e)&&(e=get(e)).type===t)return e;throw new TypeError$1("Incompatible receiver, "+t+" required")}},has=NATIVE_WEAK_MAP||shared.state?((store=shared.state||(shared.state=new WeakMap)).get=store.get,store.has=store.has,store.set=store.set,set=function(e,t){if(store.has(e))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,store.set(e,t),t},get=function(e){return store.get(e)||{}},function(e){return store.has(e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set=function(e,t){if(hasOwn$5(e,STATE))throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$5(e,STATE)?e[STATE]:{}},function(e){return hasOwn$5(e,STATE)}),internalState={set:set,get:get,has:has,enforce:enforce,getterFor:getterFor},uncurryThis$6=functionUncurryThis,fails$6=fails$d,isCallable$6=isCallable$e,hasOwn$4=hasOwnProperty_1,DESCRIPTORS$3=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource=inspectSource$1,InternalStateModule$1=internalState,enforceInternalState=InternalStateModule$1.enforce,getInternalState$1=InternalStateModule$1.get,$String$2=String,defineProperty$4=Object.defineProperty,stringSlice=uncurryThis$6("".slice),replace=uncurryThis$6("".replace),join=uncurryThis$6([].join),CONFIGURABLE_LENGTH=DESCRIPTORS$3&&!fails$6(function(){return 8!==defineProperty$4(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===stringSlice($String$2(t),0,7)&&(t="["+replace($String$2(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$4(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$3?defineProperty$4(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$4(n,"arity")&&e.length!==n.arity&&defineProperty$4(e,"length",{value:n.arity});try{n&&hasOwn$4(n,"constructor")&&n.constructor?DESCRIPTORS$3&&defineProperty$4(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$4(n,"source")||(n.source=join(TEMPLATE,"string"==typeof t?t:"")),e},isCallable$5=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$6(this)&&getInternalState$1(this).source||inspectSource(this)},"toString"),isCallable$e),definePropertyModule$2=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$3=function(e,t,n,i){var r=(i=i||{}).enumerable,s=void 0!==i.name?i.name:t;if(isCallable$5(n)&&makeBuiltIn(n,s,i),i.global)r?e[t]=n:defineGlobalProperty$1(t,n);else{try{i.unsafe?e[t]&&(r=!0):delete e[t]}catch(e){}r?e[t]=n:definePropertyModule$2.f(e,t,{value:n,enumerable:!1,configurable:!i.nonConfigurable,writable:!i.nonWritable})}return e},objectGetOwnPropertyNames={},ceil=Math.ceil,floor$1=Math.floor,mathTrunc=Math.trunc||function(e){e=+e;return(0<e?floor$1:ceil)(e)},trunc=mathTrunc,toIntegerOrInfinity$2=function(e){e=+e;return e!=e||0==e?0:trunc(e)},toIntegerOrInfinity$1=toIntegerOrInfinity$2,max=Math.max,min$1=Math.min,toAbsoluteIndex$1=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){e=toIntegerOrInfinity(e);return 0<e?min(e,9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$2=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex=toAbsoluteIndex$1,lengthOfArrayLike$1=lengthOfArrayLike$2,createMethod=function(a){return function(e,t,n){var i=toIndexedObject$3(e),r=lengthOfArrayLike$1(i);if(0!==r){var s,o=toAbsoluteIndex(n,r);if(a&&t!=t){for(;o<r;)if((s=i[o++])!=s)return!0}else for(;o<r;o++)if((a||o in i)&&i[o]===t)return a||o||0}return!a&&-1}},arrayIncludes={includes:createMethod(!0),indexOf:createMethod(!1)},uncurryThis$5=functionUncurryThis,hasOwn$3=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$5([].push),objectKeysInternal=function(e,t){var n,i=toIndexedObject$2(e),r=0,s=[];for(n in i)!hasOwn$3(hiddenKeys$2,n)&&hasOwn$3(i,n)&&push$1(s,n);for(;t.length>r;)!hasOwn$3(i,n=t[r++])||~indexOf(s,n)||push$1(s,n);return s},enumBugKeys$3=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],internalObjectKeys$1=objectKeysInternal,enumBugKeys$2=enumBugKeys$3,hiddenKeys$1=enumBugKeys$3.concat("length","prototype"),objectGetOwnPropertySymbols=(objectGetOwnPropertyNames.f=Object.getOwnPropertyNames||function(e){return internalObjectKeys$1(e,hiddenKeys$1)},{}),getBuiltIn$1=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$3),uncurryThis$4=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$2=anObject$4,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$1("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$2(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$2=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$1=objectDefineProperty,copyConstructorProperties$1=function(e,t,n){for(var i=ownKeys(t),r=definePropertyModule$1.f,s=getOwnPropertyDescriptorModule.f,o=0;o<i.length;o++){var a=i[o];hasOwn$2(e,a)||n&&hasOwn$2(n,a)||r(e,a,s(t,a))}},fails$5=fails$d,isCallable$4=isCallable$e,replacement=/#|\.prototype\./,isForced$1=function(e,t){e=data[normalize(e)];return e===POLYFILL||e!==NATIVE&&(isCallable$4(t)?fails$5(t):!!t)},normalize=isForced$1.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$1.data={},NATIVE=isForced$1.NATIVE="N",POLYFILL=isForced$1.POLYFILL="P",isForced_1=isForced$1,global$2=global$b,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$2=defineBuiltIn$3,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties=copyConstructorProperties$1,isForced=isForced_1,_export=function(e,t){var n,i,r,s=e.target,o=e.global,a=e.stat,l=o?global$2:a?global$2[s]||defineGlobalProperty(s,{}):global$2[s]&&global$2[s].prototype;if(l)for(n in t){if(i=t[n],r=e.dontCallGetSet?(r=getOwnPropertyDescriptor(l,n))&&r.value:l[n],!isForced(o?n:s+(a?".":"#")+n,e.forced)&&void 0!==r){if(typeof i==typeof r)continue;copyConstructorProperties(i,r)}(e.sham||r&&r.sham)&&createNonEnumerableProperty$2(i,"sham",!0),defineBuiltIn$2(l,n,i,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$2=descriptors,uncurryThis$3=functionUncurryThis,call$1=functionCall,fails$4=fails$d,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$2=toObject$4,IndexedObject=indexedObject,$assign=Object.assign,defineProperty$3=Object.defineProperty,concat=uncurryThis$3([].concat),objectAssign=!$assign||fails$4(function(){var e,t,n,i;return!(!DESCRIPTORS$2||1===$assign({b:1},$assign(defineProperty$3({},"a",{enumerable:!0,get:function(){defineProperty$3(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},i="abcdefghijklmnopqrst",(e={})[n=Symbol("assign detection")]=7,i.split("").forEach(function(e){t[e]=e}),7!==$assign({},e)[n])||objectKeys$1($assign({},t)).join("")!==i})?function(e,t){for(var n=toObject$2(e),i=arguments.length,r=1,s=getOwnPropertySymbolsModule.f,o=propertyIsEnumerableModule.f;r<i;)for(var a,l=IndexedObject(arguments[r++]),c=s?concat(objectKeys$1(l),s(l)):objectKeys$1(l),d=c.length,u=0;u<d;)a=c[u++],DESCRIPTORS$2&&!call$1(o,l,a)||(n[a]=l[a]);return n}:$assign,$$2=_export,assign=objectAssign;_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign});const useStyles$1$1=makeStyles()(()=>({headerContainer:{padding:"20px 15px",borderBottom:".5px solid #D9E2EB"}})),SystemInfoHeader=()=>{var e=useStyles$1$1()["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({className:e.headerContainer,"data-test":"os-admin-center.system-info.tab-header"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h3","data-testid":"os-admin-center.system-info.tab-title","data-test":"os-admin-center.system-info.tab-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.tab-title",defaultMessage:"System Information",description:"System Information label"})})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center.system-info.tab-description",defaultMessage:"View Instance information and historical version updates for this environment.",description:"System Information description text"})}))]}))},useStyles$3=makeStyles()(()=>({tile:{marginRight:"12px",width:"257px",height:"96px",borderRadius:"4px",border:"1px solid #DADFE8",background:"rgba(255, 253, 249, 0.80)",display:"flex",justifyContent:"center",alignItems:"center"}})),SystemInfoTile=({title:e,content:t})=>{var n=useStyles$3()["classes"];return jsxRuntime.exports.jsx(Box,Object.assign({className:n.tile,"data-test":"os-admin-center.system-info"},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{textAlign:"center"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body1",sx:{fontWeight:700}},{children:e})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"body2","data-testid":"os-admin-center.system-info."+t,"data-test":"os-admin-center.system-info."+t},{children:t}))]}))}))},SLICE_NAME$1="adminCenterSystemInfo",namespace$1="systemInfo",initialState$1={status:"idle",versionInfo:null,versionList:null},adminCenterSystemInfoSlice=createSlice({name:SLICE_NAME$1+"/"+namespace$1,initialState:initialState$1,reducers:{fetchVersionInfoStart(e){e.status="pending"},fetchVersionInfoSuccess(e,t){e.status="success";var{platformInfo:t,versionList:n}=t.payload;e.versionInfo=t,e.versionList=n},fetchVersionInfoFailure(e){e.status="failure",e.versionInfo=null}}}),actions$1=adminCenterSystemInfoSlice.actions;var systemInfo_state=adminCenterSystemInfoSlice.reducer;const rootReducer$1=combineReducers({[namespace$1]:systemInfo_state});function __awaiter$1(e,o,a,l){return new(a=a||Promise)(function(n,t){function i(e){try{s(l.next(e))}catch(e){t(e)}}function r(e){try{s(l.throw(e))}catch(e){t(e)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(i,r)}s((l=l.apply(e,o||[])).next())})}const fetchPlatformInfo=(s,o)=>__awaiter$1(void 0,void 0,void 0,function*(){var e="systemPlatformInfo",t=`query ${e} {
|
|
2
2
|
platformInfo {
|
|
3
3
|
aiWAREVersion {
|
|
4
4
|
currentVersion {
|
|
@@ -41,4 +41,4 @@ import{j as jsxRuntime,X as createSlice,Y as combineReducers,Z as useSelector,r
|
|
|
41
41
|
jsondata
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
`,operationName:e},n));return{organizationName:e[t].name,organizationImageUrl:e[t].imageUrl,organizationStatus:e[t].status,jsondata:e[t].jsondata}})}function fetchOrgApplications(n,i){return __awaiter(this,void 0,void 0,function*(){var e="getOrgApplications",t="applications";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getOrgApplications ($orgId: ID!) {\n applications (\n orgId: $orgId\n status: active\n limit: 999\n orderBy: {\n field: name\n direction: asc\n }\n ) {\n records {\n id\n name\n iconUrl\n signedIconUrl\n description\n }\n }\n }\n ",operationName:e,variables:{orgId:i}},n)))[t].records})}const getOrgSettingsEndpoint=(e,t)=>e+"/v1/admin/organizations/"+t,getCurrentOrganizationSettings=({apiConfigs:n,orgId:i})=>__awaiter(void 0,void 0,void 0,function*(){var{apiRoot:e,token:t}=n;return(yield fetch(getOrgSettingsEndpoint(e,i),{method:"GET",credentials:"include",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t})})).json()}),updateCurrentOrganizationSettings=({apiConfigs:n,orgId:i,body:r})=>__awaiter(void 0,void 0,void 0,function*(){var{apiRoot:e,token:t}=n;return(yield fetch(getOrgSettingsEndpoint(e,i),{method:"PUT",credentials:"include",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t}),body:JSON.stringify(r)})).json()}),deactivateOrganization=({apiConfigs:n,orgId:i})=>__awaiter(void 0,void 0,void 0,function*(){var{apiRoot:e,token:t}=n;return 204===(yield fetch(getOrgSettingsEndpoint(e,i),{method:"DELETE",credentials:"include",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t})})).status}),selectIsOLPAvailable=(createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.status),createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>"enabled"===(null==e?void 0:e.olpFeature))),selectActiveView=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.activeView),selectIsNavExpanded=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.isNavExpanded),selectNavGroupState=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.navGroupOpenState),selectHiddenViews=(createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.isFullScreen),createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>(null==e?void 0:e.hiddenViews)||[])),selectOrgSettings=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.orgSettings),selectAdminCenterOrgId=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==e?void 0:e.organization)?void 0:e.id}),selectAdminCenterOrgName=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==e?void 0:e.organization)?void 0:e.name}),selectAdminCenterOrgStatus=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==e?void 0:e.organization)?void 0:e.status}),selectOrgIsUsersCurrentOrg=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==e?void 0:e.organization)?void 0:e.isUsersCurrentOrg}),selectOrgDefaultApplicationId=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==(e=null==e?void 0:e.orgSettings)?void 0:e.features)?void 0:e.defaultApplication}),selectOrgApplications=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.applications),selectOrgApplicationById=t=>createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null!=(e=null==(e=null==e?void 0:e.applications)?void 0:e.find(e=>e.id===t))?e:void 0});function*fetchOlpAvailabilitySaga(){try{var e=yield select(selectApiConfigs),t=yield select(selectAdminCenterOrgId$1),n=yield call$7(checkOlpAvailability,e,t.toString());yield put(actions.fetchOlpAvailabilitySuccess(n||"disabled"))}catch(e){yield put(actions.fetchOlpAvailabilityFailure()),console.log(e)}}function*fetchOrgSettingsSaga(e){try{var t=yield select(selectApiConfigs),n=yield select(selectAdminCenterOrgId$1),i=yield call$7(fetchOrgSettings,t,n.toString()),r=yield call$7(getCurrentOrganizationSettings,{apiConfigs:t,orgId:n.toString()});yield put(actions.fetchApplicationsInit()),yield put(actions.fetchOrgSettingsSuccess(Object.assign(Object.assign({},i),{organizationStatus:r.status,jsondata:r.kvp})))}catch(e){yield put(actions.fetchOrgSettingsFailure())}}function*fetchOrgApplicationsSaga(){try{var e=yield select(selectApiConfigs),t=yield select(selectAdminCenterOrgId$1),n=yield call$7(fetchOrgApplications,e,t);yield put(actions.fetchApplicationsSuccess(n))}catch(e){console.log(e),yield put(actions.fetchApplicationsFailure())}}function*updateOrgSettingsSaga(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n=yield select(selectApiConfigs),i=yield select(selectAdminCenterOrgId$1),r=yield call$7(getCurrentOrganizationSettings,{apiConfigs:n,orgId:i.toString()}),{logoUploadState:s,orgName:o,orgLogoUrl:a,features:l,initialFeatures:c}=yield select(selectOrgSettings),d=(r.organizationName=o,!!r.kvp.image&&!a&&!s);s?r.kvp.image=s.unsignedUrl:d&&(r.kvp.image=null),isEqual_1(l,c)||(l.engineApprovalWhiteListed&&(r.kvp.engineApprovalWhiteListed=l.engineApprovalWhiteListed),r.kvp.features=Object.assign(Object.assign({},r.kvp.features),l)),yield call$7(updateCurrentOrganizationSettings,{apiConfigs:n,orgId:i,body:r}),yield delay(1500),yield put(actions.updateOrgSettingsSuccess()),yield put(showMessage({content:isEqual_1("production","development")?"Successfully updated Organization Settings":t({id:"os-admin-center-browse:org-settings.update-success",defaultMessage:[{type:0,value:"Successfully updated Organization Settings"}]}),severity:MessageSeverity.Success}))}catch(e){console.warn("Error occurred when attempting to update Organization Settings: ",e),yield put(actions.updateOrgSettingsFailure()),yield put(showMessage({content:isEqual_1("production","development")?"Something went wrong. Unable to update Organization Settings":t({id:"os-admin-center-browse:org-settings.update-failure",defaultMessage:[{type:0,value:"Something went wrong. Unable to update Organization Settings"}]}),severity:MessageSeverity.Error}))}}function*deactivateOrgSaga(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n=yield select(selectApiConfigs),i=yield select(selectAdminCenterOrgId$1);yield call$7(deactivateOrganization,{apiConfigs:n,orgId:i}),yield put(actions.deactivateOrganizationSuccess()),yield put(unmountPanel(AvailableComponents.ADMIN_CENTER)),yield put(showMessage({content:isEqual_1("production","development")?"Successfully deactivated Organization":t({id:"os-admin-center-browse:org.deactivate-success",defaultMessage:[{type:0,value:"Successfully deactivated Organization"}]}),severity:MessageSeverity.Success}))}catch(e){console.warn("Error occurred when attempting to deactivate orginization: ",e),yield put(actions.deactivateOrganizationFailure()),yield put(showMessage({content:isEqual_1("production","development")?"Something went wrong. Unable to update Organization Settings":t({id:"os-admin-center-browse:org.deactivate-failure",defaultMessage:[{type:0,value:"Something went wrong. Unable to deactivate Organization"}]}),severity:MessageSeverity.Error}))}}function*fetchOlpAvailabilityWatcher(){yield takeEvery$1(actions.fetchOlpAvailabilityStart.type,fetchOlpAvailabilitySaga)}function*fetchOrgSettingsWatcher(){yield takeEvery$1(actions.fetchOrgSettingsStart.type,fetchOrgSettingsSaga)}function*fetchOrgApplicationsWatcher(){yield takeEvery$1(actions.fetchApplicationsInit.type,fetchOrgApplicationsSaga)}function*updateOrgSettingsWatcher(){yield takeEvery$1(actions.updateOrgSettingsStart.type,updateOrgSettingsSaga)}function*triggerOlpCheckWatcher(){yield takeEvery$1(actions.setAdminCenterOrganization.type,fetchOlpAvailabilitySaga)}function*deactivateOrgWatcher(){yield takeLatest$1(actions.deactivateOrganizationInit.type,deactivateOrgSaga)}function*rootSaga(){yield all([fetchOlpAvailabilityWatcher(),fetchOrgSettingsWatcher(),updateOrgSettingsWatcher(),triggerOlpCheckWatcher(),fetchOrgApplicationsWatcher(),deactivateOrgWatcher()])}function getAdminCenterBrowseModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useStyles$2=makeStyles()((e,{height:t})=>({header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,display:"flex",height:t,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)}})),Header=({hidePanel:e,height:t})=>{t=useStyles$2({height:t}).classes;const n=useDispatch(),i=useSelector(selectIsFullscreenEnabled);var r=useSelector(selectIsNavExpanded);const s=useSelector(selectOrgIsUsersCurrentOrg),o=useSelector(selectAdminCenterOrgName);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-test":"ac-header"},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{mr:1},onClick:()=>{n(actions.toggleNavExpanded())},"aria-expanded":r,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large"},{children:jsxRuntime.exports.jsx(Hamburger,{})}))})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",className:t.title,"data-test":"ac-title"},{children:s?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.header.title",defaultMessage:"Admin Center",description:"Panel header of the admin center"}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.header.title.org-detail",defaultMessage:"Org Detail",description:"Panel header of the admin center"})," - "+o]})})),jsxRuntime.exports.jsxs("div",Object.assign({className:t.headerActionContainer,"data-test":"ac-header.action-container"},{children:[jsxRuntime.exports.jsx("div",{className:t.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.open.help-center.tooltip",defaultMessage:"View Help",description:"Help icon"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"admin-center-help-icon",size:"large"},{children:jsxRuntime.exports.jsx(HelpOutline,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:i?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{n(n(setIsFullscreenEnabled(!i)))},"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:i?jsxRuntime.exports.jsx(FullscreenExit,{}):jsxRuntime.exports.jsx(Fullscreen,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel","data-test":"ac-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))},tabWidth=197,useStyles$1=makeStyles()((e,{height:t="64px"},n)=>({root:{display:"flex",flexGrow:1,height:t,position:"relative"},tabs:{borderRight:".5px solid "+e.palette.divider,transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:e.spacing(1.6)+" "+e.spacing(2.5),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",color:"#555F7C",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"}},tabsExpanded:{width:tabWidth,minWidth:tabWidth,paddingRight:e.spacing(2),paddingLeft:e.spacing(2),["& "+n.tabRoot]:{width:`calc(${tabWidth}px - ${e.spacing(3)})`,flexDirection:"row",textTransform:"capitalize","& svg":{marginRight:e.spacing(2),marginBottom:"0"}}},tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg":{marginBottom:"0 !important",marginRight:e.spacing(2)}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}}})),REQUIRED_BUSINESS_UNIT="Flex",BILLING_URL="https://billing.aiware.com/p/login/fZe15tbn5fDP3Yc000",billingText=jsxRuntime.exports.jsx(FormattedMessage,{id:"os.admin-center.browse.billing-nav-item.label",defaultMessage:"Billing",description:"Admin Center Billing Nav Item Label"}),BillingNavItem=({isNavExpanded:e})=>{return useSelector(selectUserOrganizationBusinessUnit)!==REQUIRED_BUSINESS_UNIT?null:jsxRuntime.exports.jsx(Tooltip,Object.assign({placement:"right",title:!e&&billingText,"data-test":"ac-nav-tab-billing"},{children:jsxRuntime.exports.jsx(Button,Object.assign({startIcon:jsxRuntime.exports.jsx(CreditCard,{style:{marginBottom:"0px",fontSize:"24px",marginLeft:e?"0px":"30px"}}),onClick:()=>{window.open(BILLING_URL,"_blank")},sx:{color:"#5C6269",opacity:1,borderRadius:"4px",fontSize:"14px",marginBottom:"5px",minHeight:"45px",minWidth:e?"176px":"45px",padding:"5px 10px 5px 20px",width:"100%","&:hover":{background:"#F2F5F9"},justifyContent:e?"flex-start":"center"},"data-test":"ac-nav-tab-billings-view",variant:"text",endIcon:jsxRuntime.exports.jsx(OpenWindow,{style:{transform:"translate(50px, 0px)",fontSize:"20px"}})},{children:e&&billingText}))}))},ErrorState=panelComponents["error"],Container$1=({title:e,isLoading:t,isErrored:n,onRetry:i,children:r})=>t?jsxRuntime.exports.jsx(Stack,Object.assign({sx:{position:"relative",height:"100%",padding:"10px 30px",alignItems:"center",justifyContent:"center"},direction:"row"},{children:jsxRuntime.exports.jsx(CircularProgress,{})})):n?jsxRuntime.exports.jsx(ErrorState,{onRetry:i}):jsxRuntime.exports.jsx(Stack,Object.assign({sx:{position:"relative",height:"100%",border:"1px solid #DADFE8",borderRadius:"4px"},direction:"row"},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{width:"100%"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({component:"span",sx:{padding:"20px 30px"}},{children:e})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(Stack,Object.assign({"data-testid":"ac-settings-container",sx:{padding:"0 30px",width:"100%",boxSizing:"border-box"}},{children:r}))]}))})),{ImageUpload}=imageUpload["jsx"],BasicInformationTab=()=>{const t=useDispatch(),{orgName:e,orgLogoUrl:n,loadingStatus:i,hasLocalChanges:r,saveStatus:s,editMode:o}=useSelector(selectOrgSettings);var a="100px";const l="success"===i;var c="pending"===i,d="failure"===i,u="pending"===s;const p=e=>{t(actions.setOrgSettingsEditMode({key:e,value:!0}))};const g=()=>{t(actions.fetchOrgSettingsStart())};return react.exports.useEffect(()=>{r||l||g()},[]),react.exports.useEffect(()=>{!n&&l&&t(actions.setOrgSettingsEditMode({key:"orgLogoUrl",value:!0}))},[n,l]),jsxRuntime.exports.jsxs(Container$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.title",defaultMessage:"Basic Information",description:"Title for the organization settings"}),isLoading:c,isErrored:d,onRetry:g},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{alignItems:"center",gap:"20px",padding:"20px 0"},direction:"row"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({component:"span",sx:{minWidth:"160px",color:"#5C6269"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.logo-upload",defaultMessage:"Organization Logo: ",description:"Title for the organization settings logo upload"})})),jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{width:a,height:a}},{children:o.orgLogoUrl?jsxRuntime.exports.jsx(ImageUpload,{disabled:u,getUrl:!0,image:n,outerWidth:"100%",outerHeight:"100%",innerWidth:"95%",innerHeight:"95%",uploadIconWidthHeight:"40px",handleChange:e=>{t(actions.setSettingsChanged(!0)),t(actions.setSettingsChangeLogoUrl(e))},testId:"org-settings-upload-image"}):jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{width:a,height:a,borderRadius:"5px",border:"1px solid #DADFE8",overflow:"hidden"}},{children:n&&jsxRuntime.exports.jsx("img",{style:{width:"100%",height:"100%",objectFit:"contain"},draggable:!1,src:n,alt:"Organization Logo"})}))})),!o.orgLogoUrl&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.org-logo.tooltip-edit",defaultMessage:"Edit Organization Logo",description:"Tooltip for the organization settings edit org logo button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>p("orgLogoUrl"),disabled:u,sx:{marginLeft:"auto"}},{children:jsxRuntime.exports.jsx(AddPhotoAlternateOutlined,{})}))}))]})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{alignItems:"center",gap:"20px",padding:"20px 0"},direction:"row"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({component:"span",sx:{minWidth:"160px",color:"#5C6269"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.org-name",defaultMessage:"Organization Name: ",description:"Title for the organization settings org name input"})})),o.orgName?jsxRuntime.exports.jsx(TextField,{size:"small",disabled:u,value:e,onChange:e=>{e=e.target.value;t(actions.setSettingsChangeName(e)),t(actions.setSettingsChanged(!0))},sx:{width:"100%"}}):jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontWeight:"bold"}},{children:e})),!o.orgName&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.org-name.tooltip-edit",defaultMessage:"Edit Organization Name",description:"Tooltip for the organization settings edit org name button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>p("orgName"),disabled:u,sx:{marginLeft:"auto"}},{children:jsxRuntime.exports.jsx(EditOutlined,{})}))}))]}))]}))},SystemSettingsTab=()=>{const n=useDispatch();var e=useSelector(selectOrgApplications),t=useSelector(selectOrgDefaultApplicationId),i=useSelector(selectOrgApplicationById(t)),r=useSelector(selectAdminCenterOrgStatus),s=useSelector(selectOrgIsUsersCurrentOrg);const{loadingStatus:o,saveStatus:a,features:l}=useSelector(selectOrgSettings),[c,d]=react.exports.useState(!1),[u,p]=react.exports.useState(!1);var g="pending"===o,m="failure"===o;const x="pending"===o||"pending"===a;var b="deleted"===r?"Organization is already deactivated":s?"Cannot deactivate current organization":void 0;const f=[{title:SHARED_TEXT.orgSettingsStep.olpTitle(),description:SHARED_TEXT.orgSettingsStep.olpDescription(),right:{type:"switch",key:"enableRBACFeature",disabled:!0,tooltip:"Only available during Organization Creation"}},{title:SHARED_TEXT.orgSettingsStep.autoApproveEnginesSettingTitle(),description:SHARED_TEXT.orgSettingsStep.autoApproveEnginesSettingDescription(),right:{type:"switch",key:"engineApprovalWhiteListed"}},{title:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySettingTitle(),description:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySettingDescription(),left:{type:"select",key:"retentionDays",show:"enabled"===l.retentionCleanup,options:[{value:30,label:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting30Days()},{value:90,label:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting90Days()},{value:457,label:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting15Months()}]},right:{type:"switch",key:"retentionCleanup"}},{title:SHARED_TEXT.orgSettingsStep.firstLoadApplicationSettingTitle(null==i?void 0:i.name),description:SHARED_TEXT.orgSettingsStep.firstLoadApplicationSettingDescription(),right:{type:"icon-button",key:"first-load-application",icon:jsxRuntime.exports.jsx(Edit,{}),onClick:()=>p(!u)}},{title:SHARED_TEXT.orgSettingsStep.autoUpdatePackagesTitle(),description:SHARED_TEXT.orgSettingsStep.autoUpdatePackagesDescription(),right:{type:"switch",key:"automaticPackageCreation",keys:["useEngineGrant","useAppGrant"]}},{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.title",defaultMessage:"Deactivate Organization",description:"Deactivate Organization"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.description",defaultMessage:"Deactivating the organization will disable all users and applications. This action cannot be undone.",description:"Deactivate Organization"}),right:{type:"button",key:"deactivate-organization",disabled:"deleted"===r||s,tooltip:b,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.button",defaultMessage:"Deactivate",description:"Deactivate Organization"}),onClick:()=>d(!0)}}];return jsxRuntime.exports.jsxs(Container$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.subtitle",defaultMessage:"Manage settings for all users.",description:"Title for the organization system settings subtitle"}),isLoading:g,isErrored:m,onRetry:()=>{}},{children:[f.filter(e=>!1!==(null==e?void 0:e.show)).map((i,e)=>jsxRuntime.exports.jsx(RowSetting,{bottomBorder:e!==f.length-1,title:i.title,description:i.description,renderLeftComponent:()=>{var e;return null!=i&&i.left&&void 0!==i.left&&"select"===i.left.type&&void 0!==(null==(e=i.left)?void 0:e.key)&&!1!==(null==(e=i.left)?void 0:e.show)?jsxRuntime.exports.jsx(Select,Object.assign({"data-testid":"settings-"+i.left.key,disabled:x,value:l[i.left.key],onChange:e=>{var e=Number(e.target.value),t=[null!=(t=null==(t=null==i?void 0:i.left)?void 0:t.key)?t:"",...(null==(t=i.left)?void 0:t.keys)||[]];n(actions.setOrgSettingsFeature({keys:t,value:e}))},size:"small",sx:{width:"230px",marginTop:"20px"}},{children:i.left.options.map((e,t)=>{var n;return jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e.value,"data-testid":`settings-${null==(n=i.left)?void 0:n.key}-`+e.value},{children:e.label}),t+1)})})):null},renderRightComponent:()=>{var e;if(i.right){if("switch"===i.right.type&&void 0!==(null==(e=i.right)?void 0:e.key))return jsxRuntime.exports.jsx(GenerateTooltip,Object.assign({title:i.right.tooltip},{children:jsxRuntime.exports.jsx(Switch,{"data-testid":"settings-"+i.right.key,disabled:x||!0===(null==(e=i.right)?void 0:e.disabled),checked:"enabled"===l[i.right.key],onChange:()=>{var e="enabled"===l[i.right.key]?"disabled":"enabled",t=i.right.keys?[i.right.key,...i.right.keys]:[i.right.key];n(actions.setOrgSettingsFeature({keys:t,value:e}))}})}));if("button"===i.right.type)return jsxRuntime.exports.jsx(GenerateTooltip,Object.assign({title:i.right.tooltip},{children:jsxRuntime.exports.jsx(Button,Object.assign({variant:"outlined","data-testid":"settings-"+i.right.key,disabled:x||!0===(null==(e=i.right)?void 0:e.disabled),onClick:i.right.onClick},{children:i.right.label}))}));if("icon-button"===i.right.type)return jsxRuntime.exports.jsx(GenerateTooltip,Object.assign({title:i.right.tooltip},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-testid":"settings-"+i.right.key,disabled:x||!0===(null==(e=i.right)?void 0:e.disabled),onClick:i.right.onClick},{children:i.right.icon}))}))}return null}},"settings-row-"+(e+1))),jsxRuntime.exports.jsx(ConfirmDialog,{isOpen:c,testId:"ac-deactivate-org-dialog",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.confirm.title",defaultMessage:"Deactivate Organization",description:"Deactivate Organization"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.confirm.description",defaultMessage:"Are you sure you want to deactivate this Organization? Users will no longer be able to access this Organization or its content.",description:"Deactivate Organization"}),cancelLabel:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.confirm.cancel",defaultMessage:"Cancel",description:"Cancel"}),confirmLabel:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.confirm.deactivate",defaultMessage:"Yes, Deactivate",description:"Deactivate"}),onClose:()=>{d(!1)},onConfirm:()=>{d(!1),n(actions.deactivateOrganizationInit())},DialogTitleProps:{sx:{fontSize:18,fontWeight:"semibold"}},DialogProps:{PaperProps:{sx:{p:3}},maxWidth:"xs"}}),jsxRuntime.exports.jsx(FirstLoadApplicationModal,{id:"ac",applications:e,defaultLoadApplication:t,isOpen:u,onSelectedApplication:e=>{n(actions.setOrgSettingsFeature({keys:["defaultApplication"],value:e.id}))},onClose:()=>p(!1)})]}))};function GenerateTooltip({title:e,children:t}){return e?jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e,placement:"left",arrow:!0},{children:jsxRuntime.exports.jsx("span",{children:t})})):t}const tabsStyle={"& .Sdk-MuiButtonBase-root.Sdk-MuiTab-root.Sdk-MuiTab-textColorPrimary.Sdk-Mui-selected":{color:"#2A323C!important"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#2A323C"}},createTab=(!function(e){e.BASIC_INFORMATION="basic-information",e.SYSTEM_SETTINGS="system-settings"}(EOrganizationSettingsTab=EOrganizationSettingsTab||{}),(e,t,n,i=!1,r=!1)=>({label:e,component:t,id:n,isBehindBeta:i,isSuperAdmin:r})),organizationSettingsTabs=[createTab("Basic Information",jsxRuntime.exports.jsx(BasicInformationTab,{}),EOrganizationSettingsTab.BASIC_INFORMATION,!1,!1),createTab("System Settings",jsxRuntime.exports.jsx(SystemSettingsTab,{}),EOrganizationSettingsTab.SYSTEM_SETTINGS,!0,!0)];function TabPanel(e){var{children:t,value:n,index:i}=e,e=__rest(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:n!==i,id:"organization-settings-tabpanel-"+i,"data-testid":"organization-settings-tabpanel-"+i,"aria-labelledby":"organization-settings-tab-"+i},e,{children:n===i&&jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{p:3}},{children:t}))}))}function a11yProps(e){return{id:"organization-settings-tab-"+e,"aria-controls":"organization-settings-tabpanel-"+e}}function OrganizationSettingsTabs(){const[n,i]=ReactExports.useState(0),r=useSelector(betaFeaturesSelector),s=useSelector(selectIsSuperAdmin);return jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{width:"100%"}},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{borderBottom:1,borderColor:"divider"}},{children:jsxRuntime.exports.jsx(Tabs,Object.assign({sx:tabsStyle,value:n,onChange:(e,t)=>{i(t)},"aria-label":"org settings tabs"},{children:organizationSettingsTabs.map(e=>e.isSuperAdmin&&!s?null:e.isBehindBeta&&!r?jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.isBehindBeta&&!r?"Coming Soon":""},{children:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Tab,Object.assign({disabled:e.isBehindBeta&&!r,label:e.label},a11yProps(e.index)),e.id)})})):jsxRuntime.exports.jsx(Tab,Object.assign({disabled:e.isBehindBeta&&!r,label:e.label},a11yProps(e.index)),e.id))}))})),organizationSettingsTabs.map((e,t)=>e.isBehindBeta&&!r||e.isSuperAdmin&&!s?null:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:t},{children:e.component}),e.id))]}))}const OrganizationSettings=()=>{const e=useDispatch();var t=navSectionStyles()["classes"],{hasLocalChanges:n,saveStatus:i,orgName:r}=useSelector(selectOrgSettings),i="pending"===i,n=!n||!r;return jsxRuntime.exports.jsxs("section",Object.assign({className:t.root},{children:[jsxRuntime.exports.jsx(Stack,Object.assign({component:"header",sx:{borderBottom:"0.5px solid #D5DFE9",flexDirection:"column",padding:"20px"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{width:"100%",alignItems:"center",justifyContent:"space-between"},direction:"row"},{children:[jsxRuntime.exports.jsxs(Stack,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:t.startToolbar},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",component:"span","data-testid":"os-admin-center-org-settings-title","data-test":"os-admin-center-org-settings-title",sx:{fontWeight:"600",mb:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.view-title",defaultMessage:"Organization Settings",description:"Title for the organization settings view"})}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:t.startToolbar},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-testid":"os-admin-center-org-settings-sub-title","data-test":"os-admin-center-org-settings-sub-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.view-description",defaultMessage:"Manage information and preferences for users of this Organization.",description:"Description for the organization settings view"})}))}))]}),jsxRuntime.exports.jsx(Stack,{children:jsxRuntime.exports.jsx(LoadingButton,Object.assign({loading:i,disabled:n,onClick:()=>{e(actions.updateOrgSettingsStart())},variant:"contained",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.button-save",defaultMessage:"Save",description:"Save button for the organization settings view"})}))})]}))})),jsxRuntime.exports.jsx(OrganizationSettingsTabs,{})]}))},AdminCenterNavigationItems={[EAdminCenterView.users]:{id:EAdminCenterView.users,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.users.view",defaultMessage:"Users",description:"The label of users tab button."}),testLabel:"ac-users-view",icon:jsxRuntime.exports.jsx(Users,{}),content:()=>jsxRuntime.exports.jsx(UsersPanel,{}),group:EAdminCenterNavItemGroup.NONE,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.orgSettings]:{id:EAdminCenterView.orgSettings,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.view",defaultMessage:"Org Settings",description:"The label of Org Settings tab button."}),testLabel:"ac-org-settings-view",icon:jsxRuntime.exports.jsx(OrgSettings,{style:{transform:"translate(2px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(OrganizationSettings,{}),group:EAdminCenterNavItemGroup.SETTINGS,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.retentionPolicy]:{id:EAdminCenterView.retentionPolicy,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.retention-policy.view",defaultMessage:"Retention Policy",description:"The label of Retention Policy tab button."}),testLabel:"ac-retention-policy-view",icon:jsxRuntime.exports.jsx(RetentionPolicy,{style:{transform:"translate(2px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(PlaceholderElement,{label:"Retention Policy View",ticketId:0}),group:EAdminCenterNavItemGroup.NONE,isOLPItem:!1,isBehindBeta:!0,isComingSoon:!0,isHiddenForSuperadmin:!1},[EAdminCenterView.customLogin]:{id:EAdminCenterView.customLogin,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.custom-login.view",defaultMessage:"Custom Login",description:"The label of Custom Login tab button."}),testLabel:"ac-custom-login-view",icon:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{}),content:()=>jsxRuntime.exports.jsx(CustomLoginTab,{}),group:EAdminCenterNavItemGroup.SETTINGS,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.approvals]:{id:EAdminCenterView.approvals,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.approvals.view",defaultMessage:"Approvals",description:"The label of approvals tab button."}),testLabel:"ac-approvals-view",icon:jsxRuntime.exports.jsx(Verified,{style:{transform:"translate(2px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(Approvals,{}),group:EAdminCenterNavItemGroup.NONE,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.systemInfo]:{id:EAdminCenterView.systemInfo,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.system-info.view",defaultMessage:"System Info",description:"The label for System Info view"}),testLabel:"ac-system-info-view",icon:jsxRuntime.exports.jsx(Information,{}),content:()=>jsxRuntime.exports.jsx(SystemInfo,{}),group:EAdminCenterNavItemGroup.NONE,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.permissionSets]:{id:EAdminCenterView.permissionSets,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.permission-sets.view",defaultMessage:"Permission Sets",description:"The label for Permission Sets view"}),testLabel:"ac-permission-sets-view",icon:jsxRuntime.exports.jsx(Lock,{}),content:()=>jsxRuntime.exports.jsx(PermissionSets,{}),group:EAdminCenterNavItemGroup.PERMISSIONS,isOLPItem:!0,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!0},[EAdminCenterView.accessControl]:{id:EAdminCenterView.accessControl,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.system-access.view",defaultMessage:"System Access",description:"The label of access control tab button."}),testLabel:"ac-access-control-view",icon:jsxRuntime.exports.jsx(SecurityGroup,{style:{transform:"translate(4px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(AccessControl,{}),group:EAdminCenterNavItemGroup.PERMISSIONS,isOLPItem:!0,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!0},[EAdminCenterView.groups]:{id:EAdminCenterView.groups,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.groups.view",defaultMessage:"Groups",description:"The label of groups tab button."}),testLabel:"ac-groups-view",icon:jsxRuntime.exports.jsx(Group,{style:{transform:"translate(2px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(GroupsPanel,{}),group:EAdminCenterNavItemGroup.PERMISSIONS,isOLPItem:!0,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!0},[EAdminCenterView.apiTokens]:{id:EAdminCenterView.apiTokens,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.api-tokens.view",defaultMessage:"API Tokens",description:"The label for API Tokens view"}),testLabel:"ac-api-tokens-view",icon:jsxRuntime.exports.jsx(Lock2,{style:{transform:"translate(4px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(ApiTokensTab,{}),group:EAdminCenterNavItemGroup.SECURITY,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!0},[EAdminCenterView.iam]:{id:EAdminCenterView.iam,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.iam.view",defaultMessage:"IAM",description:"The label for the IAM view"}),testLabel:"ac-iam-view",icon:jsxRuntime.exports.jsx(Iam,{style:{transform:"translate(4px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(IamTab,{}),group:EAdminCenterNavItemGroup.SECURITY,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.auditLogs]:{id:EAdminCenterView.auditLogs,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.audit-logs.view",defaultMessage:"Audit Logs",description:"The label of Audit Logs tab button."}),testLabel:"ac-audit-logs-view",icon:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{}),content:()=>jsxRuntime.exports.jsx(AuditLogWidget,{}),group:EAdminCenterNavItemGroup.SECURITY,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1}},getNavItem=e=>AdminCenterNavigationItems[e],getAllNavItems=()=>Object.keys(AdminCenterNavigationItems).map(e=>AdminCenterNavigationItems[e]),getNavItemsByGroup=t=>getAllNavItems().filter(e=>e.group===t),getNavItemProps={tooltip:(e,t,n)=>{let i=t?"":e.label;return n&&(i=jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[t?"":jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[e.label," - "]}),jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.nav-item.tooltip.coming-soon",defaultMessage:"Coming soon",description:"The label for the coming soon tooltip"})]})),{"data-test":"ac-nav-tab-"+e.testLabel,placement:"right",title:i}},tab:(e,t,n,i)=>{return Object.assign(Object.assign({wrapped:!0,label:t?e.label:"",icon:e.group===EAdminCenterNavItemGroup.NONE?e.icon:jsxRuntime.exports.jsx("span",{style:{marginLeft:"30px"}}),classes:{root:i.tabRoot,wrapped:t?i.tabExpandedWrapper:i.tabWrapper,selected:t?i.tabExpandedSelected:i.tabSelected}},muiTabA11yProps(e.id)),n?{sx:{opacity:"0.5!important"},onClick:()=>{}}:{})}};function muiTabA11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}const NavigationItem=({view:e})=>{var t=useStyles$1({height:"64px"})["classes"];const n=useDispatch();var i=useSelector(selectActiveView),r=useSelector(selectHiddenViews),s=getNavItem(e),{isBehindBeta:o,isComingSoon:a,isOLPItem:l}=s,c=useSelector(betaFeaturesSelector),d=useSelector(selectIsOLPAvailable),i=e===i,u=useSelector(selectIsNavExpanded),r=r.includes(e);return o&&!c||r||l&&!d?null:jsxRuntime.exports.jsx(Tooltip,Object.assign({},getNavItemProps.tooltip(s,u,a),{children:jsxRuntime.exports.jsx(Tab,Object.assign({onClick:()=>{n(actions.setActiveView(e))}},getNavItemProps.tab(s,u,a,t),{selected:i}))}))},AdminCenterNavigationItemGroups={[EAdminCenterNavItemGroup.NONE]:{id:EAdminCenterNavItemGroup.NONE,label:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{}),testLabel:"admin-center.navigation.group.none",icon:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{}),isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1},[EAdminCenterNavItemGroup.PERMISSIONS]:{id:EAdminCenterNavItemGroup.PERMISSIONS,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.group.permissions",defaultMessage:"Permissions",description:"The label of the navigation group - permissions"}),testLabel:"admin-center.navigation.group.permissions",icon:jsxRuntime.exports.jsx(Lock,{sx:{marginLeft:"13px"}}),isOLPItem:!0,isBehindBeta:!1,isComingSoon:!1},[EAdminCenterNavItemGroup.SECURITY]:{id:EAdminCenterNavItemGroup.SECURITY,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.group.security",defaultMessage:"Security",description:"The label of the navigation group - security"}),testLabel:"admin-center.navigation.group.security",icon:jsxRuntime.exports.jsx(Lock2,{sx:{marginLeft:"15px"}}),isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1},[EAdminCenterNavItemGroup.SETTINGS]:{id:EAdminCenterNavItemGroup.SETTINGS,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.group.settings",defaultMessage:"Settings",description:"The label of the navigation group - settings"}),testLabel:"admin-center.navigation.group.settings",icon:jsxRuntime.exports.jsx(OrgSettings,{sx:{marginLeft:"15px"}}),isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1}},NavigationItemGroup=({group:e})=>{const t=useDispatch(),i=useSelector(selectOrgIsUsersCurrentOrg);var n=AdminCenterNavigationItemGroups[e];const r=useSelector(selectActiveView),s=useSelector(betaFeaturesSelector),o=useSelector(selectIsOLPAvailable);var a=getNavItemsByGroup(e).filter(e=>{var{isOLPItem:e,isBehindBeta:t,isHiddenForSuperadmin:n}=e;return!(e&&!o||t&&!s||n&&!i)});const l=a.some(e=>e.id===r);var{isOLPItem:c,isBehindBeta:d}=n;const u=useSelector(selectIsNavExpanded),p=useSelector(selectNavGroupState)[e];var g=p?jsxRuntime.exports.jsx(ExpandLess,{}):jsxRuntime.exports.jsx(ExpandMore,{});let m=u?"":n.label;l&&!u&&(x=a.find(e=>e.id===r),m=jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[n.label," - ",null==x?void 0:x.label]}));var x=d&&!s||c&&!o||0===a.length;return react.exports.useEffect(()=>{p&&!u&&t(actions.toggleNavGroupOpened(e)),!p&&u&&l&&t(actions.toggleNavGroupOpened(e))},[u]),x?null:jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:u?"":m,placement:"right"},{children:jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>{t(actions.toggleNavGroupOpened(e)),p||u||t(actions.toggleNavExpanded())},sx:{justifyContent:"flex-start",padding:"13px 10px",color:l&&!p?"#1871E8":"#555F7C","& svg":{transform:u?"":"translateX(5px)",color:l&&!u?"#1871E8":void 0},"& .Sdk-MuiButton-endIcon":{marginLeft:"auto"}},fullWidth:!0,startIcon:n.icon,endIcon:g,"data-testid":n.testLabel},{children:u&&n.label}))})),jsxRuntime.exports.jsx(Collapse,Object.assign({sx:{width:"100%"},in:p,timeout:"auto",unmountOnExit:!0},{children:jsxRuntime.exports.jsx(Stack,Object.assign({width:"100%"},{children:a.map(e=>jsxRuntime.exports.jsx(NavigationItem,{view:e.id},e.id))}))}))]})},NavigationItems=()=>{var e=useSelector(selectIsNavExpanded);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(NavigationItem,{view:EAdminCenterView.users}),jsxRuntime.exports.jsx(NavigationItem,{view:EAdminCenterView.approvals}),jsxRuntime.exports.jsx(NavigationItemGroup,{group:EAdminCenterNavItemGroup.PERMISSIONS}),jsxRuntime.exports.jsx(NavigationItemGroup,{group:EAdminCenterNavItemGroup.SECURITY}),jsxRuntime.exports.jsx(BillingNavItem,{isNavExpanded:e}),jsxRuntime.exports.jsx(NavigationItem,{view:EAdminCenterView.systemInfo}),jsxRuntime.exports.jsx(NavigationItem,{view:EAdminCenterView.retentionPolicy}),jsxRuntime.exports.jsx(NavigationItemGroup,{group:EAdminCenterNavItemGroup.SETTINGS})]})},NavigationPanels=()=>{const t=useStyles$1({height:"64px"})["classes"],n=useSelector(selectActiveView);var e=getAllNavItems();return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e.map(e=>{e=e.id;return jsxRuntime.exports.jsx(NavigationPanel,Object.assign({activeView:n,value:e,className:t.contentPanel},{children:getNavItem(e).content()}),e)})})};function NavigationPanel(e){var{children:t,activeView:n,value:i}=e,e=__rest(e,["children","activeView","value"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:n!==i,id:"admin-center-tabpanel-"+i,"data-test":"admin-center-tabpanel-"+i,"aria-labelledby":"admin-center-tab-"+i},e,{children:n===i&&t}))}const MainTabPanel=({height:e})=>{var e=useStyles$1({height:e})["classes"],t=useSelector(selectIsNavExpanded);return useSelector(selectAdminCenterOrgId)?jsxRuntime.exports.jsxs("div",Object.assign({className:e.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"adminCenterViewTabs",orientation:"vertical",value:0,onChange:(e,t)=>{},className:classNames(e.tabs,{[e.tabsExpanded]:t}),classes:{flexContainer:e.tabsContainer,indicator:e.tabIndicator},"aria-label":"admin center tabs","data-test":"ac-nav-tabs-container"},{children:jsxRuntime.exports.jsx(NavigationItems,{})})),jsxRuntime.exports.jsx(NavigationPanels,{})]})):null},Container=({classes:e,dimmed:t,children:n})=>{return useSelector(selectIsFullscreenEnabled)?jsxRuntime.exports.jsx(FullscreenPortal,Object.assign({dataTest:"ac-widget",dimmed:!!t,panelId:"ADMIN_CENTER"},{children:n})):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(e.root,e.panel)},{children:n}))},appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(e=>({root:{width:1020,position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%"}})),MainLayout=({hidePanel:e})=>{var t=useStyles()["classes"];const n=useDispatch();var i=useSelector(selectIsFullscreenEnabled),r=(useSelector(panelsSelector)||[]).find(e=>"ADMIN_CENTER"===e.panelId)||{panelConfig:{dimmed:0}},r=0<(null==(r=null===r?void 0:r.panelConfig)?void 0:r.dimmed),i=`calc(100vh - ${i?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return react.exports.useEffect(()=>{gqlIntrospection.getQueries().find(e=>"apiTokens"===e.name)&&n(actions.setHiddenView({view:EAdminCenterView.apiTokens,isHidden:!1}))},[]),jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:r,classes:t,"data-test":"os-admin-center.browse.container"},{children:[jsxRuntime.exports.jsx(Header,{"data-test":"os-admin-center.browse.header",height:headerHeight,hidePanel:e}),jsxRuntime.exports.jsx(MainTabPanel,{"data-test":"os-admin-center.browse.main-panel",height:i})]}))},Content=e=>{var{apiRoot:t,graphQLEndpoint:n,token:i}=useSelector(selectApiConfigs);const r=useSelector(userSelector),s=useDispatch(),{organizationId:o,organizationGuid:a,organizationName:l}=e;return useOrganizationPermissions(EAuthResourceType.Job),react.exports.useEffect(()=>{var e;null!=(e=null===r||void 0===r?void 0:r.organization)&&e.organizationId&&(o?s(actions.setAdminCenterOrganization({id:o,guid:a||"",name:l||"",isUsersCurrentOrg:o===r.organization.organizationId})):s(actions.setAdminCenterOrganization({id:r.organization.organizationId,guid:r.organization.organizationGuid||"",name:r.organization.organizationName||"",isUsersCurrentOrg:!0})))},[s,o,a,l,r]),t&&n&&i?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},AdminCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterUsersModule(),getAdminCenterGroupsModule(),getAdminCenterPermissionsModule(),getAdminCenterApplicationsModule(),getAdminCenterBrowseModule(),getOrganizationPanelModule(),getPlatformInfoModule(),getApprovalsModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{AdminCenterBrowse};
|
|
44
|
+
`,operationName:e},n));return{organizationName:e[t].name,organizationImageUrl:e[t].imageUrl,organizationStatus:e[t].status,jsondata:e[t].jsondata}})}function fetchOrgApplications(n,i){return __awaiter(this,void 0,void 0,function*(){var e="getOrgApplications",t="applications";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query getOrgApplications ($orgId: ID!) {\n applications (\n orgId: $orgId\n status: active\n limit: 999\n orderBy: {\n field: name\n direction: asc\n }\n ) {\n records {\n id\n name\n iconUrl\n signedIconUrl\n description\n }\n }\n }\n ",operationName:e,variables:{orgId:i}},n)))[t].records})}const getOrgSettingsEndpoint=(e,t)=>e+"/v1/admin/organizations/"+t,getCurrentOrganizationSettings=({apiConfigs:n,orgId:i})=>__awaiter(void 0,void 0,void 0,function*(){var{apiRoot:e,token:t}=n;return(yield fetch(getOrgSettingsEndpoint(e,i),{method:"GET",credentials:"include",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t})})).json()}),updateCurrentOrganizationSettings=({apiConfigs:n,orgId:i,body:r})=>__awaiter(void 0,void 0,void 0,function*(){var{apiRoot:e,token:t}=n;return(yield fetch(getOrgSettingsEndpoint(e,i),{method:"PUT",credentials:"include",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t}),body:JSON.stringify(r)})).json()}),deactivateOrganization=({apiConfigs:n,orgId:i})=>__awaiter(void 0,void 0,void 0,function*(){var{apiRoot:e,token:t}=n;return 204===(yield fetch(getOrgSettingsEndpoint(e,i),{method:"DELETE",credentials:"include",headers:Object.assign({"Content-Type":"application/json"},t&&{Authorization:"Bearer "+t})})).status}),selectIsOLPAvailable=(createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.status),createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>"enabled"===(null==e?void 0:e.olpFeature))),selectActiveView=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.activeView),selectIsNavExpanded=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.isNavExpanded),selectNavGroupState=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.navGroupOpenState),selectHiddenViews=(createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.isFullScreen),createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>(null==e?void 0:e.hiddenViews)||[])),selectOrgSettings=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.orgSettings),selectAdminCenterOrgId=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==e?void 0:e.organization)?void 0:e.id}),selectAdminCenterOrgName=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==e?void 0:e.organization)?void 0:e.name}),selectAdminCenterOrgStatus=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==e?void 0:e.organization)?void 0:e.status}),selectOrgIsUsersCurrentOrg=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==e?void 0:e.organization)?void 0:e.isUsersCurrentOrg}),selectOrgDefaultApplicationId=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null==(e=null==(e=null==e?void 0:e.orgSettings)?void 0:e.features)?void 0:e.defaultApplication}),selectOrgApplications=createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>null==e?void 0:e.applications),selectOrgApplicationById=t=>createSelector(e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace]},e=>{return null!=(e=null==(e=null==e?void 0:e.applications)?void 0:e.find(e=>e.id===t))?e:void 0});function*fetchOlpAvailabilitySaga(){try{var e=yield select(selectApiConfigs),t=yield select(selectAdminCenterOrgId$1),n=yield call$7(checkOlpAvailability,e,t.toString());yield put(actions.fetchOlpAvailabilitySuccess(n||"disabled"))}catch(e){yield put(actions.fetchOlpAvailabilityFailure()),console.log(e)}}function*fetchOrgSettingsSaga(e){try{var t=yield select(selectApiConfigs),n=yield select(selectAdminCenterOrgId$1),i=yield call$7(fetchOrgSettings,t,n.toString()),r=yield call$7(getCurrentOrganizationSettings,{apiConfigs:t,orgId:n.toString()});yield put(actions.fetchApplicationsInit()),yield put(actions.fetchOrgSettingsSuccess(Object.assign(Object.assign({},i),{organizationStatus:r.status,jsondata:r.kvp})))}catch(e){yield put(actions.fetchOrgSettingsFailure())}}function*fetchOrgApplicationsSaga(){try{var e=yield select(selectApiConfigs),t=yield select(selectAdminCenterOrgId$1),n=yield call$7(fetchOrgApplications,e,t);yield put(actions.fetchApplicationsSuccess(n))}catch(e){console.log(e),yield put(actions.fetchApplicationsFailure())}}function*updateOrgSettingsSaga(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n=yield select(selectApiConfigs),i=yield select(selectAdminCenterOrgId$1),r=yield call$7(getCurrentOrganizationSettings,{apiConfigs:n,orgId:i.toString()}),{logoUploadState:s,orgName:o,orgLogoUrl:a,features:l,initialFeatures:c}=yield select(selectOrgSettings),d=(r.organizationName=o,!!r.kvp.image&&!a&&!s);s?r.kvp.image=s.unsignedUrl:d&&(r.kvp.image=null),isEqual_1(l,c)||(l.engineApprovalWhiteListed&&(r.kvp.engineApprovalWhiteListed=l.engineApprovalWhiteListed),r.kvp.features=Object.assign(Object.assign({},r.kvp.features),l)),yield call$7(updateCurrentOrganizationSettings,{apiConfigs:n,orgId:i,body:r}),yield delay(1500),yield put(actions.updateOrgSettingsSuccess()),yield put(showMessage({content:isEqual_1("production","development")?"Successfully updated Organization Settings":t({id:"os-admin-center-browse:org-settings.update-success",defaultMessage:[{type:0,value:"Successfully updated Organization Settings"}]}),severity:MessageSeverity.Success}))}catch(e){console.warn("Error occurred when attempting to update Organization Settings: ",e),yield put(actions.updateOrgSettingsFailure()),yield put(showMessage({content:isEqual_1("production","development")?"Something went wrong. Unable to update Organization Settings":t({id:"os-admin-center-browse:org-settings.update-failure",defaultMessage:[{type:0,value:"Something went wrong. Unable to update Organization Settings"}]}),severity:MessageSeverity.Error}))}}function*deactivateOrgSaga(e){var t=yield select(preferredLanguageSelector),t=AIWareFormatMessage(t);try{var n=yield select(selectApiConfigs),i=yield select(selectAdminCenterOrgId$1);yield call$7(deactivateOrganization,{apiConfigs:n,orgId:i}),yield put(actions.deactivateOrganizationSuccess()),yield put(unmountPanel(AvailableComponents.ADMIN_CENTER)),yield put(showMessage({content:isEqual_1("production","development")?"Successfully deactivated Organization":t({id:"os-admin-center-browse:org.deactivate-success",defaultMessage:[{type:0,value:"Successfully deactivated Organization"}]}),severity:MessageSeverity.Success}))}catch(e){console.warn("Error occurred when attempting to deactivate orginization: ",e),yield put(actions.deactivateOrganizationFailure()),yield put(showMessage({content:isEqual_1("production","development")?"Something went wrong. Unable to update Organization Settings":t({id:"os-admin-center-browse:org.deactivate-failure",defaultMessage:[{type:0,value:"Something went wrong. Unable to deactivate Organization"}]}),severity:MessageSeverity.Error}))}}function*fetchOlpAvailabilityWatcher(){yield takeEvery$1(actions.fetchOlpAvailabilityStart.type,fetchOlpAvailabilitySaga)}function*fetchOrgSettingsWatcher(){yield takeEvery$1(actions.fetchOrgSettingsStart.type,fetchOrgSettingsSaga)}function*fetchOrgApplicationsWatcher(){yield takeEvery$1(actions.fetchApplicationsInit.type,fetchOrgApplicationsSaga)}function*updateOrgSettingsWatcher(){yield takeEvery$1(actions.updateOrgSettingsStart.type,updateOrgSettingsSaga)}function*triggerOlpCheckWatcher(){yield takeEvery$1(actions.setAdminCenterOrganization.type,fetchOlpAvailabilitySaga)}function*deactivateOrgWatcher(){yield takeLatest$1(actions.deactivateOrganizationInit.type,deactivateOrgSaga)}function*rootSaga(){yield all([fetchOlpAvailabilityWatcher(),fetchOrgSettingsWatcher(),updateOrgSettingsWatcher(),triggerOlpCheckWatcher(),fetchOrgApplicationsWatcher(),deactivateOrgWatcher()])}function getAdminCenterBrowseModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const useStyles$2=makeStyles()((e,{height:t})=>({header:{alignItems:"center",borderBottom:"0.5px solid "+e.palette.divider,display:"flex",height:t,padding:e.spacing(2),position:"relative"},title:{minWidth:"126px"},marginRight:{marginRight:e.spacing(2)},navigationToggle:{marginRight:e.spacing(1)},headerActionContainer:{alignItems:"center",display:"flex",flexGrow:1,height:"100%",justifyContent:"flex-end"},verticalDivider:{borderRight:".5px solid "+e.palette.divider,height:"70%",margin:"0 "+e.spacing(1)}})),Header=({hidePanel:e,height:t})=>{t=useStyles$2({height:t}).classes;const n=useDispatch(),i=useSelector(selectIsFullscreenEnabled);var r=useSelector(selectIsNavExpanded);const s=useSelector(selectOrgIsUsersCurrentOrg),o=useSelector(selectAdminCenterOrgName);return jsxRuntime.exports.jsxs("header",Object.assign({className:t.header,"data-test":"ac-header"},{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.menu",defaultMessage:"Toggle Navigation Menu",description:"Toggle Navigation Menu"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({sx:{mr:1},onClick:()=>{n(actions.toggleNavExpanded())},"aria-expanded":r,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large"},{children:jsxRuntime.exports.jsx(Hamburger,{})}))})),jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h1",className:t.title,"data-test":"ac-title"},{children:s?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.header.title",defaultMessage:"Admin Center",description:"Panel header of the admin center"}):jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.header.title.org-detail",defaultMessage:"Org Detail",description:"Panel header of the admin center"})," - "+o]})})),jsxRuntime.exports.jsxs("div",Object.assign({className:t.headerActionContainer,"data-test":"ac-header.action-container"},{children:[jsxRuntime.exports.jsx("div",{className:t.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.open.help-center.tooltip",defaultMessage:"View Help",description:"Help icon"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-test":"admin-center-help-icon",size:"large"},{children:jsxRuntime.exports.jsx(HelpOutline,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:i?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.full.screen",defaultMessage:"Exit Fullscreen",description:"Exit Fullscreen"}):jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.open.full.screen",defaultMessage:"Enter Fullscreen",description:"Enter Fullscreen"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{n(n(setIsFullscreenEnabled(!i)))},"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:i?jsxRuntime.exports.jsx(FullscreenExit,{}):jsxRuntime.exports.jsx(Fullscreen,{})}))})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.close.panel",defaultMessage:"Close Panel",description:"Close Panel"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:e,"aria-labelledby":"ac-close-panel","data-test-id":"ac-close-panel","data-test":"ac-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))},tabWidth=197,useStyles$1=makeStyles()((e,{height:t="64px"},n)=>({root:{display:"flex",flexGrow:1,height:t,position:"relative"},tabs:{borderRight:".5px solid "+e.palette.divider,transition:".2s ease",width:e.spacing(14),minWidth:e.spacing(14),padding:e.spacing(1.6)+" "+e.spacing(2.5),boxSizing:"border-box"},tabsContainer:{alignItems:"center"},tabIndicator:{background:"transparent"},tabRoot:{opacity:1,borderRadius:4,fontSize:"14px",color:"#555F7C",marginBottom:e.spacing(1),minHeight:e.spacing(9),minWidth:e.spacing(9),paddingTop:e.spacing(1),paddingBottom:e.spacing(1),width:"100%","&:hover":{background:"#F2F5F9"}},tabsExpanded:{width:tabWidth,minWidth:tabWidth,paddingRight:e.spacing(2),paddingLeft:e.spacing(2),["& "+n.tabRoot]:{width:`calc(${tabWidth}px - ${e.spacing(3)})`,flexDirection:"row",textTransform:"capitalize","& svg":{marginRight:e.spacing(2),marginBottom:"0"}}},tabExpandedWrapper:{flexDirection:"row",display:"flex",justifyContent:"flex-start","& svg":{marginBottom:"0 !important",marginRight:e.spacing(2)}},tabSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:"0",color:e.palette.primary.main}},contentPanel:{flexGrow:1},tabExpandedSelected:{background:"#F2F5F9",color:e.palette.primary.main,"& svg":{marginBottom:"0 !important",marginRight:e.spacing(2),color:e.palette.primary.main}},tabWrapper:{flexDirection:"row",display:"flex",justifyContent:"center","& svg":{marginBottom:"0 !important",marginRight:"0"}}})),REQUIRED_BUSINESS_UNIT="Flex",BILLING_URL="https://billing.aiware.com/p/login/fZe15tbn5fDP3Yc000",billingText=jsxRuntime.exports.jsx(FormattedMessage,{id:"os.admin-center.browse.billing-nav-item.label",defaultMessage:"Billing",description:"Admin Center Billing Nav Item Label"}),BillingNavItem=({isNavExpanded:e})=>{return useSelector(selectUserOrganizationBusinessUnit)!==REQUIRED_BUSINESS_UNIT?null:jsxRuntime.exports.jsx(Tooltip,Object.assign({placement:"right",title:!e&&billingText,"data-test":"ac-nav-tab-billing"},{children:jsxRuntime.exports.jsx(Button,Object.assign({startIcon:jsxRuntime.exports.jsx(CreditCard,{style:{marginBottom:"0px",fontSize:"24px",marginLeft:e?"0px":"30px"}}),onClick:()=>{window.open(BILLING_URL,"_blank")},sx:{color:"#5C6269",opacity:1,borderRadius:"4px",fontSize:"14px",marginBottom:"5px",minHeight:"45px",minWidth:e?"176px":"45px",padding:"5px 10px 5px 20px",width:"100%","&:hover":{background:"#F2F5F9"},justifyContent:e?"flex-start":"center"},"data-test":"ac-nav-tab-billings-view",variant:"text",endIcon:jsxRuntime.exports.jsx(OpenWindow,{style:{transform:"translate(50px, 0px)",fontSize:"20px"}})},{children:e&&billingText}))}))},ErrorState=panelComponents["error"],Container$1=({title:e,isLoading:t,isErrored:n,onRetry:i,children:r})=>t?jsxRuntime.exports.jsx(Stack,Object.assign({sx:{position:"relative",height:"100%",padding:"10px 30px",alignItems:"center",justifyContent:"center"},direction:"row"},{children:jsxRuntime.exports.jsx(CircularProgress,{})})):n?jsxRuntime.exports.jsx(ErrorState,{onRetry:i}):jsxRuntime.exports.jsx(Stack,Object.assign({sx:{position:"relative",height:"100%",border:"1px solid #DADFE8",borderRadius:"4px"},direction:"row"},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{width:"100%"}},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({component:"span",sx:{padding:"20px 30px"}},{children:e})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(Stack,Object.assign({"data-testid":"ac-settings-container",sx:{padding:"0 30px",width:"100%",boxSizing:"border-box"}},{children:r}))]}))})),{ImageUpload}=imageUpload["jsx"],BasicInformationTab=()=>{const t=useDispatch(),{orgName:e,orgLogoUrl:n,loadingStatus:i,hasLocalChanges:r,saveStatus:s,editMode:o}=useSelector(selectOrgSettings);var a="100px";const l="success"===i;var c="pending"===i,d="failure"===i,u="pending"===s;const p=e=>{t(actions.setOrgSettingsEditMode({key:e,value:!0}))};const g=()=>{t(actions.fetchOrgSettingsStart())};return react.exports.useEffect(()=>{r||l||g()},[]),react.exports.useEffect(()=>{!n&&l&&t(actions.setOrgSettingsEditMode({key:"orgLogoUrl",value:!0}))},[n,l]),jsxRuntime.exports.jsxs(Container$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.title",defaultMessage:"Basic Information",description:"Title for the organization settings"}),isLoading:c,isErrored:d,onRetry:g},{children:[jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{alignItems:"center",gap:"20px",padding:"20px 0"},direction:"row"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({component:"span",sx:{minWidth:"160px",color:"#5C6269"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.logo-upload",defaultMessage:"Organization Logo: ",description:"Title for the organization settings logo upload"})})),jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{width:a,height:a}},{children:o.orgLogoUrl?jsxRuntime.exports.jsx(ImageUpload,{disabled:u,getUrl:!0,image:n,outerWidth:"100%",outerHeight:"100%",innerWidth:"95%",innerHeight:"95%",uploadIconWidthHeight:"40px",handleChange:e=>{t(actions.setSettingsChanged(!0)),t(actions.setSettingsChangeLogoUrl(e))},testId:"org-settings-upload-image"}):jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{width:a,height:a,borderRadius:"5px",border:"1px solid #DADFE8",overflow:"hidden"}},{children:n&&jsxRuntime.exports.jsx("img",{style:{width:"100%",height:"100%",objectFit:"contain"},draggable:!1,src:n,alt:"Organization Logo"})}))})),!o.orgLogoUrl&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.org-logo.tooltip-edit",defaultMessage:"Edit Organization Logo",description:"Tooltip for the organization settings edit org logo button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>p("orgLogoUrl"),disabled:u,sx:{marginLeft:"auto"}},{children:jsxRuntime.exports.jsx(AddPhotoAlternateOutlined,{})}))}))]})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{alignItems:"center",gap:"20px",padding:"20px 0"},direction:"row"},{children:[jsxRuntime.exports.jsx(Typography,Object.assign({component:"span",sx:{minWidth:"160px",color:"#5C6269"}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.org-name",defaultMessage:"Organization Name: ",description:"Title for the organization settings org name input"})})),o.orgName?jsxRuntime.exports.jsx(TextField,{size:"small",disabled:u,value:e,onChange:e=>{e=e.target.value;t(actions.setSettingsChangeName(e)),t(actions.setSettingsChanged(!0))},sx:{width:"100%"}}):jsxRuntime.exports.jsx(Typography,Object.assign({sx:{fontWeight:"bold"}},{children:e})),!o.orgName&&jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.org-name.tooltip-edit",defaultMessage:"Edit Organization Name",description:"Tooltip for the organization settings edit org name button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>p("orgName"),disabled:u,sx:{marginLeft:"auto"}},{children:jsxRuntime.exports.jsx(EditOutlined,{})}))}))]}))]}))},SystemSettingsTab=()=>{const n=useDispatch();var e=useSelector(selectOrgApplications),t=useSelector(selectOrgDefaultApplicationId),i=useSelector(selectOrgApplicationById(t)),r=useSelector(selectAdminCenterOrgStatus),s=useSelector(selectOrgIsUsersCurrentOrg);const{loadingStatus:o,saveStatus:a,features:l}=useSelector(selectOrgSettings),[c,d]=react.exports.useState(!1),[u,p]=react.exports.useState(!1);var g="pending"===o,m="failure"===o;const x="pending"===o||"pending"===a;var b="deleted"===r?"Organization is already deactivated":s?"Cannot deactivate current organization":void 0;const f=[{title:SHARED_TEXT.orgSettingsStep.olpTitle(),description:SHARED_TEXT.orgSettingsStep.olpDescription(),right:{type:"switch",key:"enableRBACFeature",disabled:!0,tooltip:"Only available during Organization Creation"}},{title:SHARED_TEXT.orgSettingsStep.autoApproveEnginesSettingTitle(),description:SHARED_TEXT.orgSettingsStep.autoApproveEnginesSettingDescription(),right:{type:"switch",key:"engineApprovalWhiteListed"}},{title:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySettingTitle(),description:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySettingDescription(),left:{type:"select",key:"retentionDays",show:"enabled"===l.retentionCleanup,options:[{value:30,label:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting30Days()},{value:90,label:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting90Days()},{value:457,label:SHARED_TEXT.orgSettingsStep.dataRetentionPolicySetting15Months()}]},right:{type:"switch",key:"retentionCleanup"}},{title:SHARED_TEXT.orgSettingsStep.firstLoadApplicationSettingTitle(null==i?void 0:i.name),description:SHARED_TEXT.orgSettingsStep.firstLoadApplicationSettingDescription(),right:{type:"icon-button",key:"first-load-application",icon:jsxRuntime.exports.jsx(Edit,{}),onClick:()=>p(!u)}},{title:SHARED_TEXT.orgSettingsStep.autoUpdatePackagesTitle(),description:SHARED_TEXT.orgSettingsStep.autoUpdatePackagesDescription(),right:{type:"switch",key:"automaticPackageCreation",keys:["useEngineGrant","useAppGrant"]}},{title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.title",defaultMessage:"Deactivate Organization",description:"Deactivate Organization"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.description",defaultMessage:"Deactivating the organization will disable all users and applications. This action cannot be undone.",description:"Deactivate Organization"}),right:{type:"button",key:"deactivate-organization",disabled:"deleted"===r||s,tooltip:b,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.button",defaultMessage:"Deactivate",description:"Deactivate Organization"}),onClick:()=>d(!0)}}];return jsxRuntime.exports.jsxs(Container$1,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.subtitle",defaultMessage:"Manage settings for all users.",description:"Title for the organization system settings subtitle"}),isLoading:g,isErrored:m,onRetry:()=>{}},{children:[f.filter(e=>!1!==(null==e?void 0:e.show)).map((i,e)=>jsxRuntime.exports.jsx(RowSetting,{bottomBorder:e!==f.length-1,title:i.title,description:i.description,renderLeftComponent:()=>{var e;return null!=i&&i.left&&void 0!==i.left&&"select"===i.left.type&&void 0!==(null==(e=i.left)?void 0:e.key)&&!1!==(null==(e=i.left)?void 0:e.show)?jsxRuntime.exports.jsx(Select,Object.assign({"data-testid":"settings-"+i.left.key,disabled:x,value:l[i.left.key],onChange:e=>{var e=Number(e.target.value),t=[null!=(t=null==(t=null==i?void 0:i.left)?void 0:t.key)?t:"",...(null==(t=i.left)?void 0:t.keys)||[]];n(actions.setOrgSettingsFeature({keys:t,value:e}))},size:"small",sx:{width:"230px",marginTop:"20px"}},{children:i.left.options.map((e,t)=>{var n;return jsxRuntime.exports.jsx(MenuItem,Object.assign({value:e.value,"data-testid":`settings-${null==(n=i.left)?void 0:n.key}-`+e.value},{children:e.label}),t+1)})})):null},renderRightComponent:()=>{var e;if(i.right){if("switch"===i.right.type&&void 0!==(null==(e=i.right)?void 0:e.key))return jsxRuntime.exports.jsx(GenerateTooltip,Object.assign({title:i.right.tooltip},{children:jsxRuntime.exports.jsx(Switch,{"data-testid":"settings-"+i.right.key,disabled:x||!0===(null==(e=i.right)?void 0:e.disabled),checked:"enabled"===l[i.right.key],onChange:()=>{var e="enabled"===l[i.right.key]?"disabled":"enabled",t=i.right.keys?[i.right.key,...i.right.keys]:[i.right.key];n(actions.setOrgSettingsFeature({keys:t,value:e}))}})}));if("button"===i.right.type)return jsxRuntime.exports.jsx(GenerateTooltip,Object.assign({title:i.right.tooltip},{children:jsxRuntime.exports.jsx(Button,Object.assign({variant:"outlined","data-testid":"settings-"+i.right.key,disabled:x||!0===(null==(e=i.right)?void 0:e.disabled),onClick:i.right.onClick},{children:i.right.label}))}));if("icon-button"===i.right.type)return jsxRuntime.exports.jsx(GenerateTooltip,Object.assign({title:i.right.tooltip},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({"data-testid":"settings-"+i.right.key,disabled:x||!0===(null==(e=i.right)?void 0:e.disabled),onClick:i.right.onClick},{children:i.right.icon}))}))}return null}},"settings-row-"+(e+1))),jsxRuntime.exports.jsx(ConfirmDialog,{isOpen:c,testId:"ac-deactivate-org-dialog",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.confirm.title",defaultMessage:"Deactivate Organization",description:"Deactivate Organization"}),description:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.confirm.description",defaultMessage:"Are you sure you want to deactivate this Organization? Users will no longer be able to access this Organization or its content.",description:"Deactivate Organization"}),cancelLabel:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.confirm.cancel",defaultMessage:"Cancel",description:"Cancel"}),confirmLabel:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-system-settings.deactivateOrganization.confirm.deactivate",defaultMessage:"Yes, Deactivate",description:"Deactivate"}),onClose:()=>{d(!1)},onConfirm:()=>{d(!1),n(actions.deactivateOrganizationInit())},DialogTitleProps:{sx:{fontSize:18,fontWeight:"semibold"}},DialogProps:{PaperProps:{sx:{p:3}},maxWidth:"xs"}}),jsxRuntime.exports.jsx(FirstLoadApplicationModal,{id:"ac",applications:e,defaultLoadApplication:t,isOpen:u,onSelectedApplication:e=>{n(actions.setOrgSettingsFeature({keys:["defaultApplication"],value:e.id}))},onClose:()=>p(!1)})]}))};function GenerateTooltip({title:e,children:t}){return e?jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e,placement:"left",arrow:!0},{children:jsxRuntime.exports.jsx("span",{children:t})})):t}const tabsStyle={"& .Sdk-MuiButtonBase-root.Sdk-MuiTab-root.Sdk-MuiTab-textColorPrimary.Sdk-Mui-selected":{color:"#2A323C!important"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#2A323C"}},createTab=(!function(e){e.BASIC_INFORMATION="basic-information",e.SYSTEM_SETTINGS="system-settings"}(EOrganizationSettingsTab=EOrganizationSettingsTab||{}),(e,t,n,i=!1,r=!1)=>({label:e,component:t,id:n,isBehindBeta:i,isSuperAdmin:r})),organizationSettingsTabs=[createTab("Basic Information",jsxRuntime.exports.jsx(BasicInformationTab,{}),EOrganizationSettingsTab.BASIC_INFORMATION,!1,!1),createTab("System Settings",jsxRuntime.exports.jsx(SystemSettingsTab,{}),EOrganizationSettingsTab.SYSTEM_SETTINGS,!0,!0)];function TabPanel(e){var{children:t,value:n,index:i}=e,e=__rest(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:n!==i,id:"organization-settings-tabpanel-"+i,"data-testid":"organization-settings-tabpanel-"+i,"aria-labelledby":"organization-settings-tab-"+i},e,{children:n===i&&jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{p:3}},{children:t}))}))}function a11yProps(e){return{id:"organization-settings-tab-"+e,"aria-controls":"organization-settings-tabpanel-"+e}}function OrganizationSettingsTabs(){const[n,i]=ReactExports.useState(0),r=useSelector(betaFeaturesSelector),s=useSelector(selectIsSuperAdmin);return jsxRuntime.exports.jsxs(Box$1,Object.assign({sx:{width:"100%"}},{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({sx:{borderBottom:1,borderColor:"divider"}},{children:jsxRuntime.exports.jsx(Tabs,Object.assign({sx:tabsStyle,value:n,onChange:(e,t)=>{i(t)},"aria-label":"org settings tabs"},{children:organizationSettingsTabs.map(e=>e.isSuperAdmin&&!s?null:e.isBehindBeta&&!r?jsxRuntime.exports.jsx(Tooltip,Object.assign({title:e.isBehindBeta&&!r?"Coming Soon":""},{children:jsxRuntime.exports.jsx("span",{children:jsxRuntime.exports.jsx(Tab,Object.assign({disabled:e.isBehindBeta&&!r,label:e.label},a11yProps(e.index)),e.id)})})):jsxRuntime.exports.jsx(Tab,Object.assign({disabled:e.isBehindBeta&&!r,label:e.label},a11yProps(e.index)),e.id))}))})),organizationSettingsTabs.map((e,t)=>e.isBehindBeta&&!r||e.isSuperAdmin&&!s?null:jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:t},{children:e.component}),e.id))]}))}const OrganizationSettings=()=>{const e=useDispatch();var t=navSectionStyles()["classes"],{hasLocalChanges:n,saveStatus:i,orgName:r}=useSelector(selectOrgSettings),i="pending"===i,n=!n||!r;return jsxRuntime.exports.jsxs("section",Object.assign({className:t.root},{children:[jsxRuntime.exports.jsx(Stack,Object.assign({component:"header",sx:{borderBottom:"0.5px solid #D5DFE9",flexDirection:"column",padding:"20px"}},{children:jsxRuntime.exports.jsxs(Stack,Object.assign({sx:{width:"100%",alignItems:"center",justifyContent:"space-between"},direction:"row"},{children:[jsxRuntime.exports.jsxs(Stack,{children:[jsxRuntime.exports.jsx(Box$1,Object.assign({className:t.startToolbar},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"h5",component:"span","data-testid":"os-admin-center-org-settings-title","data-test":"os-admin-center-org-settings-title",sx:{fontWeight:"600",mb:1}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.view-title",defaultMessage:"Organization Settings",description:"Title for the organization settings view"})}))})),jsxRuntime.exports.jsx(Box$1,Object.assign({className:t.startToolbar},{children:jsxRuntime.exports.jsx(Typography,Object.assign({variant:"caption","data-testid":"os-admin-center-org-settings-sub-title","data-test":"os-admin-center-org-settings-sub-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.view-description",defaultMessage:"Manage information and preferences for users of this Organization.",description:"Description for the organization settings view"})}))}))]}),jsxRuntime.exports.jsx(Stack,{children:jsxRuntime.exports.jsx(LoadingButton,Object.assign({loading:i,disabled:n,onClick:()=>{e(actions.updateOrgSettingsStart())},variant:"contained",color:"primary"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.button-save",defaultMessage:"Save",description:"Save button for the organization settings view"})}))})]}))})),jsxRuntime.exports.jsx(OrganizationSettingsTabs,{})]}))},AdminCenterNavigationItems={[EAdminCenterView.users]:{id:EAdminCenterView.users,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.users.view",defaultMessage:"Users",description:"The label of users tab button."}),testLabel:"ac-users-view",icon:jsxRuntime.exports.jsx(Users,{}),content:()=>jsxRuntime.exports.jsx(UsersPanel,{}),group:EAdminCenterNavItemGroup.NONE,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.orgSettings]:{id:EAdminCenterView.orgSettings,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.org-settings.view",defaultMessage:"Org Settings",description:"The label of Org Settings tab button."}),testLabel:"ac-org-settings-view",icon:jsxRuntime.exports.jsx(OrgSettings,{style:{transform:"translate(2px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(OrganizationSettings,{}),group:EAdminCenterNavItemGroup.SETTINGS,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.retentionPolicy]:{id:EAdminCenterView.retentionPolicy,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.retention-policy.view",defaultMessage:"Retention Policy",description:"The label of Retention Policy tab button."}),testLabel:"ac-retention-policy-view",icon:jsxRuntime.exports.jsx(RetentionPolicy,{style:{transform:"translate(2px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(PlaceholderElement,{label:"Retention Policy View",ticketId:0}),group:EAdminCenterNavItemGroup.NONE,isOLPItem:!1,isBehindBeta:!0,isComingSoon:!0,isHiddenForSuperadmin:!1},[EAdminCenterView.customLogin]:{id:EAdminCenterView.customLogin,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.custom-login.view",defaultMessage:"Custom Login",description:"The label of Custom Login tab button."}),testLabel:"ac-custom-login-view",icon:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{}),content:()=>jsxRuntime.exports.jsx(CustomLoginTab,{}),group:EAdminCenterNavItemGroup.SETTINGS,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.approvals]:{id:EAdminCenterView.approvals,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.approvals.view",defaultMessage:"Approvals",description:"The label of approvals tab button."}),testLabel:"ac-approvals-view",icon:jsxRuntime.exports.jsx(Verified,{style:{transform:"translate(2px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(Approvals,{}),group:EAdminCenterNavItemGroup.NONE,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.systemInfo]:{id:EAdminCenterView.systemInfo,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.system-info.view",defaultMessage:"System Info",description:"The label for System Info view"}),testLabel:"ac-system-info-view",icon:jsxRuntime.exports.jsx(Information,{}),content:()=>jsxRuntime.exports.jsx(SystemInfo,{}),group:EAdminCenterNavItemGroup.NONE,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.permissionSets]:{id:EAdminCenterView.permissionSets,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.permission-sets.view",defaultMessage:"Permission Sets",description:"The label for Permission Sets view"}),testLabel:"ac-permission-sets-view",icon:jsxRuntime.exports.jsx(Lock,{}),content:()=>jsxRuntime.exports.jsx(PermissionSets,{}),group:EAdminCenterNavItemGroup.PERMISSIONS,isOLPItem:!0,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.accessControl]:{id:EAdminCenterView.accessControl,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.system-access.view",defaultMessage:"System Access",description:"The label of access control tab button."}),testLabel:"ac-access-control-view",icon:jsxRuntime.exports.jsx(SecurityGroup,{style:{transform:"translate(4px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(AccessControl,{}),group:EAdminCenterNavItemGroup.PERMISSIONS,isOLPItem:!0,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.groups]:{id:EAdminCenterView.groups,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.groups.view",defaultMessage:"Groups",description:"The label of groups tab button."}),testLabel:"ac-groups-view",icon:jsxRuntime.exports.jsx(Group,{style:{transform:"translate(2px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(GroupsPanel,{}),group:EAdminCenterNavItemGroup.PERMISSIONS,isOLPItem:!0,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.apiTokens]:{id:EAdminCenterView.apiTokens,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.api-tokens.view",defaultMessage:"API Tokens",description:"The label for API Tokens view"}),testLabel:"ac-api-tokens-view",icon:jsxRuntime.exports.jsx(Lock2,{style:{transform:"translate(4px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(ApiTokensTab,{}),group:EAdminCenterNavItemGroup.SECURITY,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!0},[EAdminCenterView.iam]:{id:EAdminCenterView.iam,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.iam.view",defaultMessage:"IAM",description:"The label for the IAM view"}),testLabel:"ac-iam-view",icon:jsxRuntime.exports.jsx(Iam,{style:{transform:"translate(4px, 0px)"}}),content:()=>jsxRuntime.exports.jsx(IamTab,{}),group:EAdminCenterNavItemGroup.SECURITY,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1},[EAdminCenterView.auditLogs]:{id:EAdminCenterView.auditLogs,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.audit-logs.view",defaultMessage:"Audit Logs",description:"The label of Audit Logs tab button."}),testLabel:"ac-audit-logs-view",icon:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{}),content:()=>jsxRuntime.exports.jsx(AuditLogWidget,{}),group:EAdminCenterNavItemGroup.SECURITY,isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1,isHiddenForSuperadmin:!1}},getNavItem=e=>AdminCenterNavigationItems[e],getAllNavItems=()=>Object.keys(AdminCenterNavigationItems).map(e=>AdminCenterNavigationItems[e]),getNavItemsByGroup=t=>getAllNavItems().filter(e=>e.group===t),getNavItemProps={tooltip:(e,t,n)=>{let i=t?"":e.label;return n&&(i=jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[t?"":jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[e.label," - "]}),jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.nav-item.tooltip.coming-soon",defaultMessage:"Coming soon",description:"The label for the coming soon tooltip"})]})),{"data-test":"ac-nav-tab-"+e.testLabel,placement:"right",title:i}},tab:(e,t,n,i)=>{return Object.assign(Object.assign({wrapped:!0,label:t?e.label:"",icon:e.group===EAdminCenterNavItemGroup.NONE?e.icon:jsxRuntime.exports.jsx("span",{style:{marginLeft:"30px"}}),classes:{root:i.tabRoot,wrapped:t?i.tabExpandedWrapper:i.tabWrapper,selected:t?i.tabExpandedSelected:i.tabSelected}},muiTabA11yProps(e.id)),n?{sx:{opacity:"0.5!important"},onClick:()=>{}}:{})}};function muiTabA11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}const NavigationItem=({view:e})=>{var t=useStyles$1({height:"64px"})["classes"];const n=useDispatch();var i=useSelector(selectActiveView),r=useSelector(selectHiddenViews),s=getNavItem(e),{isBehindBeta:o,isComingSoon:a,isOLPItem:l}=s,c=useSelector(betaFeaturesSelector),d=useSelector(selectIsOLPAvailable),i=e===i,u=useSelector(selectIsNavExpanded),r=r.includes(e);return o&&!c||r||l&&!d?null:jsxRuntime.exports.jsx(Tooltip,Object.assign({},getNavItemProps.tooltip(s,u,a),{children:jsxRuntime.exports.jsx(Tab,Object.assign({onClick:()=>{n(actions.setActiveView(e))}},getNavItemProps.tab(s,u,a,t),{selected:i}))}))},AdminCenterNavigationItemGroups={[EAdminCenterNavItemGroup.NONE]:{id:EAdminCenterNavItemGroup.NONE,label:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{}),testLabel:"admin-center.navigation.group.none",icon:jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{}),isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1},[EAdminCenterNavItemGroup.PERMISSIONS]:{id:EAdminCenterNavItemGroup.PERMISSIONS,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.group.permissions",defaultMessage:"Permissions",description:"The label of the navigation group - permissions"}),testLabel:"admin-center.navigation.group.permissions",icon:jsxRuntime.exports.jsx(Lock,{sx:{marginLeft:"13px"}}),isOLPItem:!0,isBehindBeta:!1,isComingSoon:!1},[EAdminCenterNavItemGroup.SECURITY]:{id:EAdminCenterNavItemGroup.SECURITY,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.group.security",defaultMessage:"Security",description:"The label of the navigation group - security"}),testLabel:"admin-center.navigation.group.security",icon:jsxRuntime.exports.jsx(Lock2,{sx:{marginLeft:"15px"}}),isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1},[EAdminCenterNavItemGroup.SETTINGS]:{id:EAdminCenterNavItemGroup.SETTINGS,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.navigation.group.settings",defaultMessage:"Settings",description:"The label of the navigation group - settings"}),testLabel:"admin-center.navigation.group.settings",icon:jsxRuntime.exports.jsx(OrgSettings,{sx:{marginLeft:"15px"}}),isOLPItem:!1,isBehindBeta:!1,isComingSoon:!1}},NavigationItemGroup=({group:e})=>{const t=useDispatch(),i=useSelector(selectOrgIsUsersCurrentOrg);var n=AdminCenterNavigationItemGroups[e];const r=useSelector(selectActiveView),s=useSelector(betaFeaturesSelector),o=useSelector(selectIsOLPAvailable);var a=getNavItemsByGroup(e).filter(e=>{var{isOLPItem:e,isBehindBeta:t,isHiddenForSuperadmin:n}=e;return!(e&&!o||t&&!s||n&&!i)});const l=a.some(e=>e.id===r);var{isOLPItem:c,isBehindBeta:d}=n;const u=useSelector(selectIsNavExpanded),p=useSelector(selectNavGroupState)[e];var g=p?jsxRuntime.exports.jsx(ExpandLess,{}):jsxRuntime.exports.jsx(ExpandMore,{});let m=u?"":n.label;l&&!u&&(x=a.find(e=>e.id===r),m=jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[n.label," - ",null==x?void 0:x.label]}));var x=d&&!s||c&&!o||0===a.length;return react.exports.useEffect(()=>{p&&!u&&t(actions.toggleNavGroupOpened(e)),!p&&u&&l&&t(actions.toggleNavGroupOpened(e))},[u]),x?null:jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(Tooltip,Object.assign({title:u?"":m,placement:"right"},{children:jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>{t(actions.toggleNavGroupOpened(e)),p||u||t(actions.toggleNavExpanded())},sx:{justifyContent:"flex-start",padding:"13px 10px",color:l&&!p?"#1871E8":"#555F7C","& svg":{transform:u?"":"translateX(5px)",color:l&&!u?"#1871E8":void 0},"& .Sdk-MuiButton-endIcon":{marginLeft:"auto"}},fullWidth:!0,startIcon:n.icon,endIcon:g,"data-testid":n.testLabel},{children:u&&n.label}))})),jsxRuntime.exports.jsx(Collapse,Object.assign({sx:{width:"100%"},in:p,timeout:"auto",unmountOnExit:!0},{children:jsxRuntime.exports.jsx(Stack,Object.assign({width:"100%"},{children:a.map(e=>jsxRuntime.exports.jsx(NavigationItem,{view:e.id},e.id))}))}))]})},NavigationItems=()=>{var e=useSelector(selectIsNavExpanded);return jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(NavigationItem,{view:EAdminCenterView.users}),jsxRuntime.exports.jsx(NavigationItem,{view:EAdminCenterView.approvals}),jsxRuntime.exports.jsx(NavigationItemGroup,{group:EAdminCenterNavItemGroup.PERMISSIONS}),jsxRuntime.exports.jsx(NavigationItemGroup,{group:EAdminCenterNavItemGroup.SECURITY}),jsxRuntime.exports.jsx(BillingNavItem,{isNavExpanded:e}),jsxRuntime.exports.jsx(NavigationItem,{view:EAdminCenterView.systemInfo}),jsxRuntime.exports.jsx(NavigationItem,{view:EAdminCenterView.retentionPolicy}),jsxRuntime.exports.jsx(NavigationItemGroup,{group:EAdminCenterNavItemGroup.SETTINGS})]})},NavigationPanels=()=>{const t=useStyles$1({height:"64px"})["classes"],n=useSelector(selectActiveView);var e=getAllNavItems();return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:e.map(e=>{e=e.id;return jsxRuntime.exports.jsx(NavigationPanel,Object.assign({activeView:n,value:e,className:t.contentPanel},{children:getNavItem(e).content()}),e)})})};function NavigationPanel(e){var{children:t,activeView:n,value:i}=e,e=__rest(e,["children","activeView","value"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:n!==i,id:"admin-center-tabpanel-"+i,"data-test":"admin-center-tabpanel-"+i,"aria-labelledby":"admin-center-tab-"+i},e,{children:n===i&&t}))}const MainTabPanel=({height:e})=>{var e=useStyles$1({height:e})["classes"],t=useSelector(selectIsNavExpanded);return useSelector(selectAdminCenterOrgId)?jsxRuntime.exports.jsxs("div",Object.assign({className:e.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"adminCenterViewTabs",orientation:"vertical",value:0,onChange:(e,t)=>{},className:classNames(e.tabs,{[e.tabsExpanded]:t}),classes:{flexContainer:e.tabsContainer,indicator:e.tabIndicator},"aria-label":"admin center tabs","data-test":"ac-nav-tabs-container"},{children:jsxRuntime.exports.jsx(NavigationItems,{})})),jsxRuntime.exports.jsx(NavigationPanels,{})]})):null},Container=({classes:e,dimmed:t,children:n})=>{return useSelector(selectIsFullscreenEnabled)?jsxRuntime.exports.jsx(FullscreenPortal,Object.assign({dataTest:"ac-widget",dimmed:!!t,panelId:"ADMIN_CENTER"},{children:n})):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classNames(e.root,e.panel)},{children:n}))},appBarHeight=55,headerHeight=64,borderBottom=5,useStyles=makeStyles()(e=>({root:{width:1020,position:"relative"},panel:{backgroundColor:e.palette.background.paper,boxShadow:"0px 0px 12px rgba(0, 0, 0, 0.25)",height:"100%"},fullScreen:{position:"fixed",width:"100%",height:"100vh",top:0,left:0,right:0,bottom:0},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%"}})),MainLayout=({hidePanel:e})=>{var t=useStyles()["classes"];const n=useDispatch();var i=useSelector(selectIsFullscreenEnabled),r=(useSelector(panelsSelector)||[]).find(e=>"ADMIN_CENTER"===e.panelId)||{panelConfig:{dimmed:0}},r=0<(null==(r=null===r?void 0:r.panelConfig)?void 0:r.dimmed),i=`calc(100vh - ${i?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return react.exports.useEffect(()=>{gqlIntrospection.getQueries().find(e=>"apiTokens"===e.name)&&n(actions.setHiddenView({view:EAdminCenterView.apiTokens,isHidden:!1}))},[]),jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:r,classes:t,"data-test":"os-admin-center.browse.container"},{children:[jsxRuntime.exports.jsx(Header,{"data-test":"os-admin-center.browse.header",height:headerHeight,hidePanel:e}),jsxRuntime.exports.jsx(MainTabPanel,{"data-test":"os-admin-center.browse.main-panel",height:i})]}))},Content=e=>{var{apiRoot:t,graphQLEndpoint:n,token:i}=useSelector(selectApiConfigs);const r=useSelector(userSelector),s=useDispatch(),{organizationId:o,organizationGuid:a,organizationName:l}=e;return useOrganizationPermissions(EAuthResourceType.Job),react.exports.useEffect(()=>{var e;null!=(e=null===r||void 0===r?void 0:r.organization)&&e.organizationId&&(o?s(actions.setAdminCenterOrganization({id:o,guid:a||"",name:l||"",isUsersCurrentOrg:o===r.organization.organizationId})):s(actions.setAdminCenterOrganization({id:r.organization.organizationId,guid:r.organization.organizationGuid||"",name:r.organization.organizationName||"",isUsersCurrentOrg:!0})))},[s,o,a,l,r]),t&&n&&i?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},AdminCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(DynamicModuleLoader,Object.assign({modules:[getAdminCenterUsersModule(),getAdminCenterGroupsModule(),getAdminCenterPermissionsModule(),getAdminCenterApplicationsModule(),getAdminCenterBrowseModule(),getOrganizationPanelModule(),getPlatformInfoModule(),getApprovalsModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{AdminCenterBrowse};
|
package/js-core.esm70.js.gz
CHANGED
|
Binary file
|