aiware-js 1.0.0-master.1375 → 1.0.0-master.1376
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js-core.esm17.js +1 -1
- package/js-core.esm17.js.gz +0 -0
- package/js-core.esm52.js +1 -1
- package/js-core.esm52.js.gz +0 -0
- package/locales/es.json +1 -1
- package/locales/fr.json +1 -1
- package/package.json +1 -1
package/js-core.esm17.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as unmountPanel$1,p as hidePanel$1,q as unmountAllPanel$1,t as getUniqueID,v as mountPanel$1,w as AvailableWidgets,x as updatePanelMicroFrontendProps,s as setData,y as mountWidget,z as unmountWidget,D as updateTokenRequest,E as logout,F as updateActivityStatus,H as HelpCenter,G as DataCenter,I as mountPanelForResponse$1,J as takeEvery$1,K as select}from"./js-core.esm4.js";import{setCustomKnowledgeBaseUrl,setCustomDocsUrl,updateSelectedTab}from"./js-core.esm18.js";import"./js-core.esm7.js";import"./js-core.esm14.js";function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _create_class(e,t,n){return t&&_defineProperties(e.prototype,t),e}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RateLimiter=(()=>{function e(){_class_call_check(this,e),_define_property(this,"lastCall",void 0),this.lastCall=null}return _create_class(e,[{key:"checkIfCanCall",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}]),e})();function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){var n;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}function _ts_generator(r,a){var o,i,l,u={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(l=2&t[0]?i.return:t[0]?i.throw||((l=i.return)&&l.call(i),0):i.next)&&!(l=l.call(i,t[1])).done)return l;switch(i=0,(t=l?[2&t[0],l.value]:t)[0]){case 0:case 1:l=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,i=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(l=0<(l=u.trys).length&&l[l.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!l||t[1]>l[0]&&t[1]<l[3]))u.label=t[1];else if(6===t[0]&&u.label<l[1])u.label=l[1],l=t;else{if(!(l&&u.label<l[2])){l[2]&&u.ops.pop(),u.trys.pop();continue}u.label=l[2],u.ops.push(t)}}t=a.call(r,u)}catch(e){t=[6,e],i=0}finally{o=l=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var rateLimiter=new RateLimiter,createAuthHelpers=function(t){return{updateToken:function(e){e?t.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout:function(e){"function"==typeof e?(e(),setTimeout(function(){t.dispatch(logout())},1e3)):t.dispatch(logout())},reportAppActivity:function(e){rateLimiter.checkIfCanCall(e)&&t.dispatch(updateActivityStatus())}}},helpCenter=function(){var e=new HelpCenter({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}},dataCenter=function(){var e=new DataCenter;return{openImporterPanel:e.openImporterPanel.bind(e)}},unmountPanel=function(t){return function(e){return t.dispatch(unmountPanel$1(e)),!0}},hidePanel=function(t){return function(e){return t.dispatch(hidePanel$1(e)),!0}},unmountAllPanel=function(e){return function(){e.dispatch(unmountAllPanel$1(""))}},mountPanel=function(o){return function(e,n){var r=e.panelId||getUniqueID(),t=e.panelConfig,a=(o.dispatch(mountPanel$1({microFrontend:e.microFrontend,panelId:r,panelConfig:t})),_to_consumable_array((null==t||null==(e=t.header)?void 0:e.actions)||[]).concat(_to_consumable_array((null==t||null==(e=t.footer)?void 0:e.actions)||[])).filter(function(e){return e.submit}).map(function(e){return e.action}));return o.addModule({id:r,sagas:[function(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,takeEvery$1(a.map(function(e){return e.type}),function(){var t;return _ts_generator(this,function(e){switch(e.label){case 0:return[4,select(function(e){return e.data.find(function(e){return e.id===r})})];case 1:return t=e.sent().data,n&&n(t),[2]}})})];case 1:return e.sent(),[2]}})}]}),r}},mountPanelForResponse=function(t){return function(e){return mountPanelForResponse$1(e,t)}},attachSdkToWindow=function(e){var t=e.init,n=e.store,r=e.aiwareEvents,e=e.bootstrapOptions;!window||void 0!==window.aiware&&0!==Object.keys(window.aiware).length||(window.aiware={init:t,store:n,auth:createAuthHelpers(n),helpCenter:helpCenter(),dataCenter:dataCenter(),on:r.on,off:r.off,hidePanel:hidePanel(n),unmountPanel:unmountPanel(n),mountPanel:mountPanel(n),mountPanelForResponse:mountPanelForResponse(n),registry:e.registry,registryLookup:e.registryLookup,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,unmountWidget:unmountWidget,commit:"
|
|
1
|
+
import{o as unmountPanel$1,p as hidePanel$1,q as unmountAllPanel$1,t as getUniqueID,v as mountPanel$1,w as AvailableWidgets,x as updatePanelMicroFrontendProps,s as setData,y as mountWidget,z as unmountWidget,D as updateTokenRequest,E as logout,F as updateActivityStatus,H as HelpCenter,G as DataCenter,I as mountPanelForResponse$1,J as takeEvery$1,K as select}from"./js-core.esm4.js";import{setCustomKnowledgeBaseUrl,setCustomDocsUrl,updateSelectedTab}from"./js-core.esm18.js";import"./js-core.esm7.js";import"./js-core.esm14.js";function _class_call_check(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _create_class(e,t,n){return t&&_defineProperties(e.prototype,t),e}function _define_property(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var RateLimiter=(()=>{function e(){_class_call_check(this,e),_define_property(this,"lastCall",void 0),this.lastCall=null}return _create_class(e,[{key:"checkIfCanCall",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1;return e<1&&(e=1),(!this.lastCall||(new Date).getTime()-this.lastCall>=6e4*e)&&(this.lastCall=(new Date).getTime(),!0)}}]),e})();function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _array_without_holes(e){if(Array.isArray(e))return _array_like_to_array(e)}function _iterable_to_array(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _to_consumable_array(e){return _array_without_holes(e)||_iterable_to_array(e)||_unsupported_iterable_to_array(e)||_non_iterable_spread()}function _unsupported_iterable_to_array(e,t){var n;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_array_like_to_array(e,t):void 0}function _ts_generator(r,a){var o,i,l,u={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(n){return function(e){var t=[n,e];if(o)throw new TypeError("Generator is already executing.");for(;u;)try{if(o=1,i&&(l=2&t[0]?i.return:t[0]?i.throw||((l=i.return)&&l.call(i),0):i.next)&&!(l=l.call(i,t[1])).done)return l;switch(i=0,(t=l?[2&t[0],l.value]:t)[0]){case 0:case 1:l=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,i=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(l=0<(l=u.trys).length&&l[l.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!l||t[1]>l[0]&&t[1]<l[3]))u.label=t[1];else if(6===t[0]&&u.label<l[1])u.label=l[1],l=t;else{if(!(l&&u.label<l[2])){l[2]&&u.ops.pop(),u.trys.pop();continue}u.label=l[2],u.ops.push(t)}}t=a.call(r,u)}catch(e){t=[6,e],i=0}finally{o=l=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var rateLimiter=new RateLimiter,createAuthHelpers=function(t){return{updateToken:function(e){e?t.dispatch(updateTokenRequest({token:e})):console.error("[AiWARE JS]: Please provide a valid token!")},logout:function(e){"function"==typeof e?(e(),setTimeout(function(){t.dispatch(logout())},1e3)):t.dispatch(logout())},reportAppActivity:function(e){rateLimiter.checkIfCanCall(e)&&t.dispatch(updateActivityStatus())}}},helpCenter=function(){var e=new HelpCenter({actions:{setCustomKnowledgeBaseUrlAction:setCustomKnowledgeBaseUrl,setCustomDocsUrlAction:setCustomDocsUrl,updateSelectedTabAction:updateSelectedTab}});return{openKnowledgeBasePanel:e.openKnowledgeBasePanel.bind(e),openDocsPanel:e.openDocsPanel.bind(e)}},dataCenter=function(){var e=new DataCenter;return{openImporterPanel:e.openImporterPanel.bind(e)}},unmountPanel=function(t){return function(e){return t.dispatch(unmountPanel$1(e)),!0}},hidePanel=function(t){return function(e){return t.dispatch(hidePanel$1(e)),!0}},unmountAllPanel=function(e){return function(){e.dispatch(unmountAllPanel$1(""))}},mountPanel=function(o){return function(e,n){var r=e.panelId||getUniqueID(),t=e.panelConfig,a=(o.dispatch(mountPanel$1({microFrontend:e.microFrontend,panelId:r,panelConfig:t})),_to_consumable_array((null==t||null==(e=t.header)?void 0:e.actions)||[]).concat(_to_consumable_array((null==t||null==(e=t.footer)?void 0:e.actions)||[])).filter(function(e){return e.submit}).map(function(e){return e.action}));return o.addModule({id:r,sagas:[function(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,takeEvery$1(a.map(function(e){return e.type}),function(){var t;return _ts_generator(this,function(e){switch(e.label){case 0:return[4,select(function(e){return e.data.find(function(e){return e.id===r})})];case 1:return t=e.sent().data,n&&n(t),[2]}})})];case 1:return e.sent(),[2]}})}]}),r}},mountPanelForResponse=function(t){return function(e){return mountPanelForResponse$1(e,t)}},attachSdkToWindow=function(e){var t=e.init,n=e.store,r=e.aiwareEvents,e=e.bootstrapOptions;!window||void 0!==window.aiware&&0!==Object.keys(window.aiware).length||(window.aiware={init:t,store:n,auth:createAuthHelpers(n),helpCenter:helpCenter(),dataCenter:dataCenter(),on:r.on,off:r.off,hidePanel:hidePanel(n),unmountPanel:unmountPanel(n),mountPanel:mountPanel(n),mountPanelForResponse:mountPanelForResponse(n),registry:e.registry,registryLookup:e.registryLookup,AvailableWidgets:AvailableWidgets,mountPanelAction:mountPanel$1,unmountPanelAction:unmountPanel$1,hidePanelAction:hidePanel$1,updatePanelMicroFrontendPropsAction:updatePanelMicroFrontendProps,setData:setData,mountWidget:mountWidget,unmountWidget:unmountWidget,commit:"c299a4644b"})};export{attachSdkToWindow,hidePanel,mountPanel,unmountAllPanel,unmountPanel};
|
package/js-core.esm17.js.gz
CHANGED
|
Binary file
|
package/js-core.esm52.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aA as ELoadingStatus,a0 as createSlice,ad as combineReducers,au as AvailableComponents,j as jsxRuntimeExports,A as AIWareCacheProvider,b as AIWareThemeProvider,B as Box,r as reactExports,u as useSelector,p as hidePanel,at as betaFeaturesSelector,ao as selectIsFullscreenEnabled,aC as AvailablePanels,aG as EPanelSize,_ as all,a9 as isEqual,a7 as baseGraphQLApi,a8 as baseGraphQLApiWithError,am as takeLatest$1,v as mountPanel,aB as img$Q}from"./js-core.esm4.js";import{m as makeStyles,D as DynamicModuleLoader,A as AIWareIntlProvider,T as Typography,M as MemoizedFormattedMessage,E as Engines,B as Button,p as Divider,Y as startCase,a4 as Check,a5 as Remove,Q as CustomTabs,d as TabPanel,X as NullState,O as ErrorState,G as Grid,a6 as TableSortLabel,a7 as default_1$1,Z as PackagesAvatar}from"./js-core.esm7.js";import{g as generateState,z as tableInfiniteScroll,S as Stack,A as Avatar,J as index,T as Tooltip,I as IconButton,F as debounce,M as tableSearchComponents,v as validate,u as CopyText,N as statusPill}from"./js-core.esm9.js";import{k as selectAdminCenterOrgParameter,f as selectAdminCenterOrgIdString,n as navSectionStyles}from"./js-core.esm8.js";import{d as default_1}from"./js-core.esm26.js";import{u as useDispatch}from"./js-core.esm14.js";var SHARED_TEXT={approvals:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-panel.approvals.table.header",defaultMessage:"Approvals",description:"Approvals Panel Header"}),description:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-panel.approvals.table.header-sub-title",defaultMessage:"View any pending approvals for your Organization.",description:"Approvals Panel Header"}),packages:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-panel-package-tab",defaultMessage:"Packages",description:"Packages tab title"}),packageTab:"Package",engineTab:"Engine",applicationTab:"Application",registrationTab:"Registrations",registrations:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-panel-registrations-tab",defaultMessage:"Registrations",description:"Registrations tab title"}),applications:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-panel-application-tab",defaultMessage:"Applications",description:"Applications tab title"}),engines:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-panel-engine-tab",defaultMessage:"Engines",description:"Engines tab title"}),approvalTitle:function(e){e="registration"===e?"Registration Approvals":"Approval Requests";return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.header",defaultMessage:"{msg}",description:"Approval Requests panel Header",values:{msg:e}})},subTitle:function(e){e="registration"===e?"Review the registration request from this users who would like to join your Organization. Once you are finished, click confirm, and approved users will be sent an invitation email.":"Review and manage all requests sent from users of your organization. Once you are finished, click confirm to send approved requests to users.";return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.header-sub-title",defaultMessage:"{msg}",description:"Approval Requests panel Header sub title",values:{msg:e}})},closePanelMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-requests.close-panel",defaultMessage:"Close",description:"Instructions for closing the approvals requests panel"}),viewPackage:function(e){switch(e){case"application":return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.view-application",defaultMessage:"View Application",description:"View Application Button"});case"engine":return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.view-engine",defaultMessage:"View Engine",description:"View Engine Button"});default:return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.view-package",defaultMessage:"View Package",description:"View Package Button"})}},request:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.approve-button",defaultMessage:"Approve",description:"Approve Request Button"}),reject:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.reject-button",defaultMessage:"Reject",description:"Reject Request Button"}),cancel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.cancel-button",defaultMessage:"Cancel",description:"Cancel Button"}),confirm:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.confirm-button",defaultMessage:"Confirm",description:"Confirm Button"}),registrationErrorMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-registration-approvals.error-message",defaultMessage:"Something went wrong while loading your registrations invites.",description:"Registration Approvals pending packages error state"}),packageErrorMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.error-message",defaultMessage:"Something went wrong while loading your packages.",description:"Approvals pending packages error state"}),applicationErrorMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.error-message",defaultMessage:"Something went wrong while loading your applications.",description:"Approvals pending packages error state"}),engineErrorMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.error-message",defaultMessage:"Something went wrong while loading your engines.",description:"Approvals pending packages error state"}),noRegistration:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.registration-null-state-header",defaultMessage:"No Registration Approvals",description:"admin center approvals no registraions"}),noPendingRegistration:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.registration-null-state-description",defaultMessage:"There are currently no registrations requests to approve.",description:"admin center group no groups description"}),noPackage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.package-null-state-header",defaultMessage:"No Package Approvals",description:"admin center approvals no package"}),noPendingPackage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.package-null-state-description",defaultMessage:"There are currently no package requests to approve.",description:"admin center group no groups description"}),noEngine:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.eng-null-state-header",defaultMessage:"No Engine Approvals",description:"admin center approvals no engines"}),noPendingEngine:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.eng-null-state-description",defaultMessage:"There are currently no engine requests to approve.",description:"admin center group no engines description"}),noApplication:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.app-null-state-header",defaultMessage:"No Application Approvals",description:"admin center approvals no apps"}),noPendingApplication:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.app-null-state-description",defaultMessage:"There are currently no application requests to approve.",description:"admin center group no apps description"}),name:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-package-name",defaultMessage:"Name",description:"Admin center packages table name header"}),creator:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-creator",defaultMessage:"Creator",description:"Admin center packages creator header"}),appId:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-app-id",defaultMessage:"Application Id",description:"Admin center approvals app id header"}),engId:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-eng-id",defaultMessage:"Engine Id",description:"Admin center approvals eng id header"}),requestedDate:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.requested-date",defaultMessage:"Requested",description:"Requested Date"}),requestDate:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-requested-date",defaultMessage:"Request Date",description:"Admin center approvals request date header"}),status:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-status",defaultMessage:"Status",description:"Admin center approvals status header"}),noPackageFound:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-no-package-found-message",defaultMessage:"No packages found",description:"Admin center approvals noPackageFound message"})};function _define_property$7(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var EPackageStatus,headerStyles=makeStyles()(function(e){return{headerActionContainer:{display:"flex"},headerContainer:{alignItems:"center",display:"flex",justifyContent:"space-between"},header:{padding:"20px 20px 15px 30px"},title:{color:"#5C6269"},subTitle:{marginTop:"10px",fontWeight:400,color:"#5C6269"}}}),containerStyles=makeStyles()(function(e){return{container:{padding:"15px 20px 20px 30px",display:"flex",justifyContent:"space-between",flexDirection:"column"},card:{display:"flex",flexDirection:"column",backgroundColor:"#FAFAFA",border:"0.5px solid #E0E0E0",borderRadius:"4px"},approveCard:{display:"flex",alignItems:"center",padding:"20px"},userInfo:{paddingLeft:e.spacing(2),flexGrow:1},headerOwner:{color:"#0c53b0",minHeight:"16px"},panelHeaderLine:{minHeight:"16px"},userAvatar:{border:"2px solid #FFFFFF",height:"40px",width:"40px",marginRight:"14px",fontSize:"14px",color:"white"},requestorAvatar:{border:"2px solid #FFFFFF",height:"30px",width:"30px",fontSize:"14px",color:"white"},fallbackAvatar:{border:"2px solid #FFFFFF",color:"#5C6269",fontSize:"14px"},userName:{alignSelf:"center"},btnWrap:{display:"flex",gap:e.spacing(2),padding:e.spacing(2)},confirmButton:_define_property$7({float:"right"},"&:disabled",{color:"#9CA8B4 !important",background:"#D5DFE9 !important"})}}),SLICE_NAME="adminCenterApprovals",getValidIdsFromText=((e=>{e.Draft="draft",e.Pending="pending",e.Approved="approved",e.Published="published",e.Deactivated="deactivated"})(EPackageStatus=EPackageStatus||{}),function(e){return e.replace(" ",",").split(",").filter(function(e){return validate(e.trim())})});function asyncGeneratorStep$3(e,t,a,n,r,i,s){try{var o=e[i](s),l=o.value}catch(e){return void a(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$3(o){return function(){var e=this,s=arguments;return new Promise(function(t,a){var n=o.apply(e,s);function r(e){asyncGeneratorStep$3(n,t,a,r,i,"next",e)}function i(e){asyncGeneratorStep$3(n,t,a,r,i,"throw",e)}r(void 0)})}}function _define_property$6(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _object_spread$4(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property$6(t,e,a[e])})}return t}function ownKeys$2(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),a.push.apply(a,e)),a}function _object_spread_props$2(t,a){return a=null!=a?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys$2(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}),t}function _ts_generator$4(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function getPendingPackages(e){return _getPendingPackages.apply(this,arguments)}function _getPendingPackages(){return(_getPendingPackages=_async_to_generator$3(function(t){var a,n,r,i,s;return _ts_generator$4(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n="pendingPackages",i=[{name:"offset",type:"Int",value:t.offset},{name:"limit",type:"Int",value:t.limit}],(s=t.additionalSelectors)&&(r=getValidIdsFromText(s.searchValue),s.orgId&&i.push({name:"orgId",type:"String",value:s.orgId}),s.id&&r.push(s.id),0<r.length?i.push({name:"ids",type:"[ID!]",value:r}):s.searchValue&&i.push({name:"nameRegexp",type:"String",value:s.searchValue})),r=i.map(function(e){return"$".concat(e.name,": ").concat(e.type)}).join(", "),s=i.map(function(e){return"".concat(e.name,": $").concat(e.name)}).join(", "),s="query ".concat(n," ( ").concat(r," ) {\n ").concat("packages"," (status: pending, owned: true, ").concat(s," ) {\n records {\n id\n name\n description\n icon\n createdBy {\n email\n name\n firstName\n lastName\n imageUrl\n }\n modifiedAt\n status\n }\n }\n }"),i=i.reduce(function(e,t){return e[t.name]=t.value,e},{}),[4,baseGraphQLApi(_object_spread_props$2(_object_spread$4({query:s,operationName:n,variables:i},a),{graphEndpoint:a.graphQLEndpoint}))];case 1:return s=e.sent(),isEqual("production","development")&&0<(null==s||null==(n=s.errors)?void 0:n.length)&&console.warn("Errors were returned for ".concat(s.errors.length," packages"),s.errors),[2,s.data.packages.records]}})})).apply(this,arguments)}function updatePendingPackage(e){return _updatePendingPackage.apply(this,arguments)}function _updatePendingPackage(){return(_updatePendingPackage=_async_to_generator$3(function(t){var a,n,r,i,s;return _ts_generator$4(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n=t.itemToUpdate,i="packageUpdate",s="\n mutation ".concat(r="updatePendingPackage"," ($input: PackageUpdateInput) {\n ").concat(i,"(input: $input) {\n id\n name\n createdBy {\n email\n name\n firstName\n lastName\n imageUrl\n }\n modifiedAt\n status\n }\n }"),[4,baseGraphQLApiWithError(_object_spread$4({query:s,variables:{input:n},operationName:r},a))];case 1:return[2,e.sent()[i]]}})})).apply(this,arguments)}function asyncGeneratorStep$2(e,t,a,n,r,i,s){try{var o=e[i](s),l=o.value}catch(e){return void a(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$2(o){return function(){var e=this,s=arguments;return new Promise(function(t,a){var n=o.apply(e,s);function r(e){asyncGeneratorStep$2(n,t,a,r,i,"next",e)}function i(e){asyncGeneratorStep$2(n,t,a,r,i,"throw",e)}r(void 0)})}}function _define_property$5(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _object_spread$3(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property$5(t,e,a[e])})}return t}function _ts_generator$3(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var APPLICATION_FIELDS="\n id\n name\n description\n iconUrl\n signedIconUrl\n isPublic\n status\n ownerOrganizationId\n validStateActions\n modifiedDateTime\n";function getPendingApplications(e){return _getPendingApplications.apply(this,arguments)}function _getPendingApplications(){return(_getPendingApplications=_async_to_generator$2(function(t){var a,n,r,i,s,o,l;return _ts_generator$3(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n="pendingApplications",r="applications",o=[{field:"modifiedDateTime",direction:"desc"}],i=[{name:"offset",type:"Int",value:t.offset},{name:"limit",type:"Int",value:t.limit}],(l=t.additionalSelectors)&&(s=getValidIdsFromText(l.searchValue),l.orgId&&i.push({name:"orgId",type:"String",value:l.orgId}),l.id&&s.push(l.id),l.sortBy&&l.sortDirection&&(o.unshift({field:l.sortBy,direction:l.sortDirection}),o.pop()),0<s.length?i.push({name:"id",type:"ID!",value:s[0]}):l.searchValue&&i.push({name:"filter",type:"ApplicationFilter",value:{name:l.searchValue}})),i.push({name:"orderBy",type:"[ApplicationSortField]",value:o}),s=i.map(function(e){return"$".concat(e.name,": ").concat(e.type)}).join(", "),l=i.map(function(e){return"".concat(e.name,": $").concat(e.name)}).join(", "),o="query ".concat(n," (").concat(s,") {\n ").concat(r," (status: pending, ").concat(l,") {\n records {\n ").concat(APPLICATION_FIELDS,"\n }\n }\n }"),l=i.reduce(function(e,t){return e[t.name]=t.value,e},{}),[4,baseGraphQLApiWithError(_object_spread$3({query:o,operationName:n,variables:l,skipErrorIfData:!0},a))];case 1:return[2,e.sent()[r].records]}})})).apply(this,arguments)}function updatePendingApplication(e){return _updatePendingApplication.apply(this,arguments)}function _updatePendingApplication(){return(_updatePendingApplication=_async_to_generator$2(function(t){var a,n,r,i,s;return _ts_generator$3(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,s=t.itemToUpdate,r="applicationWorkflow",i="\n mutation ".concat(n="updatePendingApplication"," ($input: ApplicationWorkflow!) {\n ").concat(r,"(input: $input) {\n ").concat(APPLICATION_FIELDS,"\n }\n }"),s={input:{id:s.id,action:s.status}},[4,baseGraphQLApiWithError(_object_spread$3({query:i,variables:s,operationName:n},a))];case 1:return[2,e.sent()[r]]}})})).apply(this,arguments)}function asyncGeneratorStep$1(e,t,a,n,r,i,s){try{var o=e[i](s),l=o.value}catch(e){return void a(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$1(o){return function(){var e=this,s=arguments;return new Promise(function(t,a){var n=o.apply(e,s);function r(e){asyncGeneratorStep$1(n,t,a,r,i,"next",e)}function i(e){asyncGeneratorStep$1(n,t,a,r,i,"throw",e)}r(void 0)})}}function _define_property$4(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _object_spread$2(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property$4(t,e,a[e])})}return t}function ownKeys$1(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),a.push.apply(a,e)),a}function _object_spread_props$1(t,a){return a=null!=a?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys$1(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}),t}function _ts_generator$2(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var ENGINE_FIELDS="\n id\n name\n price\n entityTags {\n tagKey\n tagValue\n }\n ownerOrganization {\n name\n id\n }\n signedIconPath\n signedLogoPath\n description\n displayName\n website\n category {\n name\n id\n iconClass\n type {\n name\n }\n }\n industries\n state\n isPublic\n deploymentModel\n testingDetails {\n isCertified\n }\n builds(limit: 5, orderBy:{field: version, direction: desc}) {\n records {\n id\n name\n version\n description\n status\n }\n }\n modifiedDateTime\n";function getPendingEngines(e){return _getPendingEngines.apply(this,arguments)}function _getPendingEngines(){return(_getPendingEngines=_async_to_generator$1(function(t){var a,n,r,i,s,o,l;return _ts_generator$2(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n="pendingEngines",r="engines",l=[{field:"modifiedDateTime",direction:"desc"}],i=[{name:"offset",type:"Int",value:t.offset},{name:"limit",type:"Int",value:t.limit}],(o=t.additionalSelectors)&&(s=getValidIdsFromText(o.searchValue),o.orgId&&i.push({name:"orgId",type:"String",value:o.orgId}),o.id&&s.push(o.id),o.sortBy&&o.sortDirection&&(l.unshift({field:o.sortBy,direction:o.sortDirection}),l.pop()),0<s.length?i.push({name:"ids",type:"[ID!]",value:s}):o.searchValue&&i.push({name:"filter",type:"EngineFilter",value:{name:o.searchValue}})),l=i.map(function(e){return"$".concat(e.name,": ").concat(e.type)}).join(", "),s=i.map(function(e){return"".concat(e.name,": $").concat(e.name)}).join(", "),o="query ".concat(n," ( ").concat(l," ) {\n ").concat(r," (state: pending, ").concat(s," ) {\n records {\n ").concat(ENGINE_FIELDS,"\n }\n }\n }"),l=i.reduce(function(e,t){return e[t.name]=t.value,e},{}),[4,baseGraphQLApiWithError(_object_spread_props$1(_object_spread$2({query:o,operationName:n,variables:l},a),{skipErrorIfData:!0}))];case 1:return[2,e.sent()[r].records]}})})).apply(this,arguments)}function getEngineById(e,t){return _getEngineById.apply(this,arguments)}function _getEngineById(){return(_getEngineById=_async_to_generator$1(function(t,a){var n,r,i;return _ts_generator$2(this,function(e){switch(e.label){case 0:return r="engine",i="query ".concat(n="getEngineById"," ($id: ID!) {\n ").concat(r," (id: $id) {\n ").concat(ENGINE_FIELDS,"\n }\n }"),[4,baseGraphQLApiWithError(_object_spread$2({query:i,operationName:n,variables:{id:a}},t))];case 1:return[2,e.sent()[r]]}})})).apply(this,arguments)}function updatePendingEngine(e){return _updatePendingEngine.apply(this,arguments)}function _updatePendingEngine(){return(_updatePendingEngine=_async_to_generator$1(function(t){var a,n,r,i,s,o,l,c,p,d,u,m,x,g,f;return _ts_generator$2(this,function(e){switch(e.label){case 0:if(a=t.apiConfigs,r=n="updateEngineBuild",p=(i=t.itemToUpdate).status,s=null==i||null==(s=i.builds)||null==(s=s.records)?void 0:s[0],!(c=null==s?void 0:s.id))throw new Error("Cannot approve engine at this time. Please try again later.");if(o="mutation ".concat(n," ($input: UpdateBuild!) {\n ").concat(r," (input: $input) {\n id\n name\n version\n description\n status\n }\n }"),l=null,c={input:{id:c,engineId:i.id,action:p}},"approve"!==p)return[3,8];p=["submit","approve"],u=!(d=!0),m=void 0,e.label=1;case 1:e.trys.push([1,6,7,8]),x=p[Symbol.iterator](),e.label=2;case 2:return(d=(f=x.next()).done)?[3,5]:(f=f.value,"approved"===(null==l||null==(g=l[r])?void 0:g.status)?[3,4]:(c.input.action=f,[4,baseGraphQLApiWithError(_object_spread$2({query:o,operationName:n,variables:c},a))]));case 3:l=e.sent(),e.label=4;case 4:return d=!0,[3,2];case 5:return[3,8];case 6:return g=e.sent(),u=!0,m=g,[3,8];case 7:try{d||null==x.return||x.return()}finally{if(u)throw m}return[7];case 8:if(null===(null==l?void 0:l[r]))throw new Error("Failed to update engine build");return[4,getEngineById(a,i.id)];case 9:return f=e.sent(),[2,_object_spread$2({},i,null!=f?f:{})]}})})).apply(this,arguments)}function asyncGeneratorStep(e,t,a,n,r,i,s){try{var o=e[i](s),l=o.value}catch(e){return void a(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator(o){return function(){var e=this,s=arguments;return new Promise(function(t,a){var n=o.apply(e,s);function r(e){asyncGeneratorStep(n,t,a,r,i,"next",e)}function i(e){asyncGeneratorStep(n,t,a,r,i,"throw",e)}r(void 0)})}}function _define_property$3(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property$3(t,e,a[e])})}return t}function _ts_generator$1(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var ORG_INVITE_FIELDS="\n id\n status\n invitee {\n email\n name\n }\n applicationRoles {\n application {\n id\n name\n }\n role {\n id\n name\n }\n }\n audit {\n action\n actor\n timestamp\n }\n expirationDate\n";function getOrgRegistrationApprovals(e){return _getOrgRegistrationApprovals.apply(this,arguments)}function _getOrgRegistrationApprovals(){return(_getOrgRegistrationApprovals=_async_to_generator(function(t){var a,n,r,i,s,o;return _ts_generator$1(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n="registrationApprovals",r="organization",i=[],(s=t.additionalSelectors)&&(s.orgId||s.userOrgId)&&i.push({name:"id",type:"ID!",value:s.orgId||s.userOrgId}),s=i.map(function(e){return"$".concat(e.name,": ").concat(e.type)}).join(", "),o=i.map(function(e){return"".concat(e.name,": $").concat(e.name)}).join(", "),s="query ".concat(n," (").concat(s,") {\n ").concat(r," (").concat(o,") {\n organizationInvites (\n status: submitted\n ) {\n ").concat(ORG_INVITE_FIELDS,"\n }\n }\n }"),o=i.reduce(function(e,t){return e[t.name]=t.value,e},{}),[4,baseGraphQLApiWithError(_object_spread$1({query:s,operationName:n,variables:o},a))];case 1:return[2,e.sent()[r].organizationInvites]}})})).apply(this,arguments)}function updateRegistrationApproval(e){return _updateRegistrationApproval.apply(this,arguments)}function _updateRegistrationApproval(){return(_updateRegistrationApproval=_async_to_generator(function(t){var a,n,r,i,s;return _ts_generator$1(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,s=t.itemToUpdate,r="updateOrganizationInvite",i="\n mutation ".concat(n="updateRegInvite"," ($input: UpdateOrganizationInviteInput!) {\n ").concat(r,"(input: $input) {\n ").concat(ORG_INVITE_FIELDS,"\n }\n }"),s={input:{organizationInviteId:s.id,applicationRoles:s.applicationRoles.map(function(e){return{applicationId:e.application.id,roleId:e.role.id}}),action:s.status}},[4,baseGraphQLApiWithError(_object_spread$1({query:i,variables:s,operationName:n},a))];case 1:return[2,e.sent()[r]]}})})).apply(this,arguments)}var _obj,namespace$4="applications",_generateState$3=generateState({sliceName:SLICE_NAME,namespace:namespace$4,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getPendingApplications,update:updatePendingApplication,pageSize:30,getAdditionalSelectors:function(){return{sortBy:selectApplicationSortBy,sortDirection:selectApplicationSortDirection,searchValue:selectSearchValue}}},toast:{update:{success:"Application successfully updated",error:"Failed to update application"}}}),slice$4=_generateState$3.slice,selectors$3=_generateState$3.selectors,sagas$3=_generateState$3.sagas,initialState$5=_generateState$3.initialState,namespace$3="engines",_generateState$2=generateState({sliceName:SLICE_NAME,namespace:namespace$3,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getPendingEngines,update:updatePendingEngine,pageSize:30,getAdditionalSelectors:function(){return{sortBy:selectEngineSortBy,sortDirection:selectEngineSortDirection,searchValue:selectSearchValue}}},toast:{update:{success:"Engine updated successfully",error:"Failed to update engine"}}}),slice$3=_generateState$2.slice,selectors$2=_generateState$2.selectors,sagas$2=_generateState$2.sagas,initialState$4=_generateState$2.initialState,namespace$2="registrations",_generateState$1=generateState({sliceName:SLICE_NAME,namespace:namespace$2,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getOrgRegistrationApprovals,update:updateRegistrationApproval,getAdditionalSelectors:function(){return{orgId:selectAdminCenterOrgParameter,userOrgId:selectAdminCenterOrgIdString}}},toast:{update:{success:"Registration approval updated successfully",error:"Failed to update registration approval"}}}),slice$2=_generateState$1.slice,selectors$1=_generateState$1.selectors,sagas$1=_generateState$1.sagas,initialState$3=_generateState$1.initialState,selectPackageById=function(t){return function(e){return((null==e||null==(e=e[SLICE_NAME])||null==(e=e[namespace$1])?void 0:e.items)||[]).find(function(e){return e.id===t})}},selectApplicationById=function(t){return function(e){return((null==e||null==(e=e[SLICE_NAME])||null==(e=e[namespace$4])?void 0:e.items)||[]).find(function(e){return e.id===t})}},selectEngineById=function(t){return function(e){return((null==e||null==(e=e[SLICE_NAME])||null==(e=e[namespace$3])?void 0:e.items)||[]).find(function(e){return e.id===t})}},selectRegistrationById=function(t){return function(e){return((null==e||null==(e=e[SLICE_NAME])||null==(e=e[namespace$2])?void 0:e.items)||[]).find(function(e){return e.id===t})}},selectTypeById=function(t,a){return function(e){return"package"===a?selectPackageById(t)(e):"application"===a?selectApplicationById(t)(e):"engine"===a?selectEngineById(t)(e):"registration"===a?selectRegistrationById(t)(e):void 0}},selectIsTableSearchTyping=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.isTableSearchTyping},selectIsTableSearchVisible=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.isTableSearchVisible},selectActiveTab=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.activeTab},selectSearchValue=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.searchValue},selectEngineSortBy=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.engineSortBy},selectEngineSortDirection=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.engineSortDirection},selectApplicationSortBy=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.applicationSortBy},selectApplicationSortDirection=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.applicationSortDirection},namespace$1="packages",_generateState=generateState({sliceName:SLICE_NAME,namespace:namespace$1,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getPendingPackages,update:updatePendingPackage,pageSize:30,getAdditionalSelectors:function(){return{searchValue:selectSearchValue}}},toast:{update:{success:"Package updated successfully",error:"Failed to update package"}}}),slice$1=_generateState.slice,selectors=_generateState.selectors,sagas=_generateState.sagas,initialState$2=_generateState.initialState,namespace="uiState",initialState$1={status:ELoadingStatus.idle,activeTab:SHARED_TEXT.packageTab,searchValue:"",isTableSearchTyping:!1,isTableSearchVisible:!1,engineSortBy:"modifiedDateTime",engineSortDirection:"desc",applicationSortBy:"modifiedDateTime",applicationSortDirection:"desc"},slice=createSlice({name:"".concat(SLICE_NAME,"/").concat(namespace),initialState:initialState$1,reducers:{init:function(e){e.status=ELoadingStatus.pending},initDone:function(e){e.status=ELoadingStatus.success},initFailed:function(e){e.status=ELoadingStatus.failure},setActiveTab:function(e,t){e.activeTab=t.payload,e.searchValue="",e.isTableSearchTyping=!1,e.isTableSearchVisible=!1},setSearchValue:function(e,t){e.searchValue=null!=(t=t.payload)?t:"",e.isTableSearchTyping=!1},setIsTableSearchTyping:function(e,t){e.isTableSearchTyping=t.payload},setIsTableSearchVisible:function(e,t){e.isTableSearchVisible=t.payload},setClearTableSearch:function(e){e.searchValue="",e.isTableSearchTyping=!1,e.isTableSearchVisible=!1},setEngineSort:function(e,t){e.engineSortBy=t.payload.col,e.engineSortDirection=t.payload.dir},setApplicationSort:function(e,t){e.applicationSortBy=t.payload.col,e.applicationSortDirection=t.payload.dir}}});function _define_property$2(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}_define_property$2(_obj={},namespace,initialState$1),_define_property$2(_obj,namespace$1,initialState$2),_define_property$2(_obj,namespace$4,initialState$5),_define_property$2(_obj,namespace$3,initialState$4),_define_property$2(_obj,namespace$2,initialState$3);var _obj1,_obj2,initialState=_obj,actions=(_define_property$2(_obj1={},namespace,slice.actions),_define_property$2(_obj1,namespace$1,slice$1.actions),_define_property$2(_obj1,namespace$4,slice$4.actions),_define_property$2(_obj1,namespace$3,slice$3.actions),_define_property$2(_obj1,namespace$2,slice$2.actions),_obj1),rootReducer=combineReducers((_define_property$2(_obj2={},namespace,slice.reducer),_define_property$2(_obj2,namespace$1,slice$1.reducer),_define_property$2(_obj2,namespace$4,slice$4.reducer),_define_property$2(_obj2,namespace$3,slice$3.reducer),_define_property$2(_obj2,namespace$2,slice$2.reducer),_obj2));function _ts_generator(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function initUiState(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,!0];case 1:return e.sent(),[2]}})}function watchUiInit(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(slice.actions.init.type,initUiState)];case 1:return e.sent(),[2]}})}function rootSaga(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,all([watchUiInit(),sagas$3.watchRead(),sagas$3.watchUpdate(),sagas.watchRead(),sagas.watchUpdate(),sagas$2.watchRead(),sagas$2.watchUpdate(),sagas$1.watchRead(),sagas$1.watchUpdate()])];case 1:return e.sent(),[2]}})}function _define_property$1(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function getApprovalsModule(){return{id:SLICE_NAME,reducerMap:_define_property$1({},SLICE_NAME,rootReducer),sagas:[rootSaga],initialActions:[]}}var parentPanelId=AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,useMountPanel=function(t,e){var a=useDispatch(),n=useSelector(selectIsFullscreenEnabled),r={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:n?0:55,marginStart:n?0:80,size:EPanelSize.xlarge,parentPanelId:parentPanelId,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0};return{package:function(){var e=AvailableComponents.PACKAGE_DETAILS_PANEL;a(mountPanel({panelId:e,microFrontend:{name:e,config:{panelConfig:{data:{packageId:t,tabsToShow:{info:{defaultPackageData:["name","status","owner","installDate","distributionDate","lastUpdated","distributionType","primaryResourceType","version"]},resources:["schema","engine","package"]}},labels:{},actions:{handleClose:function(){return a(hidePanel(AvailableComponents.PACKAGE_DETAILS_PANEL))}},settings:{unstyledHeader:!0,runningUserId:"mew"}}}},panelConfig:r}))},application:function(){var e="APPLICATION_DETAILS_PANEL-".concat(t);a(mountPanel({panelId:e,microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{name:"Application Details",applicationId:t,disableInstallFeature:!0,appIsOwned:!0}},panelConfig:r}))},engine:function(){var e={name:AvailableComponents.ENGINE_CENTER_DETAILS,config:{name:"Engine Details",engineId:t,isReadOnly:!1,isFullScreen:n}};a(mountPanel({panelId:"ENGINE_CENTER_DETAILS",microFrontend:e,panelConfig:r}))},registration:function(){}}[e]};function _array_like_to_array$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function _array_with_holes$2(e){if(Array.isArray(e))return e}function _define_property(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _iterable_to_array_limit$2(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,o=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(o)throw r}}return i}}function _non_iterable_rest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property(t,e,a[e])})}return t}function ownKeys(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),a.push.apply(a,e)),a}function _object_spread_props(t,a){return a=null!=a?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}),t}function _sliced_to_array$2(e,t){return _array_with_holes$2(e)||_iterable_to_array_limit$2(e,t)||_unsupported_iterable_to_array$2(e,t)||_non_iterable_rest$2()}function _unsupported_iterable_to_array$2(e,t){var a;if(e)return"string"==typeof e?_array_like_to_array$2(e,t):"Map"===(a="Object"===(a=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_array_like_to_array$2(e,t):void 0}var Body=function(e){var t=e.id,a=e.panelId,n=e.pkg,r=e.type,i=useDispatch(),e=containerStyles().classes,s=_sliced_to_array$2(reactExports.useState(!1),2),o=s[0],l=s[1],s=_sliced_to_array$2(reactExports.useState(!1),2),c=s[0],p=s[1],s=_sliced_to_array$2(reactExports.useState(!0),2),d=s[0],u=s[1],s=_sliced_to_array$2(reactExports.useState(!0),2),m=s[0],x=s[1],g=useSelector(selectTypeById(t,r)),s=reactExports.useMemo(function(){var e,t;if(g)return"package"===r?{name:g.name,description:g.description,icon:g.icon,createdBy:{name:null==(e=g.createdBy)?void 0:e.name,email:null==(e=g.createdBy)?void 0:e.email,firstName:null==(e=g.createdBy)?void 0:e.firstName,lastName:null==(e=g.createdBy)?void 0:e.lastName,imageUrl:null==(e=g.createdBy)?void 0:e.imageUrl},email:null}:"application"===r?{name:g.name,description:g.description,icon:g.signedIconUrl,createdBy:null,email:null}:"engine"===r?{name:(e=g).name,description:e.description,icon:null!=(t=null==e?void 0:e.signedIconPath)?t:e.signedLogoPath,createdBy:null,email:null}:"registration"===r?{name:null!=(e=null!=(e=null==(t=g)?void 0:t.userDetails)?e:{})&&e.firstName&&null!=e&&e.lastName?f(e.firstName,e.lastName):(null==t||null==(e=t.invitee)?void 0:e.name)||"--",description:null,icon:null,createdBy:null,email:t.invitee.email,requestedDate:null!=(e=null==t||null==(e=t.audit)||null==(e=e.find(function(e){return"submit"===e.action}))?void 0:e.timestamp)?e:"",applicationRoles:null!=(e=null==t?void 0:t.applicationRoles)?e:[],userDetails:null!=(t=null==t||null==(e=t.userDetails)?void 0:e.customFields)?t:{}}:void 0},[g,r])||n,n=useMountPanel(t,r),f=function(e,t){return"".concat(null==e||null==(e=e.charAt(0))?void 0:e.toUpperCase()).concat(null==t||null==(e=t.charAt(0))?void 0:e.toUpperCase())},h=reactExports.useCallback(function(){i(actions["".concat(r,"s")].updateResetStatus(null)),i(hidePanel(a))},[i,a,r]);return jsxRuntimeExports.jsxs(Box,{className:e.container,"data-test":"admin-center-approvals-requests-panel-body",children:[jsxRuntimeExports.jsxs(Box,{className:e.card,"data-test":"admin-center-approvals-requests-panel-body.card",children:[jsxRuntimeExports.jsxs(Box,{className:e.approveCard,children:[jsxRuntimeExports.jsx("div",{children:"registration"===r?jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{fontWeight:700},children:null==s?void 0:s.name}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:"primary.main"},children:null==s?void 0:s.email})]}):null!=s&&s.icon?jsxRuntimeExports.jsx(Avatar,{alt:(null==s?void 0:s.name)||"",src:s.icon,className:e.userAvatar}):jsxRuntimeExports.jsx(Avatar,{className:e.userAvatar,"data-test":"admin-center-approvals-requests-panel-body.card.avatar",sx:{color:"#5C6269"},children:"engine"===r?jsxRuntimeExports.jsx(Engines,{}):f((null==s?void 0:s.name)||"","")})}),"registration"!==r?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:e.userInfo,children:[jsxRuntimeExports.jsx(Typography,{variant:"body1","data-testid":"admin-center-approvals-requests-panel-card-name","data-test":"admin-center-approvals-requests-panel-card-name",sx:{fontWeight:400},noWrap:!0,children:index.truncatedString((null==s?void 0:s.name)||"",30)}),(null==s?void 0:s.description)&&jsxRuntimeExports.jsx(Typography,{variant:"caption","data-testid":"admin-center-approvals-requests-panel-card-email","data-test":"admin-center-approvals-requests-panel-card-email",sx:{fontWeight:400},noWrap:!0,children:index.truncatedString(s.description,30)})]}),jsxRuntimeExports.jsx(Button,{variant:"outlined",onClick:n,"data-testid":"admin-center-approvals-requests-panel-view-package-btn","data-test":"admin-center-approvals-requests-panel-view-package-btn",sx:{height:"30px"},children:SHARED_TEXT.viewPackage(r)})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:e.userInfo}),jsxRuntimeExports.jsxs(Typography,{component:"span",variant:"caption",sx:{fontWeight:400},children:[SHARED_TEXT.requestedDate,jsxRuntimeExports.jsx(Typography,{component:"span",variant:"body2",sx:{fontWeight:700},children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==s?void 0:s.requestedDate})})]})]})]}),(null==s?void 0:s.createdBy)&&jsxRuntimeExports.jsxs(Stack,{gap:2,p:"20px",pt:0,children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",children:"Reqestor"}),jsxRuntimeExports.jsxs(Stack,{direction:"row",gap:1,children:[null!=s&&null!=(n=s.createdBy)&&n.imageUrl?jsxRuntimeExports.jsx(Avatar,{alt:(null==s||null==(n=s.createdBy)?void 0:n.firstName)+" "+(null==s||null==(n=s.createdBy)?void 0:n.lastName),src:null==s||null==(n=s.createdBy)?void 0:n.imageUrl,className:e.requestorAvatar}):jsxRuntimeExports.jsx(Avatar,{className:e.requestorAvatar,sx:{color:"#5C6269"},"data-test":"admin-center-approvals-requests-panel-body.card.avatar",children:f((null==s||null==(n=s.createdBy)?void 0:n.firstName)||"",(null==s||null==(n=s.createdBy)?void 0:n.lastName)||"")}),jsxRuntimeExports.jsxs(Stack,{direction:"row",gap:2,children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{fontSize:"14px",fontWeight:700},alignSelf:"center",children:index.truncatedString((null==s||null==(n=s.createdBy)?void 0:n.name)||"",20)}),(null==s||null==(n=s.createdBy)?void 0:n.email)&&jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:"#1565C0",fontSize:"14px",fontWeight:400},alignSelf:"center",children:index.truncatedString((null==s||null==(n=s.createdBy)?void 0:n.email)||"",38)})]})]})]}),"registration"===r&&jsxRuntimeExports.jsxs(Stack,{gap:2,p:"20px",pt:0,children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",children:"Registration Information:"}),jsxRuntimeExports.jsx(Stack,{mt:2,px:2,gap:2,divider:jsxRuntimeExports.jsx(Divider,{}),children:Object.entries((null==s?void 0:s.userDetails)||{}).map(function(e){var e=_sliced_to_array$2(e,2),t=e[0],e=e[1];return jsxRuntimeExports.jsxs(Stack,{gap:2,children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{fontSize:"14px",fontWeight:700},children:startCase(t)}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{fontSize:"14px",fontWeight:400,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e})]},t)})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}}),jsxRuntimeExports.jsxs(Box,{className:e.btnWrap,children:[jsxRuntimeExports.jsx(Button,{fullWidth:!0,"data-testid":"admin-center-approvals-requests-panel-request-btn","data-test":"admin-center-approvals-requests-panel-request-btn",variant:d?"outlined":"contained",startIcon:d?null:jsxRuntimeExports.jsx(Check,{}),color:d?"primary":"success",onClick:function(){l(!0),p(!0),u(!1),x(!0)},size:"large",sx:{height:"38px"},children:SHARED_TEXT.request}),jsxRuntimeExports.jsx(Button,{fullWidth:!0,"data-testid":"admin-center-approvals-requests-panel-reject-btn","data-test":"admin-center-approvals-requests-panel-reject-btn",variant:m?"outlined":"contained",startIcon:m?null:jsxRuntimeExports.jsx(Remove,{}),color:m?"primary":"error",onClick:function(){l(!0),p(!1),u(!0),x(!1)},disabled:"engine"===r,size:"large",sx:{height:"38px"},children:SHARED_TEXT.reject})]})]}),jsxRuntimeExports.jsxs(Box,{sx:{position:"absolute",bottom:"30px",right:"30px",display:"flex",gap:2},children:[jsxRuntimeExports.jsx(Button,{variant:"outlined",onClick:h,"data-testid":"admin-center-approvals-requests-panel-cancel-btn","data-test":"admin-center-approvals-requests-panel-cancel-btn",children:SHARED_TEXT.cancel}),jsxRuntimeExports.jsx(Button,{variant:"contained",disabled:!o,className:e.confirmButton,onClick:function(){var e={package:{approve:EPackageStatus.Approved,reject:EPackageStatus.Draft},application:{approve:"approve",reject:"reject"},engine:{approve:"approve",reject:"disapprove"},registration:{approve:"approve",reject:"reject"}},e=c?e[r].approve:e[r].reject;i(actions["".concat(r,"s")].updateStart(_object_spread_props(_object_spread({},g),{id:t,status:e}))),h()},"data-testid":"admin-center-approvals-requests-panel-confirm-btn","data-test":"admin-center-approvals-requests-panel-confirm-btn",children:SHARED_TEXT.confirm})]})]})},Header=function(e){var t=e.panelId,e=e.type,a=headerStyles().classes,n=useDispatch();return jsxRuntimeExports.jsxs("header",{className:a.header,"data-testid":"admin-center-approvals-requests-panel-header","data-test":"admin-center-approvals-requests-panel-header",children:[jsxRuntimeExports.jsxs("div",{className:a.headerContainer,children:[jsxRuntimeExports.jsx(Typography,{variant:"h1","data-testid":"admin-center-approvals-requests-panel-header-title","data-test":"admin-center-approvals-requests-panel-header-title",className:a.title,children:SHARED_TEXT.approvalTitle(e)}),jsxRuntimeExports.jsx("div",{className:a.headerActionContainer,children:jsxRuntimeExports.jsx(Tooltip,{title:SHARED_TEXT.closePanelMessage,children:jsxRuntimeExports.jsx(IconButton,{onClick:function(){n(hidePanel(t))},"aria-labelledby":"admin-center-approvals-requests-panel-close-panel","data-testid":"admin-center-approvals-requests-panel-close-panel","data-test":"admin-center-approvals-requests-panel-close-panel",size:"large",children:jsxRuntimeExports.jsx(default_1,{})})})})]}),jsxRuntimeExports.jsx(Typography,{variant:"subtitle1","data-testid":"admin-center-approvals-requests-panel-header-sub-title","data-test":"admin-center-approvals-requests-panel-header-sub-title",className:a.subTitle,children:SHARED_TEXT.subTitle(e)})]})};function _object_without_properties(e,t){if(null==e)return{};var a,n=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(e),i=0;i<r.length;i++)a=r[i],0<=t.indexOf(a)||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a]);return n}function _object_without_properties_loose(e,t){if(null==e)return{};for(var a,n={},r=Object.keys(e),i=0;i<r.length;i++)a=r[i],0<=t.indexOf(a)||(n[a]=e[a]);return n}var ApprovalRequestsPanel=function(e){var t=e.id,a=e.pkg,e=_object_without_properties(e,["id","pkg"]),e=null!=(e=null==e?void 0:e.type)?e:"package",n=AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL;return jsxRuntimeExports.jsx(AIWareCacheProvider,{children:jsxRuntimeExports.jsx(AIWareThemeProvider,{children:jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getApprovalsModule()],children:jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsxs(Box,{"data-test":"admin-center-approval-requests-panel",children:[jsxRuntimeExports.jsx(Header,{panelId:n,type:e}),jsxRuntimeExports.jsx(Body,{id:t,panelId:n,type:e,pkg:a})]})})})})})},tabUseStyles=makeStyles()(function(e){return{tabsContainer:{height:"100%",flexGrow:"1",display:"flex",flexDirection:"column","& .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"}},tabPanels:{width:"100%",height:"100%"}}}),PackageTableHeader=function(){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Grid,{"data-test":"ac-approvals-table-header",sx:{height:32,pl:3},alignItems:"center",display:"flex",container:!0,children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,sx:{display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-package-name","data-test":"os-admin-center-approvals-table-header-package-name",children:SHARED_TEXT.name})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-creator","data-test":"os-admin-center-approvals-table-header-creator",children:SHARED_TEXT.creator})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-requested-date","data-test":"os-admin-center-approvals-table-requested-date",children:SHARED_TEXT.requestDate})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-status","data-test":"os-admin-center-approvals-table-status",children:SHARED_TEXT.status})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}})]})},StatusPill$3=statusPill.jsx,TableInfiniteScroll$3=tableInfiniteScroll.jsx.TableInfiniteScroll,itemHeight$3=60,TableRow$3=function(e){var t=e.item,a=e.index,e=e.onClick,n="".concat(itemHeight$3-1,"px");return jsxRuntimeExports.jsx(Box,{"data-testid":"package-table-index-".concat(a),"data-test":"package-table-index-".concat(a),sx:{width:"100%",height:n,borderBottom:"1px solid #D5DFE9","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},children:jsxRuntimeExports.jsx(Grid,{style:{height:"100%",flexGrow:1},container:!0,children:jsxRuntimeExports.jsxs(Grid,{direction:"row",justifyContent:"flex-start",alignItems:"center",container:!0,xs:12,sx:{pl:3,cursor:"pointer"},onClick:e,"data-test":"os-admin-center-approvals-table-row",children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,sx:{pr:3},children:jsxRuntimeExports.jsx(Typography,{variant:"body1",color:"textPrimary","data-testid":"admin-center.group-row.name","data-test":"admin-center.group-row.name",children:index.truncatedString(null==t?void 0:t.name,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.created-by-email","data-test":"admin-center.approvals-row.created-by-email",children:index.truncatedString(null==t||null==(a=t.createdBy)?void 0:a.email,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==t?void 0:t.modifiedAt})}),jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.packages-status","data-test":"admin-center.approvals-row.packages-status",children:jsxRuntimeExports.jsx(StatusPill$3,{statusType:"package",status:null==t?void 0:t.status,ContainerProps:{sx:{width:"fit-content",height:"18px",left:"264px",top:"244px",borderRadius:"32px",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center",padding:"3px 10px",gap:"10px",border:"1px solid #215E73"}},TypographyProps:{sx:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"9px",lineHeight:"12px",textTransform:"uppercase",color:"#215E73"}}})})})]})})})},_packagesRedux_selectors=selectors,selectItems$3=_packagesRedux_selectors.selectItems,selectHasMore$3=_packagesRedux_selectors.selectHasMore,selectOffset$3=_packagesRedux_selectors.selectOffset,selectReadStatus$3=_packagesRedux_selectors.selectReadStatus,PackageTable=function(){function e(){n(actions.packages.readStart(null))}var n=useDispatch(),t=useSelector(selectItems$3),a=useSelector(selectHasMore$3),r=useSelector(selectOffset$3),i=useSelector(selectReadStatus$3),s=useSelector(selectIsFullscreenEnabled);return jsxRuntimeExports.jsx(TableInfiniteScroll$3,{hasMore:a,fetchMore:e,fetchOnMount:0===t.length,offset:r,items:t,itemHeight:itemHeight$3,isLoading:"pending"===i,error:"failure"===i,adjustTableHeight:-40,TableRowComponent:function(e){var a=e.item;return jsxRuntimeExports.jsx(TableRow$3,{item:a,index:e.index,onClick:function(){var e,t;e=(null==a?void 0:a.id)||"",e={name:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,config:{id:e,type:"package"}},t={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:s?0:55,marginStart:s?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},n(mountPanel({panelId:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,microFrontend:e,panelConfig:t}))}})},TableHeaderComponent:jsxRuntimeExports.jsx(PackageTableHeader,{}),TableEmptyStateComponent:jsxRuntimeExports.jsx(NullState,{image:img$Q,header:SHARED_TEXT.noPackage,description:SHARED_TEXT.noPendingPackage}),TableErrorStateComponent:jsxRuntimeExports.jsx(ErrorState,{onRetry:e,errorMessage:SHARED_TEXT.packageErrorMessage})})},uiActions$1=slice.actions,ApplicationsTableHeader=function(){function t(e){var t=n!==e||n===e&&"desc"===r;a(uiActions$1.setApplicationSort({col:e,dir:t?"asc":"desc"})),a(actions.applications.resetList(null)),a(actions.applications.readStart(null))}function e(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:n===e,direction:n===e?r:"asc",onClick:function(){return t(e)},IconComponent:default_1$1})}var a=useDispatch(),n=useSelector(selectApplicationSortBy),r=useSelector(selectApplicationSortDirection);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Grid,{"data-test":"ac-approvals-table-header",sx:{height:32,pl:3},alignItems:"center",display:"flex",container:!0,children:[jsxRuntimeExports.jsxs(Grid,{item:!0,xs:4,sx:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-application-name","data-test":"os-admin-center-approvals-table-header-application-name",children:SHARED_TEXT.name}),e("name")]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-app-id","data-test":"os-admin-center-approvals-table-header-app-id",children:SHARED_TEXT.appId})}),jsxRuntimeExports.jsxs(Grid,{item:!0,xs:2,children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-requested-date","data-test":"os-admin-center-approvals-table-requested-date",onClick:function(){return t("modifiedDateTime")},children:SHARED_TEXT.requestDate}),e("modifiedDateTime")]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-status","data-test":"os-admin-center-approvals-table-status",children:SHARED_TEXT.status})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}})]})},StatusPill$2=statusPill.jsx,TableInfiniteScroll$2=tableInfiniteScroll.jsx.TableInfiniteScroll,itemHeight$2=60,TableRow$2=function(e){var t=e.item,a=e.index,e=e.onClick,n="".concat(itemHeight$2-1,"px");return jsxRuntimeExports.jsx(Box,{"data-testid":"application-table-index-".concat(a),"data-test":"application-table-index-".concat(a),sx:{width:"100%",height:n,borderBottom:"1px solid #D5DFE9","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},children:jsxRuntimeExports.jsx(Grid,{style:{height:"100%",flexGrow:1},container:!0,children:jsxRuntimeExports.jsxs(Grid,{direction:"row",justifyContent:"flex-start",alignItems:"center",container:!0,xs:12,sx:{pl:3,cursor:"pointer"},onClick:e,"data-test":"os-admin-center-approvals-table-row",children:[jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:1,sx:{pl:1,pr:2},children:null!=t&&t.iconUrl?jsxRuntimeExports.jsx(Box,{sx:{display:"flex","& img":{width:"24px",height:"24px",borderRadius:"12px"}},children:jsxRuntimeExports.jsx("img",{src:t.iconUrl,alt:"package-icon"})}):jsxRuntimeExports.jsx(PackagesAvatar,{})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:3,sx:{pr:3},children:jsxRuntimeExports.jsx(Typography,{variant:"body1",color:"textPrimary","data-testid":"admin-center.group-row.name","data-test":"admin-center.group-row.name",children:index.truncatedString(null==t?void 0:t.name,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,sx:{pr:3},children:jsxRuntimeExports.jsx(CopyText,{id:"admin-center.approvals-row.created-by-email",variant:"body2",value:null==t?void 0:t.id})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==t?void 0:t.modifiedDateTime})}),jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.applications-status","data-test":"admin-center.approvals-row.applications-status",children:jsxRuntimeExports.jsx(StatusPill$2,{statusType:"package",status:null==t?void 0:t.status,ContainerProps:{sx:{width:"fit-content",height:"18px",left:"264px",top:"244px",borderRadius:"32px",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center",padding:"3px 10px",gap:"10px",border:"1px solid #215E73"}},TypographyProps:{sx:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"9px",lineHeight:"12px",textTransform:"uppercase",color:"#215E73"}}})})})]})})})},_applicationsRedux_selectors=selectors$3,selectItems$2=_applicationsRedux_selectors.selectItems,selectHasMore$2=_applicationsRedux_selectors.selectHasMore,selectOffset$2=_applicationsRedux_selectors.selectOffset,selectReadStatus$2=_applicationsRedux_selectors.selectReadStatus,ApplicationsTable=function(){function e(){n(actions.applications.readStart(null))}var n=useDispatch(),t=useSelector(selectItems$2),a=useSelector(selectHasMore$2),r=useSelector(selectOffset$2),i=useSelector(selectReadStatus$2),s=useSelector(selectIsFullscreenEnabled);return jsxRuntimeExports.jsx(TableInfiniteScroll$2,{hasMore:a,fetchMore:e,fetchOnMount:0===t.length,offset:r,items:t,itemHeight:itemHeight$2,isLoading:"pending"===i,error:"failure"===i,adjustTableHeight:-40,TableRowComponent:function(e){var a=e.item;return jsxRuntimeExports.jsx(TableRow$2,{item:a,index:e.index,onClick:function(){var e,t;e=(null==a?void 0:a.id)||"",e={name:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,config:{id:e,type:"application"}},t={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:s?0:55,marginStart:s?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},n(mountPanel({panelId:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,microFrontend:e,panelConfig:t}))}})},TableHeaderComponent:jsxRuntimeExports.jsx(ApplicationsTableHeader,{}),TableEmptyStateComponent:jsxRuntimeExports.jsx(NullState,{image:img$Q,header:SHARED_TEXT.noApplication,description:SHARED_TEXT.noPendingApplication}),TableErrorStateComponent:jsxRuntimeExports.jsx(ErrorState,{onRetry:e,errorMessage:SHARED_TEXT.applicationErrorMessage})})},uiActions=slice.actions,EnginesTableHeader=function(){function t(e){a(uiActions.setEngineSort({col:e,dir:n!==e||n===e&&"desc"===r?"asc":"desc"})),a(actions.engines.resetList(null)),a(actions.engines.readStart(null))}function e(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:n===e,direction:n===e?r:"asc",onClick:function(){return t(e)},IconComponent:default_1$1})}var a=useDispatch(),n=useSelector(selectEngineSortBy),r=useSelector(selectEngineSortDirection);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Grid,{"data-test":"ac-approvals-table-header",sx:{height:32,pl:3},alignItems:"center",display:"flex",container:!0,children:[jsxRuntimeExports.jsxs(Grid,{item:!0,xs:4,sx:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-engine-name","data-test":"os-admin-center-approvals-table-header-engine-name",onClick:function(){return t("name")},children:SHARED_TEXT.name}),e("name")]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-eng-id","data-test":"os-admin-center-approvals-table-header-eng-id",children:SHARED_TEXT.engId})}),jsxRuntimeExports.jsxs(Grid,{item:!0,xs:2,children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-requested-date","data-test":"os-admin-center-approvals-table-requested-date",onClick:function(){return t("modifiedDateTime")},children:SHARED_TEXT.requestDate}),e("modifiedDateTime")]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-status","data-test":"os-admin-center-approvals-table-status",children:SHARED_TEXT.status})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}})]})},StatusPill$1=statusPill.jsx,TableInfiniteScroll$1=tableInfiniteScroll.jsx.TableInfiniteScroll,itemHeight$1=60,TableRow$1=function(e){var t=e.item,a=e.index,e=e.onClick,n="".concat(itemHeight$1-1,"px");return jsxRuntimeExports.jsx(Box,{"data-testid":"engine-table-index-".concat(a),"data-test":"engine-table-index-".concat(a),sx:{width:"100%",height:n,borderBottom:"1px solid #D5DFE9","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},children:jsxRuntimeExports.jsx(Grid,{style:{height:"100%",flexGrow:1},container:!0,children:jsxRuntimeExports.jsxs(Grid,{direction:"row",justifyContent:"flex-start",alignItems:"center",container:!0,xs:12,sx:{pl:3,cursor:"pointer"},onClick:e,"data-test":"os-admin-center-approvals-table-row",children:[jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:1,sx:{pl:1,pr:2},children:null!=t&&t.signedIconPath?jsxRuntimeExports.jsx(Box,{sx:{display:"flex","& img":{width:"24px",height:"24px",borderRadius:"12px"}},children:jsxRuntimeExports.jsx("img",{src:t.signedIconPath,alt:"package-icon"})}):jsxRuntimeExports.jsx(Engines,{})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:3,sx:{pr:2},children:jsxRuntimeExports.jsx(Typography,{variant:"body1",color:"textPrimary","data-testid":"admin-center.group-row.name","data-test":"admin-center.group-row.name",noWrap:!0,children:index.truncatedString(null==t?void 0:t.name,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,sx:{pr:3},children:jsxRuntimeExports.jsx(CopyText,{id:"admin-center.approvals-row.created-by-email",variant:"body2",value:null==t?void 0:t.id})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==t?void 0:t.modifiedDateTime})}),jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.engines-status","data-test":"admin-center.approvals-row.engines-status",children:jsxRuntimeExports.jsx(StatusPill$1,{statusType:"package",status:null==t?void 0:t.state,ContainerProps:{sx:{width:"fit-content",height:"18px",left:"264px",top:"244px",borderRadius:"32px",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center",padding:"3px 10px",gap:"10px",border:"1px solid #215E73"}},TypographyProps:{sx:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"9px",lineHeight:"12px",textTransform:"uppercase",color:"#215E73"}}})})})]})})})},_enginesRedux_selectors=selectors$2,selectItems$1=_enginesRedux_selectors.selectItems,selectHasMore$1=_enginesRedux_selectors.selectHasMore,selectOffset$1=_enginesRedux_selectors.selectOffset,selectReadStatus$1=_enginesRedux_selectors.selectReadStatus,EnginesTable=function(){function e(){n(actions.engines.readStart(null))}var n=useDispatch(),t=useSelector(selectItems$1),a=useSelector(selectHasMore$1),r=useSelector(selectOffset$1),i=useSelector(selectReadStatus$1),s=useSelector(selectIsFullscreenEnabled);return jsxRuntimeExports.jsx(TableInfiniteScroll$1,{hasMore:a,fetchMore:e,fetchOnMount:0===t.length,offset:r,items:t,itemHeight:itemHeight$1,isLoading:"pending"===i,error:"failure"===i,adjustTableHeight:-40,TableRowComponent:function(e){var a=e.item;return jsxRuntimeExports.jsx(TableRow$1,{item:a,index:e.index,onClick:function(){var e,t;e=(null==a?void 0:a.id)||"","ready"!==(t=null!=(t=null==a?void 0:a.state)?t:"")&&(t={name:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,config:{id:e,type:"engine"}},e={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:s?0:55,marginStart:s?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},n(mountPanel({panelId:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,microFrontend:t,panelConfig:e})))}})},TableHeaderComponent:jsxRuntimeExports.jsx(EnginesTableHeader,{}),TableEmptyStateComponent:jsxRuntimeExports.jsx(NullState,{image:img$Q,header:SHARED_TEXT.noEngine,description:SHARED_TEXT.noPendingEngine}),TableErrorStateComponent:jsxRuntimeExports.jsx(ErrorState,{onRetry:e,errorMessage:SHARED_TEXT.engineErrorMessage})})},TableHeader=function(){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Grid,{"data-test":"ac-approvals-table-header",sx:{height:32,pl:3},alignItems:"center",display:"flex",container:!0,children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:6,sx:{display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-package-name","data-test":"os-admin-center-approvals-table-header-package-name",children:SHARED_TEXT.name})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-requested-date","data-test":"os-admin-center-approvals-table-requested-date",children:SHARED_TEXT.requestDate})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-status","data-test":"os-admin-center-approvals-table-status",children:SHARED_TEXT.status})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}})]})},StatusPill=statusPill.jsx,TableInfiniteScroll=tableInfiniteScroll.jsx.TableInfiniteScroll,itemHeight=60,TableRow=function(e){var t=e.item,a=e.index,e=e.onClick,n="".concat(itemHeight-1,"px"),r=t.audit.find(function(e){return"submit"===e.action}),i=null==t?void 0:t.userDetails,i=null!=i&&i.firstName&&null!=i&&i.lastName?"".concat(null==i?void 0:i.firstName," ").concat(null==i?void 0:i.lastName):(null==t||null==(i=t.invitee)?void 0:i.name)||(null==t||null==(i=t.invitee)?void 0:i.email)||"";return jsxRuntimeExports.jsx(Box,{"data-testid":"registration-table-index-".concat(a),"data-test":"registration-table-index-".concat(a),sx:{width:"100%",height:n,borderBottom:"1px solid #D5DFE9","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},children:jsxRuntimeExports.jsx(Grid,{style:{height:"100%",flexGrow:1},container:!0,children:jsxRuntimeExports.jsxs(Grid,{direction:"row",justifyContent:"flex-start",alignItems:"center",container:!0,xs:12,sx:{pl:3,cursor:"pointer"},"data-test":"os-admin-center-registrations-approvals-table-row",onClick:e,children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:6,sx:{pr:3},children:jsxRuntimeExports.jsx(Typography,{variant:"body1",color:"textPrimary","data-testid":"admin-center.group-row.name","data-test":"admin-center.group-row.name",children:index.truncatedString(i,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==r?void 0:r.timestamp})}),jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.registrations-status","data-test":"admin-center.approvals-row.registrations-status",children:jsxRuntimeExports.jsx(StatusPill,{statusType:"package",status:null==t?void 0:t.status,ContainerProps:{sx:{width:"fit-content",height:"18px",left:"264px",top:"244px",borderRadius:"32px",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center",padding:"3px 10px",gap:"10px",border:"1px solid #215E73"}},TypographyProps:{sx:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"9px",lineHeight:"12px",textTransform:"uppercase",color:"#215E73"}}})})})]})})})},_registrationsRedux_selectors=selectors$1,selectItems=_registrationsRedux_selectors.selectItems,selectHasMore=_registrationsRedux_selectors.selectHasMore,selectOffset=_registrationsRedux_selectors.selectOffset,selectReadStatus=_registrationsRedux_selectors.selectReadStatus,Table=function(){function e(){n(actions.registrations.readStart(null))}var n=useDispatch(),t=useSelector(selectItems),a=useSelector(selectHasMore),r=useSelector(selectOffset),i=useSelector(selectReadStatus),s=useSelector(selectIsFullscreenEnabled);return jsxRuntimeExports.jsx(TableInfiniteScroll,{hasMore:a,fetchMore:e,fetchOnMount:0===t.length,offset:r,items:t,itemHeight:itemHeight,isLoading:"pending"===i,error:"failure"===i,adjustTableHeight:-40,TableRowComponent:function(e){var a=e.item;return jsxRuntimeExports.jsx(TableRow,{item:a,index:e.index,onClick:function(){var e,t;a.id&&"submitted"===a.status&&(e=a.id,e={name:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,config:{id:e,type:"registration"}},t={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:s?0:55,marginStart:s?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},n(mountPanel({panelId:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,microFrontend:e,panelConfig:t})))}})},TableHeaderComponent:jsxRuntimeExports.jsx(TableHeader,{}),TableEmptyStateComponent:jsxRuntimeExports.jsx(NullState,{image:img$Q,header:SHARED_TEXT.noRegistration,description:SHARED_TEXT.noPendingRegistration}),TableErrorStateComponent:jsxRuntimeExports.jsx(ErrorState,{onRetry:e,errorMessage:SHARED_TEXT.registrationErrorMessage})})};function _array_like_to_array$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function _array_with_holes$1(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$1(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,o=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(o)throw r}}return i}}function _non_iterable_rest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$1(e,t){return _array_with_holes$1(e)||_iterable_to_array_limit$1(e,t)||_unsupported_iterable_to_array$1(e,t)||_non_iterable_rest$1()}function _unsupported_iterable_to_array$1(e,t){var a;if(e)return"string"==typeof e?_array_like_to_array$1(e,t):"Map"===(a="Object"===(a=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_array_like_to_array$1(e,t):void 0}var createTab=function(e,t,a,n,r){return{tab:e,label:t,component:a,id:n,disabled:r}},approvalsTabs=function(e){return[createTab(SHARED_TEXT.packageTab,SHARED_TEXT.packages,jsxRuntimeExports.jsx(PackageTable,{}),"os-admin-center-approvals-panel-package-tab-btn",!1),createTab(SHARED_TEXT.applicationTab,SHARED_TEXT.applications,jsxRuntimeExports.jsx(ApplicationsTable,{}),"os-admin-center-approvals-panel-application-tab-btn",!1),createTab(SHARED_TEXT.engineTab,SHARED_TEXT.engines,jsxRuntimeExports.jsx(EnginesTable,{}),"os-admin-center-approvals-panel-engine-tab-btn",!e),createTab(SHARED_TEXT.registrationTab,SHARED_TEXT.registrations,jsxRuntimeExports.jsx(Table,{}),"os-admin-center-approvals-panel-registrations-tab-btn",!e)]},ApprovalsTabs=function(){var a=useDispatch(),e=useSelector(betaFeaturesSelector),t=_sliced_to_array$1(reactExports.useState([]),2),n=t[0],r=t[1],t=_sliced_to_array$1(reactExports.useState(0),2),i=t[0],s=t[1],t=tabUseStyles().classes;return reactExports.useEffect(function(){r(approvalsTabs(e))},[e]),jsxRuntimeExports.jsxs("div",{className:t.tabsContainer,"data-test":"os-admin-center-approvals-tabs",children:[jsxRuntimeExports.jsx("div",{className:t.tabsParent,"data-test":"os-admin-center-approvals-tabs.container",children:jsxRuntimeExports.jsx(CustomTabs,{selectedId:i,onChangeTab:function(e){var t=null!=(t=null==n||null==(t=n[e])?void 0:t.tab)?t:SHARED_TEXT.packageTab;switch(s(e),a(slice.actions.setActiveTab(t)),t){case SHARED_TEXT.applicationTab:a(actions.applications.resetList(null)),a(actions.applications.readStart(null));break;case SHARED_TEXT.engineTab:a(actions.engines.resetList(null)),a(actions.engines.readStart(null));break;case SHARED_TEXT.packageTab:a(actions.packages.resetList(null)),a(actions.packages.readStart(null))}},tabsList:n})}),jsxRuntimeExports.jsx(Divider,{}),jsxRuntimeExports.jsx(Box,{className:t.tabPanels,children:n.map(function(e,t){return jsxRuntimeExports.jsx(TabPanel,{value:i,index:t,children:jsxRuntimeExports.jsx(Stack,{sx:{flex:"1",display:"flex",flexDirection:"column",height:"100%",paddingBottom:"30px"},children:e.component})},e.id)})})]})};function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,o=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(o)throw r}}return i}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){var a;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(a="Object"===(a=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_array_like_to_array(e,t):void 0}var TableSearchInputButton=tableSearchComponents.TableSearchInputButton,uiStateActions=slice.actions,SearchButton=function(){var t=useDispatch(),e=_sliced_to_array(reactExports.useState(""),2),a=e[0],n=e[1],r=useSelector(selectActiveTab),i=useSelector(selectSearchValue),e=useSelector(selectIsTableSearchTyping),s=useSelector(selectIsTableSearchVisible),o=reactExports.useRef(debounce(function(e){t(uiStateActions.setSearchValue(e))},1e3)).current;return reactExports.useEffect(function(){n("")},[r]),reactExports.useEffect(function(){s&&n(i)},[s]),reactExports.useEffect(function(){switch(r){case SHARED_TEXT.applicationTab:t(actions.applications.resetList(null)),t(actions.applications.readStart(null));break;case SHARED_TEXT.engineTab:t(actions.engines.resetList(null)),t(actions.engines.readStart(null));break;case SHARED_TEXT.packageTab:t(actions.packages.resetList(null)),t(actions.packages.readStart(null))}!i&&a&&n("")},[i]),reactExports.useEffect(function(){return function(){o.cancel()}},[]),"Registrations"===r?null:jsxRuntimeExports.jsx(TableSearchInputButton,{onChange:function(e){e=e.target.value;n(e),o(e)},onClear:function(){t(uiStateActions.setSearchValue(""))},onToggleSearch:function(){t(uiStateActions.setIsTableSearchVisible(!s))},testId:"approvals-table-search",placeholderText:"Search Approval Requests",searchValue:i,inputValue:a,isSearchVisible:s,isSearching:e,searchItemTooltipText:"Search ".concat(r," Approval Requests")})},Approvals=function(){var e=navSectionStyles().classes;return jsxRuntimeExports.jsxs("section",{className:e.root,children:[jsxRuntimeExports.jsx("header",{className:e.header,style:{flexDirection:"column",borderBottom:"none",paddingBottom:"10px"},children:jsxRuntimeExports.jsx(Box,{width:"100%",children:jsxRuntimeExports.jsxs(Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Box,{className:e.startToolbar,children:jsxRuntimeExports.jsx(Typography,{variant:"h5","data-testid":"os-admin-center-approvals-title","data-test":"os-admin-center-approvals-title",sx:{fontWeight:"600",mb:1},children:SHARED_TEXT.approvals})}),jsxRuntimeExports.jsx(Box,{className:e.startToolbar,children:jsxRuntimeExports.jsx(Typography,{variant:"caption","data-testid":"os-admin-center-approvals-sub-title","data-test":"os-admin-center-approvals-sub-title",children:SHARED_TEXT.description})})]}),jsxRuntimeExports.jsx(Stack,{direction:"row",justifyContent:"flex-end",alignItems:"center",marginRight:"10px",gap:"10px",children:jsxRuntimeExports.jsx(SearchButton,{})})]})})}),jsxRuntimeExports.jsx("div",{className:e.tableWrapper,"data-testid":"os-admin-center-approvals-table","data-test":"os-admin-center-approvals-table",children:jsxRuntimeExports.jsx(ApprovalsTabs,{})})]})};export{ApprovalRequestsPanel,Approvals,EPackageStatus,SLICE_NAME,actions,getApprovalsModule,initialState,rootReducer,selectActiveTab,selectApplicationById,selectApplicationSortBy,selectApplicationSortDirection,selectEngineById,selectEngineSortBy,selectEngineSortDirection,selectIsTableSearchTyping,selectIsTableSearchVisible,selectPackageById,selectRegistrationById,selectSearchValue,selectTypeById};
|
|
1
|
+
import{aA as ELoadingStatus,a0 as createSlice,ad as combineReducers,au as AvailableComponents,j as jsxRuntimeExports,A as AIWareCacheProvider,b as AIWareThemeProvider,B as Box,r as reactExports,u as useSelector,p as hidePanel,at as betaFeaturesSelector,ao as selectIsFullscreenEnabled,aC as AvailablePanels,aG as EPanelSize,_ as all,a9 as isEqual,a7 as baseGraphQLApi,a8 as baseGraphQLApiWithError,am as takeLatest$1,v as mountPanel,aB as img$Q}from"./js-core.esm4.js";import{m as makeStyles,D as DynamicModuleLoader,A as AIWareIntlProvider,T as Typography,M as MemoizedFormattedMessage,E as Engines,B as Button,p as Divider,Y as startCase,a4 as Check,a5 as Remove,Q as CustomTabs,d as TabPanel,X as NullState,O as ErrorState,G as Grid,a6 as TableSortLabel,a7 as default_1$1,Z as PackagesAvatar}from"./js-core.esm7.js";import{g as generateState,z as tableInfiniteScroll,S as Stack,A as Avatar,J as index,T as Tooltip,I as IconButton,F as debounce,M as tableSearchComponents,v as validate,u as CopyText,N as statusPill}from"./js-core.esm9.js";import{k as selectAdminCenterOrgParameter,f as selectAdminCenterOrgIdString,n as navSectionStyles}from"./js-core.esm8.js";import{d as default_1}from"./js-core.esm26.js";import{u as useDispatch}from"./js-core.esm14.js";var SHARED_TEXT={approvals:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-panel.approvals.table.header",defaultMessage:"Approvals",description:"Approvals Panel Header"}),description:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-panel.approvals.table.header-sub-title",defaultMessage:"View any pending approvals for your Organization.",description:"Approvals Panel Header"}),packages:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-panel-package-tab",defaultMessage:"Packages",description:"Packages tab title"}),packageTab:"Package",engineTab:"Engine",applicationTab:"Application",registrationTab:"Registrations",registrations:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-panel-registrations-tab",defaultMessage:"Registrations",description:"Registrations tab title"}),applications:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-panel-application-tab",defaultMessage:"Applications",description:"Applications tab title"}),engines:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-panel-engine-tab",defaultMessage:"Engines",description:"Engines tab title"}),approvalTitle:function(e){e="registration"===e?"Registration Approvals":"Approval Requests";return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.header",defaultMessage:"{msg}",description:"Approval Requests panel Header",values:{msg:e}})},subTitle:function(e){e="registration"===e?"Review the registration request from this users who would like to join your Organization. Once you are finished, click confirm, and approved users will be sent an invitation email.":"Review and manage all requests sent from users of your organization. Once you are finished, click confirm to send approved requests to users.";return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.header-sub-title",defaultMessage:"{msg}",description:"Approval Requests panel Header sub title",values:{msg:e}})},closePanelMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals-requests.close-panel",defaultMessage:"Close",description:"Instructions for closing the approvals requests panel"}),viewPackage:function(e){switch(e){case"application":return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.view-application",defaultMessage:"View Application",description:"View Application Button"});case"engine":return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.view-engine",defaultMessage:"View Engine",description:"View Engine Button"});default:return jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.view-package",defaultMessage:"View Package",description:"View Package Button"})}},request:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.approve-button",defaultMessage:"Approve",description:"Approve Request Button"}),reject:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.reject-button",defaultMessage:"Reject",description:"Reject Request Button"}),cancel:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.cancel-button",defaultMessage:"Cancel",description:"Cancel Button"}),confirm:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"admin-center-approvals-requests-panel.confirm-button",defaultMessage:"Confirm",description:"Confirm Button"}),registrationErrorMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-registration-approvals.error-message",defaultMessage:"Something went wrong while loading your registrations invites.",description:"Registration Approvals pending packages error state"}),packageErrorMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.error-message",defaultMessage:"Something went wrong while loading your packages.",description:"Approvals pending packages error state"}),applicationErrorMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.error-message",defaultMessage:"Something went wrong while loading your applications.",description:"Approvals pending packages error state"}),engineErrorMessage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.error-message",defaultMessage:"Something went wrong while loading your engines.",description:"Approvals pending packages error state"}),noRegistration:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.registration-null-state-header",defaultMessage:"No Registration Approvals",description:"admin center approvals no registraions"}),noPendingRegistration:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.registration-null-state-description",defaultMessage:"There are currently no registrations requests to approve.",description:"admin center group no groups description"}),noPackage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.package-null-state-header",defaultMessage:"No Package Approvals",description:"admin center approvals no package"}),noPendingPackage:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.package-null-state-description",defaultMessage:"There are currently no package requests to approve.",description:"admin center group no groups description"}),noEngine:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.eng-null-state-header",defaultMessage:"No Engine Approvals",description:"admin center approvals no engines"}),noPendingEngine:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.eng-null-state-description",defaultMessage:"There are currently no engine requests to approve.",description:"admin center group no engines description"}),noApplication:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.app-null-state-header",defaultMessage:"No Application Approvals",description:"admin center approvals no apps"}),noPendingApplication:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.app-null-state-description",defaultMessage:"There are currently no application requests to approve.",description:"admin center group no apps description"}),name:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-package-name",defaultMessage:"Name",description:"Admin center packages table name header"}),creator:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-creator",defaultMessage:"Creator",description:"Admin center packages creator header"}),appId:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-app-id",defaultMessage:"Application Id",description:"Admin center approvals app id header"}),engId:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-eng-id",defaultMessage:"Engine Id",description:"Admin center approvals eng id header"}),requestedDate:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-admin-center-approvals.requested-date",defaultMessage:"Requested",description:"Requested Date"}),requestDate:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-requested-date",defaultMessage:"Request Date",description:"Admin center approvals request date header"}),status:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-status",defaultMessage:"Status",description:"Admin center approvals status header"}),noPackageFound:jsxRuntimeExports.jsx(MemoizedFormattedMessage,{id:"os-ac-approvals-table-header-no-package-found-message",defaultMessage:"No packages found",description:"Admin center approvals noPackageFound message"})};function _define_property$7(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}var EPackageStatus,headerStyles=makeStyles()(function(e){return{headerActionContainer:{display:"flex"},headerContainer:{alignItems:"center",display:"flex",justifyContent:"space-between"},header:{padding:"20px 20px 15px 30px"},title:{color:"#5C6269"},subTitle:{marginTop:"10px",fontWeight:400,color:"#5C6269"}}}),containerStyles=makeStyles()(function(e){return{container:{padding:"15px 20px 20px 30px",display:"flex",justifyContent:"space-between",flexDirection:"column"},card:{display:"flex",flexDirection:"column",backgroundColor:"#FAFAFA",border:"0.5px solid #E0E0E0",borderRadius:"4px"},approveCard:{display:"flex",alignItems:"center",padding:"20px"},userInfo:{paddingLeft:e.spacing(2),flexGrow:1},headerOwner:{color:"#0c53b0",minHeight:"16px"},panelHeaderLine:{minHeight:"16px"},userAvatar:{border:"2px solid #FFFFFF",height:"40px",width:"40px",marginRight:"14px",fontSize:"14px",color:"white"},requestorAvatar:{border:"2px solid #FFFFFF",height:"30px",width:"30px",fontSize:"14px",color:"white"},fallbackAvatar:{border:"2px solid #FFFFFF",color:"#5C6269",fontSize:"14px"},userName:{alignSelf:"center"},btnWrap:{display:"flex",gap:e.spacing(2),padding:e.spacing(2)},confirmButton:_define_property$7({float:"right"},"&:disabled",{color:"#9CA8B4 !important",background:"#D5DFE9 !important"})}}),SLICE_NAME="adminCenterApprovals",getValidIdsFromText=((e=>{e.Draft="draft",e.Pending="pending",e.Approved="approved",e.Published="published",e.Deactivated="deactivated"})(EPackageStatus=EPackageStatus||{}),function(e){return e.replace(" ",",").split(",").filter(function(e){return validate(e.trim())})});function asyncGeneratorStep$3(e,t,a,n,r,i,s){try{var o=e[i](s),l=o.value}catch(e){return void a(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$3(o){return function(){var e=this,s=arguments;return new Promise(function(t,a){var n=o.apply(e,s);function r(e){asyncGeneratorStep$3(n,t,a,r,i,"next",e)}function i(e){asyncGeneratorStep$3(n,t,a,r,i,"throw",e)}r(void 0)})}}function _define_property$6(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _object_spread$4(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property$6(t,e,a[e])})}return t}function ownKeys$2(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),a.push.apply(a,e)),a}function _object_spread_props$2(t,a){return a=null!=a?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys$2(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}),t}function _ts_generator$4(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function getPendingPackages(e){return _getPendingPackages.apply(this,arguments)}function _getPendingPackages(){return(_getPendingPackages=_async_to_generator$3(function(t){var a,n,r,i,s;return _ts_generator$4(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n="pendingPackages",i=[{name:"offset",type:"Int",value:t.offset},{name:"limit",type:"Int",value:t.limit}],(s=t.additionalSelectors)&&(r=getValidIdsFromText(s.searchValue),s.orgId&&i.push({name:"orgId",type:"ID",value:s.orgId}),s.id&&r.push(s.id),0<r.length?i.push({name:"ids",type:"[ID!]",value:r}):s.searchValue&&i.push({name:"nameRegexp",type:"String",value:s.searchValue})),r=i.map(function(e){return"$".concat(e.name,": ").concat(e.type)}).join(", "),s=i.map(function(e){return"".concat(e.name,": $").concat(e.name)}).join(", "),s="query ".concat(n," ( ").concat(r," ) {\n ").concat("packages"," (status: pending, owned: true, ").concat(s," ) {\n records {\n id\n name\n description\n icon\n createdBy {\n email\n name\n firstName\n lastName\n imageUrl\n }\n modifiedAt\n status\n }\n }\n }"),i=i.reduce(function(e,t){return e[t.name]=t.value,e},{}),[4,baseGraphQLApi(_object_spread_props$2(_object_spread$4({query:s,operationName:n,variables:i},a),{graphEndpoint:a.graphQLEndpoint}))];case 1:return s=e.sent(),isEqual("production","development")&&0<(null==s||null==(n=s.errors)?void 0:n.length)&&console.warn("Errors were returned for ".concat(s.errors.length," packages"),s.errors),[2,s.data.packages.records]}})})).apply(this,arguments)}function updatePendingPackage(e){return _updatePendingPackage.apply(this,arguments)}function _updatePendingPackage(){return(_updatePendingPackage=_async_to_generator$3(function(t){var a,n,r,i,s;return _ts_generator$4(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n=t.itemToUpdate,i="packageUpdate",s="\n mutation ".concat(r="updatePendingPackage"," ($input: PackageUpdateInput) {\n ").concat(i,"(input: $input) {\n id\n name\n createdBy {\n email\n name\n firstName\n lastName\n imageUrl\n }\n modifiedAt\n status\n }\n }"),[4,baseGraphQLApiWithError(_object_spread$4({query:s,variables:{input:n},operationName:r},a))];case 1:return[2,e.sent()[i]]}})})).apply(this,arguments)}function asyncGeneratorStep$2(e,t,a,n,r,i,s){try{var o=e[i](s),l=o.value}catch(e){return void a(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$2(o){return function(){var e=this,s=arguments;return new Promise(function(t,a){var n=o.apply(e,s);function r(e){asyncGeneratorStep$2(n,t,a,r,i,"next",e)}function i(e){asyncGeneratorStep$2(n,t,a,r,i,"throw",e)}r(void 0)})}}function _define_property$5(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _object_spread$3(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property$5(t,e,a[e])})}return t}function _ts_generator$3(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var APPLICATION_FIELDS="\n id\n name\n description\n iconUrl\n signedIconUrl\n isPublic\n status\n ownerOrganizationId\n validStateActions\n modifiedDateTime\n";function getPendingApplications(e){return _getPendingApplications.apply(this,arguments)}function _getPendingApplications(){return(_getPendingApplications=_async_to_generator$2(function(t){var a,n,r,i,s,o,l;return _ts_generator$3(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n="pendingApplications",r="applications",o=[{field:"modifiedDateTime",direction:"desc"}],i=[{name:"offset",type:"Int",value:t.offset},{name:"limit",type:"Int",value:t.limit}],(l=t.additionalSelectors)&&(s=getValidIdsFromText(l.searchValue),l.orgId&&i.push({name:"orgId",type:"ID",value:l.orgId}),l.id&&s.push(l.id),l.sortBy&&l.sortDirection&&(o.unshift({field:l.sortBy,direction:l.sortDirection}),o.pop()),0<s.length?i.push({name:"id",type:"ID!",value:s[0]}):l.searchValue&&i.push({name:"filter",type:"ApplicationFilter",value:{name:l.searchValue}})),i.push({name:"orderBy",type:"[ApplicationSortField]",value:o}),s=i.map(function(e){return"$".concat(e.name,": ").concat(e.type)}).join(", "),l=i.map(function(e){return"".concat(e.name,": $").concat(e.name)}).join(", "),o="query ".concat(n," (").concat(s,") {\n ").concat(r," (status: pending, ").concat(l,") {\n records {\n ").concat(APPLICATION_FIELDS,"\n }\n }\n }"),l=i.reduce(function(e,t){return e[t.name]=t.value,e},{}),[4,baseGraphQLApiWithError(_object_spread$3({query:o,operationName:n,variables:l,skipErrorIfData:!0},a))];case 1:return[2,e.sent()[r].records]}})})).apply(this,arguments)}function updatePendingApplication(e){return _updatePendingApplication.apply(this,arguments)}function _updatePendingApplication(){return(_updatePendingApplication=_async_to_generator$2(function(t){var a,n,r,i,s;return _ts_generator$3(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,s=t.itemToUpdate,r="applicationWorkflow",i="\n mutation ".concat(n="updatePendingApplication"," ($input: ApplicationWorkflow!) {\n ").concat(r,"(input: $input) {\n ").concat(APPLICATION_FIELDS,"\n }\n }"),s={input:{id:s.id,action:s.status}},[4,baseGraphQLApiWithError(_object_spread$3({query:i,variables:s,operationName:n},a))];case 1:return[2,e.sent()[r]]}})})).apply(this,arguments)}function asyncGeneratorStep$1(e,t,a,n,r,i,s){try{var o=e[i](s),l=o.value}catch(e){return void a(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator$1(o){return function(){var e=this,s=arguments;return new Promise(function(t,a){var n=o.apply(e,s);function r(e){asyncGeneratorStep$1(n,t,a,r,i,"next",e)}function i(e){asyncGeneratorStep$1(n,t,a,r,i,"throw",e)}r(void 0)})}}function _define_property$4(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _object_spread$2(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property$4(t,e,a[e])})}return t}function ownKeys$1(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),a.push.apply(a,e)),a}function _object_spread_props$1(t,a){return a=null!=a?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys$1(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}),t}function _ts_generator$2(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var ENGINE_FIELDS="\n id\n name\n price\n entityTags {\n tagKey\n tagValue\n }\n ownerOrganization {\n name\n id\n }\n signedIconPath\n signedLogoPath\n description\n displayName\n website\n category {\n name\n id\n iconClass\n type {\n name\n }\n }\n industries\n state\n isPublic\n deploymentModel\n testingDetails {\n isCertified\n }\n builds(limit: 5, orderBy:{field: version, direction: desc}) {\n records {\n id\n name\n version\n description\n status\n }\n }\n modifiedDateTime\n";function getPendingEngines(e){return _getPendingEngines.apply(this,arguments)}function _getPendingEngines(){return(_getPendingEngines=_async_to_generator$1(function(t){var a,n,r,i,s,o,l;return _ts_generator$2(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n="pendingEngines",r="engines",l=[{field:"modifiedDateTime",direction:"desc"}],i=[{name:"offset",type:"Int",value:t.offset},{name:"limit",type:"Int",value:t.limit}],(o=t.additionalSelectors)&&(s=getValidIdsFromText(o.searchValue),o.orgId&&i.push({name:"orgId",type:"String",value:o.orgId}),o.id&&s.push(o.id),o.sortBy&&o.sortDirection&&(l.unshift({field:o.sortBy,direction:o.sortDirection}),l.pop()),0<s.length?i.push({name:"ids",type:"[ID!]",value:s}):o.searchValue&&i.push({name:"filter",type:"EngineFilter",value:{name:o.searchValue}})),l=i.map(function(e){return"$".concat(e.name,": ").concat(e.type)}).join(", "),s=i.map(function(e){return"".concat(e.name,": $").concat(e.name)}).join(", "),o="query ".concat(n," ( ").concat(l," ) {\n ").concat(r," (state: pending, ").concat(s," ) {\n records {\n ").concat(ENGINE_FIELDS,"\n }\n }\n }"),l=i.reduce(function(e,t){return e[t.name]=t.value,e},{}),[4,baseGraphQLApiWithError(_object_spread_props$1(_object_spread$2({query:o,operationName:n,variables:l},a),{skipErrorIfData:!0}))];case 1:return[2,e.sent()[r].records]}})})).apply(this,arguments)}function getEngineById(e,t){return _getEngineById.apply(this,arguments)}function _getEngineById(){return(_getEngineById=_async_to_generator$1(function(t,a){var n,r,i;return _ts_generator$2(this,function(e){switch(e.label){case 0:return r="engine",i="query ".concat(n="getEngineById"," ($id: ID!) {\n ").concat(r," (id: $id) {\n ").concat(ENGINE_FIELDS,"\n }\n }"),[4,baseGraphQLApiWithError(_object_spread$2({query:i,operationName:n,variables:{id:a}},t))];case 1:return[2,e.sent()[r]]}})})).apply(this,arguments)}function updatePendingEngine(e){return _updatePendingEngine.apply(this,arguments)}function _updatePendingEngine(){return(_updatePendingEngine=_async_to_generator$1(function(t){var a,n,r,i,s,o,l,c,p,d,u,m,x,g,f;return _ts_generator$2(this,function(e){switch(e.label){case 0:if(a=t.apiConfigs,r=n="updateEngineBuild",p=(i=t.itemToUpdate).status,s=null==i||null==(s=i.builds)||null==(s=s.records)?void 0:s[0],!(c=null==s?void 0:s.id))throw new Error("Cannot approve engine at this time. Please try again later.");if(o="mutation ".concat(n," ($input: UpdateBuild!) {\n ").concat(r," (input: $input) {\n id\n name\n version\n description\n status\n }\n }"),l=null,c={input:{id:c,engineId:i.id,action:p}},"approve"!==p)return[3,8];p=["submit","approve"],u=!(d=!0),m=void 0,e.label=1;case 1:e.trys.push([1,6,7,8]),x=p[Symbol.iterator](),e.label=2;case 2:return(d=(f=x.next()).done)?[3,5]:(f=f.value,"approved"===(null==l||null==(g=l[r])?void 0:g.status)?[3,4]:(c.input.action=f,[4,baseGraphQLApiWithError(_object_spread$2({query:o,operationName:n,variables:c},a))]));case 3:l=e.sent(),e.label=4;case 4:return d=!0,[3,2];case 5:return[3,8];case 6:return g=e.sent(),u=!0,m=g,[3,8];case 7:try{d||null==x.return||x.return()}finally{if(u)throw m}return[7];case 8:if(null===(null==l?void 0:l[r]))throw new Error("Failed to update engine build");return[4,getEngineById(a,i.id)];case 9:return f=e.sent(),[2,_object_spread$2({},i,null!=f?f:{})]}})})).apply(this,arguments)}function asyncGeneratorStep(e,t,a,n,r,i,s){try{var o=e[i](s),l=o.value}catch(e){return void a(e)}o.done?t(l):Promise.resolve(l).then(n,r)}function _async_to_generator(o){return function(){var e=this,s=arguments;return new Promise(function(t,a){var n=o.apply(e,s);function r(e){asyncGeneratorStep(n,t,a,r,i,"next",e)}function i(e){asyncGeneratorStep(n,t,a,r,i,"throw",e)}r(void 0)})}}function _define_property$3(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _object_spread$1(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property$3(t,e,a[e])})}return t}function _ts_generator$1(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}var ORG_INVITE_FIELDS="\n id\n status\n invitee {\n email\n name\n }\n applicationRoles {\n application {\n id\n name\n }\n role {\n id\n name\n }\n }\n audit {\n action\n actor\n timestamp\n }\n expirationDate\n";function getOrgRegistrationApprovals(e){return _getOrgRegistrationApprovals.apply(this,arguments)}function _getOrgRegistrationApprovals(){return(_getOrgRegistrationApprovals=_async_to_generator(function(t){var a,n,r,i,s,o;return _ts_generator$1(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,n="registrationApprovals",r="organization",i=[],(s=t.additionalSelectors)&&(s.orgId||s.userOrgId)&&i.push({name:"id",type:"ID!",value:s.orgId||s.userOrgId}),s=i.map(function(e){return"$".concat(e.name,": ").concat(e.type)}).join(", "),o=i.map(function(e){return"".concat(e.name,": $").concat(e.name)}).join(", "),s="query ".concat(n," (").concat(s,") {\n ").concat(r," (").concat(o,") {\n organizationInvites (\n status: submitted\n ) {\n ").concat(ORG_INVITE_FIELDS,"\n }\n }\n }"),o=i.reduce(function(e,t){return e[t.name]=t.value,e},{}),[4,baseGraphQLApiWithError(_object_spread$1({query:s,operationName:n,variables:o},a))];case 1:return[2,e.sent()[r].organizationInvites]}})})).apply(this,arguments)}function updateRegistrationApproval(e){return _updateRegistrationApproval.apply(this,arguments)}function _updateRegistrationApproval(){return(_updateRegistrationApproval=_async_to_generator(function(t){var a,n,r,i,s;return _ts_generator$1(this,function(e){switch(e.label){case 0:return a=t.apiConfigs,s=t.itemToUpdate,r="updateOrganizationInvite",i="\n mutation ".concat(n="updateRegInvite"," ($input: UpdateOrganizationInviteInput!) {\n ").concat(r,"(input: $input) {\n ").concat(ORG_INVITE_FIELDS,"\n }\n }"),s={input:{organizationInviteId:s.id,applicationRoles:s.applicationRoles.map(function(e){return{applicationId:e.application.id,roleId:e.role.id}}),action:s.status}},[4,baseGraphQLApiWithError(_object_spread$1({query:i,variables:s,operationName:n},a))];case 1:return[2,e.sent()[r]]}})})).apply(this,arguments)}var _obj,namespace$4="applications",_generateState$3=generateState({sliceName:SLICE_NAME,namespace:namespace$4,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getPendingApplications,update:updatePendingApplication,pageSize:30,getAdditionalSelectors:function(){return{sortBy:selectApplicationSortBy,sortDirection:selectApplicationSortDirection,searchValue:selectSearchValue,orgId:selectAdminCenterOrgParameter}}},toast:{update:{success:"Application successfully updated",error:"Failed to update application"}}}),slice$4=_generateState$3.slice,selectors$3=_generateState$3.selectors,sagas$3=_generateState$3.sagas,initialState$5=_generateState$3.initialState,namespace$3="engines",_generateState$2=generateState({sliceName:SLICE_NAME,namespace:namespace$3,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getPendingEngines,update:updatePendingEngine,pageSize:30,getAdditionalSelectors:function(){return{sortBy:selectEngineSortBy,sortDirection:selectEngineSortDirection,searchValue:selectSearchValue}}},toast:{update:{success:"Engine updated successfully",error:"Failed to update engine"}}}),slice$3=_generateState$2.slice,selectors$2=_generateState$2.selectors,sagas$2=_generateState$2.sagas,initialState$4=_generateState$2.initialState,namespace$2="registrations",_generateState$1=generateState({sliceName:SLICE_NAME,namespace:namespace$2,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getOrgRegistrationApprovals,update:updateRegistrationApproval,getAdditionalSelectors:function(){return{orgId:selectAdminCenterOrgParameter,userOrgId:selectAdminCenterOrgIdString}}},toast:{update:{success:"Registration approval updated successfully",error:"Failed to update registration approval"}}}),slice$2=_generateState$1.slice,selectors$1=_generateState$1.selectors,sagas$1=_generateState$1.sagas,initialState$3=_generateState$1.initialState,selectPackageById=function(t){return function(e){return((null==e||null==(e=e[SLICE_NAME])||null==(e=e[namespace$1])?void 0:e.items)||[]).find(function(e){return e.id===t})}},selectApplicationById=function(t){return function(e){return((null==e||null==(e=e[SLICE_NAME])||null==(e=e[namespace$4])?void 0:e.items)||[]).find(function(e){return e.id===t})}},selectEngineById=function(t){return function(e){return((null==e||null==(e=e[SLICE_NAME])||null==(e=e[namespace$3])?void 0:e.items)||[]).find(function(e){return e.id===t})}},selectRegistrationById=function(t){return function(e){return((null==e||null==(e=e[SLICE_NAME])||null==(e=e[namespace$2])?void 0:e.items)||[]).find(function(e){return e.id===t})}},selectTypeById=function(t,a){return function(e){return"package"===a?selectPackageById(t)(e):"application"===a?selectApplicationById(t)(e):"engine"===a?selectEngineById(t)(e):"registration"===a?selectRegistrationById(t)(e):void 0}},selectIsTableSearchTyping=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.isTableSearchTyping},selectIsTableSearchVisible=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.isTableSearchVisible},selectActiveTab=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.activeTab},selectSearchValue=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.searchValue},selectEngineSortBy=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.engineSortBy},selectEngineSortDirection=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.engineSortDirection},selectApplicationSortBy=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.applicationSortBy},selectApplicationSortDirection=function(e){return null==e||null==(e=e[SLICE_NAME])?void 0:e.uiState.applicationSortDirection},namespace$1="packages",_generateState=generateState({sliceName:SLICE_NAME,namespace:namespace$1,dedupeResponse:!0,dedupeIdProp:"id",apiCalls:{read:getPendingPackages,update:updatePendingPackage,pageSize:30,getAdditionalSelectors:function(){return{searchValue:selectSearchValue,orgId:selectAdminCenterOrgParameter}}},toast:{update:{success:"Package updated successfully",error:"Failed to update package"}}}),slice$1=_generateState.slice,selectors=_generateState.selectors,sagas=_generateState.sagas,initialState$2=_generateState.initialState,namespace="uiState",initialState$1={status:ELoadingStatus.idle,activeTab:SHARED_TEXT.packageTab,searchValue:"",isTableSearchTyping:!1,isTableSearchVisible:!1,engineSortBy:"modifiedDateTime",engineSortDirection:"desc",applicationSortBy:"modifiedDateTime",applicationSortDirection:"desc"},slice=createSlice({name:"".concat(SLICE_NAME,"/").concat(namespace),initialState:initialState$1,reducers:{init:function(e){e.status=ELoadingStatus.pending},initDone:function(e){e.status=ELoadingStatus.success},initFailed:function(e){e.status=ELoadingStatus.failure},setActiveTab:function(e,t){e.activeTab=t.payload,e.searchValue="",e.isTableSearchTyping=!1,e.isTableSearchVisible=!1},setSearchValue:function(e,t){e.searchValue=null!=(t=t.payload)?t:"",e.isTableSearchTyping=!1},setIsTableSearchTyping:function(e,t){e.isTableSearchTyping=t.payload},setIsTableSearchVisible:function(e,t){e.isTableSearchVisible=t.payload},setClearTableSearch:function(e){e.searchValue="",e.isTableSearchTyping=!1,e.isTableSearchVisible=!1},setEngineSort:function(e,t){e.engineSortBy=t.payload.col,e.engineSortDirection=t.payload.dir},setApplicationSort:function(e,t){e.applicationSortBy=t.payload.col,e.applicationSortDirection=t.payload.dir}}});function _define_property$2(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}_define_property$2(_obj={},namespace,initialState$1),_define_property$2(_obj,namespace$1,initialState$2),_define_property$2(_obj,namespace$4,initialState$5),_define_property$2(_obj,namespace$3,initialState$4),_define_property$2(_obj,namespace$2,initialState$3);var _obj1,_obj2,initialState=_obj,actions=(_define_property$2(_obj1={},namespace,slice.actions),_define_property$2(_obj1,namespace$1,slice$1.actions),_define_property$2(_obj1,namespace$4,slice$4.actions),_define_property$2(_obj1,namespace$3,slice$3.actions),_define_property$2(_obj1,namespace$2,slice$2.actions),_obj1),rootReducer=combineReducers((_define_property$2(_obj2={},namespace,slice.reducer),_define_property$2(_obj2,namespace$1,slice$1.reducer),_define_property$2(_obj2,namespace$4,slice$4.reducer),_define_property$2(_obj2,namespace$3,slice$3.reducer),_define_property$2(_obj2,namespace$2,slice$2.reducer),_obj2));function _ts_generator(n,r){var i,s,o,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},e={next:t(0),throw:t(1),return:t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(a){return function(e){var t=[a,e];if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,s&&(o=2&t[0]?s.return:t[0]?s.throw||((o=s.return)&&o.call(s),0):s.next)&&!(o=o.call(s,t[1])).done)return o;switch(s=0,(t=o?[2&t[0],o.value]:t)[0]){case 0:case 1:o=t;break;case 4:return l.label++,{value:t[1],done:!1};case 5:l.label++,s=t[1],t=[0];continue;case 7:t=l.ops.pop(),l.trys.pop();continue;default:if(!(o=0<(o=l.trys).length&&o[o.length-1])&&(6===t[0]||2===t[0])){l=0;continue}if(3===t[0]&&(!o||t[1]>o[0]&&t[1]<o[3]))l.label=t[1];else if(6===t[0]&&l.label<o[1])l.label=o[1],o=t;else{if(!(o&&l.label<o[2])){o[2]&&l.ops.pop(),l.trys.pop();continue}l.label=o[2],l.ops.push(t)}}t=r.call(n,l)}catch(e){t=[6,e],s=0}finally{i=o=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function initUiState(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,!0];case 1:return e.sent(),[2]}})}function watchUiInit(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,takeLatest$1(slice.actions.init.type,initUiState)];case 1:return e.sent(),[2]}})}function rootSaga(){return _ts_generator(this,function(e){switch(e.label){case 0:return[4,all([watchUiInit(),sagas$3.watchRead(),sagas$3.watchUpdate(),sagas.watchRead(),sagas.watchUpdate(),sagas$2.watchRead(),sagas$2.watchUpdate(),sagas$1.watchRead(),sagas$1.watchUpdate()])];case 1:return e.sent(),[2]}})}function _define_property$1(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function getApprovalsModule(){return{id:SLICE_NAME,reducerMap:_define_property$1({},SLICE_NAME,rootReducer),sagas:[rootSaga],initialActions:[]}}var parentPanelId=AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,useMountPanel=function(t,e){var a=useDispatch(),n=useSelector(selectIsFullscreenEnabled),r={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:n?0:55,marginStart:n?0:80,size:EPanelSize.xlarge,parentPanelId:parentPanelId,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0};return{package:function(){var e=AvailableComponents.PACKAGE_DETAILS_PANEL;a(mountPanel({panelId:e,microFrontend:{name:e,config:{panelConfig:{data:{packageId:t,tabsToShow:{info:{defaultPackageData:["name","status","owner","installDate","distributionDate","lastUpdated","distributionType","primaryResourceType","version"]},resources:["schema","engine","package"]}},labels:{},actions:{handleClose:function(){return a(hidePanel(AvailableComponents.PACKAGE_DETAILS_PANEL))}},settings:{unstyledHeader:!0,runningUserId:"mew"}}}},panelConfig:r}))},application:function(){var e="APPLICATION_DETAILS_PANEL-".concat(t);a(mountPanel({panelId:e,microFrontend:{name:"APPLICATION_DETAILS_PANEL",config:{name:"Application Details",applicationId:t,disableInstallFeature:!0,appIsOwned:!0}},panelConfig:r}))},engine:function(){var e={name:AvailableComponents.ENGINE_CENTER_DETAILS,config:{name:"Engine Details",engineId:t,isReadOnly:!1,isFullScreen:n}};a(mountPanel({panelId:"ENGINE_CENTER_DETAILS",microFrontend:e,panelConfig:r}))},registration:function(){}}[e]};function _array_like_to_array$2(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function _array_with_holes$2(e){if(Array.isArray(e))return e}function _define_property(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function _iterable_to_array_limit$2(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,o=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(o)throw r}}return i}}function _non_iterable_rest$2(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{},n=Object.keys(a);(n="function"==typeof Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(a).filter(function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})):n).forEach(function(e){_define_property(t,e,a[e])})}return t}function ownKeys(e,t){var a=Object.keys(e);return Object.getOwnPropertySymbols&&(e=Object.getOwnPropertySymbols(e),a.push.apply(a,e)),a}function _object_spread_props(t,a){return a=null!=a?a:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}),t}function _sliced_to_array$2(e,t){return _array_with_holes$2(e)||_iterable_to_array_limit$2(e,t)||_unsupported_iterable_to_array$2(e,t)||_non_iterable_rest$2()}function _unsupported_iterable_to_array$2(e,t){var a;if(e)return"string"==typeof e?_array_like_to_array$2(e,t):"Map"===(a="Object"===(a=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_array_like_to_array$2(e,t):void 0}var Body=function(e){var t=e.id,a=e.panelId,n=e.pkg,r=e.type,i=useDispatch(),e=containerStyles().classes,s=_sliced_to_array$2(reactExports.useState(!1),2),o=s[0],l=s[1],s=_sliced_to_array$2(reactExports.useState(!1),2),c=s[0],p=s[1],s=_sliced_to_array$2(reactExports.useState(!0),2),d=s[0],u=s[1],s=_sliced_to_array$2(reactExports.useState(!0),2),m=s[0],x=s[1],g=useSelector(selectTypeById(t,r)),s=reactExports.useMemo(function(){var e,t;if(g)return"package"===r?{name:g.name,description:g.description,icon:g.icon,createdBy:{name:null==(e=g.createdBy)?void 0:e.name,email:null==(e=g.createdBy)?void 0:e.email,firstName:null==(e=g.createdBy)?void 0:e.firstName,lastName:null==(e=g.createdBy)?void 0:e.lastName,imageUrl:null==(e=g.createdBy)?void 0:e.imageUrl},email:null}:"application"===r?{name:g.name,description:g.description,icon:g.signedIconUrl,createdBy:null,email:null}:"engine"===r?{name:(e=g).name,description:e.description,icon:null!=(t=null==e?void 0:e.signedIconPath)?t:e.signedLogoPath,createdBy:null,email:null}:"registration"===r?{name:null!=(e=null!=(e=null==(t=g)?void 0:t.userDetails)?e:{})&&e.firstName&&null!=e&&e.lastName?f(e.firstName,e.lastName):(null==t||null==(e=t.invitee)?void 0:e.name)||"--",description:null,icon:null,createdBy:null,email:t.invitee.email,requestedDate:null!=(e=null==t||null==(e=t.audit)||null==(e=e.find(function(e){return"submit"===e.action}))?void 0:e.timestamp)?e:"",applicationRoles:null!=(e=null==t?void 0:t.applicationRoles)?e:[],userDetails:null!=(t=null==t||null==(e=t.userDetails)?void 0:e.customFields)?t:{}}:void 0},[g,r])||n,n=useMountPanel(t,r),f=function(e,t){return"".concat(null==e||null==(e=e.charAt(0))?void 0:e.toUpperCase()).concat(null==t||null==(e=t.charAt(0))?void 0:e.toUpperCase())},h=reactExports.useCallback(function(){i(actions["".concat(r,"s")].updateResetStatus(null)),i(hidePanel(a))},[i,a,r]);return jsxRuntimeExports.jsxs(Box,{className:e.container,"data-test":"admin-center-approvals-requests-panel-body",children:[jsxRuntimeExports.jsxs(Box,{className:e.card,"data-test":"admin-center-approvals-requests-panel-body.card",children:[jsxRuntimeExports.jsxs(Box,{className:e.approveCard,children:[jsxRuntimeExports.jsx("div",{children:"registration"===r?jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{fontWeight:700},children:null==s?void 0:s.name}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:"primary.main"},children:null==s?void 0:s.email})]}):null!=s&&s.icon?jsxRuntimeExports.jsx(Avatar,{alt:(null==s?void 0:s.name)||"",src:s.icon,className:e.userAvatar}):jsxRuntimeExports.jsx(Avatar,{className:e.userAvatar,"data-test":"admin-center-approvals-requests-panel-body.card.avatar",sx:{color:"#5C6269"},children:"engine"===r?jsxRuntimeExports.jsx(Engines,{}):f((null==s?void 0:s.name)||"","")})}),"registration"!==r?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs("div",{className:e.userInfo,children:[jsxRuntimeExports.jsx(Typography,{variant:"body1","data-testid":"admin-center-approvals-requests-panel-card-name","data-test":"admin-center-approvals-requests-panel-card-name",sx:{fontWeight:400},noWrap:!0,children:index.truncatedString((null==s?void 0:s.name)||"",30)}),(null==s?void 0:s.description)&&jsxRuntimeExports.jsx(Typography,{variant:"caption","data-testid":"admin-center-approvals-requests-panel-card-email","data-test":"admin-center-approvals-requests-panel-card-email",sx:{fontWeight:400},noWrap:!0,children:index.truncatedString(s.description,30)})]}),jsxRuntimeExports.jsx(Button,{variant:"outlined",onClick:n,"data-testid":"admin-center-approvals-requests-panel-view-package-btn","data-test":"admin-center-approvals-requests-panel-view-package-btn",sx:{height:"30px"},children:SHARED_TEXT.viewPackage(r)})]}):jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx("div",{className:e.userInfo}),jsxRuntimeExports.jsxs(Typography,{component:"span",variant:"caption",sx:{fontWeight:400},children:[SHARED_TEXT.requestedDate,jsxRuntimeExports.jsx(Typography,{component:"span",variant:"body2",sx:{fontWeight:700},children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==s?void 0:s.requestedDate})})]})]})]}),(null==s?void 0:s.createdBy)&&jsxRuntimeExports.jsxs(Stack,{gap:2,p:"20px",pt:0,children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",children:"Reqestor"}),jsxRuntimeExports.jsxs(Stack,{direction:"row",gap:1,children:[null!=s&&null!=(n=s.createdBy)&&n.imageUrl?jsxRuntimeExports.jsx(Avatar,{alt:(null==s||null==(n=s.createdBy)?void 0:n.firstName)+" "+(null==s||null==(n=s.createdBy)?void 0:n.lastName),src:null==s||null==(n=s.createdBy)?void 0:n.imageUrl,className:e.requestorAvatar}):jsxRuntimeExports.jsx(Avatar,{className:e.requestorAvatar,sx:{color:"#5C6269"},"data-test":"admin-center-approvals-requests-panel-body.card.avatar",children:f((null==s||null==(n=s.createdBy)?void 0:n.firstName)||"",(null==s||null==(n=s.createdBy)?void 0:n.lastName)||"")}),jsxRuntimeExports.jsxs(Stack,{direction:"row",gap:2,children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{fontSize:"14px",fontWeight:700},alignSelf:"center",children:index.truncatedString((null==s||null==(n=s.createdBy)?void 0:n.name)||"",20)}),(null==s||null==(n=s.createdBy)?void 0:n.email)&&jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{color:"#1565C0",fontSize:"14px",fontWeight:400},alignSelf:"center",children:index.truncatedString((null==s||null==(n=s.createdBy)?void 0:n.email)||"",38)})]})]})]}),"registration"===r&&jsxRuntimeExports.jsxs(Stack,{gap:2,p:"20px",pt:0,children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",children:"Registration Information:"}),jsxRuntimeExports.jsx(Stack,{mt:2,px:2,gap:2,divider:jsxRuntimeExports.jsx(Divider,{}),children:Object.entries((null==s?void 0:s.userDetails)||{}).map(function(e){var e=_sliced_to_array$2(e,2),t=e[0],e=e[1];return jsxRuntimeExports.jsxs(Stack,{gap:2,children:[jsxRuntimeExports.jsx(Typography,{variant:"body1",sx:{fontSize:"14px",fontWeight:700},children:startCase(t)}),jsxRuntimeExports.jsx(Typography,{variant:"body2",sx:{fontSize:"14px",fontWeight:400,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e})]},t)})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}}),jsxRuntimeExports.jsxs(Box,{className:e.btnWrap,children:[jsxRuntimeExports.jsx(Button,{fullWidth:!0,"data-testid":"admin-center-approvals-requests-panel-request-btn","data-test":"admin-center-approvals-requests-panel-request-btn",variant:d?"outlined":"contained",startIcon:d?null:jsxRuntimeExports.jsx(Check,{}),color:d?"primary":"success",onClick:function(){l(!0),p(!0),u(!1),x(!0)},size:"large",sx:{height:"38px"},children:SHARED_TEXT.request}),jsxRuntimeExports.jsx(Button,{fullWidth:!0,"data-testid":"admin-center-approvals-requests-panel-reject-btn","data-test":"admin-center-approvals-requests-panel-reject-btn",variant:m?"outlined":"contained",startIcon:m?null:jsxRuntimeExports.jsx(Remove,{}),color:m?"primary":"error",onClick:function(){l(!0),p(!1),u(!0),x(!1)},disabled:"engine"===r,size:"large",sx:{height:"38px"},children:SHARED_TEXT.reject})]})]}),jsxRuntimeExports.jsxs(Box,{sx:{position:"absolute",bottom:"30px",right:"30px",display:"flex",gap:2},children:[jsxRuntimeExports.jsx(Button,{variant:"outlined",onClick:h,"data-testid":"admin-center-approvals-requests-panel-cancel-btn","data-test":"admin-center-approvals-requests-panel-cancel-btn",children:SHARED_TEXT.cancel}),jsxRuntimeExports.jsx(Button,{variant:"contained",disabled:!o,className:e.confirmButton,onClick:function(){var e={package:{approve:EPackageStatus.Approved,reject:EPackageStatus.Draft},application:{approve:"approve",reject:"reject"},engine:{approve:"approve",reject:"disapprove"},registration:{approve:"approve",reject:"reject"}},e=c?e[r].approve:e[r].reject;i(actions["".concat(r,"s")].updateStart(_object_spread_props(_object_spread({},g),{id:t,status:e}))),h()},"data-testid":"admin-center-approvals-requests-panel-confirm-btn","data-test":"admin-center-approvals-requests-panel-confirm-btn",children:SHARED_TEXT.confirm})]})]})},Header=function(e){var t=e.panelId,e=e.type,a=headerStyles().classes,n=useDispatch();return jsxRuntimeExports.jsxs("header",{className:a.header,"data-testid":"admin-center-approvals-requests-panel-header","data-test":"admin-center-approvals-requests-panel-header",children:[jsxRuntimeExports.jsxs("div",{className:a.headerContainer,children:[jsxRuntimeExports.jsx(Typography,{variant:"h1","data-testid":"admin-center-approvals-requests-panel-header-title","data-test":"admin-center-approvals-requests-panel-header-title",className:a.title,children:SHARED_TEXT.approvalTitle(e)}),jsxRuntimeExports.jsx("div",{className:a.headerActionContainer,children:jsxRuntimeExports.jsx(Tooltip,{title:SHARED_TEXT.closePanelMessage,children:jsxRuntimeExports.jsx(IconButton,{onClick:function(){n(hidePanel(t))},"aria-labelledby":"admin-center-approvals-requests-panel-close-panel","data-testid":"admin-center-approvals-requests-panel-close-panel","data-test":"admin-center-approvals-requests-panel-close-panel",size:"large",children:jsxRuntimeExports.jsx(default_1,{})})})})]}),jsxRuntimeExports.jsx(Typography,{variant:"subtitle1","data-testid":"admin-center-approvals-requests-panel-header-sub-title","data-test":"admin-center-approvals-requests-panel-header-sub-title",className:a.subTitle,children:SHARED_TEXT.subTitle(e)})]})};function _object_without_properties(e,t){if(null==e)return{};var a,n=_object_without_properties_loose(e,t);if(Object.getOwnPropertySymbols)for(var r=Object.getOwnPropertySymbols(e),i=0;i<r.length;i++)a=r[i],0<=t.indexOf(a)||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a]);return n}function _object_without_properties_loose(e,t){if(null==e)return{};for(var a,n={},r=Object.keys(e),i=0;i<r.length;i++)a=r[i],0<=t.indexOf(a)||(n[a]=e[a]);return n}var ApprovalRequestsPanel=function(e){var t=e.id,a=e.pkg,e=_object_without_properties(e,["id","pkg"]),e=null!=(e=null==e?void 0:e.type)?e:"package",n=AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL;return jsxRuntimeExports.jsx(AIWareCacheProvider,{children:jsxRuntimeExports.jsx(AIWareThemeProvider,{children:jsxRuntimeExports.jsx(DynamicModuleLoader,{modules:[getApprovalsModule()],children:jsxRuntimeExports.jsx(AIWareIntlProvider,{children:jsxRuntimeExports.jsxs(Box,{"data-test":"admin-center-approval-requests-panel",children:[jsxRuntimeExports.jsx(Header,{panelId:n,type:e}),jsxRuntimeExports.jsx(Body,{id:t,panelId:n,type:e,pkg:a})]})})})})})},tabUseStyles=makeStyles()(function(e){return{tabsContainer:{height:"100%",flexGrow:"1",display:"flex",flexDirection:"column","& .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"}},tabPanels:{width:"100%",height:"100%"}}}),PackageTableHeader=function(){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Grid,{"data-test":"ac-approvals-table-header",sx:{height:32,pl:3},alignItems:"center",display:"flex",container:!0,children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,sx:{display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-package-name","data-test":"os-admin-center-approvals-table-header-package-name",children:SHARED_TEXT.name})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-creator","data-test":"os-admin-center-approvals-table-header-creator",children:SHARED_TEXT.creator})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-requested-date","data-test":"os-admin-center-approvals-table-requested-date",children:SHARED_TEXT.requestDate})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-status","data-test":"os-admin-center-approvals-table-status",children:SHARED_TEXT.status})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}})]})},StatusPill$3=statusPill.jsx,TableInfiniteScroll$3=tableInfiniteScroll.jsx.TableInfiniteScroll,itemHeight$3=60,TableRow$3=function(e){var t=e.item,a=e.index,e=e.onClick,n="".concat(itemHeight$3-1,"px");return jsxRuntimeExports.jsx(Box,{"data-testid":"package-table-index-".concat(a),"data-test":"package-table-index-".concat(a),sx:{width:"100%",height:n,borderBottom:"1px solid #D5DFE9","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},children:jsxRuntimeExports.jsx(Grid,{style:{height:"100%",flexGrow:1},container:!0,children:jsxRuntimeExports.jsxs(Grid,{direction:"row",justifyContent:"flex-start",alignItems:"center",container:!0,xs:12,sx:{pl:3,cursor:"pointer"},onClick:e,"data-test":"os-admin-center-approvals-table-row",children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,sx:{pr:3},children:jsxRuntimeExports.jsx(Typography,{variant:"body1",color:"textPrimary","data-testid":"admin-center.group-row.name","data-test":"admin-center.group-row.name",children:index.truncatedString(null==t?void 0:t.name,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.created-by-email","data-test":"admin-center.approvals-row.created-by-email",children:index.truncatedString(null==t||null==(a=t.createdBy)?void 0:a.email,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==t?void 0:t.modifiedAt})}),jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.packages-status","data-test":"admin-center.approvals-row.packages-status",children:jsxRuntimeExports.jsx(StatusPill$3,{statusType:"package",status:null==t?void 0:t.status,ContainerProps:{sx:{width:"fit-content",height:"18px",left:"264px",top:"244px",borderRadius:"32px",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center",padding:"3px 10px",gap:"10px",border:"1px solid #215E73"}},TypographyProps:{sx:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"9px",lineHeight:"12px",textTransform:"uppercase",color:"#215E73"}}})})})]})})})},_packagesRedux_selectors=selectors,selectItems$3=_packagesRedux_selectors.selectItems,selectHasMore$3=_packagesRedux_selectors.selectHasMore,selectOffset$3=_packagesRedux_selectors.selectOffset,selectReadStatus$3=_packagesRedux_selectors.selectReadStatus,PackageTable=function(){function e(){n(actions.packages.readStart(null))}var n=useDispatch(),t=useSelector(selectItems$3),a=useSelector(selectHasMore$3),r=useSelector(selectOffset$3),i=useSelector(selectReadStatus$3),s=useSelector(selectIsFullscreenEnabled);return jsxRuntimeExports.jsx(TableInfiniteScroll$3,{hasMore:a,fetchMore:e,fetchOnMount:0===t.length,offset:r,items:t,itemHeight:itemHeight$3,isLoading:"pending"===i,error:"failure"===i,adjustTableHeight:-40,TableRowComponent:function(e){var a=e.item;return jsxRuntimeExports.jsx(TableRow$3,{item:a,index:e.index,onClick:function(){var e,t;e=(null==a?void 0:a.id)||"",e={name:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,config:{id:e,type:"package"}},t={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:s?0:55,marginStart:s?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},n(mountPanel({panelId:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,microFrontend:e,panelConfig:t}))}})},TableHeaderComponent:jsxRuntimeExports.jsx(PackageTableHeader,{}),TableEmptyStateComponent:jsxRuntimeExports.jsx(NullState,{image:img$Q,header:SHARED_TEXT.noPackage,description:SHARED_TEXT.noPendingPackage}),TableErrorStateComponent:jsxRuntimeExports.jsx(ErrorState,{onRetry:e,errorMessage:SHARED_TEXT.packageErrorMessage})})},uiActions$1=slice.actions,ApplicationsTableHeader=function(){function t(e){var t=n!==e||n===e&&"desc"===r;a(uiActions$1.setApplicationSort({col:e,dir:t?"asc":"desc"})),a(actions.applications.resetList(null)),a(actions.applications.readStart(null))}function e(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:n===e,direction:n===e?r:"asc",onClick:function(){return t(e)},IconComponent:default_1$1})}var a=useDispatch(),n=useSelector(selectApplicationSortBy),r=useSelector(selectApplicationSortDirection);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Grid,{"data-test":"ac-approvals-table-header",sx:{height:32,pl:3},alignItems:"center",display:"flex",container:!0,children:[jsxRuntimeExports.jsxs(Grid,{item:!0,xs:4,sx:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-application-name","data-test":"os-admin-center-approvals-table-header-application-name",children:SHARED_TEXT.name}),e("name")]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-app-id","data-test":"os-admin-center-approvals-table-header-app-id",children:SHARED_TEXT.appId})}),jsxRuntimeExports.jsxs(Grid,{item:!0,xs:2,children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-requested-date","data-test":"os-admin-center-approvals-table-requested-date",onClick:function(){return t("modifiedDateTime")},children:SHARED_TEXT.requestDate}),e("modifiedDateTime")]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-status","data-test":"os-admin-center-approvals-table-status",children:SHARED_TEXT.status})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}})]})},StatusPill$2=statusPill.jsx,TableInfiniteScroll$2=tableInfiniteScroll.jsx.TableInfiniteScroll,itemHeight$2=60,TableRow$2=function(e){var t=e.item,a=e.index,e=e.onClick,n="".concat(itemHeight$2-1,"px");return jsxRuntimeExports.jsx(Box,{"data-testid":"application-table-index-".concat(a),"data-test":"application-table-index-".concat(a),sx:{width:"100%",height:n,borderBottom:"1px solid #D5DFE9","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},children:jsxRuntimeExports.jsx(Grid,{style:{height:"100%",flexGrow:1},container:!0,children:jsxRuntimeExports.jsxs(Grid,{direction:"row",justifyContent:"flex-start",alignItems:"center",container:!0,xs:12,sx:{pl:3,cursor:"pointer"},onClick:e,"data-test":"os-admin-center-approvals-table-row",children:[jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:1,sx:{pl:1,pr:2},children:null!=t&&t.iconUrl?jsxRuntimeExports.jsx(Box,{sx:{display:"flex","& img":{width:"24px",height:"24px",borderRadius:"12px"}},children:jsxRuntimeExports.jsx("img",{src:t.iconUrl,alt:"package-icon"})}):jsxRuntimeExports.jsx(PackagesAvatar,{})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:3,sx:{pr:3},children:jsxRuntimeExports.jsx(Typography,{variant:"body1",color:"textPrimary","data-testid":"admin-center.group-row.name","data-test":"admin-center.group-row.name",children:index.truncatedString(null==t?void 0:t.name,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,sx:{pr:3},children:jsxRuntimeExports.jsx(CopyText,{id:"admin-center.approvals-row.created-by-email",variant:"body2",value:null==t?void 0:t.id})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==t?void 0:t.modifiedDateTime})}),jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.applications-status","data-test":"admin-center.approvals-row.applications-status",children:jsxRuntimeExports.jsx(StatusPill$2,{statusType:"package",status:null==t?void 0:t.status,ContainerProps:{sx:{width:"fit-content",height:"18px",left:"264px",top:"244px",borderRadius:"32px",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center",padding:"3px 10px",gap:"10px",border:"1px solid #215E73"}},TypographyProps:{sx:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"9px",lineHeight:"12px",textTransform:"uppercase",color:"#215E73"}}})})})]})})})},_applicationsRedux_selectors=selectors$3,selectItems$2=_applicationsRedux_selectors.selectItems,selectHasMore$2=_applicationsRedux_selectors.selectHasMore,selectOffset$2=_applicationsRedux_selectors.selectOffset,selectReadStatus$2=_applicationsRedux_selectors.selectReadStatus,ApplicationsTable=function(){function e(){n(actions.applications.readStart(null))}var n=useDispatch(),t=useSelector(selectItems$2),a=useSelector(selectHasMore$2),r=useSelector(selectOffset$2),i=useSelector(selectReadStatus$2),s=useSelector(selectIsFullscreenEnabled);return jsxRuntimeExports.jsx(TableInfiniteScroll$2,{hasMore:a,fetchMore:e,fetchOnMount:0===t.length,offset:r,items:t,itemHeight:itemHeight$2,isLoading:"pending"===i,error:"failure"===i,adjustTableHeight:-40,TableRowComponent:function(e){var a=e.item;return jsxRuntimeExports.jsx(TableRow$2,{item:a,index:e.index,onClick:function(){var e,t;e=(null==a?void 0:a.id)||"",e={name:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,config:{id:e,type:"application"}},t={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:s?0:55,marginStart:s?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},n(mountPanel({panelId:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,microFrontend:e,panelConfig:t}))}})},TableHeaderComponent:jsxRuntimeExports.jsx(ApplicationsTableHeader,{}),TableEmptyStateComponent:jsxRuntimeExports.jsx(NullState,{image:img$Q,header:SHARED_TEXT.noApplication,description:SHARED_TEXT.noPendingApplication}),TableErrorStateComponent:jsxRuntimeExports.jsx(ErrorState,{onRetry:e,errorMessage:SHARED_TEXT.applicationErrorMessage})})},uiActions=slice.actions,EnginesTableHeader=function(){function t(e){a(uiActions.setEngineSort({col:e,dir:n!==e||n===e&&"desc"===r?"asc":"desc"})),a(actions.engines.resetList(null)),a(actions.engines.readStart(null))}function e(e){return jsxRuntimeExports.jsx(TableSortLabel,{active:n===e,direction:n===e?r:"asc",onClick:function(){return t(e)},IconComponent:default_1$1})}var a=useDispatch(),n=useSelector(selectEngineSortBy),r=useSelector(selectEngineSortDirection);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Grid,{"data-test":"ac-approvals-table-header",sx:{height:32,pl:3},alignItems:"center",display:"flex",container:!0,children:[jsxRuntimeExports.jsxs(Grid,{item:!0,xs:4,sx:{display:"flex",alignItems:"center"},children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-engine-name","data-test":"os-admin-center-approvals-table-header-engine-name",onClick:function(){return t("name")},children:SHARED_TEXT.name}),e("name")]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-eng-id","data-test":"os-admin-center-approvals-table-header-eng-id",children:SHARED_TEXT.engId})}),jsxRuntimeExports.jsxs(Grid,{item:!0,xs:2,children:[jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-requested-date","data-test":"os-admin-center-approvals-table-requested-date",onClick:function(){return t("modifiedDateTime")},children:SHARED_TEXT.requestDate}),e("modifiedDateTime")]}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-status","data-test":"os-admin-center-approvals-table-status",children:SHARED_TEXT.status})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}})]})},StatusPill$1=statusPill.jsx,TableInfiniteScroll$1=tableInfiniteScroll.jsx.TableInfiniteScroll,itemHeight$1=60,TableRow$1=function(e){var t=e.item,a=e.index,e=e.onClick,n="".concat(itemHeight$1-1,"px");return jsxRuntimeExports.jsx(Box,{"data-testid":"engine-table-index-".concat(a),"data-test":"engine-table-index-".concat(a),sx:{width:"100%",height:n,borderBottom:"1px solid #D5DFE9","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},children:jsxRuntimeExports.jsx(Grid,{style:{height:"100%",flexGrow:1},container:!0,children:jsxRuntimeExports.jsxs(Grid,{direction:"row",justifyContent:"flex-start",alignItems:"center",container:!0,xs:12,sx:{pl:3,cursor:"pointer"},onClick:e,"data-test":"os-admin-center-approvals-table-row",children:[jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:1,sx:{pl:1,pr:2},children:null!=t&&t.signedIconPath?jsxRuntimeExports.jsx(Box,{sx:{display:"flex","& img":{width:"24px",height:"24px",borderRadius:"12px"}},children:jsxRuntimeExports.jsx("img",{src:t.signedIconPath,alt:"package-icon"})}):jsxRuntimeExports.jsx(Engines,{})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:3,sx:{pr:2},children:jsxRuntimeExports.jsx(Typography,{variant:"body1",color:"textPrimary","data-testid":"admin-center.group-row.name","data-test":"admin-center.group-row.name",noWrap:!0,children:index.truncatedString(null==t?void 0:t.name,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,sx:{pr:3},children:jsxRuntimeExports.jsx(CopyText,{id:"admin-center.approvals-row.created-by-email",variant:"body2",value:null==t?void 0:t.id})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==t?void 0:t.modifiedDateTime})}),jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.engines-status","data-test":"admin-center.approvals-row.engines-status",children:jsxRuntimeExports.jsx(StatusPill$1,{statusType:"package",status:null==t?void 0:t.state,ContainerProps:{sx:{width:"fit-content",height:"18px",left:"264px",top:"244px",borderRadius:"32px",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center",padding:"3px 10px",gap:"10px",border:"1px solid #215E73"}},TypographyProps:{sx:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"9px",lineHeight:"12px",textTransform:"uppercase",color:"#215E73"}}})})})]})})})},_enginesRedux_selectors=selectors$2,selectItems$1=_enginesRedux_selectors.selectItems,selectHasMore$1=_enginesRedux_selectors.selectHasMore,selectOffset$1=_enginesRedux_selectors.selectOffset,selectReadStatus$1=_enginesRedux_selectors.selectReadStatus,EnginesTable=function(){function e(){n(actions.engines.readStart(null))}var n=useDispatch(),t=useSelector(selectItems$1),a=useSelector(selectHasMore$1),r=useSelector(selectOffset$1),i=useSelector(selectReadStatus$1),s=useSelector(selectIsFullscreenEnabled),o=useSelector(selectAdminCenterOrgParameter),l=reactExports.useMemo(function(){return o?t.filter(function(e){return e.ownerOrganization.id===o}):t},[t]);return jsxRuntimeExports.jsx(TableInfiniteScroll$1,{hasMore:a,fetchMore:e,fetchOnMount:0===t.length,offset:r,items:l,itemHeight:itemHeight$1,isLoading:"pending"===i,error:"failure"===i,adjustTableHeight:-40,TableRowComponent:function(e){var a=e.item;return jsxRuntimeExports.jsx(TableRow$1,{item:a,index:e.index,onClick:function(){var e,t;e=(null==a?void 0:a.id)||"","ready"!==(t=null!=(t=null==a?void 0:a.state)?t:"")&&(t={name:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,config:{id:e,type:"engine"}},e={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:s?0:55,marginStart:s?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},n(mountPanel({panelId:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,microFrontend:t,panelConfig:e})))}})},TableHeaderComponent:jsxRuntimeExports.jsx(EnginesTableHeader,{}),TableEmptyStateComponent:jsxRuntimeExports.jsx(NullState,{image:img$Q,header:SHARED_TEXT.noEngine,description:SHARED_TEXT.noPendingEngine}),TableErrorStateComponent:jsxRuntimeExports.jsx(ErrorState,{onRetry:e,errorMessage:SHARED_TEXT.engineErrorMessage})})},TableHeader=function(){return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsxs(Grid,{"data-test":"ac-approvals-table-header",sx:{height:32,pl:3},alignItems:"center",display:"flex",container:!0,children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:6,sx:{display:"flex",alignItems:"center"},children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-header-package-name","data-test":"os-admin-center-approvals-table-header-package-name",children:SHARED_TEXT.name})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-requested-date","data-test":"os-admin-center-approvals-table-requested-date",children:SHARED_TEXT.requestDate})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"caption",color:"textSecondary",sx:{cursor:"default"},"data-testid":"os-admin-center-approvals-table-status","data-test":"os-admin-center-approvals-table-status",children:SHARED_TEXT.status})})]}),jsxRuntimeExports.jsx(Divider,{sx:{opacity:.9}})]})},StatusPill=statusPill.jsx,TableInfiniteScroll=tableInfiniteScroll.jsx.TableInfiniteScroll,itemHeight=60,TableRow=function(e){var t=e.item,a=e.index,e=e.onClick,n="".concat(itemHeight-1,"px"),r=t.audit.find(function(e){return"submit"===e.action}),i=null==t?void 0:t.userDetails,i=null!=i&&i.firstName&&null!=i&&i.lastName?"".concat(null==i?void 0:i.firstName," ").concat(null==i?void 0:i.lastName):(null==t||null==(i=t.invitee)?void 0:i.name)||(null==t||null==(i=t.invitee)?void 0:i.email)||"";return jsxRuntimeExports.jsx(Box,{"data-testid":"registration-table-index-".concat(a),"data-test":"registration-table-index-".concat(a),sx:{width:"100%",height:n,borderBottom:"1px solid #D5DFE9","&:hover":{backgroundColor:"#f2f5f9",cursor:"pointer"}},children:jsxRuntimeExports.jsx(Grid,{style:{height:"100%",flexGrow:1},container:!0,children:jsxRuntimeExports.jsxs(Grid,{direction:"row",justifyContent:"flex-start",alignItems:"center",container:!0,xs:12,sx:{pl:3,cursor:"pointer"},"data-test":"os-admin-center-registrations-approvals-table-row",onClick:e,children:[jsxRuntimeExports.jsx(Grid,{item:!0,xs:6,sx:{pr:3},children:jsxRuntimeExports.jsx(Typography,{variant:"body1",color:"textPrimary","data-testid":"admin-center.group-row.name","data-test":"admin-center.group-row.name",children:index.truncatedString(i,30)})}),jsxRuntimeExports.jsx(Grid,{item:!0,xs:4,children:jsxRuntimeExports.jsx(index.DateFormatter,{value:null==r?void 0:r.timestamp})}),jsxRuntimeExports.jsx(Grid,{display:"flex",justifyContent:"space-between",alignItems:"center",item:!0,xs:2,children:jsxRuntimeExports.jsx(Typography,{variant:"body2",color:"textSecondary","data-testid":"admin-center.approvals-row.registrations-status","data-test":"admin-center.approvals-row.registrations-status",children:jsxRuntimeExports.jsx(StatusPill,{statusType:"package",status:null==t?void 0:t.status,ContainerProps:{sx:{width:"fit-content",height:"18px",left:"264px",top:"244px",borderRadius:"32px",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center",padding:"3px 10px",gap:"10px",border:"1px solid #215E73"}},TypographyProps:{sx:{fontFamily:"Nunito",fontStyle:"normal",fontWeight:800,fontSize:"9px",lineHeight:"12px",textTransform:"uppercase",color:"#215E73"}}})})})]})})})},_registrationsRedux_selectors=selectors$1,selectItems=_registrationsRedux_selectors.selectItems,selectHasMore=_registrationsRedux_selectors.selectHasMore,selectOffset=_registrationsRedux_selectors.selectOffset,selectReadStatus=_registrationsRedux_selectors.selectReadStatus,Table=function(){function e(){n(actions.registrations.readStart(null))}var n=useDispatch(),t=useSelector(selectItems),a=useSelector(selectHasMore),r=useSelector(selectOffset),i=useSelector(selectReadStatus),s=useSelector(selectIsFullscreenEnabled);return jsxRuntimeExports.jsx(TableInfiniteScroll,{hasMore:a,fetchMore:e,fetchOnMount:0===t.length,offset:r,items:t,itemHeight:itemHeight,isLoading:"pending"===i,error:"failure"===i,adjustTableHeight:-40,TableRowComponent:function(e){var a=e.item;return jsxRuntimeExports.jsx(TableRow,{item:a,index:e.index,onClick:function(){var e,t;a.id&&"submitted"===a.status&&(e=a.id,e={name:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,config:{id:e,type:"registration"}},t={type:AvailablePanels.APP_BAR_PANEL_TEMPLATE,marginTop:s?0:55,marginStart:s?0:80,size:"medium",parentPanelId:AvailableComponents.ADMIN_CENTER,dimmed:0,dimmedStatus:"dimParent",borderBottom:!0},n(mountPanel({panelId:AvailableComponents.ADMIN_CENTER_APPROVAL_REQUESTS_PANEL,microFrontend:e,panelConfig:t})))}})},TableHeaderComponent:jsxRuntimeExports.jsx(TableHeader,{}),TableEmptyStateComponent:jsxRuntimeExports.jsx(NullState,{image:img$Q,header:SHARED_TEXT.noRegistration,description:SHARED_TEXT.noPendingRegistration}),TableErrorStateComponent:jsxRuntimeExports.jsx(ErrorState,{onRetry:e,errorMessage:SHARED_TEXT.registrationErrorMessage})})};function _array_like_to_array$1(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function _array_with_holes$1(e){if(Array.isArray(e))return e}function _iterable_to_array_limit$1(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,o=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(o)throw r}}return i}}function _non_iterable_rest$1(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array$1(e,t){return _array_with_holes$1(e)||_iterable_to_array_limit$1(e,t)||_unsupported_iterable_to_array$1(e,t)||_non_iterable_rest$1()}function _unsupported_iterable_to_array$1(e,t){var a;if(e)return"string"==typeof e?_array_like_to_array$1(e,t):"Map"===(a="Object"===(a=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_array_like_to_array$1(e,t):void 0}var createTab=function(e,t,a,n,r){return{tab:e,label:t,component:a,id:n,disabled:r}},approvalsTabs=function(e){return[createTab(SHARED_TEXT.packageTab,SHARED_TEXT.packages,jsxRuntimeExports.jsx(PackageTable,{}),"os-admin-center-approvals-panel-package-tab-btn",!1),createTab(SHARED_TEXT.applicationTab,SHARED_TEXT.applications,jsxRuntimeExports.jsx(ApplicationsTable,{}),"os-admin-center-approvals-panel-application-tab-btn",!1),createTab(SHARED_TEXT.engineTab,SHARED_TEXT.engines,jsxRuntimeExports.jsx(EnginesTable,{}),"os-admin-center-approvals-panel-engine-tab-btn",!e),createTab(SHARED_TEXT.registrationTab,SHARED_TEXT.registrations,jsxRuntimeExports.jsx(Table,{}),"os-admin-center-approvals-panel-registrations-tab-btn",!e)]},ApprovalsTabs=function(){var a=useDispatch(),e=useSelector(betaFeaturesSelector),t=_sliced_to_array$1(reactExports.useState([]),2),n=t[0],r=t[1],t=_sliced_to_array$1(reactExports.useState(0),2),i=t[0],s=t[1],t=tabUseStyles().classes;return reactExports.useEffect(function(){r(approvalsTabs(e))},[e]),jsxRuntimeExports.jsxs("div",{className:t.tabsContainer,"data-test":"os-admin-center-approvals-tabs",children:[jsxRuntimeExports.jsx("div",{className:t.tabsParent,"data-test":"os-admin-center-approvals-tabs.container",children:jsxRuntimeExports.jsx(CustomTabs,{selectedId:i,onChangeTab:function(e){var t=null!=(t=null==n||null==(t=n[e])?void 0:t.tab)?t:SHARED_TEXT.packageTab;switch(s(e),a(slice.actions.setActiveTab(t)),t){case SHARED_TEXT.applicationTab:a(actions.applications.resetList(null)),a(actions.applications.readStart(null));break;case SHARED_TEXT.engineTab:a(actions.engines.resetList(null)),a(actions.engines.readStart(null));break;case SHARED_TEXT.packageTab:a(actions.packages.resetList(null)),a(actions.packages.readStart(null))}},tabsList:n})}),jsxRuntimeExports.jsx(Divider,{}),jsxRuntimeExports.jsx(Box,{className:t.tabPanels,children:n.map(function(e,t){return jsxRuntimeExports.jsx(TabPanel,{value:i,index:t,children:jsxRuntimeExports.jsx(Stack,{sx:{flex:"1",display:"flex",flexDirection:"column",height:"100%",paddingBottom:"30px"},children:e.component})},e.id)})})]})};function _array_like_to_array(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function _array_with_holes(e){if(Array.isArray(e))return e}function _iterable_to_array_limit(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,r,i=[],s=!0,o=!1;try{for(a=a.call(e);!(s=(n=a.next()).done)&&(i.push(n.value),!t||i.length!==t);s=!0);}catch(e){o=!0,r=e}finally{try{s||null==a.return||a.return()}finally{if(o)throw r}}return i}}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(e,t){return _array_with_holes(e)||_iterable_to_array_limit(e,t)||_unsupported_iterable_to_array(e,t)||_non_iterable_rest()}function _unsupported_iterable_to_array(e,t){var a;if(e)return"string"==typeof e?_array_like_to_array(e,t):"Map"===(a="Object"===(a=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:a)||"Set"===a?Array.from(a):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?_array_like_to_array(e,t):void 0}var TableSearchInputButton=tableSearchComponents.TableSearchInputButton,uiStateActions=slice.actions,SearchButton=function(){var t=useDispatch(),e=_sliced_to_array(reactExports.useState(""),2),a=e[0],n=e[1],r=useSelector(selectActiveTab),i=useSelector(selectSearchValue),e=useSelector(selectIsTableSearchTyping),s=useSelector(selectIsTableSearchVisible),o=reactExports.useRef(debounce(function(e){t(uiStateActions.setSearchValue(e))},1e3)).current;return reactExports.useEffect(function(){n("")},[r]),reactExports.useEffect(function(){s&&n(i)},[s]),reactExports.useEffect(function(){switch(r){case SHARED_TEXT.applicationTab:t(actions.applications.resetList(null)),t(actions.applications.readStart(null));break;case SHARED_TEXT.engineTab:t(actions.engines.resetList(null)),t(actions.engines.readStart(null));break;case SHARED_TEXT.packageTab:t(actions.packages.resetList(null)),t(actions.packages.readStart(null))}!i&&a&&n("")},[i]),reactExports.useEffect(function(){return function(){o.cancel()}},[]),"Registrations"===r?null:jsxRuntimeExports.jsx(TableSearchInputButton,{onChange:function(e){e=e.target.value;n(e),o(e)},onClear:function(){t(uiStateActions.setSearchValue(""))},onToggleSearch:function(){t(uiStateActions.setIsTableSearchVisible(!s))},testId:"approvals-table-search",placeholderText:"Search Approval Requests",searchValue:i,inputValue:a,isSearchVisible:s,isSearching:e,searchItemTooltipText:"Search ".concat(r," Approval Requests")})},Approvals=function(){var e=navSectionStyles().classes;return jsxRuntimeExports.jsxs("section",{className:e.root,children:[jsxRuntimeExports.jsx("header",{className:e.header,style:{flexDirection:"column",borderBottom:"none",paddingBottom:"10px"},children:jsxRuntimeExports.jsx(Box,{width:"100%",children:jsxRuntimeExports.jsxs(Stack,{direction:"row",justifyContent:"space-between",alignItems:"center",children:[jsxRuntimeExports.jsxs(Box,{children:[jsxRuntimeExports.jsx(Box,{className:e.startToolbar,children:jsxRuntimeExports.jsx(Typography,{variant:"h5","data-testid":"os-admin-center-approvals-title","data-test":"os-admin-center-approvals-title",sx:{fontWeight:"600",mb:1},children:SHARED_TEXT.approvals})}),jsxRuntimeExports.jsx(Box,{className:e.startToolbar,children:jsxRuntimeExports.jsx(Typography,{variant:"caption","data-testid":"os-admin-center-approvals-sub-title","data-test":"os-admin-center-approvals-sub-title",children:SHARED_TEXT.description})})]}),jsxRuntimeExports.jsx(Stack,{direction:"row",justifyContent:"flex-end",alignItems:"center",marginRight:"10px",gap:"10px",children:jsxRuntimeExports.jsx(SearchButton,{})})]})})}),jsxRuntimeExports.jsx("div",{className:e.tableWrapper,"data-testid":"os-admin-center-approvals-table","data-test":"os-admin-center-approvals-table",children:jsxRuntimeExports.jsx(ApprovalsTabs,{})})]})};export{ApprovalRequestsPanel,Approvals,EPackageStatus,SLICE_NAME,actions,getApprovalsModule,initialState,rootReducer,selectActiveTab,selectApplicationById,selectApplicationSortBy,selectApplicationSortDirection,selectEngineById,selectEngineSortBy,selectEngineSortDirection,selectIsTableSearchTyping,selectIsTableSearchVisible,selectPackageById,selectRegistrationById,selectSearchValue,selectTypeById};
|
package/js-core.esm52.js.gz
CHANGED
|
Binary file
|