aiware-js 2.15.0 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.esm.css +46 -46
- package/js-core.esm.js +20 -8
- package/js-core.esm13.js +1 -1
- package/js-core.esm14.js +1 -1
- package/js-core.esm15.js +1 -1
- package/js-core.esm16.js +1 -1
- package/js-core.esm17.js +1 -230
- package/js-core.esm18.js +222 -52
- package/js-core.esm19.js +60 -1
- package/js-core.esm20.js +1 -1
- package/js-core.esm21.js +1 -1
- package/js-core.esm22.js +1 -1
- package/js-core.esm23.js +1 -1
- package/js-core.esm24.js +1 -1
- package/js-core.esm25.js +1 -14
- package/js-core.esm26.js +1 -12
- package/js-core.esm27.js +7 -47
- package/js-core.esm28.js +12 -1
- package/js-core.esm29.js +54 -88
- package/js-core.esm30.js +1 -226
- package/js-core.esm31.js +80 -27
- package/js-core.esm32.js +211 -1
- package/js-core.esm33.js +35 -1
- package/js-core.esm34.js +1 -1
- package/js-core.esm35.js +1 -1
- package/js-core.esm36.js +1 -31
- package/js-core.esm37.js +1 -1
- package/js-core.esm38.js +31 -51
- package/js-core.esm39.js +1 -1
- package/js-core.esm4.js +1 -1
- package/js-core.esm40.js +48 -26
- package/js-core.esm41.js +1 -1
- package/js-core.esm42.js +29 -0
- package/js-core.esm43.js +73 -0
- package/js-core.esm5.js +3 -3
- package/js-core.esm7.js +3 -3
- package/js-core.umd.css +92 -92
- package/js-core.umd.js +176 -125
- package/lib/rate-limiter.d.ts +6 -0
- package/locales/en.json +1 -1
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm38.js
CHANGED
|
@@ -1,51 +1,31 @@
|
|
|
1
|
-
import{H as createSlice,cg as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,cf as combineReducers,j as jsxRuntime,F as FormattedMessage,m as makeStyles,B as Box,T as Typography$1,eK as injectIntl,k as useSelector,i as useDispatch,r as react,ae as Skeleton$1,a7 as Divider,fS as ErrorState,a8 as Tooltip,a9 as IconButton,bV as Hide,ci as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,bx as CacheProvider,by as muiCache,a2 as all,fR as selectIsUserAdmin,bi as React,cz as CustomTabs,cm as TabPanel,eE as userSelector,at as Button,G as Grid$1,g7 as NoApps,eo as hidePanel,Z as List,dA as takeEvery$1,cA as useBackupImg,cB as img$1u,p as lodash,S as Switch,w as TextField,fQ as selectOrgId,$ as ListItem,eP as ListItemAvatar,bN as Avatar,a1 as ListItemText,g8 as green,g5 as Lock,eU as ListItemSecondaryAction,cs as mountPanel,ai as select,ah as put,ak as call$g,cD as baseGraphQLApiWithError}from"./js-core.esm.js";import{C as Container}from"./js-core.esm21.js";import{S as Stack}from"./js-core.esm19.js";import{C as Chip$1}from"./js-core.esm23.js";!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();var match,version,store,wmget,wmhas,wmset,set$1,get,has,STATE,activeXDocument,IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator,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$k=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof commonjsGlobal&&commonjsGlobal)||function(){return this}()||Function("return this")(),objectGetOwnPropertyDescriptor={},fails$g=function(e){try{return!!e()}catch(e){return!0}},fails$f=fails$g,descriptors=!fails$g(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),fails$e=fails$g,functionBindNative=!fails$g(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}),NATIVE_BIND$3=functionBindNative,call$f=Function.prototype.call,functionCall=NATIVE_BIND$3?call$f.bind(call$f):function(){return call$f.apply(call$f,arguments)},objectPropertyIsEnumerable={},$propertyIsEnumerable={}.propertyIsEnumerable,getOwnPropertyDescriptor$2=Object.getOwnPropertyDescriptor,NASHORN_BUG=getOwnPropertyDescriptor$2&&!$propertyIsEnumerable.call({1:2},1),createPropertyDescriptor$4=(objectPropertyIsEnumerable.f=NASHORN_BUG?function(e){e=getOwnPropertyDescriptor$2(this,e);return!!e&&e.enumerable}:$propertyIsEnumerable,function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}),NATIVE_BIND$2=functionBindNative,FunctionPrototype$2=Function.prototype,bind$5=FunctionPrototype$2.bind,call$e=FunctionPrototype$2.call,uncurryThis$g=NATIVE_BIND$2&&bind$5.bind(call$e,call$e),functionUncurryThis=NATIVE_BIND$2?function(e){return e&&uncurryThis$g(e)}:function(e){return e&&function(){return call$e.apply(e,arguments)}},uncurryThis$f=functionUncurryThis,toString$4=uncurryThis$f({}.toString),stringSlice$1=uncurryThis$f("".slice),classofRaw$1=function(e){return stringSlice$1(toString$4(e),8,-1)},uncurryThis$e=functionUncurryThis,fails$d=fails$g,classof$5=classofRaw$1,$Object$4=Object,split=functionUncurryThis("".split),indexedObject=fails$d(function(){return!$Object$4("z").propertyIsEnumerable(0)})?function(e){return"String"==classof$5(e)?split(e,""):$Object$4(e)}:$Object$4,$TypeError$d=TypeError,requireObjectCoercible$2=function(e){if(null==e)throw $TypeError$d("Can't call method on "+e);return e},IndexedObject$2=indexedObject,requireObjectCoercible$1=requireObjectCoercible$2,toIndexedObject$5=function(e){return IndexedObject$2(requireObjectCoercible$1(e))},isCallable$l=function(e){return"function"==typeof e},isCallable$k=isCallable$l,isObject$7=function(e){return"object"==typeof e?null!==e:isCallable$k(e)},global$j=global$k,isCallable$j=isCallable$l,aFunction=function(e){return isCallable$j(e)?e:void 0},getBuiltIn$8=function(e,t){return arguments.length<2?aFunction(global$j[e]):global$j[e]&&global$j[e][t]},uncurryThis$d=functionUncurryThis,objectIsPrototypeOf=functionUncurryThis({}.isPrototypeOf),getBuiltIn$7=getBuiltIn$8,engineUserAgent=getBuiltIn$8("navigator","userAgent")||"",global$i=global$k,userAgent$5=engineUserAgent,process$4=global$i.process,Deno$1=global$i.Deno,versions=process$4&&process$4.versions||Deno$1&&Deno$1.version,v8=versions&&versions.v8,engineV8Version=version=!(version=v8?0<(match=v8.split("."))[0]&&match[0]<4?1:+(match[0]+match[1]):version)&&userAgent$5&&(!(match=userAgent$5.match(/Edge\/(\d+)/))||74<=match[1])&&(match=userAgent$5.match(/Chrome\/(\d+)/))?+match[1]:version,V8_VERSION$1=engineV8Version,fails$c=fails$g,nativeSymbol=!!Object.getOwnPropertySymbols&&!fails$c(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&V8_VERSION$1&&V8_VERSION$1<41}),NATIVE_SYMBOL$2=nativeSymbol,useSymbolAsUid=nativeSymbol&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,getBuiltIn$6=getBuiltIn$8,isCallable$i=isCallable$l,isPrototypeOf$4=objectIsPrototypeOf,USE_SYMBOL_AS_UID$1=useSymbolAsUid,$Object$3=Object,isSymbol$2=useSymbolAsUid?function(e){return"symbol"==typeof e}:function(e){var t=getBuiltIn$6("Symbol");return isCallable$i(t)&&isPrototypeOf$4(t.prototype,$Object$3(e))},$String$3=String,tryToString$5=function(e){try{return $String$3(e)}catch(e){return"Object"}},isCallable$h=isCallable$l,tryToString$4=tryToString$5,$TypeError$c=TypeError,aCallable$9=function(e){if(isCallable$h(e))return e;throw $TypeError$c(tryToString$4(e)+" is not a function")},aCallable$8=aCallable$9,getMethod$3=function(e,t){e=e[t];return null==e?void 0:aCallable$8(e)},call$d=functionCall,isCallable$g=isCallable$l,isObject$6=isObject$7,$TypeError$b=TypeError,ordinaryToPrimitive$1=function(e,t){var n,r;if("string"===t&&isCallable$g(n=e.toString)&&!isObject$6(r=call$d(n,e)))return r;if(isCallable$g(n=e.valueOf)&&!isObject$6(r=call$d(n,e)))return r;if("string"!==t&&isCallable$g(n=e.toString)&&!isObject$6(r=call$d(n,e)))return r;throw $TypeError$b("Can't convert object to primitive value")},shared$3={exports:{}},global$h=global$k,defineProperty$6=Object.defineProperty,defineGlobalProperty$3=function(t,n){try{defineProperty$6(global$h,t,{value:n,configurable:!0,writable:!0})}catch(e){global$h[t]=n}return n},global$g=global$k,defineGlobalProperty$2=defineGlobalProperty$3,SHARED="__core-js_shared__",store$3=global$k[SHARED]||defineGlobalProperty$2(SHARED,{}),sharedStore=store$3,store$2=sharedStore,requireObjectCoercible=((shared$3.exports=function(e,t){return store$2[e]||(store$2[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.24.1",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE",source:"https://github.com/zloirock/core-js"}),requireObjectCoercible$2),$Object$2=Object,toObject$5=function(e){return $Object$2(requireObjectCoercible(e))},uncurryThis$c=functionUncurryThis,toObject$4=toObject$5,hasOwnProperty=functionUncurryThis({}.hasOwnProperty),hasOwnProperty_1=Object.hasOwn||function(e,t){return hasOwnProperty(toObject$4(e),t)},uncurryThis$b=functionUncurryThis,id=0,postfix=Math.random(),toString$3=uncurryThis$b(1..toString),uid$2=function(e){return"Symbol("+(void 0===e?"":e)+")_"+toString$3(++id+postfix,36)},global$f=global$k,shared$2=shared$3.exports,hasOwn$b=hasOwnProperty_1,uid$1=uid$2,NATIVE_SYMBOL$1=nativeSymbol,USE_SYMBOL_AS_UID=useSymbolAsUid,WellKnownSymbolsStore=shared$2("wks"),Symbol$1=global$f.Symbol,symbolFor=Symbol$1&&Symbol$1.for,createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid$1,wellKnownSymbol$e=function(e){var t;return hasOwn$b(WellKnownSymbolsStore,e)&&(NATIVE_SYMBOL$1||"string"==typeof WellKnownSymbolsStore[e])||(t="Symbol."+e,NATIVE_SYMBOL$1&&hasOwn$b(Symbol$1,e)?WellKnownSymbolsStore[e]=Symbol$1[e]:WellKnownSymbolsStore[e]=(USE_SYMBOL_AS_UID&&symbolFor?symbolFor:createWellKnownSymbol)(t)),WellKnownSymbolsStore[e]},call$c=functionCall,isObject$5=isObject$7,isSymbol$1=isSymbol$2,getMethod$2=getMethod$3,ordinaryToPrimitive=ordinaryToPrimitive$1,wellKnownSymbol$d=wellKnownSymbol$e,$TypeError$a=TypeError,TO_PRIMITIVE=wellKnownSymbol$e("toPrimitive"),toPrimitive$1=function(e,t){if(!isObject$5(e)||isSymbol$1(e))return e;var n=getMethod$2(e,TO_PRIMITIVE);if(n){if(n=call$c(n,e,t=void 0===t?"default":t),!isObject$5(n)||isSymbol$1(n))return n;throw $TypeError$a("Can't convert object to primitive value")}return ordinaryToPrimitive(e,t=void 0===t?"number":t)},toPrimitive=toPrimitive$1,isSymbol=isSymbol$2,toPropertyKey$3=function(e){e=toPrimitive(e,"string");return isSymbol(e)?e:e+""},global$e=global$k,isObject$4=isObject$7,document$3=global$k.document,EXISTS$1=isObject$4(document$3)&&isObject$4(document$3.createElement),documentCreateElement$2=function(e){return EXISTS$1?document$3.createElement(e):{}},DESCRIPTORS$b=descriptors,fails$b=fails$g,createElement$1=documentCreateElement$2,ie8DomDefine=!descriptors&&!fails$g(function(){return 7!=Object.defineProperty(createElement$1("div"),"a",{get:function(){return 7}}).a}),DESCRIPTORS$a=descriptors,call$b=functionCall,propertyIsEnumerableModule$1=objectPropertyIsEnumerable,createPropertyDescriptor$3=createPropertyDescriptor$4,toIndexedObject$4=toIndexedObject$5,toPropertyKey$2=toPropertyKey$3,hasOwn$a=hasOwnProperty_1,IE8_DOM_DEFINE$1=ie8DomDefine,$getOwnPropertyDescriptor$1=Object.getOwnPropertyDescriptor,objectDefineProperty=(objectGetOwnPropertyDescriptor.f=DESCRIPTORS$a?$getOwnPropertyDescriptor$1:function(e,t){if(e=toIndexedObject$4(e),t=toPropertyKey$2(t),IE8_DOM_DEFINE$1)try{return $getOwnPropertyDescriptor$1(e,t)}catch(e){}if(hasOwn$a(e,t))return createPropertyDescriptor$3(!call$b(propertyIsEnumerableModule$1.f,e,t),e[t])},{}),DESCRIPTORS$9=descriptors,fails$a=fails$g,v8PrototypeDefineBug=descriptors&&fails$g(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),isObject$3=isObject$7,$String$2=String,$TypeError$9=TypeError,anObject$c=function(e){if(isObject$3(e))return e;throw $TypeError$9($String$2(e)+" is not an object")},DESCRIPTORS$8=descriptors,IE8_DOM_DEFINE=ie8DomDefine,V8_PROTOTYPE_DEFINE_BUG$1=v8PrototypeDefineBug,anObject$b=anObject$c,toPropertyKey$1=toPropertyKey$3,$TypeError$8=TypeError,$defineProperty=Object.defineProperty,$getOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,ENUMERABLE="enumerable",CONFIGURABLE$1="configurable",WRITABLE="writable",DESCRIPTORS$7=(objectDefineProperty.f=DESCRIPTORS$8?V8_PROTOTYPE_DEFINE_BUG$1?function(e,t,n){var r;return anObject$b(e),t=toPropertyKey$1(t),anObject$b(n),"function"==typeof e&&"prototype"===t&&"value"in n&&WRITABLE in n&&!n[WRITABLE]&&((r=$getOwnPropertyDescriptor(e,t))&&r[WRITABLE]&&(e[t]=n.value,n={configurable:(CONFIGURABLE$1 in n?n:r)[CONFIGURABLE$1],enumerable:(ENUMERABLE in n?n:r)[ENUMERABLE],writable:!1})),$defineProperty(e,t,n)}:$defineProperty:function(e,t,n){if(anObject$b(e),t=toPropertyKey$1(t),anObject$b(n),IE8_DOM_DEFINE)try{return $defineProperty(e,t,n)}catch(e){}if("get"in n||"set"in n)throw $TypeError$8("Accessors not supported");return"value"in n&&(e[t]=n.value),e},descriptors),definePropertyModule$5=objectDefineProperty,createPropertyDescriptor$2=createPropertyDescriptor$4,createNonEnumerableProperty$4=DESCRIPTORS$7?function(e,t,n){return definePropertyModule$5.f(e,t,createPropertyDescriptor$2(1,n))}:function(e,t,n){return e[t]=n,e},makeBuiltIn$2={exports:{}},DESCRIPTORS$6=descriptors,hasOwn$9=hasOwnProperty_1,FunctionPrototype$1=Function.prototype,getDescriptor=DESCRIPTORS$6&&Object.getOwnPropertyDescriptor,EXISTS=hasOwn$9(FunctionPrototype$1,"name"),PROPER=EXISTS&&"something"===function(){}.name,CONFIGURABLE=EXISTS&&(!DESCRIPTORS$6||getDescriptor(FunctionPrototype$1,"name").configurable),functionName={EXISTS:EXISTS,PROPER:PROPER,CONFIGURABLE:CONFIGURABLE},uncurryThis$a=functionUncurryThis,isCallable$f=isCallable$l,store$1=sharedStore,functionToString=functionUncurryThis(Function.toString),inspectSource$4=(isCallable$f(store$1.inspectSource)||(store$1.inspectSource=function(e){return functionToString(e)}),store$1.inspectSource),global$d=global$k,isCallable$e=isCallable$l,inspectSource$3=inspectSource$4,WeakMap$1=global$k.WeakMap,nativeWeakMap=isCallable$e(WeakMap$1)&&/native code/.test(inspectSource$3(WeakMap$1)),shared$1=shared$3.exports,uid=uid$2,keys=shared$1("keys"),sharedKey$3=function(e){return keys[e]||(keys[e]=uid(e))},hiddenKeys$4={},NATIVE_WEAK_MAP=nativeWeakMap,global$c=global$k,uncurryThis$9=functionUncurryThis,isObject$2=isObject$7,createNonEnumerableProperty$3=createNonEnumerableProperty$4,hasOwn$8=hasOwnProperty_1,shared=sharedStore,sharedKey$2=sharedKey$3,hiddenKeys$3=hiddenKeys$4,OBJECT_ALREADY_INITIALIZED="Object already initialized",TypeError$2=global$c.TypeError,WeakMap=global$c.WeakMap,enforce=function(e){return has(e)?get(e):set$1(e,{})},getterFor=function(t){return function(e){if(isObject$2(e)&&(e=get(e)).type===t)return e;throw TypeError$2("Incompatible receiver, "+t+" required")}},internalState=(has=NATIVE_WEAK_MAP||shared.state?(store=shared.state||(shared.state=new WeakMap),wmget=uncurryThis$9(store.get),wmhas=uncurryThis$9(store.has),wmset=uncurryThis$9(store.set),set$1=function(e,t){if(wmhas(store,e))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,wmset(store,e,t),t},get=function(e){return wmget(store,e)||{}},function(e){return wmhas(store,e)}):(STATE=sharedKey$2("state"),hiddenKeys$3[STATE]=!0,set$1=function(e,t){if(hasOwn$8(e,STATE))throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);return t.facade=e,createNonEnumerableProperty$3(e,STATE,t),t},get=function(e){return hasOwn$8(e,STATE)?e[STATE]:{}},function(e){return hasOwn$8(e,STATE)}),{set:set$1,get:get,has:has,enforce:enforce,getterFor:getterFor}),fails$9=fails$g,isCallable$d=isCallable$l,hasOwn$7=hasOwnProperty_1,DESCRIPTORS$5=descriptors,CONFIGURABLE_FUNCTION_NAME$1=functionName.CONFIGURABLE,inspectSource$2=inspectSource$4,InternalStateModule$2=internalState,enforceInternalState=InternalStateModule$2.enforce,getInternalState$1=InternalStateModule$2.get,defineProperty$5=Object.defineProperty,CONFIGURABLE_LENGTH=DESCRIPTORS$5&&!fails$9(function(){return 8!==defineProperty$5(function(){},"length",{value:8}).length}),TEMPLATE=String(String).split("String"),makeBuiltIn$1=makeBuiltIn$2.exports=function(e,t,n){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!hasOwn$7(e,"name")||CONFIGURABLE_FUNCTION_NAME$1&&e.name!==t)&&(DESCRIPTORS$5?defineProperty$5(e,"name",{value:t,configurable:!0}):e.name=t),CONFIGURABLE_LENGTH&&n&&hasOwn$7(n,"arity")&&e.length!==n.arity&&defineProperty$5(e,"length",{value:n.arity});try{n&&hasOwn$7(n,"constructor")&&n.constructor?DESCRIPTORS$5&&defineProperty$5(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}n=enforceInternalState(e);return hasOwn$7(n,"source")||(n.source=TEMPLATE.join("string"==typeof t?t:"")),e},isCallable$c=(Function.prototype.toString=makeBuiltIn$1(function(){return isCallable$d(this)&&getInternalState$1(this).source||inspectSource$2(this)},"toString"),isCallable$l),definePropertyModule$4=objectDefineProperty,makeBuiltIn=makeBuiltIn$2.exports,defineGlobalProperty$1=defineGlobalProperty$3,defineBuiltIn$6=function(e,t,n,r){var o=(r=r||{}).enumerable,i=void 0!==r.name?r.name:t;if(isCallable$c(n)&&makeBuiltIn(n,i,r),r.global)o?e[t]=n:defineGlobalProperty$1(t,n);else{try{r.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=n:definePropertyModule$4.f(e,t,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.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$1=Math.max,min$1=Math.min,toAbsoluteIndex$2=function(e,t){e=toIntegerOrInfinity$1(e);return e<0?max$1(e+t,0):min$1(e,t)},toIntegerOrInfinity=toIntegerOrInfinity$2,min=Math.min,toLength$1=function(e){return 0<e?min(toIntegerOrInfinity(e),9007199254740991):0},toLength=toLength$1,lengthOfArrayLike$5=function(e){return toLength(e.length)},toIndexedObject$3=toIndexedObject$5,toAbsoluteIndex$1=toAbsoluteIndex$2,lengthOfArrayLike$4=lengthOfArrayLike$5,createMethod$1=function(s){return function(e,t,n){var r,o=toIndexedObject$3(e),i=lengthOfArrayLike$4(o),a=toAbsoluteIndex$1(n,i);if(s&&t!=t){for(;a<i;)if((r=o[a++])!=r)return!0}else for(;a<i;a++)if((s||a in o)&&o[a]===t)return s||a||0;return!s&&-1}},arrayIncludes={includes:createMethod$1(!0),indexOf:createMethod$1(!1)},uncurryThis$8=functionUncurryThis,hasOwn$6=hasOwnProperty_1,toIndexedObject$2=toIndexedObject$5,indexOf=arrayIncludes.indexOf,hiddenKeys$2=hiddenKeys$4,push$1=uncurryThis$8([].push),objectKeysInternal=function(e,t){var n,r=toIndexedObject$2(e),o=0,i=[];for(n in r)!hasOwn$6(hiddenKeys$2,n)&&hasOwn$6(r,n)&&push$1(i,n);for(;t.length>o;)!hasOwn$6(r,n=t[o++])||~indexOf(i,n)||push$1(i,n);return i},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$5=(objectGetOwnPropertySymbols.f=Object.getOwnPropertySymbols,getBuiltIn$8),uncurryThis$7=functionUncurryThis,getOwnPropertyNamesModule=objectGetOwnPropertyNames,getOwnPropertySymbolsModule$1=objectGetOwnPropertySymbols,anObject$a=anObject$c,concat$1=functionUncurryThis([].concat),ownKeys$1=getBuiltIn$5("Reflect","ownKeys")||function(e){var t=getOwnPropertyNamesModule.f(anObject$a(e)),n=getOwnPropertySymbolsModule$1.f;return n?concat$1(t,n(e)):t},hasOwn$5=hasOwnProperty_1,ownKeys=ownKeys$1,getOwnPropertyDescriptorModule=objectGetOwnPropertyDescriptor,definePropertyModule$3=objectDefineProperty,copyConstructorProperties$2=function(e,t,n){for(var r=ownKeys(t),o=definePropertyModule$3.f,i=getOwnPropertyDescriptorModule.f,a=0;a<r.length;a++){var s=r[a];hasOwn$5(e,s)||n&&hasOwn$5(n,s)||o(e,s,i(t,s))}},fails$8=fails$g,isCallable$b=isCallable$l,replacement=/#|\.prototype\./,isForced$2=function(e,t){e=data[normalize(e)];return e==POLYFILL||e!=NATIVE&&(isCallable$b(t)?fails$8(t):!!t)},normalize=isForced$2.normalize=function(e){return String(e).replace(replacement,".").toLowerCase()},data=isForced$2.data={},NATIVE=isForced$2.NATIVE="N",POLYFILL=isForced$2.POLYFILL="P",isForced_1=isForced$2,global$b=global$k,getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f,createNonEnumerableProperty$2=createNonEnumerableProperty$4,defineBuiltIn$5=defineBuiltIn$6,defineGlobalProperty=defineGlobalProperty$3,copyConstructorProperties$1=copyConstructorProperties$2,isForced$1=isForced_1,_export=function(e,t){var n,r,o,i=e.target,a=e.global,s=e.stat,l=a?global$b:s?global$b[i]||defineGlobalProperty(i,{}):(global$b[i]||{}).prototype;if(l)for(n in t){if(r=t[n],o=e.dontCallGetSet?(o=getOwnPropertyDescriptor$1(l,n))&&o.value:l[n],!isForced$1(a?n:i+(s?".":"#")+n,e.forced)&&void 0!==o){if(typeof r==typeof o)continue;copyConstructorProperties$1(r,o)}(e.sham||o&&o.sham)&&createNonEnumerableProperty$2(r,"sham",!0),defineBuiltIn$5(l,n,r,e)}},internalObjectKeys=objectKeysInternal,enumBugKeys$1=enumBugKeys$3,objectKeys$2=Object.keys||function(e){return internalObjectKeys(e,enumBugKeys$1)},DESCRIPTORS$4=descriptors,uncurryThis$6=functionUncurryThis,call$a=functionCall,fails$7=fails$g,objectKeys$1=objectKeys$2,getOwnPropertySymbolsModule=objectGetOwnPropertySymbols,propertyIsEnumerableModule=objectPropertyIsEnumerable,toObject$3=toObject$5,IndexedObject$1=indexedObject,$assign=Object.assign,defineProperty$4=Object.defineProperty,concat=uncurryThis$6([].concat),objectAssign=!$assign||fails$7(function(){if(DESCRIPTORS$4&&1!==$assign({b:1},$assign(defineProperty$4({},"a",{enumerable:!0,get:function(){defineProperty$4(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[n]||objectKeys$1($assign({},t)).join("")!=r})?function(e,t){for(var n=toObject$3(e),r=arguments.length,o=1,i=getOwnPropertySymbolsModule.f,a=propertyIsEnumerableModule.f;o<r;)for(var s,l=IndexedObject$1(arguments[o++]),c=i?concat(objectKeys$1(l),i(l)):objectKeys$1(l),p=c.length,u=0;u<p;)s=c[u++],DESCRIPTORS$4&&!call$a(a,l,s)||(n[s]=l[s]);return n}:$assign,$$a=_export,assign=objectAssign,objectDefineProperties=(_export({target:"Object",stat:!0,arity:2,forced:Object.assign!==assign},{assign:assign}),{}),DESCRIPTORS$3=descriptors,V8_PROTOTYPE_DEFINE_BUG=v8PrototypeDefineBug,definePropertyModule$2=objectDefineProperty,anObject$9=anObject$c,toIndexedObject$1=toIndexedObject$5,objectKeys=objectKeys$2,getBuiltIn$4=(objectDefineProperties.f=DESCRIPTORS$3&&!V8_PROTOTYPE_DEFINE_BUG?Object.defineProperties:function(e,t){anObject$9(e);for(var n,r=toIndexedObject$1(t),o=objectKeys(t),i=o.length,a=0;a<i;)definePropertyModule$2.f(e,n=o[a++],r[n]);return e},getBuiltIn$8),html$2=getBuiltIn$8("document","documentElement"),anObject$8=anObject$c,definePropertiesModule=objectDefineProperties,enumBugKeys=enumBugKeys$3,hiddenKeys=hiddenKeys$4,html$1=html$2,documentCreateElement$1=documentCreateElement$2,sharedKey$1=sharedKey$3,GT=">",LT="<",PROTOTYPE="prototype",SCRIPT="script",IE_PROTO$1=sharedKey$3("IE_PROTO"),EmptyConstructor=function(){},scriptTag=function(e){return LT+SCRIPT+GT+e+LT+"/"+SCRIPT+GT},NullProtoObjectViaActiveX=function(e){e.write(scriptTag("")),e.close();var t=e.parentWindow.Object;return e=null,t},NullProtoObjectViaIFrame=function(){var e=documentCreateElement$1("iframe"),t="java"+SCRIPT+":";return e.style.display="none",html$1.appendChild(e),e.src=String(t),(t=e.contentWindow.document).open(),t.write(scriptTag("document.F=Object")),t.close(),t.F},NullProtoObject=function(){try{activeXDocument=new ActiveXObject("htmlfile")}catch(e){}NullProtoObject="undefined"==typeof document||document.domain&&activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();for(var e=enumBugKeys.length;e--;)delete NullProtoObject[PROTOTYPE][enumBugKeys[e]];return NullProtoObject()},objectCreate=(hiddenKeys[IE_PROTO$1]=!0,Object.create||function(e,t){var n;return null!==e?(EmptyConstructor[PROTOTYPE]=anObject$8(e),n=new EmptyConstructor,EmptyConstructor[PROTOTYPE]=null,n[IE_PROTO$1]=e):n=NullProtoObject(),void 0===t?n:definePropertiesModule.f(n,t)}),wellKnownSymbol$c=wellKnownSymbol$e,create$1=objectCreate,defineProperty$3=objectDefineProperty.f,UNSCOPABLES=wellKnownSymbol$c("unscopables"),ArrayPrototype$1=Array.prototype,addToUnscopables$1=(null==ArrayPrototype$1[UNSCOPABLES]&&defineProperty$3(ArrayPrototype$1,UNSCOPABLES,{configurable:!0,value:create$1(null)}),function(e){ArrayPrototype$1[UNSCOPABLES][e]=!0}),iterators={},fails$6=fails$g,correctPrototypeGetter=!fails$g(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),hasOwn$4=hasOwnProperty_1,isCallable$a=isCallable$l,toObject$2=toObject$5,sharedKey=sharedKey$3,CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter,IE_PROTO=sharedKey$3("IE_PROTO"),$Object$1=Object,ObjectPrototype=$Object$1.prototype,objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?$Object$1.getPrototypeOf:function(e){e=toObject$2(e);if(hasOwn$4(e,IE_PROTO))return e[IE_PROTO];var t=e.constructor;return isCallable$a(t)&&e instanceof t?t.prototype:e instanceof $Object$1?ObjectPrototype:null},fails$5=fails$g,isCallable$9=isCallable$l,getPrototypeOf$1=objectGetPrototypeOf,defineBuiltIn$4=defineBuiltIn$6,wellKnownSymbol$b=wellKnownSymbol$e,ITERATOR$5=wellKnownSymbol$e("iterator"),BUGGY_SAFARI_ITERATORS$1=!1,NEW_ITERATOR_PROTOTYPE=([].keys&&("next"in(arrayIterator=[].keys())?(PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator)))!==Object.prototype&&(IteratorPrototype$2=PrototypeOfArrayIteratorPrototype):BUGGY_SAFARI_ITERATORS$1=!0),null==IteratorPrototype$2||fails$5(function(){var e={};return IteratorPrototype$2[ITERATOR$5].call(e)!==e})),iteratorsCore=(isCallable$9((IteratorPrototype$2=NEW_ITERATOR_PROTOTYPE?{}:IteratorPrototype$2)[ITERATOR$5])||defineBuiltIn$4(IteratorPrototype$2,ITERATOR$5,function(){return this}),{IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1}),defineProperty$2=objectDefineProperty.f,hasOwn$3=hasOwnProperty_1,wellKnownSymbol$a=wellKnownSymbol$e,TO_STRING_TAG$3=wellKnownSymbol$e("toStringTag"),setToStringTag$3=function(e,t,n){(e=e&&!n?e.prototype:e)&&!hasOwn$3(e,TO_STRING_TAG$3)&&defineProperty$2(e,TO_STRING_TAG$3,{configurable:!0,value:t})},IteratorPrototype$1=iteratorsCore.IteratorPrototype,create=objectCreate,createPropertyDescriptor$1=createPropertyDescriptor$4,setToStringTag$2=setToStringTag$3,Iterators$4=iterators,returnThis$1=function(){return this},createIteratorConstructor$1=function(e,t,n,r){t+=" Iterator";return e.prototype=create(IteratorPrototype$1,{next:createPropertyDescriptor$1(+!r,n)}),setToStringTag$2(e,t,!1),Iterators$4[t]=returnThis$1,e},isCallable$8=isCallable$l,$String$1=String,$TypeError$7=TypeError,aPossiblePrototype$1=function(e){if("object"==typeof e||isCallable$8(e))return e;throw $TypeError$7("Can't set "+$String$1(e)+" as a prototype")},uncurryThis$5=functionUncurryThis,anObject$7=anObject$c,aPossiblePrototype=aPossiblePrototype$1,objectSetPrototypeOf=Object.setPrototypeOf||("__proto__"in{}?function(){var n,r=!1,e={};try{(n=uncurryThis$5(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(e,[]),r=e instanceof Array}catch(e){}return function(e,t){return anObject$7(e),aPossiblePrototype(t),r?n(e,t):e.__proto__=t,e}}():void 0),$$9=_export,call$9=functionCall,FunctionName=functionName,isCallable$7=isCallable$l,createIteratorConstructor=createIteratorConstructor$1,getPrototypeOf=objectGetPrototypeOf,setPrototypeOf$1=objectSetPrototypeOf,setToStringTag$1=setToStringTag$3,createNonEnumerableProperty$1=createNonEnumerableProperty$4,defineBuiltIn$3=defineBuiltIn$6,wellKnownSymbol$9=wellKnownSymbol$e,Iterators$3=iterators,IteratorsCore=iteratorsCore,PROPER_FUNCTION_NAME$1=FunctionName.PROPER,CONFIGURABLE_FUNCTION_NAME=FunctionName.CONFIGURABLE,IteratorPrototype=IteratorsCore.IteratorPrototype,BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS,ITERATOR$4=wellKnownSymbol$9("iterator"),KEYS="keys",VALUES="values",ENTRIES="entries",returnThis=function(){return this},defineIterator$1=function(e,t,n,r,o,i,a){createIteratorConstructor(n,t,r);function s(e){if(e===o&&$)return $;if(!BUGGY_SAFARI_ITERATORS&&e in u)return u[e];switch(e){case KEYS:case VALUES:case ENTRIES:return function(){return new n(this,e)}}return function(){return new n(this)}}var l,c,r=t+" Iterator",p=!1,u=e.prototype,d=u[ITERATOR$4]||u["@@iterator"]||o&&u[o],$=!BUGGY_SAFARI_ITERATORS&&d||s(o),g="Array"==t&&u.entries||d;if(g&&(g=getPrototypeOf(g.call(new e)))!==Object.prototype&&g.next&&(getPrototypeOf(g)!==IteratorPrototype&&(setPrototypeOf$1?setPrototypeOf$1(g,IteratorPrototype):isCallable$7(g[ITERATOR$4])||defineBuiltIn$3(g,ITERATOR$4,returnThis)),setToStringTag$1(g,r,!0)),PROPER_FUNCTION_NAME$1&&o==VALUES&&d&&d.name!==VALUES&&(CONFIGURABLE_FUNCTION_NAME?createNonEnumerableProperty$1(u,"name",VALUES):(p=!0,$=function(){return call$9(d,this)})),o)if(l={values:s(VALUES),keys:i?$:s(KEYS),entries:s(ENTRIES)},a)for(c in l)!BUGGY_SAFARI_ITERATORS&&!p&&c in u||defineBuiltIn$3(u,c,l[c]);else $$9({target:t,proto:!0,forced:BUGGY_SAFARI_ITERATORS||p},l);return u[ITERATOR$4]!==$&&defineBuiltIn$3(u,ITERATOR$4,$,{name:o}),Iterators$3[t]=$,l},toIndexedObject=toIndexedObject$5,addToUnscopables=addToUnscopables$1,Iterators$2=iterators,InternalStateModule$1=internalState,defineProperty$1=objectDefineProperty.f,defineIterator=defineIterator$1,DESCRIPTORS$2=descriptors,ARRAY_ITERATOR="Array Iterator",setInternalState$1=InternalStateModule$1.set,getInternalState=InternalStateModule$1.getterFor(ARRAY_ITERATOR),es_array_iterator=defineIterator(Array,"Array",function(e,t){setInternalState$1(this,{type:ARRAY_ITERATOR,target:toIndexedObject(e),index:0,kind:t})},function(){var e=getInternalState(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}},"values"),values=Iterators$2.Arguments=Iterators$2.Array;if(addToUnscopables("keys"),addToUnscopables("values"),addToUnscopables("entries"),DESCRIPTORS$2&&"values"!==values.name)try{defineProperty$1(values,"name",{value:"values"})}catch(e){}var COLLECTION_NAME,domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},documentCreateElement=documentCreateElement$2,classList=documentCreateElement$2("span").classList,DOMTokenListPrototype$1=classList&&classList.constructor&&classList.constructor.prototype,domTokenListPrototype=DOMTokenListPrototype$1===Object.prototype?void 0:DOMTokenListPrototype$1,global$a=global$k,DOMIterables=domIterables,DOMTokenListPrototype=domTokenListPrototype,ArrayIteratorMethods=es_array_iterator,createNonEnumerableProperty=createNonEnumerableProperty$4,wellKnownSymbol$8=wellKnownSymbol$e,ITERATOR$3=wellKnownSymbol$8("iterator"),TO_STRING_TAG$2=wellKnownSymbol$8("toStringTag"),ArrayValues=ArrayIteratorMethods.values,handlePrototype=function(t,e){if(t){if(t[ITERATOR$3]!==ArrayValues)try{createNonEnumerableProperty(t,ITERATOR$3,ArrayValues)}catch(e){t[ITERATOR$3]=ArrayValues}if(t[TO_STRING_TAG$2]||createNonEnumerableProperty(t,TO_STRING_TAG$2,e),DOMIterables[e])for(var n in ArrayIteratorMethods)if(t[n]!==ArrayIteratorMethods[n])try{createNonEnumerableProperty(t,n,ArrayIteratorMethods[n])}catch(e){t[n]=ArrayIteratorMethods[n]}}};for(COLLECTION_NAME in DOMIterables)handlePrototype(global$a[COLLECTION_NAME]&&global$a[COLLECTION_NAME].prototype,COLLECTION_NAME);handlePrototype(DOMTokenListPrototype,"DOMTokenList");var EmptyStringDescriptionStore,SymbolWrapper,NATIVE_SYMBOL,symbolToString,symbolValueOf,regexp,replace,stringSlice,EApplicationStatus,EConfigTypes,wellKnownSymbol$7=wellKnownSymbol$e,TO_STRING_TAG$1=wellKnownSymbol$e("toStringTag"),test$1={},toStringTagSupport=(test$1[TO_STRING_TAG$1]="z","[object z]"===String(test$1)),TO_STRING_TAG_SUPPORT=toStringTagSupport,isCallable$6=isCallable$l,classofRaw=classofRaw$1,wellKnownSymbol$6=wellKnownSymbol$e,TO_STRING_TAG=wellKnownSymbol$e("toStringTag"),$Object=Object,CORRECT_ARGUMENTS="Arguments"==classofRaw(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},classof$4=TO_STRING_TAG_SUPPORT?classofRaw:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=tryGet(e=$Object(e),TO_STRING_TAG))?t:CORRECT_ARGUMENTS?classofRaw(e):"Object"==(t=classofRaw(e))&&isCallable$6(e.callee)?"Arguments":t},classof$3=classof$4,$String=String,toString$2=function(e){if("Symbol"===classof$3(e))throw TypeError("Cannot convert a Symbol value to a string");return $String(e)},$$8=_export,DESCRIPTORS$1=descriptors,global$9=global$k,uncurryThis$4=functionUncurryThis,hasOwn$2=hasOwnProperty_1,isCallable$5=isCallable$l,isPrototypeOf$3=objectIsPrototypeOf,toString$1=toString$2,defineProperty=objectDefineProperty.f,copyConstructorProperties=copyConstructorProperties$2,NativeSymbol=global$9.Symbol,SymbolPrototype=NativeSymbol&&NativeSymbol.prototype,anObject$6=(!DESCRIPTORS$1||!isCallable$5(NativeSymbol)||"description"in SymbolPrototype&&void 0===NativeSymbol().description||(EmptyStringDescriptionStore={},copyConstructorProperties(SymbolWrapper=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:toString$1(arguments[0]),t=isPrototypeOf$3(SymbolPrototype,this)?new NativeSymbol(e):void 0===e?NativeSymbol():NativeSymbol(e);return""===e&&(EmptyStringDescriptionStore[t]=!0),t},NativeSymbol),(SymbolWrapper.prototype=SymbolPrototype).constructor=SymbolWrapper,NATIVE_SYMBOL="Symbol(test)"==String(NativeSymbol("test")),symbolToString=uncurryThis$4(SymbolPrototype.toString),symbolValueOf=uncurryThis$4(SymbolPrototype.valueOf),regexp=/^Symbol\((.*)\)[^)]+$/,replace=uncurryThis$4("".replace),stringSlice=uncurryThis$4("".slice),defineProperty(SymbolPrototype,"description",{configurable:!0,get:function(){var e=symbolValueOf(this),t=symbolToString(e);if(hasOwn$2(EmptyStringDescriptionStore,e))return"";e=NATIVE_SYMBOL?stringSlice(t,7,-1):replace(t,regexp,"$1");return""===e?void 0:e}}),$$8({global:!0,constructor:!0,forced:!0},{Symbol:SymbolWrapper})),anObject$c),regexpFlags=function(){var e=anObject$6(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},call$8=functionCall,hasOwn$1=hasOwnProperty_1,isPrototypeOf$2=objectIsPrototypeOf,regExpFlags=regexpFlags,RegExpPrototype$1=RegExp.prototype,regexpGetFlags=function(e){var t=e.flags;return void 0!==t||"flags"in RegExpPrototype$1||hasOwn$1(e,"flags")||!isPrototypeOf$2(RegExpPrototype$1,e)?t:call$8(regExpFlags,e)},PROPER_FUNCTION_NAME=functionName.PROPER,defineBuiltIn$2=defineBuiltIn$6,anObject$5=anObject$c,$toString=toString$2,fails$4=fails$g,getRegExpFlags=regexpGetFlags,TO_STRING="toString",RegExpPrototype=RegExp.prototype,n$ToString=RegExpPrototype[TO_STRING],NOT_GENERIC=fails$4(function(){return"/a/b"!=n$ToString.call({source:"a",flags:"b"})}),INCORRECT_NAME=PROPER_FUNCTION_NAME&&n$ToString.name!=TO_STRING;(NOT_GENERIC||INCORRECT_NAME)&&defineBuiltIn$2(RegExp.prototype,TO_STRING,function(){var e=anObject$5(this);return"/"+$toString(e.source)+"/"+$toString(getRegExpFlags(e))},{unsafe:!0});const ApplicationListItem=({app:e,onOpenApplicationDetailPanel:t,showInstalledChip:n=!1,isAppInstalled:r})=>{const{name:o,description:i,iconUrl:a,id:s,ownerOrganizationId:l}=e,c=useSelector(selectOrgId);var e=c&&l&&l.toString()===c.toString(),p={height:"18px",borderRadius:"30px",mb:1},u={fontWeight:"800",fontSize:"9px",lineHeight:"12px",textTransform:"uppercase"};return jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{minHeight:"134px",p:4}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,Object.assign({sx:{alignSelf:"flex-start"}},{children:jsxRuntime.exports.jsx(Avatar,Object.assign({src:a,alt:o},{children:jsxRuntime.exports.jsx(Avatar,{children:o[0]})}))})),jsxRuntime.exports.jsx(ListItemText,{sx:{display:"inline",maxWidth:"390px",alignSelf:"flex-start",m:0},primary:jsxRuntime.exports.jsxs(react.exports.Fragment,{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{color:"#2A323C",fontWeight:"400"}},{children:o})),jsxRuntime.exports.jsxs(Stack,Object.assign({direction:"row",spacing:1},{children:[n&&r&&r(s)&&jsxRuntime.exports.jsx(Chip$1,{label:jsxRuntime.exports.jsx(Typography$1,Object.assign({sx:Object.assign({color:green[700]},u)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications-installed-badge-123132",defaultMessage:"Installed",description:"installed application badge"})})),color:"success",size:"small",sx:Object.assign({background:"rgba(27, 94, 32, 0.2)",width:"70px"},p)}),e&&jsxRuntime.exports.jsx(Chip$1,{icon:jsxRuntime.exports.jsx(Lock,{style:{height:"12px",width:"12px"}}),label:jsxRuntime.exports.jsx(Typography$1,Object.assign({sx:Object.assign({color:"#4F5863"},u)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications-org-owned-badge-123112",defaultMessage:"org owned",description:"org owned application badge"})})),variant:"outlined",size:"small",sx:Object.assign({width:"90px"},p)})]}))]}),secondary:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",sx:{mt:1}},{children:i}))}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Button,Object.assign({onClick:t,variant:"outlined",color:"primary"},{children:"View Details"}))})]})),jsxRuntime.exports.jsx(Divider,{})]})},LoaderSkeletonItem=()=>jsxRuntime.exports.jsxs(ListItem,Object.assign({alignItems:"center",sx:{height:"134px"}},{children:[jsxRuntime.exports.jsx(ListItemAvatar,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"circular",width:40,height:40})}),jsxRuntime.exports.jsx(ListItemText,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"text",width:150,height:30})}),jsxRuntime.exports.jsx(ListItemSecondaryAction,{children:jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",width:87,height:35})})]})),LoaderSkeleton=()=>jsxRuntime.exports.jsxs(List,{children:[jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx(LoaderSkeletonItem,{}),jsxRuntime.exports.jsx(Divider,{})]}),ApplicationList=({apps:e,uiStatus:t,onRetry:n,showInstalledChip:r=!1,isAppInstalled:o})=>{const i=useDispatch();return"loading"===t?jsxRuntime.exports.jsx(LoaderSkeleton,{}):"failure"===t?jsxRuntime.exports.jsx(ErrorState,{onRetry:n,errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.error-message",defaultMessage:"Something went wrong while loading applications.",description:"admin center applications error state"})}):jsxRuntime.exports.jsx(List,Object.assign({sx:{maxHeight:"95%",overflowY:"auto"}},{children:e.map(e=>jsxRuntime.exports.jsx(ApplicationListItem,{app:e,onOpenApplicationDetailPanel:(e=>()=>{i(mountPanel({panelId:"APPLICATION_DETAILS_PANEL",microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{applicationId:e.id,initValue:e}},panelConfig:{type:"APP_BAR_PANEL_TEMPLATE",marginTop:55,marginStart:80,size:"large",zIndex:1002,parentPanelId:"ADMIN_CENTER_BROWSE",dimmed:0,dimmedStatus:"dimParent"}}))})(e),showInstalledChip:r,isAppInstalled:o}))}))},SLICE_NAME$1="adminCenterApplication",namespace$2=(!function(e){e.active="active",e.draft="draft",e.deleted="deleted",e.pending="pending",e.rejected="rejected",e.approved="approved",e.disabled="disabled"}(EApplicationStatus=EApplicationStatus||{}),!function(e){e.string="String",e.json="JSON",e.boolean="Boolean"}(EConfigTypes=EConfigTypes||{}),"adminCenterApplications"),initialState$2={allApplications:[],installedApplications:[],allAppStatus:"idle",installedAppStatus:"idle"},adminCenterApplicationSlice=createSlice({name:SLICE_NAME$1+"/"+namespace$2,initialState:initialState$2,reducers:{fetchAllApplicationsStart(e){e.allAppStatus="loading"},fetchAllApplicationsSuccess(e,t){e.allAppStatus="success",e.allApplications=t.payload},fetchAllApplicationsFailure(e){e.allAppStatus="failure"},fetchInstalledApplicationsStart(e){e.installedAppStatus="loading"},fetchInstalledApplicationsSuccess(e,t){e.installedAppStatus="success",e.installedApplications=t.payload},fetchInstalledApplicationsFailure(e){e.installedAppStatus="failure"}}}),actions$2=adminCenterApplicationSlice.actions;var Status,adminCenterApplications_state=adminCenterApplicationSlice.reducer;const selectInstalledApps=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.installedApplications},selectAllApps=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.allApplications},selectAllAppsUiStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.allAppStatus},selectInstalledAppsUiStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME$1])?void 0:e[namespace$2])?void 0:e.installedAppStatus},selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,n)=>({apiRoot:e,graphQLEndpoint:t,token:n}));function __rest(e,t){var n={};for(o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function __awaiter(e,a,s,l){return new(s=s||Promise)(function(n,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function o(e){try{i(l.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(r,o)}i((l=l.apply(e,a||[])).next())})}const SLICE_NAME="applications",namespace$1=(!function(e){e.idle="idle",e.loading="loading",e.success="success",e.failure="failure"}(Status=Status||{}),"applicationDetail"),initialState$1={status:"idle",application:{},ownerOrganization:{name:""}},applicationDetailSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{setInitialApplicationValue(e,t){var n=t.payload,r=n["ownerOrganization"],n=__rest(n,["ownerOrganization"]);e.initValue=t.payload,e.application=n,e.ownerOrganization=r,e.status=Status.success},fetchApplicationStart(e,t){var n,{applicationId:t,initValue:r}=t.payload;e.applicationId=t,r?(t=r["ownerOrganization"],n=__rest(r,["ownerOrganization"]),e.initValue=r,e.application=n,e.ownerOrganization=t,e.status=Status.success):e.status=Status.loading},fetchApplicationSuccess(e,t){var{application:t,organization:n}=t.payload;e.application=t,e.ownerOrganization=n,e.status=Status.success},fetchApplicationError(e,t){e.status=Status.failure},setStatus(e,t){e.status=t.payload},installAppStart(e,t){e.status=Status.loading},installAppSuccess(e,t){e.status=Status.success,e.application=t.payload},installAppFailure(e){e.status=Status.failure}}}),actions$1=applicationDetailSlice.actions;var applicationDetailsPanelReducer=applicationDetailSlice.reducer;const namespace=SLICE_NAME$1,initialState={[namespace$2]:initialState$2,[namespace$1]:initialState$1},actions={[namespace$2]:actions$2,[namespace$1]:actions$1},rootReducer=combineReducers({[namespace$2]:adminCenterApplications_state,[namespace$1]:applicationDetailsPanelReducer});var location,defer,channel,port,tryToString$3=tryToString$5,$TypeError$6=TypeError,deletePropertyOrThrow$1=function(e,t){if(!delete e[t])throw $TypeError$6("Cannot delete property "+tryToString$3(t)+" of "+tryToString$3(e))},toPropertyKey=toPropertyKey$3,definePropertyModule$1=objectDefineProperty,createPropertyDescriptor=createPropertyDescriptor$4,createProperty$1=function(e,t,n){t=toPropertyKey(t);t in e?definePropertyModule$1.f(e,t,createPropertyDescriptor(0,n)):e[t]=n},toAbsoluteIndex=toAbsoluteIndex$2,lengthOfArrayLike$3=lengthOfArrayLike$5,createProperty=createProperty$1,$Array=Array,max=Math.max,arraySliceSimple=function(e,t,n){for(var r=lengthOfArrayLike$3(e),o=toAbsoluteIndex(t,r),i=toAbsoluteIndex(void 0===n?r:n,r),a=$Array(max(i-o,0)),s=0;o<i;o++,s++)createProperty(a,s,e[o]);return a.length=s,a},arraySlice$2=arraySliceSimple,floor=Math.floor,mergeSort=function(e,t){var n=e.length,r=floor(n/2);return n<8?insertionSort(e,t):merge(e,mergeSort(arraySlice$2(e,0,r),t),mergeSort(arraySlice$2(e,r),t),t)},insertionSort=function(e,t){for(var n,r,o=e.length,i=1;i<o;){for(n=e[r=i];r&&0<t(e[r-1],n);)e[r]=e[--r];r!==i++&&(e[r]=n)}return e},merge=function(e,t,n,r){for(var o=t.length,i=n.length,a=0,s=0;a<o||s<i;)e[a+s]=a<o&&s<i?r(t[a],n[s])<=0?t[a++]:n[s++]:a<o?t[a++]:n[s++];return e},arraySort=mergeSort,fails$3=fails$g,arrayMethodIsStrict$2=function(e,t){var n=[][e];return!!n&&fails$3(function(){n.call(null,t||function(){return 1},1)})},userAgent$4=engineUserAgent,firefox=engineUserAgent.match(/firefox\/(\d+)/i),engineFfVersion=!!firefox&&+firefox[1],UA=engineUserAgent,engineIsIeOrEdge=/MSIE|Trident/.test(UA),userAgent$3=engineUserAgent,webkit=engineUserAgent.match(/AppleWebKit\/(\d+)\./),engineWebkitVersion=!!webkit&&+webkit[1],$$7=_export,uncurryThis$3=functionUncurryThis,aCallable$7=aCallable$9,toObject$1=toObject$5,lengthOfArrayLike$2=lengthOfArrayLike$5,deletePropertyOrThrow=deletePropertyOrThrow$1,toString=toString$2,fails$2=fails$g,internalSort=arraySort,arrayMethodIsStrict$1=arrayMethodIsStrict$2,FF=engineFfVersion,IE_OR_EDGE=engineIsIeOrEdge,V8=engineV8Version,WEBKIT=engineWebkitVersion,test=[],un$Sort=uncurryThis$3(test.sort),push=uncurryThis$3(test.push),FAILS_ON_UNDEFINED=fails$2(function(){test.sort(void 0)}),FAILS_ON_NULL=fails$2(function(){test.sort(null)}),STRICT_METHOD$1=arrayMethodIsStrict$1("sort"),STABLE_SORT=!fails$2(function(){if(V8)return V8<70;if(!(FF&&3<FF)){if(IE_OR_EDGE)return!0;if(WEBKIT)return WEBKIT<603;for(var e,t,n,r="",o=65;o<76;o++){switch(e=String.fromCharCode(o),o){case 66:case 69:case 70:case 72:t=3;break;case 68:case 71:t=4;break;default:t=2}for(n=0;n<47;n++)test.push({k:e+n,v:t})}for(test.sort(function(e,t){return t.v-e.v}),n=0;n<test.length;n++)e=test[n].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}),FORCED=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD$1||!STABLE_SORT,getSortCompare=function(n){return function(e,t){return void 0===t?-1:void 0===e?1:void 0!==n?+n(e,t)||0:toString(e)>toString(t)?1:-1}},classof$2=($$7({target:"Array",proto:!0,forced:FORCED},{sort:function(e){void 0!==e&&aCallable$7(e);var t=toObject$1(this);if(STABLE_SORT)return void 0===e?un$Sort(t):un$Sort(t,e);for(var n,r=[],o=lengthOfArrayLike$2(t),i=0;i<o;i++)i in t&&push(r,t[i]);for(internalSort(r,getSortCompare(e)),n=r.length,i=0;i<n;)t[i]=r[i++];for(;i<o;)deletePropertyOrThrow(t,i++);return t}}),classofRaw$1),global$8=global$k,engineIsNode="process"==classofRaw$1(global$k.process),getBuiltIn$3=getBuiltIn$8,definePropertyModule=objectDefineProperty,wellKnownSymbol$5=wellKnownSymbol$e,DESCRIPTORS=descriptors,SPECIES$2=wellKnownSymbol$e("species"),setSpecies$1=function(e){var e=getBuiltIn$3(e),t=definePropertyModule.f;DESCRIPTORS&&e&&!e[SPECIES$2]&&t(e,SPECIES$2,{configurable:!0,get:function(){return this}})},isPrototypeOf$1=objectIsPrototypeOf,$TypeError$5=TypeError,anInstance$1=function(e,t){if(isPrototypeOf$1(t,e))return e;throw $TypeError$5("Incorrect invocation")},uncurryThis$2=functionUncurryThis,fails$1=fails$g,isCallable$4=isCallable$l,classof$1=classof$4,getBuiltIn$2=getBuiltIn$8,inspectSource$1=inspectSource$4,noop=function(){},empty=[],construct=getBuiltIn$8("Reflect","construct"),constructorRegExp=/^\s*(?:class|function)\b/,exec=uncurryThis$2(constructorRegExp.exec),INCORRECT_TO_STRING=!constructorRegExp.exec(noop),isConstructorModern=function(e){if(!isCallable$4(e))return!1;try{return construct(noop,empty,e),!0}catch(e){return!1}},isConstructorLegacy=function(e){if(!isCallable$4(e))return!1;switch(classof$1(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return INCORRECT_TO_STRING||!!exec(constructorRegExp,inspectSource$1(e))}catch(e){return!0}},isConstructor$1=(isConstructorLegacy.sham=!0,!construct||fails$1(function(){var e;return isConstructorModern(isConstructorModern.call)||!isConstructorModern(Object)||!isConstructorModern(function(){e=!0})||e})?isConstructorLegacy:isConstructorModern),isConstructor=isConstructor$1,tryToString$2=tryToString$5,$TypeError$4=TypeError,aConstructor$1=function(e){if(isConstructor(e))return e;throw $TypeError$4(tryToString$2(e)+" is not a constructor")},anObject$4=anObject$c,aConstructor=aConstructor$1,wellKnownSymbol$4=wellKnownSymbol$e,SPECIES$1=wellKnownSymbol$e("species"),speciesConstructor$1=function(e,t){var e=anObject$4(e).constructor;return void 0===e||null==(e=anObject$4(e)[SPECIES$1])?t:aConstructor(e)},NATIVE_BIND$1=functionBindNative,FunctionPrototype=Function.prototype,apply$1=FunctionPrototype.apply,call$7=FunctionPrototype.call,functionApply="object"==typeof Reflect&&Reflect.apply||(NATIVE_BIND$1?call$7.bind(apply$1):function(){return call$7.apply(apply$1,arguments)}),uncurryThis$1=functionUncurryThis,aCallable$6=aCallable$9,NATIVE_BIND=functionBindNative,bind$4=functionUncurryThis(functionUncurryThis.bind),functionBindContext=function(e,t){return aCallable$6(e),void 0===t?e:NATIVE_BIND?bind$4(e,t):function(){return e.apply(t,arguments)}},uncurryThis=functionUncurryThis,arraySlice$1=functionUncurryThis([].slice),$TypeError$3=TypeError,validateArgumentsLength$1=function(e,t){if(e<t)throw $TypeError$3("Not enough arguments");return e},userAgent$2=engineUserAgent,engineIsIos=/(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2),global$7=global$k,apply=functionApply,bind$3=functionBindContext,isCallable$3=isCallable$l,hasOwn=hasOwnProperty_1,fails=fails$g,html=html$2,arraySlice=arraySlice$1,createElement=documentCreateElement$2,validateArgumentsLength=validateArgumentsLength$1,IS_IOS$1=engineIsIos,IS_NODE$4=engineIsNode,set=global$7.setImmediate,clear=global$7.clearImmediate,process$3=global$7.process,Dispatch=global$7.Dispatch,Function$1=global$7.Function,MessageChannel=global$7.MessageChannel,String$1=global$7.String,counter=0,queue$1={},ONREADYSTATECHANGE="onreadystatechange";try{location=global$7.location}catch(e){}var flush,head,last,notify$1,toggle,node,promise,then,Internal,OwnPromiseCapability,PromiseWrapper,nativeThen,run=function(e){var t;hasOwn(queue$1,e)&&(t=queue$1[e],delete queue$1[e],t())},runner=function(e){return function(){run(e)}},listener=function(e){run(e.data)},post=function(e){global$7.postMessage(String$1(e),location.protocol+"//"+location.host)},task$1=(set&&clear||(set=function(e){validateArgumentsLength(arguments.length,1);var t=isCallable$3(e)?e:Function$1(e),n=arraySlice(arguments,1);return queue$1[++counter]=function(){apply(t,void 0,n)},defer(counter),counter},clear=function(e){delete queue$1[e]},IS_NODE$4?defer=function(e){process$3.nextTick(runner(e))}:Dispatch&&Dispatch.now?defer=function(e){Dispatch.now(runner(e))}:MessageChannel&&!IS_IOS$1?(port=(channel=new MessageChannel).port2,channel.port1.onmessage=listener,defer=bind$3(port.postMessage,port)):global$7.addEventListener&&isCallable$3(global$7.postMessage)&&!global$7.importScripts&&location&&"file:"!==location.protocol&&!fails(post)?(defer=post,global$7.addEventListener("message",listener,!1)):defer=ONREADYSTATECHANGE in createElement("script")?function(e){html.appendChild(createElement("script"))[ONREADYSTATECHANGE]=function(){html.removeChild(this),run(e)}}:function(e){setTimeout(runner(e),0)}),{set:set,clear:clear}),userAgent$1=engineUserAgent,global$6=global$k,engineIsIosPebble=/ipad|iphone|ipod/i.test(userAgent$1)&&void 0!==global$6.Pebble,userAgent=engineUserAgent,engineIsWebosWebkit=/web0s(?!.*chrome)/i.test(userAgent),global$5=global$k,bind$2=functionBindContext,getOwnPropertyDescriptor=objectGetOwnPropertyDescriptor.f,macrotask=task$1.set,IS_IOS=engineIsIos,IS_IOS_PEBBLE=engineIsIosPebble,IS_WEBOS_WEBKIT=engineIsWebosWebkit,IS_NODE$3=engineIsNode,MutationObserver=global$5.MutationObserver||global$5.WebKitMutationObserver,document$2=global$5.document,process$2=global$5.process,Promise$1=global$5.Promise,queueMicrotaskDescriptor=getOwnPropertyDescriptor(global$5,"queueMicrotask"),queueMicrotask=queueMicrotaskDescriptor&&queueMicrotaskDescriptor.value,microtask$1=(queueMicrotask||(flush=function(){var e,t;for(IS_NODE$3&&(e=process$2.domain)&&e.exit();head;){t=head.fn,head=head.next;try{t()}catch(e){throw head?notify$1():last=void 0,e}}last=void 0,e&&e.enter()},notify$1=IS_IOS||IS_NODE$3||IS_WEBOS_WEBKIT||!MutationObserver||!document$2?!IS_IOS_PEBBLE&&Promise$1&&Promise$1.resolve?((promise=Promise$1.resolve(void 0)).constructor=Promise$1,then=bind$2(promise.then,promise),function(){then(flush)}):IS_NODE$3?function(){process$2.nextTick(flush)}:(macrotask=bind$2(macrotask,global$5),function(){macrotask(flush)}):(toggle=!0,node=document$2.createTextNode(""),new MutationObserver(flush).observe(node,{characterData:!0}),function(){node.data=toggle=!toggle})),queueMicrotask||function(e){e={fn:e,next:void 0};last&&(last.next=e),head||(head=e,notify$1()),last=e}),global$4=global$k,hostReportErrors$1=function(e,t){var n=global$4.console;n&&n.error&&(1==arguments.length?n.error(e):n.error(e,t))},perform$3=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Queue$1=function(){this.head=null,this.tail=null},queue=(Queue$1.prototype={add:function(e){e={item:e,next:null};this.head?this.tail.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return this.head=e.next,this.tail===e&&(this.tail=null),e.item}},Queue$1),global$3=global$k,promiseNativeConstructor=global$k.Promise,engineIsDeno="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,IS_DENO$1=engineIsDeno,IS_NODE$2=engineIsNode,engineIsBrowser=!engineIsDeno&&!engineIsNode&&"object"==typeof window&&"object"==typeof document,global$2=global$k,NativePromiseConstructor$3=promiseNativeConstructor,isCallable$2=isCallable$l,isForced=isForced_1,inspectSource=inspectSource$4,wellKnownSymbol$3=wellKnownSymbol$e,IS_BROWSER=engineIsBrowser,IS_DENO=engineIsDeno,V8_VERSION=engineV8Version,SPECIES=(NativePromiseConstructor$3&&NativePromiseConstructor$3.prototype,wellKnownSymbol$3("species")),SUBCLASSING=!1,NATIVE_PROMISE_REJECTION_EVENT$1=isCallable$2(global$2.PromiseRejectionEvent),FORCED_PROMISE_CONSTRUCTOR$5=isForced("Promise",function(){var e=inspectSource(NativePromiseConstructor$3),t=e!==String(NativePromiseConstructor$3);if(!t&&66===V8_VERSION)return!0;if(!V8_VERSION||V8_VERSION<51||!/native code/.test(e)){function n(e){e(function(){},function(){})}e=new NativePromiseConstructor$3(function(e){e(1)});if((e.constructor={})[SPECIES]=n,!(SUBCLASSING=e.then(function(){})instanceof n))return!0}return!t&&(IS_BROWSER||IS_DENO)&&!NATIVE_PROMISE_REJECTION_EVENT$1}),promiseConstructorDetection={CONSTRUCTOR:FORCED_PROMISE_CONSTRUCTOR$5,REJECTION_EVENT:NATIVE_PROMISE_REJECTION_EVENT$1,SUBCLASSING:SUBCLASSING},newPromiseCapability$2={},aCallable$5=aCallable$9,PromiseCapability=function(e){var n,r;this.promise=new e(function(e,t){if(void 0!==n||void 0!==r)throw TypeError("Bad Promise constructor");n=e,r=t}),this.resolve=aCallable$5(n),this.reject=aCallable$5(r)},$$6=(newPromiseCapability$2.f=function(e){return new PromiseCapability(e)},_export),IS_NODE$1=engineIsNode,global$1=global$k,call$6=functionCall,defineBuiltIn$1=defineBuiltIn$6,setPrototypeOf=objectSetPrototypeOf,setToStringTag=setToStringTag$3,setSpecies=setSpecies$1,aCallable$4=aCallable$9,isCallable$1=isCallable$l,isObject$1=isObject$7,anInstance=anInstance$1,speciesConstructor=speciesConstructor$1,task=task$1.set,microtask=microtask$1,hostReportErrors=hostReportErrors$1,perform$2=perform$3,Queue=queue,InternalStateModule=internalState,NativePromiseConstructor$2=promiseNativeConstructor,PromiseConstructorDetection=promiseConstructorDetection,newPromiseCapabilityModule$3=newPromiseCapability$2,PROMISE="Promise",FORCED_PROMISE_CONSTRUCTOR$4=PromiseConstructorDetection.CONSTRUCTOR,NATIVE_PROMISE_REJECTION_EVENT=PromiseConstructorDetection.REJECTION_EVENT,NATIVE_PROMISE_SUBCLASSING=PromiseConstructorDetection.SUBCLASSING,getInternalPromiseState=InternalStateModule.getterFor(PROMISE),setInternalState=InternalStateModule.set,NativePromisePrototype$1=NativePromiseConstructor$2&&NativePromiseConstructor$2.prototype,PromiseConstructor=NativePromiseConstructor$2,PromisePrototype=NativePromisePrototype$1,TypeError$1=global$1.TypeError,document$1=global$1.document,process$1=global$1.process,newPromiseCapability$1=newPromiseCapabilityModule$3.f,newGenericPromiseCapability=newPromiseCapability$1,DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$1.dispatchEvent),UNHANDLED_REJECTION="unhandledrejection",REJECTION_HANDLED="rejectionhandled",PENDING=0,FULFILLED=1,REJECTED=2,HANDLED=1,UNHANDLED=2,isThenable=function(e){var t;return!(!isObject$1(e)||!isCallable$1(t=e.then))&&t},callReaction=function(e,t){var n,r,o,i=t.value,a=t.state==FULFILLED,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,p=e.domain;try{s?(a||(t.rejection===UNHANDLED&&onHandleUnhandled(t),t.rejection=HANDLED),!0===s?n=i:(p&&p.enter(),n=s(i),p&&(p.exit(),o=!0)),n===e.promise?c(TypeError$1("Promise-chain cycle")):(r=isThenable(n))?call$6(r,n,l,c):l(n)):c(i)}catch(e){p&&!o&&p.exit(),c(e)}},notify=function(n,r){n.notified||(n.notified=!0,microtask(function(){for(var e,t=n.reactions;e=t.get();)callReaction(e,n);n.notified=!1,r&&!n.rejection&&onUnhandled(n)}))},dispatchEvent=function(e,t,n){var r;DISPATCH_EVENT?((r=document$1.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),global$1.dispatchEvent(r)):r={promise:t,reason:n},!NATIVE_PROMISE_REJECTION_EVENT&&(t=global$1["on"+e])?t(r):e===UNHANDLED_REJECTION&&hostReportErrors("Unhandled promise rejection",n)},onUnhandled=function(r){call$6(task,global$1,function(){var e=r.facade,t=r.value,n=isUnhandled(r);if(n&&(n=perform$2(function(){IS_NODE$1?process$1.emit("unhandledRejection",t,e):dispatchEvent(UNHANDLED_REJECTION,e,t)}),r.rejection=IS_NODE$1||isUnhandled(r)?UNHANDLED:HANDLED,n.error))throw n.value})},isUnhandled=function(e){return e.rejection!==HANDLED&&!e.parent},onHandleUnhandled=function(t){call$6(task,global$1,function(){var e=t.facade;IS_NODE$1?process$1.emit("rejectionHandled",e):dispatchEvent(REJECTION_HANDLED,e,t.value)})},bind$1=function(t,n,r){return function(e){t(n,e,r)}},internalReject=function(e,t,n){e.done||(e.done=!0,(e=n?n:e).value=t,e.state=REJECTED,notify(e,!0))},internalResolve=function(n,e,t){if(!n.done){n.done=!0,t&&(n=t);try{if(n.facade===e)throw TypeError$1("Promise can't be resolved itself");var r=isThenable(e);r?microtask(function(){var t={done:!1};try{call$6(r,e,bind$1(internalResolve,t,n),bind$1(internalReject,t,n))}catch(e){internalReject(t,e,n)}}):(n.value=e,n.state=FULFILLED,notify(n,!1))}catch(e){internalReject({done:!1},e,n)}}};if(FORCED_PROMISE_CONSTRUCTOR$4&&(PromisePrototype=(PromiseConstructor=function(e){anInstance(this,PromisePrototype),aCallable$4(e),call$6(Internal,this);var t=getInternalPromiseState(this);try{e(bind$1(internalResolve,t),bind$1(internalReject,t))}catch(e){internalReject(t,e)}}).prototype,(Internal=function(e){setInternalState(this,{type:PROMISE,done:!1,notified:!1,parent:!1,reactions:new Queue,rejection:!1,state:PENDING,value:void 0})}).prototype=defineBuiltIn$1(PromisePrototype,"then",function(e,t){var n=getInternalPromiseState(this),r=newPromiseCapability$1(speciesConstructor(this,PromiseConstructor));return n.parent=!0,r.ok=!isCallable$1(e)||e,r.fail=isCallable$1(t)&&t,r.domain=IS_NODE$1?process$1.domain:void 0,n.state==PENDING?n.reactions.add(r):microtask(function(){callReaction(r,n)}),r.promise}),OwnPromiseCapability=function(){var e=new Internal,t=getInternalPromiseState(e);this.promise=e,this.resolve=bind$1(internalResolve,t),this.reject=bind$1(internalReject,t)},newPromiseCapabilityModule$3.f=newPromiseCapability$1=function(e){return e===PromiseConstructor||e===PromiseWrapper?new OwnPromiseCapability(e):newGenericPromiseCapability(e)},isCallable$1(NativePromiseConstructor$2)&&NativePromisePrototype$1!==Object.prototype)){nativeThen=NativePromisePrototype$1.then,NATIVE_PROMISE_SUBCLASSING||defineBuiltIn$1(NativePromisePrototype$1,"then",function(e,t){var n=this;return new PromiseConstructor(function(e,t){call$6(nativeThen,n,e,t)}).then(e,t)},{unsafe:!0});try{delete NativePromisePrototype$1.constructor}catch(e){}setPrototypeOf&&setPrototypeOf(NativePromisePrototype$1,PromisePrototype)}$$6({global:!0,constructor:!0,wrap:!0,forced:FORCED_PROMISE_CONSTRUCTOR$4},{Promise:PromiseConstructor}),setToStringTag(PromiseConstructor,PROMISE,!1),setSpecies(PROMISE);var wellKnownSymbol$2=wellKnownSymbol$e,Iterators$1=iterators,ITERATOR$2=wellKnownSymbol$e("iterator"),ArrayPrototype=Array.prototype,isArrayIteratorMethod$1=function(e){return void 0!==e&&(Iterators$1.Array===e||ArrayPrototype[ITERATOR$2]===e)},classof=classof$4,getMethod$1=getMethod$3,Iterators=iterators,wellKnownSymbol$1=wellKnownSymbol$e,ITERATOR$1=wellKnownSymbol$e("iterator"),getIteratorMethod$2=function(e){if(null!=e)return getMethod$1(e,ITERATOR$1)||getMethod$1(e,"@@iterator")||Iterators[classof(e)]},call$5=functionCall,aCallable$3=aCallable$9,anObject$3=anObject$c,tryToString$1=tryToString$5,getIteratorMethod$1=getIteratorMethod$2,$TypeError$2=TypeError,getIterator$1=function(e,t){var n=arguments.length<2?getIteratorMethod$1(e):t;if(aCallable$3(n))return anObject$3(call$5(n,e));throw $TypeError$2(tryToString$1(e)+" is not iterable")},call$4=functionCall,anObject$2=anObject$c,getMethod=getMethod$3,iteratorClose$1=function(e,t,n){var r,o;anObject$2(e);try{if(!(r=getMethod(e,"return"))){if("throw"===t)throw n;return n}r=call$4(r,e)}catch(e){o=!0,r=e}if("throw"===t)throw n;if(o)throw r;return anObject$2(r),n},bind=functionBindContext,call$3=functionCall,anObject$1=anObject$c,tryToString=tryToString$5,isArrayIteratorMethod=isArrayIteratorMethod$1,lengthOfArrayLike$1=lengthOfArrayLike$5,isPrototypeOf=objectIsPrototypeOf,getIterator=getIterator$1,getIteratorMethod=getIteratorMethod$2,iteratorClose=iteratorClose$1,$TypeError$1=TypeError,Result=function(e,t){this.stopped=e,this.result=t},ResultPrototype=Result.prototype,iterate$2=function(e,t,n){function r(e){return i&&iteratorClose(i,"normal",e),new Result(!0,e)}function o(e){return d?(anObject$1(e),f?y(e[0],e[1],r):y(e[0],e[1])):f?y(e,r):y(e)}var i,a,s,l,c,p,u=n&&n.that,d=!(!n||!n.AS_ENTRIES),$=!(!n||!n.IS_RECORD),g=!(!n||!n.IS_ITERATOR),f=!(!n||!n.INTERRUPTED),y=bind(t,u);if($)i=e.iterator;else if(g)i=e;else{if(!(n=getIteratorMethod(e)))throw $TypeError$1(tryToString(e)+" is not iterable");if(isArrayIteratorMethod(n)){for(a=0,s=lengthOfArrayLike$1(e);a<s;a++)if((l=o(e[a]))&&isPrototypeOf(ResultPrototype,l))return l;return new Result(!1)}i=getIterator(e,n)}for(c=($?e:i).next;!(p=call$3(c,i)).done;){try{l=o(p.value)}catch(e){iteratorClose(i,"throw",e)}if("object"==typeof l&&l&&isPrototypeOf(ResultPrototype,l))return l}return new Result(!1)},wellKnownSymbol=wellKnownSymbol$e,ITERATOR=wellKnownSymbol$e("iterator"),SAFE_CLOSING=!1;try{var called=0,iteratorWithReturn={next:function(){return{done:!!called++}},return:function(){SAFE_CLOSING=!0}};iteratorWithReturn[ITERATOR]=function(){return this},Array.from(iteratorWithReturn,function(){throw 2})}catch(e){}var method,checkCorrectnessOfIteration$1=function(e,t){if(!t&&!SAFE_CLOSING)return!1;var n=!1;try{var r={};r[ITERATOR]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n},NativePromiseConstructor$1=promiseNativeConstructor,checkCorrectnessOfIteration=checkCorrectnessOfIteration$1,FORCED_PROMISE_CONSTRUCTOR$3=promiseConstructorDetection.CONSTRUCTOR,promiseStaticsIncorrectIteration=FORCED_PROMISE_CONSTRUCTOR$3||!checkCorrectnessOfIteration(function(e){NativePromiseConstructor$1.all(e).then(void 0,function(){})}),$$5=_export,call$2=functionCall,aCallable$2=aCallable$9,newPromiseCapabilityModule$2=newPromiseCapability$2,perform$1=perform$3,iterate$1=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION$1=promiseStaticsIncorrectIteration,$$4=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{all:function(e){var s=this,t=newPromiseCapabilityModule$2.f(s),l=t.resolve,c=t.reject,n=perform$1(function(){var r=aCallable$2(s.resolve),o=[],i=0,a=1;iterate$1(e,function(e){var t=i++,n=!1;a++,call$2(r,s,e).then(function(e){n||(n=!0,o[t]=e,--a||l(o))},c)}),--a||l(o)});return n.error&&c(n.value),t.promise}}),_export),FORCED_PROMISE_CONSTRUCTOR$2=promiseConstructorDetection.CONSTRUCTOR,NativePromiseConstructor=promiseNativeConstructor,getBuiltIn$1=getBuiltIn$8,isCallable=isCallable$l,defineBuiltIn=defineBuiltIn$6,NativePromisePrototype=NativePromiseConstructor&&NativePromiseConstructor.prototype,$$3=($$4({target:"Promise",proto:!0,forced:FORCED_PROMISE_CONSTRUCTOR$2,real:!0},{catch:function(e){return this.then(void 0,e)}}),isCallable(NativePromiseConstructor)&&(method=getBuiltIn$1("Promise").prototype.catch,NativePromisePrototype.catch!==method&&defineBuiltIn(NativePromisePrototype,"catch",method,{unsafe:!0})),_export),call$1=functionCall,aCallable$1=aCallable$9,newPromiseCapabilityModule$1=newPromiseCapability$2,perform=perform$3,iterate=iterate$2,PROMISE_STATICS_INCORRECT_ITERATION=promiseStaticsIncorrectIteration,$$2=(_export({target:"Promise",stat:!0,forced:promiseStaticsIncorrectIteration},{race:function(e){var n=this,r=newPromiseCapabilityModule$1.f(n),o=r.reject,t=perform(function(){var t=aCallable$1(n.resolve);iterate(e,function(e){call$1(t,n,e).then(r.resolve,o)})});return t.error&&o(t.value),r.promise}}),_export),call=functionCall,newPromiseCapabilityModule=newPromiseCapability$2,FORCED_PROMISE_CONSTRUCTOR$1=promiseConstructorDetection.CONSTRUCTOR,anObject=($$2({target:"Promise",stat:!0,forced:FORCED_PROMISE_CONSTRUCTOR$1},{reject:function(e){var t=newPromiseCapabilityModule.f(this);return call(t.reject,void 0,e),t.promise}}),anObject$c),isObject=isObject$7,newPromiseCapability=newPromiseCapability$2,promiseResolve$1=function(e,t){if(anObject(e),isObject(t)&&t.constructor===e)return t;e=newPromiseCapability.f(e);return(0,e.resolve)(t),e.promise},$$1=_export,getBuiltIn=getBuiltIn$8,FORCED_PROMISE_CONSTRUCTOR=promiseConstructorDetection.CONSTRUCTOR,promiseResolve=promiseResolve$1;function fetchOrgsApplications(n,r){return __awaiter(this,void 0,void 0,function*(){var e="fetchOrgsApplications",t="applications";return(yield baseGraphQLApiWithError(Object.assign({query:`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
entityTags {
|
|
35
|
-
tagKey
|
|
36
|
-
tagValue
|
|
37
|
-
}
|
|
38
|
-
ownerOrganizationId
|
|
39
|
-
}`;function getApplicationById(o,i){return __awaiter(this,void 0,void 0,function*(){var e="getApplicationById",t="applications",n={id:i},r=`
|
|
40
|
-
query ${e} ($id: ID!){
|
|
41
|
-
${t} (owned: false, id: $id) {
|
|
42
|
-
${appDetailsResponseFields}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
`;try{return(yield baseGraphQLApiWithError(Object.assign({query:r,operationName:e,variables:n},o)))[t]}catch(e){throw console.log(e),new Error("Something went wrong while loading app details")}})}function getOrganizationName(n,r){return __awaiter(this,void 0,void 0,function*(){var e="getOrganizationName",t={id:r};try{return yield baseGraphQLApiWithError(Object.assign({query:"\n query getOrganizationName ($id: ID!){\n organization (id: $id) {\n id\n name\n }\n }\n ",operationName:e,variables:t},n))}catch(e){console.log(e)}})}function installApp(n,r){return __awaiter(this,void 0,void 0,function*(){var e="installApp",t=`
|
|
46
|
-
query ${e} ($orgId: ID! $appId: ID! $configs: [ApplicationConfigInput!]) {
|
|
47
|
-
applicationAddToOrg (orgId: $orgId appId: $appId configs: $configs) {
|
|
48
|
-
${appDetailsResponseFields}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
`;try{return yield baseGraphQLApiWithError(Object.assign({query:t,operationName:e,variables:r},n))}catch(e){console.log(e)}})}function*fetchOwnerOrganization(e,t){let n={};try{var r=(yield call$g(getOrganizationName,e,t))["organization"];n=r}catch(e){n={id:t,name:" "},console.log(e)}return n}function*fetchApplicationDetailsSaga(e){try{var t=yield select(selectApiConfigs),[n]=(yield call$g(getApplicationById,t,e.payload.applicationId)).records,r=yield call$g(fetchOwnerOrganization,t,n.ownerOrganizationId);yield put(actions$1.fetchApplicationSuccess({application:n,organization:r}))}catch(e){yield put(actions$1.fetchApplicationError()),console.log(e)}}function*installAppSaga(e){try{var t=yield select(selectApiConfigs),[n]=(yield call$g(installApp,t,e.payload)).records;yield put(actions$1.installAppSuccess(n))}catch(e){yield put(actions$1.installAppFailure()),console.log(e)}}function*getApplicationDetailsWatcher(){yield takeEvery$1(actions$1.fetchApplicationStart.type,fetchApplicationDetailsSaga)}function*installAppWatcher(){yield takeEvery$1(actions$1.installAppStart.type,installAppSaga)}function*applicationDetailsPanelRootSaga(){yield all([getApplicationDetailsWatcher(),installAppWatcher()])}function getAdminCenterApplicationsModule(){return{id:SLICE_NAME$1,reducerMap:{[SLICE_NAME$1]:rootReducer},sagas:[rootSaga],initialActions:[]}}function getApplicationDetailsPanelModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:applicationDetailsPanelReducer},sagas:[applicationDetailsPanelRootSaga],initialActions:[]}}const tabsList$1=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.lpZXMd",defaultMessage:"All Applications",description:"Admin center all applications label"}),disabled:!1,id:"All Applications"},{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.lpZXMy",defaultMessage:"Installed Applications",description:"Admin center installed applications label"}),disabled:!1,id:"Installed Applications"}],ApplicationsTable=()=>{const[e,t]=react.exports.useState(0),n=useSelector(selectIsUserAdmin),r=useSelector(selectInstalledApps);var o=useSelector(selectAllApps),i=useSelector(selectInstalledAppsUiStatus),a=useSelector(selectAllAppsUiStatus);const s=useDispatch();react.exports.useEffect(()=>{s(actions.adminCenterApplications.fetchInstalledApplicationsStart()),n&&s(actions.adminCenterApplications.fetchAllApplicationsStart())},[s]);return jsxRuntime.exports.jsxs(React.Fragment,{children:[jsxRuntime.exports.jsx(Box,Object.assign({sx:{borderBottom:"1px solid #e8e8e8"}},{children:jsxRuntime.exports.jsx(Box,Object.assign({sx:{"& .Sdk-MuiTab-root.Mui-selected":{color:"text.primary",fontWeight:600},width:n?"350px":"170px"}},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:e,onChangeTab:e=>{t(e)},tabsList:n?tabsList$1:[tabsList$1[1]]})}))})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:e,index:0},{children:n?jsxRuntime.exports.jsx(ApplicationList,{apps:o,uiStatus:a,onRetry:()=>s(actions.adminCenterApplications.fetchAllApplicationsStart()),showInstalledChip:!0,isAppInstalled:t=>-1!==r.findIndex(e=>e.id===t)}):jsxRuntime.exports.jsx(ApplicationList,{apps:r,uiStatus:i,onRetry:()=>s(actions.adminCenterApplications.fetchInstalledApplicationsStart())})})),jsxRuntime.exports.jsx(TabPanel,Object.assign({value:e,index:1},{children:jsxRuntime.exports.jsx(ApplicationList,{apps:r,uiStatus:i,onRetry:()=>s(actions.adminCenterApplications.fetchInstalledApplicationsStart())})}))]})},useStyles$2=makeStyles()(e=>({root:{display:"flex",flexDirection:"column",height:"100%"},header:{display:"flex",justifyContent:"space-between",padding:e.spacing(4),borderBottom:"0.5px solid "+e.palette.divider},tableWrapper:{overflow:"hidden"},toolbar:{alignItems:"baseline","& button svg":{marginRight:"5px"},display:"flex",justifyContent:"center"}}));function ApplicationsTab({}){var e=useStyles$2()["classes"];return jsxRuntime.exports.jsxs("section",Object.assign({className:e.root},{children:[jsxRuntime.exports.jsx("header",Object.assign({className:e.header},{children:jsxRuntime.exports.jsxs(Box,Object.assign({sx:{mr:15}},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5","data-testid":"org-applications.header"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.applications.table.header",defaultMessage:"Applications",description:"Application Header"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({sx:{mt:1},variant:"subtitle1","data-testid":"org-applications.description"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-panel.applications.table.description",defaultMessage:"Browse and manage the applications that are enabled for this Organization and its users.",description:"Applications Tab Description"})}))]}))})),jsxRuntime.exports.jsx("div",Object.assign({className:e.tableWrapper},{children:jsxRuntime.exports.jsx(ApplicationsTable,{})}))]}))}var aCallable=aCallable$9,toObject=toObject$5,IndexedObject=indexedObject,lengthOfArrayLike=lengthOfArrayLike$5,$TypeError=TypeError,createMethod=function(c){return function(e,t,n,r){aCallable(t);var o=toObject(e),i=IndexedObject(o),a=lengthOfArrayLike(o),s=c?a-1:0,l=c?-1:1;if(n<2)for(;;){if(s in i){r=i[s],s+=l;break}if(s+=l,c?s<0:a<=s)throw $TypeError("Reduce of empty array with no initial value")}for(;c?0<=s:s<a;s+=l)s in i&&(r=t(r,i[s],s,o));return r}},arrayReduce={left:createMethod(!1),right:createMethod(!0)},$=_export,$reduce=arrayReduce.left,arrayMethodIsStrict=arrayMethodIsStrict$2,CHROME_VERSION=engineV8Version,IS_NODE=engineIsNode,STRICT_METHOD=arrayMethodIsStrict$2("reduce"),CHROME_BUG=!IS_NODE&&79<CHROME_VERSION&&CHROME_VERSION<83;$({target:"Array",proto:!0,forced:!STRICT_METHOD||CHROME_BUG},{reduce:function(e){var t=arguments.length;return $reduce(this,e,t,1<t?arguments[1]:void 0)}});const useStyles$1=makeStyles()((e,{isEmpty:t})=>({panelRoot:{width:"100%"},panelLoading:{height:300},panelContainer:{display:"flex",flexDirection:"column",width:"100%",padding:e.spacing(2)},panelHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",paddingLeft:e.spacing(1),marginBottom:e.spacing(1),"&.with-secondary-title":{alignItems:"flex-start"}},panelHeaderLine:{minHeight:"16px"},panelContent:{width:"100%"},panelBody:{display:"flex",flexGrow:1},divider:{marginBottom:e.spacing(2)},engineHeader:{minHeight:"120px"},headerInfo:{paddingLeft:e.spacing(4),flexGrow:1},headerOwner:{color:"#0c53b0",minHeight:"16px"},detailInfo:{paddingTop:e.spacing(3)},detailInfoBody:{paddingLeft:e.spacing(4),paddingTop:e.spacing(3)},detailOverview:{paddingTop:e.spacing(6),paddingBottom:e.spacing(6),minHeight:"120px"},sectionTitle:{paddingBottom:e.spacing(3)},textContent:{fontStyle:"normal",fontWeight:400,fontSize:14,lineHeight:20},titleInline:{fontWeight:600,marginRight:e.spacing(1)},contentRow:{paddingBottom:e.spacing(3)},engineDescription:{paddingTop:e.spacing(2),paddingBottom:e.spacing(2)},engineVersion:{paddingLeft:e.spacing(3)},mainLayout:{paddingTop:e.spacing(2)},tabPanels:{width:"100%"},detailHeaderContainer:{paddingLeft:e.spacing(3),paddingTop:e.spacing(2),alignItems:"center"},taskTabPanels:{marginTop:e.spacing(2),paddingLeft:e.spacing(2),paddingRight:e.spacing(2),width:"100%",maxHeight:"160px",maxWidth:"660px",overflow:"auto",background:"#F4F4F4",border:"1px solid #D5DFE9","box-sizing":"border-box","border-radius":"4px"},metricsList:{paddingTop:e.spacing(6)},taskFitlerContainer:{marginTop:e.spacing(4),marginBottom:e.spacing(2),height:"40px",lineHeight:"40px",display:"flex","flex-wrap":"wrap","flex-direction":"row","justify-content":"flex-end"},taskFitlerItem:{marginRight:e.spacing(2)},tabsContainer:{"& .Sdk-Mui-selected":{color:"black"},"& .Sdk-MuiTabs-indicator":{backgroundColor:"#000"}},tabsParent:{padding:e.spacing(0,3,0,3),"& div":{borderBottom:"none"},"& div button":{fontFamily:"Nunito",fontWeight:400,flex:"0 1 auto !important",minWidth:"unset"}},configName:{marginBottom:"4px"},configDescription:{marginBottom:"9px"},configContainer:{paddingLeft:"21px",marginBottom:"21px"},configDivider:{marginTop:"21px"},configInput:{"& input":{borderColor:"#E1E6ED",paddingTop:"18px",paddingBottom:"18px",minWidth:"320px"}},requiredLabel:{color:"#9CA8B4",marginLeft:"6px"},helperText:{paddingLeft:"15px",fontSize:"12px",fontWeight:"bold"},noConfigs:{textAlign:"center",marginTop:"30px","& svg":{width:"160px",height:"160px",marginBottom:"20px"}},uninstallBtn:{marginTop:t?"40px":"0",padding:"8px 15px"},actionButtons:{"& button":{padding:"8px 15px",lineHeight:"20px"},display:"flex",justifyContent:"right"},appSettingsContainer:{display:"flex",justifyContent:"space-between",flexDirection:"column",height:"calc(100vh - 55px - 250px)"}})),selectStatus=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.status},selectApplication=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.application},selectOwnerOrganization=e=>{return null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e.ownerOrganization},useStyles=makeStyles()(e=>({root:{borderRadius:"50%",border:"2px solid #D5DFE9",display:"flex",justifyContent:"center",alignItems:"center",overflow:"hidden"},small:{width:e.spacing(6),height:e.spacing(6)},medium:{width:e.spacing(9),height:e.spacing(9)},large:{width:e.spacing(12),height:e.spacing(12)},xlarge:{width:e.spacing(16),height:e.spacing(16)},logo:{maxWidth:"100%",maxHeight:"100%"},veritoneLogo:{maxWidth:"75%",maxHeight:"75%"}})),Logo=({size:e="xlarge",path:t="",altText:n})=>{var r=useStyles()["classes"],[t,o]=useBackupImg(t,img$1u);return jsxRuntime.exports.jsx("div",Object.assign({className:r.root+" "+r[e]},{children:jsxRuntime.exports.jsx("img",{className:r.logo+" "+(t===img$1u&&r.veritoneLogo),src:t,alt:n,onError:o})}))},getSignedUriPath=n=>{const e=["iconUrl"].map(e=>e);return e.reduce((e,t)=>n[t]||e,void 0)},DetailHeader=({installationConfig:t})=>{const n=useSelector(selectApplication);var e=useSelector(selectOwnerOrganization);const r=(useSelector(userSelector)||{})["organization"];var o=useStyles$1({})["classes"],i=null==(i=n.entityTags)?void 0:i.map(e=>e.tagKey).join(", "),a=getSignedUriPath(n);const s=useDispatch();return jsxRuntime.exports.jsxs(Box,Object.assign({display:"flex",flexDirection:"row",className:o.detailHeaderContainer,"data-testid":"application-details-header"},{children:[jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Logo,{path:a,altText:n.name+" Logo"})}),jsxRuntime.exports.jsxs("div",Object.assign({className:o.headerInfo},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1","data-testid":"application-details-header-name"},{children:n.name})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption",className:o.headerOwner,"data-testid":"application-details-header-owner"},{children:null==e?void 0:e.name})),jsxRuntime.exports.jsx(Box,Object.assign({display:"flex",flexDirection:"row",className:o.panelHeaderLine},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption"},{children:i}))}))]})),jsxRuntime.exports.jsx("div",{children:n.status!==EApplicationStatus.active&&jsxRuntime.exports.jsx(Button,Object.assign({color:"primary",variant:"contained",onClick:()=>{var e;s(actions$1.installAppStart({appId:n.id,orgId:(null==(e=null===r||void 0===r?void 0:r.organizationId)?void 0:e.toString())||"",configs:t||[]}))}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center.applications.install-btn",defaultMessage:"Install App",description:"Install App button label"})}))})]}))},InfoItem=({dataTest:e,title:t,value:n})=>jsxRuntime.exports.jsxs(Grid$1,Object.assign({item:!0,xs:6},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption","data-test":`application-details-panel-detail-info-${e}-caption`},{children:t})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5","data-test":"application-details-panel-detail-info-"+e},{children:n}))]})),BasicInfo=()=>{var e=useSelector(selectApplication),t=useStyles$1({})["classes"];return jsxRuntime.exports.jsxs(Box,Object.assign({"data-test":"application-details-panel-basic-info-content"},{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:t.detailOverview,"data-test":"application-details-panel-overview"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:t.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-overview-title",defaultMessage:"Overview",description:"title of the Overview section on the application details panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5"},{children:e.description}))]})),jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsxs(Box,Object.assign({className:t.detailInfo,"data-test":"application-details-panel-basic-info-details"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:t.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-basic-info-details-title",defaultMessage:"Information",description:"The title of the Information section in the application details panel basic info"})})),jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0,spacing:4,className:t.detailInfoBody},{children:[jsxRuntime.exports.jsx(InfoItem,{dataTest:"name",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-name-title",defaultMessage:"Name",description:"The title of the name field in the application details panel basic info"}),value:e.name}),jsxRuntime.exports.jsx(InfoItem,{dataTest:"app-id",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-app-id-title",defaultMessage:"App ID",description:"The title of the app id field in the application details panel basic info"}),value:e.id}),jsxRuntime.exports.jsx(InfoItem,{dataTest:"tags",title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-info-tags-title",defaultMessage:"Tags",description:"The title of the tags field in the application details panel basic info"}),value:null==(t=e.entityTags)?void 0:t.map(e=>e.tagKey).join(", ")})]}))]}))]}))},formattedMessages=e=>({fieldIsRequired:e.formatMessage({id:"admin-center-applcations.application-details-panel.settings-tab.required-field-error",defaultMessage:[{type:0,value:"This field is required"}]})}),SettingsTab=({intl:e,setInstallationConfig:t})=>{const n=formattedMessages(e)["fieldIsRequired"],r=useSelector(selectApplication),[o,i]=react.exports.useState([]),[a,s]=react.exports.useState([]),[l,c]=react.exports.useState(!1),p=useStyles$1({isEmpty:0===o.length})["classes"],u=(react.exports.useEffect(()=>{var e;r&&null!=(e=null===r||void 0===r?void 0:r.applicationConfig)&&e.records&&(i(null==(e=null===r||void 0===r?void 0:r.applicationConfig)?void 0:e.records),l||(c(!0),s(null==(e=null===r||void 0===r?void 0:r.applicationConfig)?void 0:e.records)))},[r]),t=>{var e;return null==(e=o.find(e=>e.configKey===t))?void 0:e.value}),d=(n,t)=>{const r=o.findIndex(e=>e.configKey===t);-1!==r&&i(e=>{const t=[...e];e=Object.assign(Object.assign({},t[r]),{value:n});return t[r]=e,t})};const $=e=>e.required&&!u(e.configKey);return jsxRuntime.exports.jsxs(Box,Object.assign({"data-testid":"application-details-panel.app-settings.container",className:p.appSettingsContainer},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsxs(Box,Object.assign({className:p.detailOverview,"data-test":"application-details-panel-overview"},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:p.sectionTitle},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-app-settings-title",defaultMessage:"App Settings",description:"title of the App Settings section on the application details panel"})})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h5"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-basic-info-details-title",defaultMessage:"Set your Organization settings that will be applied to all users of this application.",description:"App settings description text"})}))]})),jsxRuntime.exports.jsxs(Box,Object.assign({"data-test":"application-details-panel-app-settings-details"},{children:[o.length?o.map(e=>jsxRuntime.exports.jsxs("div",Object.assign({className:p.configContainer,"data-testid":"application-config-container"},{children:[jsxRuntime.exports.jsxs(Grid$1,Object.assign({container:!0},{children:[jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:p.configName},{children:e.configKey}))})),jsxRuntime.exports.jsx(Grid$1,Object.assign({item:!0},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3",className:p.requiredLabel},{children:e.required?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:["(",jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-panel-app-settings.required-label",defaultMessage:"Required",description:"Required label for the app config"}),")"]}):null}))}))]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:p.configDescription},{children:e.description})),(t=>{switch(t.configType){case EConfigTypes.string:return jsxRuntime.exports.jsx(TextField,{value:u(t.configKey),onChange:e=>d(e.target.value,t.configKey),disabled:t.secured,className:p.configInput,error:$(t),label:$(t)?n:void 0});case EConfigTypes.json:return;case EConfigTypes.boolean:return jsxRuntime.exports.jsx(Switch,{checked:u(t.configKey),disabled:t.secured,onChange:e=>d(e.target.checked,t.configKey)});default:return null}})(e),jsxRuntime.exports.jsx(Divider,{className:p.configDivider})]}),e.configKey)):jsxRuntime.exports.jsxs("div",Object.assign({className:p.noConfigs},{children:[jsxRuntime.exports.jsx(NoApps,{fontSize:"large"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",className:p.helperText},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.no-configs",defaultMessage:"This app does not have any configs.",description:"No Applciation configs"})}))]})),jsxRuntime.exports.jsx("div",{children:jsxRuntime.exports.jsx(Button,Object.assign({variant:"outlined",className:p.uninstallBtn},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.uninstall-btn",defaultMessage:"Uninstall Application",description:"Uninstall Application button label"})}))})]}))]}),jsxRuntime.exports.jsxs("div",Object.assign({className:p.actionButtons},{children:[jsxRuntime.exports.jsx(Button,Object.assign({variant:"text",sx:{color:"black",marginRight:"15px",fontWeight:400},onClick:()=>i(a)},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.cancel-btn",defaultMessage:"Cancel",description:"Cancel button label"})})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",disabled:lodash.exports.isEqual(a,o)||!!o.find(e=>e.required&&!e.value&&"boolean"!=typeof e.value),onClick:()=>{t(o),s(o)}},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"admin-center-applications.application-details.save-btn",defaultMessage:"Save",description:"Save button label"})}))]}))]}))};var AppSettings=injectIntl(SettingsTab);const tabsList=[{label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail-basic-info",defaultMessage:"Basic Info",description:"the title of the Basic Info tab on the application details panel"}),disabled:!1,id:"application-details-tab-label-basic-info"}],settingsTab={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-detail.app-settings",defaultMessage:"App Settings",description:"the title of the App Settings tab on the application details panel"}),disabled:!1,id:"application-details-tab-label-app-settings"},MainLayout=({setInstallationConfig:e})=>{const t=useSelector(selectApplication),[n,r]=react.exports.useState(0);var o=useStyles$1({})["classes"];const[i,a]=react.exports.useState(tabsList),[s,l]=react.exports.useState(!1);const c=()=>(null===t||void 0===t?void 0:t.status)!==EApplicationStatus.active;return react.exports.useEffect(()=>{c()||s||(l(!0),a([...i,settingsTab]))},[t]),jsxRuntime.exports.jsxs(Box,Object.assign({className:o.mainLayout},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:o.tabsContainer,"data-testid":"application-details-panel-tabs-list"},{children:jsxRuntime.exports.jsx("div",Object.assign({className:o.tabsParent},{children:jsxRuntime.exports.jsx(CustomTabs,{selectedId:n,onChangeTab:e=>{r(e)},tabsList:i})}))})),jsxRuntime.exports.jsx(Divider,{className:o.divider}),jsxRuntime.exports.jsxs(Box,Object.assign({className:o.tabPanels},{children:[jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:0},{children:jsxRuntime.exports.jsx(BasicInfo,{})})),!c()&&jsxRuntime.exports.jsx(TabPanel,Object.assign({value:n,index:1},{children:jsxRuntime.exports.jsx(AppSettings,{setInstallationConfig:e})}))]}))]}))},Content=({applicationId:e,initValue:t})=>{var n=useSelector(selectStatus);const r=useDispatch();var o=useStyles$1({})["classes"],[i,a]=(react.exports.useEffect(()=>{e?r(actions$1.fetchApplicationStart({applicationId:e,initValue:t})):t&&r(actions$1.setInitialApplicationValue(t))},[r,e,t]),react.exports.useState([]));return n===Status.loading&&jsxRuntime.exports.jsxs(Container,Object.assign({className:o.panelLoading},{children:[jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",animation:"wave",width:400,height:200}),jsxRuntime.exports.jsx(Divider,{sx:{my:2}}),jsxRuntime.exports.jsx(Skeleton$1,{variant:"rectangular",animation:"wave",width:960,height:300})]}))||n===Status.success&&jsxRuntime.exports.jsxs(Container,Object.assign({className:o.panelContent},{children:[jsxRuntime.exports.jsx(DetailHeader,{installationConfig:i}),jsxRuntime.exports.jsx(MainLayout,{setInstallationConfig:a})]}))||n===Status.failure&&jsxRuntime.exports.jsx(Container,{children:jsxRuntime.exports.jsx(ErrorState,{onRetry:()=>{r(actions$1.fetchApplicationStart({applicationId:e,initValue:t}))},errorMessage:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.application-details-panel-error-message",defaultMessage:"Something went wrong while loading your application details.",description:"error message shown when the application details panel encounters a load error"})})})||jsxRuntime.exports.jsx(Container,{children:"Please wait..."})},PanelContainer=({children:e})=>{const t=useDispatch();var n=useStyles$1({})["classes"];return jsxRuntime.exports.jsx("div",Object.assign({className:n.panelRoot,"data-testid":"application-details-panel"},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:n.panelContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:n.panelHeader},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-testid":"application-details-panel-title",variant:"h1"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.detail-panel-title",defaultMessage:"Application Details",description:"The title of the Application Details panel"})})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-applications.detail-panel-close",defaultMessage:"Close Panel",description:"The title of the Application Details panel close button"})},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:()=>{t(hidePanel("APPLICATION_DETAILS_PANEL"))},"aria-labelledby":"group-details-close-panel","data-testid":"group-details-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:n.panelBody},{children:e}))]}))}))},ApplicationDetailsPanel=({applicationId:e,initValue:t})=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getApplicationDetailsPanelModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(PanelContainer,{children:jsxRuntime.exports.jsx(Content,{applicationId:e,initValue:t})})}))})}))});export{ApplicationDetailsPanel,ApplicationsTab,Content,PanelContainer,actions,getAdminCenterApplicationsModule,getApplicationDetailsPanelModule,initialState,namespace,rootReducer};
|
|
1
|
+
import{m as makeStyles,H as createSlice,cf as combineReducers,cg as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,j as jsxRuntime,bx as CacheProvider,by as muiCache,ci as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,k as useSelector,i as useDispatch,eE as userSelector,r as react,cp as unmountPanel,x as classnames,T as Typography$1,a8 as Tooltip,a9 as IconButton,bV as Hide,at as Button$1,a7 as Divider,fs as img$6,a2 as all,F as FormattedMessage,af as takeLatest$1,w as TextField,S as Switch,bE as CircularProgress$1,ai as select,M as preferredLanguageSelector,ak as call,ah as put,bW as showMessage,bX as MessageSeverity,bI as Icon,cx as Upload,bP as FormHelperText,b4 as AIWareFormatMessage,p as lodash,cD as baseGraphQLApiWithError}from"./js-core.esm.js";import{d as default_1}from"./js-core.esm36.js";import{S as Stepper,a as Step,b as StepLabel}from"./js-core.esm34.js";!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();var useStyles=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:"100vh - 195px"},stepper:{width:"80%",height:"75px",paddingLeft:"30px"},step:{".MuiStepIcon-root.Mui-active":{fill:e.palette.secondary.main},".MuiStepIcon-root.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:"5px",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:-1,overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var LoadingStatus,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()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:t.header,"data-test":"admin-center-header"},{children:[jsxRuntime.exports.jsx(Typography$1,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$1,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="adminCenter",LoginPrefix="Log in with ";function isImage(e){e=e.type;return["image/jpeg","image/png","image/svg+xml"].includes(e)}!function(e){e.Failed="failed",e.Idle="idle",e.Pending="pending"}(LoadingStatus=LoadingStatus||{});const ImageInput=({logoUrl:e,onChangeFormItem:t})=>{var i=useStyles()["classes"];const n=react.exports.useRef(null),[s,o]=react.exports.useState(e),[r,a]=react.exports.useState(!1);react.exports.useEffect(()=>{t("btnLogo",s)},[s,t]);return jsxRuntime.exports.jsxs("div",Object.assign({className:i.inputContainer},{children:[jsxRuntime.exports.jsx("input",{ref:n,id:"logo-input",name:"logo-input",type:"file",accept:"image/*",onChange:e=>{e=lodash.exports.get(e,"target.files[0]",null);if(null!==n.current&&(n.current.value=""),isImage(e)&&e.size<=3e5){var t=e=>{"string"==typeof e&&o(e),a(!1)};const i=new FileReader;i.readAsDataURL(e),i.onload=function(){t(i.result)},i.onerror=function(e){a(!0),console.log("Error: ",e)}}else a(!0)},className:i.fileInput,"aria-label":"Upload Logo"}),jsxRuntime.exports.jsx("div",Object.assign({className:i.imageWrapper,role:"button"},{children:s?jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("img",{"data-test":"admin-center-image-loaded",src:s,alt:"logo",className:i.inputLogo}),jsxRuntime.exports.jsx(Icon,{"data-test":"admin-center-remove-image","aria-label":"Remove Image",fontSize:"large",className:i.removeBtn,onClick:()=>{a(!1),o("")},component:default_1})]}):jsxRuntime.exports.jsx(Icon,{onClick:()=>{null!==n.current&&n.current.click()},"data-test":"upload-icon",fontSize:"large",component:Upload})})),jsxRuntime.exports.jsx(FormHelperText,Object.assign({"data-test":"admin-center-logo-upload-error",error:r},{children:r?SHARED_TEXT.loginStepsErrorBtnLogo():""}))]}))},ButtonDesign=({formData:e,errorForm:t,onChangeFormItem:i,handleChangeForm:n})=>{const s=useStyles()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:s.configurationContainer},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:s.container},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"admin-center-button-instructions",variant:"body2",color:"textPrimary"},{children:SHARED_TEXT.buttonInstructions()}))})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.previewButtonContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:s.sectionsButton,variant:"h6",color:"textPrimary"},{children:SHARED_TEXT.buttonPreview()})),jsxRuntime.exports.jsxs(Button$1,Object.assign({style:{color:""+e.btnTextColor,backgroundColor:""+e.btnColor},"data-test":"admin-center-input-previewButton",variant:"outlined",color:"primary",fullWidth:!0,className:s.previewButton},{children:[e.btnLogo?jsxRuntime.exports.jsx("img",{"data-test":"admin-center-preview-logo",alt:"previewLogo",className:s.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:s.container},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:s.designContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"admin-center-button-logo",className:s.logoContainer},{children:[jsxRuntime.exports.jsx(ImageInput,{onChangeFormItem:i,logoUrl:null!=e&&e.btnLogo?null==e?void 0:e.btnLogo:""}),jsxRuntime.exports.jsx("div",Object.assign({className:s.buttonPreviewLabel},{children:SHARED_TEXT.buttonLogo()}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.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:s.textFieldButtonDesign,value:null==e?void 0:e.btnText,onChange:n("btnText"),error:""!==t.btnText}),jsxRuntime.exports.jsx("div",Object.assign({className:s.colorBlocksContainer},{children:["#FB8C00","#FFB300","#00897B","#43A047","#039BE5","#1E88E5","#ADB8C2","#E53935","#D81B60","#8E24AA"].map(e=>jsxRuntime.exports.jsx("div",{className:s.colorBlock,style:{backgroundColor:e},onClick:()=>i("btnColor",""+e)},e))})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.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:s.textFieldHexButtonDesign,value:null==e?void 0:e.btnColor,onChange:n("btnColor"),error:""!==t.btnColor,InputProps:{classes:{input:s.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:s.textFieldHexButtonDesign,value:null==e?void 0:e.btnTextColor,onChange:n("btnTextColor"),error:""!==t.btnTextColor,InputProps:{classes:{input:s.inputBase}},size:"small"})]}))]}))]})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.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){const t={isSuperAdmin:!1,isAdmin:!1};return e&&(0<=e.indexOf("superadmin")&&(t.isSuperAdmin=!0),0<=e.indexOf("admin")&&(t.isAdmin=!0)),t}const namespace$1="uiState",initialState={status:LoadingStatus.Pending,openIdProvider:{name:"",description:"",websiteUrl:"",clientId:"",clientSecret:"",issuerUrl:"",btnText:"",btnLogo:"",btnColor:"#FFFFFF",btnTextColor:"#000000",isGlobal:!1},appId:{id:""},existingOpenIdProvider:{id:""},newProvider:{status:LoadingStatus.Idle,errorMessage:""}},slice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState,reducers:{init(e,{payload:t}){e.status=LoadingStatus.Pending,e.existingOpenIdProvider.id=t.connectorId,e.appId.id=t.appId},initDone(e){e.status=LoadingStatus.Idle},initFailed(e){e.status=LoadingStatus.Failed},updateAppId(e,{payload:t}){e.appId=t},updateOpenIdConnector(e,{payload:t}){e.openIdProvider=t},startCreateNewProvider(e){e.newProvider.status=LoadingStatus.Pending},createNewProviderSuccess(e){e.newProvider.status=LoadingStatus.Idle,e.openIdProvider=initialState.openIdProvider},createNewProviderFailed(e,{payload:t}){e.newProvider={status:t.status,errorMessage:t.errorMessage}}}}),actions$1=slice.actions;var uiState$1=slice.reducer;const namespace=SLICE_NAME,actions={[namespace$1]:actions$1},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 ProviderConfiguration=({formData:e,errorForm:t,handleChangeForm:i})=>{var n=useStyles()["classes"],s=useSelector(userSelector),o=roleHelper(s.roles||null),r=useSelector(selectExistingProvider),s=null==(s=null==s?void 0:s.organization)?void 0:s.organizationId;return jsxRuntime.exports.jsx("div",Object.assign({className:n.configurationContainer},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:n.container},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"admin-center-provider-instructions",variant:"body2",color:"textPrimary"},{children:r.id?SHARED_TEXT.providerUpdateInstructions():SHARED_TEXT.providerInstructions()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:n.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:n.textField,value:null==e?void 0:e.name,onChange:i("name"),error:""!==t.name,helperText:t.name}),jsxRuntime.exports.jsx("div",{className:n.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:n.textField,value:null==e?void 0:e.description,onChange:i("description"),error:""!==t.description,helperText:t.description,inputProps:{maxLength:100}}),jsxRuntime.exports.jsx("div",{className:n.spacer}),jsxRuntime.exports.jsx(TextField,{id:"websiteUrl","data-test":"admin-center-input-websiteUrl",autoComplete:"off",label:SHARED_TEXT.providerInputWebsiteUrl(),variant:"outlined",className:n.textField,value:null==e?void 0:e.websiteUrl,onChange:i("websiteUrl"),error:""!==t.websiteUrl,helperText:t.websiteUrl}),jsxRuntime.exports.jsx(Divider,{variant:"fullWidth"}),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:n.sections,variant:"h6",color:"textPrimary"},{children:SHARED_TEXT.providerSectionClient()})),!r.id&&jsxRuntime.exports.jsx(TextField,{required:!0,id:"clientId","data-test":"admin-center-input-clientId",autoComplete:"off",label:SHARED_TEXT.providerInputClientId(),variant:"outlined",className:n.textField,value:null==e?void 0:e.clientId,onChange:i("clientId"),error:""!==t.clientId,helperText:t.clientId}),jsxRuntime.exports.jsx("div",{className:n.spacer}),jsxRuntime.exports.jsx(TextField,{required:!0,id:"clientSecret","data-test":"admin-center-input-clientSecret",autoComplete:"off",label:SHARED_TEXT.providerInputClientSecret(),variant:"outlined",className:n.textField,value:null==e?void 0:e.clientSecret,onChange:i("clientSecret"),error:""!==t.clientSecret,helperText:t.clientSecret}),jsxRuntime.exports.jsx("div",{className:n.spacer}),jsxRuntime.exports.jsx(TextField,{required:!0,id:"issuerUrl","data-test":"admin-center-input-issuerUrl",autoComplete:"off",label:SHARED_TEXT.providerInputIssuerUrl(),variant:"outlined",className:n.textField,value:null==e?void 0:e.issuerUrl,onChange:i("issuerUrl"),error:""!==t.issuerUrl,helperText:t.issuerUrl}),jsxRuntime.exports.jsx("div",{className:n.spacer}),!r.id&&o.isSuperAdmin&&7682===s&&jsxRuntime.exports.jsxs("div",Object.assign({className:n.isGlobalContainer},{children:[jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({className:n.isGlobalTitle,variant:"h6"},{children:SHARED_TEXT.providerGlobalTitle()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({className:n.isGlobalDescription,variant:"body2"},{children:SHARED_TEXT.providerGlobalDescription()}))]}),jsxRuntime.exports.jsx(Switch,{"data-test":"admin-center-isglobal-switch",value:e.isGlobal,onChange:i("isGlobal")})]}))]}))}))},ProviderCreation=({handlePanelClose:e})=>{const t=useStyles()["classes"],i=useDispatch(),n=useSelector(selectCreateNewProvider),s=react.exports.useRef(!1);react.exports.useEffect(()=>{s.current&&n.status===LoadingStatus.Idle&&e(),s.current=!0},[n,e]);return jsxRuntime.exports.jsxs("div",Object.assign({className:t.configurationContainer},{children:[jsxRuntime.exports.jsx(Divider,{variant:"fullWidth"}),n.status===LoadingStatus.Idle?null:n.status===LoadingStatus.Pending?jsxRuntime.exports.jsxs("div",Object.assign({className:t.loadingCreate},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h2"},{children:SHARED_TEXT.providerCreationCreated()})),jsxRuntime.exports.jsx(CircularProgress$1,{"data-test":"admin-center-provider-creation-loader"})]})):n.status===LoadingStatus.Failed?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$6}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:SHARED_TEXT.providerCreationFailed()})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:n.errorMessage})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>i(actions.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 i=useStyles()["classes"],t=useDispatch(),n=useSelector(selectExistingProvider);var s=useSelector(selectOpenIdProvider);const[o,r]=react.exports.useState(0),[a,d]=react.exports.useState(s),[l,c]=react.exports.useState({name:"",description:"",websiteUrl:"",clientId:"",clientSecret:"",issuerUrl:"",btnText:"",btnLogo:"",btnColor:"",btnTextColor:"",isGlobal:!1});react.exports.useEffect(()=>{t(actions.uiState.updateOpenIdConnector(a))},[a,t]);const p=[SHARED_TEXT.loginStepsProviderConfiguration(),SHARED_TEXT.loginStepsButtonDesign()];var s=()=>{0===o&&!(()=>{let e=!0;const t={};return a.name||(t.name=SHARED_TEXT.loginStepsErrorRequired(),e=!1),a.clientId||n.id||(t.clientId=SHARED_TEXT.loginStepsErrorRequired(),e=!1),a.clientSecret||(t.clientSecret=SHARED_TEXT.loginStepsErrorRequired(),e=!1),a.issuerUrl||(t.issuerUrl=SHARED_TEXT.loginStepsErrorIssuerUrl(),e=!1),c(Object.assign(Object.assign({},l),t)),e})()||1===o&&!(()=>{let e=!0;const t={};var i="^#[A-Fa-f0-9]{6}$";return a.btnText||(t.btnText=SHARED_TEXT.loginStepsErrorBtnText(),e=!1),a.btnColor&&a.btnColor.match(i)||(t.btnColor=SHARED_TEXT.loginStepsErrorBtnColor(),e=!1),a.btnTextColor&&a.btnTextColor.match(i)||(t.btnTextColor=SHARED_TEXT.loginStepsErrorBtnColor(),e=!1),c(Object.assign(Object.assign({},l),t)),e})()||(r(e=>e+1),o===p.length-1&&t(actions.uiState.startCreateNewProvider()))},u=()=>{r(e=>e-1)};const x=react.exports.useCallback((t,i)=>{d(e=>Object.assign(Object.assign({},e),{[t]:i})),c(e=>Object.assign(Object.assign({},e),{[t]:""}))},[d,c]),g=t=>e=>{e="isGlobal"===t?e.target.checked:e.target.value;x(t,e)};return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root},{children:[jsxRuntime.exports.jsx(Stepper,Object.assign({className:i.stepper,activeStep:o},{children:p.map((e,t)=>{return jsxRuntime.exports.jsx(Step,Object.assign({className:i.step},{},{children:jsxRuntime.exports.jsx(StepLabel,Object.assign({},{},{children:e}))}),t)})})),jsxRuntime.exports.jsxs("div",{children:[o===p.length&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(ProviderCreation,{handlePanelClose:e}),jsxRuntime.exports.jsxs("div",Object.assign({className:i.buttonGroup},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({"data-test":"admin-center-steps-btn-back",disabled:0===o,onClick:u,className:i.button},{children:SHARED_TEXT.loginStepsBackButton()})),jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"contained",color:"primary",onClick:e,className:i.button,"data-test":"admin-center-steps-btn-close"},{children:SHARED_TEXT.loginStepsCloseButton()}))]}))]}),o!==p.length&&jsxRuntime.exports.jsxs("div",{children:[jsxRuntime.exports.jsx(Divider,{}),jsxRuntime.exports.jsx("div",Object.assign({className:i.stepsContent},{children:function(e){switch(e){case 0:return jsxRuntime.exports.jsx(ProviderConfiguration,{errorForm:l,formData:a,handleChangeForm:g});case 1:return jsxRuntime.exports.jsx(ButtonDesign,{errorForm:l,formData:a,handleChangeForm:g,onChangeFormItem:x});default:return}}(o)})),jsxRuntime.exports.jsxs("div",Object.assign({className:i.buttonGroup},{children:[jsxRuntime.exports.jsx(Button$1,Object.assign({"data-test":"admin-center-steps-btn-back",disabled:0===o,onClick:u,className:i.button},{children:SHARED_TEXT.loginStepsBackButton()})),o===p.length-1?jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"contained",color:"primary",onClick:s,className:i.button,"data-test":"admin-center-steps-btn-create"},{children:n.id?SHARED_TEXT.loginStepsUpdateButton():SHARED_TEXT.loginStepsCreateButton()})):jsxRuntime.exports.jsx(Button$1,Object.assign({variant:"contained",color:"primary",onClick:s,className:i.button,"data-test":"admin-center-steps-btn-next"},{children:SHARED_TEXT.loginStepsNextButton()}))]}))]})]})]}))},ConnectorError=()=>{var e=useStyles()["classes"];const t=useDispatch(),i=useSelector(selectExistingProvider),n=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$6}),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body1"},{children:SHARED_TEXT.getProviderFailed()})),jsxRuntime.exports.jsx(Button$1,Object.assign({onClick:()=>t(actions.uiState.init({connectorId:i.id,appId:n.id})),className:e.retryButton,variant:"outlined",color:"primary","data-test":"admin-center-retry-button"},{children:SHARED_TEXT.providerCreationRetryButton()}))]}))},selectApiConfigs$1=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,i)=>({apiRoot:e,graphQLEndpoint:t,token:i}));var selectors=Object.freeze({__proto__:null,selectApiConfigs:selectApiConfigs$1,uiState:uiState});const MainLayout=({dataId:e,appId:t,connectorId:i,panelRendered:n})=>{var s=useStyles()["classes"];const o=useSelector(selectUIStateStatus),r=useDispatch(),a=useSelector(userSelector),{apiRoot:d,graphQLEndpoint:l,token:c}=useSelector(selectApiConfigs$1);react.exports.useEffect(()=>{o===LoadingStatus.Pending&&d&&l&&c&&a&&r(actions.uiState.init({connectorId:i,appId:t}))},[o,d,l,c,t,i,a,r]);var p=react.exports.useCallback(()=>{r(unmountPanel(e))},[r,e]);return!(d&&l&&c&&n&&a&&null!==a&&void 0!==a&&a.roles&&roleHelper(a.roles).isAdmin&&o!==LoadingStatus.Pending)?null:jsxRuntime.exports.jsxs("div",Object.assign({id:e,role:"presentation","data-test":"admin-center-widget",className:classnames(s.root)},{children:[jsxRuntime.exports.jsx(Header,{onPanelClose:p}),o===LoadingStatus.Failed&&jsxRuntime.exports.jsx(ConnectorError,{}),o===LoadingStatus.Idle&&jsxRuntime.exports.jsx(LoginConnectorSteps,{handlePanelClose:p})]}))};function __awaiter(e,r,a,d){return new(a=a||Promise)(function(i,t){function n(e){try{o(d.next(e))}catch(e){t(e)}}function s(e){try{o(d.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?i(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,s)}o((d=d.apply(e,r||[])).next())})}function createOpenIdProvider(t,i){return __awaiter(this,void 0,void 0,function*(){var e=yield baseGraphQLApiWithError(Object.assign({query:`
|
|
2
|
+
mutation createNewOpenIdProvider($input: CreateOpenIdProvider!){
|
|
3
|
+
createOpenIdProvider(input: $input){
|
|
4
|
+
name
|
|
5
|
+
id
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
`,operationName:"createNewOpenIdProvider",variables:{input:i}},t));return Object.assign({},e.createOpenIdProvider)})}function getOpenIdProvider(t,i){return __awaiter(this,void 0,void 0,function*(){var e=yield baseGraphQLApiWithError(Object.assign({query:`
|
|
9
|
+
query getOpenIdProvider($id: ID!){
|
|
10
|
+
openIdProvider(id: $id){
|
|
11
|
+
name,
|
|
12
|
+
description,
|
|
13
|
+
websiteUrl,
|
|
14
|
+
loginUrl
|
|
15
|
+
loginButtonStyle{
|
|
16
|
+
btnText,
|
|
17
|
+
btnTextColor,
|
|
18
|
+
btnColor,
|
|
19
|
+
btnLogo
|
|
20
|
+
},
|
|
21
|
+
isGlobal
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`,operationName:"getOpenIdProvider",variables:i},t));return Object.assign({},e.openIdProvider)})}function updateOpenIdProvider(t,i){return __awaiter(this,void 0,void 0,function*(){var e=yield baseGraphQLApiWithError(Object.assign({query:`
|
|
25
|
+
mutation updateExistingOpenIdProvider($input: UpdateOpenIdProvider!){
|
|
26
|
+
updateOpenIdProvider(input: $input){
|
|
27
|
+
name
|
|
28
|
+
id
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
`,operationName:"updateExistingOpenIdProvider",variables:{input:i}},t));return Object.assign({},e.updateOpenIdProvider)})}const selectApiConfigs=selectors["selectApiConfigs"];function*initAdminCenter(){var e,t,i,n,s=yield select(selectUIStateStatus),o=yield select(preferredLanguageSelector);const r=AIWareFormatMessage(o);if(s===LoadingStatus.Pending){o=yield select(selectExistingProvider);if(o.id){s=yield select(selectApiConfigs);try{var a=yield call(getOpenIdProvider,s,o),d={name:(null==a?void 0:a.name)||"",description:(null==a?void 0:a.description)||"",websiteUrl:(null==a?void 0:a.websiteUrl)||"",clientId:(null==a?void 0:a.clientId)||"",clientSecret:(null==a?void 0:a.clientSecret)||"",issuerUrl:(null==a?void 0:a.issuerUrl)||"",btnText:(null==(e=null==a?void 0:a.loginButtonStyle)?void 0:e.btnText.replace(LoginPrefix,""))||"",btnLogo:(null==(t=null==a?void 0:a.loginButtonStyle)?void 0:t.btnLogo)||"",btnColor:(null==(i=null==a?void 0:a.loginButtonStyle)?void 0:i.btnColor)||"#FFFFFF",btnTextColor:(null==(n=null==a?void 0:a.loginButtonStyle)?void 0:n.btnTextColor)||"#000000",isGlobal:(null==a?void 0:a.isGlobal)||!1};yield put(actions.uiState.updateOpenIdConnector(d)),yield put(actions.uiState.initDone())}catch(e){yield put(showMessage({content:r({id:"os-admin-center.snackbar.loginConnectorError",defaultMessage:[{type:0,value:"Login Connector could not Found"}]}),severity:MessageSeverity.Error})),yield put(actions.uiState.initFailed())}}else yield put(actions.uiState.initDone())}}function*newProviderCreateOrUpdate(){var t=uiState["selectOpenIdProvider"],i=yield select(selectExistingProvider),n=yield select(selectApiConfigs),t=yield select(t),s=yield select(preferredLanguageSelector);const o=AIWareFormatMessage(s);var s=LoginPrefix+t.btnText,t=Object.assign(Object.assign({},t),{btnText:s});try{let e=o({id:"os-admin-center.snackbar.loginConnectorCreated",defaultMessage:[{type:0,value:"Login Connector Created"}]});if(i.id){const r=Object.assign(Object.assign({},t),i);delete r.clientId,delete r.isGlobal,yield call(updateOpenIdProvider,n,r),e=o({id:"os-admin-center.snackbar.loginConnectorUpdated",defaultMessage:[{type:0,value:"Login Connector Updated"}]})}else yield call(createOpenIdProvider,n,t);yield put(showMessage({content:e,severity:MessageSeverity.Success})),yield put(actions.uiState.createNewProviderSuccess())}catch(e){s=(null==e?void 0:e.message)||"",yield put(actions.uiState.createNewProviderFailed({status:LoadingStatus.Failed,errorMessage:s}));n=i.id?o({id:"os-admin-center.snackbar.loginConnectorNotUpdated",defaultMessage:[{type:0,value:"Login Connector could not be Updated"}]}):o({id:"os-admin-center.snackbar.loginConnectorNotCreated",defaultMessage:[{type:0,value:"Login Connector could not be created"}]});yield put(showMessage({content:n,severity:MessageSeverity.Error}))}}function*watchAdminCenterInit(){yield takeLatest$1(actions.uiState.init.type,initAdminCenter)}function*watchCreateNewProvider(){yield takeLatest$1(actions.uiState.startCreateNewProvider.type,newProviderCreateOrUpdate)}function*rootSaga(){yield all([watchAdminCenterInit(),watchCreateNewProvider()])}function getAdminCenterOpenIdModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const AdminCenterOpenId=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getAdminCenterOpenIdModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(MainLayout,Object.assign({},e))})}))})}));export{AdminCenterOpenId};
|
package/js-core.esm39.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{z as createSvgIcon,C as interopRequireDefault,j as jsxRuntime,m as makeStyles,H as createSlice,cf as combineReducers,cg as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,ci as AIWareThemeProvider,K as lib,fh as getLibraryModule,A as AIWareIntlProvider,bx as CacheProvider,by as muiCache,k as useSelector,r as react,i as useDispatch,F as FormattedMessage,T as Typography$1,a8 as Tooltip,a9 as IconButton,cj as Close,B as Box,q as Alert,at as Button,bE as CircularProgress,Y as Portal,eG as Badge,bI as Icon,fu as EngineCategoryIcons,aX as Snackbar,aY as default_1$2,f$ as ConfirmationModal,a2 as all,g9 as selectors$1,ga as LibraryDropdown,bP as FormHelperText,gb as Remove,gc as Save,cG as Add,cy as Delete,cw as Edit,cs as mountPanel,x as classnames,af as takeLatest$1,v as FormControl,ai as select,M as preferredLanguageSelector,b4 as AIWareFormatMessage,ah as put,bW as showMessage,bX as MessageSeverity,ak as call,dU as sdkEventManager,dV as SdkEvents,dW as SdkError,p as lodash,w as TextField,aV as Select,aW as MenuItem,gd as Input,cD as baseGraphQLApiWithError}from"./js-core.esm.js";import{selectors}from"./js-core.esm29.js";import{C as Chip$1}from"./js-core.esm23.js";import"./js-core.esm22.js";import"./js-core.esm30.js";import"./js-core.esm31.js";import"./js-core.esm8.js";import"./js-core.esm20.js";import"./js-core.esm32.js";import"./js-core.esm12.js";import"./js-core.esm15.js";import"./js-core.esm14.js";var LoadingStatus,ProcessAIView,CheckCircle={},_interopRequireDefault$1=interopRequireDefault.exports,default_1$1=(Object.defineProperty(CheckCircle,"__esModule",{value:!0}),CheckCircle.default=void 0),_createSvgIcon$1=_interopRequireDefault$1(createSvgIcon),_jsxRuntime$1=jsxRuntime.exports,_default$1=(0,_createSvgIcon$1.default)((0,_jsxRuntime$1.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckCircle"),default_1$1=CheckCircle.default=_default$1,Info={},_interopRequireDefault=interopRequireDefault.exports,default_1=(Object.defineProperty(Info,"__esModule",{value:!0}),Info.default=void 0),_createSvgIcon=_interopRequireDefault(createSvgIcon),_jsxRuntime=jsxRuntime.exports,_default=(0,_createSvgIcon.default)((0,_jsxRuntime.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"}),"Info"),default_1=Info.default=_default;!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const SHARED_TEXT={processAiHeaderTitle:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.eA9TAY",defaultMessage:"AI PROCESSING",description:"Title of AI categories list"}),closePanel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.kOsSpC",defaultMessage:"Close Panel",description:"Close Panel"}),processAiHeaderDescription:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.p3BcDi",defaultMessage:"Select from a list of AI capabilities to apply available AI processing to your selected files.",description:"Detailed text below the process AI header title"}),processAiEngineUnavailable:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.PwcA3J",defaultMessage:"This engine does not specify a default single job template.",description:"Detailed text if an engine is not available to use"}),processAiFailedStatus:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.UBu61T",defaultMessage:"An error happened while fetching the engine capabilities.",description:"Error message for process ai failures"}),processAiNoEngineCapability:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.IC5L+j",defaultMessage:"No available engine found for this file.",description:"Warning message when no engine found"}),processAiRetryBtn:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.8U+Kek",defaultMessage:"Retry",description:"Retry button text"}),cancel:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.6PdOcy",defaultMessage:"Cancel",description:"Cancel"}),processAiAddEngines:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.e5+f7H",defaultMessage:"Save Changes",description:"Add engines button text"}),engineSettings:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.3Phobj",defaultMessage:"Engine Settings",description:"The label for the engine settings component"}),saveSettings:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.UOkssC",defaultMessage:"Save Settings",description:"The label for the engine settings savings"}),engineSelected:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.Ki+AeV",defaultMessage:"Selected & Configured",description:"The label for the selected engine"}),removeEngine:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.eZW4Lt",defaultMessage:"Remove Engine",description:"The button to deselected a selected engine"}),editConfigurations:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.GSlIPA",defaultMessage:"Edit Configurations",description:"The button to edit the engine configurations"}),useThisEngine:()=>jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai-use-engine",defaultMessage:"Use this Engine",description:"The label for the use engine button when no engine has not been selected yet"})},useStyles$5=makeStyles()(e=>({aiProcessingWrapper:{padding:"8px 20px 20px 20px",display:"flex",flexDirection:"column",height:"100%",position:"absolute",top:"0",bottom:"0"},processAiHeader:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",marginBottom:10},loaderIcon:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:20}})),SLICE_NAME="dataCenterProcessAI",namespace$3=(!function(e){e.failed="failed",e.idle="idle",e.pending="pending",e.success="success"}(LoadingStatus=LoadingStatus||{}),!function(e){e.aiCapabilities="aiCapabilities",e.engineSelection="engineSelection",e.engineConfiguration="engineConfiguration"}(ProcessAIView=ProcessAIView||{}),"capabilitiesState"),initialState$3={status:LoadingStatus.idle,capabilities:[],engines:{}},capabilitiesSlice=createSlice({name:SLICE_NAME+"/"+namespace$3,initialState:initialState$3,reducers:{capabilitiesFetchStart(e,t){e.status=LoadingStatus.pending},capabilitiesFetchSucceed(e){e.status=LoadingStatus.idle},capabilitiesFetchFailed(e){e.status=LoadingStatus.failed},setCapabilities:(e,t)=>{e.capabilities=t.payload},setEngines:(e,t)=>{e.engines=t.payload}}}),actions$4=capabilitiesSlice.actions;var capabilities_state=capabilitiesSlice.reducer;const namespace$2="processAiConfig",initialState$2={status:LoadingStatus.idle,selectedEngines:{}},configurationSlice=createSlice({name:SLICE_NAME+"/"+namespace$2,initialState:initialState$2,reducers:{setConfigurations(e,t){var{capabilityId:t,selectedEngines:s}=t.payload;e.selectedEngines[t]=s},updateSingleJobStatus(e,t){const{engineId:s,status:n}=t.payload;for(const a in e.selectedEngines){var i=e.selectedEngines[a].findIndex(e=>e.id===s);if(-1!==i){e.selectedEngines[a][i].status=n;break}}}}}),actions$3=configurationSlice.actions;var configuration_state=configurationSlice.reducer;const namespace$1="uiState",initialState$1={status:LoadingStatus.idle,currentView:ProcessAIView.aiCapabilities},uiSlice=createSlice({name:SLICE_NAME+"/"+namespace$1,initialState:initialState$1,reducers:{setCurrentView:(e,t)=>{e.currentView=t.payload},setStatus:(e,t)=>{e.status=t.payload}}}),actions$2=uiSlice.actions;var ui_state=uiSlice.reducer;const namespace="job",initialState={status:LoadingStatus.idle},jobSlice=createSlice({name:SLICE_NAME+"/"+namespace,initialState:initialState,reducers:{launchJobStart(e,t){e.status=LoadingStatus.pending},launchJobSucceed(e){e.status=LoadingStatus.success},launchJobFailed(e){e.status=LoadingStatus.failed}}}),actions$1=jobSlice.actions;var EngineFieldType,job_state=jobSlice.reducer;const actions={[namespace$1]:actions$2,[namespace$3]:actions$4,[namespace$2]:actions$3,[namespace]:actions$1},rootReducer=combineReducers({[namespace$1]:ui_state,[namespace$3]:capabilities_state,[namespace$2]:configuration_state,[namespace]:job_state}),selectCapabilitiesStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.status},selectCapabilities=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.capabilities},selectEnginesByCapabilityId=t=>e=>{return null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$3])?void 0:e.engines)?void 0:e[t]},selectSelectedEnginesByCapabilityId=t=>e=>{return null==(e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines)?void 0:e[t]},selectSelectedEngines=e=>{e=null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines;return Object.values(e).reduce((e,t)=>e.concat(t),[])},selectSelectedEnginesObj=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace$2])?void 0:e.selectedEngines},selectJobStatus=e=>{return null==(e=null==(e=null==e?void 0:e[SLICE_NAME])?void 0:e[namespace])?void 0:e.status},selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,s)=>({apiRoot:e,graphQLEndpoint:t,token:s})),useStyles$4=makeStyles()(e=>({processingContainer:{marginTop:25,flex:1,overflowY:"scroll"},instructions:{marginBottom:"30px"},name:{fontSize:"14px",fontWeight:400,lineHeight:"19.1px"},description:{fontSize:"14px",fontWeight:400,maxWidth:"276px",lineHeight:"16.37px",overflow:"hidden",textOverflow:"ellipsis"},iconBackground:{display:"flex",justifyContent:"center",alignItems:"center",height:"40px",borderRadius:"25px",width:"40px",minHeight:"40px",minWidth:"40px",background:"#F2F5F9",marginRight:"15px"},processingRow:{padding:"20px 0",display:"flex",flexDirection:"row",height:"auto",borderBottom:"0.5px solid #D5DFE9",cursor:"pointer"},processingColumn:{display:"flex",flexDirection:"column",maxHeight:"auto"},engineIcons:{verticalAlign:"middle"},badge:{backgroundColor:"#D43060",left:e.spacing(1),top:e.spacing(1)},badgeContent:{fontSize:"11px",fontWeight:600,lineHeight:0}})),AICategories=({categories:e,closeSnackbar:n})=>{const i=useStyles$4()["classes"],a=useDispatch(),o=useSelector(selectSelectedEnginesObj),r=useSelector(selectors.uiState.selectIsFullScreen),l=useSelector(selectors.uiState.selectIsMdpFullScreen);return jsxRuntime.exports.jsx("div",Object.assign({className:i.processingContainer},{children:e.map(s=>{var e,t=s.name.replace(/[^a-zA-Z]/g,"");return jsxRuntime.exports.jsxs("div",Object.assign({"data-test":"engine-category-row",className:i.processingRow,onClick:()=>{var e=s,e=(n(),{name:"DATA_CENTER_ENGINE_SELECTION",config:{name:"DATA CENTER ENGINE SELECTION",capability:e}}),t={type:"APP_BAR_PANEL_TEMPLATE",marginTop:r||l?0:55,marginStart:r||l?380:460,size:"small",zIndex:r||l?1007:1001,parentPanelId:"DATA_CENTER_PROCESS_AI",dimmed:0,dimmedStatus:"dimParent"};a(mountPanel({panelId:"DATA_CENTER_ENGINE_SELECTION",microFrontend:e,panelConfig:t}))}},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:i.iconBackground},{children:jsxRuntime.exports.jsx(Badge,Object.assign({"data-test":"engine-category-badge-"+t,badgeContent:null!=(e=o[s.id])&&e.length?jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"overline",className:i.badgeContent},{children:o[s.id].length})):0,color:"secondary",classes:{badge:i.badge},anchorOrigin:{vertical:"bottom",horizontal:"right"}},{children:jsxRuntime.exports.jsx(Icon,{"data-test":"engine-category-icon-"+t,className:i.engineIcons,component:EngineCategoryIcons[t],color:"secondary",fontSize:"small"})}))})),jsxRuntime.exports.jsxs("div",Object.assign({className:i.processingColumn},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"engine-category-name-"+s.name,variant:"h6",color:"textPrimary",className:i.name},{children:s.name})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"engine-category-description-"+s.name,variant:"body2",color:"textSecondary",className:i.description},{children:s.description}))]}))]}),t)})}))},useStyles$3=makeStyles()(e=>({jobLaunchSnackbarContainer:{backgroundColor:e.palette.common.white,padding:"6px 16px",borderRadius:"4px",width:"440px",boxShadow:"rgba(0, 0, 0, 0.2) 0px 3px 3px -2px, rgba(0, 0, 0, 0.14) 0px 3px 4px 0px, rgba(0, 0, 0, 0.12) 0px 1px 8px 0px"},jobLaunchSnackbarTitle:{display:"flex",justifyContent:"space-between",padding:"10px 4px"},jobLaunchItemList:{maxHeight:"80vh",overflowY:"scroll",width:"102%"},jobLaunchItem:{transition:"all 0.5s ease-in-out",display:"flex",flexDirection:"row",padding:"6px 0px 5px 16px",borderRadius:"4px",marginBottom:"10px",marginTop:"5px"},jobLaunchItemMessage:{display:"flex",flexDirection:"column",width:"80%"},jobLaunchItemFeedback:{display:"flex",justifyContent:"center",alignItems:"center",width:"20%"},jobLaunchItemLoading:{color:"rgb(13, 60, 97)",backgroundColor:"rgb(232, 244, 253)"},jobLaunchItemSuccess:{backgroundColor:"rgb(237, 247, 237)",color:"rgb(30, 70, 32)"},jobLaunchItemFail:{backgroundColor:"rgb(253, 236, 234)",color:"rgb(97, 26, 21)"}})),JobLaunchItem=({name:e,status:t,onRetry:s,limitAnimation:n=!1})=>{const[i,a]=react.exports.useState(!0);react.exports.useEffect(()=>{setTimeout(()=>{a(!1)},500*Math.random()+700)});var o=useStyles$3()["classes"];return jsxRuntime.exports.jsxs("div",Object.assign({className:classnames(o.jobLaunchItem,{[o.jobLaunchItemLoading]:t===LoadingStatus.pending||i,[o.jobLaunchItemSuccess]:t===LoadingStatus.success,[o.jobLaunchItemFail]:t===LoadingStatus.failed})},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.jobLaunchItemMessage},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({style:{width:"90%"},variant:"h4",noWrap:!0},{children:e})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"caption"},{children:t===LoadingStatus.pending||i?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.dSA4RS",defaultMessage:"Launching AI Processing...",description:"Job Launch item description loading job"}):t===LoadingStatus.success?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.b+iNpN",defaultMessage:"This processing job started successfully.",description:"Job Launch item description success"}):t===LoadingStatus.failed?jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.50UABM",defaultMessage:"Unable to start processing job.",description:"Job Launch item description failed"}):void 0}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.jobLaunchItemFeedback},{children:t===LoadingStatus.pending||i?jsxRuntime.exports.jsx(CircularProgress,{size:20,disableShrink:n}):t===LoadingStatus.success?jsxRuntime.exports.jsx(default_1$1,{style:{color:"#4caf50"}}):t===LoadingStatus.failed?jsxRuntime.exports.jsx(Button,Object.assign({color:"inherit",onClick:s},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.BnINsu",defaultMessage:"RETRY",description:"Button label to retry the failed job"})})):void 0}))]}))},JobLaunchSnackbar=({open:e,onClose:s,jobLaunchItems:t,onRetry:n,hidePanel:i})=>{var a=(e,t)=>{"clickaway"!==t&&s()},o=useStyles$3()["classes"];const r=10<t.length;var l=()=>{for(const e of t)if(e.status===LoadingStatus.failed||e.status===LoadingStatus.pending)return null;return 2500};return jsxRuntime.exports.jsx(Snackbar,Object.assign({anchorOrigin:{vertical:"bottom",horizontal:"right"},open:e,autoHideDuration:l(),onClose:a,TransitionProps:{onExited:l()&&i}},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:"aiware-el "+o.jobLaunchSnackbarContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:o.jobLaunchSnackbarTitle},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h3"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.HJnKOv",defaultMessage:"AI Processing",description:"AI Processing snackbar title"})})),jsxRuntime.exports.jsx(IconButton,Object.assign({"aria-label":"close",color:"inherit",size:"small",onClick:a},{children:jsxRuntime.exports.jsx(default_1$2,{fontSize:"inherit"})}))]})),jsxRuntime.exports.jsx("div",Object.assign({className:o.jobLaunchItemList},{children:t.map((e,t)=>jsxRuntime.exports.jsx(JobLaunchItem,{name:e.name,status:e.status,onRetry:()=>n(e),limitAnimation:r},t))}))]}))}))},useStyles$2=makeStyles()(e=>({root:{display:"flex",justifyContent:"end",marginTop:"25px"},cancelButton:{marginRight:e.spacing(2),textTransform:"none",color:e.palette.text.primary},actionButton:{textTransform:"none"}})),ActionsFooter=({title:e,actionButton:t,cancelButton:s,confirmationOnCancel:n=!1,children:i=null})=>{const[a,o]=react.exports.useState(!1);var r=useStyles$2()["classes"];const l=e=>{o(!1),e&&e()};return jsxRuntime.exports.jsxs("div",Object.assign({className:r.root,"data-test":"data-center-action-footer"},{children:[e,i,jsxRuntime.exports.jsx(ConfirmationModal,{showConfirmationModal:a,closeConfirmationModal:l,onClosePanel:()=>l(s.action)}),jsxRuntime.exports.jsx(Button,Object.assign({onClick:()=>{n&&!t.disabled?o(!0):s.action()},disabled:s.disabled,"data-test":s.dataTest,className:r.cancelButton},{children:s.label})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:t.action,disabled:t.disabled,"data-test":t.dataTest,className:r.actionButton},{children:t.label}))]}))},ProcessAIManager=t=>{var e=useStyles$5()["classes"];const{apiRoot:s,graphQLEndpoint:n,token:i}=useSelector(selectApiConfigs),a=useSelector(selectJobStatus),[o,r]=react.exports.useState(!1);var l=useSelector(selectCapabilitiesStatus);const c=useSelector(selectSelectedEngines);var d=useSelector(selectCapabilities);const u=useDispatch(),p=()=>{u(actions.capabilitiesState.capabilitiesFetchStart(t.tdoId))};if(react.exports.useEffect(()=>{[LoadingStatus.pending,LoadingStatus.success,LoadingStatus.failed].includes(a)&&r(!0)},[a]),react.exports.useEffect(()=>{s&&n&&i&&p()},[s,n,i,u,t.tdoId]),!(s&&n&&i&&t.panelRendered))return null;var g={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.J0sEvH",defaultMessage:"Process with AI",description:"action button label"}),action:()=>{u(actions.job.launchJobStart({tdoId:t.tdoId,selectedEngines:c}))},disabled:!c.length,dataTest:"data-center-process-ai-action-btn"},x={label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.uT5L4h",defaultMessage:"Cancel",description:"cancel button label"}),action:()=>null==t?void 0:t.hidePanel(),disabled:!1,dataTest:"data-center-process-ai-cancel-btn"};return jsxRuntime.exports.jsxs("div",Object.assign({className:e.aiProcessingWrapper},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:e.processAiHeader},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",color:"secondary","data-test":"data-center-process-ai-panel-header-title"},{children:SHARED_TEXT.processAiHeaderTitle()})),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:SHARED_TEXT.closePanel()},{children:jsxRuntime.exports.jsx(IconButton,Object.assign({onClick:null==t?void 0:t.hidePanel,"aria-labelledby":"data-center-process-ai-close-panel","data-test":"data-center-process-ai-close-panel",size:"large"},{children:jsxRuntime.exports.jsx(Close,{})}))}))]})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"body2",color:"textSecondary","data-test":"data-center-process-ai-supported-files-title"},{children:SHARED_TEXT.processAiHeaderDescription()})),l===LoadingStatus.failed&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("br",{}),jsxRuntime.exports.jsx(Box,Object.assign({mt:4},{children:jsxRuntime.exports.jsxs(Alert,Object.assign({variant:"outlined",severity:"error"},{children:[jsxRuntime.exports.jsx("span",Object.assign({"data-test":"data-center-process-ai-failed-text"},{children:SHARED_TEXT.processAiFailedStatus()})),jsxRuntime.exports.jsx(Box,{children:jsxRuntime.exports.jsx(Button,Object.assign({"data-test":"data-center-process-ai-failed-retry-button",onClick:p},{children:SHARED_TEXT.processAiRetryBtn()}))})]}))}))]}),l===LoadingStatus.idle&&!(null!=d&&d.length)&&jsxRuntime.exports.jsx(Box,Object.assign({mt:4},{children:jsxRuntime.exports.jsx(Alert,Object.assign({variant:"outlined",severity:"info"},{children:SHARED_TEXT.processAiNoEngineCapability()}))})),l===LoadingStatus.pending&&jsxRuntime.exports.jsx("div",Object.assign({className:e.loaderIcon},{children:jsxRuntime.exports.jsx(CircularProgress,{})})),l===LoadingStatus.idle&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx(AICategories,{categories:d,closeSnackbar:()=>r(!1)}),jsxRuntime.exports.jsx(ActionsFooter,{confirmationOnCancel:!0,actionButton:g,cancelButton:x})]}),jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsx(JobLaunchSnackbar,{open:o,onClose:()=>r(!1),jobLaunchItems:c,onRetry:e=>{u(actions.job.launchJobStart({tdoId:t.tdoId,selectedEngines:[e]}))},hidePanel:null==t?void 0:t.hidePanel})})]}))};function __awaiter(e,o,r,l){return new(r=r||Promise)(function(s,t){function n(e){try{a(l.next(e))}catch(e){t(e)}}function i(e){try{a(l.throw(e))}catch(e){t(e)}}function a(e){var t;e.done?s(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(n,i)}a((l=l.apply(e,o||[])).next())})}function fetchEngineCapabilities(s,n,i){return __awaiter(this,void 0,void 0,function*(){var e="fetchEngineCapabilities",t="engineCategories";return(yield baseGraphQLApiWithError(Object.assign({query:"\n query fetchEngineCapabilities($limit: Int, $format: String!) {\n engineCategories(limit: $limit) {\n count\n offset\n limit\n records {\n name\n iconClass\n description\n name\n id\n engines(\n limit: $limit\n filter: {\n supportedInputFormats: [$format],\n state: active\n }\n ) {\n count\n offset\n limit\n records {\n id\n description\n name\n state\n signedIconPath\n edgeVersion\n fields {\n name\n type\n defaultValue\n defaultValues\n required\n max\n min\n options {\n __typename\n key\n value\n }\n }\n standaloneJobTemplates {\n type\n }\n libraryRequired\n supportedInputFormats\n }\n }\n }\n }\n }\n ",variables:{format:n,limit:i},operationName:e},s)))[t]})}function getTdoContentType(s,n){var i;return __awaiter(this,void 0,void 0,function*(){var e="getTdoContentType",t="temporalDataObject",e=yield baseGraphQLApiWithError(Object.assign({query:'\n query getTdoContentType($tdoId: ID!) {\n temporalDataObject(id: $tdoId) {\n primaryAsset(assetType: "media") {\n contentType\n }\n }\n }\n ',variables:{tdoId:n},operationName:e},s));return null==(i=null==(i=e[t])?void 0:i.primaryAsset)?void 0:i.contentType})}function launchSingleEngineJob(n,i,a,o,r){var l;return __awaiter(this,void 0,void 0,function*(){var e="launchSingleEngineJob",t="launchSingleEngineJob",s=null==o?void 0:o.filter(e=>null!==e.fieldValue),s={input:Object.assign(Object.assign(Object.assign({engineId:i},r&&{uploadUrl:r}),a&&{targetId:a}),(null==s?void 0:s.length)&&{fields:s})},s=yield baseGraphQLApiWithError(Object.assign({query:"\n mutation launchSingleEngineJob($input: SingleEngineJobInput!) {\n launchSingleEngineJob(input: $input) {\n id\n }\n }\n ",variables:s,operationName:e},n));return null==(l=s[t])?void 0:l.id})}function*fetchCapabilitiesHandler(e){try{var t=yield select(selectApiConfigs),s=yield select(preferredLanguageSelector),n=yield getTdoContentType(t,e.payload);const i=AIWareFormatMessage(s);if(!n)return yield put(showMessage({content:i({id:"os-data-center-process-ai.snackbar.processAiEngineError",defaultMessage:[{type:0,value:"This file can not be processed through any AI engines!"}]}),severity:MessageSeverity.Info})),void(yield put(actions.capabilitiesState.capabilitiesFetchSucceed()));const a=yield fetchEngineCapabilities(t,n,200),o=[],r={};null!==a&&void 0!==a&&a.records.forEach(e=>{0<e.engines.count&&(o.push({iconClass:e.iconClass,id:e.id,name:e.name,description:e.description}),r[e.id]=e.engines.records)}),yield put(actions.capabilitiesState.setCapabilities(o)),yield put(actions.capabilitiesState.setEngines(r)),yield put(actions.capabilitiesState.capabilitiesFetchSucceed())}catch(e){yield put(actions.capabilitiesState.capabilitiesFetchFailed()),console.log(e)}}function*getCapabilitiesWatcher(){yield takeLatest$1(actions.capabilitiesState.capabilitiesFetchStart.type,fetchCapabilitiesHandler)}function*launchSingleEngineJobSaga(e){try{const t=yield select(selectApiConfigs),{tdoId:s,selectedEngines:n}=e.payload;yield all(n.map(e=>launchSingleEngine(t,e.id,s,e.fields))),yield put(actions.job.launchJobSucceed())}catch(e){yield put(actions.job.launchJobFailed()),console.log(e)}}function*launchSingleEngine(e,t,s,n){try{yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.pending}));var i=yield call(launchSingleEngineJob,e,t,s,n);i||(yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.failed})),sdkEventManager.dispatch(SdkEvents.jobCreated,new SdkError("Job could not be created!"),{tdoId:s,engineId:t})),yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.success})),sdkEventManager.dispatch(SdkEvents.jobCreated,null,{jobId:i,engineId:t,tdoId:s})}catch(e){yield put(actions.processAiConfig.updateSingleJobStatus({engineId:t,status:LoadingStatus.failed})),sdkEventManager.dispatch(SdkEvents.jobCreated,new SdkError("Job could not be created!"),{tdoId:s,engineId:t}),console.log(e)}}function*getJobWatcher(){yield takeLatest$1(actions.job.launchJobStart.type,launchSingleEngineJobSaga)}function*rootSaga(){yield all([getCapabilitiesWatcher(),getJobWatcher()])}function getDataCenterProcessAIModule(){return{id:SLICE_NAME,reducerMap:{[SLICE_NAME]:rootReducer},sagas:[rootSaga],initialActions:[]}}const DataCenterProcessAI=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getDataCenterProcessAIModule(),getLibraryModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(ProcessAIManager,Object.assign({},e))}))})}))}),formatLabel=(!function(e){e.Number="Number",e.Picklist="Picklist",e.MultiPicklist="MultiPicklist",e.Text="Text",e.SchemaSelection="SchemaSelection"}(EngineFieldType=EngineFieldType||{}),(e="")=>lodash.exports.startCase(e)),getFieldErrorMessage=e=>{const{required:t,value:s,min:n,max:i,type:a,values:o}=e;if(lodash.exports.isEmpty(a===EngineFieldType.MultiPicklist?o:s))return t?"This field can't be blank!":"";if(a===EngineFieldType.Number){if(lodash.exports.isNumber(n)&&Number(s)<n)return"The value can't be lower than "+n.toFixed(2);if(lodash.exports.isNumber(i)&&Number(s)>i)return"The value can't be higher than "+i.toFixed(2)}return""},checkFieldsValidation=(e,o)=>e.every(e=>{let t=!0;var{required:e,type:s,min:n,max:i,name:a}=e,a=o[a];return e&&lodash.exports.isEmpty(a)&&(t=!1),t=s===EngineFieldType.Number&&(lodash.exports.isNumber(n)&&Number(a)<n||lodash.exports.isNumber(i)&&Number(a)>i)?!1:t}),useStyles$1=makeStyles()(e=>({engineOuterContainer:{position:"relative",overflow:"hidden",borderRadius:"4px",marginTop:10},engineContainer:{border:"0.5px solid #D5DFE9",borderRadius:"4px",transition:"border-color 250ms"},engineUnavailable:{opacity:.5},engineUnavailableWarningContainer:{top:"0",left:"0",width:"100%",height:"100%",opacity:"1",position:"absolute",display:"flex",justifyContent:"center",alignItems:"center",transition:"all 500ms ease-in-out",borderRadius:"4px",boxSizing:"border-box"},engineUnavailableWarning:{color:"rgb(13, 60, 97)",width:"80%",display:"flex",padding:"13px 6px",paddingTop:"8px",textAlign:"center",alignItems:"center",borderRadius:"7px",backgroundColor:"rgb(232, 244, 253)",boxShadow:"rgb(0 0 0 / 7%) 0px 3px 5px -1px, rgb(0 0 0 / 4%) 0px 6px 10px 0px, rgb(0 0 0 / 3%) 0px 1px 18px 0px"},engineUnavailableWarningIcon:{marginRight:"5px"},engineContainerActive:{borderColor:"#187600"},engineHeader:{display:"flex",flexDirection:"row",padding:"20px"},libraryWrapper:{marginTop:12,"& > div":{width:"100%"}},iconBackground:{display:"flex",justifyContent:"center",alignItems:"center",height:"40px",borderRadius:"25px",width:"40px",minHeight:"40px",minWidth:"40px",background:"#F2F5F9",marginRight:"15px"},engineImgIcon:{width:"30px",height:"30px"},engineInfoContainer:{position:"relative",flex:1},engineName:{fontSize:"14px",fontWeight:400,lineHeight:"19.1px"},engineDescription:{fontSize:"12px",fontWeight:400,lineHeight:"16.37px",overflow:"hidden",textOverflow:"ellipsis"},engineEstimatedCost:{color:"#1B1D1F",marginTop:"10px",fontSize:"12px"},engineContent:{overflowX:"hidden",overflowY:"auto",height:"auto",boxSizing:"border-box",width:"100%",padding:"16px 20px 20px 20px",display:"none"},engineSettingsLabel:{fontSize:14,fontWeight:600,color:"#1B1D1F"},footerActionBtn:{width:"100%",backgroundColor:"#FAFAFA",color:e.palette.text.primary,fontSize:"12px",padding:"10px"},isExpanded:{height:"auto",display:"flex",borderTop:"0.5px solid #D5DFE9",flexDirection:"column"},savedAndConfiguredBtn:{backgroundColor:"#ECFAE4",color:"#187600",width:"100%",fontSize:"12px",padding:"10px",pointerEvents:"none",cursor:"default","&:hover":{backgroundColor:"#ECFAE4",color:"#187600"}},icon:{fontSize:"15px",marginRight:"13px"},savedAndConfiguredBtnIcon:{color:"#187600"},deselectBtn:{fontSize:"8px",position:"absolute",right:"-20px",top:"-20px"},field:{width:"100%"},footerBtnContainer:{display:"flex",alignItems:"center",flex:1,padding:4,backgroundColor:"#fafafa",borderBottomLeftRadius:4,borderBottomRightRadius:4,border:"1px solid #FFF","& button":{flex:1,fontSize:12}},footerBtnContainerActive:{backgroundColor:"#ECFAE4","& .btnContBorder":{background:"#187600"},"& button":{color:"#187600"}},btnContBorder:{margin:"0 4px",height:18,width:1,background:"#555f7c"},formControlWrapper:{marginTop:15},inputLabel:{fontFamily:"Nunito",fontWeight:300,display:"block",fontSize:14,color:"#5C6269",marginBottom:6},inputLabelError:{color:e.palette.error.main}})),TxtField=({id:e,required:t,type:s,value:n,onChange:i,error:a=!1})=>{var o=useStyles$1()["classes"];return jsxRuntime.exports.jsx(TextField,{id:e,InputLabelProps:{shrink:!0},autoComplete:"off",required:t,value:n,type:s||"",className:o.field,onChange:i,size:"small",error:a})},SelectList=({id:e,value:t,required:s,options:n,onChange:i,error:a=!1})=>{var o=useStyles$1()["classes"];return jsxRuntime.exports.jsx(Select,Object.assign({id:e,required:s,value:void 0!==t?t:null,className:o.field,onChange:i,variant:"outlined",style:{width:"100%"},error:a,inputProps:{name:e,id:e}},{children:null==n?void 0:n.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.key})))}))},MultiSelectList=({id:e,values:t,required:s,options:n,onChange:i,error:a=!1})=>{var o={PaperProps:{style:{maxHeight:224,width:250}}};return jsxRuntime.exports.jsx(Select,Object.assign({id:e,required:s,value:t,multiple:!0,onChange:i,variant:"outlined",error:a,input:jsxRuntime.exports.jsx(Input,{id:"select-multiple-chip-"+e}),renderValue:e=>jsxRuntime.exports.jsx("div",{children:null==e?void 0:e.map(e=>jsxRuntime.exports.jsx(Chip$1,{style:{marginRight:6},label:e},e))}),MenuProps:o},{children:null==n?void 0:n.map(e=>jsxRuntime.exports.jsx(MenuItem,Object.assign({value:null==e?void 0:e.value},{children:null==e?void 0:e.key})))}))},ComponentLoader=({fields:e,onChange:r,showErrors:l=!1})=>{const c=useStyles$1()["classes"];return jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment,{children:null==(e=e)?void 0:e.map((t,e)=>{var s=formatLabel((null==t?void 0:t.name)||""),n=`engine-configuration-input--${null==t?void 0:t.name}-idx-`+e,i=e=>{r({fieldName:null==t?void 0:t.name,fieldValue:e.target.value})};let a;var o=!!getFieldErrorMessage(t)&&l;switch(null==t?void 0:t.type){case EngineFieldType.Picklist:a=jsxRuntime.exports.jsx(SelectList,{id:n,label:s,required:null==t?void 0:t.required,options:null==t?void 0:t.options,value:null==t?void 0:t.value,onChange:i,error:o});break;case EngineFieldType.Text:a=jsxRuntime.exports.jsx(TxtField,{id:n,label:s,required:null==t?void 0:t.required,value:null==t?void 0:t.value,onChange:i,error:o});break;case EngineFieldType.Number:a=jsxRuntime.exports.jsx(TxtField,{id:n,label:s,required:null==t?void 0:t.required,value:null==t?void 0:t.value,type:"number",onChange:i,error:o});break;case EngineFieldType.MultiPicklist:a=jsxRuntime.exports.jsx(MultiSelectList,{id:n,label:null==t?void 0:t.name,required:null==t?void 0:t.required,options:null==t?void 0:t.options,values:(null==t?void 0:t.values)||[],onChange:i,error:o});break;default:return null}return jsxRuntime.exports.jsxs(FormControl,Object.assign({error:o,size:"small",className:c.formControlWrapper},{children:[jsxRuntime.exports.jsx("label",Object.assign({htmlFor:n,className:c.inputLabel+" "+(o&&c.inputLabelError)},{children:s})),a,o&&jsxRuntime.exports.jsx(FormHelperText,{children:getFieldErrorMessage(t)})]}))})})},Engine=({id:e,name:t,description:s,saved:n,libraryRequired:i,fields:a,onSave:o,onDeselect:r,iconName:l,defaultConfiguration:c,isEngineAvailable:d=!0,signedIconPath:u})=>{const p=useStyles$1()["classes"];var g=useSelector(selectors$1.selectLoadingStatus);const[x,m]=react.exports.useState(!1),[j,b]=react.exports.useState({}),[h,f]=react.exports.useState(!1),[S,v]=react.exports.useState(!1),[y,C]=react.exports.useState(!1),[R,E]=react.exports.useState(null),[I,A]=react.exports.useState(null);g=i&&"pending"===g;const T=t=>{b(e=>Object.assign(Object.assign({},e),{[t.fieldName]:t.fieldValue}))};const L=()=>checkFieldsValidation(a,j)?i&&!j.libraryId?v(!0):(o&&o({id:e,name:t,fields:Object.keys(j).map(e=>({fieldName:e,fieldValue:j[e]}))}),void m(!1)):f(!0);const M=()=>{const s={};c?c.forEach(e=>s[e.fieldName]=e.fieldValue):(i&&(s.libraryId=""),null!=a&&a.length&&a.forEach(e=>{var t=e.type===EngineFieldType.MultiPicklist?e.defaultValues:e.defaultValue;s[e.name]=t})),b(s)};react.exports.useEffect(()=>{M()},[]);var N=null==a?void 0:a.map(e=>{const t=Object.assign({},e);var s=e.type===EngineFieldType.MultiPicklist?"values":"value";return t[s]=j[e.name],t});return jsxRuntime.exports.jsxs("div",Object.assign({onMouseEnter:()=>{var e;d||(e=setTimeout(()=>{C(!0)},500),E(e))},onMouseLeave:()=>{d||(C(!1),clearTimeout(R))},className:p.engineOuterContainer},{children:[jsxRuntime.exports.jsxs("div",Object.assign({className:`${p.engineContainer} ${n&&p.engineContainerActive} `+(!d&&p.engineUnavailable)},{children:[jsxRuntime.exports.jsxs("header",Object.assign({className:p.engineHeader},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:p.iconBackground},{children:u&&!1!==I?jsxRuntime.exports.jsx("img",{alt:"Engine Logo",className:p.engineImgIcon,src:u,onLoad:e=>{A(!0)},onError:e=>{A(!1)}}):jsxRuntime.exports.jsx(Icon,{color:"secondary",fontSize:"small",component:EngineCategoryIcons[l]})})),jsxRuntime.exports.jsxs("div",Object.assign({className:p.engineInfoContainer},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"engine-category-name-"+t,variant:"h6",color:"textPrimary",className:p.engineName},{children:t})),jsxRuntime.exports.jsx(Typography$1,Object.assign({"data-test":"engine-category-description-"+t,variant:"body2",color:"textSecondary",className:p.engineDescription},{children:s}))]}))]})),jsxRuntime.exports.jsxs("main",Object.assign({id:"engine-main-content-"+e,className:p.engineContent+" "+(x?p.isExpanded:"")},{children:[jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle2",color:"textSecondary",className:p.engineSettingsLabel},{children:SHARED_TEXT.engineSettings()})),i&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.libraryWrapper},{children:[jsxRuntime.exports.jsx("label",Object.assign({className:p.inputLabel},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.ro5ll8",defaultMessage:"Libraries",description:"The label for the library selection"})})),jsxRuntime.exports.jsx(LibraryDropdown,{engineId:e,defaultSelected:j.libraryId,onSelectedLibraryId:e=>{T({fieldName:"libraryId",fieldValue:e})}}),S&&jsxRuntime.exports.jsx(FormHelperText,Object.assign({error:!0},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-data-center-process-ai.ro4mn3",defaultMessage:"Please select a library.",description:"Missing library message"})}))]})),jsxRuntime.exports.jsx(ComponentLoader,{showErrors:h,fields:N,onChange:T})]})),jsxRuntime.exports.jsxs("footer",{children:[x&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.footerBtnContainer},{children:[jsxRuntime.exports.jsxs(Button,Object.assign({id:"selected-engine-cancel-btn-"+e,className:p.footerActionBtn,onClick:()=>{m(!1),M()}},{children:[jsxRuntime.exports.jsx(Icon,{component:Remove,color:"secondary",fontSize:"small",className:""+p.icon}),SHARED_TEXT.cancel()]})),(0<(null==a?void 0:a.length)||i)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("span",{className:p.btnContBorder}),jsxRuntime.exports.jsxs(Button,Object.assign({id:"engine-save-settings-btn-"+e,className:p.footerActionBtn,onClick:L,disabled:g},{children:[jsxRuntime.exports.jsx(Icon,{component:Save,color:"secondary",fontSize:"small",className:p.icon}),SHARED_TEXT.saveSettings()]}))]})]})),!n&&!x&&jsxRuntime.exports.jsxs(Button,Object.assign({id:"engine-use-engine-btn-"+e,className:p.footerActionBtn,onClick:()=>{null!=a&&a.length||i?m(e=>!e):L()},disabled:!d},{children:[jsxRuntime.exports.jsx(Icon,{component:Add,color:"secondary",fontSize:"small",className:p.icon}),SHARED_TEXT.useThisEngine()]})),n&&!x&&jsxRuntime.exports.jsxs("div",Object.assign({className:p.footerBtnContainer+" "+p.footerBtnContainerActive},{children:[jsxRuntime.exports.jsxs(Button,Object.assign({id:"selected-engine-remove-btn-"+e,onClick:()=>{r&&r(e),M()}},{children:[jsxRuntime.exports.jsx(Icon,{component:Delete,color:"secondary",fontSize:"small",className:p.icon+" "+p.savedAndConfiguredBtnIcon}),SHARED_TEXT.removeEngine()]})),(0<(null==a?void 0:a.length)||i)&&jsxRuntime.exports.jsxs(jsxRuntime.exports.Fragment,{children:[jsxRuntime.exports.jsx("span",{className:p.btnContBorder}),jsxRuntime.exports.jsxs(Button,Object.assign({id:"selected-engine-edit-configration-btn-"+e,onClick:()=>m(!0)},{children:[jsxRuntime.exports.jsx(Icon,{component:Edit,color:"secondary",className:p.icon+" "+p.savedAndConfiguredBtnIcon}),SHARED_TEXT.editConfigurations()]}))]})]}))]})]})),!d&&y&&jsxRuntime.exports.jsx("div",Object.assign({className:p.engineUnavailableWarningContainer},{children:jsxRuntime.exports.jsxs("div",Object.assign({className:p.engineUnavailableWarning},{children:[jsxRuntime.exports.jsx(default_1,{className:p.engineUnavailableWarningIcon,style:{color:"#2196f3"}})," ",jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"subtitle2"},{children:SHARED_TEXT.processAiEngineUnavailable()}))]}))}))]}))},useStyles=makeStyles()(e=>({engineSelectionWrapper:{padding:20,display:"flex",flexDirection:"column",height:"calc(100vh - 60px)"},enginSelectionHeader:{display:"flex",alignItems:"center",flexDirection:"row",justifyContent:"space-between",marginBottom:20},loaderIcon:{display:"flex",alignItems:"center",justifyContent:"center",marginTop:20},engineListWrapper:{flex:1,overflowY:"scroll"},footerActionButtons:{display:"flex",alignItems:"center",justifyContent:"flex-end",marginTop:25,"& > *":{marginLeft:e.spacing(2)}}})),EngineSelection=({capability:e,hidePanel:t})=>{var s=useStyles()["classes"];const n=useDispatch(),i=useSelector(selectEnginesByCapabilityId(e.id)),a=useSelector(selectSelectedEnginesByCapabilityId(e.id)),[o,r]=react.exports.useState([]),l=e.name.replace(/[^a-zA-Z]/g,""),c=t=>{r(e=>e.filter(e=>e.id!==t))},d=t=>{r(e=>[...e.filter(e=>e.id!==t.id),t])};return react.exports.useEffect(()=>{a&&r(a)},[]),jsxRuntime.exports.jsxs("div",Object.assign({className:s.engineSelectionWrapper},{children:[jsxRuntime.exports.jsx("div",Object.assign({className:s.enginSelectionHeader},{children:jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",color:"secondary","data-test":"data-center-engine-selection-panel-header-title"},{children:e.name}))})),jsxRuntime.exports.jsx("div",Object.assign({className:s.engineListWrapper},{children:i.map(e=>{var t,s,n;return jsxRuntime.exports.jsx(Engine,{id:e.id,name:e.name,description:e.description,estimatedCost:"4.00",fields:(null==e?void 0:e.fields)||[],saved:(n=e.id,null===o||void 0===o?void 0:o.some(e=>e.id===n)),onSave:d,onDeselect:c,iconName:l,signedIconPath:null==e?void 0:e.signedIconPath,defaultConfiguration:(t=e.id,null==(s=null===a||void 0===a?void 0:a.find(e=>e.id===t))?void 0:s.fields),libraryRequired:e.libraryRequired,isEngineAvailable:0<(null==(s=e.standaloneJobTemplates)?void 0:s.length)})})})),jsxRuntime.exports.jsxs("div",Object.assign({className:s.footerActionButtons},{children:[jsxRuntime.exports.jsx(Button,Object.assign({onClick:t},{children:SHARED_TEXT.cancel()})),jsxRuntime.exports.jsx(Button,Object.assign({variant:"contained",color:"primary",onClick:()=>{n(actions.processAiConfig.setConfigurations({capabilityId:e.id,selectedEngines:o})),null!=t&&t()},disabled:!(null!==a&&void 0!==a&&a.length||null!==o&&void 0!==o&&o.length)},{children:SHARED_TEXT.processAiAddEngines()}))]}))]}))},DataCenterEngineSelection=e=>jsxRuntime.exports.jsx(CacheProvider,Object.assign({value:muiCache},{children:jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getDataCenterProcessAIModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(EngineSelection,Object.assign({},e))})}))})}));export{DataCenterEngineSelection,DataCenterProcessAI};
|
|
1
|
+
import{cg as createSelector,O as rootApiSelector,R as graphEndpointSelector,Q as sessionTokenSelector,m as makeStyles,j as jsxRuntime,F as FormattedMessage,g3 as ApplicationTabIcon,g4 as Lock,g5 as SecurityGroup,fU as Group,ci as AIWareThemeProvider,K as lib,A as AIWareIntlProvider,k as useSelector,r as react,eZ as panelsSelector,a8 as Tooltip,a9 as IconButton,fw as Hamburger,T as Typography$1,ck as FullscreenExit,cl as Fullscreen,bV as Hide,b0 as Tabs,x as classnames,b1 as Tab,Y as Portal}from"./js-core.esm.js";import{G as GroupsPanel,g as getAdminCenterGroupsModule}from"./js-core.esm33.js";import{PermissionSets,AccessControl,getAdminCenterPermissionsModule}from"./js-core.esm32.js";import{ApplicationsTab,getAdminCenterApplicationsModule}from"./js-core.esm40.js";import"./js-core.esm8.js";import"./js-core.esm21.js";import"./js-core.esm25.js";import"./js-core.esm34.js";import"./js-core.esm22.js";import"./js-core.esm20.js";!function(){var e={};try{if(process)return process.env=Object.assign({},process.env),Object.assign(process.env,e)}catch(e){}globalThis.process={env:e}}();const selectApiConfigs=createSelector([rootApiSelector,graphEndpointSelector,sessionTokenSelector],(e,t,s)=>({apiRoot:e,graphQLEndpoint:t,token:s})),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,isNavExpanded:t,onLeftNavigationToggle:s,onFullScreenToggle:i,isFullScreen:a,height:n})=>{n=useStyles$2({height:n}).classes;return jsxRuntime.exports.jsxs("header",Object.assign({className:n.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:s,"aria-expanded":t,"aria-labelledby":"ac-header-toggle-nav","data-test":"ac-header-toggle-nav",size:"large"},{children:jsxRuntime.exports.jsx(Hamburger,{})}))})),jsxRuntime.exports.jsx(Typography$1,Object.assign({variant:"h1",className:n.title,"data-test":"ac-title"},{children:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.header.title",defaultMessage:"Admin Center",description:"Panel header of the admin center"})})),jsxRuntime.exports.jsxs("div",Object.assign({className:n.headerActionContainer},{children:[jsxRuntime.exports.jsx("div",{className:n.verticalDivider}),jsxRuntime.exports.jsx(Tooltip,Object.assign({title:a?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:i,"aria-labelledby":"ac-toggle-fullscreen","data-test":"ac-fullscreen-toggle",size:"large"},{children:a?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",size:"large"},{children:jsxRuntime.exports.jsx(Hide,{})}))}))]}))]}))};function __rest(e,t){var s={};for(a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(s[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(s[a[i]]=e[a[i]]);return s}var AdminCenterView;!function(e){e[e.applications=0]="applications",e[e.permissionSets=1]="permissionSets",e[e.accessControl=2]="accessControl",e[e.groups=3]="groups"}(AdminCenterView=AdminCenterView||{});const tabWidth=197,useStyles$1=makeStyles()((e,{height:t},s)=>({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",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),["& "+s.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"}}})),navList=[{id:AdminCenterView.applications,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.applications.view",defaultMessage:"Applications",description:"The label for Application view"}),testLabel:"ac-applications-view",icon:jsxRuntime.exports.jsx(ApplicationTabIcon,{style:{margin:"9px 5px 0 5px"}}),content:e=>jsxRuntime.exports.jsx(ApplicationsTab,{isPanelFullScreen:e})},{id:AdminCenterView.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:e=>jsxRuntime.exports.jsx(PermissionSets,{isPanelFullScreen:e})},{id:AdminCenterView.accessControl,label:jsxRuntime.exports.jsx(FormattedMessage,{id:"os-admin-center-browse.access.control.view",defaultMessage:"Access Control",description:"The label of access control tab button."}),testLabel:"ac-access-control-view",icon:jsxRuntime.exports.jsx(SecurityGroup,{}),content:e=>jsxRuntime.exports.jsx(AccessControl,{isPanelFullScreen:e})},{id:AdminCenterView.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,{}),content:e=>jsxRuntime.exports.jsx(GroupsPanel,{isPanelFullScreen:e})}],MainTabPanel=({isNavExpanded:t,isFullScreen:s,height:e})=>{const i=useStyles$1({height:e})["classes"],[a,n]=react.exports.useState(AdminCenterView.applications);return jsxRuntime.exports.jsxs("div",Object.assign({className:i.root},{children:[jsxRuntime.exports.jsx(Tabs,Object.assign({id:"adminCenterViewTabs",orientation:"vertical",value:a,onChange:(e,t)=>{n(t)},className:classnames(i.tabs,{[i.tabsExpanded]:t}),classes:{flexContainer:i.tabsContainer,indicator:i.tabIndicator},"aria-label":"admin center tabs","data-test":"ac-nav-tabs-container"},{children:navList.map(e=>jsxRuntime.exports.jsx(Tooltip,Object.assign({placement:"right",title:t?"":e.label,"data-test":"ac-nav-tab-"+e.testLabel},{children:jsxRuntime.exports.jsx(Tab,Object.assign({wrapped:!0},a11yProps(e.id),{label:t?e.label:"",icon:e.icon,classes:{root:i.tabRoot,wrapped:t?i.tabExpandedWrapper:i.tabWrapper,selected:t?i.tabExpandedSelected:i.tabSelected}}))}),e.id))})),navList.map(e=>jsxRuntime.exports.jsx(TabPanel,Object.assign({value:a,index:e.id,className:i.contentPanel},{children:e.content(s)}),e.id))]}))};function TabPanel(e){var{children:t,value:s,index:i}=e,e=__rest(e,["children","value","index"]);return jsxRuntime.exports.jsx("div",Object.assign({role:"tabpanel",hidden:s!==i,id:"admin-center-tabpanel-"+i,"aria-labelledby":"admin-center-tab-"+i},e,{children:s===i&&t}))}function a11yProps(e){return{id:"admin-center-tab-"+e,"aria-controls":"admin-center-tabpanel-"+e}}const Container=({fullScreen:e,classes:t,dimmed:s,children:i})=>e?jsxRuntime.exports.jsx(Portal,{children:jsxRuntime.exports.jsxs("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classnames(t.root,t.panel,t.fullScreen)},{children:[s&&jsxRuntime.exports.jsx("div",{className:t.overlay}),i]}))}):jsxRuntime.exports.jsx("div",Object.assign({role:"presentation","data-test":"ac-widget",className:classnames(t.root,t.panel)},{children:i})),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,zIndex:1004},overlay:{backgroundColor:e.palette.grey[50],opacity:"0.5 !important",height:"100%",position:"absolute",top:0,width:"100%",zIndex:1001}})),MainLayout=({hidePanel:e})=>{const[t,s]=react.exports.useState(!0),[i,a]=react.exports.useState(!1);var n=useStyles()["classes"];const r=useSelector(panelsSelector)||[];var o=r.find(e=>"ADMIN_CENTER_BROWSE"===e.panelId)||{panelConfig:{dimmed:0}},o=0<(null==(o=null===o?void 0:o.panelConfig)?void 0:o.dimmed),l=`calc(100vh - ${i?25:appBarHeight+borderBottom}px - ${headerHeight}px)`;return jsxRuntime.exports.jsxs(Container,Object.assign({dimmed:o,fullScreen:i,classes:n},{children:[jsxRuntime.exports.jsx(Header,{height:headerHeight,hidePanel:e,isNavExpanded:t,onLeftNavigationToggle:()=>{s(!t)},isFullScreen:i,onFullScreenToggle:()=>{a(!i)}}),jsxRuntime.exports.jsx(MainTabPanel,{height:l,isNavExpanded:t,isFullScreen:i})]}))},Content=e=>{var{apiRoot:t,graphQLEndpoint:s,token:i}=useSelector(selectApiConfigs);return t&&s&&i?jsxRuntime.exports.jsx(MainLayout,Object.assign({},e)):null},AdminCenterBrowse=e=>jsxRuntime.exports.jsx(AIWareThemeProvider,{children:jsxRuntime.exports.jsx(lib.DynamicModuleLoader,Object.assign({modules:[getAdminCenterGroupsModule(),getAdminCenterPermissionsModule(),getAdminCenterApplicationsModule()]},{children:jsxRuntime.exports.jsx(AIWareIntlProvider,{children:jsxRuntime.exports.jsx(Content,Object.assign({},e))})}))});export{AdminCenterBrowse};
|